From 55587df9924d89a3c86f80fcfea654fca4708084 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Wed, 2 Dec 2015 16:49:01 +0100 Subject: [PATCH 001/250] updated system to proper use of Tokens and consumes --- .../interface/ShallowClustersProducer.h | 3 +- .../interface/ShallowEventDataProducer.h | 2 + .../interface/ShallowGainCalibration.h | 4 +- .../interface/ShallowRechitClustersProducer.h | 8 +- .../interface/ShallowSimTracksProducer.h | 10 +- .../interface/ShallowSimhitClustersProducer.h | 10 +- .../SiStripCommon/interface/ShallowTools.h | 5 +- .../interface/ShallowTrackClustersProducer.h | 9 +- .../interface/ShallowTracksProducer.h | 2 + .../SiStripCommon/interface/ShallowTree.h | 17 +- .../plugins/ShallowClustersProducer.cc | 2 +- .../plugins/ShallowEventDataProducer.cc | 3 +- .../plugins/ShallowGainCalibration.cc | 10 +- .../plugins/ShallowRechitClustersProducer.cc | 18 +- .../plugins/ShallowSimTracksProducer.cc | 14 +- .../plugins/ShallowSimhitClustersProducer.cc | 22 ++- .../plugins/ShallowTrackClustersProducer.cc | 12 +- .../plugins/ShallowTracksProducer.cc | 4 +- .../SiStripCommon/plugins/ShallowTree.cc | 160 +++++++++--------- .../ShallowSimhitClustersProducer_cfi.py | 29 ++-- .../SiStripCommon/src/ShallowTools.cc | 5 +- 21 files changed, 199 insertions(+), 150 deletions(-) diff --git a/CalibTracker/SiStripCommon/interface/ShallowClustersProducer.h b/CalibTracker/SiStripCommon/interface/ShallowClustersProducer.h index 29e94709f6c36..8f926a95deecd 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowClustersProducer.h +++ b/CalibTracker/SiStripCommon/interface/ShallowClustersProducer.h @@ -6,6 +6,7 @@ #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/Utilities/interface/EDGetToken.h" #include "DataFormats/Common/interface/DetSetVector.h" +#include "DataFormats/Common/interface/DetSetVectorNew.h" #include "DataFormats/SiStripCluster/interface/SiStripCluster.h" @@ -41,7 +42,7 @@ class ShallowClustersProducer : public edm::EDProducer { float outsideasymm() const {return (last-first)/(last+first);} }; - edm::EDGetTokenT > theClustersToken_; + edm::EDGetTokenT > theClustersToken_; edm::EDGetTokenT > theDigisToken_; }; diff --git a/CalibTracker/SiStripCommon/interface/ShallowEventDataProducer.h b/CalibTracker/SiStripCommon/interface/ShallowEventDataProducer.h index 97e284456fd21..953fb2c37b20b 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowEventDataProducer.h +++ b/CalibTracker/SiStripCommon/interface/ShallowEventDataProducer.h @@ -3,12 +3,14 @@ #include "FWCore/Framework/interface/EDProducer.h" #include "FWCore/Framework/interface/Frameworkfwd.h" +#include class ShallowEventDataProducer : public edm::EDProducer { public: explicit ShallowEventDataProducer(const edm::ParameterSet&); private: void produce( edm::Event &, const edm::EventSetup & ); + std::string trig_label_="gtDigis"; }; #endif diff --git a/CalibTracker/SiStripCommon/interface/ShallowGainCalibration.h b/CalibTracker/SiStripCommon/interface/ShallowGainCalibration.h index 28463e9735bf7..0bb126c4d04b8 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowGainCalibration.h +++ b/CalibTracker/SiStripCommon/interface/ShallowGainCalibration.h @@ -60,7 +60,9 @@ class ShallowGainCalibration : public edm::EDProducer { public: explicit ShallowGainCalibration(const edm::ParameterSet&); private: - edm::InputTag theTracksLabel; + const edm::EDGetTokenT< edm::View > tracks_token_; + const edm::EDGetTokenT< TrajTrackAssociationCollection > association_token_; + std::string Suffix; std::string Prefix; diff --git a/CalibTracker/SiStripCommon/interface/ShallowRechitClustersProducer.h b/CalibTracker/SiStripCommon/interface/ShallowRechitClustersProducer.h index 337c733233c3b..35083df5606b0 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowRechitClustersProducer.h +++ b/CalibTracker/SiStripCommon/interface/ShallowRechitClustersProducer.h @@ -4,6 +4,9 @@ #include "FWCore/Framework/interface/EDProducer.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/Common/interface/DetSetVectorNew.h" +#include "DataFormats/SiStripCluster/interface/SiStripCluster.h" +#include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h" class ShallowRechitClustersProducer : public edm::EDProducer { public: @@ -11,8 +14,9 @@ class ShallowRechitClustersProducer : public edm::EDProducer { private: std::string Suffix; std::string Prefix; - edm::InputTag theClustersLabel; - std::vector inputTags; + const edm::EDGetTokenT< edmNew::DetSetVector > clusters_token_; + std::vector< edm::EDGetTokenT > rec_hits_tokens_; + //std::vector inputTags; void produce( edm::Event &, const edm::EventSetup & ); }; diff --git a/CalibTracker/SiStripCommon/interface/ShallowSimTracksProducer.h b/CalibTracker/SiStripCommon/interface/ShallowSimTracksProducer.h index 26187a269738d..4f554a27a91f0 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowSimTracksProducer.h +++ b/CalibTracker/SiStripCommon/interface/ShallowSimTracksProducer.h @@ -4,6 +4,10 @@ #include "FWCore/Framework/interface/EDProducer.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/Common/interface/DetSetVectorNew.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h" +#include "SimDataFormats/Associations/interface/TrackToTrackingParticleAssociator.h" class ShallowSimTracksProducer : public edm::EDProducer { @@ -15,9 +19,9 @@ class ShallowSimTracksProducer : public edm::EDProducer { const std::string Prefix; const std::string Suffix; - const edm::InputTag trackingParticles_tag; - const edm::InputTag associator_tag; - const edm::InputTag tracks_tag; + const edm::EDGetTokenT trackingParticles_token_; + const edm::EDGetTokenT associator_token_; + const edm::EDGetTokenT > tracks_token_; void produce( edm::Event &, const edm::EventSetup & ) override; }; diff --git a/CalibTracker/SiStripCommon/interface/ShallowSimhitClustersProducer.h b/CalibTracker/SiStripCommon/interface/ShallowSimhitClustersProducer.h index 9fe534d316a3a..ce215d0db0762 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowSimhitClustersProducer.h +++ b/CalibTracker/SiStripCommon/interface/ShallowSimhitClustersProducer.h @@ -5,15 +5,19 @@ #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Utilities/interface/InputTag.h" #include "CalibTracker/SiStripCommon/interface/ShallowTools.h" -class SiStripCluster; +#include "DataFormats/Common/interface/DetSetVectorNew.h" +#include "DataFormats/SiStripCluster/interface/SiStripCluster.h" +#include "SimDataFormats/TrackingHit/interface/PSimHit.h" class ShallowSimhitClustersProducer : public edm::EDProducer { public: explicit ShallowSimhitClustersProducer(const edm::ParameterSet&); private: - std::vector inputTags; - edm::InputTag theClustersLabel; + //std::vector inputTags; + std::vector< edm::EDGetTokenT< std::vector > > simhits_tokens_; + const edm::EDGetTokenT< edmNew::DetSetVector > clusters_token_; std::string Prefix; + std::string runningmode_; void produce( edm::Event &, const edm::EventSetup & ); shallow::CLUSTERMAP::const_iterator match_cluster(const unsigned&, diff --git a/CalibTracker/SiStripCommon/interface/ShallowTools.h b/CalibTracker/SiStripCommon/interface/ShallowTools.h index 4af5ddd56eef8..ca154fd7e92f9 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowTools.h +++ b/CalibTracker/SiStripCommon/interface/ShallowTools.h @@ -4,6 +4,9 @@ #include "FWCore/Framework/interface/Frameworkfwd.h" #include "DataFormats/Common/interface/DetSetVectorNew.h" #include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/SiStripCluster/interface/SiStripCluster.h" +#include "DataFormats/Common/interface/DetSetVectorNew.h" +#include "FWCore/Utilities/interface/EDGetToken.h" class StripGeomDetUnit; class MagneticField; @@ -15,7 +18,7 @@ namespace shallow { typedef std::map, unsigned int> CLUSTERMAP; -CLUSTERMAP make_cluster_map( const edm::Event& , edm::InputTag&); +CLUSTERMAP make_cluster_map( const edm::Event& , const edm::EDGetTokenT< edmNew::DetSetVector > & ); LocalVector drift( const StripGeomDetUnit*, const MagneticField&, const SiStripLorentzAngle&); int findTrackIndex(const edm::Handle >& h, const reco::Track* t); diff --git a/CalibTracker/SiStripCommon/interface/ShallowTrackClustersProducer.h b/CalibTracker/SiStripCommon/interface/ShallowTrackClustersProducer.h index 167b33e9fdb96..f7ba5dde0266b 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowTrackClustersProducer.h +++ b/CalibTracker/SiStripCommon/interface/ShallowTrackClustersProducer.h @@ -4,13 +4,18 @@ #include "FWCore/Framework/interface/EDProducer.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/Common/interface/DetSetVectorNew.h" +#include "DataFormats/SiStripCluster/interface/SiStripCluster.h" +#include "DataFormats/TrackReco/interface/Track.h" +#include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h" class ShallowTrackClustersProducer : public edm::EDProducer { public: explicit ShallowTrackClustersProducer(const edm::ParameterSet&); private: - edm::InputTag theTracksLabel; - edm::InputTag theClustersLabel; + const edm::EDGetTokenT > tracks_token_; + const edm::EDGetTokenT association_token_; + const edm::EDGetTokenT< edmNew::DetSetVector > clusters_token_; std::string Suffix; std::string Prefix; diff --git a/CalibTracker/SiStripCommon/interface/ShallowTracksProducer.h b/CalibTracker/SiStripCommon/interface/ShallowTracksProducer.h index 6e5a4b1b3a718..6c6f02a1bfc34 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowTracksProducer.h +++ b/CalibTracker/SiStripCommon/interface/ShallowTracksProducer.h @@ -4,11 +4,13 @@ #include "FWCore/Framework/interface/EDProducer.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/TrackReco/interface/Track.h" class ShallowTracksProducer : public edm::EDProducer { public: explicit ShallowTracksProducer(const edm::ParameterSet&); private: + const edm::EDGetTokenT > tracks_token_; edm::InputTag theTracksLabel; std::string Prefix; std::string Suffix; diff --git a/CalibTracker/SiStripCommon/interface/ShallowTree.h b/CalibTracker/SiStripCommon/interface/ShallowTree.h index b579009a25c29..4352d0c684115 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowTree.h +++ b/CalibTracker/SiStripCommon/interface/ShallowTree.h @@ -24,6 +24,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "CommonTools/UtilAlgos/interface/TFileService.h" +#include "FWCore/Utilities/interface/InputTag.h" #include #include @@ -35,6 +36,11 @@ class ShallowTree : public edm::EDAnalyzer { virtual void analyze(const edm::Event&, const edm::EventSetup&); virtual void endJob(){} + template + void eat(edm::BranchDescription const* desc) { + consumes(edm::InputTag(desc->moduleLabel(), desc->productInstanceName())); + } + class BranchConnector { public: virtual ~BranchConnector() {}; @@ -44,7 +50,7 @@ class ShallowTree : public edm::EDAnalyzer { template class TypedBranchConnector : public BranchConnector { private: - std::string ml; //module label + std::string ml; //module label std::string pin; //product instance name T object_; T* object_ptr_; @@ -53,13 +59,12 @@ class ShallowTree : public edm::EDAnalyzer { void connect(const edm::Event&); }; - edm::Service fs; - TTree * tree; - std::vector connectors; - edm::ParameterSet pset; + edm::Service fs_; + TTree * tree_; + std::vector connectors_; public: - explicit ShallowTree(const edm::ParameterSet& iConfig) : pset(iConfig) {} + explicit ShallowTree(const edm::ParameterSet& iConfig);// : pset(iConfig) {} enum LEAFTYPE {BOOL=1, BOOL_V, SHORT, SHORT_V, U_SHORT, U_SHORT_V, diff --git a/CalibTracker/SiStripCommon/plugins/ShallowClustersProducer.cc b/CalibTracker/SiStripCommon/plugins/ShallowClustersProducer.cc index 100a4a6852bce..07eb1f6a6db87 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowClustersProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowClustersProducer.cc @@ -50,7 +50,7 @@ ShallowClustersProducer::ShallowClustersProducer(const edm::ParameterSet& iConfi produces > ( Prefix + "petal" ); produces > ( Prefix + "stereo" ); - theClustersToken_ = consumes > (iConfig.getParameter("Clusters")); + theClustersToken_ = consumes > (iConfig.getParameter("Clusters")); theDigisToken_ = consumes > (edm::InputTag("siStripProcessedRawDigis", "")); } diff --git a/CalibTracker/SiStripCommon/plugins/ShallowEventDataProducer.cc b/CalibTracker/SiStripCommon/plugins/ShallowEventDataProducer.cc index 8a26afe694ba8..d49e7170e2386 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowEventDataProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowEventDataProducer.cc @@ -9,6 +9,7 @@ ShallowEventDataProducer::ShallowEventDataProducer(const edm::ParameterSet& iCon produces ( "lumi" ); produces > ( "TrigTech" ); produces > ( "TrigPh" ); + consumes(edm::InputTag(trig_label_)); } void ShallowEventDataProducer:: @@ -22,7 +23,7 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { edm::Handle< L1GlobalTriggerReadoutRecord > gtRecord; - iEvent.getByLabel( edm::InputTag("gtDigis"), gtRecord); + iEvent.getByLabel( edm::InputTag(trig_label_), gtRecord); std::vector TrigTech_(64,0); std::vector TrigPh_(128,0); diff --git a/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc b/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc index 528dfc5f822a4..c29d9dfe0d026 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc @@ -6,11 +6,9 @@ using namespace edm; using namespace reco; using namespace std; - - - ShallowGainCalibration::ShallowGainCalibration(const edm::ParameterSet& iConfig) - : theTracksLabel( iConfig.getParameter("Tracks") ), + : tracks_token_( consumes< edm::View >(iConfig.getParameter("Tracks")) ), + association_token_( consumes< TrajTrackAssociationCollection >(iConfig.getParameter("Tracks")) ), Suffix ( iConfig.getParameter("Suffix") ), Prefix ( iConfig.getParameter("Prefix") ) { @@ -54,8 +52,8 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { edm::ESHandle theTrackerGeometry; iSetup.get().get( theTrackerGeometry ); m_tracker=&(* theTrackerGeometry ); edm::ESHandle gainHandle; iSetup.get().get(gainHandle); - edm::Handle > tracks; iEvent.getByLabel(theTracksLabel, tracks); - edm::Handle associations; iEvent.getByLabel(theTracksLabel, associations); + edm::Handle > tracks; iEvent.getByToken(tracks_token_, tracks); + edm::Handle associations; iEvent.getByToken(association_token_, associations); for( TrajTrackAssociationCollection::const_iterator association = associations->begin(); association != associations->end(); association++) { const Trajectory* traj = association->key.get(); diff --git a/CalibTracker/SiStripCommon/plugins/ShallowRechitClustersProducer.cc b/CalibTracker/SiStripCommon/plugins/ShallowRechitClustersProducer.cc index 646e4731ebba9..4387b43b333e9 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowRechitClustersProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowRechitClustersProducer.cc @@ -1,7 +1,5 @@ #include "CalibTracker/SiStripCommon/interface/ShallowRechitClustersProducer.h" -#include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2DCollection.h" - #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h" @@ -16,9 +14,15 @@ ShallowRechitClustersProducer::ShallowRechitClustersProducer(const edm::ParameterSet& iConfig) : Suffix ( iConfig.getParameter("Suffix") ), Prefix ( iConfig.getParameter("Prefix") ), - theClustersLabel( iConfig.getParameter("Clusters")), - inputTags ( iConfig.getParameter >("InputTags")) + clusters_token_( consumes< edmNew::DetSetVector >(iConfig.getParameter("Clusters"))) { + std::vector rec_hits_tags = iConfig.getParameter >("InputTags"); + for(auto itag : rec_hits_tags) { + rec_hits_tokens_.push_back( + consumes< SiStripRecHit2DCollection >(itag) + ); + } + produces > ( Prefix + "strip" + Suffix ); produces > ( Prefix + "merr" + Suffix ); produces > ( Prefix + "localx" + Suffix ); @@ -32,7 +36,7 @@ ShallowRechitClustersProducer::ShallowRechitClustersProducer(const edm::Paramete void ShallowRechitClustersProducer:: produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { - shallow::CLUSTERMAP clustermap = shallow::make_cluster_map(iEvent,theClustersLabel); + shallow::CLUSTERMAP clustermap = shallow::make_cluster_map(iEvent, clusters_token_); int size = clustermap.size(); std::auto_ptr > strip ( new std::vector(size, -10000 )); @@ -47,7 +51,9 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { edm::ESHandle theTrackerGeometry; iSetup.get().get( theTrackerGeometry ); - BOOST_FOREACH(const edm::InputTag& input, inputTags ) { edm::Handle recHits; iEvent.getByLabel(input, recHits); + for(auto recHit_token : rec_hits_tokens_) { + edm::Handle recHits; + iEvent.getByToken(recHit_token, recHits); BOOST_FOREACH( const SiStripRecHit2DCollection::value_type& ds, *recHits) { BOOST_FOREACH( const SiStripRecHit2D& hit, ds) { diff --git a/CalibTracker/SiStripCommon/plugins/ShallowSimTracksProducer.cc b/CalibTracker/SiStripCommon/plugins/ShallowSimTracksProducer.cc index 2827762f651c9..a5b2f410b68bf 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowSimTracksProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowSimTracksProducer.cc @@ -4,8 +4,6 @@ #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "SimDataFormats/TrackingAnalysis/interface/TrackingParticle.h" -#include "SimDataFormats/Associations/interface/TrackToTrackingParticleAssociator.h" #include "DataFormats/RecoCandidate/interface/TrackAssociation.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" @@ -13,9 +11,9 @@ ShallowSimTracksProducer::ShallowSimTracksProducer(const edm::ParameterSet& conf) : Prefix( conf.getParameter("Prefix") ), Suffix( conf.getParameter("Suffix") ), - trackingParticles_tag( conf.getParameter("TrackingParticles")), - associator_tag( conf.getParameter("Associator")), - tracks_tag( conf.getParameter("Tracks")) + trackingParticles_token_(consumes(conf.getParameter("TrackingParticles"))), + associator_token_( consumes(conf.getParameter("Associator"))), + tracks_token_(consumes >(conf.getParameter("Tracks"))) { produces > ( Prefix + "multi" + Suffix ); produces > ( Prefix + "type" + Suffix ); @@ -35,9 +33,9 @@ ShallowSimTracksProducer::ShallowSimTracksProducer(const edm::ParameterSet& conf void ShallowSimTracksProducer:: produce(edm::Event& event, const edm::EventSetup& setup) { - edm::Handle > tracks ; event.getByLabel( tracks_tag, tracks); - edm::Handle trackingParticles ; event.getByLabel( trackingParticles_tag, trackingParticles ); - edm::Handle associator ; event.getByLabel( associator_tag, associator); + edm::Handle > tracks ; event.getByToken(tracks_token_, tracks); + edm::Handle trackingParticles ; event.getByToken(trackingParticles_token_, trackingParticles ); + edm::Handle associator ; event.getByToken(associator_token_, associator); unsigned size = tracks->size(); std::auto_ptr > multi ( new std::vector(size, 0)); diff --git a/CalibTracker/SiStripCommon/plugins/ShallowSimhitClustersProducer.cc b/CalibTracker/SiStripCommon/plugins/ShallowSimhitClustersProducer.cc index 1b8a651f94eb5..74ad92d16339f 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowSimhitClustersProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowSimhitClustersProducer.cc @@ -1,7 +1,6 @@ #include "CalibTracker/SiStripCommon/interface/ShallowSimhitClustersProducer.h" #include "CalibTracker/SiStripCommon/interface/ShallowTools.h" -#include "SimDataFormats/TrackingHit/interface/PSimHit.h" #include "DataFormats/SiStripCluster/interface/SiStripCluster.h" #include "MagneticField/Engine/interface/MagneticField.h" @@ -18,10 +17,17 @@ #include "boost/foreach.hpp" ShallowSimhitClustersProducer::ShallowSimhitClustersProducer(const edm::ParameterSet& iConfig) - : inputTags( iConfig.getParameter >("InputTags") ), - theClustersLabel( iConfig.getParameter("Clusters")), - Prefix( iConfig.getParameter("Prefix") ) + : clusters_token_( consumes< edmNew::DetSetVector >(iConfig.getParameter("Clusters"))), + Prefix( iConfig.getParameter("Prefix") ), + runningmode_( iConfig.getParameter("runningMode") ) { + std::vector simhits_tags = iConfig.getParameter >("InputTags"); + for(auto itag : simhits_tags) { + simhits_tokens_.push_back( + consumes< std::vector >(itag) + ); + } + produces > ( Prefix + "hits" ); produces > ( Prefix + "strip" ); produces > ( Prefix + "localtheta" ); @@ -38,7 +44,7 @@ ShallowSimhitClustersProducer::ShallowSimhitClustersProducer(const edm::Paramete void ShallowSimhitClustersProducer:: produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { - shallow::CLUSTERMAP clustermap = shallow::make_cluster_map(iEvent,theClustersLabel); + shallow::CLUSTERMAP clustermap = shallow::make_cluster_map(iEvent,clusters_token_); int size = clustermap.size(); std::auto_ptr > hits ( new std::vector (size, 0) ); @@ -56,10 +62,12 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { edm::ESHandle theTrackerGeometry; iSetup.get().get( theTrackerGeometry ); edm::ESHandle magfield; iSetup.get().get(magfield); - edm::ESHandle SiStripLorentzAngle; iSetup.get().get(SiStripLorentzAngle); + edm::ESHandle SiStripLorentzAngle; iSetup.get().get(runningmode_, SiStripLorentzAngle); edm::Handle > clusters; iEvent.getByLabel("siStripClusters", "", clusters); - BOOST_FOREACH( const edm::InputTag inputTag, inputTags ) { edm::Handle > simhits; iEvent.getByLabel(inputTag, simhits); + for(auto& simhit_token : simhits_tokens_) { + edm::Handle< std::vector > simhits; + iEvent.getByToken(simhit_token, simhits); BOOST_FOREACH( const PSimHit hit, *simhits ) { const uint32_t id = hit.detUnitId(); diff --git a/CalibTracker/SiStripCommon/plugins/ShallowTrackClustersProducer.cc b/CalibTracker/SiStripCommon/plugins/ShallowTrackClustersProducer.cc index 2b4abef48f8f9..ba6d5448bf4e8 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowTrackClustersProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowTrackClustersProducer.cc @@ -3,7 +3,6 @@ #include "CalibTracker/SiStripCommon/interface/ShallowTools.h" #include "TrackingTools/PatternTools/interface/Trajectory.h" -#include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h" #include "TrackingTools/TrackFitters/interface/TrajectoryStateCombiner.h" #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit1D.h" #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h" @@ -25,8 +24,9 @@ #include "CalibTracker/Records/interface/SiStripDependentRecords.h" ShallowTrackClustersProducer::ShallowTrackClustersProducer(const edm::ParameterSet& iConfig) - : theTracksLabel( iConfig.getParameter("Tracks") ), - theClustersLabel( iConfig.getParameter("Clusters") ), + : tracks_token_(consumes >(iConfig.getParameter("Tracks"))), + association_token_(consumes(iConfig.getParameter("Tracks"))), + clusters_token_( consumes< edmNew::DetSetVector >( iConfig.getParameter("Clusters") ) ), Suffix ( iConfig.getParameter("Suffix") ), Prefix ( iConfig.getParameter("Prefix") ) { @@ -70,7 +70,7 @@ ShallowTrackClustersProducer::ShallowTrackClustersProducer(const edm::ParameterS void ShallowTrackClustersProducer:: produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { - shallow::CLUSTERMAP clustermap = shallow::make_cluster_map(iEvent,theClustersLabel); + shallow::CLUSTERMAP clustermap = shallow::make_cluster_map(iEvent, clusters_token_); int size = clustermap.size(); std::auto_ptr > trackmulti ( new std::vector(size, 0) ); @@ -111,8 +111,8 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { edm::ESHandle magfield; iSetup.get().get(magfield); edm::ESHandle SiStripLorentzAngle; iSetup.get().get(SiStripLorentzAngle); - edm::Handle > tracks; iEvent.getByLabel(theTracksLabel, tracks); - edm::Handle associations; iEvent.getByLabel(theTracksLabel, associations); + edm::Handle > tracks; iEvent.getByToken(tracks_token_, tracks); + edm::Handle associations; iEvent.getByToken(association_token_, associations); TrajectoryStateCombiner combiner; diff --git a/CalibTracker/SiStripCommon/plugins/ShallowTracksProducer.cc b/CalibTracker/SiStripCommon/plugins/ShallowTracksProducer.cc index 2de1b06713ec6..bd6867d96fd47 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowTracksProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowTracksProducer.cc @@ -8,7 +8,7 @@ #include "boost/foreach.hpp" ShallowTracksProducer::ShallowTracksProducer(const edm::ParameterSet& iConfig) - : theTracksLabel( iConfig.getParameter("Tracks") ), + : tracks_token_( consumes >( iConfig.getParameter("Tracks") )), Prefix ( iConfig.getParameter("Prefix") ), Suffix ( iConfig.getParameter("Suffix") ) { @@ -69,7 +69,7 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { std::auto_ptr > vz ( new std::vector() ); std::auto_ptr > algo ( new std::vector() ); - edm::Handle > tracks; iEvent.getByLabel(theTracksLabel, tracks); + edm::Handle > tracks; iEvent.getByToken(tracks_token_, tracks); *number = tracks->size(); BOOST_FOREACH( const reco::Track track, *tracks) { diff --git a/CalibTracker/SiStripCommon/plugins/ShallowTree.cc b/CalibTracker/SiStripCommon/plugins/ShallowTree.cc index d7300806127da..c61405dfe5116 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowTree.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowTree.cc @@ -7,39 +7,8 @@ #include #include -void ShallowTree:: -analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { - for( BranchConnector* connector: connectors) { - connector->connect(iEvent); - } - tree->Fill(); -} - -template -void ShallowTree::TypedBranchConnector:: -connect(const edm::Event& iEvent) { - edm::Handle handle_; - iEvent.getByLabel(ml, pin, handle_); - object_ = *handle_; -} - -template -ShallowTree::TypedBranchConnector:: -TypedBranchConnector(edm::BranchDescription const* desc, - std::string t, - TTree * tree) - : ml( desc->moduleLabel() ), - pin( desc->productInstanceName() ) -{ - object_ptr_ = &object_; - std::string s=pin+t; - if(t!="") { tree->Branch(pin.c_str(), object_ptr_, s.c_str() );} //raw type - else { tree->Branch(pin.c_str(), &object_ptr_ );} //vector -} - -void ShallowTree:: -beginJob() { - tree = fs->make("tree", ""); +ShallowTree::ShallowTree(const edm::ParameterSet& iConfig) { + tree_ = fs_->make("tree", ""); std::map leafmap; leafmap["bool"] = BOOL; leafmap["bools"] = BOOL_V; @@ -57,7 +26,7 @@ beginJob() { edm::Service reg; auto allBranches = reg->allBranchDescriptions(); - edm::ProductSelectorRules productSelectorRules_(pset, "outputCommands", "ShallowTree"); + edm::ProductSelectorRules productSelectorRules_(iConfig, "outputCommands", "ShallowTree"); edm::ProductSelector productSelector_; productSelector_.initialize(productSelectorRules_, allBranches); @@ -68,59 +37,94 @@ beginJob() { //Check for duplicate branch names if (branchnames.find( selection->productInstanceName()) != branchnames.end() ) { - throw edm::Exception(edm::errors::Configuration) - << "More than one branch named: " - << selection->productInstanceName() << std::endl - << "Exception thrown from ShallowTree::beginJob" << std::endl; + throw edm::Exception(edm::errors::Configuration) + << "More than one branch named: " + << selection->productInstanceName() << std::endl + << "Exception thrown from ShallowTree::ShallowTree" << std::endl; } else { - branchnames.insert( selection->productInstanceName() ); + branchnames.insert( selection->productInstanceName() ); } //Create ShallowTree branch switch(leafmap.find( selection->friendlyClassName() )->second) { - case BOOL : connectors.push_back( new TypedBranchConnector (selection, "/O", tree) ); break; - case BOOL_V : connectors.push_back( new TypedBranchConnector >(selection, "", tree) ); break; - case INT : connectors.push_back( new TypedBranchConnector (selection, "/I", tree) ); break; - case INT_V : connectors.push_back( new TypedBranchConnector >(selection, "", tree) ); break; - case U_INT : connectors.push_back( new TypedBranchConnector (selection, "/i", tree) ); break; - case U_INT_V : connectors.push_back( new TypedBranchConnector >(selection, "", tree) ); break; - case SHORT : connectors.push_back( new TypedBranchConnector (selection, "/S", tree) ); break; - case SHORT_V : connectors.push_back( new TypedBranchConnector >(selection, "", tree) ); break; - case U_SHORT : connectors.push_back( new TypedBranchConnector (selection, "/s", tree) ); break; - case U_SHORT_V: connectors.push_back( new TypedBranchConnector >(selection, "", tree) ); break; - case FLOAT : connectors.push_back( new TypedBranchConnector (selection, "/F", tree) ); break; - case FLOAT_V : connectors.push_back( new TypedBranchConnector >(selection, "", tree) ); break; - case DOUBLE : connectors.push_back( new TypedBranchConnector (selection, "/D", tree) ); break; - case DOUBLE_V : connectors.push_back( new TypedBranchConnector >(selection, "", tree) ); break; - case LONG : connectors.push_back( new TypedBranchConnector (selection, "/L", tree) ); break; - case LONG_V : connectors.push_back( new TypedBranchConnector >(selection, "", tree) ); break; - case U_LONG : connectors.push_back( new TypedBranchConnector (selection, "/l", tree) ); break; - case U_LONG_V : connectors.push_back( new TypedBranchConnector >(selection, "", tree) ); break; - case CHAR : connectors.push_back( new TypedBranchConnector (selection, "/B", tree) ); break; - case CHAR_V : connectors.push_back( new TypedBranchConnector >(selection, "", tree) ); break; - case U_CHAR : connectors.push_back( new TypedBranchConnector (selection, "/b", tree) ); break; - case U_CHAR_V : connectors.push_back( new TypedBranchConnector >(selection, "", tree) ); break; + case BOOL : connectors_.push_back( new TypedBranchConnector (selection, "/O", tree_) ); eat (selection); break; + case BOOL_V : connectors_.push_back( new TypedBranchConnector >(selection, "", tree_) ); eat >(selection); break; + case INT : connectors_.push_back( new TypedBranchConnector (selection, "/I", tree_) ); eat (selection); break; + case INT_V : connectors_.push_back( new TypedBranchConnector >(selection, "", tree_) ); eat >(selection); break; + case U_INT : connectors_.push_back( new TypedBranchConnector (selection, "/i", tree_) ); eat (selection); break; + case U_INT_V : connectors_.push_back( new TypedBranchConnector >(selection, "", tree_) ); eat >(selection); break; + case SHORT : connectors_.push_back( new TypedBranchConnector (selection, "/S", tree_) ); eat (selection); break; + case SHORT_V : connectors_.push_back( new TypedBranchConnector >(selection, "", tree_) ); eat >(selection); break; + case U_SHORT : connectors_.push_back( new TypedBranchConnector (selection, "/s", tree_) ); eat (selection); break; + case U_SHORT_V: connectors_.push_back( new TypedBranchConnector >(selection, "", tree_) ); eat >(selection); break; + case FLOAT : connectors_.push_back( new TypedBranchConnector (selection, "/F", tree_) ); eat (selection); break; + case FLOAT_V : connectors_.push_back( new TypedBranchConnector >(selection, "", tree_) ); eat >(selection); break; + case DOUBLE : connectors_.push_back( new TypedBranchConnector (selection, "/D", tree_) ); eat (selection); break; + case DOUBLE_V : connectors_.push_back( new TypedBranchConnector >(selection, "", tree_) ); eat >(selection); break; + case LONG : connectors_.push_back( new TypedBranchConnector (selection, "/L", tree_) ); eat (selection); break; + case LONG_V : connectors_.push_back( new TypedBranchConnector >(selection, "", tree_) ); eat >(selection); break; + case U_LONG : connectors_.push_back( new TypedBranchConnector (selection, "/l", tree_) ); eat (selection); break; + case U_LONG_V : connectors_.push_back( new TypedBranchConnector >(selection, "", tree_) ); eat >(selection); break; + case CHAR : connectors_.push_back( new TypedBranchConnector (selection, "/B", tree_) ); eat (selection); break; + case CHAR_V : connectors_.push_back( new TypedBranchConnector >(selection, "", tree_) ); eat >(selection); break; + case U_CHAR : connectors_.push_back( new TypedBranchConnector (selection, "/b", tree_) ); eat (selection); break; + case U_CHAR_V : connectors_.push_back( new TypedBranchConnector >(selection, "", tree_) ); eat >(selection); break; default: - { - std::string leafstring = ""; - typedef std::pair pair_t; - for( const pair_t& leaf: leafmap) { - leafstring+= "\t" + leaf.first + "\n"; - } - - throw edm::Exception(edm::errors::Configuration) - << "class ShallowTree does not handle leaves of type " << selection->className() << " like\n" - << selection->friendlyClassName() << "_" - << selection->moduleLabel() << "_" - << selection->productInstanceName() << "_" - << selection->processName() << std::endl - << "Valid leaf types are (friendlyClassName):\n" - << leafstring - << "Exception thrown from ShallowTree::beginJob\n"; - } + { + std::string leafstring = ""; + typedef std::pair pair_t; + for( const pair_t& leaf: leafmap) { + leafstring+= "\t" + leaf.first + "\n"; + } + + throw edm::Exception(edm::errors::Configuration) + << "class ShallowTree does not handle leaves of type " << selection->className() << " like\n" + << selection->friendlyClassName() << "_" + << selection->moduleLabel() << "_" + << selection->productInstanceName() << "_" + << selection->processName() << std::endl + << "Valid leaf types are (friendlyClassName):\n" + << leafstring + << "Exception thrown from ShallowTree::ShallowTree\n"; + } } } } } + +void ShallowTree:: +analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { + for( BranchConnector* connector: connectors_) { + connector->connect(iEvent); + } + tree_->Fill(); +} + +template +void ShallowTree::TypedBranchConnector:: +connect(const edm::Event& iEvent) { + edm::Handle handle_; + iEvent.getByLabel(ml, pin, handle_); + object_ = *handle_; +} + +template +ShallowTree::TypedBranchConnector:: +TypedBranchConnector(edm::BranchDescription const* desc, + std::string t, + TTree * tree) + : ml( desc->moduleLabel() ), + pin( desc->productInstanceName() ) +{ + object_ptr_ = &object_; + std::string s=pin+t; + if(t!="") { tree->Branch(pin.c_str(), object_ptr_, s.c_str() );} //raw type + else { tree->Branch(pin.c_str(), &object_ptr_ );} //vector +} + +void ShallowTree:: +beginJob() { +} + diff --git a/CalibTracker/SiStripCommon/python/ShallowSimhitClustersProducer_cfi.py b/CalibTracker/SiStripCommon/python/ShallowSimhitClustersProducer_cfi.py index 954f461e50bb2..178807768be9e 100644 --- a/CalibTracker/SiStripCommon/python/ShallowSimhitClustersProducer_cfi.py +++ b/CalibTracker/SiStripCommon/python/ShallowSimhitClustersProducer_cfi.py @@ -1,15 +1,18 @@ import FWCore.ParameterSet.Config as cms -shallowSimhitClusters = cms.EDProducer("ShallowSimhitClustersProducer", - Prefix = cms.string("sim"), - Clusters = cms.InputTag("siStripClusters"), - InputTags = cms.VInputTag( - cms.InputTag('g4SimHits:TrackerHitsTECHighTof'), - cms.InputTag('g4SimHits:TrackerHitsTECLowTof'), - cms.InputTag('g4SimHits:TrackerHitsTIDHighTof'), - cms.InputTag('g4SimHits:TrackerHitsTIDLowTof'), - cms.InputTag('g4SimHits:TrackerHitsTIBHighTof'), - cms.InputTag('g4SimHits:TrackerHitsTIBLowTof'), - cms.InputTag('g4SimHits:TrackerHitsTOBHighTof'), - cms.InputTag('g4SimHits:TrackerHitsTOBLowTof') - )) +shallowSimhitClusters = cms.EDProducer( + "ShallowSimhitClustersProducer", + Prefix = cms.string("sim"), + Clusters = cms.InputTag("siStripClusters"), + InputTags = cms.VInputTag( + cms.InputTag('g4SimHits:TrackerHitsTECHighTof'), + cms.InputTag('g4SimHits:TrackerHitsTECLowTof'), + cms.InputTag('g4SimHits:TrackerHitsTIDHighTof'), + cms.InputTag('g4SimHits:TrackerHitsTIDLowTof'), + cms.InputTag('g4SimHits:TrackerHitsTIBHighTof'), + cms.InputTag('g4SimHits:TrackerHitsTIBLowTof'), + cms.InputTag('g4SimHits:TrackerHitsTOBHighTof'), + cms.InputTag('g4SimHits:TrackerHitsTOBLowTof') + ), + runningMode = cms.string("deconvolution") + ) diff --git a/CalibTracker/SiStripCommon/src/ShallowTools.cc b/CalibTracker/SiStripCommon/src/ShallowTools.cc index e3fc718230cab..f6f792c0efa16 100644 --- a/CalibTracker/SiStripCommon/src/ShallowTools.cc +++ b/CalibTracker/SiStripCommon/src/ShallowTools.cc @@ -1,4 +1,3 @@ - #include "CalibTracker/SiStripCommon/interface/ShallowTools.h" #include "FWCore/Framework/interface/Event.h" @@ -12,10 +11,10 @@ namespace shallow { CLUSTERMAP -make_cluster_map( const edm::Event& iEvent, edm::InputTag& clusterLabel) { +make_cluster_map( const edm::Event& iEvent, const edm::EDGetTokenT< edmNew::DetSetVector > & cluster_token) { CLUSTERMAP clustermap; edm::Handle > clusters; - iEvent.getByLabel(clusterLabel, clusters); + iEvent.getByToken(cluster_token, clusters); unsigned int clusterindex = 0; BOOST_FOREACH(const edmNew::DetSet& ds, *clusters) From d5c1c44d827811ff7774978bed52fd7772b41972 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Wed, 2 Dec 2015 16:50:16 +0100 Subject: [PATCH 002/250] added cfi and template for testing --- .../SiStripCommon/python/shallowTree_cfi.py | 8 ++ .../python/shallowTree_test_template.py | 74 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 CalibTracker/SiStripCommon/python/shallowTree_cfi.py create mode 100644 CalibTracker/SiStripCommon/python/shallowTree_test_template.py diff --git a/CalibTracker/SiStripCommon/python/shallowTree_cfi.py b/CalibTracker/SiStripCommon/python/shallowTree_cfi.py new file mode 100644 index 0000000000000..9e3a5fcced182 --- /dev/null +++ b/CalibTracker/SiStripCommon/python/shallowTree_cfi.py @@ -0,0 +1,8 @@ +import FWCore.ParameterSet.Config as cms + +shallowTree = cms.EDAnalyzer( + "ShallowTree", + outputCommands = cms.untracked.vstring( + 'drop *', + ) + ) diff --git a/CalibTracker/SiStripCommon/python/shallowTree_test_template.py b/CalibTracker/SiStripCommon/python/shallowTree_test_template.py new file mode 100644 index 0000000000000..4170c0efcda29 --- /dev/null +++ b/CalibTracker/SiStripCommon/python/shallowTree_test_template.py @@ -0,0 +1,74 @@ +import FWCore.ParameterSet.Config as cms +from PhysicsTools.PatAlgos.patInputFiles_cff import filesRelValTTbarPileUpGENSIMRECO +import das +#from pdb import set_trace + +def add_rawRelVals(process): + dataset = das.query('dataset file=%s' % process.source.fileNames[0], verbose=True) + if not dataset: + raise RuntimeError( + 'Das returned no dataset parent of the input file: %s \n' + 'The parenthood is needed to add RAW secondary input files' % process.source.fileNames[0] + ) + raw_dataset = dataset[0].replace('GEN-SIM-RECO','GEN-SIM-DIGI-RAW-HLTDEBUG') + raw_files = das.query('file dataset=%s' % raw_dataset, verbose=True) + if not raw_files: + raise RuntimeError('No files found belonging to the GEN-SIM-DIGI-RAW-HLTDEBUG sample!') + #convert from unicode into normal string since vstring does not pick it up + raw_files = [str(i) for i in raw_files] + process.source.secondaryFileNames = cms.untracked.vstring(*raw_files) + return process + +process = cms.Process('JustATest') +process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff') +process.load("Configuration.Geometry.GeometryRecoDB_cff") +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc') + +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.StandardSequences.Services_cff') +process.TFileService = cms.Service( + "TFileService", + fileName = cms.string( 'FIXME' ), + closeFileFast = cms.untracked.bool(True) + ) + +## Maximal Number of Events +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) ) +process.source = cms.Source ( + "PoolSource", + fileNames = filesRelValTTbarPileUpGENSIMRECO + ) + +process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) ) +process.MessageLogger.cerr.FwkReport.reportEvery = 1 + +process.options = cms.untracked.PSet( + Rethrow = cms.untracked.vstring('OtherCMS', + 'StdException', + 'Unknown', + 'BadAlloc', + 'BadExceptionType', + 'ProductNotFound', + 'DictionaryNotFound', + 'InsertFailure', + 'Configuration', + 'LogicError', + 'UnimplementedFeature', + 'InvalidReference', + 'NullPointerError', + 'NoProductSpecified', + 'EventTimeout', + 'EventCorruption', + 'ScheduleExecutionFailure', + 'EventProcessorFailure', + 'FileInPathError', + 'FileOpenError', + 'FileReadError', + 'FatalRootError', + 'MismatchedInputFiles', + 'ProductDoesNotSupportViews', + 'ProductDoesNotSupportPtr', + 'NotFound') +) From 0a6649cca3ccca2f2e6ec1d6573c65ea6ad38550 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Wed, 2 Dec 2015 16:50:39 +0100 Subject: [PATCH 003/250] DAS python interface --- CalibTracker/SiStripCommon/python/das.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 CalibTracker/SiStripCommon/python/das.py diff --git a/CalibTracker/SiStripCommon/python/das.py b/CalibTracker/SiStripCommon/python/das.py new file mode 100644 index 0000000000000..0cdcfbc42b734 --- /dev/null +++ b/CalibTracker/SiStripCommon/python/das.py @@ -0,0 +1,20 @@ +from das_client import get_data +import subprocess +#from pdb import set_trace + +def query(query_str, verbose=False): + 'simple query function to interface with DAS, better than using Popen as everything is handled by python' + if verbose: + print 'querying DAS with: "%s"' % query_str + data = get_data( + 'https://cmsweb.cern.ch', + query_str, + 0, 0, False) + + to_get = query_str.split()[0].strip(',') + if data['status'] != 'ok': + raise RuntimeError('Das query crashed') + + #-1 works both when getting dataset from files and files from datasets, + #not checked on everything + return [i[to_get][-1]['name'] for i in data['data']] From b7b5913f56ee11e3e2362ef866b778b9b28132c3 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Wed, 2 Dec 2015 16:51:36 +0100 Subject: [PATCH 004/250] Module tests, to be added to jenkins unittests --- CalibTracker/SiStripCommon/test/run_tests.sh | 35 +++++++++++++++++++ .../test/test_shallowClustersProducer_cfg.py | 12 +++++++ .../test/test_shallowDigisProducer_cfg.py | 12 +++++++ .../test/test_shallowEventDataProducer_cfg.py | 12 +++++++ .../test/test_shallowGainCalibration_cfg.py | 18 ++++++++++ .../test_shallowRechitClustersProducer_cfg.py | 17 +++++++++ .../test/test_shallowSimTracksProducer_cfg.py | 22 ++++++++++++ .../test_shallowSimhitClustersProducer_cfg.py | 14 ++++++++ .../test_shallowTrackClustersProducer_cfg.py | 18 ++++++++++ .../test/test_shallowTracksProducer_cfg.py | 12 +++++++ 10 files changed, 172 insertions(+) create mode 100755 CalibTracker/SiStripCommon/test/run_tests.sh create mode 100644 CalibTracker/SiStripCommon/test/test_shallowClustersProducer_cfg.py create mode 100644 CalibTracker/SiStripCommon/test/test_shallowDigisProducer_cfg.py create mode 100644 CalibTracker/SiStripCommon/test/test_shallowEventDataProducer_cfg.py create mode 100644 CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py create mode 100644 CalibTracker/SiStripCommon/test/test_shallowRechitClustersProducer_cfg.py create mode 100644 CalibTracker/SiStripCommon/test/test_shallowSimTracksProducer_cfg.py create mode 100644 CalibTracker/SiStripCommon/test/test_shallowSimhitClustersProducer_cfg.py create mode 100644 CalibTracker/SiStripCommon/test/test_shallowTrackClustersProducer_cfg.py create mode 100644 CalibTracker/SiStripCommon/test/test_shallowTracksProducer_cfg.py diff --git a/CalibTracker/SiStripCommon/test/run_tests.sh b/CalibTracker/SiStripCommon/test/run_tests.sh new file mode 100755 index 0000000000000..0fb2cc4d011b9 --- /dev/null +++ b/CalibTracker/SiStripCommon/test/run_tests.sh @@ -0,0 +1,35 @@ +#!/bin/env bash + +function die { echo $1: status $2 ; exit $2; } + +echo cmsRun test_shallowClustersProducer_cfg.py +cmsRun test_shallowClustersProducer_cfg.py || die "Failure using test_shallowClustersProducer_cfg.py" $? +echo cmsRun test_shallowDigisProducer_cfg.py +cmsRun test_shallowDigisProducer_cfg.py || die "Failure using test_shallowDigisProducer_cfg.py" $? +echo cmsRun test_shallowEventDataProducer_cfg.py +cmsRun test_shallowEventDataProducer_cfg.py || die "Failure using test_shallowEventDataProducer_cfg.py" $? +echo cmsRun test_shallowGainCalibration_cfg.py #SOLVED +## Looking for type: edm::AssociationMap,std::vector,unsigned short> > +## Looking for module label: generalTracks +cmsRun test_shallowGainCalibration_cfg.py || die "Failure using test_shallowGainCalibration_cfg.py" $? + +echo cmsRun test_shallowRechitClustersProducer_cfg.py #SOLVED +## Looking for type: edmNew::DetSetVector +## Looking for module label: siStripMatchedRecHits +cmsRun test_shallowRechitClustersProducer_cfg.py || die "Failure using test_shallowRechitClustersProducer_cfg.py" $? + +echo cmsRun test_shallowSimTracksProducer_cfg.py #fails due to missing product +cmsRun test_shallowSimTracksProducer_cfg.py || die "Failure using test_shallowSimTracksProducer_cfg.py" $? +## Looking for type: reco::TrackToTrackingParticleAssociator +## Looking for module label: trackAssociatorByHits + +echo cmsRun test_shallowSimhitClustersProducer_cfg.py #fails due to missing product +cmsRun test_shallowSimhitClustersProducer_cfg.py || die "Failure using test_shallowSimhitClustersProducer_cfg.py" $? +## Looking for type: std::vector +## Looking for module label: g4SimHits + +echo cmsRun test_shallowTrackClustersProducer_cfg.py +cmsRun test_shallowTrackClustersProducer_cfg.py || die "Failure using test_shallowTrackClustersProducer_cfg.py" $? + +echo cmsRun test_shallowTracksProducer_cfg.py +cmsRun test_shallowTracksProducer_cfg.py || die "Failure using test_shallowTracksProducer_cfg.py" $? diff --git a/CalibTracker/SiStripCommon/test/test_shallowClustersProducer_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowClustersProducer_cfg.py new file mode 100644 index 0000000000000..6fa86e4d39186 --- /dev/null +++ b/CalibTracker/SiStripCommon/test/test_shallowClustersProducer_cfg.py @@ -0,0 +1,12 @@ +from CalibTracker.SiStripCommon.shallowTree_test_template import * +process.TFileService.fileName = 'test_shallowClustersProducer.root' + +process.load('CalibTracker.SiStripCommon.ShallowClustersProducer_cfi') +process.testTree = cms.EDAnalyzer( + "ShallowTree", + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_cluster_*_*', + ) + ) +process.p = cms.Path(process.shallowClusters*process.testTree) diff --git a/CalibTracker/SiStripCommon/test/test_shallowDigisProducer_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowDigisProducer_cfg.py new file mode 100644 index 0000000000000..2ad3b86486572 --- /dev/null +++ b/CalibTracker/SiStripCommon/test/test_shallowDigisProducer_cfg.py @@ -0,0 +1,12 @@ +from CalibTracker.SiStripCommon.shallowTree_test_template import * +process.TFileService.fileName = 'test_shallowDigisProducer.root' + +process.load('CalibTracker.SiStripCommon.ShallowDigisProducer_cfi') +process.testTree = cms.EDAnalyzer( + "ShallowTree", + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_shallowDigis_*_*', + ) + ) +process.p = cms.Path(process.shallowDigis*process.testTree) diff --git a/CalibTracker/SiStripCommon/test/test_shallowEventDataProducer_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowEventDataProducer_cfg.py new file mode 100644 index 0000000000000..1f639ed5d7c82 --- /dev/null +++ b/CalibTracker/SiStripCommon/test/test_shallowEventDataProducer_cfg.py @@ -0,0 +1,12 @@ +from CalibTracker.SiStripCommon.shallowTree_test_template import * +process.TFileService.fileName = 'test_shallowEventDataProducer.root' + +process.load('CalibTracker.SiStripCommon.ShallowEventDataProducer_cfi') +process.testTree = cms.EDAnalyzer( + "ShallowTree", + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_shallowEventRun_*_*', + ) + ) +process.p = cms.Path(process.shallowEventRun*process.testTree) diff --git a/CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py new file mode 100644 index 0000000000000..fe07806676a29 --- /dev/null +++ b/CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py @@ -0,0 +1,18 @@ +from CalibTracker.SiStripCommon.shallowTree_test_template import * +process.TFileService.fileName = 'test_shallowGainCalibration.root' + +process.load('CalibTracker.SiStripCommon.ShallowGainCalibration_cfi') +from RecoTracker.TrackProducer.TrackRefitter_cfi import TrackRefitter + +process.load('RecoTracker.TrackProducer.TrackRefitters_cff') +process.tracksRefit = TrackRefitter.clone() +process.shallowGainCalibration.Tracks = 'tracksRefit' + +process.testTree = cms.EDAnalyzer( + "ShallowTree", + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_GainCalibration_*_*', + ) + ) +process.p = cms.Path(process.MeasurementTrackerEvent*process.tracksRefit*process.shallowGainCalibration*process.testTree) diff --git a/CalibTracker/SiStripCommon/test/test_shallowRechitClustersProducer_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowRechitClustersProducer_cfg.py new file mode 100644 index 0000000000000..b03b559fd5604 --- /dev/null +++ b/CalibTracker/SiStripCommon/test/test_shallowRechitClustersProducer_cfg.py @@ -0,0 +1,17 @@ +from CalibTracker.SiStripCommon.shallowTree_test_template import * +process.TFileService.fileName = 'test_shallowRechitClustersProducer.root' +process.load('RecoTracker.TrackProducer.TrackRefitters_cff') +process.load('CalibTracker.SiStripCommon.ShallowRechitClustersProducer_cfi') + +process.testTree = cms.EDAnalyzer( + "ShallowTree", + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_cluster_*_*', + ) + ) +process.p = cms.Path( + process.siStripMatchedRecHits* + process.shallowRechitClusters* + process.testTree +) diff --git a/CalibTracker/SiStripCommon/test/test_shallowSimTracksProducer_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowSimTracksProducer_cfg.py new file mode 100644 index 0000000000000..58e3fb053572a --- /dev/null +++ b/CalibTracker/SiStripCommon/test/test_shallowSimTracksProducer_cfg.py @@ -0,0 +1,22 @@ +from CalibTracker.SiStripCommon.shallowTree_test_template import * +process.TFileService.fileName = 'test_shallowSimTracksProducer.root' + +process.load('CalibTracker.SiStripCommon.ShallowSimTracksProducer_cfi') +process.load('SimGeneral.TrackingAnalysis.simHitTPAssociation_cfi') +process.load("SimTracker.TrackAssociatorProducers.trackAssociatorByHits_cfi") + +add_rawRelVals(process) + +process.testTree = cms.EDAnalyzer( + "ShallowTree", + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_shallowSimTracks_*_*', + ) + ) +process.p = cms.Path( + process.simHitTPAssocProducer* + process.trackAssociatorByHits* + process.shallowSimTracks* + process.testTree + ) diff --git a/CalibTracker/SiStripCommon/test/test_shallowSimhitClustersProducer_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowSimhitClustersProducer_cfg.py new file mode 100644 index 0000000000000..0dd36a040de54 --- /dev/null +++ b/CalibTracker/SiStripCommon/test/test_shallowSimhitClustersProducer_cfg.py @@ -0,0 +1,14 @@ +from CalibTracker.SiStripCommon.shallowTree_test_template import * +process.TFileService.fileName = 'test_shallowSimhitClustersProducer.root' + +add_rawRelVals(process) + +process.load('CalibTracker.SiStripCommon.ShallowSimhitClustersProducer_cfi') +process.testTree = cms.EDAnalyzer( + "ShallowTree", + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_shallowSimhitClusters_*_*', + ) + ) +process.p = cms.Path(process.shallowSimhitClusters*process.testTree) diff --git a/CalibTracker/SiStripCommon/test/test_shallowTrackClustersProducer_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowTrackClustersProducer_cfg.py new file mode 100644 index 0000000000000..9bfeb367d719a --- /dev/null +++ b/CalibTracker/SiStripCommon/test/test_shallowTrackClustersProducer_cfg.py @@ -0,0 +1,18 @@ +from CalibTracker.SiStripCommon.shallowTree_test_template import * +process.TFileService.fileName = 'test_shallowTrackClustersProducer.root' + +from RecoTracker.TrackProducer.TrackRefitter_cfi import TrackRefitter + +process.load('CalibTracker.SiStripCommon.ShallowTrackClustersProducer_cfi') +process.load('RecoTracker.TrackProducer.TrackRefitters_cff') +process.tracksRefit = TrackRefitter.clone() +process.shallowTrackClusters.Tracks = 'tracksRefit' + +process.testTree = cms.EDAnalyzer( + "ShallowTree", + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_shallowTrackClusters_*_*', + ) + ) +process.p = cms.Path(process.MeasurementTrackerEvent*process.tracksRefit*process.shallowTrackClusters*process.testTree) diff --git a/CalibTracker/SiStripCommon/test/test_shallowTracksProducer_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowTracksProducer_cfg.py new file mode 100644 index 0000000000000..9bd2ee4f99a74 --- /dev/null +++ b/CalibTracker/SiStripCommon/test/test_shallowTracksProducer_cfg.py @@ -0,0 +1,12 @@ +from CalibTracker.SiStripCommon.shallowTree_test_template import * +process.TFileService.fileName = 'test_shallowTracksProducer.root' + +process.load('CalibTracker.SiStripCommon.ShallowTracksProducer_cfi') +process.testTree = cms.EDAnalyzer( + "ShallowTree", + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_shallowTracks_*_*', + ) + ) +process.p = cms.Path(process.shallowTracks*process.testTree) From 6257f0d87738e744b80f2aa105100c2bb50904b9 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Thu, 3 Dec 2015 11:17:36 +0100 Subject: [PATCH 005/250] tree content bugfix --- .../SiStripCommon/test/test_shallowClustersProducer_cfg.py | 2 +- .../SiStripCommon/test/test_shallowGainCalibration_cfg.py | 2 +- .../test/test_shallowRechitClustersProducer_cfg.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CalibTracker/SiStripCommon/test/test_shallowClustersProducer_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowClustersProducer_cfg.py index 6fa86e4d39186..a3bfcea160b5a 100644 --- a/CalibTracker/SiStripCommon/test/test_shallowClustersProducer_cfg.py +++ b/CalibTracker/SiStripCommon/test/test_shallowClustersProducer_cfg.py @@ -6,7 +6,7 @@ "ShallowTree", outputCommands = cms.untracked.vstring( 'drop *', - 'keep *_cluster_*_*', + 'keep *_shallowClusters_*_*', ) ) process.p = cms.Path(process.shallowClusters*process.testTree) diff --git a/CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py index fe07806676a29..19c3566eafdfb 100644 --- a/CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py +++ b/CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py @@ -12,7 +12,7 @@ "ShallowTree", outputCommands = cms.untracked.vstring( 'drop *', - 'keep *_GainCalibration_*_*', + 'keep *_shallowGainCalibration_*_*', ) ) process.p = cms.Path(process.MeasurementTrackerEvent*process.tracksRefit*process.shallowGainCalibration*process.testTree) diff --git a/CalibTracker/SiStripCommon/test/test_shallowRechitClustersProducer_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowRechitClustersProducer_cfg.py index b03b559fd5604..79f79e5f95dc0 100644 --- a/CalibTracker/SiStripCommon/test/test_shallowRechitClustersProducer_cfg.py +++ b/CalibTracker/SiStripCommon/test/test_shallowRechitClustersProducer_cfg.py @@ -7,7 +7,7 @@ "ShallowTree", outputCommands = cms.untracked.vstring( 'drop *', - 'keep *_cluster_*_*', + 'keep *_shallowRechitClusters_*_*', ) ) process.p = cms.Path( From ffc8249d1d5a74451f195667e32c8e9a28fba420 Mon Sep 17 00:00:00 2001 From: AJ Johnson Date: Wed, 9 Dec 2015 19:36:22 +0100 Subject: [PATCH 006/250] Added missing keep statements, updated configs to miniAOD v2 --- .../Configuration/python/HPSPFTaus_cff.py | 1267 +++++++++++------ .../Configuration/python/RecoPFTauTag_cff.py | 102 +- .../python/RecoTauTag_EventContent_cff.py | 5 +- 3 files changed, 915 insertions(+), 459 deletions(-) diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py index 5718fc487c720..bdaca8c8aee2e 100644 --- a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py +++ b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py @@ -12,6 +12,7 @@ from RecoTauTag.RecoTau.PFRecoTauDiscriminationByLeadingTrackFinding_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectron_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA5_cfi import * +from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA6_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon_cfi import * from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon2_cfi import * @@ -26,19 +27,32 @@ from RecoTauTag.RecoTau.PFRecoTauPFJetInputs_cfi import PFRecoTauPFJetInputs # deltaBeta correction factor -ak4dBetaCorrection=0.20 +ak4dBetaCorrection = 0.20 # Load MVAs from SQLlite file/prep. DB from RecoTauTag.Configuration.loadRecoTauTagMVAsFromPrepDB_cfi import * # Select those taus that pass the HPS selections # - pt > 15, mass cuts, tauCone cut -from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_3Prong0Pi0 -hpsPFTauDiscriminationByDecayModeFindingNewDMs = hpsSelectionDiscriminator.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer') +from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_2Prong0Pi0, decayMode_2Prong1Pi0, decayMode_3Prong0Pi0 +hpsSelectionDiscriminator76xReMiniAOD = hpsSelectionDiscriminator.clone() + +hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD = hpsSelectionDiscriminator76xReMiniAOD.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + #---------------------------------------------------------------------------- + # CV: disable 3Prong1Pi0 decay mode + decayModes = cms.VPSet( + decayMode_1Prong0Pi0, + decayMode_1Prong1Pi0, + decayMode_1Prong2Pi0, + decayMode_2Prong0Pi0, + decayMode_2Prong1Pi0, + decayMode_3Prong0Pi0 + ) + #---------------------------------------------------------------------------- ) -hpsPFTauDiscriminationByDecayModeFindingOldDMs = hpsSelectionDiscriminator.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD = hpsSelectionDiscriminator76xReMiniAOD.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), decayModes = cms.VPSet( decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, @@ -47,60 +61,60 @@ ), requireTauChargedHadronsToBeChargedPFCands = cms.bool(True) ) -hpsPFTauDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFindingOldDMs.clone() # CV: kept for backwards compatibility +hpsPFTauDiscriminationByDecayModeFinding76xReMiniAOD = hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD.clone() # CV: kept for backwards compatibility # Define decay mode prediscriminant -requireDecayMode = cms.PSet( +requireDecayMode76xReMiniAOD = cms.PSet( BooleanOperator = cms.string("and"), decayMode = cms.PSet( - Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'), + Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD'), cut = cms.double(0.5) ) ) #Building the prototype for the Discriminator by Isolation -hpsPFTauDiscriminationByLooseIsolation = pfRecoTauDiscriminationByIsolation.clone( - PFTauProducer = cms.InputTag("hpsPFTauProducer"), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD = pfRecoTauDiscriminationByIsolation.clone( + PFTauProducer = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), ApplyDiscriminationByTrackerIsolation = False, ApplyDiscriminationByECALIsolation = True, applyOccupancyCut = True ) -hpsPFTauDiscriminationByLooseIsolation.Prediscriminants.preIso = cms.PSet( - Producer = cms.InputTag("hpsPFTauDiscriminationByLooseChargedIsolation"), +hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.Prediscriminants.preIso = cms.PSet( + Producer = cms.InputTag("hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD"), cut = cms.double(0.5)) # Make an even looser discriminator -hpsPFTauDiscriminationByVLooseIsolation = hpsPFTauDiscriminationByLooseIsolation.clone( +hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone( customOuterCone = cms.double(0.3), isoConeSizeForDeltaBeta = cms.double(0.3), ) -hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 1.5 -hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 2.0 -hpsPFTauDiscriminationByVLooseIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByVLooseChargedIsolation") +hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 1.5 +hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 2.0 +hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD") -hpsPFTauDiscriminationByMediumIsolation = hpsPFTauDiscriminationByLooseIsolation.clone() -hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.8 -hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.8 -hpsPFTauDiscriminationByMediumIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByMediumChargedIsolation") +hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.8 +hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.8 +hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD") -hpsPFTauDiscriminationByTightIsolation = hpsPFTauDiscriminationByLooseIsolation.clone() -hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByTightIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByTightChargedIsolation") +hpsPFTauDiscriminationByTightIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD") -hpsPFTauDiscriminationByIsolationSeq = cms.Sequence( - hpsPFTauDiscriminationByVLooseIsolation* - hpsPFTauDiscriminationByLooseIsolation* - hpsPFTauDiscriminationByMediumIsolation* - hpsPFTauDiscriminationByTightIsolation +hpsPFTauDiscriminationByIsolationSeq76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD* + hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD* + hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD* + hpsPFTauDiscriminationByTightIsolation76xReMiniAOD ) _isolation_types = ['VLoose', 'Loose', 'Medium', 'Tight'] # Now build the sequences that apply PU corrections # Make Delta Beta corrections (on SumPt quantity) -hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolation.clone( +hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -108,9 +122,9 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolation.clone( +hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -118,9 +132,9 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolation.clone( +hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -128,9 +142,9 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByTightIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolation.clone( +hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -138,192 +152,192 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr = cms.Sequence( - hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr* - hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr* - hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr* - hpsPFTauDiscriminationByTightIsolationDBSumPtCorr +hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD ) -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%((0.09/0.25)*(ak4dBetaCorrection)), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 3.5, - Prediscriminants = requireDecayMode.clone() + Prediscriminants = requireDecayMode76xReMiniAOD.clone() ) -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 2.5, - Prediscriminants = requireDecayMode.clone() + Prediscriminants = requireDecayMode76xReMiniAOD.clone() ) -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( applySumPtCut = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( applySumPtCut = False, ApplyDiscriminationByECALIsolation = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( applySumPtCut = False, ApplyDiscriminationByTrackerIsolation = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 1.5, - Prediscriminants = requireDecayMode.clone() + Prediscriminants = requireDecayMode76xReMiniAOD.clone() ) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 0.8, - Prediscriminants = requireDecayMode.clone() + Prediscriminants = requireDecayMode76xReMiniAOD.clone() ) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr = cms.Sequence( - hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr* - hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr* - hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr* - hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD ) #Charge isolation based on combined isolation -hpsPFTauDiscriminationByVLooseChargedIsolation = hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByLooseChargedIsolation = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByMediumChargedIsolation = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByTightChargedIsolation = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone( +hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByChargedIsolationSeq = cms.Sequence( - hpsPFTauDiscriminationByVLooseChargedIsolation* - hpsPFTauDiscriminationByLooseChargedIsolation* - hpsPFTauDiscriminationByMediumChargedIsolation* - hpsPFTauDiscriminationByTightChargedIsolation +hpsPFTauDiscriminationByChargedIsolationSeq76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD* + hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD* + hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD* + hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD ) #copying discriminator against electrons and muons -hpsPFTauDiscriminationByLooseElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByLooseElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, PFElectronMVA_maxValue = cms.double(0.6) ) -hpsPFTauDiscriminationByMediumElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByMediumElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, ApplyCut_EcalCrackCut = cms.bool(True) ) -hpsPFTauDiscriminationByTightElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByTightElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, ApplyCut_EcalCrackCut = cms.bool(True), ApplyCut_BremCombined = cms.bool(True) ) -hpsPFTauDiscriminationByLooseMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByLooseMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants ) -hpsPFTauDiscriminationByMediumMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByMediumMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('noAllArbitrated') ) -hpsPFTauDiscriminationByTightMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByTightMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('noAllArbitratedWithHOP') ) -hpsPFTauDiscriminationByLooseMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByLooseMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants ) -hpsPFTauDiscriminationByMediumMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByMediumMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('medium') ) -hpsPFTauDiscriminationByTightMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByTightMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('tight') ) -hpsPFTauDiscriminationByLooseMuonRejection3 = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), +hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('custom'), maxNumberOfMatches = cms.int32(1), doCaloMuonVeto = cms.bool(True), maxNumberOfHitsLast2Stations = cms.int32(-1) ) -hpsPFTauDiscriminationByTightMuonRejection3 = hpsPFTauDiscriminationByLooseMuonRejection3.clone( +hpsPFTauDiscriminationByTightMuonRejection376xReMiniAOD = hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD.clone( maxNumberOfHitsLast2Stations = cms.int32(0) ) -hpsPFTauDiscriminationByMVArawMuonRejection = pfRecoTauDiscriminationAgainstMuonMVA.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuonMVA.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), loadMVAfromDB = cms.bool(True), returnMVA = cms.bool(True), mvaName = cms.string("RecoTauTag_againstMuonMVAv1") ) -##hpsPFTauDiscriminationByMVALooseMuonRejection = hpsPFTauDiscriminationByMVArawMuonRejection.clone( +##hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD.clone( ## returnMVA = cms.bool(False), ## mvaMin = cms.double(0.75) ##) -##hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone( +##hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone( ## mvaMin = cms.double(0.950) ##) -##hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone( +##hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone( ## mvaMin = cms.double(0.975) ##) -hpsPFTauDiscriminationByMVALooseMuonRejection = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection'), - key = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection:category'), +hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_againstMuonMVAv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -334,14 +348,14 @@ ) ) ) -hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone() -hpsPFTauDiscriminationByMVAMediumMuonRejection.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_0") -hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone() -hpsPFTauDiscriminationByMVATightMuonRejection.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff98_0") +hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone() +hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_0") +hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone() +hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff98_0") -hpsPFTauDiscriminationByMVA5rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA5.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronMVA5.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), loadMVAfromDB = cms.bool(True), mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL"), mvaName_NoEleMatch_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL"), @@ -361,11 +375,11 @@ mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC") ) -hpsPFTauDiscriminationByMVA5VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection'), - key = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection:category'), +hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mapping = cms.VPSet( cms.PSet( @@ -451,108 +465,229 @@ ) ) -hpsPFTauDiscriminationByMVA5LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff96") - -hpsPFTauDiscriminationByMVA5MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff91") - -hpsPFTauDiscriminationByMVA5TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff85") - -hpsPFTauDiscriminationByMVA5VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79") - -hpsPFTauDiscriminationByDeadECALElectronRejection = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone() +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff96") + +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff91") + +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff85") + +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79") + +hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronMVA6.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + loadMVAfromDB = cms.bool(True), + mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL"), + mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL"), + mvaName_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL"), + mvaName_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL"), + mvaName_NoEleMatch_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC"), + mvaName_NoEleMatch_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC"), + mvaName_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC"), + mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC") +) + +hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD:category'), + loadMVAfromDB = cms.bool(True), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(5), # minMVAWOgWgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(7), # minMVAWgWgsfBL + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(13), # minMVAWOgWgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff99"), + variable = cms.string("pt") + ), + cms.PSet( + category = cms.uint32(15), # minMVAWgWgsfEC + cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff99"), + variable = cms.string("pt") + ) + ) +) + +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff96") + +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff91") + +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff85") + +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff79") + +hpsPFTauDiscriminationByDeadECALElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone() ) #Define new sequence that is using smaller number on hits cut -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone() -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone() -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone() - -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) - -hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() + +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) + +hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( applySumPtCut = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits = cms.Sequence( - hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits* - hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits* - hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits* - hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* + hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD +) + +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() + +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) + +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR0376xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD ) -hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( +hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = cms.bool(False), applyDeltaBetaCorrection = cms.bool(False), ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), @@ -561,23 +696,23 @@ applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) ) -hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( - maximumSumPtCut = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut +hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( + maximumSumPtCut = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.maximumSumPtCut ) -hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( - maximumSumPtCut = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut +hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( + maximumSumPtCut = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.maximumSumPtCut ) -hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( +hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( applySumPtCut = cms.bool(False) ) -hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( +hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( Prediscriminants = cms.PSet( BooleanOperator = cms.string("and"), decayMode = cms.PSet( - Producer = cms.InputTag('hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone'), + Producer = cms.InputTag('hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD'), cut = cms.double(0.5) ) ), @@ -585,34 +720,44 @@ storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits = cms.Sequence( - hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits* - hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits* - hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits* - hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone* - hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits +hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits76xReMiniAOD = cms.Sequence( + hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD* + hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits76xReMiniAOD* + hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits76xReMiniAOD* + hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD* + hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits76xReMiniAOD ) # Define the HPS selection discriminator used in cleaning -hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus") +hpsSelectionDiscriminator76xReMiniAOD.PFTauProducer = cms.InputTag("combinatoricRecoTaus76xReMiniAOD") +#---------------------------------------------------------------------------- +# CV: disable 3Prong1Pi0 decay mode +hpsSelectionDiscriminator76xReMiniAOD.decayModes = cms.VPSet( + decayMode_1Prong0Pi0, + decayMode_1Prong1Pi0, + decayMode_1Prong2Pi0, + decayMode_2Prong0Pi0, + decayMode_2Prong1Pi0, + decayMode_3Prong0Pi0 +) +#---------------------------------------------------------------------------- from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner -hpsPFTauProducerSansRefs = RecoTauCleaner.clone( - src = cms.InputTag("combinatoricRecoTaus") +hpsPFTauProducerSansRefs76xReMiniAOD = RecoTauCleaner.clone( + src = cms.InputTag("combinatoricRecoTaus76xReMiniAOD") ) - +hpsPFTauProducerSansRefs76xReMiniAOD.cleaners[1].src = cms.InputTag("hpsSelectionDiscriminator76xReMiniAOD") from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder -hpsPFTauProducer = RecoTauPiZeroUnembedder.clone( - src = cms.InputTag("hpsPFTauProducerSansRefs") +hpsPFTauProducer76xReMiniAOD = RecoTauPiZeroUnembedder.clone( + src = cms.InputTag("hpsPFTauProducerSansRefs76xReMiniAOD") ) - from RecoTauTag.RecoTau.PFTauPrimaryVertexProducer_cfi import * from RecoTauTag.RecoTau.PFTauSecondaryVertexProducer_cfi import * from RecoTauTag.RecoTau.PFTauTransverseImpactParameters_cfi import * -hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer"), +hpsPFTauPrimaryVertexProducer76xReMiniAOD = PFTauPrimaryVertexProducer.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), ElectronTag = cms.InputTag(""), MuonTag = cms.InputTag(""), PVTag = cms.InputTag("offlinePrimaryVertices"), @@ -625,32 +770,32 @@ useSelectedTaus = cms.bool(False), discriminators = cms.VPSet( cms.PSet( - discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'), + discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD'), selectionCut = cms.double(0.5) ) ), cut = cms.string("pt > 18.0 & abs(eta) < 2.4") ) -hpsPFTauSecondaryVertexProducer = PFTauSecondaryVertexProducer.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer") +hpsPFTauSecondaryVertexProducer76xReMiniAOD = PFTauSecondaryVertexProducer.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD") ) -hpsPFTauTransverseImpactParameters = PFTauTransverseImpactParameters.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer"), - PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer"), - PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer"), - useFullCalculation = cms.bool(False) +hpsPFTauTransverseImpactParameters76xReMiniAOD = PFTauTransverseImpactParameters.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), + PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer76xReMiniAOD"), + PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer76xReMiniAOD"), + useFullCalculation = cms.bool(True) ) -hpsPFTauVertexAndImpactParametersSeq = cms.Sequence( - hpsPFTauPrimaryVertexProducer* - hpsPFTauSecondaryVertexProducer* - hpsPFTauTransverseImpactParameters +hpsPFTauVertexAndImpactParametersSeq76xReMiniAOD = cms.Sequence( + hpsPFTauPrimaryVertexProducer76xReMiniAOD* + hpsPFTauSecondaryVertexProducer76xReMiniAOD* + hpsPFTauTransverseImpactParameters76xReMiniAOD ) from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolation2_cff import * -hpsPFTauChargedIsoPtSum = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauChargedIsoPtSum76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), ApplyDiscriminationByECALIsolation = cms.bool(False), ApplyDiscriminationByTrackerIsolation = cms.bool(True), applySumPtCut = cms.bool(False), @@ -661,12 +806,12 @@ isoConeSizeForDeltaBeta = cms.double(0.8), verbosity = cms.int32(0) ) -hpsPFTauNeutralIsoPtSum = hpsPFTauChargedIsoPtSum.clone( +hpsPFTauNeutralIsoPtSum76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = cms.bool(True), ApplyDiscriminationByTrackerIsolation = cms.bool(False), verbosity = cms.int32(0) ) -hpsPFTauPUcorrPtSum = hpsPFTauChargedIsoPtSum.clone( +hpsPFTauPUcorrPtSum76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( ApplyDiscriminationByECALIsolation = cms.bool(False), ApplyDiscriminationByTrackerIsolation = cms.bool(False), applyDeltaBetaCorrection = cms.bool(True), @@ -674,42 +819,42 @@ storeRawPUsumPt = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauNeutralIsoPtSumWeight = hpsPFTauChargedIsoPtSum.clone( +hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), ApplyDiscriminationByTrackerIsolation = cms.bool(False), UseAllPFCandsForWeights = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauFootprintCorrection = hpsPFTauChargedIsoPtSum.clone( +hpsPFTauFootprintCorrection76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = cms.bool(False), storeRawSumPt = cms.bool(False), storeRawFootprintCorrection = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauPhotonPtSumOutsideSignalCone = hpsPFTauChargedIsoPtSum.clone( +hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( ApplyDiscriminationByTrackerIsolation = cms.bool(False), storeRawSumPt = cms.bool(False), storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw = discriminationByIsolationMVA2raw.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), +hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD = discriminationByIsolationMVA2raw.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), loadMVAfromDB = cms.bool(True), mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1"), mvaOpt = cms.string("oldDMwoLT"), - srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'), - srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'), - srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'), - srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'), + srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters76xReMiniAOD'), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum76xReMiniAOD'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum76xReMiniAOD'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum76xReMiniAOD'), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT = discriminationByIsolationMVA2VLoose.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer'), - Prediscriminants = requireDecayMode.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD = discriminationByIsolationMVA2VLoose.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -720,24 +865,24 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1"), mvaOpt = cms.string("oldDMwLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD:category'), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( cms.PSet( @@ -747,24 +892,24 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1"), mvaOpt = cms.string("newDMwoLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD:category'), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_mvaOutput_normalization"), mapping = cms.VPSet( cms.PSet( @@ -775,25 +920,24 @@ ), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff80") -##hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.verbosity = cms.int32(1) -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() -hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1"), mvaOpt = cms.string("newDMwLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD:category'), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( cms.PSet( @@ -803,107 +947,410 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() -hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40") - -hpsPFTauMVAIsolation2Seq = cms.Sequence( - hpsPFTauChargedIsoPtSum - + hpsPFTauNeutralIsoPtSum - + hpsPFTauPUcorrPtSum - + hpsPFTauNeutralIsoPtSumWeight - + hpsPFTauFootprintCorrection - + hpsPFTauPhotonPtSumOutsideSignalCone - + hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT - + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT - + hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT - + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw - + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT - + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40") + +#Define new Run2 MVA isolations +from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolationRun2_cff import * +hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD = discriminationByIsolationMVArun2v1raw.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + loadMVAfromDB = cms.bool(True), + mvaName = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1"), + mvaOpt = cms.string("DBoldDMwLT"), + srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters76xReMiniAOD'), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum76xReMiniAOD'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum76xReMiniAOD'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum76xReMiniAOD'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD'), + srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection76xReMiniAOD'), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = discriminationByIsolationMVArun2v1VLoose.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( + mvaName = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1"), + mvaOpt = cms.string("DBnewDMwLT"), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1"), + mvaOpt = cms.string("PWoldDMwLT"), + srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD'), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1"), + mvaOpt = cms.string("PWnewDMwLT"), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff40") + +hpsPFTauChargedIsoPtSumdR0376xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + ApplyDiscriminationByECALIsolation = cms.bool(False), + ApplyDiscriminationByTrackerIsolation = cms.bool(True), + applySumPtCut = cms.bool(False), + applyDeltaBetaCorrection = cms.bool(False), + storeRawSumPt = cms.bool(True), + storeRawPUsumPt = cms.bool(False), + customOuterCone = cms.double(0.3), + isoConeSizeForDeltaBeta = cms.double(0.8), + verbosity = cms.int32(0) +) +hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( + ApplyDiscriminationByECALIsolation = cms.bool(True), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + verbosity = cms.int32(0) +) +hpsPFTauPUcorrPtSumdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( + ApplyDiscriminationByECALIsolation = cms.bool(False), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + applyDeltaBetaCorrection = cms.bool(True), + storeRawSumPt = cms.bool(False), + storeRawPUsumPt = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( + ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + UseAllPFCandsForWeights = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauFootprintCorrectiondR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawFootprintCorrection = cms.bool(True), + verbosity = cms.int32(0) +) +hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( + ApplyDiscriminationByTrackerIsolation = cms.bool(False), + storeRawSumPt = cms.bool(False), + storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), + verbosity = cms.int32(0) +) + +hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( + mvaName = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1"), + mvaOpt = cms.string("DBoldDMwLT"), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSumdR0376xReMiniAOD'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR0376xReMiniAOD'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD'), + srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR0376xReMiniAOD'), + verbosity = cms.int32(0) +) +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), + Prediscriminants = requireDecayMode76xReMiniAOD.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD.clone( + mvaName = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1"), + mvaOpt = cms.string("PWoldDMwLT"), + srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD'), + verbosity = cms.int32(0) +) +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD:category'), + loadMVAfromDB = cms.bool(True), + mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_mvaOutput_normalization"), + mapping = cms.VPSet( + cms.PSet( + category = cms.uint32(0), + cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff90"), + variable = cms.string("pt") + ) + ) +) +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff40") + +hpsPFTauMVAIsolation2Seq76xReMiniAOD = cms.Sequence( + hpsPFTauChargedIsoPtSum76xReMiniAOD + + hpsPFTauNeutralIsoPtSum76xReMiniAOD + + hpsPFTauPUcorrPtSum76xReMiniAOD + + hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD + + hpsPFTauFootprintCorrection76xReMiniAOD + + hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD + #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD + #+ hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD + # new MVA isolations for Run2 + + hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD + + hpsPFTauChargedIsoPtSumdR0376xReMiniAOD + + hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD + + hpsPFTauPUcorrPtSumdR0376xReMiniAOD + + hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD + + hpsPFTauFootprintCorrectiondR0376xReMiniAOD + + hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD ) -produceHPSPFTaus = cms.Sequence( - hpsSelectionDiscriminator - #*hpsTightIsolationCleaner - #*hpsMediumIsolationCleaner - #*hpsLooseIsolationCleaner - #*hpsVLooseIsolationCleaner - *hpsPFTauProducerSansRefs - *hpsPFTauProducer -) - -produceAndDiscriminateHPSPFTaus = cms.Sequence( - produceHPSPFTaus* - hpsPFTauDiscriminationByDecayModeFindingNewDMs* - hpsPFTauDiscriminationByDecayModeFindingOldDMs* - hpsPFTauDiscriminationByDecayModeFinding* # CV: kept for backwards compatibility - hpsPFTauDiscriminationByChargedIsolationSeq* - hpsPFTauDiscriminationByIsolationSeq* - #hpsPFTauDiscriminationByIsolationSeqRhoCorr* - #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr* - hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr* +produceHPSPFTaus76xReMiniAOD = cms.Sequence( + hpsSelectionDiscriminator76xReMiniAOD + #*hpsTightIsolationCleaner76xReMiniAOD + #*hpsMediumIsolationCleaner76xReMiniAOD + #*hpsLooseIsolationCleaner76xReMiniAOD + #*hpsVLooseIsolationCleaner76xReMiniAOD + *hpsPFTauProducerSansRefs76xReMiniAOD + *hpsPFTauProducer76xReMiniAOD +) + +produceAndDiscriminateHPSPFTaus76xReMiniAOD = cms.Sequence( + produceHPSPFTaus76xReMiniAOD* + hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD* + hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD* + hpsPFTauDiscriminationByDecayModeFinding76xReMiniAOD* # CV: kept for backwards compatibility + hpsPFTauDiscriminationByChargedIsolationSeq76xReMiniAOD* + hpsPFTauDiscriminationByIsolationSeq76xReMiniAOD* + #hpsPFTauDiscriminationByIsolationSeqRhoCorr76xReMiniAOD* + #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr76xReMiniAOD* + hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr* - hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr* - hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr* - - hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr* - hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits* - hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits* + hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr76xReMiniAOD* + + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr76xReMiniAOD* + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits76xReMiniAOD* + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR0376xReMiniAOD* + hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits76xReMiniAOD* - hpsPFTauDiscriminationByLooseElectronRejection* - hpsPFTauDiscriminationByMediumElectronRejection* - hpsPFTauDiscriminationByTightElectronRejection* - hpsPFTauDiscriminationByMVA5rawElectronRejection* - hpsPFTauDiscriminationByMVA5VLooseElectronRejection* - hpsPFTauDiscriminationByMVA5LooseElectronRejection* - hpsPFTauDiscriminationByMVA5MediumElectronRejection* - hpsPFTauDiscriminationByMVA5TightElectronRejection* - hpsPFTauDiscriminationByMVA5VTightElectronRejection* - hpsPFTauDiscriminationByDeadECALElectronRejection* - hpsPFTauDiscriminationByLooseMuonRejection* - hpsPFTauDiscriminationByMediumMuonRejection* - hpsPFTauDiscriminationByTightMuonRejection* - hpsPFTauDiscriminationByLooseMuonRejection2* - hpsPFTauDiscriminationByMediumMuonRejection2* - hpsPFTauDiscriminationByTightMuonRejection2* - hpsPFTauDiscriminationByLooseMuonRejection3* - hpsPFTauDiscriminationByTightMuonRejection3* - hpsPFTauDiscriminationByMVArawMuonRejection* - hpsPFTauDiscriminationByMVALooseMuonRejection* - hpsPFTauDiscriminationByMVAMediumMuonRejection* - hpsPFTauDiscriminationByMVATightMuonRejection* - - hpsPFTauVertexAndImpactParametersSeq* - - hpsPFTauMVAIsolation2Seq + hpsPFTauDiscriminationByLooseElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMediumElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByTightElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByDeadECALElectronRejection76xReMiniAOD* + hpsPFTauDiscriminationByLooseMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByMediumMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByTightMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByLooseMuonRejection276xReMiniAOD* + hpsPFTauDiscriminationByMediumMuonRejection276xReMiniAOD* + hpsPFTauDiscriminationByTightMuonRejection276xReMiniAOD* + hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD* + hpsPFTauDiscriminationByTightMuonRejection376xReMiniAOD* + hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD* + hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD* + + hpsPFTauVertexAndImpactParametersSeq76xReMiniAOD* + + hpsPFTauMVAIsolation2Seq76xReMiniAOD ) + + diff --git a/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py b/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py index 2f7f9c6e96fd3..01aec3a84ec44 100644 --- a/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py +++ b/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py @@ -16,26 +16,21 @@ # the jet are reconstructed. #------------------------------------------------------------------------------- - - # Collection PFCandidates from a DR=0.8 cone about the jet axis and make new # faux jets with this collection -from RecoTauTag.RecoTau.RecoTauJetRegionProducer_cfi import \ - RecoTauJetRegionProducer -recoTauAK4PFJets08Region=RecoTauJetRegionProducer.clone( +from RecoTauTag.RecoTau.RecoTauJetRegionProducer_cfi import RecoTauJetRegionProducer +recoTauAK4PFJets08Region76xReMiniAOD = RecoTauJetRegionProducer.clone( src = PFRecoTauPFJetInputs.inputJetCollection ) - - # Reconstruct the pi zeros in our pre-selected jets. -from RecoTauTag.RecoTau.RecoTauPiZeroProducer_cfi import \ - ak4PFJetsLegacyHPSPiZeros -ak4PFJetsLegacyHPSPiZeros.jetSrc = PFRecoTauPFJetInputs.inputJetCollection -# import charged hadrons -from RecoTauTag.RecoTau.PFRecoTauChargedHadronProducer_cfi import \ - ak4PFJetsRecoTauChargedHadrons +from RecoTauTag.RecoTau.RecoTauPiZeroProducer_cfi import ak4PFJetsLegacyHPSPiZeros +ak4PFJetsLegacyHPSPiZeros76xReMiniAOD = ak4PFJetsLegacyHPSPiZeros.clone() +ak4PFJetsLegacyHPSPiZeros76xReMiniAOD.jetSrc = PFRecoTauPFJetInputs.inputJetCollection +# import charged hadrons +from RecoTauTag.RecoTau.PFRecoTauChargedHadronProducer_cfi import ak4PFJetsRecoTauChargedHadrons +ak4PFJetsRecoTauChargedHadrons76xReMiniAOD = ak4PFJetsRecoTauChargedHadrons.clone() #------------------------------------------------------------------------------- #------------------ Produce combinatoric base taus------------------------------ @@ -44,65 +39,76 @@ # produced for each jet, which are cleaned by the respective algorithms. # We split it into different collections for each different decay mode. -from RecoTauTag.RecoTau.RecoTauCombinatoricProducer_cfi import \ - combinatoricRecoTaus - -combinatoricRecoTaus.jetSrc = PFRecoTauPFJetInputs.inputJetCollection - +from RecoTauTag.RecoTau.RecoTauCombinatoricProducer_cfi import combinatoricRecoTaus, combinatoricModifierConfigs +combinatoricRecoTaus76xReMiniAOD = combinatoricRecoTaus.clone() +combinatoricRecoTaus76xReMiniAOD.modifiers = cms.VPSet(combinatoricModifierConfigs) +combinatoricRecoTaus76xReMiniAOD.jetRegionSrc = cms.InputTag("recoTauAK4PFJets08Region76xReMiniAOD") +combinatoricRecoTaus76xReMiniAOD.jetSrc = PFRecoTauPFJetInputs.inputJetCollection + +#-------------------------------------------------------------------------------- +# CV: disable reconstruction of 3Prong1Pi0 tau candidates +combinatoricRecoTaus76xReMiniAOD.builders[0].decayModes.remove(combinatoricRecoTaus76xReMiniAOD.builders[0].decayModes[6]) +#-------------------------------------------------------------------------------- + +#-------------------------------------------------------------------------------- +# CV: set mass of tau candidates reconstructed in 1Prong0pi0 decay mode to charged pion mass +combinatoricRecoTaus76xReMiniAOD.modifiers.append(cms.PSet( + name = cms.string("tau_mass"), + plugin = cms.string("PFRecoTauMassPlugin"), + verbosity = cms.int32(0) +)) +#-------------------------------------------------------------------------------- #------------------------------------------------------------------------------- #------------------ HPS Taus --------------------------------------------------- #------------------------------------------------------------------------------- -from RecoTauTag.Configuration.HPSPFTaus_cff import * +from RecoTauTag.Configuration.HPSPFTaus_reminiAOD_cff import * -combinatoricRecoTaus.piZeroSrc = cms.InputTag("ak4PFJetsLegacyHPSPiZeros") +combinatoricRecoTaus76xReMiniAOD.chargedHadronSrc = cms.InputTag("ak4PFJetsRecoTauChargedHadrons76xReMiniAOD") +combinatoricRecoTaus76xReMiniAOD.piZeroSrc = cms.InputTag("ak4PFJetsLegacyHPSPiZeros76xReMiniAOD") #------------------------------------------------------------------------------- #------------------ PFTauTagInfo workaround ------------------------------------ #------------------------------------------------------------------------------- # Build the PFTauTagInfos separately, then relink them into the taus. -from RecoTauTag.RecoTau.PFRecoTauTagInfoProducer_cfi import \ - pfRecoTauTagInfoProducer -from RecoJets.JetAssociationProducers.ak4JTA_cff \ - import ak4JetTracksAssociatorAtVertexPF -ak4PFJetTracksAssociatorAtVertex = ak4JetTracksAssociatorAtVertexPF.clone() -ak4PFJetTracksAssociatorAtVertex.jets = PFRecoTauPFJetInputs.inputJetCollection -tautagInfoModifer = cms.PSet( +from RecoTauTag.RecoTau.PFRecoTauTagInfoProducer_cfi import pfRecoTauTagInfoProducer +pfRecoTauTagInfoProducer76xReMiniAOD = pfRecoTauTagInfoProducer.clone() +pfRecoTauTagInfoProducer76xReMiniAOD.PFJetTracksAssociatorProducer = cms.InputTag("ak4PFJetTracksAssociatorAtVertex76xReMiniAOD") + +from RecoJets.JetAssociationProducers.ak4JTA_cff import ak4JetTracksAssociatorAtVertexPF +ak4PFJetTracksAssociatorAtVertex76xReMiniAOD = ak4JetTracksAssociatorAtVertexPF.clone() +ak4PFJetTracksAssociatorAtVertex76xReMiniAOD.jets = PFRecoTauPFJetInputs.inputJetCollection +tautagInfoModifer76xReMiniAOD = cms.PSet( name = cms.string("TTIworkaround"), plugin = cms.string("RecoTauTagInfoWorkaroundModifer"), - pfTauTagInfoSrc = cms.InputTag("pfRecoTauTagInfoProducer"), + pfTauTagInfoSrc = cms.InputTag("pfRecoTauTagInfoProducer76xReMiniAOD"), ) -combinatoricRecoTaus.modifiers.append(tautagInfoModifer) +combinatoricRecoTaus76xReMiniAOD.modifiers.append(tautagInfoModifer76xReMiniAOD) -recoTauPileUpVertices = cms.EDFilter( - "RecoTauPileUpVertexSelector", +recoTauPileUpVertices76xReMiniAOD = cms.EDFilter("RecoTauPileUpVertexSelector", src = cms.InputTag("offlinePrimaryVertices"), minTrackSumPt = cms.double(5), filter = cms.bool(False), ) - -recoTauCommonSequence = cms.Sequence( - ak4PFJetTracksAssociatorAtVertex * - recoTauAK4PFJets08Region* - recoTauPileUpVertices* - pfRecoTauTagInfoProducer +recoTauCommonSequence76xReMiniAOD = cms.Sequence( + ak4PFJetTracksAssociatorAtVertex76xReMiniAOD * + recoTauAK4PFJets08Region76xReMiniAOD * + recoTauPileUpVertices76xReMiniAOD * + pfRecoTauTagInfoProducer76xReMiniAOD ) - - # Produce only classic HPS taus -recoTauClassicHPSSequence = cms.Sequence( - ak4PFJetsLegacyHPSPiZeros * - ak4PFJetsRecoTauChargedHadrons * - combinatoricRecoTaus * - produceAndDiscriminateHPSPFTaus +recoTauClassicHPSSequence76xReMiniAOD = cms.Sequence( + ak4PFJetsLegacyHPSPiZeros76xReMiniAOD * + ak4PFJetsRecoTauChargedHadrons76xReMiniAOD * + combinatoricRecoTaus76xReMiniAOD * + produceAndDiscriminateHPSPFTaus76xReMiniAOD ) - -PFTau = cms.Sequence( - recoTauCommonSequence * - recoTauClassicHPSSequence +PFTau76xReMiniAOD = cms.Sequence( + recoTauCommonSequence76xReMiniAOD * + recoTauClassicHPSSequence76xReMiniAOD ) diff --git a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py index b01a53055a3ac..e71ec69116b28 100644 --- a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py +++ b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py @@ -111,7 +111,10 @@ 'keep *_hpsPFTauMVA3IsolationChargedIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationNeutralIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationPUcorrPtSum_*_*', - 'keep *_hpsPFTauTransverseImpactParameters_*_*' + 'keep *_hpsPFTauTransverseImpactParameters_*_*', + 'keep *_hpsPFTauFootprintCorrection_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumWeight_*_*', + 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*' ) ) #AOD content From 15e10ecea6282508e0b23ecc0d98b6d92dda70f1 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 10 Dec 2015 12:32:26 +0100 Subject: [PATCH 007/250] port of tau ID updates from 76xReMiniAOD branch to CMSSW 8_0_x --- .../python/producersLayer1/tauProducer_cfi.py | 59 +- .../PatAlgos/python/tools/tauTools.py | 212 +-- .../Configuration/python/HPSPFTaus_cff.py | 1277 ++++++++-------- .../python/HPSPFTaus_reminiAOD_cff.py | 1356 ----------------- .../Configuration/python/RecoPFTauTag_cff.py | 66 +- .../python/RecoPFTauTag_reminiAOD_cff.py | 114 -- .../python/RecoTauTag_EventContent_cff.py | 116 +- 7 files changed, 900 insertions(+), 2300 deletions(-) delete mode 100644 RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py delete mode 100644 RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py index 8f5e1854a3286..3171115bbf32e 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py @@ -103,7 +103,64 @@ againstElectronMediumMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5MediumElectronRejection"), againstElectronTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5TightElectronRejection"), againstElectronVTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VTightElectronRejection"), - ), + ##New Run2 MVA isolation + byIsolationMVArun2v1DBoldDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), + byVLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), + byLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), + byMediumIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), + byTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), + byVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), + byVVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), + byIsolationMVArun2v1DBnewDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), + byVLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), + byLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), + byMediumIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), + byTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), + byVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), + byVVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), + byIsolationMVArun2v1PWoldDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), + byVLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), + byLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), + byMediumIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), + byTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), + byVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), + byVVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), + byIsolationMVArun2v1PWnewDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), + byVLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), + byLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), + byMediumIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), + byTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), + byVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), + byVVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), + chargedIsoPtSumdR03 = cms.InputTag("ChargedIsoPtSumdR03"), + neutralIsoPtSumdR03 = cms.InputTag("NeutralIsoPtSumdR03"), + puCorrPtSumdR03 = cms.InputTag("PUcorrPtSumdR03"), + neutralIsoPtSumWeightdR03 = cms.InputTag("NeutralIsoPtSumWeightdR03"), + footprintCorrectiondR03 = cms.InputTag("FootprintCorrectiondR03"), + photonPtSumOutsideSignalConedR03 = cms.InputTag("PhotonPtSumOutsideSignalConedR03"), + byIsolationMVArun2v1DBdR03oldDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), + byVLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), + byLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), + byMediumIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), + byTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), + byVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), + byVVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), + byIsolationMVArun2v1PWdR03oldDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), + byVLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), + byLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), + byMediumIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), + byTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), + byVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), + byVVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), + ##New Run2 MVA discriminator against electrons + againstElectronMVA6raw = cms.InputTag("DiscriminationByMVA6rawElectronRejection"), + againstElectronMVA6category = cms.InputTag("DiscriminationByMVA6rawElectronRejection:category"), + againstElectronVLooseMVA6 = cms.InputTag("DiscriminationByMVA6VLooseElectronRejection"), + againstElectronLooseMVA6 = cms.InputTag("DiscriminationByMVA6LooseElectronRejection"), + againstElectronMediumMVA6 = cms.InputTag("DiscriminationByMVA6MediumElectronRejection"), + againstElectronTightMVA6 = cms.InputTag("DiscriminationByMVA6TightElectronRejection"), + againstElectronVTightMVA6 = cms.InputTag("DiscriminationByMVA6VTightElectronRejection"), + ), # mc matching configurables addGenMatch = cms.bool(True), diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index 7df17f2c7f8ae..fe859e26bc932 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -109,6 +109,9 @@ def _switchToPFTau(process, ("byMediumCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"), ("byTightCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"), ("byCombinedIsolationDeltaBetaCorrRaw3Hits", "DiscriminationByRawCombinedIsolationDBSumPtCorr3Hits"), + ("byLooseCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03"), + ("byMediumCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03"), + ("byTightCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03"), ("byLoosePileupWeightedIsolation3Hits", "DiscriminationByLoosePileupWeightedIsolation3Hits"), ("byMediumPileupWeightedIsolation3Hits", "DiscriminationByMediumPileupWeightedIsolation3Hits"), ("byTightPileupWeightedIsolation3Hits", "DiscriminationByTightPileupWeightedIsolation3Hits"), @@ -120,13 +123,6 @@ def _switchToPFTau(process, ("neutralIsoPtSumWeight", "NeutralIsoPtSumWeight"), ("footprintCorrection", "FootprintCorrection"), ("photonPtSumOutsideSignalCone", "PhotonPtSumOutsideSignalCone"), - ##("byIsolationMVA3oldDMwoLTraw", "DiscriminationByIsolationMVA3oldDMwoLTraw"), - ##("byVLooseIsolationMVA3oldDMwoLT", "DiscriminationByVLooseIsolationMVA3oldDMwoLT"), - ##("byLooseIsolationMVA3oldDMwoLT", "DiscriminationByLooseIsolationMVA3oldDMwoLT"), - ##("byMediumIsolationMVA3oldDMwoLT", "DiscriminationByMediumIsolationMVA3oldDMwoLT"), - ##("byTightIsolationMVA3oldDMwoLT", "DiscriminationByTightIsolationMVA3oldDMwoLT"), - ##("byVTightIsolationMVA3oldDMwoLT", "DiscriminationByVTightIsolationMVA3oldDMwoLT"), - ##("byVVTightIsolationMVA3oldDMwoLT", "DiscriminationByVVTightIsolationMVA3oldDMwoLT"), ("byIsolationMVA3oldDMwLTraw", "DiscriminationByIsolationMVA3oldDMwLTraw"), ("byVLooseIsolationMVA3oldDMwLT", "DiscriminationByVLooseIsolationMVA3oldDMwLT"), ("byLooseIsolationMVA3oldDMwLT", "DiscriminationByLooseIsolationMVA3oldDMwLT"), @@ -134,13 +130,6 @@ def _switchToPFTau(process, ("byTightIsolationMVA3oldDMwLT", "DiscriminationByTightIsolationMVA3oldDMwLT"), ("byVTightIsolationMVA3oldDMwLT", "DiscriminationByVTightIsolationMVA3oldDMwLT"), ("byVVTightIsolationMVA3oldDMwLT", "DiscriminationByVVTightIsolationMVA3oldDMwLT"), - ("byIsolationMVA3newDMwoLTraw", "DiscriminationByIsolationMVA3newDMwoLTraw"), - ##("byVLooseIsolationMVA3newDMwoLT", "DiscriminationByVLooseIsolationMVA3newDMwoLT"), - ##("byLooseIsolationMVA3newDMwoLT", "DiscriminationByLooseIsolationMVA3newDMwoLT"), - ##("byMediumIsolationMVA3newDMwoLT", "DiscriminationByMediumIsolationMVA3newDMwoLT"), - ##("byTightIsolationMVA3newDMwoLT", "DiscriminationByTightIsolationMVA3newDMwoLT"), - ##("byVTightIsolationMVA3newDMwoLT", "DiscriminationByVTightIsolationMVA3newDMwoLT"), - ##("byVVTightIsolationMVA3newDMwoLT", "DiscriminationByVVTightIsolationMVA3newDMwoLT"), ("byIsolationMVA3newDMwLTraw", "DiscriminationByIsolationMVA3newDMwLTraw"), ("byVLooseIsolationMVA3newDMwLT", "DiscriminationByVLooseIsolationMVA3newDMwLT"), ("byLooseIsolationMVA3newDMwLT", "DiscriminationByLooseIsolationMVA3newDMwLT"), @@ -148,9 +137,6 @@ def _switchToPFTau(process, ("byTightIsolationMVA3newDMwLT", "DiscriminationByTightIsolationMVA3newDMwLT"), ("byVTightIsolationMVA3newDMwLT", "DiscriminationByVTightIsolationMVA3newDMwLT"), ("byVVTightIsolationMVA3newDMwLT", "DiscriminationByVVTightIsolationMVA3newDMwLT"), - ##("againstElectronLoose", "DiscriminationByLooseElectronRejection"), - ##("againstElectronMedium", "DiscriminationByMediumElectronRejection"), - ##("againstElectronTight", "DiscriminationByTightElectronRejection"), ("againstElectronMVA5raw", "DiscriminationByMVA5rawElectronRejection"), ("againstElectronMVA5category", "DiscriminationByMVA5rawElectronRejection:category"), ("againstElectronVLooseMVA5", "DiscriminationByMVA5VLooseElectronRejection"), @@ -158,126 +144,66 @@ def _switchToPFTau(process, ("againstElectronMediumMVA5", "DiscriminationByMVA5MediumElectronRejection"), ("againstElectronTightMVA5", "DiscriminationByMVA5TightElectronRejection"), ("againstElectronVTightMVA5", "DiscriminationByMVA5VTightElectronRejection"), - ##("againstElectronDeadECAL", "DiscriminationByDeadECALElectronRejection"), - ##("againstMuonLoose", "DiscriminationByLooseMuonRejection"), - ##("againstMuonMedium", "DiscriminationByMediumMuonRejection"), - ##("againstMuonTight", "DiscriminationByTightMuonRejection"), - ##("againstMuonLoose2", "DiscriminationByLooseMuonRejection2"), - ##("againstMuonMedium2", "DiscriminationByMediumMuonRejection2"), - ##("againstMuonTight2", "DiscriminationByTightMuonRejection2"), ("againstMuonLoose3", "DiscriminationByLooseMuonRejection3"), ("againstMuonTight3", "DiscriminationByTightMuonRejection3"), - ##("againstMuonMVAraw", "DiscriminationByMVArawMuonRejection"), - ##("againstMuonLooseMVA", "DiscriminationByMVALooseMuonRejection"), - ##("againstMuonMediumMVA", "DiscriminationByMVAMediumMuonRejection"), - ##("againstMuonTightMVA", "DiscriminationByMVATightMuonRejection") -] - -#-------------------------------------------------------------------------------- -# CV: define list of old and new tau ID discriminators for CMSSW 7_6_x reminiAOD v2 -hpsTauIDSources76xReMiniAOD = [ - ("decayModeFindingNewDMs", "DiscriminationByDecayModeFindingNewDMs76xReMiniAOD"), - ("decayModeFinding", "DiscriminationByDecayModeFinding76xReMiniAOD"), # CV: kept for backwards compatibility - ("byLooseCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD"), - ("byMediumCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD"), - ("byTightCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD"), - ("byCombinedIsolationDeltaBetaCorrRaw3Hits", "DiscriminationByRawCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD"), - ("byLooseCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD"), - ("byMediumCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD"), - ("byTightCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD"), - ("byLoosePileupWeightedIsolation3Hits", "DiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD"), - ("byMediumPileupWeightedIsolation3Hits", "DiscriminationByMediumPileupWeightedIsolation3Hits76xReMiniAOD"), - ("byTightPileupWeightedIsolation3Hits", "DiscriminationByTightPileupWeightedIsolation3Hits76xReMiniAOD"), - ("byPhotonPtSumOutsideSignalCone", "DiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD"), - ("byPileupWeightedIsolationRaw3Hits", "DiscriminationByRawPileupWeightedIsolation3Hits76xReMiniAOD"), - ("chargedIsoPtSum", "ChargedIsoPtSum76xReMiniAOD"), - ("neutralIsoPtSum", "NeutralIsoPtSum76xReMiniAOD"), - ("puCorrPtSum", "PUcorrPtSum76xReMiniAOD"), - ("neutralIsoPtSumWeight", "NeutralIsoPtSumWeight76xReMiniAOD"), - ("footprintCorrection", "FootprintCorrection76xReMiniAOD"), - ("photonPtSumOutsideSignalCone", "PhotonPtSumOutsideSignalCone76xReMiniAOD"), - ("byIsolationMVA3oldDMwLTraw", "DiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD"), - ("byVLooseIsolationMVA3oldDMwLT", "DiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD"), - ("byLooseIsolationMVA3oldDMwLT", "DiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD"), - ("byMediumIsolationMVA3oldDMwLT", "DiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD"), - ("byTightIsolationMVA3oldDMwLT", "DiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD"), - ("byVTightIsolationMVA3oldDMwLT", "DiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD"), - ("byVVTightIsolationMVA3oldDMwLT", "DiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD"), - ("byIsolationMVA3newDMwLTraw", "DiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD"), - ("byVLooseIsolationMVA3newDMwLT", "DiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD"), - ("byLooseIsolationMVA3newDMwLT", "DiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD"), - ("byMediumIsolationMVA3newDMwLT", "DiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD"), - ("byTightIsolationMVA3newDMwLT", "DiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD"), - ("byVTightIsolationMVA3newDMwLT", "DiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD"), - ("byVVTightIsolationMVA3newDMwLT", "DiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD"), - ("againstElectronMVA5raw", "DiscriminationByMVA5rawElectronRejection76xReMiniAOD"), - ("againstElectronMVA5category", "DiscriminationByMVA5rawElectronRejection76xReMiniAOD:category"), - ("againstElectronVLooseMVA5", "DiscriminationByMVA5VLooseElectronRejection76xReMiniAOD"), - ("againstElectronLooseMVA5", "DiscriminationByMVA5LooseElectronRejection76xReMiniAOD"), - ("againstElectronMediumMVA5", "DiscriminationByMVA5MediumElectronRejection76xReMiniAOD"), - ("againstElectronTightMVA5", "DiscriminationByMVA5TightElectronRejection76xReMiniAOD"), - ("againstElectronVTightMVA5", "DiscriminationByMVA5VTightElectronRejection76xReMiniAOD"), - ("againstMuonLoose3", "DiscriminationByLooseMuonRejection376xReMiniAOD"), - ("againstMuonTight3", "DiscriminationByTightMuonRejection376xReMiniAOD"), ##New Run2 MVA isolation - ("byIsolationMVArun2v1DBoldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD"), - ("byVLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), - ("byLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), - ("byMediumIsolationMVArun2v1DBoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), - ("byTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), - ("byVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), - ("byVVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD"), - ("byIsolationMVArun2v1DBnewDMwLTraw", "DiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD"), - ("byVLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), - ("byLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), - ("byMediumIsolationMVArun2v1DBnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), - ("byTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), - ("byVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), - ("byVVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD"), - ("byIsolationMVArun2v1PWoldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD"), - ("byVLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), - ("byLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), - ("byMediumIsolationMVArun2v1PWoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), - ("byTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), - ("byVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), - ("byVVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD"), - ("byIsolationMVArun2v1PWnewDMwLTraw", "DiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD"), - ("byVLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), - ("byLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), - ("byMediumIsolationMVArun2v1PWnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), - ("byTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), - ("byVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), - ("byVVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD"), - ("chargedIsoPtSumdR03", "ChargedIsoPtSumdR0376xReMiniAOD"), - ("neutralIsoPtSumdR03", "NeutralIsoPtSumdR0376xReMiniAOD"), - ("puCorrPtSumdR03", "PUcorrPtSumdR0376xReMiniAOD"), - ("neutralIsoPtSumWeightdR03", "NeutralIsoPtSumWeightdR0376xReMiniAOD"), - ("footprintCorrectiondR03", "FootprintCorrectiondR0376xReMiniAOD"), - ("photonPtSumOutsideSignalConedR03", "PhotonPtSumOutsideSignalConedR0376xReMiniAOD"), - ("byIsolationMVArun2v1DBdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD"), - ("byVLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), - ("byLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), - ("byMediumIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), - ("byTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), - ("byVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), - ("byVVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD"), - ("byIsolationMVArun2v1PWdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD"), - ("byVLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), - ("byLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), - ("byMediumIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), - ("byTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), - ("byVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), - ("byVVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD"), + ("byIsolationMVArun2v1DBoldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), + ("byVLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), + ("byLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), + ("byMediumIsolationMVArun2v1DBoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), + ("byTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), + ("byVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), + ("byVVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), + ("byIsolationMVArun2v1DBnewDMwLTraw", "DiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), + ("byVLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), + ("byLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), + ("byMediumIsolationMVArun2v1DBnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), + ("byTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), + ("byVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), + ("byVVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), + ("byIsolationMVArun2v1PWoldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), + ("byVLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), + ("byLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), + ("byMediumIsolationMVArun2v1PWoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), + ("byTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), + ("byVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), + ("byVVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), + ("byIsolationMVArun2v1PWnewDMwLTraw", "DiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), + ("byVLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), + ("byLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), + ("byMediumIsolationMVArun2v1PWnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), + ("byTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), + ("byVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), + ("byVVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), + ("chargedIsoPtSumdR03", "ChargedIsoPtSumdR03"), + ("neutralIsoPtSumdR03", "NeutralIsoPtSumdR03"), + ("puCorrPtSumdR03", "PUcorrPtSumdR03"), + ("neutralIsoPtSumWeightdR03", "NeutralIsoPtSumWeightdR03"), + ("footprintCorrectiondR03", "FootprintCorrectiondR03"), + ("photonPtSumOutsideSignalConedR03", "PhotonPtSumOutsideSignalConedR03"), + ("byIsolationMVArun2v1DBdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), + ("byVLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), + ("byLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), + ("byMediumIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), + ("byTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), + ("byVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), + ("byVVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), + ("byIsolationMVArun2v1PWdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), + ("byVLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), + ("byLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), + ("byMediumIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), + ("byTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), + ("byVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), + ("byVVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), ##New Run2 MVA discriminator against electrons - ("againstElectronMVA6raw", "DiscriminationByMVA6rawElectronRejection76xReMiniAOD"), - ("againstElectronMVA6category", "DiscriminationByMVA6rawElectronRejection76xReMiniAOD:category"), - ("againstElectronVLooseMVA6", "DiscriminationByMVA6VLooseElectronRejection76xReMiniAOD"), - ("againstElectronLooseMVA6", "DiscriminationByMVA6LooseElectronRejection76xReMiniAOD"), - ("againstElectronMediumMVA6", "DiscriminationByMVA6MediumElectronRejection76xReMiniAOD"), - ("againstElectronTightMVA6", "DiscriminationByMVA6TightElectronRejection76xReMiniAOD"), - ("againstElectronVTightMVA6", "DiscriminationByMVA6VTightElectronRejection76xReMiniAOD"), + ("againstElectronMVA6raw", "DiscriminationByMVA6rawElectronRejection"), + ("againstElectronMVA6category", "DiscriminationByMVA6rawElectronRejection:category"), + ("againstElectronVLooseMVA6", "DiscriminationByMVA6VLooseElectronRejection"), + ("againstElectronLooseMVA6", "DiscriminationByMVA6LooseElectronRejection"), + ("againstElectronMediumMVA6", "DiscriminationByMVA6MediumElectronRejection"), + ("againstElectronTightMVA6", "DiscriminationByMVA6TightElectronRejection"), + ("againstElectronVTightMVA6", "DiscriminationByMVA6VTightElectronRejection"), ] -#-------------------------------------------------------------------------------- # switch to PFTau collection produced for fixed dR = 0.07 signal cone size def switchToPFTauFixedCone(process, @@ -314,33 +240,11 @@ def switchToPFTauHPS(process, # CV: enable tau lifetime information for HPS PFTaus applyPostfix(process, "patTaus" + patTauLabel, postfix).tauTransverseImpactParameterSource = tauSource.value().replace("Producer", "TransverseImpactParameters") - ## adapt cleanPatTaus - if hasattr(process, "cleanPatTaus" + patTauLabel + postfix): - getattr(process, "cleanPatTaus" + patTauLabel + postfix).preselection = \ - 'pt > 18 & abs(eta) < 2.3 & tauID("decayModeFinding") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ - + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronVLooseMVA5") > 0.5' - -#-------------------------------------------------------------------------------- -# CV: function called by PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py -# to add old and new tau ID discriminators for CMSSW 7_6_x reminiAOD v2 -def switchToPFTauHPS76xReMiniAOD(process, - tauSource = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - patTauLabel = "", - jecLevels = [], - postfix = ""): - - _switchToPFTau(process, tauSource, 'hpsPFTau', hpsTauIDSources76xReMiniAOD, - patTauLabel = patTauLabel, postfix = postfix) - - # CV: enable tau lifetime information for HPS PFTaus - applyPostfix(process, "patTaus" + patTauLabel, postfix).tauTransverseImpactParameterSource = tauSource.value().replace("Producer", "TransverseImpactParameters") - ## adapt cleanPatTaus if hasattr(process, "cleanPatTaus" + patTauLabel + postfix): getattr(process, "cleanPatTaus" + patTauLabel + postfix).preselection = \ 'pt > 18 & abs(eta) < 2.3 & tauID("decayModeFinding") > 0.5 & tauID("byLooseCombinedIsolationDeltaBetaCorr3Hits") > 0.5' \ + ' & tauID("againstMuonTight3") > 0.5 & tauID("againstElectronVLooseMVA6") > 0.5' -#-------------------------------------------------------------------------------- # Select switcher by string diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py index bdaca8c8aee2e..293825185119c 100644 --- a/RecoTauTag/Configuration/python/HPSPFTaus_cff.py +++ b/RecoTauTag/Configuration/python/HPSPFTaus_cff.py @@ -35,10 +35,9 @@ # Select those taus that pass the HPS selections # - pt > 15, mass cuts, tauCone cut from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_2Prong0Pi0, decayMode_2Prong1Pi0, decayMode_3Prong0Pi0 -hpsSelectionDiscriminator76xReMiniAOD = hpsSelectionDiscriminator.clone() -hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD = hpsSelectionDiscriminator76xReMiniAOD.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByDecayModeFindingNewDMs = hpsSelectionDiscriminator.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), #---------------------------------------------------------------------------- # CV: disable 3Prong1Pi0 decay mode decayModes = cms.VPSet( @@ -51,8 +50,8 @@ ) #---------------------------------------------------------------------------- ) -hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD = hpsSelectionDiscriminator76xReMiniAOD.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByDecayModeFindingOldDMs = hpsSelectionDiscriminator.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), decayModes = cms.VPSet( decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, @@ -61,60 +60,60 @@ ), requireTauChargedHadronsToBeChargedPFCands = cms.bool(True) ) -hpsPFTauDiscriminationByDecayModeFinding76xReMiniAOD = hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD.clone() # CV: kept for backwards compatibility +hpsPFTauDiscriminationByDecayModeFinding = hpsPFTauDiscriminationByDecayModeFindingOldDMs.clone() # CV: kept for backwards compatibility # Define decay mode prediscriminant -requireDecayMode76xReMiniAOD = cms.PSet( +requireDecayMode = cms.PSet( BooleanOperator = cms.string("and"), decayMode = cms.PSet( - Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD'), + Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'), cut = cms.double(0.5) ) ) #Building the prototype for the Discriminator by Isolation -hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD = pfRecoTauDiscriminationByIsolation.clone( - PFTauProducer = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), +hpsPFTauDiscriminationByLooseIsolation = pfRecoTauDiscriminationByIsolation.clone( + PFTauProducer = cms.InputTag("hpsPFTauProducer"), + Prediscriminants = requireDecayMode.clone(), ApplyDiscriminationByTrackerIsolation = False, ApplyDiscriminationByECALIsolation = True, applyOccupancyCut = True ) -hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.Prediscriminants.preIso = cms.PSet( - Producer = cms.InputTag("hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD"), +hpsPFTauDiscriminationByLooseIsolation.Prediscriminants.preIso = cms.PSet( + Producer = cms.InputTag("hpsPFTauDiscriminationByLooseChargedIsolation"), cut = cms.double(0.5)) # Make an even looser discriminator -hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone( +hpsPFTauDiscriminationByVLooseIsolation = hpsPFTauDiscriminationByLooseIsolation.clone( customOuterCone = cms.double(0.3), isoConeSizeForDeltaBeta = cms.double(0.3), ) -hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 1.5 -hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 2.0 -hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD") +hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 1.5 +hpsPFTauDiscriminationByVLooseIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 2.0 +hpsPFTauDiscriminationByVLooseIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByVLooseChargedIsolation") -hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.8 -hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.8 -hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD") +hpsPFTauDiscriminationByMediumIsolation = hpsPFTauDiscriminationByLooseIsolation.clone() +hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.8 +hpsPFTauDiscriminationByMediumIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.8 +hpsPFTauDiscriminationByMediumIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByMediumChargedIsolation") -hpsPFTauDiscriminationByTightIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD") +hpsPFTauDiscriminationByTightIsolation = hpsPFTauDiscriminationByLooseIsolation.clone() +hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByTightIsolation.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByTightIsolation.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByTightChargedIsolation") -hpsPFTauDiscriminationByIsolationSeq76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD* - hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD* - hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD* - hpsPFTauDiscriminationByTightIsolation76xReMiniAOD +hpsPFTauDiscriminationByIsolationSeq = cms.Sequence( + hpsPFTauDiscriminationByVLooseIsolation* + hpsPFTauDiscriminationByLooseIsolation* + hpsPFTauDiscriminationByMediumIsolation* + hpsPFTauDiscriminationByTightIsolation ) _isolation_types = ['VLoose', 'Loose', 'Medium', 'Tight'] # Now build the sequences that apply PU corrections # Make Delta Beta corrections (on SumPt quantity) -hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.clone( +hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolation.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -122,9 +121,9 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone( +hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolation.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -132,9 +131,9 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.clone( +hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolation.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -142,9 +141,9 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.clone( +hpsPFTauDiscriminationByTightIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolation.clone( deltaBetaPUTrackPtCutOverride = cms.double(0.5), applyDeltaBetaCorrection = True, isoConeSizeForDeltaBeta = 0.8, @@ -152,192 +151,192 @@ applyOccupancyCut = False, applySumPtCut = True, ) -hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt +hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.maximumSumPtCut = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt -hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD +hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr = cms.Sequence( + hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr* + hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr* + hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr* + hpsPFTauDiscriminationByTightIsolationDBSumPtCorr ) -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.clone( +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%((0.09/0.25)*(ak4dBetaCorrection)), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 3.5, - Prediscriminants = requireDecayMode76xReMiniAOD.clone() + Prediscriminants = requireDecayMode.clone() ) -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.clone( +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 2.5, - Prediscriminants = requireDecayMode76xReMiniAOD.clone() + Prediscriminants = requireDecayMode.clone() ) -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( +hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( applySumPtCut = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( +hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( applySumPtCut = False, ApplyDiscriminationByECALIsolation = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( +hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( applySumPtCut = False, ApplyDiscriminationByTrackerIsolation = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.clone( +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 1.5, - Prediscriminants = requireDecayMode76xReMiniAOD.clone() + Prediscriminants = requireDecayMode.clone() ) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.clone( +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr.clone( ApplyDiscriminationByTrackerIsolation = True, ApplyDiscriminationByECALIsolation = True, deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), applyOccupancyCut = False, applySumPtCut = True, maximumSumPtCut = 0.8, - Prediscriminants = requireDecayMode76xReMiniAOD.clone() + Prediscriminants = requireDecayMode.clone() ) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr = cms.Sequence( + hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr* + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr ) #Charge isolation based on combined isolation -hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( +hpsPFTauDiscriminationByVLooseChargedIsolation = hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( +hpsPFTauDiscriminationByLooseChargedIsolation = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( +hpsPFTauDiscriminationByMediumChargedIsolation = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( +hpsPFTauDiscriminationByTightChargedIsolation = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone( ApplyDiscriminationByECALIsolation = False ) -hpsPFTauDiscriminationByChargedIsolationSeq76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD* - hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD* - hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD* - hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD +hpsPFTauDiscriminationByChargedIsolationSeq = cms.Sequence( + hpsPFTauDiscriminationByVLooseChargedIsolation* + hpsPFTauDiscriminationByLooseChargedIsolation* + hpsPFTauDiscriminationByMediumChargedIsolation* + hpsPFTauDiscriminationByTightChargedIsolation ) #copying discriminator against electrons and muons -hpsPFTauDiscriminationByLooseElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByLooseElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = noPrediscriminants, PFElectronMVA_maxValue = cms.double(0.6) ) -hpsPFTauDiscriminationByMediumElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByMediumElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = noPrediscriminants, ApplyCut_EcalCrackCut = cms.bool(True) ) -hpsPFTauDiscriminationByTightElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByTightElectronRejection = pfRecoTauDiscriminationAgainstElectron.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = noPrediscriminants, ApplyCut_EcalCrackCut = cms.bool(True), ApplyCut_BremCombined = cms.bool(True) ) -hpsPFTauDiscriminationByLooseMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByLooseMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = noPrediscriminants ) -hpsPFTauDiscriminationByMediumMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByMediumMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('noAllArbitrated') ) -hpsPFTauDiscriminationByTightMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByTightMuonRejection = pfRecoTauDiscriminationAgainstMuon.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('noAllArbitratedWithHOP') ) -hpsPFTauDiscriminationByLooseMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByLooseMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = noPrediscriminants ) -hpsPFTauDiscriminationByMediumMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByMediumMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('medium') ) -hpsPFTauDiscriminationByTightMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByTightMuonRejection2 = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('tight') ) -hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), +hpsPFTauDiscriminationByLooseMuonRejection3 = pfRecoTauDiscriminationAgainstMuon2.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), Prediscriminants = noPrediscriminants, discriminatorOption = cms.string('custom'), maxNumberOfMatches = cms.int32(1), doCaloMuonVeto = cms.bool(True), maxNumberOfHitsLast2Stations = cms.int32(-1) ) -hpsPFTauDiscriminationByTightMuonRejection376xReMiniAOD = hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD.clone( +hpsPFTauDiscriminationByTightMuonRejection3 = hpsPFTauDiscriminationByLooseMuonRejection3.clone( maxNumberOfHitsLast2Stations = cms.int32(0) ) -hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuonMVA.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), +hpsPFTauDiscriminationByMVArawMuonRejection = pfRecoTauDiscriminationAgainstMuonMVA.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), loadMVAfromDB = cms.bool(True), returnMVA = cms.bool(True), mvaName = cms.string("RecoTauTag_againstMuonMVAv1") ) -##hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD.clone( +##hpsPFTauDiscriminationByMVALooseMuonRejection = hpsPFTauDiscriminationByMVArawMuonRejection.clone( ## returnMVA = cms.bool(False), ## mvaMin = cms.double(0.75) ##) -##hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone( +##hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone( ## mvaMin = cms.double(0.950) ##) -##hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone( +##hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone( ## mvaMin = cms.double(0.975) ##) -hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD:category'), +hpsPFTauDiscriminationByMVALooseMuonRejection = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection'), + key = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_againstMuonMVAv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -348,14 +347,14 @@ ) ) ) -hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone() -hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_0") -hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone() -hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff98_0") +hpsPFTauDiscriminationByMVAMediumMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone() +hpsPFTauDiscriminationByMVAMediumMuonRejection.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_0") +hpsPFTauDiscriminationByMVATightMuonRejection = hpsPFTauDiscriminationByMVALooseMuonRejection.clone() +hpsPFTauDiscriminationByMVATightMuonRejection.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff98_0") -hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronMVA5.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), +hpsPFTauDiscriminationByMVA5rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA5.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), loadMVAfromDB = cms.bool(True), mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL"), mvaName_NoEleMatch_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL"), @@ -375,11 +374,11 @@ mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC") ) -hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD:category'), +hpsPFTauDiscriminationByMVA5VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection'), + key = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection:category'), loadMVAfromDB = cms.bool(True), mapping = cms.VPSet( cms.PSet( @@ -465,81 +464,81 @@ ) ) -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff96") - -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff91") - -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff85") - -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79") - -hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronMVA6.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), +hpsPFTauDiscriminationByMVA5LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff96") +hpsPFTauDiscriminationByMVA5LooseElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff96") + +hpsPFTauDiscriminationByMVA5MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff91") +hpsPFTauDiscriminationByMVA5MediumElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff91") + +hpsPFTauDiscriminationByMVA5TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff85") +hpsPFTauDiscriminationByMVA5TightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff85") + +hpsPFTauDiscriminationByMVA5VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection) +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79") +hpsPFTauDiscriminationByMVA5VTightElectronRejection.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79") + +hpsPFTauDiscriminationByMVA6rawElectronRejection = pfRecoTauDiscriminationAgainstElectronMVA6.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), loadMVAfromDB = cms.bool(True), mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL"), mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL"), @@ -551,11 +550,11 @@ mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC") ) -hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD:category'), +hpsPFTauDiscriminationByMVA6VLooseElectronRejection = recoTauDiscriminantCutMultiplexer.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection'), + key = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection:category'), loadMVAfromDB = cms.bool(True), mapping = cms.VPSet( cms.PSet( @@ -601,93 +600,93 @@ ) ) -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff96") - -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff91") - -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff85") - -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff79") - -hpsPFTauDiscriminationByDeadECALElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone() +hpsPFTauDiscriminationByMVA6LooseElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff96") +hpsPFTauDiscriminationByMVA6LooseElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff96") + +hpsPFTauDiscriminationByMVA6MediumElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff91") +hpsPFTauDiscriminationByMVA6MediumElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff91") + +hpsPFTauDiscriminationByMVA6TightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff85") +hpsPFTauDiscriminationByMVA6TightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff85") + +hpsPFTauDiscriminationByMVA6VTightElectronRejection = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection) +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff79") +hpsPFTauDiscriminationByMVA6VTightElectronRejection.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff79") + +hpsPFTauDiscriminationByDeadECALElectronRejection = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone() ) #Define new sequence that is using smaller number on hits cut -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() - -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) - -hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr.clone() +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr.clone() +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr.clone() + +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) + +hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( applySumPtCut = False, storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* - hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* - hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* - hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits = cms.Sequence( + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits* + hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits ) -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone() +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.clone() +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03 = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.clone() -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3) +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3) +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 +hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03.customOuterCone = cms.double(0.3) -hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR0376xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD* - hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD* - hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD +hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR03 = cms.Sequence( + hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03* + hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03* + hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03 ) -hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( +hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( ApplyDiscriminationByECALIsolation = cms.bool(False), applyDeltaBetaCorrection = cms.bool(False), ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), @@ -696,23 +695,23 @@ applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) ) -hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( - maximumSumPtCut = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.maximumSumPtCut +hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( + maximumSumPtCut = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut ) -hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( - maximumSumPtCut = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.maximumSumPtCut +hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( + maximumSumPtCut = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits.maximumSumPtCut ) -hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( +hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( applySumPtCut = cms.bool(False) ) -hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( +hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits.clone( Prediscriminants = cms.PSet( BooleanOperator = cms.string("and"), decayMode = cms.PSet( - Producer = cms.InputTag('hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD'), + Producer = cms.InputTag('hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone'), cut = cms.double(0.5) ) ), @@ -720,19 +719,19 @@ storeRawSumPt = cms.bool(True) ) -hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD* - hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits76xReMiniAOD* - hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits76xReMiniAOD* - hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD* - hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits76xReMiniAOD +hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits = cms.Sequence( + hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits* + hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits* + hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits* + hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone* + hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits ) # Define the HPS selection discriminator used in cleaning -hpsSelectionDiscriminator76xReMiniAOD.PFTauProducer = cms.InputTag("combinatoricRecoTaus76xReMiniAOD") +hpsSelectionDiscriminator.PFTauProducer = cms.InputTag("combinatoricRecoTaus") #---------------------------------------------------------------------------- # CV: disable 3Prong1Pi0 decay mode -hpsSelectionDiscriminator76xReMiniAOD.decayModes = cms.VPSet( +hpsSelectionDiscriminator.decayModes = cms.VPSet( decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, @@ -743,21 +742,21 @@ #---------------------------------------------------------------------------- from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner -hpsPFTauProducerSansRefs76xReMiniAOD = RecoTauCleaner.clone( - src = cms.InputTag("combinatoricRecoTaus76xReMiniAOD") +hpsPFTauProducerSansRefs = RecoTauCleaner.clone( + src = cms.InputTag("combinatoricRecoTaus") ) -hpsPFTauProducerSansRefs76xReMiniAOD.cleaners[1].src = cms.InputTag("hpsSelectionDiscriminator76xReMiniAOD") +hpsPFTauProducerSansRefs.cleaners[1].src = cms.InputTag("hpsSelectionDiscriminator") from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder -hpsPFTauProducer76xReMiniAOD = RecoTauPiZeroUnembedder.clone( - src = cms.InputTag("hpsPFTauProducerSansRefs76xReMiniAOD") +hpsPFTauProducer = RecoTauPiZeroUnembedder.clone( + src = cms.InputTag("hpsPFTauProducerSansRefs") ) from RecoTauTag.RecoTau.PFTauPrimaryVertexProducer_cfi import * from RecoTauTag.RecoTau.PFTauSecondaryVertexProducer_cfi import * from RecoTauTag.RecoTau.PFTauTransverseImpactParameters_cfi import * -hpsPFTauPrimaryVertexProducer76xReMiniAOD = PFTauPrimaryVertexProducer.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), +hpsPFTauPrimaryVertexProducer = PFTauPrimaryVertexProducer.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer"), ElectronTag = cms.InputTag(""), MuonTag = cms.InputTag(""), PVTag = cms.InputTag("offlinePrimaryVertices"), @@ -770,32 +769,32 @@ useSelectedTaus = cms.bool(False), discriminators = cms.VPSet( cms.PSet( - discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD'), + discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs'), selectionCut = cms.double(0.5) ) ), cut = cms.string("pt > 18.0 & abs(eta) < 2.4") ) -hpsPFTauSecondaryVertexProducer76xReMiniAOD = PFTauSecondaryVertexProducer.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD") +hpsPFTauSecondaryVertexProducer = PFTauSecondaryVertexProducer.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer") ) -hpsPFTauTransverseImpactParameters76xReMiniAOD = PFTauTransverseImpactParameters.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), - PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer76xReMiniAOD"), - PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer76xReMiniAOD"), +hpsPFTauTransverseImpactParameters = PFTauTransverseImpactParameters.clone( + PFTauTag = cms.InputTag("hpsPFTauProducer"), + PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer"), + PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer"), useFullCalculation = cms.bool(True) ) -hpsPFTauVertexAndImpactParametersSeq76xReMiniAOD = cms.Sequence( - hpsPFTauPrimaryVertexProducer76xReMiniAOD* - hpsPFTauSecondaryVertexProducer76xReMiniAOD* - hpsPFTauTransverseImpactParameters76xReMiniAOD +hpsPFTauVertexAndImpactParametersSeq = cms.Sequence( + hpsPFTauPrimaryVertexProducer* + hpsPFTauSecondaryVertexProducer* + hpsPFTauTransverseImpactParameters ) from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolation2_cff import * -hpsPFTauChargedIsoPtSum76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), +hpsPFTauChargedIsoPtSum = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), ApplyDiscriminationByECALIsolation = cms.bool(False), ApplyDiscriminationByTrackerIsolation = cms.bool(True), applySumPtCut = cms.bool(False), @@ -806,12 +805,12 @@ isoConeSizeForDeltaBeta = cms.double(0.8), verbosity = cms.int32(0) ) -hpsPFTauNeutralIsoPtSum76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( +hpsPFTauNeutralIsoPtSum = hpsPFTauChargedIsoPtSum.clone( ApplyDiscriminationByECALIsolation = cms.bool(True), ApplyDiscriminationByTrackerIsolation = cms.bool(False), verbosity = cms.int32(0) ) -hpsPFTauPUcorrPtSum76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( +hpsPFTauPUcorrPtSum = hpsPFTauChargedIsoPtSum.clone( ApplyDiscriminationByECALIsolation = cms.bool(False), ApplyDiscriminationByTrackerIsolation = cms.bool(False), applyDeltaBetaCorrection = cms.bool(True), @@ -819,42 +818,42 @@ storeRawPUsumPt = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( +hpsPFTauNeutralIsoPtSumWeight = hpsPFTauChargedIsoPtSum.clone( ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), ApplyDiscriminationByTrackerIsolation = cms.bool(False), UseAllPFCandsForWeights = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauFootprintCorrection76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( +hpsPFTauFootprintCorrection = hpsPFTauChargedIsoPtSum.clone( ApplyDiscriminationByTrackerIsolation = cms.bool(False), storeRawSumPt = cms.bool(False), storeRawFootprintCorrection = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( +hpsPFTauPhotonPtSumOutsideSignalCone = hpsPFTauChargedIsoPtSum.clone( ApplyDiscriminationByTrackerIsolation = cms.bool(False), storeRawSumPt = cms.bool(False), storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD = discriminationByIsolationMVA2raw.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), +hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw = discriminationByIsolationMVA2raw.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), loadMVAfromDB = cms.bool(True), mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1"), mvaOpt = cms.string("oldDMwoLT"), - srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters76xReMiniAOD'), - srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum76xReMiniAOD'), - srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum76xReMiniAOD'), - srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum76xReMiniAOD'), + srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD = discriminationByIsolationMVA2VLoose.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT = discriminationByIsolationMVA2VLoose.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -865,24 +864,24 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1"), mvaOpt = cms.string("oldDMwLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw:category'), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( cms.PSet( @@ -892,24 +891,24 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1"), mvaOpt = cms.string("newDMwoLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw:category'), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_mvaOutput_normalization"), mapping = cms.VPSet( cms.PSet( @@ -920,24 +919,24 @@ ), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() +hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff40") +hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw.clone( mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1"), mvaOpt = cms.string("newDMwLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD:category'), +hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw:category'), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( cms.PSet( @@ -947,39 +946,39 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40") +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40") #Define new Run2 MVA isolations from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolationRun2_cff import * -hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD = discriminationByIsolationMVArun2v1raw.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), +hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw = discriminationByIsolationMVArun2v1raw.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), loadMVAfromDB = cms.bool(True), mvaName = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1"), mvaOpt = cms.string("DBoldDMwLT"), - srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters76xReMiniAOD'), - srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum76xReMiniAOD'), - srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum76xReMiniAOD'), - srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum76xReMiniAOD'), - srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD'), - srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection76xReMiniAOD'), + srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters'), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone'), + srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection'), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = discriminationByIsolationMVArun2v1VLoose.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT = discriminationByIsolationMVArun2v1VLoose.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -990,26 +989,26 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone( mvaName = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1"), mvaOpt = cms.string("DBnewDMwLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -1020,27 +1019,27 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone( mvaName = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1"), mvaOpt = cms.string("PWoldDMwLT"), - srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeight'), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -1051,26 +1050,26 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD.clone( +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw.clone( mvaName = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1"), mvaOpt = cms.string("PWnewDMwLT"), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -1081,20 +1080,20 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff40") - -hpsPFTauChargedIsoPtSumdR0376xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff40") + +hpsPFTauChargedIsoPtSumdR03 = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), ApplyDiscriminationByECALIsolation = cms.bool(False), ApplyDiscriminationByTrackerIsolation = cms.bool(True), applySumPtCut = cms.bool(False), @@ -1105,12 +1104,12 @@ isoConeSizeForDeltaBeta = cms.double(0.8), verbosity = cms.int32(0) ) -hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( +hpsPFTauNeutralIsoPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone( ApplyDiscriminationByECALIsolation = cms.bool(True), ApplyDiscriminationByTrackerIsolation = cms.bool(False), verbosity = cms.int32(0) ) -hpsPFTauPUcorrPtSumdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( +hpsPFTauPUcorrPtSumdR03 = hpsPFTauChargedIsoPtSumdR03.clone( ApplyDiscriminationByECALIsolation = cms.bool(False), ApplyDiscriminationByTrackerIsolation = cms.bool(False), applyDeltaBetaCorrection = cms.bool(True), @@ -1118,40 +1117,40 @@ storeRawPUsumPt = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( +hpsPFTauNeutralIsoPtSumWeightdR03 = hpsPFTauChargedIsoPtSumdR03.clone( ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), ApplyDiscriminationByTrackerIsolation = cms.bool(False), UseAllPFCandsForWeights = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauFootprintCorrectiondR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( +hpsPFTauFootprintCorrectiondR03 = hpsPFTauChargedIsoPtSumdR03.clone( ApplyDiscriminationByTrackerIsolation = cms.bool(False), storeRawSumPt = cms.bool(False), storeRawFootprintCorrection = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( +hpsPFTauPhotonPtSumOutsideSignalConedR03 = hpsPFTauChargedIsoPtSumdR03.clone( ApplyDiscriminationByTrackerIsolation = cms.bool(False), storeRawSumPt = cms.bool(False), storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( +hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw.clone( mvaName = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1"), mvaOpt = cms.string("DBoldDMwLT"), - srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSumdR0376xReMiniAOD'), - srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD'), - srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR0376xReMiniAOD'), - srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD'), - srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR0376xReMiniAOD'), + srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSumdR03'), + srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR03'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR03'), + srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR03'), + srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR03'), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT.clone( + PFTauProducer = cms.InputTag('hpsPFTauProducer'), + Prediscriminants = requireDecayMode.clone(), + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -1162,26 +1161,26 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD.clone( +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff40") + +hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw = hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw.clone( mvaName = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1"), mvaOpt = cms.string("PWoldDMwLT"), - srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD'), + srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR03'), verbosity = cms.int32(0) ) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD:category'), +hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT.clone( + toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw'), + key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw:category'), loadMVAfromDB = cms.bool(True), mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_mvaOutput_normalization"), mapping = cms.VPSet( @@ -1192,165 +1191,165 @@ ) ) ) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff40") - -hpsPFTauMVAIsolation2Seq76xReMiniAOD = cms.Sequence( - hpsPFTauChargedIsoPtSum76xReMiniAOD - + hpsPFTauNeutralIsoPtSum76xReMiniAOD - + hpsPFTauPUcorrPtSum76xReMiniAOD - + hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD - + hpsPFTauFootprintCorrection76xReMiniAOD - + hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD - #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD - #+ hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff80") +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff70") +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff60") +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff50") +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT.clone() +hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff40") + +hpsPFTauMVAIsolation2Seq = cms.Sequence( + hpsPFTauChargedIsoPtSum + + hpsPFTauNeutralIsoPtSum + + hpsPFTauPUcorrPtSum + + hpsPFTauNeutralIsoPtSumWeight + + hpsPFTauFootprintCorrection + + hpsPFTauPhotonPtSumOutsideSignalCone + #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT + + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT + #+ hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw + #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT + #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT + + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT # new MVA isolations for Run2 - + hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauChargedIsoPtSumdR0376xReMiniAOD - + hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD - + hpsPFTauPUcorrPtSumdR0376xReMiniAOD - + hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD - + hpsPFTauFootprintCorrectiondR0376xReMiniAOD - + hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD + + hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT + + hpsPFTauChargedIsoPtSumdR03 + + hpsPFTauNeutralIsoPtSumdR03 + + hpsPFTauPUcorrPtSumdR03 + + hpsPFTauNeutralIsoPtSumWeightdR03 + + hpsPFTauFootprintCorrectiondR03 + + hpsPFTauPhotonPtSumOutsideSignalConedR03 + + hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT + + hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw + + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT + + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT ) -produceHPSPFTaus76xReMiniAOD = cms.Sequence( - hpsSelectionDiscriminator76xReMiniAOD - #*hpsTightIsolationCleaner76xReMiniAOD - #*hpsMediumIsolationCleaner76xReMiniAOD - #*hpsLooseIsolationCleaner76xReMiniAOD - #*hpsVLooseIsolationCleaner76xReMiniAOD - *hpsPFTauProducerSansRefs76xReMiniAOD - *hpsPFTauProducer76xReMiniAOD -) - -produceAndDiscriminateHPSPFTaus76xReMiniAOD = cms.Sequence( - produceHPSPFTaus76xReMiniAOD* - hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD* - hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD* - hpsPFTauDiscriminationByDecayModeFinding76xReMiniAOD* # CV: kept for backwards compatibility - hpsPFTauDiscriminationByChargedIsolationSeq76xReMiniAOD* - hpsPFTauDiscriminationByIsolationSeq76xReMiniAOD* - #hpsPFTauDiscriminationByIsolationSeqRhoCorr76xReMiniAOD* - #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr76xReMiniAOD* - hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr76xReMiniAOD* +produceHPSPFTaus = cms.Sequence( + hpsSelectionDiscriminator + #*hpsTightIsolationCleaner + #*hpsMediumIsolationCleaner + #*hpsLooseIsolationCleaner + #*hpsVLooseIsolationCleaner + *hpsPFTauProducerSansRefs + *hpsPFTauProducer +) + +produceAndDiscriminateHPSPFTaus = cms.Sequence( + produceHPSPFTaus* + hpsPFTauDiscriminationByDecayModeFindingNewDMs* + hpsPFTauDiscriminationByDecayModeFindingOldDMs* + hpsPFTauDiscriminationByDecayModeFinding* # CV: kept for backwards compatibility + hpsPFTauDiscriminationByChargedIsolationSeq* + hpsPFTauDiscriminationByIsolationSeq* + #hpsPFTauDiscriminationByIsolationSeqRhoCorr* + #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr* + hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr* - hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr76xReMiniAOD* - - hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits76xReMiniAOD* - hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR0376xReMiniAOD* - hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits76xReMiniAOD* + hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr* + hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr* + hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr* + + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr* + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits* + hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR03* + hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits* - hpsPFTauDiscriminationByLooseElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMediumElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByTightElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByDeadECALElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByLooseMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByMediumMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByTightMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByLooseMuonRejection276xReMiniAOD* - hpsPFTauDiscriminationByMediumMuonRejection276xReMiniAOD* - hpsPFTauDiscriminationByTightMuonRejection276xReMiniAOD* - hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD* - hpsPFTauDiscriminationByTightMuonRejection376xReMiniAOD* - hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD* - - hpsPFTauVertexAndImpactParametersSeq76xReMiniAOD* - - hpsPFTauMVAIsolation2Seq76xReMiniAOD + hpsPFTauDiscriminationByLooseElectronRejection* + hpsPFTauDiscriminationByMediumElectronRejection* + hpsPFTauDiscriminationByTightElectronRejection* + hpsPFTauDiscriminationByMVA5rawElectronRejection* + hpsPFTauDiscriminationByMVA5VLooseElectronRejection* + hpsPFTauDiscriminationByMVA5LooseElectronRejection* + hpsPFTauDiscriminationByMVA5MediumElectronRejection* + hpsPFTauDiscriminationByMVA5TightElectronRejection* + hpsPFTauDiscriminationByMVA5VTightElectronRejection* + hpsPFTauDiscriminationByMVA6rawElectronRejection* + hpsPFTauDiscriminationByMVA6VLooseElectronRejection* + hpsPFTauDiscriminationByMVA6LooseElectronRejection* + hpsPFTauDiscriminationByMVA6MediumElectronRejection* + hpsPFTauDiscriminationByMVA6TightElectronRejection* + hpsPFTauDiscriminationByMVA6VTightElectronRejection* + hpsPFTauDiscriminationByDeadECALElectronRejection* + hpsPFTauDiscriminationByLooseMuonRejection* + hpsPFTauDiscriminationByMediumMuonRejection* + hpsPFTauDiscriminationByTightMuonRejection* + hpsPFTauDiscriminationByLooseMuonRejection2* + hpsPFTauDiscriminationByMediumMuonRejection2* + hpsPFTauDiscriminationByTightMuonRejection2* + hpsPFTauDiscriminationByLooseMuonRejection3* + hpsPFTauDiscriminationByTightMuonRejection3* + hpsPFTauDiscriminationByMVArawMuonRejection* + hpsPFTauDiscriminationByMVALooseMuonRejection* + hpsPFTauDiscriminationByMVAMediumMuonRejection* + hpsPFTauDiscriminationByMVATightMuonRejection* + + hpsPFTauVertexAndImpactParametersSeq* + + hpsPFTauMVAIsolation2Seq ) diff --git a/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py b/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py deleted file mode 100644 index bdaca8c8aee2e..0000000000000 --- a/RecoTauTag/Configuration/python/HPSPFTaus_reminiAOD_cff.py +++ /dev/null @@ -1,1356 +0,0 @@ -import FWCore.ParameterSet.Config as cms -import copy - -''' - -Sequences for HPS taus - -''' - -# Define the discriminators for this tau -from RecoTauTag.RecoTau.PFRecoTauDiscriminationByIsolation_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationByLeadingTrackFinding_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectron_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA5_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronMVA6_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstElectronDeadECAL_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuon2_cfi import * -from RecoTauTag.RecoTau.PFRecoTauDiscriminationAgainstMuonMVA_cfi import * - -from RecoTauTag.RecoTau.RecoTauDiscriminantCutMultiplexer_cfi import * - -# Load helper functions to change the source of the discriminants -from RecoTauTag.RecoTau.TauDiscriminatorTools import * - -# Load PFjet input parameters -from RecoTauTag.RecoTau.PFRecoTauPFJetInputs_cfi import PFRecoTauPFJetInputs - -# deltaBeta correction factor -ak4dBetaCorrection = 0.20 - -# Load MVAs from SQLlite file/prep. DB -from RecoTauTag.Configuration.loadRecoTauTagMVAsFromPrepDB_cfi import * - -# Select those taus that pass the HPS selections -# - pt > 15, mass cuts, tauCone cut -from RecoTauTag.RecoTau.PFRecoTauDiscriminationByHPSSelection_cfi import hpsSelectionDiscriminator, decayMode_1Prong0Pi0, decayMode_1Prong1Pi0, decayMode_1Prong2Pi0, decayMode_2Prong0Pi0, decayMode_2Prong1Pi0, decayMode_3Prong0Pi0 -hpsSelectionDiscriminator76xReMiniAOD = hpsSelectionDiscriminator.clone() - -hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD = hpsSelectionDiscriminator76xReMiniAOD.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - #---------------------------------------------------------------------------- - # CV: disable 3Prong1Pi0 decay mode - decayModes = cms.VPSet( - decayMode_1Prong0Pi0, - decayMode_1Prong1Pi0, - decayMode_1Prong2Pi0, - decayMode_2Prong0Pi0, - decayMode_2Prong1Pi0, - decayMode_3Prong0Pi0 - ) - #---------------------------------------------------------------------------- -) -hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD = hpsSelectionDiscriminator76xReMiniAOD.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - decayModes = cms.VPSet( - decayMode_1Prong0Pi0, - decayMode_1Prong1Pi0, - decayMode_1Prong2Pi0, - decayMode_3Prong0Pi0 - ), - requireTauChargedHadronsToBeChargedPFCands = cms.bool(True) -) -hpsPFTauDiscriminationByDecayModeFinding76xReMiniAOD = hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD.clone() # CV: kept for backwards compatibility - -# Define decay mode prediscriminant -requireDecayMode76xReMiniAOD = cms.PSet( - BooleanOperator = cms.string("and"), - decayMode = cms.PSet( - Producer = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD'), - cut = cms.double(0.5) - ) -) - -#Building the prototype for the Discriminator by Isolation -hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD = pfRecoTauDiscriminationByIsolation.clone( - PFTauProducer = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - ApplyDiscriminationByTrackerIsolation = False, - ApplyDiscriminationByECALIsolation = True, - applyOccupancyCut = True -) -hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.Prediscriminants.preIso = cms.PSet( - Producer = cms.InputTag("hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD"), - cut = cms.double(0.5)) - -# Make an even looser discriminator -hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone( - customOuterCone = cms.double(0.3), - isoConeSizeForDeltaBeta = cms.double(0.3), -) -hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 1.5 -hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 2.0 -hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD") - -hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.8 -hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.8 -hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD") - -hpsPFTauDiscriminationByTightIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 -hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.Prediscriminants.preIso.Producer = cms.InputTag("hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD") - -hpsPFTauDiscriminationByIsolationSeq76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD* - hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD* - hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD* - hpsPFTauDiscriminationByTightIsolation76xReMiniAOD -) - -_isolation_types = ['VLoose', 'Loose', 'Medium', 'Tight'] -# Now build the sequences that apply PU corrections - -# Make Delta Beta corrections (on SumPt quantity) -hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolation76xReMiniAOD.clone( - deltaBetaPUTrackPtCutOverride = cms.double(0.5), - applyDeltaBetaCorrection = True, - isoConeSizeForDeltaBeta = 0.8, - deltaBetaFactor = "%0.4f"%(0.0123/0.1687), - applyOccupancyCut = False, - applySumPtCut = True, -) -hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt - -hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolation76xReMiniAOD.clone( - deltaBetaPUTrackPtCutOverride = cms.double(0.5), - applyDeltaBetaCorrection = True, - isoConeSizeForDeltaBeta = 0.8, - deltaBetaFactor = "%0.4f"%(0.0123/0.1687), - applyOccupancyCut = False, - applySumPtCut = True, -) -hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt - -hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByMediumIsolation76xReMiniAOD.clone( - deltaBetaPUTrackPtCutOverride = cms.double(0.5), - applyDeltaBetaCorrection = True, - isoConeSizeForDeltaBeta = 0.8, - deltaBetaFactor = "%0.4f"%(0.0462/0.1687), - applyOccupancyCut = False, - applySumPtCut = True, -) -hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt - -hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByTightIsolation76xReMiniAOD.clone( - deltaBetaPUTrackPtCutOverride = cms.double(0.5), - applyDeltaBetaCorrection = True, - isoConeSizeForDeltaBeta = 0.8, - deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), - applyOccupancyCut = False, - applySumPtCut = True, -) -hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.maximumSumPtCut = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt - -hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD -) - -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationDBSumPtCorr76xReMiniAOD.clone( - ApplyDiscriminationByTrackerIsolation = True, - ApplyDiscriminationByECALIsolation = True, - deltaBetaFactor = "%0.4f"%((0.09/0.25)*(ak4dBetaCorrection)), - applyOccupancyCut = False, - applySumPtCut = True, - maximumSumPtCut = 3.5, - Prediscriminants = requireDecayMode76xReMiniAOD.clone() -) -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 - -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseIsolationDBSumPtCorr76xReMiniAOD.clone( - ApplyDiscriminationByTrackerIsolation = True, - ApplyDiscriminationByECALIsolation = True, - deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), - applyOccupancyCut = False, - applySumPtCut = True, - maximumSumPtCut = 2.5, - Prediscriminants = requireDecayMode76xReMiniAOD.clone() -) -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 - -hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( - applySumPtCut = False, - storeRawSumPt = cms.bool(True) -) - -hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( - applySumPtCut = False, - ApplyDiscriminationByECALIsolation = False, - storeRawSumPt = cms.bool(True) -) - -hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( - applySumPtCut = False, - ApplyDiscriminationByTrackerIsolation = False, - storeRawSumPt = cms.bool(True) -) - -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByMediumIsolationDBSumPtCorr76xReMiniAOD.clone( - ApplyDiscriminationByTrackerIsolation = True, - ApplyDiscriminationByECALIsolation = True, - deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), - applyOccupancyCut = False, - applySumPtCut = True, - maximumSumPtCut = 1.5, - Prediscriminants = requireDecayMode76xReMiniAOD.clone() -) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 - -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD = hpsPFTauDiscriminationByTightIsolationDBSumPtCorr76xReMiniAOD.clone( - ApplyDiscriminationByTrackerIsolation = True, - ApplyDiscriminationByECALIsolation = True, - deltaBetaFactor = "%0.4f"%(ak4dBetaCorrection), - applyOccupancyCut = False, - applySumPtCut = True, - maximumSumPtCut = 0.8, - Prediscriminants = requireDecayMode76xReMiniAOD.clone() -) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackPt = 0.5 -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.qualityCuts.isolationQualityCuts.minGammaEt = 0.5 - -hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD -) - -#Charge isolation based on combined isolation -hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByVLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( - ApplyDiscriminationByECALIsolation = False -) - -hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( - ApplyDiscriminationByECALIsolation = False -) - -hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( - ApplyDiscriminationByECALIsolation = False -) -hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.clone( - ApplyDiscriminationByECALIsolation = False -) - -hpsPFTauDiscriminationByChargedIsolationSeq76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByVLooseChargedIsolation76xReMiniAOD* - hpsPFTauDiscriminationByLooseChargedIsolation76xReMiniAOD* - hpsPFTauDiscriminationByMediumChargedIsolation76xReMiniAOD* - hpsPFTauDiscriminationByTightChargedIsolation76xReMiniAOD -) - -#copying discriminator against electrons and muons -hpsPFTauDiscriminationByLooseElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = noPrediscriminants, - PFElectronMVA_maxValue = cms.double(0.6) -) -hpsPFTauDiscriminationByMediumElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = noPrediscriminants, - ApplyCut_EcalCrackCut = cms.bool(True) -) -hpsPFTauDiscriminationByTightElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectron.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = noPrediscriminants, - ApplyCut_EcalCrackCut = cms.bool(True), - ApplyCut_BremCombined = cms.bool(True) -) - -hpsPFTauDiscriminationByLooseMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = noPrediscriminants -) -hpsPFTauDiscriminationByMediumMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = noPrediscriminants, - discriminatorOption = cms.string('noAllArbitrated') -) -hpsPFTauDiscriminationByTightMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuon.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = noPrediscriminants, - discriminatorOption = cms.string('noAllArbitratedWithHOP') -) - -hpsPFTauDiscriminationByLooseMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = noPrediscriminants -) -hpsPFTauDiscriminationByMediumMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = noPrediscriminants, - discriminatorOption = cms.string('medium') -) -hpsPFTauDiscriminationByTightMuonRejection276xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = noPrediscriminants, - discriminatorOption = cms.string('tight') -) - -hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD = pfRecoTauDiscriminationAgainstMuon2.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = noPrediscriminants, - discriminatorOption = cms.string('custom'), - maxNumberOfMatches = cms.int32(1), - doCaloMuonVeto = cms.bool(True), - maxNumberOfHitsLast2Stations = cms.int32(-1) -) -hpsPFTauDiscriminationByTightMuonRejection376xReMiniAOD = hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD.clone( - maxNumberOfHitsLast2Stations = cms.int32(0) -) - -hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstMuonMVA.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - loadMVAfromDB = cms.bool(True), - returnMVA = cms.bool(True), - mvaName = cms.string("RecoTauTag_againstMuonMVAv1") -) -##hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD.clone( -## returnMVA = cms.bool(False), -## mvaMin = cms.double(0.75) -##) -##hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone( -## mvaMin = cms.double(0.950) -##) -##hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone( -## mvaMin = cms.double(0.975) -##) -hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_againstMuonMVAv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_5"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone() -hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff99_0") -hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD = hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD.clone() -hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_againstMuonMVAv1_WPeff98_0") - -hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronMVA5.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - loadMVAfromDB = cms.bool(True), - mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL"), - mvaName_NoEleMatch_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL"), - mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL"), - mvaName_NoEleMatch_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL"), - mvaName_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL"), - mvaName_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL"), - mvaName_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL"), - mvaName_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL"), - mvaName_NoEleMatch_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC"), - mvaName_NoEleMatch_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC"), - mvaName_NoEleMatch_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC"), - mvaName_NoEleMatch_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC"), - mvaName_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC"), - mvaName_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC"), - mvaName_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC"), - mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC") -) - -hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD:category'), - loadMVAfromDB = cms.bool(True), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(1), # minMVANoEleMatchWOgWgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(3), # minMVANoEleMatchWgWgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(4), # minMVAWOgWOgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(5), # minMVAWOgWgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(6), # minMVAWgWOgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(7), # minMVAWgWgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(9), # minMVANoEleMatchWOgWgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(11), # minMVANoEleMatchWgWgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(12), # minMVAWOgWOgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(13), # minMVAWOgWgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(14), # minMVAWgWOgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(15), # minMVAWgWgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff99"), - variable = cms.string("pt") - ) - ) -) - -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff96") -hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff96") - -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff91") -hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff91") - -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff85") -hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff85") - -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_BL_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[8].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[9].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_woGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[10].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[11].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_NoEleMatch_wGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[12].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[13].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_woGwGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[14].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwoGSF_EC_WPeff79") -hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD.mapping[15].cut = cms.string("RecoTauTag_antiElectronMVA5v1_gbr_wGwGSF_EC_WPeff79") - -hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronMVA6.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - loadMVAfromDB = cms.bool(True), - mvaName_NoEleMatch_woGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL"), - mvaName_NoEleMatch_wGwoGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL"), - mvaName_woGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL"), - mvaName_wGwGSF_BL = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL"), - mvaName_NoEleMatch_woGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC"), - mvaName_NoEleMatch_wGwoGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC"), - mvaName_woGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC"), - mvaName_wGwGSF_EC = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC") -) - -hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD = recoTauDiscriminantCutMultiplexer.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD:category'), - loadMVAfromDB = cms.bool(True), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), # minMVANoEleMatchWOgWOgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(2), # minMVANoEleMatchWgWOgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(5), # minMVAWOgWgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(7), # minMVAWgWgsfBL - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(8), # minMVANoEleMatchWOgWOgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(10), # minMVANoEleMatchWgWOgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(13), # minMVAWOgWgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff99"), - variable = cms.string("pt") - ), - cms.PSet( - category = cms.uint32(15), # minMVAWgWgsfEC - cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff99"), - variable = cms.string("pt") - ) - ) -) - -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff96") -hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff96") - -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff91") -hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff91") - -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff85") -hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff85") - -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD = copy.deepcopy(hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD) -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[1].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[2].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[3].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_BL_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[4].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_woGwoGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[5].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_NoEleMatch_wGwoGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[6].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_woGwGSF_EC_WPEff79") -hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD.mapping[7].cut = cms.string("RecoTauTag_antiElectronMVA6v1_gbr_wGwGSF_EC_WPEff79") - -hpsPFTauDiscriminationByDeadECALElectronRejection76xReMiniAOD = pfRecoTauDiscriminationAgainstElectronDeadECAL.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone() -) - -#Define new sequence that is using smaller number on hits cut -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr76xReMiniAOD.clone() - -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.qualityCuts.isolationQualityCuts.minTrackHits = cms.uint32(3) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) - -hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( - applySumPtCut = False, - storeRawSumPt = cms.bool(True) -) - -hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* - hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* - hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD* - hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD -) - -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone() - -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 -hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 -hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.deltaBetaFactor = cms.string('0.0720') # 0.2*(0.3/0.5)^2 -hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD.customOuterCone = cms.double(0.3) - -hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR0376xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD* - hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD* - hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR0376xReMiniAOD -) - -hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( - ApplyDiscriminationByECALIsolation = cms.bool(False), - applyDeltaBetaCorrection = cms.bool(False), - ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), - UseAllPFCandsForWeights = cms.bool(True), - applyFootprintCorrection = cms.bool(True), - applyPhotonPtSumOutsideSignalConeCut = cms.bool(True) -) - -hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( - maximumSumPtCut = hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.maximumSumPtCut -) - -hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( - maximumSumPtCut = hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.maximumSumPtCut -) - -hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( - applySumPtCut = cms.bool(False) -) - -hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits76xReMiniAOD = hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD.clone( - Prediscriminants = cms.PSet( - BooleanOperator = cms.string("and"), - decayMode = cms.PSet( - Producer = cms.InputTag('hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD'), - cut = cms.double(0.5) - ) - ), - applySumPtCut = cms.bool(False), - storeRawSumPt = cms.bool(True) -) - -hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits76xReMiniAOD = cms.Sequence( - hpsPFTauDiscriminationByLoosePileupWeightedIsolation3Hits76xReMiniAOD* - hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits76xReMiniAOD* - hpsPFTauDiscriminationByTightPileupWeightedIsolation3Hits76xReMiniAOD* - hpsPFTauDiscriminationByPhotonPtSumOutsideSignalCone76xReMiniAOD* - hpsPFTauDiscriminationByRawPileupWeightedIsolation3Hits76xReMiniAOD -) - -# Define the HPS selection discriminator used in cleaning -hpsSelectionDiscriminator76xReMiniAOD.PFTauProducer = cms.InputTag("combinatoricRecoTaus76xReMiniAOD") -#---------------------------------------------------------------------------- -# CV: disable 3Prong1Pi0 decay mode -hpsSelectionDiscriminator76xReMiniAOD.decayModes = cms.VPSet( - decayMode_1Prong0Pi0, - decayMode_1Prong1Pi0, - decayMode_1Prong2Pi0, - decayMode_2Prong0Pi0, - decayMode_2Prong1Pi0, - decayMode_3Prong0Pi0 -) -#---------------------------------------------------------------------------- - -from RecoTauTag.RecoTau.RecoTauCleaner_cfi import RecoTauCleaner -hpsPFTauProducerSansRefs76xReMiniAOD = RecoTauCleaner.clone( - src = cms.InputTag("combinatoricRecoTaus76xReMiniAOD") -) -hpsPFTauProducerSansRefs76xReMiniAOD.cleaners[1].src = cms.InputTag("hpsSelectionDiscriminator76xReMiniAOD") - -from RecoTauTag.RecoTau.RecoTauPiZeroUnembedder_cfi import RecoTauPiZeroUnembedder -hpsPFTauProducer76xReMiniAOD = RecoTauPiZeroUnembedder.clone( - src = cms.InputTag("hpsPFTauProducerSansRefs76xReMiniAOD") -) - -from RecoTauTag.RecoTau.PFTauPrimaryVertexProducer_cfi import * -from RecoTauTag.RecoTau.PFTauSecondaryVertexProducer_cfi import * -from RecoTauTag.RecoTau.PFTauTransverseImpactParameters_cfi import * -hpsPFTauPrimaryVertexProducer76xReMiniAOD = PFTauPrimaryVertexProducer.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), - ElectronTag = cms.InputTag(""), - MuonTag = cms.InputTag(""), - PVTag = cms.InputTag("offlinePrimaryVertices"), - beamSpot = cms.InputTag("offlineBeamSpot"), - TrackCollectionTag = cms.InputTag("generalTracks"), - Algorithm = cms.int32(1), - useBeamSpot = cms.bool(True), - RemoveMuonTracks = cms.bool(False), - RemoveElectronTracks = cms.bool(False), - useSelectedTaus = cms.bool(False), - discriminators = cms.VPSet( - cms.PSet( - discriminator = cms.InputTag('hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD'), - selectionCut = cms.double(0.5) - ) - ), - cut = cms.string("pt > 18.0 & abs(eta) < 2.4") -) - -hpsPFTauSecondaryVertexProducer76xReMiniAOD = PFTauSecondaryVertexProducer.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD") -) -hpsPFTauTransverseImpactParameters76xReMiniAOD = PFTauTransverseImpactParameters.clone( - PFTauTag = cms.InputTag("hpsPFTauProducer76xReMiniAOD"), - PFTauPVATag = cms.InputTag("hpsPFTauPrimaryVertexProducer76xReMiniAOD"), - PFTauSVATag = cms.InputTag("hpsPFTauSecondaryVertexProducer76xReMiniAOD"), - useFullCalculation = cms.bool(True) -) -hpsPFTauVertexAndImpactParametersSeq76xReMiniAOD = cms.Sequence( - hpsPFTauPrimaryVertexProducer76xReMiniAOD* - hpsPFTauSecondaryVertexProducer76xReMiniAOD* - hpsPFTauTransverseImpactParameters76xReMiniAOD -) - -from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolation2_cff import * -hpsPFTauChargedIsoPtSum76xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - ApplyDiscriminationByECALIsolation = cms.bool(False), - ApplyDiscriminationByTrackerIsolation = cms.bool(True), - applySumPtCut = cms.bool(False), - applyDeltaBetaCorrection = cms.bool(False), - storeRawSumPt = cms.bool(True), - storeRawPUsumPt = cms.bool(False), - customOuterCone = PFRecoTauPFJetInputs.isolationConeSize, - isoConeSizeForDeltaBeta = cms.double(0.8), - verbosity = cms.int32(0) -) -hpsPFTauNeutralIsoPtSum76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( - ApplyDiscriminationByECALIsolation = cms.bool(True), - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - verbosity = cms.int32(0) -) -hpsPFTauPUcorrPtSum76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( - ApplyDiscriminationByECALIsolation = cms.bool(False), - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - applyDeltaBetaCorrection = cms.bool(True), - storeRawSumPt = cms.bool(False), - storeRawPUsumPt = cms.bool(True), - verbosity = cms.int32(0) -) -hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( - ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - UseAllPFCandsForWeights = cms.bool(True), - verbosity = cms.int32(0) -) -hpsPFTauFootprintCorrection76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - storeRawSumPt = cms.bool(False), - storeRawFootprintCorrection = cms.bool(True), - verbosity = cms.int32(0) -) -hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD = hpsPFTauChargedIsoPtSum76xReMiniAOD.clone( - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - storeRawSumPt = cms.bool(False), - storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), - verbosity = cms.int32(0) -) - -hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD = discriminationByIsolationMVA2raw.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - loadMVAfromDB = cms.bool(True), - mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1"), - mvaOpt = cms.string("oldDMwoLT"), - srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters76xReMiniAOD'), - srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum76xReMiniAOD'), - srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum76xReMiniAOD'), - srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum76xReMiniAOD'), - verbosity = cms.int32(0) -) -hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD = discriminationByIsolationMVA2VLoose.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwoLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( - mvaName = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1"), - mvaOpt = cms.string("oldDMwLT"), - verbosity = cms.int32(0) -) -hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD:category'), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAoldDMwLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( - mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1"), - mvaOpt = cms.string("newDMwoLT"), - verbosity = cms.int32(0) -) -hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD:category'), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff90"), - variable = cms.string("pt") - ) - ), - verbosity = cms.int32(0) -) -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwoLTv1_WPEff40") -hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD.clone( - mvaName = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1"), - mvaOpt = cms.string("newDMwLT"), - verbosity = cms.int32(0) -) -hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD:category'), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAnewDMwLTv1_WPEff40") - -#Define new Run2 MVA isolations -from RecoTauTag.RecoTau.PFRecoTauDiscriminationByMVAIsolationRun2_cff import * -hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD = discriminationByIsolationMVArun2v1raw.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - loadMVAfromDB = cms.bool(True), - mvaName = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1"), - mvaOpt = cms.string("DBoldDMwLT"), - srcTauTransverseImpactParameters = cms.InputTag('hpsPFTauTransverseImpactParameters76xReMiniAOD'), - srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSum76xReMiniAOD'), - srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSum76xReMiniAOD'), - srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSum76xReMiniAOD'), - srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD'), - srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrection76xReMiniAOD'), - verbosity = cms.int32(0) -) - -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = discriminationByIsolationMVArun2v1VLoose.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBoldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( - mvaName = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1"), - mvaOpt = cms.string("DBnewDMwLT"), - verbosity = cms.int32(0) -) - -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBnewDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( - mvaName = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1"), - mvaOpt = cms.string("PWoldDMwLT"), - srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD'), - verbosity = cms.int32(0) -) - -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWoldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD.clone( - mvaName = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1"), - mvaOpt = cms.string("PWnewDMwLT"), - verbosity = cms.int32(0) -) - -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWnewDMwLTv1_WPEff40") - -hpsPFTauChargedIsoPtSumdR0376xReMiniAOD = hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits76xReMiniAOD.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - ApplyDiscriminationByECALIsolation = cms.bool(False), - ApplyDiscriminationByTrackerIsolation = cms.bool(True), - applySumPtCut = cms.bool(False), - applyDeltaBetaCorrection = cms.bool(False), - storeRawSumPt = cms.bool(True), - storeRawPUsumPt = cms.bool(False), - customOuterCone = cms.double(0.3), - isoConeSizeForDeltaBeta = cms.double(0.8), - verbosity = cms.int32(0) -) -hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( - ApplyDiscriminationByECALIsolation = cms.bool(True), - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - verbosity = cms.int32(0) -) -hpsPFTauPUcorrPtSumdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( - ApplyDiscriminationByECALIsolation = cms.bool(False), - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - applyDeltaBetaCorrection = cms.bool(True), - storeRawSumPt = cms.bool(False), - storeRawPUsumPt = cms.bool(True), - verbosity = cms.int32(0) -) -hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( - ApplyDiscriminationByWeightedECALIsolation = cms.bool(True), - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - UseAllPFCandsForWeights = cms.bool(True), - verbosity = cms.int32(0) -) -hpsPFTauFootprintCorrectiondR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - storeRawSumPt = cms.bool(False), - storeRawFootprintCorrection = cms.bool(True), - verbosity = cms.int32(0) -) -hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD = hpsPFTauChargedIsoPtSumdR0376xReMiniAOD.clone( - ApplyDiscriminationByTrackerIsolation = cms.bool(False), - storeRawSumPt = cms.bool(False), - storeRawPhotonSumPt_outsideSignalCone = cms.bool(True), - verbosity = cms.int32(0) -) - -hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD.clone( - mvaName = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1"), - mvaOpt = cms.string("DBoldDMwLT"), - srcChargedIsoPtSum = cms.InputTag('hpsPFTauChargedIsoPtSumdR0376xReMiniAOD'), - srcNeutralIsoPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD'), - srcPUcorrPtSum = cms.InputTag('hpsPFTauPUcorrPtSumdR0376xReMiniAOD'), - srcPhotonPtSumOutsideSignalCone = cms.InputTag('hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD'), - srcFootprintCorrection = cms.InputTag('hpsPFTauFootprintCorrectiondR0376xReMiniAOD'), - verbosity = cms.int32(0) -) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD.clone( - PFTauProducer = cms.InputTag('hpsPFTauProducer76xReMiniAOD'), - Prediscriminants = requireDecayMode76xReMiniAOD.clone(), - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVADBdR03oldDMwLTv1_WPEff40") - -hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD = hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD.clone( - mvaName = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1"), - mvaOpt = cms.string("PWoldDMwLT"), - srcPUcorrPtSum = cms.InputTag('hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD'), - verbosity = cms.int32(0) -) -hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD.clone( - toMultiplex = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD'), - key = cms.InputTag('hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD:category'), - loadMVAfromDB = cms.bool(True), - mvaOutput_normalization = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_mvaOutput_normalization"), - mapping = cms.VPSet( - cms.PSet( - category = cms.uint32(0), - cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff90"), - variable = cms.string("pt") - ) - ) -) -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff80") -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff70") -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff60") -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff50") -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD = hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.clone() -hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD.mapping[0].cut = cms.string("RecoTauTag_tauIdMVAPWdR03oldDMwLTv1_WPEff40") - -hpsPFTauMVAIsolation2Seq76xReMiniAOD = cms.Sequence( - hpsPFTauChargedIsoPtSum76xReMiniAOD - + hpsPFTauNeutralIsoPtSum76xReMiniAOD - + hpsPFTauPUcorrPtSum76xReMiniAOD - + hpsPFTauNeutralIsoPtSumWeight76xReMiniAOD - + hpsPFTauFootprintCorrection76xReMiniAOD - + hpsPFTauPhotonPtSumOutsideSignalCone76xReMiniAOD - #+ hpsPFTauDiscriminationByIsolationMVA3oldDMwoLTraw76xReMiniAOD - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVA3oldDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT76xReMiniAOD - #+ hpsPFTauDiscriminationByIsolationMVA3newDMwoLTraw76xReMiniAOD - #+ hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT76xReMiniAOD - #+ hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVA3newDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVA3newDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVA3newDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwLT76xReMiniAOD - # new MVA isolations for Run2 - + hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT76xReMiniAOD - + hpsPFTauChargedIsoPtSumdR0376xReMiniAOD - + hpsPFTauNeutralIsoPtSumdR0376xReMiniAOD - + hpsPFTauPUcorrPtSumdR0376xReMiniAOD - + hpsPFTauNeutralIsoPtSumWeightdR0376xReMiniAOD - + hpsPFTauFootprintCorrectiondR0376xReMiniAOD - + hpsPFTauPhotonPtSumOutsideSignalConedR0376xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw76xReMiniAOD - + hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD - + hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT76xReMiniAOD -) - -produceHPSPFTaus76xReMiniAOD = cms.Sequence( - hpsSelectionDiscriminator76xReMiniAOD - #*hpsTightIsolationCleaner76xReMiniAOD - #*hpsMediumIsolationCleaner76xReMiniAOD - #*hpsLooseIsolationCleaner76xReMiniAOD - #*hpsVLooseIsolationCleaner76xReMiniAOD - *hpsPFTauProducerSansRefs76xReMiniAOD - *hpsPFTauProducer76xReMiniAOD -) - -produceAndDiscriminateHPSPFTaus76xReMiniAOD = cms.Sequence( - produceHPSPFTaus76xReMiniAOD* - hpsPFTauDiscriminationByDecayModeFindingNewDMs76xReMiniAOD* - hpsPFTauDiscriminationByDecayModeFindingOldDMs76xReMiniAOD* - hpsPFTauDiscriminationByDecayModeFinding76xReMiniAOD* # CV: kept for backwards compatibility - hpsPFTauDiscriminationByChargedIsolationSeq76xReMiniAOD* - hpsPFTauDiscriminationByIsolationSeq76xReMiniAOD* - #hpsPFTauDiscriminationByIsolationSeqRhoCorr76xReMiniAOD* - #hpsPFTauDiscriminationByIsolationSeqCustomRhoCorr76xReMiniAOD* - hpsPFTauDiscriminationByIsolationSeqDBSumPtCorr76xReMiniAOD* - - hpsPFTauDiscriminationByRawCombinedIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByRawChargedIsolationDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByRawGammaIsolationDBSumPtCorr76xReMiniAOD* - - hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr76xReMiniAOD* - hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3Hits76xReMiniAOD* - hpsPFTauDiscriminationByCombinedIsolationSeqDBSumPtCorr3HitsdR0376xReMiniAOD* - hpsPFTauDiscriminationByPileupWeightedIsolationSeq3Hits76xReMiniAOD* - - hpsPFTauDiscriminationByLooseElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMediumElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByTightElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5rawElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5VLooseElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5LooseElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5MediumElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5TightElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA5VTightElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6rawElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6VLooseElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6LooseElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6MediumElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6TightElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVA6VTightElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByDeadECALElectronRejection76xReMiniAOD* - hpsPFTauDiscriminationByLooseMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByMediumMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByTightMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByLooseMuonRejection276xReMiniAOD* - hpsPFTauDiscriminationByMediumMuonRejection276xReMiniAOD* - hpsPFTauDiscriminationByTightMuonRejection276xReMiniAOD* - hpsPFTauDiscriminationByLooseMuonRejection376xReMiniAOD* - hpsPFTauDiscriminationByTightMuonRejection376xReMiniAOD* - hpsPFTauDiscriminationByMVArawMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVALooseMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVAMediumMuonRejection76xReMiniAOD* - hpsPFTauDiscriminationByMVATightMuonRejection76xReMiniAOD* - - hpsPFTauVertexAndImpactParametersSeq76xReMiniAOD* - - hpsPFTauMVAIsolation2Seq76xReMiniAOD -) - - diff --git a/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py b/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py index 01aec3a84ec44..78e2808b7170c 100644 --- a/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py +++ b/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py @@ -19,18 +19,18 @@ # Collection PFCandidates from a DR=0.8 cone about the jet axis and make new # faux jets with this collection from RecoTauTag.RecoTau.RecoTauJetRegionProducer_cfi import RecoTauJetRegionProducer -recoTauAK4PFJets08Region76xReMiniAOD = RecoTauJetRegionProducer.clone( +recoTauAK4PFJets08Region = RecoTauJetRegionProducer.clone( src = PFRecoTauPFJetInputs.inputJetCollection ) # Reconstruct the pi zeros in our pre-selected jets. from RecoTauTag.RecoTau.RecoTauPiZeroProducer_cfi import ak4PFJetsLegacyHPSPiZeros -ak4PFJetsLegacyHPSPiZeros76xReMiniAOD = ak4PFJetsLegacyHPSPiZeros.clone() -ak4PFJetsLegacyHPSPiZeros76xReMiniAOD.jetSrc = PFRecoTauPFJetInputs.inputJetCollection +ak4PFJetsLegacyHPSPiZeros = ak4PFJetsLegacyHPSPiZeros.clone() +ak4PFJetsLegacyHPSPiZeros.jetSrc = PFRecoTauPFJetInputs.inputJetCollection # import charged hadrons from RecoTauTag.RecoTau.PFRecoTauChargedHadronProducer_cfi import ak4PFJetsRecoTauChargedHadrons -ak4PFJetsRecoTauChargedHadrons76xReMiniAOD = ak4PFJetsRecoTauChargedHadrons.clone() +ak4PFJetsRecoTauChargedHadrons = ak4PFJetsRecoTauChargedHadrons.clone() #------------------------------------------------------------------------------- #------------------ Produce combinatoric base taus------------------------------ @@ -40,19 +40,19 @@ # We split it into different collections for each different decay mode. from RecoTauTag.RecoTau.RecoTauCombinatoricProducer_cfi import combinatoricRecoTaus, combinatoricModifierConfigs -combinatoricRecoTaus76xReMiniAOD = combinatoricRecoTaus.clone() -combinatoricRecoTaus76xReMiniAOD.modifiers = cms.VPSet(combinatoricModifierConfigs) -combinatoricRecoTaus76xReMiniAOD.jetRegionSrc = cms.InputTag("recoTauAK4PFJets08Region76xReMiniAOD") -combinatoricRecoTaus76xReMiniAOD.jetSrc = PFRecoTauPFJetInputs.inputJetCollection +combinatoricRecoTaus = combinatoricRecoTaus.clone() +combinatoricRecoTaus.modifiers = cms.VPSet(combinatoricModifierConfigs) +combinatoricRecoTaus.jetRegionSrc = cms.InputTag("recoTauAK4PFJets08Region") +combinatoricRecoTaus.jetSrc = PFRecoTauPFJetInputs.inputJetCollection #-------------------------------------------------------------------------------- # CV: disable reconstruction of 3Prong1Pi0 tau candidates -combinatoricRecoTaus76xReMiniAOD.builders[0].decayModes.remove(combinatoricRecoTaus76xReMiniAOD.builders[0].decayModes[6]) +combinatoricRecoTaus.builders[0].decayModes.remove(combinatoricRecoTaus.builders[0].decayModes[6]) #-------------------------------------------------------------------------------- #-------------------------------------------------------------------------------- # CV: set mass of tau candidates reconstructed in 1Prong0pi0 decay mode to charged pion mass -combinatoricRecoTaus76xReMiniAOD.modifiers.append(cms.PSet( +combinatoricRecoTaus.modifiers.append(cms.PSet( name = cms.string("tau_mass"), plugin = cms.string("PFRecoTauMassPlugin"), verbosity = cms.int32(0) @@ -65,50 +65,50 @@ from RecoTauTag.Configuration.HPSPFTaus_reminiAOD_cff import * -combinatoricRecoTaus76xReMiniAOD.chargedHadronSrc = cms.InputTag("ak4PFJetsRecoTauChargedHadrons76xReMiniAOD") -combinatoricRecoTaus76xReMiniAOD.piZeroSrc = cms.InputTag("ak4PFJetsLegacyHPSPiZeros76xReMiniAOD") +combinatoricRecoTaus.chargedHadronSrc = cms.InputTag("ak4PFJetsRecoTauChargedHadrons") +combinatoricRecoTaus.piZeroSrc = cms.InputTag("ak4PFJetsLegacyHPSPiZeros") #------------------------------------------------------------------------------- #------------------ PFTauTagInfo workaround ------------------------------------ #------------------------------------------------------------------------------- # Build the PFTauTagInfos separately, then relink them into the taus. from RecoTauTag.RecoTau.PFRecoTauTagInfoProducer_cfi import pfRecoTauTagInfoProducer -pfRecoTauTagInfoProducer76xReMiniAOD = pfRecoTauTagInfoProducer.clone() -pfRecoTauTagInfoProducer76xReMiniAOD.PFJetTracksAssociatorProducer = cms.InputTag("ak4PFJetTracksAssociatorAtVertex76xReMiniAOD") +pfRecoTauTagInfoProducer = pfRecoTauTagInfoProducer.clone() +pfRecoTauTagInfoProducer.PFJetTracksAssociatorProducer = cms.InputTag("ak4PFJetTracksAssociatorAtVertex") from RecoJets.JetAssociationProducers.ak4JTA_cff import ak4JetTracksAssociatorAtVertexPF -ak4PFJetTracksAssociatorAtVertex76xReMiniAOD = ak4JetTracksAssociatorAtVertexPF.clone() -ak4PFJetTracksAssociatorAtVertex76xReMiniAOD.jets = PFRecoTauPFJetInputs.inputJetCollection -tautagInfoModifer76xReMiniAOD = cms.PSet( +ak4PFJetTracksAssociatorAtVertex = ak4JetTracksAssociatorAtVertexPF.clone() +ak4PFJetTracksAssociatorAtVertex.jets = PFRecoTauPFJetInputs.inputJetCollection +tautagInfoModifer = cms.PSet( name = cms.string("TTIworkaround"), plugin = cms.string("RecoTauTagInfoWorkaroundModifer"), - pfTauTagInfoSrc = cms.InputTag("pfRecoTauTagInfoProducer76xReMiniAOD"), + pfTauTagInfoSrc = cms.InputTag("pfRecoTauTagInfoProducer"), ) -combinatoricRecoTaus76xReMiniAOD.modifiers.append(tautagInfoModifer76xReMiniAOD) +combinatoricRecoTaus.modifiers.append(tautagInfoModifer) -recoTauPileUpVertices76xReMiniAOD = cms.EDFilter("RecoTauPileUpVertexSelector", +recoTauPileUpVertices = cms.EDFilter("RecoTauPileUpVertexSelector", src = cms.InputTag("offlinePrimaryVertices"), minTrackSumPt = cms.double(5), filter = cms.bool(False), ) -recoTauCommonSequence76xReMiniAOD = cms.Sequence( - ak4PFJetTracksAssociatorAtVertex76xReMiniAOD * - recoTauAK4PFJets08Region76xReMiniAOD * - recoTauPileUpVertices76xReMiniAOD * - pfRecoTauTagInfoProducer76xReMiniAOD +recoTauCommonSequence = cms.Sequence( + ak4PFJetTracksAssociatorAtVertex * + recoTauAK4PFJets08Region * + recoTauPileUpVertices * + pfRecoTauTagInfoProducer ) # Produce only classic HPS taus -recoTauClassicHPSSequence76xReMiniAOD = cms.Sequence( - ak4PFJetsLegacyHPSPiZeros76xReMiniAOD * - ak4PFJetsRecoTauChargedHadrons76xReMiniAOD * - combinatoricRecoTaus76xReMiniAOD * - produceAndDiscriminateHPSPFTaus76xReMiniAOD +recoTauClassicHPSSequence = cms.Sequence( + ak4PFJetsLegacyHPSPiZeros * + ak4PFJetsRecoTauChargedHadrons * + combinatoricRecoTaus * + produceAndDiscriminateHPSPFTaus ) -PFTau76xReMiniAOD = cms.Sequence( - recoTauCommonSequence76xReMiniAOD * - recoTauClassicHPSSequence76xReMiniAOD +PFTau = cms.Sequence( + recoTauCommonSequence * + recoTauClassicHPSSequence ) diff --git a/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py b/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py deleted file mode 100644 index 01aec3a84ec44..0000000000000 --- a/RecoTauTag/Configuration/python/RecoPFTauTag_reminiAOD_cff.py +++ /dev/null @@ -1,114 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from RecoTauTag.RecoTau.PFRecoTauPFJetInputs_cfi import PFRecoTauPFJetInputs -# to be able to run PFTau sequence standalone on AOD -from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import TransientTrackBuilderESProducer - -#------------------------------------------------------------------------------- -#------------------ Jet Production and Preselection----------------------------- -#------------------------------------------------------------------------------- -# Apply a base selection to the jets. The acceptance selection takes only jets -# with pt > 5 and abs(eta) < 2.5. The preselection selects jets that have at -# least one constituent with pt > 5. This cut should be 100% efficient w.r.t a -# lead pion selection. -# -# After the basic preselection has been applied to the jets, the pizeros inside -# the jet are reconstructed. -#------------------------------------------------------------------------------- - -# Collection PFCandidates from a DR=0.8 cone about the jet axis and make new -# faux jets with this collection -from RecoTauTag.RecoTau.RecoTauJetRegionProducer_cfi import RecoTauJetRegionProducer -recoTauAK4PFJets08Region76xReMiniAOD = RecoTauJetRegionProducer.clone( - src = PFRecoTauPFJetInputs.inputJetCollection -) - -# Reconstruct the pi zeros in our pre-selected jets. -from RecoTauTag.RecoTau.RecoTauPiZeroProducer_cfi import ak4PFJetsLegacyHPSPiZeros -ak4PFJetsLegacyHPSPiZeros76xReMiniAOD = ak4PFJetsLegacyHPSPiZeros.clone() -ak4PFJetsLegacyHPSPiZeros76xReMiniAOD.jetSrc = PFRecoTauPFJetInputs.inputJetCollection - -# import charged hadrons -from RecoTauTag.RecoTau.PFRecoTauChargedHadronProducer_cfi import ak4PFJetsRecoTauChargedHadrons -ak4PFJetsRecoTauChargedHadrons76xReMiniAOD = ak4PFJetsRecoTauChargedHadrons.clone() - -#------------------------------------------------------------------------------- -#------------------ Produce combinatoric base taus------------------------------ -#------------------------------------------------------------------------------- -# These jets form the basis of the HPS & TaNC taus. There are many taus -# produced for each jet, which are cleaned by the respective algorithms. -# We split it into different collections for each different decay mode. - -from RecoTauTag.RecoTau.RecoTauCombinatoricProducer_cfi import combinatoricRecoTaus, combinatoricModifierConfigs -combinatoricRecoTaus76xReMiniAOD = combinatoricRecoTaus.clone() -combinatoricRecoTaus76xReMiniAOD.modifiers = cms.VPSet(combinatoricModifierConfigs) -combinatoricRecoTaus76xReMiniAOD.jetRegionSrc = cms.InputTag("recoTauAK4PFJets08Region76xReMiniAOD") -combinatoricRecoTaus76xReMiniAOD.jetSrc = PFRecoTauPFJetInputs.inputJetCollection - -#-------------------------------------------------------------------------------- -# CV: disable reconstruction of 3Prong1Pi0 tau candidates -combinatoricRecoTaus76xReMiniAOD.builders[0].decayModes.remove(combinatoricRecoTaus76xReMiniAOD.builders[0].decayModes[6]) -#-------------------------------------------------------------------------------- - -#-------------------------------------------------------------------------------- -# CV: set mass of tau candidates reconstructed in 1Prong0pi0 decay mode to charged pion mass -combinatoricRecoTaus76xReMiniAOD.modifiers.append(cms.PSet( - name = cms.string("tau_mass"), - plugin = cms.string("PFRecoTauMassPlugin"), - verbosity = cms.int32(0) -)) -#-------------------------------------------------------------------------------- - -#------------------------------------------------------------------------------- -#------------------ HPS Taus --------------------------------------------------- -#------------------------------------------------------------------------------- - -from RecoTauTag.Configuration.HPSPFTaus_reminiAOD_cff import * - -combinatoricRecoTaus76xReMiniAOD.chargedHadronSrc = cms.InputTag("ak4PFJetsRecoTauChargedHadrons76xReMiniAOD") -combinatoricRecoTaus76xReMiniAOD.piZeroSrc = cms.InputTag("ak4PFJetsLegacyHPSPiZeros76xReMiniAOD") - -#------------------------------------------------------------------------------- -#------------------ PFTauTagInfo workaround ------------------------------------ -#------------------------------------------------------------------------------- -# Build the PFTauTagInfos separately, then relink them into the taus. -from RecoTauTag.RecoTau.PFRecoTauTagInfoProducer_cfi import pfRecoTauTagInfoProducer -pfRecoTauTagInfoProducer76xReMiniAOD = pfRecoTauTagInfoProducer.clone() -pfRecoTauTagInfoProducer76xReMiniAOD.PFJetTracksAssociatorProducer = cms.InputTag("ak4PFJetTracksAssociatorAtVertex76xReMiniAOD") - -from RecoJets.JetAssociationProducers.ak4JTA_cff import ak4JetTracksAssociatorAtVertexPF -ak4PFJetTracksAssociatorAtVertex76xReMiniAOD = ak4JetTracksAssociatorAtVertexPF.clone() -ak4PFJetTracksAssociatorAtVertex76xReMiniAOD.jets = PFRecoTauPFJetInputs.inputJetCollection -tautagInfoModifer76xReMiniAOD = cms.PSet( - name = cms.string("TTIworkaround"), - plugin = cms.string("RecoTauTagInfoWorkaroundModifer"), - pfTauTagInfoSrc = cms.InputTag("pfRecoTauTagInfoProducer76xReMiniAOD"), -) -combinatoricRecoTaus76xReMiniAOD.modifiers.append(tautagInfoModifer76xReMiniAOD) - -recoTauPileUpVertices76xReMiniAOD = cms.EDFilter("RecoTauPileUpVertexSelector", - src = cms.InputTag("offlinePrimaryVertices"), - minTrackSumPt = cms.double(5), - filter = cms.bool(False), -) - -recoTauCommonSequence76xReMiniAOD = cms.Sequence( - ak4PFJetTracksAssociatorAtVertex76xReMiniAOD * - recoTauAK4PFJets08Region76xReMiniAOD * - recoTauPileUpVertices76xReMiniAOD * - pfRecoTauTagInfoProducer76xReMiniAOD -) - -# Produce only classic HPS taus -recoTauClassicHPSSequence76xReMiniAOD = cms.Sequence( - ak4PFJetsLegacyHPSPiZeros76xReMiniAOD * - ak4PFJetsRecoTauChargedHadrons76xReMiniAOD * - combinatoricRecoTaus76xReMiniAOD * - produceAndDiscriminateHPSPFTaus76xReMiniAOD -) - -PFTau76xReMiniAOD = cms.Sequence( - recoTauCommonSequence76xReMiniAOD * - recoTauClassicHPSSequence76xReMiniAOD -) - diff --git a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py index e71ec69116b28..657324ffa919e 100644 --- a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py +++ b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py @@ -114,7 +114,61 @@ 'keep *_hpsPFTauTransverseImpactParameters_*_*', 'keep *_hpsPFTauFootprintCorrection_*_*', 'keep *_hpsPFTauNeutralIsoPtSumWeight_*_*', - 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*' + 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*', + 'keep *_ hpsPFTauDiscriminationByMVA6rawElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6VLooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6LooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6MediumElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6TightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6VTightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauChargedIsoPtSumdR03_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumdR03_*_*', + 'keep *_hpsPFTauPUcorrPtSumdR03_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumWeightdR03_*_*', + 'keep *_hpsPFTauFootprintCorrectiondR03_*_*', + 'keep *_hpsPFTauPhotonPtSumOutsideSignalConedR03_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*' ) ) #AOD content @@ -215,11 +269,67 @@ 'keep *_hpsPFTauDiscriminationByMediumPileupWeightedIsolation3Hits_*_*', 'keep *_hpsPFTauPUcorrPtSum_*_*', 'keep *_hpsPFTauChargedIsoPtSum_*_*', - #'keep *_hpsPFTau*PtSum_*_*', 'keep *_hpsPFTauMVA3IsolationChargedIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationNeutralIsoPtSum_*_*', 'keep *_hpsPFTauMVA3IsolationPUcorrPtSum_*_*', - 'keep *_hpsPFTauTransverseImpactParameters_*_*' + 'keep *_hpsPFTauTransverseImpactParameters_*_*', + 'keep *_hpsPFTauFootprintCorrection_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumWeight_*_*', + 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*', + 'keep *_ hpsPFTauDiscriminationByMVA6rawElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6VLooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6LooseElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6MediumElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6TightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6VTightElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT_*_*', + 'keep *_hpsPFTauChargedIsoPtSumdR03_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumdR03_*_*', + 'keep *_hpsPFTauPUcorrPtSumdR03_*_*', + 'keep *_hpsPFTauNeutralIsoPtSumWeightdR03_*_*', + 'keep *_hpsPFTauFootprintCorrectiondR03_*_*', + 'keep *_hpsPFTauPhotonPtSumOutsideSignalConedR03_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw_*_*', + 'keep *_hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*', + 'keep *_hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT_*_*' ) ) From c95bdd33d70514b6195e99aaaa505cf34c5b8eee Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 10 Dec 2015 14:22:02 +0100 Subject: [PATCH 008/250] - fixed typo - added bendCorrMass to PFTauSpecific data-format so that it can be accessed from pat::Taus --- DataFormats/PatCandidates/interface/TauPFSpecific.h | 3 ++- DataFormats/PatCandidates/src/TauPFSpecific.cc | 5 ++++- DataFormats/PatCandidates/src/classes_def_objects.xml | 3 ++- RecoTauTag/Configuration/python/RecoPFTauTag_cff.py | 2 +- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/DataFormats/PatCandidates/interface/TauPFSpecific.h b/DataFormats/PatCandidates/interface/TauPFSpecific.h index 3bcee1c20e141..87bf760d8082b 100644 --- a/DataFormats/PatCandidates/interface/TauPFSpecific.h +++ b/DataFormats/PatCandidates/interface/TauPFSpecific.h @@ -63,7 +63,8 @@ struct TauPFSpecific { float phiphiMoment_; float etaphiMoment_; - + float bendCorrMass_; + float signalConeSize_; }; } } diff --git a/DataFormats/PatCandidates/src/TauPFSpecific.cc b/DataFormats/PatCandidates/src/TauPFSpecific.cc index e0bb37b92e869..7f57e61f06884 100644 --- a/DataFormats/PatCandidates/src/TauPFSpecific.cc +++ b/DataFormats/PatCandidates/src/TauPFSpecific.cc @@ -43,7 +43,10 @@ pat::tau::TauPFSpecific::TauPFSpecific(const reco::PFTau& tau) : // Muon rejection variables caloComp_(tau.caloComp()), segComp_(tau.segComp()), - muonDecision_(tau.muonDecision()) + muonDecision_(tau.muonDecision()), + // Variables specific to dynamic strip reconstruction + bendCorrMass_(tau.bendCorrMass()), + signalConeSize_(tau.signalConeSize()) { if ( tau.jetRef().isAvailable() && tau.jetRef().isNonnull() ) { // CV: add protection to ease transition to new CMSSW 4_2_x RecoTauTags reco::Jet::EtaPhiMoments etaPhiStatistics = tau.jetRef()->etaPhiStatistics(); diff --git a/DataFormats/PatCandidates/src/classes_def_objects.xml b/DataFormats/PatCandidates/src/classes_def_objects.xml index b86072bfbb3b7..a7cdc15581857 100644 --- a/DataFormats/PatCandidates/src/classes_def_objects.xml +++ b/DataFormats/PatCandidates/src/classes_def_objects.xml @@ -134,7 +134,8 @@ - + + diff --git a/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py b/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py index 78e2808b7170c..267999260c267 100644 --- a/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py +++ b/RecoTauTag/Configuration/python/RecoPFTauTag_cff.py @@ -63,7 +63,7 @@ #------------------ HPS Taus --------------------------------------------------- #------------------------------------------------------------------------------- -from RecoTauTag.Configuration.HPSPFTaus_reminiAOD_cff import * +from RecoTauTag.Configuration.HPSPFTaus_cff import * combinatoricRecoTaus.chargedHadronSrc = cms.InputTag("ak4PFJetsRecoTauChargedHadrons") combinatoricRecoTaus.piZeroSrc = cms.InputTag("ak4PFJetsLegacyHPSPiZeros") From c166594de55507ff3be4a4e5a2806063d9b1a4eb Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Thu, 17 Dec 2015 12:04:20 +0100 Subject: [PATCH 009/250] consistent indentation and compressed format for on track clusters --- .../plugins/ShallowRechitClustersProducer.cc | 30 ++++++++--------- .../plugins/ShallowSimhitClustersProducer.cc | 32 +++++++++---------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/CalibTracker/SiStripCommon/plugins/ShallowRechitClustersProducer.cc b/CalibTracker/SiStripCommon/plugins/ShallowRechitClustersProducer.cc index 4387b43b333e9..70db036379ee3 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowRechitClustersProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowRechitClustersProducer.cc @@ -57,21 +57,21 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { BOOST_FOREACH( const SiStripRecHit2DCollection::value_type& ds, *recHits) { BOOST_FOREACH( const SiStripRecHit2D& hit, ds) { - shallow::CLUSTERMAP::iterator cluster = clustermap.find( std::make_pair(hit.geographicalId().rawId(), hit.cluster()->firstStrip() ) ); - if(cluster != clustermap.end() ) { - const StripGeomDetUnit* theStripDet = dynamic_cast( theTrackerGeometry->idToDet( hit.geographicalId() ) ); - unsigned int i = cluster->second; - strip->at(i) = theStripDet->specificTopology().strip(hit.localPosition()); - merr->at(i) = sqrt(theStripDet->specificTopology().measurementError(hit.localPosition(), hit.localPositionError()).uu()); - localx->at(i) = hit.localPosition().x(); - localy->at(i) = hit.localPosition().y(); - localxerr->at(i) = sqrt(hit.localPositionError().xx()); - localyerr->at(i) = sqrt(hit.localPositionError().yy()); - globalx->at(i) = theStripDet->toGlobal(hit.localPosition()).x(); - globaly->at(i) = theStripDet->toGlobal(hit.localPosition()).y(); - globalz->at(i) = theStripDet->toGlobal(hit.localPosition()).z(); - } - else {throw cms::Exception("cluster not found");} + shallow::CLUSTERMAP::iterator cluster = clustermap.find( std::make_pair(hit.geographicalId().rawId(), hit.cluster()->firstStrip() ) ); + if(cluster != clustermap.end() ) { + const StripGeomDetUnit* theStripDet = dynamic_cast( theTrackerGeometry->idToDet( hit.geographicalId() ) ); + unsigned int i = cluster->second; + strip->at(i) = theStripDet->specificTopology().strip(hit.localPosition()); + merr->at(i) = sqrt(theStripDet->specificTopology().measurementError(hit.localPosition(), hit.localPositionError()).uu()); + localx->at(i) = hit.localPosition().x(); + localy->at(i) = hit.localPosition().y(); + localxerr->at(i) = sqrt(hit.localPositionError().xx()); + localyerr->at(i) = sqrt(hit.localPositionError().yy()); + globalx->at(i) = theStripDet->toGlobal(hit.localPosition()).x(); + globaly->at(i) = theStripDet->toGlobal(hit.localPosition()).y(); + globalz->at(i) = theStripDet->toGlobal(hit.localPosition()).z(); + } + else {throw cms::Exception("cluster not found");} } } } diff --git a/CalibTracker/SiStripCommon/plugins/ShallowSimhitClustersProducer.cc b/CalibTracker/SiStripCommon/plugins/ShallowSimhitClustersProducer.cc index 74ad92d16339f..d5c3fbc8963d3 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowSimhitClustersProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowSimhitClustersProducer.cc @@ -79,21 +79,21 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { shallow::CLUSTERMAP::const_iterator cluster = match_cluster( id, driftedstrip_, clustermap, *clusters); if(cluster != clustermap.end()) { - unsigned i = cluster->second; - hits->at(i)+=1; - if(hits->at(i) == 1) { - strip->at(i) = hitstrip_; - localtheta->at(i) = hit.thetaAtEntry(); - localphi->at(i) = hit.phiAtEntry(); - localx->at(i) = hit.localPosition().x(); - localy->at(i) = hit.localPosition().y(); - localz->at(i) = hit.localPosition().z(); - momentum->at(i) = hit.pabs(); - energyloss->at(i) = hit.energyLoss(); - time->at(i) = hit.timeOfFlight(); - particle->at(i) = hit.particleType(); - process->at(i) = hit.processType(); - } + unsigned i = cluster->second; + hits->at(i)+=1; + if(hits->at(i) == 1) { + strip->at(i) = hitstrip_; + localtheta->at(i) = hit.thetaAtEntry(); + localphi->at(i) = hit.phiAtEntry(); + localx->at(i) = hit.localPosition().x(); + localy->at(i) = hit.localPosition().y(); + localz->at(i) = hit.localPosition().z(); + momentum->at(i) = hit.pabs(); + energyloss->at(i) = hit.energyLoss(); + time->at(i) = hit.timeOfFlight(); + particle->at(i) = hit.particleType(); + process->at(i) = hit.processType(); + } } } } @@ -121,7 +121,7 @@ match_cluster( const unsigned& id, const float& strip_, const shallow::CLUSTERMA while( right != clustersDetSet->end() && strip_ > right->barycenter() ) right++; left = right-1; - if(right!=clustersDetSet->end() && right!=clustersDetSet->begin()) { + if(right!=clustersDetSet->end() && right!=clustersDetSet->begin()) { unsigned firstStrip = (right->barycenter()-strip_) < (strip_-left->barycenter()) ? right->firstStrip() : left->firstStrip(); cluster = clustermap.find( std::make_pair( id, firstStrip)); } From d2317dc6bbd489d74156af833a8a7384bc58cc33 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Thu, 17 Dec 2015 12:04:36 +0100 Subject: [PATCH 010/250] consistent indentation and compressed format for on track clusters --- .../plugins/ShallowTrackClustersProducer.cc | 224 +++++++++++------- 1 file changed, 136 insertions(+), 88 deletions(-) diff --git a/CalibTracker/SiStripCommon/plugins/ShallowTrackClustersProducer.cc b/CalibTracker/SiStripCommon/plugins/ShallowTrackClustersProducer.cc index ba6d5448bf4e8..ca1efc7a2f77a 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowTrackClustersProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowTrackClustersProducer.cc @@ -22,6 +22,7 @@ #include "boost/foreach.hpp" #include "CalibTracker/Records/interface/SiStripDependentRecords.h" +#include ShallowTrackClustersProducer::ShallowTrackClustersProducer(const edm::ParameterSet& iConfig) : tracks_token_(consumes >(iConfig.getParameter("Tracks"))), @@ -30,8 +31,13 @@ ShallowTrackClustersProducer::ShallowTrackClustersProducer(const edm::ParameterS Suffix ( iConfig.getParameter("Suffix") ), Prefix ( iConfig.getParameter("Prefix") ) { + produces > ( Prefix + "clusterIdx" + Suffix ); //link: on trk cluster --> general cluster info + produces > ( Prefix + "onTrkClusterIdx" + Suffix ); //link: general cluster info --> on track cluster + produces > ( Prefix + "onTrkClustersBegin" + Suffix ); //link: track --> onTrkInfo (range) + produces > ( Prefix + "onTrkClustersEnd" + Suffix ); //link: track --> onTrkInfo (range) + produces > ( Prefix + "trackindex" + Suffix ); //link: on trk cluster --> track index + produces > ( Prefix + "trackmulti" + Suffix ); - produces > ( Prefix + "trackindex" + Suffix ); produces > ( Prefix + "localtheta" + Suffix ); produces > ( Prefix + "localphi" + Suffix ); produces > ( Prefix + "localpitch" + Suffix ); @@ -71,55 +77,69 @@ ShallowTrackClustersProducer::ShallowTrackClustersProducer(const edm::ParameterS void ShallowTrackClustersProducer:: produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { shallow::CLUSTERMAP clustermap = shallow::make_cluster_map(iEvent, clusters_token_); + edm::Handle > tracks; iEvent.getByToken(tracks_token_, tracks); int size = clustermap.size(); - std::auto_ptr > trackmulti ( new std::vector(size, 0) ); - std::auto_ptr > trackindex ( new std::vector (size, -1) ); - std::auto_ptr > localtheta ( new std::vector (size, -100) ); - std::auto_ptr > localphi ( new std::vector (size, -100) ); - std::auto_ptr > localpitch ( new std::vector (size, -100) ); - std::auto_ptr > localx ( new std::vector (size, -100) ); - std::auto_ptr > localy ( new std::vector (size, -100) ); - std::auto_ptr > localz ( new std::vector (size, -100) ); - std::auto_ptr > strip ( new std::vector (size, -100) ); - std::auto_ptr > globaltheta ( new std::vector (size, -100) ); - std::auto_ptr > globalphi ( new std::vector (size, -100) ); - std::auto_ptr > globalx ( new std::vector (size, -10000) ); - std::auto_ptr > globaly ( new std::vector (size, -10000) ); - std::auto_ptr > globalz ( new std::vector (size, -10000) ); - std::auto_ptr > insidistance ( new std::vector (size, -1) ); - std::auto_ptr > projwidth ( new std::vector (size, -1000) ); - std::auto_ptr > BdotY ( new std::vector (size, -1000) ); - std::auto_ptr > covered ( new std::vector (size, -1000) ); - std::auto_ptr > rhlocalx ( new std::vector(size, -10000 )); - std::auto_ptr > rhlocaly ( new std::vector(size, -10000 )); - std::auto_ptr > rhlocalxerr ( new std::vector(size, -1 )); - std::auto_ptr > rhlocalyerr ( new std::vector(size, -1 )); - std::auto_ptr > rhglobalx ( new std::vector(size, -10000 )); - std::auto_ptr > rhglobaly ( new std::vector(size, -10000 )); - std::auto_ptr > rhglobalz ( new std::vector(size, -10000 )); - std::auto_ptr > rhstrip ( new std::vector(size, -10000 )); - std::auto_ptr > rhmerr ( new std::vector(size, -10000 )); - std::auto_ptr > ubstrip ( new std::vector(size, -10000 )); - std::auto_ptr > ubmerr ( new std::vector(size, -10000 )); - std::auto_ptr > driftx ( new std::vector(size, -10000 )); - std::auto_ptr > drifty ( new std::vector(size, -10000 )); - std::auto_ptr > driftz ( new std::vector(size, -10000 )); - std::auto_ptr > globalZofunitlocalY ( new std::vector(size, -1000)); + + //links + std::auto_ptr > clusterIdx ( new std::vector() ); //link: on trk cluster --> general cluster info + std::auto_ptr > onTrkClusterIdx ( new std::vector(size, -1) ); //link: general cluster info --> on track cluster + std::auto_ptr > onTrkClustersBegin (new std::vector( tracks->size(), -1 ) ); //link: track --> on trk cluster + std::auto_ptr > onTrkClustersEnd (new std::vector( tracks->size(), -1 ) ); //link: track --> on trk cluster + std::auto_ptr > trackindex ( new std::vector() ); //link: on track cluster --> track + clusterIdx->reserve(size); + trackindex->reserve(size); + + std::auto_ptr > trackmulti ( new std::vector()); trackmulti ->reserve(size); + std::auto_ptr > localtheta ( new std::vector ()); localtheta ->reserve(size); + std::auto_ptr > localphi ( new std::vector ()); localphi ->reserve(size); + std::auto_ptr > localpitch ( new std::vector ()); localpitch ->reserve(size); + std::auto_ptr > localx ( new std::vector ()); localx ->reserve(size); + std::auto_ptr > localy ( new std::vector ()); localy ->reserve(size); + std::auto_ptr > localz ( new std::vector ()); localz ->reserve(size); + std::auto_ptr > strip ( new std::vector ()); strip ->reserve(size); + std::auto_ptr > globaltheta ( new std::vector ()); globaltheta ->reserve(size); + std::auto_ptr > globalphi ( new std::vector ()); globalphi ->reserve(size); + std::auto_ptr > globalx ( new std::vector ()); globalx ->reserve(size); + std::auto_ptr > globaly ( new std::vector ()); globaly ->reserve(size); + std::auto_ptr > globalz ( new std::vector ()); globalz ->reserve(size); + std::auto_ptr > insidistance ( new std::vector ()); insidistance->reserve(size); + std::auto_ptr > projwidth ( new std::vector ()); projwidth ->reserve(size); + std::auto_ptr > BdotY ( new std::vector ()); BdotY ->reserve(size); + std::auto_ptr > covered ( new std::vector ()); covered ->reserve(size); + std::auto_ptr > rhlocalx ( new std::vector()); rhlocalx ->reserve(size); + std::auto_ptr > rhlocaly ( new std::vector()); rhlocaly ->reserve(size); + std::auto_ptr > rhlocalxerr( new std::vector()); rhlocalxerr->reserve(size); + std::auto_ptr > rhlocalyerr( new std::vector()); rhlocalyerr->reserve(size); + std::auto_ptr > rhglobalx ( new std::vector()); rhglobalx ->reserve(size); + std::auto_ptr > rhglobaly ( new std::vector()); rhglobaly ->reserve(size); + std::auto_ptr > rhglobalz ( new std::vector()); rhglobalz ->reserve(size); + std::auto_ptr > rhstrip ( new std::vector()); rhstrip ->reserve(size); + std::auto_ptr > rhmerr ( new std::vector()); rhmerr ->reserve(size); + std::auto_ptr > ubstrip ( new std::vector()); ubstrip ->reserve(size); + std::auto_ptr > ubmerr ( new std::vector()); ubmerr ->reserve(size); + std::auto_ptr > driftx ( new std::vector()); driftx ->reserve(size); + std::auto_ptr > drifty ( new std::vector()); drifty ->reserve(size); + std::auto_ptr > driftz ( new std::vector()); driftz ->reserve(size); + std::auto_ptr > globalZofunitlocalY ( new std::vector()); globalZofunitlocalY->reserve(size); edm::ESHandle theTrackerGeometry; iSetup.get().get( theTrackerGeometry ); edm::ESHandle magfield; iSetup.get().get(magfield); edm::ESHandle SiStripLorentzAngle; iSetup.get().get(SiStripLorentzAngle); - edm::Handle > tracks; iEvent.getByToken(tracks_token_, tracks); edm::Handle associations; iEvent.getByToken(association_token_, associations); TrajectoryStateCombiner combiner; + size_t ontrk_cluster_idx=0; + std::map > mapping; //cluster idx --> on trk cluster idx (multiple) + for( TrajTrackAssociationCollection::const_iterator association = associations->begin(); association != associations->end(); association++) { const Trajectory* traj = association->key.get(); const reco::Track* track = association->val.get(); + int trk_idx = shallow::findTrackIndex(tracks, track); + size_t trk_strt_idx = ontrk_cluster_idx; BOOST_FOREACH( const TrajectoryMeasurement measurement, traj->measurements() ) { const TrajectoryStateOnSurface tsos = measurement.updatedState(); @@ -130,62 +150,90 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { const SiStripRecHit2D* hit2D = dynamic_cast(hit); const SiStripMatchedRecHit2D* matchedhit = dynamic_cast(hit); - for(unsigned h=0; h<2; h++) { - const SiStripCluster* cluster_ptr; - if(!matchedhit && h==1) continue; else - if( matchedhit && h==0) cluster_ptr = &matchedhit->monoCluster(); else - if( matchedhit && h==1) cluster_ptr = &matchedhit->stereoCluster(); else - if(hit2D) cluster_ptr = (hit2D->cluster()).get(); else - if(hit1D) cluster_ptr = (hit1D->cluster()).get(); - else continue; - - shallow::CLUSTERMAP::const_iterator cluster = clustermap.find( std::make_pair( hit->geographicalId().rawId(), cluster_ptr->firstStrip() )); - if(cluster == clustermap.end() ) throw cms::Exception("Logic Error") << "Cluster not found: this could be a configuration error" << std::endl; + for(unsigned h=0; h<2; h++) { //loop over possible Hit options (1D, 2D) + const SiStripCluster* cluster_ptr; + if(!matchedhit && h==1) continue; + else if( matchedhit && h==0) cluster_ptr = &matchedhit->monoCluster(); + else if( matchedhit && h==1) cluster_ptr = &matchedhit->stereoCluster(); + else if(hit2D) cluster_ptr = (hit2D->cluster()).get(); + else if(hit1D) cluster_ptr = (hit1D->cluster()).get(); + else continue; + + shallow::CLUSTERMAP::const_iterator cluster = clustermap.find( std::make_pair( hit->geographicalId().rawId(), cluster_ptr->firstStrip() )); + if(cluster == clustermap.end() ) throw cms::Exception("Logic Error") << "Cluster not found: this could be a configuration error" << std::endl; - unsigned i = cluster->second; - if( 0 == (trackmulti->at(i))++ ) { - const StripGeomDetUnit* theStripDet = dynamic_cast( theTrackerGeometry->idToDet( hit->geographicalId() ) ); - LocalVector drift = shallow::drift( theStripDet, *magfield, *SiStripLorentzAngle); - - trackindex->at(i) = shallow::findTrackIndex(tracks, track); - localtheta->at(i) = (theStripDet->toLocal(tsos.globalDirection())).theta(); - localphi->at(i) = (theStripDet->toLocal(tsos.globalDirection())).phi(); - localpitch->at(i) = (theStripDet->specificTopology()).localPitch(theStripDet->toLocal(tsos.globalPosition())); - localx->at(i) = (theStripDet->toLocal(tsos.globalPosition())).x(); - localy->at(i) = (theStripDet->toLocal(tsos.globalPosition())).y(); - localz->at(i) = (theStripDet->toLocal(tsos.globalPosition())).z(); - strip->at(i) = (theStripDet->specificTopology()).strip(theStripDet->toLocal(tsos.globalPosition())); - globaltheta->at(i) = tsos.globalDirection().theta(); - globalphi->at(i) = tsos.globalDirection().phi(); - globalx->at(i) = tsos.globalPosition().x(); - globaly->at(i) = tsos.globalPosition().y(); - globalz->at(i) = tsos.globalPosition().z(); - insidistance->at(i) = 1./fabs(cos(localtheta->at(i))); - projwidth->at(i) = tan(localtheta->at(i))*cos(localphi->at(i)); - BdotY->at(i) = (theStripDet->surface()).toLocal( magfield->inTesla(theStripDet->surface().position())).y(); - covered->at(i) = drift.z()/localpitch->at(i) * fabs(projwidth->at(i) - drift.x()/drift.z()); - rhlocalx->at(i) = hit->localPosition().x(); - rhlocaly->at(i) = hit->localPosition().y(); - rhlocalxerr->at(i) = sqrt(hit->localPositionError().xx()); - rhlocalyerr->at(i) = sqrt(hit->localPositionError().yy()); - rhglobalx->at(i) = theStripDet->toGlobal(hit->localPosition()).x(); - rhglobaly->at(i) = theStripDet->toGlobal(hit->localPosition()).y(); - rhglobalz->at(i) = theStripDet->toGlobal(hit->localPosition()).z(); - rhstrip->at(i) = theStripDet->specificTopology().strip(hit->localPosition()); - rhmerr->at(i) = sqrt(theStripDet->specificTopology().measurementError(hit->localPosition(), hit->localPositionError()).uu()); - ubstrip->at(i) = theStripDet->specificTopology().strip(unbiased.localPosition()); - ubmerr->at(i) = sqrt(theStripDet->specificTopology().measurementError(unbiased.localPosition(), unbiased.localError().positionError()).uu()); - driftx->at(i) = drift.x(); - drifty->at(i) = drift.y(); - driftz->at(i) = drift.z(); - globalZofunitlocalY->at(i) = (theStripDet->toGlobal(LocalVector(0,1,0))).z(); - } - } - } - } + unsigned i = cluster->second; - iEvent.put(trackmulti, Prefix + "trackmulti" + Suffix ); + //find if cluster was already assigned to a previous track + auto already_visited = mapping.find(i); + int nassociations = 1; + if(already_visited != mapping.end()) { + nassociations += already_visited->second.size(); + for(size_t idx : already_visited->second) { + trackmulti->at(idx)++; + } + already_visited->second.push_back(ontrk_cluster_idx); + } + else { //otherwise store this + std::vector single = {ontrk_cluster_idx}; + mapping.insert( std::make_pair(i, single) ); + } + + const StripGeomDetUnit* theStripDet = dynamic_cast( theTrackerGeometry->idToDet( hit->geographicalId() ) ); + LocalVector drift = shallow::drift( theStripDet, *magfield, *SiStripLorentzAngle); + + if(nassociations == 1) onTrkClusterIdx->at(i) = ontrk_cluster_idx; //link: general cluster info --> on track cluster + clusterIdx->push_back( i ); //link: on trk cluster --> general cluster info + trackmulti->push_back( nassociations ); + trackindex->push_back( trk_idx ); + localtheta->push_back( (theStripDet->toLocal(tsos.globalDirection())).theta() ); + localphi->push_back( (theStripDet->toLocal(tsos.globalDirection())).phi() ); + localpitch->push_back( (theStripDet->specificTopology()).localPitch(theStripDet->toLocal(tsos.globalPosition())) ); + localx->push_back( (theStripDet->toLocal(tsos.globalPosition())).x() ); + localy->push_back( (theStripDet->toLocal(tsos.globalPosition())).y() ); + localz->push_back( (theStripDet->toLocal(tsos.globalPosition())).z() ); + strip->push_back( (theStripDet->specificTopology()).strip(theStripDet->toLocal(tsos.globalPosition())) ); + globaltheta->push_back( tsos.globalDirection().theta() ); + globalphi->push_back( tsos.globalDirection().phi() ); + globalx->push_back( tsos.globalPosition().x() ); + globaly->push_back( tsos.globalPosition().y() ); + globalz->push_back( tsos.globalPosition().z() ); + insidistance->push_back(1./fabs(cos(localtheta->at(ontrk_cluster_idx))) ); + projwidth->push_back( tan(localtheta->at(ontrk_cluster_idx))*cos(localphi->at(ontrk_cluster_idx)) ); + BdotY->push_back( (theStripDet->surface()).toLocal( magfield->inTesla(theStripDet->surface().position())).y() ); + covered->push_back( drift.z()/localpitch->at(ontrk_cluster_idx) * fabs(projwidth->at(ontrk_cluster_idx) - drift.x()/drift.z()) ); + rhlocalx->push_back( hit->localPosition().x() ); + rhlocaly->push_back( hit->localPosition().y() ); + rhlocalxerr->push_back( sqrt(hit->localPositionError().xx()) ); + rhlocalyerr->push_back( sqrt(hit->localPositionError().yy()) ); + rhglobalx->push_back( theStripDet->toGlobal(hit->localPosition()).x() ); + rhglobaly->push_back( theStripDet->toGlobal(hit->localPosition()).y() ); + rhglobalz->push_back( theStripDet->toGlobal(hit->localPosition()).z() ); + rhstrip->push_back( theStripDet->specificTopology().strip(hit->localPosition()) ); + rhmerr->push_back( sqrt(theStripDet->specificTopology().measurementError(hit->localPosition(), hit->localPositionError()).uu()) ); + ubstrip->push_back( theStripDet->specificTopology().strip(unbiased.localPosition()) ); + ubmerr->push_back( sqrt(theStripDet->specificTopology().measurementError(unbiased.localPosition(), unbiased.localError().positionError()).uu()) ); + driftx->push_back( drift.x() ); + drifty->push_back( drift.y() ); + driftz->push_back( drift.z() ); + globalZofunitlocalY->push_back( (theStripDet->toGlobal(LocalVector(0,1,0))).z() ); + + ontrk_cluster_idx++; + } //for(unsigned h=0; h<2; h++) { //loop over possible Hit options (1D, 2D) + } //BOOST_FOREACH( const TrajectoryMeasurement measurement, traj->measurements() ) + + onTrkClustersBegin->at(trk_idx) = trk_strt_idx; + onTrkClustersEnd->at(trk_idx) = ontrk_cluster_idx; + + } //for(TrajTrackAssociationCollection::const_iterator association = associations->begin(); + + iEvent.put(clusterIdx , Prefix + "clusterIdx" + Suffix ); + iEvent.put(onTrkClusterIdx , Prefix + "onTrkClusterIdx" + Suffix ); + iEvent.put(onTrkClustersBegin, Prefix + "onTrkClustersBegin" + Suffix ); + iEvent.put(onTrkClustersEnd , Prefix + "onTrkClustersEnd" + Suffix ); iEvent.put(trackindex, Prefix + "trackindex" + Suffix ); + + iEvent.put(trackmulti, Prefix + "trackmulti" + Suffix ); iEvent.put(localtheta, Prefix + "localtheta" + Suffix ); iEvent.put(localphi, Prefix + "localphi" + Suffix ); iEvent.put(localpitch, Prefix + "localpitch" + Suffix ); From c60f3ffaf59598d690e449fee918ceba58f5a6c2 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 17 Dec 2015 17:55:53 +0100 Subject: [PATCH 011/250] remove workaround for 76xReMiniAOD v2 --- PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py index e0c71b983d8f9..cdb6693f6c588 100644 --- a/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py +++ b/PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py @@ -203,13 +203,6 @@ def miniAOD_customizeCommon(process): for idmod in photon_ids: setupAllVIDIdsInModule(process,idmod,setupVIDPhotonSelection,None,False) - #---------------------------------------------------------------------------- - # CV: add old and new tau ID discriminators for CMSSW 7_6_x reminiAOD v2 - process.load("RecoTauTag.Configuration.RecoPFTauTag_reminiAOD_cff") - from PhysicsTools.PatAlgos.tools.tauTools import switchToPFTauHPS76xReMiniAOD - switchToPFTauHPS76xReMiniAOD(process) - #---------------------------------------------------------------------------- - # Adding puppi jets process.load('CommonTools.PileupAlgos.Puppi_cff') process.load('RecoJets.JetProducers.ak4PFJetsPuppi_cfi') From f998ae287e0ba8922e2081f41b2cf80009f1a569 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 4 Jan 2016 10:13:16 +0100 Subject: [PATCH 012/250] fixed discriminator names (added "hpsPFTauProducer") --- .../python/producersLayer1/tauProducer_cfi.py | 110 +++++++++--------- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py index 3171115bbf32e..f78a0eb55e71f 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py @@ -104,62 +104,62 @@ againstElectronTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5TightElectronRejection"), againstElectronVTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VTightElectronRejection"), ##New Run2 MVA isolation - byIsolationMVArun2v1DBoldDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), - byVLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), - byLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), - byMediumIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), - byTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), - byVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), - byVVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), - byIsolationMVArun2v1DBnewDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), - byVLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), - byLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), - byMediumIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), - byTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), - byVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), - byVVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), - byIsolationMVArun2v1PWoldDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), - byVLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), - byLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), - byMediumIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), - byTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), - byVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), - byVVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), - byIsolationMVArun2v1PWnewDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), - byVLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), - byLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), - byMediumIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), - byTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), - byVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), - byVVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), - chargedIsoPtSumdR03 = cms.InputTag("ChargedIsoPtSumdR03"), - neutralIsoPtSumdR03 = cms.InputTag("NeutralIsoPtSumdR03"), - puCorrPtSumdR03 = cms.InputTag("PUcorrPtSumdR03"), - neutralIsoPtSumWeightdR03 = cms.InputTag("NeutralIsoPtSumWeightdR03"), - footprintCorrectiondR03 = cms.InputTag("FootprintCorrectiondR03"), - photonPtSumOutsideSignalConedR03 = cms.InputTag("PhotonPtSumOutsideSignalConedR03"), - byIsolationMVArun2v1DBdR03oldDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), - byVLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), - byLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), - byMediumIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), - byTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), - byVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), - byVVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), - byIsolationMVArun2v1PWdR03oldDMwLTraw = cms.InputTag("DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), - byVLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), - byLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), - byMediumIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), - byTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), - byVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), - byVVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), + byIsolationMVArun2v1DBoldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), + byVLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), + byLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), + byMediumIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), + byTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), + byVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), + byVVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), + byIsolationMVArun2v1DBnewDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), + byVLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), + byLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), + byMediumIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), + byTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), + byVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), + byVVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), + byIsolationMVArun2v1PWoldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), + byVLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), + byLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), + byMediumIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), + byTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), + byVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), + byVVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), + byIsolationMVArun2v1PWnewDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), + byVLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), + byLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), + byMediumIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), + byTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), + byVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), + byVVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), + chargedIsoPtSumdR03 = cms.InputTag("hpsPFTauChargedIsoPtSumdR03"), + neutralIsoPtSumdR03 = cms.InputTag("hpsPFTauNeutralIsoPtSumdR03"), + puCorrPtSumdR03 = cms.InputTag("hpsPFTauPUcorrPtSumdR03"), + neutralIsoPtSumWeightdR03 = cms.InputTag("hpsPFTauNeutralIsoPtSumWeightdR03"), + footprintCorrectiondR03 = cms.InputTag("hpsPFTauFootprintCorrectiondR03"), + photonPtSumOutsideSignalConedR03 = cms.InputTag("hpsPFTauPhotonPtSumOutsideSignalConedR03"), + byIsolationMVArun2v1DBdR03oldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), + byVLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), + byLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), + byMediumIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), + byTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), + byVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), + byVVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), + byIsolationMVArun2v1PWdR03oldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), + byVLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), + byLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), + byMediumIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), + byTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), + byVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), + byVVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), ##New Run2 MVA discriminator against electrons - againstElectronMVA6raw = cms.InputTag("DiscriminationByMVA6rawElectronRejection"), - againstElectronMVA6category = cms.InputTag("DiscriminationByMVA6rawElectronRejection:category"), - againstElectronVLooseMVA6 = cms.InputTag("DiscriminationByMVA6VLooseElectronRejection"), - againstElectronLooseMVA6 = cms.InputTag("DiscriminationByMVA6LooseElectronRejection"), - againstElectronMediumMVA6 = cms.InputTag("DiscriminationByMVA6MediumElectronRejection"), - againstElectronTightMVA6 = cms.InputTag("DiscriminationByMVA6TightElectronRejection"), - againstElectronVTightMVA6 = cms.InputTag("DiscriminationByMVA6VTightElectronRejection"), + againstElectronMVA6raw = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection"), + againstElectronMVA6category = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection:category"), + againstElectronVLooseMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6VLooseElectronRejection"), + againstElectronLooseMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6LooseElectronRejection"), + againstElectronMediumMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6MediumElectronRejection"), + againstElectronTightMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6TightElectronRejection"), + againstElectronVTightMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6VTightElectronRejection"), ), # mc matching configurables From a5714cbbe11e5ad568a31f3a7e12baa78cbe2391 Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 4 Jan 2016 14:38:56 +0100 Subject: [PATCH 013/250] removed spaces from collection names --- .../Configuration/python/RecoTauTag_EventContent_cff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py index 657324ffa919e..9d5135c98fbd8 100644 --- a/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py +++ b/RecoTauTag/Configuration/python/RecoTauTag_EventContent_cff.py @@ -115,7 +115,7 @@ 'keep *_hpsPFTauFootprintCorrection_*_*', 'keep *_hpsPFTauNeutralIsoPtSumWeight_*_*', 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*', - 'keep *_ hpsPFTauDiscriminationByMVA6rawElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVA6VLooseElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVA6LooseElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVA6MediumElectronRejection_*_*', @@ -276,7 +276,7 @@ 'keep *_hpsPFTauFootprintCorrection_*_*', 'keep *_hpsPFTauNeutralIsoPtSumWeight_*_*', 'keep *_hpsPFTauPhotonPtSumOutsideSignalCone_*_*', - 'keep *_ hpsPFTauDiscriminationByMVA6rawElectronRejection_*_*', + 'keep *_hpsPFTauDiscriminationByMVA6rawElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVA6VLooseElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVA6LooseElectronRejection_*_*', 'keep *_hpsPFTauDiscriminationByMVA6MediumElectronRejection_*_*', From 23300df4dbecd5349cb0a01f10599db23898efa5 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Tue, 12 Jan 2016 17:35:46 +0100 Subject: [PATCH 014/250] refactor GainCalibration (G2) code to enforce using same code for running on PCL and CalibTree --- .../plugins/SiStripGainFromCalibTree.cc | 1776 ++++++++--------- .../python/computeGain_cff.py | 11 +- ...ALCARECOPromptCalibProdSiStripGains_cff.py | 23 +- 3 files changed, 850 insertions(+), 960 deletions(-) diff --git a/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc b/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc index 7478d22f06c42..0b75cceec441c 100644 --- a/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc +++ b/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc @@ -85,784 +85,850 @@ using __gnu_cxx::hash_map; using __gnu_cxx::hash; struct stAPVGain{ - unsigned int Index; - int Bin; - unsigned int DetId; - unsigned int APVId; - unsigned int SubDet; - float x; - float y; - float z; - float Eta; - float R; - float Phi; - float Thickness; - double FitMPV; - double FitMPVErr; - double FitWidth; - double FitWidthErr; - double FitChi2; - double FitNorm; - double Gain; - double CalibGain; - double PreviousGain; - double PreviousGainTick; - double NEntries; - TH1F* HCharge; - TH1F* HChargeN; - bool isMasked; + unsigned int Index; + int Bin; + unsigned int DetId; + unsigned int APVId; + unsigned int SubDet; + float x; + float y; + float z; + float Eta; + float R; + float Phi; + float Thickness; + double FitMPV; + double FitMPVErr; + double FitWidth; + double FitWidthErr; + double FitChi2; + double FitNorm; + double Gain; + double CalibGain; + double PreviousGain; + double PreviousGainTick; + double NEntries; + TH1F* HCharge; + TH1F* HChargeN; + bool isMasked; }; class SiStripGainFromCalibTree : public ConditionDBWriter { - public: - explicit SiStripGainFromCalibTree(const edm::ParameterSet&); - ~SiStripGainFromCalibTree(); +public: + explicit SiStripGainFromCalibTree(const edm::ParameterSet&); + ~SiStripGainFromCalibTree(); - private: +private: - virtual void algoBeginRun(const edm::Run& run, const edm::EventSetup& iSetup) override; - virtual void algoEndRun (const edm::Run& run, const edm::EventSetup& iSetup) override; - virtual void algoBeginJob (const edm::EventSetup& iSetup) override; - virtual void algoEndJob () override; - virtual void algoAnalyze (const edm::Event &, const edm::EventSetup &) override; - - void merge(TH2* A, TH2* B); //needed to add histograms with different number of bins - void algoAnalyzeTheTree(); - void algoComputeMPVandGain(); - - bool IsFarFromBorder(TrajectoryStateOnSurface* trajState, const uint32_t detid, const edm::EventSetup* iSetup); - void getPeakOfLandau(TH1* InputHisto, double* FitResults, double LowRange=50, double HighRange=5400); - bool IsGoodLandauFit(double* FitResults); - void storeOnTree(TFileService* tfs); - void MakeCalibrationMap(); - bool produceTagFilter(); - - - - SiStripApvGain* getNewObject() override; - - TFileService *tfs; - DQMStore* dbe; - bool harvestingMode; - double MinNrEntries; - double MaxMPVError; - double MaxChi2OverNDF; - double MinTrackMomentum; - double MaxTrackMomentum; - double MinTrackEta; - double MaxTrackEta; - unsigned int MaxNrStrips; - unsigned int MinTrackHits; - double MaxTrackChiOverNdf; - bool AllowSaturation; - bool FirstSetOfConstants; - bool Validation; - bool OldGainRemoving; - int CalibrationLevel; - - bool saveSummary; - bool useCalibration; - string m_calibrationPath; - - double tagCondition_NClusters; - double tagCondition_GoodFrac; - - edm::InputTag theTracksLabel; - std::string AlgoMode; - std::string OutputGains; - vector VInputFiles; - - MonitorElement* Charge_Vs_Index; - MonitorElement* Charge_Vs_Index_Absolute; - MonitorElement* Charge_Vs_PathlengthTIB; - MonitorElement* Charge_Vs_PathlengthTOB; - MonitorElement* Charge_Vs_PathlengthTIDP; - MonitorElement* Charge_Vs_PathlengthTIDM; - MonitorElement* Charge_Vs_PathlengthTECP1; - MonitorElement* Charge_Vs_PathlengthTECP2; - MonitorElement* Charge_Vs_PathlengthTECM1; - MonitorElement* Charge_Vs_PathlengthTECM2; - - unsigned int NEvent; - unsigned int NTrack; - unsigned int NClusterStrip; - unsigned int NClusterPixel; - int NStripAPVs; - int NPixelDets; - unsigned int SRun; - unsigned int ERun; - unsigned int GOOD; - unsigned int BAD; - unsigned int MASKED; - - edm::EDGetTokenT> tracksToken; - edm::EDGetTokenT associationsToken; - - private : - class isEqual{ - public: - template bool operator () (const T& PseudoDetId1, const T& PseudoDetId2) { return PseudoDetId1==PseudoDetId2; } - }; - - std::vector APVsCollOrdered; - __gnu_cxx::hash_map, isEqual > APVsColl; + virtual void algoBeginRun(const edm::Run& run, const edm::EventSetup& iSetup) override; + virtual void algoEndRun (const edm::Run& run, const edm::EventSetup& iSetup) override; + virtual void algoBeginJob (const edm::EventSetup& iSetup) override; + virtual void algoEndJob () override; + virtual void algoAnalyze (const edm::Event &, const edm::EventSetup &) override; + + void merge(TH2* A, TH2* B); //needed to add histograms with different number of bins + void algoAnalyzeTheTree(); + void algoComputeMPVandGain(); + void processEvent(); //what really does the job + + void getPeakOfLandau(TH1* InputHisto, double* FitResults, double LowRange=50, double HighRange=5400); + bool IsGoodLandauFit(double* FitResults); + void storeOnTree(TFileService* tfs); + void MakeCalibrationMap(); + bool produceTagFilter(); + + template + inline edm::Handle connect(const T* ptr, edm::EDGetTokenT token, const edm::Event &evt) { + edm::Handle handle; + evt.getByToken(token, handle); + ptr = handle.product(); + return handle; //return handle to keep alive pointer (safety first) + } + + SiStripApvGain* getNewObject() override; + + TFileService *tfs; + DQMStore* dbe; + bool harvestingMode; + double MinNrEntries; + double MaxMPVError; + double MaxChi2OverNDF; + double MinTrackMomentum; + double MaxTrackMomentum; + double MinTrackEta; + double MaxTrackEta; + unsigned int MaxNrStrips; + unsigned int MinTrackHits; + double MaxTrackChiOverNdf; + bool AllowSaturation; + bool FirstSetOfConstants; + bool Validation; + bool OldGainRemoving; + int CalibrationLevel; + + bool saveSummary; + bool useCalibration; + string m_calibrationPath; + + double tagCondition_NClusters; + double tagCondition_GoodFrac; + + std::string AlgoMode; + std::string OutputGains; + vector VInputFiles; + + MonitorElement* Charge_Vs_Index; + MonitorElement* Charge_Vs_Index_Absolute; + MonitorElement* Charge_Vs_PathlengthTIB; + MonitorElement* Charge_Vs_PathlengthTOB; + MonitorElement* Charge_Vs_PathlengthTIDP; + MonitorElement* Charge_Vs_PathlengthTIDM; + MonitorElement* Charge_Vs_PathlengthTECP1; + MonitorElement* Charge_Vs_PathlengthTECP2; + MonitorElement* Charge_Vs_PathlengthTECM1; + MonitorElement* Charge_Vs_PathlengthTECM2; + + unsigned int NEvent; + unsigned int NTrack; + unsigned int NClusterStrip; + unsigned int NClusterPixel; + int NStripAPVs; + int NPixelDets; + unsigned int SRun; + unsigned int ERun; + unsigned int GOOD; + unsigned int BAD; + unsigned int MASKED; + + //data members for processing + unsigned int eventnumber = 0; + unsigned int runnumber = 0; + const std::vector* TrigTech = 0; edm::EDGetTokenT > TrigTech_token_; + + const std::vector* trackchi2ndof = 0; edm::EDGetTokenT > trackchi2ndof_token_; + const std::vector* trackp = 0; edm::EDGetTokenT > trackp_token_; + const std::vector* trackpt = 0; edm::EDGetTokenT > trackpt_token_; + const std::vector* tracketa = 0; edm::EDGetTokenT > tracketa_token_; + const std::vector* trackphi = 0; edm::EDGetTokenT > trackphi_token_; + const std::vector* trackhitsvalid = 0; edm::EDGetTokenT > trackhitsvalid_token_; + + const std::vector* trackindex = 0; edm::EDGetTokenT > trackindex_token_; + const std::vector* rawid = 0; edm::EDGetTokenT > rawid_token_; + const std::vector* localdirx = 0; edm::EDGetTokenT > localdirx_token_; + const std::vector* localdiry = 0; edm::EDGetTokenT > localdiry_token_; + const std::vector* localdirz = 0; edm::EDGetTokenT > localdirz_token_; + const std::vector* firststrip = 0; edm::EDGetTokenT > firststrip_token_; + const std::vector* nstrips = 0; edm::EDGetTokenT > nstrips_token_; + const std::vector* saturation = 0; edm::EDGetTokenT > saturation_token_; + const std::vector* overlapping = 0; edm::EDGetTokenT > overlapping_token_; + const std::vector* farfromedge = 0; edm::EDGetTokenT > farfromedge_token_; + const std::vector* charge = 0; edm::EDGetTokenT > charge_token_; + const std::vector* path = 0; edm::EDGetTokenT > path_token_; + const std::vector* chargeoverpath = 0; edm::EDGetTokenT > chargeoverpath_token_; + const std::vector* amplitude = 0; edm::EDGetTokenT > amplitude_token_; + const std::vector* gainused = 0; edm::EDGetTokenT > gainused_token_; + + string EventPrefix_; //(""); + string EventSuffix_; //(""); + string TrackPrefix_; //("track"); + string TrackSuffix_; //(""); + string CalibPrefix_; //("GainCalibration"); + string CalibSuffix_; //(""); + string tree_path_; + +private : + class isEqual{ + public: + template bool operator () (const T& PseudoDetId1, const T& PseudoDetId2) { return PseudoDetId1==PseudoDetId2; } + }; + + std::vector APVsCollOrdered; + __gnu_cxx::hash_map, isEqual > APVsColl; }; void SiStripGainFromCalibTree::merge(TH2* A, TH2* B){ - if(A->GetNbinsX() == B->GetNbinsX()){ - A->Add(B); - }else{ - for(int x=0;x<=B->GetNbinsX()+1; x++){ + if(A->GetNbinsX() == B->GetNbinsX()){ + A->Add(B); + }else{ + for(int x=0;x<=B->GetNbinsX()+1; x++){ for(int y=0;y<=B->GetNbinsY()+1; y++){ - A->SetBinContent(x,y,A->GetBinContent(x,y)+B->GetBinContent(x,y)); + A->SetBinContent(x,y,A->GetBinContent(x,y)+B->GetBinContent(x,y)); }} - } + } } SiStripGainFromCalibTree::SiStripGainFromCalibTree(const edm::ParameterSet& iConfig) : ConditionDBWriter(iConfig) { - Charge_Vs_Index = NULL;//make sure this is initialized to NULL - OutputGains = iConfig.getParameter("OutputGains"); - theTracksLabel = iConfig.getUntrackedParameter("Tracks"); - - AlgoMode = iConfig.getUntrackedParameter("AlgoMode", "CalibTree"); - MinNrEntries = iConfig.getUntrackedParameter ("minNrEntries" , 20); - MaxMPVError = iConfig.getUntrackedParameter ("maxMPVError" , 500.0); - MaxChi2OverNDF = iConfig.getUntrackedParameter ("maxChi2OverNDF" , 5.0); - MinTrackMomentum = iConfig.getUntrackedParameter ("minTrackMomentum" , 3.0); - MaxTrackMomentum = iConfig.getUntrackedParameter ("maxTrackMomentum" , 99999.0); - MinTrackEta = iConfig.getUntrackedParameter ("minTrackEta" , -5.0); - MaxTrackEta = iConfig.getUntrackedParameter ("maxTrackEta" , 5.0); - MaxNrStrips = iConfig.getUntrackedParameter("maxNrStrips" , 2); - MinTrackHits = iConfig.getUntrackedParameter("MinTrackHits" , 8); - MaxTrackChiOverNdf = iConfig.getUntrackedParameter ("MaxTrackChiOverNdf" , 3); - AllowSaturation = iConfig.getUntrackedParameter ("AllowSaturation" , false); - FirstSetOfConstants = iConfig.getUntrackedParameter ("FirstSetOfConstants", true); - Validation = iConfig.getUntrackedParameter ("Validation" , false); - OldGainRemoving = iConfig.getUntrackedParameter ("OldGainRemoving" , false); - - CalibrationLevel = iConfig.getUntrackedParameter ("CalibrationLevel" , 0); - VInputFiles = iConfig.getUntrackedParameter > ("InputFiles"); - - - useCalibration = iConfig.getUntrackedParameter ("UseCalibration" , false); - m_calibrationPath = iConfig.getUntrackedParameter ("calibrationPath"); - harvestingMode = iConfig.getUntrackedParameter ("harvestingMode" , false); - - tagCondition_NClusters = iConfig.getUntrackedParameter ("NClustersForTagProd" , 2E8); - tagCondition_GoodFrac = iConfig.getUntrackedParameter ("GoodFracForTagProd" , 0.95); - - saveSummary = iConfig.getUntrackedParameter ("saveSummary" , false); - - dbe = edm::Service().operator->(); - dbe->setVerbose(10); - - tracksToken = consumes>(theTracksLabel); - associationsToken = consumes(theTracksLabel); + Charge_Vs_Index = NULL;//make sure this is initialized to NULL + OutputGains = iConfig.getParameter("OutputGains"); + + AlgoMode = iConfig.getUntrackedParameter("AlgoMode", "CalibTree"); + MinNrEntries = iConfig.getUntrackedParameter ("minNrEntries" , 20); + MaxMPVError = iConfig.getUntrackedParameter ("maxMPVError" , 500.0); + MaxChi2OverNDF = iConfig.getUntrackedParameter ("maxChi2OverNDF" , 5.0); + MinTrackMomentum = iConfig.getUntrackedParameter ("minTrackMomentum" , 3.0); + MaxTrackMomentum = iConfig.getUntrackedParameter ("maxTrackMomentum" , 99999.0); + MinTrackEta = iConfig.getUntrackedParameter ("minTrackEta" , -5.0); + MaxTrackEta = iConfig.getUntrackedParameter ("maxTrackEta" , 5.0); + MaxNrStrips = iConfig.getUntrackedParameter("maxNrStrips" , 2); + MinTrackHits = iConfig.getUntrackedParameter("MinTrackHits" , 8); + MaxTrackChiOverNdf = iConfig.getUntrackedParameter ("MaxTrackChiOverNdf" , 3); + AllowSaturation = iConfig.getUntrackedParameter ("AllowSaturation" , false); + FirstSetOfConstants = iConfig.getUntrackedParameter ("FirstSetOfConstants", true); + Validation = iConfig.getUntrackedParameter ("Validation" , false); + OldGainRemoving = iConfig.getUntrackedParameter ("OldGainRemoving" , false); + + CalibrationLevel = iConfig.getUntrackedParameter ("CalibrationLevel" , 0); + VInputFiles = iConfig.getUntrackedParameter > ("InputFiles"); + + + useCalibration = iConfig.getUntrackedParameter ("UseCalibration" , false); + m_calibrationPath = iConfig.getUntrackedParameter ("calibrationPath"); + harvestingMode = iConfig.getUntrackedParameter ("harvestingMode" , false); + + tagCondition_NClusters = iConfig.getUntrackedParameter ("NClustersForTagProd" , 2E8); + tagCondition_GoodFrac = iConfig.getUntrackedParameter ("GoodFracForTagProd" , 0.95); + + saveSummary = iConfig.getUntrackedParameter ("saveSummary" , false); + tree_path_ = iConfig.getUntrackedParameter ("treePath"); + dbe = edm::Service().operator->(); + dbe->setVerbose(10); + + edm::ParameterSet swhallowgain_pset = iConfig.getUntrackedParameter("gain"); + string label = swhallowgain_pset.getUntrackedParameter("label"); + CalibPrefix_ = swhallowgain_pset.getUntrackedParameter("prefix"); + CalibSuffix_ = swhallowgain_pset.getUntrackedParameter("suffix"); + + trackindex_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "trackindex" + CalibSuffix_)); + rawid_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "rawid" + CalibSuffix_)); + localdirx_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "localdirx" + CalibSuffix_)); + localdiry_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "localdiry" + CalibSuffix_)); + localdirz_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "localdirz" + CalibSuffix_)); + firststrip_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "firststrip" + CalibSuffix_)); + nstrips_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "nstrips" + CalibSuffix_)); + saturation_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "saturation" + CalibSuffix_)); + overlapping_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "overlapping" + CalibSuffix_)); + farfromedge_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "farfromedge" + CalibSuffix_)); + charge_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "charge" + CalibSuffix_)); + path_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "path" + CalibSuffix_)); + chargeoverpath_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "chargeoverpath"+ CalibSuffix_)); + amplitude_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "amplitude" + CalibSuffix_)); + gainused_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "gainused" + CalibSuffix_)); + + edm::ParameterSet evtinfo_pset = iConfig.getUntrackedParameter("evtinfo"); + label = evtinfo_pset.getUntrackedParameter("label"); + EventPrefix_ = evtinfo_pset.getUntrackedParameter("prefix"); + EventSuffix_ = evtinfo_pset.getUntrackedParameter("suffix"); + TrigTech_token_ = consumes >(edm::InputTag(label, EventPrefix_ + "TrigTech" + EventSuffix_)); + + edm::ParameterSet track_pset = iConfig.getUntrackedParameter("tracks"); + label = track_pset.getUntrackedParameter("label"); + TrackPrefix_ = track_pset.getUntrackedParameter("prefix"); + TrackSuffix_ = track_pset.getUntrackedParameter("suffix"); + + trackchi2ndof_token_ = consumes >(edm::InputTag(label, TrackPrefix_ + "chi2ndof" + TrackSuffix_)); + trackp_token_ = consumes >(edm::InputTag(label, TrackPrefix_ + "momentum" + TrackSuffix_)); + trackpt_token_ = consumes >(edm::InputTag(label, TrackPrefix_ + "pt" + TrackSuffix_)); + tracketa_token_ = consumes >(edm::InputTag(label, TrackPrefix_ + "eta" + TrackSuffix_)); + trackphi_token_ = consumes >(edm::InputTag(label, TrackPrefix_ + "phi" + TrackSuffix_)); + trackhitsvalid_token_ = consumes >(edm::InputTag(label, TrackPrefix_ + "hitsvalid" + TrackSuffix_)); } void SiStripGainFromCalibTree::algoBeginJob(const edm::EventSetup& iSetup) { - dbe->setCurrentFolder("AlCaReco/SiStripGains/"); - if(AlgoMode != "PCL" or harvestingMode)dbe->setCurrentFolder("AlCaReco/SiStripGainsHarvesting/"); + dbe->setCurrentFolder("AlCaReco/SiStripGains/"); + if(AlgoMode != "PCL" or harvestingMode)dbe->setCurrentFolder("AlCaReco/SiStripGainsHarvesting/"); - Charge_Vs_Index = dbe->book2D("Charge_Vs_Index" , "Charge_Vs_Index" , 88625, 0 , 88624,2000,0,4000); - Charge_Vs_Index_Absolute = dbe->book2D("Charge_Vs_Index_Absolute" , "Charge_Vs_Index_Absolute" , 88625, 0 , 88624,1000,0,4000); + Charge_Vs_Index = dbe->book2D("Charge_Vs_Index" , "Charge_Vs_Index" , 88625, 0 , 88624,2000,0,4000); + Charge_Vs_Index_Absolute = dbe->book2D("Charge_Vs_Index_Absolute" , "Charge_Vs_Index_Absolute" , 88625, 0 , 88624,1000,0,4000); // Charge_Vs_Index = dbe->book2D("Charge_Vs_Index" , "Charge_Vs_Index" , 72785, 0 , 72784,1000,0,2000); // Charge_Vs_Index_Absolute = dbe->book2D("Charge_Vs_Index_Absolute" , "Charge_Vs_Index_Absolute" , 72785, 0 , 72784, 500,0,2000); - Charge_Vs_PathlengthTIB = dbe->book2D("Charge_Vs_PathlengthTIB" , "Charge_Vs_PathlengthTIB" , 20 , 0.3 , 1.3 , 250,0,2000); - Charge_Vs_PathlengthTOB = dbe->book2D("Charge_Vs_PathlengthTOB" , "Charge_Vs_PathlengthTOB" , 20 , 0.3 , 1.3 , 250,0,2000); - Charge_Vs_PathlengthTIDP = dbe->book2D("Charge_Vs_PathlengthTIDP" , "Charge_Vs_PathlengthTIDP" , 20 , 0.3 , 1.3 , 250,0,2000); - Charge_Vs_PathlengthTIDM = dbe->book2D("Charge_Vs_PathlengthTIDM" , "Charge_Vs_PathlengthTIDM" , 20 , 0.3 , 1.3 , 250,0,2000); - Charge_Vs_PathlengthTECP1 = dbe->book2D("Charge_Vs_PathlengthTECP1", "Charge_Vs_PathlengthTECP1", 20 , 0.3 , 1.3 , 250,0,2000); - Charge_Vs_PathlengthTECP2 = dbe->book2D("Charge_Vs_PathlengthTECP2", "Charge_Vs_PathlengthTECP2", 20 , 0.3 , 1.3 , 250,0,2000); - Charge_Vs_PathlengthTECM1 = dbe->book2D("Charge_Vs_PathlengthTECM1", "Charge_Vs_PathlengthTECM1", 20 , 0.3 , 1.3 , 250,0,2000); - Charge_Vs_PathlengthTECM2 = dbe->book2D("Charge_Vs_PathlengthTECM2", "Charge_Vs_PathlengthTECM2", 20 , 0.3 , 1.3 , 250,0,2000); - - edm::ESHandle tkGeom; - iSetup.get().get( tkGeom ); - auto const & Det = tkGeom->dets(); - - NPixelDets = 0; - NStripAPVs = 0; - unsigned int Index=0; - for(unsigned int i=0;igeographicalId(); - int SubDet = Detid.subdetId(); - - if( SubDet == StripSubdetector::TIB || SubDet == StripSubdetector::TID || - SubDet == StripSubdetector::TOB || SubDet == StripSubdetector::TEC ){ - - auto DetUnit = dynamic_cast (Det[i]); - if(!DetUnit)continue; - - const StripTopology& Topo = DetUnit->specificTopology(); - unsigned int NAPV = Topo.nstrips()/128; - - for(unsigned int j=0;jIndex = Index; - APV->Bin = -1; - APV->DetId = Detid.rawId(); - APV->APVId = j; - APV->SubDet = SubDet; - APV->FitMPV = -1; - APV->FitMPVErr = -1; - APV->FitWidth = -1; - APV->FitWidthErr = -1; - APV->FitChi2 = -1; - APV->FitNorm = -1; - APV->Gain = -1; - APV->PreviousGain = 1; - APV->PreviousGainTick = 1; - APV->x = DetUnit->position().basicVector().x(); - APV->y = DetUnit->position().basicVector().y(); - APV->z = DetUnit->position().basicVector().z(); - APV->Eta = DetUnit->position().basicVector().eta(); - APV->Phi = DetUnit->position().basicVector().phi(); - APV->R = DetUnit->position().basicVector().transverse(); - APV->Thickness = DetUnit->surface().bounds().thickness(); - APV->NEntries = 0; - APV->isMasked = false; - - APVsCollOrdered.push_back(APV); - APVsColl[(APV->DetId<<4) | APV->APVId] = APV; - Index++; - NStripAPVs++; - } - } - } - - for(unsigned int i=0;i make transition simpler - DetId Detid = Det[i]->geographicalId(); - int SubDet = Detid.subdetId(); - if( SubDet == PixelSubdetector::PixelBarrel || PixelSubdetector::PixelEndcap ){ - auto DetUnit = dynamic_cast (Det[i]); - if(!DetUnit) continue; + Charge_Vs_PathlengthTIB = dbe->book2D("Charge_Vs_PathlengthTIB" , "Charge_Vs_PathlengthTIB" , 20 , 0.3 , 1.3 , 250,0,2000); + Charge_Vs_PathlengthTOB = dbe->book2D("Charge_Vs_PathlengthTOB" , "Charge_Vs_PathlengthTOB" , 20 , 0.3 , 1.3 , 250,0,2000); + Charge_Vs_PathlengthTIDP = dbe->book2D("Charge_Vs_PathlengthTIDP" , "Charge_Vs_PathlengthTIDP" , 20 , 0.3 , 1.3 , 250,0,2000); + Charge_Vs_PathlengthTIDM = dbe->book2D("Charge_Vs_PathlengthTIDM" , "Charge_Vs_PathlengthTIDM" , 20 , 0.3 , 1.3 , 250,0,2000); + Charge_Vs_PathlengthTECP1 = dbe->book2D("Charge_Vs_PathlengthTECP1", "Charge_Vs_PathlengthTECP1", 20 , 0.3 , 1.3 , 250,0,2000); + Charge_Vs_PathlengthTECP2 = dbe->book2D("Charge_Vs_PathlengthTECP2", "Charge_Vs_PathlengthTECP2", 20 , 0.3 , 1.3 , 250,0,2000); + Charge_Vs_PathlengthTECM1 = dbe->book2D("Charge_Vs_PathlengthTECM1", "Charge_Vs_PathlengthTECM1", 20 , 0.3 , 1.3 , 250,0,2000); + Charge_Vs_PathlengthTECM2 = dbe->book2D("Charge_Vs_PathlengthTECM2", "Charge_Vs_PathlengthTECM2", 20 , 0.3 , 1.3 , 250,0,2000); + + edm::ESHandle tkGeom; + iSetup.get().get( tkGeom ); + auto const & Det = tkGeom->dets(); + + NPixelDets = 0; + NStripAPVs = 0; + unsigned int Index=0; + for(unsigned int i=0;igeographicalId(); + int SubDet = Detid.subdetId(); + + if( SubDet == StripSubdetector::TIB || SubDet == StripSubdetector::TID || + SubDet == StripSubdetector::TOB || SubDet == StripSubdetector::TEC ){ + + auto DetUnit = dynamic_cast (Det[i]); + if(!DetUnit)continue; + + const StripTopology& Topo = DetUnit->specificTopology(); + unsigned int NAPV = Topo.nstrips()/128; + + for(unsigned int j=0;jIndex = Index; + APV->Bin = -1; + APV->DetId = Detid.rawId(); + APV->APVId = j; + APV->SubDet = SubDet; + APV->FitMPV = -1; + APV->FitMPVErr = -1; + APV->FitWidth = -1; + APV->FitWidthErr = -1; + APV->FitChi2 = -1; + APV->FitNorm = -1; + APV->Gain = -1; + APV->PreviousGain = 1; + APV->PreviousGainTick = 1; + APV->x = DetUnit->position().basicVector().x(); + APV->y = DetUnit->position().basicVector().y(); + APV->z = DetUnit->position().basicVector().z(); + APV->Eta = DetUnit->position().basicVector().eta(); + APV->Phi = DetUnit->position().basicVector().phi(); + APV->R = DetUnit->position().basicVector().transverse(); + APV->Thickness = DetUnit->surface().bounds().thickness(); + APV->NEntries = 0; + APV->isMasked = false; + + APVsCollOrdered.push_back(APV); + APVsColl[(APV->DetId<<4) | APV->APVId] = APV; + Index++; + NStripAPVs++; + } + } + } + + for(unsigned int i=0;i make transition simpler + DetId Detid = Det[i]->geographicalId(); + int SubDet = Detid.subdetId(); + if( SubDet == PixelSubdetector::PixelBarrel || PixelSubdetector::PixelEndcap ){ + auto DetUnit = dynamic_cast (Det[i]); + if(!DetUnit) continue; - const PixelTopology& Topo = DetUnit->specificTopology(); - unsigned int NROCRow = Topo.nrows()/(80.); - unsigned int NROCCol = Topo.ncolumns()/(52.); + const PixelTopology& Topo = DetUnit->specificTopology(); + unsigned int NROCRow = Topo.nrows()/(80.); + unsigned int NROCCol = Topo.ncolumns()/(52.); - for(unsigned int j=0;jIndex = Index; - APV->Bin = -1; - APV->DetId = Detid.rawId(); - APV->APVId = (j<<3 | i); - APV->SubDet = SubDet; - APV->FitMPV = -1; - APV->FitMPVErr = -1; - APV->FitWidth = -1; - APV->FitWidthErr = -1; - APV->FitChi2 = -1; - APV->Gain = -1; - APV->PreviousGain = 1; - APV->x = DetUnit->position().basicVector().x(); - APV->y = DetUnit->position().basicVector().y(); - APV->z = DetUnit->position().basicVector().z(); - APV->Eta = DetUnit->position().basicVector().eta(); - APV->Phi = DetUnit->position().basicVector().phi(); - APV->R = DetUnit->position().basicVector().transverse(); - APV->Thickness = DetUnit->surface().bounds().thickness(); - APV->isMasked = false; //SiPixelQuality_->IsModuleBad(Detid.rawId()); - APV->NEntries = 0; - - APVsCollOrdered.push_back(APV); - APVsColl[(APV->DetId<<4) | APV->APVId] = APV; - Index++; - NPixelDets++; - }} - } - } - - - MakeCalibrationMap(); - - NEvent = 0; - NTrack = 0; - NClusterStrip = 0; - NClusterPixel = 0; - SRun = 1<<31; - ERun = 0; - GOOD = 0; - BAD = 0; - MASKED = 0; + stAPVGain* APV = new stAPVGain; + APV->Index = Index; + APV->Bin = -1; + APV->DetId = Detid.rawId(); + APV->APVId = (j<<3 | i); + APV->SubDet = SubDet; + APV->FitMPV = -1; + APV->FitMPVErr = -1; + APV->FitWidth = -1; + APV->FitWidthErr = -1; + APV->FitChi2 = -1; + APV->Gain = -1; + APV->PreviousGain = 1; + APV->x = DetUnit->position().basicVector().x(); + APV->y = DetUnit->position().basicVector().y(); + APV->z = DetUnit->position().basicVector().z(); + APV->Eta = DetUnit->position().basicVector().eta(); + APV->Phi = DetUnit->position().basicVector().phi(); + APV->R = DetUnit->position().basicVector().transverse(); + APV->Thickness = DetUnit->surface().bounds().thickness(); + APV->isMasked = false; //SiPixelQuality_->IsModuleBad(Detid.rawId()); + APV->NEntries = 0; + + APVsCollOrdered.push_back(APV); + APVsColl[(APV->DetId<<4) | APV->APVId] = APV; + Index++; + NPixelDets++; + }} + } + } + + + MakeCalibrationMap(); + + NEvent = 0; + NTrack = 0; + NClusterStrip = 0; + NClusterPixel = 0; + SRun = 1<<31; + ERun = 0; + GOOD = 0; + BAD = 0; + MASKED = 0; } void SiStripGainFromCalibTree::algoBeginRun(const edm::Run& run, const edm::EventSetup& iSetup) { - edm::ESHandle gainHandle; - iSetup.get().get(gainHandle); - if(!gainHandle.isValid()){edm::LogError("SiStripGainFromCalibTree")<< "gainHandle is not valid\n"; exit(0);} + edm::ESHandle gainHandle; + iSetup.get().get(gainHandle); + if(!gainHandle.isValid()){edm::LogError("SiStripGainFromCalibTree")<< "gainHandle is not valid\n"; exit(0);} - edm::ESHandle SiStripQuality_; - iSetup.get().get(SiStripQuality_); + edm::ESHandle SiStripQuality_; + iSetup.get().get(SiStripQuality_); - for(unsigned int a=0;aisMasked = SiStripQuality_->IsApvBad(APV->DetId,APV->APVId); + APV->isMasked = SiStripQuality_->IsApvBad(APV->DetId,APV->APVId); // if(!FirstSetOfConstants){ - if(gainHandle->getNumberOfTags()!=2){edm::LogError("SiStripGainFromCalibTree")<< "NUMBER OF GAIN TAG IS EXPECTED TO BE 2\n";fflush(stdout);exit(0);}; - float newPreviousGain = gainHandle->getApvGain(APV->APVId,gainHandle->getRange(APV->DetId, 1),1); - if(APV->PreviousGain!=1 and newPreviousGain!=APV->PreviousGain)edm::LogWarning("SiStripGainFromCalibTree")<< "WARNING: ParticleGain in the global tag changed\n"; - APV->PreviousGain = newPreviousGain; + if(gainHandle->getNumberOfTags()!=2){edm::LogError("SiStripGainFromCalibTree")<< "NUMBER OF GAIN TAG IS EXPECTED TO BE 2\n";fflush(stdout);exit(0);}; + float newPreviousGain = gainHandle->getApvGain(APV->APVId,gainHandle->getRange(APV->DetId, 1),1); + if(APV->PreviousGain!=1 and newPreviousGain!=APV->PreviousGain)edm::LogWarning("SiStripGainFromCalibTree")<< "WARNING: ParticleGain in the global tag changed\n"; + APV->PreviousGain = newPreviousGain; - float newPreviousGainTick = gainHandle->getApvGain(APV->APVId,gainHandle->getRange(APV->DetId, 0),1); - if(APV->PreviousGainTick!=1 and newPreviousGainTick!=APV->PreviousGainTick)edm::LogWarning("SiStripGainFromCalibTree")<< "WARNING: TickMarkGain in the global tag changed\n"; - APV->PreviousGainTick = newPreviousGainTick; + float newPreviousGainTick = gainHandle->getApvGain(APV->APVId,gainHandle->getRange(APV->DetId, 0),1); + if(APV->PreviousGainTick!=1 and newPreviousGainTick!=APV->PreviousGainTick)edm::LogWarning("SiStripGainFromCalibTree")<< "WARNING: TickMarkGain in the global tag changed\n"; + APV->PreviousGainTick = newPreviousGainTick; - //printf("DETID = %7i APVID=%1i Previous Gain=%8.4f (G1) x %8.4f (G2)\n",APV->DetId,APV->APVId,APV->PreviousGainTick, APV->PreviousGain); + //printf("DETID = %7i APVID=%1i Previous Gain=%8.4f (G1) x %8.4f (G2)\n",APV->DetId,APV->APVId,APV->PreviousGainTick, APV->PreviousGain); // } - } + } } void SiStripGainFromCalibTree::algoEndRun(const edm::Run& run, const edm::EventSetup& iSetup){ - if(AlgoMode == "PCL" && !harvestingMode)return;//nothing to do in that case + if(AlgoMode == "PCL" && !harvestingMode)return;//nothing to do in that case - if(AlgoMode == "PCL" and harvestingMode){ - // Load the 2D histograms from the DQM objects - // When running in AlCaHarvesting mode the histos are already booked and should be just retrieved from - // DQMStore so that they can be used in the fit + if(AlgoMode == "PCL" and harvestingMode){ + // Load the 2D histograms from the DQM objects + // When running in AlCaHarvesting mode the histos are already booked and should be just retrieved from + // DQMStore so that they can be used in the fit // edm::LogInfo("SiStripGainFromCalibTree")<< "Harvesting " << (dbe->get("AlCaReco/SiStripGains/Charge_Vs_Index"))->getTH2F()->GetEntries() << " more clusters\n"; - merge(Charge_Vs_Index ->getTH2F(), (dbe->get("AlCaReco/SiStripGains/Charge_Vs_Index"))->getTH2F() ); + merge(Charge_Vs_Index ->getTH2F(), (dbe->get("AlCaReco/SiStripGains/Charge_Vs_Index"))->getTH2F() ); // Charge_Vs_Index ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_Index"))->getTH2F()); - merge(Charge_Vs_Index_Absolute ->getTH2F(), (dbe->get("AlCaReco/SiStripGains/Charge_Vs_Index_Absolute"))->getTH2F() ); + merge(Charge_Vs_Index_Absolute ->getTH2F(), (dbe->get("AlCaReco/SiStripGains/Charge_Vs_Index_Absolute"))->getTH2F() ); // Charge_Vs_Index_Absolute ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_Index_Absolute"))->getTH2F()); - Charge_Vs_PathlengthTIB ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTIB"))->getTH2F()); - Charge_Vs_PathlengthTOB ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTOB"))->getTH2F()); - Charge_Vs_PathlengthTIDP ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTIDP"))->getTH2F()); - Charge_Vs_PathlengthTIDM ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTIDM"))->getTH2F()); - Charge_Vs_PathlengthTECP1 ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTECP1"))->getTH2F()); - Charge_Vs_PathlengthTECP2 ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTECP2"))->getTH2F()); - Charge_Vs_PathlengthTECM1 ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTECM1"))->getTH2F()); - Charge_Vs_PathlengthTECM2 ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTECM2"))->getTH2F()); - } + Charge_Vs_PathlengthTIB ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTIB"))->getTH2F()); + Charge_Vs_PathlengthTOB ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTOB"))->getTH2F()); + Charge_Vs_PathlengthTIDP ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTIDP"))->getTH2F()); + Charge_Vs_PathlengthTIDM ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTIDM"))->getTH2F()); + Charge_Vs_PathlengthTECP1 ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTECP1"))->getTH2F()); + Charge_Vs_PathlengthTECP2 ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTECP2"))->getTH2F()); + Charge_Vs_PathlengthTECM1 ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTECM1"))->getTH2F()); + Charge_Vs_PathlengthTECM2 ->getTH2F()->Add((dbe->get("AlCaReco/SiStripGains/Charge_Vs_PathlengthTECM2"))->getTH2F()); + } } void SiStripGainFromCalibTree::algoEndJob() { - if(AlgoMode == "PCL" && !harvestingMode)return;//nothing to do in that case - - if(AlgoMode == "CalibTree"){ - // Loop on calibTrees to fill the 2D histograms - algoAnalyzeTheTree(); - }else if(harvestingMode){ - NClusterStrip = Charge_Vs_Index->getTH2F()->Integral(0,NStripAPVs+1, 0, 99999 ); - NClusterPixel = Charge_Vs_Index->getTH2F()->Integral(NStripAPVs+2, NStripAPVs+NPixelDets+2, 0, 99999 ); - } - - // Now that we have the full statistics we can extract the information of the 2D histograms - algoComputeMPVandGain(); + if(AlgoMode == "PCL" && !harvestingMode)return;//nothing to do in that case + + if(AlgoMode == "CalibTree"){ + // Loop on calibTrees to fill the 2D histograms + algoAnalyzeTheTree(); + }else if(harvestingMode){ + NClusterStrip = Charge_Vs_Index->getTH2F()->Integral(0,NStripAPVs+1, 0, 99999 ); + NClusterPixel = Charge_Vs_Index->getTH2F()->Integral(NStripAPVs+2, NStripAPVs+NPixelDets+2, 0, 99999 ); + } + + // Now that we have the full statistics we can extract the information of the 2D histograms + algoComputeMPVandGain(); - if(AlgoMode != "PCL" or saveSummary){ - //also save the 2D monitor elements to this file as TH2D tfs - tfs = edm::Service().operator->(); - tfs->make (*Charge_Vs_Index->getTH2F()); - tfs->make (*Charge_Vs_Index_Absolute->getTH2F()); - tfs->make (*Charge_Vs_PathlengthTIB->getTH2F()); - tfs->make (*Charge_Vs_PathlengthTOB->getTH2F()); - tfs->make (*Charge_Vs_PathlengthTIDP->getTH2F()); - tfs->make (*Charge_Vs_PathlengthTIDM->getTH2F()); - tfs->make (*Charge_Vs_PathlengthTECP1->getTH2F()); - tfs->make (*Charge_Vs_PathlengthTECP2->getTH2F()); - tfs->make (*Charge_Vs_PathlengthTECM1->getTH2F()); - tfs->make (*Charge_Vs_PathlengthTECM2->getTH2F()); - - - storeOnTree(tfs); - } + if(AlgoMode != "PCL" or saveSummary){ + //also save the 2D monitor elements to this file as TH2D tfs + tfs = edm::Service().operator->(); + tfs->make (*Charge_Vs_Index->getTH2F()); + tfs->make (*Charge_Vs_Index_Absolute->getTH2F()); + tfs->make (*Charge_Vs_PathlengthTIB->getTH2F()); + tfs->make (*Charge_Vs_PathlengthTOB->getTH2F()); + tfs->make (*Charge_Vs_PathlengthTIDP->getTH2F()); + tfs->make (*Charge_Vs_PathlengthTIDM->getTH2F()); + tfs->make (*Charge_Vs_PathlengthTECP1->getTH2F()); + tfs->make (*Charge_Vs_PathlengthTECP2->getTH2F()); + tfs->make (*Charge_Vs_PathlengthTECM1->getTH2F()); + tfs->make (*Charge_Vs_PathlengthTECM2->getTH2F()); + + + storeOnTree(tfs); + } } void SiStripGainFromCalibTree::getPeakOfLandau(TH1* InputHisto, double* FitResults, double LowRange, double HighRange) { - FitResults[0] = -0.5; //MPV - FitResults[1] = 0; //MPV error - FitResults[2] = -0.5; //Width - FitResults[3] = 0; //Width error - FitResults[4] = -0.5; //Fit Chi2/NDF - FitResults[5] = 0; //Normalization - - if( InputHisto->GetEntries() < MinNrEntries)return; - - // perform fit with standard landau - TF1* MyLandau = new TF1("MyLandau","landau",LowRange, HighRange); - MyLandau->SetParameter(1,300); - InputHisto->Fit(MyLandau,"0QR WW"); - - // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma) - FitResults[0] = MyLandau->GetParameter(1); //MPV - FitResults[1] = MyLandau->GetParError(1); //MPV error - FitResults[2] = MyLandau->GetParameter(2); //Width - FitResults[3] = MyLandau->GetParError(2); //Width error - FitResults[4] = MyLandau->GetChisquare() / MyLandau->GetNDF(); //Fit Chi2/NDF - FitResults[5] = MyLandau->GetParameter(0); - - delete MyLandau; + FitResults[0] = -0.5; //MPV + FitResults[1] = 0; //MPV error + FitResults[2] = -0.5; //Width + FitResults[3] = 0; //Width error + FitResults[4] = -0.5; //Fit Chi2/NDF + FitResults[5] = 0; //Normalization + + if( InputHisto->GetEntries() < MinNrEntries)return; + + // perform fit with standard landau + TF1* MyLandau = new TF1("MyLandau","landau",LowRange, HighRange); + MyLandau->SetParameter(1,300); + InputHisto->Fit(MyLandau,"0QR WW"); + + // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma) + FitResults[0] = MyLandau->GetParameter(1); //MPV + FitResults[1] = MyLandau->GetParError(1); //MPV error + FitResults[2] = MyLandau->GetParameter(2); //Width + FitResults[3] = MyLandau->GetParError(2); //Width error + FitResults[4] = MyLandau->GetChisquare() / MyLandau->GetNDF(); //Fit Chi2/NDF + FitResults[5] = MyLandau->GetParameter(0); + + delete MyLandau; } bool SiStripGainFromCalibTree::IsGoodLandauFit(double* FitResults){ - if(FitResults[0] <= 0 )return false; + if(FitResults[0] <= 0 )return false; // if(FitResults[1] > MaxMPVError )return false; // if(FitResults[4] > MaxChi2OverNDF)return false; - return true; + return true; } +void SiStripGainFromCalibTree::processEvent() { + if(runnumberERun)ERun=runnumber; -void SiStripGainFromCalibTree::algoAnalyzeTheTree() -{ - for(unsigned int i=0;i %s\n",i+1, (int)VInputFiles.size(), (char*)(VInputFiles[i].c_str())); fflush(stdout); - TChain* tree = new TChain("gainCalibrationTree/tree"); - tree->Add(VInputFiles[i].c_str()); - - TString EventPrefix(""); - TString EventSuffix(""); - - TString TrackPrefix("track"); - TString TrackSuffix(""); - - TString CalibPrefix("GainCalibration"); - TString CalibSuffix(""); - - unsigned int eventnumber = 0; tree->SetBranchAddress(EventPrefix + "event" + EventSuffix, &eventnumber , NULL); - unsigned int runnumber = 0; tree->SetBranchAddress(EventPrefix + "run" + EventSuffix, &runnumber , NULL); - std::vector* TrigTech = 0; tree->SetBranchAddress(EventPrefix + "TrigTech" + EventSuffix, &TrigTech , NULL); - - std::vector* trackchi2ndof = 0; tree->SetBranchAddress(TrackPrefix + "chi2ndof" + TrackSuffix, &trackchi2ndof , NULL); - std::vector* trackp = 0; tree->SetBranchAddress(TrackPrefix + "momentum" + TrackSuffix, &trackp , NULL); - std::vector* trackpt = 0; tree->SetBranchAddress(TrackPrefix + "pt" + TrackSuffix, &trackpt , NULL); - std::vector* tracketa = 0; tree->SetBranchAddress(TrackPrefix + "eta" + TrackSuffix, &tracketa , NULL); - std::vector* trackphi = 0; tree->SetBranchAddress(TrackPrefix + "phi" + TrackSuffix, &trackphi , NULL); - std::vector* trackhitsvalid = 0; tree->SetBranchAddress(TrackPrefix + "hitsvalid" + TrackSuffix, &trackhitsvalid, NULL); - - std::vector* trackindex = 0; tree->SetBranchAddress(CalibPrefix + "trackindex" + CalibSuffix, &trackindex , NULL); - std::vector* rawid = 0; tree->SetBranchAddress(CalibPrefix + "rawid" + CalibSuffix, &rawid , NULL); - std::vector* localdirx = 0; tree->SetBranchAddress(CalibPrefix + "localdirx" + CalibSuffix, &localdirx , NULL); - std::vector* localdiry = 0; tree->SetBranchAddress(CalibPrefix + "localdiry" + CalibSuffix, &localdiry , NULL); - std::vector* localdirz = 0; tree->SetBranchAddress(CalibPrefix + "localdirz" + CalibSuffix, &localdirz , NULL); - std::vector* firststrip = 0; tree->SetBranchAddress(CalibPrefix + "firststrip" + CalibSuffix, &firststrip , NULL); - std::vector* nstrips = 0; tree->SetBranchAddress(CalibPrefix + "nstrips" + CalibSuffix, &nstrips , NULL); - std::vector* saturation = 0; tree->SetBranchAddress(CalibPrefix + "saturation" + CalibSuffix, &saturation , NULL); - std::vector* overlapping = 0; tree->SetBranchAddress(CalibPrefix + "overlapping" + CalibSuffix, &overlapping , NULL); - std::vector* farfromedge = 0; tree->SetBranchAddress(CalibPrefix + "farfromedge" + CalibSuffix, &farfromedge , NULL); - std::vector* charge = 0; tree->SetBranchAddress(CalibPrefix + "charge" + CalibSuffix, &charge , NULL); - std::vector* path = 0; tree->SetBranchAddress(CalibPrefix + "path" + CalibSuffix, &path , NULL); - std::vector* chargeoverpath = 0; tree->SetBranchAddress(CalibPrefix + "chargeoverpath" + CalibSuffix, &chargeoverpath, NULL); - std::vector* amplitude = 0; tree->SetBranchAddress(CalibPrefix + "amplitude" + CalibSuffix, &litude , NULL); - std::vector* gainused = 0; tree->SetBranchAddress(CalibPrefix + "gainused" + CalibSuffix, &gainused , NULL); - - - printf("Number of Events = %i + %i = %i\n",NEvent,(unsigned int)tree->GetEntries(),(unsigned int)(NEvent+tree->GetEntries())); - printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n"); - printf("Looping on the Tree :"); - int TreeStep = tree->GetEntries()/50;if(TreeStep<=1)TreeStep=1; - for (unsigned int ientry = 0; ientry < tree->GetEntries(); ientry++) { - if(ientry%TreeStep==0){printf(".");fflush(stdout);} - tree->GetEntry(ientry); + NEvent++; + NTrack+=(*trackp).size(); - if(runnumberERun)ERun=runnumber; + unsigned int FirstAmplitude=0; + for(unsigned int i=0;i<(*chargeoverpath).size();i++){ + FirstAmplitude+=(*nstrips)[i]; + int TI = (*trackindex)[i]; + //printf("%i - %i - %i %i %i\n", (int)(*rawid)[i], (int)(*firststrip)[i]/128, (int)(*farfromedge)[i], (int)(*overlapping)[i], (int)(*saturation )[i] ); + if((*tracketa )[TI] < MinTrackEta )continue; + if((*tracketa )[TI] > MaxTrackEta )continue; + if((*trackp )[TI] < MinTrackMomentum )continue; + if((*trackp )[TI] > MaxTrackMomentum )continue; + if((*trackhitsvalid)[TI] < MinTrackHits )continue; + if((*trackchi2ndof )[TI] > MaxTrackChiOverNdf )continue; - NEvent++; - NTrack+=(*trackp).size(); + stAPVGain* APV = APVsColl[((*rawid)[i]<<4) | ((*firststrip)[i]/128)]; //works for both strip and pixel thanks to firstStrip encoding for pixel in the calibTree - unsigned int FirstAmplitude=0; - for(unsigned int i=0;i<(*chargeoverpath).size();i++){ - FirstAmplitude+=(*nstrips)[i]; - int TI = (*trackindex)[i]; - //printf("%i - %i - %i %i %i\n", (int)(*rawid)[i], (int)(*firststrip)[i]/128, (int)(*farfromedge)[i], (int)(*overlapping)[i], (int)(*saturation )[i] ); - if((*tracketa )[TI] < MinTrackEta )continue; - if((*tracketa )[TI] > MaxTrackEta )continue; - if((*trackp )[TI] < MinTrackMomentum )continue; - if((*trackp )[TI] > MaxTrackMomentum )continue; - if((*trackhitsvalid)[TI] < MinTrackHits )continue; - if((*trackchi2ndof )[TI] > MaxTrackChiOverNdf )continue; + if(APV->SubDet>2 && (*farfromedge)[i] == false )continue; + if(APV->SubDet>2 && (*overlapping)[i] == true )continue; + if(APV->SubDet>2 && (*saturation )[i] && !AllowSaturation)continue; + if(APV->SubDet>2 && (*nstrips )[i] > MaxNrStrips )continue; - stAPVGain* APV = APVsColl[((*rawid)[i]<<4) | ((*firststrip)[i]/128)]; //works for both strip and pixel thanks to firstStrip encoding for pixel in the calibTree - if(APV->SubDet>2 && (*farfromedge)[i] == false )continue; - if(APV->SubDet>2 && (*overlapping)[i] == true )continue; - if(APV->SubDet>2 && (*saturation )[i] && !AllowSaturation)continue; - if(APV->SubDet>2 && (*nstrips )[i] > MaxNrStrips )continue; + //printf("detId=%7i run=%7i event=%9i charge=%5i cs=%3i\n",(*rawid)[i],runnumber,eventnumber,(*charge)[i],(*nstrips)[i]); - - //printf("detId=%7i run=%7i event=%9i charge=%5i cs=%3i\n",(*rawid)[i],runnumber,eventnumber,(*charge)[i],(*nstrips)[i]); - - //double trans = atan2((*localdiry)[i],(*localdirx)[i])*(180/3.14159265); - //double alpha = acos ((*localdirx)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265); - //double beta = acos ((*localdiry)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265); + //double trans = atan2((*localdiry)[i],(*localdirx)[i])*(180/3.14159265); + //double alpha = acos ((*localdirx)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265); + //double beta = acos ((*localdiry)[i] / sqrt( pow((*localdirx)[i],2) + pow((*localdirz)[i],2) ) ) * (180/3.14159265); - //printf("NStrip = %i : Charge = %i --> Path = %f --> ChargeOverPath=%f\n",(*nstrips)[i],(*charge)[i],(*path)[i],(*chargeoverpath)[i]); - //printf("Amplitudes: "); - //for(unsigned int a=0;a<(*nstrips)[i];a++){printf("%i ",(*amplitude)[FirstAmplitude+a]);} - //printf("\n"); + //printf("NStrip = %i : Charge = %i --> Path = %f --> ChargeOverPath=%f\n",(*nstrips)[i],(*charge)[i],(*path)[i],(*chargeoverpath)[i]); + //printf("Amplitudes: "); + //for(unsigned int a=0;a<(*nstrips)[i];a++){printf("%i ",(*amplitude)[FirstAmplitude+a]);} + //printf("\n"); - if(APV->SubDet>2){NClusterStrip++;}else{NClusterPixel++;} + if(APV->SubDet>2){NClusterStrip++;}else{NClusterPixel++;} - int Charge = 0; - if(APV->SubDet>2 && (useCalibration || !FirstSetOfConstants)){ - bool Saturation = false; - for(unsigned int s=0;s<(*nstrips)[i];s++){ - int StripCharge = (*amplitude)[FirstAmplitude-(*nstrips)[i]+s]; - if(useCalibration && !FirstSetOfConstants){ StripCharge=(int)(StripCharge*(APV->PreviousGain/APV->CalibGain)); - }else if(useCalibration){ StripCharge=(int)(StripCharge/APV->CalibGain); - }else if(!FirstSetOfConstants){ StripCharge=(int)(StripCharge*APV->PreviousGain);} - if(StripCharge>1024){ - StripCharge = 255; - Saturation = true; - }else if(StripCharge>254){ - StripCharge = 254; - Saturation = true; - } - Charge += StripCharge; - } - if(Saturation && !AllowSaturation)continue; - }else if(APV->SubDet>2){ - Charge = (*charge)[i]; - }else{ - Charge = (*charge)[i]/265.0; //expected scale factor between pixel and strip charge - } - - //printf("ChargeDifference = %i Vs %i with Gain = %f\n",(*charge)[i],Charge,APV->CalibGain); - - double ClusterChargeOverPath = ( (double) Charge )/(*path)[i] ; - if(APV->SubDet>2){ - if(Validation) {ClusterChargeOverPath/=(*gainused)[i];} - if(OldGainRemoving){ClusterChargeOverPath*=(*gainused)[i];} - } - Charge_Vs_Index_Absolute->Fill(APV->Index,Charge); - Charge_Vs_Index ->Fill(APV->Index,ClusterChargeOverPath); - - if(APV->SubDet==StripSubdetector::TIB){ Charge_Vs_PathlengthTIB ->Fill((*path)[i],Charge); - }else if(APV->SubDet==StripSubdetector::TOB){ Charge_Vs_PathlengthTOB ->Fill((*path)[i],Charge); - }else if(APV->SubDet==StripSubdetector::TID){ - if(APV->Eta<0){ Charge_Vs_PathlengthTIDM ->Fill((*path)[i],Charge); - }else if(APV->Eta>0){ Charge_Vs_PathlengthTIDP ->Fill((*path)[i],Charge); - } - }else if(APV->SubDet==StripSubdetector::TEC){ - if(APV->Eta<0){ - if(APV->Thickness<0.04){ Charge_Vs_PathlengthTECM1->Fill((*path)[i],Charge); - }else if(APV->Thickness>0.04){ Charge_Vs_PathlengthTECM2->Fill((*path)[i],Charge); - } - }else if(APV->Eta>0){ - if(APV->Thickness<0.04){ Charge_Vs_PathlengthTECP1->Fill((*path)[i],Charge); - }else if(APV->Thickness>0.04){ Charge_Vs_PathlengthTECP2->Fill((*path)[i],Charge); - } - } - } - - }// END OF ON-CLUSTER LOOP - }printf("\n");// END OF EVENT LOOP - - } + int Charge = 0; + if(APV->SubDet>2 && (useCalibration || !FirstSetOfConstants)){ + bool Saturation = false; + for(unsigned int s=0;s<(*nstrips)[i];s++){ + int StripCharge = (*amplitude)[FirstAmplitude-(*nstrips)[i]+s]; + if(useCalibration && !FirstSetOfConstants){ StripCharge=(int)(StripCharge*(APV->PreviousGain/APV->CalibGain)); + }else if(useCalibration){ StripCharge=(int)(StripCharge/APV->CalibGain); + }else if(!FirstSetOfConstants){ StripCharge=(int)(StripCharge*APV->PreviousGain);} + if(StripCharge>1024){ + StripCharge = 255; + Saturation = true; + }else if(StripCharge>254){ + StripCharge = 254; + Saturation = true; + } + Charge += StripCharge; + } + if(Saturation && !AllowSaturation)continue; + }else if(APV->SubDet>2){ + Charge = (*charge)[i]; + }else{ + Charge = (*charge)[i]/265.0; //expected scale factor between pixel and strip charge + } + + //printf("ChargeDifference = %i Vs %i with Gain = %f\n",(*charge)[i],Charge,APV->CalibGain); + + double ClusterChargeOverPath = ( (double) Charge )/(*path)[i] ; + if(APV->SubDet>2){ + if(Validation) {ClusterChargeOverPath/=(*gainused)[i];} + if(OldGainRemoving){ClusterChargeOverPath*=(*gainused)[i];} + } + Charge_Vs_Index_Absolute->Fill(APV->Index,Charge); + Charge_Vs_Index ->Fill(APV->Index,ClusterChargeOverPath); + + if(APV->SubDet==StripSubdetector::TIB){ Charge_Vs_PathlengthTIB ->Fill((*path)[i],Charge); + }else if(APV->SubDet==StripSubdetector::TOB){ Charge_Vs_PathlengthTOB ->Fill((*path)[i],Charge); + }else if(APV->SubDet==StripSubdetector::TID){ + if(APV->Eta<0){ Charge_Vs_PathlengthTIDM ->Fill((*path)[i],Charge); + }else if(APV->Eta>0){ Charge_Vs_PathlengthTIDP ->Fill((*path)[i],Charge); + } + }else if(APV->SubDet==StripSubdetector::TEC){ + if(APV->Eta<0){ + if(APV->Thickness<0.04){ Charge_Vs_PathlengthTECM1->Fill((*path)[i],Charge); + }else if(APV->Thickness>0.04){ Charge_Vs_PathlengthTECM2->Fill((*path)[i],Charge); + } + }else if(APV->Eta>0){ + if(APV->Thickness<0.04){ Charge_Vs_PathlengthTECP1->Fill((*path)[i],Charge); + }else if(APV->Thickness>0.04){ Charge_Vs_PathlengthTECP2->Fill((*path)[i],Charge); + } + } + } + + }// END OF ON-CLUSTER LOOP +}//END OF processEvent() + +void SiStripGainFromCalibTree::algoAnalyzeTheTree() +{ + for(unsigned int i=0;i %s\n",i+1, (int)VInputFiles.size(), (char*)(VInputFiles[i].c_str())); fflush(stdout); + TFile *tfile = TFile::Open(VInputFiles[i].c_str()); + TTree* tree = dynamic_cast (tfile->Get(tree_path_.c_str())); + + tree->SetBranchAddress((EventPrefix_ + "event" + EventSuffix_).c_str(), &eventnumber , NULL); + tree->SetBranchAddress((EventPrefix_ + "run" + EventSuffix_).c_str(), &runnumber , NULL); + tree->SetBranchAddress((EventPrefix_ + "TrigTech" + EventSuffix_).c_str(), &TrigTech , NULL); + + tree->SetBranchAddress((TrackPrefix_ + "chi2ndof" + TrackSuffix_).c_str(), &trackchi2ndof , NULL); + tree->SetBranchAddress((TrackPrefix_ + "momentum" + TrackSuffix_).c_str(), &trackp , NULL); + tree->SetBranchAddress((TrackPrefix_ + "pt" + TrackSuffix_).c_str(), &trackpt , NULL); + tree->SetBranchAddress((TrackPrefix_ + "eta" + TrackSuffix_).c_str(), &tracketa , NULL); + tree->SetBranchAddress((TrackPrefix_ + "phi" + TrackSuffix_).c_str(), &trackphi , NULL); + tree->SetBranchAddress((TrackPrefix_ + "hitsvalid" + TrackSuffix_).c_str(), &trackhitsvalid, NULL); + + tree->SetBranchAddress((CalibPrefix_ + "trackindex" + CalibSuffix_).c_str(), &trackindex , NULL); + tree->SetBranchAddress((CalibPrefix_ + "rawid" + CalibSuffix_).c_str(), &rawid , NULL); + tree->SetBranchAddress((CalibPrefix_ + "localdirx" + CalibSuffix_).c_str(), &localdirx , NULL); + tree->SetBranchAddress((CalibPrefix_ + "localdiry" + CalibSuffix_).c_str(), &localdiry , NULL); + tree->SetBranchAddress((CalibPrefix_ + "localdirz" + CalibSuffix_).c_str(), &localdirz , NULL); + tree->SetBranchAddress((CalibPrefix_ + "firststrip" + CalibSuffix_).c_str(), &firststrip , NULL); + tree->SetBranchAddress((CalibPrefix_ + "nstrips" + CalibSuffix_).c_str(), &nstrips , NULL); + tree->SetBranchAddress((CalibPrefix_ + "saturation" + CalibSuffix_).c_str(), &saturation , NULL); + tree->SetBranchAddress((CalibPrefix_ + "overlapping" + CalibSuffix_).c_str(), &overlapping , NULL); + tree->SetBranchAddress((CalibPrefix_ + "farfromedge" + CalibSuffix_).c_str(), &farfromedge , NULL); + tree->SetBranchAddress((CalibPrefix_ + "charge" + CalibSuffix_).c_str(), &charge , NULL); + tree->SetBranchAddress((CalibPrefix_ + "path" + CalibSuffix_).c_str(), &path , NULL); + tree->SetBranchAddress((CalibPrefix_ + "chargeoverpath" + CalibSuffix_).c_str(), &chargeoverpath, NULL); + tree->SetBranchAddress((CalibPrefix_ + "amplitude" + CalibSuffix_).c_str(), &litude , NULL); + tree->SetBranchAddress((CalibPrefix_ + "gainused" + CalibSuffix_).c_str(), &gainused , NULL); + + + unsigned int nentries = tree->GetEntries(); + printf("Number of Events = %i + %i = %i\n",NEvent,nentries,(NEvent+nentries)); + printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n"); + printf("Looping on the Tree :"); + int TreeStep = nentries/50;if(TreeStep<=1)TreeStep=1; + for (unsigned int ientry = 0; ientry < tree->GetEntries(); ientry++) { + if(ientry%TreeStep==0){printf(".");fflush(stdout);} + tree->GetEntry(ientry); + processEvent(); + }printf("\n");// END OF EVENT LOOP + } } void SiStripGainFromCalibTree::algoComputeMPVandGain() { - unsigned int I=0; - TH1F* Proj = NULL; - double FitResults[6]; - double MPVmean = 300; - - TH2F *chvsidx = Charge_Vs_Index->getTH2F(); - - - printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n"); - printf("Fitting Charge Distribution :"); - int TreeStep = APVsColl.size()/50; - for(__gnu_cxx::hash_map, isEqual >::iterator it = APVsColl.begin();it!=APVsColl.end();it++,I++){ - if(I%TreeStep==0){printf(".");fflush(stdout);} - stAPVGain* APV = it->second; - if(APV->Bin<0) APV->Bin = chvsidx->GetXaxis()->FindBin(APV->Index); - - if(APV->isMasked){APV->Gain=APV->PreviousGain; MASKED++; continue;} - - Proj = (TH1F*)(chvsidx->ProjectionY("",chvsidx->GetXaxis()->FindBin(APV->Index),chvsidx->GetXaxis()->FindBin(APV->Index),"e")); - if(!Proj)continue; - - if(CalibrationLevel==0){ - }else if(CalibrationLevel==1){ - int SecondAPVId = APV->APVId; - if(SecondAPVId%2==0){ SecondAPVId = SecondAPVId+1; }else{ SecondAPVId = SecondAPVId-1; } - stAPVGain* APV2 = APVsColl[(APV->DetId<<4) | SecondAPVId]; - if(APV2->Bin<0) APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index); - TH1F* Proj2 = (TH1F*)(chvsidx->ProjectionY("",APV2->Bin,APV2->Bin,"e")); - if(Proj2){Proj->Add(Proj2,1);delete Proj2;} - }else if(CalibrationLevel==2){ - for(unsigned int i=0;i<16;i++){ //loop up to 6APV for Strip and up to 16 for Pixels - __gnu_cxx::hash_map, isEqual >::iterator tmpit; - tmpit = APVsColl.find((APV->DetId<<4) | i); - if(tmpit==APVsColl.end())continue; - stAPVGain* APV2 = tmpit->second; - if(APV2->DetId != APV->DetId || APV2->APVId == APV->APVId)continue; - if(APV2->Bin<0) APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index); - TH1F* Proj2 = (TH1F*)(chvsidx->ProjectionY("",APV2->Bin,APV2->Bin,"e")); - if(Proj2){Proj->Add(Proj2,1);delete Proj2;} - } - }else{ - CalibrationLevel = 0; - printf("Unknown Calibration Level, will assume %i\n",CalibrationLevel); - } - - getPeakOfLandau(Proj,FitResults); - APV->FitMPV = FitResults[0]; - APV->FitMPVErr = FitResults[1]; - APV->FitWidth = FitResults[2]; - APV->FitWidthErr = FitResults[3]; - APV->FitChi2 = FitResults[4]; - APV->FitNorm = FitResults[5]; - APV->NEntries = Proj->GetEntries(); - - if(IsGoodLandauFit(FitResults)){ - APV->Gain = APV->FitMPV / MPVmean; - if(APV->SubDet>2)GOOD++; - }else{ - APV->Gain = APV->PreviousGain; - if(APV->SubDet>2)BAD++; - } - if(APV->Gain<=0) APV->Gain = 1; - - //printf("%5i/%5i: %6i - %1i %5E Entries --> MPV = %f +- %f\n",I,APVsColl.size(),APV->DetId, APV->APVId, Proj->GetEntries(), FitResults[0], FitResults[1]);fflush(stdout); - delete Proj; - }printf("\n"); + unsigned int I=0; + TH1F* Proj = NULL; + double FitResults[6]; + double MPVmean = 300; + + TH2F *chvsidx = Charge_Vs_Index->getTH2F(); + + + printf("Progressing Bar :0%% 20%% 40%% 60%% 80%% 100%%\n"); + printf("Fitting Charge Distribution :"); + int TreeStep = APVsColl.size()/50; + for(__gnu_cxx::hash_map, isEqual >::iterator it = APVsColl.begin();it!=APVsColl.end();it++,I++){ + if(I%TreeStep==0){printf(".");fflush(stdout);} + stAPVGain* APV = it->second; + if(APV->Bin<0) APV->Bin = chvsidx->GetXaxis()->FindBin(APV->Index); + + if(APV->isMasked){APV->Gain=APV->PreviousGain; MASKED++; continue;} + + Proj = (TH1F*)(chvsidx->ProjectionY("",chvsidx->GetXaxis()->FindBin(APV->Index),chvsidx->GetXaxis()->FindBin(APV->Index),"e")); + if(!Proj)continue; + + if(CalibrationLevel==0){ + }else if(CalibrationLevel==1){ + int SecondAPVId = APV->APVId; + if(SecondAPVId%2==0){ SecondAPVId = SecondAPVId+1; }else{ SecondAPVId = SecondAPVId-1; } + stAPVGain* APV2 = APVsColl[(APV->DetId<<4) | SecondAPVId]; + if(APV2->Bin<0) APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index); + TH1F* Proj2 = (TH1F*)(chvsidx->ProjectionY("",APV2->Bin,APV2->Bin,"e")); + if(Proj2){Proj->Add(Proj2,1);delete Proj2;} + }else if(CalibrationLevel==2){ + for(unsigned int i=0;i<16;i++){ //loop up to 6APV for Strip and up to 16 for Pixels + __gnu_cxx::hash_map, isEqual >::iterator tmpit; + tmpit = APVsColl.find((APV->DetId<<4) | i); + if(tmpit==APVsColl.end())continue; + stAPVGain* APV2 = tmpit->second; + if(APV2->DetId != APV->DetId || APV2->APVId == APV->APVId)continue; + if(APV2->Bin<0) APV2->Bin = chvsidx->GetXaxis()->FindBin(APV2->Index); + TH1F* Proj2 = (TH1F*)(chvsidx->ProjectionY("",APV2->Bin,APV2->Bin,"e")); + if(Proj2){Proj->Add(Proj2,1);delete Proj2;} + } + }else{ + CalibrationLevel = 0; + printf("Unknown Calibration Level, will assume %i\n",CalibrationLevel); + } + + getPeakOfLandau(Proj,FitResults); + APV->FitMPV = FitResults[0]; + APV->FitMPVErr = FitResults[1]; + APV->FitWidth = FitResults[2]; + APV->FitWidthErr = FitResults[3]; + APV->FitChi2 = FitResults[4]; + APV->FitNorm = FitResults[5]; + APV->NEntries = Proj->GetEntries(); + + if(IsGoodLandauFit(FitResults)){ + APV->Gain = APV->FitMPV / MPVmean; + if(APV->SubDet>2)GOOD++; + }else{ + APV->Gain = APV->PreviousGain; + if(APV->SubDet>2)BAD++; + } + if(APV->Gain<=0) APV->Gain = 1; + + //printf("%5i/%5i: %6i - %1i %5E Entries --> MPV = %f +- %f\n",I,APVsColl.size(),APV->DetId, APV->APVId, Proj->GetEntries(), FitResults[0], FitResults[1]);fflush(stdout); + delete Proj; + }printf("\n"); } void SiStripGainFromCalibTree::storeOnTree(TFileService* tfs) { - unsigned int tree_Index; - unsigned int tree_Bin; - unsigned int tree_DetId; - unsigned char tree_APVId; - unsigned char tree_SubDet; - float tree_x; - float tree_y; - float tree_z; - float tree_Eta; - float tree_R; - float tree_Phi; - float tree_Thickness; - float tree_FitMPV; - float tree_FitMPVErr; - float tree_FitWidth; - float tree_FitWidthErr; - float tree_FitChi2NDF; - float tree_FitNorm; - double tree_Gain; - double tree_PrevGain; - double tree_PrevGainTick; - double tree_NEntries; - bool tree_isMasked; - - TTree* MyTree; - MyTree = tfs->make ("APVGain","APVGain"); - MyTree->Branch("Index" ,&tree_Index ,"Index/i"); - MyTree->Branch("Bin" ,&tree_Bin ,"Bin/i"); - MyTree->Branch("DetId" ,&tree_DetId ,"DetId/i"); - MyTree->Branch("APVId" ,&tree_APVId ,"APVId/b"); - MyTree->Branch("SubDet" ,&tree_SubDet ,"SubDet/b"); - MyTree->Branch("x" ,&tree_x ,"x/F"); - MyTree->Branch("y" ,&tree_y ,"y/F"); - MyTree->Branch("z" ,&tree_z ,"z/F"); - MyTree->Branch("Eta" ,&tree_Eta ,"Eta/F"); - MyTree->Branch("R" ,&tree_R ,"R/F"); - MyTree->Branch("Phi" ,&tree_Phi ,"Phi/F"); - MyTree->Branch("Thickness" ,&tree_Thickness ,"Thickness/F"); - MyTree->Branch("FitMPV" ,&tree_FitMPV ,"FitMPV/F"); - MyTree->Branch("FitMPVErr" ,&tree_FitMPVErr ,"FitMPVErr/F"); - MyTree->Branch("FitWidth" ,&tree_FitWidth ,"FitWidth/F"); - MyTree->Branch("FitWidthErr" ,&tree_FitWidthErr,"FitWidthErr/F"); - MyTree->Branch("FitChi2NDF" ,&tree_FitChi2NDF ,"FitChi2NDF/F"); - MyTree->Branch("FitNorm" ,&tree_FitNorm ,"FitNorm/F"); - MyTree->Branch("Gain" ,&tree_Gain ,"Gain/D"); - MyTree->Branch("PrevGain" ,&tree_PrevGain ,"PrevGain/D"); - MyTree->Branch("PrevGainTick" ,&tree_PrevGainTick,"PrevGainTick/D"); - MyTree->Branch("NEntries" ,&tree_NEntries ,"NEntries/D"); - MyTree->Branch("isMasked" ,&tree_isMasked ,"isMasked/O"); - - - FILE* Gains = stdout; - fprintf(Gains,"NEvents = %i\n",NEvent); - fprintf(Gains,"NTracks = %i\n",NTrack); - fprintf(Gains,"NClustersPixel = %i\n",NClusterPixel); - fprintf(Gains,"NClustersStrip = %i\n",NClusterStrip); - fprintf(Gains,"Number of Pixel Dets = %lu\n",static_cast(NPixelDets)); - fprintf(Gains,"Number of Strip APVs = %lu\n",static_cast(NStripAPVs)); - fprintf(Gains,"GoodFits = %i BadFits = %i ratio = %f%% (MASKED=%i)\n",GOOD,BAD,(100.0*GOOD)/(GOOD+BAD), MASKED); - - Gains=fopen(OutputGains.c_str(),"w"); - fprintf(Gains,"NEvents = %i\n",NEvent); - fprintf(Gains,"NTracks = %i\n",NTrack); - fprintf(Gains,"NClustersPixel = %i\n",NClusterPixel); - fprintf(Gains,"NClustersStrip = %i\n",NClusterStrip); - fprintf(Gains,"Number of Strip APVs = %lu\n",static_cast(NStripAPVs)); - fprintf(Gains,"Number of Pixel Dets = %lu\n",static_cast(NPixelDets)); - fprintf(Gains,"GoodFits = %i BadFits = %i ratio = %f%% (MASKED=%i)\n",GOOD,BAD,(100.0*GOOD)/(GOOD+BAD), MASKED); - - for(unsigned int a=0;amake ("APVGain","APVGain"); + MyTree->Branch("Index" ,&tree_Index ,"Index/i"); + MyTree->Branch("Bin" ,&tree_Bin ,"Bin/i"); + MyTree->Branch("DetId" ,&tree_DetId ,"DetId/i"); + MyTree->Branch("APVId" ,&tree_APVId ,"APVId/b"); + MyTree->Branch("SubDet" ,&tree_SubDet ,"SubDet/b"); + MyTree->Branch("x" ,&tree_x ,"x/F"); + MyTree->Branch("y" ,&tree_y ,"y/F"); + MyTree->Branch("z" ,&tree_z ,"z/F"); + MyTree->Branch("Eta" ,&tree_Eta ,"Eta/F"); + MyTree->Branch("R" ,&tree_R ,"R/F"); + MyTree->Branch("Phi" ,&tree_Phi ,"Phi/F"); + MyTree->Branch("Thickness" ,&tree_Thickness ,"Thickness/F"); + MyTree->Branch("FitMPV" ,&tree_FitMPV ,"FitMPV/F"); + MyTree->Branch("FitMPVErr" ,&tree_FitMPVErr ,"FitMPVErr/F"); + MyTree->Branch("FitWidth" ,&tree_FitWidth ,"FitWidth/F"); + MyTree->Branch("FitWidthErr" ,&tree_FitWidthErr,"FitWidthErr/F"); + MyTree->Branch("FitChi2NDF" ,&tree_FitChi2NDF ,"FitChi2NDF/F"); + MyTree->Branch("FitNorm" ,&tree_FitNorm ,"FitNorm/F"); + MyTree->Branch("Gain" ,&tree_Gain ,"Gain/D"); + MyTree->Branch("PrevGain" ,&tree_PrevGain ,"PrevGain/D"); + MyTree->Branch("PrevGainTick" ,&tree_PrevGainTick,"PrevGainTick/D"); + MyTree->Branch("NEntries" ,&tree_NEntries ,"NEntries/D"); + MyTree->Branch("isMasked" ,&tree_isMasked ,"isMasked/O"); + + + FILE* Gains = stdout; + fprintf(Gains,"NEvents = %i\n",NEvent); + fprintf(Gains,"NTracks = %i\n",NTrack); + fprintf(Gains,"NClustersPixel = %i\n",NClusterPixel); + fprintf(Gains,"NClustersStrip = %i\n",NClusterStrip); + fprintf(Gains,"Number of Pixel Dets = %lu\n",static_cast(NPixelDets)); + fprintf(Gains,"Number of Strip APVs = %lu\n",static_cast(NStripAPVs)); + fprintf(Gains,"GoodFits = %i BadFits = %i ratio = %f%% (MASKED=%i)\n",GOOD,BAD,(100.0*GOOD)/(GOOD+BAD), MASKED); + + Gains=fopen(OutputGains.c_str(),"w"); + fprintf(Gains,"NEvents = %i\n",NEvent); + fprintf(Gains,"NTracks = %i\n",NTrack); + fprintf(Gains,"NClustersPixel = %i\n",NClusterPixel); + fprintf(Gains,"NClustersStrip = %i\n",NClusterStrip); + fprintf(Gains,"Number of Strip APVs = %lu\n",static_cast(NStripAPVs)); + fprintf(Gains,"Number of Pixel Dets = %lu\n",static_cast(NPixelDets)); + fprintf(Gains,"GoodFits = %i BadFits = %i ratio = %f%% (MASKED=%i)\n",GOOD,BAD,(100.0*GOOD)/(GOOD+BAD), MASKED); + + for(unsigned int a=0;aDetId,APV->APVId,APV->PreviousGain,APV->Gain, APV->NEntries); - fprintf(Gains,"%i | %i | PreviousGain = %7.5f(tick) x %7.5f(particle) NewGain (particle) = %7.5f (#clusters=%8.0f)\n", APV->DetId,APV->APVId,APV->PreviousGainTick, APV->PreviousGain,APV->Gain, APV->NEntries); - - tree_Index = APV->Index; - tree_Bin = Charge_Vs_Index->getTH2F()->GetXaxis()->FindBin(APV->Index); - tree_DetId = APV->DetId; - tree_APVId = APV->APVId; - tree_SubDet = APV->SubDet; - tree_x = APV->x; - tree_y = APV->y; - tree_z = APV->z; - tree_Eta = APV->Eta; - tree_R = APV->R; - tree_Phi = APV->Phi; - tree_Thickness = APV->Thickness; - tree_FitMPV = APV->FitMPV; - tree_FitMPVErr = APV->FitMPVErr; - tree_FitWidth = APV->FitWidth; - tree_FitWidthErr= APV->FitWidthErr; - tree_FitChi2NDF = APV->FitChi2; - tree_FitNorm = APV->FitNorm; - tree_Gain = APV->Gain; - tree_PrevGain = APV->PreviousGain; - tree_PrevGainTick = APV->PreviousGainTick; - tree_NEntries = APV->NEntries; - tree_isMasked = APV->isMasked; - - - if(tree_DetId==402673324){ - printf("%i | %i : %f --> %f (%f)\n", tree_DetId, tree_APVId, tree_PrevGain, tree_Gain, tree_NEntries); - } - - - MyTree->Fill(); - } - if(Gains)fclose(Gains); + fprintf(Gains,"%i | %i | PreviousGain = %7.5f(tick) x %7.5f(particle) NewGain (particle) = %7.5f (#clusters=%8.0f)\n", APV->DetId,APV->APVId,APV->PreviousGainTick, APV->PreviousGain,APV->Gain, APV->NEntries); + + tree_Index = APV->Index; + tree_Bin = Charge_Vs_Index->getTH2F()->GetXaxis()->FindBin(APV->Index); + tree_DetId = APV->DetId; + tree_APVId = APV->APVId; + tree_SubDet = APV->SubDet; + tree_x = APV->x; + tree_y = APV->y; + tree_z = APV->z; + tree_Eta = APV->Eta; + tree_R = APV->R; + tree_Phi = APV->Phi; + tree_Thickness = APV->Thickness; + tree_FitMPV = APV->FitMPV; + tree_FitMPVErr = APV->FitMPVErr; + tree_FitWidth = APV->FitWidth; + tree_FitWidthErr= APV->FitWidthErr; + tree_FitChi2NDF = APV->FitChi2; + tree_FitNorm = APV->FitNorm; + tree_Gain = APV->Gain; + tree_PrevGain = APV->PreviousGain; + tree_PrevGainTick = APV->PreviousGainTick; + tree_NEntries = APV->NEntries; + tree_isMasked = APV->isMasked; + + + if(tree_DetId==402673324){ + printf("%i | %i : %f --> %f (%f)\n", tree_DetId, tree_APVId, tree_PrevGain, tree_Gain, tree_NEntries); + } + + + MyTree->Fill(); + } + if(Gains)fclose(Gains); } bool SiStripGainFromCalibTree::produceTagFilter(){ - // The goal of this function is to check wether or not there is enough statistics to produce a meaningful tag for the DB or not + // The goal of this function is to check wether or not there is enough statistics to produce a meaningful tag for the DB or not if(Charge_Vs_Index->getTH2F()->Integral(0,NStripAPVs+1, 0, 99999 ) < tagCondition_NClusters) { edm::LogWarning("SiStripGainFromCalibTree")<< "produceTagFilter -> Return false: Statistics is too low : " << Charge_Vs_Index->getTH2F()->Integral() << endl; return false; @@ -876,38 +942,38 @@ bool SiStripGainFromCalibTree::produceTagFilter(){ SiStripApvGain* SiStripGainFromCalibTree::getNewObject() { - SiStripApvGain* obj = new SiStripApvGain(); - if(!harvestingMode) return obj; - - if(!produceTagFilter()){ - edm::LogWarning("SiStripGainFromCalibTree")<< "getNewObject -> will not produce a paylaod because produceTagFilter returned false " << endl; - setDoStore(false); - return obj; - } - - - std::vector* theSiStripVector = NULL; - unsigned int PreviousDetId = 0; - for(unsigned int a=0;aSubDet<=2)continue; - if(APV->DetId != PreviousDetId){ - if(theSiStripVector!=NULL){ - SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end()); - if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId); - } - theSiStripVector = new std::vector; - PreviousDetId = APV->DetId; - } - theSiStripVector->push_back(APV->Gain); - } - if(theSiStripVector!=NULL){ - SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end()); - if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId); - } - - return obj; + SiStripApvGain* obj = new SiStripApvGain(); + if(!harvestingMode) return obj; + + if(!produceTagFilter()){ + edm::LogWarning("SiStripGainFromCalibTree")<< "getNewObject -> will not produce a paylaod because produceTagFilter returned false " << endl; + setDoStore(false); + return obj; + } + + + std::vector* theSiStripVector = NULL; + unsigned int PreviousDetId = 0; + for(unsigned int a=0;aSubDet<=2)continue; + if(APV->DetId != PreviousDetId){ + if(theSiStripVector!=NULL){ + SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end()); + if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId); + } + theSiStripVector = new std::vector; + PreviousDetId = APV->DetId; + } + theSiStripVector->push_back(APV->Gain); + } + if(theSiStripVector!=NULL){ + SiStripApvGain::Range range(theSiStripVector->begin(),theSiStripVector->end()); + if ( !obj->put(PreviousDetId,range) ) printf("Bug to put detId = %i\n",PreviousDetId); + } + + return obj; } @@ -916,24 +982,24 @@ SiStripGainFromCalibTree::~SiStripGainFromCalibTree() } void SiStripGainFromCalibTree::MakeCalibrationMap(){ - if(!useCalibration)return; + if(!useCalibration)return; - TChain* t1 = new TChain("SiStripCalib/APVGain"); - t1->Add(m_calibrationPath.c_str()); - - unsigned int tree_DetId; - unsigned char tree_APVId; - double tree_Gain; - - t1->SetBranchAddress("DetId" ,&tree_DetId ); - t1->SetBranchAddress("APVId" ,&tree_APVId ); - t1->SetBranchAddress("Gain" ,&tree_Gain ); - - for (unsigned int ientry = 0; ientry < t1->GetEntries(); ientry++) { - t1->GetEntry(ientry); - stAPVGain* APV = APVsColl[(tree_DetId<<4) | (unsigned int)tree_APVId]; - APV->CalibGain = tree_Gain; - } + TChain* t1 = new TChain("SiStripCalib/APVGain"); + t1->Add(m_calibrationPath.c_str()); + + unsigned int tree_DetId; + unsigned char tree_APVId; + double tree_Gain; + + t1->SetBranchAddress("DetId" ,&tree_DetId ); + t1->SetBranchAddress("APVId" ,&tree_APVId ); + t1->SetBranchAddress("Gain" ,&tree_Gain ); + + for (unsigned int ientry = 0; ientry < t1->GetEntries(); ientry++) { + t1->GetEntry(ientry); + stAPVGain* APV = APVsColl[(tree_DetId<<4) | (unsigned int)tree_APVId]; + APV->CalibGain = tree_Gain; + } } void @@ -942,230 +1008,34 @@ SiStripGainFromCalibTree::algoAnalyze(const edm::Event& iEvent, const edm::Event // in AlCaHarvesting mode we just need to run the logic in the endJob step if(harvestingMode) return; - if(AlgoMode=="CalibTree")return; - - if(NEvent==0){ - SRun = iEvent.id().run(); - } - ERun = iEvent.id().run(); - NEvent++; - - //FROM SHALLOW GAIN - edm::ESHandle theTrackerGeometry; iSetup.get().get( theTrackerGeometry ); - edm::ESHandle gainHandle; iSetup.get().get(gainHandle); - edm::Handle > tracks; iEvent.getByToken(tracksToken, tracks); - edm::Handle associations; iEvent.getByToken(associationsToken, associations); - - for( TrajTrackAssociationCollection::const_iterator association = associations->begin(); association != associations->end(); association++) { - const Trajectory* traj = association->key.get(); - const reco::Track* track = association->val.get(); - - //clean on the tracks - if(fabs(track->eta()) < MinTrackEta )continue; - if(fabs(track->eta()) > MaxTrackEta )continue; - if(track->p() < MinTrackMomentum )continue; - if(track->p() > MaxTrackMomentum )continue; - if(track->numberOfValidHits() < MinTrackHits )continue; - if(track->chi2()/track->ndof() > MaxTrackChiOverNdf )continue; - NTrack++; - - vector measurements = traj->measurements(); - for(vector::const_iterator measurement_it = measurements.begin(); measurement_it!=measurements.end(); measurement_it++){ - TrajectoryStateOnSurface trajState = measurement_it->updatedState(); - if( !trajState.isValid() ) continue; - - const TrackingRecHit* hit = (*measurement_it->recHit()).hit(); - const SiStripRecHit1D* sistripsimple1dhit = dynamic_cast(hit); - const SiStripRecHit2D* sistripsimplehit = dynamic_cast(hit); - const SiStripMatchedRecHit2D* sistripmatchedhit = dynamic_cast(hit); - const SiPixelRecHit* sipixelhit = dynamic_cast(hit); - - const SiPixelCluster* PixelCluster = NULL; - const SiStripCluster* StripCluster = NULL; - uint32_t DetId = 0; - - for(unsigned int h=0;h<2;h++){ - if(!sistripmatchedhit && h==1){ - continue; - }else if(sistripmatchedhit && h==0){ - StripCluster = &sistripmatchedhit->monoCluster(); - DetId = sistripmatchedhit->monoId(); - }else if(sistripmatchedhit && h==1){ - StripCluster = &sistripmatchedhit->stereoCluster();; - DetId = sistripmatchedhit->stereoId(); - }else if(sistripsimplehit){ - StripCluster = (sistripsimplehit->cluster()).get(); - DetId = sistripsimplehit->geographicalId().rawId(); - }else if(sistripsimple1dhit){ - StripCluster = (sistripsimple1dhit->cluster()).get(); - DetId = sistripsimple1dhit->geographicalId().rawId(); - }else if(sipixelhit && h==0){ - PixelCluster = (sipixelhit->cluster()).get(); - DetId = sipixelhit->geographicalId().rawId(); - }else{ - continue; - } - - LocalVector trackDirection = trajState.localDirection(); - double cosine = trackDirection.z()/trackDirection.mag(); - int APVId = 0; - bool Saturation = false; - bool Overlapping = false; - unsigned int charge = 0; - double PrevGain = 1; - double Path = 0; - - stAPVGain* APV = NULL; - - - - if(StripCluster){ - const auto& Ampls = StripCluster->amplitudes(); - int FirstStrip = StripCluster->firstStrip(); - APVId = FirstStrip/128; - APV = APVsColl[(DetId<<4) | (FirstStrip/128)]; - Path = (10.0*APV->Thickness)/fabs(cosine); - - - if(gainHandle.isValid()){ - SiStripApvGain::Range detGainRange = gainHandle->getRange(DetId); - PrevGain = *(detGainRange.first + APVId); - } - - for(unsigned int a=0;a=254)Saturation =true; - } - - if(FirstStrip==0 )Overlapping=true; - if(FirstStrip==128 )Overlapping=true; - if(FirstStrip==256 )Overlapping=true; - if(FirstStrip==384 )Overlapping=true; - if(FirstStrip==512 )Overlapping=true; - if(FirstStrip==640 )Overlapping=true; - - if(FirstStrip<=127 && FirstStrip+Ampls.size()>127)Overlapping=true; - if(FirstStrip<=255 && FirstStrip+Ampls.size()>255)Overlapping=true; - if(FirstStrip<=383 && FirstStrip+Ampls.size()>383)Overlapping=true; - if(FirstStrip<=511 && FirstStrip+Ampls.size()>511)Overlapping=true; - if(FirstStrip<=639 && FirstStrip+Ampls.size()>639)Overlapping=true; - - if(FirstStrip+Ampls.size()==127 )Overlapping=true; - if(FirstStrip+Ampls.size()==255 )Overlapping=true; - if(FirstStrip+Ampls.size()==383 )Overlapping=true; - if(FirstStrip+Ampls.size()==511 )Overlapping=true; - if(FirstStrip+Ampls.size()==639 )Overlapping=true; - if(FirstStrip+Ampls.size()==767 )Overlapping=true; - - //cleaning on the cluster - if(IsFarFromBorder(&trajState,DetId, &iSetup) == false )continue; - if(Overlapping == true )continue; - if(Saturation && !AllowSaturation )continue; - if(Ampls.size() > MaxNrStrips )continue; - NClusterStrip++; - - if(useCalibration || !FirstSetOfConstants){ - bool Saturation = false; - charge = 0; - for(unsigned int s=0;sPreviousGain/APV->CalibGain)); - }else if(useCalibration){ StripCharge=(int)(StripCharge/APV->CalibGain); - }else if(!FirstSetOfConstants){ StripCharge=(int)(StripCharge*APV->PreviousGain);} - if(StripCharge>1024){ - StripCharge = 255; - Saturation = true; - }else if(StripCharge>254){ - StripCharge = 254; - Saturation = true; - } - charge += StripCharge; - } - if(Saturation && !AllowSaturation)continue; - } - }else if(PixelCluster){ - const auto& Ampls = PixelCluster->pixelADC(); - int FirstRow = PixelCluster->minPixelRow(); - int FirstCol = PixelCluster->minPixelCol(); - APVId = ((FirstRow/80)<<3 | (FirstCol/52)); - APV = APVsColl[(DetId<<4) | APVId]; - Path = (10.0*APV->Thickness)/fabs(cosine); - - for(unsigned int a=0;a=254)Saturation =true; - } - charge/=265.0; //expected scale factor between pixel and strip charge - } - - //printf("ChargeDifference = %i Vs %i with Gain = %f\n",(*charge)[i],charge,APV->CalibGain); - - double ClusterChargeOverPath = ( (double) charge )/Path ; - if(Validation) {ClusterChargeOverPath/=PrevGain;} - if(OldGainRemoving){ClusterChargeOverPath*=PrevGain;} - Charge_Vs_Index_Absolute->Fill(APV->Index,charge); - Charge_Vs_Index ->Fill(APV->Index,ClusterChargeOverPath); - - - if(APV->SubDet==StripSubdetector::TIB){ Charge_Vs_PathlengthTIB ->Fill(Path,charge); - }else if(APV->SubDet==StripSubdetector::TOB){ Charge_Vs_PathlengthTOB ->Fill(Path,charge); - }else if(APV->SubDet==StripSubdetector::TID){ - if(APV->Eta<0){ Charge_Vs_PathlengthTIDM ->Fill(Path,charge); - }else if(APV->Eta>0){ Charge_Vs_PathlengthTIDP ->Fill(Path,charge); - } - }else if(APV->SubDet==StripSubdetector::TEC){ - if(APV->Eta<0){ - if(APV->Thickness<0.04){ Charge_Vs_PathlengthTECM1->Fill(Path,charge); - }else if(APV->Thickness>0.04){ Charge_Vs_PathlengthTECM2->Fill(Path,charge); - } - }else if(APV->Eta>0){ - if(APV->Thickness<0.04){ Charge_Vs_PathlengthTECP1->Fill(Path,charge); - }else if(APV->Thickness>0.04){ Charge_Vs_PathlengthTECP2->Fill(Path,charge); - } - } - } - - }//loop on clusters - }//loop on measurements - }//loop on tracks - -} - - -bool SiStripGainFromCalibTree::IsFarFromBorder(TrajectoryStateOnSurface* trajState, const uint32_t detid, const edm::EventSetup* iSetup) -{ - edm::ESHandle tkGeom; iSetup->get().get( tkGeom ); - - LocalPoint HitLocalPos = trajState->localPosition(); - LocalError HitLocalError = trajState->localError().positionError() ; - - const GeomDetUnit* it = tkGeom->idToDetUnit(DetId(detid)); - if (dynamic_cast(it)==0 && dynamic_cast(it)==0) { - edm::LogWarning("SiStripGainFromCalibTree")<< "this detID doesn't seem to belong to the Tracker" << std::endl; - return false; - } - - const BoundPlane plane = it->surface(); - const TrapezoidalPlaneBounds* trapezoidalBounds( dynamic_cast(&(plane.bounds()))); - const RectangularPlaneBounds* rectangularBounds( dynamic_cast(&(plane.bounds()))); - - double DistFromBorder = 1.0; - double HalfLength = it->surface().bounds().length() /2.0; - - if(trapezoidalBounds) - { - std::array const & parameters = (*trapezoidalBounds).parameters(); - //std::vector const & parameters = (*trapezoidalBounds).parameters(); - HalfLength = parameters[3]; - }else if(rectangularBounds){ - HalfLength = it->surface().bounds().length() /2.0; - }else{return false;} - - if (fabs(HitLocalPos.y())+HitLocalError.yy() >= (HalfLength - DistFromBorder) ) return false; - - return true; + if(AlgoMode=="CalibTree")return; + + eventnumber = iEvent.id().event(); + runnumber = iEvent.id().run(); + auto handle01 = connect(TrigTech , TrigTech_token_ , iEvent); + auto handle02 = connect(trackchi2ndof , trackchi2ndof_token_ , iEvent); + auto handle03 = connect(trackp , trackp_token_ , iEvent); + auto handle04 = connect(trackpt , trackpt_token_ , iEvent); + auto handle05 = connect(tracketa , tracketa_token_ , iEvent); + auto handle06 = connect(trackphi , trackphi_token_ , iEvent); + auto handle07 = connect(trackhitsvalid, trackhitsvalid_token_, iEvent); + auto handle08 = connect(trackindex , trackindex_token_ , iEvent); + auto handle09 = connect(rawid , rawid_token_ , iEvent); + auto handle11 = connect(localdirx , localdirx_token_ , iEvent); + auto handle12 = connect(localdiry , localdiry_token_ , iEvent); + auto handle13 = connect(localdirz , localdirz_token_ , iEvent); + auto handle14 = connect(firststrip , firststrip_token_ , iEvent); + auto handle15 = connect(nstrips , nstrips_token_ , iEvent); + auto handle16 = connect(saturation , saturation_token_ , iEvent); + auto handle17 = connect(overlapping , overlapping_token_ , iEvent); + auto handle18 = connect(farfromedge , farfromedge_token_ , iEvent); + auto handle19 = connect(charge , charge_token_ , iEvent); + auto handle21 = connect(path , path_token_ , iEvent); + auto handle22 = connect(chargeoverpath, chargeoverpath_token_, iEvent); + auto handle23 = connect(amplitude , amplitude_token_ , iEvent); + auto handle24 = connect(gainused , gainused_token_ , iEvent); + + processEvent(); } - - DEFINE_FWK_MODULE(SiStripGainFromCalibTree); diff --git a/CalibTracker/SiStripChannelGain/python/computeGain_cff.py b/CalibTracker/SiStripChannelGain/python/computeGain_cff.py index 798cb74e9b269..abfd80cbee327 100644 --- a/CalibTracker/SiStripChannelGain/python/computeGain_cff.py +++ b/CalibTracker/SiStripChannelGain/python/computeGain_cff.py @@ -1,8 +1,8 @@ import FWCore.ParameterSet.Config as cms -SiStripCalib = cms.EDAnalyzer("SiStripGainFromCalibTree", +SiStripCalib = cms.EDAnalyzer( + "SiStripGainFromCalibTree", OutputGains = cms.string('Gains_ASCII.txt'), - Tracks = cms.untracked.InputTag('CalibrationTracksRefit'), AlgoMode = cms.untracked.string('CalibTree'), minTrackMomentum = cms.untracked.double(2), @@ -32,7 +32,12 @@ TimeFromEndRun = cms.untracked.bool(True), IOVMode = cms.string('Job'), Record = cms.string('SiStripApvGainRcd'), - doStoreOnDB = cms.bool(True) + doStoreOnDB = cms.bool(True), + + treePath = cms.untracked.string('gainCalibrationTree/tree'), + gain = cms.untracked.PSet(label = cms.string('shallowGainCalibration'), prefix = cms.string("GainCalibration"), suffix = cms.string('')), + evtinfo = cms.untracked.PSet(label = cms.string('shallowEventRun'), prefix = cms.string(""), suffix = cms.string('')), + tracks = cms.untracked.PSet(label = cms.string('shallowTracks'), prefix = cms.string("track"), suffix = cms.string('')), ) SiStripCalibValidation = SiStripCalib.clone() diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py index 8c069f99cd645..0a01d6f68ae18 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py @@ -59,6 +59,15 @@ offlineBeamSpot + ALCARECOCalibrationTracksRefit ) +# ------------------------------------------------------------------------------ +# Get the information you need from the tracks, calibTree-style to have no code difference +from CalibTracker.SiStripCommon.ShallowEventDataProducer_cfi import shallowEventRun +from CalibTracker.SiStripCommon.ShallowTracksProducer_cfi import shallowTracks +from CalibTracker.SiStripCommon.ShallowGainCalibration_cfi import shallowGainCalibration +ALCARECOShallowEventRun = shallowEventRun.clone() +ALCARECOShallowTracks = shallowTracks.clone(Tracks=cms.InputTag('ALCARECOCalibrationTracksRefit')) +ALCARECOShallowGainCalibration = shallowGainCalibration.clone(Tracks=cms.InputTag('ALCARECOCalibrationTracksRefit')) +ALCARECOShallowSequence = cms.Sequence(shallowEventRunPCL*shallowTracksPCL*shallowGainCalibrationPCL) # ------------------------------------------------------------------------------ # This is the module actually doing the calibration @@ -69,6 +78,9 @@ ALCARECOSiStripCalib.FirstSetOfConstants = cms.untracked.bool(False) ALCARECOSiStripCalib.harvestingMode = cms.untracked.bool(False) ALCARECOSiStripCalib.doStoreOnDB = cms.bool(False) +ALCARECOSiStripCalib.gain.label = cms.string('ALCARECOShallowGainCalibration') +ALCARECOSiStripCalib.evtinfo.label = cms.string('ALCARECOShallowEventRun') +ALCARECOSiStripCalib.tracks.label = cms.string('ALCARECOShallowTracks') # ------------------------------------------------------------------------------ @@ -88,9 +100,12 @@ # the actual sequence -seqALCARECOPromptCalibProdSiStripGains = cms.Sequence(ALCARECOCalMinBiasFilterForSiStripGains * - ALCARECOTrackFilterRefit * - ALCARECOSiStripCalib * - MEtoEDMConvertSiStripGains) +seqALCARECOPromptCalibProdSiStripGains = cms.Sequence( + ALCARECOCalMinBiasFilterForSiStripGains * + ALCARECOTrackFilterRefit * + ALCARECOShallowSequence * + ALCARECOSiStripCalib * + MEtoEDMConvertSiStripGains +) From 4c6f1878eacf1223f2458eac3c1ef03ea9535009 Mon Sep 17 00:00:00 2001 From: esmaeel Date: Wed, 13 Jan 2016 12:45:50 +0100 Subject: [PATCH 015/250] mGMT_dqm_v1 --- ...t2016_dqm_sourceclient-live_cfg-esmaeel.py | 208 ++++++++++++++++++ DQM/L1TMonitor/BuildFile.xml | 4 +- DQM/L1TMonitor/interface/L1TStage2mGMT.h | 130 +++++++++++ .../python/L1TStage2_cff-esmaeel.py | 9 + DQM/L1TMonitor/python/L1TStage2mGMT_cfi.py | 8 + DQM/L1TMonitor/src/L1TStage2mGMT.cc | 111 ++++++++++ DQM/L1TMonitor/src/SealModule.cc | 13 +- 7 files changed, 473 insertions(+), 10 deletions(-) create mode 100644 DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py create mode 100755 DQM/L1TMonitor/interface/L1TStage2mGMT.h create mode 100644 DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py create mode 100644 DQM/L1TMonitor/python/L1TStage2mGMT_cfi.py create mode 100755 DQM/L1TMonitor/src/L1TStage2mGMT.cc diff --git a/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py b/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py new file mode 100644 index 0000000000000..26e9c6dd6c4fb --- /dev/null +++ b/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py @@ -0,0 +1,208 @@ +# L1 Trigger DQM sequence (L1T) +# +# authors previous versions - see CVS +# +# V.M. Ghete 2011-05-25 revised version of L1 Trigger DQM + + +import FWCore.ParameterSet.Config as cms + +process = cms.Process("DQM") + + +#---------------------------- +# Event Source +# +# for live online DQM in P5 +#process.load("DQM.Integration.config.inputsource_cfi") +# +# for testing in lxplus +process.load("DQM.Integration.config.fileinputsource_cfi") + +#---------------------------- +# DQM Environment + +process.load("DQM.Integration.config.environment_cfi") +process.dqmEnv.subSystemFolder = 'L1T2016' +#process.dqmSaver.tag = 'L1T2016' +# +# +# references needed +#process.DQMStore.referenceFileName = "/dqmdata/dqm/reference/l1t_reference.root" + +# Condition for P5 cluster +#process.load("DQM.Integration.config.FrontierCondition_GT_cfi") +#es_prefer_GlobalTag = cms.ESPrefer('GlobalTag') +#process.GlobalTag.RefreshEachRun = cms.untracked.bool(True) +# Condition for lxplus +#process.load("DQM.Integration.config.FrontierCondition_GT_Offline_cfi") + +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff') +from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +process.GlobalTag.globaltag = cms.string('74X_dataRun2_HLT_v1') + +#process.load("Configuration.StandardSequences.GeometryRecoDB_cff") +process.load("Configuration.StandardSequences.GeometryRecoDB_cff") + +#------------------------------------- +# sequences needed for L1 trigger DQM +# + +# standard unpacking sequence +#process.load("Configuration.StandardSequences.RawToDigi_Data_cff") + +# L1 Trigger sequences + +# l1tMonitor and l1tMonitorEndPathSeq + +#///////////// +process.load("DQM.L1TMonitor.L1TStage2_cff-esmaeel") +#process.load("DQM.L1TMonitor.L1T2016_cff") +#///////////// + +#process.load("DQM.L1TMonitor.L1TMonitor_cff") +# L1 trigger synchronization module - it uses also HltHighLevel filter + + +#------------------------------------- +# paths & schedule for L1 Trigger DQM +# + +# TODO define a L1 trigger L1TriggerRawToDigi in the standard sequence +# to avoid all these remove +#process.rawToDigiPath = cms.Path(process.RawToDigi) +# +#process.RawToDigi.remove("siPixelDigis") +#process.RawToDigi.remove("siStripDigis") +#process.RawToDigi.remove("scalersRawToDigi") +#process.RawToDigi.remove("castorDigis") +# for GCT, unpack all five samples +#process.gctDigis.numberOfGctSamplesToUnpack = cms.uint32(5) + +#if ( process.runType.getRunType() == process.runType.pp_run_stage1 or process.runType.getRunType() == process.runType.cosmic_run_stage1): +#process.gtDigis.DaqGtFedId = cms.untracked.int32(809) +#else: +#process.gtDigis.DaqGtFedId = cms.untracked.int32(813) + +#/////////////// +process.l1tMonitorPath = cms.Path(process.l1tStage2online) +#process.l1tMonitorPath = cms.Path(process.l1t2016Online) +#////////////// +# separate L1TSync path due to the use of the HltHighLevel filter + + +# + + +# +#process.l1tMonitorEndPath = cms.EndPath(process.l1tMonitorEndPathSeq) + +# + + +# +process.dqmEndPath = cms.EndPath( + process.dqmEnv * + process.dqmSaver + ) + +# +process.schedule = cms.Schedule(#process.rawToDigiPath, + process.l1tMonitorPath, + #process.l1tMonitorEndPath, + process.dqmEndPath + ) + +#--------------------------------------------- + +# examples for quick fixes in case of troubles +# please do not modify the commented lines +# + + +# +# turn on verbosity in L1TEventInfoClient +# +# process.l1tEventInfoClient.verbose = cms.untracked.bool(True) + + +# remove module(s) or system sequence from l1tMonitorPath +# quality test disabled also +# +#process.l1tMonitorOnline.remove(process.bxTiming) +#process.l1tMonitorOnline.remove(process.l1tBPTX) + +#process.l1tMonitorOnline.remove(process.l1tLtc) + +#process.l1tMonitorOnline.remove(process.l1Dttf) + +#process.l1tMonitorOnline.remove(process.l1tCsctf) + +#process.l1tMonitorOnline.remove(process.l1tRpctf) + +#process.l1tMonitorOnline.remove(process.l1tGmt) + +#process.l1tMonitorOnline.remove(process.l1tGt) + +#process.l1tMonitorOnline.remove(process.l1ExtraDqmSeq) + +#process.l1tMonitorOnline.remove(process.l1tRate) + +#process.l1tMonitorOnline.remove(process.l1tRctRun1) + +#process.l1tMonitorOnline.remove(process.l1tGctSeq) + + +# remove module(s) or system sequence from l1tMonitorEndPath +# +#process.l1tMonitorEndPathSeq.remove(process.l1s) +#process.l1tMonitorEndPathSeq.remove(process.l1tscalers) + +# +#process.schedule.remove(process.l1tSyncPath) + +#-------------------------------------------------- +# Heavy Ion Specific Fed Raw Data Collection Label +#-------------------------------------------------- + +print "Running with run type = ", process.runType.getRunType() +#process.castorDigis.InputLabel = cms.InputTag("rawDataCollector") +#process.csctfDigis.producer = cms.InputTag("rawDataCollector") +#process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataCollector") +#process.ecalDigis.InputLabel = cms.InputTag("rawDataCollector") +#process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataCollector") +#process.gctDigis.inputLabel = cms.InputTag("rawDataCollector") +#process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataCollector") +#process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataCollector") +#process.hcalDigis.InputLabel = cms.InputTag("rawDataCollector") +#process.muonCSCDigis.InputObjects = cms.InputTag("rawDataCollector") +#process.muonDTDigis.inputLabel = cms.InputTag("rawDataCollector") +#process.muonRPCDigis.InputLabel = cms.InputTag("rawDataCollector") +#process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataCollector") +#process.siPixelDigis.InputLabel = cms.InputTag("rawDataCollector") +#process.siStripDigis.ProductLabel = cms.InputTag("rawDataCollector") +#process.bxTiming.FedSource = cms.untracked.InputTag("rawDataCollector") +#process.l1s.fedRawData = cms.InputTag("rawDataCollector") + +if (process.runType.getRunType() == process.runType.hi_run): + process.castorDigis.InputLabel = cms.InputTag("rawDataRepacker") + process.csctfDigis.producer = cms.InputTag("rawDataRepacker") + process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataRepacker") + process.ecalDigis.InputLabel = cms.InputTag("rawDataRepacker") + process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataRepacker") + process.gctDigis.inputLabel = cms.InputTag("rawDataRepacker") + process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataRepacker") + process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataRepacker") + process.hcalDigis.InputLabel = cms.InputTag("rawDataRepacker") + process.muonCSCDigis.InputObjects = cms.InputTag("rawDataRepacker") + process.muonDTDigis.inputLabel = cms.InputTag("rawDataRepacker") + process.muonRPCDigis.InputLabel = cms.InputTag("rawDataRepacker") + process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataRepacker") + process.siPixelDigis.InputLabel = cms.InputTag("rawDataRepacker") + process.siStripDigis.ProductLabel = cms.InputTag("rawDataRepacker") + process.bxTiming.FedSource = cms.untracked.InputTag("rawDataRepacker") + process.l1s.fedRawData = cms.InputTag("rawDataRepacker") + +### process customizations included here +from DQM.Integration.config.online_customizations_cfi import * +process = customise(process) diff --git a/DQM/L1TMonitor/BuildFile.xml b/DQM/L1TMonitor/BuildFile.xml index 1214a58973453..81a76e486fb66 100644 --- a/DQM/L1TMonitor/BuildFile.xml +++ b/DQM/L1TMonitor/BuildFile.xml @@ -35,7 +35,7 @@ - + - + diff --git a/DQM/L1TMonitor/interface/L1TStage2mGMT.h b/DQM/L1TMonitor/interface/L1TStage2mGMT.h new file mode 100755 index 0000000000000..0efb9b127a4d3 --- /dev/null +++ b/DQM/L1TMonitor/interface/L1TStage2mGMT.h @@ -0,0 +1,130 @@ +#ifndef DQM_L1TMonitor_L1TStage2mGMT_h +#define DQM_L1TMonitor_L1TStage2mGMT_h + +/* + * \file L1TStage2mGMT.h + * \Author Esmaeel Eskandari Tadavani +*/ + +// system requirements +#include +#include +#include +#include +#include + +// general requirements +#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/Common/interface/Handle.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "DataFormats/Common/interface/OrphanHandle.h" + +// stage2 requirements +#include "DataFormats/L1Trigger/interface/BXVector.h" +#include "DataFormats/L1Trigger/interface/Muon.h" + +// dqm requirements +#include "DQMServices/Core/interface/DQMStore.h" +#include "DQMServices/Core/interface/MonitorElement.h" +#include "DQMServices/Core/interface/DQMEDAnalyzer.h" + + +// class decleration + +class L1TStage2mGMT: public DQMEDAnalyzer { + +public: + +// class constructor +L1TStage2mGMT(const edm::ParameterSet & ps); + +// class destructor +virtual ~L1TStage2mGMT(); + +// member functions +protected: + void analyze(const edm::Event&, const edm::EventSetup&) override; + virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override; + virtual void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override; + virtual void bookHistograms(DQMStore::IBooker&, const edm::Run&, const edm::EventSetup&) override ; + +// data members +private: + // enum ensubs {BMTF, OMTF, EMTF, mGMT}; + + std::string monitorDir; + edm::InputTag stage2mgmtSource ; + bool verbose ; + edm::EDGetToken stage2mgmtToken ; + + // eta & phi + // MonitorElement* subs_eta[4]; + // MonitorElement* subs_phi[4]; + // MonitorElement* subs_etaphi[4]; + // MonitorElement* subs_etaqty[4]; + + // MonitorElement* eta_bmtf_omtf_emtf; + MonitorElement* eta_bmtf; + MonitorElement* eta_omtf; + MonitorElement* eta_emtf; + // MonitorElement* phi_bmtf_omtf_emtf; + MonitorElement* phi_bmtf; + MonitorElement* phi_omtf; + MonitorElement* phi_emtf; + // MonitorElement* etaphi_bmtf_omtf_emtf; + /* MonitorElement* etaphi_bmtf; */ + /* MonitorElement* etaphi_omtf; */ + /* MonitorElement* etaphi_emtf; */ + /* MonitorElement* phi_bmtf_omtf; */ + /* MonitorElement* phi_bmtf_emtf; */ + /* MonitorElement* phi_omtf_emtf; */ + /* MonitorElement* eta_bmtf_omtf; */ + /* MonitorElement* eta_bmtf_emtf; */ + /* MonitorElement* eta_omtf_emtf; */ + + MonitorElement* pt_bmtf; + MonitorElement* pt_omtf; + MonitorElement* pt_emtf; + // bunch-crossing + // MonitorElement* subs_nbx[4]; + // MonitorElement* subs_dbx[3]; + // MonitorElement* bx_number; + // MonitorElement* dbx_chip; + // MonitorElement* bx_bmtf_omtf; + // MonitorElement* bx_bmtf_emtf; + // MonitorElement* bx_omtf_emtfc; + + + // MonitorElement* subs_pt[4]; + // MonitorElement* subs_qty[4]; + // MonitorElement* subs_bits[4]; + + // MonitorElement* regional_triggers; + + // MonitorElement* n_bmtf_vs_omtf ; + // MonitorElement* n_bmtf_vs_emtf; + // MonitorElement* n_omtf_vs_emtf; + + + // const edm::EDGetTokenT mgmtSource_ ; + + /* int bxnum_old_; // bx of previous event */ + /* int obnum_old_; // orbit of previous event */ + /* int trsrc_old_; // code of trigger source ( bits: 0 DT, 1 bRPC, 2 CSC, 3 fRPC ) */ + + /* static const double piconv_; */ + /* double phiconv_(float phi); */ + /* void book_(const edm::EventSetup& c); */ + + +}; + +#endif diff --git a/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py b/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py new file mode 100644 index 0000000000000..aa71182ba1e58 --- /dev/null +++ b/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py @@ -0,0 +1,9 @@ +import FWCore.ParameterSet.Config as cms + +from DQM.L1TMonitor.L1TStage2mGMT_cfi import * + +from EventFilter.L1TRawToDigi.gmtStage2Digis_cfi import * + +l1tStage2online = cms.Sequence( + l1tStage2mGMT + ) diff --git a/DQM/L1TMonitor/python/L1TStage2mGMT_cfi.py b/DQM/L1TMonitor/python/L1TStage2mGMT_cfi.py new file mode 100644 index 0000000000000..af6be73484bb1 --- /dev/null +++ b/DQM/L1TMonitor/python/L1TStage2mGMT_cfi.py @@ -0,0 +1,8 @@ +import FWCore.ParameterSet.Config as cms + +l1tStage2mGMT = cms.EDAnalyzer("L1TStage2mGMT", + verbose = cms.untracked.bool(False), + stage2mgmtSource = cms.InputTag("gmtStage2Digis"), + DQMStore = cms.untracked.bool(True), + monitorDir = cms.untracked.string("L1T2016/L1TStage2mGMT") + ) diff --git a/DQM/L1TMonitor/src/L1TStage2mGMT.cc b/DQM/L1TMonitor/src/L1TStage2mGMT.cc new file mode 100755 index 0000000000000..9c1ff9833bf7b --- /dev/null +++ b/DQM/L1TMonitor/src/L1TStage2mGMT.cc @@ -0,0 +1,111 @@ +/* + * \L1TStage2mGMT.cc + * \author Esmaeel Eskandari Tadavani +*/ + +#include "DQM/L1TMonitor/interface/L1TStage2mGMT.h" + +L1TStage2mGMT::L1TStage2mGMT(const edm::ParameterSet & ps): + monitorDir(ps.getUntrackedParameter("monitorDir","")), + stage2mgmtSource(ps.getParameter("stage2mgmtSource")), + verbose(ps.getUntrackedParameter("verbose", false)) +{ + stage2mgmtToken=consumes(ps.getParameter("stage2mgmtSource")); +} + +L1TStage2mGMT::~L1TStage2mGMT() +{ +} + +void L1TStage2mGMT::dqmBeginRun(const edm::Run& iRrun, const edm::EventSetup& eveSetup) +{ +} + +void L1TStage2mGMT::beginLuminosityBlock(const edm::LuminosityBlock& iLumi, const edm::EventSetup& eveSetup) +{ +} + + +void L1TStage2mGMT::bookHistograms(DQMStore::IBooker &ibooker, const edm::Run& iRun, const edm::EventSetup& eveSetup) +{ + ibooker.setCurrentFolder(monitorDir); + + // eta & phi + // eta_bmtf_omtf_emtf= ibooker.book1D("eta_bmtf_omtf_emtf", "Eta of BMTF & OMTF & EMTF", 229, -114.5, 114.5); + eta_bmtf = ibooker.book1D("eta_bmtf", "Eta of BMTF", 229, -114.5, 114.5); + eta_omtf = ibooker.book1D("eta_omtf", "Eta of OMTF", 229, -114.5, 114.5); + eta_emtf = ibooker.book1D("eta_emtf", "Eta of EMTF", 229, -114.5, 114.5); + + // phi_bmtf_omtf_emtf= ibooker.book1D("phi_bmtf_omtf_emtf", "Phi of BMTF & OMTF & EMTF", 144, -0.5, 143.5); + phi_bmtf = ibooker.book1D("phi_bmtf", "Phi of BMTF", 144, -0.5, 143.5); + phi_omtf = ibooker.book1D("phi_omtf", "Phi of OMTF", 144, -0.5, 143.5); + phi_emtf = ibooker.book1D("phi_emtf", "Phi of EMTF", 144, -0.5, 143.5); + + // etaphi_bmtf_omtf_emtf= ibooker.book2D("etaphi_bmtf_omtf_emtf", "EtaPhi of BMTF & OMTF & EMTF", 229, -114.5, 114.5, 144, -0.5, 143.5); + // etaphi_bmtf = ibooker.book2D("etaphi_bmtf", "EtaPhi of BMTF", 229, -114.5, 114.5, 144, -0.5, 143.5); + // etaphi_omtf = ibooker.book2D("etaphi_omtf", "EtaPhi of OMTF", 229, -114.5, 114.5, 144, -0.5, 143.5); + // etaphi_emtf = ibooker.book2D("etaphi_emtf", "EtaPhi of EMTF", 229, -114.5, 114.5, 144, -0.5, 143.5); + + // eta_bmtf_omtf= ibooker.book1D("eta_bmtf_omtf", "Eta of BMTF & OMTF", 229, -114.5, 114.5); + // eta_bmtf_emtf= ibooker.book1D("eta_bmtf_emtf", "Eta of BMTF & EMTF", 229, -114.5, 114.5); + // eta_omtf_emtf= ibooker.book1D("eta_omtf_emtf", "Eta of OMTF & EMTF", 229, -114.5, 114.5); + + // phi_bmtf_omtf= ibooker.book1D("phi_bmtf_omtf", "Phi of BMTF & OMTF", 144, -0.5, 143.5); + // phi_bmtf_emtf= ibooker.book1D("phi_bmtf_emtf", "Phi of BMTF & EMTF", 144, -0.5, 143.5); + // phi_omtf_emtf= ibooker.book1D("phi_omtf_emtf", "Phi of OMTF & EMTF", 144, -0.5, 143.5); + + pt_bmtf = ibooker.book1D("pt_bmtf", "Pt of BMTF", 1000, 0, 1000); + pt_omtf = ibooker.book1D("pt_omtf", "Pt of OMTF", 1000, 0, 1000); + pt_emtf = ibooker.book1D("pt_emtf", "Pt of EMTF", 1000, 0, 1000); + + +} + + +void L1TStage2mGMT::analyze(const edm::Event & eve, const edm::EventSetup & eveSetup) +{ + if (verbose) { + edm::LogInfo("L1TStage2mGMT") << "L1TStage2mGMT: analyze...." << std::endl; + } + // analyze Jet + edm::Handle Muon; + eve.getByToken(stage2mgmtToken,Muon); + + + for(int itBX=Muon->getFirstBX(); itBX<=Muon->getLastBX(); ++itBX) + { + for(l1t::MuonBxCollection::const_iterator itMuon = Muon->begin(itBX); itMuon != Muon->end(itBX); ++itMuon) + // for(l1t::MuonBxCollection::const_iterator itMuon = Muon->begin(); itMuon != Muon->end(); ++itMuon) + { + const bool endcap = (itMuon->hwEta() >= 68 || itMuon->hwEta() <= (-68)); + const bool overlap = ((itMuon->hwEta() > 44 && itMuon->hwEta() < 68) ||(itMuon->hwEta() >= (-68) && itMuon->hwEta() <= (-44))); + const bool barrel = (itMuon->hwEta() >= (-44) && itMuon->hwEta() <= 44); + + if (endcap) + { + eta_emtf->Fill(itMuon->hwEta()); + phi_emtf->Fill(itMuon->hwPhi()); + pt_emtf->Fill(itMuon->hwPt()); + } + + if (overlap) + { + eta_omtf->Fill(itMuon->hwEta()); + phi_omtf->Fill(itMuon->hwPhi()); + pt_omtf->Fill(itMuon->hwPt()); + } + + if (barrel) + { + eta_bmtf->Fill(itMuon->hwEta()); + phi_bmtf->Fill(itMuon->hwPhi()); + pt_bmtf->Fill(itMuon->hwPt()); + } + } + } +} + + + + + diff --git a/DQM/L1TMonitor/src/SealModule.cc b/DQM/L1TMonitor/src/SealModule.cc index 4dd4e36ad03c5..05232e41fada8 100644 --- a/DQM/L1TMonitor/src/SealModule.cc +++ b/DQM/L1TMonitor/src/SealModule.cc @@ -27,6 +27,9 @@ DEFINE_FWK_MODULE(L1TRPCTF); #include DEFINE_FWK_MODULE(L1TGMT); +#include +DEFINE_FWK_MODULE(L1TStage2mGMT); + #include DEFINE_FWK_MODULE(L1TGCT); @@ -34,8 +37,8 @@ DEFINE_FWK_MODULE(L1TGCT); #include DEFINE_FWK_MODULE(L1TRCT); -#include "DQM/L1TMonitor/interface/L1TPUM.h" -DEFINE_FWK_MODULE(L1TPUM); +//#include "DQM/L1TMonitor/interface/L1TPUM.h" +//DEFINE_FWK_MODULE(L1TPUM); #include DEFINE_FWK_MODULE(L1TGT); @@ -60,11 +63,5 @@ DEFINE_FWK_MODULE(L1TdeRCT); #include "DQM/L1TMonitor/interface/L1TdeCSCTF.h" DEFINE_FWK_MODULE(L1TdeCSCTF); -#include "DQM/L1TMonitor/interface/L1THIonImp.h" -DEFINE_FWK_MODULE(L1THIonImp); - -#include -DEFINE_FWK_MODULE(L1TStage2CaloLayer2); - //#include "DQM/L1TMonitor/interface/L1GtHwValidation.h" //DEFINE_FWK_MODULE(L1GtHwValidation); From a32284170fb93688d6d14e2fe890861cb09332f5 Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Thu, 14 Jan 2016 23:58:00 +0100 Subject: [PATCH 016/250] Apply changes of Anthony Rose on top of 80X --- .../src/AlignmentParameterSelector.cc | 4 +- .../plugins/AlignmentMonitorAsAnalyzer.cc | 3 + .../AlignmentMonitorMuonSystemMap1D.cc | 13 +- .../AlignmentMonitorMuonVsCurvature.cc | 13 +- .../AlignmentMonitorSegmentDifferences.cc | 13 +- .../python/convertSQLitetoXML_cfg.py | 2 +- .../python/convertXMLtoSQLite_cfg.py | 2 +- .../python/download_sqlite_cfg.py | 2 +- .../python/makeMuonMisalignmentScenario.py | 2 +- .../src/MuonAlignmentInputMethod.cc | 2 + .../MuonAlignmentAlgorithms/BuildFile.xml | 2 + .../interface/MuonCSCChamberResidual.h | 5 +- .../interface/MuonChamberResidual.h | 6 +- .../interface/MuonDT13ChamberResidual.h | 6 +- .../interface/MuonDT2ChamberResidual.h | 6 +- .../interface/MuonResidualsFitter.h | 62 +- .../interface/MuonResidualsFromTrack.h | 40 +- .../interface/MuonResidualsTwoBin.h | 5 + .../interface/MuonTrackCSCChamberResidual.h | 2 +- .../interface/MuonTrackDT13ChamberResidual.h | 2 +- .../interface/MuonTrackDT2ChamberResidual.h | 2 +- .../plugins/MuonAlignmentFromReference.cc | 3183 +++++++++-------- .../python/MuonAlignmentFromReference_cff.py | 16 +- .../python/align_cfg.py | 12 + .../python/gather_cfg.py | 12 + .../scripts/createJobs.py | 18 +- .../scripts/createTree.py | 6 + .../src/MuonCSCChamberResidual.cc | 159 +- .../src/MuonChamberResidual.cc | 2 +- .../src/MuonDT13ChamberResidual.cc | 131 +- .../src/MuonDT2ChamberResidual.cc | 128 +- .../src/MuonResidualsFitter.cc | 129 +- .../src/MuonResidualsFromTrack.cc | 1084 ++++-- .../src/MuonTrackCSCChamberResidual.cc | 5 +- .../src/MuonTrackDT13ChamberResidual.cc | 2 +- .../src/MuonTrackDT2ChamberResidual.cc | 2 +- .../test/StandAloneTest.cc | 12 +- 37 files changed, 2946 insertions(+), 2149 deletions(-) diff --git a/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterSelector.cc b/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterSelector.cc index 3c0e804242377..2369334c09038 100644 --- a/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterSelector.cc +++ b/Alignment/CommonAlignmentAlgorithm/src/AlignmentParameterSelector.cc @@ -583,6 +583,8 @@ bool AlignmentParameterSelector::outsideDetIdRanges(const Alignable *alignable) const DetId detId(alignable->id()); const int subdetId = detId.subdetId(); + if (alignableTracker()) { + const TrackerTopology* tTopo = alignableTracker()->trackerTopology(); if (!theDetIds.empty() && @@ -663,7 +665,7 @@ bool AlignmentParameterSelector::outsideDetIdRanges(const Alignable *alignable) if (!theTECDetIdRanges.theSideRanges.empty() && !this->insideRanges(tTopo->tecSide(detId), theTECDetIdRanges.theSideRanges)) return true; } - + } } return false; diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorAsAnalyzer.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorAsAnalyzer.cc index 4bb9f28fc2da6..ad109e680dba3 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorAsAnalyzer.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorAsAnalyzer.cc @@ -56,6 +56,9 @@ #include "CondFormats/AlignmentRecord/interface/CSCAlignmentErrorExtendedRcd.h" #include "CondFormats/AlignmentRecord/interface/GlobalPositionRcd.h" #include "CondFormats/Alignment/interface/DetectorGlobalPosition.h" + +#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" + // // class decleration // diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc index ead206f7695ae..b65d9e92c02cc 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc @@ -24,6 +24,11 @@ #include "TH1F.h" #include "TH2F.h" +#include "TrackingTools/Records/interface/TrackingComponentsRecord.h" +#include "TrackingTools/GeomPropagators/interface/Propagator.h" +#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" +#include "MagneticField/Engine/interface/MagneticField.h" + class AlignmentMonitorMuonSystemMap1D: public AlignmentMonitorBase { @@ -260,6 +265,12 @@ void AlignmentMonitorMuonSystemMap1D::event(const edm::Event &iEvent, const edm: edm::Handle beamSpot; iEvent.getByLabel(m_beamSpotTag, beamSpot); + edm::ESHandle prop; + iSetup.get().get("SteppingHelixPropagatorAny",prop); + + edm::ESHandle magneticField; + iSetup.get().get(magneticField); + if (m_muonCollectionTag.label().empty()) // use trajectories { for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end(); ++trajtrack) @@ -275,7 +286,7 @@ void AlignmentMonitorMuonSystemMap1D::event(const edm::Event &iEvent, const edm: { m_counter_trackdxy++; - MuonResidualsFromTrack muonResidualsFromTrack(globalGeometry, traj, track, pNavigator(), 1000.); + MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, prop, traj, track, pNavigator(), 1000.); processMuonResidualsFromTrack(muonResidualsFromTrack, iEvent); } } // end if track has acceptable momentum diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc index eddfed46b6a4d..dea083f31b9dc 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc @@ -24,6 +24,11 @@ #include "TH2F.h" #include "TH1F.h" +#include "TrackingTools/Records/interface/TrackingComponentsRecord.h" +#include "TrackingTools/GeomPropagators/interface/Propagator.h" +#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" +#include "MagneticField/Engine/interface/MagneticField.h" + class AlignmentMonitorMuonVsCurvature: public AlignmentMonitorBase { @@ -191,6 +196,12 @@ void AlignmentMonitorMuonVsCurvature::event(const edm::Event &iEvent, const edm: edm::Handle beamSpot; iEvent.getByLabel(m_beamSpotTag, beamSpot); + edm::ESHandle prop; + iSetup.get().get("SteppingHelixPropagatorAny",prop); + + edm::ESHandle magneticField; + iSetup.get().get(magneticField); + if (m_muonCollectionTag.label().empty()) // use trajectories { for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end(); ++trajtrack) @@ -200,7 +211,7 @@ void AlignmentMonitorMuonVsCurvature::event(const edm::Event &iEvent, const edm: if (track->pt() > m_minTrackPt && track->p() > m_minTrackP && fabs(track->dxy(beamSpot->position())) < m_maxDxy ) { - MuonResidualsFromTrack muonResidualsFromTrack(globalGeometry, traj, track, pNavigator(), 1000.); + MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, prop, traj, track, pNavigator(), 1000.); processMuonResidualsFromTrack(muonResidualsFromTrack, traj ); } // end if track pT is within range } // end loop over tracks diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc index 4b20758b6eb5b..bcfc47fcd4ede 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc @@ -24,6 +24,11 @@ #include +#include "TrackingTools/Records/interface/TrackingComponentsRecord.h" +#include "TrackingTools/GeomPropagators/interface/Propagator.h" +#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" +#include "MagneticField/Engine/interface/MagneticField.h" + class AlignmentMonitorSegmentDifferences: public AlignmentMonitorBase { @@ -343,6 +348,12 @@ void AlignmentMonitorSegmentDifferences::event(const edm::Event &iEvent, const e edm::Handle beamSpot; iEvent.getByLabel(m_beamSpotTag, beamSpot); + edm::ESHandle prop; + iSetup.get().get("SteppingHelixPropagatorAny",prop); + + edm::ESHandle magneticField; + iSetup.get().get(magneticField); + if (m_muonCollectionTag.label().empty()) // use trajectories { for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end(); ++trajtrack) @@ -352,7 +363,7 @@ void AlignmentMonitorSegmentDifferences::event(const edm::Event &iEvent, const e if (track->pt() > m_minTrackPt && track->p() > m_minTrackP && fabs(track->dxy(beamSpot->position())) < m_maxDxy ) { - MuonResidualsFromTrack muonResidualsFromTrack(globalGeometry, traj, track, pNavigator(), 1000.); + MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, prop, traj, track, pNavigator(), 1000.); processMuonResidualsFromTrack(muonResidualsFromTrack); } } // end loop over tracks diff --git a/Alignment/MuonAlignment/python/convertSQLitetoXML_cfg.py b/Alignment/MuonAlignment/python/convertSQLitetoXML_cfg.py index bd62ccfa0316f..c2ba2433adf5a 100644 --- a/Alignment/MuonAlignment/python/convertSQLitetoXML_cfg.py +++ b/Alignment/MuonAlignment/python/convertSQLitetoXML_cfg.py @@ -4,7 +4,7 @@ process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1)) -process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi") +process.load("Configuration.StandardSequences.GeometryIdeal_cff") process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi") process.load("CondCore.DBCommon.CondDBSetup_cfi") diff --git a/Alignment/MuonAlignment/python/convertXMLtoSQLite_cfg.py b/Alignment/MuonAlignment/python/convertXMLtoSQLite_cfg.py index 10b2ca0c45fa6..ed0c63a4bb7de 100644 --- a/Alignment/MuonAlignment/python/convertXMLtoSQLite_cfg.py +++ b/Alignment/MuonAlignment/python/convertXMLtoSQLite_cfg.py @@ -5,7 +5,7 @@ process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1)) -process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi") +process.load("Configuration.StandardSequences.GeometryIdeal_cff") process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi") process.MuonGeometryDBConverter = cms.EDAnalyzer("MuonGeometryDBConverter", diff --git a/Alignment/MuonAlignment/python/download_sqlite_cfg.py b/Alignment/MuonAlignment/python/download_sqlite_cfg.py index 09094f7620c1d..26676b48b3915 100644 --- a/Alignment/MuonAlignment/python/download_sqlite_cfg.py +++ b/Alignment/MuonAlignment/python/download_sqlite_cfg.py @@ -8,7 +8,7 @@ process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1)) -process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi") +process.load("Configuration.StandardSequences.GeometryIdeal_cff") process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi") process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") process.GlobalTag.globaltag = globalTag diff --git a/Alignment/MuonAlignment/python/makeMuonMisalignmentScenario.py b/Alignment/MuonAlignment/python/makeMuonMisalignmentScenario.py index e3233ed01c2ba..7157e64697385 100644 --- a/Alignment/MuonAlignment/python/makeMuonMisalignmentScenario.py +++ b/Alignment/MuonAlignment/python/makeMuonMisalignmentScenario.py @@ -355,7 +355,7 @@ def random6dof(): process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1)) -process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi") +process.load("Configuration.StandardSequences.GeometryDB_cff") process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi") process.MuonGeometryDBConverter = cms.EDAnalyzer("MuonGeometryDBConverter", diff --git a/Alignment/MuonAlignment/src/MuonAlignmentInputMethod.cc b/Alignment/MuonAlignment/src/MuonAlignmentInputMethod.cc index 50236a99ede86..cc6fda981ca9a 100644 --- a/Alignment/MuonAlignment/src/MuonAlignmentInputMethod.cc +++ b/Alignment/MuonAlignment/src/MuonAlignmentInputMethod.cc @@ -21,6 +21,8 @@ #include "Geometry/DTGeometryBuilder/src/DTGeometryBuilderFromDDD.h" #include "Geometry/CSCGeometryBuilder/src/CSCGeometryBuilderFromDDD.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + // // constants, enums and typedefs // diff --git a/Alignment/MuonAlignmentAlgorithms/BuildFile.xml b/Alignment/MuonAlignmentAlgorithms/BuildFile.xml index fe9077ec82165..80676ccc21abb 100644 --- a/Alignment/MuonAlignmentAlgorithms/BuildFile.xml +++ b/Alignment/MuonAlignmentAlgorithms/BuildFile.xml @@ -10,6 +10,8 @@ + + diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h index c52c798cfffd4..6faad479ad978 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h @@ -9,16 +9,17 @@ */ #include "Alignment/MuonAlignmentAlgorithms/interface/MuonHitsChamberResidual.h" +#include "TrackingTools/GeomPropagators/interface/Propagator.h" class MuonCSCChamberResidual: public MuonHitsChamberResidual { public: MuonCSCChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable); + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // for CSC, the residual is chamber local x, projected by the strip measurement direction // for CSC, the resslope is dresx/dz, or tan(phi_y) - virtual void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit); + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit); // dummy method virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) {} diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonChamberResidual.h index 2bbe899797f76..a6753b9a237ee 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonChamberResidual.h @@ -21,6 +21,8 @@ #include "DataFormats/MuonReco/interface/Muon.h" #include "DataFormats/MuonReco/interface/MuonFwd.h" +#include "TrackingTools/GeomPropagators/interface/Propagator.h" + class MuonChamberResidual { public: @@ -32,12 +34,12 @@ class MuonChamberResidual }; MuonChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable); + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); virtual ~MuonChamberResidual() {} // has to be implemented for rechit based residuals - virtual void addResidual(const TrajectoryStateOnSurface *, const TransientTrackingRecHit *) = 0; + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *, const TrackingRecHit *) = 0; // has to be implemented for track muon segment residuals virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) = 0; diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h index e8d3c336c7827..4fce2c50f25ec 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h @@ -9,16 +9,18 @@ */ #include "Alignment/MuonAlignmentAlgorithms/interface/MuonHitsChamberResidual.h" +#include "TrackingTools/Records/interface/TrackingComponentsRecord.h" +#include "TrackingTools/GeomPropagators/interface/Propagator.h" class MuonDT13ChamberResidual: public MuonHitsChamberResidual { public: MuonDT13ChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable); + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // for DT13, the residual is chamber local x // for DT13, the resslope is dresx/dz, or tan(phi_y) - virtual void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit); + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit); // dummy method virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) {} diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h index d1404792591e4..3529b679b58f8 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h @@ -9,16 +9,18 @@ */ #include "Alignment/MuonAlignmentAlgorithms/interface/MuonHitsChamberResidual.h" +#include "TrackingTools/Records/interface/TrackingComponentsRecord.h" +#include "TrackingTools/GeomPropagators/interface/Propagator.h" class MuonDT2ChamberResidual: public MuonHitsChamberResidual { public: MuonDT2ChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable); + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // for DT2, the residual is chamber local y // for DT2, the resslope is dresy/dz, or tan(phi_x) - virtual void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit); + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit); // dummy method virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) {} diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h index 99d5cb40672c0..348b9e0ca154d 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h @@ -103,7 +103,9 @@ class MuonResidualsFitter k1110, k1100, k1010, - k0010 + k0010, + k1000, + k0100 }; struct MuonAlignmentTreeRow @@ -127,54 +129,30 @@ class MuonResidualsFitter Bool_t select; }; - MuonResidualsFitter(int residualsModel, int minHits, int useResiduals, bool weightAlignment=true) - : m_residualsModel(residualsModel), m_minHits(minHits), m_useResiduals(useResiduals), m_weightAlignment(weightAlignment), m_printLevel(0), m_strategy(1), m_cov(1), m_loglikelihood(0.) - { - if (m_residualsModel != kPureGaussian && m_residualsModel != kPowerLawTails && - m_residualsModel != kROOTVoigt && m_residualsModel != kGaussPowerTails && m_residualsModel != kPureGaussian2D) - throw cms::Exception("MuonResidualsFitter") << "unrecognized residualsModel"; - }; - - virtual ~MuonResidualsFitter() - { - for (std::vector::const_iterator residual = residuals_begin(); residual != residuals_end(); ++residual) { - delete [] (*residual); - } - } + MuonResidualsFitter(int residualsModel, int minHits, int useResiduals, bool weightAlignment=true); + virtual ~MuonResidualsFitter(); virtual int type() const = 0; virtual int npar() = 0; virtual int ndata() = 0; - int useRes() const { return m_useResiduals; } + int useRes(int pattern = -1) { if (pattern>=0) m_useResiduals = pattern; return m_useResiduals; } int residualsModel() const { return m_residualsModel; } long numResiduals() const { return m_residuals.size(); } - void fix(int parNum, bool val=true) - { - assert(0 <= parNum && parNum < npar()); - if (m_fixed.size() == 0) m_fixed.resize(npar(), false); - m_fixed[parNum] = val; - } + void fix(int parNum, bool dofix=true); + bool fixed(int parNum); - bool fixed(int parNum) - { - assert(0 <= parNum && parNum < npar()); - if (m_fixed.size() == 0) return false; - else return m_fixed[parNum]; - } int nfixed() { return std::count(m_fixed.begin(), m_fixed.end(), true); } void setPrintLevel(int printLevel) { m_printLevel = printLevel; } void setStrategy(int strategy) { m_strategy = strategy; } + void setInitialValue(int parNum, double value) { m_parNum2InitValue[parNum] = value; } + // an array of the actual residual and associated baggage (qoverpt, trackangle, trackposition) // arrays passed to fill() are "owned" by MuonResidualsFitter: MuonResidualsFitter will delete them, don't do it yourself! - void fill(double *residual) - { - m_residuals.push_back(residual); - m_residuals_ok.push_back(true); - } + void fill(double *residual); // this block of results is only valid if fit() returns true // also gamma is only valid if the model is kPowerLawTails or kROOTVoigt @@ -188,23 +166,12 @@ class MuonResidualsFitter int parNum2parIdx(int parNum) { return m_parNum2parIdx[parNum];} TMatrixDSym covarianceMatrix() {return m_cov;} - double covarianceElement(int parNum1, int parNum2) - { - assert(0 <= parNum1 && parNum1 < npar()); - assert(0 <= parNum2 && parNum2 < npar()); - assert(m_cov.GetNcols() == npar()); // m_cov might have not yet been resized to account for proper #parameters - return m_cov(parNum2parIdx(parNum1), parNum2parIdx(parNum2)); - } + double covarianceElement(int parNum1, int parNum2); TMatrixDSym correlationMatrix(); double loglikelihood() { return m_loglikelihood; } - long numsegments() - { - long num = 0; - for (std::vector::const_iterator resiter = residuals_begin(); resiter != residuals_end(); ++resiter) num++; - return num; - } + long numsegments(); virtual double sumofweights() = 0; @@ -236,6 +203,8 @@ class MuonResidualsFitter void selectPeakResiduals_simple(double nsigma, int nvar, int *vars); void selectPeakResiduals(double nsigma, int nvar, int *vars); + void fiducialCuts(double xMin = -1000, double xMax = 1000, double yMin = -1000, double yMax = 1000); + virtual void correctBField() = 0; virtual void correctBField(int idx_momentum, int idx_q); @@ -253,6 +222,7 @@ class MuonResidualsFitter int m_useResiduals; bool m_weightAlignment; std::vector m_fixed; + std::map m_parNum2InitValue; int m_printLevel, m_strategy; std::vector m_residuals; diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFromTrack.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFromTrack.h index b7a5a1350b380..360b69d152314 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFromTrack.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFromTrack.h @@ -21,6 +21,25 @@ #include "DataFormats/MuonReco/interface/MuonFwd.h" #include "DataFormats/TrackReco/interface/Track.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "TrackingTools/Records/interface/TrackingComponentsRecord.h" +#include "TrackingTools/TrackFitters/interface/TrajectoryFitter.h" +#include "TrackingTools/PatternTools/interface/TrajectorySmoother.h" + +#include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h" +#include "TrackingTools/TransientTrack/interface/TransientTrack.h" +#include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHitBuilder.h" +#include "TrackingTools/Records/interface/TransientRecHitRecord.h" +//#include "TrackingTools/PatternTools/interface/Trajectory.h" +#include "TrackingTools/GeomPropagators/interface/Propagator.h" + +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackReco/interface/TrackFwd.h" +#include "DataFormats/DetId/interface/DetId.h" + #include "TMatrixDSym.h" #include "TMatrixD.h" @@ -33,14 +52,18 @@ class MuonResidualsFromTrack { public: // residuals from global muon trajectories - MuonResidualsFromTrack(edm::ESHandle globalGeometry, - const Trajectory *traj, - const reco::Track* trk, - AlignableNavigator *navigator, double maxResidual); + MuonResidualsFromTrack( const edm::EventSetup& iSetup, + edm::ESHandle magneticField, + edm::ESHandle globalGeometry, + edm::ESHandle prop, + const Trajectory *traj, + const reco::Track* recoTrack, + AlignableNavigator *navigator, + double maxResidual ); // residuals from tracker muons MuonResidualsFromTrack(edm::ESHandle globalGeometry, - const reco::Muon *mu, + const reco::Muon *recoMuon, AlignableNavigator *navigator, double maxResidual); @@ -48,7 +71,8 @@ class MuonResidualsFromTrack void clear(); - const reco::Track *getTrack() { return track; } + const reco::Track *getTrack() { return m_recoTrack; } + const reco::Muon *getMuon() { return m_recoMuon; } int trackerNumHits() const { return m_tracker_numHits; } @@ -80,10 +104,10 @@ class MuonResidualsFromTrack void addTrkCovMatrix(DetId, TrajectoryStateOnSurface &); // pointer to its track - const reco::Track *track; + const reco::Track *m_recoTrack; // track muon - const reco::Muon *muon; + const reco::Muon *m_recoMuon; }; #endif // Alignment_MuonAlignmentAlgorithms_MuonResidualsFromTrack_H diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsTwoBin.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsTwoBin.h index d8df43ed7a5ec..40905e9a06535 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsTwoBin.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsTwoBin.h @@ -240,6 +240,11 @@ class MuonResidualsTwoBin { //if (m_twoBin) m_neg->correctBField(); }; + void fiducialCuts() + { + m_pos->fiducialCuts(); + }; + void eraseNotSelectedResiduals() { if (m_twoBin) { diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h index 6dd317acc3052..bf4dfa046c5ed 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h @@ -14,7 +14,7 @@ class MuonTrackCSCChamberResidual: public MuonChamberResidual { public: MuonTrackCSCChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable); + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method virtual void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) {} diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h index 00fb508ec5964..e8269a2408e9f 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h @@ -14,7 +14,7 @@ class MuonTrackDT13ChamberResidual: public MuonChamberResidual { public: MuonTrackDT13ChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable); + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method virtual void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) {} diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h index 56e41347725ba..1183edfc4170f 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h @@ -14,7 +14,7 @@ class MuonTrackDT2ChamberResidual: public MuonChamberResidual { public: MuonTrackDT2ChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable); + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method virtual void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) {} diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc index 774270690ad69..193293c1eff8b 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc @@ -5,10 +5,10 @@ // /**\class MuonAlignmentFromReference MuonAlignmentFromReference.cc Alignment/MuonAlignmentFromReference/interface/MuonAlignmentFromReference.h - Description: +Description: - Implementation: - +Implementation: + */ // // Original Author: Jim Pivarski,,, @@ -30,6 +30,11 @@ #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h" #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h" +#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" +#include "MagneticField/Engine/interface/MagneticField.h" +#include "TrackingTools/Records/interface/TrackingComponentsRecord.h" +#include "TrackingTools/GeomPropagators/interface/Propagator.h" + #include "DataFormats/MuonDetId/interface/MuonSubdetId.h" #include "DataFormats/MuonDetId/interface/DTChamberId.h" #include "DataFormats/MuonDetId/interface/DTSuperLayerId.h" @@ -68,1700 +73,1802 @@ class MuonAlignmentFromReference : public AlignmentAlgorithmBase { -public: - - MuonAlignmentFromReference(const edm::ParameterSet& cfg); - virtual ~MuonAlignmentFromReference(); - - void initialize(const edm::EventSetup& iSetup, - AlignableTracker* alignableTracker, - AlignableMuon* alignableMuon, - AlignableExtras* extras, - AlignmentParameterStore* alignmentParameterStore) override; - - void startNewLoop() override {}; - - void run(const edm::EventSetup& iSetup, const EventInfo &eventInfo) override; - - void processMuonResidualsFromTrack(MuonResidualsFromTrack &mrft); - - void terminate(const edm::EventSetup& iSetup) override; - -private: - bool numeric(std::string s); - int number(std::string s); - std::string chamberPrettyNameFromId(unsigned int idx); - - void parseReference(std::vector &reference, - std::vector &all_DT_chambers, - std::vector &all_CSC_chambers); - - void fitAndAlign(); - void readTmpFiles(); - void writeTmpFiles(); - - void selectResidualsPeaks(); - void correctBField(); - void eraseNotSelectedResiduals(); - - void fillNtuple(); - - // configutarion paramenters: - edm::InputTag m_muonCollectionTag; - std::vector m_reference; - double m_minTrackPt; - double m_maxTrackPt; - double m_minTrackP; - double m_maxTrackP; - double m_maxDxy; - int m_minTrackerHits; - double m_maxTrackerRedChi2; - bool m_allowTIDTEC; - int m_minNCrossedChambers; - int m_minDT13Hits; - int m_minDT2Hits; - int m_minCSCHits; - std::string m_writeTemporaryFile; - std::vector m_readTemporaryFiles; - bool m_doAlignment; - int m_strategy; - std::string m_residualsModel; - int m_minAlignmentHits; - bool m_twoBin; - bool m_combineME11; - bool m_weightAlignment; - std::string m_reportFileName; - double m_maxResSlopeY; - bool m_createNtuple; - double m_peakNSigma; - int m_BFieldCorrection; - bool m_doDT; - bool m_doCSC; - std::string m_useResiduals; - - // utility objects - AlignableNavigator *m_alignableNavigator; - AlignmentParameterStore *m_alignmentParameterStore; - std::vector m_alignables; - std::map m_me11map; - std::map m_fitters; - std::vector m_indexes; - std::map m_fitterOrder; - - // counters - long m_counter_events; - long m_counter_tracks; - long m_counter_trackmomentum; - long m_counter_trackdxy; - long m_counter_trackerhits; - long m_counter_trackerchi2; - long m_counter_trackertidtec; - long m_counter_minchambers; - long m_counter_totchambers; - long m_counter_station123; - long m_counter_station123valid; - long m_counter_station123dt13hits; - long m_counter_station123dt2hits; - long m_counter_station123aligning; - long m_counter_station4; - long m_counter_station4valid; - long m_counter_station4hits; - long m_counter_station4aligning; - long m_counter_csc; - long m_counter_cscvalid; - long m_counter_cschits; - long m_counter_cscaligning; - long m_counter_resslopey; - - // debug ntuple - void bookNtuple(); - TTree * m_ttree; - MuonResidualsFitter::MuonAlignmentTreeRow m_tree_row; + public: + + MuonAlignmentFromReference(const edm::ParameterSet& cfg); + virtual ~MuonAlignmentFromReference(); + + void initialize(const edm::EventSetup& iSetup, + AlignableTracker* alignableTracker, + AlignableMuon* alignableMuon, + AlignableExtras* extras, + AlignmentParameterStore* alignmentParameterStore) override; + + void startNewLoop() override {}; + + void run(const edm::EventSetup& iSetup, const EventInfo &eventInfo) override; + + void processMuonResidualsFromTrack(MuonResidualsFromTrack &mrft); + + void terminate(const edm::EventSetup& iSetup) override; + + private: + bool numeric(std::string s); + int number(std::string s); + std::string chamberPrettyNameFromId(unsigned int idx); + + void parseReference(std::vector &reference, + std::vector &all_DT_chambers, + std::vector &all_CSC_chambers); + + void fitAndAlign(); + void readTmpFiles(); + void writeTmpFiles(); + + void selectResidualsPeaks(); + void correctBField(); + void fiducialCuts(); + void eraseNotSelectedResiduals(); + + void fillNtuple(); + + // configutarion paramenters: + edm::InputTag m_muonCollectionTag; + std::vector m_reference; + double m_minTrackPt; + double m_maxTrackPt; + double m_minTrackP; + double m_maxTrackP; + double m_maxDxy; + int m_minTrackerHits; + double m_maxTrackerRedChi2; + bool m_allowTIDTEC; + int m_minNCrossedChambers; + int m_minDT13Hits; + int m_minDT2Hits; + int m_minCSCHits; + std::string m_writeTemporaryFile; + std::vector m_readTemporaryFiles; + bool m_doAlignment; + int m_strategy; + std::string m_residualsModel; + int m_minAlignmentHits; + bool m_twoBin; + bool m_combineME11; + bool m_weightAlignment; + std::string m_reportFileName; + double m_maxResSlopeY; + bool m_createNtuple; + double m_peakNSigma; + int m_BFieldCorrection; + bool m_doDT; + bool m_doCSC; + std::string m_useResiduals; + + // utility objects + AlignableNavigator *m_alignableNavigator; + AlignmentParameterStore *m_alignmentParameterStore; + std::vector m_alignables; + std::map m_me11map; + std::map m_fitters; + std::vector m_indexes; + std::map m_fitterOrder; + + // counters + long m_counter_events; + long m_counter_tracks; + long m_counter_trackmomentum; + long m_counter_trackdxy; + long m_counter_trackerhits; + long m_counter_trackerchi2; + long m_counter_trackertidtec; + long m_counter_minchambers; + long m_counter_totchambers; + long m_counter_station123; + long m_counter_station123valid; + long m_counter_station123dt13hits; + long m_counter_station123dt2hits; + long m_counter_station123aligning; + long m_counter_station4; + long m_counter_station4valid; + long m_counter_station4hits; + long m_counter_station4aligning; + long m_counter_csc; + long m_counter_cscvalid; + long m_counter_cschits; + long m_counter_cscaligning; + long m_counter_resslopey; + + // debug ntuple + void bookNtuple(); + TTree * m_ttree; + MuonResidualsFitter::MuonAlignmentTreeRow m_tree_row; + + bool m_debug; }; -MuonAlignmentFromReference::MuonAlignmentFromReference(const edm::ParameterSet &cfg) - : AlignmentAlgorithmBase(cfg) - , m_muonCollectionTag(cfg.getParameter("muonCollectionTag")) - , m_reference(cfg.getParameter >("reference")) - , m_minTrackPt(cfg.getParameter("minTrackPt")) - , m_maxTrackPt(cfg.getParameter("maxTrackPt")) - , m_minTrackP(cfg.getParameter("minTrackP")) - , m_maxTrackP(cfg.getParameter("maxTrackP")) - , m_maxDxy(cfg.getParameter("maxDxy")) - , m_minTrackerHits(cfg.getParameter("minTrackerHits")) - , m_maxTrackerRedChi2(cfg.getParameter("maxTrackerRedChi2")) - , m_allowTIDTEC(cfg.getParameter("allowTIDTEC")) - , m_minNCrossedChambers(cfg.getParameter("minNCrossedChambers")) - , m_minDT13Hits(cfg.getParameter("minDT13Hits")) - , m_minDT2Hits(cfg.getParameter("minDT2Hits")) - , m_minCSCHits(cfg.getParameter("minCSCHits")) - , m_writeTemporaryFile(cfg.getParameter("writeTemporaryFile")) - , m_readTemporaryFiles(cfg.getParameter >("readTemporaryFiles")) - , m_doAlignment(cfg.getParameter("doAlignment")) - , m_strategy(cfg.getParameter("strategy")) - , m_residualsModel(cfg.getParameter("residualsModel")) - , m_minAlignmentHits(cfg.getParameter("minAlignmentHits")) - , m_twoBin(cfg.getParameter("twoBin")) - , m_combineME11(cfg.getParameter("combineME11")) - , m_weightAlignment(cfg.getParameter("weightAlignment")) - , m_reportFileName(cfg.getParameter("reportFileName")) - , m_maxResSlopeY(cfg.getParameter("maxResSlopeY")) - , m_createNtuple(cfg.getParameter("createNtuple")) - , m_peakNSigma(cfg.getParameter("peakNSigma")) - , m_BFieldCorrection(cfg.getParameter("bFieldCorrection")) - , m_doDT(cfg.getParameter("doDT")) - , m_doCSC(cfg.getParameter("doCSC")) - , m_useResiduals(cfg.getParameter("useResiduals")) + MuonAlignmentFromReference::MuonAlignmentFromReference(const edm::ParameterSet &cfg) +: AlignmentAlgorithmBase(cfg) + , m_muonCollectionTag(cfg.getParameter("muonCollectionTag")) + , m_reference(cfg.getParameter >("reference")) + , m_minTrackPt(cfg.getParameter("minTrackPt")) + , m_maxTrackPt(cfg.getParameter("maxTrackPt")) + , m_minTrackP(cfg.getParameter("minTrackP")) + , m_maxTrackP(cfg.getParameter("maxTrackP")) + , m_maxDxy(cfg.getParameter("maxDxy")) + , m_minTrackerHits(cfg.getParameter("minTrackerHits")) + , m_maxTrackerRedChi2(cfg.getParameter("maxTrackerRedChi2")) + , m_allowTIDTEC(cfg.getParameter("allowTIDTEC")) + , m_minNCrossedChambers(cfg.getParameter("minNCrossedChambers")) + , m_minDT13Hits(cfg.getParameter("minDT13Hits")) + , m_minDT2Hits(cfg.getParameter("minDT2Hits")) + , m_minCSCHits(cfg.getParameter("minCSCHits")) + , m_writeTemporaryFile(cfg.getParameter("writeTemporaryFile")) + , m_readTemporaryFiles(cfg.getParameter >("readTemporaryFiles")) + , m_doAlignment(cfg.getParameter("doAlignment")) + , m_strategy(cfg.getParameter("strategy")) + , m_residualsModel(cfg.getParameter("residualsModel")) + , m_minAlignmentHits(cfg.getParameter("minAlignmentHits")) + , m_twoBin(cfg.getParameter("twoBin")) + , m_combineME11(cfg.getParameter("combineME11")) + , m_weightAlignment(cfg.getParameter("weightAlignment")) + , m_reportFileName(cfg.getParameter("reportFileName")) + , m_maxResSlopeY(cfg.getParameter("maxResSlopeY")) + , m_createNtuple(cfg.getParameter("createNtuple")) + , m_peakNSigma(cfg.getParameter("peakNSigma")) + , m_BFieldCorrection(cfg.getParameter("bFieldCorrection")) + , m_doDT(cfg.getParameter("doDT")) + , m_doCSC(cfg.getParameter("doCSC")) + , m_useResiduals(cfg.getParameter("useResiduals")) { - // alignment requires a TFile to provide plots to check the fit output - // just filling the residuals lists does not - // but we don't want to wait until the end of the job to find out that the TFile is missing - if (m_doAlignment || m_createNtuple) { - edm::Service fs; - TFile &tfile = fs->file(); - tfile.ls(); - } - - m_ttree = NULL; - if (m_createNtuple) bookNtuple(); - - m_counter_events = 0; - m_counter_tracks = 0; - m_counter_trackmomentum = 0; - m_counter_trackdxy = 0; - m_counter_trackerhits = 0; - m_counter_trackerchi2 = 0; - m_counter_trackertidtec = 0; - m_counter_minchambers = 0; - m_counter_totchambers = 0; - m_counter_station123 = 0; - m_counter_station123valid = 0; - m_counter_station123dt13hits = 0; - m_counter_station123dt2hits = 0; - m_counter_station123aligning = 0; - m_counter_station4 = 0; - m_counter_station4valid = 0; - m_counter_station4hits = 0; - m_counter_station4aligning = 0; - m_counter_csc = 0; - m_counter_cscvalid = 0; - m_counter_cschits = 0; - m_counter_cscaligning = 0; - m_counter_resslopey = 0; + // alignment requires a TFile to provide plots to check the fit output + // just filling the residuals lists does not + // but we don't want to wait until the end of the job to find out that the TFile is missing + if (m_doAlignment || m_createNtuple) { + edm::Service fs; + TFile &tfile = fs->file(); + tfile.ls(); + } + + m_ttree = NULL; + if (m_createNtuple) bookNtuple(); + + m_counter_events = 0; + m_counter_tracks = 0; + m_counter_trackmomentum = 0; + m_counter_trackdxy = 0; + m_counter_trackerhits = 0; + m_counter_trackerchi2 = 0; + m_counter_trackertidtec = 0; + m_counter_minchambers = 0; + m_counter_totchambers = 0; + m_counter_station123 = 0; + m_counter_station123valid = 0; + m_counter_station123dt13hits = 0; + m_counter_station123dt2hits = 0; + m_counter_station123aligning = 0; + m_counter_station4 = 0; + m_counter_station4valid = 0; + m_counter_station4hits = 0; + m_counter_station4aligning = 0; + m_counter_csc = 0; + m_counter_cscvalid = 0; + m_counter_cschits = 0; + m_counter_cscaligning = 0; + m_counter_resslopey = 0; + + m_debug = false; } MuonAlignmentFromReference::~MuonAlignmentFromReference() { - delete m_alignableNavigator; + delete m_alignableNavigator; } void MuonAlignmentFromReference::bookNtuple() { - edm::Service fs; - m_ttree = fs->make("mual_ttree", "mual_ttree"); - m_ttree->Branch("is_plus", &m_tree_row.is_plus, "is_plus/O"); - m_ttree->Branch("is_dt", &m_tree_row.is_dt, "is_dt/O"); - m_ttree->Branch("station", &m_tree_row.station, "station/b"); - m_ttree->Branch("ring_wheel", &m_tree_row.ring_wheel, "ring_wheel/B"); - m_ttree->Branch("sector", &m_tree_row.sector, "sector/b"); - m_ttree->Branch("res_x", &m_tree_row.res_x, "res_x/F"); - m_ttree->Branch("res_y", &m_tree_row.res_y, "res_y/F"); - m_ttree->Branch("res_slope_x", &m_tree_row.res_slope_x, "res_slope_x/F"); - m_ttree->Branch("res_slope_y", &m_tree_row.res_slope_y, "res_slope_y/F"); - m_ttree->Branch("pos_x",&m_tree_row.pos_x, "pos_x/F"); - m_ttree->Branch("pos_y",&m_tree_row.pos_y, "pos_y/F"); - m_ttree->Branch("angle_x",&m_tree_row.angle_x, "angle_x/F"); - m_ttree->Branch("angle_y",&m_tree_row.angle_y,"angle_y/F"); - m_ttree->Branch("pz",&m_tree_row.pz,"pz/F"); - m_ttree->Branch("pt",&m_tree_row.pt,"pt/F"); - m_ttree->Branch("q",&m_tree_row.q,"q/B"); - m_ttree->Branch("select", &m_tree_row.select, "select/O"); - //m_ttree->Branch("",&m_tree_row.,"/"); + edm::Service fs; + m_ttree = fs->make("mual_ttree", "mual_ttree"); + m_ttree->Branch("is_plus", &m_tree_row.is_plus, "is_plus/O"); + m_ttree->Branch("is_dt", &m_tree_row.is_dt, "is_dt/O"); + m_ttree->Branch("station", &m_tree_row.station, "station/b"); + m_ttree->Branch("ring_wheel", &m_tree_row.ring_wheel, "ring_wheel/B"); + m_ttree->Branch("sector", &m_tree_row.sector, "sector/b"); + m_ttree->Branch("res_x", &m_tree_row.res_x, "res_x/F"); + m_ttree->Branch("res_y", &m_tree_row.res_y, "res_y/F"); + m_ttree->Branch("res_slope_x", &m_tree_row.res_slope_x, "res_slope_x/F"); + m_ttree->Branch("res_slope_y", &m_tree_row.res_slope_y, "res_slope_y/F"); + m_ttree->Branch("pos_x",&m_tree_row.pos_x, "pos_x/F"); + m_ttree->Branch("pos_y",&m_tree_row.pos_y, "pos_y/F"); + m_ttree->Branch("angle_x",&m_tree_row.angle_x, "angle_x/F"); + m_ttree->Branch("angle_y",&m_tree_row.angle_y,"angle_y/F"); + m_ttree->Branch("pz",&m_tree_row.pz,"pz/F"); + m_ttree->Branch("pt",&m_tree_row.pt,"pt/F"); + m_ttree->Branch("q",&m_tree_row.q,"q/B"); + m_ttree->Branch("select", &m_tree_row.select, "select/O"); + //m_ttree->Branch("",&m_tree_row.,"/"); } bool MuonAlignmentFromReference::numeric(std::string s) { - return s.length()==1 && std::isdigit(s[0]); + return s.length()==1 && std::isdigit(s[0]); } int MuonAlignmentFromReference::number(std::string s) { - if (!numeric(s)) assert(false); - return atoi(s.c_str()); + if (!numeric(s)) assert(false); + return atoi(s.c_str()); } void MuonAlignmentFromReference::initialize(const edm::EventSetup& iSetup, - AlignableTracker* alignableTracker, - AlignableMuon* alignableMuon, - AlignableExtras* extras, - AlignmentParameterStore* alignmentParameterStore) -{ - if (alignableMuon == NULL) - throw cms::Exception("MuonAlignmentFromReference") << "doMuon must be set to True" << std::endl; - - m_alignableNavigator = new AlignableNavigator(alignableMuon); - m_alignmentParameterStore = alignmentParameterStore; - m_alignables = m_alignmentParameterStore->alignables(); - - int residualsModel; - if (m_residualsModel == std::string("pureGaussian")) residualsModel = MuonResidualsFitter::kPureGaussian; - else if (m_residualsModel == std::string("pureGaussian2D")) residualsModel = MuonResidualsFitter::kPureGaussian2D; - else if (m_residualsModel == std::string("powerLawTails")) residualsModel = MuonResidualsFitter::kPowerLawTails; - else if (m_residualsModel == std::string("ROOTVoigt")) residualsModel = MuonResidualsFitter::kROOTVoigt; - else if (m_residualsModel == std::string("GaussPowerTails")) residualsModel = MuonResidualsFitter::kGaussPowerTails; - else throw cms::Exception("MuonAlignmentFromReference") << "unrecognized residualsModel: \"" << m_residualsModel << "\"" << std::endl; - - int useResiduals; - if (m_useResiduals == std::string("1111")) useResiduals = MuonResidualsFitter::k1111; - else if (m_useResiduals == std::string("1110")) useResiduals = MuonResidualsFitter::k1110; - else if (m_useResiduals == std::string("1100")) useResiduals = MuonResidualsFitter::k1100; - else if (m_useResiduals == std::string("1010")) useResiduals = MuonResidualsFitter::k1010; - else if (m_useResiduals == std::string("0010")) useResiduals = MuonResidualsFitter::k0010; - else throw cms::Exception("MuonAlignmentFromReference") << "unrecognized useResiduals: \"" << m_useResiduals << "\"" << std::endl; - - edm::ESHandle cscGeometry; - iSetup.get().get(cscGeometry); - - // set up the MuonResidualsFitters (which also collect residuals for fitting) - m_me11map.clear(); - m_fitters.clear(); - m_indexes.clear(); - m_fitterOrder.clear(); - - for (std::vector::const_iterator ali = m_alignables.begin(); ali != m_alignables.end(); ++ali) - { - bool made_fitter = false; - - // fitters for DT - if ((*ali)->alignableObjectId() == align::AlignableDTChamber) - { - DTChamberId id( (*ali)->geomDetId().rawId() ); - - if (id.station() == 4) - { - m_fitters[*ali] = - new MuonResidualsTwoBin(m_twoBin, new MuonResiduals5DOFFitter(residualsModel, m_minAlignmentHits, useResiduals, m_weightAlignment), - new MuonResiduals5DOFFitter(residualsModel, m_minAlignmentHits, useResiduals, m_weightAlignment)); - made_fitter = true; - } - else - { - m_fitters[*ali] = - new MuonResidualsTwoBin(m_twoBin, new MuonResiduals6DOFFitter(residualsModel, m_minAlignmentHits, useResiduals, m_weightAlignment), - new MuonResiduals6DOFFitter(residualsModel, m_minAlignmentHits, useResiduals, m_weightAlignment)); - made_fitter = true; - } - } - - // fitters for CSC - else if ((*ali)->alignableObjectId() == align::AlignableCSCChamber) - { - Alignable *thisali = *ali; - CSCDetId id( (*ali)->geomDetId().rawId() ); - - // take care of ME1/1a - if (m_combineME11 && id.station() == 1 && id.ring() == 4) - { - CSCDetId pairid(id.endcap(), 1, 1, id.chamber()); - - for (std::vector::const_iterator ali2 = m_alignables.begin(); ali2 != m_alignables.end(); ++ali2) - { - if ((*ali2)->alignableObjectId() == align::AlignableCSCChamber && (*ali2)->geomDetId().rawId() == pairid.rawId()) - { - thisali = *ali2; - break; - } - } - m_me11map[*ali] = thisali; // points from each ME1/4 chamber to the corresponding ME1/1 chamber - } - - if (thisali == *ali) // don't make fitters for ME1/4; they get taken care of in ME1/1 - { - m_fitters[*ali] = - new MuonResidualsTwoBin(m_twoBin, new MuonResiduals6DOFrphiFitter(residualsModel, m_minAlignmentHits, useResiduals, &(*cscGeometry), m_weightAlignment), - new MuonResiduals6DOFrphiFitter(residualsModel, m_minAlignmentHits, useResiduals, &(*cscGeometry), m_weightAlignment)); - made_fitter = true; - } - } - - else { - throw cms::Exception("MuonAlignmentFromReference") << "only DTChambers and CSCChambers can be aligned with this module" << std::endl; - } - - if (made_fitter) { - m_fitters[*ali]->setStrategy(m_strategy); - - int index = (*ali)->geomDetId().rawId(); - m_indexes.push_back(index); - m_fitterOrder[index] = m_fitters[*ali]; - } - } // end loop over chambers chosen for alignment - - // cannonical order of fitters in the file - std::sort(m_indexes.begin(), m_indexes.end()); - - // de-weight all chambers but the reference - std::vector all_DT_chambers = alignableMuon->DTChambers(); - std::vector all_CSC_chambers = alignableMuon->CSCChambers(); - std::vector reference; - if (m_reference.size()) parseReference(reference, all_DT_chambers, all_CSC_chambers); - - alignmentParameterStore->setAlignmentPositionError(all_DT_chambers, 100000000., 0.); - alignmentParameterStore->setAlignmentPositionError(all_CSC_chambers, 100000000., 0.); - alignmentParameterStore->setAlignmentPositionError(reference, 0., 0.); -} - - -void MuonAlignmentFromReference::parseReference( - std::vector &reference, - std::vector &all_DT_chambers, - std::vector &all_CSC_chambers) + AlignableTracker* alignableTracker, + AlignableMuon* alignableMuon, + AlignableExtras* extras, + AlignmentParameterStore* alignmentParameterStore) { - std::map already_seen; - - for (std::vector::const_iterator name = m_reference.begin(); name != m_reference.end(); ++name) - { - bool parsing_error = false; - - bool barrel = (name->substr(0, 2) == std::string("MB")); - bool endcap = (name->substr(0, 2) == std::string("ME")); - if (!barrel && !endcap) parsing_error = true; - - if (!parsing_error && barrel) + if (alignableMuon == NULL) + throw cms::Exception("MuonAlignmentFromReference") << "doMuon must be set to True" << std::endl; + + m_alignableNavigator = new AlignableNavigator(alignableMuon); + m_alignmentParameterStore = alignmentParameterStore; + m_alignables = m_alignmentParameterStore->alignables(); + + int residualsModel; + if (m_residualsModel == std::string("pureGaussian")) residualsModel = MuonResidualsFitter::kPureGaussian; + else if (m_residualsModel == std::string("pureGaussian2D")) residualsModel = MuonResidualsFitter::kPureGaussian2D; + else if (m_residualsModel == std::string("powerLawTails")) residualsModel = MuonResidualsFitter::kPowerLawTails; + else if (m_residualsModel == std::string("ROOTVoigt")) residualsModel = MuonResidualsFitter::kROOTVoigt; + else if (m_residualsModel == std::string("GaussPowerTails")) residualsModel = MuonResidualsFitter::kGaussPowerTails; + else throw cms::Exception("MuonAlignmentFromReference") << "unrecognized residualsModel: \"" << m_residualsModel << "\"" << std::endl; + + int useResiduals; + if (m_useResiduals == std::string("1111")) useResiduals = MuonResidualsFitter::k1111; + else if (m_useResiduals == std::string("1110")) useResiduals = MuonResidualsFitter::k1110; + else if (m_useResiduals == std::string("1100")) useResiduals = MuonResidualsFitter::k1100; + else if (m_useResiduals == std::string("1000")) useResiduals = MuonResidualsFitter::k1000; + else if (m_useResiduals == std::string("1010")) useResiduals = MuonResidualsFitter::k1010; + else if (m_useResiduals == std::string("0010")) useResiduals = MuonResidualsFitter::k0010; + else throw cms::Exception("MuonAlignmentFromReference") << "unrecognized useResiduals: \"" << m_useResiduals << "\"" << std::endl; + + edm::ESHandle cscGeometry; + iSetup.get().get(cscGeometry); + + // set up the MuonResidualsFitters (which also collect residuals for fitting) + m_me11map.clear(); + m_fitters.clear(); + m_indexes.clear(); + m_fitterOrder.clear(); + + for (std::vector::const_iterator ali = m_alignables.begin(); ali != m_alignables.end(); ++ali) { - int index = 2; - if (name->substr(index, 1) == std::string(" ")) index++; - - bool plus = true; - if (name->substr(index, 1) == std::string("+")) - { - plus = true; - index++; - } - else if (name->substr(index, 1) == std::string("-")) - { - plus = false; - index++; - } - else if (numeric(name->substr(index, 1))) {} - else parsing_error = true; - - int wheel = 0; - bool wheel_digit = false; - while (!parsing_error && numeric(name->substr(index, 1))) - { - wheel *= 10; - wheel += number(name->substr(index, 1)); - wheel_digit = true; - index++; - } - if (!plus) wheel *= -1; - if (!wheel_digit) parsing_error = true; - - if (name->substr(index, 1) != std::string(" ")) parsing_error = true; - index++; - - int station = 0; - bool station_digit = false; - while (!parsing_error && numeric(name->substr(index, 1))) - { - station *= 10; - station += number(name->substr(index, 1)); - station_digit = true; - index++; - } - if (!station_digit) parsing_error = true; - - if (name->substr(index, 1) != std::string(" ")) parsing_error = true; - index++; - - int sector = 0; - bool sector_digit = false; - while (!parsing_error && numeric(name->substr(index, 1))) - { - sector *= 10; - sector += number(name->substr(index, 1)); - sector_digit = true; - index++; - } - if (!sector_digit) parsing_error = true; - - if (!parsing_error) - { - bool no_such_chamber = false; - - if (wheel < -2 || wheel > 2) no_such_chamber = true; - if (station < 1 || station > 4) no_such_chamber = true; - if (station == 4 && (sector < 1 || sector > 14)) no_such_chamber = true; - if (station < 4 && (sector < 1 || sector > 12)) no_such_chamber = true; - - if (no_such_chamber) - throw cms::Exception("MuonAlignmentFromReference") << "reference chamber doesn't exist: " << (*name) << std::endl; - - DTChamberId id(wheel, station, sector); - for (std::vector::const_iterator ali = all_DT_chambers.begin(); ali != all_DT_chambers.end(); ++ali) + bool made_fitter = false; + + // fitters for DT + if ((*ali)->alignableObjectId() == align::AlignableDTChamber) { - if ((*ali)->geomDetId().rawId() == id.rawId()) - { - std::map::const_iterator trial = already_seen.find(*ali); - if (trial == already_seen.end()) + DTChamberId id( (*ali)->geomDetId().rawId() ); + + if (id.station() == 4) { - reference.push_back(*ali); - already_seen[*ali] = true; + m_fitters[*ali] = + new MuonResidualsTwoBin(m_twoBin, new MuonResiduals5DOFFitter(residualsModel, m_minAlignmentHits, useResiduals, m_weightAlignment), + new MuonResiduals5DOFFitter(residualsModel, m_minAlignmentHits, useResiduals, m_weightAlignment)); + made_fitter = true; + } + else + { + m_fitters[*ali] = + new MuonResidualsTwoBin(m_twoBin, new MuonResiduals6DOFFitter(residualsModel, m_minAlignmentHits, useResiduals, m_weightAlignment), + new MuonResiduals6DOFFitter(residualsModel, m_minAlignmentHits, useResiduals, m_weightAlignment)); + made_fitter = true; } - } } - } // if (!parsing_error) - } - - if (!parsing_error && endcap) - { - int index = 2; - if (name->substr(index, 1) == std::string(" ")) index++; - - bool plus = true; - if (name->substr(index, 1) == std::string("+")) - { - plus = true; - index++; - } - else if (name->substr(index, 1) == std::string("-")) - { - plus = false; - index++; - } - else if (numeric(name->substr(index, 1))) {} - else parsing_error = true; - - int station = 0; - bool station_digit = false; - while (!parsing_error && numeric(name->substr(index, 1))) - { - station *= 10; - station += number(name->substr(index, 1)); - station_digit = true; - index++; - } - if (!plus) station *= -1; - if (!station_digit) parsing_error = true; - - if (name->substr(index, 1) != std::string("/")) parsing_error = true; - index++; - - int ring = 0; - bool ring_digit = false; - while (!parsing_error && numeric(name->substr(index, 1))) - { - ring *= 10; - ring += number(name->substr(index, 1)); - ring_digit = true; - index++; - } - if (!ring_digit) parsing_error = true; - - if (name->substr(index, 1) != std::string(" ")) parsing_error = true; - index++; - - int chamber = 0; - bool chamber_digit = false; - while (!parsing_error && numeric(name->substr(index, 1))) - { - chamber *= 10; - chamber += number(name->substr(index, 1)); - chamber_digit = true; - index++; - } - if (!chamber_digit) parsing_error = true; - - if (!parsing_error) - { - bool no_such_chamber = false; - - int endcap = (station > 0 ? 1 : 2); - station = abs(station); - if (station < 1 || station > 4) no_such_chamber = true; - if (station == 1 && (ring < 1 || ring > 4)) no_such_chamber = true; - if (station > 1 && (ring < 1 || ring > 2)) no_such_chamber = true; - if (station == 1 && (chamber < 1 || chamber > 36)) no_such_chamber = true; - if (station > 1 && ring == 1 && (chamber < 1 || chamber > 18)) no_such_chamber = true; - if (station > 1 && ring == 2 && (chamber < 1 || chamber > 36)) no_such_chamber = true; - - if (no_such_chamber) - throw cms::Exception("MuonAlignmentFromReference") << "reference chamber doesn't exist: " << (*name) << std::endl; - - CSCDetId id(endcap, station, ring, chamber); - for (std::vector::const_iterator ali = all_CSC_chambers.begin(); ali != all_CSC_chambers.end(); ++ali) + + // fitters for CSC + else if ((*ali)->alignableObjectId() == align::AlignableCSCChamber) { - if ((*ali)->geomDetId().rawId() == id.rawId()) - { - std::map::const_iterator trial = already_seen.find(*ali); - if (trial == already_seen.end()) + Alignable *thisali = *ali; + CSCDetId id( (*ali)->geomDetId().rawId() ); + + // take care of ME1/1a + if (m_combineME11 && id.station() == 1 && id.ring() == 4) { - reference.push_back(*ali); - already_seen[*ali] = true; + CSCDetId pairid(id.endcap(), 1, 1, id.chamber()); + + for (std::vector::const_iterator ali2 = m_alignables.begin(); ali2 != m_alignables.end(); ++ali2) + { + if ((*ali2)->alignableObjectId() == align::AlignableCSCChamber && (*ali2)->geomDetId().rawId() == pairid.rawId()) + { + thisali = *ali2; + break; + } + } + m_me11map[*ali] = thisali; // points from each ME1/4 chamber to the corresponding ME1/1 chamber + } + + if (thisali == *ali) // don't make fitters for ME1/4; they get taken care of in ME1/1 + { + m_fitters[*ali] = + new MuonResidualsTwoBin(m_twoBin, new MuonResiduals6DOFrphiFitter(residualsModel, m_minAlignmentHits, useResiduals, &(*cscGeometry), m_weightAlignment), + new MuonResiduals6DOFrphiFitter(residualsModel, m_minAlignmentHits, useResiduals, &(*cscGeometry), m_weightAlignment)); + made_fitter = true; } - } } - } // if (!parsing_error) - }// endcap - if (parsing_error) - throw cms::Exception("MuonAlignmentFromReference") << "reference chamber name is malformed: " << (*name) << std::endl; - } -} + else { + throw cms::Exception("MuonAlignmentFromReference") << "only DTChambers and CSCChambers can be aligned with this module" << std::endl; + } + if (made_fitter) { + m_fitters[*ali]->setStrategy(m_strategy); + + int index = (*ali)->geomDetId().rawId(); + m_indexes.push_back(index); + m_fitterOrder[index] = m_fitters[*ali]; + } + } // end loop over chambers chosen for alignment + + // cannonical order of fitters in the file + std::sort(m_indexes.begin(), m_indexes.end()); + + // de-weight all chambers but the reference + std::vector all_DT_chambers = alignableMuon->DTChambers(); + std::vector all_CSC_chambers = alignableMuon->CSCChambers(); + std::vector reference; + if (m_reference.size()) parseReference(reference, all_DT_chambers, all_CSC_chambers); + + alignmentParameterStore->setAlignmentPositionError(all_DT_chambers, 100000000., 0.); + alignmentParameterStore->setAlignmentPositionError(all_CSC_chambers, 100000000., 0.); + alignmentParameterStore->setAlignmentPositionError(reference, 0., 0.); +} void MuonAlignmentFromReference::run(const edm::EventSetup& iSetup, const EventInfo &eventInfo) { - m_counter_events++; + if (m_debug) std::cout << "****** EVENT START *******" << std::endl; + m_counter_events++; - edm::ESHandle globalGeometry; - iSetup.get().get(globalGeometry); + edm::ESHandle globalGeometry; + iSetup.get().get(globalGeometry); - if (m_muonCollectionTag.label().empty()) // use trajectories - { - const ConstTrajTrackPairCollection &trajtracks = eventInfo.trajTrackPairs(); - for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end(); ++trajtrack) - { - m_counter_tracks++; + edm::ESHandle magneticField; + iSetup.get().get(magneticField); - const Trajectory* traj = (*trajtrack).first; - const reco::Track* track = (*trajtrack).second; + edm::ESHandle prop; + iSetup.get().get("SteppingHelixPropagatorAny",prop); - if (m_minTrackPt < track->pt() && track->pt() < m_maxTrackPt && m_minTrackP < track->p() && track->p() < m_maxTrackP) - { - m_counter_trackmomentum++; + if (m_muonCollectionTag.label().empty()) // use trajectories + { + if (m_debug) std::cout << "JUST BEFORE LOOP OVER trajTrackPairs" << std::endl; + // const ConstTrajTrackPairCollection &trajtracks = eventInfo.trajTrackPairs_; // trajTrackPairs_ now private + const ConstTrajTrackPairCollection trajtracks = eventInfo.trajTrackPairs(); - if ( fabs(track->dxy(eventInfo.beamSpot().position())) < m_maxDxy ) + for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end(); ++trajtrack) { - m_counter_trackdxy++; + m_counter_tracks++; - MuonResidualsFromTrack muonResidualsFromTrack(globalGeometry, traj, track, m_alignableNavigator, 1000.); + const Trajectory* traj = (*trajtrack).first; + const reco::Track* track = (*trajtrack).second; - processMuonResidualsFromTrack(muonResidualsFromTrack); - } - } // end if track p is within range - } // end if track pT is within range - } - else // use muons - { - /* - for (reco::MuonCollection::const_iterator muon = eventInfo.muonCollection_->begin(); muon != eventInfo.muonCollection_->end(); ++muon) + if (m_minTrackPt < track->pt() && track->pt() < m_maxTrackPt && m_minTrackP < track->p() && track->p() < m_maxTrackP) + { + m_counter_trackmomentum++; + + if ( fabs(track->dxy(eventInfo.beamSpot().position())) < m_maxDxy ) + { + m_counter_trackdxy++; + if (m_debug) std::cout << "JUST BEFORE muonResidualsFromTrack" << std::endl; + MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, prop, traj, track, m_alignableNavigator, 1000.); + if (m_debug) std::cout << "JUST AFTER muonResidualsFromTrack" << std::endl; + + if (m_debug) std::cout << "JUST BEFORE PROCESS" << std::endl; + processMuonResidualsFromTrack(muonResidualsFromTrack); + if (m_debug) std::cout << "JUST AFTER PROCESS" << std::endl; + } + } // end if track p is within range + } // end if track pT is within range + if (m_debug) std::cout << "JUST AFTER LOOP OVER trajTrackPairs" << std::endl; + + } + else // use muons { - if ( !(muon->isTrackerMuon() && muon->innerTrack().isNonnull() ) ) continue; + /* + for (reco::MuonCollection::const_iterator muon = eventInfo.muonCollection_->begin(); muon != eventInfo.muonCollection_->end(); ++muon) + { + if ( !(muon->isTrackerMuon() && muon->innerTrack().isNonnull() ) ) continue; - m_counter_tracks++; + m_counter_tracks++; - if (m_minTrackPt < muon->pt() && muon->pt() < m_maxTrackPt && m_minTrackP < muon->p() && muon->p() < m_maxTrackP) - { - m_counter_trackmomentum++; + if (m_minTrackPt < muon->pt() && muon->pt() < m_maxTrackPt && m_minTrackP < muon->p() && muon->p() < m_maxTrackP) + { + m_counter_trackmomentum++; - if (fabs(muon->innerTrack()->dxy(eventInfo.beamSpot_.position())) < m_maxDxy) - { - m_counter_trackdxy++; + if (fabs(muon->innerTrack()->dxy(eventInfo.beamSpot_.position())) < m_maxDxy) + { + m_counter_trackdxy++; - //std::cout<<" *** will make MuonResidualsFromTrack ***"<= m_minTrackerHits) { - m_counter_trackerchi2++; - if (m_allowTIDTEC || !mrft.contains_TIDTEC()) - { - m_counter_trackertidtec++; - - std::vector chamberIds = mrft.chamberIds(); + m_counter_trackerhits++; + // std::cout << "mrft.normalizedChi2(): " << mrft.normalizedChi2() << std::endl; - if ((int)chamberIds.size() >= m_minNCrossedChambers) + if (mrft.normalizedChi2() < m_maxTrackerRedChi2) { - m_counter_minchambers++; - - char charge = (mrft.getTrack()->charge() > 0 ? 1 : -1); - - for (std::vector::const_iterator chamberId = chamberIds.begin(); chamberId != chamberIds.end(); ++chamberId) - { - if (chamberId->det() != DetId::Muon) continue; - m_counter_totchambers++; - - // DT station 1,2,3 - if (m_doDT && - chamberId->subdetId() == MuonSubdetId::DT && - DTChamberId(chamberId->rawId()).station() != 4) + m_counter_trackerchi2++; + if (m_allowTIDTEC || !mrft.contains_TIDTEC()) { - MuonChamberResidual *dt13 = mrft.chamberResidual(*chamberId, MuonChamberResidual::kDT13); - MuonChamberResidual *dt2 = mrft.chamberResidual(*chamberId, MuonChamberResidual::kDT2); - - m_counter_station123++; - if (dt13 != NULL && dt2 != NULL) - { - m_counter_station123valid++; - if (dt13->numHits() >= m_minDT13Hits) - { - m_counter_station123dt13hits++; - if (dt2->numHits() >= m_minDT2Hits) - { - m_counter_station123dt2hits++; - std::map::const_iterator fitter = m_fitters.find(dt13->chamberAlignable()); - if (fitter != m_fitters.end()) - { - m_counter_station123aligning++; - if (fabs(dt2->resslope()) < m_maxResSlopeY) - { - m_counter_resslopey++; - double *residdata = new double[MuonResiduals6DOFFitter::kNData]; - residdata[MuonResiduals6DOFFitter::kResidX] = dt13->residual(); - residdata[MuonResiduals6DOFFitter::kResidY] = dt2->residual(); - residdata[MuonResiduals6DOFFitter::kResSlopeX] = dt13->resslope(); - residdata[MuonResiduals6DOFFitter::kResSlopeY] = dt2->resslope(); - residdata[MuonResiduals6DOFFitter::kPositionX] = dt13->trackx(); - residdata[MuonResiduals6DOFFitter::kPositionY] = dt13->tracky(); - residdata[MuonResiduals6DOFFitter::kAngleX] = dt13->trackdxdz(); - residdata[MuonResiduals6DOFFitter::kAngleY] = dt13->trackdydz(); - residdata[MuonResiduals6DOFFitter::kRedChi2] = (dt13->chi2() + dt2->chi2()) / double(dt13->ndof() + dt2->ndof()); - residdata[MuonResiduals6DOFFitter::kPz] = mrft.getTrack()->pz(); - residdata[MuonResiduals6DOFFitter::kPt] = mrft.getTrack()->pt(); - residdata[MuonResiduals6DOFFitter::kCharge] = mrft.getTrack()->charge(); - fitter->second->fill(charge, residdata); - // the MuonResidualsFitter will delete the array when it is destroyed - } - } - } - } - } - } + m_counter_trackertidtec++; - // DT 4th station - else if (m_doDT && - chamberId->subdetId() == MuonSubdetId::DT && - DTChamberId(chamberId->rawId()).station() == 4) - { - MuonChamberResidual *dt13 = mrft.chamberResidual(*chamberId, MuonChamberResidual::kDT13); + std::vector chamberIds = mrft.chamberIds(); - m_counter_station4++; - if (dt13 != NULL) - { - m_counter_station4valid++; - if (dt13->numHits() >= m_minDT13Hits) + if ((int)chamberIds.size() >= m_minNCrossedChambers) { - m_counter_station4hits++; - - std::map::const_iterator fitter = m_fitters.find(dt13->chamberAlignable()); - if (fitter != m_fitters.end()) - { - m_counter_station4aligning++; - - double *residdata = new double[MuonResiduals5DOFFitter::kNData]; - residdata[MuonResiduals5DOFFitter::kResid] = dt13->residual(); - residdata[MuonResiduals5DOFFitter::kResSlope] = dt13->resslope(); - residdata[MuonResiduals5DOFFitter::kPositionX] = dt13->trackx(); - residdata[MuonResiduals5DOFFitter::kPositionY] = dt13->tracky(); - residdata[MuonResiduals5DOFFitter::kAngleX] = dt13->trackdxdz(); - residdata[MuonResiduals5DOFFitter::kAngleY] = dt13->trackdydz(); - residdata[MuonResiduals5DOFFitter::kRedChi2] = dt13->chi2() / double(dt13->ndof()); - residdata[MuonResiduals5DOFFitter::kPz] = mrft.getTrack()->pz(); - residdata[MuonResiduals5DOFFitter::kPt] = mrft.getTrack()->pt(); - residdata[MuonResiduals5DOFFitter::kCharge] = mrft.getTrack()->charge(); - fitter->second->fill(charge, residdata); - // the MuonResidualsFitter will delete the array when it is destroyed - } - } - } - } // end DT 4th station + m_counter_minchambers++; - // CSC - else if (m_doCSC && - chamberId->subdetId() == MuonSubdetId::CSC) - { - MuonChamberResidual *csc = mrft.chamberResidual(*chamberId, MuonChamberResidual::kCSC); - m_counter_csc++; - if (csc != NULL) - { - m_counter_cscvalid++; - if (csc->numHits() >= m_minCSCHits) - { - m_counter_cschits++; - Alignable *ali = csc->chamberAlignable(); - - CSCDetId id(ali->geomDetId().rawId()); - if (m_combineME11 && id.station() == 1 && id.ring() == 4) ali = m_me11map[ali]; - - std::map::const_iterator fitter = m_fitters.find(ali); - if (fitter != m_fitters.end()) - { - m_counter_cscaligning++; - double *residdata = new double[MuonResiduals6DOFrphiFitter::kNData]; - residdata[MuonResiduals6DOFrphiFitter::kResid] = csc->residual(); - residdata[MuonResiduals6DOFrphiFitter::kResSlope] = csc->resslope(); - residdata[MuonResiduals6DOFrphiFitter::kPositionX] = csc->trackx(); - residdata[MuonResiduals6DOFrphiFitter::kPositionY] = csc->tracky(); - residdata[MuonResiduals6DOFrphiFitter::kAngleX] = csc->trackdxdz(); - residdata[MuonResiduals6DOFrphiFitter::kAngleY] = csc->trackdydz(); - residdata[MuonResiduals6DOFrphiFitter::kRedChi2] = csc->chi2() / double(csc->ndof()); - residdata[MuonResiduals6DOFrphiFitter::kPz] = mrft.getTrack()->pz(); - residdata[MuonResiduals6DOFrphiFitter::kPt] = mrft.getTrack()->pt(); - residdata[MuonResiduals6DOFrphiFitter::kCharge] = mrft.getTrack()->charge(); - fitter->second->fill(charge, residdata); - // the MuonResidualsFitter will delete the array when it is destroyed - } - } - } - } // end CSC + char charge = (mrft.getTrack()->charge() > 0 ? 1 : -1); - else if (m_doDT && m_doCSC) assert(false); - - } // end loop over chamberIds - } // # crossed muon chambers ok - } // endcap tracker ok - } // chi2 ok - } // trackerNumHits ok + for (std::vector::const_iterator chamberId = chamberIds.begin(); chamberId != chamberIds.end(); ++chamberId) + { + if (chamberId->det() != DetId::Muon) continue; + m_counter_totchambers++; + + // DT station 1,2,3 + if (m_doDT && + chamberId->subdetId() == MuonSubdetId::DT && + DTChamberId(chamberId->rawId()).station() != 4) + { + MuonChamberResidual *dt13 = mrft.chamberResidual(*chamberId, MuonChamberResidual::kDT13); + MuonChamberResidual *dt2 = mrft.chamberResidual(*chamberId, MuonChamberResidual::kDT2); + + m_counter_station123++; + if (dt13 != NULL && dt2 != NULL) + { + m_counter_station123valid++; + if (dt13->numHits() >= m_minDT13Hits) + { + m_counter_station123dt13hits++; + if (dt2->numHits() >= m_minDT2Hits) + { + m_counter_station123dt2hits++; + std::map::const_iterator fitter = m_fitters.find(dt13->chamberAlignable()); + if (fitter != m_fitters.end()) + { + m_counter_station123aligning++; + if (fabs(dt2->resslope()) < m_maxResSlopeY) + { + m_counter_resslopey++; + double *residdata = new double[MuonResiduals6DOFFitter::kNData]; + residdata[MuonResiduals6DOFFitter::kResidX] = dt13->residual(); + residdata[MuonResiduals6DOFFitter::kResidY] = dt2->residual(); + residdata[MuonResiduals6DOFFitter::kResSlopeX] = dt13->resslope(); + residdata[MuonResiduals6DOFFitter::kResSlopeY] = dt2->resslope(); + residdata[MuonResiduals6DOFFitter::kPositionX] = dt13->trackx(); + residdata[MuonResiduals6DOFFitter::kPositionY] = dt13->tracky(); + residdata[MuonResiduals6DOFFitter::kAngleX] = dt13->trackdxdz(); + residdata[MuonResiduals6DOFFitter::kAngleY] = dt13->trackdydz(); + residdata[MuonResiduals6DOFFitter::kRedChi2] = (dt13->chi2() + dt2->chi2()) / double(dt13->ndof() + dt2->ndof()); + residdata[MuonResiduals6DOFFitter::kPz] = mrft.getTrack()->pz(); + residdata[MuonResiduals6DOFFitter::kPt] = mrft.getTrack()->pt(); + residdata[MuonResiduals6DOFFitter::kCharge] = mrft.getTrack()->charge(); + + if (m_debug) { + std::cout << "processMuonResidualsFromTrack 6DOF dt13->residual() " << dt13->residual() << std::endl; + std::cout << " dt2->residual() " << dt2->residual() << std::endl; + std::cout << " dt13->resslope() " << dt13->resslope() << std::endl; + std::cout << " dt2->resslope() " << dt2->resslope() << std::endl; + std::cout << " dt13->trackx() " << dt13->trackx() << std::endl; + std::cout << " dt13->tracky() " << dt13->tracky() << std::endl; + std::cout << " dt13->trackdxdz() " << dt13->trackdxdz() << std::endl; + std::cout << " dt13->trackdydz() " << dt13->trackdydz() << std::endl; + } + + fitter->second->fill(charge, residdata); + // the MuonResidualsFitter will delete the array when it is destroyed + } + } + } + } + } + } + + // DT 4th station + else if (m_doDT && + chamberId->subdetId() == MuonSubdetId::DT && + DTChamberId(chamberId->rawId()).station() == 4) + { + MuonChamberResidual *dt13 = mrft.chamberResidual(*chamberId, MuonChamberResidual::kDT13); + + m_counter_station4++; + if (dt13 != NULL) + { + m_counter_station4valid++; + if (dt13->numHits() >= m_minDT13Hits) + { + m_counter_station4hits++; + + std::map::const_iterator fitter = m_fitters.find(dt13->chamberAlignable()); + if (fitter != m_fitters.end()) + { + m_counter_station4aligning++; + + double *residdata = new double[MuonResiduals5DOFFitter::kNData]; + residdata[MuonResiduals5DOFFitter::kResid] = dt13->residual(); + residdata[MuonResiduals5DOFFitter::kResSlope] = dt13->resslope(); + residdata[MuonResiduals5DOFFitter::kPositionX] = dt13->trackx(); + residdata[MuonResiduals5DOFFitter::kPositionY] = dt13->tracky(); + residdata[MuonResiduals5DOFFitter::kAngleX] = dt13->trackdxdz(); + residdata[MuonResiduals5DOFFitter::kAngleY] = dt13->trackdydz(); + residdata[MuonResiduals5DOFFitter::kRedChi2] = dt13->chi2() / double(dt13->ndof()); + residdata[MuonResiduals5DOFFitter::kPz] = mrft.getTrack()->pz(); + residdata[MuonResiduals5DOFFitter::kPt] = mrft.getTrack()->pt(); + residdata[MuonResiduals5DOFFitter::kCharge] = mrft.getTrack()->charge(); + + if (m_debug) { + std::cout << "processMuonResidualsFromTrack 5DOF dt13->residual() " << dt13->residual() << std::endl; + std::cout << " dt13->resslope() " << dt13->resslope() << std::endl; + std::cout << " dt13->trackx() " << dt13->trackx() << std::endl; + std::cout << " dt13->tracky() " << dt13->tracky() << std::endl; + std::cout << " dt13->trackdxdz() " << dt13->trackdxdz() << std::endl; + std::cout << " dt13->trackdydz() " << dt13->trackdydz() << std::endl; + } + + fitter->second->fill(charge, residdata); + // the MuonResidualsFitter will delete the array when it is destroyed + } + } + } + } // end DT 4th station + + // CSC + else if (m_doCSC && + chamberId->subdetId() == MuonSubdetId::CSC) + { + MuonChamberResidual *csc = mrft.chamberResidual(*chamberId, MuonChamberResidual::kCSC); + m_counter_csc++; + if (csc != NULL) + { + m_counter_cscvalid++; + if (csc->numHits() >= m_minCSCHits) + { + m_counter_cschits++; + Alignable *ali = csc->chamberAlignable(); + + CSCDetId id(ali->geomDetId().rawId()); + if (m_combineME11 && id.station() == 1 && id.ring() == 4) ali = m_me11map[ali]; + + std::map::const_iterator fitter = m_fitters.find(ali); + if (fitter != m_fitters.end()) + { + m_counter_cscaligning++; + double *residdata = new double[MuonResiduals6DOFrphiFitter::kNData]; + residdata[MuonResiduals6DOFrphiFitter::kResid] = csc->residual(); + residdata[MuonResiduals6DOFrphiFitter::kResSlope] = csc->resslope(); + residdata[MuonResiduals6DOFrphiFitter::kPositionX] = csc->trackx(); + residdata[MuonResiduals6DOFrphiFitter::kPositionY] = csc->tracky(); + residdata[MuonResiduals6DOFrphiFitter::kAngleX] = csc->trackdxdz(); + residdata[MuonResiduals6DOFrphiFitter::kAngleY] = csc->trackdydz(); + residdata[MuonResiduals6DOFrphiFitter::kRedChi2] = csc->chi2() / double(csc->ndof()); + residdata[MuonResiduals6DOFrphiFitter::kPz] = mrft.getTrack()->pz(); + residdata[MuonResiduals6DOFrphiFitter::kPt] = mrft.getTrack()->pt(); + residdata[MuonResiduals6DOFrphiFitter::kCharge] = mrft.getTrack()->charge(); + + if (m_debug) { + std::cout << "processMuonResidualsFromTrack 6DOFrphi csc->residual() " << csc->residual() << std::endl; + std::cout << " csc->resslope() " << csc->resslope() << std::endl; + std::cout << " csc->trackx() " << csc->trackx() << std::endl; + std::cout << " csc->tracky() " << csc->tracky() << std::endl; + std::cout << " csc->trackdxdz() " << csc->trackdxdz() << std::endl; + std::cout << " csc->trackdydz() " << csc->trackdydz() << std::endl; + } + + fitter->second->fill(charge, residdata); + // the MuonResidualsFitter will delete the array when it is destroyed + } + } + } + } // end CSC + + else if (m_doDT && m_doCSC) assert(false); + + } // end loop over chamberIds + } // # crossed muon chambers ok + } // endcap tracker ok + } // chi2 ok + } // trackerNumHits ok } void MuonAlignmentFromReference::terminate(const edm::EventSetup& iSetup) { - // one-time print-out - std::cout << "Counters:" << std::endl - << "COUNT{ events: " << m_counter_events << " }" << std::endl - << "COUNT{ tracks: " << m_counter_tracks << " }" << std::endl - << "COUNT{ trackppt: " << m_counter_trackmomentum << " }" << std::endl - << "COUNT{ trackdxy: " << m_counter_trackdxy << " }" << std::endl - << "COUNT{ trackerhits: " << m_counter_trackerhits << " }" << std::endl - << "COUNT{ trackerchi2: " << m_counter_trackerchi2 << " }" << std::endl - << "COUNT{ trackertidtec: " << m_counter_trackertidtec << " }" << std::endl - << "COUNT{ minnchambers: " << m_counter_minchambers << " }" << std::endl - << "COUNT{ totchambers: " << m_counter_totchambers << " }" << std::endl - << "COUNT{ station123: " << m_counter_station123 << " }" << std::endl - << "COUNT{ station123valid: " << m_counter_station123valid << " }" << std::endl - << "COUNT{ station123dt13hits: " << m_counter_station123dt13hits << " }" << std::endl - << "COUNT{ station123dt2hits: " << m_counter_station123dt2hits << " }" << std::endl - << "COUNT{ station123aligning: " << m_counter_station123aligning << " }" << std::endl - << "COUNT{ resslopey: " << m_counter_resslopey << " }" << std::endl - << "COUNT{ station4: " << m_counter_station4 << " }" << std::endl - << "COUNT{ station4valid: " << m_counter_station4valid << " }" << std::endl - << "COUNT{ station4hits: " << m_counter_station4hits << " }" << std::endl - << "COUNT{ station4aligning: " << m_counter_station4aligning << " }" << std::endl - << "COUNT{ csc: " << m_counter_csc << " }" << std::endl - << "COUNT{ cscvalid: " << m_counter_cscvalid << " }" << std::endl - << "COUNT{ cschits: " << m_counter_cschits << " }" << std::endl - << "COUNT{ cscaligning: " << m_counter_cscaligning << " }" << std::endl - << "That's all!" << std::endl; - - TStopwatch stop_watch; - - // collect temporary files - if (m_readTemporaryFiles.size() != 0) - { - stop_watch.Start(); - readTmpFiles(); - std::cout <<"readTmpFiles took "<< stop_watch.CpuTime() << " sec" << std::endl; - stop_watch.Stop(); - } - - // select residuals peaks and discard tails if peakNSigma>0 (only while doing alignment) - if (m_peakNSigma > 0. && m_doAlignment) - { - stop_watch.Start(); - selectResidualsPeaks(); - std::cout <<"selectResidualsPeaks took "<< stop_watch.CpuTime() << " sec" << std::endl; - stop_watch.Stop(); - } - - if (m_BFieldCorrection > 0 && m_doAlignment) - { - stop_watch.Start(); - correctBField(); - std::cout <<"correctBField took "<< stop_watch.CpuTime() << " sec" << std::endl; - stop_watch.Stop(); - } - - // optionally, create an nutuple for easy debugging - if (m_createNtuple) - { - stop_watch.Start(); - fillNtuple(); - std::cout <<"fillNtuple took "<< stop_watch.CpuTime() << " sec" << std::endl; - stop_watch.Stop(); - } - - if (m_doAlignment) - { - stop_watch.Start(); - eraseNotSelectedResiduals(); - std::cout <<"eraseNotSelectedResiduals took "<< stop_watch.CpuTime() << " sec" << std::endl; - stop_watch.Stop(); - } - - // fit and align (time-consuming, so the user can turn it off if in a residuals-gathering job) - if (m_doAlignment) - { - stop_watch.Start(); - fitAndAlign(); - std::cout <<"fitAndAlign took "<< stop_watch.CpuTime() << " sec" << std::endl; - stop_watch.Stop(); - } - - // write out the pseudontuples for a later job to collect - if (m_writeTemporaryFile != std::string("")) writeTmpFiles(); -} + bool m_debug = false; + + // one-time print-out + std::cout << "Counters:" << std::endl + << "COUNT{ events: " << m_counter_events << " }" << std::endl + << "COUNT{ tracks: " << m_counter_tracks << " }" << std::endl + << "COUNT{ trackppt: " << m_counter_trackmomentum << " }" << std::endl + << "COUNT{ trackdxy: " << m_counter_trackdxy << " }" << std::endl + << "COUNT{ trackerhits: " << m_counter_trackerhits << " }" << std::endl + << "COUNT{ trackerchi2: " << m_counter_trackerchi2 << " }" << std::endl + << "COUNT{ trackertidtec: " << m_counter_trackertidtec << " }" << std::endl + << "COUNT{ minnchambers: " << m_counter_minchambers << " }" << std::endl + << "COUNT{ totchambers: " << m_counter_totchambers << " }" << std::endl + << "COUNT{ station123: " << m_counter_station123 << " }" << std::endl + << "COUNT{ station123valid: " << m_counter_station123valid << " }" << std::endl + << "COUNT{ station123dt13hits: " << m_counter_station123dt13hits << " }" << std::endl + << "COUNT{ station123dt2hits: " << m_counter_station123dt2hits << " }" << std::endl + << "COUNT{ station123aligning: " << m_counter_station123aligning << " }" << std::endl + << "COUNT{ resslopey: " << m_counter_resslopey << " }" << std::endl + << "COUNT{ station4: " << m_counter_station4 << " }" << std::endl + << "COUNT{ station4valid: " << m_counter_station4valid << " }" << std::endl + << "COUNT{ station4hits: " << m_counter_station4hits << " }" << std::endl + << "COUNT{ station4aligning: " << m_counter_station4aligning << " }" << std::endl + << "COUNT{ csc: " << m_counter_csc << " }" << std::endl + << "COUNT{ cscvalid: " << m_counter_cscvalid << " }" << std::endl + << "COUNT{ cschits: " << m_counter_cschits << " }" << std::endl + << "COUNT{ cscaligning: " << m_counter_cscaligning << " }" << std::endl + << "That's all!" << std::endl; + + TStopwatch stop_watch; + + // collect temporary files + if (m_readTemporaryFiles.size() != 0) + { + stop_watch.Start(); + readTmpFiles(); + if (m_debug) std::cout <<"readTmpFiles took "<< stop_watch.CpuTime() << " sec" << std::endl; + stop_watch.Stop(); + } + // select residuals peaks and discard tails if peakNSigma>0 (only while doing alignment) + if (m_peakNSigma > 0. && m_doAlignment) + { + stop_watch.Start(); + selectResidualsPeaks(); + if (m_debug) std::cout <<"selectResidualsPeaks took "<< stop_watch.CpuTime() << " sec" << std::endl; + stop_watch.Stop(); + } -void MuonAlignmentFromReference::fitAndAlign() -{ - edm::Service tfileService; - TFileDirectory rootDirectory(tfileService->mkdir("MuonAlignmentFromReference")); - - std::ofstream report; - bool writeReport = (m_reportFileName != std::string("")); - if (writeReport) - { - report.open(m_reportFileName.c_str()); - report << "nan = None; NAN = None" << std::endl; - report << "reports = []" << std::endl; - report << "class ValErr:" << std::endl - << " def __init__(self, value, error, antisym):" << std::endl - << " self.value, self.error, self.antisym = value, error, antisym" << std::endl - << "" << std::endl - << " def __repr__(self):" << std::endl - << " if self.antisym == 0.:" << std::endl - << " return \"%g +- %g\" % (self.value, self.error)" << std::endl - << " else:" << std::endl - << " return \"%g +- %g ~ %g\" % (self.value, self.error, self.antisym)" << std::endl - << "" << std::endl - << "class Report:" << std::endl - << " def __init__(self, chamberId, postal_address, name):" << std::endl - << " self.chamberId, self.postal_address, self.name = chamberId, postal_address, name" << std::endl - << " self.status = \"NOFIT\"" << std::endl - << " self.fittype = None" << std::endl - << "" << std::endl - << " def add_parameters(self, deltax, deltay, deltaz, deltaphix, deltaphiy, deltaphiz, loglikelihood, numsegments, sumofweights, redchi2):" << std::endl - << " self.status = \"PASS\"" << std::endl - << " self.deltax, self.deltay, self.deltaz, self.deltaphix, self.deltaphiy, self.deltaphiz = deltax, deltay, deltaz, deltaphix, deltaphiy, deltaphiz" << std::endl - << " self.loglikelihood, self.numsegments, self.sumofweights, self.redchi2 = loglikelihood, numsegments, sumofweights, redchi2" << std::endl - << "" << std::endl - << " def add_stats(self, median_x, median_y, median_dxdz, median_dydz, mean30_x, mean30_y, mean20_dxdz, mean50_dydz, mean15_x, mean15_y, mean10_dxdz, mean25_dydz, wmean30_x, wmean30_y, wmean20_dxdz, wmean50_dydz, wmean15_x, wmean15_y, wmean10_dxdz, wmean25_dydz, stdev30_x, stdev30_y, stdev20_dxdz, stdev50_dydz, stdev15_x, stdev15_y, stdev10_dxdz, stdev25_dydz):" << std::endl - << " self.median_x, self.median_y, self.median_dxdz, self.median_dydz, self.mean30_x, self.mean30_y, self.mean20_dxdz, self.mean50_dydz, self.mean15_x, self.mean15_y, self.mean10_dxdz, self.mean25_dydz, self.wmean30_x, self.wmean30_y, self.wmean20_dxdz, self.wmean50_dydz, self.wmean15_x, self.wmean15_y, self.wmean10_dxdz, self.wmean25_dydz, self.stdev30_x, self.stdev30_y, self.stdev20_dxdz, self.stdev50_dydz, self.stdev15_x, self.stdev15_y, self.stdev10_dxdz, self.stdev25_dydz = median_x, median_y, median_dxdz, median_dydz, mean30_x, mean30_y, mean20_dxdz, mean50_dydz, mean15_x, mean15_y, mean10_dxdz, mean25_dydz, wmean30_x, wmean30_y, wmean20_dxdz, wmean50_dydz, wmean15_x, wmean15_y, wmean10_dxdz, wmean25_dydz, stdev30_x, stdev30_y, stdev20_dxdz, stdev50_dydz, stdev15_x, stdev15_y, stdev10_dxdz, stdev25_dydz" << std::endl - << "" << std::endl - << " def __repr__(self):" << std::endl - << " return \"\" % (self.postal_address[0], \" \".join(map(str, self.postal_address[1:])), self.status)"<< std::endl - << std::endl; - } - - for (std::vector::const_iterator ali = m_alignables.begin(); ali != m_alignables.end(); ++ali) - { - std::vector selector = (*ali)->alignmentParameters()->selector(); - bool align_x = selector[0]; - bool align_y = selector[1]; - bool align_z = selector[2]; - bool align_phix = selector[3]; - bool align_phiy = selector[4]; - bool align_phiz = selector[5]; - int numParams = ((align_x ? 1 : 0) + (align_y ? 1 : 0) + (align_z ? 1 : 0) + (align_phix ? 1 : 0) + (align_phiy ? 1 : 0) + (align_phiz ? 1 : 0)); - - // map from 0-5 to the index of params, above - std::vector paramIndex; - int paramIndex_counter = -1; - if (align_x) paramIndex_counter++; - paramIndex.push_back(paramIndex_counter); - if (align_y) paramIndex_counter++; - paramIndex.push_back(paramIndex_counter); - if (align_z) paramIndex_counter++; - paramIndex.push_back(paramIndex_counter); - if (align_phix) paramIndex_counter++; - paramIndex.push_back(paramIndex_counter); - if (align_phiy) paramIndex_counter++; - paramIndex.push_back(paramIndex_counter); - if (align_phiz) paramIndex_counter++; - paramIndex.push_back(paramIndex_counter); - - DetId id = (*ali)->geomDetId(); - - Alignable *thisali = *ali; - if (m_combineME11 && id.subdetId() == MuonSubdetId::CSC) + if (m_BFieldCorrection > 0 && m_doAlignment) { - CSCDetId cscid(id.rawId()); - if (cscid.station() == 1 && cscid.ring() == 4) thisali = m_me11map[*ali]; + stop_watch.Start(); + correctBField(); + if (m_debug) std::cout <<"correctBField took "<< stop_watch.CpuTime() << " sec" << std::endl; + stop_watch.Stop(); } - char cname[40]; - char wheel_label[][2]={"A","B","C","D","E"}; - - if (id.subdetId() == MuonSubdetId::DT) + if (m_doAlignment) { - DTChamberId chamberId(id.rawId()); - - //if ( ! ( (chamberId.station()==1&&chamberId.wheel()==0) || (chamberId.station()==4&&chamberId.wheel()==2) ) ) continue; - - sprintf(cname, "MBwh%sst%dsec%02d", wheel_label[chamberId.wheel()+2], chamberId.station(), chamberId.sector()); - if (writeReport) - { - report << "reports.append(Report(" << id.rawId() << ", (\"DT\", " - << chamberId.wheel() << ", " << chamberId.station() << ", " << chamberId.sector() << "), \"" << cname << "\"))" << std::endl; - } + stop_watch.Start(); + fiducialCuts(); + if (m_debug) std::cout <<"fiducialCuts took "<< stop_watch.CpuTime() << " sec" << std::endl; + stop_watch.Stop(); } - else if (id.subdetId() == MuonSubdetId::CSC) + + // optionally, create an nutuple for easy debugging + if (m_createNtuple) { - CSCDetId chamberId(id.rawId()); - sprintf(cname, "ME%s%d%d_%02d", (chamberId.endcap() == 1 ? "p" : "m"), chamberId.station(), chamberId.ring(), chamberId.chamber()); + stop_watch.Start(); + fillNtuple(); + if (m_debug) std::cout <<"fillNtuple took "<< stop_watch.CpuTime() << " sec" << std::endl; + stop_watch.Stop(); + } - //if ( chamberId.chamber()>6 || chamberId.endcap()==2 || ! ( (chamberId.station()==2&&chamberId.ring()==1) || (chamberId.station()==3&&chamberId.ring()==2) ) ) continue; + if (m_doAlignment) + { + stop_watch.Start(); + eraseNotSelectedResiduals(); + if (m_debug) std::cout <<"eraseNotSelectedResiduals took "<< stop_watch.CpuTime() << " sec" << std::endl; + stop_watch.Stop(); + } - if (writeReport) - { - report << "reports.append(Report(" << id.rawId() << ", (\"CSC\", " - << chamberId.endcap() << ", " << chamberId.station() << ", " << chamberId.ring() << ", " << chamberId.chamber() - << "), \"" << cname << "\"))" << std::endl; - } + // fit and align (time-consuming, so the user can turn it off if in a residuals-gathering job) + if (m_doAlignment) + { + stop_watch.Start(); + fitAndAlign(); + if (m_debug) std::cout <<"fitAndAlign took "<< stop_watch.CpuTime() << " sec" << std::endl; + stop_watch.Stop(); } - //if(! ( strcmp(cname,"MBwhCst3sec12")==0 || strcmp(cname,"MBwhCst3sec06")==0)) continue; + // write out the pseudontuples for a later job to collect + if (m_writeTemporaryFile != std::string("")) writeTmpFiles(); + if (m_debug) std::cout << "end: MuonAlignmentFromReference::terminate()" << std::endl; +} + + +void MuonAlignmentFromReference::fitAndAlign() +{ + bool m_debug = false; - std::map::const_iterator fitter = m_fitters.find(thisali); + edm::Service tfileService; + TFileDirectory rootDirectory(tfileService->mkdir("MuonAlignmentFromReference")); - if (fitter != m_fitters.end()) + std::ofstream report; + bool writeReport = (m_reportFileName != std::string("")); + if (writeReport) { - //if (fitter->second->type() != MuonResidualsFitter::k6DOFrphi) continue; - - TStopwatch stop_watch; - stop_watch.Start(); - - // MINUIT is verbose in std::cout anyway - std::cout << "=============================================================================================" << std::endl; - std::cout << "Fitting " << cname << std::endl; - - if (writeReport) - { - report << "reports[-1].posNum = " << fitter->second->numResidualsPos() << std::endl; - report << "reports[-1].negNum = " << fitter->second->numResidualsNeg() << std::endl; - } - - if (fitter->second->type() == MuonResidualsFitter::k5DOF) - { - if (!align_x) fitter->second->fix(MuonResiduals5DOFFitter::kAlignX); - if (!align_z) fitter->second->fix(MuonResiduals5DOFFitter::kAlignZ); - if (!align_phix) fitter->second->fix(MuonResiduals5DOFFitter::kAlignPhiX); - if (!align_phiy) fitter->second->fix(MuonResiduals5DOFFitter::kAlignPhiY); - if (!align_phiz) fitter->second->fix(MuonResiduals5DOFFitter::kAlignPhiZ); - } - else if (fitter->second->type() == MuonResidualsFitter::k6DOF) - { - if (!align_x) fitter->second->fix(MuonResiduals6DOFFitter::kAlignX); - if (!align_y) fitter->second->fix(MuonResiduals6DOFFitter::kAlignY); - if (!align_z) fitter->second->fix(MuonResiduals6DOFFitter::kAlignZ); - if (!align_phix) fitter->second->fix(MuonResiduals6DOFFitter::kAlignPhiX); - if (!align_phiy) fitter->second->fix(MuonResiduals6DOFFitter::kAlignPhiY); - if (!align_phiz) fitter->second->fix(MuonResiduals6DOFFitter::kAlignPhiZ); - } - else if (fitter->second->type() == MuonResidualsFitter::k6DOFrphi) - { - if (!align_x) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignX); - if (!align_y) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignY); - if (!align_z) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignZ); - if (!align_phix) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignPhiX); - if (!align_phiy) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignPhiY); - if (!align_phiz) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignPhiZ); - } - else assert(false); - - AlgebraicVector params(numParams); - AlgebraicSymMatrix cov(numParams); - - if (fitter->second->numsegments() >= m_minAlignmentHits) - { - bool successful_fit = fitter->second->fit(thisali); - - double loglikelihood = fitter->second->loglikelihood(); - double numsegments = fitter->second->numsegments(); - double sumofweights = fitter->second->sumofweights(); - double redchi2 = fitter->second->plot(cname, &rootDirectory, thisali); - - if (fitter->second->type() == MuonResidualsFitter::k5DOF) + report.open(m_reportFileName.c_str()); + report << "nan = None; NAN = None" << std::endl; + report << "nan = 0" << std::endl; + report << "reports = []" << std::endl; + report << "class ValErr:" << std::endl + << " def __init__(self, value, error, antisym):" << std::endl + << " self.value, self.error, self.antisym = value, error, antisym" << std::endl + << "" << std::endl + << " def __repr__(self):" << std::endl + << " if self.antisym == 0.:" << std::endl + << " return \"%g +- %g\" % (self.value, self.error)" << std::endl + << " else:" << std::endl + << " return \"%g +- %g ~ %g\" % (self.value, self.error, self.antisym)" << std::endl + << "" << std::endl + << "class Report:" << std::endl + << " def __init__(self, chamberId, postal_address, name):" << std::endl + << " self.chamberId, self.postal_address, self.name = chamberId, postal_address, name" << std::endl + << " self.status = \"NOFIT\"" << std::endl + << " self.fittype = None" << std::endl + << "" << std::endl + << " def add_parameters(self, deltax, deltay, deltaz, deltaphix, deltaphiy, deltaphiz, loglikelihood, numsegments, sumofweights, redchi2):" << std::endl + << " self.status = \"PASS\"" << std::endl + << " self.deltax, self.deltay, self.deltaz, self.deltaphix, self.deltaphiy, self.deltaphiz = deltax, deltay, deltaz, deltaphix, deltaphiy, deltaphiz" << std::endl + << " self.loglikelihood, self.numsegments, self.sumofweights, self.redchi2 = loglikelihood, numsegments, sumofweights, redchi2" << std::endl + << "" << std::endl + << " def add_stats(self, median_x, median_y, median_dxdz, median_dydz, mean30_x, mean30_y, mean20_dxdz, mean50_dydz, mean15_x, mean15_y, mean10_dxdz, mean25_dydz, wmean30_x, wmean30_y, wmean20_dxdz, wmean50_dydz, wmean15_x, wmean15_y, wmean10_dxdz, wmean25_dydz, stdev30_x, stdev30_y, stdev20_dxdz, stdev50_dydz, stdev15_x, stdev15_y, stdev10_dxdz, stdev25_dydz):" << std::endl + << " self.median_x, self.median_y, self.median_dxdz, self.median_dydz, self.mean30_x, self.mean30_y, self.mean20_dxdz, self.mean50_dydz, self.mean15_x, self.mean15_y, self.mean10_dxdz, self.mean25_dydz, self.wmean30_x, self.wmean30_y, self.wmean20_dxdz, self.wmean50_dydz, self.wmean15_x, self.wmean15_y, self.wmean10_dxdz, self.wmean25_dydz, self.stdev30_x, self.stdev30_y, self.stdev20_dxdz, self.stdev50_dydz, self.stdev15_x, self.stdev15_y, self.stdev10_dxdz, self.stdev25_dydz = median_x, median_y, median_dxdz, median_dydz, mean30_x, mean30_y, mean20_dxdz, mean50_dydz, mean15_x, mean15_y, mean10_dxdz, mean25_dydz, wmean30_x, wmean30_y, wmean20_dxdz, wmean50_dydz, wmean15_x, wmean15_y, wmean10_dxdz, wmean25_dydz, stdev30_x, stdev30_y, stdev20_dxdz, stdev50_dydz, stdev15_x, stdev15_y, stdev10_dxdz, stdev25_dydz" << std::endl + << "" << std::endl + << " def __repr__(self):" << std::endl + << " return \"\" % (self.postal_address[0], \" \".join(map(str, self.postal_address[1:])), self.status)"<< std::endl + << std::endl; + } + + if (m_debug) std::cout << "***** just after report.open" << std::endl; + + for (std::vector::const_iterator ali = m_alignables.begin(); ali != m_alignables.end(); ++ali) + { + if (m_debug) std::cout << "***** Start loop over alignables" << std::endl; + + std::vector selector = (*ali)->alignmentParameters()->selector(); + bool align_x = selector[0]; + bool align_y = selector[1]; + bool align_z = selector[2]; + bool align_phix = selector[3]; + bool align_phiy = selector[4]; + bool align_phiz = selector[5]; + int numParams = ((align_x ? 1 : 0) + (align_y ? 1 : 0) + (align_z ? 1 : 0) + (align_phix ? 1 : 0) + (align_phiy ? 1 : 0) + (align_phiz ? 1 : 0)); + + // map from 0-5 to the index of params, above + std::vector paramIndex; + int paramIndex_counter = -1; + if (align_x) paramIndex_counter++; + paramIndex.push_back(paramIndex_counter); + if (align_y) paramIndex_counter++; + paramIndex.push_back(paramIndex_counter); + if (align_z) paramIndex_counter++; + paramIndex.push_back(paramIndex_counter); + if (align_phix) paramIndex_counter++; + paramIndex.push_back(paramIndex_counter); + if (align_phiy) paramIndex_counter++; + paramIndex.push_back(paramIndex_counter); + if (align_phiz) paramIndex_counter++; + paramIndex.push_back(paramIndex_counter); + + DetId id = (*ali)->geomDetId(); + + Alignable *thisali = *ali; + if (m_combineME11 && id.subdetId() == MuonSubdetId::CSC) { - double deltax_value = fitter->second->value(MuonResiduals5DOFFitter::kAlignX); - double deltax_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kAlignX); - double deltax_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kAlignX); - - double deltaz_value = fitter->second->value(MuonResiduals5DOFFitter::kAlignZ); - double deltaz_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kAlignZ); - double deltaz_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kAlignZ); - - double deltaphix_value = fitter->second->value(MuonResiduals5DOFFitter::kAlignPhiX); - double deltaphix_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kAlignPhiX); - double deltaphix_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kAlignPhiX); - - double deltaphiy_value = fitter->second->value(MuonResiduals5DOFFitter::kAlignPhiY); - double deltaphiy_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kAlignPhiY); - double deltaphiy_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kAlignPhiY); - - double deltaphiz_value = fitter->second->value(MuonResiduals5DOFFitter::kAlignPhiZ); - double deltaphiz_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kAlignPhiZ); - double deltaphiz_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kAlignPhiZ); - - double sigmaresid_value = fitter->second->value(MuonResiduals5DOFFitter::kResidSigma); - double sigmaresid_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kResidSigma); - double sigmaresid_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kResidSigma); - - double sigmaresslope_value = fitter->second->value(MuonResiduals5DOFFitter::kResSlopeSigma); - double sigmaresslope_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kResSlopeSigma); - double sigmaresslope_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kResSlopeSigma); - - double gammaresid_value, gammaresid_error, gammaresid_antisym, gammaresslope_value, gammaresslope_error, gammaresslope_antisym; - gammaresid_value = gammaresid_error = gammaresid_antisym = gammaresslope_value = gammaresslope_error = gammaresslope_antisym = 0.; - - if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && - fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && - fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) - { - gammaresid_value = fitter->second->value(MuonResiduals5DOFFitter::kResidGamma); - gammaresid_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kResidGamma); - gammaresid_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kResidGamma); - - gammaresslope_value = fitter->second->value(MuonResiduals5DOFFitter::kResSlopeGamma); - gammaresslope_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kResSlopeGamma); - gammaresslope_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kResSlopeGamma); - } - - if (writeReport) - { - report << "reports[-1].fittype = \"5DOF\"" << std::endl; - report << "reports[-1].add_parameters(ValErr(" << deltax_value << ", " << deltax_error << ", " << deltax_antisym << "), \\" << std::endl - << " None, \\" << std::endl - << " ValErr(" << deltaz_value << ", " << deltaz_error << ", " << deltaz_antisym << "), \\" << std::endl - << " ValErr(" << deltaphix_value << ", " << deltaphix_error << ", " << deltaphix_antisym << "), \\" << std::endl - << " ValErr(" << deltaphiy_value << ", " << deltaphiy_error << ", " << deltaphiy_antisym << "), \\" << std::endl - << " ValErr(" << deltaphiz_value << ", " << deltaphiz_error << ", " << deltaphiz_antisym << "), \\" << std::endl - << " " << loglikelihood << ", " << numsegments << ", " << sumofweights << ", " << redchi2 << ")" << std::endl; - report << "reports[-1].sigmaresid = ValErr(" << sigmaresid_value << ", " << sigmaresid_error << ", " << sigmaresid_antisym << ")" << std::endl; - report << "reports[-1].sigmaresslope = ValErr(" << sigmaresslope_value << ", " << sigmaresslope_error << ", " << sigmaresslope_antisym << ")" << std::endl; - if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && - fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && - fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) + CSCDetId cscid(id.rawId()); + if (cscid.station() == 1 && cscid.ring() == 4) thisali = m_me11map[*ali]; + } + + if (m_debug) std::cout << "***** loop over alignables 1" << std::endl; + + char cname[40]; + char wheel_label[][2]={"A","B","C","D","E"}; + + if (id.subdetId() == MuonSubdetId::DT) + { + DTChamberId chamberId(id.rawId()); + + //if ( ! ( (chamberId.station()==1&&chamberId.wheel()==0) || (chamberId.station()==4&&chamberId.wheel()==2) ) ) continue; + + sprintf(cname, "MBwh%sst%dsec%02d", wheel_label[chamberId.wheel()+2], chamberId.station(), chamberId.sector()); + if (writeReport) { - report << "reports[-1].gammaresid = ValErr(" << gammaresid_value << ", " << gammaresid_error << ", " << gammaresid_antisym << ")" << std::endl; - report << "reports[-1].gammaresslope = ValErr(" << gammaresslope_value << ", " << gammaresslope_error << ", " << gammaresslope_antisym << ")" << std::endl; + report << "reports.append(Report(" << id.rawId() << ", (\"DT\", " + << chamberId.wheel() << ", " << chamberId.station() << ", " << chamberId.sector() << "), \"" << cname << "\"))" << std::endl; } - - report << "reports[-1].add_stats(" << fitter->second->median(MuonResiduals5DOFFitter::kResid) << ", " << "None, " - << fitter->second->median(MuonResiduals5DOFFitter::kResSlope) << ", " << "None, " - << fitter->second->mean(MuonResiduals5DOFFitter::kResid, 30.) << ", " << "None, " - << fitter->second->mean(MuonResiduals5DOFFitter::kResSlope, 20.) << ", " << "None, " - << fitter->second->mean(MuonResiduals5DOFFitter::kResid, 15.) << ", " << "None, " - << fitter->second->mean(MuonResiduals5DOFFitter::kResSlope, 10.) << ", " << "None, " - << fitter->second->wmean(MuonResiduals5DOFFitter::kResid, MuonResiduals5DOFFitter::kRedChi2, 30.) << ", " << "None, " - << fitter->second->wmean(MuonResiduals5DOFFitter::kResSlope, MuonResiduals5DOFFitter::kRedChi2, 20.) << ", " << "None, " - << fitter->second->wmean(MuonResiduals5DOFFitter::kResid, MuonResiduals5DOFFitter::kRedChi2, 15.) << ", " << "None, " - << fitter->second->wmean(MuonResiduals5DOFFitter::kResSlope, MuonResiduals5DOFFitter::kRedChi2, 10.) << ", " << "None, " - << fitter->second->stdev(MuonResiduals5DOFFitter::kResid, 30.) << ", " << "None, " - << fitter->second->stdev(MuonResiduals5DOFFitter::kResSlope, 20.) << ", " << "None, " - << fitter->second->stdev(MuonResiduals5DOFFitter::kResid, 15.) << ", " << "None, " - << fitter->second->stdev(MuonResiduals5DOFFitter::kResSlope, 10.) << ", " << "None)" << std::endl; - - std::stringstream namesimple_x, namesimple_dxdz, nameweighted_x, nameweighted_dxdz; - namesimple_x << cname << "_simple_x"; - namesimple_dxdz << cname << "_simple_dxdz"; - nameweighted_x << cname << "_weighted_x"; - nameweighted_dxdz << cname << "_weighted_dxdz"; - - fitter->second->plotsimple(namesimple_x.str(), &rootDirectory, MuonResiduals5DOFFitter::kResid, 10.); - fitter->second->plotsimple(namesimple_dxdz.str(), &rootDirectory, MuonResiduals5DOFFitter::kResSlope, 1000.); - - fitter->second->plotweighted(nameweighted_x.str(), &rootDirectory, MuonResiduals5DOFFitter::kResid, MuonResiduals5DOFFitter::kRedChi2, 10.); - fitter->second->plotweighted(nameweighted_dxdz.str(), &rootDirectory, MuonResiduals5DOFFitter::kResSlope, MuonResiduals5DOFFitter::kRedChi2, 1000.); - } - - if (successful_fit) - { - if (align_x) params[paramIndex[0]] = deltax_value; - if (align_z) params[paramIndex[2]] = deltaz_value; - if (align_phix) params[paramIndex[3]] = deltaphix_value; - if (align_phiy) params[paramIndex[4]] = deltaphiy_value; - if (align_phiz) params[paramIndex[5]] = deltaphiz_value; - } - } // end if 5DOF - - else if (fitter->second->type() == MuonResidualsFitter::k6DOF) + } + else if (id.subdetId() == MuonSubdetId::CSC) { - double deltax_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignX); - double deltax_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignX); - double deltax_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignX); - - double deltay_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignY); - double deltay_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignY); - double deltay_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignY); - - double deltaz_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignZ); - double deltaz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignZ); - double deltaz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignZ); - - double deltaphix_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignPhiX); - double deltaphix_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignPhiX); - double deltaphix_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignPhiX); - - double deltaphiy_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignPhiY); - double deltaphiy_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignPhiY); - double deltaphiy_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignPhiY); - - double deltaphiz_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignPhiZ); - double deltaphiz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignPhiZ); - double deltaphiz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignPhiZ); - - double sigmax_value = fitter->second->value(MuonResiduals6DOFFitter::kResidXSigma); - double sigmax_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResidXSigma); - double sigmax_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResidXSigma); - - double sigmay_value = fitter->second->value(MuonResiduals6DOFFitter::kResidYSigma); - double sigmay_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResidYSigma); - double sigmay_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResidYSigma); - - double sigmadxdz_value = fitter->second->value(MuonResiduals6DOFFitter::kResSlopeXSigma); - double sigmadxdz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResSlopeXSigma); - double sigmadxdz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResSlopeXSigma); - - double sigmadydz_value = fitter->second->value(MuonResiduals6DOFFitter::kResSlopeYSigma); - double sigmadydz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResSlopeYSigma); - double sigmadydz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResSlopeYSigma); - - double gammax_value, gammax_error, gammax_antisym, gammay_value, gammay_error, gammay_antisym, - gammadxdz_value, gammadxdz_error, gammadxdz_antisym, gammadydz_value, gammadydz_error, gammadydz_antisym; - gammax_value = gammax_error = gammax_antisym = gammay_value = gammay_error = gammay_antisym = gammadxdz_value - = gammadxdz_error = gammadxdz_antisym = gammadydz_value = gammadydz_error = gammadydz_antisym = 0.; - if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && - fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && - fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) - { - gammax_value = fitter->second->value(MuonResiduals6DOFFitter::kResidXGamma); - gammax_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResidXGamma); - gammax_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResidXGamma); - - gammay_value = fitter->second->value(MuonResiduals6DOFFitter::kResidYGamma); - gammay_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResidYGamma); - gammay_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResidYGamma); - - gammadxdz_value = fitter->second->value(MuonResiduals6DOFFitter::kResSlopeXGamma); - gammadxdz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResSlopeXGamma); - gammadxdz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResSlopeXGamma); - - gammadydz_value = fitter->second->value(MuonResiduals6DOFFitter::kResSlopeYGamma); - gammadydz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResSlopeYGamma); - gammadydz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResSlopeYGamma); - } - - if (writeReport) - { - report << "reports[-1].fittype = \"6DOF\"" << std::endl; - report << "reports[-1].add_parameters(ValErr(" << deltax_value << ", " << deltax_error << ", " << deltax_antisym << "), \\" << std::endl - << " ValErr(" << deltay_value << ", " << deltay_error << ", " << deltay_antisym << "), \\" << std::endl - << " ValErr(" << deltaz_value << ", " << deltaz_error << ", " << deltaz_antisym << "), \\" << std::endl - << " ValErr(" << deltaphix_value << ", " << deltaphix_error << ", " << deltaphix_antisym << "), \\" << std::endl - << " ValErr(" << deltaphiy_value << ", " << deltaphiy_error << ", " << deltaphiy_antisym << "), \\" << std::endl - << " ValErr(" << deltaphiz_value << ", " << deltaphiz_error << ", " << deltaphiz_antisym << "), \\" << std::endl - << " " << loglikelihood << ", " << numsegments << ", " << sumofweights << ", " << redchi2 << ")" << std::endl; - report << "reports[-1].sigmax = ValErr(" << sigmax_value << ", " << sigmax_error << ", " << sigmax_antisym<< ")" << std::endl; - report << "reports[-1].sigmay = ValErr(" << sigmay_value << ", " << sigmay_error << ", " << sigmay_antisym<< ")" << std::endl; - report << "reports[-1].sigmadxdz = ValErr(" << sigmadxdz_value << ", " << sigmadxdz_error << ", "<< sigmadxdz_antisym << ")" << std::endl; - report << "reports[-1].sigmadydz = ValErr(" << sigmadydz_value << ", " << sigmadydz_error << ", "<< sigmadydz_antisym << ")" << std::endl; - if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && - fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && - fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) + CSCDetId chamberId(id.rawId()); + sprintf(cname, "ME%s%d%d_%02d", (chamberId.endcap() == 1 ? "p" : "m"), chamberId.station(), chamberId.ring(), chamberId.chamber()); + + //if ( chamberId.chamber()>6 || chamberId.endcap()==2 || ! ( (chamberId.station()==2&&chamberId.ring()==1) || (chamberId.station()==3&&chamberId.ring()==2) ) ) continue; + + if (writeReport) { - report << "reports[-1].gammax = ValErr(" << gammax_value << ", " << gammax_error << ", " << gammax_antisym << ")" << std::endl; - report << "reports[-1].gammay = ValErr(" << gammay_value << ", " << gammay_error << ", " << gammay_antisym << ")" << std::endl; - report << "reports[-1].gammadxdz = ValErr(" << gammadxdz_value << ", " << gammadxdz_error << ", " << gammadxdz_antisym << ")" << std::endl; - report << "reports[-1].gammadydz = ValErr(" << gammadydz_value << ", " << gammadydz_error << ", " << gammadydz_antisym << ")" << std::endl; + report << "reports.append(Report(" << id.rawId() << ", (\"CSC\", " + << chamberId.endcap() << ", " << chamberId.station() << ", " << chamberId.ring() << ", " << chamberId.chamber() + << "), \"" << cname << "\"))" << std::endl; } + } - report << "reports[-1].add_stats(" - << fitter->second->median(MuonResiduals6DOFFitter::kResidX) << ", " - << fitter->second->median(MuonResiduals6DOFFitter::kResidY) << ", " - << fitter->second->median(MuonResiduals6DOFFitter::kResSlopeX) << ", " - << fitter->second->median(MuonResiduals6DOFFitter::kResSlopeY) << ", " - << fitter->second->mean(MuonResiduals6DOFFitter::kResidX, 30.) << ", " - << fitter->second->mean(MuonResiduals6DOFFitter::kResidY, 30.) << ", " - << fitter->second->mean(MuonResiduals6DOFFitter::kResSlopeX, 20.) << ", " - << fitter->second->mean(MuonResiduals6DOFFitter::kResSlopeY, 50.) << ", " - << fitter->second->mean(MuonResiduals6DOFFitter::kResidX, 15.) << ", " - << fitter->second->mean(MuonResiduals6DOFFitter::kResidY, 15.) << ", " - << fitter->second->mean(MuonResiduals6DOFFitter::kResSlopeX, 10.) << ", " - << fitter->second->mean(MuonResiduals6DOFFitter::kResSlopeY, 25.) << ", " - << fitter->second->wmean(MuonResiduals6DOFFitter::kResidX, MuonResiduals6DOFFitter::kRedChi2, 30.) << ", " - << fitter->second->wmean(MuonResiduals6DOFFitter::kResidY, MuonResiduals6DOFFitter::kRedChi2, 30.) << ", " - << fitter->second->wmean(MuonResiduals6DOFFitter::kResSlopeX,MuonResiduals6DOFFitter::kRedChi2, 20.) << ", " - << fitter->second->wmean(MuonResiduals6DOFFitter::kResSlopeY, MuonResiduals6DOFFitter::kRedChi2, 50.) << ", " - << fitter->second->wmean(MuonResiduals6DOFFitter::kResidX, MuonResiduals6DOFFitter::kRedChi2, 15.) << ", " - << fitter->second->wmean(MuonResiduals6DOFFitter::kResidY, MuonResiduals6DOFFitter::kRedChi2, 15.) << ", " - << fitter->second->wmean(MuonResiduals6DOFFitter::kResSlopeX, MuonResiduals6DOFFitter::kRedChi2, 10.) << ", " - << fitter->second->wmean(MuonResiduals6DOFFitter::kResSlopeY, MuonResiduals6DOFFitter::kRedChi2, 25.) << ", " - << fitter->second->stdev(MuonResiduals6DOFFitter::kResidX, 30.) << ", " - << fitter->second->stdev(MuonResiduals6DOFFitter::kResidY, 30.) << ", " - << fitter->second->stdev(MuonResiduals6DOFFitter::kResSlopeX, 20.) << ", " - << fitter->second->stdev(MuonResiduals6DOFFitter::kResSlopeY, 50.) << ", " - << fitter->second->stdev(MuonResiduals6DOFFitter::kResidX, 15.) << ", " - << fitter->second->stdev(MuonResiduals6DOFFitter::kResidY, 15.) << ", " - << fitter->second->stdev(MuonResiduals6DOFFitter::kResSlopeX, 10.) << ", " - << fitter->second->stdev(MuonResiduals6DOFFitter::kResSlopeY, 25.) << ")" << std::endl; - - std::stringstream namesimple_x, namesimple_y, namesimple_dxdz, namesimple_dydz, nameweighted_x, - nameweighted_y, nameweighted_dxdz, nameweighted_dydz; - namesimple_x << cname << "_simple_x"; - namesimple_y << cname << "_simple_y"; - namesimple_dxdz << cname << "_simple_dxdz"; - namesimple_dydz << cname << "_simple_dydz"; - nameweighted_x << cname << "_weighted_x"; - nameweighted_y << cname << "_weighted_y"; - nameweighted_dxdz << cname << "_weighted_dxdz"; - nameweighted_dydz << cname << "_weighted_dydz"; - - fitter->second->plotsimple(namesimple_x.str(), &rootDirectory, MuonResiduals6DOFFitter::kResidX, 10.); - fitter->second->plotsimple(namesimple_y.str(), &rootDirectory, MuonResiduals6DOFFitter::kResidY, 10.); - fitter->second->plotsimple(namesimple_dxdz.str(), &rootDirectory, MuonResiduals6DOFFitter::kResSlopeX, 1000.); - fitter->second->plotsimple(namesimple_dydz.str(), &rootDirectory, MuonResiduals6DOFFitter::kResSlopeY,1000.); - - fitter->second->plotweighted(nameweighted_x.str(), &rootDirectory, MuonResiduals6DOFFitter::kResidX, MuonResiduals6DOFFitter::kRedChi2, 10.); - fitter->second->plotweighted(nameweighted_y.str(), &rootDirectory, MuonResiduals6DOFFitter::kResidY, MuonResiduals6DOFFitter::kRedChi2, 10.); - fitter->second->plotweighted(nameweighted_dxdz.str(), &rootDirectory, MuonResiduals6DOFFitter::kResSlopeX, MuonResiduals6DOFFitter::kRedChi2, 1000.); - fitter->second->plotweighted(nameweighted_dydz.str(), &rootDirectory, MuonResiduals6DOFFitter::kResSlopeY, MuonResiduals6DOFFitter::kRedChi2, 1000.); - } - - if (successful_fit) - { - if (align_x) params[paramIndex[0]] = deltax_value; - if (align_y) params[paramIndex[1]] = deltay_value; - if (align_z) params[paramIndex[2]] = deltaz_value; - if (align_phix) params[paramIndex[3]] = deltaphix_value; - if (align_phiy) params[paramIndex[4]] = deltaphiy_value; - if (align_phiz) params[paramIndex[5]] = deltaphiz_value; - } - } // end if 6DOF - - else if (fitter->second->type() == MuonResidualsFitter::k6DOFrphi) + if (m_debug) std::cout << "***** loop over alignables 2" << std::endl; + + //if(! ( strcmp(cname,"MBwhCst3sec12")==0 || strcmp(cname,"MBwhCst3sec06")==0)) continue; + + std::map::const_iterator fitter = m_fitters.find(thisali); + + if (m_debug) std::cout << "***** loop over alignables 3" << std::endl; + + if (fitter != m_fitters.end()) { - double deltax_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignX); - double deltax_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignX); - double deltax_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignX); - - double deltay_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignY); - double deltay_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignY); - double deltay_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignY); - - double deltaz_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignZ); - double deltaz_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignZ); - double deltaz_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignZ); - - double deltaphix_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignPhiX); - double deltaphix_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignPhiX); - double deltaphix_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignPhiX); - - double deltaphiy_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignPhiY); - double deltaphiy_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignPhiY); - double deltaphiy_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignPhiY); - - double deltaphiz_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignPhiZ); - double deltaphiz_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignPhiZ); - double deltaphiz_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignPhiZ); - - double sigmaresid_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kResidSigma); - double sigmaresid_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kResidSigma); - double sigmaresid_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kResidSigma); - - double sigmaresslope_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kResSlopeSigma); - double sigmaresslope_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kResSlopeSigma); - double sigmaresslope_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kResSlopeSigma); - - double gammaresid_value, gammaresid_error, gammaresid_antisym, gammaresslope_value, gammaresslope_error, gammaresslope_antisym; - gammaresid_value = gammaresid_error = gammaresid_antisym = gammaresslope_value = gammaresslope_error = gammaresslope_antisym = 0.; - if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && - fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && - fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) - { - gammaresid_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kResidGamma); - gammaresid_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kResidGamma); - gammaresid_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kResidGamma); - - gammaresslope_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kResSlopeGamma); - gammaresslope_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kResSlopeGamma); - gammaresslope_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kResSlopeGamma); - } - - if (writeReport) - { - report << "reports[-1].fittype = \"6DOFrphi\"" << std::endl; - report << "reports[-1].add_parameters(ValErr(" << deltax_value << ", " << deltax_error << ", " << deltax_antisym << "), \\" << std::endl - << " ValErr(" << deltay_value << ", " << deltay_error << ", " << deltay_antisym << "), \\" << std::endl - << " ValErr(" << deltaz_value << ", " << deltaz_error << ", " << deltaz_antisym << "), \\" << std::endl - << " ValErr(" << deltaphix_value << ", " << deltaphix_error << ", " << deltaphix_antisym << "), \\" << std::endl - << " ValErr(" << deltaphiy_value << ", " << deltaphiy_error << ", " << deltaphiy_antisym << "), \\" << std::endl - << " ValErr(" << deltaphiz_value << ", " << deltaphiz_error << ", " << deltaphiz_antisym << "), \\" << std::endl - << " " << loglikelihood << ", " << numsegments << ", " << sumofweights << ", " << redchi2 << ")" << std::endl; - report << "reports[-1].sigmaresid = ValErr(" << sigmaresid_value << ", " << sigmaresid_error << ", " << sigmaresid_antisym << ")" << std::endl; - report << "reports[-1].sigmaresslope = ValErr(" << sigmaresslope_value << ", " << sigmaresslope_error << ", " << sigmaresslope_antisym << ")" << std::endl; - if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && - fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && - fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) + //if (fitter->second->type() != MuonResidualsFitter::k6DOFrphi) continue; + + TStopwatch stop_watch; + stop_watch.Start(); + + // MINUIT is verbose in std::cout anyway + if (m_debug) std::cout << "=============================================================================================" << std::endl; + if (m_debug) std::cout << "Fitting " << cname << std::endl; + + if (writeReport) { - report << "reports[-1].gammaresid = ValErr(" << gammaresid_value << ", " << gammaresid_error << ", " << gammaresid_antisym << ")" << std::endl; - report << "reports[-1].gammaresslope = ValErr(" << gammaresslope_value << ", " << gammaresslope_error << ", " << gammaresslope_antisym << ")" << std::endl; + report << "reports[-1].posNum = " << fitter->second->numResidualsPos() << std::endl; + report << "reports[-1].negNum = " << fitter->second->numResidualsNeg() << std::endl; } - report << "reports[-1].add_stats(" << fitter->second->median(MuonResiduals6DOFrphiFitter::kResid) << ", " << "None, " - << fitter->second->median(MuonResiduals6DOFrphiFitter::kResSlope) << ", " << "None, " - << fitter->second->mean(MuonResiduals6DOFrphiFitter::kResid, 30.) << ", " << "None, " - << fitter->second->mean(MuonResiduals6DOFrphiFitter::kResSlope, 20.) << ", " << "None, " - << fitter->second->mean(MuonResiduals6DOFrphiFitter::kResid, 15.) << ", " << "None, " - << fitter->second->mean(MuonResiduals6DOFrphiFitter::kResSlope, 10.) << ", " << "None, " - << fitter->second->wmean(MuonResiduals6DOFrphiFitter::kResid, MuonResiduals6DOFrphiFitter::kRedChi2, 30.) << ", " << "None, " - << fitter->second->wmean(MuonResiduals6DOFrphiFitter::kResSlope, MuonResiduals6DOFrphiFitter::kRedChi2, 20.) << ", " << "None, " - << fitter->second->wmean(MuonResiduals6DOFrphiFitter::kResid, MuonResiduals6DOFrphiFitter::kRedChi2, 15.) << ", " << "None, " - << fitter->second->wmean(MuonResiduals6DOFrphiFitter::kResSlope, MuonResiduals6DOFrphiFitter::kRedChi2, 10.) << ", " << "None, " - << fitter->second->stdev(MuonResiduals6DOFrphiFitter::kResid, 30.) << ", " << "None, " - << fitter->second->stdev(MuonResiduals6DOFrphiFitter::kResSlope, 20.) << ", " << "None, " - << fitter->second->stdev(MuonResiduals6DOFrphiFitter::kResid, 15.) << ", " << "None, " - << fitter->second->stdev(MuonResiduals6DOFrphiFitter::kResSlope, 10.) << ", " << "None)" << std::endl; - - std::stringstream namesimple_x, namesimple_dxdz, nameweighted_x, nameweighted_dxdz; - namesimple_x << cname << "_simple_x"; - namesimple_dxdz << cname << "_simple_dxdz"; - nameweighted_x << cname << "_weighted_x"; - nameweighted_dxdz << cname << "_weighted_dxdz"; - - fitter->second->plotsimple(namesimple_x.str(), &rootDirectory, MuonResiduals6DOFrphiFitter::kResid, 10.); - fitter->second->plotsimple(namesimple_dxdz.str(), &rootDirectory, MuonResiduals6DOFrphiFitter::kResSlope, 1000.); - - fitter->second->plotweighted(nameweighted_x.str(), &rootDirectory, MuonResiduals6DOFrphiFitter::kResid, MuonResiduals6DOFrphiFitter::kRedChi2, 10.); - fitter->second->plotweighted(nameweighted_dxdz.str(), &rootDirectory, MuonResiduals6DOFrphiFitter::kResSlope, MuonResiduals6DOFrphiFitter::kRedChi2, 1000.); - } - - if (successful_fit) - { - if (align_x) params[paramIndex[0]] = deltax_value; - if (align_y) params[paramIndex[1]] = deltay_value; - if (align_z) params[paramIndex[2]] = deltaz_value; - if (align_phix) params[paramIndex[3]] = deltaphix_value; - if (align_phiy) params[paramIndex[4]] = deltaphiy_value; - if (align_phiz) params[paramIndex[5]] = deltaphiz_value; - } - } // end if 6DOFrphi - - if (successful_fit) - { - std::vector oneortwo; - oneortwo.push_back(*ali); - if (thisali != *ali) oneortwo.push_back(thisali); - m_alignmentParameterStore->setAlignmentPositionError(oneortwo, 0., 0.); - } - else - { - std::cout << "MINUIT fit failed!" << std::endl; - if (writeReport) - { - report << "reports[-1].status = \"MINUITFAIL\"" << std::endl; - } - - for (int i = 0; i < numParams; i++) cov[i][i] = 1000.; - - std::vector oneortwo; - oneortwo.push_back(*ali); - if (thisali != *ali) oneortwo.push_back(thisali); - m_alignmentParameterStore->setAlignmentPositionError(oneortwo, 1000., 0.); - } - } - else - { // too few hits - std::cout << "Too few hits!" << std::endl; - if (writeReport) - { - report << "reports[-1].status = \"TOOFEWHITS\"" << std::endl; - } + if (fitter->second->type() == MuonResidualsFitter::k5DOF) + { + if (!align_x) fitter->second->fix(MuonResiduals5DOFFitter::kAlignX); + if (!align_z) fitter->second->fix(MuonResiduals5DOFFitter::kAlignZ); + if (!align_phix) fitter->second->fix(MuonResiduals5DOFFitter::kAlignPhiX); + if (!align_phiy) fitter->second->fix(MuonResiduals5DOFFitter::kAlignPhiY); + if (!align_phiz) fitter->second->fix(MuonResiduals5DOFFitter::kAlignPhiZ); + } + else if (fitter->second->type() == MuonResidualsFitter::k6DOF) + { + if (!align_x) fitter->second->fix(MuonResiduals6DOFFitter::kAlignX); + if (!align_y) fitter->second->fix(MuonResiduals6DOFFitter::kAlignY); + if (!align_z) fitter->second->fix(MuonResiduals6DOFFitter::kAlignZ); + if (!align_phix) fitter->second->fix(MuonResiduals6DOFFitter::kAlignPhiX); + if (!align_phiy) fitter->second->fix(MuonResiduals6DOFFitter::kAlignPhiY); + if (!align_phiz) fitter->second->fix(MuonResiduals6DOFFitter::kAlignPhiZ); + } + else if (fitter->second->type() == MuonResidualsFitter::k6DOFrphi) + { + if (!align_x) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignX); + if (!align_y) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignY); + if (!align_z) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignZ); + if (!align_phix) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignPhiX); + if (!align_phiy) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignPhiY); + if (!align_phiz) fitter->second->fix(MuonResiduals6DOFrphiFitter::kAlignPhiZ); + } + else assert(false); - for (int i = 0; i < numParams; i++) cov[i][i] = 1000.; + if (m_debug) std::cout << "***** loop over alignables 4" << std::endl; - std::vector oneortwo; - oneortwo.push_back(*ali); - if (thisali != *ali) oneortwo.push_back(thisali); - m_alignmentParameterStore->setAlignmentPositionError(oneortwo, 1000., 0.); - } + AlgebraicVector params(numParams); + AlgebraicSymMatrix cov(numParams); + + if (fitter->second->numsegments() >= m_minAlignmentHits) + { + + if (m_debug) std::cout << "***** loop over alignables 5" << std::endl; + + bool successful_fit = fitter->second->fit(thisali); + + if (m_debug) std::cout << "***** loop over alignables 6 " << fitter->second->type() << std::endl; + + double loglikelihood = fitter->second->loglikelihood(); + double numsegments = fitter->second->numsegments(); + double sumofweights = fitter->second->sumofweights(); + double redchi2 = fitter->second->plot(cname, &rootDirectory, thisali); + + if (fitter->second->type() == MuonResidualsFitter::k5DOF) + { + if (m_debug) std::cout << "***** loop over alignables k5DOF" << std::endl; + + double deltax_value = fitter->second->value(MuonResiduals5DOFFitter::kAlignX); + double deltax_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kAlignX); + double deltax_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kAlignX); + + double deltaz_value = fitter->second->value(MuonResiduals5DOFFitter::kAlignZ); + double deltaz_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kAlignZ); + double deltaz_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kAlignZ); + + double deltaphix_value = fitter->second->value(MuonResiduals5DOFFitter::kAlignPhiX); + double deltaphix_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kAlignPhiX); + double deltaphix_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kAlignPhiX); + + double deltaphiy_value = fitter->second->value(MuonResiduals5DOFFitter::kAlignPhiY); + double deltaphiy_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kAlignPhiY); + double deltaphiy_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kAlignPhiY); + + double deltaphiz_value = fitter->second->value(MuonResiduals5DOFFitter::kAlignPhiZ); + double deltaphiz_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kAlignPhiZ); + double deltaphiz_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kAlignPhiZ); + + double sigmaresid_value = fitter->second->value(MuonResiduals5DOFFitter::kResidSigma); + double sigmaresid_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kResidSigma); + double sigmaresid_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kResidSigma); + + double sigmaresslope_value = fitter->second->value(MuonResiduals5DOFFitter::kResSlopeSigma); + double sigmaresslope_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kResSlopeSigma); + double sigmaresslope_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kResSlopeSigma); + + double gammaresid_value, gammaresid_error, gammaresid_antisym, gammaresslope_value, gammaresslope_error, gammaresslope_antisym; + gammaresid_value = gammaresid_error = gammaresid_antisym = gammaresslope_value = gammaresslope_error = gammaresslope_antisym = 0.; + + if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && + fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && + fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) + { + gammaresid_value = fitter->second->value(MuonResiduals5DOFFitter::kResidGamma); + gammaresid_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kResidGamma); + gammaresid_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kResidGamma); + + gammaresslope_value = fitter->second->value(MuonResiduals5DOFFitter::kResSlopeGamma); + gammaresslope_error = fitter->second->errorerror(MuonResiduals5DOFFitter::kResSlopeGamma); + gammaresslope_antisym = fitter->second->antisym(MuonResiduals5DOFFitter::kResSlopeGamma); + } + + if (writeReport) + { + report << "reports[-1].fittype = \"5DOF\"" << std::endl; + report << "reports[-1].add_parameters(ValErr(" << deltax_value << ", " << deltax_error << ", " << deltax_antisym << "), \\" << std::endl + << " None, \\" << std::endl + << " ValErr(" << deltaz_value << ", " << deltaz_error << ", " << deltaz_antisym << "), \\" << std::endl + << " ValErr(" << deltaphix_value << ", " << deltaphix_error << ", " << deltaphix_antisym << "), \\" << std::endl + << " ValErr(" << deltaphiy_value << ", " << deltaphiy_error << ", " << deltaphiy_antisym << "), \\" << std::endl + << " ValErr(" << deltaphiz_value << ", " << deltaphiz_error << ", " << deltaphiz_antisym << "), \\" << std::endl + << " " << loglikelihood << ", " << numsegments << ", " << sumofweights << ", " << redchi2 << ")" << std::endl; + report << "reports[-1].sigmaresid = ValErr(" << sigmaresid_value << ", " << sigmaresid_error << ", " << sigmaresid_antisym << ")" << std::endl; + report << "reports[-1].sigmaresslope = ValErr(" << sigmaresslope_value << ", " << sigmaresslope_error << ", " << sigmaresslope_antisym << ")" << std::endl; + if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && + fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && + fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) + { + report << "reports[-1].gammaresid = ValErr(" << gammaresid_value << ", " << gammaresid_error << ", " << gammaresid_antisym << ")" << std::endl; + report << "reports[-1].gammaresslope = ValErr(" << gammaresslope_value << ", " << gammaresslope_error << ", " << gammaresslope_antisym << ")" << std::endl; + } + + report << "reports[-1].add_stats(" << fitter->second->median(MuonResiduals5DOFFitter::kResid) << ", " << "None, " + << fitter->second->median(MuonResiduals5DOFFitter::kResSlope) << ", " << "None, " + << fitter->second->mean(MuonResiduals5DOFFitter::kResid, 30.) << ", " << "None, " + << fitter->second->mean(MuonResiduals5DOFFitter::kResSlope, 20.) << ", " << "None, " + << fitter->second->mean(MuonResiduals5DOFFitter::kResid, 15.) << ", " << "None, " + << fitter->second->mean(MuonResiduals5DOFFitter::kResSlope, 10.) << ", " << "None, " + << fitter->second->wmean(MuonResiduals5DOFFitter::kResid, MuonResiduals5DOFFitter::kRedChi2, 30.) << ", " << "None, " + << fitter->second->wmean(MuonResiduals5DOFFitter::kResSlope, MuonResiduals5DOFFitter::kRedChi2, 20.) << ", " << "None, " + << fitter->second->wmean(MuonResiduals5DOFFitter::kResid, MuonResiduals5DOFFitter::kRedChi2, 15.) << ", " << "None, " + << fitter->second->wmean(MuonResiduals5DOFFitter::kResSlope, MuonResiduals5DOFFitter::kRedChi2, 10.) << ", " << "None, " + << fitter->second->stdev(MuonResiduals5DOFFitter::kResid, 30.) << ", " << "None, " + << fitter->second->stdev(MuonResiduals5DOFFitter::kResSlope, 20.) << ", " << "None, " + << fitter->second->stdev(MuonResiduals5DOFFitter::kResid, 15.) << ", " << "None, " + << fitter->second->stdev(MuonResiduals5DOFFitter::kResSlope, 10.) << ", " << "None)" << std::endl; + + std::stringstream namesimple_x, namesimple_dxdz, nameweighted_x, nameweighted_dxdz; + namesimple_x << cname << "_simple_x"; + namesimple_dxdz << cname << "_simple_dxdz"; + nameweighted_x << cname << "_weighted_x"; + nameweighted_dxdz << cname << "_weighted_dxdz"; + + fitter->second->plotsimple(namesimple_x.str(), &rootDirectory, MuonResiduals5DOFFitter::kResid, 10.); + fitter->second->plotsimple(namesimple_dxdz.str(), &rootDirectory, MuonResiduals5DOFFitter::kResSlope, 1000.); + + fitter->second->plotweighted(nameweighted_x.str(), &rootDirectory, MuonResiduals5DOFFitter::kResid, MuonResiduals5DOFFitter::kRedChi2, 10.); + fitter->second->plotweighted(nameweighted_dxdz.str(), &rootDirectory, MuonResiduals5DOFFitter::kResSlope, MuonResiduals5DOFFitter::kRedChi2, 1000.); + } + + if (successful_fit) + { + if (align_x) params[paramIndex[0]] = deltax_value; + if (align_z) params[paramIndex[2]] = deltaz_value; + if (align_phix) params[paramIndex[3]] = deltaphix_value; + if (align_phiy) params[paramIndex[4]] = deltaphiy_value; + if (align_phiz) params[paramIndex[5]] = deltaphiz_value; + } + } // end if 5DOF + + else if (fitter->second->type() == MuonResidualsFitter::k6DOF) + { + if (m_debug) std::cout << "***** loop over alignables k6DOF" << std::endl; + + double deltax_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignX); + double deltax_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignX); + double deltax_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignX); + + double deltay_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignY); + double deltay_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignY); + double deltay_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignY); + + double deltaz_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignZ); + double deltaz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignZ); + double deltaz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignZ); + + double deltaphix_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignPhiX); + double deltaphix_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignPhiX); + double deltaphix_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignPhiX); + + double deltaphiy_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignPhiY); + double deltaphiy_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignPhiY); + double deltaphiy_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignPhiY); + + double deltaphiz_value = fitter->second->value(MuonResiduals6DOFFitter::kAlignPhiZ); + double deltaphiz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kAlignPhiZ); + double deltaphiz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kAlignPhiZ); + + double sigmax_value = fitter->second->value(MuonResiduals6DOFFitter::kResidXSigma); + double sigmax_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResidXSigma); + double sigmax_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResidXSigma); + + double sigmay_value = fitter->second->value(MuonResiduals6DOFFitter::kResidYSigma); + double sigmay_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResidYSigma); + double sigmay_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResidYSigma); + + double sigmadxdz_value = fitter->second->value(MuonResiduals6DOFFitter::kResSlopeXSigma); + double sigmadxdz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResSlopeXSigma); + double sigmadxdz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResSlopeXSigma); + + double sigmadydz_value = fitter->second->value(MuonResiduals6DOFFitter::kResSlopeYSigma); + double sigmadydz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResSlopeYSigma); + double sigmadydz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResSlopeYSigma); + + double gammax_value, gammax_error, gammax_antisym, gammay_value, gammay_error, gammay_antisym, + gammadxdz_value, gammadxdz_error, gammadxdz_antisym, gammadydz_value, gammadydz_error, gammadydz_antisym; + gammax_value = gammax_error = gammax_antisym = gammay_value = gammay_error = gammay_antisym = gammadxdz_value + = gammadxdz_error = gammadxdz_antisym = gammadydz_value = gammadydz_error = gammadydz_antisym = 0.; + if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && + fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && + fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) + { + gammax_value = fitter->second->value(MuonResiduals6DOFFitter::kResidXGamma); + gammax_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResidXGamma); + gammax_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResidXGamma); + + gammay_value = fitter->second->value(MuonResiduals6DOFFitter::kResidYGamma); + gammay_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResidYGamma); + gammay_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResidYGamma); + + gammadxdz_value = fitter->second->value(MuonResiduals6DOFFitter::kResSlopeXGamma); + gammadxdz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResSlopeXGamma); + gammadxdz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResSlopeXGamma); + + gammadydz_value = fitter->second->value(MuonResiduals6DOFFitter::kResSlopeYGamma); + gammadydz_error = fitter->second->errorerror(MuonResiduals6DOFFitter::kResSlopeYGamma); + gammadydz_antisym = fitter->second->antisym(MuonResiduals6DOFFitter::kResSlopeYGamma); + } + + if (writeReport) + { + report << "reports[-1].fittype = \"6DOF\"" << std::endl; + report << "reports[-1].add_parameters(ValErr(" << deltax_value << ", " << deltax_error << ", " << deltax_antisym << "), \\" << std::endl + << " ValErr(" << deltay_value << ", " << deltay_error << ", " << deltay_antisym << "), \\" << std::endl + << " ValErr(" << deltaz_value << ", " << deltaz_error << ", " << deltaz_antisym << "), \\" << std::endl + << " ValErr(" << deltaphix_value << ", " << deltaphix_error << ", " << deltaphix_antisym << "), \\" << std::endl + << " ValErr(" << deltaphiy_value << ", " << deltaphiy_error << ", " << deltaphiy_antisym << "), \\" << std::endl + << " ValErr(" << deltaphiz_value << ", " << deltaphiz_error << ", " << deltaphiz_antisym << "), \\" << std::endl + << " " << loglikelihood << ", " << numsegments << ", " << sumofweights << ", " << redchi2 << ")" << std::endl; + report << "reports[-1].sigmax = ValErr(" << sigmax_value << ", " << sigmax_error << ", " << sigmax_antisym<< ")" << std::endl; + report << "reports[-1].sigmay = ValErr(" << sigmay_value << ", " << sigmay_error << ", " << sigmay_antisym<< ")" << std::endl; + report << "reports[-1].sigmadxdz = ValErr(" << sigmadxdz_value << ", " << sigmadxdz_error << ", "<< sigmadxdz_antisym << ")" << std::endl; + report << "reports[-1].sigmadydz = ValErr(" << sigmadydz_value << ", " << sigmadydz_error << ", "<< sigmadydz_antisym << ")" << std::endl; + if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && + fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && + fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) + { + report << "reports[-1].gammax = ValErr(" << gammax_value << ", " << gammax_error << ", " << gammax_antisym << ")" << std::endl; + report << "reports[-1].gammay = ValErr(" << gammay_value << ", " << gammay_error << ", " << gammay_antisym << ")" << std::endl; + report << "reports[-1].gammadxdz = ValErr(" << gammadxdz_value << ", " << gammadxdz_error << ", " << gammadxdz_antisym << ")" << std::endl; + report << "reports[-1].gammadydz = ValErr(" << gammadydz_value << ", " << gammadydz_error << ", " << gammadydz_antisym << ")" << std::endl; + } + + report << "reports[-1].add_stats(" + << fitter->second->median(MuonResiduals6DOFFitter::kResidX) << ", " + << fitter->second->median(MuonResiduals6DOFFitter::kResidY) << ", " + << fitter->second->median(MuonResiduals6DOFFitter::kResSlopeX) << ", " + << fitter->second->median(MuonResiduals6DOFFitter::kResSlopeY) << ", " + << fitter->second->mean(MuonResiduals6DOFFitter::kResidX, 30.) << ", " + << fitter->second->mean(MuonResiduals6DOFFitter::kResidY, 30.) << ", " + << fitter->second->mean(MuonResiduals6DOFFitter::kResSlopeX, 20.) << ", " + << fitter->second->mean(MuonResiduals6DOFFitter::kResSlopeY, 50.) << ", " + << fitter->second->mean(MuonResiduals6DOFFitter::kResidX, 15.) << ", " + << fitter->second->mean(MuonResiduals6DOFFitter::kResidY, 15.) << ", " + << fitter->second->mean(MuonResiduals6DOFFitter::kResSlopeX, 10.) << ", " + << fitter->second->mean(MuonResiduals6DOFFitter::kResSlopeY, 25.) << ", " + << fitter->second->wmean(MuonResiduals6DOFFitter::kResidX, MuonResiduals6DOFFitter::kRedChi2, 30.) << ", " + << fitter->second->wmean(MuonResiduals6DOFFitter::kResidY, MuonResiduals6DOFFitter::kRedChi2, 30.) << ", " + << fitter->second->wmean(MuonResiduals6DOFFitter::kResSlopeX,MuonResiduals6DOFFitter::kRedChi2, 20.) << ", " + << fitter->second->wmean(MuonResiduals6DOFFitter::kResSlopeY, MuonResiduals6DOFFitter::kRedChi2, 50.) << ", " + << fitter->second->wmean(MuonResiduals6DOFFitter::kResidX, MuonResiduals6DOFFitter::kRedChi2, 15.) << ", " + << fitter->second->wmean(MuonResiduals6DOFFitter::kResidY, MuonResiduals6DOFFitter::kRedChi2, 15.) << ", " + << fitter->second->wmean(MuonResiduals6DOFFitter::kResSlopeX, MuonResiduals6DOFFitter::kRedChi2, 10.) << ", " + << fitter->second->wmean(MuonResiduals6DOFFitter::kResSlopeY, MuonResiduals6DOFFitter::kRedChi2, 25.) << ", " + << fitter->second->stdev(MuonResiduals6DOFFitter::kResidX, 30.) << ", " + << fitter->second->stdev(MuonResiduals6DOFFitter::kResidY, 30.) << ", " + << fitter->second->stdev(MuonResiduals6DOFFitter::kResSlopeX, 20.) << ", " + << fitter->second->stdev(MuonResiduals6DOFFitter::kResSlopeY, 50.) << ", " + << fitter->second->stdev(MuonResiduals6DOFFitter::kResidX, 15.) << ", " + << fitter->second->stdev(MuonResiduals6DOFFitter::kResidY, 15.) << ", " + << fitter->second->stdev(MuonResiduals6DOFFitter::kResSlopeX, 10.) << ", " + << fitter->second->stdev(MuonResiduals6DOFFitter::kResSlopeY, 25.) << ")" << std::endl; + + std::stringstream namesimple_x, namesimple_y, namesimple_dxdz, namesimple_dydz, nameweighted_x, + nameweighted_y, nameweighted_dxdz, nameweighted_dydz; + namesimple_x << cname << "_simple_x"; + namesimple_y << cname << "_simple_y"; + namesimple_dxdz << cname << "_simple_dxdz"; + namesimple_dydz << cname << "_simple_dydz"; + nameweighted_x << cname << "_weighted_x"; + nameweighted_y << cname << "_weighted_y"; + nameweighted_dxdz << cname << "_weighted_dxdz"; + nameweighted_dydz << cname << "_weighted_dydz"; + + fitter->second->plotsimple(namesimple_x.str(), &rootDirectory, MuonResiduals6DOFFitter::kResidX, 10.); + fitter->second->plotsimple(namesimple_y.str(), &rootDirectory, MuonResiduals6DOFFitter::kResidY, 10.); + fitter->second->plotsimple(namesimple_dxdz.str(), &rootDirectory, MuonResiduals6DOFFitter::kResSlopeX, 1000.); + fitter->second->plotsimple(namesimple_dydz.str(), &rootDirectory, MuonResiduals6DOFFitter::kResSlopeY,1000.); + + fitter->second->plotweighted(nameweighted_x.str(), &rootDirectory, MuonResiduals6DOFFitter::kResidX, MuonResiduals6DOFFitter::kRedChi2, 10.); + fitter->second->plotweighted(nameweighted_y.str(), &rootDirectory, MuonResiduals6DOFFitter::kResidY, MuonResiduals6DOFFitter::kRedChi2, 10.); + fitter->second->plotweighted(nameweighted_dxdz.str(), &rootDirectory, MuonResiduals6DOFFitter::kResSlopeX, MuonResiduals6DOFFitter::kRedChi2, 1000.); + fitter->second->plotweighted(nameweighted_dydz.str(), &rootDirectory, MuonResiduals6DOFFitter::kResSlopeY, MuonResiduals6DOFFitter::kRedChi2, 1000.); + } + + if (successful_fit) + { + if (align_x) params[paramIndex[0]] = deltax_value; + if (align_y) params[paramIndex[1]] = deltay_value; + if (align_z) params[paramIndex[2]] = deltaz_value; + if (align_phix) params[paramIndex[3]] = deltaphix_value; + if (align_phiy) params[paramIndex[4]] = deltaphiy_value; + if (align_phiz) params[paramIndex[5]] = deltaphiz_value; + } + } // end if 6DOF + + else if (fitter->second->type() == MuonResidualsFitter::k6DOFrphi) + { + if (m_debug) std::cout << "***** loop over alignables k6DOFrphi" << std::endl; - AlignmentParameters *parnew = (*ali)->alignmentParameters()->cloneFromSelected(params, cov); - (*ali)->setAlignmentParameters(parnew); - m_alignmentParameterStore->applyParameters(*ali); - (*ali)->alignmentParameters()->setValid(true); + double deltax_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignX); + double deltax_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignX); + double deltax_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignX); - std::cout << cname<<" fittime= "<< stop_watch.CpuTime() << " sec" << std::endl; - } // end we have a fitter for this alignable + double deltay_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignY); + double deltay_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignY); + double deltay_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignY); - if (writeReport) report << std::endl; + double deltaz_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignZ); + double deltaz_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignZ); + double deltaz_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignZ); - } // end loop over alignables + double deltaphix_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignPhiX); + double deltaphix_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignPhiX); + double deltaphix_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignPhiX); - if (writeReport) report.close(); + double deltaphiy_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignPhiY); + double deltaphiy_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignPhiY); + double deltaphiy_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignPhiY); + + double deltaphiz_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kAlignPhiZ); + double deltaphiz_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kAlignPhiZ); + double deltaphiz_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kAlignPhiZ); + + double sigmaresid_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kResidSigma); + double sigmaresid_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kResidSigma); + double sigmaresid_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kResidSigma); + + double sigmaresslope_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kResSlopeSigma); + double sigmaresslope_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kResSlopeSigma); + double sigmaresslope_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kResSlopeSigma); + + double gammaresid_value, gammaresid_error, gammaresid_antisym, gammaresslope_value, gammaresslope_error, gammaresslope_antisym; + gammaresid_value = gammaresid_error = gammaresid_antisym = gammaresslope_value = gammaresslope_error = gammaresslope_antisym = 0.; + if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && + fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && + fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) + { + gammaresid_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kResidGamma); + gammaresid_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kResidGamma); + gammaresid_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kResidGamma); + + gammaresslope_value = fitter->second->value(MuonResiduals6DOFrphiFitter::kResSlopeGamma); + gammaresslope_error = fitter->second->errorerror(MuonResiduals6DOFrphiFitter::kResSlopeGamma); + gammaresslope_antisym = fitter->second->antisym(MuonResiduals6DOFrphiFitter::kResSlopeGamma); + } + + if (writeReport) + { + report << "reports[-1].fittype = \"6DOFrphi\"" << std::endl; + report << "reports[-1].add_parameters(ValErr(" << deltax_value << ", " << deltax_error << ", " << deltax_antisym << "), \\" << std::endl + << " ValErr(" << deltay_value << ", " << deltay_error << ", " << deltay_antisym << "), \\" << std::endl + << " ValErr(" << deltaz_value << ", " << deltaz_error << ", " << deltaz_antisym << "), \\" << std::endl + << " ValErr(" << deltaphix_value << ", " << deltaphix_error << ", " << deltaphix_antisym << "), \\" << std::endl + << " ValErr(" << deltaphiy_value << ", " << deltaphiy_error << ", " << deltaphiy_antisym << "), \\" << std::endl + << " ValErr(" << deltaphiz_value << ", " << deltaphiz_error << ", " << deltaphiz_antisym << "), \\" << std::endl + << " " << loglikelihood << ", " << numsegments << ", " << sumofweights << ", " << redchi2 << ")" << std::endl; + report << "reports[-1].sigmaresid = ValErr(" << sigmaresid_value << ", " << sigmaresid_error << ", " << sigmaresid_antisym << ")" << std::endl; + report << "reports[-1].sigmaresslope = ValErr(" << sigmaresslope_value << ", " << sigmaresslope_error << ", " << sigmaresslope_antisym << ")" << std::endl; + if (fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian && + fitter->second->residualsModel() != MuonResidualsFitter::kPureGaussian2D && + fitter->second->residualsModel() != MuonResidualsFitter::kGaussPowerTails) + { + report << "reports[-1].gammaresid = ValErr(" << gammaresid_value << ", " << gammaresid_error << ", " << gammaresid_antisym << ")" << std::endl; + report << "reports[-1].gammaresslope = ValErr(" << gammaresslope_value << ", " << gammaresslope_error << ", " << gammaresslope_antisym << ")" << std::endl; + } + + report << "reports[-1].add_stats(" << fitter->second->median(MuonResiduals6DOFrphiFitter::kResid) << ", " << "None, " + << fitter->second->median(MuonResiduals6DOFrphiFitter::kResSlope) << ", " << "None, " + << fitter->second->mean(MuonResiduals6DOFrphiFitter::kResid, 30.) << ", " << "None, " + << fitter->second->mean(MuonResiduals6DOFrphiFitter::kResSlope, 20.) << ", " << "None, " + << fitter->second->mean(MuonResiduals6DOFrphiFitter::kResid, 15.) << ", " << "None, " + << fitter->second->mean(MuonResiduals6DOFrphiFitter::kResSlope, 10.) << ", " << "None, " + << fitter->second->wmean(MuonResiduals6DOFrphiFitter::kResid, MuonResiduals6DOFrphiFitter::kRedChi2, 30.) << ", " << "None, " + << fitter->second->wmean(MuonResiduals6DOFrphiFitter::kResSlope, MuonResiduals6DOFrphiFitter::kRedChi2, 20.) << ", " << "None, " + << fitter->second->wmean(MuonResiduals6DOFrphiFitter::kResid, MuonResiduals6DOFrphiFitter::kRedChi2, 15.) << ", " << "None, " + << fitter->second->wmean(MuonResiduals6DOFrphiFitter::kResSlope, MuonResiduals6DOFrphiFitter::kRedChi2, 10.) << ", " << "None, " + << fitter->second->stdev(MuonResiduals6DOFrphiFitter::kResid, 30.) << ", " << "None, " + << fitter->second->stdev(MuonResiduals6DOFrphiFitter::kResSlope, 20.) << ", " << "None, " + << fitter->second->stdev(MuonResiduals6DOFrphiFitter::kResid, 15.) << ", " << "None, " + << fitter->second->stdev(MuonResiduals6DOFrphiFitter::kResSlope, 10.) << ", " << "None)" << std::endl; + + std::stringstream namesimple_x, namesimple_dxdz, nameweighted_x, nameweighted_dxdz; + namesimple_x << cname << "_simple_x"; + namesimple_dxdz << cname << "_simple_dxdz"; + nameweighted_x << cname << "_weighted_x"; + nameweighted_dxdz << cname << "_weighted_dxdz"; + + fitter->second->plotsimple(namesimple_x.str(), &rootDirectory, MuonResiduals6DOFrphiFitter::kResid, 10.); + fitter->second->plotsimple(namesimple_dxdz.str(), &rootDirectory, MuonResiduals6DOFrphiFitter::kResSlope, 1000.); + + fitter->second->plotweighted(nameweighted_x.str(), &rootDirectory, MuonResiduals6DOFrphiFitter::kResid, MuonResiduals6DOFrphiFitter::kRedChi2, 10.); + fitter->second->plotweighted(nameweighted_dxdz.str(), &rootDirectory, MuonResiduals6DOFrphiFitter::kResSlope, MuonResiduals6DOFrphiFitter::kRedChi2, 1000.); + } + + if (successful_fit) + { + if (align_x) params[paramIndex[0]] = deltax_value; + if (align_y) params[paramIndex[1]] = deltay_value; + if (align_z) params[paramIndex[2]] = deltaz_value; + if (align_phix) params[paramIndex[3]] = deltaphix_value; + if (align_phiy) params[paramIndex[4]] = deltaphiy_value; + if (align_phiz) params[paramIndex[5]] = deltaphiz_value; + } + } // end if 6DOFrphi + + if (successful_fit) + { + std::vector oneortwo; + oneortwo.push_back(*ali); + if (thisali != *ali) oneortwo.push_back(thisali); + m_alignmentParameterStore->setAlignmentPositionError(oneortwo, 0., 0.); + } + else + { + if (m_debug) std::cout << "MINUIT fit failed!" << std::endl; + if (writeReport) + { + report << "reports[-1].status = \"MINUITFAIL\"" << std::endl; + } + + for (int i = 0; i < numParams; i++) cov[i][i] = 1000.; + + std::vector oneortwo; + oneortwo.push_back(*ali); + if (thisali != *ali) oneortwo.push_back(thisali); + m_alignmentParameterStore->setAlignmentPositionError(oneortwo, 1000., 0.); + } + } + else + { // too few hits + if (m_debug) std::cout << "Too few hits!" << std::endl; + if (writeReport) + { + report << "reports[-1].status = \"TOOFEWHITS\"" << std::endl; + } + + for (int i = 0; i < numParams; i++) cov[i][i] = 1000.; + + std::vector oneortwo; + oneortwo.push_back(*ali); + if (thisali != *ali) oneortwo.push_back(thisali); + m_alignmentParameterStore->setAlignmentPositionError(oneortwo, 1000., 0.); + } + + AlignmentParameters *parnew = (*ali)->alignmentParameters()->cloneFromSelected(params, cov); + (*ali)->setAlignmentParameters(parnew); + m_alignmentParameterStore->applyParameters(*ali); + (*ali)->alignmentParameters()->setValid(true); + + if (m_debug) std::cout << cname<<" fittime= "<< stop_watch.CpuTime() << " sec" << std::endl; + } // end we have a fitter for this alignable + + if (writeReport) report << std::endl; + + } // end loop over alignables + + if (writeReport) report.close(); } void MuonAlignmentFromReference::readTmpFiles() { - for (std::vector::const_iterator fileName = m_readTemporaryFiles.begin(); fileName != m_readTemporaryFiles.end(); ++fileName) - { - FILE *file; - int size; - file = fopen(fileName->c_str(), "r"); - if (file == NULL) - throw cms::Exception("MuonAlignmentFromReference") << "file \"" << *fileName << " can't be opened (doesn't exist?)" << std::endl; + for (std::vector::const_iterator fileName = m_readTemporaryFiles.begin(); fileName != m_readTemporaryFiles.end(); ++fileName) + { + FILE *file; + int size; + file = fopen( (*fileName).c_str(), "r"); + if (file == NULL) + throw cms::Exception("MuonAlignmentFromReference") << "file \"" << *fileName << "\" can't be opened (doesn't exist?)" << std::endl; + + fread(&size, sizeof(int), 1, file); + if (int(m_indexes.size()) != size) + throw cms::Exception("MuonAlignmentFromReference") << "file \"" << *fileName << "\" has " << size + << " fitters, but this job has " << m_indexes.size() << " fitters (probably corresponds to the wrong alignment job)" << std::endl; + + int i = 0; + for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index, ++i) + { + MuonResidualsTwoBin *fitter = m_fitterOrder[*index]; + unsigned int index_toread; + fread(&index_toread, sizeof(unsigned int), 1, file); + if (*index != index_toread) + throw cms::Exception("MuonAlignmentFromReference") << "file \"" << *fileName << "\" has index " << index_toread + << " at position " << i << ", but this job is expecting " << *index << " (probably corresponds to the wrong alignment job)" << std::endl; + fitter->read(file, i); + } + + fclose(file); + } +} + - fread(&size, sizeof(int), 1, file); - if (int(m_indexes.size()) != size) - throw cms::Exception("MuonAlignmentFromReference") << "file \"" << *fileName << "\" has " << size - << " fitters, but this job has " << m_indexes.size() << " fitters (probably corresponds to the wrong alignment job)" << std::endl; +void MuonAlignmentFromReference::writeTmpFiles() +{ + FILE *file; + file = fopen(m_writeTemporaryFile.c_str(), "w"); + int size = m_indexes.size(); + fwrite(&size, sizeof(int), 1, file); int i = 0; for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index, ++i) { - MuonResidualsTwoBin *fitter = m_fitterOrder[*index]; - unsigned int index_toread; - fread(&index_toread, sizeof(unsigned int), 1, file); - if (*index != index_toread) - throw cms::Exception("MuonAlignmentFromReference") << "file \"" << *fileName << "\" has index " << index_toread - << " at position " << i << ", but this job is expecting " << *index << " (probably corresponds to the wrong alignment job)" << std::endl; - fitter->read(file, i); + MuonResidualsTwoBin *fitter = m_fitterOrder[*index]; + unsigned int index_towrite = *index; + fwrite(&index_towrite, sizeof(unsigned int), 1, file); + fitter->write(file, i); } fclose(file); - } } - -void MuonAlignmentFromReference::writeTmpFiles() +void MuonAlignmentFromReference::correctBField() { - FILE *file; - file = fopen(m_writeTemporaryFile.c_str(), "w"); - int size = m_indexes.size(); - fwrite(&size, sizeof(int), 1, file); - - int i = 0; - for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index, ++i) - { - MuonResidualsTwoBin *fitter = m_fitterOrder[*index]; - unsigned int index_towrite = *index; - fwrite(&index_towrite, sizeof(unsigned int), 1, file); - fitter->write(file, i); - } - - fclose(file); + bool m_debug = false; + + for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index) + { + if (m_debug) std::cout<<"correcting B in "<correctBField(); + } } -void MuonAlignmentFromReference::correctBField() +void MuonAlignmentFromReference::fiducialCuts() { - for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index) - { - std::cout<<"correcting B in "<correctBField(); - } + for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index) + { + if (m_debug) std::cout<<"applying fiducial cuts in "<fiducialCuts(); + } } - void MuonAlignmentFromReference::eraseNotSelectedResiduals() { - for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index) - { - std::cout<<"erasing in "<eraseNotSelectedResiduals(); - } + for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index) + { + if (m_debug) std::cout<<"erasing in "<eraseNotSelectedResiduals(); + } } void MuonAlignmentFromReference::selectResidualsPeaks() { - // should not be called with negative peakNSigma - assert(m_peakNSigma>0.); - - for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index) - { - MuonResidualsTwoBin *fitter = m_fitterOrder[*index]; - - int nvar = 2; - int vars_index[10] = {0,1}; - if (fitter->type() == MuonResidualsFitter::k5DOF) - { - if (fitter->useRes() == MuonResidualsFitter::k1111 || fitter->useRes() == MuonResidualsFitter::k1110 || fitter->useRes() == MuonResidualsFitter::k1010) { - nvar = 2; - vars_index[0] = MuonResiduals5DOFFitter::kResid; - vars_index[1] = MuonResiduals5DOFFitter::kResSlope; - } - else if (fitter->useRes() == MuonResidualsFitter::k1100) { - nvar = 1; - vars_index[0] = MuonResiduals5DOFFitter::kResid; - } - else if (fitter->useRes() == MuonResidualsFitter::k0010) { - nvar = 1; - vars_index[0] = MuonResiduals5DOFFitter::kResSlope; - } - } - else if (fitter->type() == MuonResidualsFitter::k6DOF) - { - if (fitter->useRes() == MuonResidualsFitter::k1111) { - nvar = 4; - vars_index[0] = MuonResiduals6DOFFitter::kResidX; - vars_index[1] = MuonResiduals6DOFFitter::kResidY; - vars_index[2] = MuonResiduals6DOFFitter::kResSlopeX; - vars_index[3] = MuonResiduals6DOFFitter::kResSlopeY; - } - else if (fitter->useRes() == MuonResidualsFitter::k1110) { - nvar = 3; - vars_index[0] = MuonResiduals6DOFFitter::kResidX; - vars_index[1] = MuonResiduals6DOFFitter::kResidY; - vars_index[2] = MuonResiduals6DOFFitter::kResSlopeX; - } - else if (fitter->useRes() == MuonResidualsFitter::k1010) { - nvar = 2; - vars_index[0] = MuonResiduals6DOFFitter::kResidX; - vars_index[2] = MuonResiduals6DOFFitter::kResSlopeX; - } - else if (fitter->useRes() == MuonResidualsFitter::k1100) { - nvar = 2; - vars_index[0] = MuonResiduals6DOFFitter::kResidX; - vars_index[1] = MuonResiduals6DOFFitter::kResidY; - } - else if (fitter->useRes() == MuonResidualsFitter::k0010) { - nvar = 1; - vars_index[0] = MuonResiduals6DOFFitter::kResSlopeX; - } - } - else if (fitter->type() == MuonResidualsFitter::k6DOFrphi) + // should not be called with negative peakNSigma + assert(m_peakNSigma>0.); + + for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index) { - if (fitter->useRes() == MuonResidualsFitter::k1111 || fitter->useRes() == MuonResidualsFitter::k1110 || fitter->useRes() == MuonResidualsFitter::k1010) { - nvar = 2; - vars_index[0] = MuonResiduals6DOFrphiFitter::kResid; - vars_index[1] = MuonResiduals6DOFrphiFitter::kResSlope; - } - else if (fitter->useRes() == MuonResidualsFitter::k1100) { - nvar = 1; - vars_index[0] = MuonResiduals6DOFrphiFitter::kResid; - } - else if (fitter->useRes() == MuonResidualsFitter::k0010) { - nvar = 1; - vars_index[0] = MuonResiduals6DOFrphiFitter::kResSlope; - } - } - else assert(false); + MuonResidualsTwoBin *fitter = m_fitterOrder[*index]; - std::cout<<"selecting in "<selectPeakResiduals(m_peakNSigma, nvar, vars_index); - } + int nvar = 2; + int vars_index[10] = {0,1}; + if (fitter->type() == MuonResidualsFitter::k5DOF) + { + if (fitter->useRes() == MuonResidualsFitter::k1111 || fitter->useRes() == MuonResidualsFitter::k1110 || fitter->useRes() == MuonResidualsFitter::k1010) { + nvar = 2; + vars_index[0] = MuonResiduals5DOFFitter::kResid; + vars_index[1] = MuonResiduals5DOFFitter::kResSlope; + } + else if (fitter->useRes() == MuonResidualsFitter::k1100) { + nvar = 1; + vars_index[0] = MuonResiduals5DOFFitter::kResid; + } + else if (fitter->useRes() == MuonResidualsFitter::k0010) { + nvar = 1; + vars_index[0] = MuonResiduals5DOFFitter::kResSlope; + } + } + else if (fitter->type() == MuonResidualsFitter::k6DOF) + { + if (fitter->useRes() == MuonResidualsFitter::k1111) { + nvar = 4; + vars_index[0] = MuonResiduals6DOFFitter::kResidX; + vars_index[1] = MuonResiduals6DOFFitter::kResidY; + vars_index[2] = MuonResiduals6DOFFitter::kResSlopeX; + vars_index[3] = MuonResiduals6DOFFitter::kResSlopeY; + } + else if (fitter->useRes() == MuonResidualsFitter::k1110) { + nvar = 3; + vars_index[0] = MuonResiduals6DOFFitter::kResidX; + vars_index[1] = MuonResiduals6DOFFitter::kResidY; + vars_index[2] = MuonResiduals6DOFFitter::kResSlopeX; + } + else if (fitter->useRes() == MuonResidualsFitter::k1010) { + nvar = 2; + vars_index[0] = MuonResiduals6DOFFitter::kResidX; + vars_index[2] = MuonResiduals6DOFFitter::kResSlopeX; + } + else if (fitter->useRes() == MuonResidualsFitter::k1100) { + nvar = 2; + vars_index[0] = MuonResiduals6DOFFitter::kResidX; + vars_index[1] = MuonResiduals6DOFFitter::kResidY; + } + else if (fitter->useRes() == MuonResidualsFitter::k0010) { + nvar = 1; + vars_index[0] = MuonResiduals6DOFFitter::kResSlopeX; + } + } + else if (fitter->type() == MuonResidualsFitter::k6DOFrphi) + { + if (fitter->useRes() == MuonResidualsFitter::k1111 || fitter->useRes() == MuonResidualsFitter::k1110 || fitter->useRes() == MuonResidualsFitter::k1010) { + nvar = 2; + vars_index[0] = MuonResiduals6DOFrphiFitter::kResid; + vars_index[1] = MuonResiduals6DOFrphiFitter::kResSlope; + } + else if (fitter->useRes() == MuonResidualsFitter::k1100) { + nvar = 1; + vars_index[0] = MuonResiduals6DOFrphiFitter::kResid; + } + else if (fitter->useRes() == MuonResidualsFitter::k0010) { + nvar = 1; + vars_index[0] = MuonResiduals6DOFrphiFitter::kResSlope; + } + } + else assert(false); + + if (m_debug) std::cout<<"selecting in "<selectPeakResiduals(m_peakNSigma, nvar, vars_index); + } } std::string MuonAlignmentFromReference::chamberPrettyNameFromId(unsigned int idx) { - DetId id(idx); - char cname[40]; - if (id.subdetId() == MuonSubdetId::DT) - { - DTChamberId chamberId(id.rawId()); - sprintf(cname, "MB%+d/%d/%02d", chamberId.wheel(), chamberId.station(), chamberId.sector()); - } - else if (id.subdetId() == MuonSubdetId::CSC) - { - CSCDetId chamberId(id.rawId()); - sprintf(cname, "ME%s%d/%d/%02d", (chamberId.endcap() == 1 ? "+" : "-"), chamberId.station(), chamberId.ring(), chamberId.chamber()); - } - return std::string(cname); + DetId id(idx); + char cname[40]; + if (id.subdetId() == MuonSubdetId::DT) + { + DTChamberId chamberId(id.rawId()); + sprintf(cname, "MB%+d/%d/%02d", chamberId.wheel(), chamberId.station(), chamberId.sector()); + } + else if (id.subdetId() == MuonSubdetId::CSC) + { + CSCDetId chamberId(id.rawId()); + sprintf(cname, "ME%s%d/%d/%02d", (chamberId.endcap() == 1 ? "+" : "-"), chamberId.station(), chamberId.ring(), chamberId.chamber()); + } + return std::string(cname); } void MuonAlignmentFromReference::fillNtuple() { - // WARNING: does not support two bin option!!! - - for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index) - { - DetId detid(*index); - if (detid.det() != DetId::Muon || !( detid.subdetId() == MuonSubdetId::DT || detid.subdetId() == MuonSubdetId::CSC) ) assert(false); + // WARNING: does not support two bin option!!! - if(detid.subdetId() == MuonSubdetId::DT) + for (std::vector::const_iterator index = m_indexes.begin(); index != m_indexes.end(); ++index) { - m_tree_row.is_dt = (Bool_t) true; - DTChamberId id(*index); - m_tree_row.is_plus = (Bool_t) true; - m_tree_row.station = (UChar_t) id.station(); - m_tree_row.ring_wheel = (Char_t) id.wheel(); - m_tree_row.sector = (UChar_t) id.sector(); - } - else - { - m_tree_row.is_dt = (Bool_t) false; - CSCDetId id(*index); - m_tree_row.is_plus = (Bool_t) (id.endcap() == 1); - m_tree_row.station = (UChar_t) id.station(); - m_tree_row.ring_wheel = (Char_t) id.ring(); - m_tree_row.sector = (UChar_t) id.chamber(); + DetId detid(*index); + if (detid.det() != DetId::Muon || !( detid.subdetId() == MuonSubdetId::DT || detid.subdetId() == MuonSubdetId::CSC) ) assert(false); + + if(detid.subdetId() == MuonSubdetId::DT) + { + m_tree_row.is_dt = (Bool_t) true; + DTChamberId id(*index); + m_tree_row.is_plus = (Bool_t) true; + m_tree_row.station = (UChar_t) id.station(); + m_tree_row.ring_wheel = (Char_t) id.wheel(); + m_tree_row.sector = (UChar_t) id.sector(); + } + else + { + m_tree_row.is_dt = (Bool_t) false; + CSCDetId id(*index); + m_tree_row.is_plus = (Bool_t) (id.endcap() == 1); + m_tree_row.station = (UChar_t) id.station(); + m_tree_row.ring_wheel = (Char_t) id.ring(); + m_tree_row.sector = (UChar_t) id.chamber(); + } + + MuonResidualsTwoBin *fitter = m_fitterOrder[*index]; + + std::vector::const_iterator residual = fitter->residualsPos_begin(); + std::vector::const_iterator residual_ok = fitter->residualsPos_ok_begin(); + for (; residual != fitter->residualsPos_end(); ++residual, ++residual_ok) + { + if (fitter->type() == MuonResidualsFitter::k5DOF || fitter->type() == MuonResidualsFitter::k6DOFrphi) + { + m_tree_row.res_x = (Float_t) (*residual)[MuonResiduals5DOFFitter::kResid]; + m_tree_row.res_y = (Float_t) 0.; + m_tree_row.res_slope_x = (Float_t) (*residual)[MuonResiduals5DOFFitter::kResSlope]; + m_tree_row.res_slope_y = (Float_t) 0.; + m_tree_row.pos_x = (Float_t) (*residual)[MuonResiduals5DOFFitter::kPositionX]; + m_tree_row.pos_y = (Float_t) (*residual)[MuonResiduals5DOFFitter::kPositionY]; + m_tree_row.angle_x = (Float_t) (*residual)[MuonResiduals5DOFFitter::kAngleX]; + m_tree_row.angle_y = (Float_t) (*residual)[MuonResiduals5DOFFitter::kAngleY]; + m_tree_row.pz = (Float_t) (*residual)[MuonResiduals5DOFFitter::kPz]; + m_tree_row.pt = (Float_t) (*residual)[MuonResiduals5DOFFitter::kPt]; + m_tree_row.q = (Char_t) (*residual)[MuonResiduals5DOFFitter::kCharge]; + m_tree_row.select = (Bool_t) *residual_ok; + } + else if (fitter->type() == MuonResidualsFitter::k6DOF) + { + m_tree_row.res_x = (Float_t) (*residual)[MuonResiduals6DOFFitter::kResidX]; + m_tree_row.res_y = (Float_t) (*residual)[MuonResiduals6DOFFitter::kResidY]; + m_tree_row.res_slope_x = (Float_t) (*residual)[MuonResiduals6DOFFitter::kResSlopeX]; + m_tree_row.res_slope_y = (Float_t) (*residual)[MuonResiduals6DOFFitter::kResSlopeY]; + m_tree_row.pos_x = (Float_t) (*residual)[MuonResiduals6DOFFitter::kPositionX]; + m_tree_row.pos_y = (Float_t) (*residual)[MuonResiduals6DOFFitter::kPositionY]; + m_tree_row.angle_x = (Float_t) (*residual)[MuonResiduals6DOFFitter::kAngleX]; + m_tree_row.angle_y = (Float_t) (*residual)[MuonResiduals6DOFFitter::kAngleY]; + m_tree_row.pz = (Float_t) (*residual)[MuonResiduals6DOFFitter::kPz]; + m_tree_row.pt = (Float_t) (*residual)[MuonResiduals6DOFFitter::kPt]; + m_tree_row.q = (Char_t) (*residual)[MuonResiduals6DOFFitter::kCharge]; + m_tree_row.select = (Bool_t) *residual_ok; + } + else assert(false); + + m_ttree->Fill(); + } } +} - MuonResidualsTwoBin *fitter = m_fitterOrder[*index]; +void MuonAlignmentFromReference::parseReference( + std::vector &reference, + std::vector &all_DT_chambers, + std::vector &all_CSC_chambers) +{ + std::map already_seen; - std::vector::const_iterator residual = fitter->residualsPos_begin(); - std::vector::const_iterator residual_ok = fitter->residualsPos_ok_begin(); - for (; residual != fitter->residualsPos_end(); ++residual, ++residual_ok) + for (std::vector::const_iterator name = m_reference.begin(); name != m_reference.end(); ++name) { - if (fitter->type() == MuonResidualsFitter::k5DOF || fitter->type() == MuonResidualsFitter::k6DOFrphi) - { - m_tree_row.res_x = (Float_t) (*residual)[MuonResiduals5DOFFitter::kResid]; - m_tree_row.res_y = (Float_t) 0.; - m_tree_row.res_slope_x = (Float_t) (*residual)[MuonResiduals5DOFFitter::kResSlope]; - m_tree_row.res_slope_y = (Float_t) 0.; - m_tree_row.pos_x = (Float_t) (*residual)[MuonResiduals5DOFFitter::kPositionX]; - m_tree_row.pos_y = (Float_t) (*residual)[MuonResiduals5DOFFitter::kPositionY]; - m_tree_row.angle_x = (Float_t) (*residual)[MuonResiduals5DOFFitter::kAngleX]; - m_tree_row.angle_y = (Float_t) (*residual)[MuonResiduals5DOFFitter::kAngleY]; - m_tree_row.pz = (Float_t) (*residual)[MuonResiduals5DOFFitter::kPz]; - m_tree_row.pt = (Float_t) (*residual)[MuonResiduals5DOFFitter::kPt]; - m_tree_row.q = (Char_t) (*residual)[MuonResiduals5DOFFitter::kCharge]; - m_tree_row.select = (Bool_t) *residual_ok; - } - else if (fitter->type() == MuonResidualsFitter::k6DOF) - { - m_tree_row.res_x = (Float_t) (*residual)[MuonResiduals6DOFFitter::kResidX]; - m_tree_row.res_y = (Float_t) (*residual)[MuonResiduals6DOFFitter::kResidY]; - m_tree_row.res_slope_x = (Float_t) (*residual)[MuonResiduals6DOFFitter::kResSlopeX]; - m_tree_row.res_slope_y = (Float_t) (*residual)[MuonResiduals6DOFFitter::kResSlopeY]; - m_tree_row.pos_x = (Float_t) (*residual)[MuonResiduals6DOFFitter::kPositionX]; - m_tree_row.pos_y = (Float_t) (*residual)[MuonResiduals6DOFFitter::kPositionY]; - m_tree_row.angle_x = (Float_t) (*residual)[MuonResiduals6DOFFitter::kAngleX]; - m_tree_row.angle_y = (Float_t) (*residual)[MuonResiduals6DOFFitter::kAngleY]; - m_tree_row.pz = (Float_t) (*residual)[MuonResiduals6DOFFitter::kPz]; - m_tree_row.pt = (Float_t) (*residual)[MuonResiduals6DOFFitter::kPt]; - m_tree_row.q = (Char_t) (*residual)[MuonResiduals6DOFFitter::kCharge]; - m_tree_row.select = (Bool_t) *residual_ok; - } - else assert(false); - - m_ttree->Fill(); + bool parsing_error = false; + + bool barrel = (name->substr(0, 2) == std::string("MB")); + bool endcap = (name->substr(0, 2) == std::string("ME")); + if (!barrel && !endcap) parsing_error = true; + + if (!parsing_error && barrel) + { + int index = 2; + if (name->substr(index, 1) == std::string(" ")) index++; + + bool plus = true; + if (name->substr(index, 1) == std::string("+")) + { + plus = true; + index++; + } + else if (name->substr(index, 1) == std::string("-")) + { + plus = false; + index++; + } + else if (numeric(name->substr(index, 1))) {} + else parsing_error = true; + + int wheel = 0; + bool wheel_digit = false; + while (!parsing_error && numeric(name->substr(index, 1))) + { + wheel *= 10; + wheel += number(name->substr(index, 1)); + wheel_digit = true; + index++; + } + if (!plus) wheel *= -1; + if (!wheel_digit) parsing_error = true; + + if (name->substr(index, 1) != std::string(" ")) parsing_error = true; + index++; + + int station = 0; + bool station_digit = false; + while (!parsing_error && numeric(name->substr(index, 1))) + { + station *= 10; + station += number(name->substr(index, 1)); + station_digit = true; + index++; + } + if (!station_digit) parsing_error = true; + + if (name->substr(index, 1) != std::string(" ")) parsing_error = true; + index++; + + int sector = 0; + bool sector_digit = false; + while (!parsing_error && numeric(name->substr(index, 1))) + { + sector *= 10; + sector += number(name->substr(index, 1)); + sector_digit = true; + index++; + } + if (!sector_digit) parsing_error = true; + + if (!parsing_error) + { + bool no_such_chamber = false; + + if (wheel < -2 || wheel > 2) no_such_chamber = true; + if (station < 1 || station > 4) no_such_chamber = true; + if (station == 4 && (sector < 1 || sector > 14)) no_such_chamber = true; + if (station < 4 && (sector < 1 || sector > 12)) no_such_chamber = true; + + if (no_such_chamber) + throw cms::Exception("MuonAlignmentFromReference") << "reference chamber doesn't exist: " << (*name) << std::endl; + + DTChamberId id(wheel, station, sector); + for (std::vector::const_iterator ali = all_DT_chambers.begin(); ali != all_DT_chambers.end(); ++ali) + { + if ((*ali)->geomDetId().rawId() == id.rawId()) + { + std::map::const_iterator trial = already_seen.find(*ali); + if (trial == already_seen.end()) + { + reference.push_back(*ali); + already_seen[*ali] = true; + } + } + } + } // if (!parsing_error) + } + + if (!parsing_error && endcap) + { + int index = 2; + if (name->substr(index, 1) == std::string(" ")) index++; + + bool plus = true; + if (name->substr(index, 1) == std::string("+")) + { + plus = true; + index++; + } + else if (name->substr(index, 1) == std::string("-")) + { + plus = false; + index++; + } + else if (numeric(name->substr(index, 1))) {} + else parsing_error = true; + + int station = 0; + bool station_digit = false; + while (!parsing_error && numeric(name->substr(index, 1))) + { + station *= 10; + station += number(name->substr(index, 1)); + station_digit = true; + index++; + } + if (!plus) station *= -1; + if (!station_digit) parsing_error = true; + + if (name->substr(index, 1) != std::string("/")) parsing_error = true; + index++; + + int ring = 0; + bool ring_digit = false; + while (!parsing_error && numeric(name->substr(index, 1))) + { + ring *= 10; + ring += number(name->substr(index, 1)); + ring_digit = true; + index++; + } + if (!ring_digit) parsing_error = true; + + if (name->substr(index, 1) != std::string(" ")) parsing_error = true; + index++; + + int chamber = 0; + bool chamber_digit = false; + while (!parsing_error && numeric(name->substr(index, 1))) + { + chamber *= 10; + chamber += number(name->substr(index, 1)); + chamber_digit = true; + index++; + } + if (!chamber_digit) parsing_error = true; + + if (!parsing_error) + { + bool no_such_chamber = false; + + int endcap = (station > 0 ? 1 : 2); + station = abs(station); + if (station < 1 || station > 4) no_such_chamber = true; + if (station == 1 && (ring < 1 || ring > 4)) no_such_chamber = true; + if (station > 1 && (ring < 1 || ring > 2)) no_such_chamber = true; + if (station == 1 && (chamber < 1 || chamber > 36)) no_such_chamber = true; + if (station > 1 && ring == 1 && (chamber < 1 || chamber > 18)) no_such_chamber = true; + if (station > 1 && ring == 2 && (chamber < 1 || chamber > 36)) no_such_chamber = true; + + if (no_such_chamber) + throw cms::Exception("MuonAlignmentFromReference") << "reference chamber doesn't exist: " << (*name) << std::endl; + + CSCDetId id(endcap, station, ring, chamber); + for (std::vector::const_iterator ali = all_CSC_chambers.begin(); ali != all_CSC_chambers.end(); ++ali) + { + if ((*ali)->geomDetId().rawId() == id.rawId()) + { + std::map::const_iterator trial = already_seen.find(*ali); + if (trial == already_seen.end()) + { + reference.push_back(*ali); + already_seen[*ali] = true; + } + } + } + } // if (!parsing_error) + }// endcap + + if (parsing_error) + throw cms::Exception("MuonAlignmentFromReference") << "reference chamber name is malformed: " << (*name) << std::endl; } - } } diff --git a/Alignment/MuonAlignmentAlgorithms/python/MuonAlignmentFromReference_cff.py b/Alignment/MuonAlignmentAlgorithms/python/MuonAlignmentFromReference_cff.py index b5ad1234ff9ff..daf91ddb2569d 100644 --- a/Alignment/MuonAlignmentAlgorithms/python/MuonAlignmentFromReference_cff.py +++ b/Alignment/MuonAlignmentAlgorithms/python/MuonAlignmentFromReference_cff.py @@ -3,11 +3,11 @@ ### General track re-fitting includes ### (don't load dtGeometry_cfi or cscGeometry_cfi because it's provided by AlignmentProducer) from Configuration.StandardSequences.Services_cff import * -from Configuration.StandardSequences.GeometryExtended_cff import * -from Configuration.StandardSequences.MagneticField_cff import * +#from Configuration.StandardSequences.GeometryExtended_cff import * +#from Configuration.StandardSequences.MagneticField_cff import * from RecoTracker.Configuration.RecoTracker_cff import * -del DTGeometryESModule -del CSCGeometryESModule +#del DTGeometryESModule +#del CSCGeometryESModule ### Track refitter for global collisions muons from TrackingTools.TrackRefitter.globalMuonTrajectories_cff import * @@ -17,9 +17,9 @@ ### Track refitter for global cosmic muons from TrackingTools.TrackRefitter.globalCosmicMuonTrajectories_cff import * -MuonAlignmentFromReferenceGlobalCosmicRefit = globalCosmicMuons.clone() -MuonAlignmentFromReferenceGlobalCosmicRefit.Tracks = cms.InputTag("ALCARECOMuAlGlobalCosmics:GlobalMuon") -MuonAlignmentFromReferenceGlobalCosmicRefit.TrackTransformer.RefitRPCHits = cms.bool(False) +#MuonAlignmentFromReferenceGlobalCosmicRefit = globalCosmicMuons.clone() +#MuonAlignmentFromReferenceGlobalCosmicRefit.Tracks = cms.InputTag("ALCARECOMuAlGlobalCosmics:GlobalMuon") +#MuonAlignmentFromReferenceGlobalCosmicRefit.TrackTransformer.RefitRPCHits = cms.bool(False) ### for Tracker muon re-reco from RecoMuon.Configuration.RecoMuon_cff import * @@ -35,6 +35,8 @@ looper.tjTkAssociationMapTag = cms.InputTag("MuonAlignmentFromReferenceGlobalMuonRefit:Refitted") looper.doTracker = cms.untracked.bool(False) looper.doMuon = cms.untracked.bool(True) +looper.checkDbAlignmentValidity = cms.untracked.bool(False) +looper.useExtras = cms.untracked.bool(False) looper.ParameterBuilder.Selector = cms.PSet( alignParams = cms.vstring("MuonDTChambers,111111,stations123", "MuonDTChambers,100011,station4", "MuonCSCChambers,100011"), stations123 = cms.PSet(rRanges = cms.vdouble(0., 660.), diff --git a/Alignment/MuonAlignmentAlgorithms/python/align_cfg.py b/Alignment/MuonAlignmentAlgorithms/python/align_cfg.py index 16e225d5ccbb8..08fc02e40679e 100644 --- a/Alignment/MuonAlignmentAlgorithms/python/align_cfg.py +++ b/Alignment/MuonAlignmentAlgorithms/python/align_cfg.py @@ -59,6 +59,18 @@ process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1)) +process.load("Configuration.StandardSequences.Reconstruction_cff") + +process.MuonNumberingInitialization = cms.ESProducer("MuonNumberingInitialization") +process.MuonNumberingRecord = cms.ESSource( "EmptyESSource", + recordName = cms.string( "MuonNumberingRecord" ), + iovIsRunNotTime = cms.bool( True ), + firstValid = cms.vuint32( 1 ) +) + +process.load("Configuration.StandardSequences.GeometryIdeal_cff") +process.load("Configuration.StandardSequences.MagneticField_cff") + process.load("Alignment.MuonAlignmentAlgorithms.MuonAlignmentFromReference_cff") process.looper.algoConfig.readTemporaryFiles = cms.vstring(*alignmenttmp) process.looper.algoConfig.reportFileName = cms.string("MuonAlignmentFromReference_report.py") diff --git a/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py b/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py index 952d3bcc8d7cc..b63ada7535357 100644 --- a/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py +++ b/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py @@ -102,6 +102,18 @@ process = cms.Process("GATHER") +process.load("Configuration.StandardSequences.Reconstruction_cff") + +process.MuonNumberingInitialization = cms.ESProducer("MuonNumberingInitialization") +process.MuonNumberingRecord = cms.ESSource( "EmptyESSource", + recordName = cms.string( "MuonNumberingRecord" ), + iovIsRunNotTime = cms.bool( True ), + firstValid = cms.vuint32( 1 ) +) + +process.load("Configuration.StandardSequences.GeometryDB_cff") +process.load("Configuration.StandardSequences.MagneticField_cff") + if len(good_lumis)>0: process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring(*inputfiles), diff --git a/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py b/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py index 4be61e1cc747b..51c85bb3157ec 100755 --- a/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py +++ b/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py @@ -480,7 +480,7 @@ def writeAlignCfg(fname, my_vars): cp -f %(directory)salign_cfg.py %(inputdbdir)s%(inputdb)s %(directory)s*.tmp %(copytrackerdb)s $ALIGNMENT_CAFDIR/ -export ALIGNMENT_PLOTTINGTMP=`ls %(directory)splotting0*.root 2> /dev/null` +export ALIGNMENT_PLOTTINGTMP=`find %(directory)splotting0*.root -maxdepth 1 -size +0 -print 2> /dev/null` # if it's 1st or last iteration, combine _plotting.root files into one: if [ \"$ALIGNMENT_ITERATION\" != \"111\" ] || [ \"$ALIGNMENT_ITERATION\" == \"%(ITERATIONS)s\" ]; then @@ -496,7 +496,7 @@ def writeAlignCfg(fname, my_vars): fi cd $ALIGNMENT_CAFDIR/ -export ALIGNMENT_ALIGNMENTTMP=`ls alignment*.tmp 2> /dev/null` +export ALIGNMENT_ALIGNMENTTMP=`find alignment*.tmp -maxdepth 1 -size +12000k -print 2> /dev/null` ls -l cmsRun align_cfg.py @@ -507,7 +507,7 @@ def writeAlignCfg(fname, my_vars): cd $ALIGNMENT_AFSDIR ./Alignment/MuonAlignmentAlgorithms/scripts/convertSQLiteXML.py %(directory)s%(director)s.db %(directory)s%(director)s.xml --noLayers --gprcdconnect $ALIGNMENT_GPRCDCONNECT --gprcd $ALIGNMENT_GPRCD -export ALIGNMENT_ALIGNMENTTMP=`ls %(directory)salignment*.tmp 2> /dev/null` +export ALIGNMENT_ALIGNMENTTMP=`find %(directory)salignment*.tmp -maxdepth 1 -size +12000k -print 2> /dev/null` if [ \"$ALIGNMENT_CLEANUP\" == \"True\" ] && [ \"zzz$ALIGNMENT_ALIGNMENTTMP\" != \"zzz\" ]; then rm $ALIGNMENT_ALIGNMENTTMP echo " " @@ -703,8 +703,8 @@ def writeValidationCfg(fname, my_vars): if options.big: queue = "cmscaf1nd" else: queue = "cmscaf1nh" - if user_mail: bsubfile.append("bsub -R \"type==SLC5_64\" -q %s -J \"%s_gather%03d\" -u %s %s gather%03d.sh" % (queue, director, jobnumber, user_mail, waiter, jobnumber)) - else: bsubfile.append("bsub -R \"type==SLC5_64\" -q %s -J \"%s_gather%03d\" %s gather%03d.sh" % (queue, director, jobnumber, waiter, jobnumber)) + if user_mail: bsubfile.append("bsub -R \"type==SLC6_64\" -q %s -J \"%s_gather%03d\" -u %s %s gather%03d.sh" % (queue, director, jobnumber, user_mail, waiter, jobnumber)) + else: bsubfile.append("bsub -R \"type==SLC6_64\" -q %s -J \"%s_gather%03d\" %s gather%03d.sh" % (queue, director, jobnumber, waiter, jobnumber)) bsubnames.append("ended(%s_gather%03d)" % (director, jobnumber)) @@ -727,8 +727,8 @@ def writeValidationCfg(fname, my_vars): os.system("chmod +x %salign.sh" % directory) bsubfile.append("echo %salign.sh" % directory) - if user_mail: bsubfile.append("bsub -R \"type==SLC5_64\" -q cmscaf1nd -J \"%s_align\" -u %s -w \"%s\" align.sh" % (director, user_mail, " && ".join(bsubnames))) - else: bsubfile.append("bsub -R \"type==SLC5_64\" -q cmscaf1nd -J \"%s_align\" -w \"%s\" align.sh" % (director, " && ".join(bsubnames))) + if user_mail: bsubfile.append("bsub -R \"type==SLC6_64\" -q cmscaf1nd -J \"%s_align\" -u %s -w \"%s\" align.sh" % (director, user_mail, " && ".join(bsubnames))) + else: bsubfile.append("bsub -R \"type==SLC6_64\" -q cmscaf1nd -J \"%s_align\" -w \"%s\" align.sh" % (director, " && ".join(bsubnames))) #bsubfile.append("cd ..") bsubnames = [] @@ -745,8 +745,8 @@ def writeValidationCfg(fname, my_vars): os.system("chmod +x %svalidation.sh" % directory) bsubfile.append("echo %svalidation.sh" % directory) - if user_mail: bsubfile.append("bsub -R \"type==SLC5_64\" -q cmscaf1nd -J \"%s_validation\" -u %s -w \"ended(%s)\" validation.sh" % (director, user_mail, last_align)) - else: bsubfile.append("bsub -R \"type==SLC5_64\" -q cmscaf1nd -J \"%s_validation\" -w \"ended(%s)\" validation.sh" % (director, last_align)) + if user_mail: bsubfile.append("bsub -R \"type==SLC6_64\" -q cmscaf1nd -J \"%s_validation\" -u %s -w \"ended(%s)\" validation.sh" % (director, user_mail, last_align)) + else: bsubfile.append("bsub -R \"type==SLC6_64\" -q cmscaf1nd -J \"%s_validation\" -w \"ended(%s)\" validation.sh" % (director, last_align)) bsubfile.append("cd ..") bsubfile.append("") diff --git a/Alignment/MuonAlignmentAlgorithms/scripts/createTree.py b/Alignment/MuonAlignmentAlgorithms/scripts/createTree.py index e60971a8fd8c6..f4c9f81681ad3 100755 --- a/Alignment/MuonAlignmentAlgorithms/scripts/createTree.py +++ b/Alignment/MuonAlignmentAlgorithms/scripts/createTree.py @@ -24,14 +24,20 @@ "map_DTvsz_dydz.png" : "map of dydz residual vs z", "map_DTvsz_x.png" : "map of x residual vs z", "map_DTvsz_y.png" : "map of y residual vs z", +"map_DTvsz_all_dxdz.png" : "map of dxdz residual vs z", +"map_DTvsz_all_dydz.png" : "map of dydz residual vs z", +"map_DTvsz_all_x.png" : "map of x residual vs z", +"map_DTvsz_all_y.png" : "map of y residual vs z", "map_CSCvsphi_dxdz.png" : "map of d(rphi)/dz residual vs phi", "map_CSCvsphi_x.png" : "map of rphi residual vs phi", "map_CSCvsr_dxdz.png" : "map of d(rphi)/dz residual vs r", "map_CSCvsr_x.png" : "map of rphi residual vs r", +"segdifphi_x_dt_csc_resid.png" : "segdiff DT-CSC in x residuals vs phi", "segdifphi_dt13_resid.png" : "segdiff in x residuals vs phi", "segdifphi_dt13_slope.png" : "segdiff in dxdz residuals vs phi", "segdifphi_dt2_resid.png" : "segdiff in y residuals vs phi", "segdifphi_dt2_slope.png" : "segdiff in dydz residuals vs phi", +"segdif_x_dt_csc_resid.png" : "segdiff DT-CSC in x residuals", "segdif_dt13_resid.png" : "segdiff in x residuals", "segdif_dt13_slope.png" : "segdiff in dxdz residuals", "segdif_dt2_resid.png" : "segdiff in y residuals", diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonCSCChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonCSCChamberResidual.cc index 31f7c4f987cdf..92b75ed060735 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonCSCChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonCSCChamberResidual.cc @@ -5,81 +5,100 @@ #include "Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h" #include "Geometry/CSCGeometry/interface/CSCGeometry.h" +#include "TrackingTools/Records/interface/TrackingComponentsRecord.h" +#include "TrackingTools/GeomPropagators/interface/Propagator.h" MuonCSCChamberResidual::MuonCSCChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable) - : MuonHitsChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable) +: MuonHitsChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) { - m_type = MuonChamberResidual::kCSC; - align::GlobalVector zDirection(0., 0., 1.); - m_sign = m_globalGeometry->idToDet(m_chamberId)->toLocal(zDirection).z() > 0. ? 1. : -1.; + m_type = MuonChamberResidual::kCSC; + align::GlobalVector zDirection(0., 0., 1.); + m_sign = m_globalGeometry->idToDet(m_chamberId)->toLocal(zDirection).z() > 0. ? 1. : -1.; } -void MuonCSCChamberResidual::addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) +void MuonCSCChamberResidual::addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit) { - DetId id = hit->geographicalId(); - const CSCGeometry *cscGeometry = dynamic_cast(m_globalGeometry->slaveGeometry(id)); - assert(cscGeometry); - - align::LocalPoint hitChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(hit->localPosition())); - align::LocalPoint tsosChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(tsos->localPosition())); - - int strip = cscGeometry->layer(id)->geometry()->nearestStrip(hit->localPosition()); - double angle = cscGeometry->layer(id)->geometry()->stripAngle(strip) - M_PI/2.; - double sinAngle = sin(angle); - double cosAngle = cos(angle); - - double residual = cosAngle * (tsosChamberPos.x() - hitChamberPos.x()) + sinAngle * (tsosChamberPos.y() - hitChamberPos.y()); // yes, that's +sin() - - double xx = hit->localPositionError().xx(); - double xy = hit->localPositionError().xy(); - double yy = hit->localPositionError().yy(); - double weight = 1. / (xx*cosAngle*cosAngle + 2.*xy*sinAngle*cosAngle + yy*sinAngle*sinAngle); - - double layerPosition = tsosChamberPos.z(); // the layer's position in the chamber's coordinate system - double layerHitPos = hitChamberPos.z(); - - m_numHits++; - - // "x" is the layerPosition, "y" is the residual (this is a linear fit to residual versus layerPosition) - m_residual_1 += weight; - m_residual_x += weight * layerPosition; - m_residual_y += weight * residual; - m_residual_xx += weight * layerPosition * layerPosition; - m_residual_xy += weight * layerPosition * residual; - - // "x" is the layerPosition, "y" is chamberx (this is a linear fit to chamberx versus layerPosition) - m_trackx_1 += weight; - m_trackx_x += weight * layerPosition; - m_trackx_y += weight * tsosChamberPos.x(); - m_trackx_xx += weight * layerPosition * layerPosition; - m_trackx_xy += weight * layerPosition * tsosChamberPos.x(); - - // "x" is the layerPosition, "y" is chambery (this is a linear fit to chambery versus layerPosition) - m_tracky_1 += weight; - m_tracky_x += weight * layerPosition; - m_tracky_y += weight * tsosChamberPos.y(); - m_tracky_xx += weight * layerPosition * layerPosition; - m_tracky_xy += weight * layerPosition * tsosChamberPos.y(); - - m_hitx_1 += weight; - m_hitx_x += weight * layerHitPos; - m_hitx_y += weight * hitChamberPos.x(); - m_hitx_xx += weight * layerHitPos * layerHitPos; - m_hitx_xy += weight * layerHitPos * hitChamberPos.x(); - - m_hity_1 += weight; - m_hity_x += weight * layerHitPos; - m_hity_y += weight * hitChamberPos.y(); - m_hity_xx += weight * layerHitPos * layerHitPos; - m_hity_xy += weight * layerHitPos * hitChamberPos.y(); - - m_localIDs.push_back(id); - m_localResids.push_back(residual); - m_individual_x.push_back(layerPosition); - m_individual_y.push_back(residual); - m_individual_weight.push_back(weight); - - if (m_numHits>1) segment_fit(); + bool m_debug = false; + + if (m_debug) std::cout << "MuonCSCChamberResidual::addResidual 1" << std::endl; + DetId id = hit->geographicalId(); + if (m_debug) std::cout << "MuonCSCChamberResidual::addResidual 2" << std::endl; + const CSCGeometry *cscGeometry = dynamic_cast(m_globalGeometry->slaveGeometry(id)); + if (m_debug) std::cout << "MuonCSCChamberResidual::addResidual 3" << std::endl; + assert(cscGeometry); + + if (m_debug) { + std::cout << " MuonCSCChamberResidual hit->localPosition() x: " << hit->localPosition().x() << " tsos->localPosition() x: " << tsos->localPosition().x() << std::endl; + std::cout << " hit->localPosition() y: " << hit->localPosition().y() << " tsos->localPosition() y: " << tsos->localPosition().y() << std::endl; + std::cout << " hit->localPosition() z: " << hit->localPosition().z() << " tsos->localPosition() z: " << tsos->localPosition().z() << std::endl; + } + + // hit->localPosition() is coordinate in local system of LAYER. Transfer it to coordiante in local system of chamber + align::LocalPoint hitChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(hit->localPosition())); + // TSOS->localPosition() is given in local system of CHAMBER (for segment-based reconstruction) + // align::LocalPoint tsosChamberPos = tsos->localPosition(); + align::LocalPoint tsosChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(tsos->localPosition())); + + int strip = cscGeometry->layer(id)->geometry()->nearestStrip(hit->localPosition()); + double angle = cscGeometry->layer(id)->geometry()->stripAngle(strip) - M_PI/2.; + double sinAngle = sin(angle); + double cosAngle = cos(angle); + + double residual = cosAngle * (tsosChamberPos.x() - hitChamberPos.x()) + sinAngle * (tsosChamberPos.y() - hitChamberPos.y()); // yes, that's +sin() + + if (m_debug) std::cout << " MuonCSCChamberResidual residual: " << residual << std::endl; + + double xx = hit->localPositionError().xx(); + double xy = hit->localPositionError().xy(); + double yy = hit->localPositionError().yy(); + double weight = 1. / (xx*cosAngle*cosAngle + 2.*xy*sinAngle*cosAngle + yy*sinAngle*sinAngle); + + double layerPosition = tsosChamberPos.z(); // the layer's position in the chamber's coordinate system + double layerHitPos = hitChamberPos.z(); + + m_numHits++; + + // "x" is the layerPosition, "y" is the residual (this is a linear fit to residual versus layerPosition) + m_residual_1 += weight; + m_residual_x += weight * layerPosition; + m_residual_y += weight * residual; + m_residual_xx += weight * layerPosition * layerPosition; + m_residual_xy += weight * layerPosition * residual; + + // "x" is the layerPosition, "y" is chamberx (this is a linear fit to chamberx versus layerPosition) + m_trackx_1 += weight; + m_trackx_x += weight * layerPosition; + m_trackx_y += weight * tsosChamberPos.x(); + m_trackx_xx += weight * layerPosition * layerPosition; + m_trackx_xy += weight * layerPosition * tsosChamberPos.x(); + + // "x" is the layerPosition, "y" is chambery (this is a linear fit to chambery versus layerPosition) + m_tracky_1 += weight; + m_tracky_x += weight * layerPosition; + m_tracky_y += weight * tsosChamberPos.y(); + m_tracky_xx += weight * layerPosition * layerPosition; + m_tracky_xy += weight * layerPosition * tsosChamberPos.y(); + + m_hitx_1 += weight; + m_hitx_x += weight * layerHitPos; + m_hitx_y += weight * hitChamberPos.x(); + m_hitx_xx += weight * layerHitPos * layerHitPos; + m_hitx_xy += weight * layerHitPos * hitChamberPos.x(); + + m_hity_1 += weight; + m_hity_x += weight * layerHitPos; + m_hity_y += weight * hitChamberPos.y(); + m_hity_xx += weight * layerHitPos * layerHitPos; + m_hity_xy += weight * layerHitPos * hitChamberPos.y(); + + m_localIDs.push_back(id); + m_localResids.push_back(residual); // FIXME Check if this method is needed + m_individual_x.push_back(layerPosition); + m_individual_y.push_back(residual); + m_individual_weight.push_back(weight); + + if (m_numHits>1) segment_fit(); } + diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonChamberResidual.cc index 02a94d5f4419d..623c64f102c38 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonChamberResidual.cc @@ -14,7 +14,7 @@ MuonChamberResidual::MuonChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, DetId chamberId, - const AlignableDetOrUnitPtr& chamberAlignable): + AlignableDetOrUnitPtr chamberAlignable): m_globalGeometry(globalGeometry) , m_navigator(navigator) , m_chamberId(chamberId) diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonDT13ChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonDT13ChamberResidual.cc index 6ca6ef8d9d661..b397c69dcd1ef 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonDT13ChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonDT13ChamberResidual.cc @@ -5,69 +5,80 @@ #include "Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h" -MuonDT13ChamberResidual::MuonDT13ChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable) - : MuonHitsChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) +MuonDT13ChamberResidual::MuonDT13ChamberResidual(edm::ESHandle globalGeometry, + AlignableNavigator *navigator, + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable) +: MuonHitsChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) { - m_type = MuonChamberResidual::kDT13; - double rphiAngle = atan2(m_globalGeometry->idToDet(m_chamberId)->position().y(), m_globalGeometry->idToDet(m_chamberId)->position().x()) + M_PI/2.; - align::GlobalVector rphiDirection(cos(rphiAngle), sin(rphiAngle), 0.); - m_sign = m_globalGeometry->idToDet(m_chamberId)->toLocal(rphiDirection).x() > 0. ? 1. : -1.; + m_type = MuonChamberResidual::kDT13; + double rphiAngle = atan2(m_globalGeometry->idToDet(m_chamberId)->position().y(), m_globalGeometry->idToDet(m_chamberId)->position().x()) + M_PI/2.; + align::GlobalVector rphiDirection(cos(rphiAngle), sin(rphiAngle), 0.); + m_sign = m_globalGeometry->idToDet(m_chamberId)->toLocal(rphiDirection).x() > 0. ? 1. : -1.; } +// void MuonDT13ChamberResidual::addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) -void MuonDT13ChamberResidual::addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) +void MuonDT13ChamberResidual::addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit) { - DetId id = hit->geographicalId(); - - align::LocalPoint hitChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(hit->localPosition())); - align::LocalPoint tsosChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(tsos->localPosition())); - - double residual = tsosChamberPos.x() - hitChamberPos.x(); // residual is hit minus hit - double weight = 1. / hit->localPositionError().xx(); // weight linear fit by hit-only local error - double layerPosition = tsosChamberPos.z(); // the layer's position in the chamber's coordinate system - double layerHitPos = hitChamberPos.z(); - - m_numHits++; - - // "x" is the layerPosition, "y" is the residual (this is a linear fit to residual versus layerPosition) - m_residual_1 += weight; - m_residual_x += weight * layerPosition; - m_residual_y += weight * residual; - m_residual_xx += weight * layerPosition * layerPosition; - m_residual_xy += weight * layerPosition * residual; - - // "x" is the layerPosition, "y" is chamberx (this is a linear fit to chamberx versus layerPosition) - m_trackx_1 += weight; - m_trackx_x += weight * layerPosition; - m_trackx_y += weight * tsosChamberPos.x(); - m_trackx_xx += weight * layerPosition * layerPosition; - m_trackx_xy += weight * layerPosition * tsosChamberPos.x(); - - // "x" is the layerPosition, "y" is chambery (this is a linear fit to chambery versus layerPosition) - m_tracky_1 += weight; - m_tracky_x += weight * layerPosition; - m_tracky_y += weight * tsosChamberPos.y(); - m_tracky_xx += weight * layerPosition * layerPosition; - m_tracky_xy += weight * layerPosition * tsosChamberPos.y(); - - m_hitx_1 += weight; - m_hitx_x += weight * layerHitPos; - m_hitx_y += weight * hitChamberPos.x(); - m_hitx_xx += weight * layerHitPos * layerHitPos; - m_hitx_xy += weight * layerHitPos * hitChamberPos.x(); - - m_hity_1 += weight; - m_hity_x += weight * layerHitPos; - m_hity_y += weight * hitChamberPos.y(); - m_hity_xx += weight * layerHitPos * layerPosition; - m_hity_xy += weight * layerHitPos * hitChamberPos.y(); - - m_localIDs.push_back(id); - m_localResids.push_back(tsos->localPosition().x() - hit->localPosition().x()); - m_individual_x.push_back(layerPosition); - m_individual_y.push_back(residual); - m_individual_weight.push_back(weight); - - if (m_numHits>1) segment_fit(); + bool m_debug = false; + + DetId id = hit->geographicalId(); + + align::LocalPoint hitChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(hit->localPosition())); + align::LocalPoint tsosChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(tsos->localPosition())); + + if (m_debug) { + std::cout << " MuonDT13ChamberResidual hitChamberPos x: " << hitChamberPos.x() << " tsosChamberPos x: " << tsosChamberPos.x() << std::endl; + std::cout << " hitChamberPos y: " << hitChamberPos.y() << " tsosChamberPos y: " << tsosChamberPos.y() << std::endl; + std::cout << " hitChamberPos z: " << hitChamberPos.z() << " tsosChamberPos z: " << tsosChamberPos.z() << std::endl; + } + + double residual = tsosChamberPos.x() - hitChamberPos.x(); // residual is hit minus hit + double weight = 1. / hit->localPositionError().xx(); // weight linear fit by hit-only local error + double layerPosition = tsosChamberPos.z(); // the layer's position in the chamber's coordinate system + double layerHitPos = hitChamberPos.z(); + + m_numHits++; + + // "x" is the layerPosition, "y" is the residual (this is a linear fit to residual versus layerPosition) + m_residual_1 += weight; + m_residual_x += weight * layerPosition; + m_residual_y += weight * residual; + m_residual_xx += weight * layerPosition * layerPosition; + m_residual_xy += weight * layerPosition * residual; + + // "x" is the layerPosition, "y" is chamberx (this is a linear fit to chamberx versus layerPosition) + m_trackx_1 += weight; + m_trackx_x += weight * layerPosition; + m_trackx_y += weight * tsosChamberPos.x(); + m_trackx_xx += weight * layerPosition * layerPosition; + m_trackx_xy += weight * layerPosition * tsosChamberPos.x(); + + // "x" is the layerPosition, "y" is chambery (this is a linear fit to chambery versus layerPosition) + m_tracky_1 += weight; + m_tracky_x += weight * layerPosition; + m_tracky_y += weight * tsosChamberPos.y(); + m_tracky_xx += weight * layerPosition * layerPosition; + m_tracky_xy += weight * layerPosition * tsosChamberPos.y(); + + m_hitx_1 += weight; + m_hitx_x += weight * layerHitPos; + m_hitx_y += weight * hitChamberPos.x(); + m_hitx_xx += weight * layerHitPos * layerHitPos; + m_hitx_xy += weight * layerHitPos * hitChamberPos.x(); + + m_hity_1 += weight; + m_hity_x += weight * layerHitPos; + m_hity_y += weight * hitChamberPos.y(); + m_hity_xx += weight * layerHitPos * layerPosition; + m_hity_xy += weight * layerHitPos * hitChamberPos.y(); + + m_localIDs.push_back(id); + // m_localResids.push_back(tsos->localPosition().x() - hit->localPosition().x()); //FIXME looks like this line is not used anywhere, moreover it is wrong for segment-based reconstruction, I changed it to the follwoing line + m_localResids.push_back(residual); + m_individual_x.push_back(layerPosition); + m_individual_y.push_back(residual); + m_individual_weight.push_back(weight); + + if (m_numHits>1) segment_fit(); } diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonDT2ChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonDT2ChamberResidual.cc index 3aa8ccbf8bb9f..3ca2ce097370d 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonDT2ChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonDT2ChamberResidual.cc @@ -5,66 +5,78 @@ #include "Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h" MuonDT2ChamberResidual::MuonDT2ChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable) - : MuonHitsChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable) +: MuonHitsChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) { - m_type = MuonChamberResidual::kDT2; - align::GlobalVector zDirection(0., 0., 1.); - m_sign = m_globalGeometry->idToDet(m_chamberId)->toLocal(zDirection).y() > 0. ? 1. : -1.; + m_type = MuonChamberResidual::kDT2; + align::GlobalVector zDirection(0., 0., 1.); + m_sign = m_globalGeometry->idToDet(m_chamberId)->toLocal(zDirection).y() > 0. ? 1. : -1.; } -void MuonDT2ChamberResidual::addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) + +// void MuonDT2ChamberResidual::addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) + +void MuonDT2ChamberResidual::addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit) { - DetId id = hit->geographicalId(); - - align::LocalPoint hitChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(hit->localPosition())); - align::LocalPoint tsosChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(tsos->localPosition())); - - double residual = tsosChamberPos.y() - hitChamberPos.y(); // residual is track minus hit - double weight = 1. / hit->localPositionError().xx(); // weight linear fit by hit-only local error (yes, xx: layer x is chamber y) - double layerPosition = tsosChamberPos.z(); // the layer's position in the chamber's coordinate system - double layerHitPos = hitChamberPos.z(); - - m_numHits++; - - // "x" is the layerPosition, "y" is the residual (this is a linear fit to residual versus layerPosition) - m_residual_1 += weight; - m_residual_x += weight * layerPosition; - m_residual_y += weight * residual; - m_residual_xx += weight * layerPosition * layerPosition; - m_residual_xy += weight * layerPosition * residual; - - // "x" is the layerPosition, "y" is chamberx (this is a linear fit to chamberx versus layerPosition) - m_trackx_1 += weight; - m_trackx_x += weight * layerPosition; - m_trackx_y += weight * tsosChamberPos.x(); - m_trackx_xx += weight * layerPosition * layerPosition; - m_trackx_xy += weight * layerPosition * tsosChamberPos.x(); - - // "x" is the layerPosition, "y" is chambery (this is a linear fit to chambery versus layerPosition) - m_tracky_1 += weight; - m_tracky_x += weight * layerPosition; - m_tracky_y += weight * tsosChamberPos.y(); - m_tracky_xx += weight * layerPosition * layerPosition; - m_tracky_xy += weight * layerPosition * tsosChamberPos.y(); - - m_hitx_1 += weight; - m_hitx_x += weight * layerHitPos; - m_hitx_y += weight * hitChamberPos.x(); - m_hitx_xx += weight * layerHitPos * layerHitPos; - m_hitx_xy += weight * layerHitPos * hitChamberPos.x(); - - m_hity_1 += weight; - m_hity_x += weight * layerHitPos; - m_hity_y += weight * hitChamberPos.y(); - m_hity_xx += weight * layerHitPos * layerHitPos; - m_hity_xy += weight * layerHitPos * hitChamberPos.y(); - - m_localIDs.push_back(id); - m_localResids.push_back(tsos->localPosition().x() - hit->localPosition().x()); - m_individual_x.push_back(layerPosition); - m_individual_y.push_back(residual); - m_individual_weight.push_back(weight); - - if (m_numHits>1) segment_fit(); + bool m_debug = false; + + DetId id = hit->geographicalId(); + + align::LocalPoint hitChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(hit->localPosition())); + align::LocalPoint tsosChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(tsos->localPosition())); + + if (m_debug) { + std::cout << " MuonDT2ChamberResidual hitChamberPos x: " << hitChamberPos.x() << " tsosChamberPos x: " << tsosChamberPos.x() << std::endl; + std::cout << " hitChamberPos y: " << hitChamberPos.y() << " tsosChamberPos y: " << tsosChamberPos.y() << std::endl; + std::cout << " hitChamberPos z: " << hitChamberPos.z() << " tsosChamberPos z: " << tsosChamberPos.z() << std::endl; + } + + double residual = tsosChamberPos.y() - hitChamberPos.y(); // residual is track minus hit + double weight = 1. / hit->localPositionError().xx(); // weight linear fit by hit-only local error (yes, xx: layer x is chamber y) + double layerPosition = tsosChamberPos.z(); // the layer's position in the chamber's coordinate system + double layerHitPos = hitChamberPos.z(); + + m_numHits++; + + // "x" is the layerPosition, "y" is the residual (this is a linear fit to residual versus layerPosition) + m_residual_1 += weight; + m_residual_x += weight * layerPosition; + m_residual_y += weight * residual; + m_residual_xx += weight * layerPosition * layerPosition; + m_residual_xy += weight * layerPosition * residual; + + // "x" is the layerPosition, "y" is chamberx (this is a linear fit to chamberx versus layerPosition) + m_trackx_1 += weight; + m_trackx_x += weight * layerPosition; + m_trackx_y += weight * tsosChamberPos.x(); + m_trackx_xx += weight * layerPosition * layerPosition; + m_trackx_xy += weight * layerPosition * tsosChamberPos.x(); + + // "x" is the layerPosition, "y" is chambery (this is a linear fit to chambery versus layerPosition) + m_tracky_1 += weight; + m_tracky_x += weight * layerPosition; + m_tracky_y += weight * tsosChamberPos.y(); + m_tracky_xx += weight * layerPosition * layerPosition; + m_tracky_xy += weight * layerPosition * tsosChamberPos.y(); + + m_hitx_1 += weight; + m_hitx_x += weight * layerHitPos; + m_hitx_y += weight * hitChamberPos.x(); + m_hitx_xx += weight * layerHitPos * layerHitPos; + m_hitx_xy += weight * layerHitPos * hitChamberPos.x(); + + m_hity_1 += weight; + m_hity_x += weight * layerHitPos; + m_hity_y += weight * hitChamberPos.y(); + m_hity_xx += weight * layerHitPos * layerHitPos; + m_hity_xy += weight * layerHitPos * hitChamberPos.y(); + + m_localIDs.push_back(id); + // m_localResids.push_back(tsos->localPosition().x() - hit->localPosition().x()); //FIXME looks like this line is not used anywhere, moreover it is wrong for segment-based reconstruction, I changed it to the follwoing line + m_localResids.push_back(residual); + m_individual_x.push_back(layerPosition); + m_individual_y.push_back(residual); + m_individual_weight.push_back(weight); + + if (m_numHits>1) segment_fit(); } diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc index 6565c871fb728..74f0f7907f76e 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc @@ -162,6 +162,70 @@ double MuonResidualsFitter_integrate_pureGaussian(double low, double high, doubl return (erf((high + center) * isqr2 / sigma) - erf((low + center) * isqr2 / sigma)) * exp(0.5/sigma/sigma) * 0.5; } +MuonResidualsFitter::MuonResidualsFitter(int residualsModel, int minHits, int useResiduals, bool weightAlignment) : + m_residualsModel(residualsModel) +, m_minHits(minHits) +, m_useResiduals(useResiduals) +, m_weightAlignment(weightAlignment) +, m_printLevel(0) +, m_strategy(1) +, m_cov(1) +, m_loglikelihood(0.) +{ + if (m_residualsModel != kPureGaussian && m_residualsModel != kPowerLawTails && + m_residualsModel != kROOTVoigt && m_residualsModel != kGaussPowerTails && m_residualsModel != kPureGaussian2D) + throw cms::Exception("MuonResidualsFitter") << "unrecognized residualsModel"; +} + + +MuonResidualsFitter::~MuonResidualsFitter() +{ + for (std::vector::const_iterator residual = residuals_begin(); residual != residuals_end(); ++residual) { + delete [] (*residual); + } +} + + +void MuonResidualsFitter::fix(int parNum, bool dofix) +{ + assert(0 <= parNum && parNum < npar()); + if (m_fixed.size() == 0) m_fixed.resize(npar(), false); + m_fixed[parNum] = dofix; +} + + +bool MuonResidualsFitter::fixed(int parNum) +{ + assert(0 <= parNum && parNum < npar()); + if (m_fixed.size() == 0) return false; + else return m_fixed[parNum]; +} + + +void MuonResidualsFitter::fill(double *residual) +{ + m_residuals.push_back(residual); + m_residuals_ok.push_back(true); +} + + +double MuonResidualsFitter::covarianceElement(int parNum1, int parNum2) +{ + assert(0 <= parNum1 && parNum1 < npar()); + assert(0 <= parNum2 && parNum2 < npar()); + assert(m_cov.GetNcols() == npar()); // m_cov might have not yet been resized to account for proper #parameters + return m_cov(parNum2parIdx(parNum1), parNum2parIdx(parNum2)); +} + + +long MuonResidualsFitter::numsegments() +{ + long num = 0; + for (std::vector::const_iterator resiter = residuals_begin(); resiter != residuals_end(); ++resiter) num++; + return num; +} + + void MuonResidualsFitter::initialize_table() { @@ -240,7 +304,8 @@ bool MuonResidualsFitter::dofit(void (*fcn)(int&,double*,double&,double*,int), s MuonResidualsFitterFitInfo *fitinfo = new MuonResidualsFitterFitInfo(this); MuonResidualsFitter_TMinuit = new TMinuit(npar()); - MuonResidualsFitter_TMinuit->SetPrintLevel(m_printLevel); + // MuonResidualsFitter_TMinuit->SetPrintLevel(m_printLevel); + MuonResidualsFitter_TMinuit->SetPrintLevel(); MuonResidualsFitter_TMinuit->SetObjectFit(fitinfo); MuonResidualsFitter_TMinuit->SetFCN(fcn); inform(MuonResidualsFitter_TMinuit); @@ -503,7 +568,8 @@ void MuonResidualsFitter::histogramChi2GaussianFit(int which, double &fit_mean, f1->SetParameter(0, hist->GetEntries()); f1->SetParameter(1, 0); f1->SetParameter(2, hist->GetRMS()); - hist->Fit(f1,"RQ"); + hist->Fit("f1","RQ"); + // hist->Fit(f1,"RQ"); fit_mean = f1->GetParameter(1); fit_sigma = f1->GetParameter(2); @@ -515,7 +581,9 @@ void MuonResidualsFitter::histogramChi2GaussianFit(int which, double &fit_mean, // simple non-turned ellipsoid selection -void MuonResidualsFitter::selectPeakResiduals_simple(double nsigma, int nvar, int *vars) +// THIS WAS selectPeakResiduals_simple, but I changed it to use this simple function as default +// void MuonResidualsFitter::selectPeakResiduals_simple(double nsigma, int nvar, int *vars) +void MuonResidualsFitter::selectPeakResiduals(double nsigma, int nvar, int *vars) { // does not make sense for small statistics if (numResiduals()<25) return; @@ -547,8 +615,10 @@ void MuonResidualsFitter::selectPeakResiduals_simple(double nsigma, int nvar, in if (ellipsoid_sum <= 1.) ++r; else { - delete [] (*r); - r = m_residuals.erase(r); + m_residuals_ok[r - m_residuals.begin()] = false; + ++r; + // delete [] (*r); + // r = m_residuals.erase(r); } } std::cout<<" N residuals "< "<1 - TRobustEstimator re(nbefore, nvar); + std::cout << "D>1 case" << std::endl; + TRobustEstimator re(nbefore+1, nvar); + std::cout << "nbefore " << nbefore << " nvar " << nvar << std::endl; r = m_residuals.begin(); + std::cout << "+++++ JUST before loop while (r != m_residuals.end())" << std::endl; + int counter1 = 0; while (r != m_residuals.end()) { double *row = new double[nvar]; for (int v = 0; v::const_iterator r = residuals_begin(); r != residuals_end(); ++r) { + iResidual++; + if (!m_residuals_ok[iResidual]) continue; + + double positionX = (*r)[4]; + if (positionX >= xMin && positionX <= xMax) { + std::cout << "Residual within fiducial cuts: xMin = " << xMin << " x = " << positionX << " xMax = " << xMax << std::endl; + } else { + std::cout << "Residual outside fiducial cuts: xMin = " << xMin << " x = " << positionX << " xMax = " << xMax << std::endl; + m_residuals_ok[iResidual] = false; + } + + double positionY = (*r)[5]; + if (positionY >= yMin && positionY <= yMax) { + std::cout << "Residual within fiducial cuts: yMin = " << yMin << " y = " << positionY << " yMax = " << yMax << std::endl; + } else { + std::cout << "Residual outside fiducial cuts: yMin = " << yMin << " y = " << positionY << " yMax = " << yMax << std::endl; + m_residuals_ok[iResidual] = false; + } + } +} + + void MuonResidualsFitter::correctBField(int idx_momentum, int idx_q) { const int Nbin = 17; diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFromTrack.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFromTrack.cc index 6d0a4f58e4ca2..520d3270b4167 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFromTrack.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFromTrack.cc @@ -13,329 +13,777 @@ #include "Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h" #include "Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h" -#include "TDecompChol.h" - +#include "TrackingTools/TrackRefitter/interface/TrackTransformer.h" -void MuonResidualsFromTrack::addTrkCovMatrix(DetId chamberId, TrajectoryStateOnSurface &tsos) -{ - const AlgebraicSymMatrix55 cov55 = tsos.localError().matrix(); - TMatrixDSym cov44(4); - // change indices from q/p,dxdz,dydz,x,y to x,y,dxdz,dydz - int subs[4] = { 3, 4, 1, 2 }; - for (int i=0;i<4;i++) for (int j=0;j<4;j++) cov44(i,j) = cov55( subs[i], subs[j] ); - m_trkCovMatrix[chamberId] = cov44; -} - - -MuonResidualsFromTrack::MuonResidualsFromTrack(edm::ESHandle globalGeometry, - const Trajectory *traj, - const reco::Track* trk, - AlignableNavigator *navigator, double maxResidual) - : track(trk) -{ - clear(); - - std::vector measurements = traj->measurements(); - for (std::vector::const_iterator im = measurements.begin(); im != measurements.end(); ++im) { - TrajectoryMeasurement meas = *im; - const TransientTrackingRecHit *hit = &(*meas.recHit()); - DetId id = hit->geographicalId(); - - if (hit->isValid()) { - TrajectoryStateOnSurface tsos = m_tsoscomb(meas.forwardPredictedState(), meas.backwardPredictedState()); - if (tsos.isValid() && fabs(tsos.localPosition().x() - hit->localPosition().x()) < maxResidual) { - - if (id.det() == DetId::Tracker) { - double xresid = tsos.localPosition().x() - hit->localPosition().x(); - double xresiderr2 = tsos.localError().positionError().xx() + hit->localPositionError().xx(); - - m_tracker_numHits++; - m_tracker_chi2 += xresid * xresid / xresiderr2; - - if (id.subdetId() == StripSubdetector::TID || id.subdetId() == StripSubdetector::TEC) m_contains_TIDTEC = true; - } - - else if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::DT) { - const DTChamberId chamberId(id.rawId()); - const DTSuperLayerId superLayerId(id.rawId()); - - // have we seen this chamber before? - if (m_dt13.find(chamberId) == m_dt13.end() && m_dt2.find(chamberId) == m_dt2.end()) { - m_chamberIds.push_back(chamberId); - //addTrkCovMatrix(chamberId, tsos); // only for the 1st hit - } - - if (superLayerId.superlayer() == 2) { - if (m_dt2.find(chamberId) == m_dt2.end()) { - AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); - m_dt2[chamberId] = new MuonDT2ChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); - } - - m_dt2[chamberId]->addResidual(&tsos, hit); - } - - else { - if (m_dt13.find(chamberId) == m_dt13.end()) { - AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); - m_dt13[chamberId] = new MuonDT13ChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); - } - - m_dt13[chamberId]->addResidual(&tsos, hit); - } - } - - else if (id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::CSC) { - const CSCDetId cscDetId(id.rawId()); - const CSCDetId chamberId(cscDetId.endcap(), cscDetId.station(), cscDetId.ring(), cscDetId.chamber()); - - // not sure why we sometimes get layer == 0 - if (cscDetId.layer() == 0) continue; - - // have we seen this chamber before? - if (m_csc.find(chamberId) == m_csc.end()) - { - m_chamberIds.push_back(chamberId); - //addTrkCovMatrix(chamberId, tsos); // only for the 1st hit - AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); - m_csc[chamberId] = new MuonCSCChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); - } - - m_csc[chamberId]->addResidual(&tsos, hit); - } - - } // end if track propagation is valid - } // end if hit is valid - } // end loop over measurments -} - - -MuonResidualsFromTrack::MuonResidualsFromTrack(edm::ESHandle globalGeometry, const reco::Muon *mu, AlignableNavigator *navigator, double maxResidual) - : muon(mu) +#include "TDecompChol.h" +#include + + +MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, + edm::ESHandle magneticField, + edm::ESHandle globalGeometry, + edm::ESHandle prop, + const Trajectory *traj, + const reco::Track* recoTrack, + AlignableNavigator *navigator, + double maxResidual) +: m_recoTrack(recoTrack) { - clear(); - assert( muon->isTrackerMuon() && muon->innerTrack().isNonnull()); - track = muon->innerTrack().get(); - - m_tracker_chi2 = muon->innerTrack()->chi2(); - m_tracker_numHits = muon->innerTrack()->ndof() + 5; - m_tracker_numHits = m_tracker_numHits > 0 ? m_tracker_numHits : 0 ; - - /* - for (trackingRecHit_iterator hit = muon->innerTrack()->recHitsBegin(); hit != muon->innerTrack()->recHitsEnd(); ++hit) - { - DetId id = (*hit)->geographicalId(); - if (id.det() == DetId::Tracker) - { - m_tracker_numHits++; - if (id.subdetId() == StripSubdetector::TID || id.subdetId() == StripSubdetector::TEC) m_contains_TIDTEC = true; - } - } - */ - - for (std::vector::const_iterator chamberMatch = muon->matches().begin(); - chamberMatch != muon->matches().end(); chamberMatch++) - { - if (chamberMatch->id.det() != DetId::Muon ) continue; - - for (std::vector::const_iterator segMatch = chamberMatch->segmentMatches.begin(); - segMatch != chamberMatch->segmentMatches.end(); ++segMatch) - { - // select the only segment that belongs to track and is the best in station by dR - if (! (segMatch->isMask(reco::MuonSegmentMatch::BestInStationByDR) && - segMatch->isMask(reco::MuonSegmentMatch::BelongsToTrackByDR)) ) continue; - - if (chamberMatch->id.subdetId() == MuonSubdetId::DT) - { - const DTChamberId chamberId(chamberMatch->id.rawId()); - - DTRecSegment4DRef segmentDT = segMatch->dtSegmentRef; - const DTRecSegment4D* segment = segmentDT.get(); - if (segment == 0) continue; - - if ( segment->hasPhi() && fabs(chamberMatch->x - segMatch->x) > maxResidual ) continue; - if ( segment->hasZed() && fabs(chamberMatch->y - segMatch->y) > maxResidual ) continue; - - // have we seen this chamber before? - if (m_dt13.find(chamberId) == m_dt13.end() && m_dt2.find(chamberId) == m_dt2.end()) { - m_chamberIds.push_back(chamberId); - } + bool m_debug = false; - if (segment->hasZed()) - { - if (m_dt2.find(chamberId) == m_dt2.end()) - { - AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); - m_dt2[chamberId] = new MuonTrackDT2ChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); - } - else std::cout<<"multi segment match to tmuon: dt2 -- should not happen!"<setSegmentResidual(&(*chamberMatch), &(*segMatch)); - } - if (segment->hasPhi()) - { - if (m_dt13.find(chamberId) == m_dt13.end()) - { - AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); - m_dt13[chamberId] = new MuonTrackDT13ChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); - } - else std::cout<<"multi segment match to tmuon: dt13 -- should not happen!"<setSegmentResidual(&(*chamberMatch), &(*segMatch)); - } - } - - else if (chamberMatch->id.subdetId() == MuonSubdetId::CSC) - { - const CSCDetId cscDetId(chamberMatch->id.rawId()); - const CSCDetId chamberId(cscDetId.chamberId()); - - if ( fabs(chamberMatch->x - segMatch->x) > maxResidual ) continue; + if (m_debug) { + std::cout << "BEGIN MuonResidualsFromTrack" << std::endl; + const std::string metname = " *** MuonResidualsFromTrack *** "; + LogTrace(metname) << "Tracking Component changed!"; + } - // have we seen this chamber before? - if (m_csc.find(chamberId) == m_csc.end()) - { - m_chamberIds.push_back(chamberId); - AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); - m_csc[chamberId] = new MuonTrackCSCChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); + clear(); + + edm::ESHandle theTrackerRecHitBuilder; + iSetup.get().get("WithTrackAngle",theTrackerRecHitBuilder); + reco::TransientTrack track( *m_recoTrack, &*magneticField, globalGeometry ); + TransientTrackingRecHit::ConstRecHitContainer recHitsForRefit; + int iT = 0, iM = 0; + for (trackingRecHit_iterator hit = m_recoTrack->recHitsBegin(); hit != m_recoTrack->recHitsEnd(); ++hit) { + if((*hit)->isValid()) { + DetId hitId = (*hit)->geographicalId(); + if ( hitId.det() == DetId::Tracker ) { + iT++; + if (m_debug) std::cout << "Tracker Hit " << iT << " is found. Add to refit. Dimension: " << (*hit)->dimension() << std::endl; + + recHitsForRefit.push_back( theTrackerRecHitBuilder->build(&**hit) ); + } else if ( hitId.det() == DetId::Muon ){ + // if ( (*hit)->geographicalId().subdetId() == 3 && !theRPCInTheFit ) { + // LogTrace("Reco|TrackingTools|TrackTransformer") << "RPC Rec Hit discarged"; + // continue; + // } + iM++; + if (m_debug) std::cout << "Muon Hit " << iM << " is found. We do not add muon hits to refit. Dimension: " << (*hit)->dimension() << std::endl; + if ( hitId.subdetId() == MuonSubdetId::DT ) { + const DTChamberId chamberId(hitId.rawId()); + if (m_debug) std::cout << "Muon Hit in DT wheel " << chamberId.wheel() << " station " << chamberId.station() << " sector " << chamberId.sector() << "." << std::endl; + } else if ( hitId.subdetId() == MuonSubdetId::CSC ) { + const CSCDetId cscDetId(hitId.rawId()); + if (m_debug) std::cout << "Muon hit in CSC endcap " << cscDetId.endcap() << " station " << cscDetId.station() << " ring " << cscDetId.ring() << " chamber " << cscDetId.chamber() << "." << std::endl; + } else if ( hitId.subdetId() == MuonSubdetId::RPC ) { + if (m_debug) std::cout << "Muon Hit in RPC" << std::endl; + } else { + if (m_debug) std::cout << "Warning! Muon Hit not in DT or CSC or RPC" << std::endl; + } + // recHitsForRefit.push_back(theMuonRecHitBuilder->build(&**hit)); + } } - else std::cout<<"multi segment match to tmuon: csc -- should not happen!"<setSegmentResidual(&(*chamberMatch), &(*segMatch)); - } - } - } -} - - -MuonResidualsFromTrack::~MuonResidualsFromTrack() -{ - for (std::map::const_iterator residual = m_dt13.begin(); residual != m_dt13.end(); ++residual) { - delete residual->second; - } - for (std::map::const_iterator residual = m_dt2.begin(); residual != m_dt2.end(); ++residual) { - delete residual->second; - } - for (std::map::const_iterator residual = m_csc.begin(); residual != m_csc.end(); ++residual) { - delete residual->second; - } -} - - -void MuonResidualsFromTrack::clear() -{ - m_tracker_numHits = 0; - m_tracker_chi2 = 0.; - m_contains_TIDTEC = false; - m_chamberIds.clear(); - m_dt13.clear(); - m_dt2.clear(); - m_csc.clear(); - m_trkCovMatrix.clear(); -} - - -double MuonResidualsFromTrack::trackerRedChi2() const -{ - if (m_tracker_numHits > 5) return m_tracker_chi2 / double(m_tracker_numHits - 5); - else return -1.; -} - - -double MuonResidualsFromTrack::normalizedChi2() const -{ - if (muon) return track->normalizedChi2(); - return trackerRedChi2(); -} - - -MuonChamberResidual * MuonResidualsFromTrack::chamberResidual(DetId chamberId, int type) -{ - if (type == MuonChamberResidual::kDT13) { - if (m_dt13.find(chamberId) == m_dt13.end()) return NULL; - return m_dt13[chamberId]; - } - else if (type == MuonChamberResidual::kDT2) { - if (m_dt2.find(chamberId) == m_dt2.end()) return NULL; - return m_dt2[chamberId]; - } - else if (type == MuonChamberResidual::kCSC) { - if (m_csc.find(chamberId) == m_csc.end()) return NULL; - return m_csc[chamberId]; - } - else return NULL; -} - - -TMatrixDSym MuonResidualsFromTrack::covMatrix(DetId chamberId) -{ - TMatrixDSym result(4); - std::cout<<"MuonResidualsFromTrack:: cov initial:"<residual_error(); - result(0,0) += r_err*r_err; - r_err = m_csc[chamberId]->resslope_error(); - result(2,2) += r_err*r_err; - } - if (m_dt13.find(chamberId) == m_dt13.end()) - { - r_err = m_dt13[chamberId]->residual_error(); - result(0,0) += r_err*r_err; - r_err = m_dt13[chamberId]->resslope_error(); - result(2,2) += r_err*r_err; - } - if (m_dt2.find(chamberId) == m_dt2.end()) - { - r_err = m_dt2[chamberId]->residual_error(); - result(1,1) += r_err*r_err; - r_err = m_dt2[chamberId]->resslope_error(); - result(3,3) += r_err*r_err; - } - std::cout<<"MuonResidualsFromTrack:: cov after:"< vTrackerTrajectory = trackTransformer.transform(track, recHitsForReFit); + // std::cout << "Tracker trajectories size " << vTrackerTrajectory.size() << std::endl; + + + TrajectoryStateOnSurface lastTrackerTsos; + double lastTrackerTsosGlobalPositionR = 0.0; + + std::vector vTrajMeasurement = traj->measurements(); + if (m_debug) std::cout << " Size of vector of TrajectoryMeasurements: " << vTrajMeasurement.size() << std::endl; + int nTrajMeasurement = 0; + for ( std::vector::const_iterator iTrajMeasurement = vTrajMeasurement.begin(); + iTrajMeasurement != vTrajMeasurement.end(); + ++iTrajMeasurement ) { + nTrajMeasurement++; + if (m_debug) std::cout << " TrajectoryMeasurement #" << nTrajMeasurement << std::endl; + + TrajectoryMeasurement trajMeasurement = *iTrajMeasurement; + + TrajectoryStateOnSurface tsos = m_tsoscomb(trajMeasurement.forwardPredictedState(), trajMeasurement.backwardPredictedState()); + TrajectoryStateOnSurface tsosF = trajMeasurement.forwardPredictedState(); + TrajectoryStateOnSurface tsosB = trajMeasurement.backwardPredictedState(); + TrajectoryStateOnSurface tsosU = trajMeasurement.updatedState(); + if (m_debug) std::cout << " TrajectoryMeasurement TSOS validity: " << tsos.isValid() << std::endl; + if ( tsos.isValid() ) { + double tsosGlobalPositionR = sqrt( tsos.globalPosition().x()*tsos.globalPosition().x() + tsos.globalPosition().y()*tsos.globalPosition().y() ); + if (m_debug) { + std::cout << " TrajectoryMeasurement TSOS localPosition" + << " x: " << tsos.localPosition().x() + << " y: " << tsos.localPosition().y() + << " z: " << tsos.localPosition().z() + << std::endl; + std::cout << " TrajectoryMeasurement TSOS globalPosition" + << " x: " << tsos.globalPosition().x() + << " y: " << tsos.globalPosition().y() + << " R: " << tsosGlobalPositionR + << " z: " << tsos.globalPosition().z() + << std::endl; + } + if ( tsosGlobalPositionR > lastTrackerTsosGlobalPositionR ) { + lastTrackerTsos = tsos; + lastTrackerTsosGlobalPositionR = tsosGlobalPositionR; + } + } - if (!ok){std::cout<<"MuonResidualsFromTrack:: corr decomposition failed!"<isValid() << std::endl; + if ( trajMeasurementHit->isValid() ) { + DetId trajMeasurementHitId = trajMeasurementHit->geographicalId(); + int trajMeasurementHitDim = trajMeasurementHit->dimension(); + if ( trajMeasurementHitId.det() == DetId::Tracker ) { + if (m_debug) std::cout << " TrajectoryMeasurement hit Det: Tracker" << std::endl; + if (m_debug) std::cout << " TrajectoryMeasurement hit dimension: " << trajMeasurementHitDim << std::endl; + m_tracker_numHits++; + double xresid = tsos.localPosition().x() - trajMeasurementHit->localPosition().x(); + double xresiderr2 = tsos.localError().positionError().xx() + trajMeasurementHit->localPositionError().xx(); + m_tracker_chi2 += xresid * xresid / xresiderr2; + + + + if ( trajMeasurementHitId.subdetId() == StripSubdetector::TID + || trajMeasurementHitId.subdetId() == StripSubdetector::TEC) { + m_contains_TIDTEC = true; + } + // YP I add false here. No trajectory measurments in Muon system if we corrected TrackTransformer accordingly + } else if ( false && trajMeasurementHitId.det() == DetId::Muon ) { + + //AR: I removed the false criteria for cosmic tests + // } else if (trajMeasurementHitId.det() == DetId::Muon ) { + + if (m_debug) std::cout << " TrajectoryMeasurement hit Det: Muon" << std::endl; + + if ( trajMeasurementHitId.subdetId() == MuonSubdetId::DT ) { + const DTChamberId chamberId(trajMeasurementHitId.rawId()); + if (m_debug) std::cout << " TrajectoryMeasurement hit subDet: DT wheel " << chamberId.wheel() << " station " << chamberId.station() << " sector " << chamberId.sector() << std::endl; + + // double gChX = globalGeometry->idToDet(chamberId)->position().x(); + // double gChY = globalGeometry->idToDet(chamberId)->position().y(); + // double gChZ = globalGeometry->idToDet(chamberId)->position().z(); + // std::cout << " The chamber position in global frame x: " << gChX << " y: " << gChY << " z: " << gChZ << std::endl; + + + + double hitX = trajMeasurementHit->localPosition().x(); + double hitY = trajMeasurementHit->localPosition().y(); + // double hitZ = trajMeasurementHit->localPosition().z(); + + double tsosX = tsos.localPosition().x(); + double tsosY = tsos.localPosition().y(); + // double tsosZ = tsos.localPosition().z(); + + int residualDT13IsAdded = false; + int residualDT2IsAdded = false; + + + // have we seen this chamber before? + if (m_dt13.find(chamberId) == m_dt13.end() && m_dt2.find(chamberId) == m_dt2.end()) { + if (m_debug) std::cout << "AR: pushing back chamber: " << chamberId << std::endl; + m_chamberIds.push_back(chamberId); + //addTrkCovMatrix(chamberId, tsos); // only for the 1st hit + } + if (m_debug) std::cout << "AR: size of chamberId: " << m_chamberIds.size() << std::endl; + + if (m_debug) std::cout << " TrajectoryMeasurement hit dimension: " << trajMeasurementHitDim << std::endl; + if ( trajMeasurementHitDim > 1 ) { + std::vector vDTSeg2D = trajMeasurementHit->recHits(); + if (m_debug) std::cout << " vDTSeg2D size: " << vDTSeg2D.size() << std::endl; + for ( std::vector::const_iterator itDTSeg2D = vDTSeg2D.begin(); + itDTSeg2D != vDTSeg2D.end(); + ++itDTSeg2D ) { + std::vector vDTHits1D = (*itDTSeg2D)->recHits(); + if (m_debug) std::cout << " vDTHits1D size: " << vDTHits1D.size() << std::endl; + for ( std::vector::const_iterator itDTHits1D = vDTHits1D.begin(); + itDTHits1D != vDTHits1D.end(); + ++itDTHits1D ) { + const TrackingRecHit* hit = *itDTHits1D; + if (m_debug) std::cout << " hit dimension: " << hit->dimension() << std::endl; + + DetId hitId = hit->geographicalId(); + const DTSuperLayerId superLayerId(hitId.rawId()); + const DTLayerId layerId(hitId.rawId()); + if (m_debug) std::cout << " hit superLayerId: " << superLayerId.superLayer() << std::endl; + if (m_debug) std::cout << " hit layerId: " << layerId.layer() << std::endl; + + if ( superLayerId.superlayer() == 2 && vDTHits1D.size() >= 3 ) { + if ( m_dt2.find(chamberId) == m_dt2.end() ) { + AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); + m_dt2[chamberId] = new MuonDT2ChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); + if (m_debug) std::cout << " This is first appearance of the DT with hits in superlayer 2" << std::endl; + + } + m_dt2[chamberId]->addResidual(prop, &tsos, hit); + residualDT2IsAdded = true; + + } else if ( (superLayerId.superlayer() == 1 || superLayerId.superlayer() == 3) && vDTHits1D.size() >= 6 ) { + if ( m_dt13.find(chamberId) == m_dt13.end() ) { + AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); + m_dt13[chamberId] = new MuonDT13ChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); + if (m_debug) std::cout << " This is first appearance of the DT with hits in superlayers 1 and 3" << std::endl; + } + m_dt13[chamberId]->addResidual(prop, &tsos, hit); + residualDT13IsAdded = true; + + + } + } + } + } + + if ( residualDT13IsAdded ==true && residualDT2IsAdded == true && chamberId.wheel() == 0 && chamberId.station() == 2 && chamberId.sector() == 7 ) { + if (m_debug) { + std::cout << "MYMARK " << tsosX << " " << hitX << " " << tsosX - hitX << " " << m_dt13[chamberId]->trackx() << " " << m_dt13[chamberId]->residual() + << " " << tsosY << " " << hitY << " " << tsosY - hitY << " " << m_dt2[chamberId]->tracky() << " " << m_dt2[chamberId]->residual() + << " " << tsosF.localPosition().x() << " " << tsosF.localPosition().y() << " " << tsosF.localPosition().z() + << " " << tsosB.localPosition().x() << " " << tsosB.localPosition().y() << " " << tsosB.localPosition().z() + << " " << tsosU.localPosition().x() << " " << tsosU.localPosition().y() << " " << tsosU.localPosition().z() << std::endl; + } + } + + // http://cmslxr.fnal.gov/lxr/source/DataFormats/TrackReco/src/HitPattern.cc#101 + // YP I add false here. No trajectory measurments in Muon system if we corrected TrackTransformer accordingly + } else if ( false && trajMeasurementHitId.subdetId() == MuonSubdetId::CSC ) { + const CSCDetId cscDetId(trajMeasurementHitId.rawId()); + const CSCDetId chamberId2(cscDetId.endcap(), cscDetId.station(), cscDetId.ring(), cscDetId.chamber()); + if (m_debug) std::cout << " TrajectoryMeasurement hit subDet: CSC endcap " << cscDetId.endcap() << " station " << cscDetId.station() << " ring " << cscDetId.ring() << " chamber " << cscDetId.chamber() << std::endl; + if (m_debug) std::cout << " TrajectoryMeasurement hit dimension: " << trajMeasurementHitDim << std::endl; + + if ( trajMeasurementHitDim == 4 ) { + std::vector vCSCHits2D = trajMeasurementHit->recHits(); + if (m_debug) std::cout << " vCSCHits2D size: " << vCSCHits2D.size() << std::endl; + if ( vCSCHits2D.size() >= 5 ) { + for ( std::vector::const_iterator itCSCHits2D = vCSCHits2D.begin(); + itCSCHits2D != vCSCHits2D.end(); + ++itCSCHits2D ) { + const TrackingRecHit* cscHit2D = *itCSCHits2D; + if (m_debug) std::cout << " cscHit2D dimension: " << cscHit2D->dimension() << std::endl; + const TrackingRecHit* hit = cscHit2D; + if (m_debug) std::cout << " hit dimension: " << hit->dimension() << std::endl; + + DetId hitId = hit->geographicalId(); + const CSCDetId cscDetId(hitId.rawId()); + if (m_debug) std::cout << " hit layer: " << cscDetId.layer() << std::endl; + + // not sure why we sometimes get layer == 0 + if (cscDetId.layer() == 0) continue; + + // have we seen this chamber before? + if ( m_csc.find(chamberId2) == m_csc.end() ) { + m_chamberIds.push_back(chamberId2); + //addTrkCovMatrix(chamberId, tsos); // only for the 1st hit + AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId2); + m_csc[chamberId2] = new MuonCSCChamberResidual(globalGeometry, navigator, chamberId2, chamberAlignable); + if (m_debug) std::cout << " This is first appearance of the CSC with hits QQQ" << std::endl; + } + + m_csc[chamberId2]->addResidual(prop, &tsos, hit); + + } + } + } + } else { + if (m_debug) std::cout << " TrajectoryMeasurement hit subDet: UNKNOWN" << std::endl; + if (m_debug) std::cout << "AR: trajMeasurementHitId.det(): " << trajMeasurementHitId.subdetId() << std::endl; + } + } else { + if (m_debug) std::cout << " TrajectoryMeasurement hit det: UNKNOWN" << std::endl; + if (m_debug) std::cout << "AR: trajMeasurementHitId.det(): " << trajMeasurementHitId.det() << std::endl; + if (m_debug) std::cout << "DetId::Tracker: " << DetId::Tracker << std::endl; + } + } + } + + + + + int iT2 = 0, iM2 = 0; + for (trackingRecHit_iterator hit2 = m_recoTrack->recHitsBegin(); hit2 != m_recoTrack->recHitsEnd(); ++hit2) { + if((*hit2)->isValid()) { + DetId hitId2 = (*hit2)->geographicalId(); + if ( hitId2.det() == DetId::Tracker ) { + iT2++; + if (m_debug) std::cout << "Tracker Hit " << iT2 << " is found. We don't calcualte Tsos for it" << std::endl; + } else if ( hitId2.det() == DetId::Muon ){ + // if ( (*hit)->geographicalId().subdetId() == 3 && !theRPCInTheFit ) { + // LogTrace("Reco|TrackingTools|TrackTransformer") << "RPC Rec Hit discarged"; + // continue; + // } + iM2++; + if (m_debug) std::cout << "Muon Hit " << iM2 << " is found. Dimension: " << (*hit2)->dimension() << std::endl; + if ( hitId2.subdetId() == MuonSubdetId::DT ) { + const DTChamberId chamberId(hitId2.rawId()); + if (m_debug) std::cout << "Muon Hit in DT wheel " << chamberId.wheel() << " station " << chamberId.station() << " sector " << chamberId.sector() << std::endl; + + + + if ( (*hit2)->dimension() > 1 ) { + // std::vector vDTSeg2D = (*hit2)->recHits(); + std::vector vDTSeg2D = (*hit2)->recHits(); + + if (m_debug) std::cout << " vDTSeg2D size: " << vDTSeg2D.size() << std::endl; + + // for ( std::vector::const_iterator itDTSeg2D = vDTSeg2D.begin(); + // itDTSeg2D != vDTSeg2D.end(); + // ++itDTSeg2D ) { + + for ( std::vector::const_iterator itDTSeg2D = vDTSeg2D.begin(); + itDTSeg2D != vDTSeg2D.end(); + ++itDTSeg2D ) { + + + // std::vector vDTHits1D = (*itDTSeg2D)->recHits(); + std::vector vDTHits1D = (*itDTSeg2D)->recHits(); + if (m_debug) std::cout << " vDTHits1D size: " << vDTHits1D.size() << std::endl; + // for ( std::vector::const_iterator itDTHits1D = vDTHits1D.begin(); + // itDTHits1D != vDTHits1D.end(); + // ++itDTHits1D ) { + for ( std::vector::const_iterator itDTHits1D = vDTHits1D.begin(); + itDTHits1D != vDTHits1D.end(); + ++itDTHits1D ) { + //const TrackingRecHit* hit = *itDTHits1D; + TrackingRecHit* hit = *itDTHits1D; + if (m_debug) std::cout << " hit dimension: " << hit->dimension() << std::endl; + + DetId hitId = hit->geographicalId(); + const DTSuperLayerId superLayerId(hitId.rawId()); + const DTLayerId layerId(hitId.rawId()); + if (m_debug) std::cout << " hit superLayerId: " << superLayerId.superLayer() << std::endl; + if (m_debug) std::cout << " hit layerId: " << layerId.layer() << std::endl; + + if ( superLayerId.superlayer() == 2 && vDTHits1D.size() >= 3 ) { + if ( m_dt2.find(chamberId) == m_dt2.end() ) { + AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); + m_dt2[chamberId] = new MuonDT2ChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); + if (m_debug) std::cout << " This is first appearance of the DT with hits in superlayer 2" << std::endl; + + // have we seen this chamber before? check if it was in dt13 + if ( m_dt13.find(chamberId) == m_dt13.end() ) { + m_chamberIds.push_back(chamberId); + } + + } + + TrajectoryStateOnSurface extrapolation; + extrapolation = prop->propagate( lastTrackerTsos, globalGeometry->idToDet(hitId)->surface() ); + + if ( extrapolation.isValid() ) { + if (m_debug) { + std::cout << " extrapolation localPosition()" + << " x: " << extrapolation.localPosition().x() + << " y: " << extrapolation.localPosition().y() + << " z: " << extrapolation.localPosition().z() << std::endl; + } + m_dt2[chamberId]->addResidual(prop, &extrapolation, hit); + } + // residualDT2IsAdded = true; + + } else if ( (superLayerId.superlayer() == 1 || superLayerId.superlayer() == 3) && vDTHits1D.size() >= 6 ) { + if ( m_dt13.find(chamberId) == m_dt13.end() ) { + AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); + m_dt13[chamberId] = new MuonDT13ChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); + if (m_debug) std::cout << " This is first appearance of the DT with hits in superlayers 1 and 3" << std::endl; + + // have we seen this chamber before? check if it was in dt2 + if ( m_dt2.find(chamberId) == m_dt2.end() ) { + m_chamberIds.push_back(chamberId); + } + } + + TrajectoryStateOnSurface extrapolation; + extrapolation = prop->propagate( lastTrackerTsos, globalGeometry->idToDet(hitId)->surface() ); + + if ( extrapolation.isValid() ) { + if (m_debug) { + std::cout << " extrapolation localPosition()" + << " x: " << extrapolation.localPosition().x() + << " y: " << extrapolation.localPosition().y() + << " z: " << extrapolation.localPosition().z() << std::endl; + } + m_dt13[chamberId]->addResidual(prop, &extrapolation, hit); + } + // residualDT13IsAdded = true; + + + } + } + } + } + + // std::cout << "Extrapolate last Tracker TSOS to muon hit" << std::endl; + // TrajectoryStateOnSurface extrapolation; + // extrapolation = prop->propagate( lastTrackerTsos, globalGeometry->idToDet(hitId2)->surface() ); + // + // if ( chamberId2.wheel() == 0 && chamberId2.station() == 2 && chamberId2.sector() == 7 ) { + // + // double hitX2 = (*hit2)->localPosition().x(); + // double hitY2 = (*hit2)->localPosition().y(); + // double hitZ2 = (*hit2)->localPosition().z(); + // + // double tsosX2 = extrapolation.localPosition().x(); + // double tsosY2 = extrapolation.localPosition().y(); + // double tsosZ2 = extrapolation.localPosition().z(); + // + // std::cout << "MYMARK " << tsosX2 << " " << hitX2 << " " << tsosX2 - hitX2 << " " << "0" << " " << "0" + // << " " << tsosY2 << " " << hitY2 << " " << tsosY2 - hitY2 << " " << "0" << " " << "0" + // << " 0 0 0 0 0 0 0 0 0 " << std::endl; + //// << " " << tsosF.localPosition().x() << " " << tsosF.localPosition().y() << " " << tsosF.localPosition().z() + //// << " " << tsosB.localPosition().x() << " " << tsosB.localPosition().y() << " " << tsosB.localPosition().z() + //// << " " << tsosU.localPosition().x() << " " << tsosU.localPosition().y() << " " << tsosU.localPosition().z() << std::endl; + // } + + } else if ( hitId2.subdetId() == MuonSubdetId::CSC ) { + const CSCDetId cscDetId2(hitId2.rawId()); + const CSCDetId chamberId(cscDetId2.endcap(), cscDetId2.station(), cscDetId2.ring(), cscDetId2.chamber()); + if (m_debug) std::cout << "Muon hit in CSC endcap " << cscDetId2.endcap() << " station " << cscDetId2.station() << " ring " << cscDetId2.ring() << " chamber " << cscDetId2.chamber() << "." << std::endl; + + + if ( (*hit2)->dimension() == 4 ) { + // std::vector vCSCHits2D = (*hit2)->recHits(); + std::vector vCSCHits2D = (*hit2)->recHits(); + if (m_debug) std::cout << " vCSCHits2D size: " << vCSCHits2D.size() << std::endl; + if ( vCSCHits2D.size() >= 5 ) { + // for ( std::vector::const_iterator itCSCHits2D = vCSCHits2D.begin(); + // itCSCHits2D != vCSCHits2D.end(); + // ++itCSCHits2D ) { + + for ( std::vector::const_iterator itCSCHits2D = vCSCHits2D.begin(); + itCSCHits2D != vCSCHits2D.end(); + ++itCSCHits2D ) { + // const TrackingRecHit* cscHit2D = *itCSCHits2D; + TrackingRecHit* cscHit2D = *itCSCHits2D; + if (m_debug) std::cout << " cscHit2D dimension: " << cscHit2D->dimension() << std::endl; + // const TrackingRecHit* hit = cscHit2D; + TrackingRecHit* hit = cscHit2D; + if (m_debug) std::cout << " hit dimension: " << hit->dimension() << std::endl; + + DetId hitId = hit->geographicalId(); + const CSCDetId cscDetId(hitId.rawId()); + + if (m_debug) { + std::cout << " hit layer: " << cscDetId.layer() << std::endl; + + std::cout << " hit localPosition" + << " x: " << hit->localPosition().x() + << " y: " << hit->localPosition().y() + << " z: " << hit->localPosition().z() + << std::endl; + std::cout << " hit globalPosition" + << " x: " << globalGeometry->idToDet(hitId)->toGlobal(hit->localPosition()).x() + << " y: " << globalGeometry->idToDet(hitId)->toGlobal(hit->localPosition()).y() + << " z: " << globalGeometry->idToDet(hitId)->toGlobal(hit->localPosition()).z() + << std::endl; + } + + // not sure why we sometimes get layer == 0 + if (cscDetId.layer() == 0) continue; + + // have we seen this chamber before? + if (m_debug) std::cout << "Have we seen this chamber before?"; + if ( m_csc.find(chamberId) == m_csc.end() ) { + if (m_debug) std::cout << " NO. m_csc.count() = " << m_csc.count(chamberId) << std::endl; + AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); + m_csc[chamberId] = new MuonCSCChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); + if (m_debug) std::cout << " This is first appearance of the CSC with hits m_csc.count() = " << m_csc.count(chamberId) << std::endl; + m_chamberIds.push_back(chamberId); + //addTrkCovMatrix(chamberId, tsos); // only for the 1st hit + } else { + if (m_debug) std::cout << " YES. m_csc.count() = " << m_csc.count(chamberId) << std::endl; + } + + if (m_debug) { + std::cout << " lastTrackerTsos localPosition" + << " x: " << lastTrackerTsos.localPosition().x() + << " y: " << lastTrackerTsos.localPosition().y() + << " z: " << lastTrackerTsos.localPosition().z() + << std::endl; + std::cout << " lastTrackerTsos globalPosition" + << " x: " << lastTrackerTsos.globalPosition().x() + << " y: " << lastTrackerTsos.globalPosition().y() + << " z: " << lastTrackerTsos.globalPosition().z() + << std::endl; + std::cout << " Do extrapolation from lastTrackerTsos to hit surface" << std::endl; + } + TrajectoryStateOnSurface extrapolation; + extrapolation = prop->propagate( lastTrackerTsos, globalGeometry->idToDet(hitId)->surface() ); + if (m_debug) std::cout << " extrapolation.isValid() = " << extrapolation.isValid() << std::endl; + + if ( extrapolation.isValid() ) { + if (m_debug) { + std::cout << " extrapolation localPosition()" + << " x: " << extrapolation.localPosition().x() + << " y: " << extrapolation.localPosition().y() + << " z: " << extrapolation.localPosition().z() << std::endl; + } + m_csc[chamberId]->addResidual(prop, &extrapolation, hit); + } + } + } + } + + + } else if ( hitId2.subdetId() == MuonSubdetId::RPC ) { + if (m_debug) std::cout << "Muon Hit in RPC" << std::endl; + } else { + if (m_debug) std::cout << "Warning! Muon Hit not in DT or CSC or RPC" << std::endl; + } + // recHitsForRefit.push_back(theMuonRecHitBuilder->build(&**hit)); + if ( hitId2.subdetId() == MuonSubdetId::DT || hitId2.subdetId() == MuonSubdetId::CSC ) { + + } + } + } + } + + + + if (m_debug) std::cout << "END MuonResidualsFromTrack" << std::endl << std::endl; + } + + + MuonResidualsFromTrack::MuonResidualsFromTrack( edm::ESHandle globalGeometry, + const reco::Muon *recoMuon, + AlignableNavigator *navigator, + double maxResidual ) + : m_recoMuon(recoMuon) + { + bool m_debug = false; + + clear(); + assert( m_recoMuon->isTrackerMuon() && m_recoMuon->innerTrack().isNonnull()); + m_recoTrack = m_recoMuon->innerTrack().get(); + + m_tracker_chi2 = m_recoMuon->innerTrack()->chi2(); + m_tracker_numHits = m_recoMuon->innerTrack()->ndof() + 5; + m_tracker_numHits = m_tracker_numHits > 0 ? m_tracker_numHits : 0 ; + + /* + for (trackingRecHit_iterator hit = m_recoMuon->innerTrack()->recHitsBegin(); hit != m_recoMuon->innerTrack()->recHitsEnd(); ++hit) + { + DetId id = (*hit)->geographicalId(); + if (id.det() == DetId::Tracker) + { + m_tracker_numHits++; + if (id.subdetId() == StripSubdetector::TID || id.subdetId() == StripSubdetector::TEC) m_contains_TIDTEC = true; + } + } + */ + + for (std::vector::const_iterator chamberMatch = m_recoMuon->matches().begin(); + chamberMatch != m_recoMuon->matches().end(); chamberMatch++) + { + if (chamberMatch->id.det() != DetId::Muon ) continue; + + for (std::vector::const_iterator segMatch = chamberMatch->segmentMatches.begin(); + segMatch != chamberMatch->segmentMatches.end(); ++segMatch) + { + // select the only segment that belongs to track and is the best in station by dR + if (! (segMatch->isMask(reco::MuonSegmentMatch::BestInStationByDR) && + segMatch->isMask(reco::MuonSegmentMatch::BelongsToTrackByDR)) ) continue; + + if (chamberMatch->id.subdetId() == MuonSubdetId::DT) + { + const DTChamberId chamberId(chamberMatch->id.rawId()); + + DTRecSegment4DRef segmentDT = segMatch->dtSegmentRef; + const DTRecSegment4D* segment = segmentDT.get(); + if (segment == 0) continue; + + if ( segment->hasPhi() && fabs(chamberMatch->x - segMatch->x) > maxResidual ) continue; + if ( segment->hasZed() && fabs(chamberMatch->y - segMatch->y) > maxResidual ) continue; + + // have we seen this chamber before? + if (m_dt13.find(chamberId) == m_dt13.end() && m_dt2.find(chamberId) == m_dt2.end()) { + m_chamberIds.push_back(chamberId); + } + + if (segment->hasZed()) + { + if (m_dt2.find(chamberId) == m_dt2.end()) + { + AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); + // YP + // m_dt2[chamberId] = new MuonTrackDT2ChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); + } + else if (m_debug) std::cout<<"multi segment match to tmuon: dt2 -- should not happen!"<setSegmentResidual(&(*chamberMatch), &(*segMatch)); + } + if (segment->hasPhi()) + { + if (m_dt13.find(chamberId) == m_dt13.end()) + { + AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); + // YP + // m_dt13[chamberId] = new MuonTrackDT13ChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); + } + else if (m_debug) std::cout<<"multi segment match to tmuon: dt13 -- should not happen!"<setSegmentResidual(&(*chamberMatch), &(*segMatch)); + } + } + + else if (chamberMatch->id.subdetId() == MuonSubdetId::CSC) + { + const CSCDetId cscDetId(chamberMatch->id.rawId()); + const CSCDetId chamberId(cscDetId.chamberId()); + + if ( fabs(chamberMatch->x - segMatch->x) > maxResidual ) continue; + + // have we seen this chamber before? + if (m_csc.find(chamberId) == m_csc.end()) + { + m_chamberIds.push_back(chamberId); + AlignableDetOrUnitPtr chamberAlignable = navigator->alignableFromDetId(chamberId); + // YP + // m_csc[chamberId] = new MuonTrackCSCChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); + } + else if (m_debug) std::cout<<"multi segment match to tmuon: csc -- should not happen!"<setSegmentResidual(&(*chamberMatch), &(*segMatch)); + } + + } + } + } + + // This is destructor + // It deletes all chambers residulas + MuonResidualsFromTrack::~MuonResidualsFromTrack() { + for (std::map::const_iterator residual = m_dt13.begin(); residual != m_dt13.end(); ++residual) { + delete residual->second; + } + for (std::map::const_iterator residual = m_dt2.begin(); residual != m_dt2.end(); ++residual) { + delete residual->second; + } + for (std::map::const_iterator residual = m_csc.begin(); residual != m_csc.end(); ++residual) { + delete residual->second; + } + } + + + void MuonResidualsFromTrack::clear() + { + m_tracker_numHits = 0; + m_tracker_chi2 = 0.; + m_contains_TIDTEC = false; + m_chamberIds.clear(); + m_dt13.clear(); + m_dt2.clear(); + m_csc.clear(); + m_trkCovMatrix.clear(); + } + + + double MuonResidualsFromTrack::trackerRedChi2() const + { + if (m_tracker_numHits > 5) return m_tracker_chi2 / double(m_tracker_numHits - 5); + else return -1.; + } + + + double MuonResidualsFromTrack::normalizedChi2() const + { + if (m_recoMuon) return m_recoTrack->normalizedChi2(); + return trackerRedChi2(); + } + + + MuonChamberResidual * MuonResidualsFromTrack::chamberResidual(DetId chamberId, int type) + { + if (type == MuonChamberResidual::kDT13) { + if (m_dt13.find(chamberId) == m_dt13.end()) return NULL; + return m_dt13[chamberId]; + } + else if (type == MuonChamberResidual::kDT2) { + if (m_dt2.find(chamberId) == m_dt2.end()) return NULL; + return m_dt2[chamberId]; + } + else if (type == MuonChamberResidual::kCSC) { + if (m_csc.find(chamberId) == m_csc.end()) return NULL; + return m_csc[chamberId]; + } + else return NULL; + } + + void MuonResidualsFromTrack::addTrkCovMatrix(DetId chamberId, TrajectoryStateOnSurface &tsos) + { + const AlgebraicSymMatrix55 cov55 = tsos.localError().matrix(); + TMatrixDSym cov44(4); + // change indices from q/p,dxdz,dydz,x,y to x,y,dxdz,dydz + int subs[4] = { 3, 4, 1, 2 }; + for (int i=0;i<4;i++) for (int j=0;j<4;j++) cov44(i,j) = cov55( subs[i], subs[j] ); + m_trkCovMatrix[chamberId] = cov44; + } + + TMatrixDSym MuonResidualsFromTrack::covMatrix(DetId chamberId) + { + bool m_debug = false; + + TMatrixDSym result(4); + if (m_debug) std::cout<<"MuonResidualsFromTrack:: cov initial:"<residual_error(); + result(0,0) += r_err*r_err; + r_err = m_csc[chamberId]->resslope_error(); + result(2,2) += r_err*r_err; + } + if (m_dt13.find(chamberId) == m_dt13.end()) + { + r_err = m_dt13[chamberId]->residual_error(); + result(0,0) += r_err*r_err; + r_err = m_dt13[chamberId]->resslope_error(); + result(2,2) += r_err*r_err; + } + if (m_dt2.find(chamberId) == m_dt2.end()) + { + r_err = m_dt2[chamberId]->residual_error(); + result(1,1) += r_err*r_err; + r_err = m_dt2[chamberId]->resslope_error(); + result(3,3) += r_err*r_err; + } + if (m_debug) std::cout<<"MuonResidualsFromTrack:: cov after:"< globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable) + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable) : MuonChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) { m_type = MuonChamberResidual::kCSC; @@ -19,7 +19,8 @@ MuonTrackCSCChamberResidual::MuonTrackCSCChamberResidual(edm::ESHandleid.rawId()); - + CSCDetId chamber(id.chamberId()); + CSCSegmentRef segmentCSC = seg->cscSegmentRef; if (segmentCSC.get() != 0) { diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT13ChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT13ChamberResidual.cc index 9aa4ee1e8b0a0..0dd4a60a09325 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT13ChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT13ChamberResidual.cc @@ -6,7 +6,7 @@ MuonTrackDT13ChamberResidual::MuonTrackDT13ChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable) + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable) : MuonChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) { m_type = MuonChamberResidual::kDT13; diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT2ChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT2ChamberResidual.cc index a955da7b4dbc7..f0ffe3e410ed5 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT2ChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackDT2ChamberResidual.cc @@ -5,7 +5,7 @@ #include "Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h" MuonTrackDT2ChamberResidual::MuonTrackDT2ChamberResidual(edm::ESHandle globalGeometry, AlignableNavigator *navigator, - DetId chamberId, const AlignableDetOrUnitPtr& chamberAlignable) + DetId chamberId, AlignableDetOrUnitPtr chamberAlignable) : MuonChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable) { m_type = MuonChamberResidual::kDT2; diff --git a/Alignment/MuonAlignmentAlgorithms/test/StandAloneTest.cc b/Alignment/MuonAlignmentAlgorithms/test/StandAloneTest.cc index 64dbb47d4ca05..7ffbba0aa07e0 100644 --- a/Alignment/MuonAlignmentAlgorithms/test/StandAloneTest.cc +++ b/Alignment/MuonAlignmentAlgorithms/test/StandAloneTest.cc @@ -48,6 +48,11 @@ #include "Alignment/MuonAlignment/interface/MuonAlignment.h" #include "Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFromTrack.h" +#include "TrackingTools/Records/interface/TrackingComponentsRecord.h" +#include "TrackingTools/GeomPropagators/interface/Propagator.h" +#include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" +#include "MagneticField/Engine/interface/MagneticField.h" + // // class decleration // @@ -143,6 +148,11 @@ StandAloneTest::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) edm::ESHandle cscGeometry; iSetup.get().get(cscGeometry); + edm::ESHandle prop; + iSetup.get().get("SteppingHelixPropagatorAny",prop); + edm::ESHandle magneticField; + iSetup.get().get(magneticField); + // loop over tracks for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++track) { // find the corresponding refitted trajectory @@ -157,7 +167,7 @@ StandAloneTest::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) if (track->pt() > 20. && traj != NULL && traj->isValid()) { // calculate all residuals on this track - MuonResidualsFromTrack muonResidualsFromTrack(globalGeometry, traj, &(*track), m_muonAlignment->getAlignableNavigator(), 1000.); + MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, prop, traj, &(*track), m_muonAlignment->getAlignableNavigator(), 1000.); std::vector chamberIds = muonResidualsFromTrack.chamberIds(); // if the tracker part of refit is okay From 24dbdf3ca6acafcf3f46b054cdc4ecdf9e7615d2 Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Fri, 15 Jan 2016 00:04:05 +0100 Subject: [PATCH 017/250] Change input tag in gather_cfg --- Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py b/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py index b63ada7535357..c66e1950925a6 100644 --- a/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py +++ b/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py @@ -235,9 +235,9 @@ else: process.Path = cms.Path(process.offlineBeamSpot * process.MuonAlignmentFromReferenceGlobalCosmicRefit) process.looper.tjTkAssociationMapTag = cms.InputTag("MuonAlignmentFromReferenceGlobalCosmicRefit:Refitted") else: - process.MuonAlignmentPreFilter.tracksTag = cms.InputTag("ALCARECOMuAlCalIsolatedMu:GlobalMuon") - #process.MuonAlignmentPreFilter.tracksTag = cms.InputTag("globalMuons") - #process.MuonAlignmentFromReferenceGlobalMuonRefit.Tracks = cms.InputTag("globalMuons") + #process.MuonAlignmentPreFilter.tracksTag = cms.InputTag("ALCARECOMuAlCalIsolatedMu:GlobalMuon") + process.MuonAlignmentPreFilter.tracksTag = cms.InputTag("globalMuons") + process.MuonAlignmentFromReferenceGlobalMuonRefit.Tracks = cms.InputTag("globalMuons") if preFilter: process.Path = cms.Path(process.offlineBeamSpot * process.MuonAlignmentPreFilter * process.MuonAlignmentFromReferenceGlobalMuonRefit) else: process.Path = cms.Path(process.offlineBeamSpot * process.MuonAlignmentFromReferenceGlobalMuonRefit) process.looper.tjTkAssociationMapTag = cms.InputTag("MuonAlignmentFromReferenceGlobalMuonRefit:Refitted") From 240946a104b818bafa04c633b4e0f83b194d956f Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Fri, 15 Jan 2016 00:07:14 +0100 Subject: [PATCH 018/250] Change minimal required size of tmp files --- Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py b/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py index 51c85bb3157ec..aed381e08fd3b 100755 --- a/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py +++ b/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py @@ -496,7 +496,7 @@ def writeAlignCfg(fname, my_vars): fi cd $ALIGNMENT_CAFDIR/ -export ALIGNMENT_ALIGNMENTTMP=`find alignment*.tmp -maxdepth 1 -size +12000k -print 2> /dev/null` +export ALIGNMENT_ALIGNMENTTMP=`find alignment*.tmp -maxdepth 1 -size +1k -print 2> /dev/null` ls -l cmsRun align_cfg.py @@ -507,7 +507,7 @@ def writeAlignCfg(fname, my_vars): cd $ALIGNMENT_AFSDIR ./Alignment/MuonAlignmentAlgorithms/scripts/convertSQLiteXML.py %(directory)s%(director)s.db %(directory)s%(director)s.xml --noLayers --gprcdconnect $ALIGNMENT_GPRCDCONNECT --gprcd $ALIGNMENT_GPRCD -export ALIGNMENT_ALIGNMENTTMP=`find %(directory)salignment*.tmp -maxdepth 1 -size +12000k -print 2> /dev/null` +export ALIGNMENT_ALIGNMENTTMP=`find %(directory)salignment*.tmp -maxdepth 1 -size +1k -print 2> /dev/null` if [ \"$ALIGNMENT_CLEANUP\" == \"True\" ] && [ \"zzz$ALIGNMENT_ALIGNMENTTMP\" != \"zzz\" ]; then rm $ALIGNMENT_ALIGNMENTTMP echo " " From 6370ff086a08630e471b8e27cb9259874ae0e846 Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Fri, 15 Jan 2016 00:11:30 +0100 Subject: [PATCH 019/250] Do not email status of gather jobs --- Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py b/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py index aed381e08fd3b..e42ee07c67945 100755 --- a/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py +++ b/Alignment/MuonAlignmentAlgorithms/scripts/createJobs.py @@ -703,8 +703,7 @@ def writeValidationCfg(fname, my_vars): if options.big: queue = "cmscaf1nd" else: queue = "cmscaf1nh" - if user_mail: bsubfile.append("bsub -R \"type==SLC6_64\" -q %s -J \"%s_gather%03d\" -u %s %s gather%03d.sh" % (queue, director, jobnumber, user_mail, waiter, jobnumber)) - else: bsubfile.append("bsub -R \"type==SLC6_64\" -q %s -J \"%s_gather%03d\" %s gather%03d.sh" % (queue, director, jobnumber, waiter, jobnumber)) + bsubfile.append("bsub -R \"type==SLC6_64\" -q %s -J \"%s_gather%03d\" -u youremail.tamu.edu %s gather%03d.sh" % (queue, director, jobnumber, waiter, jobnumber)) bsubnames.append("ended(%s_gather%03d)" % (director, jobnumber)) From 19bfe34c82dc84acf3a38ddd3a641c60f7e8bc04 Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Fri, 15 Jan 2016 00:14:44 +0100 Subject: [PATCH 020/250] Initial implementation of chi2 quality requirement --- .../plugins/MuonAlignmentFromReference.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc index 193293c1eff8b..4cd0f39bff000 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc @@ -560,6 +560,7 @@ void MuonAlignmentFromReference::processMuonResidualsFromTrack(MuonResidualsFrom { m_counter_station123aligning++; if (fabs(dt2->resslope()) < m_maxResSlopeY) + if (fabs(dt2->resslope()) < m_maxResSlopeY && (dt2->chi2() / double(dt2->ndof())) < 2.0) { m_counter_resslopey++; double *residdata = new double[MuonResiduals6DOFFitter::kNData]; From 6896a62bf007d79296b293954cfc1f9f0f2922b5 Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Fri, 15 Jan 2016 00:17:16 +0100 Subject: [PATCH 021/250] Reformulate fiducial cuts --- .../src/MuonResidualsFitter.cc | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc index 74f0f7907f76e..56621c2c6b63f 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFitter.cc @@ -734,20 +734,10 @@ void MuonResidualsFitter::fiducialCuts(double xMin, double xMax, double yMin, do if (!m_residuals_ok[iResidual]) continue; double positionX = (*r)[4]; - if (positionX >= xMin && positionX <= xMax) { - std::cout << "Residual within fiducial cuts: xMin = " << xMin << " x = " << positionX << " xMax = " << xMax << std::endl; - } else { - std::cout << "Residual outside fiducial cuts: xMin = " << xMin << " x = " << positionX << " xMax = " << xMax << std::endl; - m_residuals_ok[iResidual] = false; - } + if (positionX < xMin || positionX > xMax) m_residuals_ok[iResidual] = false; double positionY = (*r)[5]; - if (positionY >= yMin && positionY <= yMax) { - std::cout << "Residual within fiducial cuts: yMin = " << yMin << " y = " << positionY << " yMax = " << yMax << std::endl; - } else { - std::cout << "Residual outside fiducial cuts: yMin = " << yMin << " y = " << positionY << " yMax = " << yMax << std::endl; - m_residuals_ok[iResidual] = false; - } + if (positionY < yMin || positionY > yMax) m_residuals_ok[iResidual] = false; } } From 5cc83fc784365238f44077e04b306077bce2b8f5 Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Fri, 15 Jan 2016 00:20:22 +0100 Subject: [PATCH 022/250] Add chi2 quality requirement in alignment monitors --- .../plugins/AlignmentMonitorMuonSystemMap1D.cc | 2 +- .../plugins/AlignmentMonitorSegmentDifferences.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc index b65d9e92c02cc..996fb02939067 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc @@ -348,7 +348,7 @@ void AlignmentMonitorMuonSystemMap1D::processMuonResidualsFromTrack(MuonResidual m_counter_dt++; - if (id.station() < 4 && dt13 != NULL && dt13->numHits() >= m_minDT13Hits && dt2 != NULL && dt2->numHits() >= m_minDT2Hits) + if (id.station() < 4 && dt13 != NULL && dt13->numHits() >= m_minDT13Hits && dt2 != NULL && dt2->numHits() >= m_minDT2Hits && (dt2->chi2() / double(dt2->ndof())) < 2.0) { m_counter_13numhits++; diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc index bcfc47fcd4ede..1b1cfe6364c04 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc @@ -489,7 +489,7 @@ void AlignmentMonitorSegmentDifferences::processMuonResidualsFromTrack(MuonResid } // end if DT13 // z-direction - if (dt2 != NULL && dt2->numHits() >= m_minDT2Hits) + if (dt2 != NULL && dt2->numHits() >= m_minDT2Hits && (dt2->chi2() / double(dt2->ndof())) < 2.0) { DTChamberId thisid(chamberId->rawId()); for (std::vector::const_iterator otherId = chamberIds.begin(); otherId != chamberIds.end(); ++otherId) From 7dc0406eaf8a5f68c3d3d5b18265c2b97547dc52 Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Fri, 15 Jan 2016 03:44:11 +0100 Subject: [PATCH 023/250] Add implementation of new fiducial cuts --- .../AlignmentMonitorMuonSystemMap1D.cc | 6 +- .../AlignmentMonitorMuonVsCurvature.cc | 6 +- .../AlignmentMonitorSegmentDifferences.cc | 7 +- .../MuonAlignmentAlgorithms/BuildFile.xml | 2 + .../interface/MuonCSCChamberResidual.h | 2 +- .../interface/MuonChamberResidual.h | 9 ++- .../interface/MuonDT13ChamberResidual.h | 2 +- .../interface/MuonDT2ChamberResidual.h | 4 +- .../interface/MuonHitsChamberResidual.h | 2 + .../interface/MuonResiduals5DOFFitter.h | 5 ++ .../interface/MuonResiduals6DOFFitter.h | 5 ++ .../interface/MuonResidualsFitter.h | 4 +- .../interface/MuonResidualsFromTrack.h | 2 + .../plugins/MuonAlignmentFromReference.cc | 17 ++++- .../python/gather_cfg.py | 16 +++- .../src/MuonCSCChamberResidual.cc | 2 +- .../src/MuonChamberResidual.cc | 2 + .../src/MuonDT13ChamberResidual.cc | 6 +- .../src/MuonDT2ChamberResidual.cc | 5 +- .../src/MuonHitsChamberResidual.cc | 4 + .../src/MuonResidualsFitter.cc | 75 +++++++++++++++++-- .../src/MuonResidualsFromTrack.cc | 21 ++++-- .../test/StandAloneTest.cc | 4 +- 23 files changed, 179 insertions(+), 29 deletions(-) diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc index 996fb02939067..24a282ffcef0a 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonSystemMap1D.cc @@ -26,6 +26,7 @@ #include "TrackingTools/Records/interface/TrackingComponentsRecord.h" #include "TrackingTools/GeomPropagators/interface/Propagator.h" +#include "TrackingTools/TrackAssociator/interface/DetIdAssociator.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" #include "MagneticField/Engine/interface/MagneticField.h" @@ -265,6 +266,9 @@ void AlignmentMonitorMuonSystemMap1D::event(const edm::Event &iEvent, const edm: edm::Handle beamSpot; iEvent.getByLabel(m_beamSpotTag, beamSpot); + edm::ESHandle muonDetIdAssociator_; + iSetup.get().get("MuonDetIdAssociator", muonDetIdAssociator_); + edm::ESHandle prop; iSetup.get().get("SteppingHelixPropagatorAny",prop); @@ -286,7 +290,7 @@ void AlignmentMonitorMuonSystemMap1D::event(const edm::Event &iEvent, const edm: { m_counter_trackdxy++; - MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, prop, traj, track, pNavigator(), 1000.); + MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, muonDetIdAssociator_, prop, traj, track, pNavigator(), 1000.); processMuonResidualsFromTrack(muonResidualsFromTrack, iEvent); } } // end if track has acceptable momentum diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc index dea083f31b9dc..f77eacacdedef 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorMuonVsCurvature.cc @@ -26,6 +26,7 @@ #include "TrackingTools/Records/interface/TrackingComponentsRecord.h" #include "TrackingTools/GeomPropagators/interface/Propagator.h" +#include "TrackingTools/TrackAssociator/interface/DetIdAssociator.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" #include "MagneticField/Engine/interface/MagneticField.h" @@ -196,6 +197,9 @@ void AlignmentMonitorMuonVsCurvature::event(const edm::Event &iEvent, const edm: edm::Handle beamSpot; iEvent.getByLabel(m_beamSpotTag, beamSpot); + edm::ESHandle muonDetIdAssociator_; + iSetup.get().get("MuonDetIdAssociator", muonDetIdAssociator_); + edm::ESHandle prop; iSetup.get().get("SteppingHelixPropagatorAny",prop); @@ -211,7 +215,7 @@ void AlignmentMonitorMuonVsCurvature::event(const edm::Event &iEvent, const edm: if (track->pt() > m_minTrackPt && track->p() > m_minTrackP && fabs(track->dxy(beamSpot->position())) < m_maxDxy ) { - MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, prop, traj, track, pNavigator(), 1000.); + MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, muonDetIdAssociator_, prop, traj, track, pNavigator(), 1000.); processMuonResidualsFromTrack(muonResidualsFromTrack, traj ); } // end if track pT is within range } // end loop over tracks diff --git a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc index 1b1cfe6364c04..11d05ee68f024 100644 --- a/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc +++ b/Alignment/CommonAlignmentMonitor/plugins/AlignmentMonitorSegmentDifferences.cc @@ -26,6 +26,7 @@ #include "TrackingTools/Records/interface/TrackingComponentsRecord.h" #include "TrackingTools/GeomPropagators/interface/Propagator.h" +#include "TrackingTools/TrackAssociator/interface/DetIdAssociator.h" #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" #include "MagneticField/Engine/interface/MagneticField.h" @@ -348,6 +349,10 @@ void AlignmentMonitorSegmentDifferences::event(const edm::Event &iEvent, const e edm::Handle beamSpot; iEvent.getByLabel(m_beamSpotTag, beamSpot); + edm::ESHandle muonDetIdAssociator_; + iSetup.get().get("MuonDetIdAssociator", muonDetIdAssociator_); + + edm::ESHandle prop; iSetup.get().get("SteppingHelixPropagatorAny",prop); @@ -363,7 +368,7 @@ void AlignmentMonitorSegmentDifferences::event(const edm::Event &iEvent, const e if (track->pt() > m_minTrackPt && track->p() > m_minTrackP && fabs(track->dxy(beamSpot->position())) < m_maxDxy ) { - MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, prop, traj, track, pNavigator(), 1000.); + MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry,muonDetIdAssociator_, prop, traj, track, pNavigator(), 1000.); processMuonResidualsFromTrack(muonResidualsFromTrack); } } // end loop over tracks diff --git a/Alignment/MuonAlignmentAlgorithms/BuildFile.xml b/Alignment/MuonAlignmentAlgorithms/BuildFile.xml index 80676ccc21abb..7829968670d56 100644 --- a/Alignment/MuonAlignmentAlgorithms/BuildFile.xml +++ b/Alignment/MuonAlignmentAlgorithms/BuildFile.xml @@ -16,6 +16,8 @@ + + diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h index 6faad479ad978..5ea3649752b11 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonCSCChamberResidual.h @@ -19,7 +19,7 @@ class MuonCSCChamberResidual: public MuonHitsChamberResidual // for CSC, the residual is chamber local x, projected by the strip measurement direction // for CSC, the resslope is dresx/dz, or tan(phi_y) - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit); + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double, double); // dummy method virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) {} diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonChamberResidual.h index a6753b9a237ee..d3fe799aa1961 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonChamberResidual.h @@ -39,7 +39,7 @@ class MuonChamberResidual virtual ~MuonChamberResidual() {} // has to be implemented for rechit based residuals - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *, const TrackingRecHit *) = 0; + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *, const TrackingRecHit *, double, double) = 0; // has to be implemented for track muon segment residuals virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) = 0; @@ -67,11 +67,15 @@ class MuonChamberResidual double trackx() const { return m_trackx; } double tracky() const { return m_tracky; } + double ChambW() const { return m_ChambW; } + double Chambl() const { return m_Chambl; } + double segdxdz() const { return m_segdxdz; } double segdydz() const { return m_segdydz; } double segx() const { return m_segx; } double segy() const { return m_segy; } + align::GlobalPoint global_trackpos(); align::GlobalPoint global_stubpos(); double global_residual() const; @@ -113,6 +117,9 @@ class MuonChamberResidual double m_segdydz; double m_segx; double m_segy; + double m_ChambW; + double m_Chambl; + }; diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h index 4fce2c50f25ec..899457614b8d0 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT13ChamberResidual.h @@ -20,7 +20,7 @@ class MuonDT13ChamberResidual: public MuonHitsChamberResidual // for DT13, the residual is chamber local x // for DT13, the resslope is dresx/dz, or tan(phi_y) - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit); + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double, double); // dummy method virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) {} diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h index 3529b679b58f8..0a63dfcd93de6 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonDT2ChamberResidual.h @@ -9,8 +9,6 @@ */ #include "Alignment/MuonAlignmentAlgorithms/interface/MuonHitsChamberResidual.h" -#include "TrackingTools/Records/interface/TrackingComponentsRecord.h" -#include "TrackingTools/GeomPropagators/interface/Propagator.h" class MuonDT2ChamberResidual: public MuonHitsChamberResidual { @@ -20,7 +18,7 @@ class MuonDT2ChamberResidual: public MuonHitsChamberResidual // for DT2, the residual is chamber local y // for DT2, the resslope is dresy/dz, or tan(phi_x) - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit); + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double); // dummy method virtual void setSegmentResidual(const reco::MuonChamberMatch *, const reco::MuonSegmentMatch *) {} diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonHitsChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonHitsChamberResidual.h index 6a26c0fd23781..7e4748e145945 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonHitsChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonHitsChamberResidual.h @@ -30,6 +30,8 @@ class MuonHitsChamberResidual : public MuonChamberResidual protected: + double m_chamber_width; + double m_chamber_length; double m_residual_1; double m_residual_x; double m_residual_y; diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals5DOFFitter.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals5DOFFitter.h index 3e06a3bf4aa68..d06d4bffb1038 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals5DOFFitter.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals5DOFFitter.h @@ -43,6 +43,11 @@ class MuonResiduals5DOFFitter: public MuonResidualsFitter kPz, kPt, kCharge, + kStation, + kWheel, + kSector, + kChambW, + kChambl, kNData }; diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFFitter.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFFitter.h index 19acffe1e1600..dc7a9b20c09e5 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFFitter.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResiduals6DOFFitter.h @@ -51,6 +51,11 @@ class MuonResiduals6DOFFitter: public MuonResidualsFitter kPz, kPt, kCharge, + kStation, + kWheel, + kSector, + kChambW, + kChambl, kNData }; diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h index 348b9e0ca154d..d0b214fbb1744 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFitter.h @@ -203,7 +203,9 @@ class MuonResidualsFitter void selectPeakResiduals_simple(double nsigma, int nvar, int *vars); void selectPeakResiduals(double nsigma, int nvar, int *vars); - void fiducialCuts(double xMin = -1000, double xMax = 1000, double yMin = -1000, double yMax = 1000); + // void fiducialCuts(double xMin = -1000, double xMax = 1000, double yMin = -1000, double yMax = 1000, bool fidcut1=true); // "No fiducial cut" + // void fiducialCuts(double xMin = -80.0, double xMax = 80.0, double yMin = -80.0, double yMax = 80.0, bool fidcut1=true); // "old" fiducial cut + void fiducialCuts(double xMin = -80.0, double xMax = 80.0, double yMin = -80.0, double yMax = 80.0, bool fidcut1=false); // "new" fiducial cut virtual void correctBField() = 0; virtual void correctBField(int idx_momentum, int idx_q); diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFromTrack.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFromTrack.h index 360b69d152314..47e7714329090 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFromTrack.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonResidualsFromTrack.h @@ -20,6 +20,7 @@ #include "DataFormats/MuonReco/interface/Muon.h" #include "DataFormats/MuonReco/interface/MuonFwd.h" #include "DataFormats/TrackReco/interface/Track.h" +#include "TrackingTools/TrackAssociator/interface/DetIdAssociator.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" @@ -55,6 +56,7 @@ class MuonResidualsFromTrack MuonResidualsFromTrack( const edm::EventSetup& iSetup, edm::ESHandle magneticField, edm::ESHandle globalGeometry, + edm::ESHandle muonDetIdAssociator_, edm::ESHandle prop, const Trajectory *traj, const reco::Track* recoTrack, diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc index 4cd0f39bff000..a4183ddd641db 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc @@ -443,6 +443,10 @@ void MuonAlignmentFromReference::run(const edm::EventSetup& iSetup, const EventI edm::ESHandle prop; iSetup.get().get("SteppingHelixPropagatorAny",prop); + edm::ESHandle muonDetIdAssociator_; + iSetup.get().get("MuonDetIdAssociator", muonDetIdAssociator_); + + if (m_muonCollectionTag.label().empty()) // use trajectories { if (m_debug) std::cout << "JUST BEFORE LOOP OVER trajTrackPairs" << std::endl; @@ -464,7 +468,7 @@ void MuonAlignmentFromReference::run(const edm::EventSetup& iSetup, const EventI { m_counter_trackdxy++; if (m_debug) std::cout << "JUST BEFORE muonResidualsFromTrack" << std::endl; - MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, prop, traj, track, m_alignableNavigator, 1000.); + MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, muonDetIdAssociator_, prop, traj, track, m_alignableNavigator, 1000.); if (m_debug) std::cout << "JUST AFTER muonResidualsFromTrack" << std::endl; if (m_debug) std::cout << "JUST BEFORE PROCESS" << std::endl; @@ -559,7 +563,6 @@ void MuonAlignmentFromReference::processMuonResidualsFromTrack(MuonResidualsFrom if (fitter != m_fitters.end()) { m_counter_station123aligning++; - if (fabs(dt2->resslope()) < m_maxResSlopeY) if (fabs(dt2->resslope()) < m_maxResSlopeY && (dt2->chi2() / double(dt2->ndof())) < 2.0) { m_counter_resslopey++; @@ -576,6 +579,11 @@ void MuonAlignmentFromReference::processMuonResidualsFromTrack(MuonResidualsFrom residdata[MuonResiduals6DOFFitter::kPz] = mrft.getTrack()->pz(); residdata[MuonResiduals6DOFFitter::kPt] = mrft.getTrack()->pt(); residdata[MuonResiduals6DOFFitter::kCharge] = mrft.getTrack()->charge(); + residdata[MuonResiduals6DOFFitter::kStation] = DTChamberId(chamberId->rawId()).station(); + residdata[MuonResiduals6DOFFitter::kWheel] = DTChamberId(chamberId->rawId()).wheel(); + residdata[MuonResiduals6DOFFitter::kSector] = DTChamberId(chamberId->rawId()).sector(); + residdata[MuonResiduals6DOFFitter::kChambW] = dt13->ChambW(); + residdata[MuonResiduals6DOFFitter::kChambl] = dt13->Chambl(); if (m_debug) { std::cout << "processMuonResidualsFromTrack 6DOF dt13->residual() " << dt13->residual() << std::endl; @@ -628,6 +636,11 @@ void MuonAlignmentFromReference::processMuonResidualsFromTrack(MuonResidualsFrom residdata[MuonResiduals5DOFFitter::kPz] = mrft.getTrack()->pz(); residdata[MuonResiduals5DOFFitter::kPt] = mrft.getTrack()->pt(); residdata[MuonResiduals5DOFFitter::kCharge] = mrft.getTrack()->charge(); + residdata[MuonResiduals5DOFFitter::kStation] = DTChamberId(chamberId->rawId()).station(); + residdata[MuonResiduals5DOFFitter::kWheel] = DTChamberId(chamberId->rawId()).wheel(); + residdata[MuonResiduals5DOFFitter::kSector] = DTChamberId(chamberId->rawId()).sector(); + residdata[MuonResiduals5DOFFitter::kChambW] = dt13->ChambW(); + residdata[MuonResiduals5DOFFitter::kChambl] = dt13->Chambl(); if (m_debug) { std::cout << "processMuonResidualsFromTrack 5DOF dt13->residual() " << dt13->residual() << std::endl; diff --git a/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py b/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py index c66e1950925a6..0b5898e416274 100644 --- a/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py +++ b/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py @@ -102,6 +102,18 @@ process = cms.Process("GATHER") +process.load("Geometry.MuonNumbering.muonNumberingInitialization_cfi") +process.load("Geometry.DTGeometry.dtGeometry_cfi") +process.load("Geometry.RPCGeometry.rpcGeometry_cfi") +process.load("Geometry.CSCGeometry.cscGeometry_cfi") +process.load("Geometry.CommonDetUnit.bareGlobalTrackingGeometry_cfi") + +#add TrackDetectorAssociator lookup maps to the EventSetup +process.load("TrackingTools.TrackAssociator.DetIdAssociatorESProducer_cff") +from TrackingTools.TrackAssociator.DetIdAssociatorESProducer_cff import * +from TrackingTools.TrackAssociator.default_cfi import * + + process.load("Configuration.StandardSequences.Reconstruction_cff") process.MuonNumberingInitialization = cms.ESProducer("MuonNumberingInitialization") @@ -112,7 +124,7 @@ ) process.load("Configuration.StandardSequences.GeometryDB_cff") -process.load("Configuration.StandardSequences.MagneticField_cff") +process.load('Configuration.StandardSequences.MagneticField_38T_PostLS1_cff') if len(good_lumis)>0: process.source = cms.Source("PoolSource", @@ -218,7 +230,7 @@ process.looper.monitorConfig.AlignmentMonitorMuonVsCurvature.doDT = doDT process.looper.monitorConfig.AlignmentMonitorMuonVsCurvature.doCSC = doCSC -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") process.GlobalTag.globaltag = cms.string(globaltag) process.looper.applyDbAlignment = True process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi") diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonCSCChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonCSCChamberResidual.cc index 92b75ed060735..1e35c7f9cbc41 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonCSCChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonCSCChamberResidual.cc @@ -18,7 +18,7 @@ MuonCSCChamberResidual::MuonCSCChamberResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit) +void MuonCSCChamberResidual::addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double chamber_width, double chamber_length) { bool m_debug = false; diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonChamberResidual.cc index 623c64f102c38..c4490a3c5c148 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonChamberResidual.cc @@ -36,6 +36,8 @@ MuonChamberResidual::MuonChamberResidual(edm::ESHandle g , m_segdydz(-999.) , m_segx(-999.) , m_segy(-999.) + , m_ChambW(-999) + , m_Chambl(-999) {} diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonDT13ChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonDT13ChamberResidual.cc index b397c69dcd1ef..78fe0c428b972 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonDT13ChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonDT13ChamberResidual.cc @@ -18,10 +18,14 @@ MuonDT13ChamberResidual::MuonDT13ChamberResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit) +void MuonDT13ChamberResidual::addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double chamber_width, double chamber_length) { bool m_debug = false; + m_chamber_width = chamber_width; + m_chamber_length = chamber_length; + + DetId id = hit->geographicalId(); align::LocalPoint hitChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(hit->localPosition())); diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonDT2ChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonDT2ChamberResidual.cc index 3ca2ce097370d..5a737b272c04b 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonDT2ChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonDT2ChamberResidual.cc @@ -16,10 +16,13 @@ MuonDT2ChamberResidual::MuonDT2ChamberResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit) +void MuonDT2ChamberResidual::addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double chamber_width,double chamber_length) { bool m_debug = false; + m_chamber_width = chamber_width; + m_chamber_length = chamber_length; + DetId id = hit->geographicalId(); align::LocalPoint hitChamberPos = m_chamberAlignable->surface().toLocal(m_globalGeometry->idToDet(id)->toGlobal(hit->localPosition())); diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonHitsChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonHitsChamberResidual.cc index 3f31b7f96a441..1988412f0765c 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonHitsChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonHitsChamberResidual.cc @@ -10,6 +10,7 @@ MuonHitsChamberResidual::MuonHitsChamberResidual(edm::ESHandle::const_iterator r = residuals_begin(); r != residuals_end(); ++r) { iResidual++; if (!m_residuals_ok[iResidual]) continue; + + if( (*r)[15]>0.0001 ) { // this value is greater than zero (chamber width) for 6DOFs stations 1,2,3 better to change for type()!!! + n_station = (*r)[12]; + n_wheel = (*r)[13]; + n_sector = (*r)[14]; + positionX = (*r)[4]; + positionY = (*r)[5]; + chambw = (*r)[15]; + chambl = (*r)[16]; + } + else{ // in case of 5DOF residual the residual object index is different + n_station = (*r)[10]; + n_wheel = (*r)[11]; + n_sector = (*r)[12]; + positionX = (*r)[2]; + positionY = (*r)[3]; + chambw = (*r)[13]; + chambl = (*r)[14]; + } + - double positionX = (*r)[4]; - if (positionX < xMin || positionX > xMax) m_residuals_ok[iResidual] = false; + if(fidcut1){ // this is the standard fiducial cut used so far 80x80 cm in x,y + if (positionX >= xMax || positionX <= xMin) m_residuals_ok[iResidual] = false; + if (positionY >= yMax || positionY <= yMin) m_residuals_ok[iResidual] = false; + } - double positionY = (*r)[5]; - if (positionY < yMin || positionY > yMax) m_residuals_ok[iResidual] = false; + // Implementation of new fiducial cut + + double dtrkchamx = (chambw/2.) - positionX; // variables to cut tracks on the edge of the chambers + double dtrkchamy = (chambl/2.) - positionY; + + if(!fidcut1){ + + + if(n_station==4){ + if( (n_wheel==-1 && n_sector==3) || (n_wheel==1 && n_sector==4)){ // FOR SHORT CHAMBER LENGTH IN: WHEEL 1 SECTOR 4 AND WHEEL -1 SECTOR 3 + if( (n_sector==1 || n_sector==2 || n_sector==3 || n_sector==5 || n_sector==6 || n_sector==7 || n_sector==8 || n_sector==12) && ( (dtrkchamx<40 || dtrkchamx>380) || (dtrkchamy<40.0 || dtrkchamy>170.0)) ) m_residuals_ok[iResidual] = false; + if( (n_sector==4 || n_sector==13) && ( (dtrkchamx<40 || dtrkchamx>280) || (dtrkchamy<40.0 || dtrkchamy>170.0)) ) m_residuals_ok[iResidual] = false; + if( (n_sector==9 || n_sector==11) && ( (dtrkchamx<40 || dtrkchamx>180) || (dtrkchamy<40.0 || dtrkchamy>170.0)) ) m_residuals_ok[iResidual] = false; + if( (n_sector==10 || n_sector==14) && ( (dtrkchamx<40 || dtrkchamx>220) || (dtrkchamy<40.0 || dtrkchamy>170.0)) ) m_residuals_ok[iResidual] = false; + } + else{ + if( (n_sector==1 || n_sector==2 || n_sector==3 || n_sector==5 || n_sector==6 || n_sector==7 || n_sector==8 || n_sector==12) && ( (dtrkchamx<40 || dtrkchamx>380) || (dtrkchamy<40.0 || dtrkchamy>210.0)) ) m_residuals_ok[iResidual] = false; + if( (n_sector==4 || n_sector==13) && ( (dtrkchamx<40 || dtrkchamx>280) || (dtrkchamy<40.0 || dtrkchamy>210.0)) ) m_residuals_ok[iResidual] = false; + if( (n_sector==9 || n_sector==11) && ( (dtrkchamx<40 || dtrkchamx>180) || (dtrkchamy<40.0 || dtrkchamy>210.0)) ) m_residuals_ok[iResidual] = false; + if( (n_sector==10 || n_sector==14) && ( (dtrkchamx<40 || dtrkchamx>220) || (dtrkchamy<40.0 || dtrkchamy>210.0)) ) m_residuals_ok[iResidual] = false; + } + } + else{ + if( (n_wheel==-1 && n_sector==3) || (n_wheel==1 && n_sector==4)){ + if(n_station==1 && ( (dtrkchamx<30.0 || dtrkchamx>190.0) || (dtrkchamy<40.0 || dtrkchamy>170.0)) ) m_residuals_ok[iResidual] = false; + if(n_station==2 && ( (dtrkchamx<30.0 || dtrkchamx>240.0) || (dtrkchamy<40.0 || dtrkchamy>170.0)) ) m_residuals_ok[iResidual] = false; + if(n_station==3 && ( (dtrkchamx<30.0 || dtrkchamx>280.0) || (dtrkchamy<40.0 || dtrkchamy>170.0)) ) m_residuals_ok[iResidual] = false; + } + else{ + if(n_station==1 && ( (dtrkchamx<30.0 || dtrkchamx>190.0) || (dtrkchamy<40.0 || dtrkchamy>210.0)) ) m_residuals_ok[iResidual] = false; + if(n_station==2 && ( (dtrkchamx<30.0 || dtrkchamx>240.0) || (dtrkchamy<40.0 || dtrkchamy>210.0)) ) m_residuals_ok[iResidual] = false; + if(n_station==3 && ( (dtrkchamx<30.0 || dtrkchamx>280.0) || (dtrkchamy<40.0 || dtrkchamy>210.0)) ) m_residuals_ok[iResidual] = false; + } + } + } } } diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFromTrack.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFromTrack.cc index 520d3270b4167..744a35bb41669 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFromTrack.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonResidualsFromTrack.cc @@ -14,6 +14,7 @@ #include "Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h" #include "TrackingTools/TrackRefitter/interface/TrackTransformer.h" +#include "TrackingTools/TrackAssociator/interface/DetIdAssociator.h" #include "TDecompChol.h" #include @@ -22,6 +23,7 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, edm::ESHandle magneticField, edm::ESHandle globalGeometry, + edm::ESHandle muonDetIdAssociator_, edm::ESHandle prop, const Trajectory *traj, const reco::Track* recoTrack, @@ -156,6 +158,9 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, // double gChZ = globalGeometry->idToDet(chamberId)->position().z(); // std::cout << " The chamber position in global frame x: " << gChX << " y: " << gChY << " z: " << gChZ << std::endl; + const GeomDet* geomDet = muonDetIdAssociator_->getGeomDet(chamberId); + double chamber_width = geomDet->surface().bounds().width(); + double chamber_length = geomDet->surface().bounds().length(); double hitX = trajMeasurementHit->localPosition().x(); @@ -206,7 +211,7 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, if (m_debug) std::cout << " This is first appearance of the DT with hits in superlayer 2" << std::endl; } - m_dt2[chamberId]->addResidual(prop, &tsos, hit); + m_dt2[chamberId]->addResidual(prop, &tsos, hit,chamber_width,chamber_length); residualDT2IsAdded = true; } else if ( (superLayerId.superlayer() == 1 || superLayerId.superlayer() == 3) && vDTHits1D.size() >= 6 ) { @@ -215,7 +220,7 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, m_dt13[chamberId] = new MuonDT13ChamberResidual(globalGeometry, navigator, chamberId, chamberAlignable); if (m_debug) std::cout << " This is first appearance of the DT with hits in superlayers 1 and 3" << std::endl; } - m_dt13[chamberId]->addResidual(prop, &tsos, hit); + m_dt13[chamberId]->addResidual(prop, &tsos, hit,chamber_width,chamber_length); residualDT13IsAdded = true; @@ -270,7 +275,7 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, if (m_debug) std::cout << " This is first appearance of the CSC with hits QQQ" << std::endl; } - m_csc[chamberId2]->addResidual(prop, &tsos, hit); + m_csc[chamberId2]->addResidual(prop, &tsos, hit,250.0,250.0); } } @@ -308,6 +313,10 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, const DTChamberId chamberId(hitId2.rawId()); if (m_debug) std::cout << "Muon Hit in DT wheel " << chamberId.wheel() << " station " << chamberId.station() << " sector " << chamberId.sector() << std::endl; + const GeomDet* geomDet = muonDetIdAssociator_->getGeomDet(chamberId); + double chamber_width = geomDet->surface().bounds().width(); + double chamber_length = geomDet->surface().bounds().length(); + if ( (*hit2)->dimension() > 1 ) { @@ -367,7 +376,7 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, << " y: " << extrapolation.localPosition().y() << " z: " << extrapolation.localPosition().z() << std::endl; } - m_dt2[chamberId]->addResidual(prop, &extrapolation, hit); + m_dt2[chamberId]->addResidual(prop, &extrapolation, hit,chamber_width,chamber_length); } // residualDT2IsAdded = true; @@ -393,7 +402,7 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, << " y: " << extrapolation.localPosition().y() << " z: " << extrapolation.localPosition().z() << std::endl; } - m_dt13[chamberId]->addResidual(prop, &extrapolation, hit); + m_dt13[chamberId]->addResidual(prop, &extrapolation, hit,chamber_width,chamber_length); } // residualDT13IsAdded = true; @@ -508,7 +517,7 @@ MuonResidualsFromTrack::MuonResidualsFromTrack(const edm::EventSetup& iSetup, << " y: " << extrapolation.localPosition().y() << " z: " << extrapolation.localPosition().z() << std::endl; } - m_csc[chamberId]->addResidual(prop, &extrapolation, hit); + m_csc[chamberId]->addResidual(prop, &extrapolation, hit,250.0,250.0); } } } diff --git a/Alignment/MuonAlignmentAlgorithms/test/StandAloneTest.cc b/Alignment/MuonAlignmentAlgorithms/test/StandAloneTest.cc index 7ffbba0aa07e0..b1875047ee357 100644 --- a/Alignment/MuonAlignmentAlgorithms/test/StandAloneTest.cc +++ b/Alignment/MuonAlignmentAlgorithms/test/StandAloneTest.cc @@ -152,6 +152,8 @@ StandAloneTest::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) iSetup.get().get("SteppingHelixPropagatorAny",prop); edm::ESHandle magneticField; iSetup.get().get(magneticField); + edm::ESHandle muonDetIdAssociator_; + iSetup.get().get("MuonDetIdAssociator", muonDetIdAssociator_); // loop over tracks for (reco::TrackCollection::const_iterator track = tracks->begin(); track != tracks->end(); ++track) { @@ -167,7 +169,7 @@ StandAloneTest::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) if (track->pt() > 20. && traj != NULL && traj->isValid()) { // calculate all residuals on this track - MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, prop, traj, &(*track), m_muonAlignment->getAlignableNavigator(), 1000.); + MuonResidualsFromTrack muonResidualsFromTrack(iSetup, magneticField, globalGeometry, muonDetIdAssociator_, prop, traj, &(*track), m_muonAlignment->getAlignableNavigator(), 1000.); std::vector chamberIds = muonResidualsFromTrack.chamberIds(); // if the tracker part of refit is okay From daaed7aa2ffa443d31506fcc6da59ee299b8b6b3 Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Fri, 15 Jan 2016 03:47:46 +0100 Subject: [PATCH 024/250] Apply new fiducial cuts only to DT chambers --- .../plugins/MuonAlignmentFromReference.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc index a4183ddd641db..e05a8f8e9d35b 100644 --- a/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc +++ b/Alignment/MuonAlignmentAlgorithms/plugins/MuonAlignmentFromReference.cc @@ -776,7 +776,7 @@ void MuonAlignmentFromReference::terminate(const edm::EventSetup& iSetup) stop_watch.Stop(); } - if (m_doAlignment) + if (m_doAlignment && !m_doCSC) // for now apply fiducial cuts to DT only { stop_watch.Start(); fiducialCuts(); From eb602c39bd6abea58a445f95d9c4709dad1a05b7 Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Fri, 15 Jan 2016 06:25:07 +0100 Subject: [PATCH 025/250] Fix for cmsbuild compilation --- .../interface/MuonTrackCSCChamberResidual.h | 2 +- .../interface/MuonTrackDT13ChamberResidual.h | 2 +- .../interface/MuonTrackDT2ChamberResidual.h | 2 +- .../MuonAlignmentAlgorithms/src/MuonTrackCSCChamberResidual.cc | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h index bf4dfa046c5ed..58077b3e09ada 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h @@ -17,7 +17,7 @@ class MuonTrackCSCChamberResidual: public MuonChamberResidual DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method - virtual void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) {} + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double, double); // for CSC, the residual is chamber local x, projected by the strip measurement direction // for CSC, the resslope is dresx/dz, or tan(phi_y) diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h index e8269a2408e9f..d323635a38551 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h @@ -17,7 +17,7 @@ class MuonTrackDT13ChamberResidual: public MuonChamberResidual DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method - virtual void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) {} + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double); // for DT13, the residual is chamber local x // for DT13, the resslope is dresx/dz, or tan(phi_y) diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h index 1183edfc4170f..89df7d016dd9a 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h @@ -17,7 +17,7 @@ class MuonTrackDT2ChamberResidual: public MuonChamberResidual DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method - virtual void addResidual(const TrajectoryStateOnSurface *tsos, const TransientTrackingRecHit *hit) {} + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double); // for DT2, the residual is chamber local y // for DT2, the resslope is dresy/dz, or tan(phi_x) diff --git a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackCSCChamberResidual.cc b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackCSCChamberResidual.cc index 1bf58680fe4ea..86466f31d1998 100644 --- a/Alignment/MuonAlignmentAlgorithms/src/MuonTrackCSCChamberResidual.cc +++ b/Alignment/MuonAlignmentAlgorithms/src/MuonTrackCSCChamberResidual.cc @@ -19,7 +19,6 @@ MuonTrackCSCChamberResidual::MuonTrackCSCChamberResidual(edm::ESHandleid.rawId()); - CSCDetId chamber(id.chamberId()); CSCSegmentRef segmentCSC = seg->cscSegmentRef; if (segmentCSC.get() != 0) From 6f1c676defc990b5e643455791e226a17640bfaa Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Fri, 15 Jan 2016 12:55:41 +0100 Subject: [PATCH 026/250] Make addResidual pure virtual function --- .../interface/MuonTrackCSCChamberResidual.h | 2 +- .../interface/MuonTrackDT13ChamberResidual.h | 2 +- .../interface/MuonTrackDT2ChamberResidual.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h index 58077b3e09ada..a05ebf0afb4e0 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackCSCChamberResidual.h @@ -17,7 +17,7 @@ class MuonTrackCSCChamberResidual: public MuonChamberResidual DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double, double); + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit,double, double) = 0; // for CSC, the residual is chamber local x, projected by the strip measurement direction // for CSC, the resslope is dresx/dz, or tan(phi_y) diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h index d323635a38551..1dc45dcacf124 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT13ChamberResidual.h @@ -17,7 +17,7 @@ class MuonTrackDT13ChamberResidual: public MuonChamberResidual DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double); + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double) = 0; // for DT13, the residual is chamber local x // for DT13, the resslope is dresx/dz, or tan(phi_y) diff --git a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h index 89df7d016dd9a..970f17689d296 100644 --- a/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h +++ b/Alignment/MuonAlignmentAlgorithms/interface/MuonTrackDT2ChamberResidual.h @@ -17,7 +17,7 @@ class MuonTrackDT2ChamberResidual: public MuonChamberResidual DetId chamberId, AlignableDetOrUnitPtr chamberAlignable); // dummy method - virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double); + virtual void addResidual(edm::ESHandle prop, const TrajectoryStateOnSurface *tsos, const TrackingRecHit *hit, double, double) = 0; // for DT2, the residual is chamber local y // for DT2, the resslope is dresy/dz, or tan(phi_x) From b09fc5a6e3e9a5a4495f6916c101e399c34bbe99 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Sun, 17 Jan 2016 13:02:15 +0100 Subject: [PATCH 027/250] change to untracked strings as in the code --- CalibTracker/SiStripChannelGain/python/computeGain_cff.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CalibTracker/SiStripChannelGain/python/computeGain_cff.py b/CalibTracker/SiStripChannelGain/python/computeGain_cff.py index abfd80cbee327..da82cc208c049 100644 --- a/CalibTracker/SiStripChannelGain/python/computeGain_cff.py +++ b/CalibTracker/SiStripChannelGain/python/computeGain_cff.py @@ -35,9 +35,9 @@ doStoreOnDB = cms.bool(True), treePath = cms.untracked.string('gainCalibrationTree/tree'), - gain = cms.untracked.PSet(label = cms.string('shallowGainCalibration'), prefix = cms.string("GainCalibration"), suffix = cms.string('')), - evtinfo = cms.untracked.PSet(label = cms.string('shallowEventRun'), prefix = cms.string(""), suffix = cms.string('')), - tracks = cms.untracked.PSet(label = cms.string('shallowTracks'), prefix = cms.string("track"), suffix = cms.string('')), + gain = cms.untracked.PSet(label = cms.untracked.string('shallowGainCalibration'), prefix = cms.untracked.string("GainCalibration"), suffix = cms.untracked.string('')), + evtinfo = cms.untracked.PSet(label = cms.untracked.string('shallowEventRun'), prefix = cms.untracked.string(""), suffix = cms.untracked.string('')), + tracks = cms.untracked.PSet(label = cms.untracked.string('shallowTracks'), prefix = cms.untracked.string("track"), suffix = cms.untracked.string('')), ) SiStripCalibValidation = SiStripCalib.clone() From b8756192591e4bb0e0aebfbd5c1fa24e0686506d Mon Sep 17 00:00:00 2001 From: Giovanni Date: Mon, 18 Jan 2016 11:25:38 +0100 Subject: [PATCH 028/250] Adding hltTracksIter to MuonAnalysis/MuonAssociators for proper trigger matching of Onia in T&P --- .../MuonAssociators/python/patMuonsWithTrigger_cff.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_cff.py b/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_cff.py index 745acc41c276e..722532e623ade 100644 --- a/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_cff.py +++ b/MuonAnalysis/MuonAssociators/python/patMuonsWithTrigger_cff.py @@ -71,7 +71,7 @@ def addL1UserData(patMuonProducer, l1ModuleLabel = "muonL1Info"): patTriggerFull.onlyStandAlone = True patTrigger = cms.EDProducer("TriggerObjectFilterByCollection", src = cms.InputTag("patTriggerFull"), - collections = cms.vstring("hltL1extraParticles", "hltL2MuonCandidates", "hltL3MuonCandidates", "hltGlbTrkMuonCands", "hltMuTrackJpsiCtfTrackCands", "hltMuTrackJpsiEffCtfTrackCands", "hltMuTkMuJpsiTrackerMuonCands"), + collections = cms.vstring("hltL1extraParticles", "hltL2MuonCandidates", "hltL3MuonCandidates", "hltGlbTrkMuonCands", "hltMuTrackJpsiCtfTrackCands", "hltMuTrackJpsiEffCtfTrackCands", "hltMuTkMuJpsiTrackerMuonCands", "hltTracksIter"), ) #patTrigger = cms.EDFilter("PATTriggerObjectStandAloneSelector", # src = cms.InputTag("patTriggerFull"), @@ -110,6 +110,7 @@ def addL1UserData(patMuonProducer, l1ModuleLabel = "muonL1Info"): muonMatchHLTCtfTrack = muonTriggerMatchHLT.clone(matchedCuts = cms.string('coll("hltMuTrackJpsiCtfTrackCands")'), maxDeltaR = 0.1, maxDPtRel = 10.0) #maxDeltaR Changed accordingly to Zoltan tuning. muonMatchHLTCtfTrack2 = muonTriggerMatchHLT.clone(matchedCuts = cms.string('coll("hltMuTrackJpsiEffCtfTrackCands")'), maxDeltaR = 0.1, maxDPtRel = 10.0) #maxDeltaR Changed accordingly to Zoltan tuning. muonMatchHLTTrackMu = muonTriggerMatchHLT.clone(matchedCuts = cms.string('coll("hltMuTkMuJpsiTrackerMuonCands")'), maxDeltaR = 0.1, maxDPtRel = 10.0) #maxDeltaR Changed accordingly to Zoltan tuning. +muonMatchHLTTrackIt = muonTriggerMatchHLT.clone(matchedCuts = cms.string('coll("hltTracksIter")'), maxDeltaR = 0.1, maxDPtRel = 1.0) #maxDeltaR Changed accordingly to Zoltan tuning. patTriggerMatchers1Mu = cms.Sequence( #muonMatchHLTL1 + # keep off by default, since it is slow and usually not needed @@ -128,12 +129,14 @@ def addL1UserData(patMuonProducer, l1ModuleLabel = "muonL1Info"): patTriggerMatchers2Mu = cms.Sequence( muonMatchHLTCtfTrack + muonMatchHLTCtfTrack2 + - muonMatchHLTTrackMu + muonMatchHLTTrackMu + + muonMatchHLTTrackIt ) patTriggerMatchers2MuInputTags = [ cms.InputTag('muonMatchHLTCtfTrack'), cms.InputTag('muonMatchHLTCtfTrack2'), cms.InputTag('muonMatchHLTTrackMu'), + cms.InputTag('muonMatchHLTTrackIt'), ] ## ==== Embed ==== @@ -168,6 +171,7 @@ def switchOffAmbiguityResolution(process): process.muonMatchHLTL3.resolveAmbiguities = False process.muonMatchHLTCtfTrack.resolveAmbiguities = False process.muonMatchHLTTrackMu.resolveAmbiguities = False + process.muonMatchHLTTrackIt.resolveAmbiguities = False def changeTriggerProcessName(process, triggerProcessName, oldProcessName="HLT"): "Change the process name under which the trigger was run" From 06aea13340cad28231730fe6461ffc903a5c13e5 Mon Sep 17 00:00:00 2001 From: Suchandra Date: Mon, 18 Jan 2016 12:15:41 +0100 Subject: [PATCH 029/250] The TrackerGeometry class updated to keep ModuleType information with the highest DetId of that type. The idea here is to access the type using DetId. The ModuleType is contructed directly from the names defined in Geometry xml file --- Geometry/TrackerGeometryBuilder/README.md | 34 +++++++ .../interface/TrackerGeometry.h | 12 ++- .../src/TrackerGeometry.cc | 92 ++++++++++++++++++- 3 files changed, 132 insertions(+), 6 deletions(-) diff --git a/Geometry/TrackerGeometryBuilder/README.md b/Geometry/TrackerGeometryBuilder/README.md index d809c4e0e2c35..cab5f71fc0cfe 100644 --- a/Geometry/TrackerGeometryBuilder/README.md +++ b/Geometry/TrackerGeometryBuilder/README.md @@ -69,3 +69,37 @@ of these methods for the three scenarios available so far are described in the t | 5 | `GeomDetEnumerators::P2OTB` | 6 | | 6 | `GeomDetEnumerators::invalidDet` | 0 | +* ModuleTypes in in `TrackerGeometry` class + +The `TrackerGeometry` class updated to keep module type information with the highest `DetId` of that type +so that using `DetId` one can access the type. The `ModuleType` is contructed directly from the names defined in the +`Geometry` xml definitions + +Following types are used + +| `TrackerGeometry::ModuleType` | `Description` | +|--------|-------| +| TrackerGeometry::UNKNOWN| Undefined | +| TrackerGeometry::PXB | Pixel Bar | +| TrackerGeometry::PXF | Pixel For | +| TrackerGeometry::IB1 | IB1 | +| TrackerGeometry::IB2 | IB2 | +| TrackerGeometry::OB1 | OB1 | +| TrackerGeometry::OB2 | OB2 | +| TrackerGeometry::W1A | W1A | +| TrackerGeometry::W2A | W2A | +| TrackerGeometry::W3A | W3A | +| TrackerGeometry::W1B | W1B | +| TrackerGeometry::W2B | W2B | +| TrackerGeometry::W3B | W3B | +| TrackerGeometry::W4 | W4 | +| TrackerGeometry::W5 | W5 | +| TrackerGeometry::W6 | W6 | +| TrackerGeometry::W7 | W7 | +| TrackerGeometry::Ph1PXB | Phase 1 Pixel Barrel | +| TrackerGeometry::Ph1PXF | Phase 1 Pixel Endcap | +| TrackerGeometry::Ph2PXB | Phase 2 Pixel Barrel | +| TrackerGeometry::Ph2PXF | Phase 2 Pixel Barrel | +| TrackerGeometry::Ph2PSP | Phase 2 MacroPixel,PS| +| TrackerGeometry::Ph2PSS | Phase 2 Strip, PS | +| TrackerGeometry::Ph2SS | Phase2 2S | diff --git a/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h b/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h index 13d22c7217b52..edf741dee452f 100644 --- a/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h +++ b/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h @@ -40,7 +40,8 @@ class TrackerGeometry final : public TrackingGeometry { public: typedef GeomDetEnumerators::SubDetector SubDetector; - + enum ModuleType {UNKNOWN, PXB, PXF, IB1, IB2, OB1, OB2, W1A, W2A, W3A, W1B, W2B, W3B, W4, W5, W6, W7, Ph1PXB, Ph1PXF, Ph2PXB, Ph2PXF, Ph2PSP, Ph2PSS, Ph2SS}; + virtual ~TrackerGeometry() ; @@ -61,6 +62,9 @@ class TrackerGeometry final : public TrackingGeometry { // Magic : better be called at the right moment... void setOffsetDU(SubDetector sid) { theOffsetDU[sid]=detUnits().size();} void setEndsetDU(SubDetector sid) { theEndsetDU[sid]=detUnits().size();} + void fillTestMap(const GeometricDet* gd); + + ModuleType moduleType(std::string name) const; GeometricDet const * trackerDet() const {return theTrackerDet;} @@ -71,6 +75,10 @@ class TrackerGeometry final : public TrackingGeometry { const DetContainer& detsTOB() const; const DetContainer& detsTEC() const; + ModuleType getDetectorType(DetId) const; + float getDetectorThickness(DetId) const; + + private: GeometricDet const * theTrackerDet; @@ -97,7 +105,7 @@ class TrackerGeometry final : public TrackingGeometry { GeomDetEnumerators::SubDetector theSubDetTypeMap[6]; unsigned int theNumberOfLayers[6]; - + std::vector< std::tuple< DetId, TrackerGeometry::ModuleType, float> > theDetTypetList; }; #endif diff --git a/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc b/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc index b8e82d245824b..5f4cf64f8400e 100644 --- a/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc +++ b/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc @@ -34,9 +34,15 @@ geometricDetToGeomDet(GeometricDet::GDEnumType gdenum) { if(gdenum == GeometricDet::GDEnumType::OTPhase2EndCap) return GeomDetEnumerators::SubDetector::P2OTEC; return GeomDetEnumerators::SubDetector::invalidDet; } - - - +class DetIdComparator { +public: + bool operator()(GeometricDet const* gd1, GeometricDet const * gd2) const { + uint32_t det1 = gd1->geographicalId(); + uint32_t det2 = gd2->geographicalId(); + return det1 < det2; + } + +}; } @@ -68,7 +74,21 @@ TrackerGeometry::TrackerGeometry(GeometricDet const* gd) : theTrackerDet(gd) for(unsigned int i=1;i<7;++i) { LogTrace("NumberOfLayers") << " detid subdet "<< i << " number of layers " << numberOfLayers(i); } - + std::vector deepcomp; + gd->deepComponents(deepcomp); + + sort(deepcomp.begin(), deepcomp.end(), DetIdComparator()); + + std::cout << " Total Number of Detectors " << deepcomp.size() << std::endl; + LogDebug("ThicknessAndType") << "Dump of sensors names and bounds"; + for(auto det : deepcomp) { + fillTestMap(det); + LogDebug("ThicknessAndType") << det->geographicalId() << " " << det->name().fullname() << " " << det->bounds()->thickness(); + } + LogDebug("DetTypeList") << " Content of DetTypetList : size " << theDetTypetList.size(); + for (auto iVal : theDetTypetList) { + LogDebug("DetTypeList") << " DetId " << std::get<0>(iVal) << " Type " << std::get<1>(iVal)<< " Thickness " << std::get<2>(iVal); + } } @@ -254,3 +274,67 @@ TrackerGeometry::detIds() const { return theDetIds; } +void TrackerGeometry::fillTestMap(const GeometricDet* gd) { + + std::string temp = gd->name(); + std::string name = temp.substr(temp.find(":")+1); + DetId detid = gd->geographicalId(); + float thickness = gd->bounds()->thickness(); + std::string nameTag; + TrackerGeometry::ModuleType mtype = moduleType(name); + if (theDetTypetList.size() == 0) { + theDetTypetList.push_back({std::make_tuple(detid, mtype, thickness)}); + } else { + auto & t = (*(theDetTypetList.end()-1)); + if (std::get<1>(t) != mtype) theDetTypetList.push_back({std::make_tuple(detid, mtype, thickness)}); + else { + if ( detid > std::get<0>(t) ) std::get<0>(t) = detid; + } + } +} + +TrackerGeometry::ModuleType TrackerGeometry::getDetectorType(DetId detid) const { + for (auto iVal : theDetTypetList) { + DetId detid_max = std::get<0>(iVal); + TrackerGeometry::ModuleType mtype = std::get<1>(iVal); + if (detid.rawId() <= detid_max.rawId()) return mtype; + } + return TrackerGeometry::ModuleType::UNKNOWN; +} +float TrackerGeometry::getDetectorThickness(DetId detid) const { + for (auto iVal : theDetTypetList) { + DetId detid_max = std::get<0>(iVal); + if (detid.rawId() <= detid_max.rawId()) + return std::get<2>(iVal); + } + return -1.0; +} + +TrackerGeometry::ModuleType TrackerGeometry::moduleType(std::string name) const { + if ( name.find("PixelBarrel") != std::string::npos) return ModuleType::Ph1PXB; + else if (name.find("PixelForward") != std::string::npos) return ModuleType::Ph1PXF; + else if ( name.find("TIB") != std::string::npos) { + if ( name.find("0") != std::string::npos) return ModuleType::IB1; + else return ModuleType::IB2; + } else if ( name.find("TOB") != std::string::npos) { + if ( name.find("0") != std::string::npos) return ModuleType::OB1; + else return ModuleType::OB2; + } else if ( name.find("TID") != std::string::npos) { + if ( name.find("0") != std::string::npos) return ModuleType::W1A; + else if ( name.find("1") != std::string::npos) return ModuleType::W2A; + else if ( name.find("2") != std::string::npos) return ModuleType::W3A; + } else if ( name.find("TEC") != std::string::npos) { + if ( name.find("0") != std::string::npos) return ModuleType::W1B; + else if ( name.find("1") != std::string::npos) return ModuleType::W2B; + else if ( name.find("2") != std::string::npos) return ModuleType::W3B; + else if ( name.find("3") != std::string::npos) return ModuleType::W4; + else if ( name.find("4") != std::string::npos) return ModuleType::W5; + else if ( name.find("5") != std::string::npos) return ModuleType::W6; + else if ( name.find("6") != std::string::npos) return ModuleType::W7; + } else if ( name.find("BModule") != std::string::npos || name.find("EModule") != std::string::npos ) { + if (name.find("PSMacroPixel") != std::string::npos) return ModuleType::Ph2PSP; + else if (name.find("PSStrip") != std::string::npos) return ModuleType::Ph2PSS; + else if (name.find("2S") != std::string::npos) return ModuleType::Ph2SS; + } + return ModuleType::UNKNOWN; +} From 6b449e895c858a9b93d3da42e0ca81a110ba6b6e Mon Sep 17 00:00:00 2001 From: Giovanni Date: Tue, 19 Jan 2016 15:23:37 +0100 Subject: [PATCH 030/250] Printing also new genParticle status flags in ParticleListDrawer --- .../HepMCCandAlgos/plugins/ParticleListDrawer.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/PhysicsTools/HepMCCandAlgos/plugins/ParticleListDrawer.cc b/PhysicsTools/HepMCCandAlgos/plugins/ParticleListDrawer.cc index a8ecf03cf9ad7..ac42f2c8f786e 100644 --- a/PhysicsTools/HepMCCandAlgos/plugins/ParticleListDrawer.cc +++ b/PhysicsTools/HepMCCandAlgos/plugins/ParticleListDrawer.cc @@ -14,6 +14,7 @@ #include "SimGeneral/HepPDTRecord/interface/ParticleDataTable.h" #include "DataFormats/Candidate/interface/Candidate.h" #include "DataFormats/Candidate/interface/CandidateFwd.h" +#include "DataFormats/HepMCCandidate/interface/GenParticle.h" #include "DataFormats/Common/interface/Ref.h" /** @@ -54,6 +55,7 @@ class ParticleListDrawer : public edm::EDAnalyzer { unsigned int nEventAnalyzed_; bool printOnlyHardInteraction_; bool printVertex_; + bool printFlags_; bool useMessageLogger_; }; @@ -64,6 +66,7 @@ ParticleListDrawer::ParticleListDrawer(const edm::ParameterSet & pset) : nEventAnalyzed_(0), printOnlyHardInteraction_(pset.getUntrackedParameter("printOnlyHardInteraction", false)), printVertex_(pset.getUntrackedParameter("printVertex", false)), + printFlags_(pset.getUntrackedParameter("printFlags", false)), useMessageLogger_(pset.getUntrackedParameter("useMessageLogger", false)) { } @@ -168,6 +171,19 @@ void ParticleListDrawer::analyze(const edm::Event& iEvent, const edm::EventSetup out << buf; } + if (printFlags_) { + const reco::GenParticle *gp = dynamic_cast(&*p); + if (!gp) throw cms::Exception("Unsupported", "Status flags can be printed only for reco::GenParticle objects\n"); + if (gp->isPromptFinalState()) out << " PromptFinalState"; + if (gp->isDirectPromptTauDecayProductFinalState()) out << " DirectPromptTauDecayProductFinalState"; + if (gp->isHardProcess()) out << " HardProcess"; + if (gp->fromHardProcessFinalState()) out << " HardProcessFinalState"; + if (gp->fromHardProcessBeforeFSR()) out << " HardProcessBeforeFSR"; + if (gp->statusFlags().isFirstCopy()) out << " FirstCopy"; + if (gp->isLastCopy()) out << " LastCopy"; + if (gp->isLastCopyBeforeFSR()) out << " LastCopyBeforeFSR"; + } + out << endl; } nEventAnalyzed_++; From bfc29999ad36c020ca31a0eed6675e158d54cf89 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Wed, 20 Jan 2016 18:31:40 +0100 Subject: [PATCH 031/250] fix bugs preventing to run on PCL --- .../plugins/SiStripGainFromCalibTree.cc | 4 +++- .../test/test_shallowGainCalibration_cfg.py | 13 +++++++++++++ .../ALCARECOPromptCalibProdSiStripGains_cff.py | 11 ++++++----- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc b/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc index 0b75cceec441c..54737145590af 100644 --- a/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc +++ b/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc @@ -2,6 +2,7 @@ // Created: Mon Nov 16 08:55:18 CET 2009 #include +#include #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/EDAnalyzer.h" @@ -140,7 +141,7 @@ class SiStripGainFromCalibTree : public ConditionDBWriter { bool produceTagFilter(); template - inline edm::Handle connect(const T* ptr, edm::EDGetTokenT token, const edm::Event &evt) { + inline edm::Handle connect(const T* &ptr, edm::EDGetTokenT token, const edm::Event &evt) { edm::Handle handle; evt.getByToken(token, handle); ptr = handle.product(); @@ -598,6 +599,7 @@ bool SiStripGainFromCalibTree::IsGoodLandauFit(double* FitResults){ } void SiStripGainFromCalibTree::processEvent() { + if(runnumberERun)ERun=runnumber; diff --git a/CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py b/CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py index 19c3566eafdfb..eeace932c2f04 100644 --- a/CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py +++ b/CalibTracker/SiStripCommon/test/test_shallowGainCalibration_cfg.py @@ -15,4 +15,17 @@ 'keep *_shallowGainCalibration_*_*', ) ) + +process.out = cms.OutputModule( + "PoolOutputModule", + fileName = cms.untracked.string('test_shallowGainCalibration_edm.root'), + dropMetaData = cms.untracked.string("DROPPED"), + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_shallowGainCalibration_*_*' + ), +) + process.p = cms.Path(process.MeasurementTrackerEvent*process.tracksRefit*process.shallowGainCalibration*process.testTree) +process.end = cms.EndPath(process.out) +process.s = cms.Schedule(process.p, process.end) diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py index 0a01d6f68ae18..a51f2c1e10b1d 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py @@ -67,20 +67,21 @@ ALCARECOShallowEventRun = shallowEventRun.clone() ALCARECOShallowTracks = shallowTracks.clone(Tracks=cms.InputTag('ALCARECOCalibrationTracksRefit')) ALCARECOShallowGainCalibration = shallowGainCalibration.clone(Tracks=cms.InputTag('ALCARECOCalibrationTracksRefit')) -ALCARECOShallowSequence = cms.Sequence(shallowEventRunPCL*shallowTracksPCL*shallowGainCalibrationPCL) +ALCARECOShallowSequence = cms.Sequence(ALCARECOShallowEventRun*ALCARECOShallowTracks*ALCARECOShallowGainCalibration) # ------------------------------------------------------------------------------ # This is the module actually doing the calibration -from CalibTracker.SiStripChannelGain.computeGain_cff import SiStripCalib as ALCARECOSiStripCalib +from CalibTracker.SiStripChannelGain.computeGain_cff import SiStripCalib +ALCARECOSiStripCalib = SiStripCalib.clone() ALCARECOSiStripCalib.AlgoMode = cms.untracked.string('PCL') ALCARECOSiStripCalib.Tracks = cms.untracked.InputTag('ALCARECOCalibrationTracksRefit') ALCARECOSiStripCalib.FirstSetOfConstants = cms.untracked.bool(False) ALCARECOSiStripCalib.harvestingMode = cms.untracked.bool(False) ALCARECOSiStripCalib.doStoreOnDB = cms.bool(False) -ALCARECOSiStripCalib.gain.label = cms.string('ALCARECOShallowGainCalibration') -ALCARECOSiStripCalib.evtinfo.label = cms.string('ALCARECOShallowEventRun') -ALCARECOSiStripCalib.tracks.label = cms.string('ALCARECOShallowTracks') +ALCARECOSiStripCalib.gain.label = cms.untracked.string('ALCARECOShallowGainCalibration') +ALCARECOSiStripCalib.evtinfo.label = cms.untracked.string('ALCARECOShallowEventRun') +ALCARECOSiStripCalib.tracks.label = cms.untracked.string('ALCARECOShallowTracks') # ------------------------------------------------------------------------------ From 0b127347104737a2e5d0b70bdef799e416539fc2 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 14:50:15 +0100 Subject: [PATCH 032/250] miniAOD electron modification --- Configuration/StandardSequences/python/Harvesting_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configuration/StandardSequences/python/Harvesting_cff.py b/Configuration/StandardSequences/python/Harvesting_cff.py index 56d6c87ea04b1..54d2db8255de8 100644 --- a/Configuration/StandardSequences/python/Harvesting_cff.py +++ b/Configuration/StandardSequences/python/Harvesting_cff.py @@ -35,4 +35,4 @@ alcaHarvesting = cms.Path() -validationHarvestingMiniAOD = cms.Path(JetPostProcessor*METPostProcessorHarvesting) +validationHarvestingMiniAOD = cms.Path( JetPostProcessor * METPostProcessorHarvesting * postValidationMiniAOD ) From 0fdadee32e1743dd488634b55cf813dd64aa2023 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Thu, 21 Jan 2016 11:39:01 +0100 Subject: [PATCH 033/250] merged miniAOD modification --- Configuration/StandardSequences/python/Validation_cff.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Configuration/StandardSequences/python/Validation_cff.py b/Configuration/StandardSequences/python/Validation_cff.py index c0e13843b0666..1d35b86fa8a1b 100644 --- a/Configuration/StandardSequences/python/Validation_cff.py +++ b/Configuration/StandardSequences/python/Validation_cff.py @@ -29,11 +29,16 @@ # miniAOD from Validation.RecoParticleFlow.miniAODValidation_cff import * from Validation.RecoEgamma.photonMiniAODValidationSequence_cff import * +from Validation.RecoEgamma.egammaValidationMiniAOD_cff import * prevalidation = cms.Sequence( globalPrevalidation * hltassociation * metPreValidSeq * jetPreValidSeq ) prevalidationLiteTracking = cms.Sequence( prevalidation ) prevalidationLiteTracking.replace(globalPrevalidation,globalPrevalidationLiteTracking) +<<<<<<< HEAD prevalidationMiniAOD = cms.Sequence( genParticles1 * miniAODValidationSequence * photonMiniAODValidationSequence) +======= +prevalidationMiniAOD = cms.Sequence( genParticles1 * miniAODValidationSequence * photonMiniAODValidationSequence * JetValidationMiniAOD * type0PFMEtCorrectionPFCandToVertexAssociationForValidationMiniAOD * METValidationMiniAOD * egammaValidationMiniAOD ) +>>>>>>> miniAOD electron modification validation = cms.Sequence(cms.SequencePlaceholder("mix") From 6b13d8893d0e677f1adf67ad88c5f6eec1d94bbd Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 14:57:19 +0100 Subject: [PATCH 034/250] web page electron modification --- DQMOffline/EGamma/scripts/electronCompare.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/DQMOffline/EGamma/scripts/electronCompare.py b/DQMOffline/EGamma/scripts/electronCompare.py index f17d8a274ff7c..c378d47bf4dcd 100755 --- a/DQMOffline/EGamma/scripts/electronCompare.py +++ b/DQMOffline/EGamma/scripts/electronCompare.py @@ -72,7 +72,6 @@ def write(self,x): parser.add_option("-b", "--blue-name", dest="blue", action="store", default="", help="short name of the blue histograms") (options, args) = parser.parse_args() -# print "options : ",options if len(args)<2: print "[electronStore.py] I NEED AT LEAST TWO ARGUMENTS." @@ -80,19 +79,23 @@ def write(self,x): red_file = args.pop(0) web_dir = args.pop() - web_url = web_dir.replace('/afs/cern.ch/cms/','http://cmsdoc.cern.ch/',1) +# print 'WEB DIR 1 =',web_dir + if not '/afs/cern.ch/cms/' in web_dir: + print "local : ", web_dir + web_url = web_dir + else: + web_url = web_dir.replace('/afs/cern.ch/cms/','http://cmsdoc.cern.ch/',1) if len(args)>0 : blue_file = args.pop(0) else : blue_file = '' - - + #=================================================== # prepare output directories and check input files #=================================================== # destination dir - print 'WEB DIR =',web_dir +# print 'WEB DIR =',web_dir if os.path.exists(web_dir+'/gifs')==False: os.makedirs(web_dir+'/gifs') From c9ccd27ca216ee0ba332e79dd58312e3dc06d2bd Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:00:11 +0100 Subject: [PATCH 035/250] miniAOD electron modification --- Validation/Configuration/python/postValidation_cff.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Validation/Configuration/python/postValidation_cff.py b/Validation/Configuration/python/postValidation_cff.py index 99900e9bdecc9..4c4ce0ad2e40d 100644 --- a/Validation/Configuration/python/postValidation_cff.py +++ b/Validation/Configuration/python/postValidation_cff.py @@ -10,6 +10,7 @@ from Validation.EventGenerator.PostProcessor_cff import * from Validation.RecoEgamma.photonPostProcessor_cff import * from Validation.RecoEgamma.electronPostValidationSequence_cff import * +from Validation.RecoEgamma.electronPostValidationSequenceMiniAOD_cff import * from Validation.RecoParticleFlow.PFValidationClient_cff import * from Validation.RPCRecHits.postValidation_cfi import * from Validation.RecoTau.DQMMCValidation_cfi import * @@ -27,7 +28,7 @@ + hcalSimHitsPostProcessor + hcaldigisPostProcessor + hcalrechitsPostProcessor - + electronPostValidationSequence + photonPostProcessor + + electronPostValidationSequence + electronPostValidationSequenceMiniAOD + photonPostProcessor + pfJetClient + pfMETClient + pfJetResClient + pfElectronClient + rpcRecHitPostValidation_step + runTauEff + makeBetterPlots @@ -63,3 +64,7 @@ postValidationCosmics = cms.Sequence( postProcessorMuonMultiTrack ) + +postValidationMiniAOD = cms.Sequence( + electronPostValidationSequenceMiniAOD +) From 89376ac2a822295fb9d33df136f0abdf48bd5f0b Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:02:56 +0100 Subject: [PATCH 036/250] miniAOD electron modification --- Validation/RecoEgamma/plugins/SealModule.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Validation/RecoEgamma/plugins/SealModule.cc b/Validation/RecoEgamma/plugins/SealModule.cc index b08d61d9a4e7a..facda10c60f4e 100644 --- a/Validation/RecoEgamma/plugins/SealModule.cc +++ b/Validation/RecoEgamma/plugins/SealModule.cc @@ -12,9 +12,13 @@ #include "Validation/RecoEgamma/plugins/ElectronMcFakeValidator.h" #include "Validation/RecoEgamma/plugins/ElectronMcFakePostValidator.h" #include "Validation/RecoEgamma/plugins/ElectronConversionRejectionValidator.h" +#include "Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h" +#include "Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h" DEFINE_FWK_MODULE(EgammaObjects); +DEFINE_FWK_MODULE(ElectronMcSignalValidatorMiniAOD); +DEFINE_FWK_MODULE(ElectronMcSignalPostValidatorMiniAOD); DEFINE_FWK_MODULE(PhotonValidator); DEFINE_FWK_MODULE(PhotonValidatorMiniAOD); DEFINE_FWK_MODULE(TkConvValidator); From 1e0c2345d771595f3995be6fb7cfae48e1e25912 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:03:36 +0100 Subject: [PATCH 037/250] miniAOD electron modification --- .../ElectronMcMiniAODSignalPostValidator.cc | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.cc diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.cc new file mode 100644 index 0000000000000..2426bf025a313 --- /dev/null +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.cc @@ -0,0 +1,39 @@ + +#include "Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h" +#include "DQMServices/Core/interface/MonitorElement.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +ElectronMcSignalPostValidatorMiniAOD::ElectronMcSignalPostValidatorMiniAOD( const edm::ParameterSet & conf ) + : ElectronDqmHarvesterBase(conf) + { + // histos bining and limits + + edm::ParameterSet histosSet = conf.getParameter("histosCfg") ; + + set_EfficiencyFlag=histosSet.getParameter("EfficiencyFlag"); + set_StatOverflowFlag=histosSet.getParameter("StatOverflowFlag"); + } + +ElectronMcSignalPostValidatorMiniAOD::~ElectronMcSignalPostValidatorMiniAOD() + {} + +void ElectronMcSignalPostValidatorMiniAOD::finalize( DQMStore::IBooker & iBooker, DQMStore::IGetter & iGetter ) + { + + setBookIndex(-1) ; + setBookPrefix("h_ele") ; + setBookEfficiencyFlag(set_EfficiencyFlag); + setBookStatOverflowFlag( set_StatOverflowFlag ) ; + + // profiles from 2D histos + profileX(iBooker, iGetter, "PoPtrueVsEta","mean ele momentum / gen momentum vs eta","#eta","

"); + profileX(iBooker, iGetter, "sigmaIetaIetaVsPt","SigmaIetaIeta vs pt","p_{T} (GeV/c)","SigmaIetaIeta"); + profileX(iBooker, iGetter, "foundHitsVsEta","mean ele track # found hits vs eta","#eta",""); + profileX(iBooker, iGetter, "foundHitsVsEta_mAOD","mean ele track # found hits vs eta","#eta",""); +/**/ + + + +} + + From bfebe5aca2ae269bb352bdb692022501aa71013e Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:03:42 +0100 Subject: [PATCH 038/250] miniAOD electron modification --- .../ElectronMcMiniAODSignalPostValidator.h | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h new file mode 100644 index 0000000000000..5ded0b0c74b98 --- /dev/null +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h @@ -0,0 +1,33 @@ + +#ifndef Validation_RecoEgamma_ElectronMcSignalPostValidatorMiniAOD_h +#define Validation_RecoEgamma_ElectronMcSignalPostValidatorMiniAOD_h + +#include "DQMOffline/EGamma/interface/ElectronDqmHarvesterBase.h" + +class ElectronMcSignalPostValidatorMiniAOD : public ElectronDqmHarvesterBase + { + public: + explicit ElectronMcSignalPostValidatorMiniAOD( const edm::ParameterSet & conf ) ; + virtual ~ElectronMcSignalPostValidatorMiniAOD() ; + virtual void finalize( DQMStore::IBooker & iBooker, DQMStore::IGetter & iGetter ) ; + + private: + std::string inputFile_ ; + std::string outputFile_ ; + std::vector matchingIDs_; + std::vector matchingMotherIDs_; + std::string inputInternalPath_ ; + std::string outputInternalPath_ ; + + // histos limits and binning + bool set_EfficiencyFlag ; bool set_StatOverflowFlag ; + + // histos +// MonitorElement *h1_ele_xOverX0VsEta ; + + } ; + +#endif + + + From a88b08fc62e637eb94f80f54d324a4ffe21194da Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:03:58 +0100 Subject: [PATCH 039/250] miniAOD electron modification --- .../ElectronMcMiniAODSignalValidator.cc | 392 ++++++++++++++++++ 1 file changed, 392 insertions(+) create mode 100644 Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc new file mode 100644 index 0000000000000..15efad9c7ce90 --- /dev/null +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc @@ -0,0 +1,392 @@ +// system include files +#include + +// user include files +#include "Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h" +#include "DQMServices/Core/interface/MonitorElement.h" +#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/VertexReco/interface/VertexFwd.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/PatCandidates/interface/Electron.h" +#include "DataFormats/PatCandidates/interface/PackedGenParticle.h" +#include "DataFormats/PatCandidates/interface/PackedCandidate.h" + +#include "DataFormats/Candidate/interface/Candidate.h" +#include "DataFormats/HepMCCandidate/interface/GenParticle.h" + +#include "CLHEP/Units/GlobalPhysicalConstants.h" +#include "TMath.h" +#include "TFile.h" +#include "TH1F.h" +#include "TH1I.h" +#include "TH2F.h" +#include "TProfile.h" +#include "TTree.h" +#include +#include +#include + +using namespace reco; +using namespace pat; + +ElectronMcSignalValidatorMiniAOD::ElectronMcSignalValidatorMiniAOD(const edm::ParameterSet& iConfig) : ElectronDqmAnalyzerBase(iConfig) +{ + mcTruthCollection_ = consumes >(iConfig.getParameter("mcTruthCollection")); + electronToken_ = consumes(iConfig.getParameter("electrons")); + + maxPt_ = iConfig.getParameter("MaxPt"); + maxAbsEta_ = iConfig.getParameter("MaxAbsEta"); + deltaR_ = iConfig.getParameter("DeltaR"); + deltaR2_ = deltaR_ * deltaR_; + matchingIDs_ = iConfig.getParameter >("MatchingID"); + matchingMotherIDs_ = iConfig.getParameter >("MatchingMotherID"); + outputInternalPath_ = iConfig.getParameter("OutputFolderName") ; + + // histos bining and limits + + edm::ParameterSet histosSet = iConfig.getParameter("histosCfg") ; + + xyz_nbin=histosSet.getParameter("Nbinxyz"); + + pt_nbin=histosSet.getParameter("Nbinpt"); + pt2D_nbin=histosSet.getParameter("Nbinpt2D"); + pteff_nbin=histosSet.getParameter("Nbinpteff"); + pt_max=histosSet.getParameter("Ptmax"); + + fhits_nbin=histosSet.getParameter("Nbinfhits"); + fhits_max=histosSet.getParameter("Fhitsmax"); + + eta_nbin=histosSet.getParameter("Nbineta"); + eta2D_nbin=histosSet.getParameter("Nbineta2D"); + eta_min=histosSet.getParameter("Etamin"); + eta_max=histosSet.getParameter("Etamax"); + + detamatch_nbin=histosSet.getParameter("Nbindetamatch"); + detamatch2D_nbin=histosSet.getParameter("Nbindetamatch2D"); + detamatch_min=histosSet.getParameter("Detamatchmin"); + detamatch_max=histosSet.getParameter("Detamatchmax"); + + dphi_nbin=histosSet.getParameter("Nbindphi"); + dphi_min=histosSet.getParameter("Dphimin"); + dphi_max=histosSet.getParameter("Dphimax"); + + dphimatch_nbin=histosSet.getParameter("Nbindphimatch"); + dphimatch2D_nbin=histosSet.getParameter("Nbindphimatch2D"); + dphimatch_min=histosSet.getParameter("Dphimatchmin"); + dphimatch_max=histosSet.getParameter("Dphimatchmax"); + + hoe_nbin= histosSet.getParameter("Nbinhoe"); + hoe_min=histosSet.getParameter("Hoemin"); + hoe_max=histosSet.getParameter("Hoemax"); + + mee_nbin= histosSet.getParameter("Nbinmee"); + mee_min=histosSet.getParameter("Meemin"); + mee_max=histosSet.getParameter("Meemax"); + + poptrue_nbin= histosSet.getParameter("Nbinpoptrue"); + poptrue_min=histosSet.getParameter("Poptruemin"); + poptrue_max=histosSet.getParameter("Poptruemax"); + + set_EfficiencyFlag=histosSet.getParameter("EfficiencyFlag"); + set_StatOverflowFlag=histosSet.getParameter("StatOverflowFlag"); + + // so to please coverity... + + h1_recEleNum = 0 ; + + h1_ele_vertexPt = 0 ; + h1_ele_vertexEta = 0 ; + h1_ele_vertexPt_nocut = 0 ; + + h1_scl_SigIEtaIEta_mAOD = 0 ; + h1_scl_SigIEtaIEta_mAOD_barrel = 0 ; + h1_scl_SigIEtaIEta_mAOD_endcaps = 0 ; + + h2_ele_foundHitsVsEta = 0 ; + h2_ele_foundHitsVsEta_mAOD = 0 ; + + h2_ele_PoPtrueVsEta = 0 ; + h2_ele_sigmaIetaIetaVsPt = 0 ; + + h1_ele_HoE_mAOD = 0 ; + h1_ele_HoE_mAOD_barrel = 0 ; + h1_ele_HoE_mAOD_endcaps = 0 ; + h1_ele_mee_all = 0 ; + h1_ele_mee_os = 0 ; + + h1_ele_fbrem_mAOD = 0 ; + h1_ele_fbrem_mAOD_barrel = 0 ; + h1_ele_fbrem_mAOD_endcaps = 0 ; + + h1_ele_dEtaSc_propVtx_mAOD = 0 ; + h1_ele_dEtaSc_propVtx_mAOD_barrel = 0 ; + h1_ele_dEtaSc_propVtx_mAOD_endcaps = 0 ; + h1_ele_dPhiCl_propOut_mAOD = 0 ; + h1_ele_dPhiCl_propOut_mAOD_barrel = 0 ; + h1_ele_dPhiCl_propOut_mAOD_endcaps = 0 ; + + h1_ele_chargedHadronRelativeIso_mAOD = 0 ; + h1_ele_chargedHadronRelativeIso_mAOD_barrel = 0 ; + h1_ele_chargedHadronRelativeIso_mAOD_endcaps = 0 ; + h1_ele_neutralHadronRelativeIso_mAOD = 0 ; + h1_ele_neutralHadronRelativeIso_mAOD_barrel = 0 ; + h1_ele_neutralHadronRelativeIso_mAOD_endcaps = 0 ; + h1_ele_photonRelativeIso_mAOD = 0 ; + h1_ele_photonRelativeIso_mAOD_barrel = 0 ; + h1_ele_photonRelativeIso_mAOD_endcaps = 0 ; + + +} + +ElectronMcSignalValidatorMiniAOD::~ElectronMcSignalValidatorMiniAOD() +{ +} + +void ElectronMcSignalValidatorMiniAOD::bookHistograms( DQMStore::IBooker & iBooker, edm::Run const &, edm::EventSetup const & ) + { + iBooker.setCurrentFolder(outputInternalPath_) ; + + setBookIndex(-1) ; + setBookPrefix("h") ; + setBookEfficiencyFlag(set_EfficiencyFlag); + setBookStatOverflowFlag( set_StatOverflowFlag ) ; + + // rec event collections sizes + h1_recEleNum = bookH1(iBooker, "recEleNum","# rec electrons",11, -0.5,10.5,"N_{ele}"); + // matched electrons + setBookPrefix("h_mc") ; + setBookPrefix("h_ele") ; + h1_ele_vertexPt = bookH1withSumw2(iBooker, "vertexPt","ele transverse momentum",pt_nbin,0.,pt_max,"p_{T vertex} (GeV/c)"); + h1_ele_vertexEta = bookH1withSumw2(iBooker, "vertexEta","ele momentum eta",eta_nbin,eta_min,eta_max,"#eta"); + h1_ele_vertexPt_nocut = bookH1withSumw2(iBooker, "vertexPt_nocut","pT of prunned electrons",pt_nbin,0.,20.,"p_{T vertex} (GeV/c)"); + h2_ele_PoPtrueVsEta = bookH2withSumw2(iBooker, "PoPtrueVsEta","ele momentum / gen momentum vs eta",eta2D_nbin,eta_min,eta_max,50,poptrue_min,poptrue_max); +// h2_ele_sigmaIetaIetaVsPt = bookH2(iBooker,"sigmaIetaIetaVsPt","SigmaIetaIeta vs pt",pt_nbin,0.,pt_max,100,0.,0.05); + h2_ele_sigmaIetaIetaVsPt = bookH2(iBooker,"sigmaIetaIetaVsPt","SigmaIetaIeta vs pt",100,0.,pt_max,100,0.,0.05); + + // all electrons + setBookPrefix("h_ele") ; + h1_ele_mee_all = bookH1withSumw2(iBooker, "mee_all","ele pairs invariant mass, all reco electrons",mee_nbin, mee_min, mee_max,"m_{ee} (GeV/c^{2})","Events","ELE_LOGY E1 P"); + h1_ele_mee_os = bookH1withSumw2(iBooker, "mee_os","ele pairs invariant mass, opp. sign",mee_nbin, mee_min, mee_max,"m_{e^{+}e^{-}} (GeV/c^{2})","Events","ELE_LOGY E1 P"); + + // matched electron, superclusters + setBookPrefix("h_scl") ; + h1_scl_SigIEtaIEta_mAOD = bookH1withSumw2(iBooker, "SigIEtaIEta_mAOD","ele supercluster sigma ieta ieta",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); + h1_scl_SigIEtaIEta_mAOD_barrel = bookH1withSumw2(iBooker, "SigIEtaIEta_mAOD_barrel","ele supercluster sigma ieta ieta, barrel",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); + h1_scl_SigIEtaIEta_mAOD_endcaps = bookH1withSumw2(iBooker, "SigIEtaIEta_mAOD_endcaps","ele supercluster sigma ieta ieta, endcaps",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); + + // matched electron, gsf tracks + setBookPrefix("h_ele") ; + h2_ele_foundHitsVsEta = bookH2(iBooker, "foundHitsVsEta","ele track # found hits vs eta",eta2D_nbin,eta_min,eta_max,fhits_nbin,0.,fhits_max); + h2_ele_foundHitsVsEta_mAOD = bookH2(iBooker, "foundHitsVsEta_mAOD","ele track # found hits vs eta",eta2D_nbin,eta_min,eta_max,fhits_nbin,0.,fhits_max); + + // matched electrons, matching + setBookPrefix("h_ele") ; + h1_ele_HoE_mAOD = bookH1withSumw2(iBooker, "HoE_mAOD","ele hadronic energy / em energy",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; + h1_ele_HoE_mAOD_barrel = bookH1withSumw2(iBooker, "HoE_mAOD_barrel","ele hadronic energy / em energy, barrel",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; + h1_ele_HoE_mAOD_endcaps = bookH1withSumw2(iBooker, "HoE_mAOD_endcaps","ele hadronic energy / em energy, endcaps",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; + h1_ele_dEtaSc_propVtx_mAOD = bookH1withSumw2(iBooker, "dEtaSc_propVtx_mAOD","ele #eta_{sc} - #eta_{tr}, prop from vertex",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P"); + h1_ele_dEtaSc_propVtx_mAOD_barrel = bookH1withSumw2(iBooker, "dEtaSc_propVtx_mAOD_barrel","ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P"); + h1_ele_dEtaSc_propVtx_mAOD_endcaps = bookH1withSumw2(iBooker, "dEtaSc_propVtx_mAOD_endcaps","ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P"); + h1_ele_dPhiCl_propOut_mAOD = bookH1withSumw2(iBooker, "dPhiCl_propOut_mAOD","ele #phi_{cl} - #phi_{tr}, prop from outermost",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P"); + h1_ele_dPhiCl_propOut_mAOD_barrel = bookH1withSumw2(iBooker, "dPhiCl_propOut_mAOD_barrel","ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P"); + h1_ele_dPhiCl_propOut_mAOD_endcaps = bookH1withSumw2(iBooker, "dPhiCl_propOut_mAOD_endcaps","ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P"); + + // fbrem + h1_ele_fbrem_mAOD = bookH1withSumw2(iBooker, "fbrem_mAOD","ele brem fraction, mode of GSF components",100,0.,1.,"P_{in} - P_{out} / P_{in}"); + h1_ele_fbrem_mAOD_barrel = bookH1withSumw2(iBooker, "fbrem_mAOD_barrel","ele brem fraction for barrel, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}"); + h1_ele_fbrem_mAOD_endcaps = bookH1withSumw2(iBooker, "fbrem_mAOD_endcaps", "ele brem franction for endcaps, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}"); + + // -- pflow over pT + h1_ele_chargedHadronRelativeIso_mAOD = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_mAOD","chargedHadronRelativeIso",100,0.0,2.,"chargedHadronRelativeIso","Events","ELE_LOGY E1 P"); + h1_ele_chargedHadronRelativeIso_mAOD_barrel = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_mAOD_barrel","chargedHadronRelativeIso for barrel",100,0.0,2.,"chargedHadronRelativeIso_barrel","Events","ELE_LOGY E1 P"); + h1_ele_chargedHadronRelativeIso_mAOD_endcaps = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_mAOD_endcaps","chargedHadronRelativeIso for endcaps",100,0.0,2.,"chargedHadronRelativeIso_endcaps","Events","ELE_LOGY E1 P"); + h1_ele_neutralHadronRelativeIso_mAOD = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_mAOD","neutralHadronRelativeIso",100,0.0,2.,"neutralHadronRelativeIso","Events","ELE_LOGY E1 P"); + h1_ele_neutralHadronRelativeIso_mAOD_barrel = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_mAOD_barrel","neutralHadronRelativeIso for barrel",100,0.0,2.,"neutralHadronRelativeIso_barrel","Events","ELE_LOGY E1 P"); + h1_ele_neutralHadronRelativeIso_mAOD_endcaps = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_mAOD_endcaps","neutralHadronRelativeIso for endcaps",100,0.0,2.,"neutralHadronRelativeIso_endcaps","Events","ELE_LOGY E1 P"); + h1_ele_photonRelativeIso_mAOD = bookH1withSumw2(iBooker, "photonRelativeIso_mAOD","photonRelativeIso",100,0.0,2.,"photonRelativeIso","Events","ELE_LOGY E1 P"); + h1_ele_photonRelativeIso_mAOD_barrel = bookH1withSumw2(iBooker, "photonRelativeIso_mAOD_barrel","photonRelativeIso for barrel",100,0.0,2.,"photonRelativeIso_barrel","Events","ELE_LOGY E1 P"); + h1_ele_photonRelativeIso_mAOD_endcaps = bookH1withSumw2(iBooker, "photonRelativeIso_mAOD_endcaps","photonRelativeIso for endcaps",100,0.0,2.,"photonRelativeIso_endcaps","Events","ELE_LOGY E1 P"); + + } + +void ElectronMcSignalValidatorMiniAOD::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) +{ + // get collections + edm::Handle electrons; + iEvent.getByToken(electronToken_, electrons); + + edm::Handle > genParticles ; + iEvent.getByToken(mcTruthCollection_, genParticles) ; + + edm::LogInfo("ElectronMcMiniAODSignalValidator::analyze") + <<"Treating event "<size()<<" electrons" ; + h1_recEleNum->Fill((*electrons).size()) ; + + //=============================================== + // all rec electrons + //=============================================== + + pat::Electron gsfElectron ; + +// for(std::vector::const_iterator el1=electrons->begin(); el1!=electrons->end(); el1++) { + pat::ElectronCollection::const_iterator el1 ; + pat::ElectronCollection::const_iterator el2 ; + for(el1=electrons->begin(); el1!=electrons->end(); el1++) { +// for (std::vector::const_iterator el2=el1+1 ; el2!=electrons->end() ; el2++ ) + for (el2=el1+1 ; el2!=electrons->end() ; el2++ ) + { + math::XYZTLorentzVector p12 = el1->p4()+el2->p4(); + float mee2 = p12.Dot(p12); + h1_ele_mee_all->Fill(sqrt(mee2)); + if ( el1->charge() * el2->charge() < 0. ) + { + h1_ele_mee_os->Fill(sqrt(mee2)); + } + } + } + + //=============================================== + // charge mis-ID + //=============================================== + + int mcNum=0, gamNum=0, eleNum=0 ; +// bool matchingID;//, matchingMotherID ; + bool matchingMotherID ; + + //=============================================== + // association mc-reco + //=============================================== + + for(size_t i=0; isize(); i++) { + // number of mc particles + mcNum++ ; + + // counts photons + if ( (*genParticles)[i].pdgId() == 22 ) + { gamNum++ ; } + + // select requested mother matching gen particle + // always include single particle with no mother + const Candidate * mother = (*genParticles)[i].mother(0) ; + matchingMotherID = false ; + for ( unsigned int ii=0 ; iipdgId() == matchingMotherIDs_[ii]) ) + { matchingMotherID = true ; +// std::cout << "matchingMotherID :" << matchingMotherIDs_[ii] << std::endl ; + } + } + if (!matchingMotherID) continue ; + + // electron preselection + if ((*genParticles)[i].pt()> maxPt_ || std::abs((*genParticles)[i].eta())> maxAbsEta_) + { continue ; } + eleNum++; + + // find best matched electron + bool okGsfFound = false ; + bool passMiniAODSelection = true ; + double gsfOkRatio = 999999. ; + pat::Electron bestGsfElectron ; + for (const pat::Electron &el : *electrons ) { + double dphi = el.phi()-(*genParticles)[i].phi() ; + if (std::abs(dphi)>CLHEP::pi) + { dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi ; } + double deltaR2 = (el.eta()-(*genParticles)[i].eta()) * (el.eta()-(*genParticles)[i].eta()) + dphi * dphi; + if ( deltaR2 < deltaR2_ ) + { + if ( ( ((*genParticles)[i].pdgId() == 11) && (el.charge() < 0.) ) || + ( ((*genParticles)[i].pdgId() == -11) && (el.charge() > 0.) ) ) + { + double tmpGsfRatio = el.p()/(*genParticles)[i].p() ; + if ( std::abs(tmpGsfRatio-1) < std::abs(gsfOkRatio-1) ) + { + gsfOkRatio = tmpGsfRatio; + bestGsfElectron=el; + okGsfFound = true; + } + } + } + } + + if (! okGsfFound) continue ; + + //------------------------------------ + // analysis when the mc track is found + //------------------------------------ + passMiniAODSelection = bestGsfElectron.pt() >= 5.; + + // electron related distributions + h1_ele_vertexPt->Fill( bestGsfElectron.pt() ); + h1_ele_vertexEta->Fill( bestGsfElectron.eta() ); + if ( (bestGsfElectron.scSigmaIEtaIEta()==0.) && (bestGsfElectron.fbrem()==0.) ) h1_ele_vertexPt_nocut->Fill( bestGsfElectron.pt() ); + + // generated distributions for matched electrons + h2_ele_PoPtrueVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.p()/(*genParticles)[i].p()); + if ( passMiniAODSelection ) { // Pt > 5. + h2_ele_sigmaIetaIetaVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.scSigmaIEtaIEta()); + } + + // supercluster related distributions + if ( passMiniAODSelection ) { // Pt > 5. + h1_scl_SigIEtaIEta_mAOD->Fill(bestGsfElectron.scSigmaIEtaIEta()); + if (bestGsfElectron.isEB()) h1_scl_SigIEtaIEta_mAOD_barrel->Fill(bestGsfElectron.scSigmaIEtaIEta()); + if (bestGsfElectron.isEE()) h1_scl_SigIEtaIEta_mAOD_endcaps->Fill(bestGsfElectron.scSigmaIEtaIEta()); + + h1_ele_dEtaSc_propVtx_mAOD->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); + if (bestGsfElectron.isEB()) h1_ele_dEtaSc_propVtx_mAOD_barrel->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); + if (bestGsfElectron.isEE())h1_ele_dEtaSc_propVtx_mAOD_endcaps->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); + + h1_ele_dPhiCl_propOut_mAOD->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); + if (bestGsfElectron.isEB()) h1_ele_dPhiCl_propOut_mAOD_barrel->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); + if (bestGsfElectron.isEE()) h1_ele_dPhiCl_propOut_mAOD_endcaps->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); + } + + // track related distributions + h2_ele_foundHitsVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits() ); + if (passMiniAODSelection) { // Pt > 5. + h2_ele_foundHitsVsEta_mAOD->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits() ); + } + + // match distributions + if (passMiniAODSelection) { // Pt > 5. + h1_ele_HoE_mAOD->Fill(bestGsfElectron.hcalOverEcal()); + if (bestGsfElectron.isEB()) h1_ele_HoE_mAOD_barrel->Fill(bestGsfElectron.hcalOverEcal()); + if (bestGsfElectron.isEE()) h1_ele_HoE_mAOD_endcaps->Fill(bestGsfElectron.hcalOverEcal()); + } + + // fbrem + + // double fbrem_mode = bestGsfElectron.fbrem(); + if (passMiniAODSelection) { // Pt > 5. + h1_ele_fbrem_mAOD->Fill( bestGsfElectron.fbrem() ); + if (bestGsfElectron.isEB()) h1_ele_fbrem_mAOD_barrel->Fill( bestGsfElectron.fbrem() ); + if (bestGsfElectron.isEE()) h1_ele_fbrem_mAOD_endcaps->Fill( bestGsfElectron.fbrem() ); + + // -- pflow over pT + h1_ele_chargedHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); + if (bestGsfElectron.isEB()) h1_ele_chargedHadronRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); + if (bestGsfElectron.isEE()) h1_ele_chargedHadronRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); + + h1_ele_neutralHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); +// h1_ele_chargedHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIso_.sumNeutralHadronEt / bestGsfElectron.pt()); + if (bestGsfElectron.isEB()) h1_ele_neutralHadronRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); + if (bestGsfElectron.isEE()) h1_ele_neutralHadronRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); + + h1_ele_photonRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); + if (bestGsfElectron.isEB()) h1_ele_photonRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); + if (bestGsfElectron.isEE()) h1_ele_photonRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); + } + + } // fin boucle size_t i + +// std::cout << ("fin analyze\n"); +} + From 9b63f15c36a7c0e6822bd4bf52ac902eefb8d4ab Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:04:04 +0100 Subject: [PATCH 040/250] miniAOD electron modification --- .../ElectronMcMiniAODSignalValidator.h | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h new file mode 100644 index 0000000000000..2c22e15942ff4 --- /dev/null +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h @@ -0,0 +1,119 @@ +#ifndef Validation_RecoEgamma_ElectronMcSignalValidatorMiniAOD_h +#define Validation_RecoEgamma_ElectronMcSignalValidatorMiniAOD_h + +#include "DQMOffline/EGamma/interface/ElectronDqmAnalyzerBase.h" + +// system include files +#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/VertexReco/interface/VertexFwd.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/PatCandidates/interface/Muon.h" +#include "DataFormats/PatCandidates/interface/Electron.h" +#include "DataFormats/PatCandidates/interface/Tau.h" +#include "DataFormats/PatCandidates/interface/Photon.h" +#include "DataFormats/PatCandidates/interface/Jet.h" +#include "DataFormats/PatCandidates/interface/MET.h" +#include "DataFormats/PatCandidates/interface/PackedCandidate.h" +#include "DataFormats/PatCandidates/interface/PackedGenParticle.h" + +#include "DataFormats/HepMCCandidate/interface/GenParticleFwd.h" + +// +// class declaration +// +class ElectronMcSignalValidatorMiniAOD : public ElectronDqmAnalyzerBase { + public: + explicit ElectronMcSignalValidatorMiniAOD(const edm::ParameterSet&); + virtual ~ElectronMcSignalValidatorMiniAOD(); + bool isAncestor(const reco::Candidate * ancestor, const reco::Candidate * particle); + + private: + virtual void bookHistograms( DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) ; + virtual void analyze(const edm::Event&, const edm::EventSetup&) override; + + // ----------member data --------------------------- + edm::EDGetTokenT > mcTruthCollection_; + edm::EDGetTokenT electronToken_; + + double maxPt_; + double maxAbsEta_; + double deltaR_, deltaR2_; + std::vector matchingIDs_; + std::vector matchingMotherIDs_; + std::string outputInternalPath_ ; + + // histos limits and binning + + int xyz_nbin ; + int pt_nbin ; int pt2D_nbin ; int pteff_nbin ; double pt_max ; + int fhits_nbin ; double fhits_max ; + int eta_nbin ; int eta2D_nbin ; double eta_min ; double eta_max ; + int deta_nbin ; double deta_min ; double deta_max ; + int detamatch_nbin ; int detamatch2D_nbin ; double detamatch_min ; double detamatch_max ; + int phi_nbin ; int phi2D_nbin ; double phi_min ; double phi_max ; + int dphi_nbin ; double dphi_min ; double dphi_max ; + int dphimatch_nbin ; int dphimatch2D_nbin ; double dphimatch_min ; double dphimatch_max ; + int mee_nbin ; double mee_min ; double mee_max ; + int hoe_nbin ; double hoe_min ; double hoe_max ; + int poptrue_nbin ; double poptrue_min ; double poptrue_max ; + bool set_EfficiencyFlag ; bool set_StatOverflowFlag ; + + // histos + + MonitorElement *h1_recEleNum; + + MonitorElement *h1_ele_vertexPt; + MonitorElement *h1_ele_vertexEta; + MonitorElement *h1_ele_vertexPt_nocut; + + MonitorElement *h1_scl_SigIEtaIEta_mAOD; + MonitorElement *h1_scl_SigIEtaIEta_mAOD_barrel; + MonitorElement *h1_scl_SigIEtaIEta_mAOD_endcaps; + + MonitorElement *h2_ele_foundHitsVsEta; + MonitorElement *h2_ele_foundHitsVsEta_mAOD; + + MonitorElement *h2_ele_PoPtrueVsEta; + MonitorElement *h2_ele_sigmaIetaIetaVsPt; + + MonitorElement *h1_ele_HoE_mAOD; + MonitorElement *h1_ele_HoE_mAOD_barrel; + MonitorElement *h1_ele_HoE_mAOD_endcaps; + MonitorElement *h1_ele_mee_all; + MonitorElement *h1_ele_mee_os; + + MonitorElement *h1_ele_dEtaSc_propVtx_mAOD; + MonitorElement *h1_ele_dEtaSc_propVtx_mAOD_barrel; + MonitorElement *h1_ele_dEtaSc_propVtx_mAOD_endcaps; + MonitorElement *h1_ele_dPhiCl_propOut_mAOD; + MonitorElement *h1_ele_dPhiCl_propOut_mAOD_barrel; + MonitorElement *h1_ele_dPhiCl_propOut_mAOD_endcaps; + + MonitorElement *h1_ele_fbrem_mAOD; + MonitorElement *h1_ele_fbrem_mAOD_barrel; + MonitorElement *h1_ele_fbrem_mAOD_endcaps; + + // -- pflow over pT + MonitorElement *h1_ele_chargedHadronRelativeIso_mAOD; + MonitorElement *h1_ele_chargedHadronRelativeIso_mAOD_barrel; + MonitorElement *h1_ele_chargedHadronRelativeIso_mAOD_endcaps; + MonitorElement *h1_ele_neutralHadronRelativeIso_mAOD; + MonitorElement *h1_ele_neutralHadronRelativeIso_mAOD_barrel; + MonitorElement *h1_ele_neutralHadronRelativeIso_mAOD_endcaps; + MonitorElement *h1_ele_photonRelativeIso_mAOD; + MonitorElement *h1_ele_photonRelativeIso_mAOD_barrel; + MonitorElement *h1_ele_photonRelativeIso_mAOD_endcaps; + +}; + +#endif From 494fa40f2df85ec7fa2d681c36685d0e26830807 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:16:26 +0100 Subject: [PATCH 041/250] miniAOD electron modification --- Validation/RecoEgamma/plugins/ElectronMcSignalPostValidator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/plugins/ElectronMcSignalPostValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcSignalPostValidator.cc index db4c3f0204bfd..1a2e15d5a520f 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcSignalPostValidator.cc +++ b/Validation/RecoEgamma/plugins/ElectronMcSignalPostValidator.cc @@ -59,7 +59,6 @@ void ElectronMcSignalPostValidator::finalize( DQMStore::IBooker & iBooker, DQMSt h1_ele_xOverX0VsEta->setBinContent(ibin,xOverX0) ; }/**/ - // profiles from 2D histos profileX(iBooker, iGetter, "scl_EoEtrueVsrecOfflineVertices","E/Etrue vs number of primary vertices","N_{primary vertices}","E/E_{true}", 0.8); profileX(iBooker, iGetter, "scl_EoEtrueVsrecOfflineVertices_barrel","E/Etrue vs number of primary vertices , barrel","N_{primary vertices}","E/E_{true}", 0.8); @@ -67,6 +66,7 @@ void ElectronMcSignalPostValidator::finalize( DQMStore::IBooker & iBooker, DQMSt profileX(iBooker, iGetter, "PoPtrueVsEta","mean ele momentum / gen momentum vs eta","#eta","

"); profileX(iBooker, iGetter, "PoPtrueVsPhi","mean ele momentum / gen momentum vs phi","#phi (rad)","

"); + profileX(iBooker, iGetter, "sigmaIetaIetaVsPt","SigmaIetaIeta vs pt","p_{T} (GeV/c)","SigmaIetaIeta"); profileX(iBooker, iGetter, "EoEtruePfVsEg","mean pflow sc energy / true energy vs e/g sc energy","E/E_{gen} (e/g)"," (pflow)") ; profileY(iBooker, iGetter, "EoEtruePfVsEg","mean e/g sc energy / true energy vs pflow sc energy","E/E_{gen} (pflow)"," (eg)") ; profileX(iBooker, iGetter, "EtaMnEtaTrueVsEta","mean ele eta - gen eta vs eta","#eta","<#eta_{rec} - #eta_{gen}>"); @@ -87,6 +87,7 @@ void ElectronMcSignalPostValidator::finalize( DQMStore::IBooker & iBooker, DQMSt profileX(iBooker, iGetter, "chi2VsPhi","mean ele track chi2 vs phi","#phi (rad)","<#Chi^{2}>"); profileX(iBooker, iGetter, "ambiguousTracksVsEta","mean ele # ambiguous tracks vs eta","#eta",""); profileX(iBooker, iGetter, "foundHitsVsEta","mean ele track # found hits vs eta","#eta",""); + profileX(iBooker, iGetter, "foundHitsVsEta_mAOD","mean ele track # found hits vs eta","#eta",""); profileX(iBooker, iGetter, "foundHitsVsPhi","mean ele track # found hits vs phi","#phi (rad)",""); profileX(iBooker, iGetter, "lostHitsVsEta","mean ele track # lost hits vs eta","#eta",""); profileX(iBooker, iGetter, "lostHitsVsPhi","mean ele track # lost hits vs phi","#phi (rad)",""); From 7e90d52ab3719f1188199d83bd04e25d76c39058 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:16:38 +0100 Subject: [PATCH 042/250] miniAOD electron modification --- .../plugins/ElectronMcSignalValidator.cc | 183 +++++++++++++++--- 1 file changed, 158 insertions(+), 25 deletions(-) diff --git a/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.cc index 83c563ff44a59..1f5f0e323e2b9 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.cc +++ b/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.cc @@ -39,6 +39,7 @@ #include "TTree.h" #include #include +#include using namespace reco; @@ -84,6 +85,7 @@ ElectronMcSignalValidator::ElectronMcSignalValidator( const edm::ParameterSet & maxPt_ = conf.getParameter("MaxPt"); maxAbsEta_ = conf.getParameter("MaxAbsEta"); deltaR_ = conf.getParameter("DeltaR"); + deltaR2_ = deltaR_ * deltaR_; matchingIDs_ = conf.getParameter >("MatchingID"); matchingMotherIDs_ = conf.getParameter >("MatchingMotherID"); inputFile_ = conf.getParameter("InputFile") ; @@ -246,6 +248,7 @@ ElectronMcSignalValidator::ElectronMcSignalValidator( const edm::ParameterSet & h2_ele_chargeVsPt = 0 ; h1_ele_vertexP = 0 ; h1_ele_vertexPt = 0 ; + h1_ele_vertexPt_nocut = 0 ; h1_ele_Et = 0 ; h2_ele_vertexPtVsEta = 0 ; h2_ele_vertexPtVsPhi = 0 ; @@ -295,6 +298,9 @@ ElectronMcSignalValidator::ElectronMcSignalValidator( const edm::ParameterSet & h1_scl_SigIEtaIEta = 0 ; h1_scl_SigIEtaIEta_barrel = 0 ; h1_scl_SigIEtaIEta_endcaps = 0 ; + h1_scl_SigIEtaIEta_mAOD = 0 ; + h1_scl_SigIEtaIEta_mAOD_barrel = 0 ; + h1_scl_SigIEtaIEta_mAOD_endcaps = 0 ; h1_scl_full5x5_sigmaIetaIeta = 0 ; h1_scl_full5x5_sigmaIetaIeta_barrel = 0 ; h1_scl_full5x5_sigmaIetaIeta_endcaps = 0 ; @@ -307,9 +313,9 @@ ElectronMcSignalValidator::ElectronMcSignalValidator( const edm::ParameterSet & h1_scl_E5x5 = 0 ; h1_scl_E5x5_barrel = 0 ; h1_scl_E5x5_endcaps = 0 ; - h1_scl_bcl_EtotoEtrue = 0 ; // new 2015.18.05 - h1_scl_bcl_EtotoEtrue_barrel = 0 ; // new 2015.18.05 - h1_scl_bcl_EtotoEtrue_endcaps = 0 ; // new 2015.18.05 + h1_scl_bcl_EtotoEtrue = 0 ; + h1_scl_bcl_EtotoEtrue_barrel = 0 ; + h1_scl_bcl_EtotoEtrue_endcaps = 0 ; h1_ele_ambiguousTracks = 0 ; h2_ele_ambiguousTracksVsEta = 0 ; @@ -319,6 +325,7 @@ ElectronMcSignalValidator::ElectronMcSignalValidator( const edm::ParameterSet & h1_ele_foundHits_barrel = 0 ; h1_ele_foundHits_endcaps = 0 ; h2_ele_foundHitsVsEta = 0 ; + h2_ele_foundHitsVsEta_mAOD = 0 ; h2_ele_foundHitsVsPhi = 0 ; h2_ele_foundHitsVsPt = 0 ; h1_ele_lostHits = 0 ; @@ -341,6 +348,7 @@ ElectronMcSignalValidator::ElectronMcSignalValidator( const edm::ParameterSet & h2_ele_PoPtrueVsEta = 0 ; h2_ele_PoPtrueVsPhi = 0 ; h2_ele_PoPtrueVsPt = 0 ; + h2_ele_sigmaIetaIetaVsPt = 0 ; h1_ele_PoPtrue_golden_barrel = 0 ; h1_ele_PoPtrue_golden_endcaps = 0 ; @@ -407,6 +415,9 @@ ElectronMcSignalValidator::ElectronMcSignalValidator( const edm::ParameterSet & h1_ele_dEtaSc_propVtx = 0 ; h1_ele_dEtaSc_propVtx_barrel = 0 ; h1_ele_dEtaSc_propVtx_endcaps = 0 ; + h1_ele_dEtaSc_propVtx_mAOD = 0 ; + h1_ele_dEtaSc_propVtx_mAOD_barrel = 0 ; + h1_ele_dEtaSc_propVtx_mAOD_endcaps = 0 ; h2_ele_dEtaScVsEta_propVtx = 0 ; h2_ele_dEtaScVsPhi_propVtx = 0 ; h2_ele_dEtaScVsPt_propVtx = 0 ; @@ -425,6 +436,9 @@ ElectronMcSignalValidator::ElectronMcSignalValidator( const edm::ParameterSet & h1_ele_dPhiCl_propOut = 0 ; h1_ele_dPhiCl_propOut_barrel = 0 ; h1_ele_dPhiCl_propOut_endcaps = 0 ; + h1_ele_dPhiCl_propOut_mAOD = 0 ; + h1_ele_dPhiCl_propOut_mAOD_barrel = 0 ; + h1_ele_dPhiCl_propOut_mAOD_endcaps = 0 ; h2_ele_dPhiClVsEta_propOut = 0 ; h2_ele_dPhiClVsPhi_propOut = 0 ; h2_ele_dPhiClVsPt_propOut = 0 ; @@ -472,11 +486,20 @@ ElectronMcSignalValidator::ElectronMcSignalValidator( const edm::ParameterSet & h2_ele_HoEVsEta = 0 ; h2_ele_HoEVsPhi = 0 ; h2_ele_HoEVsE = 0 ; + h1_ele_HoE_mAOD = 0 ; + h1_ele_HoE_mAOD_barrel = 0 ; + h1_ele_HoE_mAOD_endcaps = 0 ; h1_ele_fbrem = 0 ; + h1_ele_fbrem_barrel = 0 ; + h1_ele_fbrem_endcaps = 0 ; p1_ele_fbremVsEta_mode = 0 ; p1_ele_fbremVsEta_mean = 0 ; + h1_ele_fbrem_mAOD = 0 ; + h1_ele_fbrem_mAOD_barrel = 0 ; + h1_ele_fbrem_mAOD_endcaps = 0 ; h1_ele_superclusterfbrem = 0 ; + h1_ele_superclusterfbrem_barrel = 0 ; h1_ele_superclusterfbrem_endcaps = 0 ; h2_ele_PinVsPoutGolden_mode = 0 ; @@ -527,6 +550,18 @@ ElectronMcSignalValidator::ElectronMcSignalValidator( const edm::ParameterSet & h1_ele_convDcot_all = 0 ; h1_ele_convRadius = 0 ; h1_ele_convRadius_all = 0 ; + + // PF + h1_ele_chargedHadronRelativeIso_mAOD = 0 ; + h1_ele_chargedHadronRelativeIso_mAOD_barrel = 0 ; + h1_ele_chargedHadronRelativeIso_mAOD_endcaps = 0 ; + h1_ele_neutralHadronRelativeIso_mAOD = 0 ; + h1_ele_neutralHadronRelativeIso_mAOD_barrel = 0 ; + h1_ele_neutralHadronRelativeIso_mAOD_endcaps = 0 ; + h1_ele_photonRelativeIso_mAOD = 0 ; + h1_ele_photonRelativeIso_mAOD_barrel = 0 ; + h1_ele_photonRelativeIso_mAOD_endcaps = 0 ; + } void ElectronMcSignalValidator::bookHistograms( DQMStore::IBooker & iBooker, edm::Run const &, edm::EventSetup const & ) @@ -549,7 +584,7 @@ void ElectronMcSignalValidator::bookHistograms( DQMStore::IBooker & iBooker, edm h1_recCoreNum = bookH1(iBooker, "recCoreNum","# rec electron cores",21, -0.5,20.5,"N_{core}"); h1_recTrackNum = bookH1(iBooker, "recTrackNum","# rec gsf tracks",41, -0.5,40.5,"N_{track}"); h1_recSeedNum = bookH1(iBooker, "recSeedNum","# rec electron seeds",101, -0.5,100.5,"N_{seed}"); - h1_recOfflineVertices = bookH1(iBooker, "recOfflineVertices","# rec Offline Primary Vertices",61, -0.5,60.5,"N_{Vertices}"); + h1_recOfflineVertices = bookH1(iBooker, "recOfflineVertices","# rec Offline Primary Vertices",61, -0.5,60.5,"N_{Vertices}"); h2_scl_EoEtrueVsrecOfflineVertices = bookH2(iBooker, "scl_EoEtrueVsrecOfflineVertices", "E/Etrue vs number of primary vertices", 10, 0., 50., 50, 0., 2.5, "N_{primary vertices}", "E/E_{true}"); h2_scl_EoEtrueVsrecOfflineVertices_barrel = bookH2(iBooker, "scl_EoEtrueVsrecOfflineVertices_barrel", "E/Etrue vs number of primary , barrel", 10, 0., 50., 50, 0., 2.5, "N_{primary vertices}", "E/E_{true}"); h2_scl_EoEtrueVsrecOfflineVertices_endcaps = bookH2(iBooker, "scl_EoEtrueVsrecOfflineVertices_endcaps", "E/Etrue vs number of primary , endcaps", 10, 0., 50., 50, 0., 2.5, "N_{primary vertices}", "E/E_{true}"); @@ -637,6 +672,7 @@ void ElectronMcSignalValidator::bookHistograms( DQMStore::IBooker & iBooker, edm h2_ele_chargeVsPt = bookH2(iBooker, "chargeVsPt","ele charge vs pt",pt_nbin,0.,100.,5,-2.,2.); h1_ele_vertexP = bookH1withSumw2(iBooker, "vertexP","ele momentum",p_nbin,0.,p_max,"p_{vertex} (GeV/c)"); h1_ele_vertexPt = bookH1withSumw2(iBooker, "vertexPt","ele transverse momentum",pt_nbin,0.,pt_max,"p_{T vertex} (GeV/c)"); + h1_ele_vertexPt_nocut = bookH1withSumw2(iBooker, "vertexPt_nocut","pT of prunned electrons",pt_nbin,0.,pt_max,"p_{T vertex} (GeV/c)"); h1_ele_Et = bookH1withSumw2(iBooker, "Et","ele ecal E_{T}",pt_nbin,0.,pt_max,"E_{T} (GeV)"); h2_ele_vertexPtVsEta = bookH2(iBooker, "vertexPtVsEta","ele transverse momentum vs eta",eta2D_nbin,eta_min,eta_max,pt2D_nbin,0.,pt_max); h2_ele_vertexPtVsPhi = bookH2(iBooker, "vertexPtVsPhi","ele transverse momentum vs phi",phi2D_nbin,phi_min,phi_max,pt2D_nbin,0.,pt_max); @@ -656,6 +692,8 @@ void ElectronMcSignalValidator::bookHistograms( DQMStore::IBooker & iBooker, edm h2_ele_PoPtrueVsEta = bookH2withSumw2(iBooker, "PoPtrueVsEta","ele momentum / gen momentum vs eta",eta2D_nbin,eta_min,eta_max,50,poptrue_min,poptrue_max); h2_ele_PoPtrueVsPhi = bookH2(iBooker, "PoPtrueVsPhi","ele momentum / gen momentum vs phi",phi2D_nbin,phi_min,phi_max,50,poptrue_min,poptrue_max); h2_ele_PoPtrueVsPt = bookH2(iBooker, "PoPtrueVsPt","ele momentum / gen momentum vs eta",pt2D_nbin,0.,pt_max,50,poptrue_min,poptrue_max); +// h2_ele_sigmaIetaIetaVsPt = bookH2(iBooker,"sigmaIetaIetaVsPt","SigmaIetaIeta vs pt",pt_nbin,0.,pt_max,100,0.,0.05); + h2_ele_sigmaIetaIetaVsPt = bookH2(iBooker,"sigmaIetaIetaVsPt","SigmaIetaIeta vs pt",100,0.,pt_max,100,0.,0.05); h1_ele_PoPtrue_golden_barrel = bookH1withSumw2(iBooker, "PoPtrue_golden_barrel","ele momentum / gen momentum, golden, barrel",poptrue_nbin,poptrue_min,poptrue_max,"P/P_{gen}"); h1_ele_PoPtrue_golden_endcaps = bookH1withSumw2(iBooker, "PoPtrue_golden_endcaps","ele momentum / gen momentum, golden, endcaps",poptrue_nbin,poptrue_min,poptrue_max,"P/P_{gen}"); h1_ele_PoPtrue_showering_barrel = bookH1withSumw2(iBooker, "PoPtrue_showering_barrel","ele momentum / gen momentum, showering, barrel",poptrue_nbin,poptrue_min,poptrue_max,"P/P_{gen}"); @@ -712,6 +750,9 @@ void ElectronMcSignalValidator::bookHistograms( DQMStore::IBooker & iBooker, edm h1_scl_SigIEtaIEta = bookH1withSumw2(iBooker, "sigietaieta","ele supercluster sigma ieta ieta",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); h1_scl_SigIEtaIEta_barrel = bookH1withSumw2(iBooker, "sigietaieta_barrel","ele supercluster sigma ieta ieta, barrel",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); h1_scl_SigIEtaIEta_endcaps = bookH1withSumw2(iBooker, "sigietaieta_endcaps","ele supercluster sigma ieta ieta, endcaps",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); + h1_scl_SigIEtaIEta_mAOD = bookH1withSumw2(iBooker, "SigIEtaIEta_mAOD","ele supercluster sigma ieta ieta",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); + h1_scl_SigIEtaIEta_mAOD_barrel = bookH1withSumw2(iBooker, "SigIEtaIEta_mAOD_barrel","ele supercluster sigma ieta ieta, barrel",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); + h1_scl_SigIEtaIEta_mAOD_endcaps = bookH1withSumw2(iBooker, "SigIEtaIEta_mAOD_endcaps","ele supercluster sigma ieta ieta, endcaps",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); h1_scl_full5x5_sigmaIetaIeta = bookH1withSumw2(iBooker, "full5x5_sigietaieta","ele supercluster full5x5 sigma ieta ieta",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); h1_scl_full5x5_sigmaIetaIeta_barrel = bookH1withSumw2(iBooker, "full5x5_sigietaieta_barrel","ele supercluster full5x5 sigma ieta ieta, barrel",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); h1_scl_full5x5_sigmaIetaIeta_endcaps = bookH1withSumw2(iBooker, "full5x5_sigietaieta_endcaps","ele supercluster full5x5 sigma ieta ieta, endcaps",100,0.,0.05,"#sigma_{i#eta i#eta}","Events","ELE_LOGY E1 P"); @@ -739,6 +780,7 @@ void ElectronMcSignalValidator::bookHistograms( DQMStore::IBooker & iBooker, edm h1_ele_foundHits_barrel = bookH1withSumw2(iBooker, "foundHits_barrel","ele track # found hits, barrel",fhits_nbin,0.,fhits_max,"N_{hits}"); h1_ele_foundHits_endcaps = bookH1withSumw2(iBooker, "foundHits_endcaps","ele track # found hits, endcaps",fhits_nbin,0.,fhits_max,"N_{hits}"); h2_ele_foundHitsVsEta = bookH2(iBooker, "foundHitsVsEta","ele track # found hits vs eta",eta2D_nbin,eta_min,eta_max,fhits_nbin,0.,fhits_max); + h2_ele_foundHitsVsEta_mAOD = bookH2(iBooker, "foundHitsVsEta_mAOD","ele track # found hits vs eta",eta2D_nbin,eta_min,eta_max,fhits_nbin,0.,fhits_max); h2_ele_foundHitsVsPhi = bookH2(iBooker, "foundHitsVsPhi","ele track # found hits vs phi",phi2D_nbin,phi_min,phi_max,fhits_nbin,0.,fhits_max); h2_ele_foundHitsVsPt = bookH2(iBooker, "foundHitsVsPt","ele track # found hits vs pt",pt2D_nbin,0.,pt_max,fhits_nbin,0.,fhits_max); h1_ele_lostHits = bookH1withSumw2(iBooker, "lostHits","ele track # lost hits", 5,0.,5.,"N_{lost hits}"); @@ -797,6 +839,9 @@ void ElectronMcSignalValidator::bookHistograms( DQMStore::IBooker & iBooker, edm h1_ele_dEtaSc_propVtx = bookH1withSumw2(iBooker, "dEtaSc_propVtx","ele #eta_{sc} - #eta_{tr}, prop from vertex",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P"); h1_ele_dEtaSc_propVtx_barrel = bookH1withSumw2(iBooker, "dEtaSc_propVtx_barrel","ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P"); h1_ele_dEtaSc_propVtx_endcaps = bookH1withSumw2(iBooker, "dEtaSc_propVtx_endcaps","ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P"); + h1_ele_dEtaSc_propVtx_mAOD = bookH1withSumw2(iBooker, "dEtaSc_propVtx_mAOD","ele #eta_{sc} - #eta_{tr}, prop from vertex",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P"); + h1_ele_dEtaSc_propVtx_mAOD_barrel = bookH1withSumw2(iBooker, "dEtaSc_propVtx_mAOD_barrel","ele #eta_{sc} - #eta_{tr}, prop from vertex, barrel",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P"); + h1_ele_dEtaSc_propVtx_mAOD_endcaps = bookH1withSumw2(iBooker, "dEtaSc_propVtx_mAOD_endcaps","ele #eta_{sc} - #eta_{tr}, prop from vertex, endcaps",detamatch_nbin,detamatch_min,detamatch_max,"#eta_{sc} - #eta_{tr}","Events","ELE_LOGY E1 P"); h2_ele_dEtaScVsEta_propVtx = bookH2(iBooker, "dEtaScVsEta_propVtx","ele #eta_{sc} - #eta_{tr} vs eta, prop from vertex",eta2D_nbin,eta_min,eta_max,detamatch2D_nbin,detamatch_min,detamatch_max); h2_ele_dEtaScVsPhi_propVtx = bookH2(iBooker, "dEtaScVsPhi_propVtx","ele #eta_{sc} - #eta_{tr} vs phi, prop from vertex",phi2D_nbin,phi_min,phi_max,detamatch2D_nbin,detamatch_min,detamatch_max); h2_ele_dEtaScVsPt_propVtx = bookH2(iBooker, "dEtaScVsPt_propVtx","ele #eta_{sc} - #eta_{tr} vs pt, prop from vertex",pt2D_nbin,0.,pt_max,detamatch2D_nbin,detamatch_min,detamatch_max); @@ -815,6 +860,9 @@ void ElectronMcSignalValidator::bookHistograms( DQMStore::IBooker & iBooker, edm h1_ele_dPhiCl_propOut = bookH1withSumw2(iBooker, "dPhiCl_propOut","ele #phi_{cl} - #phi_{tr}, prop from outermost",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P"); h1_ele_dPhiCl_propOut_barrel = bookH1withSumw2(iBooker, "dPhiCl_propOut_barrel","ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P"); h1_ele_dPhiCl_propOut_endcaps = bookH1withSumw2(iBooker, "dPhiCl_propOut_endcaps","ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P"); + h1_ele_dPhiCl_propOut_mAOD = bookH1withSumw2(iBooker, "dPhiCl_propOut_mAOD","ele #phi_{cl} - #phi_{tr}, prop from outermost",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P"); + h1_ele_dPhiCl_propOut_mAOD_barrel = bookH1withSumw2(iBooker, "dPhiCl_propOut_mAOD_barrel","ele #phi_{cl} - #phi_{tr}, prop from outermost, barrel",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P"); + h1_ele_dPhiCl_propOut_mAOD_endcaps = bookH1withSumw2(iBooker, "dPhiCl_propOut_mAOD_endcaps","ele #phi_{cl} - #phi_{tr}, prop from outermost, endcaps",dphimatch_nbin,dphimatch_min,dphimatch_max,"#phi_{seedcl} - #phi_{tr} (rad)","Events","ELE_LOGY E1 P"); h2_ele_dPhiClVsEta_propOut = bookH2(iBooker, "dPhiClVsEta_propOut","ele #phi_{cl} - #phi_{tr} vs eta, prop from out",eta2D_nbin,eta_min,eta_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max); h2_ele_dPhiClVsPhi_propOut = bookH2(iBooker, "dPhiClVsPhi_propOut","ele #phi_{cl} - #phi_{tr} vs phi, prop from out",phi2D_nbin,phi_min,phi_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max); h2_ele_dPhiClVsPt_propOut = bookH2(iBooker, "dPhiSClsPt_propOut","ele #phi_{cl} - #phi_{tr} vs pt, prop from out",pt2D_nbin,0.,pt_max,dphimatch2D_nbin,dphimatch_min,dphimatch_max); @@ -833,6 +881,9 @@ void ElectronMcSignalValidator::bookHistograms( DQMStore::IBooker & iBooker, edm h1_ele_HoE = bookH1withSumw2(iBooker, "HoE","ele hadronic energy / em energy",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; h1_ele_HoE_barrel = bookH1withSumw2(iBooker, "HoE_barrel","ele hadronic energy / em energy, barrel",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; h1_ele_HoE_endcaps = bookH1withSumw2(iBooker, "HoE_endcaps","ele hadronic energy / em energy, endcaps",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; + h1_ele_HoE_mAOD = bookH1withSumw2(iBooker, "HoE_mAOD","ele hadronic energy / em energy",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; + h1_ele_HoE_mAOD_barrel = bookH1withSumw2(iBooker, "HoE_mAOD_barrel","ele hadronic energy / em energy, barrel",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; + h1_ele_HoE_mAOD_endcaps = bookH1withSumw2(iBooker, "HoE_mAOD_endcaps","ele hadronic energy / em energy, endcaps",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; h1_ele_HoE_bc = bookH1withSumw2(iBooker, "HoE_bc","ele hadronic energy / em energy behind cluster",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; h1_ele_HoE_bc_barrel = bookH1withSumw2(iBooker, "HoE_bc_barrel","ele hadronic energy / em energy, behind cluster barrel",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; h1_ele_HoE_bc_endcaps = bookH1withSumw2(iBooker, "HoE_bc_endcaps","ele hadronic energy / em energy, behind cluster, endcaps",hoe_nbin, hoe_min, hoe_max,"H/E","Events","ELE_LOGY E1 P") ; @@ -936,6 +987,9 @@ void ElectronMcSignalValidator::bookHistograms( DQMStore::IBooker & iBooker, edm h1_ele_fbrem = bookH1withSumw2(iBooker, "fbrem","ele brem fraction, mode of GSF components",100,0.,1.,"P_{in} - P_{out} / P_{in}"); h1_ele_fbrem_barrel = bookH1withSumw2(iBooker, "fbrem_barrel","ele brem fraction for barrel, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}"); h1_ele_fbrem_endcaps = bookH1withSumw2(iBooker, "fbrem_endcaps", "ele brem franction for endcaps, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}"); + h1_ele_fbrem_mAOD = bookH1withSumw2(iBooker, "fbrem_mAOD","ele brem fraction, mode of GSF components",100,0.,1.,"P_{in} - P_{out} / P_{in}"); + h1_ele_fbrem_mAOD_barrel = bookH1withSumw2(iBooker, "fbrem_mAOD_barrel","ele brem fraction for barrel, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}"); + h1_ele_fbrem_mAOD_endcaps = bookH1withSumw2(iBooker, "fbrem_mAOD_endcaps", "ele brem franction for endcaps, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}"); h1_ele_superclusterfbrem = bookH1withSumw2(iBooker, "superclusterfbrem","supercluster brem fraction, mode of GSF components",100,0.,1.,"P_{in} - P_{out} / P_{in}"); h1_ele_superclusterfbrem_barrel = bookH1withSumw2(iBooker, "superclusterfbrem_barrel","supercluster brem fraction for barrel, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}"); h1_ele_superclusterfbrem_endcaps = bookH1withSumw2(iBooker, "superclusterfbrem_endcaps", "supercluster brem franction for endcaps, mode of GSF components", 100, 0.,1.,"P_{in} - P_{out} / P_{in}"); @@ -974,6 +1028,15 @@ void ElectronMcSignalValidator::bookHistograms( DQMStore::IBooker & iBooker, edm h1_ele_photonRelativeIso = bookH1withSumw2(iBooker, "photonRelativeIso","photonRelativeIso",100,0.0,2.,"photonRelativeIso","Events","ELE_LOGY E1 P"); h1_ele_photonRelativeIso_barrel = bookH1withSumw2(iBooker, "photonRelativeIso_barrel","photonRelativeIso for barrel",100,0.0,2.,"photonRelativeIso_barrel","Events","ELE_LOGY E1 P"); h1_ele_photonRelativeIso_endcaps = bookH1withSumw2(iBooker, "photonRelativeIso_endcaps","photonRelativeIso for endcaps",100,0.0,2.,"photonRelativeIso_endcaps","Events","ELE_LOGY E1 P"); + h1_ele_chargedHadronRelativeIso_mAOD = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_mAOD","chargedHadronRelativeIso",100,0.0,2.,"chargedHadronRelativeIso","Events","ELE_LOGY E1 P"); + h1_ele_chargedHadronRelativeIso_mAOD_barrel = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_mAOD_barrel","chargedHadronRelativeIso for barrel",100,0.0,2.,"chargedHadronRelativeIso_barrel","Events","ELE_LOGY E1 P"); + h1_ele_chargedHadronRelativeIso_mAOD_endcaps = bookH1withSumw2(iBooker, "chargedHadronRelativeIso_mAOD_endcaps","chargedHadronRelativeIso for endcaps",100,0.0,2.,"chargedHadronRelativeIso_endcaps","Events","ELE_LOGY E1 P"); + h1_ele_neutralHadronRelativeIso_mAOD = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_mAOD","neutralHadronRelativeIso",100,0.0,2.,"neutralHadronRelativeIso","Events","ELE_LOGY E1 P"); + h1_ele_neutralHadronRelativeIso_mAOD_barrel = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_mAOD_barrel","neutralHadronRelativeIso for barrel",100,0.0,2.,"neutralHadronRelativeIso_barrel","Events","ELE_LOGY E1 P"); + h1_ele_neutralHadronRelativeIso_mAOD_endcaps = bookH1withSumw2(iBooker, "neutralHadronRelativeIso_mAOD_endcaps","neutralHadronRelativeIso for endcaps",100,0.0,2.,"neutralHadronRelativeIso_endcaps","Events","ELE_LOGY E1 P"); + h1_ele_photonRelativeIso_mAOD = bookH1withSumw2(iBooker, "photonRelativeIso_mAOD","photonRelativeIso",100,0.0,2.,"photonRelativeIso","Events","ELE_LOGY E1 P"); + h1_ele_photonRelativeIso_mAOD_barrel = bookH1withSumw2(iBooker, "photonRelativeIso_mAOD_barrel","photonRelativeIso for barrel",100,0.0,2.,"photonRelativeIso_barrel","Events","ELE_LOGY E1 P"); + h1_ele_photonRelativeIso_mAOD_endcaps = bookH1withSumw2(iBooker, "photonRelativeIso_mAOD_endcaps","photonRelativeIso for endcaps",100,0.0,2.,"photonRelativeIso_endcaps","Events","ELE_LOGY E1 P"); // conversion rejection information h1_ele_convFlags = bookH1withSumw2(iBooker, "convFlags","conversion rejection flag",5,-1.5,3.5); @@ -1054,29 +1117,15 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E //=============================================== reco::GsfElectronCollection::const_iterator gsfIter ; + // mee only for ( gsfIter=gsfElectrons->begin() ; gsfIter!=gsfElectrons->end() ; gsfIter++ ) { // preselect electrons - if (gsfIter->pt()>maxPt_ || std::abs(gsfIter->eta())>maxAbsEta_) continue ; +// if (gsfIter->pt()>maxPt_ || std::abs(gsfIter->eta())>maxAbsEta_) continue ; // - h1_ele_EoverP_all->Fill(gsfIter->eSuperClusterOverP()) ; - h1_ele_EseedOP_all->Fill(gsfIter->eSeedClusterOverP()) ; - h1_ele_EoPout_all->Fill(gsfIter->eSeedClusterOverPout()) ; - h1_ele_EeleOPout_all->Fill( gsfIter->eEleClusterOverPout()) ; - h1_ele_dEtaSc_propVtx_all->Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx()) ; - h1_ele_dPhiSc_propVtx_all->Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx()) ; - h1_ele_dEtaCl_propOut_all->Fill(gsfIter->deltaEtaSeedClusterTrackAtCalo()) ; - h1_ele_dPhiCl_propOut_all->Fill(gsfIter->deltaPhiSeedClusterTrackAtCalo()) ; - h1_ele_HoE_all->Fill(gsfIter->hcalOverEcal()) ; - h1_ele_HoE_bc_all->Fill(gsfIter->hcalOverEcalBc()) ; - h1_ele_TIP_all->Fill( EleRelPoint(gsfIter->vertex(),theBeamSpot->position()).perp() ); - h1_ele_vertexEta_all->Fill( gsfIter->eta() ); - h1_ele_vertexPt_all->Fill( gsfIter->pt() ); - h1_ele_Et_all->Fill( gsfIter->ecalEnergy()/cosh(gsfIter->superCluster()->eta())); float enrj1=gsfIter->ecalEnergy(); - // mee reco::GsfElectronCollection::const_iterator gsfIter2 ; for ( gsfIter2=gsfIter+1 ; gsfIter2!=gsfElectrons->end() ; gsfIter2++ ) { @@ -1110,6 +1159,29 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E } } + } + + for ( gsfIter=gsfElectrons->begin() ; gsfIter!=gsfElectrons->end() ; gsfIter++ ) + { + // preselect electrons + if (gsfIter->pt()>maxPt_ || std::abs(gsfIter->eta())>maxAbsEta_) continue ; + + // + h1_ele_EoverP_all->Fill(gsfIter->eSuperClusterOverP()) ; + h1_ele_EseedOP_all->Fill(gsfIter->eSeedClusterOverP()) ; + h1_ele_EoPout_all->Fill(gsfIter->eSeedClusterOverPout()) ; + h1_ele_EeleOPout_all->Fill( gsfIter->eEleClusterOverPout()) ; + h1_ele_dEtaSc_propVtx_all->Fill(gsfIter->deltaEtaSuperClusterTrackAtVtx()) ; + h1_ele_dPhiSc_propVtx_all->Fill(gsfIter->deltaPhiSuperClusterTrackAtVtx()) ; + h1_ele_dEtaCl_propOut_all->Fill(gsfIter->deltaEtaSeedClusterTrackAtCalo()) ; + h1_ele_dPhiCl_propOut_all->Fill(gsfIter->deltaPhiSeedClusterTrackAtCalo()) ; + h1_ele_HoE_all->Fill(gsfIter->hcalOverEcal()) ; + h1_ele_HoE_bc_all->Fill(gsfIter->hcalOverEcalBc()) ; + h1_ele_TIP_all->Fill( EleRelPoint(gsfIter->vertex(),theBeamSpot->position()).perp() ); + h1_ele_vertexEta_all->Fill( gsfIter->eta() ); + h1_ele_vertexPt_all->Fill( gsfIter->pt() ); + h1_ele_Et_all->Fill( gsfIter->ecalEnergy()/cosh(gsfIter->superCluster()->eta())); + // conversion rejection int flags = gsfIter->convFlags() ; if (flags==-9999) { flags=-1 ; } @@ -1173,8 +1245,9 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E double dphi = gsfIter->phi()-mcIter->phi() ; if (std::abs(dphi)>CLHEP::pi) { dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi ; } - double deltaR = sqrt(pow((gsfIter->eta()-mcIter->eta()),2) + pow(dphi,2)) ; - if ( deltaR < deltaR_ ) +// double deltaR = sqrt(pow((gsfIter->eta()-mcIter->eta()),2) + pow(dphi,2)) ; + double deltaR2 = (gsfIter->eta()-mcIter->eta()) * (gsfIter->eta()-mcIter->eta()) + dphi * dphi ; + if ( deltaR2 < deltaR2_ ) { double mc_charge = mcIter->pdgId() == 11 ? -1. : 1. ; h1_ele_ChargeMnChargeTrue->Fill( std::abs(gsfIter->charge()-mc_charge)); @@ -1261,6 +1334,7 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E // find best matched electron bool okGsfFound = false ; + bool passMiniAODSelection = true ; double gsfOkRatio = 999999. ; reco::GsfElectron bestGsfElectron ; reco::GsfElectronRef bestGsfElectronRef ; @@ -1268,11 +1342,13 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E reco::GsfElectronCollection::size_type iElectron ; for ( gsfIter=gsfElectrons->begin(), iElectron=0 ; gsfIter!=gsfElectrons->end() ; gsfIter++, iElectron++ ) { + // temporary cut for pt < 5. double dphi = gsfIter->phi()-mcIter->phi() ; if (std::abs(dphi)>CLHEP::pi) { dphi = dphi < 0? (CLHEP::twopi) + dphi : dphi - CLHEP::twopi ; } - double deltaR = sqrt(pow((gsfIter->eta()-mcIter->eta()),2) + pow(dphi,2)); - if ( deltaR < deltaR_ ) +// double deltaR = sqrt(pow((gsfIter->eta()-mcIter->eta()),2) + pow(dphi,2)); + double deltaR2 = (gsfIter->eta()-mcIter->eta()) * (gsfIter->eta()-mcIter->eta()) + dphi * dphi; + if ( deltaR2 < deltaR2_ ) { if ( ( (mcIter->pdgId() == 11) && (gsfIter->charge() < 0.) ) || ( (mcIter->pdgId() == -11) && (gsfIter->charge() > 0.) ) ) @@ -1293,6 +1369,7 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E //------------------------------------ // analysis when the mc track is found //------------------------------------ + passMiniAODSelection = bestGsfElectron.pt() >= 5.; // electron related distributions h1_ele_charge->Fill( bestGsfElectron.charge() ); @@ -1301,6 +1378,7 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E h2_ele_chargeVsPt->Fill( bestGsfElectron.pt(),bestGsfElectron.charge() ); h1_ele_vertexP->Fill( bestGsfElectron.p() ); h1_ele_vertexPt->Fill( bestGsfElectron.pt() ); + if (bestGsfElectron.scSigmaIEtaIEta()==0.) h1_ele_vertexPt_nocut->Fill( bestGsfElectron.pt() ); h1_ele_Et->Fill( bestGsfElectron.ecalEnergy()/cosh(bestGsfElectron.superCluster()->eta())); h2_ele_vertexPtVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.pt() ); h2_ele_vertexPtVsPhi->Fill( bestGsfElectron.phi(),bestGsfElectron.pt() ); @@ -1348,6 +1426,9 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E h2_ele_PoPtrueVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.p()/mcIter->p()); h2_ele_PoPtrueVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.p()/mcIter->p()); h2_ele_PoPtrueVsPt->Fill( bestGsfElectron.py(), bestGsfElectron.p()/mcIter->p()); + if (passMiniAODSelection) { // Pt > 5. + h2_ele_sigmaIetaIetaVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.scSigmaIEtaIEta()); + } if (bestGsfElectron.isEB()) h1_ele_PoPtrue_barrel->Fill( bestGsfElectron.p()/mcIter->p()); if (bestGsfElectron.isEE()) h1_ele_PoPtrue_endcaps->Fill( bestGsfElectron.p()/mcIter->p()); if (bestGsfElectron.isEB() && bestGsfElectron.classification() == GsfElectron::GOLDEN) h1_ele_PoPtrue_golden_barrel->Fill( bestGsfElectron.p()/mcIter->p()); @@ -1396,6 +1477,11 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E h1_scl_SigIEtaIEta->Fill(bestGsfElectron.scSigmaIEtaIEta()); if (bestGsfElectron.isEB()) h1_scl_SigIEtaIEta_barrel->Fill(bestGsfElectron.scSigmaIEtaIEta()); if (bestGsfElectron.isEE()) h1_scl_SigIEtaIEta_endcaps->Fill(bestGsfElectron.scSigmaIEtaIEta()); + if (passMiniAODSelection) { // Pt > 5. + h1_scl_SigIEtaIEta_mAOD->Fill(bestGsfElectron.scSigmaIEtaIEta()); + if (bestGsfElectron.isEB()) h1_scl_SigIEtaIEta_mAOD_barrel->Fill(bestGsfElectron.scSigmaIEtaIEta()); + if (bestGsfElectron.isEE()) h1_scl_SigIEtaIEta_mAOD_endcaps->Fill(bestGsfElectron.scSigmaIEtaIEta()); + } h1_scl_full5x5_sigmaIetaIeta->Fill(bestGsfElectron.full5x5_sigmaIetaIeta()); if (bestGsfElectron.isEB()) h1_scl_full5x5_sigmaIetaIeta_barrel->Fill(bestGsfElectron.full5x5_sigmaIetaIeta()); if (bestGsfElectron.isEE()) h1_scl_full5x5_sigmaIetaIeta_endcaps->Fill(bestGsfElectron.full5x5_sigmaIetaIeta()); @@ -1433,6 +1519,9 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E if (bestGsfElectron.isEB()) h1_ele_foundHits_barrel->Fill( bestGsfElectron.gsfTrack()->numberOfValidHits() ); if (bestGsfElectron.isEE()) h1_ele_foundHits_endcaps->Fill( bestGsfElectron.gsfTrack()->numberOfValidHits() ); h2_ele_foundHitsVsEta->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits() ); + if (passMiniAODSelection) { // Pt > 5. + h2_ele_foundHitsVsEta_mAOD->Fill( bestGsfElectron.eta(), bestGsfElectron.gsfTrack()->numberOfValidHits() ); + } h2_ele_foundHitsVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.gsfTrack()->numberOfValidHits() ); h2_ele_foundHitsVsPt->Fill( bestGsfElectron.pt(), bestGsfElectron.gsfTrack()->numberOfValidHits() ); h1_ele_lostHits->Fill( bestGsfElectron.gsfTrack()->numberOfLostHits() ); @@ -1537,8 +1626,15 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E h2_ele_EeleOPoutVsPhi->Fill( bestGsfElectron.phi(), bestGsfElectron.eEleClusterOverPout() ); h2_ele_EeleOPoutVsE->Fill( bestGsfElectron.caloEnergy(), bestGsfElectron.eEleClusterOverPout() ); h1_ele_dEtaSc_propVtx->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); + if (passMiniAODSelection) { // Pt > 5. + h1_ele_dEtaSc_propVtx_mAOD->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); + } if (bestGsfElectron.isEB()) h1_ele_dEtaSc_propVtx_barrel->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); if (bestGsfElectron.isEE())h1_ele_dEtaSc_propVtx_endcaps->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); + if (passMiniAODSelection) { // Pt > 5. + if (bestGsfElectron.isEB()) h1_ele_dEtaSc_propVtx_mAOD_barrel->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); + if (bestGsfElectron.isEE())h1_ele_dEtaSc_propVtx_mAOD_endcaps->Fill(bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); + } h2_ele_dEtaScVsEta_propVtx->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); h2_ele_dEtaScVsPhi_propVtx->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); h2_ele_dEtaScVsPt_propVtx->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSuperClusterTrackAtVtx()); @@ -1555,8 +1651,15 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E h2_ele_dEtaClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo()); h2_ele_dEtaClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaEtaSeedClusterTrackAtCalo()); h1_ele_dPhiCl_propOut->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); + if (passMiniAODSelection) { // Pt > 5. + h1_ele_dPhiCl_propOut_mAOD->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); + } if (bestGsfElectron.isEB()) h1_ele_dPhiCl_propOut_barrel->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); if (bestGsfElectron.isEE()) h1_ele_dPhiCl_propOut_endcaps->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); + if (passMiniAODSelection) { // Pt > 5. + if (bestGsfElectron.isEB()) h1_ele_dPhiCl_propOut_mAOD_barrel->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); + if (bestGsfElectron.isEE()) h1_ele_dPhiCl_propOut_mAOD_endcaps->Fill(bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); + } h2_ele_dPhiClVsEta_propOut->Fill( bestGsfElectron.eta(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); h2_ele_dPhiClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); h2_ele_dPhiClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiSeedClusterTrackAtCalo()); @@ -1573,11 +1676,18 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E h2_ele_dPhiEleClVsPhi_propOut->Fill(bestGsfElectron.phi(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo()); h2_ele_dPhiEleClVsPt_propOut->Fill(bestGsfElectron.pt(),bestGsfElectron.deltaPhiEleClusterTrackAtCalo()); h1_ele_HoE->Fill(bestGsfElectron.hcalOverEcal()); + if (passMiniAODSelection) { // Pt > 5. + h1_ele_HoE_mAOD->Fill(bestGsfElectron.hcalOverEcal()); + } h1_ele_HoE_bc->Fill(bestGsfElectron.hcalOverEcalBc()); if (bestGsfElectron.isEB()) h1_ele_HoE_bc_barrel->Fill(bestGsfElectron.hcalOverEcalBc()); if (bestGsfElectron.isEE()) h1_ele_HoE_bc_endcaps->Fill(bestGsfElectron.hcalOverEcalBc()); if (bestGsfElectron.isEB()) h1_ele_HoE_barrel->Fill(bestGsfElectron.hcalOverEcal()); if (bestGsfElectron.isEE()) h1_ele_HoE_endcaps->Fill(bestGsfElectron.hcalOverEcal()); + if (passMiniAODSelection) { // Pt > 5. + if (bestGsfElectron.isEB()) h1_ele_HoE_mAOD_barrel->Fill(bestGsfElectron.hcalOverEcal()); + if (bestGsfElectron.isEE()) h1_ele_HoE_mAOD_endcaps->Fill(bestGsfElectron.hcalOverEcal()); + } if (!bestGsfElectron.isEBEtaGap() && !bestGsfElectron.isEBPhiGap()&& !bestGsfElectron.isEBEEGap() && !bestGsfElectron.isEERingGap() && !bestGsfElectron.isEEDeeGap()) h1_ele_HoE_fiducial->Fill(bestGsfElectron.hcalOverEcal()); h2_ele_HoEVsEta->Fill( bestGsfElectron.eta(),bestGsfElectron.hcalOverEcal()); @@ -1604,17 +1714,25 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E double fbrem_mode = bestGsfElectron.fbrem(); h1_ele_fbrem->Fill(fbrem_mode); - + if (passMiniAODSelection) { // Pt > 5. + h1_ele_fbrem_mAOD->Fill(fbrem_mode); + } if (bestGsfElectron.isEB()) { double fbrem_mode_barrel = bestGsfElectron.fbrem(); h1_ele_fbrem_barrel->Fill(fbrem_mode_barrel); + if (passMiniAODSelection) { // Pt > 5. + h1_ele_fbrem_mAOD_barrel->Fill(fbrem_mode_barrel); + } } if (bestGsfElectron.isEE()) { double fbrem_mode_endcaps = bestGsfElectron.fbrem(); h1_ele_fbrem_endcaps->Fill(fbrem_mode_endcaps); + if (passMiniAODSelection) { // Pt > 5. + h1_ele_fbrem_mAOD_endcaps->Fill(fbrem_mode_endcaps); + } } double superclusterfbrem_mode = bestGsfElectron.superClusterFbrem(); @@ -1702,14 +1820,29 @@ void ElectronMcSignalValidator::analyze( const edm::Event & iEvent, const edm::E h1_ele_chargedHadronRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); if (bestGsfElectron.isEB()) h1_ele_chargedHadronRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); if (bestGsfElectron.isEE()) h1_ele_chargedHadronRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); + if (passMiniAODSelection) { // Pt > 5. + h1_ele_chargedHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); + if (bestGsfElectron.isEB()) h1_ele_chargedHadronRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); + if (bestGsfElectron.isEE()) h1_ele_chargedHadronRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); + } h1_ele_neutralHadronRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); if (bestGsfElectron.isEB()) h1_ele_neutralHadronRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); if (bestGsfElectron.isEE()) h1_ele_neutralHadronRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); + if (passMiniAODSelection) { // Pt > 5. + h1_ele_neutralHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); + if (bestGsfElectron.isEB()) h1_ele_neutralHadronRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); + if (bestGsfElectron.isEE()) h1_ele_neutralHadronRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); + } h1_ele_photonRelativeIso->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); if (bestGsfElectron.isEB()) h1_ele_photonRelativeIso_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); if (bestGsfElectron.isEE()) h1_ele_photonRelativeIso_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); + if (passMiniAODSelection) { // Pt > 5. + h1_ele_photonRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); + if (bestGsfElectron.isEB()) h1_ele_photonRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); + if (bestGsfElectron.isEE()) h1_ele_photonRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); + } // isolation h1_ele_tkSumPt_dr03->Fill(bestGsfElectron.dr03TkSumPt()); From f0af8071138719a031449b845fc50ba3e8cce9b0 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:16:44 +0100 Subject: [PATCH 043/250] miniAOD electron modification --- .../plugins/ElectronMcSignalValidator.h | 36 +++++++++++++++---- 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.h b/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.h index 3245f1e2700c1..ef0900061448a 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.h +++ b/Validation/RecoEgamma/plugins/ElectronMcSignalValidator.h @@ -36,7 +36,7 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase edm::EDGetTokenT electronCoreCollection_; edm::EDGetTokenT electronTrackCollection_; edm::EDGetTokenT electronSeedCollection_; - edm::EDGetTokenT offlineVerticesCollection_; + edm::EDGetTokenT offlineVerticesCollection_; edm::EDGetTokenT beamSpotTag_ ; bool readAOD_; @@ -58,7 +58,7 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase double maxPt_; double maxAbsEta_; - double deltaR_; + double deltaR_, deltaR2_; std::vector matchingIDs_; std::vector matchingMotherIDs_; std::string inputFile_ ; @@ -96,7 +96,7 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase MonitorElement *h1_recCoreNum; MonitorElement *h1_recTrackNum; MonitorElement *h1_recSeedNum; - MonitorElement *h1_recOfflineVertices; + MonitorElement *h1_recOfflineVertices; MonitorElement *h2_scl_EoEtrueVsrecOfflineVertices; // new 2015.15.05 MonitorElement *h2_scl_EoEtrueVsrecOfflineVertices_barrel; // new 2015.15.05 MonitorElement *h2_scl_EoEtrueVsrecOfflineVertices_endcaps; // new 2015.15.05 @@ -175,6 +175,7 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase MonitorElement *h2_ele_chargeVsPt; MonitorElement *h1_ele_vertexP; MonitorElement *h1_ele_vertexPt; + MonitorElement *h1_ele_vertexPt_nocut; MonitorElement *h1_ele_Et; MonitorElement *h2_ele_vertexPtVsEta; MonitorElement *h2_ele_vertexPtVsPhi; @@ -227,6 +228,9 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase MonitorElement *h1_scl_SigIEtaIEta; MonitorElement *h1_scl_SigIEtaIEta_barrel; MonitorElement *h1_scl_SigIEtaIEta_endcaps; + MonitorElement *h1_scl_SigIEtaIEta_mAOD; + MonitorElement *h1_scl_SigIEtaIEta_mAOD_barrel; + MonitorElement *h1_scl_SigIEtaIEta_mAOD_endcaps; MonitorElement *h1_scl_full5x5_sigmaIetaIeta; MonitorElement *h1_scl_full5x5_sigmaIetaIeta_barrel; MonitorElement *h1_scl_full5x5_sigmaIetaIeta_endcaps; @@ -251,6 +255,7 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase MonitorElement *h1_ele_foundHits_barrel; MonitorElement *h1_ele_foundHits_endcaps; MonitorElement *h2_ele_foundHitsVsEta; + MonitorElement *h2_ele_foundHitsVsEta_mAOD; MonitorElement *h2_ele_foundHitsVsPhi; MonitorElement *h2_ele_foundHitsVsPt; MonitorElement *h1_ele_lostHits; @@ -300,7 +305,7 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase MonitorElement *h2_ele_PinMnPoutVsPt_mode; MonitorElement *h2_ele_PinMnPoutVsE_mode; MonitorElement *h2_ele_PinMnPoutVsChi2_mode; - + MonitorElement *h2_ele_sigmaIetaIetaVsPt; MonitorElement *h1_ele_outerP; MonitorElement *h1_ele_outerP_mode; MonitorElement *h2_ele_outerPVsEta_mode; @@ -337,6 +342,9 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase MonitorElement *h1_ele_dEtaSc_propVtx; MonitorElement *h1_ele_dEtaSc_propVtx_barrel; MonitorElement *h1_ele_dEtaSc_propVtx_endcaps; + MonitorElement *h1_ele_dEtaSc_propVtx_mAOD; + MonitorElement *h1_ele_dEtaSc_propVtx_mAOD_barrel; + MonitorElement *h1_ele_dEtaSc_propVtx_mAOD_endcaps; MonitorElement *h2_ele_dEtaScVsEta_propVtx; MonitorElement *h2_ele_dEtaScVsPhi_propVtx; MonitorElement *h2_ele_dEtaScVsPt_propVtx; @@ -355,6 +363,9 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase MonitorElement *h1_ele_dPhiCl_propOut; MonitorElement *h1_ele_dPhiCl_propOut_barrel; MonitorElement *h1_ele_dPhiCl_propOut_endcaps; + MonitorElement *h1_ele_dPhiCl_propOut_mAOD; + MonitorElement *h1_ele_dPhiCl_propOut_mAOD_barrel; + MonitorElement *h1_ele_dPhiCl_propOut_mAOD_endcaps; MonitorElement *h2_ele_dPhiClVsEta_propOut; MonitorElement *h2_ele_dPhiClVsPhi_propOut; MonitorElement *h2_ele_dPhiClVsPt_propOut; @@ -405,14 +416,19 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase MonitorElement *h2_ele_HoEVsEta; MonitorElement *h2_ele_HoEVsPhi; MonitorElement *h2_ele_HoEVsE; + MonitorElement *h1_ele_HoE_mAOD; + MonitorElement *h1_ele_HoE_mAOD_barrel; + MonitorElement *h1_ele_HoE_mAOD_endcaps; MonitorElement *h1_ele_fbrem; MonitorElement *h1_ele_fbrem_barrel; MonitorElement *h1_ele_fbrem_endcaps; + MonitorElement *h1_ele_fbrem_mAOD; + MonitorElement *h1_ele_fbrem_mAOD_barrel; + MonitorElement *h1_ele_fbrem_mAOD_endcaps; MonitorElement *h1_ele_superclusterfbrem; MonitorElement *h1_ele_superclusterfbrem_barrel; MonitorElement *h1_ele_superclusterfbrem_endcaps; - MonitorElement *p1_ele_fbremVsEta_mode; MonitorElement *p1_ele_fbremVsEta_mean; @@ -459,7 +475,15 @@ class ElectronMcSignalValidator : public ElectronDqmAnalyzerBase MonitorElement *h1_ele_photonRelativeIso; MonitorElement *h1_ele_photonRelativeIso_barrel; MonitorElement *h1_ele_photonRelativeIso_endcaps; - + MonitorElement *h1_ele_chargedHadronRelativeIso_mAOD; + MonitorElement *h1_ele_chargedHadronRelativeIso_mAOD_barrel; + MonitorElement *h1_ele_chargedHadronRelativeIso_mAOD_endcaps; + MonitorElement *h1_ele_neutralHadronRelativeIso_mAOD; + MonitorElement *h1_ele_neutralHadronRelativeIso_mAOD_barrel; + MonitorElement *h1_ele_neutralHadronRelativeIso_mAOD_endcaps; + MonitorElement *h1_ele_photonRelativeIso_mAOD; + MonitorElement *h1_ele_photonRelativeIso_mAOD_barrel; + MonitorElement *h1_ele_photonRelativeIso_mAOD_endcaps; // isolation MonitorElement *h1_ele_tkSumPt_dr03; MonitorElement *h1_ele_tkSumPt_dr03_barrel; From efd9060423593a2e4c304f7e38c9232aec7fd8c0 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:19:47 +0100 Subject: [PATCH 044/250] miniAOD electron modification --- ...lectronMcSignalPostValidatorMiniAOD_cfi.py | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Validation/RecoEgamma/python/ElectronMcSignalPostValidatorMiniAOD_cfi.py diff --git a/Validation/RecoEgamma/python/ElectronMcSignalPostValidatorMiniAOD_cfi.py b/Validation/RecoEgamma/python/ElectronMcSignalPostValidatorMiniAOD_cfi.py new file mode 100644 index 0000000000000..7dec7b8c9b125 --- /dev/null +++ b/Validation/RecoEgamma/python/ElectronMcSignalPostValidatorMiniAOD_cfi.py @@ -0,0 +1,21 @@ + +import FWCore.ParameterSet.Config as cms + +electronMcSignalHistosCfg = cms.PSet( + EfficiencyFlag = cms.bool(True), StatOverflowFlag = cms.bool(False) +) + +electronMcSignalPostValidatorMiniAOD = cms.EDAnalyzer("ElectronMcSignalPostValidatorMiniAOD", + + Verbosity = cms.untracked.int32(0), + FinalStep = cms.string("AtJobEnd"), + InputFile = cms.string(""), + OutputFile = cms.string(""), + InputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD"), + OutputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD"), + + histosCfg = cms.PSet(electronMcSignalHistosCfg) +) + + + From 70dd39e316c5e91bb029c3333a339bef95eec02f Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:20:04 +0100 Subject: [PATCH 045/250] miniAOD electron modification --- .../ElectronMcSignalValidatorMiniAOD_cfi.py | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Validation/RecoEgamma/python/ElectronMcSignalValidatorMiniAOD_cfi.py diff --git a/Validation/RecoEgamma/python/ElectronMcSignalValidatorMiniAOD_cfi.py b/Validation/RecoEgamma/python/ElectronMcSignalValidatorMiniAOD_cfi.py new file mode 100644 index 0000000000000..34079bf97d7a3 --- /dev/null +++ b/Validation/RecoEgamma/python/ElectronMcSignalValidatorMiniAOD_cfi.py @@ -0,0 +1,37 @@ +import FWCore.ParameterSet.Config as cms + +electronMcSignalHistosCfg = cms.PSet( + Nbinxyz = cms.int32(50), + Nbinpt = cms.int32(50), Nbinpt2D = cms.int32(50), Nbinpteff = cms.int32(19),Ptmax = cms.double(100.0), + Nbinfhits = cms.int32(30), Fhitsmax = cms.double(30.0), + Nbineta = cms.int32(50), Nbineta2D = cms.int32(50),Etamin = cms.double(-2.5), Etamax = cms.double(2.5), + Nbindeta = cms.int32(100), Detamin = cms.double(-0.005), Detamax = cms.double(0.005), + Nbindetamatch = cms.int32(100), Nbindetamatch2D = cms.int32(50), Detamatchmin = cms.double(-0.05), Detamatchmax = cms.double(0.05), + Nbinphi = cms.int32(64), Nbinphi2D = cms.int32(32), Phimin = cms.double(-3.2), Phimax = cms.double(3.2), + Nbindphi = cms.int32(100), Dphimin = cms.double(-0.01), Dphimax = cms.double(0.01), + Nbindphimatch = cms.int32(100), Nbindphimatch2D = cms.int32(50), Dphimatchmin = cms.double(-0.2), Dphimatchmax = cms.double(0.2), + Nbinmee = cms.int32(100), Meemin = cms.double(0.0), Meemax = cms.double(150.), + Nbinhoe = cms.int32(100), Hoemin = cms.double(0.0), Hoemax = cms.double(0.5), + Nbinpoptrue = cms.int32(75), Poptruemin = cms.double(0.0), Poptruemax = cms.double(1.5), + EfficiencyFlag = cms.bool(True), StatOverflowFlag = cms.bool(False) +) + +electronMcSignalValidatorMiniAOD = cms.EDAnalyzer("ElectronMcSignalValidatorMiniAOD", + + Verbosity = cms.untracked.int32(0), + FinalStep = cms.string("AtJobEnd"), + InputFile = cms.string(""), + OutputFile = cms.string(""), + InputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD"), # + OutputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD"), # + + mcTruthCollection = cms.InputTag("prunedGenParticles"), + electrons = cms.InputTag("slimmedElectrons"), + + MaxPt = cms.double(100.0), + DeltaR = cms.double(0.05), + MaxAbsEta = cms.double(2.5), + MatchingID = cms.vint32(11,-11), + MatchingMotherID = cms.vint32(23,24,-24,32), + histosCfg = cms.PSet(electronMcSignalHistosCfg) +) From d5d0da6c286560a71d793b8d3491f8575944e331 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:20:30 +0100 Subject: [PATCH 046/250] miniAOD electron modification --- .../RecoEgamma/python/egammaPostValidationMiniAOD_cff.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Validation/RecoEgamma/python/egammaPostValidationMiniAOD_cff.py diff --git a/Validation/RecoEgamma/python/egammaPostValidationMiniAOD_cff.py b/Validation/RecoEgamma/python/egammaPostValidationMiniAOD_cff.py new file mode 100644 index 0000000000000..d60e168335810 --- /dev/null +++ b/Validation/RecoEgamma/python/egammaPostValidationMiniAOD_cff.py @@ -0,0 +1,5 @@ +import FWCore.ParameterSet.Config as cms + +from Validation.RecoEgamma.electronPostValidationSequenceMiniAOD_cff import * + +egammaPostValidationMiniAOD = cms.Sequence(electronPostValidationSequenceMiniAOD) From 40fb8911636a899355c8b0e84fb68c40e28d3771 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:20:45 +0100 Subject: [PATCH 047/250] miniAOD electron modification --- Validation/RecoEgamma/python/egammaValidationMiniAOD_cff.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Validation/RecoEgamma/python/egammaValidationMiniAOD_cff.py diff --git a/Validation/RecoEgamma/python/egammaValidationMiniAOD_cff.py b/Validation/RecoEgamma/python/egammaValidationMiniAOD_cff.py new file mode 100644 index 0000000000000..7c587840f747c --- /dev/null +++ b/Validation/RecoEgamma/python/egammaValidationMiniAOD_cff.py @@ -0,0 +1,5 @@ +import FWCore.ParameterSet.Config as cms + +from Validation.RecoEgamma.electronValidationSequenceMiniAOD_cff import * + +egammaValidationMiniAOD = cms.Sequence(electronValidationSequenceMiniAOD) From 6c158089a6b42529009cf1ce2a1f9aa2c7e214f9 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:21:34 +0100 Subject: [PATCH 048/250] miniAOD electron modification --- .../python/electronPostValidationSequenceMiniAOD_cff.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Validation/RecoEgamma/python/electronPostValidationSequenceMiniAOD_cff.py diff --git a/Validation/RecoEgamma/python/electronPostValidationSequenceMiniAOD_cff.py b/Validation/RecoEgamma/python/electronPostValidationSequenceMiniAOD_cff.py new file mode 100644 index 0000000000000..48deda0bb79f4 --- /dev/null +++ b/Validation/RecoEgamma/python/electronPostValidationSequenceMiniAOD_cff.py @@ -0,0 +1,6 @@ +import FWCore.ParameterSet.Config as cms + +from Validation.RecoEgamma.ElectronMcSignalPostValidatorMiniAOD_cfi import * + +electronPostValidationSequenceMiniAOD = cms.Sequence(electronMcSignalPostValidatorMiniAOD) + From 1a381da4984053baaaad4117a9f971eaded6f3be Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:21:51 +0100 Subject: [PATCH 049/250] miniAOD electron modification --- .../python/electronValidationSequenceMiniAOD_cff.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Validation/RecoEgamma/python/electronValidationSequenceMiniAOD_cff.py diff --git a/Validation/RecoEgamma/python/electronValidationSequenceMiniAOD_cff.py b/Validation/RecoEgamma/python/electronValidationSequenceMiniAOD_cff.py new file mode 100644 index 0000000000000..c1d8bb9df7039 --- /dev/null +++ b/Validation/RecoEgamma/python/electronValidationSequenceMiniAOD_cff.py @@ -0,0 +1,6 @@ +import FWCore.ParameterSet.Config as cms + +from Validation.RecoEgamma.ElectronMcSignalValidatorMiniAOD_cfi import * + +electronValidationSequenceMiniAOD = cms.Sequence(electronMcSignalValidatorMiniAOD) + From e8be45609d45eec4a38c80e85f3cc703b4e5c6f3 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:25:08 +0100 Subject: [PATCH 050/250] miniAOD electron modification --- Validation/RecoEgamma/python/egammaPostValidation_cff.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Validation/RecoEgamma/python/egammaPostValidation_cff.py b/Validation/RecoEgamma/python/egammaPostValidation_cff.py index 40ddc0c77bf59..dcae5f5052e33 100644 --- a/Validation/RecoEgamma/python/egammaPostValidation_cff.py +++ b/Validation/RecoEgamma/python/egammaPostValidation_cff.py @@ -4,3 +4,4 @@ from Validation.RecoEgamma.electronPostValidationSequence_cff import * egammaPostValidation = cms.Sequence(photonPostProcessor+electronPostValidationSequence) +egammaPostValidationMiniAOD = cms.Sequence(electronPostValidationSequenceMiniAOD) From f92f2bf096f9c6977e06571190bc382c8836ab11 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:25:16 +0100 Subject: [PATCH 051/250] miniAOD electron modification --- Validation/RecoEgamma/python/egammaValidation_cff.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Validation/RecoEgamma/python/egammaValidation_cff.py b/Validation/RecoEgamma/python/egammaValidation_cff.py index 0fad3b70b9e18..6ec8ca121a822 100644 --- a/Validation/RecoEgamma/python/egammaValidation_cff.py +++ b/Validation/RecoEgamma/python/egammaValidation_cff.py @@ -9,3 +9,4 @@ tkConversionValidation.isRunCentrally = True egammaValidation = cms.Sequence(electronValidationSequence+photonValidationSequence) +egammaValidationMiniAOD = cms.Sequence(electronValidationSequenceMiniAOD) From 78d6e6442f248664ef856229042182ffab195890 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:26:43 +0100 Subject: [PATCH 052/250] miniAOD electron modification --- .../RecoEgamma/python/electronPostValidationSequence_cff.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/python/electronPostValidationSequence_cff.py b/Validation/RecoEgamma/python/electronPostValidationSequence_cff.py index 067702e5d246f..a6a43208ada42 100644 --- a/Validation/RecoEgamma/python/electronPostValidationSequence_cff.py +++ b/Validation/RecoEgamma/python/electronPostValidationSequence_cff.py @@ -3,6 +3,7 @@ from Validation.RecoEgamma.ElectronMcSignalPostValidator_cfi import * from Validation.RecoEgamma.ElectronMcFakePostValidator_cfi import * from Validation.RecoEgamma.ElectronMcSignalPostValidatorPt1000_cfi import * +from Validation.RecoEgamma.ElectronMcSignalPostValidatorMiniAOD_cfi import * electronPostValidationSequence = cms.Sequence(electronMcSignalPostValidator+electronMcFakePostValidator+electronMcSignalPostValidatorPt1000) - +electronPostValidationSequenceMiniAOD = cms.Sequence(electronMcSignalPostValidatorMiniAOD) From 9f78896fc9a8de5fc51ed5131d13d496e66eab87 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:26:52 +0100 Subject: [PATCH 053/250] miniAOD electron modification --- .../RecoEgamma/python/electronValidationSequence_cff.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/python/electronValidationSequence_cff.py b/Validation/RecoEgamma/python/electronValidationSequence_cff.py index f176dbe9dc2e9..f774fabd1af8a 100644 --- a/Validation/RecoEgamma/python/electronValidationSequence_cff.py +++ b/Validation/RecoEgamma/python/electronValidationSequence_cff.py @@ -4,6 +4,8 @@ from Validation.RecoEgamma.ElectronMcSignalValidator_gedGsfElectrons_cfi import * from Validation.RecoEgamma.ElectronMcFakeValidator_gedGsfElectrons_cfi import * from Validation.RecoEgamma.ElectronMcSignalValidatorPt1000_gedGsfElectrons_cfi import * - +from Validation.RecoEgamma.ElectronMcSignalValidatorMiniAOD_cfi import * + electronValidationSequence = cms.Sequence(electronIsoFromDeps+electronMcSignalValidator+electronMcFakeValidator+electronMcSignalValidatorPt1000) +electronValidationSequenceMiniAOD = cms.Sequence(electronMcSignalValidatorMiniAOD) From a40a996f830647619d3a827bd423ada88c8b71a1 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:30:21 +0100 Subject: [PATCH 054/250] web page electron modification --- .../RecoEgamma/test/ElectronMcFakePostValidation_cfg.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/test/ElectronMcFakePostValidation_cfg.py b/Validation/RecoEgamma/test/ElectronMcFakePostValidation_cfg.py index 268497794c0f0..1d6c1b85d0c56 100755 --- a/Validation/RecoEgamma/test/ElectronMcFakePostValidation_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcFakePostValidation_cfg.py @@ -35,7 +35,9 @@ process.electronMcFakePostValidator.OutputFolderName = cms.string("EgammaV/ElectronMcFakeValidator") from Configuration.AlCa.autoCond import autoCond -process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' +#process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' +process.GlobalTag.globaltag = '75X_mcRun2_asymptotic_Queue' +#process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' process.dqmSaver.workflow = '/electronHistos/' + t1[1] + '/RECO3' process.dqmsave_step = cms.Path(process.DQMSaver) From b0ca104d1719a87835f383a1deff87757cdf73f4 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:30:34 +0100 Subject: [PATCH 055/250] web page electron modification --- .../test/ElectronMcFakeValidation_gedGsfElectrons_cfg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Validation/RecoEgamma/test/ElectronMcFakeValidation_gedGsfElectrons_cfg.py b/Validation/RecoEgamma/test/ElectronMcFakeValidation_gedGsfElectrons_cfg.py index c0ea38814ccf5..b3eb52c925051 100755 --- a/Validation/RecoEgamma/test/ElectronMcFakeValidation_gedGsfElectrons_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcFakeValidation_gedGsfElectrons_cfg.py @@ -29,8 +29,9 @@ process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') from Configuration.AlCa.autoCond import autoCond -process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' - +#process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' +process.GlobalTag.globaltag = '75X_mcRun2_asymptotic_Queue' +#process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' # FOR DATA REDONE FROM RAW, ONE MUST HIDE IsoFromDeps # CONFIGURATION process.load("Validation.RecoEgamma.electronIsoFromDeps_cff") From 9ecc164c11433ba26fe5448a3704f9659991189b Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:32:42 +0100 Subject: [PATCH 056/250] web page electron modification --- .../test/ElectronMcSignalPostValidationPt1000_cfg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalPostValidationPt1000_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalPostValidationPt1000_cfg.py index c843feace74d5..91dec38d377c3 100755 --- a/Validation/RecoEgamma/test/ElectronMcSignalPostValidationPt1000_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcSignalPostValidationPt1000_cfg.py @@ -35,8 +35,9 @@ process.electronMcSignalPostValidatorPt1000.OutputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorPt1000") from Configuration.AlCa.autoCond import autoCond -process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' - +#process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' +process.GlobalTag.globaltag = '75X_mcRun2_asymptotic_Queue' +#process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' process.dqmSaver.workflow = '/electronHistos/' + t1[1] + '/RECO3' process.dqmsave_step = cms.Path(process.DQMSaver) From 103bfdf158b72577a523c347edeee8632a5c24a7 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:33:02 +0100 Subject: [PATCH 057/250] web page electron modification --- .../RecoEgamma/test/ElectronMcSignalPostValidation_cfg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalPostValidation_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalPostValidation_cfg.py index 24a22d8485a16..5f2a1bb731fb0 100755 --- a/Validation/RecoEgamma/test/ElectronMcSignalPostValidation_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcSignalPostValidation_cfg.py @@ -36,7 +36,8 @@ from Configuration.AlCa.autoCond import autoCond process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' - +#process.GlobalTag.globaltag = '76X_mcRun2_asymptotic_Queue' +#process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' process.dqmSaver.workflow = '/electronHistos/' + t1[1] + '/RECO3' process.dqmsave_step = cms.Path(process.DQMSaver) From 6fa14bd0cadd78fa8ddc8e3172a3ef8e1fd171b3 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:33:23 +0100 Subject: [PATCH 058/250] web page electron modification --- .../ElectronMcSignalValidationPt1000_gedGsfElectrons_cfg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalValidationPt1000_gedGsfElectrons_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalValidationPt1000_gedGsfElectrons_cfg.py index a377c1414143e..ad5d006843dc8 100755 --- a/Validation/RecoEgamma/test/ElectronMcSignalValidationPt1000_gedGsfElectrons_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcSignalValidationPt1000_gedGsfElectrons_cfg.py @@ -29,8 +29,9 @@ process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') from Configuration.AlCa.autoCond import autoCond -process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' - +#process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' +process.GlobalTag.globaltag = '75X_mcRun2_asymptotic_Queue' +#process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' # FOR DATA REDONE FROM RAW, ONE MUST HIDE IsoFromDeps # CONFIGURATION process.load("Validation.RecoEgamma.electronIsoFromDeps_cff") From 4ef0fc0fcbfe0065a01c72f1af9873ace445019c Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:33:34 +0100 Subject: [PATCH 059/250] web page electron modification --- .../test/ElectronMcSignalValidation_gedGsfElectrons_cfg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalValidation_gedGsfElectrons_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalValidation_gedGsfElectrons_cfg.py index 6ff2fc30e5fad..3a63603bd31cb 100755 --- a/Validation/RecoEgamma/test/ElectronMcSignalValidation_gedGsfElectrons_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcSignalValidation_gedGsfElectrons_cfg.py @@ -30,7 +30,8 @@ from Configuration.AlCa.autoCond import autoCond process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' - +#process.GlobalTag.globaltag = '76X_mcRun2_asymptotic_Queue' +#process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' # FOR DATA REDONE FROM RAW, ONE MUST HIDE IsoFromDeps # CONFIGURATION process.load("Validation.RecoEgamma.electronIsoFromDeps_cff") From 4941d7ec95a7a7057c5c6facc9545e7560ce8172 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:36:15 +0100 Subject: [PATCH 060/250] miniAOD electron modification --- Validation/RecoEgamma/test/ElectronMcSignalHistos.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalHistos.txt b/Validation/RecoEgamma/test/ElectronMcSignalHistos.txt index ef1dfaaba9a03..d1e97cd66d278 100644 --- a/Validation/RecoEgamma/test/ElectronMcSignalHistos.txt +++ b/Validation/RecoEgamma/test/ElectronMcSignalHistos.txt @@ -117,6 +117,7 @@ ElectronMcSignalValidator/h_ele_hcalDepth2OverEcalBc 1 1 0 0 ElectronMcSignalValidator/h_ele_hcalDepth2OverEcalBc_barrel 1 1 0 0 ElectronMcSignalValidator/h_ele_hcalDepth2OverEcalBc_endcaps 1 1 1 0 ElectronMcSignalValidator/h_ele_HoE_fiducial 1 1 1 0 +ElectronMcSignalValidator/h_ele_sigmaIetaIetaVsPt_pfx 1 1 1 0 ElectronMcSignalValidator/h_scl_sigietaieta 1 1 0 0 ElectronMcSignalValidator/h_scl_sigietaieta_barrel 1 1 0 0 ElectronMcSignalValidator/h_scl_sigietaieta_endcaps 1 1 1 0 From 0ff6a09dac96d9874132660e26c578ad4ce26037 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:36:30 +0100 Subject: [PATCH 061/250] web page electron modification --- Validation/RecoEgamma/test/OvalFile | 51 +++++++++++++++-------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/Validation/RecoEgamma/test/OvalFile b/Validation/RecoEgamma/test/OvalFile index 688d0a6a6dc57..bf00d2b2fa8bb 100644 --- a/Validation/RecoEgamma/test/OvalFile +++ b/Validation/RecoEgamma/test/OvalFile @@ -1,19 +1,19 @@ - - + + - + TAG for the REFERENCE DATA, USED ONLY FOR INFORMATION ON WEB PAGE - + - - + + @@ -158,7 +158,7 @@ FullSim - + @@ -238,8 +238,8 @@ FullSim - - + + @@ -256,8 +256,8 @@ FullSim - - + + @@ -278,8 +278,8 @@ FullSim - - + + @@ -296,8 +296,8 @@ FullSim - - + + @@ -314,8 +314,8 @@ FullSim - - + + @@ -328,6 +328,7 @@ FullSim + @@ -337,8 +338,8 @@ FullSim - - + + @@ -539,7 +540,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -552,7 +553,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -570,7 +571,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -583,7 +584,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -596,7 +597,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -615,7 +616,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> From a2ad65030b5dd58722c4d4404c789e54245d6152 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:36:39 +0100 Subject: [PATCH 062/250] web page electron modification --- Validation/RecoEgamma/test/OvalFile.FAST | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Validation/RecoEgamma/test/OvalFile.FAST b/Validation/RecoEgamma/test/OvalFile.FAST index 734bc350cafc1..42204fa60261d 100644 --- a/Validation/RecoEgamma/test/OvalFile.FAST +++ b/Validation/RecoEgamma/test/OvalFile.FAST @@ -149,8 +149,8 @@ FastSim - - + + @@ -168,8 +168,8 @@ FastSim - - + + @@ -206,7 +206,7 @@ FastSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${TEST_HISTOS_FILE} ${STORE_REF}/${TEST_HISTOS_FILE} ${WEB_DIR}/${TEST_NEW}/FastVsFast_${TEST_REF}/Fast_${DD_SAMPLE}_Startup'> @@ -214,7 +214,7 @@ FastSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${TEST_HISTOS_FILE} ${STORE_REF}/${TEST_HISTOS_FILE} ${WEB_DIR}/${TEST_NEW}/FastVsFast_${TEST_REF}/Fast_${DD_SAMPLE}_Startup'>
From b3297eb53d29eb0189f98e773573f068dd2a2603 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:36:48 +0100 Subject: [PATCH 063/250] web page electron modification --- Validation/RecoEgamma/test/OvalFile.GED | 49 +++++++++++++------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/Validation/RecoEgamma/test/OvalFile.GED b/Validation/RecoEgamma/test/OvalFile.GED index 4763917e379d2..bf00d2b2fa8bb 100644 --- a/Validation/RecoEgamma/test/OvalFile.GED +++ b/Validation/RecoEgamma/test/OvalFile.GED @@ -1,19 +1,19 @@ - - + + - + TAG for the REFERENCE DATA, USED ONLY FOR INFORMATION ON WEB PAGE - + - - + + @@ -238,8 +238,8 @@ FullSim - - + + @@ -256,8 +256,8 @@ FullSim - - + + @@ -278,8 +278,8 @@ FullSim - - + + @@ -296,8 +296,8 @@ FullSim - - + + @@ -314,8 +314,8 @@ FullSim - - + + @@ -328,6 +328,7 @@ FullSim + @@ -337,8 +338,8 @@ FullSim - - + + @@ -539,7 +540,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -552,7 +553,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -570,7 +571,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -583,7 +584,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -596,7 +597,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -615,7 +616,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> From 97253b1814f795c469b14fc9804013d8b8fd03b7 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:36:56 +0100 Subject: [PATCH 064/250] web page electron modification --- Validation/RecoEgamma/test/OvalFile.PU | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Validation/RecoEgamma/test/OvalFile.PU b/Validation/RecoEgamma/test/OvalFile.PU index 98d5c980f467c..1221baa059ccc 100644 --- a/Validation/RecoEgamma/test/OvalFile.PU +++ b/Validation/RecoEgamma/test/OvalFile.PU @@ -172,9 +172,9 @@ FullSim - - - + + + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/PileUp50ns_${DD_SAMPLE}_gedGsfE_Startup'> @@ -194,9 +194,9 @@ FullSim - - - + + + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/PileUp50ns_${DD_SAMPLE}_gedGsfE_Startup'> From d7c53e47369934e684bb4fc020acac3fbddb6a32 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:37:03 +0100 Subject: [PATCH 065/250] web page electron modification --- Validation/RecoEgamma/test/OvalFile.Pt1000 | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/Validation/RecoEgamma/test/OvalFile.Pt1000 b/Validation/RecoEgamma/test/OvalFile.Pt1000 index 46c506690859d..ffb0494c1757a 100644 --- a/Validation/RecoEgamma/test/OvalFile.Pt1000 +++ b/Validation/RecoEgamma/test/OvalFile.Pt1000 @@ -244,8 +244,8 @@ FullSim - - + + @@ -263,8 +263,8 @@ FullSim - - + + @@ -285,8 +285,8 @@ FullSim - - + + @@ -304,8 +304,8 @@ FullSim - - + + @@ -323,8 +323,8 @@ FullSim - - + + @@ -346,8 +346,8 @@ FullSim - - + + @@ -549,7 +549,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedVsGed/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -563,7 +563,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedVsGed/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -581,7 +581,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedVsGed/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -595,7 +595,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedVsGed/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -609,7 +609,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedVsGed/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> @@ -628,7 +628,7 @@ FullSim - + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedVsGed/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> From a0e350409b411429ab73e148c2860c702c1c2a86 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:37:11 +0100 Subject: [PATCH 066/250] web page electron modification --- Validation/RecoEgamma/test/OvalFile.miniAOD | 183 ++++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 Validation/RecoEgamma/test/OvalFile.miniAOD diff --git a/Validation/RecoEgamma/test/OvalFile.miniAOD b/Validation/RecoEgamma/test/OvalFile.miniAOD new file mode 100644 index 0000000000000..a980fb72ff38d --- /dev/null +++ b/Validation/RecoEgamma/test/OvalFile.miniAOD @@ -0,0 +1,183 @@ + + + + + + + +TAG for the REFERENCE DATA, USED ONLY FOR INFORMATION ON WEB PAGE + + + + + + + + + + + + +The value of OVAL_ENVNAME is automatically set by Oval to the name +of the current environment, before running any executable. Using it below, +we have an output file name which is unique for each execution. + + + + + + +The DD_* variables are configuration variables for the script electronDataDiscovery.py, +which prepares and send a query to the Data Discovery web server, +and receive as a result the corresponding list of input data files. + + +The tags below are to be used when DAS seems not up-to-date, +as compared to what you see within castor directories. +These parameters have been added to each RelVal sample environment + + + + +The tags below are to be used when you want to process some files +made with a modified code, and generated locally, thanks to the +targets RedoFrom% defined later on. + + + +Oval is able to check the output channel of an execution and compare it with a reference output. +The tags below are defining which are lines to be compared. The currently specification is a +first draft, and we do not yet check the differences that Oval could raise. + + + + + + + + + + + + +The file defined below is used by the script electronDataDiscovery.py when we want to analyze +some RelVal reco files which have been regenerated locally. + + + + +file:${TEST_AFS_DIR}/RelValSingleElectronPt10-STARTUP-RECO.root +file:${TEST_AFS_DIR}/RelValSingleElectronPt35-STARTUP-RECO.root +file:${TEST_AFS_DIR}/RelValTTbar-STARTUP-RECO.root +file:${TEST_AFS_DIR}/RelValZEE-STARTUP-RECO.root +file:${TEST_AFS_DIR}/RelValQCD_Pt_80_120-STARTUP-RECO.root + + +Here comes the concrete executables to run. They are split among few different +environments, each one defining the relevant variales for a given scenario and/or +data sample. Running electronDataDiscovery.py is only usefull to check the correctness +of the list of input data files returned by the data discovery web server. We guess +that from time to time we will have to upgrade the values DD_* variable so to keep in +touch with changes in data catalog structure. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +================================================================================ +FullSim +================================================================================ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + + + + This set of targets is currently used for the validation of electrons. + + Used if DD_source=/eos/... + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> +
+ + + + + + + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> +
+ + + + + + + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> +
+ +
+ +
+ +
+ + From e1b531f72e7750f2b367aa54100718e7f55ee0b5 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:37:25 +0100 Subject: [PATCH 067/250] web page electron modification --- Validation/RecoEgamma/test/electronCompare.C | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/Validation/RecoEgamma/test/electronCompare.C b/Validation/RecoEgamma/test/electronCompare.C index ac973142ca933..e52b7f60fea58 100644 --- a/Validation/RecoEgamma/test/electronCompare.C +++ b/Validation/RecoEgamma/test/electronCompare.C @@ -436,7 +436,6 @@ int electronCompare() // after 740pre8 : DQMData/Run 1/EgammaV/Run summary/ ElectronMcSignalValidatorPt1000/ histo name histo_full_path_Pt1000 = file_ref_dir ; histo_full_path_Pt1000 += Pt1000_path_extension; histo_full_path_Pt1000 += histo_name ; // for Pt1000 // END WARNING -// std::cout << "histo_full_path ref : " << histo_full_path << std::endl ; histo_ref = (TH1 *)file_ref->Get(histo_full_path) ; if (histo_ref!=0) @@ -444,7 +443,6 @@ int electronCompare() // renaming those histograms avoid very strange bugs because they // have the same names as the ones loaded from the new file histo_ref->SetName(TString(histo_ref->GetName())+"_ref") ; -// std::cout << "histo_ref Name : " << histo_ref->GetName() << " - histo_new Name : " << histo_name << std::endl ; // A.C. to be removed } else // no histo { @@ -465,9 +463,6 @@ int electronCompare() // search histo_new histo_full_path = file_new_dir ; histo_full_path += histo_path.c_str() ; histo_new = (TH1 *)file_new->Get(histo_full_path) ; -// std::cout << "histo_new Name : " << histo_new->GetName() << std::endl ; // A.C. to be removed -// std::cout << "histo_full_path new : " << histo_full_path << std::endl ; -// std::cout << "histo_path.cstr new : " << histo_path.c_str() << std::endl ; // special treatments if ((scaled==1)&&(histo_new!=0)&&(histo_ref!=0)&&(histo_ref->GetEntries()!=0)) @@ -484,8 +479,6 @@ int electronCompare() histo_ref->Scale(rescale_factor) ; } } -// std::cout << "histo_ref get Min : " << histo_ref->GetMinimum() << " - histo_ref get Max : " << histo_ref->GetMaximum() << std::endl ; // -// std::cout << "histo_new get Min : " << histo_new->GetMinimum() << " - histo_new get Max : " << histo_new->GetMaximum() << std::endl ; // if ((histo_new!=0)&&(histo_ref!=0)&&(histo_ref->GetMaximum()>histo_new->GetMaximum())) { histo_new->SetMaximum(histo_ref->GetMaximum()*1.1) ; } @@ -500,7 +493,6 @@ int electronCompare() { n_ele_charge = histo_new->GetEntries() ; } // draw histo_new -// std::cout << histo_name << " drawing histos new" << std::endl ; // TString newDrawOptions(err==1?"E1 P":"hist") ; gErrorIgnoreLevel = kWarning ; if (divide!=0) @@ -522,7 +514,6 @@ int electronCompare() st_new->SetTextColor(kRed) ; // draw histo_ref -// std::cout << histo_name << " drawing histos ref" << std::endl ; // if (histo_ref!=0) { if (divide!=0) @@ -578,10 +569,8 @@ int electronCompare() <<" has "<GetEffectiveEntries()<<" entries" // <<" of mean value "<GetMean() <SaveAs" << std::endl ; canvas->SaveAs(gif_path.Data()) ; web_page<<"
" ; -// std::cout << histo_name << " fin boucle else \n" << std::endl ; } // else if ((file_ref!=0)&&(histo_ref!=0)) @@ -605,7 +594,7 @@ int electronCompare() } while (cat.empty()) ; } } - std::cout << "on ferme le fichier" << std::endl; + std::cout << "on ferme le fichier : " << histo_file2 << std::endl; histo_file2.close() ; web_page<<"\n" ; @@ -614,4 +603,5 @@ int electronCompare() web_page.close() ; std::cout << "page fermee" << std::endl; return 0; + } From 246d05eea68d8fba79402428401035353e6da108 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:37:38 +0100 Subject: [PATCH 068/250] web page electron modification --- Validation/RecoEgamma/test/relval_gedGsfE.tcsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/test/relval_gedGsfE.tcsh b/Validation/RecoEgamma/test/relval_gedGsfE.tcsh index ff8af5f6d80fd..8e28a2c1e9681 100755 --- a/Validation/RecoEgamma/test/relval_gedGsfE.tcsh +++ b/Validation/RecoEgamma/test/relval_gedGsfE.tcsh @@ -108,9 +108,10 @@ then fi else echo "FULL" - list="Pt10Startup_UP15 Pt1000Startup_UP15 Pt35Startup_UP15 TTbarStartup_13 ZEEStartup_13 QcdPt80Pt120Startup_13" +# list="Pt10Startup_UP15 Pt1000Startup_UP15 Pt35Startup_UP15 TTbarStartup_13 ZEEStartup_13 QcdPt80Pt120Startup_13" # list="Pt1000Startup_UP15 TTbarStartup_13 ZEEStartup_13 QcdPt80Pt120Startup_13" # list="Pt1000Startup_UP15 " + list="Pt10Startup_UP15 TTbarStartup_13 ZEEStartup_13 " for element in $list do echo "element =" $element From 84e9e097e885da5fd3b0a6db47368abb6f51c2f9 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:44:05 +0100 Subject: [PATCH 069/250] web page electron modification --- .../test/ElectronMcSignalHistosMiniAOD.txt | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Validation/RecoEgamma/test/ElectronMcSignalHistosMiniAOD.txt diff --git a/Validation/RecoEgamma/test/ElectronMcSignalHistosMiniAOD.txt b/Validation/RecoEgamma/test/ElectronMcSignalHistosMiniAOD.txt new file mode 100644 index 0000000000000..c78f41ff1b125 --- /dev/null +++ b/Validation/RecoEgamma/test/ElectronMcSignalHistosMiniAOD.txt @@ -0,0 +1,62 @@ + +Collections sizes + +ElectronMcSignalValidatorMiniAOD/h_recEleNum 1 1 1 0 +ElectronMcSignalValidatorMiniAOD/h_recEleNum 1 1 1 1 + +Basic electron quantities + +ElectronMcSignalValidatorMiniAOD/h_ele_vertexPt 1 1 1 0 +ElectronMcSignalValidatorMiniAOD/h_ele_vertexEta 1 1 1 0 +ElectronMcSignalValidatorMiniAOD/h_ele_vertexPt_nocut 1 1 1 1 + +Comparison with MC truth (residuals) + +ElectronMcSignalValidatorMiniAOD/h_ele_PoPtrueVsEta_pfx 0 1 1 1 + +Track-cluster matching observables + +ElectronMcSignalValidatorMiniAOD/h_ele_dEtaSc_propVtx_mAOD 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_dEtaSc_propVtx_mAOD_barrel 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_dEtaSc_propVtx_mAOD_endcaps 1 1 1 0 +ElectronMcSignalValidatorMiniAOD/h_ele_dPhiCl_propOut_mAOD 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_dPhiCl_propOut_mAOD_barrel 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_dPhiCl_propOut_mAOD_endcaps 1 1 1 1 + +Electron Cluster shapes + +ElectronMcSignalValidatorMiniAOD/h_ele_HoE_mAOD 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_HoE_mAOD_barrel 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_HoE_mAOD_endcaps 1 1 1 0 +ElectronMcSignalValidatorMiniAOD/h_ele_sigmaIetaIetaVsPt_pfx 1 1 1 0 +ElectronMcSignalValidatorMiniAOD/h_scl_SigIEtaIEta_mAOD 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_scl_SigIEtaIEta_mAOD_barrel 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_scl_SigIEtaIEta_mAOD_endcaps 1 1 1 1 + +Electron track variables + +ElectronMcSignalValidatorMiniAOD/h_ele_foundHitsVsEta_pfx 0 1 1 0 +ElectronMcSignalValidatorMiniAOD/h_ele_foundHitsVsEta_mAOD_pfx 0 1 1 1 + +Brem fraction and related distributions + +ElectronMcSignalValidatorMiniAOD/h_ele_fbrem_mAOD 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_fbrem_mAOD_barrel 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_fbrem_mAOD_endcaps 1 1 1 1 + +Distributions for all reconstructed electrons (i.e. not requiring a match with mc truth) + +ElectronMcSignalValidatorMiniAOD/h_ele_mee_all 1 1 1 0 +ElectronMcSignalValidatorMiniAOD/h_ele_mee_os 1 1 1 1 + +pflow variables + +ElectronMcSignalValidatorMiniAOD/h_ele_chargedHadronRelativeIso_mAOD 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_chargedHadronRelativeIso_mAOD_barrel 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_chargedHadronRelativeIso_mAOD_endcaps 1 1 1 0 +ElectronMcSignalValidatorMiniAOD/h_ele_neutralHadronRelativeIso_mAOD 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_neutralHadronRelativeIso_mAOD_barrel 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_neutralHadronRelativeIso_mAOD_endcaps 1 1 1 0 +ElectronMcSignalValidatorMiniAOD/h_ele_photonRelativeIso_mAOD 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_photonRelativeIso_mAOD_barrel 1 1 0 0 +ElectronMcSignalValidatorMiniAOD/h_ele_photonRelativeIso_mAOD_endcaps 1 1 1 0 From 31d9f2fc574d68d747e922890e5add7bd062b0c0 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:45:04 +0100 Subject: [PATCH 070/250] web page electron modification --- ...ectronMcSignalPostValidationMiniAOD_cfg.py | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py diff --git a/Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py new file mode 100644 index 0000000000000..42419e7124037 --- /dev/null +++ b/Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py @@ -0,0 +1,56 @@ + +import sys +import os +import FWCore.ParameterSet.Config as cms + +process = cms.Process("electronPostValidation") + +process.options = cms.untracked.PSet( +# SkipEvent = cms.untracked.vstring('ProductNotFound') +# Rethrow = cms.untracked.vstring('ProductNotFound') +) + +process.DQMStore = cms.Service("DQMStore") +process.load("Validation.RecoEgamma.ElectronMcSignalPostValidatorMiniAOD_cfi") +process.load("DQMServices.Components.DQMStoreStats_cfi") +process.load('Configuration.StandardSequences.Services_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') +# load DQM +process.load("DQMServices.Core.DQM_cfg") +process.load("DQMServices.Components.DQMEnvironment_cfi") +process.load("Configuration.StandardSequences.EDMtoMEAtJobEnd_cff") +# import DQMStore service +process.load('DQMOffline.Configuration.DQMOffline_cff') + +# actually read in the DQM root file +process.load("DQMServices.Components.DQMFileReader_cfi") + +from DQMServices.Components.DQMStoreStats_cfi import * +dqmStoreStats.runOnEndJob = cms.untracked.bool(True) + +process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(1)) + +t1 = os.environ['TEST_HISTOS_FILE'].split('.') +localFileInput = os.environ['TEST_HISTOS_FILE'].replace(".root", "_a.root") # +# Source +process.source = cms.Source ("PoolSource",fileNames = cms.untracked.vstring("file:" + localFileInput), +secondaryFileNames = cms.untracked.vstring(),) + +process.electronMcMiniAODSignalPostValidator.InputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD") +process.electronMcMiniAODSignalPostValidator.OutputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD") + +from Configuration.AlCa.autoCond import autoCond +process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' +#process.GlobalTag.globaltag = '75X_mcRun2_asymptotic_Queue' +#process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' + +process.dqmSaver.workflow = '/electronHistos/' + t1[1] + '/RECO3' +process.dqmsave_step = cms.Path(process.DQMSaver) + +process.p = cms.Path(process.EDMtoME * process.electronMcSignalPostValidatorMiniAOD * process.dqmStoreStats) + +# Schedule +process.schedule = cms.Schedule( + process.p, + process.dqmsave_step, +) From 1c2cb2473da8c49fed58acf3dcca8f5a6c64ab31 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Fri, 8 Jan 2016 15:45:18 +0100 Subject: [PATCH 071/250] web page electron modification --- .../ElectronMcSignalValidationMiniAOD_cfg.py | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Validation/RecoEgamma/test/ElectronMcSignalValidationMiniAOD_cfg.py diff --git a/Validation/RecoEgamma/test/ElectronMcSignalValidationMiniAOD_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalValidationMiniAOD_cfg.py new file mode 100644 index 0000000000000..c5b7782e56e5c --- /dev/null +++ b/Validation/RecoEgamma/test/ElectronMcSignalValidationMiniAOD_cfg.py @@ -0,0 +1,80 @@ + +import sys +import os +import DQMOffline.EGamma.electronDataDiscovery as dd +import FWCore.ParameterSet.Config as cms + +process = cms.Process("ElectronValidation") + +process.options = cms.untracked.PSet( + SkipEvent = cms.untracked.vstring('ProductNotFound') +# Rethrow = cms.untracked.vstring('ProductNotFound') +) + +process.DQMStore = cms.Service("DQMStore") +process.load("DQMServices.Components.DQMStoreStats_cfi") +from DQMServices.Components.DQMStoreStats_cfi import * +dqmStoreStats.runOnEndJob = cms.untracked.bool(True) + +# OLD WAY + +print "reading files ..." +process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1)) +process.source = cms.Source ("PoolSource",fileNames = cms.untracked.vstring(),secondaryFileNames = cms.untracked.vstring()) +process.source.fileNames.extend(dd.search()) +print "done" + +# NEW WAY +#print "reading files ..." +#readFiles = cms.untracked.vstring() +#secFiles = cms.untracked.vstring() +#process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) ) +#process.source = cms.Source ("PoolSource",fileNames = readFiles, secondaryFileNames = secFiles) +#process.source.fileNames.extend(dd.search()) +#DD_SOURCE_TEMP = os.environ['DD_SOURCE'] +#TEMP = os.environ['DD_SOURCE'].replace("MINIAODSIM", "GEN-SIM-RECO" ) +#os.environ['DD_SOURCE'] = os.environ['DD_SOURCE'].replace("MINIAODSIM", "GEN-SIM-RECO" ) +#process.source.secondaryFileNames.extend(dd.search2()) +#os.environ['DD_SOURCE'] = DD_SOURCE_TEMP +#print "done" + +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load("FWCore.MessageService.MessageLogger_cfi") +process.load('Configuration.EventContent.EventContent_cff') +process.load('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.StandardSequences.GeometryDB_cff') +process.load('Configuration.StandardSequences.MagneticField_38T_cff') +process.load('Configuration.StandardSequences.RawToDigi_cff') +process.load('Configuration.StandardSequences.Reconstruction_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load("Configuration.StandardSequences.EDMtoMEAtJobEnd_cff") # new +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +from Configuration.AlCa.autoCond import autoCond +process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' +#process.GlobalTag.globaltag = '75X_mcRun2_asymptotic_Queue' +#process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' + +# FOR DATA REDONE FROM RAW, ONE MUST HIDE IsoFromDeps +# CONFIGURATION +process.load("Validation.RecoEgamma.electronIsoFromDeps_cff") +process.load("Validation.RecoEgamma.ElectronMcSignalValidatorMiniAOD_cfi") + +# load DQM +process.load("DQMServices.Core.DQM_cfg") +process.load("DQMServices.Components.DQMEnvironment_cfi") + +process.EDM = cms.OutputModule("PoolOutputModule", +outputCommands = cms.untracked.vstring('drop *',"keep *_MEtoEDMConverter_*_*"), +fileName = cms.untracked.string(os.environ['TEST_HISTOS_FILE'].replace(".root", "_a.root")) +) + +process.electronMcSignalValidatorMiniAOD.InputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD") +process.electronMcSignalValidatorMiniAOD.OutputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD") + +process.p = cms.Path(process.electronMcSignalValidatorMiniAOD * process.MEtoEDMConverter * process.dqmStoreStats) + +process.outpath = cms.EndPath( +process.EDM, +) From b9386e4c68caeec943898ac040806307432dc4b5 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 11:31:30 +0100 Subject: [PATCH 072/250] very minor correction i.e. blank lines removed. Nothing added --- .../RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.cc index 2426bf025a313..987a8032378d1 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.cc +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.cc @@ -24,7 +24,7 @@ void ElectronMcSignalPostValidatorMiniAOD::finalize( DQMStore::IBooker & iBooker setBookPrefix("h_ele") ; setBookEfficiencyFlag(set_EfficiencyFlag); setBookStatOverflowFlag( set_StatOverflowFlag ) ; - + // profiles from 2D histos profileX(iBooker, iGetter, "PoPtrueVsEta","mean ele momentum / gen momentum vs eta","#eta","

"); profileX(iBooker, iGetter, "sigmaIetaIetaVsPt","SigmaIetaIeta vs pt","p_{T} (GeV/c)","SigmaIetaIeta"); From eee5191323bd2d8f33d3cdde3b8db6f7d7be5d6b Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 11:31:39 +0100 Subject: [PATCH 073/250] very minor correction i.e. blank lines removed. Nothing added --- .../RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h index 5ded0b0c74b98..096085cf7587f 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalPostValidator.h @@ -24,7 +24,7 @@ class ElectronMcSignalPostValidatorMiniAOD : public ElectronDqmHarvesterBase // histos // MonitorElement *h1_ele_xOverX0VsEta ; - + } ; #endif From fed27807d6c21601eebb7dc4d3d06609afa17efd Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 11:32:42 +0100 Subject: [PATCH 074/250] very minor correction i.e. blank caracters removed. Nothing added --- .../RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc index 15efad9c7ce90..79b5f8ef26280 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc @@ -225,7 +225,7 @@ void ElectronMcSignalValidatorMiniAOD::analyze(const edm::Event& iEvent, const e edm::Handle > genParticles ; iEvent.getByToken(mcTruthCollection_, genParticles) ; - edm::LogInfo("ElectronMcMiniAODSignalValidator::analyze") + edm::LogInfo("ElectronMcSignalValidatorMiniAOD::analyze") <<"Treating event "<size()<<" electrons" ; h1_recEleNum->Fill((*electrons).size()) ; From 6ebe2d03eb12247bbf3f83eceda2ba688fb57c60 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 11:32:47 +0100 Subject: [PATCH 075/250] very minor correction i.e. blank caracters removed. Nothing added --- .../RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h index 2c22e15942ff4..e38bd08acadaf 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.h @@ -36,7 +36,7 @@ class ElectronMcSignalValidatorMiniAOD : public ElectronDqmAnalyzerBase { explicit ElectronMcSignalValidatorMiniAOD(const edm::ParameterSet&); virtual ~ElectronMcSignalValidatorMiniAOD(); bool isAncestor(const reco::Candidate * ancestor, const reco::Candidate * particle); - + private: virtual void bookHistograms( DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) ; virtual void analyze(const edm::Event&, const edm::EventSetup&) override; From afcbd9a545240fd54a6de12ec9efbe396e8610e6 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 11:33:31 +0100 Subject: [PATCH 076/250] surnumerous line removed --- Validation/RecoEgamma/python/egammaPostValidation_cff.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Validation/RecoEgamma/python/egammaPostValidation_cff.py b/Validation/RecoEgamma/python/egammaPostValidation_cff.py index dcae5f5052e33..40ddc0c77bf59 100644 --- a/Validation/RecoEgamma/python/egammaPostValidation_cff.py +++ b/Validation/RecoEgamma/python/egammaPostValidation_cff.py @@ -4,4 +4,3 @@ from Validation.RecoEgamma.electronPostValidationSequence_cff import * egammaPostValidation = cms.Sequence(photonPostProcessor+electronPostValidationSequence) -egammaPostValidationMiniAOD = cms.Sequence(electronPostValidationSequenceMiniAOD) From fd0f4c77ced00fe4ad30a8a27a65b235a0967f63 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 11:33:44 +0100 Subject: [PATCH 077/250] surnumerous line removed --- Validation/RecoEgamma/python/egammaValidation_cff.py | 1 - 1 file changed, 1 deletion(-) diff --git a/Validation/RecoEgamma/python/egammaValidation_cff.py b/Validation/RecoEgamma/python/egammaValidation_cff.py index 6ec8ca121a822..0fad3b70b9e18 100644 --- a/Validation/RecoEgamma/python/egammaValidation_cff.py +++ b/Validation/RecoEgamma/python/egammaValidation_cff.py @@ -9,4 +9,3 @@ tkConversionValidation.isRunCentrally = True egammaValidation = cms.Sequence(electronValidationSequence+photonValidationSequence) -egammaValidationMiniAOD = cms.Sequence(electronValidationSequenceMiniAOD) From 247a6419642bc7ebe7646bdea9e6c60529d334e4 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 11:34:43 +0100 Subject: [PATCH 078/250] file name using miniAOD inside was corrected --- Validation/RecoEgamma/test/OvalFile | 938 ++-------------------------- 1 file changed, 38 insertions(+), 900 deletions(-) diff --git a/Validation/RecoEgamma/test/OvalFile b/Validation/RecoEgamma/test/OvalFile index bf00d2b2fa8bb..453ccbfe8c282 100644 --- a/Validation/RecoEgamma/test/OvalFile +++ b/Validation/RecoEgamma/test/OvalFile @@ -1,5 +1,5 @@ - + @@ -8,11 +8,12 @@ TAG for the REFERENCE DATA, USED ONLY FOR INFORMATION ON WEB PAGE - + + - + @@ -91,956 +92,93 @@ FullSim This set of targets is currently used for the validation of electrons. - Used if DD_SOURCE=das - - Used if DD_source=/eos/... - + + - - - - - - + + + + + + - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - + - - - + - - - + - - + - - + - - + - - - - - - - - - - - - - + + + + - - + - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> - -
- - - - - - - - - - - ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> - -
- - - - - - - - - - - - - - - - ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> - -
- - + - - - + - ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> -
- - + - - - + - ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> -
- - - - - - - - - - - - - - - + + + + + ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -================================================================================ -FastSim -================================================================================ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -================================================================================ -This set of targets is made to redo the electrons -with the local modified code. -================================================================================ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - file:${TEST_AFS_DIR}/RelValSingleElectronPt10-STARTUP-FIRST-RECO.root - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${TEST_AFS_DIR}/RelValSingleElectronPt10-IDEAL-RAW.root - ${TEST_AFS_DIR}/RelValSingleElectronPt35-IDEAL-RAW.root - ${TEST_AFS_DIR}/RelValTTbar-IDEAL-RAW.root - ${TEST_AFS_DIR}/RelValZEE-IDEAL-RAW.root - ${TEST_AFS_DIR}/RelValZEE-STARTUP-RAW.root - ${TEST_AFS_DIR}/RelValQCD_Pt_80_120-IDEAL-RAW.root - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -================================================================================ -This set of targets is made to test cmsDriver.py steps -================================================================================ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - - - - - - - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -================================================================================ -Process uncleaned superclusters -================================================================================ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - - - - - - - - - - - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -================================================================================ -Photons -================================================================================ -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - - - - Those few photons datasets are checked so to compare - size and performance with electrons. - - - - - - - - - - - - - - - - - - From 524024dd8ae775b66ebd551c02f9db95438b070c Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 11:35:10 +0100 Subject: [PATCH 079/250] new version of this file --- Validation/RecoEgamma/test/OvalFile.GED | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/test/OvalFile.GED b/Validation/RecoEgamma/test/OvalFile.GED index bf00d2b2fa8bb..3a198225c8c5c 100644 --- a/Validation/RecoEgamma/test/OvalFile.GED +++ b/Validation/RecoEgamma/test/OvalFile.GED @@ -8,7 +8,8 @@ TAG for the REFERENCE DATA, USED ONLY FOR INFORMATION ON WEB PAGE - + + From 74e34f61081da2d1a27a35652d1d5602ff9ad181 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 11:35:27 +0100 Subject: [PATCH 080/250] file name using miniAOD inside was corrected --- Validation/RecoEgamma/test/OvalFile.miniAOD | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Validation/RecoEgamma/test/OvalFile.miniAOD b/Validation/RecoEgamma/test/OvalFile.miniAOD index a980fb72ff38d..ad90f684a3a2d 100644 --- a/Validation/RecoEgamma/test/OvalFile.miniAOD +++ b/Validation/RecoEgamma/test/OvalFile.miniAOD @@ -1,6 +1,6 @@ - - + + @@ -8,7 +8,8 @@ TAG for the REFERENCE DATA, USED ONLY FOR INFORMATION ON WEB PAGE - + + @@ -95,12 +96,12 @@ FullSim - - - - - - + + + + + + From 933e79c5f9cfc6f8ddb3d8ce24f3971abbeb0af6 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 11:36:42 +0100 Subject: [PATCH 081/250] correction on process attribute was made --- .../test/ElectronMcSignalPostValidationMiniAOD_cfg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py index 42419e7124037..602211b878dc0 100644 --- a/Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py @@ -36,8 +36,8 @@ process.source = cms.Source ("PoolSource",fileNames = cms.untracked.vstring("file:" + localFileInput), secondaryFileNames = cms.untracked.vstring(),) -process.electronMcMiniAODSignalPostValidator.InputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD") -process.electronMcMiniAODSignalPostValidator.OutputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD") +process.electronMcSignalPostValidatorMiniAOD.InputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD") +process.electronMcSignalPostValidatorMiniAOD.OutputFolderName = cms.string("EgammaV/ElectronMcSignalValidatorMiniAOD") from Configuration.AlCa.autoCond import autoCond process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' From 3777e9bb95a26746fb60ca09fdc1117d77e74897 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 16:05:33 +0100 Subject: [PATCH 082/250] removing SkipEvent in process.options --- .../test/ElectronMcSignalPostValidationMiniAOD_cfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py index 602211b878dc0..0d56a8e3c2166 100644 --- a/Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcSignalPostValidationMiniAOD_cfg.py @@ -6,7 +6,7 @@ process = cms.Process("electronPostValidation") process.options = cms.untracked.PSet( -# SkipEvent = cms.untracked.vstring('ProductNotFound') +# SkipEvent = cms.untracked.vstring('ProductNotFound'), # Rethrow = cms.untracked.vstring('ProductNotFound') ) From 257897cd7e5ab789d56303e3b48d7a2864433cc2 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 16:06:50 +0100 Subject: [PATCH 083/250] lines correction for correct reading --- Validation/RecoEgamma/test/ElectronMcSignalPostValidation_cfg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalPostValidation_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalPostValidation_cfg.py index 5f2a1bb731fb0..0afd881a8447b 100755 --- a/Validation/RecoEgamma/test/ElectronMcSignalPostValidation_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcSignalPostValidation_cfg.py @@ -38,6 +38,7 @@ process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' #process.GlobalTag.globaltag = '76X_mcRun2_asymptotic_Queue' #process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' + process.dqmSaver.workflow = '/electronHistos/' + t1[1] + '/RECO3' process.dqmsave_step = cms.Path(process.DQMSaver) From 0ad0faa637fb0571082cacf1dbf8d543933315bf Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 16:07:25 +0100 Subject: [PATCH 084/250] removing SkipEvent in process.options --- .../RecoEgamma/test/ElectronMcSignalValidationMiniAOD_cfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalValidationMiniAOD_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalValidationMiniAOD_cfg.py index c5b7782e56e5c..cb9459d8c2a9d 100644 --- a/Validation/RecoEgamma/test/ElectronMcSignalValidationMiniAOD_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcSignalValidationMiniAOD_cfg.py @@ -7,7 +7,7 @@ process = cms.Process("ElectronValidation") process.options = cms.untracked.PSet( - SkipEvent = cms.untracked.vstring('ProductNotFound') +# SkipEvent = cms.untracked.vstring('ProductNotFound'), # Rethrow = cms.untracked.vstring('ProductNotFound') ) From b887510b1192d10147063e24e2404dfe7e6fcf56 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Mon, 18 Jan 2016 16:07:54 +0100 Subject: [PATCH 085/250] lines correction for correct reading --- .../test/ElectronMcSignalValidation_gedGsfElectrons_cfg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalValidation_gedGsfElectrons_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalValidation_gedGsfElectrons_cfg.py index 3a63603bd31cb..796916c6ec839 100755 --- a/Validation/RecoEgamma/test/ElectronMcSignalValidation_gedGsfElectrons_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcSignalValidation_gedGsfElectrons_cfg.py @@ -32,6 +32,7 @@ process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' #process.GlobalTag.globaltag = '76X_mcRun2_asymptotic_Queue' #process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' + # FOR DATA REDONE FROM RAW, ONE MUST HIDE IsoFromDeps # CONFIGURATION process.load("Validation.RecoEgamma.electronIsoFromDeps_cff") From d4a305dbd094b6acccf6584caeb19356f1866458 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 19 Jan 2016 14:53:35 +0100 Subject: [PATCH 086/250] remove the electronPostValidationSequenceMiniAOD calls --- .../RecoEgamma/python/electronPostValidationSequence_cff.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Validation/RecoEgamma/python/electronPostValidationSequence_cff.py b/Validation/RecoEgamma/python/electronPostValidationSequence_cff.py index a6a43208ada42..352b52e5ee175 100644 --- a/Validation/RecoEgamma/python/electronPostValidationSequence_cff.py +++ b/Validation/RecoEgamma/python/electronPostValidationSequence_cff.py @@ -3,7 +3,5 @@ from Validation.RecoEgamma.ElectronMcSignalPostValidator_cfi import * from Validation.RecoEgamma.ElectronMcFakePostValidator_cfi import * from Validation.RecoEgamma.ElectronMcSignalPostValidatorPt1000_cfi import * -from Validation.RecoEgamma.ElectronMcSignalPostValidatorMiniAOD_cfi import * electronPostValidationSequence = cms.Sequence(electronMcSignalPostValidator+electronMcFakePostValidator+electronMcSignalPostValidatorPt1000) -electronPostValidationSequenceMiniAOD = cms.Sequence(electronMcSignalPostValidatorMiniAOD) From 9dd638475ce601be1ca4f9e1ae489495add18bc3 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 19 Jan 2016 14:54:05 +0100 Subject: [PATCH 087/250] remove the electronValidationSequenceMiniAOD calls --- Validation/RecoEgamma/python/electronValidationSequence_cff.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/Validation/RecoEgamma/python/electronValidationSequence_cff.py b/Validation/RecoEgamma/python/electronValidationSequence_cff.py index f774fabd1af8a..93413b0cb1578 100644 --- a/Validation/RecoEgamma/python/electronValidationSequence_cff.py +++ b/Validation/RecoEgamma/python/electronValidationSequence_cff.py @@ -4,8 +4,6 @@ from Validation.RecoEgamma.ElectronMcSignalValidator_gedGsfElectrons_cfi import * from Validation.RecoEgamma.ElectronMcFakeValidator_gedGsfElectrons_cfi import * from Validation.RecoEgamma.ElectronMcSignalValidatorPt1000_gedGsfElectrons_cfi import * -from Validation.RecoEgamma.ElectronMcSignalValidatorMiniAOD_cfi import * electronValidationSequence = cms.Sequence(electronIsoFromDeps+electronMcSignalValidator+electronMcFakeValidator+electronMcSignalValidatorPt1000) -electronValidationSequenceMiniAOD = cms.Sequence(electronMcSignalValidatorMiniAOD) From 986736e3f5b0dd839bca9a4fada3b37ba8b9705a Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 19 Jan 2016 14:54:30 +0100 Subject: [PATCH 088/250] minor change, not in miniAOD --- Validation/RecoEgamma/test/OvalFile | 195 +++++++++------------------- 1 file changed, 58 insertions(+), 137 deletions(-) diff --git a/Validation/RecoEgamma/test/OvalFile b/Validation/RecoEgamma/test/OvalFile index 453ccbfe8c282..55eeda1fb8c95 100644 --- a/Validation/RecoEgamma/test/OvalFile +++ b/Validation/RecoEgamma/test/OvalFile @@ -1,50 +1,25 @@ - - + + - + TAG for the REFERENCE DATA, USED ONLY FOR INFORMATION ON WEB PAGE - + - - + - - + + - - - - + The value of OVAL_ENVNAME is automatically set by Oval to the name of the current environment, before running any executable. Using it below, we have an output file name which is unique for each execution. - - - - -The DD_* variables are configuration variables for the script electronDataDiscovery.py, -which prepares and send a query to the Data Discovery web server, -and receive as a result the corresponding list of input data files. - - -The tags below are to be used when DAS seems not up-to-date, -as compared to what you see within castor directories. -These parameters have been added to each RelVal sample environment - - - - -The tags below are to be used when you want to process some files -made with a modified code, and generated locally, thanks to the -targets RedoFrom% defined later on. - - Oval is able to check the output channel of an execution and compare it with a reference output. The tags below are defining which are lines to be compared. The currently specification is a @@ -61,27 +36,6 @@ first draft, and we do not yet check the differences that Oval could raise. -The file defined below is used by the script electronDataDiscovery.py when we want to analyze -some RelVal reco files which have been regenerated locally. - - - - -file:${TEST_AFS_DIR}/RelValSingleElectronPt10-STARTUP-RECO.root -file:${TEST_AFS_DIR}/RelValSingleElectronPt35-STARTUP-RECO.root -file:${TEST_AFS_DIR}/RelValTTbar-STARTUP-RECO.root -file:${TEST_AFS_DIR}/RelValZEE-STARTUP-RECO.root -file:${TEST_AFS_DIR}/RelValQCD_Pt_80_120-STARTUP-RECO.root - - -Here comes the concrete executables to run. They are split among few different -environments, each one defining the relevant variales for a given scenario and/or -data sample. Running electronDataDiscovery.py is only usefull to check the correctness -of the list of input data files returned by the data discovery web server. We guess -that from time to time we will have to upgrade the values DD_* variable so to keep in -touch with changes in data catalog structure. - - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ================================================================================ FullSim @@ -93,92 +47,59 @@ FullSim This set of targets is currently used for the validation of electrons. Used if DD_source=/eos/... - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> -
- - - - - - - ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'> -
+ + + + + + + + + - - - - - - ${TEST_NEW} : ${DD_COND}
${TEST_REF} : ${DD_COND_REF}" ${STORE_DIR}/${RED_FILE} ${STORE_REF}/${BLUE_FILE} ${WEB_DIR}/${TEST_NEW}/GedvsGed_${TEST_REF}/Fullgedvsged_${DD_SAMPLE}_gedGsfE_Startup'>
-
- -
- -
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
From c68f63f26135402b66e7e8ea96573f232dce9c03 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 19 Jan 2016 14:55:01 +0100 Subject: [PATCH 089/250] minor GED RECO changes, not in miniAOD --- Validation/RecoEgamma/test/OvalFile.GED | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Validation/RecoEgamma/test/OvalFile.GED b/Validation/RecoEgamma/test/OvalFile.GED index 3a198225c8c5c..cbbc77d46ec59 100644 --- a/Validation/RecoEgamma/test/OvalFile.GED +++ b/Validation/RecoEgamma/test/OvalFile.GED @@ -1,20 +1,20 @@ - + - + TAG for the REFERENCE DATA, USED ONLY FOR INFORMATION ON WEB PAGE - - + + - + From d2787a55265bba25274989e4bfbc1e72e6a85926 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 19 Jan 2016 14:55:31 +0100 Subject: [PATCH 090/250] minor miniAOD histos changes --- Validation/RecoEgamma/test/OvalFile.miniAOD | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Validation/RecoEgamma/test/OvalFile.miniAOD b/Validation/RecoEgamma/test/OvalFile.miniAOD index ad90f684a3a2d..5502422906ffa 100644 --- a/Validation/RecoEgamma/test/OvalFile.miniAOD +++ b/Validation/RecoEgamma/test/OvalFile.miniAOD @@ -1,20 +1,20 @@ - - + + - + TAG for the REFERENCE DATA, USED ONLY FOR INFORMATION ON WEB PAGE - - + + - + From cdedf7c22226d0e64cf84ac6fa62a9c908626c91 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 19 Jan 2016 18:03:58 +0100 Subject: [PATCH 091/250] remove the false call to electronPostValidationSequenceMiniAOD in postValidation --- Validation/Configuration/python/postValidation_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validation/Configuration/python/postValidation_cff.py b/Validation/Configuration/python/postValidation_cff.py index 4c4ce0ad2e40d..a2c3b82c37307 100644 --- a/Validation/Configuration/python/postValidation_cff.py +++ b/Validation/Configuration/python/postValidation_cff.py @@ -28,7 +28,7 @@ + hcalSimHitsPostProcessor + hcaldigisPostProcessor + hcalrechitsPostProcessor - + electronPostValidationSequence + electronPostValidationSequenceMiniAOD + photonPostProcessor + + electronPostValidationSequence + photonPostProcessor + pfJetClient + pfMETClient + pfJetResClient + pfElectronClient + rpcRecHitPostValidation_step + runTauEff + makeBetterPlots From b29400cbc12b3f116b70fa6cf81d2c7858324d78 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 19 Jan 2016 18:04:25 +0100 Subject: [PATCH 092/250] add blank for readability --- Validation/RecoEgamma/python/egammaPostValidationMiniAOD_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/python/egammaPostValidationMiniAOD_cff.py b/Validation/RecoEgamma/python/egammaPostValidationMiniAOD_cff.py index d60e168335810..98236e394645a 100644 --- a/Validation/RecoEgamma/python/egammaPostValidationMiniAOD_cff.py +++ b/Validation/RecoEgamma/python/egammaPostValidationMiniAOD_cff.py @@ -2,4 +2,4 @@ from Validation.RecoEgamma.electronPostValidationSequenceMiniAOD_cff import * -egammaPostValidationMiniAOD = cms.Sequence(electronPostValidationSequenceMiniAOD) +egammaPostValidationMiniAOD = cms.Sequence( electronPostValidationSequenceMiniAOD ) From 5e7537e9214699e0fff501774416f35b7e2b758b Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 19 Jan 2016 18:04:39 +0100 Subject: [PATCH 093/250] add blank for readability --- Validation/RecoEgamma/python/egammaValidationMiniAOD_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/python/egammaValidationMiniAOD_cff.py b/Validation/RecoEgamma/python/egammaValidationMiniAOD_cff.py index 7c587840f747c..b927b7c70fd47 100644 --- a/Validation/RecoEgamma/python/egammaValidationMiniAOD_cff.py +++ b/Validation/RecoEgamma/python/egammaValidationMiniAOD_cff.py @@ -2,4 +2,4 @@ from Validation.RecoEgamma.electronValidationSequenceMiniAOD_cff import * -egammaValidationMiniAOD = cms.Sequence(electronValidationSequenceMiniAOD) +egammaValidationMiniAOD = cms.Sequence( electronValidationSequenceMiniAOD ) From 72bc6df52f36f4e11feb04e6dab51d99bd686c2c Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 19 Jan 2016 18:05:27 +0100 Subject: [PATCH 094/250] changes and line added for readability --- .../test/ElectronMcFakeValidation_gedGsfElectrons_cfg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Validation/RecoEgamma/test/ElectronMcFakeValidation_gedGsfElectrons_cfg.py b/Validation/RecoEgamma/test/ElectronMcFakeValidation_gedGsfElectrons_cfg.py index b3eb52c925051..d1da2b6d04fd0 100755 --- a/Validation/RecoEgamma/test/ElectronMcFakeValidation_gedGsfElectrons_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcFakeValidation_gedGsfElectrons_cfg.py @@ -32,6 +32,7 @@ #process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' process.GlobalTag.globaltag = '75X_mcRun2_asymptotic_Queue' #process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' + # FOR DATA REDONE FROM RAW, ONE MUST HIDE IsoFromDeps # CONFIGURATION process.load("Validation.RecoEgamma.electronIsoFromDeps_cff") From 74f673038d1751abaccfe02667cf14e9b8cb61b2 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 19 Jan 2016 18:05:55 +0100 Subject: [PATCH 095/250] minor change --- .../RecoEgamma/test/ElectronMcSignalPostValidationPt1000_cfg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalPostValidationPt1000_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalPostValidationPt1000_cfg.py index 91dec38d377c3..e0098c8f02b02 100755 --- a/Validation/RecoEgamma/test/ElectronMcSignalPostValidationPt1000_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcSignalPostValidationPt1000_cfg.py @@ -38,6 +38,7 @@ #process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' process.GlobalTag.globaltag = '75X_mcRun2_asymptotic_Queue' #process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' + process.dqmSaver.workflow = '/electronHistos/' + t1[1] + '/RECO3' process.dqmsave_step = cms.Path(process.DQMSaver) From 4236a01248c221cafc8ec912403e50fe17aaed13 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Tue, 19 Jan 2016 18:06:16 +0100 Subject: [PATCH 096/250] minor change --- .../test/ElectronMcSignalValidationPt1000_gedGsfElectrons_cfg.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Validation/RecoEgamma/test/ElectronMcSignalValidationPt1000_gedGsfElectrons_cfg.py b/Validation/RecoEgamma/test/ElectronMcSignalValidationPt1000_gedGsfElectrons_cfg.py index ad5d006843dc8..e569fdf2dc790 100755 --- a/Validation/RecoEgamma/test/ElectronMcSignalValidationPt1000_gedGsfElectrons_cfg.py +++ b/Validation/RecoEgamma/test/ElectronMcSignalValidationPt1000_gedGsfElectrons_cfg.py @@ -32,6 +32,7 @@ #process.GlobalTag.globaltag = os.environ['TEST_GLOBAL_TAG']#+'::All' process.GlobalTag.globaltag = '75X_mcRun2_asymptotic_Queue' #process.GlobalTag.globaltag = '75X_mcRun2_startup_Queue' + # FOR DATA REDONE FROM RAW, ONE MUST HIDE IsoFromDeps # CONFIGURATION process.load("Validation.RecoEgamma.electronIsoFromDeps_cff") From 5569af81a3869bf9042e7d548f84af2f7e82d388 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Thu, 21 Jan 2016 11:55:11 +0100 Subject: [PATCH 097/250] rewritting of miniAOD call in Harvesting_cff.py file --- Configuration/StandardSequences/python/Harvesting_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configuration/StandardSequences/python/Harvesting_cff.py b/Configuration/StandardSequences/python/Harvesting_cff.py index 54d2db8255de8..01b1b61dec8cd 100644 --- a/Configuration/StandardSequences/python/Harvesting_cff.py +++ b/Configuration/StandardSequences/python/Harvesting_cff.py @@ -35,4 +35,4 @@ alcaHarvesting = cms.Path() -validationHarvestingMiniAOD = cms.Path( JetPostProcessor * METPostProcessorHarvesting * postValidationMiniAOD ) +validationHarvestingMiniAOD = cms.Path(JetPostProcessor*METPostProcessorHarvesting*postValidationMiniAOD) From 6c92a6e03f2a3edc9cb05e8b697d6dde42010b44 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Thu, 21 Jan 2016 12:08:50 +0100 Subject: [PATCH 098/250] take Latest commit 1ae4620 on 27 Nov 2015 into account --- Configuration/StandardSequences/python/Validation_cff.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Configuration/StandardSequences/python/Validation_cff.py b/Configuration/StandardSequences/python/Validation_cff.py index 1d35b86fa8a1b..cbea22c44752c 100644 --- a/Configuration/StandardSequences/python/Validation_cff.py +++ b/Configuration/StandardSequences/python/Validation_cff.py @@ -34,11 +34,7 @@ prevalidation = cms.Sequence( globalPrevalidation * hltassociation * metPreValidSeq * jetPreValidSeq ) prevalidationLiteTracking = cms.Sequence( prevalidation ) prevalidationLiteTracking.replace(globalPrevalidation,globalPrevalidationLiteTracking) -<<<<<<< HEAD -prevalidationMiniAOD = cms.Sequence( genParticles1 * miniAODValidationSequence * photonMiniAODValidationSequence) -======= -prevalidationMiniAOD = cms.Sequence( genParticles1 * miniAODValidationSequence * photonMiniAODValidationSequence * JetValidationMiniAOD * type0PFMEtCorrectionPFCandToVertexAssociationForValidationMiniAOD * METValidationMiniAOD * egammaValidationMiniAOD ) ->>>>>>> miniAOD electron modification +prevalidationMiniAOD = cms.Sequence( genParticles1 * miniAODValidationSequence * photonMiniAODValidationSequence * egammaValidationMiniAOD) validation = cms.Sequence(cms.SequencePlaceholder("mix") From efb37a23e3fd74cf169a7f0a556e0631d25fdb32 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Mon, 14 Dec 2015 19:29:12 +0100 Subject: [PATCH 099/250] Allow phase1 customisation and era to be specified simultaneously --- .../Configuration/python/combinedCustoms.py | 6 ++- .../Configuration/python/phase1TkCustoms.py | 40 +++++++++++++++---- 2 files changed, 37 insertions(+), 9 deletions(-) diff --git a/SLHCUpgradeSimulations/Configuration/python/combinedCustoms.py b/SLHCUpgradeSimulations/Configuration/python/combinedCustoms.py index 01a83a57b9f64..4929d23fa8cb1 100644 --- a/SLHCUpgradeSimulations/Configuration/python/combinedCustoms.py +++ b/SLHCUpgradeSimulations/Configuration/python/combinedCustoms.py @@ -12,8 +12,12 @@ import SLHCUpgradeSimulations.Configuration.aging as aging +from Configuration.StandardSequences.Eras import eras + def cust_2017(process): - process=customisePostLS1(process,displayDeprecationWarning=False) + # To allow simulatenous use of customisation and era while the era migration is in progress + if not eras.run2_common.isChosen(): + process=customisePostLS1(process,displayDeprecationWarning=False) process=customisePhase1Tk(process) #process=customise_HcalPhase0(process) return process diff --git a/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py b/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py index 4eed0a7cee74a..5a0c1c36a25b9 100644 --- a/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py +++ b/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py @@ -4,6 +4,8 @@ from RecoTracker.IterativeTracking.ElectronSeeds_cff import * from SLHCUpgradeSimulations.Configuration.customise_mixing import customise_pixelMixing_PU +from Configuration.StandardSequences.Eras import eras + def customise(process): if hasattr(process,'DigiToRaw'): process=customise_DigiToRaw(process) @@ -34,16 +36,28 @@ def customise(process): return process def customise_DigiToRaw(process): + # These were migrated in #12361 + if eras.phase1Pixel.isChosen(): + return process + process.digi2raw_step.remove(process.siPixelRawData) process.digi2raw_step.remove(process.castorRawData) return process def customise_RawToDigi(process): + # These were migrated in #12361 + if eras.phase1Pixel.isChosen(): + return process + process.raw2digi_step.remove(process.siPixelDigis) process.raw2digi_step.remove(process.castorDigis) return process def customise_Digi(process): + # these were migrated in #12275 + if eras.phase1Pixel.isChosen(): + return process + process.mix.digitizers.pixel.MissCalibrate = False process.mix.digitizers.pixel.LorentzAngle_DB = False process.mix.digitizers.pixel.killModules = False @@ -85,16 +99,18 @@ def customise_Digi(process): # DQM steps change def customise_DQM(process,pileup): # We cut down the number of iterative tracking steps - process.dqmoffline_step.remove(process.muonAnalyzer) - #process.dqmoffline_step.remove(process.jetMETAnalyzer) + if not eras.phase1Pixel.isChosen(): # these were migrated in #12459 + process.dqmoffline_step.remove(process.muonAnalyzer) + #process.dqmoffline_step.remove(process.jetMETAnalyzer) #put isUpgrade flag==true - process.SiPixelRawDataErrorSource.isUpgrade = cms.untracked.bool(True) - process.SiPixelDigiSource.isUpgrade = cms.untracked.bool(True) - process.SiPixelClusterSource.isUpgrade = cms.untracked.bool(True) - process.SiPixelRecHitSource.isUpgrade = cms.untracked.bool(True) - process.SiPixelTrackResidualSource.isUpgrade = cms.untracked.bool(True) - process.SiPixelHitEfficiencySource.isUpgrade = cms.untracked.bool(True) + if not eras.phase1Pixel.isChosen(): # these were migrated in #12459 + process.SiPixelRawDataErrorSource.isUpgrade = cms.untracked.bool(True) + process.SiPixelDigiSource.isUpgrade = cms.untracked.bool(True) + process.SiPixelClusterSource.isUpgrade = cms.untracked.bool(True) + process.SiPixelRecHitSource.isUpgrade = cms.untracked.bool(True) + process.SiPixelTrackResidualSource.isUpgrade = cms.untracked.bool(True) + process.SiPixelHitEfficiencySource.isUpgrade = cms.untracked.bool(True) from DQM.TrackingMonitor.customizeTrackingMonitorSeedNumber import customise_trackMon_IterativeTracking_PHASE1PU140 from DQM.TrackingMonitor.customizeTrackingMonitorSeedNumber import customise_trackMon_IterativeTracking_PHASE1PU70 @@ -106,6 +122,10 @@ def customise_DQM(process,pileup): return process def customise_Validation(process): + # these were migrated in #12359 + if eras.phase1Pixel.isChosen(): + return process + process.validation_step.remove(process.PixelTrackingRecHitsValid) # We don't run the HLT process.validation_step.remove(process.HLTSusyExoVal) @@ -137,6 +157,10 @@ def customise_Validation_Trackingonly(process): return process def customise_harvesting(process): + # these were migrated in #12440 + if eras.phase1Pixel.isChosen(): + return process + process.dqmHarvesting.remove(process.dataCertificationJetMET) #######process.dqmHarvesting.remove(process.sipixelEDAClient) process.sipixelEDAClient.isUpgrade = cms.untracked.bool(True) From 2fb86d4a879ddc8ad84143dbfb9a1d9eb3410948 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Tue, 15 Dec 2015 11:39:31 +0100 Subject: [PATCH 100/250] Use Run2_2017 era in phase1 workflows --- .../PyReleaseValidation/python/relval_steps.py | 11 +++++++++++ .../python/upgradeWorkflowComponents.py | 2 ++ 2 files changed, 13 insertions(+) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index e430224627b44..e70973c99e70d 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1462,6 +1462,7 @@ def identityFS(wf): geom=upgradeGeoms[k2] gt=upgradeGTs[k2] cust=upgradeCustoms[k2] + era=upgradeEras.get(k2, None) upgradeStepDict['GenSimFull'][k]= {'-s' : 'GEN,SIM', '-n' : 10, '--conditions' : gt, @@ -1471,6 +1472,7 @@ def identityFS(wf): '--geometry' : geom } if cust!=None : upgradeStepDict['GenSimFull'][k]['--customise']=cust + if era is not None: upgradeStepDict['GenSimFull'][k]['--era']=era upgradeStepDict['GenSimHLBeamSpotFull'][k]= {'-s' : 'GEN,SIM', '-n' : 10, @@ -1481,6 +1483,7 @@ def identityFS(wf): '--geometry' : geom } if cust!=None : upgradeStepDict['GenSimHLBeamSpotFull'][k]['--customise']=cust + if era is not None: upgradeStepDict['GenSimHLBeamSpotFull'][k]['--era']=era upgradeStepDict['DigiFull'][k] = {'-s':'DIGI:pdigi_valid,L1,DIGI2RAW', '--conditions':gt, @@ -1490,6 +1493,7 @@ def identityFS(wf): '--geometry' : geom } if cust!=None : upgradeStepDict['DigiFull'][k]['--customise']=cust + if era is not None: upgradeStepDict['DigiFull'][k]['--era']=era upgradeStepDict['DigiFullTrigger'][k] = {'-s':'DIGI:pdigi_valid,L1,L1TrackTrigger,DIGI2RAW', '--conditions':gt, @@ -1499,6 +1503,7 @@ def identityFS(wf): '--geometry' : geom } if cust!=None : upgradeStepDict['DigiFullTrigger'][k]['--customise']=cust + if era is not None: upgradeStepDict['DigiFullTrigger'][k]['--era']=era if k2 in PUDataSets: @@ -1511,6 +1516,7 @@ def identityFS(wf): '--geometry' : geom } if cust!=None : upgradeStepDict['DigiTrkTrigFull'][k]['--customise']=cust + if era is not None: upgradeStepDict['DigiTrkTrigFull'][k]['--era']=era upgradeStepDict['RecoFull'][k] = {'-s':'RAW2DIGI,L1Reco,RECO', '--conditions':gt, @@ -1520,6 +1526,7 @@ def identityFS(wf): '--geometry' : geom } if cust!=None : upgradeStepDict['RecoFull'][k]['--customise']=cust + if era is not None: upgradeStepDict['RecoFull'][k]['--era']=era if k2 in PUDataSets: upgradeStepDict['RecoFullPU'][k]=merge([PUDataSets[k2],{'-s':'RAW2DIGI,L1Reco,RECO'},upgradeStepDict['RecoFull'][k]]) @@ -1532,6 +1539,7 @@ def identityFS(wf): '--geometry' : geom } if cust!=None : upgradeStepDict['RecoFullHGCAL'][k]['--customise']=cust + if era is not None: upgradeStepDict['RecoFullHGCAL'][k]['--era']=era if k2 in PUDataSets: upgradeStepDict['RecoFullPUHGCAL'][k]=merge([PUDataSets[k2],{'-s':'RAW2DIGI,L1Reco,RECO'},upgradeStepDict['RecoFullHGCAL'][k]]) @@ -1544,6 +1552,7 @@ def identityFS(wf): '--filetype':'DQM' } if cust!=None : upgradeStepDict['HARVESTFull'][k]['--customise']=cust + if era is not None: upgradeStepDict['HARVESTFull'][k]['--era']=era if k2 in PUDataSets: upgradeStepDict['HARVESTFullPU'][k]=merge([PUDataSets[k2],{'-s':'HARVESTING:dqmHarvesting'},upgradeStepDict['HARVESTFull'][k]]) @@ -1556,6 +1565,7 @@ def identityFS(wf): '--geometry' : geom, '--relval':'27000,3000'} if cust!=None : upgradeStepDict['FastSim'][k]['--customise']=cust + if era is not None: upgradeStepDict['FastSim'][k]['--era']=era upgradeStepDict['HARVESTFast'][k]={'-s':'HARVESTING:validationHarvesting', '--conditions':gt, @@ -1564,6 +1574,7 @@ def identityFS(wf): '--scenario' : 'pp' } if cust!=None : upgradeStepDict['HARVESTFast'][k]['--customise']=cust + if era is not None: upgradeStepDict['HARVESTFast'][k]['--era']=era diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index c7f80134ea3b1..45793277b2582 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -35,6 +35,8 @@ '2023Reco' : 'SLHCUpgradeSimulations/Configuration/combinedCustoms.cust_2023Reco' } +upgradeEras={ '2017' : 'Run2_2017', + } upgradeFragments=['FourMuPt_1_200_pythia8_cfi','SingleElectronPt10_cfi', 'SingleElectronPt35_cfi','SingleElectronPt1000_cfi', From 446e49d60a162a59ac0bbe903b94d21767ef36d1 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Tue, 15 Dec 2015 16:27:53 +0100 Subject: [PATCH 101/250] Customise track validation for phase1 using era --- .../python/globalValidation_cff.py | 21 +++++++--- .../RecoTrack/python/TrackValidation_cff.py | 41 +++++++++++++++++++ 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/Validation/Configuration/python/globalValidation_cff.py b/Validation/Configuration/python/globalValidation_cff.py index 1b8aadb0b4582..46838b8a29a16 100644 --- a/Validation/Configuration/python/globalValidation_cff.py +++ b/Validation/Configuration/python/globalValidation_cff.py @@ -115,6 +115,7 @@ globalValidationLiteTracking.replace(trackValidator,liteTrackValidator) #lite pre-validation +# TODO: should we move this to TrackValidation_cff for better maintenance? globalPrevalidationLiteTracking = cms.Sequence(globalPrevalidation) globalPrevalidationLiteTracking.remove(cutsRecoTracksInitialStep) globalPrevalidationLiteTracking.remove(cutsRecoTracksInitialStepHp) @@ -122,20 +123,28 @@ globalPrevalidationLiteTracking.remove(cutsRecoTracksLowPtTripletStepHp) globalPrevalidationLiteTracking.remove(cutsRecoTracksPixelPairStep) globalPrevalidationLiteTracking.remove(cutsRecoTracksPixelPairStepHp) -globalPrevalidationLiteTracking.remove(cutsRecoTracksDetachedTripletStep) -globalPrevalidationLiteTracking.remove(cutsRecoTracksDetachedTripletStepHp) globalPrevalidationLiteTracking.remove(cutsRecoTracksMixedTripletStep) globalPrevalidationLiteTracking.remove(cutsRecoTracksMixedTripletStepHp) -globalPrevalidationLiteTracking.remove(cutsRecoTracksPixelLessStep) -globalPrevalidationLiteTracking.remove(cutsRecoTracksPixelLessStepHp) globalPrevalidationLiteTracking.remove(cutsRecoTracksTobTecStep) globalPrevalidationLiteTracking.remove(cutsRecoTracksTobTecStepHp) -globalPrevalidationLiteTracking.remove(cutsRecoTracksJetCoreRegionalStep) -globalPrevalidationLiteTracking.remove(cutsRecoTracksJetCoreRegionalStepHp) globalPrevalidationLiteTracking.remove(cutsRecoTracksMuonSeededStepInOut) globalPrevalidationLiteTracking.remove(cutsRecoTracksMuonSeededStepInOutHp) globalPrevalidationLiteTracking.remove(cutsRecoTracksMuonSeededStepOutIn) globalPrevalidationLiteTracking.remove(cutsRecoTracksMuonSeededStepOutInHp) +if eras.phase1Pixel.isChosen(): + globalPrevalidationLiteTracking.remove(cutsRecoTracksHighPtTripletStep) + globalPrevalidationLiteTracking.remove(cutsRecoTracksHighPtTripletStepHp) + globalPrevalidationLiteTracking.remove(cutsRecoTracksLowPtQuadStep) + globalPrevalidationLiteTracking.remove(cutsRecoTracksLowPtQuadStepHp) + globalPrevalidationLiteTracking.remove(cutsRecoTracksDetachedQuadStep) + globalPrevalidationLiteTracking.remove(cutsRecoTracksDetachedQuadStepHp) +else: + globalPrevalidationLiteTracking.remove(cutsRecoTracksDetachedTripletStep) + globalPrevalidationLiteTracking.remove(cutsRecoTracksDetachedTripletStepHp) + globalPrevalidationLiteTracking.remove(cutsRecoTracksPixelLessStep) + globalPrevalidationLiteTracking.remove(cutsRecoTracksPixelLessStepHp) + globalPrevalidationLiteTracking.remove(cutsRecoTracksJetCoreRegionalStep) + globalPrevalidationLiteTracking.remove(cutsRecoTracksJetCoreRegionalStepHp) # Tracking-only validation globalPrevalidationTrackingOnly = cms.Sequence( diff --git a/Validation/RecoTrack/python/TrackValidation_cff.py b/Validation/RecoTrack/python/TrackValidation_cff.py index 0d15c241cbd92..dd5b550e043d5 100644 --- a/Validation/RecoTrack/python/TrackValidation_cff.py +++ b/Validation/RecoTrack/python/TrackValidation_cff.py @@ -17,6 +17,8 @@ from CommonTools.RecoAlgos.sortedPrimaryVertices_cfi import sortedPrimaryVertices as _sortedPrimaryVertices from CommonTools.RecoAlgos.recoChargedRefCandidateToTrackRefProducer_cfi import recoChargedRefCandidateToTrackRefProducer as _recoChargedRefCandidateToTrackRefProducer +from Configuration.StandardSequences.Eras import eras + ### First define the stuff for the standard validation sequence ## Track selectors _algos = [ @@ -70,6 +72,45 @@ _trackProducers.remove("jetCoreRegionalStepTracks") _trackProducers.remove("muonSeededTracksInOut") _trackProducers.remove("muonSeededTracksOutIn") +if eras.phase1Pixel.isChosen(): + _algos = [ + "generalTracks", + "initialStep", + "highPtTripletStep", + "lowPtQuadStep", + "lowPtTripletStep", + "detachedQuadStep", + "mixedTripletStep", + "pixelPairStep", + "tobTecStep", + "muonSeededStepInOut", + "muonSeededStepOutIn", + ] + _seedProducers = [ + "initialStepSeeds", + "highPtTripletStepSeeds", + "lowPtQuadStepSeeds", + "lowPtTripletStepSeeds", + "detachedQuadStepSeeds", + "mixedTripletStepSeedsA", + "mixedTripletStepSeedsB", + "pixelPairStepSeeds", + "tobTecStepSeeds", + "muonSeededSeedsInOut", + "muonSeededSeedsOutIn", + ] + _trackProducers = [ + "initialStepTracks", + "highPtTripletStepTracks", + "lowPtQuadStepTracks", + "lowPtTripletStepTracks", + "detachedQuadStepTracks", + "mixedTripletStepTracks", + "pixelPairStepTracks", + "tobTecStepTracks", + "muonSeededTracksInOut", + "muonSeededTracksOutIn", + ] def _algoToSelector(algo): sel = "" From 2639a1e9024f4c44f152005bdd7c1ad4939bc3bf Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Tue, 15 Dec 2015 14:10:30 +0100 Subject: [PATCH 102/250] Add stripped-down versions of DQM and VALIDATION for phase1 --- .../python/DQMOffline_SecondStep_cff.py | 15 +++++++ .../Configuration/python/DQMOffline_cff.py | 24 ++++++++++ .../Common/python/HLTValidationHarvest_cff.py | 5 +++ .../Common/python/HLTValidation_cff.py | 6 +++ .../Configuration/python/phase1TkCustoms.py | 4 ++ .../python/globalValidation_cff.py | 44 ++++++++++++++++++- .../python/postValidation_cff.py | 24 ++++++++++ 7 files changed, 121 insertions(+), 1 deletion(-) diff --git a/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py b/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py index ca1f564a21f25..eb5416bfe2326 100644 --- a/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py @@ -18,6 +18,8 @@ from Validation.RecoTau.DQMSequences_cfi import * from DQMOffline.Hcal.HcalDQMOfflinePostProcessor_cff import * +from Configuration.StandardSequences.Eras import eras + DQMOffline_SecondStep_PreDPG = cms.Sequence( dqmDcsInfoClient * ecal_dqm_client_offline * hcalOfflineDQMClient * @@ -44,6 +46,8 @@ from DQMOffline.JetMET.dataCertificationJetMET_cff import * from DQM.TrackingMonitorClient.TrackingClientConfig_Tier0_cff import * +from Configuration.StandardSequences.Eras import eras + DQMOffline_SecondStep_PrePOG = cms.Sequence( TrackingOfflineDQMClient * muonQualityTests * egammaPostProcessing * @@ -70,6 +74,13 @@ DQMOffline_SecondStep_FakeHLT = cms.Sequence( DQMOffline_SecondStep ) DQMOffline_SecondStep_FakeHLT.remove( HLTMonitoringClient ) +if eras.phase1Pixel.isChosen(): # FIXME + # These should be added back once somebody checks that they work, + # and those that do not, get fixed + DQMOffline_SecondStep.remove(DQMOffline_SecondStep_PreDPG) + DQMOffline_SecondStep.remove(DQMOffline_SecondStep_PrePOG) + DQMOffline_SecondStep.remove(HLTMonitoringClient) + DQMOffline_SecondStep_PrePOGMC = cms.Sequence( bTagCollectorSequenceDATA ) DQMOffline_SecondStepPOGMC = cms.Sequence( dqmRefHistoRootFileGetter * @@ -106,6 +117,10 @@ DQMHarvestTracking = cms.Sequence( TrackingOfflineDQMClient * dqmFastTimerServiceClient ) +if eras.phase1Pixel.isChosen(): # FIXME + # These should be added back once somebody checks that they work, + # and those that do not, get fixed + DQMHarvestTracking.remove(TrackingOfflineDQMClient) DQMHarvestMuon = cms.Sequence( dtClients * rpcTier0Client * diff --git a/DQMOffline/Configuration/python/DQMOffline_cff.py b/DQMOffline/Configuration/python/DQMOffline_cff.py index 7ab493488f49e..4bf44689e9342 100644 --- a/DQMOffline/Configuration/python/DQMOffline_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_cff.py @@ -48,6 +48,8 @@ from Validation.RecoParticleFlow.miniAODDQM_cff import * from DQM.TrackingMonitor.tracksDQMMiniAOD_cff import * +from Configuration.StandardSequences.Eras import eras + DQMOfflinePrePOG = cms.Sequence( TrackingDQMSourceTier0 * muonMonitors * jetMETDQMOfflineSource * @@ -74,6 +76,23 @@ DQMOfflineFakeHLT = cms.Sequence( DQMOffline ) DQMOfflineFakeHLT.remove( HLTMonitoring ) +if eras.phase1Pixel.isChosen(): # FIXME + # These should be added back once somebody checks that they work, + # and those that do not, get fixed + DQMOfflinePrePOG.remove(TrackingDQMSourceTier0) + DQMOfflinePrePOG.remove(muonMonitors) + DQMOfflinePrePOG.remove(jetMETDQMOfflineSource) + DQMOfflinePrePOG.remove(egammaDQMOffline) + DQMOfflinePrePOG.remove(triggerOfflineDQMSource) + DQMOfflinePrePOG.remove(bTagPlotsDATA) + DQMOfflinePrePOG.remove(alcaBeamMonitor) + DQMOfflinePrePOG.remove(dqmPhysics) + DQMOfflinePrePOG.remove(produceDenoms) + DQMOfflinePrePOG.remove(pfTauRunDQMValidation) + + DQMOffline.remove(DQMOfflinePreDPG) + DQMOffline.remove(HLTMonitoring) + DQMOfflinePrePOGMC = cms.Sequence( pvMonitor * bTagPlotsDATA * dqmPhysics ) @@ -115,6 +134,11 @@ DQMOfflineTracking = cms.Sequence( TrackingDQMSourceTier0Common * pvMonitor ) +if eras.phase1Pixel.isChosen(): # FIXME + # These should be added back once somebody checks that they work, + # and those that do not, get fixed + DQMOfflineTracking.remove(TrackingDQMSourceTier0Common) + DQMOfflineMuon = cms.Sequence( dtSources * rpcTier0Source * cscSources * diff --git a/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py b/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py index 0f595a1725b41..105cf3d9e69ea 100644 --- a/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py +++ b/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py @@ -43,6 +43,11 @@ hltpostvalidation.remove(postProcessorHLTvertexing) # remove this: +hltvalidationqt ? # remove this: +hltExoticaPostProcessors ? + +if eras.phase1Pixel.isChosen(): # FIXME + # These should be added back once somebody checks that they work, + # and those that do not, get fixed + hltpostvalidation = cms.Sequence() hltpostvalidation_preprod = cms.Sequence( postProcessorHLTtrackingSequence diff --git a/HLTriggerOffline/Common/python/HLTValidation_cff.py b/HLTriggerOffline/Common/python/HLTValidation_cff.py index 539815a259cdf..2aedf3149774a 100644 --- a/HLTriggerOffline/Common/python/HLTValidation_cff.py +++ b/HLTriggerOffline/Common/python/HLTValidation_cff.py @@ -54,6 +54,12 @@ if eras.phase1Pixel.isChosen(): hltvalidation.remove(HiggsValidationSequence) +if eras.phase1Pixel.isChosen(): # FIXME + # These should be added back once somebody checks that they work, + # and those that do not, get fixed + hltassociation = cms.Sequence() + hltvalidation = cms.Sequence() + # some hlt collections have no direct fastsim equivalent # remove the dependent modules for now # probably it would be rather easy to add or fake these collections diff --git a/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py b/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py index 5a0c1c36a25b9..6cc32e8f78956 100644 --- a/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py +++ b/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py @@ -98,6 +98,10 @@ def customise_Digi(process): # DQM steps change def customise_DQM(process,pileup): + # Ok, this customization does not work currently at all + # Need to be fixed before the tracking DQM can be enabled + return process + # We cut down the number of iterative tracking steps if not eras.phase1Pixel.isChosen(): # these were migrated in #12459 process.dqmoffline_step.remove(process.muonAnalyzer) diff --git a/Validation/Configuration/python/globalValidation_cff.py b/Validation/Configuration/python/globalValidation_cff.py index 46838b8a29a16..1abd1d798820f 100644 --- a/Validation/Configuration/python/globalValidation_cff.py +++ b/Validation/Configuration/python/globalValidation_cff.py @@ -103,7 +103,49 @@ # besides: is this cross frame doing something, or is it a relic from the past? globalValidation.remove(ecalDigisValidationSequence) globalValidation.remove(ecalRecHitsValidationSequence) - +if eras.phase1Pixel.isChosen(): # FIXME + # For starters, include only tracking validation + # The rest should be added back once somebody checks that they + # work, and those that do not, get fixed + globalPrevalidation.remove(photonPrevalidationSequence) + globalPrevalidation.remove(produceDenoms) + globalPrevalidation.remove(prebTagSequenceMC) + globalValidation.remove(trackerHitsValidation) + globalValidation.remove(trackerDigisValidation) + globalValidation.remove(trackerRecHitsValidation) + globalValidation.remove(trackingTruthValid) + globalValidation.remove(trackingRecHitsValid) + globalValidation.remove(ecalSimHitsValidationSequence) + globalValidation.remove(ecalDigisValidationSequence) + globalValidation.remove(ecalRecHitsValidationSequence) + globalValidation.remove(ecalClustersValidationSequence) + globalValidation.remove(hcalSimHitsValidationSequence) + globalValidation.remove(hcaldigisValidationSequence) + globalValidation.remove(hcalSimHitStudy) + globalValidation.remove(hcalRecHitsValidationSequence) + globalValidation.remove(calotowersValidationSequence) + globalValidation.remove(validSimHit) + globalValidation.remove(muondtdigianalyzer) + globalValidation.remove(cscDigiValidation) + globalValidation.remove(validationMuonRPCDigis) + globalValidation.remove(recoMuonValidation) + globalValidation.remove(muIsoVal_seq) + globalValidation.remove(muonIdValDQMSeq) + globalValidation.remove(mixCollectionValidation) + globalValidation.remove(JetValidation) + globalValidation.remove(METValidation) + globalValidation.remove(egammaValidation) + globalValidation.remove(pfJetValidationSequence) + globalValidation.remove(pfMETValidationSequence) + globalValidation.remove(pfElectronValidationSequence) + globalValidation.remove(pfJetResValidationSequence) + globalValidation.remove(pfMuonValidationSequence) + globalValidation.remove(rpcRecHitValidation_step) + globalValidation.remove(dtLocalRecoValidation_no2D) + globalValidation.remove(pfTauRunDQMValidation) + globalValidation.remove(bTagPlotsMCbcl) + globalValidation.remove(L1Validator) + #lite tracking validator to be used in the Validation matrix liteTrackValidator=trackValidator.clone() liteTrackValidator.label=cms.VInputTag(cms.InputTag("generalTracks"), diff --git a/Validation/Configuration/python/postValidation_cff.py b/Validation/Configuration/python/postValidation_cff.py index 99900e9bdecc9..5dac6865efaa4 100644 --- a/Validation/Configuration/python/postValidation_cff.py +++ b/Validation/Configuration/python/postValidation_cff.py @@ -17,6 +17,7 @@ from Validation.RecoMET.METPostProcessor_cff import * from DQMOffline.RecoB.dqmCollector_cff import * +from Configuration.StandardSequences.Eras import eras postValidation = cms.Sequence( recoMuonPostProcessors @@ -41,6 +42,29 @@ + MuIsoValPostProcessor ) +if eras.phase1Pixel.isChosen(): + # For starters, include only tracking validation + # The rest should be added back once somebody checks that they + # work, and those that do not, get fixed + postValidation.remove(recoMuonPostProcessors) + postValidation.remove(MuIsoValPostProcessor) + postValidation.remove(calotowersPostProcessor) + postValidation.remove(hcalSimHitsPostProcessor) + postValidation.remove(hcaldigisPostProcessor) + postValidation.remove(hcalrechitsPostProcessor) + postValidation.remove(electronPostValidationSequence) + postValidation.remove(photonPostProcessor) + postValidation.remove(pfJetClient) + postValidation.remove(pfMETClient) + postValidation.remove(pfJetResClient) + postValidation.remove(pfElectronClient) + postValidation.remove(rpcRecHitPostValidation_step) + postValidation.remove(runTauEff) + postValidation.remove(makeBetterPlots) + postValidation.remove(bTagCollectorSequenceMCbcl) + postValidation.remove(METPostProcessor) + postValidation_preprod.remove(recoMuonPostProcessors) + postValidation_preprod.remove(MuIsoValPostProcessor) postValidation_fastsim = cms.Sequence( recoMuonPostProcessors From aa33f45d71a3f5c1881b35ce5832a7ec33365653 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Tue, 15 Dec 2015 14:10:54 +0100 Subject: [PATCH 103/250] Add DQM, VALIDATION, and HARVESTING back to phase1 workflow As a knock-on effect, DQM and VALIDATION get added back to all upgrade workflows. Is that a problem? --- .../PyReleaseValidation/python/relval_steps.py | 10 +++++----- .../python/upgradeWorkflowComponents.py | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index e70973c99e70d..3a4303589c740 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1518,18 +1518,18 @@ def identityFS(wf): if cust!=None : upgradeStepDict['DigiTrkTrigFull'][k]['--customise']=cust if era is not None: upgradeStepDict['DigiTrkTrigFull'][k]['--era']=era - upgradeStepDict['RecoFull'][k] = {'-s':'RAW2DIGI,L1Reco,RECO', + upgradeStepDict['RecoFull'][k] = {'-s':'RAW2DIGI,L1Reco,RECO,VALIDATION,DQM', '--conditions':gt, - '--datatier':'GEN-SIM-RECO', + '--datatier':'GEN-SIM-RECO,DQMIO', '-n':'10', - '--eventcontent':'FEVTDEBUGHLT', + '--eventcontent':'FEVTDEBUGHLT,DQM', '--geometry' : geom } if cust!=None : upgradeStepDict['RecoFull'][k]['--customise']=cust if era is not None: upgradeStepDict['RecoFull'][k]['--era']=era if k2 in PUDataSets: - upgradeStepDict['RecoFullPU'][k]=merge([PUDataSets[k2],{'-s':'RAW2DIGI,L1Reco,RECO'},upgradeStepDict['RecoFull'][k]]) + upgradeStepDict['RecoFullPU'][k]=merge([PUDataSets[k2],upgradeStepDict['RecoFull'][k]]) upgradeStepDict['RecoFullHGCAL'][k] = {'-s':'RAW2DIGI,L1Reco,RECO', '--conditions':gt, @@ -1555,7 +1555,7 @@ def identityFS(wf): if era is not None: upgradeStepDict['HARVESTFull'][k]['--era']=era if k2 in PUDataSets: - upgradeStepDict['HARVESTFullPU'][k]=merge([PUDataSets[k2],{'-s':'HARVESTING:dqmHarvesting'},upgradeStepDict['HARVESTFull'][k]]) + upgradeStepDict['HARVESTFullPU'][k]=merge([PUDataSets[k2],upgradeStepDict['HARVESTFull'][k]]) upgradeStepDict['FastSim'][k]={'-s':'GEN,SIM,RECO,VALIDATION', '--eventcontent':'FEVTDEBUGHLT,DQM', diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index 45793277b2582..a5cac8f263f75 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -85,8 +85,8 @@ # step7 is fastsim harvesting upgradeSteps=['GenSimFull','GenSimHLBeamSpotFull','DigiFull','RecoFull','RecoFullHGCAL','HARVESTFull','DigiTrkTrigFull','FastSim','HARVESTFast','DigiFullPU','RecoFullPU','RecoFullPUHGCAL','HARVESTFullPU','DigiFullTrigger'] -upgradeScenToRun={ '2017':['GenSimFull','DigiFull','RecoFull'],#HARVESTING REMOVED - '2017PU':['GenSimFull','DigiFullPU','RecoFullPU'],#full sequence +upgradeScenToRun={ '2017':['GenSimFull','DigiFull','RecoFull','HARVESTFull'], + '2017PU':['GenSimFull','DigiFullPU','RecoFullPU','HARVESTFullPU'],#full sequence '2023':['GenSimFull','DigiFull','RecoFull'],#full sequence '2023dev':['GenSimFull','DigiFull','RecoFull'],#dev scenario '2023sim':['GenSimFull'],#sim scenario From fb3e5e390d820ff6bc8a9b197c799cc9845811e8 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Sun, 20 Dec 2015 13:14:39 +0100 Subject: [PATCH 104/250] Fix ohase1TkCustoms for tracking-only reco --- .../Configuration/python/phase1TkCustoms.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py b/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py index 6cc32e8f78956..985b8e683a0aa 100644 --- a/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py +++ b/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py @@ -410,13 +410,13 @@ def customise_Reco(process,pileup): process.siPixelRecHits ) process.clusterSummaryProducer.pixelClusters = "siPixelClusters" - process.reconstruction.replace(process.MeasurementTrackerEventPreSplitting, process.MeasurementTrackerEvent) - process.reconstruction.replace(process.siPixelClusterShapeCachePreSplitting, process.siPixelClusterShapeCache) + process.globalreco_tracking.replace(process.MeasurementTrackerEventPreSplitting, process.MeasurementTrackerEvent) + process.globalreco_tracking.replace(process.siPixelClusterShapeCachePreSplitting, process.siPixelClusterShapeCache) # Enable, for now, pixel tracks and vertices # To be removed later together with the cluster splitting - process.reconstruction.replace(process.standalonemuontracking, - process.standalonemuontracking+process.recopixelvertexing) + process.globalreco_tracking.replace(process.standalonemuontracking, + process.standalonemuontracking+process.recopixelvertexing) process.initialStepSelector.vertices = "pixelVertices" process.highPtTripletStepSelector.vertices = "pixelVertices" process.lowPtQuadStepSelector.vertices = "pixelVertices" From c92afa9cbdfa314a0131c9cfc7dccae3d143175b Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Mon, 11 Jan 2016 14:31:11 +0100 Subject: [PATCH 105/250] Move customizations of stripped-down DQM and VALIDATION to phase1TkCustoms.py The customizations are temporary instead of genuine differences between Run1/2 and Phase1 detectors. --- .../python/DQMOffline_SecondStep_cff.py | 15 --- .../Configuration/python/DQMOffline_cff.py | 24 ---- .../Common/python/HLTValidationHarvest_cff.py | 5 - .../Common/python/HLTValidation_cff.py | 6 - .../Configuration/python/phase1TkCustoms.py | 109 ++++++++++++++++++ .../python/globalValidation_cff.py | 44 +------ .../python/postValidation_cff.py | 24 ---- 7 files changed, 110 insertions(+), 117 deletions(-) diff --git a/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py b/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py index eb5416bfe2326..ca1f564a21f25 100644 --- a/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_SecondStep_cff.py @@ -18,8 +18,6 @@ from Validation.RecoTau.DQMSequences_cfi import * from DQMOffline.Hcal.HcalDQMOfflinePostProcessor_cff import * -from Configuration.StandardSequences.Eras import eras - DQMOffline_SecondStep_PreDPG = cms.Sequence( dqmDcsInfoClient * ecal_dqm_client_offline * hcalOfflineDQMClient * @@ -46,8 +44,6 @@ from DQMOffline.JetMET.dataCertificationJetMET_cff import * from DQM.TrackingMonitorClient.TrackingClientConfig_Tier0_cff import * -from Configuration.StandardSequences.Eras import eras - DQMOffline_SecondStep_PrePOG = cms.Sequence( TrackingOfflineDQMClient * muonQualityTests * egammaPostProcessing * @@ -74,13 +70,6 @@ DQMOffline_SecondStep_FakeHLT = cms.Sequence( DQMOffline_SecondStep ) DQMOffline_SecondStep_FakeHLT.remove( HLTMonitoringClient ) -if eras.phase1Pixel.isChosen(): # FIXME - # These should be added back once somebody checks that they work, - # and those that do not, get fixed - DQMOffline_SecondStep.remove(DQMOffline_SecondStep_PreDPG) - DQMOffline_SecondStep.remove(DQMOffline_SecondStep_PrePOG) - DQMOffline_SecondStep.remove(HLTMonitoringClient) - DQMOffline_SecondStep_PrePOGMC = cms.Sequence( bTagCollectorSequenceDATA ) DQMOffline_SecondStepPOGMC = cms.Sequence( dqmRefHistoRootFileGetter * @@ -117,10 +106,6 @@ DQMHarvestTracking = cms.Sequence( TrackingOfflineDQMClient * dqmFastTimerServiceClient ) -if eras.phase1Pixel.isChosen(): # FIXME - # These should be added back once somebody checks that they work, - # and those that do not, get fixed - DQMHarvestTracking.remove(TrackingOfflineDQMClient) DQMHarvestMuon = cms.Sequence( dtClients * rpcTier0Client * diff --git a/DQMOffline/Configuration/python/DQMOffline_cff.py b/DQMOffline/Configuration/python/DQMOffline_cff.py index 4bf44689e9342..7ab493488f49e 100644 --- a/DQMOffline/Configuration/python/DQMOffline_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_cff.py @@ -48,8 +48,6 @@ from Validation.RecoParticleFlow.miniAODDQM_cff import * from DQM.TrackingMonitor.tracksDQMMiniAOD_cff import * -from Configuration.StandardSequences.Eras import eras - DQMOfflinePrePOG = cms.Sequence( TrackingDQMSourceTier0 * muonMonitors * jetMETDQMOfflineSource * @@ -76,23 +74,6 @@ DQMOfflineFakeHLT = cms.Sequence( DQMOffline ) DQMOfflineFakeHLT.remove( HLTMonitoring ) -if eras.phase1Pixel.isChosen(): # FIXME - # These should be added back once somebody checks that they work, - # and those that do not, get fixed - DQMOfflinePrePOG.remove(TrackingDQMSourceTier0) - DQMOfflinePrePOG.remove(muonMonitors) - DQMOfflinePrePOG.remove(jetMETDQMOfflineSource) - DQMOfflinePrePOG.remove(egammaDQMOffline) - DQMOfflinePrePOG.remove(triggerOfflineDQMSource) - DQMOfflinePrePOG.remove(bTagPlotsDATA) - DQMOfflinePrePOG.remove(alcaBeamMonitor) - DQMOfflinePrePOG.remove(dqmPhysics) - DQMOfflinePrePOG.remove(produceDenoms) - DQMOfflinePrePOG.remove(pfTauRunDQMValidation) - - DQMOffline.remove(DQMOfflinePreDPG) - DQMOffline.remove(HLTMonitoring) - DQMOfflinePrePOGMC = cms.Sequence( pvMonitor * bTagPlotsDATA * dqmPhysics ) @@ -134,11 +115,6 @@ DQMOfflineTracking = cms.Sequence( TrackingDQMSourceTier0Common * pvMonitor ) -if eras.phase1Pixel.isChosen(): # FIXME - # These should be added back once somebody checks that they work, - # and those that do not, get fixed - DQMOfflineTracking.remove(TrackingDQMSourceTier0Common) - DQMOfflineMuon = cms.Sequence( dtSources * rpcTier0Source * cscSources * diff --git a/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py b/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py index 105cf3d9e69ea..0f595a1725b41 100644 --- a/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py +++ b/HLTriggerOffline/Common/python/HLTValidationHarvest_cff.py @@ -43,11 +43,6 @@ hltpostvalidation.remove(postProcessorHLTvertexing) # remove this: +hltvalidationqt ? # remove this: +hltExoticaPostProcessors ? - -if eras.phase1Pixel.isChosen(): # FIXME - # These should be added back once somebody checks that they work, - # and those that do not, get fixed - hltpostvalidation = cms.Sequence() hltpostvalidation_preprod = cms.Sequence( postProcessorHLTtrackingSequence diff --git a/HLTriggerOffline/Common/python/HLTValidation_cff.py b/HLTriggerOffline/Common/python/HLTValidation_cff.py index 2aedf3149774a..539815a259cdf 100644 --- a/HLTriggerOffline/Common/python/HLTValidation_cff.py +++ b/HLTriggerOffline/Common/python/HLTValidation_cff.py @@ -54,12 +54,6 @@ if eras.phase1Pixel.isChosen(): hltvalidation.remove(HiggsValidationSequence) -if eras.phase1Pixel.isChosen(): # FIXME - # These should be added back once somebody checks that they work, - # and those that do not, get fixed - hltassociation = cms.Sequence() - hltvalidation = cms.Sequence() - # some hlt collections have no direct fastsim equivalent # remove the dependent modules for now # probably it would be rather easy to add or fake these collections diff --git a/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py b/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py index 985b8e683a0aa..023d58db4c2c7 100644 --- a/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py +++ b/SLHCUpgradeSimulations/Configuration/python/phase1TkCustoms.py @@ -98,6 +98,29 @@ def customise_Digi(process): # DQM steps change def customise_DQM(process,pileup): + # FIXME + # + # These should be added back once somebody checks that they work, + # and those that do not, get fixed + # + # The customizations are done here instead of in the central files + # with era because they are temporary + process.DQMOfflinePrePOG.remove(process.TrackingDQMSourceTier0) + process.DQMOfflinePrePOG.remove(process.muonMonitors) + process.DQMOfflinePrePOG.remove(process.jetMETDQMOfflineSource) + process.DQMOfflinePrePOG.remove(process.egammaDQMOffline) + process.DQMOfflinePrePOG.remove(process.triggerOfflineDQMSource) + process.DQMOfflinePrePOG.remove(process.bTagPlotsDATA) + process.DQMOfflinePrePOG.remove(process.alcaBeamMonitor) + process.DQMOfflinePrePOG.remove(process.dqmPhysics) + process.DQMOfflinePrePOG.remove(process.produceDenoms) + process.DQMOfflinePrePOG.remove(process.pfTauRunDQMValidation) + + process.DQMOffline.remove(process.DQMOfflinePreDPG) + process.DQMOffline.remove(process.HLTMonitoring) + + process.DQMOfflineTracking.remove(process.TrackingDQMSourceTier0Common) + # Ok, this customization does not work currently at all # Need to be fixed before the tracking DQM can be enabled return process @@ -126,6 +149,57 @@ def customise_DQM(process,pileup): return process def customise_Validation(process): + # FIXME + # + # For starters, include only tracking validation + # The rest should be added back once somebody checks that they + # work, and those that do not, get fixed + # + # The customizations are done here instead of in the central files + # with era because they are temporary + process.globalPrevalidation.remove(process.photonPrevalidationSequence) + process.globalPrevalidation.remove(process.produceDenoms) + process.globalPrevalidation.remove(process.prebTagSequenceMC) + # With era, would modify process.globalValidation + process.validation.remove(process.trackerHitsValidation) + process.validation.remove(process.trackerDigisValidation) + process.validation.remove(process.trackerRecHitsValidation) + process.validation.remove(process.trackingTruthValid) + process.validation.remove(process.trackingRecHitsValid) + process.validation.remove(process.ecalSimHitsValidationSequence) + process.validation.remove(process.ecalDigisValidationSequence) + process.validation.remove(process.ecalRecHitsValidationSequence) + process.validation.remove(process.ecalClustersValidationSequence) + process.validation.remove(process.hcalSimHitsValidationSequence) + process.validation.remove(process.hcaldigisValidationSequence) + process.validation.remove(process.hcalSimHitStudy) + process.validation.remove(process.hcalRecHitsValidationSequence) + process.validation.remove(process.calotowersValidationSequence) + process.validation.remove(process.validSimHit) + process.validation.remove(process.muondtdigianalyzer) + process.validation.remove(process.cscDigiValidation) + process.validation.remove(process.validationMuonRPCDigis) + process.validation.remove(process.recoMuonValidation) + process.validation.remove(process.muIsoVal_seq) + process.validation.remove(process.muonIdValDQMSeq) + process.validation.remove(process.mixCollectionValidation) + process.validation.remove(process.JetValidation) + process.validation.remove(process.METValidation) + process.validation.remove(process.egammaValidation) + process.validation.remove(process.pfJetValidationSequence) + process.validation.remove(process.pfMETValidationSequence) + process.validation.remove(process.pfElectronValidationSequence) + process.validation.remove(process.pfJetResValidationSequence) + process.validation.remove(process.pfMuonValidationSequence) + process.validation.remove(process.rpcRecHitValidation_step) + process.validation.remove(process.dtLocalRecoValidation_no2D) + process.validation.remove(process.pfTauRunDQMValidation) + process.validation.remove(process.bTagPlotsMCbcl) + process.validation.remove(process.L1Validator) + + process.hltassociation = cms.Sequence() + process.hltvalidation = cms.Sequence() + # these were migrated in #12359 if eras.phase1Pixel.isChosen(): return process @@ -161,6 +235,41 @@ def customise_Validation_Trackingonly(process): return process def customise_harvesting(process): + # FIXME + # + # These should be added back once somebody checks that they work, + # and those that do not, get fixed + # + # The customizations are done here instead of in the central files + # with era because they are temporary + process.DQMOffline_SecondStep.remove(process.DQMOffline_SecondStep_PreDPG) + process.DQMOffline_SecondStep.remove(process.DQMOffline_SecondStep_PrePOG) + process.DQMOffline_SecondStep.remove(process.HLTMonitoringClient) + + process.DQMHarvestTracking.remove(process.TrackingOfflineDQMClient) + + process.postValidation.remove(process.recoMuonPostProcessors) + process.postValidation.remove(process.MuIsoValPostProcessor) + process.postValidation.remove(process.calotowersPostProcessor) + process.postValidation.remove(process.hcalSimHitsPostProcessor) + process.postValidation.remove(process.hcaldigisPostProcessor) + process.postValidation.remove(process.hcalrechitsPostProcessor) + process.postValidation.remove(process.electronPostValidationSequence) + process.postValidation.remove(process.photonPostProcessor) + process.postValidation.remove(process.pfJetClient) + process.postValidation.remove(process.pfMETClient) + process.postValidation.remove(process.pfJetResClient) + process.postValidation.remove(process.pfElectronClient) + process.postValidation.remove(process.rpcRecHitPostValidation_step) + process.postValidation.remove(process.runTauEff) + process.postValidation.remove(process.makeBetterPlots) + process.postValidation.remove(process.bTagCollectorSequenceMCbcl) + process.postValidation.remove(process.METPostProcessor) + process.postValidation_preprod.remove(process.recoMuonPostProcessors) + process.postValidation_preprod.remove(process.MuIsoValPostProcessor) + + process.hltpostvalidation = cms.Sequence() + # these were migrated in #12440 if eras.phase1Pixel.isChosen(): return process diff --git a/Validation/Configuration/python/globalValidation_cff.py b/Validation/Configuration/python/globalValidation_cff.py index 1abd1d798820f..46838b8a29a16 100644 --- a/Validation/Configuration/python/globalValidation_cff.py +++ b/Validation/Configuration/python/globalValidation_cff.py @@ -103,49 +103,7 @@ # besides: is this cross frame doing something, or is it a relic from the past? globalValidation.remove(ecalDigisValidationSequence) globalValidation.remove(ecalRecHitsValidationSequence) -if eras.phase1Pixel.isChosen(): # FIXME - # For starters, include only tracking validation - # The rest should be added back once somebody checks that they - # work, and those that do not, get fixed - globalPrevalidation.remove(photonPrevalidationSequence) - globalPrevalidation.remove(produceDenoms) - globalPrevalidation.remove(prebTagSequenceMC) - globalValidation.remove(trackerHitsValidation) - globalValidation.remove(trackerDigisValidation) - globalValidation.remove(trackerRecHitsValidation) - globalValidation.remove(trackingTruthValid) - globalValidation.remove(trackingRecHitsValid) - globalValidation.remove(ecalSimHitsValidationSequence) - globalValidation.remove(ecalDigisValidationSequence) - globalValidation.remove(ecalRecHitsValidationSequence) - globalValidation.remove(ecalClustersValidationSequence) - globalValidation.remove(hcalSimHitsValidationSequence) - globalValidation.remove(hcaldigisValidationSequence) - globalValidation.remove(hcalSimHitStudy) - globalValidation.remove(hcalRecHitsValidationSequence) - globalValidation.remove(calotowersValidationSequence) - globalValidation.remove(validSimHit) - globalValidation.remove(muondtdigianalyzer) - globalValidation.remove(cscDigiValidation) - globalValidation.remove(validationMuonRPCDigis) - globalValidation.remove(recoMuonValidation) - globalValidation.remove(muIsoVal_seq) - globalValidation.remove(muonIdValDQMSeq) - globalValidation.remove(mixCollectionValidation) - globalValidation.remove(JetValidation) - globalValidation.remove(METValidation) - globalValidation.remove(egammaValidation) - globalValidation.remove(pfJetValidationSequence) - globalValidation.remove(pfMETValidationSequence) - globalValidation.remove(pfElectronValidationSequence) - globalValidation.remove(pfJetResValidationSequence) - globalValidation.remove(pfMuonValidationSequence) - globalValidation.remove(rpcRecHitValidation_step) - globalValidation.remove(dtLocalRecoValidation_no2D) - globalValidation.remove(pfTauRunDQMValidation) - globalValidation.remove(bTagPlotsMCbcl) - globalValidation.remove(L1Validator) - + #lite tracking validator to be used in the Validation matrix liteTrackValidator=trackValidator.clone() liteTrackValidator.label=cms.VInputTag(cms.InputTag("generalTracks"), diff --git a/Validation/Configuration/python/postValidation_cff.py b/Validation/Configuration/python/postValidation_cff.py index 5dac6865efaa4..99900e9bdecc9 100644 --- a/Validation/Configuration/python/postValidation_cff.py +++ b/Validation/Configuration/python/postValidation_cff.py @@ -17,7 +17,6 @@ from Validation.RecoMET.METPostProcessor_cff import * from DQMOffline.RecoB.dqmCollector_cff import * -from Configuration.StandardSequences.Eras import eras postValidation = cms.Sequence( recoMuonPostProcessors @@ -42,29 +41,6 @@ + MuIsoValPostProcessor ) -if eras.phase1Pixel.isChosen(): - # For starters, include only tracking validation - # The rest should be added back once somebody checks that they - # work, and those that do not, get fixed - postValidation.remove(recoMuonPostProcessors) - postValidation.remove(MuIsoValPostProcessor) - postValidation.remove(calotowersPostProcessor) - postValidation.remove(hcalSimHitsPostProcessor) - postValidation.remove(hcaldigisPostProcessor) - postValidation.remove(hcalrechitsPostProcessor) - postValidation.remove(electronPostValidationSequence) - postValidation.remove(photonPostProcessor) - postValidation.remove(pfJetClient) - postValidation.remove(pfMETClient) - postValidation.remove(pfJetResClient) - postValidation.remove(pfElectronClient) - postValidation.remove(rpcRecHitPostValidation_step) - postValidation.remove(runTauEff) - postValidation.remove(makeBetterPlots) - postValidation.remove(bTagCollectorSequenceMCbcl) - postValidation.remove(METPostProcessor) - postValidation_preprod.remove(recoMuonPostProcessors) - postValidation_preprod.remove(MuIsoValPostProcessor) postValidation_fastsim = cms.Sequence( recoMuonPostProcessors From efd8abe2c40bc26137dccf00383fbf178ea0da45 Mon Sep 17 00:00:00 2001 From: Jakob Date: Thu, 21 Jan 2016 15:03:16 +0100 Subject: [PATCH 106/250] add trigger prescale to PU re-weighting --- RecoLuminosity/LumiDB/python/csvLumibyLSParser.py | 8 ++++++-- RecoLuminosity/LumiDB/scripts/pileupReCalc_HLTpaths.py | 9 +++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/RecoLuminosity/LumiDB/python/csvLumibyLSParser.py b/RecoLuminosity/LumiDB/python/csvLumibyLSParser.py index 7087fdf3d12c8..f03c9331c3536 100755 --- a/RecoLuminosity/LumiDB/python/csvLumibyLSParser.py +++ b/RecoLuminosity/LumiDB/python/csvLumibyLSParser.py @@ -10,10 +10,11 @@ def is_intstr(s): except ValueError: return False class csvLumibyLSParser(object): - def __init__(self,filename): + def __init__(self,filename,RunX): self.__result={} self.__strresult={} self.__filename=filename + self.__RunX=RunX csvReader=csv.reader(open(filename),delimiter=',') oldRun=0 runnumber=0 @@ -47,7 +48,10 @@ def __init__(self,filename): oldRun = runnumber try: - delivered, recorded = float( row[5] ), float( row[6] ) + if RunX=='Run2': + delivered, recorded = float( row[4] ), float( row[5] ) + if RunX=='Run1': + delivered, recorded = float( row[5] ), float( row[6] ) except: print 'Record not parsed, Run = %d, LS = %d' % (runnumber, lsnumber) diff --git a/RecoLuminosity/LumiDB/scripts/pileupReCalc_HLTpaths.py b/RecoLuminosity/LumiDB/scripts/pileupReCalc_HLTpaths.py index f6ac3951d98da..ea51bea64f770 100755 --- a/RecoLuminosity/LumiDB/scripts/pileupReCalc_HLTpaths.py +++ b/RecoLuminosity/LumiDB/scripts/pileupReCalc_HLTpaths.py @@ -4,7 +4,7 @@ import optparse from RecoLuminosity.LumiDB import pileupParser from RecoLuminosity.LumiDB import selectionParser -from RecoLuminosity.LumiDB import csvLumibyLSParser +from RecoLuminosity.LumiDB import csvLumibyLSParser_Run2 from math import exp from math import sqrt @@ -54,7 +54,7 @@ def parseInputFile(inputfilename): parser.add_option('--inputLumiJSON',dest='inputLumiJSON',action='store', help='Input Lumi/Pileup file in JSON format (required)') parser.add_option('--verbose',dest='verbose',action='store_true',help='verbose mode for printing' ) - + parser.add_option('--runperiod',dest='runperiod',action='store', default='Run1',help='select runperiod Run1 or Run2, default Run1' ) # parse arguments try: (options, args) = parser.parse_args() @@ -75,10 +75,11 @@ def parseInputFile(inputfilename): print '\toutputfile: ',options.outputfile print '\tinput selection file: ',options.inputfile - + #print options.runperiod #inpf = open (options.inputfile, 'r') #inputfilecontent = inpf.read() - inputRange = csvLumibyLSParser.csvLumibyLSParser (options.inputfile).runsandls() + + inputRange = csvLumibyLSParser_Run2.csvLumibyLSParser (options.inputfile,options.runperiod).runsandls() #print 'number of runs processed %d' % csvLumibyLSParser.csvLumibyLSParser (options.inputfile).numruns() From 9042c1c6c7ba08594415d01e08d193472f2bbce7 Mon Sep 17 00:00:00 2001 From: Jakob Date: Thu, 21 Jan 2016 15:21:12 +0100 Subject: [PATCH 107/250] fix class name to old name --- RecoLuminosity/LumiDB/scripts/pileupReCalc_HLTpaths.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoLuminosity/LumiDB/scripts/pileupReCalc_HLTpaths.py b/RecoLuminosity/LumiDB/scripts/pileupReCalc_HLTpaths.py index ea51bea64f770..fe2045586f72d 100755 --- a/RecoLuminosity/LumiDB/scripts/pileupReCalc_HLTpaths.py +++ b/RecoLuminosity/LumiDB/scripts/pileupReCalc_HLTpaths.py @@ -4,7 +4,7 @@ import optparse from RecoLuminosity.LumiDB import pileupParser from RecoLuminosity.LumiDB import selectionParser -from RecoLuminosity.LumiDB import csvLumibyLSParser_Run2 +from RecoLuminosity.LumiDB import csvLumibyLSParser from math import exp from math import sqrt @@ -79,7 +79,7 @@ def parseInputFile(inputfilename): #inpf = open (options.inputfile, 'r') #inputfilecontent = inpf.read() - inputRange = csvLumibyLSParser_Run2.csvLumibyLSParser (options.inputfile,options.runperiod).runsandls() + inputRange = csvLumibyLSParser.csvLumibyLSParser (options.inputfile,options.runperiod).runsandls() #print 'number of runs processed %d' % csvLumibyLSParser.csvLumibyLSParser (options.inputfile).numruns() From bf15a27ca7aa81fef933e140f7cc08bdaa537f18 Mon Sep 17 00:00:00 2001 From: esmaeel Date: Thu, 21 Jan 2016 17:49:16 +0100 Subject: [PATCH 108/250] BMTF_dqm_v1 --- .../python/config/fileinputsource_cfi.py | 6 +- DQM/L1TMonitor/interface/L1TStage2BMTF.h | 84 +++++++++++++++++++ DQM/L1TMonitor/python/L1TStage2BMTF_cfi.py | 8 ++ .../python/L1TStage2_cff-esmaeel.py | 2 + DQM/L1TMonitor/src/L1TStage2BMTF.cc | 82 ++++++++++++++++++ DQM/L1TMonitor/src/SealModule.cc | 3 + 6 files changed, 183 insertions(+), 2 deletions(-) create mode 100755 DQM/L1TMonitor/interface/L1TStage2BMTF.h create mode 100644 DQM/L1TMonitor/python/L1TStage2BMTF_cfi.py create mode 100755 DQM/L1TMonitor/src/L1TStage2BMTF.cc diff --git a/DQM/Integration/python/config/fileinputsource_cfi.py b/DQM/Integration/python/config/fileinputsource_cfi.py index 2548d9d4146cc..98d7c0bc259c5 100644 --- a/DQM/Integration/python/config/fileinputsource_cfi.py +++ b/DQM/Integration/python/config/fileinputsource_cfi.py @@ -2,8 +2,10 @@ source = cms.Source("PoolSource", fileNames = cms.untracked.vstring( - "file:/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/DQMTest/MinimumBias__RAW__v1__165633__1CC420EE-B686-E011-A788-0030487CD6E8.root", -# "/store/data/Commissioning2014/Cosmics/RAW//v3/000/224/380/00000/E05943D1-1227-E411-BB8E-02163E00F0C4.root" +# "file:/afs/cern.ch/user/e/esmaeel/CMSSW_8_0_0_pre4/src/DQM/Integration/python/config/L1T_EDM.root", +# "file:/afs/cern.ch/user/e/esmaeel/CMSSW_8_0_0_pre4/src/DQM/Integration/python/config/l1tMuon_263400.root", +# "file:/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/DQMTest/MinimumBias__RAW__v1__165633__1CC420EE-B686-E011-A788-0030487CD6E8.root", + "/store/data/Commissioning2014/Cosmics/RAW//v3/000/224/380/00000/E05943D1-1227-E411-BB8E-02163E00F0C4.root" # "/store/data/Commissioning2014/Cosmics/RAW/v3/000/224/380/00000/68FDADE5-1227-E411-8AA6-02163E00A10C.root" ) ) diff --git a/DQM/L1TMonitor/interface/L1TStage2BMTF.h b/DQM/L1TMonitor/interface/L1TStage2BMTF.h new file mode 100755 index 0000000000000..5e1f4891c4b9d --- /dev/null +++ b/DQM/L1TMonitor/interface/L1TStage2BMTF.h @@ -0,0 +1,84 @@ +#ifndef DQM_L1TMonitor_L1TStage2BMTF_h +#define DQM_L1TMonitor_L1TStage2BMTF_h + +/* + * \file L1TStage2BMTF.h + * \Author Esmaeel Eskandari Tadavani +*/ + +// system requirements +#include +#include +#include +#include +#include + +// general requirements +#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/Common/interface/Handle.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "DataFormats/Common/interface/OrphanHandle.h" + +// stage2 requirements +#include "DataFormats/L1Trigger/interface/BXVector.h" +#include "DataFormats/L1Trigger/interface/Muon.h" +#include "DataFormats/L1TMuon/interface/RegionalMuonCand.h" +//#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" +// dqm requirements +#include "DQMServices/Core/interface/DQMStore.h" +#include "DQMServices/Core/interface/MonitorElement.h" +#include "DQMServices/Core/interface/DQMEDAnalyzer.h" + + +// class decleration + +class L1TStage2BMTF: public DQMEDAnalyzer { + +public: + +// class constructor +L1TStage2BMTF(const edm::ParameterSet & ps); + +// class destructor +virtual ~L1TStage2BMTF(); + +// member functions +protected: + void analyze(const edm::Event&, const edm::EventSetup&) override; + virtual void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&) override; + virtual void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override; + virtual void bookHistograms(DQMStore::IBooker&, const edm::Run&, const edm::EventSetup&) override ; + +// data members +private: + // enum ensubs {BMTF, OMTF, EMTF, mGMT}; + + std::string monitorDir; + edm::InputTag stage2bmtfSource ; + bool verbose ; + edm::EDGetToken stage2bmtfToken ; + + // eta & phi + MonitorElement* eta_bmtf; + MonitorElement* phi_bmtf; + MonitorElement* pt_bmtf; + MonitorElement* bx_bmtf; + MonitorElement* etaVSphi_bmtf; + MonitorElement* phiVSpt_bmtf; + MonitorElement* etaVSpt_bmtf; + MonitorElement* etaVSbx_bmtf; + MonitorElement* phiVSbx_bmtf; + MonitorElement* ptVSbx_bmtf; + + +}; + +#endif diff --git a/DQM/L1TMonitor/python/L1TStage2BMTF_cfi.py b/DQM/L1TMonitor/python/L1TStage2BMTF_cfi.py new file mode 100644 index 0000000000000..4b04d4740244b --- /dev/null +++ b/DQM/L1TMonitor/python/L1TStage2BMTF_cfi.py @@ -0,0 +1,8 @@ +import FWCore.ParameterSet.Config as cms + +l1tStage2BMTF = cms.EDAnalyzer("L1TStage2BMTF", + verbose = cms.untracked.bool(False), + stage2bmtfSource = cms.InputTag("bmtfDigis"), + DQMStore = cms.untracked.bool(True), + monitorDir = cms.untracked.string("L1T2016/L1TStage2BMTF") + ) diff --git a/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py b/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py index aa71182ba1e58..e04cf5f559559 100644 --- a/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py +++ b/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py @@ -5,5 +5,7 @@ from EventFilter.L1TRawToDigi.gmtStage2Digis_cfi import * l1tStage2online = cms.Sequence( + l1tStage2BMTF, l1tStage2mGMT + ) diff --git a/DQM/L1TMonitor/src/L1TStage2BMTF.cc b/DQM/L1TMonitor/src/L1TStage2BMTF.cc new file mode 100755 index 0000000000000..6e7237b65dfb9 --- /dev/null +++ b/DQM/L1TMonitor/src/L1TStage2BMTF.cc @@ -0,0 +1,82 @@ +/* + * \L1TStage2BMTF.cc + * \author Esmaeel Eskandari Tadavani +*/ + +#include "DQM/L1TMonitor/interface/L1TStage2BMTF.h" + +L1TStage2BMTF::L1TStage2BMTF(const edm::ParameterSet & ps): + monitorDir(ps.getUntrackedParameter("monitorDir","")), + stage2bmtfSource(ps.getParameter("stage2bmtfSource")), + verbose(ps.getUntrackedParameter("verbose", false)) +{ + stage2bmtfToken=consumes(ps.getParameter("stage2bmtfSource")); +} + +L1TStage2BMTF::~L1TStage2BMTF() +{ +} + +void L1TStage2BMTF::dqmBeginRun(const edm::Run& iRrun, const edm::EventSetup& eveSetup) +{ +} + +void L1TStage2BMTF::beginLuminosityBlock(const edm::LuminosityBlock& iLumi, const edm::EventSetup& eveSetup) +{ +} + + +void L1TStage2BMTF::bookHistograms(DQMStore::IBooker &ibooker, const edm::Run& iRun, const edm::EventSetup& eveSetup) +{ + ibooker.setCurrentFolder(monitorDir); + + // eta ,phi, pt + eta_bmtf = ibooker.book1D("eta_bmtf", "#eta of BMTF", 229, -114.5, 114.5); + phi_bmtf = ibooker.book1D("phi_bmtf", "#phi of BMTF", 144, -0.5, 143.5); + pt_bmtf = ibooker.book1D("pt_bmtf", "p_{T} of BMTF", 300, 0, 300); + bx_bmtf = ibooker.book1D("pt_bmtf", "BX", 2048, -0.5, 2047.5); + etaVSphi_bmtf = ibooker.book2D("etaVSphi_bmtf", "#eta VS #phi of BMTF", 229, -114.5, 114.5, 144, -0.5, 143.5); + phiVSpt_bmtf = ibooker.book2D("phiVSpt_bmtf", "#phi VS p_{T}of BMTF", 144, -0.5, 143.5, 300, 0, 300); + etaVSpt_bmtf = ibooker.book2D("etaVSpt_bmtf", "#eta VS p_{T} of BMTF", 229, -114.5, 114.5,300, 0, 300); + etaVSbx_bmtf = ibooker.book2D("etaVSbx_bmtf", "#eta of BMTF VS bx", 229, -114.5, 114.5, 2048, -0.5, 2047.5); + phiVSbx_bmtf = ibooker.book2D("phiVSbx_bmtf", "#phi of BMTF VS bx", 144, -0.5, 143.5, 2048, -0.5, 2047.5); + ptVSbx_bmtf = ibooker.book2D("ptVSbx_bmtf", "#p_{T} of BMTF VS bx", 300, 0, 300 , 2048, -0.5, 2047.5); + +} + +void L1TStage2BMTF::analyze(const edm::Event & eve, const edm::EventSetup & eveSetup) +{ + if (verbose) { + edm::LogInfo("L1TStage2BMTF") << "L1TStage2BMTF: analyze...." << std::endl; + } + // analyze Jet + edm::Handle Muon; + eve.getByToken(stage2bmtfToken,Muon); + + + for(int itBX=Muon->getFirstBX(); itBX<=Muon->getLastBX(); ++itBX) + { + for(l1t::RegionalMuonCandBxCollection::const_iterator itMuon = Muon->begin(itBX); itMuon != Muon->end(itBX); ++itMuon) + { + eta_bmtf->Fill(itMuon->hwEta()); + phi_bmtf->Fill(itMuon->hwPhi()); + pt_bmtf->Fill(itMuon->hwPt()); + bx_bmtf->Fill(itBX); + + etaVSphi_bmtf->Fill(itMuon->hwEta(),itMuon->hwPhi()); + phiVSpt_bmtf->Fill(itMuon->hwPhi(),itMuon->hwPt()); + etaVSpt_bmtf->Fill(itMuon->hwEta(),itMuon->hwPt()); + + etaVSbx_bmtf->Fill(itMuon->hwEta(),itBX); + phiVSbx_bmtf->Fill(itMuon->hwPhi(),itBX); + ptVSbx_bmtf->Fill(itMuon->hwPt() ,itBX); + + + } + } +} + + + + + diff --git a/DQM/L1TMonitor/src/SealModule.cc b/DQM/L1TMonitor/src/SealModule.cc index 05232e41fada8..54f826a3d83d3 100644 --- a/DQM/L1TMonitor/src/SealModule.cc +++ b/DQM/L1TMonitor/src/SealModule.cc @@ -30,6 +30,9 @@ DEFINE_FWK_MODULE(L1TGMT); #include DEFINE_FWK_MODULE(L1TStage2mGMT); +#include +DEFINE_FWK_MODULE(L1TStage2BMTF); + #include DEFINE_FWK_MODULE(L1TGCT); From d3ec73ff981365373e8f7e1f9455661e0931faf7 Mon Sep 17 00:00:00 2001 From: esmaeel Date: Fri, 22 Jan 2016 12:28:24 +0100 Subject: [PATCH 109/250] mGMT_dqm_v2 --- .../python/config/fileinputsource_cfi.py | 4 +- DQM/L1TMonitor/interface/L1TStage2BMTF.h | 2 +- DQM/L1TMonitor/interface/L1TStage2mGMT.h | 31 +++++--- .../python/L1TStage2_cff-esmaeel.py | 2 +- DQM/L1TMonitor/src/L1TStage2mGMT.cc | 77 +++++++------------ 5 files changed, 52 insertions(+), 64 deletions(-) diff --git a/DQM/Integration/python/config/fileinputsource_cfi.py b/DQM/Integration/python/config/fileinputsource_cfi.py index 98d7c0bc259c5..6e240c4bdec92 100644 --- a/DQM/Integration/python/config/fileinputsource_cfi.py +++ b/DQM/Integration/python/config/fileinputsource_cfi.py @@ -2,10 +2,10 @@ source = cms.Source("PoolSource", fileNames = cms.untracked.vstring( -# "file:/afs/cern.ch/user/e/esmaeel/CMSSW_8_0_0_pre4/src/DQM/Integration/python/config/L1T_EDM.root", + "file:/afs/cern.ch/user/e/esmaeel/CMSSW_8_0_0_pre4/src/DQM/Integration/python/config/L1T_EDM.root", # "file:/afs/cern.ch/user/e/esmaeel/CMSSW_8_0_0_pre4/src/DQM/Integration/python/config/l1tMuon_263400.root", # "file:/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/DQMTest/MinimumBias__RAW__v1__165633__1CC420EE-B686-E011-A788-0030487CD6E8.root", - "/store/data/Commissioning2014/Cosmics/RAW//v3/000/224/380/00000/E05943D1-1227-E411-BB8E-02163E00F0C4.root" +# "/store/data/Commissioning2014/Cosmics/RAW//v3/000/224/380/00000/E05943D1-1227-E411-BB8E-02163E00F0C4.root" # "/store/data/Commissioning2014/Cosmics/RAW/v3/000/224/380/00000/68FDADE5-1227-E411-8AA6-02163E00A10C.root" ) ) diff --git a/DQM/L1TMonitor/interface/L1TStage2BMTF.h b/DQM/L1TMonitor/interface/L1TStage2BMTF.h index 5e1f4891c4b9d..9fa1c1834e5be 100755 --- a/DQM/L1TMonitor/interface/L1TStage2BMTF.h +++ b/DQM/L1TMonitor/interface/L1TStage2BMTF.h @@ -66,7 +66,7 @@ virtual ~L1TStage2BMTF(); bool verbose ; edm::EDGetToken stage2bmtfToken ; - // eta & phi + MonitorElement* eta_bmtf; MonitorElement* phi_bmtf; MonitorElement* pt_bmtf; diff --git a/DQM/L1TMonitor/interface/L1TStage2mGMT.h b/DQM/L1TMonitor/interface/L1TStage2mGMT.h index 0efb9b127a4d3..97832cd7a6b05 100755 --- a/DQM/L1TMonitor/interface/L1TStage2mGMT.h +++ b/DQM/L1TMonitor/interface/L1TStage2mGMT.h @@ -65,6 +65,19 @@ virtual ~L1TStage2mGMT(); bool verbose ; edm::EDGetToken stage2mgmtToken ; + + + MonitorElement* eta_mgmt; + MonitorElement* phi_mgmt; + MonitorElement* pt_mgmt; + MonitorElement* bx_mgmt; + MonitorElement* etaVSphi_mgmt; + MonitorElement* phiVSpt_mgmt; + MonitorElement* etaVSpt_mgmt; + MonitorElement* etaVSbx_mgmt; + MonitorElement* phiVSbx_mgmt; + MonitorElement* ptVSbx_mgmt; + // eta & phi // MonitorElement* subs_eta[4]; // MonitorElement* subs_phi[4]; @@ -72,13 +85,13 @@ virtual ~L1TStage2mGMT(); // MonitorElement* subs_etaqty[4]; // MonitorElement* eta_bmtf_omtf_emtf; - MonitorElement* eta_bmtf; - MonitorElement* eta_omtf; - MonitorElement* eta_emtf; + // MonitorElement* eta_bmtf; + // MonitorElement* eta_omtf; + // MonitorElement* eta_emtf; // MonitorElement* phi_bmtf_omtf_emtf; - MonitorElement* phi_bmtf; - MonitorElement* phi_omtf; - MonitorElement* phi_emtf; + // MonitorElement* phi_bmtf; + // MonitorElement* phi_omtf; + // MonitorElement* phi_emtf; // MonitorElement* etaphi_bmtf_omtf_emtf; /* MonitorElement* etaphi_bmtf; */ /* MonitorElement* etaphi_omtf; */ @@ -90,9 +103,9 @@ virtual ~L1TStage2mGMT(); /* MonitorElement* eta_bmtf_emtf; */ /* MonitorElement* eta_omtf_emtf; */ - MonitorElement* pt_bmtf; - MonitorElement* pt_omtf; - MonitorElement* pt_emtf; + // MonitorElement* pt_bmtf; + // MonitorElement* pt_omtf; + // MonitorElement* pt_emtf; // bunch-crossing // MonitorElement* subs_nbx[4]; // MonitorElement* subs_dbx[3]; diff --git a/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py b/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py index e04cf5f559559..70d2c53ef5f19 100644 --- a/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py +++ b/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py @@ -5,7 +5,7 @@ from EventFilter.L1TRawToDigi.gmtStage2Digis_cfi import * l1tStage2online = cms.Sequence( - l1tStage2BMTF, +# l1tStage2BMTF, l1tStage2mGMT ) diff --git a/DQM/L1TMonitor/src/L1TStage2mGMT.cc b/DQM/L1TMonitor/src/L1TStage2mGMT.cc index 9c1ff9833bf7b..49ba5d33c7770 100755 --- a/DQM/L1TMonitor/src/L1TStage2mGMT.cc +++ b/DQM/L1TMonitor/src/L1TStage2mGMT.cc @@ -29,34 +29,19 @@ void L1TStage2mGMT::beginLuminosityBlock(const edm::LuminosityBlock& iLumi, cons void L1TStage2mGMT::bookHistograms(DQMStore::IBooker &ibooker, const edm::Run& iRun, const edm::EventSetup& eveSetup) { ibooker.setCurrentFolder(monitorDir); - - // eta & phi - // eta_bmtf_omtf_emtf= ibooker.book1D("eta_bmtf_omtf_emtf", "Eta of BMTF & OMTF & EMTF", 229, -114.5, 114.5); - eta_bmtf = ibooker.book1D("eta_bmtf", "Eta of BMTF", 229, -114.5, 114.5); - eta_omtf = ibooker.book1D("eta_omtf", "Eta of OMTF", 229, -114.5, 114.5); - eta_emtf = ibooker.book1D("eta_emtf", "Eta of EMTF", 229, -114.5, 114.5); - - // phi_bmtf_omtf_emtf= ibooker.book1D("phi_bmtf_omtf_emtf", "Phi of BMTF & OMTF & EMTF", 144, -0.5, 143.5); - phi_bmtf = ibooker.book1D("phi_bmtf", "Phi of BMTF", 144, -0.5, 143.5); - phi_omtf = ibooker.book1D("phi_omtf", "Phi of OMTF", 144, -0.5, 143.5); - phi_emtf = ibooker.book1D("phi_emtf", "Phi of EMTF", 144, -0.5, 143.5); - - // etaphi_bmtf_omtf_emtf= ibooker.book2D("etaphi_bmtf_omtf_emtf", "EtaPhi of BMTF & OMTF & EMTF", 229, -114.5, 114.5, 144, -0.5, 143.5); - // etaphi_bmtf = ibooker.book2D("etaphi_bmtf", "EtaPhi of BMTF", 229, -114.5, 114.5, 144, -0.5, 143.5); - // etaphi_omtf = ibooker.book2D("etaphi_omtf", "EtaPhi of OMTF", 229, -114.5, 114.5, 144, -0.5, 143.5); - // etaphi_emtf = ibooker.book2D("etaphi_emtf", "EtaPhi of EMTF", 229, -114.5, 114.5, 144, -0.5, 143.5); - - // eta_bmtf_omtf= ibooker.book1D("eta_bmtf_omtf", "Eta of BMTF & OMTF", 229, -114.5, 114.5); - // eta_bmtf_emtf= ibooker.book1D("eta_bmtf_emtf", "Eta of BMTF & EMTF", 229, -114.5, 114.5); - // eta_omtf_emtf= ibooker.book1D("eta_omtf_emtf", "Eta of OMTF & EMTF", 229, -114.5, 114.5); + // eta ,phi, pt + eta_mgmt = ibooker.book1D("eta_mgmt", "#eta of MGMT", 229, -114.5, 114.5); + phi_mgmt = ibooker.book1D("phi_mgmt", "#phi of MGMT", 144, -0.5, 143.5); + pt_mgmt = ibooker.book1D("pt_mgmt", "p_{T} of MGMT", 300, 0, 300); + bx_mgmt = ibooker.book1D("pt_mgmt", "BX", 2048, -0.5, 2047.5); + etaVSphi_mgmt = ibooker.book2D("etaVSphi_mgmt", "#eta VS #phi of MGMT", 229, -114.5, 114.5, 144, -0.5, 143.5); + phiVSpt_mgmt = ibooker.book2D("phiVSpt_mgmt", "#phi VS p_{T}of MGMT", 144, -0.5, 143.5, 300, 0, 300); + etaVSpt_mgmt = ibooker.book2D("etaVSpt_mgmt", "#eta VS p_{T} of MGMT", 229, -114.5, 114.5,300, 0, 300); + etaVSbx_mgmt = ibooker.book2D("etaVSbx_mgmt", "#eta of MGMT VS bx", 229, -114.5, 114.5, 2048, -0.5, 2047.5); + phiVSbx_mgmt = ibooker.book2D("phiVSbx_mgmt", "#phi of MGMT VS bx", 144, -0.5, 143.5, 2048, -0.5, 2047.5); + ptVSbx_mgmt = ibooker.book2D("ptVSbx_mgmt", "#p_{T} of MGMT VS bx", 300, 0, 300 , 2048, -0.5, 2047.5); - // phi_bmtf_omtf= ibooker.book1D("phi_bmtf_omtf", "Phi of BMTF & OMTF", 144, -0.5, 143.5); - // phi_bmtf_emtf= ibooker.book1D("phi_bmtf_emtf", "Phi of BMTF & EMTF", 144, -0.5, 143.5); - // phi_omtf_emtf= ibooker.book1D("phi_omtf_emtf", "Phi of OMTF & EMTF", 144, -0.5, 143.5); - - pt_bmtf = ibooker.book1D("pt_bmtf", "Pt of BMTF", 1000, 0, 1000); - pt_omtf = ibooker.book1D("pt_omtf", "Pt of OMTF", 1000, 0, 1000); - pt_emtf = ibooker.book1D("pt_emtf", "Pt of EMTF", 1000, 0, 1000); + } @@ -77,30 +62,20 @@ void L1TStage2mGMT::analyze(const edm::Event & eve, const edm::EventSetup & eveS for(l1t::MuonBxCollection::const_iterator itMuon = Muon->begin(itBX); itMuon != Muon->end(itBX); ++itMuon) // for(l1t::MuonBxCollection::const_iterator itMuon = Muon->begin(); itMuon != Muon->end(); ++itMuon) { - const bool endcap = (itMuon->hwEta() >= 68 || itMuon->hwEta() <= (-68)); - const bool overlap = ((itMuon->hwEta() > 44 && itMuon->hwEta() < 68) ||(itMuon->hwEta() >= (-68) && itMuon->hwEta() <= (-44))); - const bool barrel = (itMuon->hwEta() >= (-44) && itMuon->hwEta() <= 44); - - if (endcap) - { - eta_emtf->Fill(itMuon->hwEta()); - phi_emtf->Fill(itMuon->hwPhi()); - pt_emtf->Fill(itMuon->hwPt()); - } - - if (overlap) - { - eta_omtf->Fill(itMuon->hwEta()); - phi_omtf->Fill(itMuon->hwPhi()); - pt_omtf->Fill(itMuon->hwPt()); - } - - if (barrel) - { - eta_bmtf->Fill(itMuon->hwEta()); - phi_bmtf->Fill(itMuon->hwPhi()); - pt_bmtf->Fill(itMuon->hwPt()); - } + + eta_mgmt->Fill(itMuon->hwEta()); + phi_mgmt->Fill(itMuon->hwPhi()); + pt_mgmt->Fill(itMuon->hwPt()); + bx_mgmt->Fill(itBX); + + etaVSphi_mgmt->Fill(itMuon->hwEta(),itMuon->hwPhi()); + phiVSpt_mgmt->Fill(itMuon->hwPhi(),itMuon->hwPt()); + etaVSpt_mgmt->Fill(itMuon->hwEta(),itMuon->hwPt()); + + etaVSbx_mgmt->Fill(itMuon->hwEta(),itBX); + phiVSbx_mgmt->Fill(itMuon->hwPhi(),itBX); + ptVSbx_mgmt->Fill(itMuon->hwPt() ,itBX); + } } } From 1903f8deed98ed76ca978e3e52030252e8b088ac Mon Sep 17 00:00:00 2001 From: esmaeel Date: Sun, 24 Jan 2016 20:22:13 +0100 Subject: [PATCH 110/250] mGMT_dqm_v3 --- ...t2016_dqm_sourceclient-live_cfg-esmaeel.py | 7 +- .../python/config/fileinputsource_cfi.py | 4 +- DQM/L1TMonitor/interface/L1TStage2BMTF.h | 1 - DQM/L1TMonitor/interface/L1TStage2mGMT.h | 84 ++++--------------- .../python/L1TStage2_cff-esmaeel.py | 1 + DQM/L1TMonitor/src/L1TStage2mGMT.cc | 54 +++++++----- DQM/L1TMonitor/src/SealModule.cc | 2 + 7 files changed, 62 insertions(+), 91 deletions(-) diff --git a/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py b/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py index 26e9c6dd6c4fb..480151f8648d7 100644 --- a/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py +++ b/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py @@ -76,6 +76,9 @@ #process.RawToDigi.remove("siStripDigis") #process.RawToDigi.remove("scalersRawToDigi") #process.RawToDigi.remove("castorDigis") +#process.L1TMuonEmulation.remove("emptyCaloCollsProducer") +#process.emptyCaloCollsProducer.InputLabel = cms.InputTag("rawDataCollector") + # for GCT, unpack all five samples #process.gctDigis.numberOfGctSamplesToUnpack = cms.uint32(5) @@ -129,6 +132,8 @@ # remove module(s) or system sequence from l1tMonitorPath # quality test disabled also # +#process.l1tMonitorOnline.remove(process.bxTiming) + #process.l1tMonitorOnline.remove(process.bxTiming) #process.l1tMonitorOnline.remove(process.l1tBPTX) @@ -202,7 +207,7 @@ process.siStripDigis.ProductLabel = cms.InputTag("rawDataRepacker") process.bxTiming.FedSource = cms.untracked.InputTag("rawDataRepacker") process.l1s.fedRawData = cms.InputTag("rawDataRepacker") - +# process.gmtStage2Digis.inputLabel = cms.InputTag("rawDataRepacker") ### process customizations included here from DQM.Integration.config.online_customizations_cfi import * process = customise(process) diff --git a/DQM/Integration/python/config/fileinputsource_cfi.py b/DQM/Integration/python/config/fileinputsource_cfi.py index 6e240c4bdec92..2b81ecd7e3905 100644 --- a/DQM/Integration/python/config/fileinputsource_cfi.py +++ b/DQM/Integration/python/config/fileinputsource_cfi.py @@ -2,8 +2,8 @@ source = cms.Source("PoolSource", fileNames = cms.untracked.vstring( - "file:/afs/cern.ch/user/e/esmaeel/CMSSW_8_0_0_pre4/src/DQM/Integration/python/config/L1T_EDM.root", -# "file:/afs/cern.ch/user/e/esmaeel/CMSSW_8_0_0_pre4/src/DQM/Integration/python/config/l1tMuon_263400.root", +# "file:/afs/cern.ch/user/e/esmaeel/CMSSW_8_0_0_pre4/src/DQM/Integration/python/config/L1T_EDM.root", + "file:/afs/cern.ch/user/e/esmaeel/CMSSW_8_0_0_pre4/src/DQM/Integration/python/config/l1tMuon_263400.root", # "file:/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/DQMTest/MinimumBias__RAW__v1__165633__1CC420EE-B686-E011-A788-0030487CD6E8.root", # "/store/data/Commissioning2014/Cosmics/RAW//v3/000/224/380/00000/E05943D1-1227-E411-BB8E-02163E00F0C4.root" # "/store/data/Commissioning2014/Cosmics/RAW/v3/000/224/380/00000/68FDADE5-1227-E411-8AA6-02163E00A10C.root" diff --git a/DQM/L1TMonitor/interface/L1TStage2BMTF.h b/DQM/L1TMonitor/interface/L1TStage2BMTF.h index 9fa1c1834e5be..7d47ff94713ad 100755 --- a/DQM/L1TMonitor/interface/L1TStage2BMTF.h +++ b/DQM/L1TMonitor/interface/L1TStage2BMTF.h @@ -46,7 +46,6 @@ class L1TStage2BMTF: public DQMEDAnalyzer { // class constructor L1TStage2BMTF(const edm::ParameterSet & ps); - // class destructor virtual ~L1TStage2BMTF(); diff --git a/DQM/L1TMonitor/interface/L1TStage2mGMT.h b/DQM/L1TMonitor/interface/L1TStage2mGMT.h index 97832cd7a6b05..b58b8a31a33ea 100755 --- a/DQM/L1TMonitor/interface/L1TStage2mGMT.h +++ b/DQM/L1TMonitor/interface/L1TStage2mGMT.h @@ -30,16 +30,17 @@ // stage2 requirements #include "DataFormats/L1Trigger/interface/BXVector.h" #include "DataFormats/L1Trigger/interface/Muon.h" +#include "DataFormats/L1TMuon/interface/RegionalMuonCand.h" +//#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" // dqm requirements #include "DQMServices/Core/interface/DQMStore.h" #include "DQMServices/Core/interface/MonitorElement.h" #include "DQMServices/Core/interface/DQMEDAnalyzer.h" - // class decleration -class L1TStage2mGMT: public DQMEDAnalyzer { +class L1TStage2mGMT: public DQMEDAnalyzer { public: @@ -58,84 +59,35 @@ virtual ~L1TStage2mGMT(); // data members private: - // enum ensubs {BMTF, OMTF, EMTF, mGMT}; std::string monitorDir; edm::InputTag stage2mgmtSource ; bool verbose ; edm::EDGetToken stage2mgmtToken ; - - MonitorElement* eta_mgmt; MonitorElement* phi_mgmt; MonitorElement* pt_mgmt; + MonitorElement* charge_mgmt; + MonitorElement* chargeVal_mgmt; + MonitorElement* qual_mgmt; + MonitorElement* iso_mgmt; + MonitorElement* bx_mgmt; - MonitorElement* etaVSphi_mgmt; - MonitorElement* phiVSpt_mgmt; - MonitorElement* etaVSpt_mgmt; + MonitorElement* etaVSbx_mgmt; MonitorElement* phiVSbx_mgmt; MonitorElement* ptVSbx_mgmt; + MonitorElement* chargeVSbx_mgmt; + MonitorElement* chargeValVSbx_mgmt; + MonitorElement* qualVSbx_mgmt; + MonitorElement* isoVSbx_mgmt; + + MonitorElement* etaVSphi_mgmt; + MonitorElement* phiVSpt_mgmt; + MonitorElement* etaVSpt_mgmt; + - // eta & phi - // MonitorElement* subs_eta[4]; - // MonitorElement* subs_phi[4]; - // MonitorElement* subs_etaphi[4]; - // MonitorElement* subs_etaqty[4]; - - // MonitorElement* eta_bmtf_omtf_emtf; - // MonitorElement* eta_bmtf; - // MonitorElement* eta_omtf; - // MonitorElement* eta_emtf; - // MonitorElement* phi_bmtf_omtf_emtf; - // MonitorElement* phi_bmtf; - // MonitorElement* phi_omtf; - // MonitorElement* phi_emtf; - // MonitorElement* etaphi_bmtf_omtf_emtf; - /* MonitorElement* etaphi_bmtf; */ - /* MonitorElement* etaphi_omtf; */ - /* MonitorElement* etaphi_emtf; */ - /* MonitorElement* phi_bmtf_omtf; */ - /* MonitorElement* phi_bmtf_emtf; */ - /* MonitorElement* phi_omtf_emtf; */ - /* MonitorElement* eta_bmtf_omtf; */ - /* MonitorElement* eta_bmtf_emtf; */ - /* MonitorElement* eta_omtf_emtf; */ - - // MonitorElement* pt_bmtf; - // MonitorElement* pt_omtf; - // MonitorElement* pt_emtf; - // bunch-crossing - // MonitorElement* subs_nbx[4]; - // MonitorElement* subs_dbx[3]; - // MonitorElement* bx_number; - // MonitorElement* dbx_chip; - // MonitorElement* bx_bmtf_omtf; - // MonitorElement* bx_bmtf_emtf; - // MonitorElement* bx_omtf_emtfc; - - - // MonitorElement* subs_pt[4]; - // MonitorElement* subs_qty[4]; - // MonitorElement* subs_bits[4]; - - // MonitorElement* regional_triggers; - - // MonitorElement* n_bmtf_vs_omtf ; - // MonitorElement* n_bmtf_vs_emtf; - // MonitorElement* n_omtf_vs_emtf; - - - // const edm::EDGetTokenT mgmtSource_ ; - - /* int bxnum_old_; // bx of previous event */ - /* int obnum_old_; // orbit of previous event */ - /* int trsrc_old_; // code of trigger source ( bits: 0 DT, 1 bRPC, 2 CSC, 3 fRPC ) */ - - /* static const double piconv_; */ - /* double phiconv_(float phi); */ - /* void book_(const edm::EventSetup& c); */ }; diff --git a/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py b/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py index 70d2c53ef5f19..f96a1134f9964 100644 --- a/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py +++ b/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py @@ -5,6 +5,7 @@ from EventFilter.L1TRawToDigi.gmtStage2Digis_cfi import * l1tStage2online = cms.Sequence( +# l1tStage2OMTF, # l1tStage2BMTF, l1tStage2mGMT diff --git a/DQM/L1TMonitor/src/L1TStage2mGMT.cc b/DQM/L1TMonitor/src/L1TStage2mGMT.cc index 49ba5d33c7770..9f3729205dcc0 100755 --- a/DQM/L1TMonitor/src/L1TStage2mGMT.cc +++ b/DQM/L1TMonitor/src/L1TStage2mGMT.cc @@ -29,20 +29,27 @@ void L1TStage2mGMT::beginLuminosityBlock(const edm::LuminosityBlock& iLumi, cons void L1TStage2mGMT::bookHistograms(DQMStore::IBooker &ibooker, const edm::Run& iRun, const edm::EventSetup& eveSetup) { ibooker.setCurrentFolder(monitorDir); - // eta ,phi, pt - eta_mgmt = ibooker.book1D("eta_mgmt", "#eta of MGMT", 229, -114.5, 114.5); - phi_mgmt = ibooker.book1D("phi_mgmt", "#phi of MGMT", 144, -0.5, 143.5); - pt_mgmt = ibooker.book1D("pt_mgmt", "p_{T} of MGMT", 300, 0, 300); - bx_mgmt = ibooker.book1D("pt_mgmt", "BX", 2048, -0.5, 2047.5); - etaVSphi_mgmt = ibooker.book2D("etaVSphi_mgmt", "#eta VS #phi of MGMT", 229, -114.5, 114.5, 144, -0.5, 143.5); - phiVSpt_mgmt = ibooker.book2D("phiVSpt_mgmt", "#phi VS p_{T}of MGMT", 144, -0.5, 143.5, 300, 0, 300); - etaVSpt_mgmt = ibooker.book2D("etaVSpt_mgmt", "#eta VS p_{T} of MGMT", 229, -114.5, 114.5,300, 0, 300); - etaVSbx_mgmt = ibooker.book2D("etaVSbx_mgmt", "#eta of MGMT VS bx", 229, -114.5, 114.5, 2048, -0.5, 2047.5); - phiVSbx_mgmt = ibooker.book2D("phiVSbx_mgmt", "#phi of MGMT VS bx", 144, -0.5, 143.5, 2048, -0.5, 2047.5); - ptVSbx_mgmt = ibooker.book2D("ptVSbx_mgmt", "#p_{T} of MGMT VS bx", 300, 0, 300 , 2048, -0.5, 2047.5); - - + eta_mgmt = ibooker.book1D("eta_mgmt", "#eta of mGMT Muon", 462, -230, 232); + phi_mgmt = ibooker.book1D("phi_mgmt", "#phi of mGMT Muon", 580, 0, 580); + pt_mgmt = ibooker.book1D("pt_mgmt", "p_{T} of mGMT Muon", 300, 0, 300); + charge_mgmt = ibooker.book1D("charge_mgmt", "charge of mGMT Muon", 3, -1, 2); + chargeVal_mgmt = ibooker.book1D("chargeValid_mgmt", "chargeValid of mGMT Muon", 2, 0, 2); + qual_mgmt = ibooker.book1D("quality_mgmt", "quality of mGMT Muon", 16, 0, 16); + iso_mgmt = ibooker.book1D("iso_mgmt", "iso of mGMT Muon", 4, 0, 4); + + bx_mgmt = ibooker.book1D("bx", "BX", 15, -7, 8); + + etaVSphi_mgmt = ibooker.book2D("etaVSphi_mgmt" , "#eta VS #phi of mGMT Muon" , 229, -114.5, 114.5, 144, -0.5, 143.5); + phiVSpt_mgmt = ibooker.book2D("phiVSpt_mgmt" , "#phi VS p_{T}of mGMT Muon" , 144, -0.5, 143.5, 300, 0, 300); + etaVSpt_mgmt = ibooker.book2D("etaVSpt_mgmt" , "#eta VS p_{T} of mGMT Muon" , 229, -114.5, 114.5, 300, 0, 300); + etaVSbx_mgmt = ibooker.book2D("etaVSbx_mgmt" , "#eta of mGMT Muon VS bx" , 229, -114.5, 114.5, 15, -7, 8); + phiVSbx_mgmt = ibooker.book2D("phiVSbx_mgmt" , "#phi of mGMT Muon VS bx" , 144, -0.5, 143.5, 15, -7, 8); + ptVSbx_mgmt = ibooker.book2D("ptVSbx_mgmt" , "#p_{T} of mGMT Muon VS bx" , 150, 0, 300, 15, -7, 8); + chargeVSbx_mgmt = ibooker.book2D("chargeVSbx_mgmt" , "charge of mGMT Muon VS bx" , 3 , -1, 2, 15, -7, 8); + chargeValVSbx_mgmt = ibooker.book2D("chargeValidVSbx_mgmt", "chargeValid of mGMT Muon VS bx", 2 , 0, 2, 15, -7, 8); + qualVSbx_mgmt = ibooker.book2D("qualVSbx_mgmt" , "quality of mGMT Muon VS bx" , 16 , 0, 16, 15, -7, 8); + isoVSbx_mgmt = ibooker.book2D("isoVSbx_mgmt" , "iso of mGMT MuonVS bx" , 4 , 0, 4, 15, -7, 8); } @@ -60,21 +67,28 @@ void L1TStage2mGMT::analyze(const edm::Event & eve, const edm::EventSetup & eveS for(int itBX=Muon->getFirstBX(); itBX<=Muon->getLastBX(); ++itBX) { for(l1t::MuonBxCollection::const_iterator itMuon = Muon->begin(itBX); itMuon != Muon->end(itBX); ++itMuon) - // for(l1t::MuonBxCollection::const_iterator itMuon = Muon->begin(); itMuon != Muon->end(); ++itMuon) { - eta_mgmt->Fill(itMuon->hwEta()); phi_mgmt->Fill(itMuon->hwPhi()); pt_mgmt->Fill(itMuon->hwPt()); + charge_mgmt->Fill(itMuon->hwCharge()); + chargeVal_mgmt->Fill(itMuon->hwChargeValid()); + qual_mgmt->Fill(itMuon->hwQual()); + iso_mgmt->Fill(itMuon->hwIso()); bx_mgmt->Fill(itBX); - etaVSphi_mgmt->Fill(itMuon->hwEta(),itMuon->hwPhi()); - phiVSpt_mgmt->Fill(itMuon->hwPhi(),itMuon->hwPt()); - etaVSpt_mgmt->Fill(itMuon->hwEta(),itMuon->hwPt()); - etaVSbx_mgmt->Fill(itMuon->hwEta(),itBX); phiVSbx_mgmt->Fill(itMuon->hwPhi(),itBX); ptVSbx_mgmt->Fill(itMuon->hwPt() ,itBX); + chargeVSbx_mgmt->Fill(itMuon->hwCharge(), itBX); + chargeValVSbx_mgmt->Fill(itMuon->hwChargeValid(), itBX); + qualVSbx_mgmt->Fill(itMuon->hwQual(), itBX); + isoVSbx_mgmt->Fill(itMuon->hwIso(), itBX); + + etaVSphi_mgmt->Fill(itMuon->hwEta(),itMuon->hwPhi()); + phiVSpt_mgmt->Fill(itMuon->hwPhi(),itMuon->hwPt()); + etaVSpt_mgmt->Fill(itMuon->hwEta(),itMuon->hwPt()); + } } @@ -82,5 +96,3 @@ void L1TStage2mGMT::analyze(const edm::Event & eve, const edm::EventSetup & eveS - - diff --git a/DQM/L1TMonitor/src/SealModule.cc b/DQM/L1TMonitor/src/SealModule.cc index 54f826a3d83d3..263bffcff3c35 100644 --- a/DQM/L1TMonitor/src/SealModule.cc +++ b/DQM/L1TMonitor/src/SealModule.cc @@ -33,6 +33,8 @@ DEFINE_FWK_MODULE(L1TStage2mGMT); #include DEFINE_FWK_MODULE(L1TStage2BMTF); +//#include +//DEFINE_FWK_MODULE(L1TStage2OMTF); #include DEFINE_FWK_MODULE(L1TGCT); From 51e620daa1b2618403535c087cbaf142ceb18194 Mon Sep 17 00:00:00 2001 From: Seth Date: Mon, 25 Jan 2016 14:27:13 +0100 Subject: [PATCH 111/250] training_settings.py adapted to new 80X training variables --- RecoBTag/CTagging/python/training_settings.py | 426 +++--------------- 1 file changed, 56 insertions(+), 370 deletions(-) diff --git a/RecoBTag/CTagging/python/training_settings.py b/RecoBTag/CTagging/python/training_settings.py index 47c9ee6fca090..82ba5acc42403 100644 --- a/RecoBTag/CTagging/python/training_settings.py +++ b/RecoBTag/CTagging/python/training_settings.py @@ -3,25 +3,24 @@ ## IMPORTANT! ## This file was automatically generated by RecoBTag/CTagging/test/dump_training_vars_cfg.py ## with input xml files: -## - C vs L: ../data/c_vs_udsg.weight.xml sha1 checksum: fe4aec05d2a9505117e8e2698e054f4391b327c5 -## - C vs B: ../data/c_vs_b.weight.xml sha1 checksum: f5d25490fa700d8489dafe934e72d9830058dd89 +## - C vs L: ../data/c_vs_udsg.weight.xml sha1 checksum: 1b50773894bf3c64e41694bd48bda5f6f0e3795b +## - C vs B: ../data/c_vs_b.weight.xml sha1 checksum: c342f54c6448d488e6e2b483a3a3956e34ad8ea1 c_vs_l_vars_vpset = cms.VPSet(cms.PSet( - default = cms.double(-100), - idx = cms.int32(0), - name = cms.string('trackSip2dSig_0'), - taggingVarName = cms.string('trackSip2dSig') + default = cms.double(-1), + name = cms.string('vertexLeptonCategory'), + taggingVarName = cms.string('vertexLeptonCategory') ), cms.PSet( default = cms.double(-100), - idx = cms.int32(1), - name = cms.string('trackSip2dSig_1'), + idx = cms.int32(0), + name = cms.string('trackSip2dSig_0'), taggingVarName = cms.string('trackSip2dSig') ), cms.PSet( default = cms.double(-100), - idx = cms.int32(2), - name = cms.string('trackSip2dSig_2'), + idx = cms.int32(1), + name = cms.string('trackSip2dSig_1'), taggingVarName = cms.string('trackSip2dSig') ), cms.PSet( @@ -36,48 +35,6 @@ name = cms.string('trackSip3dSig_1'), taggingVarName = cms.string('trackSip3dSig') ), - cms.PSet( - default = cms.double(-100), - idx = cms.int32(2), - name = cms.string('trackSip3dSig_2'), - taggingVarName = cms.string('trackSip3dSig') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(0), - name = cms.string('trackSip2dVal_0'), - taggingVarName = cms.string('trackSip2dVal') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(1), - name = cms.string('trackSip2dVal_1'), - taggingVarName = cms.string('trackSip2dVal') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('trackSip2dVal_2'), - taggingVarName = cms.string('trackSip2dVal') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(0), - name = cms.string('trackSip3dVal_0'), - taggingVarName = cms.string('trackSip3dVal') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(1), - name = cms.string('trackSip3dVal_1'), - taggingVarName = cms.string('trackSip3dVal') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('trackSip3dVal_2'), - taggingVarName = cms.string('trackSip3dVal') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -90,12 +47,6 @@ name = cms.string('trackPtRel_1'), taggingVarName = cms.string('trackPtRel') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('trackPtRel_2'), - taggingVarName = cms.string('trackPtRel') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -108,12 +59,6 @@ name = cms.string('trackPPar_1'), taggingVarName = cms.string('trackPPar') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('trackPPar_2'), - taggingVarName = cms.string('trackPPar') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -126,12 +71,6 @@ name = cms.string('trackEtaRel_1'), taggingVarName = cms.string('trackEtaRel') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('trackEtaRel_2'), - taggingVarName = cms.string('trackEtaRel') - ), cms.PSet( default = cms.double(-0.1), idx = cms.int32(0), @@ -144,12 +83,6 @@ name = cms.string('trackDeltaR_1'), taggingVarName = cms.string('trackDeltaR') ), - cms.PSet( - default = cms.double(-0.1), - idx = cms.int32(2), - name = cms.string('trackDeltaR_2'), - taggingVarName = cms.string('trackDeltaR') - ), cms.PSet( default = cms.double(-0.1), idx = cms.int32(0), @@ -162,12 +95,6 @@ name = cms.string('trackPtRatio_1'), taggingVarName = cms.string('trackPtRatio') ), - cms.PSet( - default = cms.double(-0.1), - idx = cms.int32(2), - name = cms.string('trackPtRatio_2'), - taggingVarName = cms.string('trackPtRatio') - ), cms.PSet( default = cms.double(1.1), idx = cms.int32(0), @@ -180,12 +107,6 @@ name = cms.string('trackPParRatio_1'), taggingVarName = cms.string('trackPParRatio') ), - cms.PSet( - default = cms.double(1.1), - idx = cms.int32(2), - name = cms.string('trackPParRatio_2'), - taggingVarName = cms.string('trackPParRatio') - ), cms.PSet( default = cms.double(-0.1), idx = cms.int32(0), @@ -198,12 +119,6 @@ name = cms.string('trackJetDist_1'), taggingVarName = cms.string('trackJetDist') ), - cms.PSet( - default = cms.double(-0.1), - idx = cms.int32(2), - name = cms.string('trackJetDist_2'), - taggingVarName = cms.string('trackJetDist') - ), cms.PSet( default = cms.double(-0.1), idx = cms.int32(0), @@ -216,11 +131,25 @@ name = cms.string('trackDecayLenVal_1'), taggingVarName = cms.string('trackDecayLenVal') ), + cms.PSet( + default = cms.double(0), + name = cms.string('jetNSecondaryVertices'), + taggingVarName = cms.string('jetNSecondaryVertices') + ), cms.PSet( default = cms.double(-0.1), - idx = cms.int32(2), - name = cms.string('trackDecayLenVal_2'), - taggingVarName = cms.string('trackDecayLenVal') + name = cms.string('jetNTracks'), + taggingVarName = cms.string('jetNTracks') + ), + cms.PSet( + default = cms.double(-0.1), + name = cms.string('trackSumJetEtRatio'), + taggingVarName = cms.string('trackSumJetEtRatio') + ), + cms.PSet( + default = cms.double(-0.1), + name = cms.string('trackSumJetDeltaR'), + taggingVarName = cms.string('trackSumJetDeltaR') ), cms.PSet( default = cms.double(-0.1), @@ -258,23 +187,6 @@ name = cms.string('flightDistance3dSig_0'), taggingVarName = cms.string('flightDistance3dSig') ), - cms.PSet( - default = cms.double(-0.1), - idx = cms.int32(0), - name = cms.string('flightDistance2dVal_0'), - taggingVarName = cms.string('flightDistance2dVal') - ), - cms.PSet( - default = cms.double(-0.1), - idx = cms.int32(0), - name = cms.string('flightDistance3dVal_0'), - taggingVarName = cms.string('flightDistance3dVal') - ), - cms.PSet( - default = cms.double(-0.1), - name = cms.string('trackSumJetEtRatio'), - taggingVarName = cms.string('trackSumJetEtRatio') - ), cms.PSet( default = cms.double(-0.1), idx = cms.int32(0), @@ -282,27 +194,10 @@ taggingVarName = cms.string('vertexJetDeltaR') ), cms.PSet( - default = cms.double(-0.1), - name = cms.string('trackSumJetDeltaR'), - taggingVarName = cms.string('trackSumJetDeltaR') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(0), - name = cms.string('trackSip2dValAboveCharm_0'), - taggingVarName = cms.string('trackSip2dValAboveCharm') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(0), - name = cms.string('trackSip3dValAboveCharm_0'), - taggingVarName = cms.string('trackSip3dValAboveCharm') - ), - cms.PSet( - default = cms.double(-1), + default = cms.double(0), idx = cms.int32(0), - name = cms.string('vertexFitProb_0'), - taggingVarName = cms.string('vertexFitProb') + name = cms.string('vertexNTracks_0'), + taggingVarName = cms.string('vertexNTracks') ), cms.PSet( default = cms.double(-0.1), @@ -328,12 +223,6 @@ name = cms.string('leptonPtRel_1'), taggingVarName = cms.string('leptonPtRel') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('leptonPtRel_2'), - taggingVarName = cms.string('leptonPtRel') - ), cms.PSet( default = cms.double(-10000), idx = cms.int32(0), @@ -346,12 +235,6 @@ name = cms.string('leptonSip3d_1'), taggingVarName = cms.string('leptonSip3d') ), - cms.PSet( - default = cms.double(-10000), - idx = cms.int32(2), - name = cms.string('leptonSip3d_2'), - taggingVarName = cms.string('leptonSip3d') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -364,12 +247,6 @@ name = cms.string('leptonDeltaR_1'), taggingVarName = cms.string('leptonDeltaR') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('leptonDeltaR_2'), - taggingVarName = cms.string('leptonDeltaR') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -382,12 +259,6 @@ name = cms.string('leptonRatioRel_1'), taggingVarName = cms.string('leptonRatioRel') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('leptonRatioRel_2'), - taggingVarName = cms.string('leptonRatioRel') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -400,12 +271,6 @@ name = cms.string('leptonEtaRel_1'), taggingVarName = cms.string('leptonEtaRel') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('leptonEtaRel_2'), - taggingVarName = cms.string('leptonEtaRel') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -417,47 +282,24 @@ idx = cms.int32(1), name = cms.string('leptonRatio_1'), taggingVarName = cms.string('leptonRatio') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('leptonRatio_2'), - taggingVarName = cms.string('leptonRatio') - ), - cms.PSet( - default = cms.double(0), - idx = cms.int32(0), - name = cms.string('vertexNTracks_0'), - taggingVarName = cms.string('vertexNTracks') - ), - cms.PSet( - default = cms.double(0), - name = cms.string('jetNSecondaryVertices'), - taggingVarName = cms.string('jetNSecondaryVertices') - ), - cms.PSet( - default = cms.double(-0.1), - name = cms.string('jetNTracks'), - taggingVarName = cms.string('jetNTracks') )) c_vs_b_vars_vpset = cms.VPSet(cms.PSet( - default = cms.double(-100), - idx = cms.int32(0), - name = cms.string('trackSip2dSig_0'), - taggingVarName = cms.string('trackSip2dSig') + default = cms.double(-1), + name = cms.string('vertexLeptonCategory'), + taggingVarName = cms.string('vertexLeptonCategory') ), cms.PSet( default = cms.double(-100), - idx = cms.int32(1), - name = cms.string('trackSip2dSig_1'), + idx = cms.int32(0), + name = cms.string('trackSip2dSig_0'), taggingVarName = cms.string('trackSip2dSig') ), cms.PSet( default = cms.double(-100), - idx = cms.int32(2), - name = cms.string('trackSip2dSig_2'), + idx = cms.int32(1), + name = cms.string('trackSip2dSig_1'), taggingVarName = cms.string('trackSip2dSig') ), cms.PSet( @@ -472,48 +314,6 @@ name = cms.string('trackSip3dSig_1'), taggingVarName = cms.string('trackSip3dSig') ), - cms.PSet( - default = cms.double(-100), - idx = cms.int32(2), - name = cms.string('trackSip3dSig_2'), - taggingVarName = cms.string('trackSip3dSig') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(0), - name = cms.string('trackSip2dVal_0'), - taggingVarName = cms.string('trackSip2dVal') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(1), - name = cms.string('trackSip2dVal_1'), - taggingVarName = cms.string('trackSip2dVal') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('trackSip2dVal_2'), - taggingVarName = cms.string('trackSip2dVal') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(0), - name = cms.string('trackSip3dVal_0'), - taggingVarName = cms.string('trackSip3dVal') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(1), - name = cms.string('trackSip3dVal_1'), - taggingVarName = cms.string('trackSip3dVal') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('trackSip3dVal_2'), - taggingVarName = cms.string('trackSip3dVal') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -526,12 +326,6 @@ name = cms.string('trackPtRel_1'), taggingVarName = cms.string('trackPtRel') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('trackPtRel_2'), - taggingVarName = cms.string('trackPtRel') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -544,12 +338,6 @@ name = cms.string('trackPPar_1'), taggingVarName = cms.string('trackPPar') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('trackPPar_2'), - taggingVarName = cms.string('trackPPar') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -562,12 +350,6 @@ name = cms.string('trackEtaRel_1'), taggingVarName = cms.string('trackEtaRel') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('trackEtaRel_2'), - taggingVarName = cms.string('trackEtaRel') - ), cms.PSet( default = cms.double(-0.1), idx = cms.int32(0), @@ -580,12 +362,6 @@ name = cms.string('trackDeltaR_1'), taggingVarName = cms.string('trackDeltaR') ), - cms.PSet( - default = cms.double(-0.1), - idx = cms.int32(2), - name = cms.string('trackDeltaR_2'), - taggingVarName = cms.string('trackDeltaR') - ), cms.PSet( default = cms.double(-0.1), idx = cms.int32(0), @@ -598,12 +374,6 @@ name = cms.string('trackPtRatio_1'), taggingVarName = cms.string('trackPtRatio') ), - cms.PSet( - default = cms.double(-0.1), - idx = cms.int32(2), - name = cms.string('trackPtRatio_2'), - taggingVarName = cms.string('trackPtRatio') - ), cms.PSet( default = cms.double(1.1), idx = cms.int32(0), @@ -616,12 +386,6 @@ name = cms.string('trackPParRatio_1'), taggingVarName = cms.string('trackPParRatio') ), - cms.PSet( - default = cms.double(1.1), - idx = cms.int32(2), - name = cms.string('trackPParRatio_2'), - taggingVarName = cms.string('trackPParRatio') - ), cms.PSet( default = cms.double(-0.1), idx = cms.int32(0), @@ -634,12 +398,6 @@ name = cms.string('trackJetDist_1'), taggingVarName = cms.string('trackJetDist') ), - cms.PSet( - default = cms.double(-0.1), - idx = cms.int32(2), - name = cms.string('trackJetDist_2'), - taggingVarName = cms.string('trackJetDist') - ), cms.PSet( default = cms.double(-0.1), idx = cms.int32(0), @@ -652,11 +410,25 @@ name = cms.string('trackDecayLenVal_1'), taggingVarName = cms.string('trackDecayLenVal') ), + cms.PSet( + default = cms.double(0), + name = cms.string('jetNSecondaryVertices'), + taggingVarName = cms.string('jetNSecondaryVertices') + ), cms.PSet( default = cms.double(-0.1), - idx = cms.int32(2), - name = cms.string('trackDecayLenVal_2'), - taggingVarName = cms.string('trackDecayLenVal') + name = cms.string('jetNTracks'), + taggingVarName = cms.string('jetNTracks') + ), + cms.PSet( + default = cms.double(-0.1), + name = cms.string('trackSumJetEtRatio'), + taggingVarName = cms.string('trackSumJetEtRatio') + ), + cms.PSet( + default = cms.double(-0.1), + name = cms.string('trackSumJetDeltaR'), + taggingVarName = cms.string('trackSumJetDeltaR') ), cms.PSet( default = cms.double(-0.1), @@ -694,23 +466,6 @@ name = cms.string('flightDistance3dSig_0'), taggingVarName = cms.string('flightDistance3dSig') ), - cms.PSet( - default = cms.double(-0.1), - idx = cms.int32(0), - name = cms.string('flightDistance2dVal_0'), - taggingVarName = cms.string('flightDistance2dVal') - ), - cms.PSet( - default = cms.double(-0.1), - idx = cms.int32(0), - name = cms.string('flightDistance3dVal_0'), - taggingVarName = cms.string('flightDistance3dVal') - ), - cms.PSet( - default = cms.double(-0.1), - name = cms.string('trackSumJetEtRatio'), - taggingVarName = cms.string('trackSumJetEtRatio') - ), cms.PSet( default = cms.double(-0.1), idx = cms.int32(0), @@ -718,27 +473,10 @@ taggingVarName = cms.string('vertexJetDeltaR') ), cms.PSet( - default = cms.double(-0.1), - name = cms.string('trackSumJetDeltaR'), - taggingVarName = cms.string('trackSumJetDeltaR') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(0), - name = cms.string('trackSip2dValAboveCharm_0'), - taggingVarName = cms.string('trackSip2dValAboveCharm') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(0), - name = cms.string('trackSip3dValAboveCharm_0'), - taggingVarName = cms.string('trackSip3dValAboveCharm') - ), - cms.PSet( - default = cms.double(-1), + default = cms.double(0), idx = cms.int32(0), - name = cms.string('vertexFitProb_0'), - taggingVarName = cms.string('vertexFitProb') + name = cms.string('vertexNTracks_0'), + taggingVarName = cms.string('vertexNTracks') ), cms.PSet( default = cms.double(-0.1), @@ -764,12 +502,6 @@ name = cms.string('leptonPtRel_1'), taggingVarName = cms.string('leptonPtRel') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('leptonPtRel_2'), - taggingVarName = cms.string('leptonPtRel') - ), cms.PSet( default = cms.double(-10000), idx = cms.int32(0), @@ -782,12 +514,6 @@ name = cms.string('leptonSip3d_1'), taggingVarName = cms.string('leptonSip3d') ), - cms.PSet( - default = cms.double(-10000), - idx = cms.int32(2), - name = cms.string('leptonSip3d_2'), - taggingVarName = cms.string('leptonSip3d') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -800,12 +526,6 @@ name = cms.string('leptonDeltaR_1'), taggingVarName = cms.string('leptonDeltaR') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('leptonDeltaR_2'), - taggingVarName = cms.string('leptonDeltaR') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -818,12 +538,6 @@ name = cms.string('leptonRatioRel_1'), taggingVarName = cms.string('leptonRatioRel') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('leptonRatioRel_2'), - taggingVarName = cms.string('leptonRatioRel') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -836,12 +550,6 @@ name = cms.string('leptonEtaRel_1'), taggingVarName = cms.string('leptonEtaRel') ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('leptonEtaRel_2'), - taggingVarName = cms.string('leptonEtaRel') - ), cms.PSet( default = cms.double(-1), idx = cms.int32(0), @@ -853,26 +561,4 @@ idx = cms.int32(1), name = cms.string('leptonRatio_1'), taggingVarName = cms.string('leptonRatio') - ), - cms.PSet( - default = cms.double(-1), - idx = cms.int32(2), - name = cms.string('leptonRatio_2'), - taggingVarName = cms.string('leptonRatio') - ), - cms.PSet( - default = cms.double(0), - idx = cms.int32(0), - name = cms.string('vertexNTracks_0'), - taggingVarName = cms.string('vertexNTracks') - ), - cms.PSet( - default = cms.double(0), - name = cms.string('jetNSecondaryVertices'), - taggingVarName = cms.string('jetNSecondaryVertices') - ), - cms.PSet( - default = cms.double(-0.1), - name = cms.string('jetNTracks'), - taggingVarName = cms.string('jetNTracks') )) From e4ada5fbb23244b6b174bc59e419cd70776eaf5a Mon Sep 17 00:00:00 2001 From: esmaeel Date: Mon, 25 Jan 2016 16:24:33 +0100 Subject: [PATCH 112/250] mGMT_dqm_v4_buildfileFix --- DQM/L1TMonitor/BuildFile.xml | 4 ++-- DQM/L1TMonitor/interface/L1TStage2mGMT.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DQM/L1TMonitor/BuildFile.xml b/DQM/L1TMonitor/BuildFile.xml index 81a76e486fb66..1214a58973453 100644 --- a/DQM/L1TMonitor/BuildFile.xml +++ b/DQM/L1TMonitor/BuildFile.xml @@ -35,7 +35,7 @@ - + - + diff --git a/DQM/L1TMonitor/interface/L1TStage2mGMT.h b/DQM/L1TMonitor/interface/L1TStage2mGMT.h index b58b8a31a33ea..11e22fa3c45c0 100755 --- a/DQM/L1TMonitor/interface/L1TStage2mGMT.h +++ b/DQM/L1TMonitor/interface/L1TStage2mGMT.h @@ -26,12 +26,13 @@ #include "DataFormats/Common/interface/Handle.h" #include "FWCore/Framework/interface/ESHandle.h" #include "DataFormats/Common/interface/OrphanHandle.h" +#include "DataFormats/L1TMuon/interface/MuonCaloSum.h" // stage2 requirements #include "DataFormats/L1Trigger/interface/BXVector.h" #include "DataFormats/L1Trigger/interface/Muon.h" #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h" -//#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" +#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" // dqm requirements #include "DQMServices/Core/interface/DQMStore.h" From 0d6fd13c517c6fc0a30d603c44a1315354983e21 Mon Sep 17 00:00:00 2001 From: esmaeel Date: Mon, 25 Jan 2016 16:27:36 +0100 Subject: [PATCH 113/250] mGMT_dqm_v4_mgmtHheaderFix --- DQM/L1TMonitor/interface/L1TStage2mGMT.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DQM/L1TMonitor/interface/L1TStage2mGMT.h b/DQM/L1TMonitor/interface/L1TStage2mGMT.h index 11e22fa3c45c0..836000c7fc1f0 100755 --- a/DQM/L1TMonitor/interface/L1TStage2mGMT.h +++ b/DQM/L1TMonitor/interface/L1TStage2mGMT.h @@ -26,13 +26,13 @@ #include "DataFormats/Common/interface/Handle.h" #include "FWCore/Framework/interface/ESHandle.h" #include "DataFormats/Common/interface/OrphanHandle.h" -#include "DataFormats/L1TMuon/interface/MuonCaloSum.h" +//#include "DataFormats/L1TMuon/interface/MuonCaloSum.h" // stage2 requirements #include "DataFormats/L1Trigger/interface/BXVector.h" #include "DataFormats/L1Trigger/interface/Muon.h" #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h" -#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" +//#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" // dqm requirements #include "DQMServices/Core/interface/DQMStore.h" From 2ff569806747caaf2b6cd73886f968330442cf9e Mon Sep 17 00:00:00 2001 From: esmaeel Date: Mon, 25 Jan 2016 18:42:17 +0100 Subject: [PATCH 114/250] some_cosmetics --- ...t2016_dqm_sourceclient-live_cfg-esmaeel.py | 213 ------------------ .../python/config/environment_cfi.py | 2 +- .../python/config/fileinputsource_cfi.py | 4 +- .../python/L1TStage2_cff-esmaeel.py | 12 - 4 files changed, 2 insertions(+), 229 deletions(-) delete mode 100644 DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py delete mode 100644 DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py diff --git a/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py b/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py deleted file mode 100644 index 480151f8648d7..0000000000000 --- a/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg-esmaeel.py +++ /dev/null @@ -1,213 +0,0 @@ -# L1 Trigger DQM sequence (L1T) -# -# authors previous versions - see CVS -# -# V.M. Ghete 2011-05-25 revised version of L1 Trigger DQM - - -import FWCore.ParameterSet.Config as cms - -process = cms.Process("DQM") - - -#---------------------------- -# Event Source -# -# for live online DQM in P5 -#process.load("DQM.Integration.config.inputsource_cfi") -# -# for testing in lxplus -process.load("DQM.Integration.config.fileinputsource_cfi") - -#---------------------------- -# DQM Environment - -process.load("DQM.Integration.config.environment_cfi") -process.dqmEnv.subSystemFolder = 'L1T2016' -#process.dqmSaver.tag = 'L1T2016' -# -# -# references needed -#process.DQMStore.referenceFileName = "/dqmdata/dqm/reference/l1t_reference.root" - -# Condition for P5 cluster -#process.load("DQM.Integration.config.FrontierCondition_GT_cfi") -#es_prefer_GlobalTag = cms.ESPrefer('GlobalTag') -#process.GlobalTag.RefreshEachRun = cms.untracked.bool(True) -# Condition for lxplus -#process.load("DQM.Integration.config.FrontierCondition_GT_Offline_cfi") - -process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff') -from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag -process.GlobalTag.globaltag = cms.string('74X_dataRun2_HLT_v1') - -#process.load("Configuration.StandardSequences.GeometryRecoDB_cff") -process.load("Configuration.StandardSequences.GeometryRecoDB_cff") - -#------------------------------------- -# sequences needed for L1 trigger DQM -# - -# standard unpacking sequence -#process.load("Configuration.StandardSequences.RawToDigi_Data_cff") - -# L1 Trigger sequences - -# l1tMonitor and l1tMonitorEndPathSeq - -#///////////// -process.load("DQM.L1TMonitor.L1TStage2_cff-esmaeel") -#process.load("DQM.L1TMonitor.L1T2016_cff") -#///////////// - -#process.load("DQM.L1TMonitor.L1TMonitor_cff") -# L1 trigger synchronization module - it uses also HltHighLevel filter - - -#------------------------------------- -# paths & schedule for L1 Trigger DQM -# - -# TODO define a L1 trigger L1TriggerRawToDigi in the standard sequence -# to avoid all these remove -#process.rawToDigiPath = cms.Path(process.RawToDigi) -# -#process.RawToDigi.remove("siPixelDigis") -#process.RawToDigi.remove("siStripDigis") -#process.RawToDigi.remove("scalersRawToDigi") -#process.RawToDigi.remove("castorDigis") -#process.L1TMuonEmulation.remove("emptyCaloCollsProducer") -#process.emptyCaloCollsProducer.InputLabel = cms.InputTag("rawDataCollector") - -# for GCT, unpack all five samples -#process.gctDigis.numberOfGctSamplesToUnpack = cms.uint32(5) - -#if ( process.runType.getRunType() == process.runType.pp_run_stage1 or process.runType.getRunType() == process.runType.cosmic_run_stage1): -#process.gtDigis.DaqGtFedId = cms.untracked.int32(809) -#else: -#process.gtDigis.DaqGtFedId = cms.untracked.int32(813) - -#/////////////// -process.l1tMonitorPath = cms.Path(process.l1tStage2online) -#process.l1tMonitorPath = cms.Path(process.l1t2016Online) -#////////////// -# separate L1TSync path due to the use of the HltHighLevel filter - - -# - - -# -#process.l1tMonitorEndPath = cms.EndPath(process.l1tMonitorEndPathSeq) - -# - - -# -process.dqmEndPath = cms.EndPath( - process.dqmEnv * - process.dqmSaver - ) - -# -process.schedule = cms.Schedule(#process.rawToDigiPath, - process.l1tMonitorPath, - #process.l1tMonitorEndPath, - process.dqmEndPath - ) - -#--------------------------------------------- - -# examples for quick fixes in case of troubles -# please do not modify the commented lines -# - - -# -# turn on verbosity in L1TEventInfoClient -# -# process.l1tEventInfoClient.verbose = cms.untracked.bool(True) - - -# remove module(s) or system sequence from l1tMonitorPath -# quality test disabled also -# -#process.l1tMonitorOnline.remove(process.bxTiming) - -#process.l1tMonitorOnline.remove(process.bxTiming) -#process.l1tMonitorOnline.remove(process.l1tBPTX) - -#process.l1tMonitorOnline.remove(process.l1tLtc) - -#process.l1tMonitorOnline.remove(process.l1Dttf) - -#process.l1tMonitorOnline.remove(process.l1tCsctf) - -#process.l1tMonitorOnline.remove(process.l1tRpctf) - -#process.l1tMonitorOnline.remove(process.l1tGmt) - -#process.l1tMonitorOnline.remove(process.l1tGt) - -#process.l1tMonitorOnline.remove(process.l1ExtraDqmSeq) - -#process.l1tMonitorOnline.remove(process.l1tRate) - -#process.l1tMonitorOnline.remove(process.l1tRctRun1) - -#process.l1tMonitorOnline.remove(process.l1tGctSeq) - - -# remove module(s) or system sequence from l1tMonitorEndPath -# -#process.l1tMonitorEndPathSeq.remove(process.l1s) -#process.l1tMonitorEndPathSeq.remove(process.l1tscalers) - -# -#process.schedule.remove(process.l1tSyncPath) - -#-------------------------------------------------- -# Heavy Ion Specific Fed Raw Data Collection Label -#-------------------------------------------------- - -print "Running with run type = ", process.runType.getRunType() -#process.castorDigis.InputLabel = cms.InputTag("rawDataCollector") -#process.csctfDigis.producer = cms.InputTag("rawDataCollector") -#process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataCollector") -#process.ecalDigis.InputLabel = cms.InputTag("rawDataCollector") -#process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataCollector") -#process.gctDigis.inputLabel = cms.InputTag("rawDataCollector") -#process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataCollector") -#process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataCollector") -#process.hcalDigis.InputLabel = cms.InputTag("rawDataCollector") -#process.muonCSCDigis.InputObjects = cms.InputTag("rawDataCollector") -#process.muonDTDigis.inputLabel = cms.InputTag("rawDataCollector") -#process.muonRPCDigis.InputLabel = cms.InputTag("rawDataCollector") -#process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataCollector") -#process.siPixelDigis.InputLabel = cms.InputTag("rawDataCollector") -#process.siStripDigis.ProductLabel = cms.InputTag("rawDataCollector") -#process.bxTiming.FedSource = cms.untracked.InputTag("rawDataCollector") -#process.l1s.fedRawData = cms.InputTag("rawDataCollector") - -if (process.runType.getRunType() == process.runType.hi_run): - process.castorDigis.InputLabel = cms.InputTag("rawDataRepacker") - process.csctfDigis.producer = cms.InputTag("rawDataRepacker") - process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataRepacker") - process.ecalDigis.InputLabel = cms.InputTag("rawDataRepacker") - process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataRepacker") - process.gctDigis.inputLabel = cms.InputTag("rawDataRepacker") - process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataRepacker") - process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataRepacker") - process.hcalDigis.InputLabel = cms.InputTag("rawDataRepacker") - process.muonCSCDigis.InputObjects = cms.InputTag("rawDataRepacker") - process.muonDTDigis.inputLabel = cms.InputTag("rawDataRepacker") - process.muonRPCDigis.InputLabel = cms.InputTag("rawDataRepacker") - process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataRepacker") - process.siPixelDigis.InputLabel = cms.InputTag("rawDataRepacker") - process.siStripDigis.ProductLabel = cms.InputTag("rawDataRepacker") - process.bxTiming.FedSource = cms.untracked.InputTag("rawDataRepacker") - process.l1s.fedRawData = cms.InputTag("rawDataRepacker") -# process.gmtStage2Digis.inputLabel = cms.InputTag("rawDataRepacker") -### process customizations included here -from DQM.Integration.config.online_customizations_cfi import * -process = customise(process) diff --git a/DQM/Integration/python/config/environment_cfi.py b/DQM/Integration/python/config/environment_cfi.py index 0fb5864d5278e..0657ce1dba0e5 100644 --- a/DQM/Integration/python/config/environment_cfi.py +++ b/DQM/Integration/python/config/environment_cfi.py @@ -22,7 +22,7 @@ def loadDQMRunConfigFromFile(): 'userarea': cms.PSet( type = cms.untracked.string("userarea"), collectorPort = cms.untracked.int32(9190), - collectorHost = cms.untracked.string('dqm-c2d07-29.cms'), + collectorHost = cms.untracked.string('dqm-c2d07-29.cms'),#lxplus0059.cern.ch'), ), 'playback': cms.PSet( type = cms.untracked.string("playback"), diff --git a/DQM/Integration/python/config/fileinputsource_cfi.py b/DQM/Integration/python/config/fileinputsource_cfi.py index 2b81ecd7e3905..2548d9d4146cc 100644 --- a/DQM/Integration/python/config/fileinputsource_cfi.py +++ b/DQM/Integration/python/config/fileinputsource_cfi.py @@ -2,9 +2,7 @@ source = cms.Source("PoolSource", fileNames = cms.untracked.vstring( -# "file:/afs/cern.ch/user/e/esmaeel/CMSSW_8_0_0_pre4/src/DQM/Integration/python/config/L1T_EDM.root", - "file:/afs/cern.ch/user/e/esmaeel/CMSSW_8_0_0_pre4/src/DQM/Integration/python/config/l1tMuon_263400.root", -# "file:/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/DQMTest/MinimumBias__RAW__v1__165633__1CC420EE-B686-E011-A788-0030487CD6E8.root", + "file:/afs/cern.ch/cms/CAF/CMSCOMM/COMM_DQM/DQMTest/MinimumBias__RAW__v1__165633__1CC420EE-B686-E011-A788-0030487CD6E8.root", # "/store/data/Commissioning2014/Cosmics/RAW//v3/000/224/380/00000/E05943D1-1227-E411-BB8E-02163E00F0C4.root" # "/store/data/Commissioning2014/Cosmics/RAW/v3/000/224/380/00000/68FDADE5-1227-E411-8AA6-02163E00A10C.root" ) diff --git a/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py b/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py deleted file mode 100644 index f96a1134f9964..0000000000000 --- a/DQM/L1TMonitor/python/L1TStage2_cff-esmaeel.py +++ /dev/null @@ -1,12 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -from DQM.L1TMonitor.L1TStage2mGMT_cfi import * - -from EventFilter.L1TRawToDigi.gmtStage2Digis_cfi import * - -l1tStage2online = cms.Sequence( -# l1tStage2OMTF, -# l1tStage2BMTF, - l1tStage2mGMT - - ) From 8eac4063a16e0d69cd13493513e3f6c42e573f76 Mon Sep 17 00:00:00 2001 From: esmaeel Date: Mon, 25 Jan 2016 18:45:22 +0100 Subject: [PATCH 115/250] some_cosmetics2 --- .../l1t2016_dqm_sourceclient-live_cfg.py | 213 ++++++++++++++++++ DQM/L1TMonitor/python/L1TStage2_cff.py | 12 + 2 files changed, 225 insertions(+) create mode 100644 DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg.py create mode 100644 DQM/L1TMonitor/python/L1TStage2_cff.py diff --git a/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg.py new file mode 100644 index 0000000000000..d56f06601af0b --- /dev/null +++ b/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg.py @@ -0,0 +1,213 @@ +# L1 Trigger DQM sequence (L1T) +# +# authors previous versions - see CVS +# +# V.M. Ghete 2011-05-25 revised version of L1 Trigger DQM + + +import FWCore.ParameterSet.Config as cms + +process = cms.Process("DQM") + + +#---------------------------- +# Event Source +# +# for live online DQM in P5 +#process.load("DQM.Integration.config.inputsource_cfi") +# +# for testing in lxplus +process.load("DQM.Integration.config.fileinputsource_cfi") + +#---------------------------- +# DQM Environment + +process.load("DQM.Integration.config.environment_cfi") +process.dqmEnv.subSystemFolder = 'L1T2016' +#process.dqmSaver.tag = 'L1T2016' +# +# +# references needed +#process.DQMStore.referenceFileName = "/dqmdata/dqm/reference/l1t_reference.root" + +# Condition for P5 cluster +#process.load("DQM.Integration.config.FrontierCondition_GT_cfi") +#es_prefer_GlobalTag = cms.ESPrefer('GlobalTag') +#process.GlobalTag.RefreshEachRun = cms.untracked.bool(True) +# Condition for lxplus +#process.load("DQM.Integration.config.FrontierCondition_GT_Offline_cfi") + +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff') +from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag +process.GlobalTag.globaltag = cms.string('74X_dataRun2_HLT_v1') + +#process.load("Configuration.StandardSequences.GeometryRecoDB_cff") +process.load("Configuration.StandardSequences.GeometryRecoDB_cff") + +#------------------------------------- +# sequences needed for L1 trigger DQM +# + +# standard unpacking sequence +#process.load("Configuration.StandardSequences.RawToDigi_Data_cff") + +# L1 Trigger sequences + +# l1tMonitor and l1tMonitorEndPathSeq + +#///////////// +process.load("DQM.L1TMonitor.L1TStage2_cff") +#process.load("DQM.L1TMonitor.L1T2016_cff") +#///////////// + +#process.load("DQM.L1TMonitor.L1TMonitor_cff") +# L1 trigger synchronization module - it uses also HltHighLevel filter + + +#------------------------------------- +# paths & schedule for L1 Trigger DQM +# + +# TODO define a L1 trigger L1TriggerRawToDigi in the standard sequence +# to avoid all these remove +#process.rawToDigiPath = cms.Path(process.RawToDigi) +# +#process.RawToDigi.remove("siPixelDigis") +#process.RawToDigi.remove("siStripDigis") +#process.RawToDigi.remove("scalersRawToDigi") +#process.RawToDigi.remove("castorDigis") +#process.L1TMuonEmulation.remove("emptyCaloCollsProducer") +#process.emptyCaloCollsProducer.InputLabel = cms.InputTag("rawDataCollector") + +# for GCT, unpack all five samples +#process.gctDigis.numberOfGctSamplesToUnpack = cms.uint32(5) + +#if ( process.runType.getRunType() == process.runType.pp_run_stage1 or process.runType.getRunType() == process.runType.cosmic_run_stage1): +#process.gtDigis.DaqGtFedId = cms.untracked.int32(809) +#else: +#process.gtDigis.DaqGtFedId = cms.untracked.int32(813) + +#/////////////// +process.l1tMonitorPath = cms.Path(process.l1tStage2online) +#process.l1tMonitorPath = cms.Path(process.l1t2016Online) +#////////////// +# separate L1TSync path due to the use of the HltHighLevel filter + + +# + + +# +#process.l1tMonitorEndPath = cms.EndPath(process.l1tMonitorEndPathSeq) + +# + + +# +process.dqmEndPath = cms.EndPath( + process.dqmEnv * + process.dqmSaver + ) + +# +process.schedule = cms.Schedule(#process.rawToDigiPath, + process.l1tMonitorPath, + #process.l1tMonitorEndPath, + process.dqmEndPath + ) + +#--------------------------------------------- + +# examples for quick fixes in case of troubles +# please do not modify the commented lines +# + + +# +# turn on verbosity in L1TEventInfoClient +# +# process.l1tEventInfoClient.verbose = cms.untracked.bool(True) + + +# remove module(s) or system sequence from l1tMonitorPath +# quality test disabled also +# +#process.l1tMonitorOnline.remove(process.bxTiming) + +#process.l1tMonitorOnline.remove(process.bxTiming) +#process.l1tMonitorOnline.remove(process.l1tBPTX) + +#process.l1tMonitorOnline.remove(process.l1tLtc) + +#process.l1tMonitorOnline.remove(process.l1Dttf) + +#process.l1tMonitorOnline.remove(process.l1tCsctf) + +#process.l1tMonitorOnline.remove(process.l1tRpctf) + +#process.l1tMonitorOnline.remove(process.l1tGmt) + +#process.l1tMonitorOnline.remove(process.l1tGt) + +#process.l1tMonitorOnline.remove(process.l1ExtraDqmSeq) + +#process.l1tMonitorOnline.remove(process.l1tRate) + +#process.l1tMonitorOnline.remove(process.l1tRctRun1) + +#process.l1tMonitorOnline.remove(process.l1tGctSeq) + + +# remove module(s) or system sequence from l1tMonitorEndPath +# +#process.l1tMonitorEndPathSeq.remove(process.l1s) +#process.l1tMonitorEndPathSeq.remove(process.l1tscalers) + +# +#process.schedule.remove(process.l1tSyncPath) + +#-------------------------------------------------- +# Heavy Ion Specific Fed Raw Data Collection Label +#-------------------------------------------------- + +print "Running with run type = ", process.runType.getRunType() +#process.castorDigis.InputLabel = cms.InputTag("rawDataCollector") +#process.csctfDigis.producer = cms.InputTag("rawDataCollector") +#process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataCollector") +#process.ecalDigis.InputLabel = cms.InputTag("rawDataCollector") +#process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataCollector") +#process.gctDigis.inputLabel = cms.InputTag("rawDataCollector") +#process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataCollector") +#process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataCollector") +#process.hcalDigis.InputLabel = cms.InputTag("rawDataCollector") +#process.muonCSCDigis.InputObjects = cms.InputTag("rawDataCollector") +#process.muonDTDigis.inputLabel = cms.InputTag("rawDataCollector") +#process.muonRPCDigis.InputLabel = cms.InputTag("rawDataCollector") +#process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataCollector") +#process.siPixelDigis.InputLabel = cms.InputTag("rawDataCollector") +#process.siStripDigis.ProductLabel = cms.InputTag("rawDataCollector") +#process.bxTiming.FedSource = cms.untracked.InputTag("rawDataCollector") +#process.l1s.fedRawData = cms.InputTag("rawDataCollector") + +if (process.runType.getRunType() == process.runType.hi_run): + process.castorDigis.InputLabel = cms.InputTag("rawDataRepacker") + process.csctfDigis.producer = cms.InputTag("rawDataRepacker") + process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataRepacker") + process.ecalDigis.InputLabel = cms.InputTag("rawDataRepacker") + process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataRepacker") + process.gctDigis.inputLabel = cms.InputTag("rawDataRepacker") + process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataRepacker") + process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataRepacker") + process.hcalDigis.InputLabel = cms.InputTag("rawDataRepacker") + process.muonCSCDigis.InputObjects = cms.InputTag("rawDataRepacker") + process.muonDTDigis.inputLabel = cms.InputTag("rawDataRepacker") + process.muonRPCDigis.InputLabel = cms.InputTag("rawDataRepacker") + process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataRepacker") + process.siPixelDigis.InputLabel = cms.InputTag("rawDataRepacker") + process.siStripDigis.ProductLabel = cms.InputTag("rawDataRepacker") + process.bxTiming.FedSource = cms.untracked.InputTag("rawDataRepacker") + process.l1s.fedRawData = cms.InputTag("rawDataRepacker") +# process.gmtStage2Digis.inputLabel = cms.InputTag("rawDataRepacker") +### process customizations included here +from DQM.Integration.config.online_customizations_cfi import * +process = customise(process) diff --git a/DQM/L1TMonitor/python/L1TStage2_cff.py b/DQM/L1TMonitor/python/L1TStage2_cff.py new file mode 100644 index 0000000000000..f96a1134f9964 --- /dev/null +++ b/DQM/L1TMonitor/python/L1TStage2_cff.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +from DQM.L1TMonitor.L1TStage2mGMT_cfi import * + +from EventFilter.L1TRawToDigi.gmtStage2Digis_cfi import * + +l1tStage2online = cms.Sequence( +# l1tStage2OMTF, +# l1tStage2BMTF, + l1tStage2mGMT + + ) From f3bd5c049dadfbbe62488eea6ba6ab89dd248195 Mon Sep 17 00:00:00 2001 From: isobelojalvo Date: Mon, 25 Jan 2016 18:53:12 +0100 Subject: [PATCH 116/250] Removing old without lifetime discriminators which cause the matrix test to fail --- .../RecoTau/python/RecoTauValidation_cfi.py | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Validation/RecoTau/python/RecoTauValidation_cfi.py b/Validation/RecoTau/python/RecoTauValidation_cfi.py index 808029ce3f80d..7e2380ccadba2 100644 --- a/Validation/RecoTau/python/RecoTauValidation_cfi.py +++ b/Validation/RecoTau/python/RecoTauValidation_cfi.py @@ -140,24 +140,24 @@ cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3oldDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), - cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), +# cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVVTightIsolationMVA3newDMwoLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByVLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByLooseIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), cms.PSet( discriminator = cms.string("hpsPFTauDiscriminationByMediumIsolationMVA3newDMwLT"),selectionCut = cms.double(0.5),plotStep = cms.bool(True)), From d969e7924e15fb3c296e73d14086363861fba6d5 Mon Sep 17 00:00:00 2001 From: Michael Mulhearn Date: Tue, 5 Jan 2016 15:09:47 +0100 Subject: [PATCH 117/250] CondFormats for 2016 L1TMuon emulation --- CondCore/L1TPlugins/src/plugin.cc | 4 + .../interface/L1TMuonBarrelParamsRcd.h | 15 ++ .../interface/L1TMuonGlobalParamsRcd.h | 25 ++ .../interface/L1TMuonOverlapParamsRcd.h | 25 ++ .../DataRecord/src/L1TMuonBarrelParamsRcd.cc | 12 + .../DataRecord/src/L1TMuonGlobalParamsRcd.cc | 15 ++ .../DataRecord/src/L1TMuonOverlapParamsRcd.cc | 15 ++ .../interface/L1TMuonBarrelParams.h | 149 ++++++++++++ .../interface/L1TMuonGlobalParams.h | 165 +++++++++++++ .../interface/L1TMuonOverlapParams.h | 217 ++++++++++++++++++ .../L1TObjects/src/L1TMuonBarrelParams.cc | 31 +++ .../L1TObjects/src/L1TMuonGlobalParams.cc | 30 +++ .../L1TObjects/src/L1TMuonOverlapParams.cc | 2 + .../src/T_EventSetup_L1TGMTParams.cc | 4 + .../src/T_EventSetup_L1TMTFOverlapParams.cc | 4 + .../src/T_EventSetup_L1TMuonBarrelParams.cc | 4 + CondFormats/L1TObjects/src/classes.h | 15 ++ CondFormats/L1TObjects/src/classes_def.xml | 31 +++ .../test/testSerializationL1TObjects.cpp | 2 + 19 files changed, 765 insertions(+) create mode 100644 CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h create mode 100644 CondFormats/DataRecord/interface/L1TMuonGlobalParamsRcd.h create mode 100644 CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h create mode 100644 CondFormats/DataRecord/src/L1TMuonBarrelParamsRcd.cc create mode 100644 CondFormats/DataRecord/src/L1TMuonGlobalParamsRcd.cc create mode 100644 CondFormats/DataRecord/src/L1TMuonOverlapParamsRcd.cc create mode 100644 CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h create mode 100644 CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h create mode 100644 CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h create mode 100644 CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc create mode 100644 CondFormats/L1TObjects/src/L1TMuonGlobalParams.cc create mode 100644 CondFormats/L1TObjects/src/L1TMuonOverlapParams.cc create mode 100644 CondFormats/L1TObjects/src/T_EventSetup_L1TGMTParams.cc create mode 100644 CondFormats/L1TObjects/src/T_EventSetup_L1TMTFOverlapParams.cc create mode 100644 CondFormats/L1TObjects/src/T_EventSetup_L1TMuonBarrelParams.cc diff --git a/CondCore/L1TPlugins/src/plugin.cc b/CondCore/L1TPlugins/src/plugin.cc index 64eebb17bb5eb..6dc25d58b92ca 100644 --- a/CondCore/L1TPlugins/src/plugin.cc +++ b/CondCore/L1TPlugins/src/plugin.cc @@ -207,3 +207,7 @@ REGISTER_PLUGIN(L1CaloGeometryRecord, L1CaloGeometry); using namespace l1t; REGISTER_PLUGIN(L1TCaloParamsRcd, CaloParams); REGISTER_PLUGIN(L1TCaloConfigRcd, CaloConfig); + +#include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h" +#include "CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h" +REGISTER_PLUGIN(L1TMuonOverlapParamsRcd, L1TMuonOverlapParams); diff --git a/CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h b/CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h new file mode 100644 index 0000000000000..d8473a77683ff --- /dev/null +++ b/CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h @@ -0,0 +1,15 @@ +#ifndef L1TBMTFParamsRcd_L1TBMTFParamsRcd_h +#define L1TBMTFParamsRcd_L1TBMTFParamsRcd_h +// -*- C++ -*- +// +// Class : L1TMuonBarrelParamsRcd +// +// Author: Giannis Flouris +// Created: +// + +#include "FWCore/Framework/interface/EventSetupRecordImplementation.h" + +class L1TMuonBarrelParamsRcd : public edm::eventsetup::EventSetupRecordImplementation {}; + +#endif diff --git a/CondFormats/DataRecord/interface/L1TMuonGlobalParamsRcd.h b/CondFormats/DataRecord/interface/L1TMuonGlobalParamsRcd.h new file mode 100644 index 0000000000000..780bda9278963 --- /dev/null +++ b/CondFormats/DataRecord/interface/L1TMuonGlobalParamsRcd.h @@ -0,0 +1,25 @@ +#ifndef L1TGMTParamsRcd_L1TGMTParamsRcd_h +#define L1TGMTParamsRcd_L1TGMTParamsRcd_h +// -*- C++ -*- +// +// Package: Subsystem/Package +// Class : L1TMuonGlobalParamsRcd +// +/**\class L1TMuonGlobalParamsRcd L1TMuonGlobalParamsRcd.h Subsystem/Package/interface/L1TMuonGlobalParamsRcd.h + + Description: [one line class summary] + + Usage: + + +*/ +// +// Author: Thomas Reis +// Created: Tue, 22 Sep 2015 13:32:54 GMT +// + +#include "FWCore/Framework/interface/EventSetupRecordImplementation.h" + +class L1TMuonGlobalParamsRcd : public edm::eventsetup::EventSetupRecordImplementation {}; + +#endif diff --git a/CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h b/CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h new file mode 100644 index 0000000000000..c32fc4787cf13 --- /dev/null +++ b/CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h @@ -0,0 +1,25 @@ +#ifndef L1TMTFOverlapParamsRcd_L1TMTFOverlapParamsRcd_h +#define L1TMTFOverlapParamsRcd_L1TMTFOverlapParamsRcd_h +// -*- C++ -*- +// +// Package: CondFormats/DataRecord +// Class : L1TMuonOverlapParamsRcd +// +/**\class L1TMuonOverlapParamsRcd L1TMuonOverlapParamsRcd.h CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h + + Description: [one line class summary] + + Usage: + + +*/ +// +// Author: Artur Kalinowski +// Created: Tue, 06 Oct 2015 11:46:55 GMT +// + +#include "FWCore/Framework/interface/EventSetupRecordImplementation.h" + +class L1TMuonOverlapParamsRcd : public edm::eventsetup::EventSetupRecordImplementation {}; + +#endif diff --git a/CondFormats/DataRecord/src/L1TMuonBarrelParamsRcd.cc b/CondFormats/DataRecord/src/L1TMuonBarrelParamsRcd.cc new file mode 100644 index 0000000000000..42c11f458cd7e --- /dev/null +++ b/CondFormats/DataRecord/src/L1TMuonBarrelParamsRcd.cc @@ -0,0 +1,12 @@ +// -*- C++ -*- +// +// Package: Subsystem/Package +// Class : L1TMuonBarrelParamsRcd +// +// Author: Giannis Flouris +// Created: + +#include "CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h" +#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" + +EVENTSETUP_RECORD_REG(L1TMuonBarrelParamsRcd); diff --git a/CondFormats/DataRecord/src/L1TMuonGlobalParamsRcd.cc b/CondFormats/DataRecord/src/L1TMuonGlobalParamsRcd.cc new file mode 100644 index 0000000000000..4fa12ff5ef892 --- /dev/null +++ b/CondFormats/DataRecord/src/L1TMuonGlobalParamsRcd.cc @@ -0,0 +1,15 @@ +// -*- C++ -*- +// +// Package: Subsystem/Package +// Class : L1TMuonGlobalParamsRcd +// +// Implementation: +// [Notes on implementation] +// +// Author: Thomas Reis +// Created: Tue, 22 Sep 2015 13:32:54 GMT + +#include "CondFormats/DataRecord/interface/L1TMuonGlobalParamsRcd.h" +#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" + +EVENTSETUP_RECORD_REG(L1TMuonGlobalParamsRcd); diff --git a/CondFormats/DataRecord/src/L1TMuonOverlapParamsRcd.cc b/CondFormats/DataRecord/src/L1TMuonOverlapParamsRcd.cc new file mode 100644 index 0000000000000..1906595f7240d --- /dev/null +++ b/CondFormats/DataRecord/src/L1TMuonOverlapParamsRcd.cc @@ -0,0 +1,15 @@ +// -*- C++ -*- +// +// Package: CondFormats/DataRecord +// Class : L1TMuonOverlapParamsRcd +// +// Implementation: +// [Notes on implementation] +// +// Author: Artur Kalinowski +// Created: Tue, 06 Oct 2015 11:46:55 GMT + +#include "CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h" +#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" + +EVENTSETUP_RECORD_REG(L1TMuonOverlapParamsRcd); diff --git a/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h b/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h new file mode 100644 index 0000000000000..31f97919cec51 --- /dev/null +++ b/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h @@ -0,0 +1,149 @@ +/// +/// \class L1TMuonBarrelParams +/// +/// Description: Placeholder for BMTF parameters +/// +/// +/// \author: Giannis Flouris +/// + +#ifndef L1TBMTFParams_h +#define L1TBMTFParams_h + +#include +#include +#include + +#include "CondFormats/Serialization/interface/Serializable.h" +#include "CondFormats/L1TObjects/interface/LUT.h" +//#include "L1Trigger/L1TMuonBarrel/interface/L1MuBMTrack.h" + +class L1TMuonBarrelParams { + +public: + enum { Version = 1 }; + + class Node { + public: + std::string type_; + unsigned version_; + l1t::LUT LUT_; + std::vector dparams_; + std::vector uparams_; + std::vector iparams_; + std::vector sparams_; + Node(){ type_="unspecified"; version_=0; } + COND_SERIALIZABLE; + }; + + enum { + pta = 0, + NUM_BMTFPARAMNODES=1 + }; + + + /// L1MuBMPtaLut + typedef std::map > LUT; + + class LUTParams{ + public: + std::vector pta_lut_; + std::vector phi_lut_; + std::vector pta_threshold_; + + + LUTParams() : pta_lut_(0), phi_lut_(0), pta_threshold_(6) + { pta_lut_.reserve(12); pta_threshold_.reserve(6); phi_lut_.reserve(2); } + + COND_SERIALIZABLE; + }; + std::string AssLUTPath() const { return pnodes_[pta].sparams_.size() > 0 ? pnodes_[pta].sparams_[0] : ""; } + void setAssLUTPath (std::string path) { pnodes_[pta].sparams_.push_back(path); } + + void setpta_lut(std::vector ptalut) { lutparams_.pta_lut_ = ptalut; }; + std::vector pta_lut() const {return lutparams_.pta_lut_; }; + void setpta_threshold(std::vector ptathresh) { lutparams_.pta_threshold_ = ptathresh; }; + std::vector pta_threshold() const { return lutparams_.pta_threshold_; }; + + void setphi_lut(std::vector philut) { lutparams_.phi_lut_ = philut; }; + std::vector phi_lut() const {return lutparams_.phi_lut_; }; + + + class ConfigParams{ + public: + int PT_Assignment_nbits_Phi; + int PT_Assignment_nbits_PhiB; + int PHI_Assignment_nbits_Phi; + int PHI_Assignment_nbits_PhiB; + int Extrapolation_nbits_Phi; + int Extrapolation_nbits_PhiB; + int BX_min; + int BX_max; + int Extrapolation_Filter; + int OutOfTime_Filter_Window; + bool OutOfTime_Filter; + bool Open_LUTs; + bool EtaTrackFinder; + bool Extrapolation_21; + + + ConfigParams() { } + + COND_SERIALIZABLE; + }; + + void set_PT_Assignment_nbits_Phi(int par1) {conparams_.PT_Assignment_nbits_Phi = par1;} + void set_PT_Assignment_nbits_PhiB(int par1) {conparams_.PT_Assignment_nbits_PhiB = par1;} + void set_PHI_Assignment_nbits_Phi(int par1) {conparams_.PHI_Assignment_nbits_Phi = par1;} + void set_PHI_Assignment_nbits_PhiB(int par1) {conparams_.PHI_Assignment_nbits_PhiB = par1;} + void set_Extrapolation_nbits_Phi(int par1) {conparams_.Extrapolation_nbits_Phi = par1;} + void set_Extrapolation_nbits_PhiB(int par1) {conparams_.Extrapolation_nbits_PhiB = par1;} + void set_BX_min(int par1) {conparams_.BX_min = par1;} + void set_BX_max(int par1) {conparams_.BX_max = par1;} + void set_Extrapolation_Filter(int par1) {conparams_.Extrapolation_Filter = par1;} + void set_OutOfTime_Filter_Window(int par1) {conparams_.OutOfTime_Filter_Window = par1;} + void set_OutOfTime_Filter(bool par1) {conparams_.OutOfTime_Filter = par1;} + void set_Open_LUTs(bool par1) {conparams_.Open_LUTs = par1;} + void set_EtaTrackFinder(bool par1) {conparams_.EtaTrackFinder = par1;} + void set_Extrapolation_21(bool par1) {conparams_.Extrapolation_21 = par1;} + + + int get_PT_Assignment_nbits_Phi() const{return conparams_.PT_Assignment_nbits_Phi;} + int get_PT_Assignment_nbits_PhiB() const {return conparams_.PT_Assignment_nbits_PhiB;} + int get_PHI_Assignment_nbits_Phi() const {return conparams_.PHI_Assignment_nbits_Phi;} + int get_PHI_Assignment_nbits_PhiB() const {return conparams_.PHI_Assignment_nbits_PhiB;} + int get_Extrapolation_nbits_Phi() const {return conparams_.Extrapolation_nbits_Phi;} + int get_Extrapolation_nbits_PhiB() const {return conparams_.Extrapolation_nbits_PhiB;} + int get_BX_min() const {return conparams_.BX_min ;} + int get_BX_max() const {return conparams_.BX_max;} + int get_Extrapolation_Filter() const {return conparams_.Extrapolation_Filter;} + int get_OutOfTime_Filter_Window() const {return conparams_.OutOfTime_Filter_Window ;} + + bool get_OutOfTime_Filter() const {return conparams_.OutOfTime_Filter;} + bool get_Open_LUTs() const {return conparams_.Open_LUTs ;} + bool get_EtaTrackFinder() const {return conparams_.EtaTrackFinder ;} + bool get_Extrapolation_21() const {return conparams_.Extrapolation_21 ;} + + + L1TMuonBarrelParams() { version_=Version; pnodes_.resize(NUM_BMTFPARAMNODES); } + ~L1TMuonBarrelParams() {} + + // FW version + unsigned fwVersion() const { return fwVersion_; } + void setFwVersion(unsigned fwVersion) { fwVersion_ = fwVersion; } + // print parameters to stream: + void print(std::ostream&) const; + friend std::ostream& operator<<(std::ostream& o, const L1TMuonBarrelParams & p) { p.print(o); return o; } + +private: + unsigned version_; + unsigned fwVersion_; + + std::vector pnodes_; + + LUTParams lutparams_; + ConfigParams conparams_; + + COND_SERIALIZABLE; +}; +#endif diff --git a/CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h b/CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h new file mode 100644 index 0000000000000..2cadde878423b --- /dev/null +++ b/CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h @@ -0,0 +1,165 @@ +/// +/// \class L1TMuonGlobalParams +/// +/// Description: Placeholder for MicroGMT parameters +/// +/// Implementation: +/// +/// \author: Thomas Reis +/// + +#ifndef L1TGMTParams_h +#define L1TGMTParams_h + +#include +#include +#include + +#include "CondFormats/Serialization/interface/Serializable.h" +#include "CondFormats/L1TObjects/interface/LUT.h" + +class L1TMuonGlobalParams { + +public: + enum { Version = 1 }; + + class Node { + public: + std::string type_; + unsigned version_; + l1t::LUT LUT_; + std::vector dparams_; + std::vector uparams_; + std::vector iparams_; + std::vector sparams_; + Node(){ type_="unspecified"; version_=0; } + COND_SERIALIZABLE; + }; + + enum {absIsoCheckMem=0, + relIsoCheckMem=1, + idxSelMemPhi=2, + idxSelMemEta=3, + brlSingleMatchQual=4, + fwdPosSingleMatchQual=5, + fwdNegSingleMatchQual=6, + ovlPosSingleMatchQual=7, + ovlNegSingleMatchQual=8, + bOPosMatchQual=9, + bONegMatchQual=10, + fOPosMatchQual=11, + fONegMatchQual=12, + bPhiExtrapolation=13, + oPhiExtrapolation=14, + fPhiExtrapolation=15, + bEtaExtrapolation=16, + oEtaExtrapolation=17, + fEtaExtrapolation=18, + sortRank=19, + NUM_CALOPARAMNODES=20 + }; + + L1TMuonGlobalParams() { version_=Version; pnodes_.resize(NUM_CALOPARAMNODES); } + ~L1TMuonGlobalParams() {} + + // FW version + unsigned fwVersion() const { return fwVersion_; } + void setFwVersion(unsigned fwVersion) { fwVersion_ = fwVersion; } + + // LUTs + l1t::LUT* absIsoCheckMemLUT() { return &pnodes_[absIsoCheckMem].LUT_; } + l1t::LUT* relIsoCheckMemLUT() { return &pnodes_[relIsoCheckMem].LUT_; } + l1t::LUT* idxSelMemPhiLUT() { return &pnodes_[idxSelMemPhi].LUT_; } + l1t::LUT* idxSelMemEtaLUT() { return &pnodes_[idxSelMemEta].LUT_; } + l1t::LUT* brlSingleMatchQualLUT() { return &pnodes_[brlSingleMatchQual].LUT_; } + l1t::LUT* fwdPosSingleMatchQualLUT() { return &pnodes_[fwdPosSingleMatchQual].LUT_; } + l1t::LUT* fwdNegSingleMatchQualLUT() { return &pnodes_[fwdNegSingleMatchQual].LUT_; } + l1t::LUT* ovlPosSingleMatchQualLUT() { return &pnodes_[ovlPosSingleMatchQual].LUT_; } + l1t::LUT* ovlNegSingleMatchQualLUT() { return &pnodes_[ovlNegSingleMatchQual].LUT_; } + l1t::LUT* bOPosMatchQualLUT() { return &pnodes_[bOPosMatchQual].LUT_; } + l1t::LUT* bONegMatchQualLUT() { return &pnodes_[bONegMatchQual].LUT_; } + l1t::LUT* fOPosMatchQualLUT() { return &pnodes_[fOPosMatchQual].LUT_; } + l1t::LUT* fONegMatchQualLUT() { return &pnodes_[fONegMatchQual].LUT_; } + l1t::LUT* bPhiExtrapolationLUT() { return &pnodes_[bPhiExtrapolation].LUT_; } + l1t::LUT* oPhiExtrapolationLUT() { return &pnodes_[oPhiExtrapolation].LUT_; } + l1t::LUT* fPhiExtrapolationLUT() { return &pnodes_[fPhiExtrapolation].LUT_; } + l1t::LUT* bEtaExtrapolationLUT() { return &pnodes_[bEtaExtrapolation].LUT_; } + l1t::LUT* oEtaExtrapolationLUT() { return &pnodes_[oEtaExtrapolation].LUT_; } + l1t::LUT* fEtaExtrapolationLUT() { return &pnodes_[fEtaExtrapolation].LUT_; } + l1t::LUT* sortRankLUT() { return &pnodes_[sortRank].LUT_; } + void setAbsIsoCheckMemLUT (const l1t::LUT & lut) { pnodes_[absIsoCheckMem].type_ = "LUT"; pnodes_[absIsoCheckMem].LUT_ = lut; } + void setRelIsoCheckMemLUT (const l1t::LUT & lut) { pnodes_[relIsoCheckMem].type_ = "LUT"; pnodes_[relIsoCheckMem].LUT_ = lut; } + void setIdxSelMemPhiLUT (const l1t::LUT & lut) { pnodes_[idxSelMemPhi].type_ = "LUT"; pnodes_[idxSelMemPhi].LUT_ = lut; } + void setIdxSelMemEtaLUT (const l1t::LUT & lut) { pnodes_[idxSelMemEta].type_ = "LUT"; pnodes_[idxSelMemEta].LUT_ = lut; } + void setBrlSingleMatchQualLUT (const l1t::LUT & lut) { pnodes_[brlSingleMatchQual].type_ = "LUT"; pnodes_[brlSingleMatchQual].LUT_ = lut; } + void setFwdPosSingleMatchQualLUT (const l1t::LUT & lut) { pnodes_[fwdPosSingleMatchQual].type_ = "LUT"; pnodes_[fwdPosSingleMatchQual].LUT_ = lut; } + void setFwdNegSingleMatchQualLUT (const l1t::LUT & lut) { pnodes_[fwdNegSingleMatchQual].type_ = "LUT"; pnodes_[fwdNegSingleMatchQual].LUT_ = lut; } + void setOvlPosSingleMatchQualLUT (const l1t::LUT & lut) { pnodes_[ovlPosSingleMatchQual].type_ = "LUT"; pnodes_[ovlPosSingleMatchQual].LUT_ = lut; } + void setOvlNegSingleMatchQualLUT (const l1t::LUT & lut) { pnodes_[ovlNegSingleMatchQual].type_ = "LUT"; pnodes_[ovlNegSingleMatchQual].LUT_ = lut; } + void setBOPosMatchQualLUT (const l1t::LUT & lut) { pnodes_[bOPosMatchQual].type_ = "LUT"; pnodes_[bOPosMatchQual].LUT_ = lut; } + void setBONegMatchQualLUT (const l1t::LUT & lut) { pnodes_[bONegMatchQual].type_ = "LUT"; pnodes_[bONegMatchQual].LUT_ = lut; } + void setFOPosMatchQualLUT (const l1t::LUT & lut) { pnodes_[fOPosMatchQual].type_ = "LUT"; pnodes_[fOPosMatchQual].LUT_ = lut; } + void setFONegMatchQualLUT (const l1t::LUT & lut) { pnodes_[fONegMatchQual].type_ = "LUT"; pnodes_[fONegMatchQual].LUT_ = lut; } + void setBPhiExtrapolationLUT (const l1t::LUT & lut) { pnodes_[bPhiExtrapolation].type_ = "LUT"; pnodes_[bPhiExtrapolation].LUT_ = lut; } + void setOPhiExtrapolationLUT (const l1t::LUT & lut) { pnodes_[oPhiExtrapolation].type_ = "LUT"; pnodes_[oPhiExtrapolation].LUT_ = lut; } + void setFPhiExtrapolationLUT (const l1t::LUT & lut) { pnodes_[fPhiExtrapolation].type_ = "LUT"; pnodes_[fPhiExtrapolation].LUT_ = lut; } + void setBEtaExtrapolationLUT (const l1t::LUT & lut) { pnodes_[bEtaExtrapolation].type_ = "LUT"; pnodes_[bEtaExtrapolation].LUT_ = lut; } + void setOEtaExtrapolationLUT (const l1t::LUT & lut) { pnodes_[oEtaExtrapolation].type_ = "LUT"; pnodes_[oEtaExtrapolation].LUT_ = lut; } + void setFEtaExtrapolationLUT (const l1t::LUT & lut) { pnodes_[fEtaExtrapolation].type_ = "LUT"; pnodes_[fEtaExtrapolation].LUT_ = lut; } + void setSortRankLUT (const l1t::LUT & lut) { pnodes_[sortRank].type_ = "LUT"; pnodes_[sortRank].LUT_ = lut; } + + // LUT paths + std::string absIsoCheckMemLUTPath() const { return pnodes_[absIsoCheckMem].sparams_.size() > 0 ? pnodes_[absIsoCheckMem].sparams_[0] : ""; } + std::string relIsoCheckMemLUTPath() const { return pnodes_[relIsoCheckMem].sparams_.size() > 0 ? pnodes_[relIsoCheckMem].sparams_[0] : ""; } + std::string idxSelMemPhiLUTPath() const { return pnodes_[idxSelMemPhi].sparams_.size() > 0 ? pnodes_[idxSelMemPhi].sparams_[0] : ""; } + std::string idxSelMemEtaLUTPath() const { return pnodes_[idxSelMemEta].sparams_.size() > 0 ? pnodes_[idxSelMemEta].sparams_[0] : ""; } + std::string brlSingleMatchQualLUTPath() const { return pnodes_[brlSingleMatchQual].sparams_.size() > 0 ? pnodes_[brlSingleMatchQual].sparams_[0] : ""; } + std::string fwdPosSingleMatchQualLUTPath() const { return pnodes_[fwdPosSingleMatchQual].sparams_.size() > 0 ? pnodes_[fwdPosSingleMatchQual].sparams_[0] : ""; } + std::string fwdNegSingleMatchQualLUTPath() const { return pnodes_[fwdNegSingleMatchQual].sparams_.size() > 0 ? pnodes_[fwdNegSingleMatchQual].sparams_[0] : ""; } + std::string ovlPosSingleMatchQualLUTPath() const { return pnodes_[ovlPosSingleMatchQual].sparams_.size() > 0 ? pnodes_[ovlPosSingleMatchQual].sparams_[0] : ""; } + std::string ovlNegSingleMatchQualLUTPath() const { return pnodes_[ovlNegSingleMatchQual].sparams_.size() > 0 ? pnodes_[ovlNegSingleMatchQual].sparams_[0] : ""; } + std::string bOPosMatchQualLUTPath() const { return pnodes_[bOPosMatchQual].sparams_.size() > 0 ? pnodes_[bOPosMatchQual].sparams_[0] : ""; } + std::string bONegMatchQualLUTPath() const { return pnodes_[bONegMatchQual].sparams_.size() > 0 ? pnodes_[bONegMatchQual].sparams_[0] : ""; } + std::string fOPosMatchQualLUTPath() const { return pnodes_[fOPosMatchQual].sparams_.size() > 0 ? pnodes_[fOPosMatchQual].sparams_[0] : ""; } + std::string fONegMatchQualLUTPath() const { return pnodes_[fONegMatchQual].sparams_.size() > 0 ? pnodes_[fONegMatchQual].sparams_[0] : ""; } + std::string bPhiExtrapolationLUTPath() const { return pnodes_[bPhiExtrapolation].sparams_.size() > 0 ? pnodes_[bPhiExtrapolation].sparams_[0] : ""; } + std::string oPhiExtrapolationLUTPath() const { return pnodes_[oPhiExtrapolation].sparams_.size() > 0 ? pnodes_[oPhiExtrapolation].sparams_[0] : ""; } + std::string fPhiExtrapolationLUTPath() const { return pnodes_[fPhiExtrapolation].sparams_.size() > 0 ? pnodes_[fPhiExtrapolation].sparams_[0] : ""; } + std::string bEtaExtrapolationLUTPath() const { return pnodes_[bEtaExtrapolation].sparams_.size() > 0 ? pnodes_[bEtaExtrapolation].sparams_[0] : ""; } + std::string oEtaExtrapolationLUTPath() const { return pnodes_[oEtaExtrapolation].sparams_.size() > 0 ? pnodes_[oEtaExtrapolation].sparams_[0] : ""; } + std::string fEtaExtrapolationLUTPath() const { return pnodes_[fEtaExtrapolation].sparams_.size() > 0 ? pnodes_[fEtaExtrapolation].sparams_[0] : ""; } + std::string sortRankLUTPath() const { return pnodes_[sortRank].sparams_.size() > 0 ? pnodes_[sortRank].sparams_[0] : ""; } + void setAbsIsoCheckMemLUTPath (std::string path) { pnodes_[absIsoCheckMem].sparams_.push_back(path); } + void setRelIsoCheckMemLUTPath (std::string path) { pnodes_[relIsoCheckMem].sparams_.push_back(path); } + void setIdxSelMemPhiLUTPath (std::string path) { pnodes_[idxSelMemPhi].sparams_.push_back(path); } + void setIdxSelMemEtaLUTPath (std::string path) { pnodes_[idxSelMemEta].sparams_.push_back(path); } + void setBrlSingleMatchQualLUTPath (std::string path) { pnodes_[brlSingleMatchQual].sparams_.push_back(path); } + void setFwdPosSingleMatchQualLUTPath (std::string path) { pnodes_[fwdPosSingleMatchQual].sparams_.push_back(path); } + void setFwdNegSingleMatchQualLUTPath (std::string path) { pnodes_[fwdNegSingleMatchQual].sparams_.push_back(path); } + void setOvlPosSingleMatchQualLUTPath (std::string path) { pnodes_[ovlPosSingleMatchQual].sparams_.push_back(path); } + void setOvlNegSingleMatchQualLUTPath (std::string path) { pnodes_[ovlNegSingleMatchQual].sparams_.push_back(path); } + void setBOPosMatchQualLUTPath (std::string path) { pnodes_[bOPosMatchQual].sparams_.push_back(path); } + void setBONegMatchQualLUTPath (std::string path) { pnodes_[bONegMatchQual].sparams_.push_back(path); } + void setFOPosMatchQualLUTPath (std::string path) { pnodes_[fOPosMatchQual].sparams_.push_back(path); } + void setFONegMatchQualLUTPath (std::string path) { pnodes_[fONegMatchQual].sparams_.push_back(path); } + void setBPhiExtrapolationLUTPath (std::string path) { pnodes_[bPhiExtrapolation].sparams_.push_back(path); } + void setOPhiExtrapolationLUTPath (std::string path) { pnodes_[oPhiExtrapolation].sparams_.push_back(path); } + void setFPhiExtrapolationLUTPath (std::string path) { pnodes_[fPhiExtrapolation].sparams_.push_back(path); } + void setBEtaExtrapolationLUTPath (std::string path) { pnodes_[bEtaExtrapolation].sparams_.push_back(path); } + void setOEtaExtrapolationLUTPath (std::string path) { pnodes_[oEtaExtrapolation].sparams_.push_back(path); } + void setFEtaExtrapolationLUTPath (std::string path) { pnodes_[fEtaExtrapolation].sparams_.push_back(path); } + void setSortRankLUTPath (std::string path) { pnodes_[sortRank].sparams_.push_back(path); } + + // print parameters to stream: + void print(std::ostream&) const; + friend std::ostream& operator<<(std::ostream& o, const L1TMuonGlobalParams & p) { p.print(o); return o; } + +private: + unsigned version_; + unsigned fwVersion_; + + std::vector pnodes_; + + COND_SERIALIZABLE; +}; +#endif diff --git a/CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h b/CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h new file mode 100644 index 0000000000000..af9333a369031 --- /dev/null +++ b/CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h @@ -0,0 +1,217 @@ +#ifndef L1TMTFOverlapParams_h +#define L1TMTFOverlapParams_h + +#include +#include +#include +#include + +#include "CondFormats/Serialization/interface/Serializable.h" +#include "CondFormats/L1TObjects/interface/LUT.h" + +/////////////////////////////////////// +/////////////////////////////////////// +class L1TMuonOverlapParams { + + public: + + class Node { + public: + std::string type_; + unsigned version_; + l1t::LUT LUT_; + std::vector dparams_; + std::vector uparams_; + std::vector iparams_; + std::vector sparams_; + Node(){ type_="unspecified"; version_=0; } + COND_SERIALIZABLE; + }; + + class LayerMapNode { + public: + ///short layer number used within OMTF emulator + unsigned int hwNumber; + + ///logic numer of the layer + unsigned int logicNumber; + + ///Is this a bending layers? + bool bendingLayer; + + ///Login number of layer to which this layer is tied. + ///I.e both layers have to fire to account a hit + unsigned int connectedToLayer; + + COND_SERIALIZABLE; + }; + + + class RefLayerMapNode{ + + public: + + ///Reference layer number + unsigned int refLayer; + + ///Corresponding logical layer number + unsigned int logicNumber; + + COND_SERIALIZABLE; + }; + + + class RefHitNode{ + + public: + + unsigned int iInput; + int iPhiMin, iPhiMax; + unsigned int iRefHit; + unsigned int iRefLayer; + unsigned int iRegion; + + COND_SERIALIZABLE; + }; + + class LayerInputNode{ + + public: + + unsigned int iFirstInput; + unsigned int iLayer; + unsigned int nInputs; + + COND_SERIALIZABLE; + }; + + + + enum { Version = 1 }; + + // DO NOT ADD ENTRIES ANYWHERE BUT DIRECTLY BEFORE "NUM_OMTFPARAMNODES" + enum { CHARGE=0, ETA=1, PT=2, PDF=3, MEANDISTPHI=4, + GENERAL = 5, SECTORS_START=6, SECTORS_END=7, + NUM_OMTFPARAMNODES=8}; + + // General configuration parameters indexes + enum {GENERAL_ADDRBITS=0, GENERAL_VALBITS=1, GENERAL_HITSPERLAYER=2, GENERAL_PHIBITS=3, GENERAL_PHIBINS=4, GENERAL_NREFHITS=5, GENERAL_NTESTREFHITS=6, + GENERAL_NPROCESSORS=7, GENERAL_NLOGIC_REGIONS=8, GENERAL_NINPUTS=9, GENERAL_NLAYERS=10, GENERAL_NREFLAYERS=11, GENERAL_NGOLDENPATTERNS=12, + GENERAL_NCONFIG=13 + }; + + + L1TMuonOverlapParams() { fwVersion_=Version; pnodes_.resize(NUM_OMTFPARAMNODES); } + ~L1TMuonOverlapParams() {} + + // Firmware version + unsigned fwVersion() const { return fwVersion_; } + void setFwVersion(unsigned fwVersion) { fwVersion_ = fwVersion; } + + ///General definitions + std::vector* generalParams() { return &pnodes_[GENERAL].iparams_; } + void setGeneralParams (const std::vector & paramsVec) { pnodes_[GENERAL].type_ = "INT"; pnodes_[GENERAL].iparams_ = paramsVec;} + + ///Access to specific general settings. + int nPdfAddrBits() { return pnodes_[GENERAL].iparams_[GENERAL_ADDRBITS];}; + + int nPdfValBits() { return pnodes_[GENERAL].iparams_[GENERAL_VALBITS];}; + + int nHitsPerLayer() { return pnodes_[GENERAL].iparams_[GENERAL_HITSPERLAYER];}; + + int nPhiBits() { return pnodes_[GENERAL].iparams_[GENERAL_PHIBITS];}; + + int nPhiBins() { return pnodes_[GENERAL].iparams_[GENERAL_PHIBINS];}; + + int nRefHits() { return pnodes_[GENERAL].iparams_[GENERAL_NREFHITS];}; + + int nTestRefHits() { return pnodes_[GENERAL].iparams_[GENERAL_NTESTREFHITS];}; + + int nProcessors() { return pnodes_[GENERAL].iparams_[GENERAL_NPROCESSORS];}; + + int nLogicRegions() { return pnodes_[GENERAL].iparams_[GENERAL_NLOGIC_REGIONS];}; + + int nInputs() { return pnodes_[GENERAL].iparams_[GENERAL_NINPUTS];}; + + int nLayers() { return pnodes_[GENERAL].iparams_[GENERAL_NLAYERS];}; + + int nRefLayers() { return pnodes_[GENERAL].iparams_[GENERAL_NREFLAYERS];}; + + int nGoldenPatterns() { return pnodes_[GENERAL].iparams_[GENERAL_NGOLDENPATTERNS];}; + + ///Connections definitions + void setLayerMap(const std::vector &aVector) { layerMap_ = aVector;} + + void setRefLayerMap(const std::vector &aVector) { refLayerMap_ = aVector;} + + void setRefHitMap(const std::vector &aVector) {refHitMap_ = aVector;}; + + void setGlobalPhiStartMap(const std::vector &aVector) {globalPhiStart_ = aVector;}; + + void setLayerInputMap(const std::vector &aVector) {layerInputMap_ = aVector;}; + + void setConnectedSectorsStart(const std::vector &aVector){pnodes_[SECTORS_START].type_ = "INT"; pnodes_[SECTORS_START].iparams_ = aVector;}; + + void setConnectedSectorsEnd(const std::vector &aVector){pnodes_[SECTORS_END].type_ = "INT"; pnodes_[SECTORS_END].iparams_ = aVector;}; + + std::vector * layerMap() { return &layerMap_;}; + + std::vector * refLayerMap() { return &refLayerMap_;}; + + std::vector * refHitMap() {return &refHitMap_;}; + + std::vector * globalPhiStartMap() { return &globalPhiStart_;}; + + std::vector * layerInputMap() { return &layerInputMap_;}; + + std::vector * connectedSectorsStart() { return &pnodes_[SECTORS_START].iparams_;}; + + std::vector * connectedSectorsEnd() { return &pnodes_[SECTORS_END].iparams_;}; + + + ///Golden Patterns definitions + l1t::LUT* chargeLUT() { return &pnodes_[CHARGE].LUT_; } + l1t::LUT* etaLUT() { return &pnodes_[ETA].LUT_; } + l1t::LUT* ptLUT() { return &pnodes_[PT].LUT_; } + l1t::LUT* pdfLUT() { return &pnodes_[PDF].LUT_; } + l1t::LUT* meanDistPhiLUT() { return &pnodes_[MEANDISTPHI].LUT_; } + + void setChargeLUT (const l1t::LUT & lut) { pnodes_[CHARGE].type_ = "LUT"; pnodes_[CHARGE].LUT_ = lut; } + void setEtaLUT (const l1t::LUT & lut) { pnodes_[ETA].type_ = "LUT"; pnodes_[ETA].LUT_ = lut; } + void setPtLUT (const l1t::LUT & lut) { pnodes_[PT].type_ = "LUT"; pnodes_[PT].LUT_ = lut; } + void setPdfLUT (const l1t::LUT & lut) { pnodes_[PDF].type_ = "LUT"; pnodes_[PDF].LUT_ = lut; } + void setMeanDistPhiLUT (const l1t::LUT & lut) { pnodes_[MEANDISTPHI].type_ = "LUT"; pnodes_[MEANDISTPHI].LUT_ = lut; } + + + private: + + ///Version of firmware configuration + unsigned fwVersion_; + + ///vector of LUT like parameters + std::vector pnodes_; + + ///Vector of structs representing definitions of measurement layers. + std::vector layerMap_; + + ///Vector of structs representing definitins of reference layers + ///in terms of logic measurement layers numbers. + std::vector refLayerMap_; + + ///Vector of RefHitNode defining assignenemt of + ///reference hits to logical regions. + ///definitions for all processor are serialized in a single vector. + std::vector refHitMap_; + + ///Vector of global phi of processor beggining in each reference layer. + ///All processors are serialized in a single vector. + std::vector globalPhiStart_; + + ///Vector of all definitions of input ranges for given + ///logic region. + ///All processors and all regions are serialized in a single vector. + std::vector layerInputMap_; + + COND_SERIALIZABLE; +}; +#endif diff --git a/CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc b/CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc new file mode 100644 index 0000000000000..57b50bb810fc5 --- /dev/null +++ b/CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc @@ -0,0 +1,31 @@ +#include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h" + +void L1TMuonBarrelParams::print(std::ostream& out) const { + + out << "L1 BMTF Parameters" << std::endl; + + out << "Firmware version: " << fwVersion_ << std::endl; +/* + out << "LUT paths (LUTs are generated analytically if path is empty)" << std::endl; + out << " Abs isolation checkMem LUT path: " << this->absIsoCheckMemLUTPath() << std::endl; + out << " Rel isolation checkMem LUT path: " << this->relIsoCheckMemLUTPath() << std::endl; + out << " Index selMem phi LUT path: " << this->idxSelMemPhiLUTPath() << std::endl; + out << " Index selMem eta LUT path: " << this->idxSelMemEtaLUTPath() << std::endl; + out << " Barrel Single MatchQual LUT path: " << this->brlSingleMatchQualLUTPath() << std::endl; + out << " Forward pos MatchQual LUT path: " << this->fwdPosSingleMatchQualLUTPath() << std::endl; + out << " Forward neg MatchQual LUT path: " << this->fwdNegSingleMatchQualLUTPath() << std::endl; + out << " Overlap pos MatchQual LUT path: " << this->ovlPosSingleMatchQualLUTPath() << std::endl; + out << " Overlap neg MatchQual LUT path: " << this->ovlNegSingleMatchQualLUTPath() << std::endl; + out << " Barrel-Overlap pos MatchQual LUT path: " << this->bOPosMatchQualLUTPath() << std::endl; + out << " Barrel-Overlap neg MatchQual LUT path: " << this->bONegMatchQualLUTPath() << std::endl; + out << " Forward-Overlap pos MatchQual LUT path: " << this->fOPosMatchQualLUTPath() << std::endl; + out << " Forward-Overlap neg MatchQual LUT path: " << this->fONegMatchQualLUTPath() << std::endl; + out << " Barrel phi extrapolation LUT path: " << this->bPhiExtrapolationLUTPath() << std::endl; + out << " Overlap phi extrapolation LUT path: " << this->oPhiExtrapolationLUTPath() << std::endl; + out << " Forward phi extrapolation LUT path: " << this->fPhiExtrapolationLUTPath() << std::endl; + out << " Barrel eta extrapolation LUT path: " << this->bEtaExtrapolationLUTPath() << std::endl; + out << " Overlap eta extrapolation LUT path: " << this->oEtaExtrapolationLUTPath() << std::endl; + out << " Forward eta extrapolation LUT path: " << this->fEtaExtrapolationLUTPath() << std::endl; + out << " Sort rank LUT path: " << this->sortRankLUTPath() << std::endl; +*/ +} diff --git a/CondFormats/L1TObjects/src/L1TMuonGlobalParams.cc b/CondFormats/L1TObjects/src/L1TMuonGlobalParams.cc new file mode 100644 index 0000000000000..efdb860d2a20a --- /dev/null +++ b/CondFormats/L1TObjects/src/L1TMuonGlobalParams.cc @@ -0,0 +1,30 @@ +#include "CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h" + +void L1TMuonGlobalParams::print(std::ostream& out) const { + + out << "L1 MicroGMT Parameters" << std::endl; + + out << "Firmware version: " << fwVersion_ << std::endl; + + out << "LUT paths (LUTs are generated analytically if path is empty)" << std::endl; + out << " Abs isolation checkMem LUT path: " << this->absIsoCheckMemLUTPath() << std::endl; + out << " Rel isolation checkMem LUT path: " << this->relIsoCheckMemLUTPath() << std::endl; + out << " Index selMem phi LUT path: " << this->idxSelMemPhiLUTPath() << std::endl; + out << " Index selMem eta LUT path: " << this->idxSelMemEtaLUTPath() << std::endl; + out << " Barrel Single MatchQual LUT path: " << this->brlSingleMatchQualLUTPath() << std::endl; + out << " Forward pos MatchQual LUT path: " << this->fwdPosSingleMatchQualLUTPath() << std::endl; + out << " Forward neg MatchQual LUT path: " << this->fwdNegSingleMatchQualLUTPath() << std::endl; + out << " Overlap pos MatchQual LUT path: " << this->ovlPosSingleMatchQualLUTPath() << std::endl; + out << " Overlap neg MatchQual LUT path: " << this->ovlNegSingleMatchQualLUTPath() << std::endl; + out << " Barrel-Overlap pos MatchQual LUT path: " << this->bOPosMatchQualLUTPath() << std::endl; + out << " Barrel-Overlap neg MatchQual LUT path: " << this->bONegMatchQualLUTPath() << std::endl; + out << " Forward-Overlap pos MatchQual LUT path: " << this->fOPosMatchQualLUTPath() << std::endl; + out << " Forward-Overlap neg MatchQual LUT path: " << this->fONegMatchQualLUTPath() << std::endl; + out << " Barrel phi extrapolation LUT path: " << this->bPhiExtrapolationLUTPath() << std::endl; + out << " Overlap phi extrapolation LUT path: " << this->oPhiExtrapolationLUTPath() << std::endl; + out << " Forward phi extrapolation LUT path: " << this->fPhiExtrapolationLUTPath() << std::endl; + out << " Barrel eta extrapolation LUT path: " << this->bEtaExtrapolationLUTPath() << std::endl; + out << " Overlap eta extrapolation LUT path: " << this->oEtaExtrapolationLUTPath() << std::endl; + out << " Forward eta extrapolation LUT path: " << this->fEtaExtrapolationLUTPath() << std::endl; + out << " Sort rank LUT path: " << this->sortRankLUTPath() << std::endl; +} diff --git a/CondFormats/L1TObjects/src/L1TMuonOverlapParams.cc b/CondFormats/L1TObjects/src/L1TMuonOverlapParams.cc new file mode 100644 index 0000000000000..8dc15c318cd13 --- /dev/null +++ b/CondFormats/L1TObjects/src/L1TMuonOverlapParams.cc @@ -0,0 +1,2 @@ +#include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h" + diff --git a/CondFormats/L1TObjects/src/T_EventSetup_L1TGMTParams.cc b/CondFormats/L1TObjects/src/T_EventSetup_L1TGMTParams.cc new file mode 100644 index 0000000000000..53538412b6275 --- /dev/null +++ b/CondFormats/L1TObjects/src/T_EventSetup_L1TGMTParams.cc @@ -0,0 +1,4 @@ +#include "CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h" +#include "FWCore/Utilities/interface/typelookup.h" + +TYPELOOKUP_DATA_REG(L1TMuonGlobalParams); diff --git a/CondFormats/L1TObjects/src/T_EventSetup_L1TMTFOverlapParams.cc b/CondFormats/L1TObjects/src/T_EventSetup_L1TMTFOverlapParams.cc new file mode 100644 index 0000000000000..e78900d0d1ebe --- /dev/null +++ b/CondFormats/L1TObjects/src/T_EventSetup_L1TMTFOverlapParams.cc @@ -0,0 +1,4 @@ +#include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h" +#include "FWCore/Utilities/interface/typelookup.h" + +TYPELOOKUP_DATA_REG(L1TMuonOverlapParams); diff --git a/CondFormats/L1TObjects/src/T_EventSetup_L1TMuonBarrelParams.cc b/CondFormats/L1TObjects/src/T_EventSetup_L1TMuonBarrelParams.cc new file mode 100644 index 0000000000000..5e5f577ff01a1 --- /dev/null +++ b/CondFormats/L1TObjects/src/T_EventSetup_L1TMuonBarrelParams.cc @@ -0,0 +1,4 @@ +#include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h" +#include "FWCore/Utilities/interface/typelookup.h" + +TYPELOOKUP_DATA_REG(L1TMuonBarrelParams); diff --git a/CondFormats/L1TObjects/src/classes.h b/CondFormats/L1TObjects/src/classes.h index 430deb8031cde..f2cfecfc6d6e1 100644 --- a/CondFormats/L1TObjects/src/classes.h +++ b/CondFormats/L1TObjects/src/classes.h @@ -48,9 +48,14 @@ #include "CondFormats/L1TObjects/interface/CaloParams.h" #include "CondFormats/L1TObjects/interface/CaloConfig.h" +#include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h" +#include "CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h" +#include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h" + namespace CondFormats_L1TObjects { struct dictionary { + std::vector dummy1a; l1t::CaloParams dummy1b; l1t::LUT dummy1c; @@ -75,6 +80,16 @@ namespace CondFormats_L1TObjects { // std::vector dummy15; // std::vector dummy15a; // std::vector dummy15b; + L1TMuonGlobalParams dummy16; + std::vector dummy16a; + + + L1TMuonOverlapParams dummy17; + std::vector< L1TMuonOverlapParams::Node> dummy17a; + + L1TMuonBarrelParams dummy18; + std::vector dummy18a; + }; } diff --git a/CondFormats/L1TObjects/src/classes_def.xml b/CondFormats/L1TObjects/src/classes_def.xml index 1ccac59c82115..e02c74a9df7de 100644 --- a/CondFormats/L1TObjects/src/classes_def.xml +++ b/CondFormats/L1TObjects/src/classes_def.xml @@ -1,4 +1,17 @@ + + + + + + + + + + + + + @@ -20,6 +33,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/CondFormats/L1TObjects/test/testSerializationL1TObjects.cpp b/CondFormats/L1TObjects/test/testSerializationL1TObjects.cpp index 4054422571b38..1557666c449b7 100644 --- a/CondFormats/L1TObjects/test/testSerializationL1TObjects.cpp +++ b/CondFormats/L1TObjects/test/testSerializationL1TObjects.cpp @@ -4,6 +4,8 @@ int main() { + + testSerialization(); testSerialization(); testSerialization(); testSerialization(); From 5a578ac8ef308e63dc78da74f7951c5ce2772057 Mon Sep 17 00:00:00 2001 From: Michael Mulhearn Date: Tue, 5 Jan 2016 15:21:35 +0100 Subject: [PATCH 118/250] DataFormats for 2016 L1T Global emulation --- .../L1TGlobal/interface/GlobalAlgBlk.h | 35 +++++--- .../L1TGlobal/interface/GlobalExtBlk.h | 28 +------ DataFormats/L1TGlobal/src/GlobalAlgBlk.cc | 84 +++++++++++++------ DataFormats/L1TGlobal/src/GlobalExtBlk.cc | 57 ++++--------- DataFormats/L1TGlobal/src/classes_def.xml | 6 +- L1Trigger/L1TGlobal/src/GtBoard.cc | 6 +- 6 files changed, 105 insertions(+), 111 deletions(-) diff --git a/DataFormats/L1TGlobal/interface/GlobalAlgBlk.h b/DataFormats/L1TGlobal/interface/GlobalAlgBlk.h index ddfb10173bb90..8957ca974cd71 100644 --- a/DataFormats/L1TGlobal/interface/GlobalAlgBlk.h +++ b/DataFormats/L1TGlobal/interface/GlobalAlgBlk.h @@ -51,25 +51,31 @@ class GlobalAlgBlk public: /// set simple members - void setOrbitNr(int orbNr) { m_orbitNr = orbNr; } - void setbxNr(int bxNr) { m_bxNr = bxNr; } - void setbxInEventNr(int bxNr) { m_bxInEvent = bxNr; } - void setFinalOR(int fOR) { m_finalOR = fOR; } + void setOrbitNr(int orbNr) { m_orbitNr = orbNr; } + void setbxNr(int bxNr) { m_bxNr = bxNr; } + void setbxInEventNr(int bxNr) { m_bxInEvent = bxNr; } + void setFinalORVeto(bool fOR) { m_finalORVeto = fOR; } + void setFinalORPreVeto(bool fOR){ m_finalORPreVeto = fOR; } + void setFinalOR(bool fOR) { m_finalOR = fOR; } + void setPreScColumn(int psC) { m_preScColumn = psC; } /// get simple members - inline const int getOrbitNr() const { return m_orbitNr; } - inline const int getbxNr() const { return m_bxNr; } - inline const int getbxInEventNr() const { return m_bxInEvent; } - inline const int getFinalOR() const { return m_finalOR; } + inline const int getOrbitNr() const { return m_orbitNr; } + inline const int getbxNr() const { return m_bxNr; } + inline const int getbxInEventNr() const { return m_bxInEvent; } + inline const bool getFinalOR() const { return m_finalOR; } + inline const bool getFinalORPreVeto() const { return m_finalORPreVeto; }; + inline const bool getFinalORVeto() const { return m_finalORVeto; } + inline const int getPreScColumn() const { return m_preScColumn; } /// Copy vectors words void copyInitialToPrescaled() { m_algoDecisionPreScaled = m_algoDecisionInitial; } void copyPrescaledToFinal() { m_algoDecisionFinal = m_algoDecisionPreScaled; } /// Set decision bits - void setAlgoDecisionInitial(int bit, bool val); - void setAlgoDecisionPreScaled(int bit, bool val); - void setAlgoDecisionFinal(int bit, bool val); + void setAlgoDecisionInitial(unsigned int bit, bool val); + void setAlgoDecisionPreScaled(unsigned int bit, bool val); + void setAlgoDecisionFinal(unsigned int bit, bool val); /// Get decision bits bool getAlgoDecisionInitial(unsigned int bit) const; @@ -95,7 +101,12 @@ class GlobalAlgBlk int m_bxInEvent; // finalOR - int m_finalOR; + bool m_finalOR; + bool m_finalORPreVeto; + bool m_finalORVeto; + + //Prescale Column + int m_preScColumn; std::vector m_algoDecisionInitial; diff --git a/DataFormats/L1TGlobal/interface/GlobalExtBlk.h b/DataFormats/L1TGlobal/interface/GlobalExtBlk.h index 907118e5f0ce2..23bb8f21a6fd1 100644 --- a/DataFormats/L1TGlobal/interface/GlobalExtBlk.h +++ b/DataFormats/L1TGlobal/interface/GlobalExtBlk.h @@ -39,28 +39,14 @@ class GlobalExtBlk /// constructors GlobalExtBlk(); // empty constructor, all members set to zero; - GlobalExtBlk(int orbitNr, int bxNr, int bxInEvent); - /// destructor virtual ~GlobalExtBlk(); public: - /// set simple members - void setOrbitNr(int orbNr) { m_orbitNr = orbNr; } - void setbxNr(int bxNr) { m_bxNr = bxNr; } - void setbxInEventNr(int bxNr) { m_bxInEvent = bxNr; } - void setFinalOR(int fOR) { m_finalOR = fOR; } - - /// get simple members - inline const int getOrbitNr() const { return m_orbitNr; } - inline const int getbxNr() const { return m_bxNr; } - inline const int getbxInEventNr() const { return m_bxInEvent; } - inline const int getFinalOR() const { return m_finalOR; } - /// Set decision bits - void setExternalDecision(int bit, bool val); + void setExternalDecision(unsigned int bit, bool val); /// Get decision bits bool getExternalDecision(unsigned int bit) const; @@ -74,18 +60,6 @@ class GlobalExtBlk private: - /// orbit number - int m_orbitNr; - - /// bunch cross number of the actual bx - int m_bxNr; - - /// bunch cross in the GT event record (E,F,0,1,2) - int m_bxInEvent; - - // finalOR - int m_finalOR; - std::vector m_extDecision; diff --git a/DataFormats/L1TGlobal/src/GlobalAlgBlk.cc b/DataFormats/L1TGlobal/src/GlobalAlgBlk.cc index 098eea852489b..58ae282e472c2 100644 --- a/DataFormats/L1TGlobal/src/GlobalAlgBlk.cc +++ b/DataFormats/L1TGlobal/src/GlobalAlgBlk.cc @@ -24,6 +24,8 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/MessageLogger/interface/MessageDrop.h" +const static unsigned int maxPhysicsTriggers = 512; //TO DO Move this to a standard parameter area. + // constructors // empty constructor, all members set to zero; @@ -33,16 +35,17 @@ GlobalAlgBlk::GlobalAlgBlk(int orbitNr, int bxNr, int bxInEvent): //Clear out the header data m_finalOR=0; + m_preScColumn=0; // Reserve/Clear out the decision words - m_algoDecisionInitial.reserve(L1GlobalTriggerReadoutSetup::NumberPhysTriggers); - m_algoDecisionInitial.assign(L1GlobalTriggerReadoutSetup::NumberPhysTriggers,false); + m_algoDecisionInitial.reserve(maxPhysicsTriggers); + m_algoDecisionInitial.assign(maxPhysicsTriggers,false); - m_algoDecisionPreScaled.reserve(L1GlobalTriggerReadoutSetup::NumberPhysTriggers); - m_algoDecisionPreScaled.assign(L1GlobalTriggerReadoutSetup::NumberPhysTriggers,false); + m_algoDecisionPreScaled.reserve(maxPhysicsTriggers); + m_algoDecisionPreScaled.assign(maxPhysicsTriggers,false); - m_algoDecisionFinal.reserve(L1GlobalTriggerReadoutSetup::NumberPhysTriggers); - m_algoDecisionFinal.assign(L1GlobalTriggerReadoutSetup::NumberPhysTriggers,false); + m_algoDecisionFinal.reserve(maxPhysicsTriggers); + m_algoDecisionFinal.assign(maxPhysicsTriggers,false); } @@ -56,16 +59,19 @@ GlobalAlgBlk::GlobalAlgBlk( ) m_bxNr=0; m_bxInEvent=0; m_finalOR=0; + m_finalORPreVeto = 0; + m_finalORVeto = 0; + m_preScColumn=0; // Reserve/Clear out the decision words - m_algoDecisionInitial.reserve(L1GlobalTriggerReadoutSetup::NumberPhysTriggers); - m_algoDecisionInitial.assign(L1GlobalTriggerReadoutSetup::NumberPhysTriggers,false); + m_algoDecisionInitial.reserve(maxPhysicsTriggers); + m_algoDecisionInitial.assign(maxPhysicsTriggers,false); - m_algoDecisionPreScaled.reserve(L1GlobalTriggerReadoutSetup::NumberPhysTriggers); - m_algoDecisionPreScaled.assign(L1GlobalTriggerReadoutSetup::NumberPhysTriggers,false); + m_algoDecisionPreScaled.reserve(maxPhysicsTriggers); + m_algoDecisionPreScaled.assign(maxPhysicsTriggers,false); - m_algoDecisionFinal.reserve(L1GlobalTriggerReadoutSetup::NumberPhysTriggers); - m_algoDecisionFinal.assign(L1GlobalTriggerReadoutSetup::NumberPhysTriggers,false); + m_algoDecisionFinal.reserve(maxPhysicsTriggers); + m_algoDecisionFinal.assign(maxPhysicsTriggers,false); } @@ -80,24 +86,40 @@ GlobalAlgBlk::~GlobalAlgBlk() /// Set decision bits -void GlobalAlgBlk::setAlgoDecisionInitial(int bit, bool val) +void GlobalAlgBlk::setAlgoDecisionInitial(unsigned int bit, bool val) { -// if(bit < m_algoDecisionInitial.size()) { + if(bit < m_algoDecisionInitial.size()) { m_algoDecisionInitial.at(bit) = val; - // } - // Need some erorr checking here. - + } else { + // Need some erorr checking here. + LogTrace("L1TGlobal") << "Attempting to set an algorithm bit " << bit << " beyond limit " << m_algoDecisionInitial.size(); + } } -void GlobalAlgBlk::setAlgoDecisionPreScaled(int bit, bool val) +void GlobalAlgBlk::setAlgoDecisionPreScaled(unsigned int bit, bool val) { - m_algoDecisionPreScaled.at(bit) = val; + + if(bit < m_algoDecisionPreScaled.size()) { + + m_algoDecisionPreScaled.at(bit) = val; + } else { + // Need some erorr checking here. + LogTrace("L1TGlobal") << "Attempting to set an algorithm bit " << bit << " beyond limit " << m_algoDecisionPreScaled.size(); + } + } -void GlobalAlgBlk::setAlgoDecisionFinal(int bit, bool val) +void GlobalAlgBlk::setAlgoDecisionFinal(unsigned int bit, bool val) { - m_algoDecisionFinal.at(bit) = val; + + if(bit < m_algoDecisionFinal.size()) { + m_algoDecisionFinal.at(bit) = val; + } else { + // Need some erorr checking here. + LogTrace("L1TGlobal") << "Attempting to set an algorithm bit " << bit << " beyond limit " << m_algoDecisionFinal.size(); + } + } /// Get decision bits @@ -127,12 +149,15 @@ void GlobalAlgBlk::reset() m_bxNr=0; m_bxInEvent=0; m_finalOR=0; + m_finalORPreVeto = 0; + m_finalORVeto = 0; + m_preScColumn=0; // Clear out the decision words // but leave the vector intact - m_algoDecisionInitial.assign(L1GlobalTriggerReadoutSetup::NumberPhysTriggers,false); - m_algoDecisionPreScaled.assign(L1GlobalTriggerReadoutSetup::NumberPhysTriggers,false); - m_algoDecisionFinal.assign(L1GlobalTriggerReadoutSetup::NumberPhysTriggers,false); + m_algoDecisionInitial.assign(maxPhysicsTriggers,false); + m_algoDecisionPreScaled.assign(maxPhysicsTriggers,false); + m_algoDecisionFinal.assign(maxPhysicsTriggers,false); } @@ -149,8 +174,12 @@ void GlobalAlgBlk::print(std::ostream& myCout) const myCout << " Bx Number (hex): 0x" << std::hex << std::setw(4) << std::setfill('0') << m_bxNr << std::endl; myCout << " Local Bx (hex): 0x" << std::hex << std::setw(1) << std::setfill('0') << m_bxInEvent << std::endl; - - myCout << " Final OR (hex): Ox" << std::hex << std::setw(1) << std::setfill('0') << m_finalOR << std::endl; + + myCout << " PreScale Column: " <-1; i--) { if(m_extDecision.at(i)) digit |= (1 << (i%4)); - if((i%4) == 0){ + if(digit > 0) firstNonZero = true; + if((i%4) == 0 && firstNonZero){ myCout << std::hex << std::setw(1) << digit; digit = 0; + if(i%32 == 0 && i - + + - + + diff --git a/L1Trigger/L1TGlobal/src/GtBoard.cc b/L1Trigger/L1TGlobal/src/GtBoard.cc index 94fdce1879d48..d29296dcade68 100644 --- a/L1Trigger/L1TGlobal/src/GtBoard.cc +++ b/L1Trigger/L1TGlobal/src/GtBoard.cc @@ -1037,9 +1037,9 @@ void l1t::GtBoard::fillExtRecord(int iBxInEvent, } // Set header information - m_uGtExtBlk.setOrbitNr((unsigned int)(orbNr & 0xFFFFFFFF)); - m_uGtExtBlk.setbxNr((bxNr & 0xFFFF)); - m_uGtExtBlk.setbxInEventNr((iBxInEvent & 0xF)); +// m_uGtExtBlk.setOrbitNr((unsigned int)(orbNr & 0xFFFFFFFF)); +// m_uGtExtBlk.setbxNr((bxNr & 0xFFFF)); +// m_uGtExtBlk.setbxInEventNr((iBxInEvent & 0xF)); uGtExtRecord->push_back(iBxInEvent, m_uGtExtBlk); From 89f6b277adec44abc0e67d111f126a78c586fd7b Mon Sep 17 00:00:00 2001 From: Michael Mulhearn Date: Tue, 5 Jan 2016 15:23:38 +0100 Subject: [PATCH 119/250] updates for 2016 L1T global emulation Conflicts: L1Trigger/L1TGlobal/src/GtBoard.cc --- L1Trigger/L1TGlobal/bin/readTestVector.cc | 49 + ...nu_Collisions2015_25nsStage1_v6_uGT_v2.xml | 5363 ++++++++++++++ ...nu_Collisions2015_25nsStage1_v6_uGT_v3.xml | 6207 +++++++++++++++++ .../Luminosity/startup/prescale_L1TGlobal.csv | 514 ++ L1Trigger/L1TGlobal/interface/CaloTemplate.h | 17 +- .../L1TGlobal/interface/ConditionEvaluation.h | 201 +- L1Trigger/L1TGlobal/interface/CorrCondition.h | 144 + .../L1TGlobal/interface/CorrelationTemplate.h | 8 + L1Trigger/L1TGlobal/interface/DEVELOPERS | 3 - .../L1TGlobal/interface/EnergySumTemplate.h | 8 +- L1Trigger/L1TGlobal/interface/GtBoard.h | 25 +- L1Trigger/L1TGlobal/interface/L1TGlobalUtil.h | 164 + L1Trigger/L1TGlobal/interface/MuonTemplate.h | 18 +- L1Trigger/L1TGlobal/plugins/GtProducer.cc | 273 +- L1Trigger/L1TGlobal/plugins/GtProducer.h | 23 +- L1Trigger/L1TGlobal/plugins/GtRecordDump.cc | 57 +- .../L1TGlobal/plugins/L1TGlobalAnalyzer.cc | 366 +- .../L1TGlobal/plugins/TriggerMenuXmlParser.cc | 110 +- .../L1TGlobal/python/hackConditions_cff.py | 36 + L1Trigger/L1TGlobal/python/simDigis_cff.py | 36 + .../L1TGlobal/python/simGtStage2Digis_cfi.py | 23 + L1Trigger/L1TGlobal/src/CaloCondition.cc | 4 +- L1Trigger/L1TGlobal/src/CaloTemplate.cc | 2 + L1Trigger/L1TGlobal/src/CorrCondition.cc | 201 + .../L1TGlobal/src/CorrelationTemplate.cc | 4 +- L1Trigger/L1TGlobal/src/EnergySumCondition.cc | 2 +- L1Trigger/L1TGlobal/src/GtBoard.cc | 184 +- L1Trigger/L1TGlobal/src/L1TGlobalUtil.cc | 529 ++ L1Trigger/L1TGlobal/src/MuCondition.cc | 12 +- .../test/l1tGlobalEmulation_FromDigi.py | 155 + .../test/l1tGlobalEmulation_FromRAW.py | 310 + .../runGlobalFakeInputProducer.py | 72 +- .../unpackBuffers-CaloStage2_uGTEmulation.py | 60 +- 33 files changed, 14790 insertions(+), 390 deletions(-) create mode 100644 L1Trigger/L1TGlobal/data/Luminosity/startup/L1Menu_Collisions2015_25nsStage1_v6_uGT_v2.xml create mode 100644 L1Trigger/L1TGlobal/data/Luminosity/startup/L1Menu_Collisions2015_25nsStage1_v6_uGT_v3.xml create mode 100644 L1Trigger/L1TGlobal/data/Luminosity/startup/prescale_L1TGlobal.csv create mode 100644 L1Trigger/L1TGlobal/interface/CorrCondition.h delete mode 100644 L1Trigger/L1TGlobal/interface/DEVELOPERS create mode 100644 L1Trigger/L1TGlobal/interface/L1TGlobalUtil.h create mode 100644 L1Trigger/L1TGlobal/python/hackConditions_cff.py create mode 100644 L1Trigger/L1TGlobal/python/simDigis_cff.py create mode 100644 L1Trigger/L1TGlobal/python/simGtStage2Digis_cfi.py create mode 100644 L1Trigger/L1TGlobal/src/CorrCondition.cc create mode 100644 L1Trigger/L1TGlobal/src/L1TGlobalUtil.cc create mode 100644 L1Trigger/L1TGlobal/test/l1tGlobalEmulation_FromDigi.py create mode 100644 L1Trigger/L1TGlobal/test/l1tGlobalEmulation_FromRAW.py rename L1Trigger/L1TGlobal/{python => test}/runGlobalFakeInputProducer.py (62%) diff --git a/L1Trigger/L1TGlobal/bin/readTestVector.cc b/L1Trigger/L1TGlobal/bin/readTestVector.cc index bf13a26d01a43..2c682bc05f0bb 100644 --- a/L1Trigger/L1TGlobal/bin/readTestVector.cc +++ b/L1Trigger/L1TGlobal/bin/readTestVector.cc @@ -303,6 +303,55 @@ int main( int argc, char** argv ){ } } + /* + printf(" =========== Dump of results ==========\n"); + for( int i=0; i"); + for( int iSet=0; iSet",iSet+1); + } + printf("\n"); + + printf("-1"); + for( int iSet=0; iSetMAX_ALGO_BITS/2 ) prescale = 5; + else if( iSet==7 && i%2==0 ) prescale = 3; + else if( iSet==8 && i%2==1 ) prescale = 6; + else if( iSet==9 && i%3==0 ) prescale = 4; + else if( iSet==10 ) prescale = 10; + else if( iSet==11 ) prescale = 2; + else if( iSet==12 ) prescale = 1; + + printf(", %d",prescale); + } + printf("\n"); + } + */ if( output ){ histofile->Write(); diff --git a/L1Trigger/L1TGlobal/data/Luminosity/startup/L1Menu_Collisions2015_25nsStage1_v6_uGT_v2.xml b/L1Trigger/L1TGlobal/data/Luminosity/startup/L1Menu_Collisions2015_25nsStage1_v6_uGT_v2.xml new file mode 100644 index 0000000000000..cf74ee8469ef0 --- /dev/null +++ b/L1Trigger/L1TGlobal/data/Luminosity/startup/L1Menu_Collisions2015_25nsStage1_v6_uGT_v2.xml @@ -0,0 +1,5363 @@ + + + + L1Menu_Collisions2015_25nsStage1_v6_uGT_v2 + 2015-09-07T11:31:54 + 46657dee-ce2f-49bb-99fb-593645e44e83 + 2970e974-1893-481c-bdb1-33f947103c86 + This is a subset of the Legacy menu L1Menu_Collisions2015_25nsStage1_v6. This was built for parallel running in Sept 2015. + L1T_Scales_IN2013005 + 0.2.1 + + + + 2015-09-25T13:15:07 + + + + 2015-09-25T13:07:44 + + + + 2015-09-25T12:50:07 + + + + 2015-09-08T13:13:32 + + + + 2015-09-08T12:51:09 + + + + 2015-09-08T12:33:01 + + + + 2015-09-08T12:01:35 + + + + 2015-09-07T17:56:12 + + + + 2015-09-07T13:27:16 + + + + 2015-09-07T12:58:01 + + + Wittmann + 2015-09-07T11:31:54 + + + Arnold + 2015-08-27T17:05:41 + + + Arnold + 2015-08-27T17:04:12 + + + Arnold + 2015-08-27T16:50:52 + + + + 2015-08-17T13:03:43 + + + + 2015-08-17T10:22:24 + + + + 2015-08-10T10:11:04 + + + + 2015-05-26T15:11:04 + + + Bernhard Arnold + 2015-05-22T16:14:39 + + + Bernhard Arnold + 2014-12-18T15:29:42 + + + + 2014-09-16T11:02:26 + + + + 2014-09-16T10:52:10 + + + + 2014-09-16T10:41:12 + + + + 2014-09-12T12:43:36 + + + + + + 3848b35e-e3f3-424c-b914-8a1f58a9304e + SingleEG_5 + + false + single + ge + eg + + + 10 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a6f58a9364e + SingleEG_6 + + false + single + ge + eg + + + 12 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1f58a9884e + SingleEG_10 + + false + single + ge + eg + + + 20 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1f51a9884e + SingleEG_15 + + false + single + ge + eg + + + 30 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1f501a1234 + SingleEG_20 + + false + single + ge + eg + + + 40 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1fab22084e + SingleEG_22 + + false + single + ge + eg + + + 44 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1fab7a984e + SingleEG_25 + + false + single + ge + eg + + + 50 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1fa0b20e6e + SingleEG_30 + + false + single + ge + eg + + + 60 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1fa35b20e6 + SingleEG_35 + + false + single + ge + eg + + + 70 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1fa3540806 + SingleEG_40 + + false + single + ge + eg + + + 80 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + e351a52d-5821-41a3-8805-6587d446335a + SingleJet_100er + + false + single + ge + jet + + + 200 + + 201 + 54 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 22e60a56-d821-45c3-9a31-758241d6f087 + SingleTau_60 + + false + single + ge + tau + + + 120 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c3712875e0a7 + SingleJet_36 + + false + single + ge + jet + + + 72 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c371252ee0a7 + SingleJet_52 + + false + single + ge + jet + + + 104 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c37a682ee0a7 + SingleJet_68 + + false + single + ge + jet + + + 136 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c37a682e92a7 + SingleJet_92 + + false + single + ge + jet + + + 184 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c373cb25e0b7 + SingleJet_128 + + false + single + ge + jet + + + 256 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c37a682e1767 + SingleJet_176 + + false + single + ge + jet + + + 352 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c37a682e1200 + SingleJet_200 + + false + single + ge + jet + + + 400 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 2bff626b-a9e9-46d4-8735-83007c851c8e + SingleEG_20er + + false + single + ge + eg + + + 40 + + 206 + 49 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + af874e2e-5cf6-480d-8d7b-c6525b2cf942 + SingleTau_20er + + false + single + ge + tau + + + 40 + + 206 + 49 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 10fb3377-71de-46fb-bacf-0a39d572ad44 + DoubleEG_10_15 + + false + double + ge + eg + + + 30 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 20 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 10fb3377-71de-46fb-bacf-0a39d5722d44 + DoubleEG_22_10 + + false + double + ge + eg + + + 44 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 20 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 9e132ea0-6a54-4386-917d-669c68045632 + SingleIsoEG_20 + + false + single + ge + eg + + + 40 + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3c710192-6912-4d3e-b6e1-c67ec9835caa + SingleIsoEG_20er + + false + single + ge + eg + + + 40 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3c710192-6912-4d3e-b6e1-c67ec9835c22 + SingleIsoEG_22er + + false + single + ge + eg + + + 44 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 86a17159-cff1-4436-8b2f-1f6e99301e57 + SingleIsoEG_25 + + false + single + ge + eg + + + 50 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 86a17159-cff1-4436-8b2f-1f6e99301e25 + SingleIsoEG_25er + + false + single + ge + eg + + + 50 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 86a17159-cff1-4436-8b2f-1f6e99301e30 + SingleIsoEG_30er + + false + single + ge + eg + + + 60 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3a48248e-b541-4a24-b97a-43b8d48b8041 + SingleNoIsoEG_25 + + false + single + ge + eg + + + 50 + + 206 + 49 + + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 941bbaac-5813-4bcd-999e-c8b209ec020f + SingleNoIsoEG_10 + + false + single + ge + eg + + + 20 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 47b18ce4-e3e8-4869-8998-fd8bb16a104d + DoubleIsoEG_10_8 + + false + double + ge + eg + + + 20 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 1e8d83d8-8efb-40a0-a710-140bf33d56d6 + DoubleIsoEG_14_8 + + false + double + ge + eg + + + 28 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 920bb5be-934a-4ddc-b7e6-383f0a56c02a + DoubleIsoEG_14_10 + + false + double + ge + eg + + + 28 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 20 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 207bfc58-facc-4fee-90f2-57eb35c3c751 + DoubleNoIsoEG_10_8 + + false + double + ge + eg + + + 20 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 207bfc58-facc-4fee-90f2-57eb65c3c756 + DoubleEG_6 + + false + double + ge + eg + + + 12 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 12 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + aee65667-6710-4834-bfa7-adf131672b63 + DoubleNoIsoEG_14_8 + + false + double + ge + eg + + + 28 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + e221f518-ca34-4b14-a4aa-90815c451dfc + DoubleNoIsoEG_14_10 + + false + double + ge + eg + + + 28 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 20 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + d4e771bc-3363-4fb3-bc28-6ba5a7e57286 + SingleNoIsoEG_8 + + false + single + ge + eg + + + 16 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 3323be23-99ad-4b9b-8c2e-15a820e091eb + SingleNoIsoEG_14 + + false + single + ge + eg + + + 28 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 6ca7f197-bf4f-454c-93bc-cabf302fd1ee + TripleIsoEG_14_10_8 + + false + triple + ge + eg + + + 28 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 20 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + c3febd54-8e1d-4695-b31b-889ee36773e6 + TripleNoIsoEG_14_10_8 + + false + triple + ge + eg + + + 28 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 20 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5b0d124a + DoubleJet_52erc + + false + double + ge + jet + + + 104 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 104 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5b0d1256 + DoubleJet_56erc + + false + double + ge + jet + + + 112 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 112 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5b0d184a + DoubleJet_84erc + + false + double + ge + jet + + + 168 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 168 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5b0d100a + DoubleJet_100erc + + false + double + ge + jet + + + 200 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 200 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5b0d112a + DoubleJet_112erc + + false + double + ge + jet + + + 224 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 224 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5684812a + DoubleJet_68_48_erc + + false + double + ge + jet + + + 136 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 96 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5844812a + DoubleJet_84_48_erc + + false + double + ge + jet + + + 168 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 96 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5846812a + DoubleJet_84_68_erc + + false + double + ge + jet + + + 168 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 136 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d58447664 + DoubleJet_76_64_erc + + false + double + ge + jet + + + 152 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 128 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d58449264 + DoubleJet_92_64_erc + + false + double + ge + jet + + + 184 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 128 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d58449276 + DoubleJet_92_76_erc + + false + double + ge + jet + + + 184 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 152 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 300c009f-5186-4318-8f6a-f7684276e75f + QuadJet_40erc + + false + quad + ge + jet + + + 80 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 80 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 80 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 80 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 8e93cb04-2dda-4ac1-ac8c-4649f2c58ac0 + QuadJet_60erc + + false + quad + ge + jet + + + 120 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 120 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 120 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 120 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + b1eb1595-7d1e-41bb-961a-61f2e1cdb6b9 + QuadJet_36erc + + false + quad + ge + jet + + + 72 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 72 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 72 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 72 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 28784e31-f008-4f5b-ad21-85b55b4ed472 + SingleTau_52erc + + false + single + ge + tau + + + 104 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 5114332d-a39c-4a94-9095-b5c396388b4a + TripleEG_14_10_8 + + false + triple + ge + eg + + + 28 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 20 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 16 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + d60f06bc-3e4c-4105-b703-2b5d80db6681 + DoubleTau_40er2p18 + + false + double + ge + tau + + + 80 + + 206 + 49 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 80 + + 206 + 49 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 26d0d902-7245-4a3f-8575-4b09336d64cd + TripleJet_84_68_48_erc + + false + triple + ge + jet + + + 168 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 136 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 96 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 26d0d902-7245-4a3f-8575-4b92766464cd + TripleJet_92_76_64_erc + + false + triple + ge + jet + + + 184 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 152 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 128 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a058161532c + SingleJet_48erf + + false + single + ge + jet + + + 96 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a0581615364 + SingleJet_64erf + + false + single + ge + jet + + + 128 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a0581668e2c + SingleJet_68erf + + false + single + ge + jet + + + 136 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a0581668e76 + SingleJet_76erf + + false + single + ge + jet + + + 152 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a0581668e84 + SingleJet_84erf + + false + single + ge + jet + + + 168 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a0581668e92 + SingleJet_92erf + + false + single + ge + jet + + + 184 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 86516a03-a746-4fbe-b417-cf69e744f52c + SingleEG_25er2p18 + + false + single + ge + eg + + + 50 + + 206 + 49 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + acf8a1dc-7d01-4cb3-8677-547687bd5ff3 + SingleIsoEG_18er + + false + single + ge + eg + + + 36 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 7d450146-d6d6-4713-ae61-2293c1391b60 + DoubleIsoTau_28er + + false + double + ge + tau + + + 56 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 56 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 7d450146-d6d6-4713-ae61-2293c1391b32 + DoubleIsoTau_32er + + false + double + ge + tau + + + 64 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 64 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 7d450146-d6d6-4713-ae61-2293c1391b36 + DoubleIsoTau_36er + + false + double + ge + tau + + + 72 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 72 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 7d450146-d6d6-4713-ae61-2293c1391b40 + DoubleIsoTau_40er + + false + double + ge + tau + + + 80 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 80 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 48359977-675b-46ce-82ae-163c1ac1a8c0 + SingleMu_0er + + false + single + ge + + + 0 + + 319 + 192 + + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 45853ff0-aaf1-43a3-9f82-cefefaf32ca4 + TripleMu_5_5_3 + + false + triple + ge + + + 10 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + 10 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + 6 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + f30a1777-c281-45e0-a7fb-478fec266f97 + SingleMu_12 + + false + single + ge + + + 24 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 8d537ac9-2a56-4d08-a81c-3e38dcfa0c18 + SingleMu_5 + + false + single + ge + + + 10 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 71007324-0f4d-4b0f-a508-e9eaa58c580b + SingleMu_16er + + false + single + ge + + + 32 + + 312 + 199 + + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 4950b10e-0048-40f8-a80c-8ffb2fa658f4 + SingleMu_0_Open + + false + single + ge + + + 0 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + f477295b-e415-44c3-9a37-fa302581037b + SingleMu_6 + + false + single + ge + + + 12 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 0e5f3291-6765-4fec-b812-7b32ee8237f4 + DoubleMu_12_12 + + false + double + ge + + + 24 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + 24 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 0e5f3291-6765-4fec-b812-7b32ee0007f4 + DoubleMu_Open + + false + double + ge + + + 0 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + 0 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 5722e9a0-a621-4f9a-9de4-dd64bfe1de77 + TripleMu_80_40_20 + + false + triple + ge + + + 160 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + 80 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + 40 + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 74b22dd5-56c2-4405-b43f-f753030f5175 + DoubleMu_16pr_16pr_top + PHIs TOP + false + double + ge + + + 32 + + 0 + 287 + + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + 32 + + 0 + 287 + + ign + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 9578fa7f-477e-43f8-b998-e55d3a433fd0 + HTT_125 + + false + ge + htt + + 250 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8145a + ETM_30_pr + + false + ge + etm + + 60 + + 72 + 143 + + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8130a + ETM_30 + + false + ge + etm + + 60 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8140a + ETM_40 + + false + ge + etm + + 80 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8150a + ETM_50 + + false + ge + etm + + 100 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8160a + ETM_60 + + false + ge + etm + + 120 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8170a + ETM_70 + + false + ge + etm + + 140 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8100a + ETM_100 + + false + ge + etm + + 200 + + 0 + + + 3aaa128c-aad3-4999-8325-91288b0a72c0 + HTM_100 + + false + ge + htm + + 200 + + 0 + + + d0b7618c-d607-4a33-bede-b0f933ecd1a3 + HTM_100_pr + + false + ge + htm + + 200 + + 0 + 71 + + + 0 + + + 465b44eb-44cb-4a77-abc3-999e5c19630c + ETT_150 + + false + ge + ett + + 300 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0bd251 + ETT_50 + + false + ge + ett + + 100 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0bd240 + ETT_40 + + false + ge + ett + + 80 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0bd260 + ETT_60 + + false + ge + ett + + 120 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0bef75 + HTT_75 + + false + ge + htt + + 150 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0be100 + HTT_100 + + false + ge + htt + + 200 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0be150 + HTT_150 + + false + ge + htt + + 300 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0be175 + HTT_175 + + false + ge + htt + + 350 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0be200 + HTT_200 + + false + ge + htt + + 400 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0be250 + HTT_250 + + false + ge + htt + + 500 + + 0 + + + aa7971e3-5fda-4773-a845-9f99c6301b9d + HTM_50 + + false + ge + htm + + 100 + + 0 + + + + + a6b320bb-bf7a-4bb5-9646-419af50f6ef4 + L1_SingleEG15 + 4 + SingleEG_15 + + false + + 0 + 52 + + + + b2e57fdb-8e51-4dd6-af0e-bd0e404d40d3 + L1_ETT40 + 6 + ETT_40 + + false + + 0 + 4 + + + + b2e57fdb-8e51-4dd6-af0e-bd0e404d46d3 + L1_ETT60 + 7 + ETT_60 + + false + + 0 + 56 + + + + 6f96956f-9cac-4db1-b318-58ef3e947075 + L1_HTT75 + 8 + HTT_75 + + false + + 0 + 42 + + + + 4b0b77dc-b698-4319-82bd-3272be09100f + L1_DoubleTau40er + 11 + DoubleTau_40er2p18 + + false + + 0 + 13 + + + + 6f96956f-9cac-4db1-b318-58ef3e947100 + L1_HTT100 + 15 + HTT_100 + + false + + 0 + 54 + + + + 2ae40153-9eda-4421-81a8-73455b6123eb + L1_SingleIsoEG20 + 16 + SingleIsoEG_20 + + false + + 0 + 16 + + + + 2ae40153-9eda-4421-81a8-7c2c5b5236eb + L1_SingleJet52 + 17 + SingleJet_52 + + false + + 0 + 10 + + + + 2ae40153-9eda-4421-81a8-7c2c5b5e68eb + L1_SingleJet68 + 18 + SingleJet_68 + + false + + 0 + 41 + + + + 2ae40153-9eda-4421-81a8-7c2c5b5e92eb + L1_SingleJet92 + 19 + SingleJet_92 + + false + + 0 + 2 + + + + 2ae40153-9eda-4421-81a8-7c2c5b6bfeeb + L1_SingleJet128 + 20 + SingleJet_128 + + false + + 0 + 5 + + + + 2ae40153-9eda-4421-81a8-7c2c5b5e176b + L1_SingleJet176 + 21 + SingleJet_176 + + false + + 0 + 32 + + + + 2ae40153-9eda-4421-81a8-7c2c5b5e200b + L1_SingleJet200 + 22 + SingleJet_200 + + false + + 0 + 50 + + + + 2ae40153-9eda-4421-81a8-7c2c5b6b36eb + L1_SingleJet36 + 23 + SingleJet_36 + + false + + 0 + 26 + + + + 1c731190-7027-402b-aea5-e184af7dc895 + L1_DoubleIsoTau32er + 24 + DoubleIsoTau_32er + + false + + 0 + 48 + + + + 8a2959fd-4cd7-440b-9257-bbc9a7572f86 + L1_SingleEG25er_HTT100 + 31 + SingleEG_25er2p18 AND HTT_100 + + false + + 0 + 14 + + + + b7f89bb1-6754-4587-a747-c6a69c4000c7 + L1_DoubleMu_Open + 32 + DoubleMu_Open + + false + + 0 + 9 + + + + 2ae40153-9eda-4421-81a8-734551138757 + L1_SingleIsoEG25er + 33 + SingleIsoEG_25er + + false + + 0 + 44 + + + + 2ae40153-9eda-4421-81a8-734559938757 + L1_SingleIsoEG25 + 34 + SingleIsoEG_25 + + false + + 0 + 25 + + + + 2ae40153-9eda-4421-81a8-734551138757 + L1_SingleIsoEG30er + 36 + SingleIsoEG_30er + + false + + 0 + 11 + + + + 774faa39-628e-4e81-8758-b10243217d81 + L1_SingleEG10 + 37 + SingleEG_10 + + false + + 0 + 36 + + + + 2ae40153-9eda-4421-81a8-734559982557 + L1_SingleIsoEG22er + 38 + SingleIsoEG_22er + + false + + 0 + 33 + + + + 3e120881-e8d1-49ab-b5e9-0542152cdea3 + L1_DoubleJet52erc + 40 + DoubleJet_52erc + + false + + 0 + 31 + + + + 3e120881-e8d1-49ab-b5e9-0542184cdea3 + L1_DoubleJet84erc + 41 + DoubleJet_84erc + + false + + 0 + 45 + + + + 3e120881-e8d1-49ab-b5e9-0542112cdea3 + L1_DoubleJet112erc + 43 + DoubleJet_112erc + + false + + 0 + 27 + + + + f5a73f58-83e0-4492-9cd3-3324a145a40a + L1_QuadJet40erc + 46 + QuadJet_40erc + + false + + 0 + 46 + + + + 774faa39-628e-4e81-8758-b81543217d81 + L1_SingleEG5 + 47 + SingleEG_5 + + false + + 0 + 51 + + + + 774faa39-628e-4e81-8758-b102420e5481 + L1_SingleEG25 + 48 + SingleEG_25 + + false + + 0 + 12 + + + + 774faa39-628e-4e81-8758-b10240eab79c + L1_SingleEG40 + 49 + SingleEG_40 + + false + + 0 + 49 + + + + 2ae40153-9eda-4421-81a8-7345599823eb + L1_SingleIsoEG20er + 51 + SingleIsoEG_20er + + false + + 0 + 21 + + + + 774faa39-628e-4e81-8758-b10243225481 + L1_SingleEG20 + 52 + SingleEG_20 + + false + + 0 + 7 + + + + 16ff2d06-469a-4ef1-8eb2-66eb8f17e48e + L1_SingleEG30 + 53 + SingleEG_30 + + false + + 0 + 57 + + + + 774faa39-628e-4e81-8758-b102420ab79c + L1_SingleEG35 + 54 + SingleEG_35 + + false + + 0 + 29 + + + + 994fdda9-f0eb-475d-8cf1-fdc4495a133d + L1_SingleMuOpen + 55 + SingleMu_0_Open + + false + + 0 + 22 + + + + 176cab73-d645-42a7-b23b-76c0839f9e30 + L1_ETM30 + 66 + ETM_30 + + false + + 0 + 20 + + + + 176cab73-d645-42a7-b23b-76c0839f9e50 + L1_ETM50 + 67 + ETM_50 + + false + + 0 + 39 + + + + 176cab73-d645-42a7-b23b-76c0839f9e70 + L1_ETM70 + 68 + ETM_70 + + false + + 0 + 35 + + + + 176cab73-d645-42a7-b23b-76c0839f9100 + L1_ETM100 + 69 + ETM_100 + + false + + 0 + 6 + + + + 6f96956f-9cac-4db1-b318-58ef3e947125 + L1_HTT125 + 70 + HTT_125 + + false + + 0 + 8 + + + + 6f96956f-9cac-4db1-b318-58ef3e947150 + L1_HTT150 + 71 + HTT_150 + + false + + 0 + 40 + + + + 6f96956f-9cac-4db1-b318-58ef3e947175 + L1_HTT175 + 72 + HTT_175 + + false + + 0 + 47 + + + + 6f96956f-9cac-4db1-b318-58ef3e947200 + L1_HTT200 + 73 + HTT_200 + + false + + 0 + 37 + + + + 2ae40153-9eda-4421-81a8-7c2c5b6123eb + L1_SingleIsoEG18er + 76 + SingleIsoEG_18er + + false + + 0 + 30 + + + + 176cab73-d645-42a7-b23b-76c0839f9e40 + L1_ETM40 + 79 + ETM_40 + + false + + 0 + 53 + + + + 6f96956f-9cac-4db1-b318-58ef3e947250 + L1_HTT250 + 80 + HTT_250 + + false + + 0 + 19 + + + + 07d052d0-222b-4a74-9dfb-ceee190699d3 + L1_DoubleEG6_HTT150 + 92 + ( DoubleEG_6 ) AND HTT_150 + + false + + 0 + 1 + + + + d366ac4d-d7b1-45fd-a422-889d99dcc75d + L1_QuadJet36erc_SingleTau52erc + 93 + QuadJet_36erc AND SingleTau_52erc + + false + + 0 + 28 + + + + c09b4dce-9e48-44f3-8c89-2bc43dc627d6 + L1_TripleEG_14_10_8 + 100 + TripleEG_14_10_8 + + false + + 0 + 23 + + + + e3c5ac45-8722-4bf9-962c-ca88eedf7273 + L1_DoubleEG_15_10 + 101 + DoubleEG_10_15 + + false + + 0 + 17 + + + + 9ae44fd3-a1cc-4406-ada1-8c20a5ced629 + L1_DoubleEG_22_10 + 102 + DoubleEG_22_10 + + false + + 0 + 0 + + + + 176cab73-d645-42a7-b23b-76c0839f9e60 + L1_ETM60 + 109 + ETM_60 + + false + + 0 + 3 + + + + 3e120881-e8d1-49ab-b5e9-0542100cdea3 + L1_DoubleJet100erc + 110 + DoubleJet_100erc + + false + + 0 + 18 + + + + f5a73f58-83e0-4492-9cd3-3324a145a60a + L1_QuadJet60erc + 111 + QuadJet_60erc + + false + + 0 + 15 + + + + bad86d03-0c79-4410-83ea-dd1631556eb9 + L1_DoubleJet56erc_ETM60 + 113 + DoubleJet_56erc AND ETM_60 + + false + + 0 + 55 + + + + 1c731190-7027-402b-aea5-e184af7dc2ed + L1_DoubleIsoTau28er + 116 + DoubleIsoTau_28er + + false + + 0 + 24 + + + + 1c731190-7027-402b-aea5-e184af7dc142 + L1_DoubleIsoTau36er + 117 + DoubleIsoTau_36er + + false + + 0 + 43 + + + + 1c731190-7027-402b-aea5-e184af7d5582 + L1_DoubleIsoTau40er + 118 + DoubleIsoTau_40er + + false + + 0 + 58 + + + + 00b1bf02-6249-4ab2-a5d7-e0226bc672a6 + L1_TripleJet_92_76_64_VBF + 119 + TripleJet_92_76_64_erc OR (DoubleJet_92_76_erc AND SingleJet_64erf ) OR (DoubleJet_92_64_erc AND SingleJet_76erf ) OR (DoubleJet_76_64_erc AND SingleJet_92erf ) + + false + + 0 + 34 + + + + 6024f5d6-6ea9-4faa-a857-ab532c207714 + L1_TripleJet_84_68_48_VBF + 120 + TripleJet_84_68_48_erc OR (DoubleJet_84_68_erc AND SingleJet_48erf ) OR (DoubleJet_84_48_erc AND SingleJet_68erf ) OR (DoubleJet_68_48_erc AND SingleJet_84erf ) + + false + + 0 + 38 + + + + \ No newline at end of file diff --git a/L1Trigger/L1TGlobal/data/Luminosity/startup/L1Menu_Collisions2015_25nsStage1_v6_uGT_v3.xml b/L1Trigger/L1TGlobal/data/Luminosity/startup/L1Menu_Collisions2015_25nsStage1_v6_uGT_v3.xml new file mode 100644 index 0000000000000..4a9053a81bd88 --- /dev/null +++ b/L1Trigger/L1TGlobal/data/Luminosity/startup/L1Menu_Collisions2015_25nsStage1_v6_uGT_v3.xml @@ -0,0 +1,6207 @@ + + + + L1Menu_Collisions2015_25nsStage1_v6_uGT_v3 + 2015-09-07T11:31:54 + 2227edf0-3676-4c1b-854c-ddf4d987b8aa + 03dc5297-a975-4fb6-868f-91965f4a142e + This is a subset of the Legacy menu L1Menu_Collisions2015_25nsStage1_v6. This was built for parallel running in Sept 2015. + L1T_Scales_IN2013005 + 0.2.1 + + + + 2015-11-04T17:03:05 + + + + 2015-11-04T16:36:34 + + + + 2015-11-04T15:41:26 + + + + 2015-09-25T13:15:07 + + + + 2015-09-25T13:07:44 + + + + 2015-09-25T12:50:07 + + + + 2015-09-08T13:13:32 + + + + 2015-09-08T12:51:09 + + + + 2015-09-08T12:33:01 + + + + 2015-09-08T12:01:35 + + + + 2015-09-07T17:56:12 + + + + 2015-09-07T13:27:16 + + + + 2015-09-07T12:58:01 + + + Wittmann + 2015-09-07T11:31:54 + + + Arnold + 2015-08-27T17:05:41 + + + Arnold + 2015-08-27T17:04:12 + + + Arnold + 2015-08-27T16:50:52 + + + + 2015-08-17T13:03:43 + + + + 2015-08-17T10:22:24 + + + + 2015-08-10T10:11:04 + + + + 2015-05-26T15:11:04 + + + Bernhard Arnold + 2015-05-22T16:14:39 + + + Bernhard Arnold + 2014-12-18T15:29:42 + + + + 2014-09-16T11:02:26 + + + + 2014-09-16T10:52:10 + + + + 2014-09-16T10:41:12 + + + + 2014-09-12T12:43:36 + + + + + + 3848b35e-e3f3-424c-b914-8a1f58a9304e + SingleEG_5 + + false + single + ge + eg + + + 10 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a6f58a9364e + SingleEG_6 + + false + single + ge + eg + + + 12 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1f58a9884e + SingleEG_10 + + false + single + ge + eg + + + 20 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1f51a9884e + SingleEG_15 + + false + single + ge + eg + + + 30 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1f501a1234 + SingleEG_20 + + false + single + ge + eg + + + 40 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1fab22084e + SingleEG_22 + + false + single + ge + eg + + + 44 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1fab7a984e + SingleEG_25 + + false + single + ge + eg + + + 50 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1fa0b20e6e + SingleEG_30 + + false + single + ge + eg + + + 60 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1fa35b20e6 + SingleEG_35 + + false + single + ge + eg + + + 70 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3848b35e-e3f3-424c-b914-8a1fa3540806 + SingleEG_40 + + false + single + ge + eg + + + 80 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + e351a52d-5821-41a3-8805-6587d446335a + SingleJet_100er + + false + single + ge + jet + + + 200 + + 201 + 54 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 22e60a56-d821-45c3-9a31-758241d6f087 + SingleTau_60 + + false + single + ge + tau + + + 120 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c3712875e0a7 + SingleJet_36 + + false + single + ge + jet + + + 72 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c371252ee0a7 + SingleJet_52 + + false + single + ge + jet + + + 104 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c37a682ee0a7 + SingleJet_68 + + false + single + ge + jet + + + 136 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c37a682e92a7 + SingleJet_92 + + false + single + ge + jet + + + 184 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c373cb25e0b7 + SingleJet_128 + + false + single + ge + jet + + + 256 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c37a682e1767 + SingleJet_176 + + false + single + ge + jet + + + 352 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 00453da9-1cd4-4d25-bdf6-c37a682e1200 + SingleJet_200 + + false + single + ge + jet + + + 400 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 2bff626b-a9e9-46d4-8735-83007c851c8e + SingleEG_20er + + false + single + ge + eg + + + 40 + + 206 + 49 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + af874e2e-5cf6-480d-8d7b-c6525b2cf942 + SingleTau_20er + + false + single + ge + tau + + + 40 + + 206 + 49 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 10fb3377-71de-46fb-bacf-0a39d572ad44 + DoubleEG_10_15 + + false + double + ge + eg + + + 30 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 20 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 10fb3377-71de-46fb-bacf-0a39d5722d44 + DoubleEG_22_10 + + false + double + ge + eg + + + 44 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 20 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 9e132ea0-6a54-4386-917d-669c68045632 + SingleIsoEG_20 + + false + single + ge + eg + + + 40 + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3c710192-6912-4d3e-b6e1-c67ec9835caa + SingleIsoEG_20er + + false + single + ge + eg + + + 40 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3c710192-6912-4d3e-b6e1-c67ec9835c22 + SingleIsoEG_22er + + false + single + ge + eg + + + 44 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 86a17159-cff1-4436-8b2f-1f6e99301e57 + SingleIsoEG_25 + + false + single + ge + eg + + + 50 + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 86a17159-cff1-4436-8b2f-1f6e99301e25 + SingleIsoEG_25er + + false + single + ge + eg + + + 50 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 86a17159-cff1-4436-8b2f-1f6e99301e30 + SingleIsoEG_30er + + false + single + ge + eg + + + 60 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 3a48248e-b541-4a24-b97a-43b8d48b8041 + SingleNoIsoEG_25 + + false + single + ge + eg + + + 50 + + 206 + 49 + + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 941bbaac-5813-4bcd-999e-c8b209ec020f + SingleNoIsoEG_10 + + false + single + ge + eg + + + 20 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 47b18ce4-e3e8-4869-8998-fd8bb16a104d + DoubleIsoEG_10_8 + + false + double + ge + eg + + + 20 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 1e8d83d8-8efb-40a0-a710-140bf33d56d6 + DoubleIsoEG_14_8 + + false + double + ge + eg + + + 28 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 920bb5be-934a-4ddc-b7e6-383f0a56c02a + DoubleIsoEG_14_10 + + false + double + ge + eg + + + 28 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 20 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 207bfc58-facc-4fee-90f2-57eb35c3c751 + DoubleNoIsoEG_10_8 + + false + double + ge + eg + + + 20 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 207bfc58-facc-4fee-90f2-57eb65c3c756 + DoubleEG_6 + + false + double + ge + eg + + + 12 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 12 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + aee65667-6710-4834-bfa7-adf131672b63 + DoubleNoIsoEG_14_8 + + false + double + ge + eg + + + 28 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + e221f518-ca34-4b14-a4aa-90815c451dfc + DoubleNoIsoEG_14_10 + + false + double + ge + eg + + + 28 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 20 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + d4e771bc-3363-4fb3-bc28-6ba5a7e57286 + SingleNoIsoEG_8 + + false + single + ge + eg + + + 16 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 3323be23-99ad-4b9b-8c2e-15a820e091eb + SingleNoIsoEG_14 + + false + single + ge + eg + + + 28 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 6ca7f197-bf4f-454c-93bc-cabf302fd1ee + TripleIsoEG_14_10_8 + + false + triple + ge + eg + + + 28 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 20 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + false + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + c3febd54-8e1d-4695-b31b-889ee36773e6 + TripleNoIsoEG_14_10_8 + + false + triple + ge + eg + + + 28 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 20 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 16 + + true + false + false + false + false + false + false + false + false + false + false + false + false + false + false + false + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5b0d124a + DoubleJet_52erc + + false + double + ge + jet + + + 104 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 104 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5b0d1256 + DoubleJet_56erc + + false + double + ge + jet + + + 112 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 112 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5b0d184a + DoubleJet_84erc + + false + double + ge + jet + + + 168 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 168 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5b0d100a + DoubleJet_100erc + + false + double + ge + jet + + + 200 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 200 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5b0d112a + DoubleJet_112erc + + false + double + ge + jet + + + 224 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 224 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5684812a + DoubleJet_68_48_erc + + false + double + ge + jet + + + 136 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 96 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5844812a + DoubleJet_84_48_erc + + false + double + ge + jet + + + 168 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 96 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d5846812a + DoubleJet_84_68_erc + + false + double + ge + jet + + + 168 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 136 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d58447664 + DoubleJet_76_64_erc + + false + double + ge + jet + + + 152 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 128 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d58449264 + DoubleJet_92_64_erc + + false + double + ge + jet + + + 184 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 128 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 64ed2d7b-6204-484c-bf4c-014d58449276 + DoubleJet_92_76_erc + + false + double + ge + jet + + + 184 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 152 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 300c009f-5186-4318-8f6a-f7684276e75f + QuadJet_40erc + + false + quad + ge + jet + + + 80 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 80 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 80 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 80 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 8e93cb04-2dda-4ac1-ac8c-4649f2c58ac0 + QuadJet_60erc + + false + quad + ge + jet + + + 120 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 120 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 120 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 120 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + b1eb1595-7d1e-41bb-961a-61f2e1cdb6b9 + QuadJet_36erc + + false + quad + ge + jet + + + 72 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 72 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 72 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 72 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 28784e31-f008-4f5b-ad21-85b55b4ed472 + SingleTau_52erc + + false + single + ge + tau + + + 104 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 5114332d-a39c-4a94-9095-b5c396388b4a + TripleEG_14_10_8 + + false + triple + ge + eg + + + 28 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 20 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 16 + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + d60f06bc-3e4c-4105-b703-2b5d80db6681 + DoubleTau_40er2p18 + + false + double + ge + tau + + + 80 + + 206 + 49 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 80 + + 206 + 49 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 26d0d902-7245-4a3f-8575-4b09336d64cd + TripleJet_84_68_48_erc + + false + triple + ge + jet + + + 168 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 136 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 96 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 26d0d902-7245-4a3f-8575-4b92766464cd + TripleJet_92_76_64_erc + + false + triple + ge + jet + + + 184 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 152 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 128 + + 187 + 68 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a058161532c + SingleJet_48erf + + false + single + ge + jet + + + 96 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a0581615364 + SingleJet_64erf + + false + single + ge + jet + + + 128 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a0581668e2c + SingleJet_68erf + + false + single + ge + jet + + + 136 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a0581668e76 + SingleJet_76erf + + false + single + ge + jet + + + 152 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a0581668e84 + SingleJet_84erf + + false + single + ge + jet + + + 168 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + f811972e-a722-4152-ae9a-3a0581668e92 + SingleJet_92erf + + false + single + ge + jet + + + 184 + + 141 + 186 + + + 69 + 114 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 86516a03-a746-4fbe-b417-cf69e744f52c + SingleEG_25er2p18 + + false + single + ge + eg + + + 50 + + 206 + 49 + + + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + acf8a1dc-7d01-4cb3-8677-547687bd5ff3 + SingleIsoEG_18er + + false + single + ge + eg + + + 36 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 7d450146-d6d6-4713-ae61-2293c1391b60 + DoubleIsoTau_28er + + false + double + ge + tau + + + 56 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 56 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 7d450146-d6d6-4713-ae61-2293c1391b32 + DoubleIsoTau_32er + + false + double + ge + tau + + + 64 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 64 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 7d450146-d6d6-4713-ae61-2293c1391b36 + DoubleIsoTau_36er + + false + double + ge + tau + + + 72 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 72 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 7d450146-d6d6-4713-ae61-2293c1391b40 + DoubleIsoTau_40er + + false + double + ge + tau + + + 80 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 80 + + 206 + 49 + + + false + true + true + true + true + true + true + true + true + true + true + true + true + true + true + true + + + + 0 + + + 45853ff0-aaf1-43a3-9f82-cefefaf32ca4 + TripleMu_5_5_3HighQ + + false + triple + ge + + + 10 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + 10 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + 6 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + f30a1777-c281-45e0-a7fb-478fec266f97 + SingleMu_BeamHalo + + false + single + ge + + + 0 + ign + + true + true + true + true + false + false + false + false + false + false + false + false + false + false + false + false + + + true + true + true + true + + + + ig + 0 + + + 4950b10e-0048-40f8-a80c-8ffb2fa658f4 + SingleMu_0_Open + + false + single + ge + + + 0 + ign + + false + false + false + false + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 0e5f3291-6765-4fec-b812-7b32ee8237f4 + DoubleMu_12_5HighQ + + false + double + ge + + + 24 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + 10 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 0e5f3291-6765-4fec-b812-7b32ee821035 + DoubleMu_10_3p5HighQ + + false + double + ge + + + 20 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + 7 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 0e5f3291-6765-4fec-b812-7b32ee823700 + DoubleMu_0HighQ + + false + double + ge + + + 0 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + 0 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 0e5f3291-6765-4fec-b812-7b32ee821000 + DoubleMu_10HighQ_Open + + false + double + ge + + + 20 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + 0 + ign + + false + false + false + false + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 0e5f3291-6765-4fec-b812-7b32ee0007f4 + DoubleMu_Open + + false + double + ge + + + 0 + ign + + false + false + false + false + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + 0 + ign + + false + false + false + false + true + true + true + true + true + true + true + true + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 5722e9a0-a621-4f9a-9de4-dd64bfe1de77 + TripleMu_0_0_0HighQ + + false + triple + ge + + + 0 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + 0 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + 0 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 3dfcb482-bb9d-47e6-b1ae-8b82f0854e86 + SingleMu_5 + + false + single + ge + + + 10 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 3dfcb482-bb9d-47e6-b1ae-8b82f0854e66 + SingleMu_6 + + false + single + ge + + + 12 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 3dfcb482-bb9d-47e6-b1ae-8b82f0854e88 + SingleMu_8 + + false + single + ge + + + 16 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 3dfcb482-bb9d-47e6-b1ae-8b82f0854146 + SingleMu_7 + + false + single + ge + + + 14 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 3dfcb482-bb9d-47e6-b1ae-8b82f0854246 + SingleMu_12 + + false + single + ge + + + 24 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 3dfcb482-bb9d-47e6-b1ae-8b82f0854326 + SingleMu_16 + + false + single + ge + + + 32 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 3dfcb482-bb9d-47e6-b1ae-8b82f0854406 + SingleMu_20 + + false + single + ge + + + 40 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 3dfcb482-bb9d-47e6-b1ae-8b82f0854506 + SingleMu_25 + + false + single + ge + + + 50 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 3dfcb482-bb9d-47e6-b1ae-8b82f0854606 + SingleMu_30 + + false + single + ge + + + 60 + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 8e2af78d-450d-476e-9a22-bb2e2577c11a + SingleMu_14er2p1 + + false + single + ge + + + 28 + + 319 + 192 + + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 8e2af78d-450d-476e-9a22-bb2e2577c110 + SingleMu_10er2p1 + + false + single + ge + + + 20 + + 319 + 192 + + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 8e2af78d-450d-476e-9a22-bb2e2577c100 + SingleMu_0er2p1 + + false + single + ge + + + 0 + + 319 + 192 + + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 8e2af78d-450d-476e-9a22-bb2e2577c116 + SingleMu_16er2p1 + + false + single + ge + + + 32 + + 319 + 192 + + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 8e2af78d-450d-476e-9a22-bb2e2577c120 + SingleMu_20er2p1 + + false + single + ge + + + 40 + + 319 + 192 + + ign + + false + false + false + false + false + false + false + false + false + false + false + false + true + true + true + true + + + true + true + true + true + + + + ig + 0 + + + 9578fa7f-477e-43f8-b998-e55d3a433fd0 + HTT_125 + + false + ge + htt + + 250 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec81455 + ETM_55 + + false + ge + etm + + 110 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8130a + ETM_30 + + false + ge + etm + + 60 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8140a + ETM_40 + + false + ge + etm + + 80 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8150a + ETM_50 + + false + ge + etm + + 100 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8160a + ETM_60 + + false + ge + etm + + 120 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8170a + ETM_70 + + false + ge + etm + + 140 + + 0 + + + 589d78e7-0ec6-4a02-b151-572dcec8100a + ETM_100 + + false + ge + etm + + 200 + + 0 + + + 3aaa128c-aad3-4999-8325-91288b0a72c0 + HTM_100 + + false + ge + htm + + 200 + + 0 + + + d0b7618c-d607-4a33-bede-b0f933ecd1a3 + HTM_100_pr + + false + ge + htm + + 200 + + 0 + 71 + + + 0 + + + 465b44eb-44cb-4a77-abc3-999e5c19630c + ETT_150 + + false + ge + ett + + 300 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0bd251 + ETT_50 + + false + ge + ett + + 100 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0bd240 + ETT_40 + + false + ge + ett + + 80 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0bd260 + ETT_60 + + false + ge + ett + + 120 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0be050 + HTT_50 + + false + ge + htt + + 100 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0bef75 + HTT_75 + + false + ge + htt + + 150 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0be100 + HTT_100 + + false + ge + htt + + 200 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0be150 + HTT_150 + + false + ge + htt + + 300 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0be175 + HTT_175 + + false + ge + htt + + 350 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0be200 + HTT_200 + + false + ge + htt + + 400 + + 0 + + + 6d8f794e-0579-4608-aba2-5a1c0c0be250 + HTT_250 + + false + ge + htt + + 500 + + 0 + + + aa7971e3-5fda-4773-a845-9f99c6301b9d + HTM_50 + + false + ge + htm + + 100 + + 0 + + + + + 4caf75a2-b2d9-42e9-b409-da31a6683e07 + L1_SingleMu7 + 3 + SingleMu_7 + + false + + 0 + 11 + + + + a6b320bb-bf7a-4bb5-9646-419af50f6ef4 + L1_SingleEG15 + 4 + SingleEG_15 + + false + + 0 + 54 + + + + b2e57fdb-8e51-4dd6-af0e-bd0e404d40d3 + L1_ETT40 + 6 + ETT_40 + + false + + 0 + 63 + + + + b2e57fdb-8e51-4dd6-af0e-bd0e404d46d3 + L1_ETT60 + 7 + ETT_60 + + false + + 0 + 21 + + + + 6f96956f-9cac-4db1-b318-58ef3e947075 + L1_HTT75 + 8 + HTT_75 + + false + + 0 + 57 + + + + 4b0b77dc-b698-4319-82bd-3272be09100f + L1_DoubleTau40er + 11 + DoubleTau_40er2p18 + + false + + 0 + 40 + + + + 6f96956f-9cac-4db1-b318-58ef3e947100 + L1_HTT100 + 15 + HTT_100 + + false + + 0 + 22 + + + + 2ae40153-9eda-4421-81a8-73455b6123eb + L1_SingleIsoEG20 + 16 + SingleIsoEG_20 + + false + + 0 + 45 + + + + 2ae40153-9eda-4421-81a8-7c2c5b5236eb + L1_SingleJet52 + 17 + SingleJet_52 + + false + + 0 + 8 + + + + 2ae40153-9eda-4421-81a8-7c2c5b5e68eb + L1_SingleJet68 + 18 + SingleJet_68 + + false + + 0 + 35 + + + + 2ae40153-9eda-4421-81a8-7c2c5b5e92eb + L1_SingleJet92 + 19 + SingleJet_92 + + false + + 0 + 31 + + + + 2ae40153-9eda-4421-81a8-7c2c5b6bfeeb + L1_SingleJet128 + 20 + SingleJet_128 + + false + + 0 + 48 + + + + 2ae40153-9eda-4421-81a8-7c2c5b5e176b + L1_SingleJet176 + 21 + SingleJet_176 + + false + + 0 + 25 + + + + 2ae40153-9eda-4421-81a8-7c2c5b5e200b + L1_SingleJet200 + 22 + SingleJet_200 + + false + + 0 + 32 + + + + 2ae40153-9eda-4421-81a8-7c2c5b6b36eb + L1_SingleJet36 + 23 + SingleJet_36 + + false + + 0 + 59 + + + + 1c731190-7027-402b-aea5-e184af7dc895 + L1_DoubleIsoTau32er + 24 + DoubleIsoTau_32er + + false + + 0 + 4 + + + + 8a2959fd-4cd7-440b-9257-bbc9a7572f86 + L1_SingleEG25er_HTT100 + 31 + SingleEG_25er2p18 AND HTT_100 + + false + + 0 + 23 + + + + b7f89bb1-6754-4587-a747-c6a69c4000c7 + L1_DoubleMu_Open + 32 + DoubleMu_Open + + false + + 0 + 38 + + + + b7f89bb1-6754-4587-a747-c6a69c401000 + L1_DoubleMu10HighQ_Open + 44 + DoubleMu_10HighQ_Open + + false + + 0 + 72 + + + + b7f89bb1-6754-4587-a747-c6a69c400000 + L1_DoubleMu0HighQ + 26 + DoubleMu_0HighQ + + false + + 0 + 71 + + + + b7f89bb1-6754-4587-a747-c6a69c050503 + L1_TripleMu5_5_3HighQ + 98 + TripleMu_5_5_3HighQ + + false + + 0 + 74 + + + + b7f89bb1-6754-4587-a747-c6a69c000000 + L1_TripleMu0_0_0HighQ + 97 + TripleMu_0_0_0HighQ + + false + + 0 + 75 + + + + b7f89bb1-6754-4587-a747-c6a69c401205 + L1_DoubleMu12_5HighQ + 124 + DoubleMu_12_5HighQ + + false + + 0 + 70 + + + + b7f89bb1-6754-4587-a747-c6a69c401035 + L1_DoubleMu10_3p5HighQ + 45 + DoubleMu_10_3p5HighQ + + false + + 0 + 73 + + + + 2ae40153-9eda-4421-81a8-734551138757 + L1_SingleIsoEG25er + 33 + SingleIsoEG_25er + + false + + 0 + 44 + + + + 2ae40153-9eda-4421-81a8-734559938757 + L1_SingleIsoEG25 + 34 + SingleIsoEG_25 + + false + + 0 + 43 + + + + 2ae40153-9eda-4421-81a8-734551138757 + L1_SingleIsoEG30er + 36 + SingleIsoEG_30er + + false + + 0 + 64 + + + + 774faa39-628e-4e81-8758-b10243217d81 + L1_SingleEG10 + 37 + SingleEG_10 + + false + + 0 + 28 + + + + 2ae40153-9eda-4421-81a8-734559982557 + L1_SingleIsoEG22er + 38 + SingleIsoEG_22er + + false + + 0 + 30 + + + + 3e120881-e8d1-49ab-b5e9-0542152cdea3 + L1_DoubleJet52erc + 40 + DoubleJet_52erc + + false + + 0 + 27 + + + + 3e120881-e8d1-49ab-b5e9-0542184cdea3 + L1_DoubleJet84erc + 41 + DoubleJet_84erc + + false + + 0 + 3 + + + + c942ff89-7bef-4ab8-887e-db9a1b5d0820 + L1_SingleMu20er2p1 + 60 + SingleMu_20er2p1 + + false + + 0 + 69 + + + + c942ff89-7bef-4ab8-887e-db9a1b5d0866 + L1_SingleMu16er2p1 + 86 + SingleMu_16er2p1 + + false + + 0 + 68 + + + + c942ff89-7bef-4ab8-887e-db9a1b5d086f + L1_SingleMu14er2p1 + 42 + SingleMu_14er2p1 + + false + + 0 + 66 + + + + c942ff89-7bef-4ab8-887e-db9a1b5d0040 + L1_SingleMu0er2p1_ETM40 + 94 + SingleMu_0er2p1 AND ETM_40 + + false + + 0 + 76 + + + + c942ff89-7bef-4ab8-887e-db9a1b5d6100 + L1_SingleMu6_HTT100 + 87 + SingleMu_6 AND HTT_100 + + false + + 0 + 78 + + + + c942ff89-7bef-4ab8-887e-db9a1b5d0850 + L1_SingleMu8_HTT50 + 63 + SingleMu_8 AND HTT_50 + + false + + 0 + 79 + + + + c942ff89-7bef-4ab8-887e-db9a1b5d1030 + L1_SingleMu10er2p1_ETM30 + 82 + SingleMu_10er2p1 AND ETM_30 + + false + + 0 + 80 + + + + c942ff89-7bef-4ab8-887e-db9a1b5d1050 + L1_SingleMu10er2p1_ETM50 + 83 + SingleMu_10er2p1 AND ETM_50 + + false + + 0 + 81 + + + + c942ff89-7bef-4ab8-887e-db9a1b5d1430 + L1_SingleMu14er2p1_ETM30 + 84 + SingleMu_14er2p1 AND ETM_30 + + false + + 0 + 82 + + + + c942ff89-7bef-4ab8-887e-db9a1b5d0055 + L1_SingleMu0er2p1_ETM55 + 104 + SingleMu_0er2p1 AND ETM_55 + + false + + 0 + 77 + + + + 3e120881-e8d1-49ab-b5e9-0542112cdea3 + L1_DoubleJet112erc + 43 + DoubleJet_112erc + + false + + 0 + 36 + + + + f5a73f58-83e0-4492-9cd3-3324a145a40a + L1_QuadJet40erc + 46 + QuadJet_40erc + + false + + 0 + 15 + + + + 774faa39-628e-4e81-8758-b81543217d81 + L1_SingleEG5 + 47 + SingleEG_5 + + false + + 0 + 49 + + + + 774faa39-628e-4e81-8758-b102420e5481 + L1_SingleEG25 + 48 + SingleEG_25 + + false + + 0 + 46 + + + + 774faa39-628e-4e81-8758-b10240eab79c + L1_SingleEG40 + 49 + SingleEG_40 + + false + + 0 + 41 + + + + 2ae40153-9eda-4421-81a8-7345599823eb + L1_SingleIsoEG20er + 51 + SingleIsoEG_20er + + false + + 0 + 9 + + + + 774faa39-628e-4e81-8758-b10243225481 + L1_SingleEG20 + 52 + SingleEG_20 + + false + + 0 + 34 + + + + 16ff2d06-469a-4ef1-8eb2-66eb8f17e48e + L1_SingleEG30 + 53 + SingleEG_30 + + false + + 0 + 61 + + + + 774faa39-628e-4e81-8758-b102420ab79c + L1_SingleEG35 + 54 + SingleEG_35 + + false + + 0 + 55 + + + + 994fdda9-f0eb-475d-8cf1-fdc4495a133d + L1_SingleMuOpen + 55 + SingleMu_0_Open + + false + + 0 + 29 + + + + 4caf75a2-b2d9-42e9-b409-da31a6683e16 + L1_SingleMu16 + 56 + SingleMu_16 + + false + + 0 + 12 + + + + 4caf75a2-b2d9-42e9-b409-da31a6683e01 + L1_SingleMu5 + 58 + SingleMu_5 + + false + + 0 + 58 + + + + 4caf75a2-b2d9-42e9-b409-da31a6683e12 + L1_SingleMu12 + 61 + SingleMu_12 + + false + + 0 + 33 + + + + 4caf75a2-b2d9-42e9-b409-da31a6683e20 + L1_SingleMu20 + 62 + SingleMu_20 + + false + + 0 + 14 + + + + 4caf75a2-b2d9-42e9-b409-da31a6683e25 + L1_SingleMu25 + 64 + SingleMu_25 + + false + + 0 + 51 + + + + 4caf75a2-b2d9-42e9-b409-da31a6683e30 + L1_SingleMu30 + 65 + SingleMu_30 + + false + + 0 + 37 + + + + 176cab73-d645-42a7-b23b-76c0839f9e30 + L1_ETM30 + 66 + ETM_30 + + false + + 0 + 19 + + + + 176cab73-d645-42a7-b23b-76c0839f9e50 + L1_ETM50 + 67 + ETM_50 + + false + + 0 + 24 + + + + 176cab73-d645-42a7-b23b-76c0839f9e70 + L1_ETM70 + 68 + ETM_70 + + false + + 0 + 7 + + + + 176cab73-d645-42a7-b23b-76c0839f9100 + L1_ETM100 + 69 + ETM_100 + + false + + 0 + 62 + + + + 6f96956f-9cac-4db1-b318-58ef3e947125 + L1_HTT125 + 70 + HTT_125 + + false + + 0 + 5 + + + + 6f96956f-9cac-4db1-b318-58ef3e947150 + L1_HTT150 + 71 + HTT_150 + + false + + 0 + 52 + + + + 6f96956f-9cac-4db1-b318-58ef3e947175 + L1_HTT175 + 72 + HTT_175 + + false + + 0 + 2 + + + + 6f96956f-9cac-4db1-b318-58ef3e947200 + L1_HTT200 + 73 + HTT_200 + + false + + 0 + 42 + + + + 2ae40153-9eda-4421-81a8-7c2c5b6123eb + L1_SingleIsoEG18er + 76 + SingleIsoEG_18er + + false + + 0 + 39 + + + + 176cab73-d645-42a7-b23b-76c0839f9e40 + L1_ETM40 + 79 + ETM_40 + + false + + 0 + 50 + + + + 6f96956f-9cac-4db1-b318-58ef3e947250 + L1_HTT250 + 80 + HTT_250 + + false + + 0 + 67 + + + + 07d052d0-222b-4a74-9dfb-ceee190699d3 + L1_DoubleEG6_HTT150 + 92 + ( DoubleEG_6 ) AND HTT_150 + + false + + 0 + 13 + + + + d366ac4d-d7b1-45fd-a422-889d99dcc75d + L1_QuadJet36erc_SingleTau52erc + 93 + QuadJet_36erc AND SingleTau_52erc + + false + + 0 + 18 + + + + c09b4dce-9e48-44f3-8c89-2bc43dc627d6 + L1_TripleEG_14_10_8 + 100 + TripleEG_14_10_8 + + false + + 0 + 60 + + + + e3c5ac45-8722-4bf9-962c-ca88eedf7273 + L1_DoubleEG_15_10 + 101 + DoubleEG_10_15 + + false + + 0 + 65 + + + + 9ae44fd3-a1cc-4406-ada1-8c20a5ced629 + L1_DoubleEG_22_10 + 102 + DoubleEG_22_10 + + false + + 0 + 17 + + + + 176cab73-d645-42a7-b23b-76c0839f9e60 + L1_ETM60 + 109 + ETM_60 + + false + + 0 + 10 + + + + 3e120881-e8d1-49ab-b5e9-0542100cdea3 + L1_DoubleJet100erc + 110 + DoubleJet_100erc + + false + + 0 + 0 + + + + f5a73f58-83e0-4492-9cd3-3324a145a60a + L1_QuadJet60erc + 111 + QuadJet_60erc + + false + + 0 + 6 + + + + bad86d03-0c79-4410-83ea-dd1631556eb9 + L1_DoubleJet56erc_ETM60 + 113 + DoubleJet_56erc AND ETM_60 + + false + + 0 + 26 + + + + 1c731190-7027-402b-aea5-e184af7dc2ed + L1_DoubleIsoTau28er + 116 + DoubleIsoTau_28er + + false + + 0 + 56 + + + + 1c731190-7027-402b-aea5-e184af7dc142 + L1_DoubleIsoTau36er + 117 + DoubleIsoTau_36er + + false + + 0 + 16 + + + + 1c731190-7027-402b-aea5-e184af7d5582 + L1_DoubleIsoTau40er + 118 + DoubleIsoTau_40er + + false + + 0 + 53 + + + + 00b1bf02-6249-4ab2-a5d7-e0226bc672a6 + L1_TripleJet_92_76_64_VBF + 119 + TripleJet_92_76_64_erc OR (DoubleJet_92_76_erc AND SingleJet_64erf ) OR (DoubleJet_92_64_erc AND SingleJet_76erf ) OR (DoubleJet_76_64_erc AND SingleJet_92erf ) + + false + + 0 + 47 + + + + 6024f5d6-6ea9-4faa-a857-ab532c207714 + L1_TripleJet_84_68_48_VBF + 120 + TripleJet_84_68_48_erc OR (DoubleJet_84_68_erc AND SingleJet_48erf ) OR (DoubleJet_84_48_erc AND SingleJet_68erf ) OR (DoubleJet_68_48_erc AND SingleJet_84erf ) + + false + + 0 + 1 + + + + 4caf75a2-b2d9-42e9-b409-da31a6683e00 + L1_SingleMuBeamHalo + 127 + SingleMu_BeamHalo + + false + + 0 + 20 + + + + \ No newline at end of file diff --git a/L1Trigger/L1TGlobal/data/Luminosity/startup/prescale_L1TGlobal.csv b/L1Trigger/L1TGlobal/data/Luminosity/startup/prescale_L1TGlobal.csv new file mode 100644 index 0000000000000..bc48fc003c7d6 --- /dev/null +++ b/L1Trigger/L1TGlobal/data/Luminosity/startup/prescale_L1TGlobal.csv @@ -0,0 +1,514 @@ +# , , , , , , , , , , , , , +-1, -3, -2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 +0, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +1, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +2, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +3, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +4, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +5, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +6, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +7, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +8, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +9, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +10, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +11, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +12, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +13, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +14, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +15, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +16, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +17, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +18, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +19, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +20, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +21, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +22, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +23, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +24, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +25, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +26, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +27, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +28, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +29, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +30, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +31, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +32, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +33, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +34, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +35, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +36, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +37, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +38, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +39, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +40, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +41, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +42, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +43, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +44, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +45, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +46, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +47, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +48, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +49, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +50, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +51, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +52, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +53, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +54, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +55, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +56, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +57, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +58, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +59, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +60, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +61, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +62, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +63, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +64, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +65, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +66, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +67, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +68, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +69, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +70, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +71, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +72, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +73, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +74, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +75, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +76, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +77, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +78, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +79, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +80, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +81, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +82, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +83, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +84, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +85, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +86, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +87, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +88, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +89, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +90, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +91, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +92, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +93, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +94, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +95, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +96, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +97, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +98, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +99, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +100, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +101, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +102, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +103, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +104, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +105, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +106, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +107, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +108, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +109, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +110, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +111, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +112, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +113, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +114, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +115, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +116, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +117, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +118, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +119, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +120, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +121, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +122, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +123, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +124, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +125, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +126, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +127, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +128, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +129, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +130, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +131, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +132, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +133, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +134, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +135, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +136, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +137, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +138, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +139, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +140, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +141, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +142, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +143, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +144, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +145, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +146, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +147, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +148, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +149, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +150, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +151, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +152, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +153, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +154, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +155, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +156, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +157, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +158, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +159, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +160, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +161, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +162, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +163, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +164, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +165, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +166, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +167, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +168, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +169, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +170, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +171, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +172, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +173, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +174, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +175, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +176, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +177, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +178, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +179, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +180, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +181, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +182, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +183, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +184, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +185, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +186, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +187, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +188, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +189, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +190, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +191, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +192, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +193, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +194, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +195, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +196, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +197, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +198, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +199, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +200, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +201, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +202, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +203, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +204, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +205, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +206, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +207, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +208, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +209, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +210, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +211, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +212, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +213, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +214, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +215, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +216, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +217, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +218, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +219, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +220, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +221, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +222, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +223, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +224, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +225, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +226, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +227, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +228, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +229, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +230, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +231, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +232, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +233, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +234, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +235, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +236, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +237, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +238, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +239, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +240, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +241, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +242, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +243, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +244, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +245, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +246, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +247, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +248, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +249, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +250, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +251, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +252, 0, 1, 1, 2, 10, 2, 1, 3, 1, 4, 10, 2, 1 +253, 0, 1, 1, 2, 10, 2, 1, 1, 6, 1, 10, 2, 1 +254, 0, 1, 1, 2, 10, 2, 1, 3, 1, 1, 10, 2, 1 +255, 0, 1, 1, 2, 10, 2, 1, 1, 6, 4, 10, 2, 1 +256, 0, 1, 1, 2, 10, 1, 1, 3, 1, 1, 10, 2, 1 +257, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +258, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +259, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +260, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +261, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +262, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +263, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +264, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +265, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +266, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +267, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +268, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +269, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +270, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +271, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +272, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +273, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +274, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +275, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +276, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +277, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +278, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +279, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +280, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +281, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +282, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +283, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +284, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +285, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +286, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +287, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +288, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +289, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +290, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +291, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +292, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +293, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +294, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +295, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +296, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +297, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +298, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +299, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +300, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +301, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +302, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +303, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +304, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +305, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +306, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +307, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +308, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +309, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +310, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +311, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +312, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +313, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +314, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +315, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +316, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +317, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +318, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +319, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +320, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +321, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +322, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +323, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +324, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +325, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +326, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +327, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +328, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +329, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +330, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +331, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +332, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +333, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +334, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +335, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +336, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +337, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +338, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +339, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +340, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +341, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +342, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +343, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +344, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +345, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +346, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +347, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +348, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +349, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +350, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +351, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +352, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +353, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +354, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +355, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +356, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +357, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +358, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +359, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +360, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +361, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +362, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +363, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +364, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +365, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +366, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +367, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +368, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +369, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +370, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +371, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +372, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +373, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +374, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +375, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +376, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +377, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +378, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +379, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +380, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +381, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +382, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +383, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +384, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +385, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +386, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +387, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +388, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +389, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +390, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +391, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +392, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +393, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +394, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +395, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +396, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +397, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +398, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +399, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +400, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +401, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +402, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +403, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +404, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +405, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +406, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +407, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +408, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +409, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +410, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +411, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +412, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +413, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +414, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +415, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +416, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +417, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +418, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +419, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +420, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +421, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +422, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +423, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +424, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +425, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +426, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +427, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +428, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +429, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +430, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +431, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +432, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +433, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +434, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +435, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +436, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +437, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +438, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +439, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +440, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +441, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +442, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +443, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +444, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +445, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +446, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +447, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +448, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +449, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +450, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +451, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +452, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +453, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +454, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +455, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +456, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +457, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +458, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +459, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +460, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +461, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +462, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +463, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +464, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +465, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +466, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +467, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +468, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +469, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +470, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +471, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +472, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +473, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +474, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +475, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +476, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +477, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +478, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +479, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +480, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +481, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +482, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +483, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +484, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +485, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +486, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +487, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +488, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +489, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +490, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +491, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +492, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +493, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +494, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +495, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +496, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +497, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +498, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +499, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +500, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +501, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +502, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +503, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +504, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +505, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +506, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +507, 0, 1, 1, 2, 10, 1, 5, 1, 6, 4, 10, 2, 1 +508, 0, 1, 1, 2, 10, 1, 5, 3, 1, 1, 10, 2, 1 +509, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 +510, 0, 1, 1, 2, 10, 1, 5, 3, 1, 4, 10, 2, 1 +511, 0, 1, 1, 2, 10, 1, 5, 1, 6, 1, 10, 2, 1 diff --git a/L1Trigger/L1TGlobal/interface/CaloTemplate.h b/L1Trigger/L1TGlobal/interface/CaloTemplate.h index 17eef0365f966..eafa6849fb73b 100644 --- a/L1Trigger/L1TGlobal/interface/CaloTemplate.h +++ b/L1Trigger/L1TGlobal/interface/CaloTemplate.h @@ -62,16 +62,17 @@ class CaloTemplate : public GtCondition unsigned int phiRange; unsigned int isolationLUT; + unsigned int qualityLUT; - unsigned int etaWindowLower; - unsigned int etaWindowUpper; - unsigned int etaWindowVetoLower; - unsigned int etaWindowVetoUpper; + unsigned int etaWindow1Lower; + unsigned int etaWindow1Upper; + unsigned int etaWindow2Lower; + unsigned int etaWindow2Upper; - unsigned int phiWindowLower; - unsigned int phiWindowUpper; - unsigned int phiWindowVetoLower; - unsigned int phiWindowVetoUpper; + unsigned int phiWindow1Lower; + unsigned int phiWindow1Upper; + unsigned int phiWindow2Lower; + unsigned int phiWindow2Upper; }; diff --git a/L1Trigger/L1TGlobal/interface/ConditionEvaluation.h b/L1Trigger/L1TGlobal/interface/ConditionEvaluation.h index 2e7804a729506..89731f8064293 100644 --- a/L1Trigger/L1TGlobal/interface/ConditionEvaluation.h +++ b/L1Trigger/L1TGlobal/interface/ConditionEvaluation.h @@ -116,14 +116,14 @@ class ConditionEvaluation /// check if a value is in a given range and outside of a veto range template const bool checkRangeEta(const unsigned int bitNumber, - const Type1& beginR, const Type1& endR, - const Type1& beginVetoR, const Type1& endVetoR, + const Type1& W1beginR, const Type1& W1endR, + const Type1& W2beginR, const Type1& W2endR, const unsigned int nEtaBits ) const; /// check if a value is in a given range and outside of a veto range template const bool checkRangePhi(const unsigned int bitNumber, - const Type1& beginR, const Type1& endR, - const Type1& beginVetoR, const Type1& endVetoR ) const; + const Type1& W1beginR, const Type1& W1endR, + const Type1& W2beginR, const Type1& W2endR ) const; /// check if a value is in a given range @@ -226,142 +226,169 @@ template const bool ConditionEvaluation::checkBit(const Type1& mask /// check if a value is in a given range and outside of a veto range template const bool ConditionEvaluation::checkRangeEta(const unsigned int bitNumber, - const Type1& beginR, const Type1& endR, - const Type1& beginVetoR, const Type1& endVetoR, + const Type1& W1beginR, const Type1& W1endR, + const Type1& W2beginR, const Type1& W2endR, const unsigned int nEtaBits) const { // set condtion to true if beginR==endR = default -1 - if( beginR==endR && beginR==(Type1)-1 ){ + if( W1beginR==W1endR && W1beginR==(Type1)-1 ){ return true; } - unsigned int diff1 = endR - beginR; - unsigned int diff2 = bitNumber - beginR; - unsigned int diff3 = endR - bitNumber; + unsigned int W1diff1 = W1endR - W1beginR; + unsigned int W1diff2 = bitNumber - W1beginR; + unsigned int W1diff3 = W1endR - bitNumber; + + bool W1cond1 = ( (W1diff1>>nEtaBits) & 1 ) ? false : true; + bool W1cond2 = ( (W1diff2>>nEtaBits) & 1 ) ? false : true; + bool W1cond3 = ( (W1diff3>>nEtaBits) & 1 ) ? false : true; + + // check if value is in range + // for begin <= end takes [begin, end] + // for begin >= end takes [begin, end] over zero angle! + bool passWindow1 = false; + if( W1cond1 && (W1cond2 && W1cond3 ) ) passWindow1=true; + else if( !W1cond1 && (W1cond2 || W1cond3) ) passWindow1=true; + else{ + passWindow1 = false; + } + - bool cond1 = ( (diff1>>nEtaBits) & 1 ) ? false : true; - bool cond2 = ( (diff2>>nEtaBits) & 1 ) ? false : true; - bool cond3 = ( (diff3>>nEtaBits) & 1 ) ? false : true; LogDebug("l1t|Global") << "\n l1t::ConditionEvaluation" << "\n\t bitNumber = " << bitNumber - << "\n\t beginR = " << beginR - << "\n\t endR = " << endR - << "\n\t beginVetoR = " << beginVetoR - << "\n\t endVetoR = " << endVetoR - << "\n\t diff1 = " << diff1 - << "\n\t cond1 = " << cond1 - << "\n\t diff2 = " << diff2 - << "\n\t cond2 = " << cond2 - << "\n\t diff3 = " << diff3 - << "\n\t cond3 = " << cond3 + << "\n\t W1beginR = " << W1beginR + << "\n\t W1endR = " << W1endR + << "\n\t W1diff1 = " << W1diff1 + << "\n\t W1cond1 = " << W1cond1 + << "\n\t W1diff2 = " << W1diff2 + << "\n\t W1cond2 = " << W1cond2 + << "\n\t W1diff3 = " << W1diff3 + << "\n\t W1cond3 = " << W1cond3 + << "\n\t passWindow1 = " << passWindow1 << std::endl; - // check if value is in range - // for begin <= end takes [begin, end] - // for begin >= end takes [begin, end] over zero angle! - bool passWindow = false; - if( cond1 && (cond2 && cond3 ) ) passWindow=true; - else if( !cond1 && (cond2 || cond3) ) passWindow=true; - else{ - return false; + + if( W2beginR==W2endR && W2beginR==(Type1)-1 ){ + return passWindow1; } - if( passWindow ){ - if( beginVetoR==endVetoR && beginVetoR==(Type1)-1 ) return true; - unsigned int diffV1 = endVetoR - beginVetoR; - unsigned int diffV2 = bitNumber - beginVetoR; - unsigned int diffV3 = endVetoR - bitNumber; + unsigned int W2diff1 = W2endR - W2beginR; + unsigned int W2diff2 = bitNumber - W2beginR; + unsigned int W2diff3 = W2endR - bitNumber; - bool condV1 = ( (diffV1>>nEtaBits) & 1 ) ? false : true; - bool condV2 = ( (diffV2>>nEtaBits) & 1 ) ? false : true; - bool condV3 = ( (diffV3>>nEtaBits) & 1 ) ? false : true; + bool W2cond1 = ( (W2diff1>>nEtaBits) & 1 ) ? false : true; + bool W2cond2 = ( (W2diff2>>nEtaBits) & 1 ) ? false : true; + bool W2cond3 = ( (W2diff3>>nEtaBits) & 1 ) ? false : true; - if( condV1 && !(condV2 && condV3) ) return true; - else if( !condV1 && !(condV2 || condV3) ) return true; - else{ - return false; - } + bool passWindow2 = false; + if( W2cond1 && (W2cond2 && W2cond3 ) ) passWindow2=true; + else if( !W2cond1 && (W2cond2 || W2cond3) ) passWindow2=true; + else{ + passWindow2 = false; + } + + + LogDebug("l1t|Global") + << "\n\t W2beginR = " << W2beginR + << "\n\t W2endR = " << W2endR + << "\n\t W2diff1 = " << W2diff1 + << "\n\t W2cond1 = " << W2cond1 + << "\n\t W2diff2 = " << W2diff2 + << "\n\t W2cond2 = " << W2cond2 + << "\n\t W2diff3 = " << W2diff3 + << "\n\t W2cond3 = " << W2cond3 + << "\n\t passWindow2 = " << passWindow2 + << "\n\t pass W1 || W2 = " << (passWindow1 || passWindow2) + << std::endl; + + if( passWindow1 || passWindow2 ){ + return true; } else{ - LogDebug("l1t|Global") << "=====> ConditionEvaluation::checkRange: I should never be here." << std::endl; return false; } - LogDebug("l1t|Global") << "=====> HELP!! I'm trapped and I cannot escape! AHHHHHH" << std::endl; - } /// check if a value is in a given range and outside of a veto range template const bool ConditionEvaluation::checkRangePhi(const unsigned int bitNumber, - const Type1& beginR, const Type1& endR, - const Type1& beginVetoR, const Type1& endVetoR ) const { + const Type1& W1beginR, const Type1& W1endR, + const Type1& W2beginR, const Type1& W2endR ) const { // set condtion to true if beginR==endR = default -1 - if( beginR==endR && beginR==(Type1)-1 ){ + if( W1beginR==W1endR && W1beginR==(Type1)-1 ){ return true; } - int diff1 = endR - beginR; - int diff2 = bitNumber - beginR; - int diff3 = endR - bitNumber; + int W1diff1 = W1endR - W1beginR; + int W1diff2 = bitNumber - W1beginR; + int W1diff3 = W1endR - bitNumber; - bool cond1 = ( diff1<0 ) ? false : true; - bool cond2 = ( diff2<0 ) ? false : true; - bool cond3 = ( diff3<0 ) ? false : true; + bool W1cond1 = ( W1diff1<0 ) ? false : true; + bool W1cond2 = ( W1diff2<0 ) ? false : true; + bool W1cond3 = ( W1diff3<0 ) ? false : true; + + // check if value is in range + // for begin <= end takes [begin, end] + // for begin >= end takes [begin, end] over zero angle! + bool passWindow1 = false; + if( W1cond1 && (W1cond2 && W1cond3 ) ) passWindow1=true; + else if( !W1cond1 && (W1cond2 || W1cond3) ) passWindow1=true; + else{ + passWindow1 = false; + } LogDebug("l1t|Global") << "\n l1t::ConditionEvaluation" << "\n\t bitNumber = " << bitNumber - << "\n\t beginR = " << beginR - << "\n\t endR = " << endR - << "\n\t beginVetoR = " << beginVetoR - << "\n\t endVetoR = " << endVetoR - << "\n\t diff1 = " << diff1 - << "\n\t cond1 = " << cond1 - << "\n\t diff2 = " << diff2 - << "\n\t cond2 = " << cond2 - << "\n\t diff3 = " << diff3 - << "\n\t cond3 = " << cond3 + << "\n\t W1beginR = " << W1beginR + << "\n\t W1endR = " << W1endR + << "\n\t W1diff1 = " << W1diff1 + << "\n\t W1cond1 = " << W1cond1 + << "\n\t W1diff2 = " << W1diff2 + << "\n\t W1cond2 = " << W1cond2 + << "\n\t W1diff3 = " << W1diff3 + << "\n\t W1cond3 = " << W1cond3 << std::endl; + + + if( W2beginR==W2endR && W2beginR==(Type1)-1 ){ + return passWindow1; + } + + + int W2diff1 = W2endR - W2beginR; + int W2diff2 = bitNumber - W2beginR; + int W2diff3 = W2endR - bitNumber; + + bool W2cond1 = ( W2diff1<0 ) ? false : true; + bool W2cond2 = ( W2diff2<0 ) ? false : true; + bool W2cond3 = ( W2diff3<0 ) ? false : true; + // check if value is in range // for begin <= end takes [begin, end] // for begin >= end takes [begin, end] over zero angle! - bool passWindow = false; - if( cond1 && (cond2 && cond3 ) ) passWindow=true; - else if( !cond1 && (cond2 || cond3) ) passWindow=true; + bool passWindow2 = false; + if( W2cond1 && (W2cond2 && W2cond3 ) ) passWindow2=true; + else if( !W2cond1 && (W2cond2 || W2cond3) ) passWindow2=true; else{ - return false; + passWindow2 = false; } - if( passWindow ){ - if( beginVetoR==endVetoR && beginVetoR==(Type1)-1 ) return true; - - int diffV1 = endVetoR - beginVetoR; - int diffV2 = bitNumber - beginVetoR; - int diffV3 = endVetoR - bitNumber; - bool condV1 = ( diffV1<0 ) ? false : true; - bool condV2 = ( diffV2<0 ) ? false : true; - bool condV3 = ( diffV3<0 ) ? false : true; - - if( condV1 && !(condV2 && condV3) ) return true; - else if( !condV1 && !(condV2 || condV3) ) return true; - else{ - return false; - } + if( passWindow1 || passWindow2 ){ + return true; } else{ - LogDebug("l1t|Global") << "=====> ConditionEvaluation::checkRange: I should never be here." << std::endl; return false; } - LogDebug("l1t|Global") << "=====> HELP!! I'm trapped and I cannot escape! AHHHHHH" << std::endl; } diff --git a/L1Trigger/L1TGlobal/interface/CorrCondition.h b/L1Trigger/L1TGlobal/interface/CorrCondition.h new file mode 100644 index 0000000000000..8845a78abab23 --- /dev/null +++ b/L1Trigger/L1TGlobal/interface/CorrCondition.h @@ -0,0 +1,144 @@ +#ifndef GlobalTrigger_CorrCondition_h +#define GlobalTrigger_CorrCondition_h + +/** + * \class CorrCondition + * + * + * Description: evaluation of a correlation condition. + * + * Implementation: + * + * + * \author: Vasile Mihai Ghete - HEPHY Vienna + * + * + */ + +// system include files +#include +#include + +// user include files +// base classes +#include "L1Trigger/L1TGlobal/interface/ConditionEvaluation.h" + +// forward declarations +class GtCondition; +class CorrelationTemplate; + +namespace l1t { + +class L1Candidate; + +class GtBoard; + +// class declaration +class CorrCondition : public ConditionEvaluation +{ + +public: + + /// constructors + /// default + CorrCondition(); + + /// from base template condition (from event setup usually) + CorrCondition(const GtCondition*, + const GtCondition*, + const GtCondition*, + const GtBoard* + + ); + + // copy constructor + CorrCondition(const CorrCondition&); + + // destructor + virtual ~CorrCondition(); + + // assign operator + CorrCondition& operator=(const CorrCondition&); + +public: + + /// the core function to check if the condition matches + const bool evaluateCondition(const int bxEval) const; + + /// print condition + void print(std::ostream& myCout) const; + +public: + + /// get / set the pointer to a Condition + inline const CorrelationTemplate* gtCorrelationTemplate() const { + return m_gtCorrelationTemplate; + } + + void setGtCorrelationTemplate(const CorrelationTemplate*); + + /// get / set the pointer to uGt GtBoard + inline const GtBoard* getuGtB() const { + return m_uGtB; + } + + void setuGtB(const GtBoard*); + + +/* //BLW Comment out for now + /// get / set the number of bits for eta of calorimeter objects + inline const int gtIfCaloEtaNumberBits() const { + return m_ifCaloEtaNumberBits; + } + + + void setGtIfCaloEtaNumberBits(const int&); + + /// get / set maximum number of bins for the delta phi scales + inline const int gtCorrParDeltaPhiNrBins() const { + return m_corrParDeltaPhiNrBins; + } + + void setGtCorrParDeltaPhiNrBins(const int&); +*/ +private: + + /// copy function for copy constructor and operator= + void copy(const CorrCondition& cp); + + /// load candidates + const l1t::L1Candidate* getCandidate(const int bx, const int indexCand) const; + + /// function to check a single object if it matches a condition + const bool + checkObjectParameter(const int iCondition, const l1t::L1Candidate& cand) const; + +private: + + /// pointer to a CorrelationTemplate + const CorrelationTemplate* m_gtCorrelationTemplate; + + + // pointer to subconditions + const GtCondition* m_gtCond0; + const GtCondition* m_gtCond1; + + /// pointer to uGt GtBoard, to be able to get the trigger objects + const GtBoard* m_uGtB; + + + + +/* //BLW comment out for now + /// number of bits for eta of calorimeter objects + int m_ifCaloEtaNumberBits; + + // maximum number of bins for the delta phi scales + unsigned int m_corrParDeltaPhiNrBins; +*/ + + +}; + +} +#endif diff --git a/L1Trigger/L1TGlobal/interface/CorrelationTemplate.h b/L1Trigger/L1TGlobal/interface/CorrelationTemplate.h index 9d7dd92bbb5f6..9e269c9876141 100644 --- a/L1Trigger/L1TGlobal/interface/CorrelationTemplate.h +++ b/L1Trigger/L1TGlobal/interface/CorrelationTemplate.h @@ -71,6 +71,14 @@ class CorrelationTemplate : public GtCondition std::string deltaPhiRange; unsigned int deltaPhiMaxbits; + + //BLW these might require further modification temp to start + //TO DO They need to be made integers when we have proper scales. + double minCutValue; + double maxCutValue; + + int corrCutType; + }; diff --git a/L1Trigger/L1TGlobal/interface/DEVELOPERS b/L1Trigger/L1TGlobal/interface/DEVELOPERS deleted file mode 100644 index d46d1f3253dc5..0000000000000 --- a/L1Trigger/L1TGlobal/interface/DEVELOPERS +++ /dev/null @@ -1,3 +0,0 @@ -darren puigh, darren.michael.puigh (at) cern (dot) ch -brian winer, brian.winer (at) cern (dot) ch -R. Alex Barbieri, luck (at) mit (dot) edu diff --git a/L1Trigger/L1TGlobal/interface/EnergySumTemplate.h b/L1Trigger/L1TGlobal/interface/EnergySumTemplate.h index cb1d54e6b8f8a..74a735bd09057 100644 --- a/L1Trigger/L1TGlobal/interface/EnergySumTemplate.h +++ b/L1Trigger/L1TGlobal/interface/EnergySumTemplate.h @@ -60,10 +60,10 @@ class EnergySumTemplate : public GtCondition unsigned int etThreshold; bool energyOverflow; - unsigned int phiWindowLower; - unsigned int phiWindowUpper; - unsigned int phiWindowVetoLower; - unsigned int phiWindowVetoUpper; + unsigned int phiWindow1Lower; + unsigned int phiWindow1Upper; + unsigned int phiWindow2Lower; + unsigned int phiWindow2Upper; // two words used only for ETM (ETM phi has 72 bins - two 64-bits words) // one word used for HTM diff --git a/L1Trigger/L1TGlobal/interface/GtBoard.h b/L1Trigger/L1TGlobal/interface/GtBoard.h index 9eec7e4a55e78..3faceefbd053e 100644 --- a/L1Trigger/L1TGlobal/interface/GtBoard.h +++ b/L1Trigger/L1TGlobal/interface/GtBoard.h @@ -66,7 +66,10 @@ class GtBoard /// receive data from Global Muon Trigger void receiveCaloObjectData( edm::Event&, - const edm::InputTag&, + const edm::EDGetTokenT>&, + const edm::EDGetTokenT>&, + const edm::EDGetTokenT>&, + const edm::EDGetTokenT>&, const bool receiveEG, const int nrL1EG, const bool receiveTau, const int nrL1Tau, const bool receiveJet, const int nrL1Jet, @@ -74,7 +77,7 @@ class GtBoard void receiveMuonObjectData( edm::Event&, - const edm::InputTag&, + const edm::EDGetTokenT >&, const bool receiveMu, const int nrL1Mu); @@ -96,6 +99,11 @@ class GtBoard /// run the uGT FDL (Apply Prescales and Veto) void runFDL(edm::Event& iEvent, const int iBxInEvent, + const int totalBxInEvent, + const unsigned int numberPhysTriggers, + const std::vector& prescaleFactorsAlgoTrig, + const std::vector& triggerMaskAlgoTrig, + const std::vector& triggerMaskVetoAlgoTrig, const bool algorithmTriggersUnprescaled, const bool algorithmTriggersUnmasked ); @@ -241,9 +249,14 @@ class GtBoard GlobalAlgBlk m_uGtAlgBlk; GlobalExtBlk m_uGtExtBlk; - // cache of maps - std::vector m_conditionResultMaps; - + // cache of maps + std::vector m_conditionResultMaps; + + /// prescale counters: NumberPhysTriggers counters per bunch cross in event + std::vector > m_prescaleCounterAlgoTrig; + + bool m_firstEv; + bool m_firstEvLumiSegment; private: @@ -255,6 +268,8 @@ class GtBoard bool m_algInitialOr; bool m_algPrescaledOr; bool m_algFinalOr; + bool m_algFinalOrVeto; + bool m_algFinalOrPreVeto; // Counter for number of events seen by this board unsigned int m_boardEventCount; diff --git a/L1Trigger/L1TGlobal/interface/L1TGlobalUtil.h b/L1Trigger/L1TGlobal/interface/L1TGlobalUtil.h new file mode 100644 index 0000000000000..a20fc0b00ae77 --- /dev/null +++ b/L1Trigger/L1TGlobal/interface/L1TGlobalUtil.h @@ -0,0 +1,164 @@ +#ifndef L1TGlobalUtil_h +#define L1TGlobalUtil_h + +/** + * \class L1TGlobalUtil + * + * + * Description: Accessor Class for uGT Result + * + * Implementation: + * + * + */ + +// system include files +#include + +#include "L1Trigger/L1TGlobal/interface/TriggerMenu.h" + +// Objects to produce for the output record. +#include "DataFormats/L1TGlobal/interface/GlobalAlgBlk.h" +#include "DataFormats/L1TGlobal/interface/GlobalExtBlk.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Utilities/interface/InputTag.h" + +#include "FWCore/Framework/interface/EventSetup.h" + +// forward declarations +//class TriggerMenu; + + +// class declaration + +namespace l1t { + +class L1TGlobalUtil +{ + +public: + + // constructors + L1TGlobalUtil(std::string preScaleFileName, unsigned int psColumn); + + // destructor + virtual ~L1TGlobalUtil(); + +public: + + /// initialize the class (mainly reserve) + void retrieveL1(const edm::Event& iEvent, const edm::EventSetup& evSetup, + edm::EDGetToken gtAlgToken); + + +public: + + inline void setVerbosity(const int verbosity) { + m_verbosity = verbosity; + } + + + inline bool getFinalOR() {return m_finalOR;} + + // get the trigger bit from the name + const bool getAlgBitFromName(const std::string& AlgName, int& bit) const; + + // get the name from the trigger bit + const bool getAlgNameFromBit(int& bit, std::string& AlgName) const; + + // Access results for particular trigger bit + const bool getInitialDecisionByBit(int& bit, bool& decision) const; + const bool getPrescaledDecisionByBit(int& bit, bool& decision) const; + const bool getFinalDecisionByBit(int& bit, bool& decision) const; + + // Access Prescale + const bool getPrescaleByBit(int& bit, int& prescale) const; + + // Access Masks: + // follows logic of uGT board: + // finalDecision[AlgBit] = ( prescaledDecision[AlgBit] & mask[AlgBit] ) implying: + // If mask = true, algorithm bit (true/false) keeps its value + // If mask = false, algorithm bit is forced to false for the finalDecision + // + // If vetoMask = true and Algorithm is true, the FINOR (final global decision) is forced to false (ie. event is vetoed) + // If vetoMask = false, algorithm cannot veto FINOR (final global decision) + const bool getMaskByBit(int& bit, bool& mask) const; + const bool getVetoMaskByBit(int& bit, bool& veto) const; + + // Access results for particular trigger name + const bool getInitialDecisionByName(const std::string& algName, bool& decision) const; + const bool getPrescaledDecisionByName(const std::string& algName, bool& decision) const; + const bool getFinalDecisionByName(const std::string& algName, bool& decision) const; + + // Access Prescales + const bool getPrescaleByName(const std::string& algName, int& prescale) const; + + // Access Masks (see note) above + const bool getMaskByName(const std::string& algName, bool& mask) const; + const bool getVetoMaskByName(const std::string& algName, bool& veto) const; + + // Some inline commands to return the full vectors + inline const std::vector >& decisionsInitial() { return m_decisionsInitial; } + inline const std::vector >& decisionsPrescaled() { return m_decisionsPrescaled; } + inline const std::vector >& decisionsFinal() { return m_decisionsFinal; } + + // Access all prescales + inline const std::vector >& prescales() { return m_prescales; } + + // Access Masks (see note) above + inline const std::vector >& masks() { return m_masks; } + inline const std::vector >& vetoMasks() { return m_vetoMasks; } + +private: + + /// clear decision vectors on a menu change + void resetDecisionVectors(); + void resetPrescaleVectors(); + void resetMaskVectors(); + void loadPrescalesAndMasks(); + + // trigger menu + const TriggerMenu* m_l1GtMenu; + unsigned long long m_l1GtMenuCacheID; + + // prescales and masks + bool m_filledPrescales; + + // algorithm maps + const AlgorithmMap* m_algorithmMap; + +private: + + // Number of physics triggers + unsigned int m_numberPhysTriggers; + + //file and container for prescale factors + std::string m_preScaleFileName; + unsigned int m_PreScaleColumn; + const std::vector >* m_prescaleFactorsAlgoTrig; + const std::vector* m_triggerMaskAlgoTrig; + const std::vector* m_triggerMaskVetoAlgoTrig; + + // access to the results block from uGT + edm::Handle> m_uGtAlgBlk; + + // final OR + bool m_finalOR; + + // Vectors containing the trigger name and information about that trigger + std::vector > m_decisionsInitial; + std::vector > m_decisionsPrescaled; + std::vector > m_decisionsFinal; + std::vector > m_prescales; + std::vector > m_masks; + std::vector > m_vetoMasks; + + /// verbosity level + int m_verbosity; + + +}; + +} +#endif diff --git a/L1Trigger/L1TGlobal/interface/MuonTemplate.h b/L1Trigger/L1TGlobal/interface/MuonTemplate.h index 3bd510634b561..f2ff5e39f94c5 100644 --- a/L1Trigger/L1TGlobal/interface/MuonTemplate.h +++ b/L1Trigger/L1TGlobal/interface/MuonTemplate.h @@ -70,15 +70,15 @@ class MuonTemplate : public GtCondition int charge; - unsigned int etaWindowLower; - unsigned int etaWindowUpper; - unsigned int etaWindowVetoLower; - unsigned int etaWindowVetoUpper; - - unsigned int phiWindowLower; - unsigned int phiWindowUpper; - unsigned int phiWindowVetoLower; - unsigned int phiWindowVetoUpper; + unsigned int etaWindow1Lower; + unsigned int etaWindow1Upper; + unsigned int etaWindow2Lower; + unsigned int etaWindow2Upper; + + unsigned int phiWindow1Lower; + unsigned int phiWindow1Upper; + unsigned int phiWindow2Lower; + unsigned int phiWindow2Upper; }; // typedef for correlation parameters diff --git a/L1Trigger/L1TGlobal/plugins/GtProducer.cc b/L1Trigger/L1TGlobal/plugins/GtProducer.cc index f86e9c97dbe30..a5854638a799d 100644 --- a/L1Trigger/L1TGlobal/plugins/GtProducer.cc +++ b/L1Trigger/L1TGlobal/plugins/GtProducer.cc @@ -75,6 +75,9 @@ l1t::GtProducer::GtProducer(const edm::ParameterSet& parSet) : m_alternativeNrBxBoardDaq(parSet.getParameter ("AlternativeNrBxBoardDaq")), m_psBstLengthBytes(parSet.getParameter ("BstLengthBytes")), + + m_prescaleSet(parSet.getParameter ("PrescaleSet")), + m_algorithmTriggersUnprescaled(parSet.getParameter ("AlgorithmTriggersUnprescaled")), m_algorithmTriggersUnmasked(parSet.getParameter ("AlgorithmTriggersUnmasked")), @@ -82,7 +85,15 @@ l1t::GtProducer::GtProducer(const edm::ParameterSet& parSet) : m_isDebugEnabled(edm::isDebugEnabled()) { - + + m_egInputToken = consumes > (m_caloInputTag); + m_tauInputToken = consumes > (m_caloInputTag); + m_jetInputToken = consumes > (m_caloInputTag); + m_sumInputToken = consumes > (m_caloInputTag); + + m_muInputToken = consumes > (m_muInputTag); + + if (m_verbosity) { LogDebug("l1t|Global") << std::endl; @@ -149,16 +160,15 @@ l1t::GtProducer::GtProducer(const edm::ParameterSet& parSet) : // register products - if (m_produceL1GtDaqRecord) { - produces(); - produces(); + if( m_produceL1GtDaqRecord ){ + produces(); + produces(); } -/* **** Needs Modifying *** - if (m_produceL1GtObjectMapRecord) { - produces(); + + if( m_produceL1GtObjectMapRecord ) { + produces(); } -*/ // create new uGt Board @@ -203,6 +213,176 @@ l1t::GtProducer::GtProducer(const edm::ParameterSet& parSet) : m_l1GtTmVetoAlgoCacheID = 0ULL; + + // directory in /data/Luminosity for the trigger menu + std::string menuDir = parSet.getParameter("TriggerMenuLuminosity"); + //std::string menuDir = "startup"; + + // prescale CSV file file + std::string prescaleFileName = parSet.getParameter("PrescaleCSVFile"); + + // def.xml file + //std::string prescaleFileName = "prescale_L1TGlobal.csv"; + + edm::FileInPath f1("L1Trigger/L1TGlobal/data/Luminosity/" + + menuDir + "/" + prescaleFileName); + + m_prescalesFile = f1.fullPath(); + + unsigned int temp_numberPhysTriggers = 512; + + // Get prescale factors from CSV file for now + std::fstream inputPrescaleFile; + inputPrescaleFile.open(m_prescalesFile); + + std::vector > vec; + std::vector > prescale_vec; + + std::vector temp_triggerMask; + std::vector temp_triggerVetoMask; + + if( inputPrescaleFile ){ + std::string prefix1("#"); + std::string prefix2("-1"); + + std::string line; + + bool first = true; + + while( getline(inputPrescaleFile,line) ){ + + if( !line.compare(0, prefix1.size(), prefix1) ) continue; + //if( !line.compare(0, prefix2.size(), prefix2) ) continue; + + istringstream split(line); + int value; + int col = 0; + char sep; + + while( split >> value ){ + if( first ){ + // Each new value read on line 1 should create a new inner vector + vec.push_back(std::vector()); + } + + vec[col].push_back(value); + ++col; + + // read past the separator + split>>sep; + } + + // Finished reading line 1 and creating as many inner + // vectors as required + first = false; + } + + + int NumPrescaleSets = 0; + + int maskColumn = -1; + int maskVetoColumn = -1; + for( int iCol=0; iCol 0 ){ + int firstRow = vec[iCol][0]; + + if( firstRow > 0 ) NumPrescaleSets++; + else if( firstRow==-2 ) maskColumn = iCol; + else if( firstRow==-3 ) maskVetoColumn = iCol; + } + } + + // Fill default values for mask and veto mask + for( unsigned int iBit = 0; iBit < temp_numberPhysTriggers; ++iBit ){ + unsigned int inputDefaultMask = 1; + unsigned int inputDefaultVetoMask = 0; + temp_triggerMask.push_back(inputDefaultMask); + temp_triggerVetoMask.push_back(inputDefaultVetoMask); + } + + // Fill non-trivial mask and veto mask + if( maskColumn>=0 || maskVetoColumn>=0 ){ + for( int iBit=1; iBit=0 ){ + unsigned int triggerMask = vec[maskColumn][iBit]; + temp_triggerMask[algoBit] = triggerMask; + } + if( maskVetoColumn>=0 ){ + unsigned int triggerVetoMask = vec[maskVetoColumn][iBit]; + temp_triggerVetoMask[algoBit] = triggerVetoMask; + } + } + } + } + + + if( NumPrescaleSets > 0 ){ + // Fill default prescale set + for( int iSet=0; iSet()); + for( unsigned int iBit = 0; iBit < temp_numberPhysTriggers; ++iBit ){ + int inputDefaultPrescale = 1; + prescale_vec[iSet].push_back(inputDefaultPrescale); + } + } + + // Fill non-trivial prescale set + for( int iBit=1; iBit 0 ){ + useSet = vec[iSet][0]; + } + useSet -= 1; + + if( useSet<0 ) continue; + + int prescale = vec[iSet][iBit]; + prescale_vec[useSet][algoBit] = prescale; + } + } + else{ + LogTrace("l1t|Global") + << "\nPrescale file has algo bit: " << algoBit + << "\nThis is larger than the number of triggers: " << m_numberPhysTriggers + << "\nSomething is wrong. Ignoring." + << std::endl; + } + } + } + + } + else { + LogTrace("l1t|Global") + << "\nCould not find file: " << m_prescalesFile + << "\nFilling the prescale vectors with prescale 1" + << "\nSetting prescale set to 1" + << std::endl; + + m_prescaleSet = 1; + + for( int col=0; col < 1; col++ ){ + prescale_vec.push_back(std::vector()); + for( unsigned int iBit = 0; iBit < temp_numberPhysTriggers; ++iBit ){ + int inputDefaultPrescale = 1; + prescale_vec[col].push_back(inputDefaultPrescale); + } + } + } + + inputPrescaleFile.close(); + + m_initialPrescaleFactorsAlgoTrig = prescale_vec; + + m_initialTriggerMaskAlgoTrig = temp_triggerMask; + m_initialTriggerMaskVetoAlgoTrig = temp_triggerVetoMask; + } // destructor @@ -349,6 +529,26 @@ void l1t::GtProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSetup */ + // Set Prescale factors to initial + m_prescaleFactorsAlgoTrig = &m_initialPrescaleFactorsAlgoTrig; + m_triggerMaskAlgoTrig = &m_initialTriggerMaskAlgoTrig; + m_triggerMaskVetoAlgoTrig = &m_initialTriggerMaskVetoAlgoTrig; + + + // // Used for testing + // for( int iL1Set=0; iL1Setsize()); iL1Set++ ){ + // if( m_prescaleFactorsAlgoTrig->size()>0 ){ + // const std::vector& testPrescaleSet = (*m_prescaleFactorsAlgoTrig).at(iL1Set); + + // printf(" iL1Set=%4d", iL1Set); + // for( int iPrescale=0; iPrescale& prescaleFactorsAlgoTrig = -// (*m_prescaleFactorsAlgoTrig).at(pfAlgoSetIndex); - -// LogDebug("l1t|Global") << "Size of prescale vector" << prescaleFactorsAlgoTrig.size() << std::endl; - // + // get the prescale factor from the configuration for now + // Prescale set indexed by zero internally, but externally indexed by 1 + unsigned int pfAlgoSetIndex = m_prescaleSet-1; + + // Require that prescale set be positive + if( m_prescaleSet<=0 ) pfAlgoSetIndex = 0; + + if( pfAlgoSetIndex > (*m_prescaleFactorsAlgoTrig).size()-1 ){ + LogTrace("l1t|Global") + << "\nAttempting to access prescale algo set: " << m_prescaleSet + << "\nNumber of prescale algo sets available: " << (*m_prescaleFactorsAlgoTrig).size() + << "Setting former to latter." + << std::endl; + + pfAlgoSetIndex = (*m_prescaleFactorsAlgoTrig).size()-1; + } + + const std::vector& prescaleFactorsAlgoTrig = (*m_prescaleFactorsAlgoTrig).at(pfAlgoSetIndex); + + const std::vector& triggerMaskAlgoTrig = *m_triggerMaskAlgoTrig; + const std::vector& triggerMaskVetoAlgoTrig = *m_triggerMaskVetoAlgoTrig; + + LogDebug("l1t|Global") << "Size of prescale vector" << prescaleFactorsAlgoTrig.size() << std::endl; // Load the calorimeter input onto the uGt Board - m_uGtBrd->receiveCaloObjectData(iEvent, m_caloInputTag, + m_uGtBrd->receiveCaloObjectData(iEvent, + m_egInputToken, + m_tauInputToken, + m_jetInputToken, + m_sumInputToken, receiveEG, m_nrL1EG, receiveTau, m_nrL1Tau, receiveJet, m_nrL1Jet, receiveEtSums ); - m_uGtBrd->receiveMuonObjectData(iEvent, m_muInputTag, + m_uGtBrd->receiveMuonObjectData(iEvent, m_muInputToken, receiveMu, m_nrL1Mu ); @@ -610,6 +829,11 @@ void l1t::GtProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSetup // Run the Final Decision Logic for this BX m_uGtBrd->runFDL(iEvent, iBxInEvent, + m_totalBxInEvent, + m_numberPhysTriggers, + prescaleFactorsAlgoTrig, + triggerMaskAlgoTrig, + triggerMaskVetoAlgoTrig, m_algorithmTriggersUnprescaled, m_algorithmTriggersUnmasked ); @@ -680,16 +904,15 @@ void l1t::GtProducer::produce(edm::Event& iEvent, const edm::EventSetup& evSetup // register products - if (m_produceL1GtDaqRecord) { - iEvent.put( uGtAlgRecord ); - iEvent.put( uGtExtRecord ); + if( m_produceL1GtDaqRecord ){ + iEvent.put( uGtAlgRecord ); + iEvent.put( uGtExtRecord ); } -/** OUTPUT RECORD - if (m_produceL1GtObjectMapRecord) { - iEvent.put( gtObjectMapRecord ); + + if( m_produceL1GtObjectMapRecord ){ + iEvent.put( gtObjectMapRecord ); } -*/ } diff --git a/L1Trigger/L1TGlobal/plugins/GtProducer.h b/L1Trigger/L1TGlobal/plugins/GtProducer.h index f186cdb2a815a..35f38cf63d504 100644 --- a/L1Trigger/L1TGlobal/plugins/GtProducer.h +++ b/L1Trigger/L1TGlobal/plugins/GtProducer.h @@ -22,6 +22,8 @@ // system include files #include #include +#include +#include #include @@ -50,7 +52,7 @@ class L1GtTriggerMask; namespace l1t { -class GtProducer : public edm::EDProducer + class GtProducer : public edm::EDProducer { public: @@ -122,6 +124,10 @@ class GtProducer : public edm::EDProducer const std::vector >* m_prescaleFactorsAlgoTrig; + std::vector > m_initialPrescaleFactorsAlgoTrig; + + /// CSV file for prescales + std::string m_prescalesFile; /// trigger masks & veto masks @@ -132,9 +138,11 @@ class GtProducer : public edm::EDProducer unsigned long long m_l1GtTmVetoAlgoCacheID; - std::vector m_triggerMaskAlgoTrig; + const std::vector* m_triggerMaskAlgoTrig; + std::vector m_initialTriggerMaskAlgoTrig; - std::vector m_triggerMaskVetoAlgoTrig; + const std::vector* m_triggerMaskVetoAlgoTrig; + std::vector m_initialTriggerMaskVetoAlgoTrig; private: @@ -147,9 +155,14 @@ class GtProducer : public edm::EDProducer /// input tag for muon collection from GMT edm::InputTag m_muInputTag; + edm::EDGetTokenT> m_muInputToken; /// input tag for calorimeter collections from GCT edm::InputTag m_caloInputTag; + edm::EDGetTokenT> m_egInputToken; + edm::EDGetTokenT> m_tauInputToken; + edm::EDGetTokenT> m_jetInputToken; + edm::EDGetTokenT> m_sumInputToken; /// logical flag to produce the L1 GT DAQ readout record bool m_produceL1GtDaqRecord; @@ -176,6 +189,10 @@ class GtProducer : public edm::EDProducer /// length of BST record (in bytes) from parameter set int m_psBstLengthBytes; + + /// prescale set used + unsigned int m_prescaleSet; + /// run algorithm triggers /// if true, unprescaled (all prescale factors 1) /// will overwrite the event setup diff --git a/L1Trigger/L1TGlobal/plugins/GtRecordDump.cc b/L1Trigger/L1TGlobal/plugins/GtRecordDump.cc index 8c5c3e577b031..cc949119ec488 100644 --- a/L1Trigger/L1TGlobal/plugins/GtRecordDump.cc +++ b/L1Trigger/L1TGlobal/plugins/GtRecordDump.cc @@ -47,9 +47,12 @@ #include "DataFormats/L1TGlobal/interface/GlobalAlgBlk.h" #include "DataFormats/L1TGlobal/interface/GlobalExtBlk.h" +#include "L1Trigger/L1TGlobal/interface/L1TGlobalUtil.h" + #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/MessageLogger/interface/MessageDrop.h" + using namespace edm; using namespace std; @@ -94,12 +97,13 @@ namespace l1t { bool m_dumpTestVectors; bool m_dumpGTRecord; + bool m_dumpTriggerResults; int m_minBx; int m_maxBx; int m_minBxVectors; int m_maxBxVectors; - + L1TGlobalUtil* m_gtUtil; }; GtRecordDump::GtRecordDump(const edm::ParameterSet& iConfig) @@ -116,6 +120,7 @@ namespace l1t { m_minBx = iConfig.getParameter("minBx"); m_maxBx = iConfig.getParameter("maxBx"); m_dumpGTRecord = iConfig.getParameter("dumpGTRecord"); + m_dumpTriggerResults = iConfig.getParameter("dumpTrigResults"); m_minBxVectors = iConfig.getParameter("minBxVec"); m_maxBxVectors = iConfig.getParameter("maxBxVec"); @@ -127,7 +132,13 @@ namespace l1t { m_absBx = 0; m_absBx += m_bxOffset; + + std::string preScaleFileName = iConfig.getParameter("psFileName"); + unsigned int preScColumn = iConfig.getParameter("psColumn"); + + edm::FileInPath f1("L1Trigger/L1TGlobal/data/Luminosity/startup/" + preScaleFileName); + m_gtUtil = new L1TGlobalUtil(f1.fullPath(),preScColumn); } // loop over events @@ -156,7 +167,51 @@ namespace l1t { Handle> uGtExt; iEvent.getByToken(uGtExtToken,uGtExt); + + if(m_dumpTriggerResults) { + + //Fill the L1 result maps + m_gtUtil->retrieveL1(iEvent,evSetup,uGtAlgToken); + + LogDebug("l1t|Global") << "retrieved L1 data " << endl; + + // grab the map for the final decisions + const std::vector > initialDecisions = m_gtUtil->decisionsInitial(); + const std::vector > prescaledDecisions = m_gtUtil->decisionsPrescaled(); + const std::vector > finalDecisions = m_gtUtil->decisionsFinal(); + const std::vector > prescales = m_gtUtil->prescales(); + const std::vector > masks = m_gtUtil->masks(); + const std::vector > vetoMasks = m_gtUtil->vetoMasks(); + + LogDebug("l1t|Global") << "retrieved all event vectors " << endl; + + // Dump the results + cout << " Bit Algorithm Name Init PScd Final PS Factor Masked Veto " << endl; + cout << "============================================================================================================" << endl; + for(unsigned int i=0; igetFinalOR(); + cout << " FinalOR = " << finOR < types_; std::vector< std::string > typeStr_; @@ -130,9 +134,21 @@ class L1TGlobalAnalyzer : public edm::EDAnalyzer { TH1F* hEmulDxAlgoBits_; TH2F* hAlgoBitsEmulGtVsHw_; TH2F* hAlgoBitsEmulDxVsHw_; + TH2F* hDmxVsGTEGEt_; + TH2F* hDmxVsGTEGEta_; + TH2F* hDmxVsGTEGPhi_; + TH2F* hDmxVsGTTauEt_; + TH2F* hDmxVsGTTauEta_; + TH2F* hDmxVsGTTauPhi_; TH2F* hDmxVsGTJetEt_; TH2F* hDmxVsGTJetEta_; TH2F* hDmxVsGTJetPhi_; + TH2F* hDmxVsGTSumEt_ETT_; + TH2F* hDmxVsGTSumEt_HTT_; + TH2F* hDmxVsGTSumEt_ETM_; + TH2F* hDmxVsGTSumPhi_ETM_; + TH2F* hDmxVsGTSumEt_HTM_; + TH2F* hDmxVsGTSumPhi_HTM_; }; @@ -172,6 +188,10 @@ class L1TGlobalAnalyzer : public edm::EDAnalyzer { m_dmxSumToken = consumes(dmxSumTag); m_doDmxSums = !(dmxSumTag==nullTag); + edm::InputTag muTag = iConfig.getParameter("muToken"); + m_muToken = consumes(muTag); + m_doMUs = !(muTag==nullTag); + edm::InputTag egTag = iConfig.getParameter("egToken"); m_egToken = consumes(egTag); m_doEGs = !(egTag==nullTag); @@ -204,6 +224,7 @@ class L1TGlobalAnalyzer : public edm::EDAnalyzer { types_.push_back( DmxTau ); types_.push_back( DmxJet ); types_.push_back( DmxSum ); + types_.push_back( MU ); types_.push_back( EG ); types_.push_back( Tau ); types_.push_back( Jet ); @@ -213,6 +234,7 @@ class L1TGlobalAnalyzer : public edm::EDAnalyzer { typeStr_.push_back( "dmxtau" ); typeStr_.push_back( "dmxjet" ); typeStr_.push_back( "dmxsum" ); + typeStr_.push_back( "mu" ); typeStr_.push_back( "eg" ); typeStr_.push_back( "tau" ); typeStr_.push_back( "jet" ); @@ -242,24 +264,6 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet std::stringstream text; - TH2F* hEvtEG = new TH2F(); - TH2F* hEvtTau = new TH2F(); - TH2F* hEvtJet = new TH2F(); - TH2F* hEvtDmxEG = new TH2F(); - TH2F* hEvtDmxTau = new TH2F(); - TH2F* hEvtDmxJet = new TH2F(); - - if (doEvtDisp_) { - std::stringstream ss; - ss << iEvent.run() << "-" << iEvent.id().event(); - TFileDirectory dir = evtDispDir_.mkdir(ss.str()); - hEvtEG = dir.make("EG", "", 83, -41.5, 41.5, 72, .5, 72.5); - hEvtTau = dir.make("Tau", "", 83, -41.5, 41.5, 72, .5, 72.5); - hEvtJet = dir.make("Jet", "", 83, -41.5, 41.5, 72, .5, 72.5); - hEvtDmxEG = dir.make("DmxEG", "", 227, -113.5, 113.5, 144, -0.5, 143.5); - hEvtDmxTau = dir.make("DmxTau", "", 227, -113.5, 113.5, 144, -0.5, 143.5); - hEvtDmxJet = dir.make("DmxJet", "", 227, -113.5, 113.5, 144, -0.5, 143.5); - } // get EG if (m_doDmxEGs) { @@ -277,7 +281,7 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet text << "Dmx EG : " << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi() << std::endl; - if (doEvtDisp_) hEvtDmxEG->Fill( itr->hwEta(), itr->hwPhi(), itr->hwPt() ); + } @@ -301,7 +305,6 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet text << "Dmx Tau : " << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi() << std::endl; - if (doEvtDisp_) hEvtDmxTau->Fill( itr->hwEta(), itr->hwPhi(), itr->hwPt() ); } } @@ -324,7 +327,6 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet text << "Dmx Jet : " << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi() << std::endl; - if (doEvtDisp_) hEvtDmxJet->Fill( itr->hwEta(), itr->hwPhi(), itr->hwPt() ); } } @@ -353,6 +355,31 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet } + + // get Muons + if (m_doMUs) { + Handle< BXVector > muons; + iEvent.getByToken(m_muToken,muons); + + for ( int ibx=muons->getFirstBX(); ibx<=muons->getLastBX(); ++ibx) { + + for ( auto itr = muons->begin(ibx); itr != muons->end(ibx); ++itr ) { + hbx_.at(MU)->Fill( ibx ); + het_.at(MU)->Fill( itr->hwPt() ); + heta_.at(MU)->Fill( itr->hwEta() ); + hphi_.at(MU)->Fill( itr->hwPhi() ); + hetaphi_.at(MU)->Fill( itr->hwEta(), itr->hwPhi(), itr->hwPt() ); + + text << "Muon : " << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi() << std::endl; + + } + + } + + } + + + // get EG if (m_doEGs) { Handle< BXVector > egs; @@ -369,7 +396,6 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet text << "EG : " << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi() << std::endl; - if (doEvtDisp_) hEvtEG->Fill( itr->hwEta(), itr->hwPhi(), itr->hwPt() ); } } @@ -392,7 +418,6 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet text << "Tau : " << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi() << std::endl; - if (doEvtDisp_) hEvtTau->Fill( itr->hwEta(), itr->hwPhi(), itr->hwPt() ); } } @@ -415,7 +440,6 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet text << "Jet : " << " BX=" << ibx << " ipt=" << itr->hwPt() << " ieta=" << itr->hwEta() << " iphi=" << itr->hwPhi() << std::endl; - if (doEvtDisp_) hEvtJet->Fill( itr->hwEta(), itr->hwPhi(), itr->hwPt() ); } } @@ -430,6 +454,7 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet for ( int ibx=sums->getFirstBX(); ibx<=sums->getLastBX(); ++ibx) { for ( auto itr = sums->begin(ibx); itr != sums->end(ibx); ++itr ) { + hbx_.at(Sum)->Fill( ibx ); het_.at(Sum)->Fill( itr->hwPt() ); heta_.at(Sum)->Fill( itr->hwEta() ); @@ -452,7 +477,10 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet for ( auto itr = algs->begin(ibx); itr != algs->end(ibx); ++itr ) { for(int algBit=0; algBit<128; algBit++) { //Fix Me: Should access size of algo vector...need method in GlobalAlgBlk class - if(itr->getAlgoDecisionFinal(algBit)) hAlgoBits_->Fill(algBit); + if(itr->getAlgoDecisionFinal(algBit)) { + hAlgoBits_->Fill(algBit); + text << "HW Fired Alg Bit : " << algBit << std::endl; + } } } @@ -470,7 +498,10 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet for ( auto itr = emulGtAlgs->begin(ibx); itr != emulGtAlgs->end(ibx); ++itr ) { for(int algBit=0; algBit<128; algBit++) { //Fix Me: Should access size of algo vector...need method in GlobalAlgBlk class - if(itr->getAlgoDecisionFinal(algBit)) hEmulGtAlgoBits_->Fill(algBit); + if(itr->getAlgoDecisionFinal(algBit)) { + hEmulGtAlgoBits_->Fill(algBit); + text << "Emul w/ GTInput Fired Alg Bit : " << algBit << std::endl; + } } } @@ -488,15 +519,125 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet for ( auto itr = emulDxAlgs->begin(ibx); itr != emulDxAlgs->end(ibx); ++itr ) { for(int algBit=0; algBit<128; algBit++) { //Fix Me: Should access size of algo vector...need method in GlobalAlgBlk class - if(itr->getAlgoDecisionFinal(algBit)) hEmulDxAlgoBits_->Fill(algBit); - } + if(itr->getAlgoDecisionFinal(algBit)) { + hEmulDxAlgoBits_->Fill(algBit); + text << "Emul w/ Demux output Fired Alg Bit : " << algBit << std::endl; + } + } + } + + } + + } + + + // EG (Dmx vs GT) + if (m_doEGs & m_doDmxEGs) { + Handle< BXVector > egs; + iEvent.getByToken(m_egToken,egs); + + Handle< BXVector > dmxegs; + iEvent.getByToken(m_dmxEGToken,dmxegs); + + for ( int ibx=egs->getFirstBX(); ibx<=egs->getLastBX(); ++ibx) { + + // Cycle through all GT egs + for (unsigned int igtEG=0; igtEGsize(ibx); igtEG++) { + + double gtEGEt = egs->at(ibx,igtEG).hwPt(); + double dmxEGEt = 0.0; + if(dmxegs->size(ibx)>igtEG) dmxEGEt = dmxegs->at(ibx,igtEG).hwPt(); + hDmxVsGTEGEt_->Fill(gtEGEt,dmxEGEt); + + double gtEGEta = egs->at(ibx,igtEG).hwEta(); + double dmxEGEta = 0.0; + if(dmxegs->size(ibx)>igtEG) dmxEGEta = dmxegs->at(ibx,igtEG).hwEta(); + hDmxVsGTEGEta_->Fill(gtEGEta,dmxEGEta); + + double gtEGPhi = egs->at(ibx,igtEG).hwPhi(); + double dmxEGPhi = 0.0; + if(dmxegs->size(ibx)>igtEG) dmxEGPhi = dmxegs->at(ibx,igtEG).hwPhi(); + hDmxVsGTEGPhi_->Fill(gtEGPhi,dmxEGPhi); + + + } + // if there are extra egs in the dmx record them + for (unsigned int idmEG=egs->size(ibx); idmEGsize(ibx); idmEG++) { + + double gtEGEt = 0.0; //no GT jet exists + double dmxEGEt = dmxegs->at(ibx,idmEG).hwPt(); + hDmxVsGTEGEt_->Fill(gtEGEt,dmxEGEt); + + double gtEGEta = 0.0; + double dmxEGEta = dmxegs->at(ibx,idmEG).hwEta(); + hDmxVsGTEGEta_->Fill(gtEGEta,dmxEGEta); + + double gtEGPhi = 0.0; + double dmxEGPhi = dmxegs->at(ibx,idmEG).hwPhi(); + hDmxVsGTEGPhi_->Fill(gtEGPhi,dmxEGPhi); + + } + } } + // Tau (Dmx vs GT) + if (m_doTaus & m_doDmxTaus) { + Handle< BXVector > taus; + iEvent.getByToken(m_tauToken,taus); + + Handle< BXVector > dmxtaus; + iEvent.getByToken(m_dmxTauToken,dmxtaus); + + for ( int ibx=taus->getFirstBX(); ibx<=taus->getLastBX(); ++ibx) { + + // Cycle through all GT taus + for (unsigned int igtTau=0; igtTausize(ibx); igtTau++) { + + double gtTauEt = taus->at(ibx,igtTau).hwPt(); + double dmxTauEt = 0.0; + if(dmxtaus->size(ibx)>igtTau) dmxTauEt = dmxtaus->at(ibx,igtTau).hwPt(); + hDmxVsGTTauEt_->Fill(gtTauEt,dmxTauEt); + + double gtTauEta = taus->at(ibx,igtTau).hwEta(); + double dmxTauEta = 0.0; + if(dmxtaus->size(ibx)>igtTau) dmxTauEta = dmxtaus->at(ibx,igtTau).hwEta(); + hDmxVsGTTauEta_->Fill(gtTauEta,dmxTauEta); + + double gtTauPhi = taus->at(ibx,igtTau).hwPhi(); + double dmxTauPhi = 0.0; + if(dmxtaus->size(ibx)>igtTau) dmxTauPhi = dmxtaus->at(ibx,igtTau).hwPhi(); + hDmxVsGTTauPhi_->Fill(gtTauPhi,dmxTauPhi); + + + + } + // if there are extra taus in the dmx record them + for (unsigned int idmTau=taus->size(ibx); idmTausize(ibx); idmTau++) { + + + double gtTauEt = 0.0; //no GT jet exists + double dmxTauEt = dmxtaus->at(ibx,idmTau).hwPt(); + hDmxVsGTTauEt_->Fill(gtTauEt,dmxTauEt); + + double gtTauEta = 0.0; + double dmxTauEta = dmxtaus->at(ibx,idmTau).hwEta(); + hDmxVsGTTauEta_->Fill(gtTauEta,dmxTauEta); + + double gtTauPhi = 0.0; + double dmxTauPhi = dmxtaus->at(ibx,idmTau).hwPhi(); + hDmxVsGTTauPhi_->Fill(gtTauPhi,dmxTauPhi); + + } + + } + + } + // Jets (Dmx vs GT) @@ -551,6 +692,89 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet } } + + // Sums (Dmx vs GT) + if (m_doSums & m_doDmxSums) { + Handle< BXVector > sums; + iEvent.getByToken(m_sumToken,sums); + + Handle< BXVector > dmxSums; + iEvent.getByToken(m_dmxSumToken,dmxSums); + + for ( int ibx=sums->getFirstBX(); ibx<=sums->getLastBX(); ++ibx) { + + // Cycle through all GT sums + for (unsigned int igtS=0; igtSsize(ibx); igtS++) { + + double gtSumEt = sums->at(ibx,igtS).hwPt(); + double dmxSumEt = 0.0; + if(dmxSums->size(ibx)>igtS) dmxSumEt = dmxSums->at(ibx,igtS).hwPt(); + + double gtSumPhi = sums->at(ibx,igtS).hwPhi(); + double dmxSumPhi = 0.0; + if(dmxSums->size(ibx)>igtS) dmxSumPhi = dmxSums->at(ibx,igtS).hwPhi(); + + if(sums->at(ibx,igtS).getType() == dmxSums->at(ibx,igtS).getType()) { + switch(sums->at(ibx,igtS).getType()) { + case l1t::EtSum::EtSumType::kTotalEt: + hDmxVsGTSumEt_ETT_->Fill(gtSumEt,dmxSumEt); + + break; + case l1t::EtSum::EtSumType::kTotalHt: + hDmxVsGTSumEt_HTT_->Fill(gtSumEt,dmxSumEt); + + break; + case l1t::EtSum::EtSumType::kMissingEt: + hDmxVsGTSumEt_ETM_->Fill(gtSumEt,dmxSumEt); + hDmxVsGTSumPhi_ETM_->Fill(gtSumPhi,dmxSumPhi); + break; + case l1t::EtSum::EtSumType::kMissingHt: + hDmxVsGTSumEt_HTM_->Fill(gtSumEt,dmxSumEt); + hDmxVsGTSumPhi_HTM_->Fill(gtSumPhi,dmxSumPhi); + break; + default: + break; + } + } else { + text << "WARNING: EtSum Types do not line up between DeMux and uGT " << std::endl; + } + } + // if there are extra sumss in the dmx record them...should not be any...but let's check + for (unsigned int idmS=sums->size(ibx); idmSsize(ibx); idmS++) { + + + double gtSumEt = 0.0; //no GT jet exists + double dmxSumEt = dmxSums->at(ibx,idmS).hwPt(); + + double gtSumPhi = 0.0; + double dmxSumPhi = dmxSums->at(ibx,idmS).hwPhi(); + + switch(dmxSums->at(ibx,idmS).getType()) { + case l1t::EtSum::EtSumType::kTotalEt: + hDmxVsGTSumEt_ETT_->Fill(gtSumEt,dmxSumEt); + + break; + case l1t::EtSum::EtSumType::kTotalHt: + hDmxVsGTSumEt_HTT_->Fill(gtSumEt,dmxSumEt); + + break; + case l1t::EtSum::EtSumType::kMissingEt: + hDmxVsGTSumEt_ETM_->Fill(gtSumEt,dmxSumEt); + hDmxVsGTSumPhi_ETM_->Fill(gtSumPhi,dmxSumPhi); + break; + case l1t::EtSum::EtSumType::kMissingHt: + hDmxVsGTSumEt_HTM_->Fill(gtSumEt,dmxSumEt); + hDmxVsGTSumPhi_HTM_->Fill(gtSumPhi,dmxSumPhi); + break; + default: + break; + } + + } + + } + + } //Algorithm Bits (Emulation vs HW) @@ -575,8 +799,10 @@ L1TGlobalAnalyzer::analyze(const edm::Event& iEvent, const edm::EventSetup& iSet hAlgoBitsEmulGtVsHw_->Fill(algBit,algBit); }else if(hw & !em) { hAlgoBitsEmulGtVsHw_->Fill(algBit,-1.0); + text << "WARNING: HW Fnd Alg Bit " << algBit << " but emulation did not " << std::endl; }else if(!hw & em) { hAlgoBitsEmulGtVsHw_->Fill(-1.0,algBit); + text << "WARNING: Emul. Fnd Alg Bit " << algBit << " but hardware did not " << std::endl; } } @@ -636,37 +862,67 @@ L1TGlobalAnalyzer::beginJob() for (; itr!=types_.end(); ++itr, ++str ) { - double etmax=99.5; - if (*itr==Jet || *itr==DmxJet || *itr==Sum || *itr==DmxSum) etmax=249.5; + if (*itr==Jet || *itr==DmxJet || *itr==Sum || *itr==DmxSum || *itr==DmxEG || *itr==EG || *itr==DmxTau || *itr==Tau) { + double etmax=99.5; + if (*itr==Jet || *itr==DmxJet || *itr==Sum || *itr==DmxSum) etmax=499.5; - dirs_.insert( std::pair< ObjectType, TFileDirectory >(*itr, fs->mkdir(*str) ) ); - - het_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("et", "", 100, -0.5, etmax) )); + dirs_.insert( std::pair< ObjectType, TFileDirectory >(*itr, fs->mkdir(*str) ) ); + + het_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("et", "", 500, -0.5, etmax) )); - hbx_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("bx", "", 11, -5.5, 5.5) )); + hbx_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("bx", "", 11, -5.5, 5.5) )); + + + heta_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("eta", "", 229, -114.5, 114.5) )); + hphi_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("phi", "", 144, -0.5, 143.5) )); + hetaphi_.insert( std::pair< ObjectType, TH2F* >(*itr, dirs_.at(*itr).make("etaphi", "", 229, -114.5, 114.5, 144, -0.5, 143.5) )); + } else if( *itr==MU) { + double etmax = 511.5; + dirs_.insert( std::pair< ObjectType, TFileDirectory >(*itr, fs->mkdir(*str) ) ); + + het_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("et", "", 512, -0.5, etmax) )); + + hbx_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("bx", "", 11, -5.5, 5.5) )); + + + heta_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("eta", "", 549, -224.5, 224.5) )); + hphi_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("phi", "", 576, -0.5, 575.5) )); + hetaphi_.insert( std::pair< ObjectType, TH2F* >(*itr, dirs_.at(*itr).make("etaphi", "", 549, -224.5, 224.5, 576, -0.5, 575.5) )); + + } - heta_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("eta", "", 227, -113.5, 113.5) )); - hphi_.insert( std::pair< ObjectType, TH1F* >(*itr, dirs_.at(*itr).make("phi", "", 144, -0.5, 143.5) )); - hetaphi_.insert( std::pair< ObjectType, TH2F* >(*itr, dirs_.at(*itr).make("etaphi", "", 227, -113.5, 113.5, 144, -0.5, 143.5) )); } algDir_ = fs->mkdir("Algorithms"); hAlgoBits_ = algDir_.make("hAlgoBits","Algorithm Bits",100, -0.5,99.5); hEmulGtAlgoBits_ = algDir_.make("hEmulGtAlgoBits","GT Emulated Algorithm Bits",100, -0.5,99.5); - hAlgoBitsEmulGtVsHw_ = algDir_.make("hAlgoBitsEmulGtVsHw","Algorithm Bits (GT) Emulation vs Hardware",101, -1.5,99.5,101,-1.5,99.5); + hAlgoBitsEmulGtVsHw_ = algDir_.make("hAlgoBitsEmulGtVsHw","Algorithm Bits (GT) Emulation vs Hardware",129, -1.5,127.5,129,-1.5,127.5); hEmulDxAlgoBits_ = algDir_.make("hEmulDxAlgoBits","Dx Emulated Algorithm Bits",100, -0.5,99.5); - hAlgoBitsEmulDxVsHw_ = algDir_.make("hAlgoBitsEmulDxVsHw","Algorithm Bits (Dx) Emulation vs Hardware",101, -1.5,99.5,101,-1.5,99.5); + hAlgoBitsEmulDxVsHw_ = algDir_.make("hAlgoBitsEmulDxVsHw","Algorithm Bits (Dx) Emulation vs Hardware",129, -1.5,127.5,129,-1.5,127.5); dmxVGtDir_ = fs->mkdir("DmxVsGT"); - hDmxVsGTJetEt_ = dmxVGtDir_.make("hDmxVsGTJetEt","Dmx Jet Et versus GT Jet Et",200,-0.5,199.5,200,-0.5,199.5); - hDmxVsGTJetEta_ = dmxVGtDir_.make("hDmxVsGTJetEta","Dmx Jet Eta versus GT Jet Eta",227,-113.5,113.5,227,-113.5,113.5); + hDmxVsGTEGEt_ = dmxVGtDir_.make("hDmxVsGTEGEt","Dmx EG Et versus GT EG Et", 500,-0.5,499.5,500,-0.5,499.5); + hDmxVsGTEGEta_ = dmxVGtDir_.make("hDmxVsGTEGEta","Dmx EG Eta versus GT EG Eta",229,-114.5,114.5,229,-114.5,114.5); + hDmxVsGTEGPhi_ = dmxVGtDir_.make("hDmxVsGTEGPhi","Dmx EG Phi versus GT EG Phi",144,-0.5,143.5,144,-0.5,143.5); + + hDmxVsGTTauEt_ = dmxVGtDir_.make("hDmxVsGTTauEt","Dmx Tau Et versus GT Tau Et", 500,-0.5,499.5,500,-0.5,499.5); + hDmxVsGTTauEta_ = dmxVGtDir_.make("hDmxVsGTTauEta","Dmx Tau Eta versus GT Tau Eta",229,-114.5,114.5,229,-114.5,114.5); + hDmxVsGTTauPhi_ = dmxVGtDir_.make("hDmxVsGTTauPhi","Dmx Tau Phi versus GT Tau Phi",144,-0.5,143.5,144,-0.5,143.5); + + hDmxVsGTJetEt_ = dmxVGtDir_.make("hDmxVsGTJetEt","Dmx Jet Et versus GT Jet Et", 500,-0.5,499.5,500,-0.5,499.5); + hDmxVsGTJetEta_ = dmxVGtDir_.make("hDmxVsGTJetEta","Dmx Jet Eta versus GT Jet Eta",229,-114.5,114.5,229,-114.5,114.5); hDmxVsGTJetPhi_ = dmxVGtDir_.make("hDmxVsGTJetPhi","Dmx Jet Phi versus GT Jet Phi",144,-0.5,143.5,144,-0.5,143.5); + + hDmxVsGTSumEt_ETT_ = dmxVGtDir_.make("hDmxVsGTSumEt_ETT","Dmx ETT versus GT ETT",256,-0.5,2047.5,256,-0.5,2047.5); + hDmxVsGTSumEt_HTT_ = dmxVGtDir_.make("hDmxVsGTSumEt_HTT","Dmx HTT versus GT HTT",256,-0.5,2047.5,256,-0.5,2047.5); + hDmxVsGTSumEt_ETM_ = dmxVGtDir_.make("hDmxVsGTSumEt_ETM","Dmx ETM versus GT ETM",500,-0.5,499.5,500,-0.5,499.5); + hDmxVsGTSumPhi_ETM_ = dmxVGtDir_.make("hDmxVsGTSumPhi_ETM","Dmx ETM Phi versus GT ETM Phi",144,-0.5,143.5,144,-0.5,143.5); + hDmxVsGTSumEt_HTM_ = dmxVGtDir_.make("hDmxVsGTSumEt_HTM","Dmx HTM versus GT HTM",500,-0.5,499.5,500,-0.5,499.5); + hDmxVsGTSumPhi_HTM_ = dmxVGtDir_.make("hDmxVsGTSumPhi_HTM","Dmx HTM Phi versus GT HTM Phi",144,-0.5,143.5,144,-0.5,143.5); + - if (doEvtDisp_) { - evtDispDir_ = fs->mkdir("Events"); - } } diff --git a/L1Trigger/L1TGlobal/plugins/TriggerMenuXmlParser.cc b/L1Trigger/L1TGlobal/plugins/TriggerMenuXmlParser.cc index 72baade02ef87..1b5395a58e470 100644 --- a/L1Trigger/L1TGlobal/plugins/TriggerMenuXmlParser.cc +++ b/L1Trigger/L1TGlobal/plugins/TriggerMenuXmlParser.cc @@ -1630,7 +1630,7 @@ bool l1t::TriggerMenuXmlParser::parseMuon(l1t::MuonCondition condMu, int cntEta=0; - unsigned int etaWindowLower=-1, etaWindowUpper=-1, etaWindowVetoLower=-1, etaWindowVetoUpper=-1; + unsigned int etaWindow1Lower=-1, etaWindow1Upper=-1, etaWindow2Lower=-1, etaWindow2Upper=-1; // Temporary before translation for( l1t::MuonObjectRequirement::etaWindow_const_iterator etaWindow =objPar->etaWindow().begin(); etaWindow != objPar->etaWindow().end(); ++etaWindow ){ @@ -1639,13 +1639,13 @@ bool l1t::TriggerMenuXmlParser::parseMuon(l1t::MuonCondition condMu, << "\n etaWindow lower = " << etaWindow->lower() << "\n etaWindow upper = " << etaWindow->upper() << std::endl; - if( cntEta==0 ){ etaWindowLower = etaWindow->lower(); etaWindowUpper = etaWindow->upper(); } - else if( cntEta==1 ){ etaWindowVetoLower = etaWindow->lower(); etaWindowVetoUpper = etaWindow->upper(); } + if( cntEta==0 ){ etaWindow1Lower = etaWindow->lower(); etaWindow1Upper = etaWindow->upper(); } + else if( cntEta==1 ){ etaWindow2Lower = etaWindow->lower(); etaWindow2Upper = etaWindow->upper(); } cntEta++; } int cntPhi=0; - unsigned int phiWindowLower=-1, phiWindowUpper=-1, phiWindowVetoLower=-1, phiWindowVetoUpper=-1; + unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1; for( l1t::MuonObjectRequirement::phiWindow_const_iterator phiWindow =objPar->phiWindow().begin(); phiWindow != objPar->phiWindow().end(); ++phiWindow ){ @@ -1654,20 +1654,20 @@ bool l1t::TriggerMenuXmlParser::parseMuon(l1t::MuonCondition condMu, << "\n phiWindow end = " << phiWindow->upper() << std::endl; - if( cntPhi==0 ){ phiWindowLower = phiWindow->lower(); phiWindowUpper = phiWindow->upper(); } - else if( cntPhi==1 ){ phiWindowVetoLower = phiWindow->lower(); phiWindowVetoUpper = phiWindow->upper(); } + if( cntPhi==0 ){ phiWindow1Lower = phiWindow->lower(); phiWindow1Upper = phiWindow->upper(); } + else if( cntPhi==1 ){ phiWindow2Lower = phiWindow->lower(); phiWindow2Upper = phiWindow->upper(); } cntPhi++; } - objParameter[cnt].etaWindowLower = etaWindowLower; - objParameter[cnt].etaWindowUpper = etaWindowUpper; - objParameter[cnt].etaWindowVetoLower = etaWindowVetoLower; - objParameter[cnt].etaWindowVetoUpper = etaWindowVetoUpper; + objParameter[cnt].etaWindow1Lower = etaWindow1Lower; + objParameter[cnt].etaWindow1Upper = etaWindow1Upper; + objParameter[cnt].etaWindow2Lower = etaWindow2Lower; + objParameter[cnt].etaWindow2Upper = etaWindow2Upper; - objParameter[cnt].phiWindowLower = phiWindowLower; - objParameter[cnt].phiWindowUpper = phiWindowUpper; - objParameter[cnt].phiWindowVetoLower = phiWindowVetoLower; - objParameter[cnt].phiWindowVetoUpper = phiWindowVetoUpper; + objParameter[cnt].phiWindow1Lower = phiWindow1Lower; + objParameter[cnt].phiWindow1Upper = phiWindow1Upper; + objParameter[cnt].phiWindow2Lower = phiWindow2Lower; + objParameter[cnt].phiWindow2Upper = phiWindow2Upper; // Output for debugging @@ -1678,14 +1678,14 @@ bool l1t::TriggerMenuXmlParser::parseMuon(l1t::MuonCondition condMu, << std::hex << objParameter[cnt].etaRange << std::dec // << "\n phiRange (hex) for muon object " << cnt << " = " // << std::hex << objParameter[cnt].phiRange << std::dec - << "\n etaWindow Lower / Upper for muon object " << cnt << " = " - << objParameter[cnt].etaWindowLower << " / " << objParameter[cnt].etaWindowUpper - << "\n etaWindowVeto Lower / Upper for muon object " << cnt << " = " - << objParameter[cnt].etaWindowVetoLower << " / " << objParameter[cnt].etaWindowVetoUpper - << "\n phiWindow Lower / Upper for muon object " << cnt << " = " - << objParameter[cnt].phiWindowLower << " / " << objParameter[cnt].phiWindowUpper - << "\n phiWindowVeto Lower / Upper for muon object " << cnt << " = " - << objParameter[cnt].phiWindowVetoLower << " / " << objParameter[cnt].phiWindowVetoUpper + << "\n etaWindow1 Lower / Upper for muon object " << cnt << " = " + << objParameter[cnt].etaWindow1Lower << " / " << objParameter[cnt].etaWindow1Upper + << "\n etaWindow2 Lower / Upper for muon object " << cnt << " = " + << objParameter[cnt].etaWindow2Lower << " / " << objParameter[cnt].etaWindow2Upper + << "\n phiWindow1 Lower / Upper for muon object " << cnt << " = " + << objParameter[cnt].phiWindow1Lower << " / " << objParameter[cnt].phiWindow1Upper + << "\n phiWindow2 Lower / Upper for muon object " << cnt << " = " + << objParameter[cnt].phiWindow2Lower << " / " << objParameter[cnt].phiWindow2Upper << std::endl; cnt++; @@ -1974,7 +1974,7 @@ bool l1t::TriggerMenuXmlParser::parseCalo(l1t::CalorimeterCondition condCalo, int cntEta=0; - unsigned int etaWindowLower=-1, etaWindowUpper=-1, etaWindowVetoLower=-1, etaWindowVetoUpper=-1; + unsigned int etaWindow1Lower=-1, etaWindow1Upper=-1, etaWindow2Lower=-1, etaWindow2Upper=-1; // Temporary before translation for( l1t::CalorimeterObjectRequirement::etaWindow_const_iterator etaWindow =objPar->etaWindow().begin(); etaWindow != objPar->etaWindow().end(); ++etaWindow ){ @@ -1983,13 +1983,13 @@ bool l1t::TriggerMenuXmlParser::parseCalo(l1t::CalorimeterCondition condCalo, << "\n etaWindow lower = " << etaWindow->lower() << "\n etaWindow upper = " << etaWindow->upper() << std::endl; - if( cntEta==0 ){ etaWindowLower = etaWindow->lower(); etaWindowUpper = etaWindow->upper(); } - else if( cntEta==1 ){ etaWindowVetoLower = etaWindow->lower(); etaWindowVetoUpper = etaWindow->upper(); } + if( cntEta==0 ){ etaWindow1Lower = etaWindow->lower(); etaWindow1Upper = etaWindow->upper(); } + else if( cntEta==1 ){ etaWindow2Lower = etaWindow->lower(); etaWindow2Upper = etaWindow->upper(); } cntEta++; } int cntPhi=0; - unsigned int phiWindowLower=-1, phiWindowUpper=-1, phiWindowVetoLower=-1, phiWindowVetoUpper=-1; + unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1; for( l1t::CalorimeterObjectRequirement::phiWindow_const_iterator phiWindow =objPar->phiWindow().begin(); phiWindow != objPar->phiWindow().end(); ++phiWindow ){ @@ -1998,20 +1998,20 @@ bool l1t::TriggerMenuXmlParser::parseCalo(l1t::CalorimeterCondition condCalo, << "\n phiWindow end = " << phiWindow->upper() << std::endl; - if( cntPhi==0 ){ phiWindowLower = phiWindow->lower(); phiWindowUpper = phiWindow->upper(); } - else if( cntPhi==1 ){ phiWindowVetoLower = phiWindow->lower(); phiWindowVetoUpper = phiWindow->upper(); } + if( cntPhi==0 ){ phiWindow1Lower = phiWindow->lower(); phiWindow1Upper = phiWindow->upper(); } + else if( cntPhi==1 ){ phiWindow2Lower = phiWindow->lower(); phiWindow2Upper = phiWindow->upper(); } cntPhi++; } - objParameter[cnt].etaWindowLower = etaWindowLower; - objParameter[cnt].etaWindowUpper = etaWindowUpper; - objParameter[cnt].etaWindowVetoLower = etaWindowVetoLower; - objParameter[cnt].etaWindowVetoUpper = etaWindowVetoUpper; + objParameter[cnt].etaWindow1Lower = etaWindow1Lower; + objParameter[cnt].etaWindow1Upper = etaWindow1Upper; + objParameter[cnt].etaWindow2Lower = etaWindow2Lower; + objParameter[cnt].etaWindow2Upper = etaWindow2Upper; - objParameter[cnt].phiWindowLower = phiWindowLower; - objParameter[cnt].phiWindowUpper = phiWindowUpper; - objParameter[cnt].phiWindowVetoLower = phiWindowVetoLower; - objParameter[cnt].phiWindowVetoUpper = phiWindowVetoUpper; + objParameter[cnt].phiWindow1Lower = phiWindow1Lower; + objParameter[cnt].phiWindow1Upper = phiWindow1Upper; + objParameter[cnt].phiWindow2Lower = phiWindow2Lower; + objParameter[cnt].phiWindow2Upper = phiWindow2Upper; // Output for debugging @@ -2022,14 +2022,14 @@ bool l1t::TriggerMenuXmlParser::parseCalo(l1t::CalorimeterCondition condCalo, << std::hex << objParameter[cnt].etaRange << std::dec << "\n phiRange (hex) for calo object " << cnt << " = " << std::hex << objParameter[cnt].phiRange << std::dec - << "\n etaWindow Lower / Upper for calo object " << cnt << " = " - << objParameter[cnt].etaWindowLower << " / " << objParameter[cnt].etaWindowUpper - << "\n etaWindowVeto Lower / Upper for calo object " << cnt << " = " - << objParameter[cnt].etaWindowVetoLower << " / " << objParameter[cnt].etaWindowVetoUpper - << "\n phiWindow Lower / Upper for calo object " << cnt << " = " - << objParameter[cnt].phiWindowLower << " / " << objParameter[cnt].phiWindowUpper - << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = " - << objParameter[cnt].phiWindowVetoLower << " / " << objParameter[cnt].phiWindowVetoUpper + << "\n etaWindow1 Lower / Upper for calo object " << cnt << " = " + << objParameter[cnt].etaWindow1Lower << " / " << objParameter[cnt].etaWindow1Upper + << "\n etaWindow2 Lower / Upper for calo object " << cnt << " = " + << objParameter[cnt].etaWindow2Lower << " / " << objParameter[cnt].etaWindow2Upper + << "\n phiWindow1 Lower / Upper for calo object " << cnt << " = " + << objParameter[cnt].phiWindow1Lower << " / " << objParameter[cnt].phiWindow1Upper + << "\n phiWindow2 Lower / Upper for calo object " << cnt << " = " + << objParameter[cnt].phiWindow2Lower << " / " << objParameter[cnt].phiWindow2Upper << std::endl; cnt++; @@ -2261,7 +2261,7 @@ bool l1t::TriggerMenuXmlParser::parseEnergySum(l1t::EnergySumsCondition condEner objParameter[cnt].etThreshold = objPar.etThreshold(); int cntPhi=0; - unsigned int phiWindowLower=-1, phiWindowUpper=-1, phiWindowVetoLower=-1, phiWindowVetoUpper=-1; + unsigned int phiWindow1Lower=-1, phiWindow1Upper=-1, phiWindow2Lower=-1, phiWindow2Upper=-1; for( l1t::EnergySumsObjectRequirement::phiWindow_const_iterator phiWindow =objPar.phiWindow().begin(); phiWindow != objPar.phiWindow().end(); ++phiWindow ){ @@ -2270,25 +2270,25 @@ bool l1t::TriggerMenuXmlParser::parseEnergySum(l1t::EnergySumsCondition condEner << "\n phiWindow end = " << phiWindow->upper() << std::endl; - if( cntPhi==0 ){ phiWindowLower = phiWindow->lower(); phiWindowUpper = phiWindow->upper(); } - else if( cntPhi==1 ){ phiWindowVetoLower = phiWindow->lower(); phiWindowVetoUpper = phiWindow->upper(); } + if( cntPhi==0 ){ phiWindow1Lower = phiWindow->lower(); phiWindow1Upper = phiWindow->upper(); } + else if( cntPhi==1 ){ phiWindow2Lower = phiWindow->lower(); phiWindow2Upper = phiWindow->upper(); } cntPhi++; } - objParameter[cnt].phiWindowLower = phiWindowLower; - objParameter[cnt].phiWindowUpper = phiWindowUpper; - objParameter[cnt].phiWindowVetoLower = phiWindowVetoLower; - objParameter[cnt].phiWindowVetoUpper = phiWindowVetoUpper; + objParameter[cnt].phiWindow1Lower = phiWindow1Lower; + objParameter[cnt].phiWindow1Upper = phiWindow1Upper; + objParameter[cnt].phiWindow2Lower = phiWindow2Lower; + objParameter[cnt].phiWindow2Upper = phiWindow2Upper; // Output for debugging LogDebug("l1t|Global") << "\n EnergySum ET high threshold (hex) for energy sum object " << cnt << " = " << std::hex << objParameter[cnt].etThreshold << std::dec - << "\n phiWindow Lower / Upper for calo object " << cnt << " = " - << objParameter[cnt].phiWindowLower << " / " << objParameter[cnt].phiWindowUpper - << "\n phiWindowVeto Lower / Upper for calo object " << cnt << " = " - << objParameter[cnt].phiWindowVetoLower << " / " << objParameter[cnt].phiWindowVetoUpper + << "\n phiWindow1 Lower / Upper for calo object " << cnt << " = " + << objParameter[cnt].phiWindow1Lower << " / " << objParameter[cnt].phiWindow1Upper + << "\n phiWindow2 Lower / Upper for calo object " << cnt << " = " + << objParameter[cnt].phiWindow2Lower << " / " << objParameter[cnt].phiWindow2Upper << std::endl; diff --git a/L1Trigger/L1TGlobal/python/hackConditions_cff.py b/L1Trigger/L1TGlobal/python/hackConditions_cff.py new file mode 100644 index 0000000000000..69ab956cbc38c --- /dev/null +++ b/L1Trigger/L1TGlobal/python/hackConditions_cff.py @@ -0,0 +1,36 @@ +# +# hackConditions.py Load ES Producers for any conditions not yet in GT... +# +# The intention is that this file should shrink with time as conditions are added to GT. +# + +import FWCore.ParameterSet.Config as cms +from Configuration.StandardSequences.Eras import eras + +# +# Legacy Trigger: No Hacks Needed +# +#if not (eras.stage1L1Trigger.isChosen() or eras.stage2L1Trigger.isChosen()): +# print "L1TGlobal conditions configured for Run1 (Legacy) trigger. " +# + +# +# Stage-1 Trigger: No Hacks Needed +# +#if eras.stage1L1Trigger.isChosen() and not eras.stage2L1Trigger.isChosen(): +# print "L1TGlobal Conditions configured for Stage-1 (2015) trigger. " + +# +# Stage-2 Trigger +# +if eras.stage2L1Trigger.isChosen(): + print "L1TGlobal Conditions configured for Stage-2 (2016) trigger. " + from L1Trigger.L1TGlobal.StableParametersConfig_cff import * + from L1Trigger.L1TGlobal.TriggerMenuXml_cfi import * + TriggerMenuXml.TriggerMenuLuminosity = 'startup' +# TriggerMenuXml.DefXmlFile = 'L1_Example_Menu_2013.xml' +# TriggerMenuXml.DefXmlFile = 'L1Menu_Reference_2014.xml' +# TriggerMenuXml.DefXmlFile = 'L1Menu_Collisions2015_25nsStage1_v6_uGT_v2.xml' + TriggerMenuXml.DefXmlFile = 'L1Menu_Collisions2015_25nsStage1_v6_uGT_v3.xml' + from L1Trigger.L1TGlobal.TriggerMenuConfig_cff import * + es_prefer_l1GtParameters = cms.ESPrefer('l1t::TriggerMenuXmlProducer','TriggerMenuXml') diff --git a/L1Trigger/L1TGlobal/python/simDigis_cff.py b/L1Trigger/L1TGlobal/python/simDigis_cff.py new file mode 100644 index 0000000000000..c17c4b840b02d --- /dev/null +++ b/L1Trigger/L1TGlobal/python/simDigis_cff.py @@ -0,0 +1,36 @@ +import FWCore.ParameterSet.Config as cms +from Configuration.StandardSequences.Eras import eras +# +# Legacy Trigger: +# +if not (eras.stage2L1Trigger.isChosen()): + print "L1TGlobal Sequence configured for Legacy trigger (Run1 and Run 2015). " +# +# - Global Trigger emulator +# + import L1Trigger.GlobalTrigger.gtDigis_cfi + simGtDigis = L1Trigger.GlobalTrigger.gtDigis_cfi.gtDigis.clone() + simGtDigis.GmtInputTag = 'simGmtDigis' + simGtDigis.GctInputTag = 'simGctDigis' + simGtDigis.TechnicalTriggersInputTags = cms.VInputTag( + cms.InputTag( 'simBscDigis' ), + cms.InputTag( 'simRpcTechTrigDigis' ), + cms.InputTag( 'simHcalTechTrigDigis' ), + cms.InputTag( 'simCastorTechTrigDigis' ) + ) + SimL1TGlobal = cms.Sequence(simGtDigis) + +# +# Stage-2 Trigger +# +if eras.stage2L1Trigger.isChosen(): +# +# - Global Trigger emulator +# + print "L1TGlobal Sequence configured for Stage-2 (2016) trigger. " + from L1Trigger.L1TGlobal.simGtStage2Digis_cfi import * + simGtStage2Digis.caloInputTag = cms.InputTag('simCaloStage2Digis') + simGtStage2Digis.GmtInputTag = cms.InputTag('simGmtStage2Digis') + simGtStage2Digis.PrescaleCSVFile = cms.string('prescale_L1TGlobal.csv') + simGtStage2Digis.PrescaleSet = cms.uint32(1) + SimL1TGlobal = cms.Sequence(simGtStage2Digis) diff --git a/L1Trigger/L1TGlobal/python/simGtStage2Digis_cfi.py b/L1Trigger/L1TGlobal/python/simGtStage2Digis_cfi.py new file mode 100644 index 0000000000000..9365a33958f20 --- /dev/null +++ b/L1Trigger/L1TGlobal/python/simGtStage2Digis_cfi.py @@ -0,0 +1,23 @@ +import FWCore.ParameterSet.Config as cms + +# cfi uGT emulator + +simGtStage2Digis = cms.EDProducer("l1t::GtProducer", + #TechnicalTriggersUnprescaled = cms.bool(False), + ProduceL1GtObjectMapRecord = cms.bool(True), + AlgorithmTriggersUnmasked = cms.bool(False), + EmulateBxInEvent = cms.int32(1), + L1DataBxInEvent = cms.int32(5), + AlgorithmTriggersUnprescaled = cms.bool(False), + ProduceL1GtDaqRecord = cms.bool(True), + GmtInputTag = cms.InputTag("gtInput"), + caloInputTag = cms.InputTag("gtInput"), + AlternativeNrBxBoardDaq = cms.uint32(0), + #WritePsbL1GtDaqRecord = cms.bool(True), + TriggerMenuLuminosity = cms.string('startup'), + PrescaleCSVFile = cms.string('prescale_L1TGlobal.csv'), + PrescaleSet = cms.uint32(1), + BstLengthBytes = cms.int32(-1), + Verbosity = cms.untracked.int32(0) +) + diff --git a/L1Trigger/L1TGlobal/src/CaloCondition.cc b/L1Trigger/L1TGlobal/src/CaloCondition.cc index 501bead7bd19f..61d2575d378cb 100644 --- a/L1Trigger/L1TGlobal/src/CaloCondition.cc +++ b/L1Trigger/L1TGlobal/src/CaloCondition.cc @@ -547,7 +547,7 @@ const bool l1t::CaloCondition::checkObjectParameter(const int iCondition, const } // check eta - if( !checkRangeEta(cand.hwEta(), objPar.etaWindowLower, objPar.etaWindowUpper, objPar.etaWindowVetoLower, objPar.etaWindowVetoLower, 7) ){ + if( !checkRangeEta(cand.hwEta(), objPar.etaWindow1Lower, objPar.etaWindow1Upper, objPar.etaWindow2Lower, objPar.etaWindow2Upper, 7) ){ LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRange(eta)" << std::endl; return false; } @@ -557,7 +557,7 @@ const bool l1t::CaloCondition::checkObjectParameter(const int iCondition, const // } // check phi - if( !checkRangePhi(cand.hwPhi(), objPar.phiWindowLower, objPar.phiWindowUpper, objPar.phiWindowVetoLower, objPar.phiWindowVetoLower) ){ + if( !checkRangePhi(cand.hwPhi(), objPar.phiWindow1Lower, objPar.phiWindow1Upper, objPar.phiWindow2Lower, objPar.phiWindow2Upper) ){ LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRange(phi)" << std::endl; return false; } diff --git a/L1Trigger/L1TGlobal/src/CaloTemplate.cc b/L1Trigger/L1TGlobal/src/CaloTemplate.cc index c26f4ec881945..eecc4236f68af 100644 --- a/L1Trigger/L1TGlobal/src/CaloTemplate.cc +++ b/L1Trigger/L1TGlobal/src/CaloTemplate.cc @@ -115,6 +115,8 @@ void CaloTemplate::print(std::ostream& myCout) const << std::hex << m_objectParameter[i].phiRange << std::endl; myCout << " isolationLUT = " << std::hex << m_objectParameter[i].isolationLUT << std::endl; + myCout << " qualityLUT = " + << std::hex << m_objectParameter[i].qualityLUT << std::endl; } if ( wsc() ) { diff --git a/L1Trigger/L1TGlobal/src/CorrCondition.cc b/L1Trigger/L1TGlobal/src/CorrCondition.cc new file mode 100644 index 0000000000000..7f785feae6761 --- /dev/null +++ b/L1Trigger/L1TGlobal/src/CorrCondition.cc @@ -0,0 +1,201 @@ +/** + * \class CorrCondition + * + * + * Description: evaluation of a correlation condition. + * + * Implementation: + * + * + * + */ + +// this class header +#include "L1Trigger/L1TGlobal/interface/CorrCondition.h" + +// system include files +#include +#include + +#include +#include +#include + +// user include files +// base classes +#include "L1Trigger/L1TGlobal/interface/CorrelationTemplate.h" +#include "L1Trigger/L1TGlobal/interface/ConditionEvaluation.h" + +#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutSetupFwd.h" + +#include "DataFormats/L1Trigger/interface/L1Candidate.h" +/*#include "DataFormats/L1GlobalCaloTrigger/interface/L1GctCand.h" +#include "DataFormats/L1GlobalCaloTrigger/interface/L1GctEmCand.h" +#include "DataFormats/L1GlobalCaloTrigger/interface/L1GctJetCand.h" +*/ + +#include "CondFormats/L1TObjects/interface/GlobalStableParameters.h" +#include "CondFormats/DataRecord/interface/L1TGlobalStableParametersRcd.h" + +#include "L1Trigger/GlobalTrigger/interface/L1GlobalTriggerFunctions.h" +#include "L1Trigger/L1TGlobal/interface/GtBoard.h" + +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/MessageLogger/interface/MessageDrop.h" + +// constructors +// default +l1t::CorrCondition::CorrCondition() : + ConditionEvaluation() { + +/* //BLW comment out for now + m_ifCaloEtaNumberBits = -1; + m_corrParDeltaPhiNrBins = 0; +*/ +} + +// from base template condition (from event setup usually) +l1t::CorrCondition::CorrCondition(const GtCondition* corrTemplate, + const GtCondition* cond0Condition, + const GtCondition* cond1Condition, + const GtBoard* ptrGTB + ) : + ConditionEvaluation(), + m_gtCorrelationTemplate(static_cast(corrTemplate)), + m_gtCond0(cond0Condition), m_gtCond1(cond1Condition), + m_uGtB(ptrGTB) +{ + + + +} + +// copy constructor +void l1t::CorrCondition::copy(const l1t::CorrCondition& cp) { + + m_gtCorrelationTemplate = cp.gtCorrelationTemplate(); + m_uGtB = cp.getuGtB(); + + m_condMaxNumberObjects = cp.condMaxNumberObjects(); + m_condLastResult = cp.condLastResult(); + m_combinationsInCond = cp.getCombinationsInCond(); + + m_verbosity = cp.m_verbosity; + +} + +l1t::CorrCondition::CorrCondition(const l1t::CorrCondition& cp) : + ConditionEvaluation() { + + copy(cp); + +} + +// destructor +l1t::CorrCondition::~CorrCondition() { + + // empty + +} + +// equal operator +l1t::CorrCondition& l1t::CorrCondition::operator=(const l1t::CorrCondition& cp) { + copy(cp); + return *this; +} + +// methods +void l1t::CorrCondition::setGtCorrelationTemplate(const CorrelationTemplate* caloTempl) { + + m_gtCorrelationTemplate = caloTempl; + +} + +/// set the pointer to uGT GtBoard +void l1t::CorrCondition::setuGtB(const GtBoard* ptrGTB) { + + m_uGtB = ptrGTB; + +} + +/* //BLW COmment out for now +// set the number of bits for eta of calorimeter objects +void l1t::CorrCondition::setGtIfCaloEtaNumberBits(const int& ifCaloEtaNumberBitsValue) { + + m_ifCaloEtaNumberBits = ifCaloEtaNumberBitsValue; + +} + +// set the maximum number of bins for the delta phi scales +void l1t::CorrCondition::setGtCorrParDeltaPhiNrBins( + const int& corrParDeltaPhiNrBins) { + + m_corrParDeltaPhiNrBins = corrParDeltaPhiNrBins; + +} +*/ + + +// try all object permutations and check spatial correlations, if required +const bool l1t::CorrCondition::evaluateCondition(const int bxEval) const { + + // std::cout << "m_isDebugEnabled = " << m_isDebugEnabled << std::endl; + // std::cout << "m_verbosity = " << m_verbosity << std::endl; + + bool condResult = false; + + return condResult; + +} + +// load calo candidates +const l1t::L1Candidate* l1t::CorrCondition::getCandidate(const int bx, const int indexCand) const { + + // objectType() gives the type for nrObjects() only, + // but in a CondCalo all objects have the same type + // take type from the type of the first object + switch ((m_gtCorrelationTemplate->objectType())[0]) { + case NoIsoEG: + return (m_uGtB->getCandL1EG())->at(bx,indexCand); + break; + + case CenJet: + return (m_uGtB->getCandL1Jet())->at(bx,indexCand); + break; + + case TauJet: + return (m_uGtB->getCandL1Tau())->at(bx,indexCand); + break; + default: + return 0; + break; + } + + return 0; +} + +/** + * checkObjectParameter - Compare a single particle with a numbered condition. + * + * @param iCondition The number of the condition. + * @param cand The candidate to compare. + * + * @return The result of the comparison (false if a condition does not exist). + */ + +const bool l1t::CorrCondition::checkObjectParameter(const int iCondition, const l1t::L1Candidate& cand) const { + + + return true; +} + +void l1t::CorrCondition::print(std::ostream& myCout) const { + + myCout << "Dummy Print for CorrCondition" << std::endl; + m_gtCorrelationTemplate->print(myCout); + + + ConditionEvaluation::print(myCout); + +} + diff --git a/L1Trigger/L1TGlobal/src/CorrelationTemplate.cc b/L1Trigger/L1TGlobal/src/CorrelationTemplate.cc index fff65dac2c5b5..43f0ad8086848 100644 --- a/L1Trigger/L1TGlobal/src/CorrelationTemplate.cc +++ b/L1Trigger/L1TGlobal/src/CorrelationTemplate.cc @@ -174,13 +174,15 @@ void CorrelationTemplate::print(std::ostream& myCout) const myCout << "\n Correlation parameters " << "[ hex ]" << std::endl; - + myCout << " Cut Type: " << m_correlationParameter.corrCutType << std::endl; myCout << " deltaEtaRange = " << std::hex << m_correlationParameter.deltaEtaRange << std::endl; myCout << " deltaPhiRange = " << std::hex << m_correlationParameter.deltaPhiRange << std::endl; myCout << " deltaPhiMaxbits = " << std::hex << m_correlationParameter.deltaPhiMaxbits << std::endl; + myCout << " minCutValue = " << std::dec << m_correlationParameter.minCutValue << std::endl; + myCout << " maxCutValue = " << std::dec << m_correlationParameter.maxCutValue << std::endl; // reset to decimal output myCout << std::dec << std::endl; diff --git a/L1Trigger/L1TGlobal/src/EnergySumCondition.cc b/L1Trigger/L1TGlobal/src/EnergySumCondition.cc index c8c18b9fe4080..a7491f08d38f7 100644 --- a/L1Trigger/L1TGlobal/src/EnergySumCondition.cc +++ b/L1Trigger/L1TGlobal/src/EnergySumCondition.cc @@ -224,7 +224,7 @@ const bool l1t::EnergySumCondition::evaluateCondition(const int bxEval) const { // for overflow, the phi requirements are ignored if( MissingEnergy ){ // check phi - if( !checkRangePhi(candPhi, objPar.phiWindowLower, objPar.phiWindowUpper, objPar.phiWindowVetoLower, objPar.phiWindowVetoLower) ){ + if( !checkRangePhi(candPhi, objPar.phiWindow1Lower, objPar.phiWindow1Upper, objPar.phiWindow2Lower, objPar.phiWindow2Upper) ){ LogDebug("l1t|Global") << "\t\t l1t::EtSum failed checkRange(phi)" << std::endl; return false; } diff --git a/L1Trigger/L1TGlobal/src/GtBoard.cc b/L1Trigger/L1TGlobal/src/GtBoard.cc index d29296dcade68..3cc70c2ac7894 100644 --- a/L1Trigger/L1TGlobal/src/GtBoard.cc +++ b/L1Trigger/L1TGlobal/src/GtBoard.cc @@ -88,6 +88,8 @@ l1t::GtBoard::GtBoard() : m_candL1Tau( new BXVector), m_candL1Jet( new BXVector), m_candL1EtSum( new BXVector), + m_firstEv(true), + m_firstEvLumiSegment(true), m_isDebugEnabled(edm::isDebugEnabled()) { @@ -178,7 +180,10 @@ void l1t::GtBoard::init(const int numberPhysTriggers, const int nrL1Mu, const in // receive data from Calorimeter void l1t::GtBoard::receiveCaloObjectData(edm::Event& iEvent, - const edm::InputTag& caloInputTag, + const edm::EDGetTokenT>& egInputToken, + const edm::EDGetTokenT>& tauInputToken, + const edm::EDGetTokenT>& jetInputToken, + const edm::EDGetTokenT>& sumInputToken, const bool receiveEG, const int nrL1EG, const bool receiveTau, const int nrL1Tau, const bool receiveJet, const int nrL1Jet, @@ -187,7 +192,7 @@ void l1t::GtBoard::receiveCaloObjectData(edm::Event& iEvent, if (m_verbosity) { LogDebug("l1t|Global") << "\n**** Board receiving Calo Data " - << "\n from input tag " << caloInputTag << "\n" + //<< "\n from input tag " << caloInputTag << "\n" << std::endl; } @@ -197,13 +202,13 @@ void l1t::GtBoard::receiveCaloObjectData(edm::Event& iEvent, // get data from Calorimeter if (receiveEG) { edm::Handle> egData; - iEvent.getByLabel(caloInputTag, egData); + iEvent.getByToken(egInputToken, egData); if (!egData.isValid()) { if (m_verbosity) { edm::LogWarning("l1t|Global") << "\nWarning: BXVector with input tag " - << caloInputTag + //<< caloInputTag << "\nrequested in configuration, but not found in the event.\n" << std::endl; } @@ -226,13 +231,13 @@ void l1t::GtBoard::receiveCaloObjectData(edm::Event& iEvent, if (receiveTau) { edm::Handle> tauData; - iEvent.getByLabel(caloInputTag, tauData); + iEvent.getByToken(tauInputToken, tauData); if (!tauData.isValid()) { if (m_verbosity) { edm::LogWarning("l1t|Global") << "\nWarning: BXVector with input tag " - << caloInputTag + //<< caloInputTag << "\nrequested in configuration, but not found in the event.\n" << std::endl; } @@ -255,13 +260,13 @@ void l1t::GtBoard::receiveCaloObjectData(edm::Event& iEvent, if (receiveJet) { edm::Handle> jetData; - iEvent.getByLabel(caloInputTag, jetData); + iEvent.getByToken(jetInputToken, jetData); if (!jetData.isValid()) { if (m_verbosity) { edm::LogWarning("l1t|Global") << "\nWarning: BXVector with input tag " - << caloInputTag + //<< caloInputTag << "\nrequested in configuration, but not found in the event.\n" << std::endl; } @@ -284,13 +289,13 @@ void l1t::GtBoard::receiveCaloObjectData(edm::Event& iEvent, if(receiveEtSums) { edm::Handle> etSumData; - iEvent.getByLabel(caloInputTag, etSumData); + iEvent.getByToken(sumInputToken, etSumData); if(!etSumData.isValid()) { if (m_verbosity) { edm::LogWarning("l1t|Global") << "\nWarning: BXVector with input tag " - << caloInputTag + //<< caloInputTag << "\nrequested in configuration, but not found in the event.\n" << std::endl; } @@ -337,13 +342,13 @@ void l1t::GtBoard::receiveCaloObjectData(edm::Event& iEvent, // receive data from Global Muon Trigger void l1t::GtBoard::receiveMuonObjectData(edm::Event& iEvent, - const edm::InputTag& muInputTag, const bool receiveMu, + const edm::EDGetTokenT >& muInputToken, const bool receiveMu, const int nrL1Mu) { if (m_verbosity) { LogDebug("l1t|Global") << "\n**** GtBoard receiving muon data = " - << "\n from input tag " << muInputTag << "\n" + //<< "\n from input tag " << muInputTag << "\n" << std::endl; } @@ -352,13 +357,13 @@ void l1t::GtBoard::receiveMuonObjectData(edm::Event& iEvent, // get data from Global Muon Trigger if (receiveMu) { edm::Handle> muonData; - iEvent.getByLabel(muInputTag, muonData); + iEvent.getByToken(muInputToken, muonData); if (!muonData.isValid()) { if (m_verbosity) { edm::LogWarning("l1t|Global") << "\nWarning: BXVector with input tag " - << muInputTag + //<< muInputTag << "\nrequested in configuration, but not found in the event.\n" << std::endl; } @@ -421,8 +426,11 @@ void l1t::GtBoard::runGTL( m_uGtExtBlk.reset(); m_algInitialOr=false; m_algPrescaledOr=false; + m_algFinalOrPreVeto=false; m_algFinalOr=false; + m_algFinalOrVeto=false; + /* const std::vector >& corrMuon = @@ -896,6 +904,11 @@ void l1t::GtBoard::runGTL( // run GTL void l1t::GtBoard::runFDL(edm::Event& iEvent, const int iBxInEvent, + const int totalBxInEvent, + const unsigned int numberPhysTriggers, + const std::vector& prescaleFactorsAlgoTrig, + const std::vector& triggerMaskAlgoTrig, + const std::vector& triggerMaskVetoAlgoTrig, const bool algorithmTriggersUnprescaled, const bool algorithmTriggersUnmasked ){ @@ -907,20 +920,28 @@ void l1t::GtBoard::runFDL(edm::Event& iEvent, } -/* Nothing with prescales right now. - // prescale counters are reset at the beginning of the luminosity segment - if (m_firstEv) { - m_firstEv = false; + // prescale counters are reset at the beginning of the luminosity segment + if( m_firstEv ){ + // prescale counters: numberPhysTriggers counters per bunch cross + m_prescaleCounterAlgoTrig.reserve(numberPhysTriggers*totalBxInEvent); + + for( int iBxInEvent = 0; iBxInEvent <= totalBxInEvent; ++iBxInEvent ){ + m_prescaleCounterAlgoTrig.push_back(prescaleFactorsAlgoTrig); + } + m_firstEv = false; } // TODO FIXME find the beginning of the luminosity segment - if (m_firstEvLumiSegment) { + if( m_firstEvLumiSegment ){ - m_firstEvLumiSegment = false; + m_prescaleCounterAlgoTrig.clear(); + for( int iBxInEvent = 0; iBxInEvent <= totalBxInEvent; ++iBxInEvent ){ + m_prescaleCounterAlgoTrig.push_back(prescaleFactorsAlgoTrig); + } + m_firstEvLumiSegment = false; } -*/ // Copy Algorithm bits to Prescaled word // Prescaling and Masking done below if requested. @@ -930,59 +951,84 @@ void l1t::GtBoard::runFDL(edm::Event& iEvent, // ------------------------------------------- // Apply Prescales or skip if turned off // ------------------------------------------- - if (!algorithmTriggersUnprescaled){ -/* - for (unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit) { + if( !algorithmTriggersUnprescaled ){ - if (prescaleFactorsAlgoTrig.at(iBit) != 1) { + // iBxInEvent is ... -2 -1 0 1 2 ... while counters are 0 1 2 3 4 ... + int inBxInEvent = totalBxInEvent/2 + iBxInEvent; - bool bitValue = algoDecisionWord.at( iBit ); - if (bitValue) { + bool temp_algPrescaledOr = false; + for( unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit ){ - (m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit))--; - if (m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) == 0) { + bool bitValue = m_uGtAlgBlk.getAlgoDecisionInitial( iBit ); + if( bitValue ){ + if( prescaleFactorsAlgoTrig.at(iBit) != 1 ){ - // bit already true in algoDecisionWord, just reset counter - m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) = - prescaleFactorsAlgoTrig.at(iBit); - } else { + (m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit))--; + if( m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) == 0 ){ - // change bit to false in prescaled word and final decision word - algoDecisionWord[iBit] = false; + // bit already true in algoDecisionWord, just reset counter + m_prescaleCounterAlgoTrig.at(inBxInEvent).at(iBit) = prescaleFactorsAlgoTrig.at(iBit); + temp_algPrescaledOr = true; + } + else { - } //if Prescale counter reached zero - } //if algo bit is set true - } //if prescale factor is not 1 (ie. no prescale) - } //loop over alg bits -*/ - m_algPrescaledOr = m_algInitialOr; //temp - - } else { - - // Since not Prescaling just take OR of Initial Work - m_algPrescaledOr = m_algInitialOr; + // change bit to false in prescaled word and final decision word + m_uGtAlgBlk.setAlgoDecisionPreScaled(iBit,false); + + } //if Prescale counter reached zero + } //if prescale factor is not 1 (ie. no prescale) + else { + + temp_algPrescaledOr = true; + } + } //if algo bit is set true + } //loop over alg bits + + m_algPrescaledOr = temp_algPrescaledOr; //temp + + } + else { + // Since not Prescaling just take OR of Initial Work + m_algPrescaledOr = m_algInitialOr; }//if we are going to apply prescales. - - + // Copy Algorithm bits fron Prescaled word to Final Word // Masking done below if requested. m_uGtAlgBlk.copyPrescaledToFinal(); - if(!algorithmTriggersUnmasked) { - - -/* - masking the bits goes here. -*/ - m_algFinalOr = m_algPrescaledOr; - - } else { - - m_algFinalOr = m_algPrescaledOr; + if( !algorithmTriggersUnmasked ){ + + bool temp_algFinalOr = false; + for( unsigned int iBit = 0; iBit < numberPhysTriggers; ++iBit ){ + + bool bitValue = m_uGtAlgBlk.getAlgoDecisionPreScaled( iBit ); + + if( bitValue ){ + bool isMasked = ( triggerMaskAlgoTrig.at(iBit) == 0 ); + + bool passMask = ( bitValue && !isMasked ); + + if( passMask ) temp_algFinalOr = true; + else m_uGtAlgBlk.setAlgoDecisionFinal(iBit,false); + + // Check if veto mask is true, if it is, set the event veto flag. + if ( triggerMaskVetoAlgoTrig.at(iBit) == 1 ) m_algFinalOrVeto = true; + + } + } + + m_algFinalOrPreVeto = temp_algFinalOr; + } + else { + + m_algFinalOrPreVeto = m_algPrescaledOr; - } ///if we are masking. + } ///if we are masking. + +// Set FinalOR for this board + m_algFinalOr = (m_algFinalOrPreVeto & !m_algFinalOrVeto); @@ -1007,16 +1053,12 @@ void l1t::GtBoard::fillAlgRecord(int iBxInEvent, m_uGtAlgBlk.setOrbitNr((unsigned int)(orbNr & 0xFFFFFFFF)); m_uGtAlgBlk.setbxNr((bxNr & 0xFFFF)); m_uGtAlgBlk.setbxInEventNr((iBxInEvent & 0xF)); + m_uGtAlgBlk.setPreScColumn(0); //TO DO: get this and fill it in. + + m_uGtAlgBlk.setFinalORVeto(m_algFinalOrVeto); + m_uGtAlgBlk.setFinalORPreVeto(m_algFinalOrPreVeto); + m_uGtAlgBlk.setFinalOR(m_algFinalOr); -// Set the header information and Final OR - int finalOR = 0x0; - if(m_algFinalOr) finalOR = (finalOR | 0x2); - if(m_uGtFinalBoard) { - finalOR = (finalOR | 0x8); - if( (finalOR >>1) & 0x1 ) finalOR = (finalOR | 0x1); - } - m_uGtAlgBlk.setFinalOR(finalOR); - uGtAlgRecord->push_back(iBxInEvent, m_uGtAlgBlk); @@ -1037,9 +1079,7 @@ void l1t::GtBoard::fillExtRecord(int iBxInEvent, } // Set header information -// m_uGtExtBlk.setOrbitNr((unsigned int)(orbNr & 0xFFFFFFFF)); -// m_uGtExtBlk.setbxNr((bxNr & 0xFFFF)); -// m_uGtExtBlk.setbxInEventNr((iBxInEvent & 0xF)); + uGtExtRecord->push_back(iBxInEvent, m_uGtExtBlk); diff --git a/L1Trigger/L1TGlobal/src/L1TGlobalUtil.cc b/L1Trigger/L1TGlobal/src/L1TGlobalUtil.cc new file mode 100644 index 0000000000000..cb76b76d5e5b9 --- /dev/null +++ b/L1Trigger/L1TGlobal/src/L1TGlobalUtil.cc @@ -0,0 +1,529 @@ +//// +/// \class l1t::L1TGlobalUtil.cc +/// +/// Description: Dump Accessors for L1 GT Result. +/// +/// Implementation: +/// +/// +/// \author: Brian Winer Ohio State +/// +/// +#include "L1Trigger/L1TGlobal/interface/L1TGlobalUtil.h" + +#include +#include + +#include "CondFormats/DataRecord/interface/L1TGlobalTriggerMenuRcd.h" + +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/EDGetToken.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/ESHandle.h" + + +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/MessageLogger/interface/MessageDrop.h" + + +// constructor +l1t::L1TGlobalUtil::L1TGlobalUtil(std::string preScaleFileName, unsigned int psColumn) +{ + + // initialize cached IDs + m_l1GtMenuCacheID = 0ULL; + + m_filledPrescales = false; + + m_preScaleFileName = preScaleFileName; + + m_numberPhysTriggers = 512; //need to get this out of the EventSetup + + m_PreScaleColumn = psColumn; + +} + +// destructor +l1t::L1TGlobalUtil::~L1TGlobalUtil() { + +} + + +void l1t::L1TGlobalUtil::retrieveL1(const edm::Event& iEvent, const edm::EventSetup& evSetup, + edm::EDGetToken gtAlgToken) { + +// get / update the trigger menu from the EventSetup +// local cache & check on cacheIdentifier + unsigned long long l1GtMenuCacheID = evSetup.get().cacheIdentifier(); + + if (m_l1GtMenuCacheID != l1GtMenuCacheID) { + + //std::cout << "Attempting to get the Menu " << std::endl; + edm::ESHandle< TriggerMenu> l1GtMenu; + evSetup.get< L1TGlobalTriggerMenuRcd>().get(l1GtMenu) ; + m_l1GtMenu = l1GtMenu.product(); + //(const_cast(m_l1GtMenu))->buildGtConditionMap(); + + //std::cout << "Attempting to fill the map " << std::endl; + m_algorithmMap = &(m_l1GtMenu->gtAlgorithmMap()); + + //reset vectors since we have new menu + resetDecisionVectors(); + + m_l1GtMenuCacheID = l1GtMenuCacheID; + } + + // Fill the mask and prescales (dummy for now) + if(!m_filledPrescales) { + + // clear and dimension + resetPrescaleVectors(); + resetMaskVectors(); + + //Load the full prescale set for use + loadPrescalesAndMasks(); + + //Pick which set we are using + if(m_PreScaleColumn > m_prescaleFactorsAlgoTrig->size() || m_PreScaleColumn < 1) { + LogTrace("l1t|Global") + << "\nNo Prescale Set: " << m_PreScaleColumn + << "\nMax Prescale Set value : " << m_prescaleFactorsAlgoTrig->size() + << "\nSetting prescale column to 1" + << std::endl; + m_PreScaleColumn = 1; + } + LogDebug("l1t|Global") << "Grabing prescale column "<< m_PreScaleColumn << endl; + const std::vector& prescaleSet = (*m_prescaleFactorsAlgoTrig).at(m_PreScaleColumn-1); + + for (CItAlgo itAlgo = m_algorithmMap->begin(); itAlgo != m_algorithmMap->end(); itAlgo++) { + + // Get the algorithm name + std::string algName = itAlgo->first; + int algBit = (itAlgo->second).algoBitNumber(); + + (m_prescales[algBit]).first = algName; + (m_prescales[algBit]).second = prescaleSet.at(algBit); + + (m_masks[algBit]).first = algName; + (m_masks[algBit]).second = m_triggerMaskAlgoTrig->at(algBit); + + (m_vetoMasks[algBit]).first = algName; + (m_vetoMasks[algBit]).second = m_triggerMaskVetoAlgoTrig->at(algBit); + } + + m_filledPrescales = true; + } + + + +// Get the Global Trigger Output Algorithm block + iEvent.getByToken(gtAlgToken,m_uGtAlgBlk); + m_finalOR = false; + + //Make sure we have a valid AlgBlk + if(m_uGtAlgBlk.isValid()) { + // get the GlabalAlgBlk (Stupid find better way) of BX=0 + std::vector::const_iterator algBlk = m_uGtAlgBlk->begin(0); + + // Grab the final OR from the AlgBlk, note in algBlk is an integer word with the lowest bit rep. the finOR + m_finalOR = ( algBlk->getFinalOR() & 0x1 ); + + // Make a map of the trigger name and whether it passed various stages (initial,prescale,final) + // Note: might be able to improve performance by not full remaking map with names each time + for (CItAlgo itAlgo = m_algorithmMap->begin(); itAlgo != m_algorithmMap->end(); itAlgo++) { + + // Get the algorithm name + std::string algName = itAlgo->first; + int algBit = (itAlgo->second).algoBitNumber(); + + bool decisionInitial = algBlk->getAlgoDecisionInitial(algBit); + (m_decisionsInitial[algBit]).first = algName; + (m_decisionsInitial[algBit]).second = decisionInitial; + + bool decisionPrescaled = algBlk->getAlgoDecisionPreScaled(algBit); + (m_decisionsPrescaled[algBit]).first = algName; + (m_decisionsPrescaled[algBit]).second = decisionPrescaled; + + bool decisionFinal = algBlk->getAlgoDecisionFinal(algBit); + (m_decisionsFinal[algBit]).first = algName; + (m_decisionsFinal[algBit]).second = decisionFinal; + + } + } else { + + cout + << "Error no valid uGT Algorithm Data with Token provided " << endl; + } + +} + +void l1t::L1TGlobalUtil::loadPrescalesAndMasks() { + + std::fstream inputPrescaleFile; + inputPrescaleFile.open(m_preScaleFileName); + + std::vector > vec; + std::vector > prescale_vec; + + std::vector temp_triggerMask; + std::vector temp_triggerVetoMask; + + if( inputPrescaleFile ){ + std::string prefix1("#"); + std::string prefix2("-1"); + + std::string line; + + bool first = true; + + while( getline(inputPrescaleFile,line) ){ + + if( !line.compare(0, prefix1.size(), prefix1) ) continue; + //if( !line.compare(0, prefix2.size(), prefix2) ) continue; + + istringstream split(line); + int value; + int col = 0; + char sep; + + while( split >> value ){ + if( first ){ + // Each new value read on line 1 should create a new inner vector + vec.push_back(std::vector()); + } + + vec[col].push_back(value); + ++col; + + // read past the separator + split>>sep; + } + + // Finished reading line 1 and creating as many inner + // vectors as required + first = false; + } + + + int NumPrescaleSets = 0; + + int maskColumn = -1; + int maskVetoColumn = -1; + for( int iCol=0; iCol 0 ){ + int firstRow = vec[iCol][0]; + + if( firstRow > 0 ) NumPrescaleSets++; + else if( firstRow==-2 ) maskColumn = iCol; + else if( firstRow==-3 ) maskVetoColumn = iCol; + } + } + + // Fill default values for mask and veto mask + for( unsigned int iBit = 0; iBit < m_numberPhysTriggers; ++iBit ){ + unsigned int inputDefaultMask = 1; + unsigned int inputDefaultVetoMask = 0; + temp_triggerMask.push_back(inputDefaultMask); + temp_triggerVetoMask.push_back(inputDefaultVetoMask); + } + + // Fill non-trivial mask and veto mask + if( maskColumn>=0 || maskVetoColumn>=0 ){ + for( int iBit=1; iBit=0 ){ + unsigned int triggerMask = vec[maskColumn][iBit]; + temp_triggerMask[algoBit] = triggerMask; + } + if( maskVetoColumn>=0 ){ + unsigned int triggerVetoMask = vec[maskVetoColumn][iBit]; + temp_triggerVetoMask[algoBit] = triggerVetoMask; + } + } + } + } + + + if( NumPrescaleSets > 0 ){ + // Fill default prescale set + for( int iSet=0; iSet()); + for( unsigned int iBit = 0; iBit < m_numberPhysTriggers; ++iBit ){ + int inputDefaultPrescale = 1; + prescale_vec[iSet].push_back(inputDefaultPrescale); + } + } + + // Fill non-trivial prescale set + for( int iBit=1; iBit 0 ){ + useSet = vec[iSet][0]; + } + useSet -= 1; + + if( useSet<0 ) continue; + + int prescale = vec[iSet][iBit]; + prescale_vec[useSet][algoBit] = prescale; + } + } + else{ + LogTrace("l1t|Global") + << "\nPrescale file has algo bit: " << algoBit + << "\nThis is larger than the number of triggers: " << m_numberPhysTriggers + << "\nSomething is wrong. Ignoring." + << std::endl; + } + } + } + + } + else { + LogTrace("l1t|Global") + << "\nCould not find file: " << m_preScaleFileName + << "\nFilling the prescale vectors with prescale 1" + << "\nSetting prescale set to 1" + << std::endl; + + m_PreScaleColumn = 1; + + for( int col=0; col < 1; col++ ){ + prescale_vec.push_back(std::vector()); + for( unsigned int iBit = 0; iBit < m_numberPhysTriggers; ++iBit ){ + int inputDefaultPrescale = 1; + prescale_vec[col].push_back(inputDefaultPrescale); + } + } + } + + inputPrescaleFile.close(); + + m_prescaleFactorsAlgoTrig = &prescale_vec; + m_triggerMaskAlgoTrig = &temp_triggerMask; + m_triggerMaskVetoAlgoTrig = &temp_triggerVetoMask; + +} + +void l1t::L1TGlobalUtil::resetDecisionVectors() { + + // Reset all the vector contents with null information + m_decisionsInitial.clear(); + m_decisionsInitial.resize(m_numberPhysTriggers); + m_decisionsPrescaled.clear(); + m_decisionsPrescaled.resize(m_numberPhysTriggers); + m_decisionsFinal.clear(); + m_decisionsFinal.resize(m_numberPhysTriggers); + + + for(unsigned int algBit = 0; algBit< m_numberPhysTriggers; algBit++) { + + (m_decisionsInitial.at(algBit)).first = "NULL"; + (m_decisionsInitial.at(algBit)).second = false; + + (m_decisionsPrescaled.at(algBit)).first = "NULL"; + (m_decisionsPrescaled.at(algBit)).second = false; + + (m_decisionsFinal.at(algBit)).first = "NULL"; + (m_decisionsFinal.at(algBit)).second = false; + + } + + +} + +void l1t::L1TGlobalUtil::resetPrescaleVectors() { + + // Reset all the vector contents with null information + m_prescales.clear(); + m_prescales.resize(m_numberPhysTriggers); + + for(unsigned int algBit = 0; algBit< m_numberPhysTriggers; algBit++) { + + (m_prescales.at(algBit)).first = "NULL"; + (m_prescales.at(algBit)).second = 1; + + } + +} + +void l1t::L1TGlobalUtil::resetMaskVectors() { + + // Reset all the vector contents with null information + m_masks.clear(); + m_masks.resize(m_numberPhysTriggers); + m_vetoMasks.clear(); + m_vetoMasks.resize(m_numberPhysTriggers); + + for(unsigned int algBit = 0; algBit< m_numberPhysTriggers; algBit++) { + + (m_masks.at(algBit)).first = "NULL"; + (m_masks.at(algBit)).second = true; + + (m_vetoMasks.at(algBit)).first = "NULL"; + (m_vetoMasks.at(algBit)).second = false; + + } + +} + +const bool l1t::L1TGlobalUtil::getAlgBitFromName(const std::string& algName, int& bit) const { + + CItAlgo itAlgo = m_algorithmMap->find(algName); + if(itAlgo != m_algorithmMap->end()) { + bit = (itAlgo->second).algoBitNumber(); + return true; + } + + return false; //did not find anything by that name +} + +const bool l1t::L1TGlobalUtil::getAlgNameFromBit(int& bit, std::string& algName) const { + + // since we are just looking up the name, doesn't matter which vector we get it from + if((m_decisionsInitial.at(bit)).first != "NULL") { + algName = (m_decisionsInitial.at(bit)).first; + return true; + } + return false; //No name associated with this bit + +} + +const bool l1t::L1TGlobalUtil::getInitialDecisionByBit(int& bit, bool& decision) const { + + /* + for(std::vector::const_iterator algBlk = m_uGtAlgBlk->begin(0); algBlk != m_uGtAlgBlk->end(0); ++algBlk) { + decision = algBlk->getAlgoDecisionFinal(bit); + } + */ + // Need some check that this is a valid bit + if((m_decisionsInitial.at(bit)).first != "NULL") { + decision = (m_decisionsInitial.at(bit)).second; + return true; + } + + return false; //couldn't get the information requested. +} +const bool l1t::L1TGlobalUtil::getPrescaledDecisionByBit(int& bit, bool& decision) const { + + // Need some check that this is a valid bit + if((m_decisionsPrescaled.at(bit)).first != "NULL") { + decision = (m_decisionsPrescaled.at(bit)).second; + return true; + } + + return false; //couldn't get the information requested. +} +const bool l1t::L1TGlobalUtil::getFinalDecisionByBit(int& bit, bool& decision) const { + + // Need some check that this is a valid bit + if((m_decisionsFinal.at(bit)).first != "NULL") { + decision = (m_decisionsFinal.at(bit)).second; + return true; + } + + return false; //couldn't get the information requested. +} +const bool l1t::L1TGlobalUtil::getPrescaleByBit(int& bit, int& prescale) const { + + // Need some check that this is a valid bit + if((m_prescales.at(bit)).first != "NULL") { + prescale = (m_prescales.at(bit)).second; + return true; + } + + return false; //couldn't get the information requested. +} +const bool l1t::L1TGlobalUtil::getMaskByBit(int& bit, bool& mask) const { + + // Need some check that this is a valid bit + if((m_masks.at(bit)).first != "NULL") { + mask = (m_masks.at(bit)).second; + return true; + } + + return false; //couldn't get the information requested. +} + +const bool l1t::L1TGlobalUtil::getVetoMaskByBit(int& bit, bool& veto) const { + + // Need some check that this is a valid bit + if((m_vetoMasks.at(bit)).first != "NULL") { + veto = (m_vetoMasks.at(bit)).second; + return true; + } + + return false; //couldn't get the information requested. +} + +const bool l1t::L1TGlobalUtil::getInitialDecisionByName(const std::string& algName, bool& decision) const { + + int bit = -1; + if(getAlgBitFromName(algName,bit)) { + decision = (m_decisionsInitial.at(bit)).second; + return true; + } + + return false; //trigger name was not the menu. +} + +const bool l1t::L1TGlobalUtil::getPrescaledDecisionByName(const std::string& algName, bool& decision) const { + + int bit = -1; + if(getAlgBitFromName(algName,bit)) { + decision = (m_decisionsPrescaled.at(bit)).second; + return true; + } + + return false; //trigger name was not the menu. +} + +const bool l1t::L1TGlobalUtil::getFinalDecisionByName(const std::string& algName, bool& decision) const { + + int bit = -1; + if(getAlgBitFromName(algName,bit)) { + decision = (m_decisionsFinal.at(bit)).second; + return true; + } + + return false; //trigger name was not the menu. +} +const bool l1t::L1TGlobalUtil::getPrescaleByName(const std::string& algName, int& prescale) const { + + int bit = -1; + if(getAlgBitFromName(algName,bit)) { + prescale = (m_prescales.at(bit)).second; + return true; + } + + return false; //trigger name was not the menu. +} +const bool l1t::L1TGlobalUtil::getMaskByName(const std::string& algName, bool& mask) const { + + int bit = -1; + if(getAlgBitFromName(algName,bit)) { + mask = (m_masks.at(bit)).second; + return true; + } + + return false; //trigger name was not the menu. +} +const bool l1t::L1TGlobalUtil::getVetoMaskByName(const std::string& algName, bool& veto) const { + + int bit = -1; + if(getAlgBitFromName(algName,bit)) { + veto = (m_vetoMasks.at(bit)).second; + return true; + } + + return false; //trigger name was not the menu. +} diff --git a/L1Trigger/L1TGlobal/src/MuCondition.cc b/L1Trigger/L1TGlobal/src/MuCondition.cc index 849177bf72344..87f52f1e848e9 100644 --- a/L1Trigger/L1TGlobal/src/MuCondition.cc +++ b/L1Trigger/L1TGlobal/src/MuCondition.cc @@ -398,10 +398,10 @@ const bool l1t::MuCondition::checkObjectParameter(const int iCondition, const l1 << "\n\t etaRange = " << objPar.etaRange << "\n\t phiLow = " << objPar.phiLow << "\n\t phiHigh = " << objPar.phiHigh - << "\n\t phiWindowLower = " << objPar.phiWindowLower - << "\n\t phiWindowUpper = " << objPar.phiWindowUpper - << "\n\t phiWindowVetoLower = " << objPar.phiWindowVetoLower - << "\n\t phiWindowVetoLower = " << objPar.phiWindowVetoLower + << "\n\t phiWindow1Lower = " << objPar.phiWindow1Lower + << "\n\t phiWindow1Upper = " << objPar.phiWindow1Upper + << "\n\t phiWindow2Lower = " << objPar.phiWindow2Lower + << "\n\t phiWindow2Lower = " << objPar.phiWindow2Lower << "\n\t charge = " << objPar.charge << "\n\t qualityLUT = " << objPar.qualityLUT << "\n\t isolationLUT = " << objPar.isolationLUT @@ -428,13 +428,13 @@ const bool l1t::MuCondition::checkObjectParameter(const int iCondition, const l1 // check eta - if( !checkRangeEta(cand.hwEta(), objPar.etaWindowLower, objPar.etaWindowUpper, objPar.etaWindowVetoLower, objPar.etaWindowVetoLower, 8) ){ + if( !checkRangeEta(cand.hwEta(), objPar.etaWindow1Lower, objPar.etaWindow1Upper, objPar.etaWindow2Lower, objPar.etaWindow2Upper, 8) ){ LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRange(eta)" << std::endl; return false; } // check phi - if( !checkRangePhi(cand.hwPhi(), objPar.phiWindowLower, objPar.phiWindowUpper, objPar.phiWindowVetoLower, objPar.phiWindowVetoLower) ){ + if( !checkRangePhi(cand.hwPhi(), objPar.phiWindow1Lower, objPar.phiWindow1Upper, objPar.phiWindow2Lower, objPar.phiWindow2Upper) ){ LogDebug("l1t|Global") << "\t\t l1t::Candidate failed checkRange(phi)" << std::endl; return false; } diff --git a/L1Trigger/L1TGlobal/test/l1tGlobalEmulation_FromDigi.py b/L1Trigger/L1TGlobal/test/l1tGlobalEmulation_FromDigi.py new file mode 100644 index 0000000000000..49245ea40255a --- /dev/null +++ b/L1Trigger/L1TGlobal/test/l1tGlobalEmulation_FromDigi.py @@ -0,0 +1,155 @@ +# Auto generated configuration file +# using: +# Revision: 1.19 +# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v +# with command line options: SingleElectronPt10_cfi.py -s GEN,SIM,DIGI,L1 --pileup=NoPileUp --geometry DB --conditions=auto:startup -n 1 --no_exec +# +# This was adapted from unpackBuffers-CaloStage2.py. +# -Unpacking of the uGT raw data has been added +# -uGT Emulation starting with the Demux output and/or the uGT input +# -Analysis for uGT objects using L1TGlobalAnalyzer +# +# Brian Winer, March 16, 2015 +# +import FWCore.ParameterSet.Config as cms + + +# options +import FWCore.ParameterSet.VarParsing as VarParsing +options = VarParsing.VarParsing('analysis') +options.register('skipEvents', + 0, + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.int, + "Number of events to skip") +options.register('newXML', + False, + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.bool, + "New XML Grammar") + +options.parseArguments() + +if (options.maxEvents == -1): + options.maxEvents = 1 + + +process = cms.Process('uGTEmulation') + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load('Configuration.Geometry.GeometryDB_cff') +process.load('Configuration.StandardSequences.MagneticField_38T_cff') +process.load('Configuration.StandardSequences.SimL1Emulator_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(options.maxEvents) +) + +# Input source +process.source = cms.Source("PoolSource", + secondaryFileNames = cms.untracked.vstring(), + fileNames = cms.untracked.vstring("file:l1tCalo_2016_EDM_Save.root") +) + + + + +# Additional output definition +# TTree output file +process.load("CommonTools.UtilAlgos.TFileService_cfi") +process.TFileService.fileName = cms.string('l1tCalo_2016_histos.root') + + +# enable debug message logging for our modules +process.MessageLogger.categories.append('L1TCaloEvents') +process.MessageLogger.categories.append('L1TGlobalEvents') +process.MessageLogger.categories.append('l1t|Global') + +process.MessageLogger.suppressInfo = cms.untracked.vstring('Geometry', 'AfterSource') + + +# Other statements +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup', '') + + +## Load our L1 menu +process.load('L1Trigger.L1TGlobal.StableParametersConfig_cff') + +process.load('L1Trigger.L1TGlobal.TriggerMenuXml_cfi') +process.TriggerMenuXml.TriggerMenuLuminosity = 'startup' +#process.TriggerMenuXml.DefXmlFile = 'L1_Example_Menu_2013.xml' +#process.TriggerMenuXml.DefXmlFile = 'L1Menu_Reference_2014.xml' +#process.TriggerMenuXml.DefXmlFile = 'L1Menu_Collisions2015_25nsStage1_v6_uGT_v2.xml' +process.TriggerMenuXml.DefXmlFile = 'L1Menu_Collisions2015_25nsStage1_v6_uGT_v3.xml' + +process.load('L1Trigger.L1TGlobal.TriggerMenuConfig_cff') +process.es_prefer_l1GtParameters = cms.ESPrefer('l1t::TriggerMenuXmlProducer','TriggerMenuXml') + +## Run the Stage 2 uGT emulator +process.load('L1Trigger.L1TGlobal.simGtStage2Digis_cff') +process.simGtStage2Digis.caloInputTag = cms.InputTag('caloStage2Digis') +process.simGtStage2Digis.GmtInputTag = cms.InputTag('None') +process.simGtStage2Digis.PrescaleCSVFile = cms.string('prescale_L1TGlobal.csv') +process.simGtStage2Digis.PrescaleSet = cms.uint32(1) + + + +# gt analyzer +process.l1tGlobalAnalyzer = cms.EDAnalyzer('L1TGlobalAnalyzer', + doText = cms.untracked.bool(False), + dmxEGToken = cms.InputTag("caloStage2Digis"), + dmxTauToken = cms.InputTag("None"), + dmxJetToken = cms.InputTag("caloStage2Digis"), + dmxEtSumToken = cms.InputTag("caloStage2Digis"), + muToken = cms.InputTag("gtStage2Digis","GT"), + egToken = cms.InputTag("gtStage2Digis","GT"), + tauToken = cms.InputTag("None"), + jetToken = cms.InputTag("gtStage2Digis","GT"), + etSumToken = cms.InputTag("gtStage2Digis","GT"), + gtAlgToken = cms.InputTag("gtStage2Digis"), + emulDxAlgToken = cms.InputTag("None"), + emulGtAlgToken = cms.InputTag("simGtStage2Digis") +) + + +# dump records +process.dumpGTRecord = cms.EDAnalyzer("l1t::GtRecordDump", + egInputTag = cms.InputTag("gtStage2Digis","GT"), + muInputTag = cms.InputTag("gtStage2Digis","GT"), + tauInputTag = cms.InputTag(""), + jetInputTag = cms.InputTag("gtStage2Digis","GT"), + etsumInputTag = cms.InputTag("gtStage2Digis","GT"), + uGtRecInputTag = cms.InputTag(""), + uGtAlgInputTag = cms.InputTag("simGtStage2Digis"), + uGtExtInputTag = cms.InputTag(""), + bxOffset = cms.int32(0), + minBx = cms.int32(0), + maxBx = cms.int32(0), + minBxVec = cms.int32(0), + maxBxVec = cms.int32(0), + dumpGTRecord = cms.bool(True), + dumpTrigResults= cms.bool(True), + dumpVectors = cms.bool(False), + tvFileName = cms.string( "TestVector.txt" ), + psFileName = cms.string( "prescale_L1TGlobal.csv" ), + psColumn = cms.int32(1) + ) + + + + + +# Path and EndPath definitions +process.path = cms.Path( + process.simGtStage2Digis + +process.l1tGlobalAnalyzer + +process.dumpGTRecord +) + + diff --git a/L1Trigger/L1TGlobal/test/l1tGlobalEmulation_FromRAW.py b/L1Trigger/L1TGlobal/test/l1tGlobalEmulation_FromRAW.py new file mode 100644 index 0000000000000..9e94e088d105d --- /dev/null +++ b/L1Trigger/L1TGlobal/test/l1tGlobalEmulation_FromRAW.py @@ -0,0 +1,310 @@ +# Auto generated configuration file +# using: +# Revision: 1.19 +# Source: /local/reps/CMSSW/CMSSW/Configuration/Applications/python/ConfigBuilder.py,v +# with command line options: SingleElectronPt10_cfi.py -s GEN,SIM,DIGI,L1 --pileup=NoPileUp --geometry DB --conditions=auto:startup -n 1 --no_exec +# +# This was adapted from unpackBuffers-CaloStage2.py. +# -Unpacking of the uGT raw data has been added +# -uGT Emulation starting with the Demux output and/or the uGT input +# -Analysis for uGT objects using L1TGlobalAnalyzer +# +# Brian Winer, March 16, 2015 +# +import FWCore.ParameterSet.Config as cms + + +# options +import FWCore.ParameterSet.VarParsing as VarParsing +options = VarParsing.VarParsing('analysis') +options.register('skipEvents', + 0, + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.int, + "Number of events to skip") +options.register('newXML', + False, + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.bool, + "New XML Grammar") + +options.parseArguments() + +if (options.maxEvents == -1): + options.maxEvents = 1 + + +process = cms.Process('Raw2Digi') + +# import of standard configurations +process.load('Configuration.StandardSequences.Services_cff') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.StandardSequences.GeometryRecoDB_cff') +process.load('Configuration.Geometry.GeometryDB_cff') +process.load('Configuration.StandardSequences.MagneticField_38T_cff') +process.load('Configuration.StandardSequences.SimL1Emulator_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(options.maxEvents) +) + +# Input source +process.source = cms.Source("EmptySource") + +process.options = cms.untracked.PSet( + SkipEvent = cms.untracked.vstring('ProductNotFound') +) + + +# Output definition +process.output = cms.OutputModule( + "PoolOutputModule", + outputCommands = cms.untracked.vstring("keep *"), + fileName = cms.untracked.string('l1tCalo_2016_EDM.root') +) + +# Additional output definition +# TTree output file +process.load("CommonTools.UtilAlgos.TFileService_cfi") +process.TFileService.fileName = cms.string('l1tCalo_2016_histos_'+`options.gtOffset`+'-'+`options.gtLatency`+'.root') + + +# enable debug message logging for our modules +process.MessageLogger.categories.append('L1TCaloEvents') +process.MessageLogger.categories.append('L1TGlobalEvents') +process.MessageLogger.categories.append('l1t|Global') + +process.MessageLogger.suppressInfo = cms.untracked.vstring('Geometry', 'AfterSource') + +if (options.dump): + process.MessageLogger.infos.placeholder = cms.untracked.bool(False) + process.MessageLogger.infos.INFO = cms.untracked.PSet(limit = cms.untracked.int32(0)) + process.MessageLogger.infos.L1TCaloEvents = cms.untracked.PSet( + optionalPSet = cms.untracked.bool(True), + limit = cms.untracked.int32(10000) + ) + +if (options.debug): +# process.MessageLogger.debugModules = cms.untracked.vstring('L1TRawToDigi:caloStage2Digis', 'MP7BufferDumpToRaw:stage2MPRaw', 'MP7BufferDumpToRaw:stage2DemuxRaw') + process.MessageLogger.debugModules = cms.untracked.vstring('*') + process.MessageLogger.cerr.threshold = cms.untracked.string('DEBUG') + + + +# Other statements +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:startup', '') + + +# buffer dump to RAW +process.load('EventFilter.L1TRawToDigi.stage2MP7BufferRaw_cff') + + +# skip events +dmOffset = options.dmOffset + (options.skipEvents * options.dmFramesPerEvent) + +mpOffsets = cms.untracked.vint32() +for i in range (0,options.nMP): + offset = options.mpOffset + (options.skipEvents / options.nMP) + if (i < options.skipEvents % options.nMP): + offset = offset + 1 + mpOffsets.append(offset) + +boardOffset = options.skipEvents % options.nMP + +gtOffset = options.gtOffset + (options.skipEvents * options.gtFramesPerEvent) + + +# print some debug info +print "Job config :" +print "maxEvents = ", options.maxEvents +print "skipEvents = ", options.skipEvents +print " " + +# MP config +if (options.doMP): + print "MP config :" + print "nBoards = ", options.nMP + print "mpBoardOffset = ", boardOffset + print "mpOffset = ", mpOffsets + print " " + +process.stage2MPRaw.nFramesPerEvent = cms.untracked.int32(options.mpFramesPerEvent) +process.stage2MPRaw.nFramesOffset = cms.untracked.vuint32(mpOffsets) +process.stage2MPRaw.boardOffset = cms.untracked.int32(boardOffset) +#process.stage2MPRaw.nFramesLatency = cms.untracked.vuint32(mpLatencies) +process.stage2MPRaw.rxFile = cms.untracked.string("merge/rx_summary.txt") +process.stage2MPRaw.txFile = cms.untracked.string("merge/tx_summary.txt") + +# Demux config +if (options.doDemux): + print "Demux config :" + print "dmOffset = ", dmOffset + print "dmLatency = ", options.dmLatency + print " " + +process.stage2DemuxRaw.nFramesPerEvent = cms.untracked.int32(options.dmFramesPerEvent) +process.stage2DemuxRaw.nFramesOffset = cms.untracked.vuint32(dmOffset) +process.stage2DemuxRaw.nFramesLatency = cms.untracked.vuint32(options.dmLatency) +process.stage2DemuxRaw.rxFile = cms.untracked.string("good/demux/rx_summary.txt") +process.stage2DemuxRaw.txFile = cms.untracked.string("good/demux/tx_summary.txt") + +# GT config +if (options.doGT): + print "GT config :" + print "gtOffset = ", gtOffset + print "gtLatency = ", options.gtLatency + +process.stage2GTRaw.nFramesPerEvent = cms.untracked.int32(options.gtFramesPerEvent) +process.stage2GTRaw.nFramesOffset = cms.untracked.vuint32(gtOffset) +process.stage2GTRaw.nFramesLatency = cms.untracked.vuint32(options.gtLatency) +process.stage2GTRaw.rxFile = cms.untracked.string("uGT/rx_summary.txt") +process.stage2GTRaw.txFile = cms.untracked.string("uGT/tx_summary.txt") + + +process.rawDataCollector.verbose = cms.untracked.int32(2) + + +# dump raw data +process.dumpRaw = cms.EDAnalyzer( + "DumpFEDRawDataProduct", + label = cms.untracked.string("rawDataCollector"), + feds = cms.untracked.vint32 ( 1360, 1366, 1404 ), + dumpPayload = cms.untracked.bool ( True ) +) + +# raw to digi +process.load('EventFilter.L1TRawToDigi.caloStage2Digis_cfi') +process.caloStage2Digis.InputLabel = cms.InputTag('rawDataCollector') + +process.load('EventFilter.L1TRawToDigi.gtStage2Digis_cfi') +process.gtStage2Digis.InputLabel = cms.InputTag('rawDataCollector') + + +# Setup for Emulation of uGT +process.load('L1Trigger.L1TGlobal.StableParametersConfig_cff') +process.load('L1Trigger.L1TGlobal.TriggerMenuXml_cfi') +process.TriggerMenuXml.TriggerMenuLuminosity = 'startup' +#process.TriggerMenuXml.DefXmlFile = 'L1Menu_CaloSliceTest_2015_v4.xml' +process.TriggerMenuXml.DefXmlFile = 'L1Menu_Point5IntegrationTest_2015_v2.xml' +process.TriggerMenuXml.newGrammar = cms.bool(options.newXML) +if(options.newXML): + print "Using new XML Grammar " + #process.TriggerMenuXml.DefXmlFile = 'L1Menu_Point5IntegrationTest_2015_v1a.xml' + process.TriggerMenuXml.DefXmlFile = 'test-dist-mass.xml' + +process.load('L1Trigger.L1TGlobal.TriggerMenuConfig_cff') +process.es_prefer_l1GtParameters = cms.ESPrefer('l1t::TriggerMenuXmlProducer','TriggerMenuXml') + +process.emL1uGtFromGtInput = cms.EDProducer("l1t::GtProducer", + ProduceL1GtObjectMapRecord = cms.bool(False), + AlgorithmTriggersUnmasked = cms.bool(False), + EmulateBxInEvent = cms.int32(1), + L1DataBxInEvent = cms.int32(1), + AlgorithmTriggersUnprescaled = cms.bool(False), + ProduceL1GtDaqRecord = cms.bool(True), + GmtInputTag = cms.InputTag("gtStage2Digis","GT"), + caloInputTag = cms.InputTag("gtStage2Digis","GT"), + AlternativeNrBxBoardDaq = cms.uint32(0), + BstLengthBytes = cms.int32(-1), + Verbosity = cms.untracked.int32(5) +) + +process.emL1uGtFromDemuxOutput = cms.EDProducer("l1t::GtProducer", + ProduceL1GtObjectMapRecord = cms.bool(False), + AlgorithmTriggersUnmasked = cms.bool(False), + EmulateBxInEvent = cms.int32(1), + L1DataBxInEvent = cms.int32(1), + AlgorithmTriggersUnprescaled = cms.bool(False), + ProduceL1GtDaqRecord = cms.bool(True), + GmtInputTag = cms.InputTag(""), + caloInputTag = cms.InputTag("caloStage2Digis"), + AlternativeNrBxBoardDaq = cms.uint32(0), + BstLengthBytes = cms.int32(-1), + Verbosity = cms.untracked.int32(5) +) + + + +# object analyser +process.load('L1Trigger.L1TCalorimeter.l1tStage2CaloAnalyzer_cfi') +process.l1tStage2CaloAnalyzer.doText = cms.untracked.bool(options.debug) +process.l1tStage2CaloAnalyzer.towerToken = cms.InputTag("caloStage2Digis") +process.l1tStage2CaloAnalyzer.clusterToken = cms.InputTag("None") +process.l1tStage2CaloAnalyzer.mpEGToken = cms.InputTag("None") +process.l1tStage2CaloAnalyzer.mpTauToken = cms.InputTag("None") + + +# gt analyzer +process.l1tGlobalAnalyzer = cms.EDAnalyzer('L1TGlobalAnalyzer', + doText = cms.untracked.bool(options.debug), + dmxEGToken = cms.InputTag("caloStage2Digis"), + dmxTauToken = cms.InputTag("None"), + dmxJetToken = cms.InputTag("caloStage2Digis"), + dmxEtSumToken = cms.InputTag("caloStage2Digis"), + muToken = cms.InputTag("gtStage2Digis","GT"), + egToken = cms.InputTag("gtStage2Digis","GT"), + tauToken = cms.InputTag("None"), + jetToken = cms.InputTag("gtStage2Digis","GT"), + etSumToken = cms.InputTag("gtStage2Digis","GT"), + gtAlgToken = cms.InputTag("gtStage2Digis"), + emulDxAlgToken = cms.InputTag("emL1uGtFromDemuxOutput"), + emulGtAlgToken = cms.InputTag("emL1uGtFromGtInput") +) + + +# dump records +process.dumpGTRecord = cms.EDAnalyzer("l1t::GtRecordDump", + egInputTag = cms.InputTag("gtStage2Digis","GT"), + muInputTag = cms.InputTag("gtStage2Digis","GT"), + tauInputTag = cms.InputTag(""), + jetInputTag = cms.InputTag("gtStage2Digis","GT"), + etsumInputTag = cms.InputTag("gtStage2Digis","GT"), + uGtRecInputTag = cms.InputTag(""), + uGtAlgInputTag = cms.InputTag("emL1uGtFromGtInput"), + uGtExtInputTag = cms.InputTag(""), + bxOffset = cms.int32(0), + minBx = cms.int32(0), + maxBx = cms.int32(0), + minBxVec = cms.int32(0), + maxBxVec = cms.int32(0), + dumpGTRecord = cms.bool(True), + dumpVectors = cms.bool(True), + tvFileName = cms.string( "TestVector.txt" ) + ) + + + + + +# Path and EndPath definitions +process.path = cms.Path( +# process.stage2MPRaw + process.stage2DemuxRaw + +process.stage2GTRaw + +process.rawDataCollector + +process.dumpRaw + +process.caloStage2Digis + +process.gtStage2Digis + +process.emL1uGtFromGtInput + +process.emL1uGtFromDemuxOutput + +process.l1tStage2CaloAnalyzer + +process.l1tGlobalAnalyzer + +process.dumpGTRecord +) + +if (not options.doMP): + process.path.remove(process.stage2MPRaw) + +if (not options.doDemux): + process.path.remove(process.stage2DemuxRaw) + +if (not options.doGT): + process.path.remove(process.stage2GTRaw) + +process.out = cms.EndPath( + process.output +) + diff --git a/L1Trigger/L1TGlobal/python/runGlobalFakeInputProducer.py b/L1Trigger/L1TGlobal/test/runGlobalFakeInputProducer.py similarity index 62% rename from L1Trigger/L1TGlobal/python/runGlobalFakeInputProducer.py rename to L1Trigger/L1TGlobal/test/runGlobalFakeInputProducer.py index e8a0840e3de44..925c6164e6b1e 100644 --- a/L1Trigger/L1TGlobal/python/runGlobalFakeInputProducer.py +++ b/L1Trigger/L1TGlobal/test/runGlobalFakeInputProducer.py @@ -71,26 +71,16 @@ process.source = cms.Source("PoolSource", secondaryFileNames = cms.untracked.vstring(), fileNames = cms.untracked.vstring( - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/06801062-95EA-E411-BAA4-002618943832.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/069BD085-9BEA-E411-B063-002618943985.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/0EABD22E-97EA-E411-9187-0025905A6068.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/10E5C59E-9DEA-E411-B378-00261894385D.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/14C238D9-96EA-E411-B343-00261894387E.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/2634383A-94EA-E411-B274-002590596486.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/36F53C7D-99EA-E411-995F-0026189437EB.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/3EC53EC3-A1EA-E411-A30F-002618943826.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/42B2E0FF-95EA-E411-9743-0025905B860C.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/444664B9-95EA-E411-844B-00261894391B.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/48D2AF08-98EA-E411-B556-002618943869.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/4A5FFFC2-95EA-E411-B62F-0025905B858C.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/5419CE7B-9AEA-E411-AE7C-002618943923.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/583FA9B9-98EA-E411-B867-0025905A7786.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/60CD47B5-95EA-E411-9469-00261894382D.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/647E2B80-A0EA-E411-80CB-002618943950.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/78A02D9A-94EA-E411-8625-0025905A6082.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/88637A5A-A0EA-E411-916B-0025905A6094.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/8E93F5C6-A0EA-E411-A4ED-0025905A6126.root", - "root://cmsxrootd-site.fnal.gov//store/relval/CMSSW_7_5_0_pre1/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/PU50ns_MCRUN2_74_V6-v1/00000/908AF505-96EA-E411-9C1D-003048FFD756.root", + "/store/user/puigh/L1Upgrade/GEN-SIM-DIGI-RAW-HLTDEBUG/CMSSW_7_6_0/4C462F65-9F7F-E511-972A-0026189438A9.root", + #"root://xrootd.ba.infn.it//store/relval/CMSSW_7_6_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/76X_mcRun2_asymptotic_v11-v1/00000/4C462F65-9F7F-E511-972A-0026189438A9.root", + "root://xrootd.ba.infn.it//store/relval/CMSSW_7_6_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/76X_mcRun2_asymptotic_v11-v1/00000/703E7EAB-9D7F-E511-B886-003048FFCBFC.root", + "root://xrootd.ba.infn.it//store/relval/CMSSW_7_6_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/76X_mcRun2_asymptotic_v11-v1/00000/8AF07AAB-9D7F-E511-B8B4-003048FFCBFC.root", + "root://xrootd.ba.infn.it//store/relval/CMSSW_7_6_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/76X_mcRun2_asymptotic_v11-v1/00000/962BEF7C-9D7F-E511-A2BB-0025905B85AA.root", + "root://xrootd.ba.infn.it//store/relval/CMSSW_7_6_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/76X_mcRun2_asymptotic_v11-v1/00000/C409A519-9E7F-E511-BD4C-0025905B8590.root", + "root://xrootd.ba.infn.it//store/relval/CMSSW_7_6_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/76X_mcRun2_asymptotic_v11-v1/00000/E8D41D6A-9F7F-E511-A10A-003048FFD740.root", + "root://xrootd.ba.infn.it//store/relval/CMSSW_7_6_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/76X_mcRun2_asymptotic_v11-v1/00000/EE048767-9E7F-E511-B1AA-0025905B8606.root", + "root://xrootd.ba.infn.it//store/relval/CMSSW_7_6_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/76X_mcRun2_asymptotic_v11-v1/00000/4431031E-9E7F-E511-9F42-0025905938A4.root", + #"root://cmsxrootd.fnal.gov//store/relval/CMSSW_7_6_0/RelValTTbar_13/GEN-SIM-DIGI-RAW-HLTDEBUG/76X_mcRun2_asymptotic_v11-v1/00000/4431031E-9E7F-E511-9F42-0025905938A4.root", ), skipEvents = cms.untracked.uint32(skip) ) @@ -189,27 +179,18 @@ process.load('L1Trigger.L1TGlobal.TriggerMenuXml_cfi') process.TriggerMenuXml.TriggerMenuLuminosity = 'startup' #process.TriggerMenuXml.DefXmlFile = 'L1_Example_Menu_2013.xml' -process.TriggerMenuXml.DefXmlFile = 'L1Menu_Reference_2014.xml' +#process.TriggerMenuXml.DefXmlFile = 'L1Menu_Reference_2014.xml' +#process.TriggerMenuXml.DefXmlFile = 'L1Menu_Collisions2015_25nsStage1_v6_uGT_v2.xml' +process.TriggerMenuXml.DefXmlFile = 'L1Menu_Collisions2015_25nsStage1_v6_uGT_v3.xml' process.load('L1Trigger.L1TGlobal.TriggerMenuConfig_cff') process.es_prefer_l1GtParameters = cms.ESPrefer('l1t::TriggerMenuXmlProducer','TriggerMenuXml') +## Run the Stage 2 uGT emulator +process.load('L1Trigger.L1TGlobal.simGtStage2Digis_cff') +process.simGtStage2Digis.PrescaleCSVFile = cms.string('prescale_L1TGlobal.csv') +process.simGtStage2Digis.PrescaleSet = cms.uint32(1) -process.simL1uGtDigis = cms.EDProducer("l1t::GtProducer", - #TechnicalTriggersUnprescaled = cms.bool(False), - ProduceL1GtObjectMapRecord = cms.bool(True), - AlgorithmTriggersUnmasked = cms.bool(False), - EmulateBxInEvent = cms.int32(1), - L1DataBxInEvent = cms.int32(5), - AlgorithmTriggersUnprescaled = cms.bool(False), - ProduceL1GtDaqRecord = cms.bool(True), - GmtInputTag = cms.InputTag("gtInput"), - caloInputTag = cms.InputTag("gtInput"), - AlternativeNrBxBoardDaq = cms.uint32(0), - #WritePsbL1GtDaqRecord = cms.bool(True), - BstLengthBytes = cms.int32(-1), - Verbosity = cms.untracked.int32(0) -) process.dumpGTRecord = cms.EDAnalyzer("l1t::GtRecordDump", egInputTag = cms.InputTag("gtInput"), @@ -217,23 +198,26 @@ tauInputTag = cms.InputTag("gtInput"), jetInputTag = cms.InputTag("gtInput"), etsumInputTag = cms.InputTag("gtInput"), - uGtRecInputTag = cms.InputTag("simL1uGtDigis"), - uGtAlgInputTag = cms.InputTag("simL1uGtDigis"), - uGtExtInputTag = cms.InputTag("simL1uGtDigis"), + uGtRecInputTag = cms.InputTag("simGtStage2Digis"), + uGtAlgInputTag = cms.InputTag("simGtStage2Digis"), + uGtExtInputTag = cms.InputTag("simGtStage2Digis"), bxOffset = cms.int32(skip), minBx = cms.int32(-2), maxBx = cms.int32(2), minBxVec = cms.int32(0), maxBxVec = cms.int32(0), dumpGTRecord = cms.bool(False), + dumpTrigResults= cms.bool(True), dumpVectors = cms.bool(True), - tvFileName = cms.string( ("TestVector_%03d.txt") % job ) + tvFileName = cms.string( ("TestVector_%03d.txt") % job ), + psFileName = cms.string( "prescale_L1TGlobal.csv" ), + psColumn = cms.int32(1) ) process.load("L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi") -process.l1GtTrigReport.L1GtRecordInputTag = "simL1uGtDigis" +process.l1GtTrigReport.L1GtRecordInputTag = "simGtStage2Digis" process.l1GtTrigReport.PrintVerbosity = 2 process.report = cms.Path(process.l1GtTrigReport) @@ -247,7 +231,7 @@ process.p1 = cms.Path( process.gtInput # *process.dumpGT - *process.simL1uGtDigis + *process.simGtStage2Digis *process.dumpGTRecord # * process.debug # *process.dumpED @@ -265,6 +249,10 @@ # Spit out filter efficiency at the end. process.options = cms.untracked.PSet(wantSummary = cms.untracked.bool(True)) +# Options for multithreading +#process.options.numberOfThreads = cms.untracked.uint32( 2 ) +#process.options.numberOfStreams = cms.untracked.uint32( 0 ) + if dump: outfile = open('dump_runGlobalFakeInputProducer_'+repr(job)+'.py','w') print >> outfile,process.dumpPython() diff --git a/L1Trigger/L1TGlobal/test/unpackBuffers-CaloStage2_uGTEmulation.py b/L1Trigger/L1TGlobal/test/unpackBuffers-CaloStage2_uGTEmulation.py index fa873757b03cd..2eae7c5b800f2 100644 --- a/L1Trigger/L1TGlobal/test/unpackBuffers-CaloStage2_uGTEmulation.py +++ b/L1Trigger/L1TGlobal/test/unpackBuffers-CaloStage2_uGTEmulation.py @@ -92,6 +92,11 @@ VarParsing.VarParsing.multiplicity.singleton, VarParsing.VarParsing.varType.bool, "Read GT data") +options.register('newXML', + False, + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.bool, + "New XML Grammar") options.register('nMP', 11, VarParsing.VarParsing.multiplicity.singleton, @@ -138,12 +143,13 @@ # Additional output definition # TTree output file process.load("CommonTools.UtilAlgos.TFileService_cfi") -process.TFileService.fileName = cms.string('l1tCalo_2016_histos.root') +process.TFileService.fileName = cms.string('l1tCalo_2016_histos_'+`options.gtOffset`+'-'+`options.gtLatency`+'.root') # enable debug message logging for our modules process.MessageLogger.categories.append('L1TCaloEvents') process.MessageLogger.categories.append('L1TGlobalEvents') +process.MessageLogger.categories.append('Global') process.MessageLogger.suppressInfo = cms.untracked.vstring('Geometry', 'AfterSource') @@ -241,7 +247,7 @@ "DumpFEDRawDataProduct", label = cms.untracked.string("rawDataCollector"), feds = cms.untracked.vint32 ( 1360, 1366, 1404 ), - dumpPayload = cms.untracked.bool ( False ) + dumpPayload = cms.untracked.bool ( True ) ) # raw to digi @@ -256,7 +262,13 @@ process.load('L1Trigger.L1TGlobal.StableParametersConfig_cff') process.load('L1Trigger.L1TGlobal.TriggerMenuXml_cfi') process.TriggerMenuXml.TriggerMenuLuminosity = 'startup' -process.TriggerMenuXml.DefXmlFile = 'L1Menu_CaloSliceTest_2015.xml' +#process.TriggerMenuXml.DefXmlFile = 'L1Menu_CaloSliceTest_2015_v4.xml' +process.TriggerMenuXml.DefXmlFile = 'L1Menu_Point5IntegrationTest_2015_v2.xml' +process.TriggerMenuXml.newGrammar = cms.bool(options.newXML) +if(options.newXML): + print "Using new XML Grammar " + #process.TriggerMenuXml.DefXmlFile = 'L1Menu_Point5IntegrationTest_2015_v1a.xml' + process.TriggerMenuXml.DefXmlFile = 'MuonTest.xml' process.load('L1Trigger.L1TGlobal.TriggerMenuConfig_cff') process.es_prefer_l1GtParameters = cms.ESPrefer('l1t::TriggerMenuXmlProducer','TriggerMenuXml') @@ -268,7 +280,7 @@ L1DataBxInEvent = cms.int32(1), AlgorithmTriggersUnprescaled = cms.bool(False), ProduceL1GtDaqRecord = cms.bool(True), - GmtInputTag = cms.InputTag(""), + GmtInputTag = cms.InputTag("gtStage2Digis","GT"), caloInputTag = cms.InputTag("gtStage2Digis","GT"), AlternativeNrBxBoardDaq = cms.uint32(0), BstLengthBytes = cms.int32(-1), @@ -303,11 +315,12 @@ # gt analyzer process.l1tGlobalAnalyzer = cms.EDAnalyzer('L1TGlobalAnalyzer', doText = cms.untracked.bool(options.debug), - dmxEGToken = cms.InputTag("None"), + dmxEGToken = cms.InputTag("caloStage2Digis"), dmxTauToken = cms.InputTag("None"), dmxJetToken = cms.InputTag("caloStage2Digis"), dmxEtSumToken = cms.InputTag("caloStage2Digis"), - egToken = cms.InputTag("None"), + muToken = cms.InputTag("gtStage2Digis","GT"), + egToken = cms.InputTag("gtStage2Digis","GT"), tauToken = cms.InputTag("None"), jetToken = cms.InputTag("gtStage2Digis","GT"), etSumToken = cms.InputTag("gtStage2Digis","GT"), @@ -317,19 +330,44 @@ ) +# dump records +process.dumpGTRecord = cms.EDAnalyzer("l1t::GtRecordDump", + egInputTag = cms.InputTag("gtStage2Digis","GT"), + muInputTag = cms.InputTag("gtStage2Digis","GT"), + tauInputTag = cms.InputTag(""), + jetInputTag = cms.InputTag("gtStage2Digis","GT"), + etsumInputTag = cms.InputTag("gtStage2Digis","GT"), + uGtRecInputTag = cms.InputTag(""), + uGtAlgInputTag = cms.InputTag("emL1uGtFromGtInput"), + uGtExtInputTag = cms.InputTag(""), + bxOffset = cms.int32(0), + minBx = cms.int32(0), + maxBx = cms.int32(0), + minBxVec = cms.int32(0), + maxBxVec = cms.int32(0), + dumpGTRecord = cms.bool(True), + dumpVectors = cms.bool(True), + tvFileName = cms.string( "TestVector.txt" ) + ) + + + + + # Path and EndPath definitions process.path = cms.Path( - process.stage2MPRaw - +process.stage2DemuxRaw +# process.stage2MPRaw + process.stage2DemuxRaw +process.stage2GTRaw +process.rawDataCollector +process.dumpRaw +process.caloStage2Digis +process.gtStage2Digis +process.emL1uGtFromGtInput - +process.emL1uGtFromDemuxOutput - +process.l1tStage2CaloAnalyzer - +process.l1tGlobalAnalyzer +# +process.emL1uGtFromDemuxOutput +# +process.l1tStage2CaloAnalyzer +# +process.l1tGlobalAnalyzer +# +process.dumpGTRecord ) if (not options.doMP): From 78050c01c34f3a14d21b7ef225a33b1e50130848 Mon Sep 17 00:00:00 2001 From: Thomas Lenzi Date: Tue, 26 Jan 2016 10:10:15 +0100 Subject: [PATCH 120/250] First update of the Clusterizer to CMSSW 8' --- .../Phase2TrackerCluster/BuildFile.xml | 5 + .../interface/Phase2TrackerCluster1D.h | 43 ++ .../Phase2TrackerCluster/src/classes.h | 18 + .../Phase2TrackerCluster/src/classes_def.xml | 12 + .../SiPhase2Clusterizer/BuildFile.xml | 14 + .../Phase2TrackerClusterizerAlgorithm.h | 34 ++ .../interface/Phase2TrackerClusterizerArray.h | 28 + .../SiPhase2Clusterizer/plugins/BuildFile.xml | 4 + .../plugins/Phase2TrackerClusterizer.cc | 92 ++++ .../plugins/Phase2TrackerClusterizer.h | 36 ++ .../python/phase2TrackerClusterizer_cfi.py | 11 + .../src/Phase2TrackerClusterizerAlgorithm.cc | 96 ++++ .../src/Phase2TrackerClusterizerArray.cc | 80 +++ .../SiPhase2Clusterizer/test/BuildFile.xml | 28 + .../test/ClustersValidation.cc | 490 ++++++++++++++++++ .../test/ClustersValidationTest_cfg.py | 61 +++ 16 files changed, 1052 insertions(+) create mode 100644 DataFormats/Phase2TrackerCluster/BuildFile.xml create mode 100644 DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h create mode 100644 DataFormats/Phase2TrackerCluster/src/classes.h create mode 100644 DataFormats/Phase2TrackerCluster/src/classes_def.xml create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/BuildFile.xml create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerArray.h create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/plugins/BuildFile.xml create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/python/phase2TrackerClusterizer_cfi.py create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerAlgorithm.cc create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerArray.cc create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/test/BuildFile.xml create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc create mode 100644 RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidationTest_cfg.py diff --git a/DataFormats/Phase2TrackerCluster/BuildFile.xml b/DataFormats/Phase2TrackerCluster/BuildFile.xml new file mode 100644 index 0000000000000..b2792319bb4ba --- /dev/null +++ b/DataFormats/Phase2TrackerCluster/BuildFile.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h b/DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h new file mode 100644 index 0000000000000..20103a7375e79 --- /dev/null +++ b/DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h @@ -0,0 +1,43 @@ +#ifndef DATAFORMATS_PHASE2TRACKERCLUSTER_PHASE2TRACKERCLUSTER1D_H +#define DATAFORMATS_PHASE2TRACKERCLUSTER_PHASE2TRACKERCLUSTER1D_H + +#include + +#include "DataFormats/Common/interface/DetSetVectorNew.h" + +#include "DataFormats/Phase2TrackerDigi/interface/Phase2TrackerDigi.h" + +class Phase2TrackerCluster1D { + +public: + + Phase2TrackerCluster1D() : data_(0) { } + Phase2TrackerCluster1D(unsigned int row, unsigned int col, unsigned int size) : firstDigi_(row, col), data_((size & 0x7fff)) { } + Phase2TrackerCluster1D(unsigned int row, unsigned int col, unsigned int size, unsigned int threshold) : firstDigi_(row, col), data_(((threshold & 0x1) << 15) | (size & 0x7fff)) { } + Phase2TrackerCluster1D(const Phase2TrackerDigi& firstDigi, unsigned int size) : firstDigi_(firstDigi), data_((size & 0x7fff)) { } + Phase2TrackerCluster1D(const Phase2TrackerDigi& firstDigi, unsigned int size, unsigned int threshold) : firstDigi_(firstDigi), data_(((threshold & 0x1) << 15) | (size & 0x7fff)) { } + + const Phase2TrackerDigi& firstDigi() const { return firstDigi_; } + unsigned int firstStrip() const { return firstDigi_.strip(); } + unsigned int firstRow() const { return firstDigi_.row(); } + unsigned int edge() const { return firstDigi_.edge(); } + unsigned int column() const { return firstDigi_.column(); } + uint16_t size() const { return (data_ & 0x7fff); } + uint16_t threshold() const { return ((data_ >> 15) & 0x1); } + float center() const { return firstStrip() + (data_ & 0x7fff) / 2.; } + std::pair< float, float > barycenter() const { return std::make_pair(column(), center()); } + +private: + + Phase2TrackerDigi firstDigi_; + uint16_t data_; + +}; + +inline bool operator< (const Phase2TrackerCluster1D& one, const Phase2TrackerCluster1D& other) { + return one.firstStrip() < other.firstStrip(); +} + +typedef edmNew::DetSetVector< Phase2TrackerCluster1D > Phase2TrackerCluster1DCollectionNew; + +#endif diff --git a/DataFormats/Phase2TrackerCluster/src/classes.h b/DataFormats/Phase2TrackerCluster/src/classes.h new file mode 100644 index 0000000000000..13e96bbc0e558 --- /dev/null +++ b/DataFormats/Phase2TrackerCluster/src/classes.h @@ -0,0 +1,18 @@ +#ifndef DATAFORMATS_PHASE2TRACKERCLUSTER_CLASSES_H +#define DATAFORMATS_PHASE2TRACKERCLUSTER_CLASSES_H + +#include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" +#include "DataFormats/Common/interface/Wrapper.h" +#include "DataFormats/Common/interface/DetSetNew.h" + +namespace { + struct dictionary { + edm::Wrapper< Phase2TrackerCluster1D > cl0; + edm::Wrapper< std::vector< Phase2TrackerCluster1D > > cl1; + edm::Wrapper< edmNew::DetSet< Phase2TrackerCluster1D > > cl2; + edm::Wrapper< std::vector< edmNew::DetSet< Phase2TrackerCluster1D > > > cl3; + edm::Wrapper< Phase2TrackerCluster1DCollectionNew > cl4; + }; +} + +#endif diff --git a/DataFormats/Phase2TrackerCluster/src/classes_def.xml b/DataFormats/Phase2TrackerCluster/src/classes_def.xml new file mode 100644 index 0000000000000..5f419ed02014b --- /dev/null +++ b/DataFormats/Phase2TrackerCluster/src/classes_def.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/RecoLocalTracker/SiPhase2Clusterizer/BuildFile.xml b/RecoLocalTracker/SiPhase2Clusterizer/BuildFile.xml new file mode 100644 index 0000000000000..69cf6199f4706 --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/BuildFile.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h b/RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h new file mode 100644 index 0000000000000..ac48a111a2425 --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h @@ -0,0 +1,34 @@ +#ifndef RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizerAlgorithm_h +#define RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizerAlgorithm_h + +#include "DataFormats/Common/interface/DetSetVector.h" +#include "DataFormats/Common/interface/DetSetVectorNew.h" +#include "DataFormats/Phase2TrackerDigi/interface/Phase2TrackerDigi.h" +#include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" + +#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" + +#include "RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerArray.h" + +class Phase2TrackerClusterizerAlgorithm { + + public: + + Phase2TrackerClusterizerAlgorithm(unsigned int, unsigned int); + void setup(const PixelGeomDetUnit*); + void clusterizeDetUnit(const edm::DetSet< Phase2TrackerDigi >&, edmNew::DetSetVector< Phase2TrackerCluster1D >::FastFiller&); + + private: + + void fillMatrix(edm::DetSet< Phase2TrackerDigi >::const_iterator, edm::DetSet< Phase2TrackerDigi >::const_iterator); + void clearMatrix(edm::DetSet< Phase2TrackerDigi >::const_iterator, edm::DetSet< Phase2TrackerDigi >::const_iterator); + + Phase2TrackerClusterizerArray matrix_; + unsigned int maxClusterSize_; + unsigned int maxNumberClusters_; + unsigned int nrows_; + unsigned int ncols_; + +}; + +#endif diff --git a/RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerArray.h b/RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerArray.h new file mode 100644 index 0000000000000..5c6222101fd5c --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerArray.h @@ -0,0 +1,28 @@ +#ifndef RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizerArray_h +#define RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizerArray_h + +#include + +class Phase2TrackerClusterizerArray { + + public: + + Phase2TrackerClusterizerArray(); + Phase2TrackerClusterizerArray(unsigned int, unsigned int); + void setSize(unsigned int, unsigned int); + bool operator()(unsigned int, unsigned int) const; + unsigned int rows() const; + unsigned int columns() const; + bool inside(unsigned int, unsigned int) const; + void set(unsigned int, unsigned int, bool); + unsigned int size() const; + unsigned int index(unsigned int, unsigned int) const; + + private: + + unsigned int nrows_, ncols_; + std::vector< bool > matrix_; + +}; + +#endif diff --git a/RecoLocalTracker/SiPhase2Clusterizer/plugins/BuildFile.xml b/RecoLocalTracker/SiPhase2Clusterizer/plugins/BuildFile.xml new file mode 100644 index 0000000000000..66dcbd4240d52 --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/plugins/BuildFile.xml @@ -0,0 +1,4 @@ + + + + diff --git a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc new file mode 100644 index 0000000000000..01b7d1d2b5124 --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc @@ -0,0 +1,92 @@ +#include "RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h" + +#include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" +#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" +#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" +#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" + +#include "DataFormats/Common/interface/DetSetVector.h" +#include "DataFormats/Phase2TrackerDigi/interface/Phase2TrackerDigi.h" + +#include "FWCore/PluginManager/interface/ModuleDef.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include +#include + +namespace cms { + + /* + * Initialise the producer + */ + + Phase2TrackerClusterizer::Phase2TrackerClusterizer(edm::ParameterSet const& conf) : + conf_(conf), + src_(conf.getParameter< edm::InputTag >("src")), + maxClusterSize_(conf.getParameter< unsigned int >("maxClusterSize")), + maxNumberClusters_(conf.getParameter< unsigned int >("maxNumberClusters")) { + // Objects that will be used + token_ = consumes< edm::DetSetVector< Phase2TrackerDigi > >(conf.getParameter("src")); + // Objects that will be produced + produces< Phase2TrackerCluster1DCollectionNew >(); + // + clusterizer_ = new Phase2TrackerClusterizerAlgorithm(maxClusterSize_, maxNumberClusters_); + } + + Phase2TrackerClusterizer::~Phase2TrackerClusterizer() { + delete clusterizer_; + } + + /* + * Clusterize the events + */ + + void Phase2TrackerClusterizer::produce(edm::Event& event, const edm::EventSetup& eventSetup) { + + // Get the Digis + edm::Handle< edm::DetSetVector< Phase2TrackerDigi > > digis; + event.getByToken(token_, digis); + //event.getByLabel(src_, digis); + //event.getByLabel("mix", "Tracker", digis); + + // Get the geometry + edm::ESHandle< TrackerGeometry > geomHandle; + eventSetup.get< TrackerDigiGeometryRecord >().get(geomHandle); + const TrackerGeometry* tkGeom(&(*geomHandle)); + + // Global container for the clusters of each modules + std::auto_ptr< Phase2TrackerCluster1DCollectionNew > outputClusters(new Phase2TrackerCluster1DCollectionNew()); + + // Go over all the modules + for (edm::DetSetVector< Phase2TrackerDigi >::const_iterator DSViter = digis->begin(); DSViter != digis->end(); ++DSViter) { + + DetId detId(DSViter->detId()); + + // Geometry + const GeomDetUnit* geomDetUnit(tkGeom->idToDetUnit(detId)); + const PixelGeomDetUnit* pixDet = dynamic_cast< const PixelGeomDetUnit* >(geomDetUnit); + if (!pixDet) assert(0); + + // Container for the clusters that will be produced for this modules + edmNew::DetSetVector< Phase2TrackerCluster1D >::FastFiller clusters(*outputClusters, DSViter->detId()); + + // Setup the clusterizer algorithm for this detector (see ClusterizerAlgorithm for more details) + clusterizer_->setup(pixDet); + + // Pass the list of Digis to the main algorithm + // This function will store the clusters in the previously created container + clusterizer_->clusterizeDetUnit(*DSViter, clusters); + + if (clusters.empty()) clusters.abort(); + } + + // Add the data to the output + outputClusters->shrink_to_fit(); + event.put(outputClusters); + } +} + +using cms::Phase2TrackerClusterizer; +DEFINE_FWK_MODULE(Phase2TrackerClusterizer); diff --git a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h new file mode 100644 index 0000000000000..357dbe3538f44 --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h @@ -0,0 +1,36 @@ +#ifndef RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizer_h +#define RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizer_h + +#include "RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h" + +#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" +#include "DataFormats/DetId/interface/DetId.h" + +#include "FWCore/Framework/interface/EDProducer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" + +namespace cms { + + class Phase2TrackerClusterizer : public edm::EDProducer { + + public: + explicit Phase2TrackerClusterizer(const edm::ParameterSet& conf); + virtual ~Phase2TrackerClusterizer(); + virtual void produce(edm::Event& event, const edm::EventSetup& eventSetup); + + private: + edm::ParameterSet conf_; + Phase2TrackerClusterizerAlgorithm* clusterizer_; + edm::InputTag src_; + edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > token_; + unsigned int maxClusterSize_; + unsigned int maxNumberClusters_; + + }; +} + +#endif diff --git a/RecoLocalTracker/SiPhase2Clusterizer/python/phase2TrackerClusterizer_cfi.py b/RecoLocalTracker/SiPhase2Clusterizer/python/phase2TrackerClusterizer_cfi.py new file mode 100644 index 0000000000000..acaa69225f481 --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/python/phase2TrackerClusterizer_cfi.py @@ -0,0 +1,11 @@ +import FWCore.ParameterSet.Config as cms + +# Clusterizer options +siPhase2Clusters = cms.EDProducer('Phase2TrackerClusterizer', + src = cms.InputTag("mix", "Tracker"), + maxClusterSize = cms.uint32(8), + maxNumberClusters = cms.uint32(0) +) + + + diff --git a/RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerAlgorithm.cc b/RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerAlgorithm.cc new file mode 100644 index 0000000000000..30a69cf28ac4a --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerAlgorithm.cc @@ -0,0 +1,96 @@ +#include "RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h" + +#include "Geometry/CommonTopologies/interface/PixelTopology.h" + +/* + * Initialise the clusterizer algorithm + */ + +Phase2TrackerClusterizerAlgorithm::Phase2TrackerClusterizerAlgorithm(unsigned int maxClusterSize, unsigned int maxNumberClusters) : maxClusterSize_(maxClusterSize), maxNumberClusters_(maxNumberClusters), nrows_(0), ncols_(0) { } + +/* + * Change the size of the 2D matrix for this module (varies from pixel to strip modules) + */ + +void Phase2TrackerClusterizerAlgorithm::setup(const PixelGeomDetUnit* pixDet) { + const PixelTopology& topol(pixDet->specificTopology()); + nrows_ = topol.nrows(); + ncols_ = topol.ncolumns(); + matrix_.setSize(nrows_, ncols_); +} + +/* + * Go over the Digis and create clusters + */ + +void Phase2TrackerClusterizerAlgorithm::clusterizeDetUnit(const edm::DetSet< Phase2TrackerDigi >& digis, edmNew::DetSetVector< Phase2TrackerCluster1D >::FastFiller& clusters) { + + // Fill the 2D matrix with the ADC values + fillMatrix(digis.begin(), digis.end()); + + // Number of clusters + unsigned int numberClusters(0); + Phase2TrackerDigi firstDigi; + unsigned int sizeCluster(0); + bool closeCluster(false); + + // Loop over the Digis + // for the S modules, 1 column = 1 strip, so adjacent digis are along the rows + // same for P modules + for (unsigned int col(0); col < ncols_; ++col) { + for (unsigned int row(0); row < nrows_; ++row) { + + // If the Digi is hit + if (matrix_(row, col)) { + // No cluster is open, create a new one + if (sizeCluster == 0) { + // Define first digi + firstDigi = Phase2TrackerDigi(row, col); + sizeCluster = 1; + } + // A cluster is open, increase its size + else ++sizeCluster; + // Check if we reached the maximum size of the cluster and need to close it + closeCluster = ((maxClusterSize_ != 0 and sizeCluster >= maxClusterSize_) ? true : false); + } + // Otherwise check if we need to close a cluster (end of cluster) + else closeCluster = ((sizeCluster != 0) ? true : false); + + // Always close a cluster if we reach the end of the loop + if (sizeCluster != 0 and row == (nrows_ - 1)) closeCluster = true; + + // If we have to close a cluster, do it + if (closeCluster) { + // Add the cluster to the list + clusters.push_back(Phase2TrackerCluster1D(firstDigi, sizeCluster)); + // Reset the variables + sizeCluster = 0; + // Increase the number of clusters + ++numberClusters; + } + + // Check if we hit the maximum number of clusters per module + if (maxNumberClusters_ != 0 and numberClusters > maxNumberClusters_) return; + } + } + + // Reset the matrix + clearMatrix(digis.begin(), digis.end()); +} + +/* + * Copy the value of the Digis' ADC to the 2D matrix. An ADC of 255 means the cell is hit (binary read-out) + */ + +void Phase2TrackerClusterizerAlgorithm::fillMatrix(edm::DetSet< Phase2TrackerDigi >::const_iterator begin, edm::DetSet< Phase2TrackerDigi >::const_iterator end) { + for (edm::DetSet< Phase2TrackerDigi >::const_iterator di(begin); di != end; ++di) matrix_.set(di->row(), di->column(), true); +} + +/* + * Clear the array of hits + */ + +void Phase2TrackerClusterizerAlgorithm::clearMatrix(edm::DetSet< Phase2TrackerDigi >::const_iterator begin, edm::DetSet< Phase2TrackerDigi >::const_iterator end) { + for (edm::DetSet< Phase2TrackerDigi >::const_iterator di(begin); di != end; ++di) matrix_.set(di->row(), di->column(), false); +} + diff --git a/RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerArray.cc b/RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerArray.cc new file mode 100644 index 0000000000000..32fcb9412e5dc --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerArray.cc @@ -0,0 +1,80 @@ +#include "RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerArray.h" + +/* + * Create a new Array of hits + */ + +Phase2TrackerClusterizerArray::Phase2TrackerClusterizerArray() : nrows_(0), ncols_(0) { } + +Phase2TrackerClusterizerArray::Phase2TrackerClusterizerArray(unsigned int nrows, unsigned int ncols) { + setSize(nrows, ncols); +} + +/* + * Resize the Array and clear the values + */ + +void Phase2TrackerClusterizerArray::setSize(unsigned int nrows, unsigned int ncols) { + nrows_ = nrows; + ncols_ = ncols; + matrix_.resize(nrows * ncols); + for (std::vector< bool >::iterator it(matrix_.begin()); it != matrix_.end(); ++it) *it = false; +} + +/* + * Return the value of an element in the Array + */ + +bool Phase2TrackerClusterizerArray::operator()(unsigned int row, unsigned int col) const { + if (inside(row, col)) return matrix_[index(row, col)]; + else return false; +} + +/* + * Return the number of rows + */ + +unsigned int Phase2TrackerClusterizerArray::rows() const { + return nrows_; +} + +/* + * Return the number of columns + */ + +unsigned int Phase2TrackerClusterizerArray::columns() const { + return ncols_; +} + +/* + * Tell if an element is inside the array or not + */ + +bool Phase2TrackerClusterizerArray::inside(unsigned int row, unsigned int col) const { + return (row < nrows_ && col < ncols_); +} + +/* + * Change the value of an element of the Array + */ + +void Phase2TrackerClusterizerArray::set(unsigned int row, unsigned int col, bool state) { + matrix_[index(row, col)] = state; +} + +/* + * Return the size of the array + */ + +unsigned int Phase2TrackerClusterizerArray::size() const { + return matrix_.size(); +} + +/* + * Get the poisiton of an element of the Array in the vector that holds the data + */ + +unsigned int Phase2TrackerClusterizerArray::index(unsigned int row, unsigned int col) const { + return col * nrows_ + row; +} + diff --git a/RecoLocalTracker/SiPhase2Clusterizer/test/BuildFile.xml b/RecoLocalTracker/SiPhase2Clusterizer/test/BuildFile.xml new file mode 100644 index 0000000000000..0b99ebcb5a835 --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/test/BuildFile.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc b/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc new file mode 100644 index 0000000000000..6d574e99b1189 --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc @@ -0,0 +1,490 @@ +#include +#include +#include + +#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 "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "FWCore/ServiceRegistry/interface/Service.h" + +#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" +#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" +#include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" +#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" + +#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" +#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h" +#include "DataFormats/Common/interface/DetSetVectorNew.h" +#include "DataFormats/Common/interface/DetSetVector.h" +#include "DataFormats/DetId/interface/DetId.h" +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" +#include "DataFormats/Phase2TrackerDigi/interface/Phase2TrackerDigi.h" +#include "DataFormats/SiPixelDigi/interface/PixelDigi.h" + +#include "SimDataFormats/TrackerDigiSimLink/interface/PixelDigiSimLink.h" +#include "SimDataFormats/Track/interface/SimTrackContainer.h" +#include "SimDataFormats/Vertex/interface/SimVertexContainer.h" +#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h" + +#include "CommonTools/UtilAlgos/interface/TFileService.h" +#include "CommonTools/Utils/interface/TFileDirectory.h" + +#include +#include +#include + + +struct ClusterHistos { + THStack* numberClustersMixed; + TH1F* numberClusterPixel; + TH1F* numberClusterStrip; + + THStack* clustersSizeMixed; + TH1F* clusterSizePixel; + TH1F* clusterSizeStrip; + + TH2F* globalPosXY[3]; + TH2F* localPosXY[3]; + + TH1F* deltaXClusterSimHits[3]; + TH1F* deltaYClusterSimHits[3]; + + TH1F* deltaXClusterSimHits_P[3]; + TH1F* deltaYClusterSimHits_P[3]; + + TH1F* digiEfficiency[3]; + + TH1F* primarySimHits; + TH1F* otherSimHits; +}; + +class Phase2TrackerClusterizerValidation : public edm::EDAnalyzer { + + public: + + typedef std::map< unsigned int, std::vector< PSimHit > > SimHitsMap; + typedef std::map< unsigned int, SimTrack > SimTracksMap; + + explicit Phase2TrackerClusterizerValidation(const edm::ParameterSet&); + ~Phase2TrackerClusterizerValidation(); + void beginJob(); + void endJob(); + void analyze(const edm::Event&, const edm::EventSetup&); + + private: + + std::map< unsigned int, ClusterHistos >::iterator createLayerHistograms(unsigned int); + unsigned int getLayerNumber(const DetId&, const TrackerTopology*); + unsigned int getSimTrackId(const edm::Handle< edm::DetSetVector< PixelDigiSimLink > >&, const DetId&, unsigned int); + + edm::InputTag src_; + edm::InputTag links_; + TH2F* trackerLayout_; + TH2F* trackerLayoutXY_; + TH2F* trackerLayoutXYBar_; + TH2F* trackerLayoutXYEC_; + + std::map< unsigned int, ClusterHistos > histograms_; + +}; + +Phase2TrackerClusterizerValidation::Phase2TrackerClusterizerValidation(const edm::ParameterSet& conf) : + src_(conf.getParameter< edm::InputTag >("src")), + links_(conf.getParameter< edm::InputTag >("links")) { } + + Phase2TrackerClusterizerValidation::~Phase2TrackerClusterizerValidation() { } + + void Phase2TrackerClusterizerValidation::beginJob() { + edm::Service fs; + fs->file().cd("/"); + TFileDirectory td = fs->mkdir("Common"); + // Create common histograms + trackerLayout_ = td.make< TH2F >("RVsZ", "R vs. z position", 6000, -300.0, 300.0, 1200, 0.0, 120.0); + trackerLayoutXY_ = td.make< TH2F >("XVsY", "x vs. y position", 2400, -120.0, 120.0, 2400, -120.0, 120.0); + trackerLayoutXYBar_ = td.make< TH2F >("XVsYBar", "x vs. y position", 2400, -120.0, 120.0, 2400, -120.0, 120.0); + trackerLayoutXYEC_ = td.make< TH2F >("XVsYEC", "x vs. y position", 2400, -120.0, 120.0, 2400, -120.0, 120.0); + } + +void Phase2TrackerClusterizerValidation::endJob() { } + +void Phase2TrackerClusterizerValidation::analyze(const edm::Event& event, const edm::EventSetup& eventSetup) { + + /* + * Get the needed objects + */ + + // Get the clusters + edm::Handle< Phase2TrackerCluster1DCollectionNew > clusters; + event.getByLabel(src_, clusters); + + // Get the PixelDigiSimLinks + edm::Handle< edm::DetSetVector< PixelDigiSimLink > > pixelSimLinks; + event.getByLabel("simSiPixelDigis", "Tracker", pixelSimLinks); + +//event.getByLabel(links_, pixelSimLinks); + + // Get the SimHits + edm::Handle< edm::PSimHitContainer > simHitsRaw; + event.getByLabel("g4SimHits", "TrackerHitsPixelBarrelLowTof", simHitsRaw); + + // Get the SimTracks + edm::Handle< edm::SimTrackContainer > simTracksRaw; + event.getByLabel("g4SimHits", simTracksRaw); + + // Get the SimVertex + edm::Handle< edm::SimVertexContainer > simVertices; + event.getByLabel("g4SimHits", simVertices); + + // Get the geometry + edm::ESHandle< TrackerGeometry > geomHandle; + eventSetup.get< TrackerDigiGeometryRecord >().get(geomHandle); + const TrackerGeometry* tkGeom = &(*geomHandle); + + edm::ESHandle< TrackerTopology > tTopoHandle; + eventSetup.get< IdealGeometryRecord >().get(tTopoHandle); + const TrackerTopology* tTopo = tTopoHandle.product(); + + /* + * Rearrange the simTracks + */ + + // Rearrange the simTracks for ease of use + SimTracksMap simTracks; + for (edm::SimTrackContainer::const_iterator simTrackIt(simTracksRaw->begin()); simTrackIt != simTracksRaw->end(); ++simTrackIt) simTracks.insert(std::pair< unsigned int, SimTrack >(simTrackIt->trackId(), *simTrackIt)); + + /* + * Rearrange the simHits by detUnit + */ + + // Rearrange the simHits for ease of use + SimHitsMap simHitsDetUnit; + SimHitsMap simHitsTrackId; + for (edm::PSimHitContainer::const_iterator simHitIt(simHitsRaw->begin()); simHitIt != simHitsRaw->end(); ++simHitIt) { + SimHitsMap::iterator simHitsDetUnitIt(simHitsDetUnit.find(simHitIt->detUnitId())); + if (simHitsDetUnitIt == simHitsDetUnit.end()) { + std::pair< SimHitsMap::iterator, bool > newIt(simHitsDetUnit.insert(std::pair< unsigned int, std::vector< PSimHit > >(simHitIt->detUnitId(), std::vector< PSimHit >()))); + simHitsDetUnitIt = newIt.first; + } + simHitsDetUnitIt->second.push_back(*simHitIt); + + SimHitsMap::iterator simHitsTrackIdIt(simHitsTrackId.find(simHitIt->trackId())); + if (simHitsTrackIdIt == simHitsTrackId.end()) { + std::pair< SimHitsMap::iterator, bool > newIt(simHitsTrackId.insert(std::pair< unsigned int, std::vector< PSimHit > >(simHitIt->trackId(), std::vector< PSimHit >()))); + simHitsTrackIdIt = newIt.first; + } + simHitsTrackIdIt->second.push_back(*simHitIt); + } + + /* + * Validation + */ + + // Loop over modules + for (Phase2TrackerCluster1DCollectionNew::const_iterator DSViter = clusters->begin(); DSViter != clusters->end(); ++DSViter) { + + // Get the detector unit's id + unsigned int rawid(DSViter->detId()); + DetId detId(rawid); + unsigned int layer(getLayerNumber(detId, tTopo)); + + // Get the geometry of the tracker + const GeomDetUnit* geomDetUnit(tkGeom->idToDetUnit(detId)); + const PixelGeomDetUnit* theGeomDet = dynamic_cast< const PixelGeomDetUnit* >(geomDetUnit); + const PixelTopology& topol = theGeomDet->specificTopology(); + + if (!geomDetUnit) break; + + // Create histograms for the layer if they do not yet exist + std::map< unsigned int, ClusterHistos >::iterator histogramLayer(histograms_.find(layer)); + if (histogramLayer == histograms_.end()) histogramLayer = createLayerHistograms(layer); + + // Number of clusters + unsigned int nClustersPixel(0), nClustersStrip(0); + + // Loop over the clusters in the detector unit + for (edmNew::DetSet< Phase2TrackerCluster1D >::const_iterator clustIt = DSViter->begin(); clustIt != DSViter->end(); ++clustIt) { + + /* + * Cluster related variables + */ + + MeasurementPoint mpClu(clustIt->center(), clustIt->column() + 0.5); + Local3DPoint localPosClu = geomDetUnit->topology().localPosition(mpClu); + Global3DPoint globalPosClu = geomDetUnit->surface().toGlobal(localPosClu); + + // Fill the position histograms + trackerLayout_->Fill(globalPosClu.z(), globalPosClu.perp()); + trackerLayoutXY_->Fill(globalPosClu.x(), globalPosClu.y()); + if (layer < 100) trackerLayoutXYBar_->Fill(globalPosClu.x(), globalPosClu.y()); + else trackerLayoutXYEC_->Fill(globalPosClu.x(), globalPosClu.y()); + + histogramLayer->second.localPosXY[0]->Fill(localPosClu.x(), localPosClu.y()); + histogramLayer->second.globalPosXY[0]->Fill(globalPosClu.x(), globalPosClu.y()); + + // Pixel module + if (topol.ncolumns() == 32) { + histogramLayer->second.localPosXY[1]->Fill(localPosClu.x(), localPosClu.y()); + histogramLayer->second.globalPosXY[1]->Fill(globalPosClu.x(), globalPosClu.y()); + histogramLayer->second.clusterSizePixel->Fill(clustIt->size()); + ++nClustersPixel; + } + // Strip module + else if (topol.ncolumns() == 2) { + histogramLayer->second.localPosXY[2]->Fill(localPosClu.x(), localPosClu.y()); + histogramLayer->second.globalPosXY[2]->Fill(globalPosClu.x(), globalPosClu.y()); + histogramLayer->second.clusterSizeStrip->Fill(clustIt->size()); + ++nClustersStrip; + } + + /* + * Digis related variables + */ + + std::vector< unsigned int > clusterSimTrackIds; + + // Get all the simTracks that form the cluster + for (unsigned int i(0); i < clustIt->size(); ++i) { + unsigned int channel(PixelDigi::pixelToChannel(clustIt->firstRow() + i, clustIt->column())); // Here we have to use the old pixelToChannel function (not Phase2TrackerDigi but PixelDigi), change this when using new Digis + unsigned int simTrackId(getSimTrackId(pixelSimLinks, detId, channel)); + clusterSimTrackIds.push_back(simTrackId); + } + + /* + * SimHits related variables + */ + + + unsigned int primarySimHits(0); + unsigned int otherSimHits(0); + + for (edm::PSimHitContainer::const_iterator hitIt(simHitsRaw->begin()); hitIt != simHitsRaw->end(); ++hitIt) { + if (rawid == hitIt->detUnitId() and std::find(clusterSimTrackIds.begin(), clusterSimTrackIds.end(), hitIt->trackId()) != clusterSimTrackIds.end()) { + Local3DPoint localPosHit(hitIt->localPosition()); + + histogramLayer->second.deltaXClusterSimHits[0]->Fill(localPosClu.x() - localPosHit.x()); + histogramLayer->second.deltaYClusterSimHits[0]->Fill(localPosClu.y() - localPosHit.y()); + + // Pixel module + if (topol.ncolumns() == 32) { + histogramLayer->second.deltaXClusterSimHits[1]->Fill(localPosClu.x() - localPosHit.x()); + histogramLayer->second.deltaYClusterSimHits[1]->Fill(localPosClu.y() - localPosHit.y()); + } + // Strip module + else if (topol.ncolumns() == 2) { + histogramLayer->second.deltaXClusterSimHits[2]->Fill(localPosClu.x() - localPosHit.x()); + histogramLayer->second.deltaYClusterSimHits[2]->Fill(localPosClu.y() - localPosHit.y()); + } + + ++otherSimHits; + + std::map< unsigned int, SimTrack >::const_iterator simTrackIt(simTracks.find(hitIt->trackId())); + if (simTrackIt == simTracks.end()) continue; + + // Primary particles only + unsigned int processType(hitIt->processType()); + if (simTrackIt->second.vertIndex() == 0 and (processType == 2 || processType == 7 || processType == 9 || processType == 11 || processType == 13 || processType == 15)) { + histogramLayer->second.deltaXClusterSimHits_P[0]->Fill(localPosClu.x() - localPosHit.x()); + histogramLayer->second.deltaYClusterSimHits_P[0]->Fill(localPosClu.y() - localPosHit.y()); + + // Pixel module + if (topol.ncolumns() == 32) { + histogramLayer->second.deltaXClusterSimHits_P[1]->Fill(localPosClu.x() - localPosHit.x()); + histogramLayer->second.deltaYClusterSimHits_P[1]->Fill(localPosClu.y() - localPosHit.y()); + } + // Strip module + else if (topol.ncolumns() == 2) { + histogramLayer->second.deltaXClusterSimHits_P[2]->Fill(localPosClu.x() - localPosHit.x()); + histogramLayer->second.deltaYClusterSimHits_P[2]->Fill(localPosClu.y() - localPosHit.y()); + } + + ++primarySimHits; + } + } + } + + otherSimHits -= primarySimHits; + + histogramLayer->second.primarySimHits->Fill(primarySimHits); + histogramLayer->second.otherSimHits->Fill(otherSimHits); + } + + if (nClustersPixel) histogramLayer->second.numberClusterPixel->Fill(nClustersPixel); + if (nClustersStrip) histogramLayer->second.numberClusterStrip->Fill(nClustersStrip); + } +} + +// Create the histograms +std::map< unsigned int, ClusterHistos >::iterator Phase2TrackerClusterizerValidation::createLayerHistograms(unsigned int ival) { + std::ostringstream fname1, fname2; + + edm::Service fs; + fs->file().cd("/"); + + std::string tag; + unsigned int id; + if (ival < 100) { + id = ival; + fname1 << "Barrel"; + fname2 << "Layer_" << id; + tag = "_layer_"; + } + else { + int side = ival / 100; + id = ival - side * 100; + fname1 << "EndCap_Side_" << side; + fname2 << "Disc_" << id; + tag = "_disc_"; + } + + TFileDirectory td1 = fs->mkdir(fname1.str().c_str()); + TFileDirectory td = td1.mkdir(fname2.str().c_str()); + + ClusterHistos local_histos; + + std::ostringstream histoName; + + /* + * Number of clusters + */ + + histoName.str(""); histoName << "Number_Clusters_Pixel" << tag.c_str() << id; + local_histos.numberClusterPixel = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 20, 0., 20.); + local_histos.numberClusterPixel->SetFillColor(kAzure + 7); + + histoName.str(""); histoName << "Number_Clusters_Strip" << tag.c_str() << id; + local_histos.numberClusterStrip = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 20, 0., 20.); + local_histos.numberClusterStrip->SetFillColor(kOrange - 3); + + histoName.str(""); histoName << "Number_Clusters_Mixed" << tag.c_str() << id; + local_histos.numberClustersMixed = td.make< THStack >(histoName.str().c_str(), histoName.str().c_str()); + local_histos.numberClustersMixed->Add(local_histos.numberClusterPixel); + local_histos.numberClustersMixed->Add(local_histos.numberClusterStrip); + + /* + * Cluster size + */ + + histoName.str(""); histoName << "Cluster_Size_Pixel" << tag.c_str() << id; + local_histos.clusterSizePixel = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 10, 0., 10.); + local_histos.clusterSizePixel->SetFillColor(kAzure + 7); + + histoName.str(""); histoName << "Cluster_Size_Strip" << tag.c_str() << id; + local_histos.clusterSizeStrip = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 10, 0., 10.); + local_histos.clusterSizeStrip->SetFillColor(kOrange - 3); + + histoName.str(""); histoName << "Cluster_Size_Mixed" << tag.c_str() << id; + local_histos.clustersSizeMixed = td.make< THStack >(histoName.str().c_str(), histoName.str().c_str()); + local_histos.clustersSizeMixed->Add(local_histos.clusterSizePixel); + local_histos.clustersSizeMixed->Add(local_histos.clusterSizeStrip); + + /* + * Local and Global positions + */ + + histoName.str(""); histoName << "Local_Position_XY_Mixed" << tag.c_str() << id; + local_histos.localPosXY[0] = td.make< TH2F >(histoName.str().c_str(), histoName.str().c_str(), 2000, 0., 0., 2000, 0., 0.); + + histoName.str(""); histoName << "Local_Position_XY_Pixel" << tag.c_str() << id; + local_histos.localPosXY[1] = td.make< TH2F >(histoName.str().c_str(), histoName.str().c_str(), 2000, 0., 0., 2000, 0., 0.); + + histoName.str(""); histoName << "Local_Position_XY_Strip" << tag.c_str() << id; + local_histos.localPosXY[2] = td.make< TH2F >(histoName.str().c_str(), histoName.str().c_str(), 2000, 0., 0., 2000, 0., 0.); + + histoName.str(""); histoName << "Global_Position_XY_Mixed" << tag.c_str() << id; + local_histos.globalPosXY[0] = td.make< TH2F >(histoName.str().c_str(), histoName.str().c_str(), 2400, -120.0, 120.0, 2400, -120.0, 120.0); + + histoName.str(""); histoName << "Global_Position_XY_Pixel" << tag.c_str() << id; + local_histos.globalPosXY[1] = td.make< TH2F >(histoName.str().c_str(), histoName.str().c_str(), 2400, -120.0, 120.0, 2400, -120.0, 120.0); + + histoName.str(""); histoName << "Global_Position_XY_Strip" << tag.c_str() << id; + local_histos.globalPosXY[2] = td.make< TH2F >(histoName.str().c_str(), histoName.str().c_str(), 2400, -120.0, 120.0, 2400, -120.0, 120.0); + + /* + * Delta positions with SimHits + */ + + histoName.str(""); histoName << "Delta_X_Cluster_SimHits_Mixed" << tag.c_str() << id; + local_histos.deltaXClusterSimHits[0] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + histoName.str(""); histoName << "Delta_X_Cluster_SimHits_Pixel" << tag.c_str() << id; + local_histos.deltaXClusterSimHits[1] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + histoName.str(""); histoName << "Delta_X_Cluster_SimHits_Strip" << tag.c_str() << id; + local_histos.deltaXClusterSimHits[2] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + histoName.str(""); histoName << "Delta_Y_Cluster_SimHits_Mixed" << tag.c_str() << id; + local_histos.deltaYClusterSimHits[0] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + histoName.str(""); histoName << "Delta_Y_Cluster_SimHits_Pixel" << tag.c_str() << id; + local_histos.deltaYClusterSimHits[1] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + histoName.str(""); histoName << "Delta_Y_Cluster_SimHits_Strip" << tag.c_str() << id; + local_histos.deltaYClusterSimHits[2] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + /* + * Delta position with simHits for primary tracks only + */ + + histoName.str(""); histoName << "Delta_X_Cluster_SimHits_Mixed_P" << tag.c_str() << id; + local_histos.deltaXClusterSimHits_P[0] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + histoName.str(""); histoName << "Delta_X_Cluster_SimHits_Pixel_P" << tag.c_str() << id; + local_histos.deltaXClusterSimHits_P[1] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + histoName.str(""); histoName << "Delta_X_Cluster_SimHits_Strip_P" << tag.c_str() << id; + local_histos.deltaXClusterSimHits_P[2] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + histoName.str(""); histoName << "Delta_Y_Cluster_SimHits_Mixed_P" << tag.c_str() << id; + local_histos.deltaYClusterSimHits_P[0] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + histoName.str(""); histoName << "Delta_Y_Cluster_SimHits_Pixel_P" << tag.c_str() << id; + local_histos.deltaYClusterSimHits_P[1] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + histoName.str(""); histoName << "Delta_Y_Cluster_SimHits_Strip_P" << tag.c_str() << id; + local_histos.deltaYClusterSimHits_P[2] = td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 100, 0., 0.); + + /* + * Information on the Digis per cluster + */ + + histoName.str(""); histoName << "Primary_Digis" << tag.c_str() << id; + local_histos.primarySimHits= td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 10, 0., 10.); + + histoName.str(""); histoName << "Other_Digis" << tag.c_str() << id; + local_histos.otherSimHits= td.make< TH1F >(histoName.str().c_str(), histoName.str().c_str(), 10, 0., 10.); + + /* + * End + */ + + std::pair< std::map< unsigned int, ClusterHistos >::iterator, bool > insertedIt(histograms_.insert(std::make_pair(ival, local_histos))); + fs->file().cd("/"); + + return insertedIt.first; +} + +unsigned int Phase2TrackerClusterizerValidation::getLayerNumber(const DetId& detid, const TrackerTopology* topo) { + if (detid.det() == DetId::Tracker) { + if (detid.subdetId() == PixelSubdetector::PixelBarrel) return (topo->pxbLayer(detid)); + else if (detid.subdetId() == PixelSubdetector::PixelEndcap) return (100 * topo->pxfSide(detid) + topo->pxfDisk(detid)); + else return 999; + } + return 999; +} + +unsigned int Phase2TrackerClusterizerValidation::getSimTrackId(const edm::Handle< edm::DetSetVector< PixelDigiSimLink > >& pixelSimLinks, const DetId& detId, unsigned int channel) { + edm::DetSetVector< PixelDigiSimLink >::const_iterator DSViter(pixelSimLinks->find(detId)); + if (DSViter == pixelSimLinks->end()) return 0; + for (edm::DetSet< PixelDigiSimLink >::const_iterator it = DSViter->data.begin(); it != DSViter->data.end(); ++it) { + if (channel == it->channel()) return it->SimTrackId(); + } + return 0; +} + +DEFINE_FWK_MODULE(Phase2TrackerClusterizerValidation); diff --git a/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidationTest_cfg.py b/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidationTest_cfg.py new file mode 100644 index 0000000000000..1f0e0c4f5504a --- /dev/null +++ b/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidationTest_cfg.py @@ -0,0 +1,61 @@ +# Imports +import FWCore.ParameterSet.Config as cms + +# Create a new CMS process +process = cms.Process('cluTest') + +# Import all the necessary files +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.Geometry.GeometryExtended2023MuondevReco_cff') +process.load('Configuration.StandardSequences.MagneticField_38T_PostLS1_cff') +process.load('Configuration.StandardSequences.RawToDigi_cff') +process.load('Configuration.StandardSequences.L1Reco_cff') +process.load('Configuration.StandardSequences.Reconstruction_cff') +process.load('Configuration.StandardSequences.Validation_cff') +process.load('DQMOffline.Configuration.DQMOfflineMC_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +# Number of events (-1 = all) +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(-1) +) + +# Input file +process.source = cms.Source('PoolSource', + fileNames = cms.untracked.vstring('file:step3.root') +) + +# TAG +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgradePLS3', '') + +# Output +process.TFileService = cms.Service('TFileService', + fileName = cms.string('file:cluster_validation.root') +) + +# DEBUG +process.MessageLogger = cms.Service('MessageLogger', + debugModules = cms.untracked.vstring('siPhase2Clusters'), + destinations = cms.untracked.vstring('cout'), + cout = cms.untracked.PSet( + threshold = cms.untracked.string('ERROR') + ) +) + +# Analyzer +process.analysis = cms.EDAnalyzer('Phase2TrackerClusterizerValidation', + src = cms.InputTag("siPhase2Clusters"), + links = cms.InputTag("simSiPixelDigis") +) + +# Processes to run +process.p = cms.Path(process.analysis) + +from SLHCUpgradeSimulations.Configuration.phase2TkCustomsBE5DPixel10Ddev import customise_condOverRides +process = customise_condOverRides(process) + From 90cb9f69720a7bfc978da1ba99d50df41643e276 Mon Sep 17 00:00:00 2001 From: "jasper.lauwers" Date: Thu, 22 Oct 2015 15:40:52 +0200 Subject: [PATCH 121/250] Fix code and VBFHToInv cuts --- .../python/hltHiggsPostProcessors_cff.py | 26 +++---------------- .../Higgs/python/hltHiggsValidator_cfi.py | 2 -- .../Higgs/src/HLTHiggsSubAnalysis.cc | 24 +++++++++++++++++ 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/HLTriggerOffline/Higgs/python/hltHiggsPostProcessors_cff.py b/HLTriggerOffline/Higgs/python/hltHiggsPostProcessors_cff.py index eeb3bd0d41731..9ee05d288b3a7 100644 --- a/HLTriggerOffline/Higgs/python/hltHiggsPostProcessors_cff.py +++ b/HLTriggerOffline/Higgs/python/hltHiggsPostProcessors_cff.py @@ -160,6 +160,10 @@ def get_reco_strings(strings): hltHiggsPostHtaunu.subDirs = ['HLT/Higgs/Htaunu'] hltHiggsPostHtaunu.efficiencyProfile = efficiency_strings +hltHiggsPostVBFHToInv = hltHiggsPostProcessor.clone() +hltHiggsPostVBFHToInv.subDirs = ['HLT/Higgs/VBFHToInv'] +hltHiggsPostVBFHToInv.efficiencyProfile = efficiency_strings + efficiency_strings_TTHbbej = [] #add the summary plots @@ -341,28 +345,6 @@ def get_reco_strings(strings): hltHiggsPostMSSMHbb.subDirs = ['HLT/Higgs/MSSMHbb'] hltHiggsPostMSSMHbb.efficiencyProfile = efficiency_strings -#Specific plots for VBFHToInv -#Jet plots -NminOneCuts = _config.VBFHToInv.NminOneCuts -if NminOneCuts: - for iCut in range(0,len(NminOneCuts)): - if( NminOneCuts[iCut] and NminOneCutNames[iCut] ): - plot_types.append(NminOneCutNames[iCut]) - -efficiency_strings = [] -for type in plot_types: - for obj in obj_types: - for trig in triggers: - efficiency_strings.append(efficiency_string(obj,type,trig)) - -efficiency_strings = get_reco_strings(efficiency_strings) -efficiency_strings.extend(get_reco_strings(efficiency_summary_strings)) - -hltHiggsPostVBFHToInv = hltHiggsPostProcessor.clone() -hltHiggsPostVBFHToInv.subDirs = ['HLT/Higgs/VBFHToInv'] -hltHiggsPostVBFHToInv.efficiencyProfile = efficiency_strings - - hltHiggsPostProcessors = cms.Sequence( hltHiggsPostHWW+ hltHiggsPostHZZ+ diff --git a/HLTriggerOffline/Higgs/python/hltHiggsValidator_cfi.py b/HLTriggerOffline/Higgs/python/hltHiggsValidator_cfi.py index 0998c7d4437e9..2468e3a4e656c 100644 --- a/HLTriggerOffline/Higgs/python/hltHiggsValidator_cfi.py +++ b/HLTriggerOffline/Higgs/python/hltHiggsValidator_cfi.py @@ -422,8 +422,6 @@ ), recJetLabel = cms.string("ak4PFJetsCHS"), recPFMETLabel = cms.string("pfMet"), - jetTagLabel = cms.string("pfCombinedSecondaryVertexV2BJetTags"), # needed for NminOneCuts minCandidates = cms.uint32(2), - NminOneCuts = cms.untracked.vdouble(3.5, 600, 0, 0, 0 , 0, 0, 0, 80, 40, 40), #dEtaqq, mqq, dPhibb, CSV1, CSV2, CSV3, maxCSV_jets, maxCSV_E, MET, pt1, pt2, pt3, pt4 ), ) diff --git a/HLTriggerOffline/Higgs/src/HLTHiggsSubAnalysis.cc b/HLTriggerOffline/Higgs/src/HLTHiggsSubAnalysis.cc index c3adc40375692..4c8d3cc9dbf66 100644 --- a/HLTriggerOffline/Higgs/src/HLTHiggsSubAnalysis.cc +++ b/HLTriggerOffline/Higgs/src/HLTHiggsSubAnalysis.cc @@ -133,6 +133,30 @@ HLTHiggsSubAnalysis::HLTHiggsSubAnalysis(const edm::ParameterSet & pset, << (9 + _minCandidates) << "."; exit(-1); } + if( (_NminOneCuts[0] || _NminOneCuts[1]) && _minCandidates < 4 ) + { + edm::LogError("HiggsValidation") << "In HLTHiggsSubAnalysis::HLTHiggsSubAnalysis, " + << "Incoherence found in the python configuration file!!\nThe SubAnalysis '" + << _analysisname << "' has a vector NminOneCuts with a dEtaqq of mqq cut on the least b-tagged jets of the first 4 jets while only requiring " + << _minCandidates << " jets."; + exit(-1); + } + if( _NminOneCuts[5] && _minCandidates < 3 ) + { + edm::LogError("HiggsValidation") << "In HLTHiggsSubAnalysis::HLTHiggsSubAnalysis, " + << "Incoherence found in the python configuration file!!\nThe SubAnalysis '" + << _analysisname << "' has a vector NminOneCuts with a CSV3 cut while only requiring " + << _minCandidates << " jets."; + exit(-1); + } + if( (_NminOneCuts[2] || _NminOneCuts[4]) && _minCandidates < 2 ) + { + edm::LogError("HiggsValidation") << "In HLTHiggsSubAnalysis::HLTHiggsSubAnalysis, " + << "Incoherence found in the python configuration file!!\nThe SubAnalysis '" + << _analysisname << "' has a vector NminOneCuts with a dPhibb or CSV2 cut using the second most b-tagged jet while only requiring " + << _minCandidates << " jet."; + exit(-1); + } for(std::vector::const_iterator it = _NminOneCuts.begin(); it != _NminOneCuts.end(); ++it) { if( *it ) { From e4fff4044c6d6372b78ea88fab8fda80b176014a Mon Sep 17 00:00:00 2001 From: mmusich Date: Tue, 26 Jan 2016 16:35:22 +0100 Subject: [PATCH 122/250] Introducing new ES calibrations tags due to updated PF ES clustering --- Configuration/AlCa/python/autoCond.py | 30 +++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Configuration/AlCa/python/autoCond.py b/Configuration/AlCa/python/autoCond.py index c93d303d453b5..ced51c4675749 100644 --- a/Configuration/AlCa/python/autoCond.py +++ b/Configuration/AlCa/python/autoCond.py @@ -2,35 +2,35 @@ ### NEW KEYS ### # GlobalTag for MC production with perfectly aligned and calibrated detector for Run1 - 'run1_design' : '80X_mcRun1_design_v2', + 'run1_design' : '80X_mcRun1_design_v3', # GlobalTag for MC production (pp collisions) with realistic alignment and calibrations for Run1 - 'run1_mc' : '80X_mcRun1_realistic_v2', + 'run1_mc' : '80X_mcRun1_realistic_v3', # GlobalTag for MC production (Heavy Ions collisions) with realistic alignment and calibrations for Run1 - 'run1_mc_hi' : '80X_mcRun1_HeavyIon_v2', + 'run1_mc_hi' : '80X_mcRun1_HeavyIon_v3', # GlobalTag for MC production (p-Pb collisions) with realistic alignment and calibrations for Run1 - 'run1_mc_pa' : '80X_mcRun1_pA_v2', + 'run1_mc_pa' : '80X_mcRun1_pA_v3', # GlobalTag for MC production with perfectly aligned and calibrated detector for Run2 - 'run2_design' : '80X_mcRun2_design_v1', + 'run2_design' : '80X_mcRun2_design_v2', # GlobalTag for MC production with pessimistic alignment and calibrations for Run2 - 'run2_mc_50ns' : '80X_mcRun2_startup_v1', + 'run2_mc_50ns' : '80X_mcRun2_startup_v2', #GlobalTag for MC production with optimistic alignment and calibrations for Run2 - 'run2_mc' : '80X_mcRun2_asymptotic_v1', + 'run2_mc' : '80X_mcRun2_asymptotic_v2', # GlobalTag for MC production (cosmics) with starup-like alignment and calibrations for Run2, Strip tracker in peak mode - 'run2_mc_cosmics' : '80X_mcRun2cosmics_startup_peak_v0', + 'run2_mc_cosmics' : '80X_mcRun2cosmics_startup_peak_v1', # GlobalTag for MC production (Heavy Ions collisions) with optimistic alignment and calibrations for Run2 - 'run2_mc_hi' : '80X_mcRun2_HeavyIon_v1', + 'run2_mc_hi' : '80X_mcRun2_HeavyIon_v2', # GlobalTag for Run1 data reprocessing - 'run1_data' : '80X_dataRun2_v2', + 'run1_data' : '80X_dataRun2_v3', # GlobalTag for Run2 data reprocessing - 'run2_data' : '80X_dataRun2_v2', + 'run2_data' : '80X_dataRun2_v3', # GlobalTag for Run1 HLT: it points to the online GT - 'run1_hlt' : '80X_dataRun2_HLT_frozen_v1', + 'run1_hlt' : '80X_dataRun2_HLT_frozen_v2', # GlobalTag for Run2 HLT: it points to the online GT - 'run2_hlt' : '80X_dataRun2_HLT_frozen_v1', + 'run2_hlt' : '80X_dataRun2_HLT_frozen_v2', # GlobalTag for Run2 HLT for HI: it points to the online GT - 'run2_hlt_hi' : '80X_dataRun2_HLTHI_frozen_v1', + 'run2_hlt_hi' : '80X_dataRun2_HLTHI_frozen_v2', # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2017 - 'phase1_2017_design' : '80X_upgrade2017_design_v1', + 'phase1_2017_design' : '80X_upgrade2017_design_v2', # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2019 'phase1_2019_design' : 'DES19_70_V2', # placeholder (GT not meant for standard RelVal) # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase2 From 2fb4f766a30dc062a47d73a26228897627999d3c Mon Sep 17 00:00:00 2001 From: arabella Date: Mon, 11 Jan 2016 17:25:13 +0100 Subject: [PATCH 123/250] preshower planes calib conditions --- RecoEcal/EgammaClusterAlgos/BuildFile.xml | 2 + .../interface/PFECALSuperClusterAlgo.h | 3 ++ .../src/PFECALSuperClusterAlgo.cc | 45 +++++++++++++++- .../interface/PFEnergyCalibration.h | 8 +++ .../PFClusterTools/src/PFEnergyCalibration.cc | 30 +++++++++-- .../PFProducer/interface/PFEGammaAlgo.h | 14 +++++ .../PFProducer/plugins/PFEGammaProducer.cc | 25 +++++++-- .../PFProducer/src/PFEGammaAlgo.cc | 51 ++++++++++++++++++- 8 files changed, 168 insertions(+), 10 deletions(-) diff --git a/RecoEcal/EgammaClusterAlgos/BuildFile.xml b/RecoEcal/EgammaClusterAlgos/BuildFile.xml index 7ccf8de056b75..48e8d6de717da 100644 --- a/RecoEcal/EgammaClusterAlgos/BuildFile.xml +++ b/RecoEcal/EgammaClusterAlgos/BuildFile.xml @@ -3,6 +3,8 @@ + + diff --git a/RecoEcal/EgammaClusterAlgos/interface/PFECALSuperClusterAlgo.h b/RecoEcal/EgammaClusterAlgos/interface/PFECALSuperClusterAlgo.h index 06ba9bfa42296..9fa57e450894d 100644 --- a/RecoEcal/EgammaClusterAlgos/interface/PFECALSuperClusterAlgo.h +++ b/RecoEcal/EgammaClusterAlgos/interface/PFECALSuperClusterAlgo.h @@ -24,6 +24,8 @@ #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/Framework/interface/ConsumesCollector.h" +#include "CondFormats/ESObjects/interface/ESChannelStatus.h" + #include "TVector2.h" #include @@ -128,6 +130,7 @@ class PFECALSuperClusterAlgo { edm::EDGetTokenT inputTagBeamSpot_; const reco::BeamSpot *beamSpot_; + const ESChannelStatus* channelStatus_; CalibratedClusterPtrVector _clustersEB; CalibratedClusterPtrVector _clustersEE; diff --git a/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc b/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc index b4002f78224ec..30ce087c3a56c 100644 --- a/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc +++ b/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc @@ -2,8 +2,14 @@ #include "RecoParticleFlow/PFClusterTools/interface/PFClusterWidthAlgo.h" #include "RecoParticleFlow/PFClusterTools/interface/LinkByRecHit.h" #include "DataFormats/ParticleFlowReco/interface/PFLayer.h" +#include "DataFormats/ParticleFlowReco/interface/PFRecHit.h" +#include "DataFormats/EcalDetId/interface/ESDetId.h" #include "DataFormats/HcalDetId/interface/HcalDetId.h" #include "RecoEcal/EgammaCoreTools/interface/Mustache.h" +#include "CondFormats/DataRecord/interface/ESEEIntercalibConstantsRcd.h" +#include "CondFormats/DataRecord/interface/ESChannelStatusRcd.h" +#include "CondFormats/ESObjects/interface/ESEEIntercalibConstants.h" +#include "CondFormats/ESObjects/interface/ESChannelStatus.h" #include "Math/GenVector/VectorUtil.h" #include "TFile.h" #include "TH2F.h" @@ -197,6 +203,14 @@ void PFECALSuperClusterAlgo::update(const edm::EventSetup& setup) { regr_->update(setup); } + edm::ESHandle esEEInterCalibHandle_; + setup.get().get(esEEInterCalibHandle_); + _pfEnergyCalibration->initAlphaGamma_ESplanes_fromDB(esEEInterCalibHandle_.product()); + + edm::ESHandle esChannelStatusHandle_; + setup.get().get(esChannelStatusHandle_); + channelStatus_ = esChannelStatusHandle_.product(); + } @@ -357,12 +371,15 @@ buildSuperCluster(CalibClusterPtr& seed, corrSCEnergy(0), corrPS1Energy(0), corrPS2Energy(0), ePS1(0), ePS2(0), energyweight(0), energyweighttot(0); std::vector ps1_energies, ps2_energies; + int condP1(1), condP2(1); for( auto& clus : clustered ) { ePS1 = ePS2 = 0; energyweight = clus->energy_nocalib(); bare_ptrs.push_back(clus->the_ptr().get()); // update EE calibrated super cluster energies if( isEE ) { + ePS1 = ePS2 = 0; + condP1 = condP2 = 1; ps1_energies.clear(); ps2_energies.clear(); auto ee_key_val = @@ -373,23 +390,47 @@ buildSuperCluster(CalibClusterPtr& seed, sortByKey); for( auto i_ps = clustops.first; i_ps != clustops.second; ++i_ps) { edm::Ptr psclus(i_ps->second); + + const std::vector recH_Frac = psclus->recHitFractions(); + switch( psclus->layer() ) { case PFLayer::PS1: ps1_energies.push_back(psclus->energy()); + for(unsigned int iVec=0; iVecdetId(); + if(strip1 != ESDetId(0)){ + ESChannelStatusMap::const_iterator status_p1 = channelStatus_->getMap().find(strip1); + // getStatusCode() == 1 => dead channel + //apply correction if all recHits in dead region + if(status_p1->getStatusCode() == 0) condP1 = 0; //active + } + } break; case PFLayer::PS2: ps2_energies.push_back(psclus->energy()); + for(unsigned int iVec=0; iVecdetId(); + if(strip2 != ESDetId(0)) { + ESChannelStatusMap::const_iterator status_p2 = channelStatus_->getMap().find(strip2); + if(status_p2->getStatusCode() == 0) condP2 = 0; + } + } break; default: break; } - } + } + if(condP1 == 1) ePS1 = -1.; + if(condP2 == 1) ePS2 = -1.; _pfEnergyCalibration->energyEm(*(clus->the_ptr()), ps1_energies,ps2_energies, ePS1,ePS2, applyCrackCorrections_); } - + + if(ePS1 == -1.) ePS1 = 0; + if(ePS2 == -1.) ePS2 = 0; + switch( _eweight ) { case kRaw: // energyweight is initialized to raw cluster energy break; diff --git a/RecoParticleFlow/PFClusterTools/interface/PFEnergyCalibration.h b/RecoParticleFlow/PFClusterTools/interface/PFEnergyCalibration.h index e090d55924316..11f6ddaa6e417 100644 --- a/RecoParticleFlow/PFClusterTools/interface/PFEnergyCalibration.h +++ b/RecoParticleFlow/PFClusterTools/interface/PFEnergyCalibration.h @@ -4,6 +4,8 @@ #include "DataFormats/ParticleFlowReco/interface/PFCluster.h" #include "CondFormats/PhysicsToolsObjects/interface/PerformancePayloadFromTFormula.h" +#include "CondFormats/ESObjects/interface/ESEEIntercalibConstants.h" + class TF1; // -*- C++ -*- @@ -73,6 +75,11 @@ class PFEnergyCalibration pfCalibrations = thePFCal; } + void initAlphaGamma_ESplanes_fromDB(const ESEEIntercalibConstants* esEEInterCalib){ + esEEInterCalib_ = esEEInterCalib; + } + + friend std::ostream& operator<<(std::ostream& out, const PFEnergyCalibration& calib); @@ -80,6 +87,7 @@ class PFEnergyCalibration // Calibration functions from global tag const PerformancePayloadFromTFormula *pfCalibrations; + const ESEEIntercalibConstants* esEEInterCalib_; // Barrel calibration (eta 0.00 -> 1.48) TF1* faBarrel; diff --git a/RecoParticleFlow/PFClusterTools/src/PFEnergyCalibration.cc b/RecoParticleFlow/PFClusterTools/src/PFEnergyCalibration.cc index 5bea85ca1b864..16a46eb5ef731 100644 --- a/RecoParticleFlow/PFClusterTools/src/PFEnergyCalibration.cc +++ b/RecoParticleFlow/PFClusterTools/src/PFEnergyCalibration.cc @@ -1,5 +1,8 @@ #include "RecoParticleFlow/PFClusterTools/interface/PFEnergyCalibration.h" #include "CondFormats/PhysicsToolsObjects/interface/PerformancePayloadFromTFormula.h" + +#include "CondFormats/ESObjects/interface/ESEEIntercalibConstants.h" + #include #include #include @@ -9,7 +12,7 @@ using namespace std; -PFEnergyCalibration::PFEnergyCalibration() : pfCalibrations(0) +PFEnergyCalibration::PFEnergyCalibration() : pfCalibrations(0), esEEInterCalib_(0) { initializeCalibrationFunctions(); } @@ -801,8 +804,29 @@ PFEnergyCalibration::EcorrPS(double eEcal,double ePS1,double ePS2,double etaEcal // gives the good weights to each subdetector double gammaprime=Gamma(etaEcal)/9e-5; - outputPS1=gammaprime*ePS1; - outputPS2=gammaprime*Alpha(etaEcal)*ePS2; + + if(outputPS1 == 0 && outputPS2 == 0 && esEEInterCalib_ != 0){ + // std::cout << " >>> both working " << std::endl; + // scaling factor accounting for data-mc + outputPS1=gammaprime*ePS1 * esEEInterCalib_->getGammaLow0(); + outputPS2=gammaprime*Alpha(etaEcal)*ePS2 * esEEInterCalib_->getGammaLow3(); + } + else if(outputPS1 == 0 && outputPS2 == -1 && esEEInterCalib_ != 0){ + // std::cout << " >>> P1 working " << std::endl; + outputPS1 = gammaprime*ePS1 * esEEInterCalib_->getGammaLow0() * esEEInterCalib_->getGammaLow1(); + outputPS2 = gammaprime*Alpha(etaEcal)*ePS2 * esEEInterCalib_->getGammaLow3() * esEEInterCalib_->getGammaLow1(); + } + else if(outputPS1 == -1 && outputPS2 == 0 && esEEInterCalib_ != 0){ + // std::cout << " >>> P2 working " << std::endl; + outputPS1 = gammaprime*ePS1 * esEEInterCalib_->getGammaLow0() * esEEInterCalib_->getGammaLow2(); + outputPS2 = gammaprime*Alpha(etaEcal)*ePS2 * esEEInterCalib_->getGammaLow3() * esEEInterCalib_->getGammaLow2(); + } + else{ + // std::cout << " >>> none working " << std::endl; + outputPS1 = gammaprime*ePS1; + outputPS2 = gammaprime*Alpha(etaEcal)*ePS2; + } + double E = Beta(1.0155*eEcal+0.025*(ePS1+0.5976*ePS2)/9e-5,etaEcal)*eEcal+outputPS1+outputPS2; //Correction of the residual energy dependency diff --git a/RecoParticleFlow/PFProducer/interface/PFEGammaAlgo.h b/RecoParticleFlow/PFProducer/interface/PFEGammaAlgo.h index 9555a6de46e06..9ab638fa00490 100644 --- a/RecoParticleFlow/PFProducer/interface/PFEGammaAlgo.h +++ b/RecoParticleFlow/PFProducer/interface/PFEGammaAlgo.h @@ -37,6 +37,10 @@ #include "DataFormats/ParticleFlowCandidate/interface/PFCandidateEGammaExtra.h" #include "DataFormats/EgammaReco/interface/ElectronSeed.h" #include "CondFormats/EgammaObjects/interface/GBRForest.h" + +#include "CondFormats/ESObjects/interface/ESEEIntercalibConstants.h" +#include "CondFormats/ESObjects/interface/ESChannelStatus.h" + #include "TMVA/Reader.h" #include #include @@ -46,6 +50,7 @@ #include #include "RecoParticleFlow/PFProducer/interface/PFEGammaHeavyObjectCache.h" +#include "RecoParticleFlow/PFClusterTools/interface/PFEnergyCalibration.h" class PFSCEnergyCalibration; class PFEnergyCalibration; @@ -137,6 +142,14 @@ class PFEGammaAlgo { eetops_ = eetops; } + void setAlphaGamma_ESplanes_fromDB(const ESEEIntercalibConstants* esEEInterCalib){ + cfg_.thePFEnergyCalibration->initAlphaGamma_ESplanes_fromDB(esEEInterCalib); + } + + void setESChannelStatus(const ESChannelStatus* channelStatus){ + channelStatus_ = channelStatus; + } + void setnPU(int nVtx){ nVtx_=nVtx; } @@ -380,6 +393,7 @@ class PFEGammaAlgo { float x0inner_, x0middle_, x0outer_; //for PileUP float excluded_, Mustache_EtRatio_, Mustache_Et_out_; + const ESChannelStatus* channelStatus_; std::vector AddFromElectron_; diff --git a/RecoParticleFlow/PFProducer/plugins/PFEGammaProducer.cc b/RecoParticleFlow/PFProducer/plugins/PFEGammaProducer.cc index bdcf4a1f1e0ec..e8216b4fd33d2 100644 --- a/RecoParticleFlow/PFProducer/plugins/PFEGammaProducer.cc +++ b/RecoParticleFlow/PFProducer/plugins/PFEGammaProducer.cc @@ -17,6 +17,11 @@ #include "DataFormats/ParticleFlowReco/interface/PFBlockElementSuperClusterFwd.h" #include "DataFormats/ParticleFlowReco/interface/PFBlockElementSuperCluster.h" +#include "CondFormats/DataRecord/interface/ESEEIntercalibConstantsRcd.h" +#include "CondFormats/DataRecord/interface/ESChannelStatusRcd.h" +#include "CondFormats/ESObjects/interface/ESEEIntercalibConstants.h" +#include "CondFormats/ESObjects/interface/ESChannelStatus.h" + #include "DataFormats/Common/interface/RefToPtr.h" #include @@ -74,9 +79,11 @@ PFEGammaProducer::PFEGammaProducer(const edm::ParameterSet& iConfig, calibPFSCEle_Fbrem_endcap = iConfig.getParameter >("calibPFSCEle_Fbrem_endcap"); calibPFSCEle_barrel = iConfig.getParameter >("calibPFSCEle_barrel"); calibPFSCEle_endcap = iConfig.getParameter >("calibPFSCEle_endcap"); - std::shared_ptr - thePFSCEnergyCalibration ( new PFSCEnergyCalibration(calibPFSCEle_Fbrem_barrel,calibPFSCEle_Fbrem_endcap, - calibPFSCEle_barrel,calibPFSCEle_endcap )); + // std::shared_ptr + // thePFSCEnergyCalibration ( new PFSCEnergyCalibration(calibPFSCEle_Fbrem_barrel,calibPFSCEle_Fbrem_endcap, + // calibPFSCEle_barrel,calibPFSCEle_endcap )); + algo_config.thePFSCEnergyCalibration.reset( new PFSCEnergyCalibration( calibPFSCEle_Fbrem_barrel,calibPFSCEle_Fbrem_endcap, + calibPFSCEle_barrel,calibPFSCEle_endcap ) ); algo_config.useEGammaSupercluster = iConfig.getParameter("useEGammaSupercluster"); @@ -164,7 +171,8 @@ PFEGammaProducer::PFEGammaProducer(const edm::ParameterSet& iConfig, useCalibrationsFromDB_ = iConfig.getParameter("useCalibrationsFromDB"); - std::shared_ptr calibration(new PFEnergyCalibration()); + // std::shared_ptr calibration(new PFEnergyCalibration()); + algo_config.thePFEnergyCalibration.reset(new PFEnergyCalibration()); int algoType = iConfig.getParameter("algoType"); @@ -253,6 +261,15 @@ PFEGammaProducer::produce(edm::Event& iEvent, iEvent.getByToken(eetopsSrc_,eetops); pfeg_->setEEtoPSAssociation(eetops); + // preshower conditions + edm::ESHandle esEEInterCalibHandle_; + iSetup.get().get(esEEInterCalibHandle_); + pfeg_->setAlphaGamma_ESplanes_fromDB(esEEInterCalibHandle_.product()); + + edm::ESHandle esChannelStatusHandle_; + iSetup.get().get(esChannelStatusHandle_); + pfeg_->setESChannelStatus(esChannelStatusHandle_.product()); + // Get The vertices from the event // and assign dynamic vertex parameters edm::Handle vertices; diff --git a/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc b/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc index f9934ba82454a..45a2ff146a7a5 100644 --- a/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc +++ b/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc @@ -5,9 +5,11 @@ #include "DataFormats/ParticleFlowReco/interface/PFCluster.h" #include "DataFormats/ParticleFlowReco/interface/PFClusterFwd.h" #include "RecoParticleFlow/PFClusterTools/interface/ClusterClusterMapping.h" +#include "DataFormats/ParticleFlowReco/interface/PFLayer.h" #include "DataFormats/ParticleFlowReco/interface/PFRecHit.h" #include "DataFormats/EcalDetId/interface/EBDetId.h" #include "DataFormats/EcalDetId/interface/EEDetId.h" +#include "DataFormats/EcalDetId/interface/ESDetId.h" #include "DataFormats/EgammaCandidates/interface/Photon.h" #include "RecoParticleFlow/PFClusterTools/interface/PFEnergyCalibration.h" #include "RecoParticleFlow/PFClusterTools/interface/PFPhotonClusters.h" @@ -21,6 +23,9 @@ #include "RecoEcal/EgammaCoreTools/interface/Mustache.h" #include "DataFormats/Math/interface/deltaPhi.h" #include "DataFormats/Math/interface/deltaR.h" + +#include "CondFormats/ESObjects/interface/ESChannelStatus.h" + #include #include #include @@ -707,7 +712,8 @@ PFEGammaAlgo(const PFEGammaAlgo::PFEGConfigInfo& cfg) : TotPS1_(0.0), TotPS2_(0.0), nVtx_(0.0), x0inner_(0.0), x0middle_(0.0), x0outer_(0.0), - excluded_(0.0), Mustache_EtRatio_(0.0), Mustache_Et_out_(0.0) + excluded_(0.0), Mustache_EtRatio_(0.0), Mustache_Et_out_(0.0), + channelStatus_(0) { //Material Map TFile *XO_File = new TFile(cfg_.X0_Map.c_str(),"READ"); @@ -2246,6 +2252,7 @@ buildRefinedSuperCluster(const PFEGammaAlgo::ProtoEGObject& RO) { rawSCEnergy(0), corrSCEnergy(0), corrPSEnergy(0), PS1_clus_sum(0), PS2_clus_sum(0), ePS1(0), ePS2(0), ps1_energy(0.0), ps2_energy(0.0); + int condP1(1), condP2(1); for( auto& clus : RO.ecalclusters ) { ePS1 = 0; ePS2 = 0; @@ -2262,17 +2269,59 @@ buildRefinedSuperCluster(const PFEGammaAlgo::ProtoEGObject& RO) { posZ += cluseraw * cluspos.Z(); // update EE calibrated super cluster energies if( isEE ) { + ePS1 = 0; + ePS2 = 0; + condP1 = condP2 = 1; const auto& psclusters = RO.ecal2ps.at(clus.first); + + for( auto i_ps = psclusters.begin(); i_ps != psclusters.end(); ++i_ps) { + const PFClusterRef& psclus = i_ps->first->clusterRef(); + + const std::vector recH_Frac = psclus->recHitFractions(); + + switch( psclus->layer() ) { + case PFLayer::PS1: + for(unsigned int iVec=0; iVecdetId(); + if(strip1 != ESDetId(0)){ + ESChannelStatusMap::const_iterator status_p1 = channelStatus_->getMap().find(strip1); + //getStatusCode() == 0 => active channel + // apply correction if all recHits are dead + if(status_p1->getStatusCode() == 0) condP1 = 0; + } + } + break; + case PFLayer::PS2: + // ps2_energies.push_back(psclus->energy()); + for(unsigned int iVec=0; iVecdetId(); + if(strip2 != ESDetId(0)) { + ESChannelStatusMap::const_iterator status_p2 = channelStatus_->getMap().find(strip2); + if(status_p2->getStatusCode() == 0) condP2 = 0; + } + } + break; + default: + break; + } + } + PS1_clus_sum = std::accumulate(psclusters.begin(),psclusters.end(), 0.0,sumps1); PS2_clus_sum = std::accumulate(psclusters.begin(),psclusters.end(), 0.0,sumps2); + + if(condP1 == 1) ePS1 = -1.; + if(condP2 == 1) ePS2 = -1.; + cluscalibe = cfg_.thePFEnergyCalibration->energyEm(*clusptr, PS1_clus_sum,PS2_clus_sum, ePS1, ePS2, cfg_.applyCrackCorrections); } + if(ePS1 == -1.) ePS1 = 0; + if(ePS2 == -1.) ePS2 = 0; rawSCEnergy += cluseraw; corrSCEnergy += cluscalibe; From a4be96bdbc057a22f57b062085bbe7e7b4499495 Mon Sep 17 00:00:00 2001 From: arabella Date: Wed, 13 Jan 2016 18:19:24 +0100 Subject: [PATCH 124/250] preshower planes calib conditions --- .../EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc b/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc index 30ce087c3a56c..fd95e33540c99 100644 --- a/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc +++ b/RecoEcal/EgammaClusterAlgos/src/PFECALSuperClusterAlgo.cc @@ -391,13 +391,13 @@ buildSuperCluster(CalibClusterPtr& seed, for( auto i_ps = clustops.first; i_ps != clustops.second; ++i_ps) { edm::Ptr psclus(i_ps->second); - const std::vector recH_Frac = psclus->recHitFractions(); + auto const& recH_Frac = psclus->recHitFractions(); switch( psclus->layer() ) { case PFLayer::PS1: ps1_energies.push_back(psclus->energy()); - for(unsigned int iVec=0; iVecdetId(); + for (auto const& recH : recH_Frac){ + ESDetId strip1 = recH.recHitRef()->detId(); if(strip1 != ESDetId(0)){ ESChannelStatusMap::const_iterator status_p1 = channelStatus_->getMap().find(strip1); // getStatusCode() == 1 => dead channel @@ -408,8 +408,8 @@ buildSuperCluster(CalibClusterPtr& seed, break; case PFLayer::PS2: ps2_energies.push_back(psclus->energy()); - for(unsigned int iVec=0; iVecdetId(); + for (auto const& recH : recH_Frac){ + ESDetId strip2 = recH.recHitRef()->detId(); if(strip2 != ESDetId(0)) { ESChannelStatusMap::const_iterator status_p2 = channelStatus_->getMap().find(strip2); if(status_p2->getStatusCode() == 0) condP2 = 0; From 6ea2381732f133b452ae085e2cfb9b00df5bdb41 Mon Sep 17 00:00:00 2001 From: arabella Date: Wed, 13 Jan 2016 18:19:52 +0100 Subject: [PATCH 125/250] preshower planes calib conditions --- .../PFClusterTools/src/PFEnergyCalibration.cc | 10 +++++----- .../PFProducer/plugins/PFEGammaProducer.cc | 4 ---- RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc | 13 ++++++------- 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/RecoParticleFlow/PFClusterTools/src/PFEnergyCalibration.cc b/RecoParticleFlow/PFClusterTools/src/PFEnergyCalibration.cc index 16a46eb5ef731..f49c43691c7ad 100644 --- a/RecoParticleFlow/PFClusterTools/src/PFEnergyCalibration.cc +++ b/RecoParticleFlow/PFClusterTools/src/PFEnergyCalibration.cc @@ -806,23 +806,23 @@ PFEnergyCalibration::EcorrPS(double eEcal,double ePS1,double ePS2,double etaEcal double gammaprime=Gamma(etaEcal)/9e-5; if(outputPS1 == 0 && outputPS2 == 0 && esEEInterCalib_ != 0){ - // std::cout << " >>> both working " << std::endl; - // scaling factor accounting for data-mc + // both ES planes working + // scaling factor accounting for data-mc outputPS1=gammaprime*ePS1 * esEEInterCalib_->getGammaLow0(); outputPS2=gammaprime*Alpha(etaEcal)*ePS2 * esEEInterCalib_->getGammaLow3(); } else if(outputPS1 == 0 && outputPS2 == -1 && esEEInterCalib_ != 0){ - // std::cout << " >>> P1 working " << std::endl; + // ESP1 only working outputPS1 = gammaprime*ePS1 * esEEInterCalib_->getGammaLow0() * esEEInterCalib_->getGammaLow1(); outputPS2 = gammaprime*Alpha(etaEcal)*ePS2 * esEEInterCalib_->getGammaLow3() * esEEInterCalib_->getGammaLow1(); } else if(outputPS1 == -1 && outputPS2 == 0 && esEEInterCalib_ != 0){ - // std::cout << " >>> P2 working " << std::endl; + // ESP2 only working outputPS1 = gammaprime*ePS1 * esEEInterCalib_->getGammaLow0() * esEEInterCalib_->getGammaLow2(); outputPS2 = gammaprime*Alpha(etaEcal)*ePS2 * esEEInterCalib_->getGammaLow3() * esEEInterCalib_->getGammaLow2(); } else{ - // std::cout << " >>> none working " << std::endl; + // none working outputPS1 = gammaprime*ePS1; outputPS2 = gammaprime*Alpha(etaEcal)*ePS2; } diff --git a/RecoParticleFlow/PFProducer/plugins/PFEGammaProducer.cc b/RecoParticleFlow/PFProducer/plugins/PFEGammaProducer.cc index e8216b4fd33d2..9adcd676ddbca 100644 --- a/RecoParticleFlow/PFProducer/plugins/PFEGammaProducer.cc +++ b/RecoParticleFlow/PFProducer/plugins/PFEGammaProducer.cc @@ -79,9 +79,6 @@ PFEGammaProducer::PFEGammaProducer(const edm::ParameterSet& iConfig, calibPFSCEle_Fbrem_endcap = iConfig.getParameter >("calibPFSCEle_Fbrem_endcap"); calibPFSCEle_barrel = iConfig.getParameter >("calibPFSCEle_barrel"); calibPFSCEle_endcap = iConfig.getParameter >("calibPFSCEle_endcap"); - // std::shared_ptr - // thePFSCEnergyCalibration ( new PFSCEnergyCalibration(calibPFSCEle_Fbrem_barrel,calibPFSCEle_Fbrem_endcap, - // calibPFSCEle_barrel,calibPFSCEle_endcap )); algo_config.thePFSCEnergyCalibration.reset( new PFSCEnergyCalibration( calibPFSCEle_Fbrem_barrel,calibPFSCEle_Fbrem_endcap, calibPFSCEle_barrel,calibPFSCEle_endcap ) ); @@ -171,7 +168,6 @@ PFEGammaProducer::PFEGammaProducer(const edm::ParameterSet& iConfig, useCalibrationsFromDB_ = iConfig.getParameter("useCalibrationsFromDB"); - // std::shared_ptr calibration(new PFEnergyCalibration()); algo_config.thePFEnergyCalibration.reset(new PFEnergyCalibration()); int algoType diff --git a/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc b/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc index 45a2ff146a7a5..880374bdd0c3c 100644 --- a/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc +++ b/RecoParticleFlow/PFProducer/src/PFEGammaAlgo.cc @@ -2277,12 +2277,12 @@ buildRefinedSuperCluster(const PFEGammaAlgo::ProtoEGObject& RO) { for( auto i_ps = psclusters.begin(); i_ps != psclusters.end(); ++i_ps) { const PFClusterRef& psclus = i_ps->first->clusterRef(); - const std::vector recH_Frac = psclus->recHitFractions(); - + auto const& recH_Frac = psclus->recHitFractions(); + switch( psclus->layer() ) { case PFLayer::PS1: - for(unsigned int iVec=0; iVecdetId(); + for (auto const& recH : recH_Frac){ + ESDetId strip1 = recH.recHitRef()->detId(); if(strip1 != ESDetId(0)){ ESChannelStatusMap::const_iterator status_p1 = channelStatus_->getMap().find(strip1); //getStatusCode() == 0 => active channel @@ -2292,9 +2292,8 @@ buildRefinedSuperCluster(const PFEGammaAlgo::ProtoEGObject& RO) { } break; case PFLayer::PS2: - // ps2_energies.push_back(psclus->energy()); - for(unsigned int iVec=0; iVecdetId(); + for (auto const& recH : recH_Frac){ + ESDetId strip2 = recH.recHitRef()->detId(); if(strip2 != ESDetId(0)) { ESChannelStatusMap::const_iterator status_p2 = channelStatus_->getMap().find(strip2); if(status_p2->getStatusCode() == 0) condP2 = 0; From eeb27202cf6c9a430cce8d88208511006022767a Mon Sep 17 00:00:00 2001 From: arabella Date: Sat, 23 Jan 2016 17:32:32 +0100 Subject: [PATCH 126/250] ES planes conditions for old reco --- .../src/PreshowerClusterProducer.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RecoEcal/EgammaClusterProducers/src/PreshowerClusterProducer.cc b/RecoEcal/EgammaClusterProducers/src/PreshowerClusterProducer.cc index f4567366560f7..c87c0e6e87afa 100644 --- a/RecoEcal/EgammaClusterProducers/src/PreshowerClusterProducer.cc +++ b/RecoEcal/EgammaClusterProducers/src/PreshowerClusterProducer.cc @@ -281,19 +281,19 @@ void PreshowerClusterProducer::set(const edm::EventSetup& es) { const ESEEIntercalibConstants *esEEInterCalib = esEEInterCalib_.product(); // both planes work - gamma0_ = (ESGain == 1) ? esEEInterCalib->getGammaLow0() : esEEInterCalib->getGammaHigh0(); + gamma0_ = (ESGain == 1) ? 0.02 : esEEInterCalib->getGammaHigh0(); alpha0_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow0() : esEEInterCalib->getAlphaHigh0(); // only first plane works - gamma1_ = (ESGain == 1) ? esEEInterCalib->getGammaLow1() : esEEInterCalib->getGammaHigh1(); + gamma1_ = (ESGain == 1) ? (0.02 * esEEInterCalib->getGammaLow1()) : esEEInterCalib->getGammaHigh1(); alpha1_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow1() : esEEInterCalib->getAlphaHigh1(); // only second plane works - gamma2_ = (ESGain == 1) ? esEEInterCalib->getGammaLow2() : esEEInterCalib->getGammaHigh2(); + gamma2_ = (ESGain == 1) ? (0.02 * esEEInterCalib->getGammaLow2()) : esEEInterCalib->getGammaHigh2(); alpha2_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow2() : esEEInterCalib->getAlphaHigh2(); // both planes do not work - gamma3_ = (ESGain == 1) ? esEEInterCalib->getGammaLow3() : esEEInterCalib->getGammaHigh3(); + gamma3_ = (ESGain == 1) ? 0.02 : esEEInterCalib->getGammaHigh3(); alpha3_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow3() : esEEInterCalib->getAlphaHigh3(); es.get().get(esMissingECalib_); From e597082311b5bdb4a82c7e25224a9b1206e6255a Mon Sep 17 00:00:00 2001 From: arabella Date: Sat, 23 Jan 2016 17:32:38 +0100 Subject: [PATCH 127/250] ES planes conditions for old reco --- .../src/PreshowerPhiClusterProducer.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RecoEcal/EgammaClusterProducers/src/PreshowerPhiClusterProducer.cc b/RecoEcal/EgammaClusterProducers/src/PreshowerPhiClusterProducer.cc index 0700a4a928b81..89387f1c0c958 100644 --- a/RecoEcal/EgammaClusterProducers/src/PreshowerPhiClusterProducer.cc +++ b/RecoEcal/EgammaClusterProducers/src/PreshowerPhiClusterProducer.cc @@ -295,19 +295,19 @@ void PreshowerPhiClusterProducer::set(const edm::EventSetup& es) { const ESEEIntercalibConstants *esEEInterCalib = esEEInterCalib_.product(); // both planes work - gamma0_ = (ESGain == 1) ? esEEInterCalib->getGammaLow0() : esEEInterCalib->getGammaHigh0(); + gamma0_ = (ESGain == 1) ? 0.02 : esEEInterCalib->getGammaHigh0(); alpha0_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow0() : esEEInterCalib->getAlphaHigh0(); // only first plane works - gamma1_ = (ESGain == 1) ? esEEInterCalib->getGammaLow1() : esEEInterCalib->getGammaHigh1(); + gamma1_ = (ESGain == 1) ? (0.02 * esEEInterCalib->getGammaLow1()) : esEEInterCalib->getGammaHigh1(); alpha1_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow1() : esEEInterCalib->getAlphaHigh1(); // only second plane works - gamma2_ = (ESGain == 1) ? esEEInterCalib->getGammaLow2() : esEEInterCalib->getGammaHigh2(); + gamma2_ = (ESGain == 1) ? (0.02 * esEEInterCalib->getGammaLow2()) : esEEInterCalib->getGammaHigh2(); alpha2_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow2() : esEEInterCalib->getAlphaHigh2(); // both planes do not work - gamma3_ = (ESGain == 1) ? esEEInterCalib->getGammaLow3() : esEEInterCalib->getGammaHigh3(); + gamma3_ = (ESGain == 1) ? 0.02 : esEEInterCalib->getGammaHigh3(); alpha3_ = (ESGain == 1) ? esEEInterCalib->getAlphaLow3() : esEEInterCalib->getAlphaHigh3(); es.get().get(esMissingECalib_); From 455821a407dde652d09133adf2fd3c572a08aeb5 Mon Sep 17 00:00:00 2001 From: Seth Date: Tue, 26 Jan 2016 18:28:09 +0100 Subject: [PATCH 128/250] Changed names of the new training .xml files for 80X --- RecoBTag/CTagging/python/charmTaggerProducer_cfi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoBTag/CTagging/python/charmTaggerProducer_cfi.py b/RecoBTag/CTagging/python/charmTaggerProducer_cfi.py index 4a1330952796a..17813a9ceec78 100644 --- a/RecoBTag/CTagging/python/charmTaggerProducer_cfi.py +++ b/RecoBTag/CTagging/python/charmTaggerProducer_cfi.py @@ -9,7 +9,7 @@ slComputerCfg = cms.PSet( **sl_cfg.candidateCombinedSecondaryVertexSoftLeptonComputer.parameters_() ), - weightFile = cms.FileInPath('RecoBTag/CTagging/data/c_vs_udsg.weight.xml'), + weightFile = cms.FileInPath('RecoBTag/CTagging/data/c_vs_udsg_sklearn.weight.xml'), variables = c_vs_l_vars_vpset, computer = cms.ESInputTag('combinedSecondaryVertexSoftLeptonComputer'), tagInfos = cms.VInputTag( @@ -26,7 +26,7 @@ ) charmTagsComputerCvsB = charmTagsComputerCvsL.clone( - weightFile = cms.FileInPath('RecoBTag/CTagging/data/c_vs_b.weight.xml'), + weightFile = cms.FileInPath('RecoBTag/CTagging/data/c_vs_b_sklearn.weight.xml'), variables = c_vs_b_vars_vpset ) From aa0a0b769c1b05c2bfd85a31020bd0762217140c Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Tue, 26 Jan 2016 14:57:00 -0600 Subject: [PATCH 129/250] Allow FileSystem queries to occur from callback threads. To query a filesystem property, a free callback thread is needed with the default synchronous versions of XrdCl::FileSystem methods. Thus, if the synchronous method is called from a *callback thread*, then there must be an idle thread to handle the response; if there are N threads in the pool and N simultaneous queries, then the filesystem query would cause a deadlock. Worse yet, the timeout mechanism for XrdCl relies on an idle callback thread to function. As making the synchronous query asynchronous in its currrent use case is quite hard, I only partially solved the problem: wrote a new response handler that can timeout without an idle thread. --- Utilities/XrdAdaptor/src/XrdSource.cc | 111 +++++++++++++++++++++++++- 1 file changed, 107 insertions(+), 4 deletions(-) diff --git a/Utilities/XrdAdaptor/src/XrdSource.cc b/Utilities/XrdAdaptor/src/XrdSource.cc index f807918b3f374..02c4d3b9b0fb0 100644 --- a/Utilities/XrdAdaptor/src/XrdSource.cc +++ b/Utilities/XrdAdaptor/src/XrdSource.cc @@ -76,6 +76,110 @@ class DelayedClose : boost::noncopyable, public XrdCl::ResponseHandler std::string m_site; }; + +/** + * A handler for querying a XrdCl::FileSystem object which is safe to be + * invoked from an XrdCl callback (that is, we don't need an available callback + * thread to timeout). + */ +class QueryAttrHandler : boost::noncopyable, public XrdCl::ResponseHandler +{ +public: + + virtual ~QueryAttrHandler() {} + + + static XrdCl::XRootDStatus query(XrdCl::FileSystem &fs, const std::string &attr, std::chrono::milliseconds timeout, std::string &result) + { + std::shared_ptr handler(new QueryAttrHandler()); + XrdCl::Buffer arg(attr.size()); + arg.FromString(attr); + + // On error or exception thrown, drop the reference to ourself + std::unique_ptr> self_ref_guard(nullptr, [&](QueryAttrHandler*) {handler->m_self.reset();}); + handler->m_self = handler; + + XrdCl::XRootDStatus st = fs.Query(XrdCl::QueryCode::Config, arg, handler.get()); + if (!st.IsOK()) + { + return st; + } + + // Successfully registered the callback; keep the self-reference until the + // callback release it. + self_ref_guard.release(); + + std::unique_lock guard(handler->m_mutex); + // Wait until some status is available or a timeout. + handler->m_condvar.wait_for(guard, timeout, [&]{return handler->m_status.get();}); + + if (handler->m_status) + { + if (handler->m_status->IsOK()) + { + result = handler->m_response->ToString(); + } + return *(handler->m_status); + } + else + { // We had a timeout; construct a reasonable message. + return XrdCl::XRootDStatus(XrdCl::stError, XrdCl::errSocketTimeout, 1, "Timeout when waiting for query callback."); + } + } + + +private: + + QueryAttrHandler() {} + + + virtual void HandleResponse(XrdCl::XRootDStatus *status, XrdCl::AnyObject *response ) override + { + // NOTE: we own the status and response pointers. + std::unique_ptr response_mgr; + response_mgr.reset(response); + // On exit from this function, release the self-reference. Order matters! m_self reset must be done after + // condvar is notified. + std::unique_ptr> self_ref_guard(nullptr, [&](char *) {m_self.reset();}); + // On function exit, notify any waiting threads. + std::unique_ptr> notify_guard(nullptr, [&](char *) {m_condvar.notify_all();}); + + { + // m_mutex protects m_status + std::unique_lock guard(m_mutex); + // On exit from the block, make sure m_status is set; it needs to be set before we notify threads. + std::unique_ptr> exit_guard(nullptr, [&](char *) {m_status.reset(new XrdCl::XRootDStatus(XrdCl::stError, XrdCl::errInternal));}); + if (!status) {return;} + m_status.reset(status); + if (status->IsOK()) + { + if (!response) {return;} + XrdCl::Buffer *buf_ptr; + response->Get(buf_ptr); + // AnyObject::Set lacks specialization for nullptr + response->Set(static_cast(nullptr)); + m_response.reset(buf_ptr); + } + exit_guard.release(); + } + } + + + // Self-reference; if we timed out waiting for the callback, we must keep the memory alive until + // the Xrootd framework invokes the callback. + std::shared_ptr m_self; + + // Synchronize between the callback thread and the main thread; condvar predicate + // is having m_status set. m_mutex protects m_status. + std::mutex m_mutex; + std::condition_variable m_condvar; + + // Results from the server + std::unique_ptr m_status; + std::unique_ptr m_response; +}; + + Source::Source(timespec now, std::unique_ptr fh, const std::string &exclude) : m_lastDowngrade({0, 0}), m_id("(unknown)"), @@ -238,7 +342,8 @@ Source::getXrootdSiteFromURL(std::string url, std::string &site) arg.FromString( attr ); XrdCl::FileSystem fs(url); - XrdCl::XRootDStatus st = fs.Query(XrdCl::QueryCode::Config, arg, response); + std::string rsite; + XrdCl::XRootDStatus st = QueryAttrHandler::query(fs, "sitename", std::chrono::seconds(1), rsite); if (!st.IsOK()) { XrdCl::URL xurl(url); @@ -246,9 +351,7 @@ Source::getXrootdSiteFromURL(std::string url, std::string &site) delete response; return false; } - std::string rsite = response->ToString(); - delete response; - if (rsite.size() && (rsite[rsite.size()-1] == '\n')) + if (!rsite.empty() && (rsite[rsite.size()-1] == '\n')) { rsite = rsite.substr(0, rsite.size()-1); } From 430c664e8482d69b8dc4d9de7490fc7e5e42b5e2 Mon Sep 17 00:00:00 2001 From: esmaeel Date: Wed, 27 Jan 2016 00:16:14 +0100 Subject: [PATCH 130/250] mGMT_v4_BMTF_v2_rebin --- ...=> l1tstage2_dqm_sourceclient-live_cfg.py} | 58 +++----------- .../python/config/environment_cfi.py | 2 +- DQM/L1TMonitor/interface/L1TStage2mGMT.h | 75 +++++++++++++------ DQM/L1TMonitor/python/L1TStage2_cff.py | 3 - DQM/L1TMonitor/src/L1TStage2BMTF.cc | 20 ++--- DQM/L1TMonitor/src/L1TStage2mGMT.cc | 33 ++++---- DQM/L1TMonitor/src/SealModule.cc | 11 ++- 7 files changed, 98 insertions(+), 104 deletions(-) rename DQM/Integration/python/clients/{l1t2016_dqm_sourceclient-live_cfg.py => l1tstage2_dqm_sourceclient-live_cfg.py} (93%) diff --git a/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg.py b/DQM/Integration/python/clients/l1tstage2_dqm_sourceclient-live_cfg.py similarity index 93% rename from DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg.py rename to DQM/Integration/python/clients/l1tstage2_dqm_sourceclient-live_cfg.py index d56f06601af0b..ad39fd9e8679a 100644 --- a/DQM/Integration/python/clients/l1t2016_dqm_sourceclient-live_cfg.py +++ b/DQM/Integration/python/clients/l1tstage2_dqm_sourceclient-live_cfg.py @@ -2,7 +2,7 @@ # # authors previous versions - see CVS # -# V.M. Ghete 2011-05-25 revised version of L1 Trigger DQM +# Esmaeel Eskandari Tadavani revised version of L1 Trigger DQM import FWCore.ParameterSet.Config as cms @@ -24,7 +24,7 @@ process.load("DQM.Integration.config.environment_cfi") process.dqmEnv.subSystemFolder = 'L1T2016' -#process.dqmSaver.tag = 'L1T2016' +process.dqmSaver.tag = 'L1T2016' # # # references needed @@ -34,14 +34,13 @@ #process.load("DQM.Integration.config.FrontierCondition_GT_cfi") #es_prefer_GlobalTag = cms.ESPrefer('GlobalTag') #process.GlobalTag.RefreshEachRun = cms.untracked.bool(True) + # Condition for lxplus #process.load("DQM.Integration.config.FrontierCondition_GT_Offline_cfi") - process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff') from Configuration.AlCa.GlobalTag_condDBv2 import GlobalTag process.GlobalTag.globaltag = cms.string('74X_dataRun2_HLT_v1') -#process.load("Configuration.StandardSequences.GeometryRecoDB_cff") process.load("Configuration.StandardSequences.GeometryRecoDB_cff") #------------------------------------- @@ -55,10 +54,7 @@ # l1tMonitor and l1tMonitorEndPathSeq -#///////////// process.load("DQM.L1TMonitor.L1TStage2_cff") -#process.load("DQM.L1TMonitor.L1T2016_cff") -#///////////// #process.load("DQM.L1TMonitor.L1TMonitor_cff") # L1 trigger synchronization module - it uses also HltHighLevel filter @@ -66,12 +62,10 @@ #------------------------------------- # paths & schedule for L1 Trigger DQM -# - # TODO define a L1 trigger L1TriggerRawToDigi in the standard sequence # to avoid all these remove + #process.rawToDigiPath = cms.Path(process.RawToDigi) -# #process.RawToDigi.remove("siPixelDigis") #process.RawToDigi.remove("siStripDigis") #process.RawToDigi.remove("scalersRawToDigi") @@ -87,29 +81,17 @@ #else: #process.gtDigis.DaqGtFedId = cms.untracked.int32(813) -#/////////////// process.l1tMonitorPath = cms.Path(process.l1tStage2online) -#process.l1tMonitorPath = cms.Path(process.l1t2016Online) -#////////////// -# separate L1TSync path due to the use of the HltHighLevel filter - - -# +# separate L1TSync path due to the use of the HltHighLevel filter -# #process.l1tMonitorEndPath = cms.EndPath(process.l1tMonitorEndPathSeq) -# - - -# process.dqmEndPath = cms.EndPath( process.dqmEnv * process.dqmSaver ) -# process.schedule = cms.Schedule(#process.rawToDigiPath, process.l1tMonitorPath, #process.l1tMonitorEndPath, @@ -119,51 +101,32 @@ #--------------------------------------------- # examples for quick fixes in case of troubles -# please do not modify the commented lines -# - - -# +# please do not modify the commented lines # turn on verbosity in L1TEventInfoClient -# -# process.l1tEventInfoClient.verbose = cms.untracked.bool(True) +# process.l1tEventInfoClient.verbose = cms.untracked.bool(True) # remove module(s) or system sequence from l1tMonitorPath # quality test disabled also -# -#process.l1tMonitorOnline.remove(process.bxTiming) +#process.l1tMonitorOnline.remove(process.bxTiming) #process.l1tMonitorOnline.remove(process.bxTiming) #process.l1tMonitorOnline.remove(process.l1tBPTX) - #process.l1tMonitorOnline.remove(process.l1tLtc) - #process.l1tMonitorOnline.remove(process.l1Dttf) - #process.l1tMonitorOnline.remove(process.l1tCsctf) - #process.l1tMonitorOnline.remove(process.l1tRpctf) - #process.l1tMonitorOnline.remove(process.l1tGmt) - #process.l1tMonitorOnline.remove(process.l1tGt) - #process.l1tMonitorOnline.remove(process.l1ExtraDqmSeq) - #process.l1tMonitorOnline.remove(process.l1tRate) - #process.l1tMonitorOnline.remove(process.l1tRctRun1) - #process.l1tMonitorOnline.remove(process.l1tGctSeq) - # remove module(s) or system sequence from l1tMonitorEndPath -# + #process.l1tMonitorEndPathSeq.remove(process.l1s) #process.l1tMonitorEndPathSeq.remove(process.l1tscalers) - -# #process.schedule.remove(process.l1tSyncPath) #-------------------------------------------------- @@ -207,7 +170,8 @@ process.siStripDigis.ProductLabel = cms.InputTag("rawDataRepacker") process.bxTiming.FedSource = cms.untracked.InputTag("rawDataRepacker") process.l1s.fedRawData = cms.InputTag("rawDataRepacker") -# process.gmtStage2Digis.inputLabel = cms.InputTag("rawDataRepacker") + ### process customizations included here + from DQM.Integration.config.online_customizations_cfi import * process = customise(process) diff --git a/DQM/Integration/python/config/environment_cfi.py b/DQM/Integration/python/config/environment_cfi.py index 0657ce1dba0e5..0fb5864d5278e 100644 --- a/DQM/Integration/python/config/environment_cfi.py +++ b/DQM/Integration/python/config/environment_cfi.py @@ -22,7 +22,7 @@ def loadDQMRunConfigFromFile(): 'userarea': cms.PSet( type = cms.untracked.string("userarea"), collectorPort = cms.untracked.int32(9190), - collectorHost = cms.untracked.string('dqm-c2d07-29.cms'),#lxplus0059.cern.ch'), + collectorHost = cms.untracked.string('dqm-c2d07-29.cms'), ), 'playback': cms.PSet( type = cms.untracked.string("playback"), diff --git a/DQM/L1TMonitor/interface/L1TStage2mGMT.h b/DQM/L1TMonitor/interface/L1TStage2mGMT.h index 836000c7fc1f0..aafcc9be014e6 100755 --- a/DQM/L1TMonitor/interface/L1TStage2mGMT.h +++ b/DQM/L1TMonitor/interface/L1TStage2mGMT.h @@ -6,33 +6,66 @@ * \Author Esmaeel Eskandari Tadavani */ -// system requirements -#include -#include -#include -#include -#include -// general requirements -#include "FWCore/Framework/interface/EDAnalyzer.h" + +#include +#include +// framework #include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/ServiceRegistry/interface/Service.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/Framework/interface/EDAnalyzer.h" #include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/Run.h" -#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/InputTag.h" -#include "DataFormats/Common/interface/Handle.h" -#include "FWCore/Framework/interface/ESHandle.h" -#include "DataFormats/Common/interface/OrphanHandle.h" -//#include "DataFormats/L1TMuon/interface/MuonCaloSum.h" - -// stage2 requirements -#include "DataFormats/L1Trigger/interface/BXVector.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include +#include +#include + +#include "L1AnalysisUGMT.h" +#include "L1AnalysisUGMTDataFormat.h" + #include "DataFormats/L1Trigger/interface/Muon.h" #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h" -//#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" +#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" +#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h" +// output +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "CommonTools/UtilAlgos/interface/TFileService.h" +#include "TTree.h" +#include "TH2F.h" +#include "TH1F.h" +#include "L1Trigger/L1TMuon/interface/MuonRawDigiTranslator.h" +#include "L1Trigger/L1TMuon/interface/RegionalMuonRawDigiTranslator.h" +#include "L1Trigger/L1TMuon/interface/MicroGMTConfiguration.h" + +/* // system requirements */ +/* #include */ +/* #include */ +/* #include */ +/* #include */ +/* #include */ + +/* // general requirements */ +/* #include "FWCore/Framework/interface/EDAnalyzer.h" */ +/* #include "FWCore/Framework/interface/Frameworkfwd.h" */ +/* #include "FWCore/ServiceRegistry/interface/Service.h" */ +/* #include "FWCore/MessageLogger/interface/MessageLogger.h" */ +/* #include "FWCore/Framework/interface/Event.h" */ +/* #include "FWCore/Framework/interface/Run.h" */ +/* #include "FWCore/Framework/interface/EventSetup.h" */ +/* #include "FWCore/ParameterSet/interface/ParameterSet.h" */ +/* #include "FWCore/Utilities/interface/InputTag.h" */ +/* #include "DataFormats/Common/interface/Handle.h" */ +/* #include "FWCore/Framework/interface/ESHandle.h" */ +/* #include "DataFormats/Common/interface/OrphanHandle.h" */ +/* //#include "DataFormats/L1TMuon/interface/MuonCaloSum.h" */ + +/* // stage2 requirements */ +/* #include "DataFormats/L1Trigger/interface/BXVector.h" */ +/* #include "DataFormats/L1Trigger/interface/Muon.h" */ +/* #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h" */ +/* //#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" */ // dqm requirements #include "DQMServices/Core/interface/DQMStore.h" diff --git a/DQM/L1TMonitor/python/L1TStage2_cff.py b/DQM/L1TMonitor/python/L1TStage2_cff.py index f96a1134f9964..aa71182ba1e58 100644 --- a/DQM/L1TMonitor/python/L1TStage2_cff.py +++ b/DQM/L1TMonitor/python/L1TStage2_cff.py @@ -5,8 +5,5 @@ from EventFilter.L1TRawToDigi.gmtStage2Digis_cfi import * l1tStage2online = cms.Sequence( -# l1tStage2OMTF, -# l1tStage2BMTF, l1tStage2mGMT - ) diff --git a/DQM/L1TMonitor/src/L1TStage2BMTF.cc b/DQM/L1TMonitor/src/L1TStage2BMTF.cc index 6e7237b65dfb9..959a6d4d72b40 100755 --- a/DQM/L1TMonitor/src/L1TStage2BMTF.cc +++ b/DQM/L1TMonitor/src/L1TStage2BMTF.cc @@ -31,16 +31,16 @@ void L1TStage2BMTF::bookHistograms(DQMStore::IBooker &ibooker, const edm::Run& i ibooker.setCurrentFolder(monitorDir); // eta ,phi, pt - eta_bmtf = ibooker.book1D("eta_bmtf", "#eta of BMTF", 229, -114.5, 114.5); - phi_bmtf = ibooker.book1D("phi_bmtf", "#phi of BMTF", 144, -0.5, 143.5); - pt_bmtf = ibooker.book1D("pt_bmtf", "p_{T} of BMTF", 300, 0, 300); - bx_bmtf = ibooker.book1D("pt_bmtf", "BX", 2048, -0.5, 2047.5); - etaVSphi_bmtf = ibooker.book2D("etaVSphi_bmtf", "#eta VS #phi of BMTF", 229, -114.5, 114.5, 144, -0.5, 143.5); - phiVSpt_bmtf = ibooker.book2D("phiVSpt_bmtf", "#phi VS p_{T}of BMTF", 144, -0.5, 143.5, 300, 0, 300); - etaVSpt_bmtf = ibooker.book2D("etaVSpt_bmtf", "#eta VS p_{T} of BMTF", 229, -114.5, 114.5,300, 0, 300); - etaVSbx_bmtf = ibooker.book2D("etaVSbx_bmtf", "#eta of BMTF VS bx", 229, -114.5, 114.5, 2048, -0.5, 2047.5); - phiVSbx_bmtf = ibooker.book2D("phiVSbx_bmtf", "#phi of BMTF VS bx", 144, -0.5, 143.5, 2048, -0.5, 2047.5); - ptVSbx_bmtf = ibooker.book2D("ptVSbx_bmtf", "#p_{T} of BMTF VS bx", 300, 0, 300 , 2048, -0.5, 2047.5); + eta_bmtf = ibooker.book1D("eta_bmtf", "#eta of BMTF", 22, -0.5, 21.5); + phi_bmtf = ibooker.book1D("phi_bmtf", "#phi of BMTF", 18, -0.5, 17.5); + pt_bmtf = ibooker.book1D("pt_bmtf", "p_{T} of BMTF", 64, -0.5, 63.5); + bx_bmtf = ibooker.book1D("pt_bmtf", "BX", 5,-2.5, 2.5); + etaVSphi_bmtf = ibooker.book2D("etaVSphi_bmtf", "#eta VS #phi of BMTF", 22, -0.5, 21.5, 18, -0.5, 17.5); + phiVSpt_bmtf = ibooker.book2D("phiVSpt_bmtf", "#phi VS p_{T}of BMTF", 18, -0.5, 17.5, 64, -0.5, 63.5); + etaVSpt_bmtf = ibooker.book2D("etaVSpt_bmtf", "#eta VS p_{T} of BMTF", 22, -0.5, 21.5, 64, -0.5, 63.5); + etaVSbx_bmtf = ibooker.book2D("etaVSbx_bmtf", "#eta VS bx of BMTF", 22, -0.5, 21.5, 5,-2.5, 2.5); + phiVSbx_bmtf = ibooker.book2D("phiVSbx_bmtf", "#phi VS bx of BMTF", 18, -0.5, 17.5, 5,-2.5, 2.5); + ptVSbx_bmtf = ibooker.book2D("ptVSbx_bmtf", "p_{T} VS bx of BMTF", 64, -0.5, 63.5, 5,-2.5, 2.5); } diff --git a/DQM/L1TMonitor/src/L1TStage2mGMT.cc b/DQM/L1TMonitor/src/L1TStage2mGMT.cc index 9f3729205dcc0..c3eec9dbada5c 100755 --- a/DQM/L1TMonitor/src/L1TStage2mGMT.cc +++ b/DQM/L1TMonitor/src/L1TStage2mGMT.cc @@ -30,26 +30,27 @@ void L1TStage2mGMT::bookHistograms(DQMStore::IBooker &ibooker, const edm::Run& i { ibooker.setCurrentFolder(monitorDir); - eta_mgmt = ibooker.book1D("eta_mgmt", "#eta of mGMT Muon", 462, -230, 232); - phi_mgmt = ibooker.book1D("phi_mgmt", "#phi of mGMT Muon", 580, 0, 580); - pt_mgmt = ibooker.book1D("pt_mgmt", "p_{T} of mGMT Muon", 300, 0, 300); + eta_mgmt = ibooker.book1D("eta_mgmt", "#eta of mGMT Muon", 22, -0.5, 21.5); + phi_mgmt = ibooker.book1D("phi_mgmt", "#phi of mGMT Muon", 18, -0.5, 17.5); + pt_mgmt = ibooker.book1D("pt_mgmt", "p_{T} of mGMT Muon", 64, -0.5, 63.5); charge_mgmt = ibooker.book1D("charge_mgmt", "charge of mGMT Muon", 3, -1, 2); - chargeVal_mgmt = ibooker.book1D("chargeValid_mgmt", "chargeValid of mGMT Muon", 2, 0, 2); + chargeVal_mgmt = ibooker.book1D("chargeValid_mgmt", "chargeValid of mGMT Muon", 3, -1, 2); qual_mgmt = ibooker.book1D("quality_mgmt", "quality of mGMT Muon", 16, 0, 16); iso_mgmt = ibooker.book1D("iso_mgmt", "iso of mGMT Muon", 4, 0, 4); - bx_mgmt = ibooker.book1D("bx", "BX", 15, -7, 8); - - etaVSphi_mgmt = ibooker.book2D("etaVSphi_mgmt" , "#eta VS #phi of mGMT Muon" , 229, -114.5, 114.5, 144, -0.5, 143.5); - phiVSpt_mgmt = ibooker.book2D("phiVSpt_mgmt" , "#phi VS p_{T}of mGMT Muon" , 144, -0.5, 143.5, 300, 0, 300); - etaVSpt_mgmt = ibooker.book2D("etaVSpt_mgmt" , "#eta VS p_{T} of mGMT Muon" , 229, -114.5, 114.5, 300, 0, 300); - etaVSbx_mgmt = ibooker.book2D("etaVSbx_mgmt" , "#eta of mGMT Muon VS bx" , 229, -114.5, 114.5, 15, -7, 8); - phiVSbx_mgmt = ibooker.book2D("phiVSbx_mgmt" , "#phi of mGMT Muon VS bx" , 144, -0.5, 143.5, 15, -7, 8); - ptVSbx_mgmt = ibooker.book2D("ptVSbx_mgmt" , "#p_{T} of mGMT Muon VS bx" , 150, 0, 300, 15, -7, 8); - chargeVSbx_mgmt = ibooker.book2D("chargeVSbx_mgmt" , "charge of mGMT Muon VS bx" , 3 , -1, 2, 15, -7, 8); - chargeValVSbx_mgmt = ibooker.book2D("chargeValidVSbx_mgmt", "chargeValid of mGMT Muon VS bx", 2 , 0, 2, 15, -7, 8); - qualVSbx_mgmt = ibooker.book2D("qualVSbx_mgmt" , "quality of mGMT Muon VS bx" , 16 , 0, 16, 15, -7, 8); - isoVSbx_mgmt = ibooker.book2D("isoVSbx_mgmt" , "iso of mGMT MuonVS bx" , 4 , 0, 4, 15, -7, 8); + bx_mgmt = ibooker.book1D("bx", "BX", 5,-2.5, 2.5); + + etaVSphi_mgmt = ibooker.book2D("etaVSphi_mgmt" , "#eta VS #phi of mGMT" , 22, -0.5, 21.5, 18, -0.5, 17.5); + phiVSpt_mgmt = ibooker.book2D("phiVSpt_mgmt" , "#phi VS p_{T}of mGMT" , 18, -0.5, 17.5, 64, -0.5, 63.5); + etaVSpt_mgmt = ibooker.book2D("etaVSpt_mgmt" , "#eta VS p_{T} of mGMT" , 22, -0.5, 21.5, 64, -0.5, 63.5); + + etaVSbx_mgmt = ibooker.book2D("etaVSbx_mgmt" , "#eta VS bx of mGMT" , 22, -0.5, 21.5, 5, -2.5, 2.5); + phiVSbx_mgmt = ibooker.book2D("phiVSbx_mgmt" , "#phi VS bx of mGMT" , 18, -0.5, 17.5, 5, -2.5, 2.5); + ptVSbx_mgmt = ibooker.book2D("ptVSbx_mgmt" , "p_{T} VS bx of mGMT" , 64, -0.5, 63.5, 5, -2.5, 2.5); + chargeVSbx_mgmt = ibooker.book2D("chargeVSbx_mgmt" , "charge VS bx of mGMT" , 3 , -1, 2, 5, -2.5, 2.5); + chargeValVSbx_mgmt = ibooker.book2D("chargeValidVSbx_mgmt", "chargeValid VS bx of mGMT" , 3 , -1, 2, 5, -2.5, 2.5); + qualVSbx_mgmt = ibooker.book2D("qualVSbx_mgmt" , "quality VS bx of mGMT" , 16, 0, 16, 5, -2.5, 2.5); + isoVSbx_mgmt = ibooker.book2D("isoVSbx_mgmt" , "iso VS bx of mGMT" , 4 , 0, 4, 5, -2.5, 2.5); } diff --git a/DQM/L1TMonitor/src/SealModule.cc b/DQM/L1TMonitor/src/SealModule.cc index 263bffcff3c35..0c7859c61f4dd 100644 --- a/DQM/L1TMonitor/src/SealModule.cc +++ b/DQM/L1TMonitor/src/SealModule.cc @@ -2,7 +2,6 @@ #include "FWCore/Framework/interface/MakerMacros.h" - #include DEFINE_FWK_MODULE(L1TFED); @@ -27,23 +26,23 @@ DEFINE_FWK_MODULE(L1TRPCTF); #include DEFINE_FWK_MODULE(L1TGMT); +#include +DEFINE_FWK_MODULE(L1TStage2CaloLayer2); + #include DEFINE_FWK_MODULE(L1TStage2mGMT); #include DEFINE_FWK_MODULE(L1TStage2BMTF); -//#include -//DEFINE_FWK_MODULE(L1TStage2OMTF); - #include DEFINE_FWK_MODULE(L1TGCT); #include DEFINE_FWK_MODULE(L1TRCT); -//#include "DQM/L1TMonitor/interface/L1TPUM.h" -//DEFINE_FWK_MODULE(L1TPUM); +#include "DQM/L1TMonitor/interface/L1TPUM.h" +DEFINE_FWK_MODULE(L1TPUM); #include DEFINE_FWK_MODULE(L1TGT); From 46e883ee8a33e47727a151bd2a04aac5c7d95117 Mon Sep 17 00:00:00 2001 From: esmaeel Date: Wed, 27 Jan 2016 00:43:34 +0100 Subject: [PATCH 131/250] mGMT_v4_BMTF_v2_headerFile --- DQM/L1TMonitor/interface/L1TStage2BMTF.h | 2 +- DQM/L1TMonitor/interface/L1TStage2mGMT.h | 71 ++++++------------------ 2 files changed, 19 insertions(+), 54 deletions(-) diff --git a/DQM/L1TMonitor/interface/L1TStage2BMTF.h b/DQM/L1TMonitor/interface/L1TStage2BMTF.h index 7d47ff94713ad..d1ed040af9a97 100755 --- a/DQM/L1TMonitor/interface/L1TStage2BMTF.h +++ b/DQM/L1TMonitor/interface/L1TStage2BMTF.h @@ -31,7 +31,7 @@ #include "DataFormats/L1Trigger/interface/BXVector.h" #include "DataFormats/L1Trigger/interface/Muon.h" #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h" -//#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" + // dqm requirements #include "DQMServices/Core/interface/DQMStore.h" #include "DQMServices/Core/interface/MonitorElement.h" diff --git a/DQM/L1TMonitor/interface/L1TStage2mGMT.h b/DQM/L1TMonitor/interface/L1TStage2mGMT.h index aafcc9be014e6..b1a26a70401bc 100755 --- a/DQM/L1TMonitor/interface/L1TStage2mGMT.h +++ b/DQM/L1TMonitor/interface/L1TStage2mGMT.h @@ -6,66 +6,31 @@ * \Author Esmaeel Eskandari Tadavani */ - - -#include +// system requirements +#include #include -// framework -#include "FWCore/Framework/interface/Frameworkfwd.h" +#include +#include +#include + +// general requirements #include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" - -#include -#include -#include - -#include "L1AnalysisUGMT.h" -#include "L1AnalysisUGMTDataFormat.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/Common/interface/Handle.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "DataFormats/Common/interface/OrphanHandle.h" +// stage2 requirements +#include "DataFormats/L1Trigger/interface/BXVector.h" #include "DataFormats/L1Trigger/interface/Muon.h" #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h" -#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" -#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h" -// output -#include "FWCore/ServiceRegistry/interface/Service.h" -#include "CommonTools/UtilAlgos/interface/TFileService.h" -#include "TTree.h" -#include "TH2F.h" -#include "TH1F.h" -#include "L1Trigger/L1TMuon/interface/MuonRawDigiTranslator.h" -#include "L1Trigger/L1TMuon/interface/RegionalMuonRawDigiTranslator.h" -#include "L1Trigger/L1TMuon/interface/MicroGMTConfiguration.h" - -/* // system requirements */ -/* #include */ -/* #include */ -/* #include */ -/* #include */ -/* #include */ - -/* // general requirements */ -/* #include "FWCore/Framework/interface/EDAnalyzer.h" */ -/* #include "FWCore/Framework/interface/Frameworkfwd.h" */ -/* #include "FWCore/ServiceRegistry/interface/Service.h" */ -/* #include "FWCore/MessageLogger/interface/MessageLogger.h" */ -/* #include "FWCore/Framework/interface/Event.h" */ -/* #include "FWCore/Framework/interface/Run.h" */ -/* #include "FWCore/Framework/interface/EventSetup.h" */ -/* #include "FWCore/ParameterSet/interface/ParameterSet.h" */ -/* #include "FWCore/Utilities/interface/InputTag.h" */ -/* #include "DataFormats/Common/interface/Handle.h" */ -/* #include "FWCore/Framework/interface/ESHandle.h" */ -/* #include "DataFormats/Common/interface/OrphanHandle.h" */ -/* //#include "DataFormats/L1TMuon/interface/MuonCaloSum.h" */ - -/* // stage2 requirements */ -/* #include "DataFormats/L1Trigger/interface/BXVector.h" */ -/* #include "DataFormats/L1Trigger/interface/Muon.h" */ -/* #include "DataFormats/L1TMuon/interface/RegionalMuonCand.h" */ -/* //#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" */ // dqm requirements #include "DQMServices/Core/interface/DQMStore.h" From d22532538c5578733cab6d1bd02e5d49d9b2ee03 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Tue, 26 Jan 2016 21:10:09 -0600 Subject: [PATCH 132/250] Make factory method thread-safe. --- Utilities/XrdAdaptor/src/QualityMetric.cc | 9 +++++---- Utilities/XrdAdaptor/src/QualityMetric.h | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Utilities/XrdAdaptor/src/QualityMetric.cc b/Utilities/XrdAdaptor/src/QualityMetric.cc index 0a83f60c1b01c..baef1a0035797 100644 --- a/Utilities/XrdAdaptor/src/QualityMetric.cc +++ b/Utilities/XrdAdaptor/src/QualityMetric.cc @@ -157,16 +157,17 @@ QualityMetricFactory * QualityMetricFactory::m_instance = new QualityMetricFacto std::unique_ptr QualityMetricFactory::get(timespec now, const std::string &id) { - MetricMap::const_iterator it = m_instance->m_sources.find(id); + MetricMap::accessor access; + m_instance->m_sources.insert(access, std::make_pair(id, nullptr)); QualityMetricUniqueSource *source; - if (it == m_instance->m_sources.end()) + if (access->second == nullptr) { source = new QualityMetricUniqueSource(now); - m_instance->m_sources[id] = source; + access->second = source; } else { - source = it->second; + source = access->second; } return source->newSource(now); } diff --git a/Utilities/XrdAdaptor/src/QualityMetric.h b/Utilities/XrdAdaptor/src/QualityMetric.h index 73e8162b29efc..bd71820646759 100644 --- a/Utilities/XrdAdaptor/src/QualityMetric.h +++ b/Utilities/XrdAdaptor/src/QualityMetric.h @@ -5,8 +5,8 @@ #include #include -#include +#include "tbb/concurrent_hash_map.h" #include namespace XrdAdaptor { @@ -66,7 +66,7 @@ friend class Source; static QualityMetricFactory *m_instance; - typedef std::unordered_map MetricMap; + typedef tbb::concurrent_hash_map MetricMap; MetricMap m_sources; }; From 82c58cb121405fc610fee8c66967c3a1b91fd936 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Tue, 26 Jan 2016 21:10:30 -0600 Subject: [PATCH 133/250] Avoid potential memory leaks from callback objects. Laboriously emulate from XrdCl the cases where we own the "response" pointer and those where we do not. I suspect this may have been leaking a few bytes per file open - not going to kill the memory budget, but likely good for those using valgrind! --- Utilities/XrdAdaptor/plugins/XrdStorageMaker.cc | 4 +++- Utilities/XrdAdaptor/src/XrdRequestManager.cc | 5 +++++ Utilities/XrdAdaptor/src/XrdSource.cc | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Utilities/XrdAdaptor/plugins/XrdStorageMaker.cc b/Utilities/XrdAdaptor/plugins/XrdStorageMaker.cc index 9efac7f77fe5a..c80a6d2f00fa1 100644 --- a/Utilities/XrdAdaptor/plugins/XrdStorageMaker.cc +++ b/Utilities/XrdAdaptor/plugins/XrdStorageMaker.cc @@ -20,7 +20,9 @@ class MakerResponseHandler : public XrdCl::ResponseHandler virtual void HandleResponse( XrdCl::XRootDStatus *status, XrdCl::AnyObject *response ) { - if (response) delete response; + // Note: Prepare call has a response object. + delete response; + delete status; } }; diff --git a/Utilities/XrdAdaptor/src/XrdRequestManager.cc b/Utilities/XrdAdaptor/src/XrdRequestManager.cc index 7ec007003af52..fc656c7d44c03 100644 --- a/Utilities/XrdAdaptor/src/XrdRequestManager.cc +++ b/Utilities/XrdAdaptor/src/XrdRequestManager.cc @@ -75,8 +75,12 @@ class SendMonitoringInfoHandler : boost::noncopyable, public XrdCl::ResponseHand { XrdCl::Buffer *buffer = nullptr; response->Get(buffer); + response->Set(static_cast(nullptr)); delete buffer; } + // Send Info has a response object; we must delete it. + delete response; + delete status; } }; @@ -1062,6 +1066,7 @@ XrdAdaptor::RequestManager::OpenHandler::~OpenHandler() void XrdAdaptor::RequestManager::OpenHandler::HandleResponseWithHosts(XrdCl::XRootDStatus *status_ptr, XrdCl::AnyObject *, XrdCl::HostList *hostList_ptr) { + // NOTE: as in XrdCl::File (synchronous), we ignore the response object. std::shared_ptr source; std::unique_ptr status(status_ptr); std::unique_ptr hostList(hostList_ptr); diff --git a/Utilities/XrdAdaptor/src/XrdSource.cc b/Utilities/XrdAdaptor/src/XrdSource.cc index f807918b3f374..f5fbab8772ace 100644 --- a/Utilities/XrdAdaptor/src/XrdSource.cc +++ b/Utilities/XrdAdaptor/src/XrdSource.cc @@ -58,7 +58,7 @@ class DelayedClose : boost::noncopyable, public XrdCl::ResponseHandler virtual void HandleResponseWithHosts(XrdCl::XRootDStatus *status, XrdCl::AnyObject *response, XrdCl::HostList *hostList) override { - if (!status->IsOK()) + if (status && !status->IsOK()) { edm::LogWarning("XrdFileWarning") << "Source delayed close failed with error '" << status->ToStr() @@ -66,6 +66,7 @@ class DelayedClose : boost::noncopyable, public XrdCl::ResponseHandler } delete status; delete hostList; + // NOTE: we do not delete response (copying behavior from XrdCl). delete this; } From 81972931a251b93b54b45766684257e8cccf80af Mon Sep 17 00:00:00 2001 From: Thomas Lenzi Date: Wed, 27 Jan 2016 09:30:47 +0100 Subject: [PATCH 134/250] Further migration of clusterizer --- .../plugins/Phase2TrackerClusterizer.cc | 3 -- .../plugins/Phase2TrackerClusterizer.h | 1 - .../test/ClustersValidation.cc | 31 ++++++++++++------- .../test/ClustersValidationTest_cfg.py | 6 +--- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc index 01b7d1d2b5124..537f61537c505 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc +++ b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc @@ -24,7 +24,6 @@ namespace cms { Phase2TrackerClusterizer::Phase2TrackerClusterizer(edm::ParameterSet const& conf) : conf_(conf), - src_(conf.getParameter< edm::InputTag >("src")), maxClusterSize_(conf.getParameter< unsigned int >("maxClusterSize")), maxNumberClusters_(conf.getParameter< unsigned int >("maxNumberClusters")) { // Objects that will be used @@ -48,8 +47,6 @@ namespace cms { // Get the Digis edm::Handle< edm::DetSetVector< Phase2TrackerDigi > > digis; event.getByToken(token_, digis); - //event.getByLabel(src_, digis); - //event.getByLabel("mix", "Tracker", digis); // Get the geometry edm::ESHandle< TrackerGeometry > geomHandle; diff --git a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h index 357dbe3538f44..009f117922de2 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h +++ b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h @@ -25,7 +25,6 @@ namespace cms { private: edm::ParameterSet conf_; Phase2TrackerClusterizerAlgorithm* clusterizer_; - edm::InputTag src_; edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > token_; unsigned int maxClusterSize_; unsigned int maxNumberClusters_; diff --git a/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc b/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc index 6d574e99b1189..c82fd22607c3b 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc +++ b/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc @@ -11,6 +11,7 @@ #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" @@ -83,8 +84,12 @@ class Phase2TrackerClusterizerValidation : public edm::EDAnalyzer { unsigned int getLayerNumber(const DetId&, const TrackerTopology*); unsigned int getSimTrackId(const edm::Handle< edm::DetSetVector< PixelDigiSimLink > >&, const DetId&, unsigned int); - edm::InputTag src_; - edm::InputTag links_; + edm::EDGetTokenT< Phase2TrackerCluster1DCollectionNew > tokenClusters_; + edm::EDGetTokenT< edm::DetSetVector< PixelDigiSimLink > > tokenLinks_; + edm::EDGetTokenT< edm::PSimHitContainer > tokenSimHits_; + edm::EDGetTokenT< edm::SimTrackContainer> tokenSimTracks_; + edm::EDGetTokenT< edm::SimVertexContainer > tokenSimVertices_; + TH2F* trackerLayout_; TH2F* trackerLayoutXY_; TH2F* trackerLayoutXYBar_; @@ -94,9 +99,13 @@ class Phase2TrackerClusterizerValidation : public edm::EDAnalyzer { }; -Phase2TrackerClusterizerValidation::Phase2TrackerClusterizerValidation(const edm::ParameterSet& conf) : - src_(conf.getParameter< edm::InputTag >("src")), - links_(conf.getParameter< edm::InputTag >("links")) { } + Phase2TrackerClusterizerValidation::Phase2TrackerClusterizerValidation(const edm::ParameterSet& conf) { + tokenClusters_ = consumes< Phase2TrackerCluster1DCollectionNew >(conf.getParameter("src")); + tokenLinks_ = consumes< edm::DetSetVector< PixelDigiSimLink> >(conf.getParameter("links")); + tokenSimHits_ = consumes< edm::PSimHitContainer >(edm::InputTag("g4SimHits", "TrackerHitsPixelBarrelLowTof")); + tokenSimTracks_ = consumes< edm::SimTrackContainer >(edm::InputTag("g4SimHits")); + tokenSimVertices_ = consumes< edm::SimVertexContainer >(edm::InputTag("g4SimHits")); + } Phase2TrackerClusterizerValidation::~Phase2TrackerClusterizerValidation() { } @@ -121,25 +130,23 @@ void Phase2TrackerClusterizerValidation::analyze(const edm::Event& event, const // Get the clusters edm::Handle< Phase2TrackerCluster1DCollectionNew > clusters; - event.getByLabel(src_, clusters); + event.getByToken(tokenClusters_, clusters); // Get the PixelDigiSimLinks edm::Handle< edm::DetSetVector< PixelDigiSimLink > > pixelSimLinks; - event.getByLabel("simSiPixelDigis", "Tracker", pixelSimLinks); - -//event.getByLabel(links_, pixelSimLinks); + event.getByToken(tokenLinks_, pixelSimLinks); // Get the SimHits edm::Handle< edm::PSimHitContainer > simHitsRaw; - event.getByLabel("g4SimHits", "TrackerHitsPixelBarrelLowTof", simHitsRaw); + event.getByToken(tokenSimHits_, simHitsRaw); // Get the SimTracks edm::Handle< edm::SimTrackContainer > simTracksRaw; - event.getByLabel("g4SimHits", simTracksRaw); + event.getByToken(tokenSimTracks_, simTracksRaw); // Get the SimVertex edm::Handle< edm::SimVertexContainer > simVertices; - event.getByLabel("g4SimHits", simVertices); + event.getByToken(tokenSimVertices_, simVertices); // Get the geometry edm::ESHandle< TrackerGeometry > geomHandle; diff --git a/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidationTest_cfg.py b/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidationTest_cfg.py index 1f0e0c4f5504a..2a607368de783 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidationTest_cfg.py +++ b/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidationTest_cfg.py @@ -10,7 +10,7 @@ process.load('FWCore.MessageService.MessageLogger_cfi') process.load('Configuration.EventContent.EventContent_cff') process.load('SimGeneral.MixingModule.mixNoPU_cfi') -process.load('Configuration.Geometry.GeometryExtended2023MuondevReco_cff') +process.load('Configuration.Geometry.GeometryExtended2023Dev_cff') process.load('Configuration.StandardSequences.MagneticField_38T_PostLS1_cff') process.load('Configuration.StandardSequences.RawToDigi_cff') process.load('Configuration.StandardSequences.L1Reco_cff') @@ -55,7 +55,3 @@ # Processes to run process.p = cms.Path(process.analysis) - -from SLHCUpgradeSimulations.Configuration.phase2TkCustomsBE5DPixel10Ddev import customise_condOverRides -process = customise_condOverRides(process) - From bed3c73ea0646c2ce4c201fc79a87ce70665c53d Mon Sep 17 00:00:00 2001 From: Raphael Friese Date: Tue, 19 Jan 2016 16:08:55 +0100 Subject: [PATCH 135/250] Making the MVA MET working on CMSSW_7_6_X --- .../plugins/PFMETProducerMVA.cc | 2 +- .../plugins/PFMETProducerMVA.h | 21 ------------------- .../METPUSubtraction/python/mvaPFMET_cff.py | 19 +++++++---------- .../test/mvaMETOnMiniAOD_cfg.py | 2 +- 4 files changed, 10 insertions(+), 34 deletions(-) diff --git a/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc b/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc index 8df819d235a83..b73bc773027e4 100644 --- a/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc +++ b/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc @@ -16,12 +16,12 @@ PFMETProducerMVA::PFMETProducerMVA(const edm::ParameterSet& cfg) srcPFCandidatesView_ = consumes(cfg.getParameter("srcPFCandidates")); srcVertices_ = consumes(cfg.getParameter("srcVertices")); vInputTag srcLeptonsTags = cfg.getParameter("srcLeptons"); + consumes(edm::InputTag("fixedGridRhoFastjetAll")); for(vInputTag::const_iterator it=srcLeptonsTags.begin();it!=srcLeptonsTags.end();it++) { srcLeptons_.push_back( consumes( *it ) ); } minNumLeptons_ = cfg.getParameter("minNumLeptons"); - srcRho_ = consumes >(cfg.getParameter("srcRho")); globalThreshold_ = cfg.getParameter("globalThreshold"); diff --git a/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.h b/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.h index 9a7bb2226d4dc..824144f747d47 100644 --- a/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.h +++ b/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.h @@ -14,38 +14,23 @@ #include "FWCore/Framework/interface/stream/EDProducer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/InputTag.h" -#include "FWCore/Utilities/interface/Exception.h" #include "DataFormats/Candidate/interface/Candidate.h" #include "DataFormats/Candidate/interface/CandidateFwd.h" -#include "DataFormats/Common/interface/View.h" -#include "DataFormats/EgammaCandidates/interface/GsfElectron.h" -#include "DataFormats/GsfTrackReco/interface/GsfTrack.h" -#include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h" #include "DataFormats/JetReco/interface/PFJet.h" #include "DataFormats/JetReco/interface/PFJetCollection.h" #include "DataFormats/Math/interface/deltaR.h" -#include "DataFormats/Math/interface/LorentzVector.h" #include "DataFormats/METReco/interface/CommonMETData.h" #include "DataFormats/METReco/interface/PFMET.h" #include "DataFormats/METReco/interface/PFMETCollection.h" #include "DataFormats/MuonReco/interface/Muon.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" -#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" #include "DataFormats/PatCandidates/interface/PackedCandidate.h" #include "DataFormats/PatCandidates/interface/Tau.h" -#include "DataFormats/TauReco/interface/PFTau.h" -#include "DataFormats/TrackReco/interface/Track.h" -#include "DataFormats/TrackReco/interface/TrackFwd.h" #include "DataFormats/VertexReco/interface/Vertex.h" -#include "DataFormats/VertexReco/interface/VertexFwd.h" #include "JetMETCorrections/Algorithms/interface/L1FastjetCorrector.h" -#include "JetMETCorrections/Objects/interface/JetCorrector.h" #include "RecoMET/METAlgorithms/interface/METAlgo.h" #include "RecoMET/METAlgorithms/interface/PFSpecificAlgo.h" @@ -54,11 +39,6 @@ #include "RecoJets/JetProducers/interface/PileupJetIdAlgo.h" -#include -#include - -#include "TLorentzVector.h" - namespace reco { class PFMETProducerMVA : public edm::stream::EDProducer<> @@ -103,7 +83,6 @@ namespace reco typedef std::vector vInputTag; std::vector > srcLeptons_; int minNumLeptons_; // CV: option to skip MVA MET computation in case there are less than specified number of leptons in the event - edm::EDGetTokenT > srcRho_; std::string correctorLabel_; bool useType1_; diff --git a/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py b/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py index 80aa9b382de80..199344024be47 100644 --- a/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py +++ b/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py @@ -1,8 +1,7 @@ import FWCore.ParameterSet.Config as cms #from RecoMET.METProducers.PFMET_cfi import pfMet -from JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff import * -from JetMETCorrections.Configuration.DefaultJEC_cff import * +from JetMETCorrections.Configuration.JetCorrectors_cff import * ##from RecoMET.METPUSubtraction.mvaPFMET_leptons_cfi import * ## CV: importing mvaPFMET_leptons_cfi breaks produceAndDiscriminateHPSPFTaus sequence ## (hpsPFTauDiscriminationByDecayModeFinding module gets overwritten by None, @@ -10,11 +9,11 @@ ## by top-level cfg.py file before RecoMET/METPUSubtraction/python/mvaPFMET_cff.py gets loaded) ##from RecoJets.JetProducers.PileupJetIDCutParams_cfi import full_53x_wp -calibratedAK4PFJetsForPFMVAMEt = cms.EDProducer('PFJetCorrectionProducer', +calibratedAK4PFJetsForPFMVAMEt = cms.EDProducer('CorrectedPFJetProducer', src = cms.InputTag('ak4PFJets'), - correctors = cms.vstring("ak4PFL1FastL2L3") # NOTE: use "ak5PFL1FastL2L3" for MC / "ak5PFL1FastL2L3Residual" for Data + correctors = cms.VInputTag("ak4PFL1FastL2L3Corrector") # NOTE: use "ak5PFL1FastL2L3" for MC / "ak5PFL1FastL2L3Residual" for Data ) - +from JetMETCorrections.Configuration.JetCorrectionServices_cff import ak4PFL1Fastjet from RecoJets.JetProducers.PileupJetID_cfi import pileupJetIdEvaluator from RecoJets.JetProducers.PileupJetIDParams_cfi import JetIdParams puJetIdForPFMVAMEt = pileupJetIdEvaluator.clone( @@ -69,15 +68,13 @@ srcLeptons = cms.VInputTag(),#"isomuons","isoelectrons","isotaus") # NOTE: you need to set this to collections of electrons, muons and tau-jets # passing the lepton reconstruction & identification criteria applied in your analysis minNumLeptons = cms.int32(0), - srcRho = cms.InputTag('fixedGridRhoFastjetAll'), globalThreshold = cms.double(-1.),#pfMet.globalThreshold, minCorrJetPt = cms.double(-1.), inputFileNames = cms.PSet( - U = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrmet_7_2_X_MINIAOD_BX25PU20_Mar2015.root'), - DPhi = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrphi_7_2_X_MINIAOD_BX25PU20_Mar2015.root'), - CovU1 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru1cov_7_2_X_MINIAOD_BX25PU20_Mar2015.root'), - CovU2 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru2cov_7_2_X_MINIAOD_BX25PU20_Mar2015.root') - ), + U = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru_7_4_X_miniAOD_25NS_July2015.root'), + DPhi = cms.FileInPath('RecoMET/METPUSubtraction/data/gbrphi_7_4_X_miniAOD_25NS_July2015.root'), + CovU1 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru1cov_7_4_X_miniAOD_25NS_July2015.root'), + CovU2 = cms.FileInPath('RecoMET/METPUSubtraction/data/gbru2cov_7_4_X_miniAOD_25NS_July2015.root') ), inputRecords = cms.PSet( U = cms.string("RecoilCor"), DPhi = cms.string("PhiCor"), diff --git a/RecoMET/METPUSubtraction/test/mvaMETOnMiniAOD_cfg.py b/RecoMET/METPUSubtraction/test/mvaMETOnMiniAOD_cfg.py index 8a138d427f4b6..c86b0e9a01c2b 100644 --- a/RecoMET/METPUSubtraction/test/mvaMETOnMiniAOD_cfg.py +++ b/RecoMET/METPUSubtraction/test/mvaMETOnMiniAOD_cfg.py @@ -23,7 +23,7 @@ # Input source process.source = cms.Source("PoolSource", secondaryFileNames = cms.untracked.vstring(), - fileNames = cms.untracked.vstring('root://eoscms//eos/cms/store/relval/CMSSW_7_5_0_pre4/RelValZMM_13/MINIAODSIM/PU50ns_MCRUN2_75_V0-v1/00000/66CB72C0-70F8-E411-81DC-002590596468.root'), + fileNames = cms.untracked.vstring('/store/mc/RunIIFall15MiniAODv2/DYJetsToLL_M-50_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/MINIAODSIM/PU25nsData2015v1_76X_mcRun2_asymptotic_v12-v1/70000/DC327D28-D3B8-E511-9FB7-008CFA0A59C0.root '), skipEvents = cms.untracked.uint32(0) ) From 13de1f128b3eeb8faeb3137e1c2a2b2a7e25f041 Mon Sep 17 00:00:00 2001 From: Raphael Friese Date: Tue, 19 Jan 2016 16:16:11 +0100 Subject: [PATCH 136/250] Fixing MVA MET Covariance matrix --- RecoMET/METPUSubtraction/src/PFMETAlgorithmMVA.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoMET/METPUSubtraction/src/PFMETAlgorithmMVA.cc b/RecoMET/METPUSubtraction/src/PFMETAlgorithmMVA.cc index 6ece3fb222d87..4d6c5007e2556 100644 --- a/RecoMET/METPUSubtraction/src/PFMETAlgorithmMVA.cc +++ b/RecoMET/METPUSubtraction/src/PFMETAlgorithmMVA.cc @@ -224,8 +224,8 @@ void PFMETAlgorithmMVA::evaluateMVA() mvaOutputU_ = GetResponse(mvaReaderU_, varForU_); var_["RecoilCor_U"] = var_["particleFlow_U"] * mvaOutputU_; var_["RecoilCor_UPhi"] = var_["PhiCor_UPhi"]; - mvaOutputCovU1_ = GetResponse(mvaReaderCovU1_, varForCovU1_)* mvaOutputU_ * var_["particleFlow_U"]; - mvaOutputCovU2_ = GetResponse(mvaReaderCovU2_, varForCovU2_)* mvaOutputU_ * var_["particleFlow_U"]; + mvaOutputCovU1_ = std::pow(GetResponse(mvaReaderCovU1_, varForCovU1_)* mvaOutputU_ * var_["particleFlow_U"], 2); + mvaOutputCovU2_ = std::pow(GetResponse(mvaReaderCovU2_, varForCovU2_)* mvaOutputU_ * var_["particleFlow_U"], 2); // compute MET(Photon check) From a1f1b9751ae6c7faae851967d082f8a093b85e1b Mon Sep 17 00:00:00 2001 From: Raphael Friese Date: Tue, 19 Jan 2016 17:49:19 +0100 Subject: [PATCH 137/250] make srcRho configurable --- RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc b/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc index b73bc773027e4..67cb83cf749d3 100644 --- a/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc +++ b/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc @@ -16,7 +16,8 @@ PFMETProducerMVA::PFMETProducerMVA(const edm::ParameterSet& cfg) srcPFCandidatesView_ = consumes(cfg.getParameter("srcPFCandidates")); srcVertices_ = consumes(cfg.getParameter("srcVertices")); vInputTag srcLeptonsTags = cfg.getParameter("srcLeptons"); - consumes(edm::InputTag("fixedGridRhoFastjetAll")); + edm::InputTag srcRho = ( cfg.exists("srcRho") ) ? cfg.getParameter("srcRho") : (edm::InputTag("fixedGridRhoFastjetAll")); + consumes(srcRho); for(vInputTag::const_iterator it=srcLeptonsTags.begin();it!=srcLeptonsTags.end();it++) { srcLeptons_.push_back( consumes( *it ) ); } From 3b8d90d34f97863929184acfa397ad6106abab2d Mon Sep 17 00:00:00 2001 From: Dylan Rankin Date: Wed, 27 Jan 2016 14:42:23 +0100 Subject: [PATCH 138/250] updated name --- .../B2G/python/b2gHadronicHLTEventValidation_cfi.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/HLTriggerOffline/B2G/python/b2gHadronicHLTEventValidation_cfi.py b/HLTriggerOffline/B2G/python/b2gHadronicHLTEventValidation_cfi.py index e3f3048f615f3..4b05ed113eebb 100644 --- a/HLTriggerOffline/B2G/python/b2gHadronicHLTEventValidation_cfi.py +++ b/HLTriggerOffline/B2G/python/b2gHadronicHLTEventValidation_cfi.py @@ -11,12 +11,12 @@ minJets = cms.untracked.uint32(1), # Trigger sTrigger = cms.untracked.string("TriggerResults"), - vsPaths = cms.untracked.vstring(['HLT_AK8DiPFJet280_200_TrimMass30_BTagCSV0p45', - 'HLT_AK8DiPFJet250_200_TrimMass30_BTagCSV0p45', + vsPaths = cms.untracked.vstring(['HLT_AK8DiPFJet280_200_TrimMass30_BTagCSV_p20', + 'HLT_AK8DiPFJet250_200_TrimMass30_BTagCSV_p20', 'HLT_AK8PFJet360_TrimMass30', 'HLT_AK8PFHT700_TrimR0p1PT0p03Mass50', 'HLT_AK8PFHT650_TrimR0p1PT0p03Mass50', - 'HLT_AK8PFHT600_TrimR0p1PT0p03Mass50_BTagCSV0p45']), + 'HLT_AK8PFHT600_TrimR0p1PT0p03Mass50_BTagCSV_p20']), ) b2gDiJetHLTValidation = cms.EDAnalyzer('B2GHadronicHLTValidation', @@ -30,10 +30,10 @@ minJets = cms.untracked.uint32(2), # Trigger sTrigger = cms.untracked.string("TriggerResults"), - vsPaths = cms.untracked.vstring(['HLT_AK8DiPFJet280_200_TrimMass30_BTagCSV0p45', - 'HLT_AK8DiPFJet250_200_TrimMass30_BTagCSV0p45', + vsPaths = cms.untracked.vstring(['HLT_AK8DiPFJet280_200_TrimMass30_BTagCSV_p20', + 'HLT_AK8DiPFJet250_200_TrimMass30_BTagCSV_p20', 'HLT_AK8PFJet360_TrimMass30', 'HLT_AK8PFHT700_TrimR0p1PT0p03Mass50', 'HLT_AK8PFHT650_TrimR0p1PT0p03Mass50', - 'HLT_AK8PFHT600_TrimR0p1PT0p03Mass50_BTagCSV0p45']), + 'HLT_AK8PFHT600_TrimR0p1PT0p03Mass50_BTagCSV_p20']), ) From fc94e1c37c7164e9b886733d2d5e3067dbff5806 Mon Sep 17 00:00:00 2001 From: Thomas Lenzi Date: Wed, 27 Jan 2016 16:34:43 +0100 Subject: [PATCH 139/250] Applied comments from PR #13087 for the clusterizer integration in CMSSW 8 --- .../Phase2TrackerCluster/src/classes_def.xml | 4 ++-- .../SiPhase2Clusterizer/plugins/BuildFile.xml | 2 +- .../plugins/Phase2TrackerClusterizer.cc | 21 +++++-------------- .../plugins/Phase2TrackerClusterizer.h | 16 +++++++------- .../Phase2TrackerClusterizerAlgorithm.cc | 4 ++-- .../Phase2TrackerClusterizerArray.cc | 0 6 files changed, 17 insertions(+), 30 deletions(-) rename RecoLocalTracker/SiPhase2Clusterizer/{src => plugins}/Phase2TrackerClusterizerAlgorithm.cc (95%) rename RecoLocalTracker/SiPhase2Clusterizer/{src => plugins}/Phase2TrackerClusterizerArray.cc (100%) diff --git a/DataFormats/Phase2TrackerCluster/src/classes_def.xml b/DataFormats/Phase2TrackerCluster/src/classes_def.xml index 5f419ed02014b..28492476e2fc5 100644 --- a/DataFormats/Phase2TrackerCluster/src/classes_def.xml +++ b/DataFormats/Phase2TrackerCluster/src/classes_def.xml @@ -1,6 +1,6 @@ - - + + diff --git a/RecoLocalTracker/SiPhase2Clusterizer/plugins/BuildFile.xml b/RecoLocalTracker/SiPhase2Clusterizer/plugins/BuildFile.xml index 66dcbd4240d52..62f00a969f2e7 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/plugins/BuildFile.xml +++ b/RecoLocalTracker/SiPhase2Clusterizer/plugins/BuildFile.xml @@ -1,4 +1,4 @@ - + diff --git a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc index 537f61537c505..370d4a9acb97b 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc +++ b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc @@ -16,33 +16,24 @@ #include #include -namespace cms { /* * Initialise the producer */ Phase2TrackerClusterizer::Phase2TrackerClusterizer(edm::ParameterSet const& conf) : - conf_(conf), - maxClusterSize_(conf.getParameter< unsigned int >("maxClusterSize")), - maxNumberClusters_(conf.getParameter< unsigned int >("maxNumberClusters")) { - // Objects that will be used - token_ = consumes< edm::DetSetVector< Phase2TrackerDigi > >(conf.getParameter("src")); - // Objects that will be produced + clusterizer_(new Phase2TrackerClusterizerAlgorithm(conf.getParameter< unsigned int >("maxClusterSize"), conf.getParameter< unsigned int >("maxNumberClusters"))), + token_(consumes< edm::DetSetVector< Phase2TrackerDigi > >(conf.getParameter("src"))) { produces< Phase2TrackerCluster1DCollectionNew >(); - // - clusterizer_ = new Phase2TrackerClusterizerAlgorithm(maxClusterSize_, maxNumberClusters_); - } - - Phase2TrackerClusterizer::~Phase2TrackerClusterizer() { - delete clusterizer_; } + Phase2TrackerClusterizer::~Phase2TrackerClusterizer() { } + /* * Clusterize the events */ - void Phase2TrackerClusterizer::produce(edm::Event& event, const edm::EventSetup& eventSetup) { + void Phase2TrackerClusterizer::produce(edm::StreamID sid, edm::Event& event, const edm::EventSetup& eventSetup) const { // Get the Digis edm::Handle< edm::DetSetVector< Phase2TrackerDigi > > digis; @@ -83,7 +74,5 @@ namespace cms { outputClusters->shrink_to_fit(); event.put(outputClusters); } -} -using cms::Phase2TrackerClusterizer; DEFINE_FWK_MODULE(Phase2TrackerClusterizer); diff --git a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h index 009f117922de2..852bf201ef06f 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h +++ b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h @@ -6,30 +6,28 @@ #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" #include "DataFormats/DetId/interface/DetId.h" -#include "FWCore/Framework/interface/EDProducer.h" +#include "FWCore/Framework/interface/global/EDProducer.h" #include "FWCore/Framework/interface/Event.h" #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/Framework/interface/ConsumesCollector.h" -namespace cms { +#include - class Phase2TrackerClusterizer : public edm::EDProducer { + + class Phase2TrackerClusterizer : public edm::global::EDProducer<> { public: explicit Phase2TrackerClusterizer(const edm::ParameterSet& conf); virtual ~Phase2TrackerClusterizer(); - virtual void produce(edm::Event& event, const edm::EventSetup& eventSetup); + void produce(edm::StreamID sid, edm::Event& event, const edm::EventSetup& eventSetup) const override final; private: - edm::ParameterSet conf_; - Phase2TrackerClusterizerAlgorithm* clusterizer_; + std::unique_ptr< Phase2TrackerClusterizerAlgorithm > clusterizer_; edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > token_; - unsigned int maxClusterSize_; - unsigned int maxNumberClusters_; }; -} + #endif diff --git a/RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerAlgorithm.cc b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizerAlgorithm.cc similarity index 95% rename from RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerAlgorithm.cc rename to RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizerAlgorithm.cc index 30a69cf28ac4a..40b8fc312cae5 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerAlgorithm.cc +++ b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizerAlgorithm.cc @@ -25,7 +25,7 @@ void Phase2TrackerClusterizerAlgorithm::setup(const PixelGeomDetUnit* pixDet) { void Phase2TrackerClusterizerAlgorithm::clusterizeDetUnit(const edm::DetSet< Phase2TrackerDigi >& digis, edmNew::DetSetVector< Phase2TrackerCluster1D >::FastFiller& clusters) { - // Fill the 2D matrix with the ADC values + // Fill the 2D matrix with the hit information : (hit or not) fillMatrix(digis.begin(), digis.end()); // Number of clusters @@ -79,7 +79,7 @@ void Phase2TrackerClusterizerAlgorithm::clusterizeDetUnit(const edm::DetSet< Pha } /* - * Copy the value of the Digis' ADC to the 2D matrix. An ADC of 255 means the cell is hit (binary read-out) + * Copy the value of the Digis to the 2D matrix (hit or not). */ void Phase2TrackerClusterizerAlgorithm::fillMatrix(edm::DetSet< Phase2TrackerDigi >::const_iterator begin, edm::DetSet< Phase2TrackerDigi >::const_iterator end) { diff --git a/RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerArray.cc b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizerArray.cc similarity index 100% rename from RecoLocalTracker/SiPhase2Clusterizer/src/Phase2TrackerClusterizerArray.cc rename to RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizerArray.cc From 065ff267ba5a777ce8945443c8630a11d4475c77 Mon Sep 17 00:00:00 2001 From: Suchandra Date: Wed, 27 Jan 2016 16:54:15 +0100 Subject: [PATCH 140/250] Strongly typed enum used and specific values into the cc file --- .../interface/TrackerGeometry.h | 3 ++- .../src/TrackerGeometry.cc | 27 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h b/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h index edf741dee452f..c4a043be84505 100644 --- a/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h +++ b/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h @@ -40,7 +40,8 @@ class TrackerGeometry final : public TrackingGeometry { public: typedef GeomDetEnumerators::SubDetector SubDetector; - enum ModuleType {UNKNOWN, PXB, PXF, IB1, IB2, OB1, OB2, W1A, W2A, W3A, W1B, W2B, W3B, W4, W5, W6, W7, Ph1PXB, Ph1PXF, Ph2PXB, Ph2PXF, Ph2PSP, Ph2PSS, Ph2SS}; + + enum class ModuleType; virtual ~TrackerGeometry() ; diff --git a/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc b/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc index 5f4cf64f8400e..78343eebead04 100644 --- a/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc +++ b/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc @@ -45,6 +45,33 @@ class DetIdComparator { }; } +enum class TrackerGeometry::ModuleType { + UNKNOWN, + PXB, + PXF, + IB1, + IB2, + OB1, + OB2, + W1A, + W2A, + W3A, + W1B, + W2B, + W3B, + W4, + W5, + W6, + W7, + Ph1PXB, + Ph1PXF, + Ph2PXB, + Ph2PXF, + Ph2PSP, + Ph2PSS, + Ph2SS +}; + TrackerGeometry::TrackerGeometry(GeometricDet const* gd) : theTrackerDet(gd) { From 3ea4978b661990bf685409d3e230165de6c0a03b Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Fri, 8 Jan 2016 16:12:47 +0100 Subject: [PATCH 141/250] Remove the base url also from trackingCompare.py, and make it use SimpleSample by default --- Validation/RecoTrack/python/plotting/validation.py | 4 ++-- Validation/RecoTrack/test/trackingCompare.py | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Validation/RecoTrack/python/plotting/validation.py b/Validation/RecoTrack/python/plotting/validation.py index 0e33daa9d40bf..2c0811824be72 100644 --- a/Validation/RecoTrack/python/plotting/validation.py +++ b/Validation/RecoTrack/python/plotting/validation.py @@ -815,8 +815,8 @@ def __init__(self, files, labels, newdir): self._labels = labels self._newdir = newdir - def createHtmlReport(self, baseUrl=None, validationName=""): - return html.HtmlReport(validationName, self._newdir, baseUrl) + def createHtmlReport(self, validationName=""): + return html.HtmlReport(validationName, self._newdir) def doPlots(self, plotter, subdirprefix=None, sample=None, plotterDrawArgs={}, limitSubFoldersOnlyTo=None, htmlReport=html.HtmlReportDummy()): if subdirprefix is None and sample is None: diff --git a/Validation/RecoTrack/test/trackingCompare.py b/Validation/RecoTrack/test/trackingCompare.py index c233c82bdd533..d5dbfad54962f 100755 --- a/Validation/RecoTrack/test/trackingCompare.py +++ b/Validation/RecoTrack/test/trackingCompare.py @@ -15,18 +15,17 @@ ] outputDir = "plots" -subdirprefix = "sample" - # To auto-generate HTML pages, uncomment the commented lines below val = SimpleValidation([x[0] for x in filesLabels], [x[1] for x in filesLabels], outputDir) -#report = val.createHtmlReport("INSERT_YOUR_BASE_URL_HERE", validationName="Short description of your comparison") -#report.beginSample(SimpleSample("prefix", "Sample name")) -val.doPlots(trackingPlots.plotter, subdirprefix=subdirprefix, plotterDrawArgs={"ratio": True}, +sample = SimpleSample("sample_prefix", "Sample name") +#report = val.createHtmlReport(validationName="Short description of your comparison") +#report.beginSample(sample) +val.doPlots(trackingPlots.plotter, sample=sample, plotterDrawArgs={"ratio": True}, # htmlReport=report ) ## Uncomment this to include also vertex plots -##val.doPlots(vertexPlots.plotter, subdirprefix=subdirprefix, plotterDrawArgs={"ratio": True}, +##val.doPlots(vertexPlots.plotter, sample=sample, plotterDrawArgs={"ratio": True}, ## htmlReport=report ##) #report.write() From 18207da102c20e7bc5b7e6ba561e15afb149c9e6 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Fri, 8 Jan 2016 16:23:08 +0100 Subject: [PATCH 142/250] Add possibility to clear Plotter To extend the customizability from trackingCompare.py --- Validation/RecoTrack/python/plotting/plotting.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Validation/RecoTrack/python/plotting/plotting.py b/Validation/RecoTrack/python/plotting/plotting.py index 9d1cf15f78517..b74af1e6db054 100644 --- a/Validation/RecoTrack/python/plotting/plotting.py +++ b/Validation/RecoTrack/python/plotting/plotting.py @@ -2233,6 +2233,10 @@ def appendTable(self, attachToFolder, *args, **kwargs): return raise Exception("Did not find plot folder '%s' when trying to attach a table creator to it" % attachToFolder) + def clear(self): + """Remove all plot folders and tables""" + self._plots = [] + def getPlotFolderNames(self): return [item.getName() for item in self._plots] From 53a78d61ae47702e3905d7ad18a63e3be9d2f472 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Fri, 8 Jan 2016 16:26:30 +0100 Subject: [PATCH 143/250] Switch the logic for deciding whether a collection is from iterations or not It makes more sense to specify the collections that are not from iterations, because it seems to be more common to create non-predefined iteration(-like) collections. --- .../RecoTrack/python/plotting/trackingPlots.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Validation/RecoTrack/python/plotting/trackingPlots.py b/Validation/RecoTrack/python/plotting/trackingPlots.py index 269d646e527e5..4fa539f1d05f4 100644 --- a/Validation/RecoTrack/python/plotting/trackingPlots.py +++ b/Validation/RecoTrack/python/plotting/trackingPlots.py @@ -284,7 +284,11 @@ # ######################################## -_possibleTrackingIterations = [ +_possibleTrackingNonIterationColls = [ + 'ak4PFJets', + 'btvLike', +] +_possibleTrackingColls = [ 'initialStepPreSplitting', 'initialStep', 'highPtTripletStep', # phase1 @@ -304,11 +308,7 @@ 'muonSeededStepInOut', 'muonSeededStepOutIn', 'duplicateMerge', -] -_possibleTrackingColls = _possibleTrackingIterations+[ - 'ak4PFJets', - 'btvLike', -] +] + _possibleTrackingNonIterationColls _possibleTrackingCollsOld = { "Zero" : "iter0", "First" : "iter1", @@ -644,7 +644,7 @@ def limitSubFolder(self, limitOnlyTo, translatedDqmSubFolder): # track-specific hack def isAlgoIterative(self, algo): - return algo in _possibleTrackingIterations or algo in _possibleTrackingCollsOld.values() + return algo not in _possibleTrackingNonIterationColls class TrackingSummaryTable: def __init__(self, section, highPurity=False): From b11f425ecafcbf3c425a803d65fd18a217d17bff Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Fri, 8 Jan 2016 16:56:57 +0100 Subject: [PATCH 144/250] Add possibility to make "raw" summary plots from trackingCompare.py --- .../python/plotting/trackingPlots.py | 60 ++++++++++++++----- 1 file changed, 44 insertions(+), 16 deletions(-) diff --git a/Validation/RecoTrack/python/plotting/trackingPlots.py b/Validation/RecoTrack/python/plotting/trackingPlots.py index 4fa539f1d05f4..aee61482c8909 100644 --- a/Validation/RecoTrack/python/plotting/trackingPlots.py +++ b/Validation/RecoTrack/python/plotting/trackingPlots.py @@ -452,7 +452,7 @@ def _summaryBinRename(binLabel, highPurity, byOriginalAlgo, byAlgoMask, seeds): return ret -def _constructSummary(mapping, highPurity=False, byOriginalAlgo=False, byAlgoMask=False, seeds=False, midfix=""): +def _constructSummary(mapping=None, highPurity=False, byOriginalAlgo=False, byAlgoMask=False, seeds=False, midfix=""): _common = {"drawStyle": "EP", "xbinlabelsize": 10, "xbinlabeloption": "d"} _commonN = {"ylog": True, "ymin": _minMaxN, "ymax": _minMaxN} _commonN.update(_common) @@ -463,26 +463,50 @@ def _constructSummary(mapping, highPurity=False, byOriginalAlgo=False, byAlgoMas if byOriginalAlgo or byAlgoMask: _commonAB["minExistingBins"] = 2 prefix = "summary"+midfix + + h_eff = "effic_vs_coll" + h_eff_allpt = "effic_vs_coll_allPt" + h_fakerate = "fakerate_vs_coll" + h_duplicaterate = "duplicatesRate_coll" + h_pileuprate = "pileuprate_coll" + + h_reco = "num_reco_coll" + h_true = "num_assoc(recoToSim)_coll" + h_fake = Subtract("num_fake_coll_orig", "num_reco_coll", "num_assoc(recoToSim)_coll") + h_duplicate = "num_duplicate_coll" + h_pileup = "num_pileup_coll" + if mapping is not None: + h_eff = AggregateBins("efficiency", h_eff, **_commonAB) + h_eff_allpt = AggregateBins("efficiencyAllPt", h_eff_allpt, **_commonAB) + h_fakerate = AggregateBins("fakerate", h_fakerate, **_commonAB) + h_duplicaterate = AggregateBins("duplicatesRate", h_duplicaterate, **_commonAB) + h_pileuprate = AggregateBins("pileuprate", h_pileuprate, **_commonAB) + + h_reco = AggregateBins("num_reco_coll", h_reco, **_commonAB) + h_true = AggregateBins("num_true_coll", h_true, **_commonAB) + h_fake = AggregateBins("num_fake_coll", h_fake, **_commonAB) + h_duplicate = AggregateBins("num_duplicate_coll", h_duplicate, **_commonAB) + h_pileup = AggregateBins("num_pileup_coll", h_pileup, **_commonAB) + summary = PlotGroup(prefix, [ - Plot(AggregateBins("efficiency", "effic_vs_coll", **_commonAB), - title="Efficiency vs collection", ytitle="Efficiency", ymin=1e-3, ymax=1, ylog=True, **_common), - Plot(AggregateBins("efficiencyAllPt", "effic_vs_coll_allPt", **_commonAB), - title="Efficiency vs collection (no pT cut in denominator)", ytitle="Efficiency", ymin=1e-3, ymax=1, ylog=True, **_common), - - Plot(AggregateBins("fakerate", "fakerate_vs_coll", **_commonAB), title="Fakerate vs collection", ytitle="Fake rate", ymax=_maxFake, **_common), - Plot(AggregateBins("duplicatesRate", "duplicatesRate_coll", **_commonAB), title="Duplicates rate vs collection", ytitle="Duplicates rate", ymax=_maxFake, **_common), - Plot(AggregateBins("pileuprate", "pileuprate_coll", **_commonAB), title="Pileup rate vs collection", ytitle="Pileup rate", ymax=_maxFake, **_common), + Plot(h_eff, title="Efficiency vs collection", ytitle="Efficiency", ymin=1e-3, ymax=1, ylog=True, **_common), + Plot(h_eff_allpt, title="Efficiency vs collection (no pT cut in denominator)", ytitle="Efficiency", ymin=1e-3, ymax=1, ylog=True, **_common), + + Plot(h_fakerate, title="Fakerate vs collection", ytitle="Fake rate", ymax=_maxFake, **_common), + Plot(h_duplicaterate, title="Duplicates rate vs collection", ytitle="Duplicates rate", ymax=_maxFake, **_common), + Plot(h_pileuprate, title="Pileup rate vs collection", ytitle="Pileup rate", ymax=_maxFake, **_common), ]) summaryN = PlotGroup(prefix+"_ntracks", [ - Plot(AggregateBins("num_reco_coll", "num_reco_coll", **_commonAB), ytitle="Tracks", title="Number of tracks vs collection", **_commonN), - Plot(AggregateBins("num_true_coll", "num_assoc(recoToSim)_coll", **_commonAB), ytitle="True tracks", title="Number of true tracks vs collection", **_commonN), - Plot(AggregateBins("num_fake_coll", Subtract("num_fake_coll_orig", "num_reco_coll", "num_assoc(recoToSim)_coll"), **_commonAB), ytitle="Fake tracks", title="Number of fake tracks vs collection", **_commonN), - Plot(AggregateBins("num_duplicate_coll", "num_duplicate_coll", **_commonAB), ytitle="Duplicate tracks", title="Number of duplicate tracks vs collection", **_commonN), - Plot(AggregateBins("num_pileup_coll", "num_pileup_coll", **_commonAB), ytitle="Pileup tracks", title="Number of pileup tracks vs collection", **_commonN), + Plot(h_reco, ytitle="Tracks", title="Number of tracks vs collection", **_commonN), + Plot(h_true, ytitle="True tracks", title="Number of true tracks vs collection", **_commonN), + Plot(h_fake, ytitle="Fake tracks", title="Number of fake tracks vs collection", **_commonN), + Plot(h_duplicate, ytitle="Duplicate tracks", title="Number of duplicate tracks vs collection", **_commonN), + Plot(h_pileup, ytitle="Pileup tracks", title="Number of pileup tracks vs collection", **_commonN), ]) return (summary, summaryN) +(_summaryRaw, _summaryRawN) = _constructSummary(midfix="Raw") (_summary, _summaryN) = _constructSummary(_collLabelMap) (_summaryHp, _summaryNHp) = _constructSummary(_collLabelMapHp, highPurity=True) (_summaryByOriginalAlgo, _summaryByOriginalAlgoN) = _constructSummary(_collLabelMapHp, byOriginalAlgo=True, midfix="ByOriginalAlgo") @@ -777,15 +801,19 @@ def _trackingFolders(lastDirName="Track"): _packedCandidateHitsHitPattern, ] plotter = Plotter() -def _appendTrackingPlots(lastDirName, name, algoPlots, onlyForPileup=False, seeding=False): +def _appendTrackingPlots(lastDirName, name, algoPlots, onlyForPileup=False, seeding=False, rawSummary=False): # to keep backward compatibility, this set of plots has empty name plotter.append(name, _trackingFolders(lastDirName), TrackingPlotFolder(*algoPlots, onlyForPileup=onlyForPileup, purpose=PlotPurpose.TrackingIteration, fallbackRefFiles=[_trackingRefFileFallbackSLHC]), fallbackDqmSubFolders=[_trackingSubFoldersFallbackSLHC]) summaryName = "" if name != "": summaryName += name+"_" summaryName += "summary" + summaryPlots = [] + if rawSummary: + summaryPlots.extend([_summaryRaw, _summaryRawN]) + summaryPlots.extend(_summaryPlots) plotter.append(summaryName, _trackingFolders(lastDirName), - PlotFolder(*_summaryPlots, loopSubFolders=False, onlyForPileup=onlyForPileup, + PlotFolder(*summaryPlots, loopSubFolders=False, onlyForPileup=onlyForPileup, purpose=PlotPurpose.TrackingSummary, page="summary", section=name)) plotter.append(summaryName+"_highPurity", _trackingFolders(lastDirName), PlotFolder(*_summaryPlotsHp, loopSubFolders=False, onlyForPileup=onlyForPileup, From 17785327dc09a5ddabdc0b7e53365f0c9bd8addf Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Mon, 11 Jan 2016 12:55:04 +0100 Subject: [PATCH 145/250] Update campaigns --- Validation/RecoTrack/python/plotting/validation.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Validation/RecoTrack/python/plotting/validation.py b/Validation/RecoTrack/python/plotting/validation.py index 2c0811824be72..ad13ee1a54147 100644 --- a/Validation/RecoTrack/python/plotting/validation.py +++ b/Validation/RecoTrack/python/plotting/validation.py @@ -107,16 +107,22 @@ "CMSSW_7_6_0": {"default": "76X_mcRun2_asymptotic_v11", "fullsim_50ns": "76X_mcRun2_startup_v11"}, "CMSSW_7_6_0_71XGENSIM": {"default": "76X_mcRun2_asymptotic_v11_gs7120p2rlBS", "fullsim_50ns": "76X_mcRun2_startup_v11_gs7120p2rlBS"}, "CMSSW_7_6_2": {"default": "76X_mcRun2_asymptotic_v12", "fullsim_50ns": "76X_mcRun2_startup_v11"}, + "CMSSW_7_6_3_patch2_0T": {"default": "76X_mcRun2_0T_v1_0Tv1GT"}, "CMSSW_8_0_0_pre1": {"default": "76X_mcRun2_asymptotic_v11", "fullsim_50ns": "76X_mcRun2_startup_v11"}, "CMSSW_8_0_0_pre2": {"default": "76X_mcRun2_asymptotic_v12", "fullsim_50ns": "76X_mcRun2_startup_v11"}, "CMSSW_8_0_0_pre2_phase1": {"default": "76X_upgrade2017_design_v7"}, "CMSSW_8_0_0_pre2_phase1_rereco": {"default": "76X_upgrade2017_design_v7_rereco"}, "CMSSW_8_0_0_pre3_phase1": {"default": "76X_upgrade2017_design_v8"}, "CMSSW_8_0_0_pre3_phase1_pythia8": {"default": "76X_upgrade2017_design_v8_pythia8"}, + "CMSSW_8_0_0_pre4": {"default": "76X_mcRun2_asymptotic_v13", "fullsim_50ns": "76X_mcRun2_startup_v12"}, + "CMSSW_8_0_0_pre4_phase1": {"default": "76X_upgrade2017_design_v8_UPG17"}, + "CMSSW_8_0_0_pre4_phase1_13TeV": {"default": "76X_upgrade2017_design_v8_UPG17"}, + "CMSSW_8_0_0_pre4_ecal15fb": {"default": "80X_mcRun2_asymptotic_2016EcalTune_15fb_v0_ecal15fbm1"}, + "CMSSW_8_0_0_pre4_ecal30fb": {"default": "80X_mcRun2_asymptotic_2016EcalTune_30fb_v0_ecal30fbm1"}, } _releasePostfixes = ["_AlcaCSA14", "_PHYS14", "_TEST", "_71XGENSIM_pmx", "_pmx_v2", "_pmx_v3", "_pmx", "_Fall14DR", "_71XGENSIM_FIXGT", "_71XGENSIM_PU", "_71XGENSIM_PXbest", "_71XGENSIM_PXworst", "_71XGENSIM", "_73XGENSIM", "_BS", "_GenSim_7113", "_extended", - "_25ns_asymptotic", "_50ns_startup", "_50ns_asympref", "_50ns_asymptotic", "_minimal", "_0T", "_unsch", "_noCCC_v3", "_noCCC", "_MT", "_phase1_rereco", "_phase1_pythia8", "_phase1"] + "_25ns_asymptotic", "_50ns_startup", "_50ns_asympref", "_50ns_asymptotic", "_minimal", "_0T", "_unsch", "_noCCC_v3", "_noCCC", "_MT", "_phase1_rereco", "_phase1_pythia8", "_phase1_13TeV", "_phase1", "_ecal15fb", "_ecal30fb"] def _stripRelease(release): for pf in _releasePostfixes: if pf in release: From 4bdd9d3df4a1027bd5b0b6a4e5ecfe2a28ee75e2 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Mon, 11 Jan 2016 14:04:06 +0100 Subject: [PATCH 146/250] Add conversion plots --- Validation/RecoTrack/python/plotting/html.py | 7 +++++++ Validation/RecoTrack/python/plotting/trackingPlots.py | 1 + 2 files changed, 8 insertions(+) diff --git a/Validation/RecoTrack/python/plotting/html.py b/Validation/RecoTrack/python/plotting/html.py index cf91ff7b1de0e..41209f906bb7c 100644 --- a/Validation/RecoTrack/python/plotting/html.py +++ b/Validation/RecoTrack/python/plotting/html.py @@ -35,6 +35,7 @@ def _lowerFirst(s): _allTPEfficName = "All tracks (all TPs)" _fromPVName = "Tracks from PV" _fromPVAllTPName = "Tracks from PV (all TPs)" +_conversionName = "Tracks for conversions" _trackQualityNameOrder = collections.OrderedDict([ ("seeding_seeds", "Seeds"), ("seeding_seedsa", "Seeds A"), @@ -64,6 +65,7 @@ def _lowerFirst(s): ("fromPVAllTP2_highPurity", "High purity "+_lowerFirst(_fromPVAllTPName).replace("PV", "PV v2")), ("fromPVAllTP2_Pt", _fromPVAllTPName.replace("Tracks", "Tracks pT > 0.9 GeV").replace("PV", "PV v2")), ("fromPVAllTP2_highPurityPt", "High purity "+_lowerFirst(_fromPVAllTPName).replace("tracks", "tracks pT > 0.9 GeV").replace("PV", "PV v2")), + ("conversion_", _conversionName) ]) _trackAlgoName = { @@ -96,6 +98,10 @@ def _lowerFirst(s): 'muonSeededStepInOut', 'muonSeededStepOutIn', 'duplicateMerge', + 'convStep', + 'conversionStep', + 'ckfInOutFromConversions', + 'ckfOutInFromConversions', 'iter0', 'iter1', 'iter2', @@ -127,6 +133,7 @@ def _lowerFirst(s): ("fromPV_highPurity", "High purity "+_lowerFirst(_fromPVName)), ("fromPVAllTP", _fromPVAllTPName), ("fromPVAllTP_highPurity", "High purity "+_lowerFirst(_fromPVAllTPName)), + ("conversion", _conversionName), # These are for vertices ("offlinePrimaryVertices", "All vertices (offlinePrimaryVertices)"), ("selectedOfflinePrimaryVertices", "Selected vertices (selectedOfflinePrimaryVertices)"), diff --git a/Validation/RecoTrack/python/plotting/trackingPlots.py b/Validation/RecoTrack/python/plotting/trackingPlots.py index aee61482c8909..c45ff2c5d5c5a 100644 --- a/Validation/RecoTrack/python/plotting/trackingPlots.py +++ b/Validation/RecoTrack/python/plotting/trackingPlots.py @@ -835,6 +835,7 @@ def _appendTrackingPlots(lastDirName, name, algoPlots, onlyForPileup=False, seed _appendTrackingPlots("TrackFromPVAllTP2", "fromPVAllTP2", _simBasedPlots+_recoBasedPlots, onlyForPileup=True) _appendTrackingPlots("TrackSeeding", "seeding", _seedingBuildingPlots, seeding=True) _appendTrackingPlots("TrackBuilding", "building", _seedingBuildingPlots) +_appendTrackingPlots("TrackConversion", "conversion", _simBasedPlots+_recoBasedPlots, rawSummary=True) # MiniAOD plotter.append("packedCandidate", _trackingFolders("PackedCandidate"), From 153e1a822af99d6bdecc4766726e9edf5de0a9b1 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Tue, 12 Jan 2016 15:20:42 +0100 Subject: [PATCH 147/250] Implement matching of DQM subfolders between files --- Validation/RecoTrack/python/plotting/plotting.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Validation/RecoTrack/python/plotting/plotting.py b/Validation/RecoTrack/python/plotting/plotting.py index b74af1e6db054..c4efe235eef3c 100644 --- a/Validation/RecoTrack/python/plotting/plotting.py +++ b/Validation/RecoTrack/python/plotting/plotting.py @@ -1976,8 +1976,17 @@ def __init__(self, name, possibleDqmFolders, dqmSubFolders, plotFolder, fallback if dqmSubFolders is None: self._dqmSubFolders = None else: - self._dqmSubFolders = map(lambda sf: DQMSubFolder(sf, self._plotFolder.translateSubFolder(sf)), dqmSubFolders[0]) - self._dqmSubFolders = filter(lambda sf: sf.translated is not None, self._dqmSubFolders) + # Match the subfolders between files in case the lists differ + # equality is by the 'translated' name + subfolders = {} + for sf_list in dqmSubFolders: + for sf in sf_list: + sf_translated = self._plotFolder.translateSubFolder(sf) + if sf_translated is not None and not sf_translated in subfolders: + subfolders[sf_translated] = DQMSubFolder(sf, sf_translated) + + self._dqmSubFolders = subfolders.values() + self._dqmSubFolders.sort(key=lambda sf: sf.subfolder) self._fallbackNames = fallbackNames self._fallbackDqmSubFolders = fallbackDqmSubFolders From 654e4ccaadb974dc22e1b8c7dba7fffeba0513d7 Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Fri, 15 Jan 2016 10:51:52 +0100 Subject: [PATCH 148/250] Tune plots --- .../RecoTrack/python/plotting/plotting.py | 1 + .../python/plotting/trackingPlots.py | 92 ++++++++++--------- 2 files changed, 50 insertions(+), 43 deletions(-) diff --git a/Validation/RecoTrack/python/plotting/plotting.py b/Validation/RecoTrack/python/plotting/plotting.py index c4efe235eef3c..7b19b1f8ca3e7 100644 --- a/Validation/RecoTrack/python/plotting/plotting.py +++ b/Validation/RecoTrack/python/plotting/plotting.py @@ -2227,6 +2227,7 @@ def __init__(self): ROOT.gStyle.SetStatFontSize(statSize) ROOT.TH1.AddDirectory(False) + ROOT.TGaxis.SetMaxDigits(4) def append(self, *args, **kwargs): """Append a plot folder to the plotter. diff --git a/Validation/RecoTrack/python/plotting/trackingPlots.py b/Validation/RecoTrack/python/plotting/trackingPlots.py index c45ff2c5d5c5a..81a5b9b54baa7 100644 --- a/Validation/RecoTrack/python/plotting/trackingPlots.py +++ b/Validation/RecoTrack/python/plotting/trackingPlots.py @@ -17,9 +17,13 @@ _minMaxResol = [1e-5, 4e-5, 1e-4, 4e-4, 1e-3, 4e-3, 1e-2, 4e-2, 0.1, 0.4, 1] _minMaxN = [5e-1, 5, 5e1, 5e2, 5e3, 5e4, 5e5, 5e6, 5e7, 5e8, 5e9] -_maxLayers = 25 +_minHits = [0, 5, 10] +_maxHits = [5, 10, 20, 40, 60, 80] +_minLayers = [0, 5, 10] +_maxLayers = [5, 10, 25] _maxPixelLayers = 8 -_max3DLayers = 20 +_min3DLayers = [0, 5, 10] +_max3DLayers = [5, 10, 20] _legendDy_4rows = 0.09 _legendDy_2rows = -0.025 @@ -55,18 +59,18 @@ legendDy=_legendDy_4rows ) _effandfake3 = PlotGroup("effandfake3", [ - Plot("effic_vs_hit", xtitle="TP hits", ytitle="efficiency vs hits", ymax=_maxEff), + Plot("effic_vs_hit", xtitle="TP hits", ytitle="efficiency vs hits", xmin=_minHits, xmax=_maxHits, ymax=_maxEff), Plot(FakeDuplicate("fakeduprate_vs_hit", assoc="num_assoc(recoToSim)_hit", dup="num_duplicate_hit", reco="num_reco_hit", title="fake+duplicates vs hit"), - xtitle="track hits", ytitle="fake+duplicates rate vs hits", ymax=_maxFake), - Plot("effic_vs_layer", xtitle="TP layers", ytitle="efficiency vs layers", xmax=_maxLayers, ymax=_maxEff), + xtitle="track hits", ytitle="fake+duplicates rate vs hits", xmin=_minHits, xmax=_maxHits, ymax=_maxFake), + Plot("effic_vs_layer", xtitle="TP layers", ytitle="efficiency vs layers", xmin=_minLayers, xmax=_maxLayers, ymax=_maxEff), Plot(FakeDuplicate("fakeduprate_vs_layer", assoc="num_assoc(recoToSim)_layer", dup="num_duplicate_layer", reco="num_reco_layer", title="fake+duplicates vs layer"), - xtitle="track layers", ytitle="fake+duplicates rate vs layers", xmax=_maxLayers, ymax=_maxFake), + xtitle="track layers", ytitle="fake+duplicates rate vs layers", xmin=_minLayers, xmax=_maxLayers, ymax=_maxFake), Plot("effic_vs_pixellayer", xtitle="TP pixel layers", ytitle="efficiency vs pixel layers", title="", xmax=_maxPixelLayers, ymax=_maxEff), Plot(FakeDuplicate("fakeduprate_vs_pixellayer", assoc="num_assoc(recoToSim)_pixellayer", dup="num_duplicate_pixellayer", reco="num_reco_pixellayer", title=""), xtitle="track pixel layers", ytitle="fake+duplicates rate vs pixel layers", xmax=_maxPixelLayers, ymax=_maxFake), - Plot("effic_vs_3Dlayer", xtitle="TP 3D layers", ytitle="efficiency vs 3D layers", xmax=_max3DLayers, ymax=_maxEff), + Plot("effic_vs_3Dlayer", xtitle="TP 3D layers", ytitle="efficiency vs 3D layers", xmin=_min3DLayers, xmax=_max3DLayers, ymax=_maxEff), Plot(FakeDuplicate("fakeduprate_vs_3Dlayer", assoc="num_assoc(recoToSim)_3Dlayer", dup="num_duplicate_3Dlayer", reco="num_reco_3Dlayer", title="fake+duplicates vs 3D layer"), - xtitle="track 3D layers", ytitle="fake+duplicates rate vs 3D layers", xmax=_max3DLayers, ymax=_maxFake), + xtitle="track 3D layers", ytitle="fake+duplicates rate vs 3D layers", xmin=_min3DLayers, xmax=_max3DLayers, ymax=_maxFake), ], legendDy=_legendDy_4rows ) @@ -114,21 +118,21 @@ ncols=3, legendDy=_legendDy_4rows ) _dupandfake3 = PlotGroup("dupandfake3", [ - Plot("fakerate_vs_hit", xtitle="track hits", ytitle="fakerate vs hits", ymax=_maxFake), - Plot("duplicatesRate_hit", xtitle="track hits", ytitle="duplicates rate vs hits", ymax=_maxFake), - Plot("pileuprate_hit", xtitle="track hits", ytitle="pileup rate vs hits", ymax=_maxFake), + Plot("fakerate_vs_hit", xtitle="track hits", ytitle="fakerate vs hits", ymax=_maxFake, xmin=_minHits, xmax=_maxHits), + Plot("duplicatesRate_hit", xtitle="track hits", ytitle="duplicates rate vs hits", ymax=_maxFake, xmin=_minHits, xmax=_maxHits), + Plot("pileuprate_hit", xtitle="track hits", ytitle="pileup rate vs hits", ymax=_maxFake, xmin=_minHits, xmax=_maxHits), # - Plot("fakerate_vs_layer", xtitle="track layers", ytitle="fakerate vs layer", ymax=_maxFake, xmax=_maxLayers), - Plot("duplicatesRate_layer", xtitle="track layers", ytitle="duplicates rate vs layers", ymax=_maxFake, xmax=_maxLayers), - Plot("pileuprate_layer", xtitle="track layers", ytitle="pileup rate vs layers", ymax=_maxFake, xmax=_maxLayers), + Plot("fakerate_vs_layer", xtitle="track layers", ytitle="fakerate vs layer", ymax=_maxFake, xmin=_minLayers, xmax=_maxLayers), + Plot("duplicatesRate_layer", xtitle="track layers", ytitle="duplicates rate vs layers", ymax=_maxFake, xmin=_minLayers, xmax=_maxLayers), + Plot("pileuprate_layer", xtitle="track layers", ytitle="pileup rate vs layers", ymax=_maxFake, xmin=_minLayers, xmax=_maxLayers), # Plot("fakerate_vs_pixellayer", xtitle="track pixel layers", ytitle="fakerate vs pixel layers", title="", ymax=_maxFake, xmax=_maxPixelLayers), Plot("duplicatesRate_pixellayer", xtitle="track pixel layers", ytitle="duplicates rate vs pixel layers", title="", ymax=_maxFake, xmax=_maxPixelLayers), Plot("pileuprate_pixellayer", xtitle="track pixel layers", ytitle="pileup rate vs pixel layers", title="", ymax=_maxFake, xmax=_maxPixelLayers), # - Plot("fakerate_vs_3Dlayer", xtitle="track 3D layers", ytitle="fakerate vs 3D layers", ymax=_maxFake, xmax=_max3DLayers), - Plot("duplicatesRate_3Dlayer", xtitle="track 3D layers", ytitle="duplicates rate vs 3D layers", ymax=_maxFake, xmax=_max3DLayers), - Plot("pileuprate_3Dlayer", xtitle="track 3D layers", ytitle="pileup rate vs 3D layers", ymax=_maxFake, xmax=_max3DLayers) + Plot("fakerate_vs_3Dlayer", xtitle="track 3D layers", ytitle="fakerate vs 3D layers", ymax=_maxFake, xmin=_min3DLayers, xmax=_max3DLayers), + Plot("duplicatesRate_3Dlayer", xtitle="track 3D layers", ytitle="duplicates rate vs 3D layers", ymax=_maxFake, xmin=_min3DLayers, xmax=_max3DLayers), + Plot("pileuprate_3Dlayer", xtitle="track 3D layers", ytitle="pileup rate vs 3D layers", ymax=_maxFake, xmin=_min3DLayers, xmax=_max3DLayers) ], ncols=3, legendDy=_legendDy_4rows ) @@ -235,11 +239,11 @@ ]) _common = {"stat": True, "normalizeToUnitArea": True, "ylog": True, "ymin": 1e-6, "drawStyle": "hist"} _hitsAndPt = PlotGroup("hitsAndPt", [ - Plot("missing_inner_layers", ymax=1, **_common), - Plot("missing_outer_layers", ymax=1, **_common), - Plot("hits_eta", stat=True, statx=0.38, xtitle="track #eta", ytitle=" vs #eta", ymin=8, ymax=24, statyadjust=[0,0,-0.15], + Plot("missing_inner_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common), + Plot("missing_outer_layers", xmin=_minLayers, xmax=_maxLayers, ymax=1, **_common), + Plot("hits_eta", stat=True, statx=0.38, xtitle="track #eta", ytitle=" vs #eta", ymin=_minHits, ymax=_maxHits, statyadjust=[0,0,-0.15], fallback={"name": "nhits_vs_eta", "profileX": True}), - Plot("hits", stat=True, xtitle="track hits", xmin=0, ylog=True, ymin=[5e-1, 5, 5e1, 5e2, 5e3], drawStyle="hist"), + Plot("hits", stat=True, xtitle="track hits", xmin=_minHits, xmax=_maxHits, ylog=True, ymin=[5e-1, 5, 5e1, 5e2, 5e3], drawStyle="hist"), Plot("num_simul_pT", xtitle="TP p_{T}", xlog=True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common), Plot("num_reco_pT", xtitle="track p_{T}", xlog=True, ymax=[1e-1, 2e-1, 5e-1, 1], **_common) ]) @@ -521,10 +525,13 @@ def _constructSummary(mapping=None, highPurity=False, byOriginalAlgo=False, byAl # ######################################## -_common = {"normalizeToUnitArea": True, "ylog": True, "ymin": [1e-6, 1e-5, 1e-4, 1e-3, 1e-2], "ymax": [1e-2, 1e-1, 1.1]} +_common = {"normalizeToUnitArea": True, "ylog": True, "ymin": [1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2], "ymax": [1e-2, 1e-1, 1.1]} _commonStatus = {} _commonStatus.update(_common) -_commonStatus.update({"xbinlabelsize": 10, "drawStyle": "hist", "adjustMarginRight": 0.08}) +_commonStatus.update({"xbinlabelsize": 10, "xbinlabeloption": "d", "drawStyle": "hist", "adjustMarginRight": 0.08}) +_commonLabelSize = {} +_commonLabelSize.update(_common) +_commonLabelSize.update({"xlabelsize": 17}) _packedCandidateFlow = PlotGroup("flow", [ Plot("selectionFlow", xbinlabelsize=10, xbinlabeloption="d", adjustMarginRight=0.1, drawStyle="hist", ylog=True, ymin=[0.9, 9, 9e1, 9e2, 9e3, 9e4, 9e5, 9e6, 9e7]), @@ -554,56 +561,56 @@ def _constructSummary(mapping=None, highPurity=False, byOriginalAlgo=False, byAl ) _packedCandidateImpactParameter1 = PlotGroup("impactParameter1", [ - Plot("diffDxyAssocPV", xtitle="dxy(assocPV)", **_common), + Plot("diffDxyAssocPV", xtitle="dxy(assocPV)", adjustMarginRight=0.02, **_commonLabelSize), Plot("diffDxyAssocPVStatus", **_commonStatus), Plot("diffDxyAssocPVUnderOverFlowSign", xtitle="dxy(assocPV)", **_common), - Plot("diffDzAssocPV", xtitle="dz(assocPV)", **_common), + Plot("diffDzAssocPV", xtitle="dz(assocPV)", adjustMarginRight=0.02, **_commonLabelSize), Plot("diffDzAssocPVStatus", **_commonStatus), Plot("diffDzAssocPVUnderOverFlowSign", xtitle="dz(assocPV)", **_common), - Plot("diffDxyError", xtitle="dxyError()", **_common), - Plot("diffDszError", xtitle="dszError()", **_common), - Plot("diffDzError", xtitle="dzError()", **_common), + Plot("diffDxyError", xtitle="dxyError()", adjustMarginRight=0.02, **_commonLabelSize), + Plot("diffDszError", xtitle="dszError()", adjustMarginRight=0.02, **_commonLabelSize), + Plot("diffDzError", xtitle="dzError()", adjustMarginRight=0.02, **_commonLabelSize), ], ncols=3 ) _packedCandidateImpactParameter2 = PlotGroup("impactParameter2", [ - Plot("diffDxyPV", xtitle="dxy(PV) via PC", **_common), - Plot("diffDzPV", xtitle="dz(PV) via PC", **_common), - Plot("diffTrackDxyAssocPV", xtitle="dxy(PV) via PC::bestTrack()", **_common), - Plot("diffTrackDzAssocPV", xtitle="dz(PV) via PC::bestTrack()", **_common), - Plot("diffTrackDxyError", xtitle="dxyError() via PC::bestTrack()", **_common), - Plot("diffTrackDzError", xtitle="dzError() via PC::besTTrack()", **_common), + Plot("diffDxyPV", xtitle="dxy(PV) via PC", **_commonLabelSize), + Plot("diffDzPV", xtitle="dz(PV) via PC", **_commonLabelSize), + Plot("diffTrackDxyAssocPV", xtitle="dxy(PV) via PC::bestTrack()", **_commonLabelSize), + Plot("diffTrackDzAssocPV", xtitle="dz(PV) via PC::bestTrack()", **_commonLabelSize), + Plot("diffTrackDxyError", xtitle="dxyError() via PC::bestTrack()", adjustMarginRight=0.02, **_commonLabelSize), + Plot("diffTrackDzError", xtitle="dzError() via PC::bestTrack()", **_commonLabelSize), ]) _packedCandidateCovarianceMatrix1 = PlotGroup("covarianceMatrix1", [ - Plot("diffCovQoverpQoverp", xtitle="cov(qoverp, qoverp)", **_common), + Plot("diffCovQoverpQoverp", xtitle="cov(qoverp, qoverp)", **_commonLabelSize), Plot("diffCovQoverpQoverpStatus", **_commonStatus), Plot("diffCovQoverpQoverpUnderOverFlowSign", xtitle="cov(qoverp, qoverp)", **_common), - Plot("diffCovLambdaLambda", xtitle="cov(lambda, lambda)", **_common), + Plot("diffCovLambdaLambda", xtitle="cov(lambda, lambda)", **_commonLabelSize), Plot("diffCovLambdaLambdaStatus", **_commonStatus), Plot("diffCovLambdaLambdaUnderOverFlowSign", xtitle="cov(lambda, lambda)", **_common), - Plot("diffCovLambdaDsz", xtitle="cov(lambda, dsz)", **_common), + Plot("diffCovLambdaDsz", xtitle="cov(lambda, dsz)", **_commonLabelSize), Plot("diffCovLambdaDszStatus", **_commonStatus), Plot("diffCovLambdaDszUnderOverFlowSign", xtitle="cov(lambda, dsz)", **_common), - Plot("diffCovPhiPhi", xtitle="cov(phi, phi)", **_common), + Plot("diffCovPhiPhi", xtitle="cov(phi, phi)", **_commonLabelSize), Plot("diffCovPhiPhiStatus", **_commonStatus), Plot("diffCovPhiPhiUnderOverFlowSign", xtitle="cov(phi, phi)", **_common), ], ncols=3, legendDy=_legendDy_4rows ) _packedCandidateCovarianceMatrix2 = PlotGroup("covarianceMatrix2", [ - Plot("diffCovPhiDxy", xtitle="cov(phi, dxy)", **_common), + Plot("diffCovPhiDxy", xtitle="cov(phi, dxy)", **_commonLabelSize), Plot("diffCovPhiDxyStatus", **_commonStatus), Plot("diffCovPhiDxyUnderOverFlowSign", xtitle="cov(phi, dxy)", **_common), - Plot("diffCovDxyDxy", xtitle="cov(dxy, dxy)", **_common), + Plot("diffCovDxyDxy", xtitle="cov(dxy, dxy)", adjustMarginRight=0.02, **_commonLabelSize), Plot("diffCovDxyDxyStatus", **_commonStatus), Plot("diffCovDxyDxyUnderOverFlowSign", xtitle="cov(dxy, dxy)", **_common), - Plot("diffCovDxyDsz", xtitle="cov(dxy, dsz)", **_common), + Plot("diffCovDxyDsz", xtitle="cov(dxy, dsz)", adjustMarginRight=0.02, **_commonLabelSize), Plot("diffCovDxyDszStatus", **_commonStatus), Plot("diffCovDxyDszUnderOverFlowSign", xtitle="cov(dxy, dsz)", **_common), - Plot("diffCovDszDsz", xtitle="cov(dsz, dsz)", **_common), + Plot("diffCovDszDsz", xtitle="cov(dsz, dsz)", adjustMarginRight=0.02, **_commonLabelSize), Plot("diffCovDszDszStatus", **_commonStatus), Plot("diffCovDszDszUnderOverFlowSign", xtitle="cov(dsz, dsz)", **_common), ], @@ -626,7 +633,6 @@ def _constructSummary(mapping=None, highPurity=False, byOriginalAlgo=False, byAl Plot("diffEta", xtitle="#eta", **_common), Plot("diffEtaError", xtitle="#eta error", **_common), Plot("diffPhi", xtitle="#phi", **_common), - Plot("diffPhiError", xtitle="#phi error", **_common), # currently missing? ]) class TrackingPlotFolder(PlotFolder): From 2fd386b5233fa67fcfe6ad103e820f3b7b123f4a Mon Sep 17 00:00:00 2001 From: Matti Kortelainen Date: Fri, 22 Jan 2016 13:43:06 +0100 Subject: [PATCH 149/250] Fix old-style iter7 --- Validation/RecoTrack/python/plotting/html.py | 2 ++ Validation/RecoTrack/python/plotting/trackingPlots.py | 1 + 2 files changed, 3 insertions(+) diff --git a/Validation/RecoTrack/python/plotting/html.py b/Validation/RecoTrack/python/plotting/html.py index 41209f906bb7c..803ab8086ad54 100644 --- a/Validation/RecoTrack/python/plotting/html.py +++ b/Validation/RecoTrack/python/plotting/html.py @@ -77,6 +77,7 @@ def _lowerFirst(s): "iter4" : "Iterative Step 4", "iter5" : "Iterative Step 5", "iter6" : "Iterative Step 6", + "iter7" : "Iterative Step 7", "iter9" : "Iterative Step 9", "iter10": "Iterative Step 10", } @@ -109,6 +110,7 @@ def _lowerFirst(s): 'iter4', 'iter5', 'iter6', + 'iter7', 'iter9', 'iter10', ] diff --git a/Validation/RecoTrack/python/plotting/trackingPlots.py b/Validation/RecoTrack/python/plotting/trackingPlots.py index 81a5b9b54baa7..864c8745203ba 100644 --- a/Validation/RecoTrack/python/plotting/trackingPlots.py +++ b/Validation/RecoTrack/python/plotting/trackingPlots.py @@ -321,6 +321,7 @@ "Fourth": "iter4", "Fifth" : "iter5", "Sixth" : "iter6", + "Seventh": "iter7", "Ninth" : "iter9", "Tenth" : "iter10", } From 18dd3f2d0253073a76b44c1246c30de0e8e50067 Mon Sep 17 00:00:00 2001 From: Michael Mulhearn Date: Wed, 27 Jan 2016 17:53:41 +0100 Subject: [PATCH 150/250] replace at function with [] operator --- L1Trigger/L1TGlobal/src/L1TGlobalUtil.cc | 72 ++++++++++++------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/L1Trigger/L1TGlobal/src/L1TGlobalUtil.cc b/L1Trigger/L1TGlobal/src/L1TGlobalUtil.cc index cb76b76d5e5b9..9ca5b5a03fd09 100644 --- a/L1Trigger/L1TGlobal/src/L1TGlobalUtil.cc +++ b/L1Trigger/L1TGlobal/src/L1TGlobalUtil.cc @@ -96,7 +96,7 @@ void l1t::L1TGlobalUtil::retrieveL1(const edm::Event& iEvent, const edm::EventSe m_PreScaleColumn = 1; } LogDebug("l1t|Global") << "Grabing prescale column "<< m_PreScaleColumn << endl; - const std::vector& prescaleSet = (*m_prescaleFactorsAlgoTrig).at(m_PreScaleColumn-1); + const std::vector& prescaleSet = (*m_prescaleFactorsAlgoTrig)[m_PreScaleColumn-1]; for (CItAlgo itAlgo = m_algorithmMap->begin(); itAlgo != m_algorithmMap->end(); itAlgo++) { @@ -105,13 +105,13 @@ void l1t::L1TGlobalUtil::retrieveL1(const edm::Event& iEvent, const edm::EventSe int algBit = (itAlgo->second).algoBitNumber(); (m_prescales[algBit]).first = algName; - (m_prescales[algBit]).second = prescaleSet.at(algBit); + (m_prescales[algBit]).second = prescaleSet[algBit]; (m_masks[algBit]).first = algName; - (m_masks[algBit]).second = m_triggerMaskAlgoTrig->at(algBit); + (m_masks[algBit]).second = (*m_triggerMaskAlgoTrig)[algBit]; (m_vetoMasks[algBit]).first = algName; - (m_vetoMasks[algBit]).second = m_triggerMaskVetoAlgoTrig->at(algBit); + (m_vetoMasks[algBit]).second = (*m_triggerMaskVetoAlgoTrig)[algBit]; } m_filledPrescales = true; @@ -327,14 +327,14 @@ void l1t::L1TGlobalUtil::resetDecisionVectors() { for(unsigned int algBit = 0; algBit< m_numberPhysTriggers; algBit++) { - (m_decisionsInitial.at(algBit)).first = "NULL"; - (m_decisionsInitial.at(algBit)).second = false; + (m_decisionsInitial[algBit]).first = "NULL"; + (m_decisionsInitial[algBit]).second = false; - (m_decisionsPrescaled.at(algBit)).first = "NULL"; - (m_decisionsPrescaled.at(algBit)).second = false; + (m_decisionsPrescaled[algBit]).first = "NULL"; + (m_decisionsPrescaled[algBit]).second = false; - (m_decisionsFinal.at(algBit)).first = "NULL"; - (m_decisionsFinal.at(algBit)).second = false; + (m_decisionsFinal[algBit]).first = "NULL"; + (m_decisionsFinal[algBit]).second = false; } @@ -349,8 +349,8 @@ void l1t::L1TGlobalUtil::resetPrescaleVectors() { for(unsigned int algBit = 0; algBit< m_numberPhysTriggers; algBit++) { - (m_prescales.at(algBit)).first = "NULL"; - (m_prescales.at(algBit)).second = 1; + (m_prescales[algBit]).first = "NULL"; + (m_prescales[algBit]).second = 1; } @@ -366,11 +366,11 @@ void l1t::L1TGlobalUtil::resetMaskVectors() { for(unsigned int algBit = 0; algBit< m_numberPhysTriggers; algBit++) { - (m_masks.at(algBit)).first = "NULL"; - (m_masks.at(algBit)).second = true; + (m_masks[algBit]).first = "NULL"; + (m_masks[algBit]).second = true; - (m_vetoMasks.at(algBit)).first = "NULL"; - (m_vetoMasks.at(algBit)).second = false; + (m_vetoMasks[algBit]).first = "NULL"; + (m_vetoMasks[algBit]).second = false; } @@ -390,8 +390,8 @@ const bool l1t::L1TGlobalUtil::getAlgBitFromName(const std::string& algName, int const bool l1t::L1TGlobalUtil::getAlgNameFromBit(int& bit, std::string& algName) const { // since we are just looking up the name, doesn't matter which vector we get it from - if((m_decisionsInitial.at(bit)).first != "NULL") { - algName = (m_decisionsInitial.at(bit)).first; + if((m_decisionsInitial[bit]).first != "NULL") { + algName = (m_decisionsInitial[bit]).first; return true; } return false; //No name associated with this bit @@ -406,8 +406,8 @@ const bool l1t::L1TGlobalUtil::getInitialDecisionByBit(int& bit, bool& decision) } */ // Need some check that this is a valid bit - if((m_decisionsInitial.at(bit)).first != "NULL") { - decision = (m_decisionsInitial.at(bit)).second; + if((m_decisionsInitial[bit]).first != "NULL") { + decision = (m_decisionsInitial[bit]).second; return true; } @@ -416,8 +416,8 @@ const bool l1t::L1TGlobalUtil::getInitialDecisionByBit(int& bit, bool& decision) const bool l1t::L1TGlobalUtil::getPrescaledDecisionByBit(int& bit, bool& decision) const { // Need some check that this is a valid bit - if((m_decisionsPrescaled.at(bit)).first != "NULL") { - decision = (m_decisionsPrescaled.at(bit)).second; + if((m_decisionsPrescaled[bit]).first != "NULL") { + decision = (m_decisionsPrescaled[bit]).second; return true; } @@ -426,8 +426,8 @@ const bool l1t::L1TGlobalUtil::getPrescaledDecisionByBit(int& bit, bool& decisio const bool l1t::L1TGlobalUtil::getFinalDecisionByBit(int& bit, bool& decision) const { // Need some check that this is a valid bit - if((m_decisionsFinal.at(bit)).first != "NULL") { - decision = (m_decisionsFinal.at(bit)).second; + if((m_decisionsFinal[bit]).first != "NULL") { + decision = (m_decisionsFinal[bit]).second; return true; } @@ -436,8 +436,8 @@ const bool l1t::L1TGlobalUtil::getFinalDecisionByBit(int& bit, bool& decision) c const bool l1t::L1TGlobalUtil::getPrescaleByBit(int& bit, int& prescale) const { // Need some check that this is a valid bit - if((m_prescales.at(bit)).first != "NULL") { - prescale = (m_prescales.at(bit)).second; + if((m_prescales[bit]).first != "NULL") { + prescale = (m_prescales[bit]).second; return true; } @@ -446,8 +446,8 @@ const bool l1t::L1TGlobalUtil::getPrescaleByBit(int& bit, int& prescale) const { const bool l1t::L1TGlobalUtil::getMaskByBit(int& bit, bool& mask) const { // Need some check that this is a valid bit - if((m_masks.at(bit)).first != "NULL") { - mask = (m_masks.at(bit)).second; + if((m_masks[bit]).first != "NULL") { + mask = (m_masks[bit]).second; return true; } @@ -457,8 +457,8 @@ const bool l1t::L1TGlobalUtil::getMaskByBit(int& bit, bool& mask) const { const bool l1t::L1TGlobalUtil::getVetoMaskByBit(int& bit, bool& veto) const { // Need some check that this is a valid bit - if((m_vetoMasks.at(bit)).first != "NULL") { - veto = (m_vetoMasks.at(bit)).second; + if((m_vetoMasks[bit]).first != "NULL") { + veto = (m_vetoMasks[bit]).second; return true; } @@ -469,7 +469,7 @@ const bool l1t::L1TGlobalUtil::getInitialDecisionByName(const std::string& algNa int bit = -1; if(getAlgBitFromName(algName,bit)) { - decision = (m_decisionsInitial.at(bit)).second; + decision = (m_decisionsInitial[bit]).second; return true; } @@ -480,7 +480,7 @@ const bool l1t::L1TGlobalUtil::getPrescaledDecisionByName(const std::string& alg int bit = -1; if(getAlgBitFromName(algName,bit)) { - decision = (m_decisionsPrescaled.at(bit)).second; + decision = (m_decisionsPrescaled[bit]).second; return true; } @@ -491,7 +491,7 @@ const bool l1t::L1TGlobalUtil::getFinalDecisionByName(const std::string& algName int bit = -1; if(getAlgBitFromName(algName,bit)) { - decision = (m_decisionsFinal.at(bit)).second; + decision = (m_decisionsFinal[bit]).second; return true; } @@ -501,7 +501,7 @@ const bool l1t::L1TGlobalUtil::getPrescaleByName(const std::string& algName, int int bit = -1; if(getAlgBitFromName(algName,bit)) { - prescale = (m_prescales.at(bit)).second; + prescale = (m_prescales[bit]).second; return true; } @@ -511,7 +511,7 @@ const bool l1t::L1TGlobalUtil::getMaskByName(const std::string& algName, bool& m int bit = -1; if(getAlgBitFromName(algName,bit)) { - mask = (m_masks.at(bit)).second; + mask = (m_masks[bit]).second; return true; } @@ -521,7 +521,7 @@ const bool l1t::L1TGlobalUtil::getVetoMaskByName(const std::string& algName, boo int bit = -1; if(getAlgBitFromName(algName,bit)) { - veto = (m_vetoMasks.at(bit)).second; + veto = (m_vetoMasks[bit]).second; return true; } From 1974d70d080d57e64f9e6a99f1a762c3ccc5e5ee Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Wed, 27 Jan 2016 21:01:09 -0600 Subject: [PATCH 151/250] Fix initialization of metric name to be source name. --- Utilities/XrdAdaptor/src/XrdSource.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Utilities/XrdAdaptor/src/XrdSource.cc b/Utilities/XrdAdaptor/src/XrdSource.cc index f5fbab8772ace..247be8d1d7722 100644 --- a/Utilities/XrdAdaptor/src/XrdSource.cc +++ b/Utilities/XrdAdaptor/src/XrdSource.cc @@ -82,7 +82,6 @@ Source::Source(timespec now, std::unique_ptr fh, const std::string m_id("(unknown)"), m_exclude(exclude), m_fh(std::move(fh)), - m_qm(QualityMetricFactory::get(now, m_id)), m_stats(nullptr) #ifdef XRD_FAKE_SLOW , m_slow(++g_delayCount % XRD_SLOW_RATE == 0) @@ -99,6 +98,7 @@ Source::Source(timespec now, std::unique_ptr fh, const std::string } if (!m_exclude.size()) {m_exclude = m_id;} } + m_qm = QualityMetricFactory::get(now, m_id); m_prettyid = m_id + " (unknown site)"; std::string domain_id; if (getDomain(m_id, domain_id)) {m_site = domain_id;} From 8ff98e505c9ff5dbde09443edd752661be81a131 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Wed, 27 Jan 2016 21:01:41 -0600 Subject: [PATCH 152/250] Switch from hash_map to unordered_map. --- Utilities/XrdAdaptor/src/QualityMetric.cc | 27 +++++++++++++---------- Utilities/XrdAdaptor/src/QualityMetric.h | 6 ++--- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/Utilities/XrdAdaptor/src/QualityMetric.cc b/Utilities/XrdAdaptor/src/QualityMetric.cc index baef1a0035797..c50ed877665b1 100644 --- a/Utilities/XrdAdaptor/src/QualityMetric.cc +++ b/Utilities/XrdAdaptor/src/QualityMetric.cc @@ -152,26 +152,29 @@ QualityMetric::get() return m_value; } -QualityMetricFactory * QualityMetricFactory::m_instance = new QualityMetricFactory(); + +std::unique_ptr QualityMetricFactory::m_instance = std::make_unique(); + std::unique_ptr QualityMetricFactory::get(timespec now, const std::string &id) { - MetricMap::accessor access; - m_instance->m_sources.insert(access, std::make_pair(id, nullptr)); - QualityMetricUniqueSource *source; - if (access->second == nullptr) + auto itFound = m_instance->m_sources.find(id); + if (itFound == m_instance->m_sources.end()) { - source = new QualityMetricUniqueSource(now); - access->second = source; - } - else - { - source = access->second; + // try to make a new one + std::unique_ptr source(new QualityMetricUniqueSource(now)); + auto insertResult = m_instance->m_sources.insert(std::make_pair(id, source.get())); + itFound = insertResult.first; + if (insertResult.second) + { // We raced with a different thread for insertion (and the other thread won). + source.release(); + } } - return source->newSource(now); + return itFound->second->newSource(now); } + QualityMetricSource::QualityMetricSource(QualityMetricUniqueSource &parent, timespec now, int default_value) : QualityMetric(now, default_value), m_parent(parent) diff --git a/Utilities/XrdAdaptor/src/QualityMetric.h b/Utilities/XrdAdaptor/src/QualityMetric.h index bd71820646759..6534300b029d4 100644 --- a/Utilities/XrdAdaptor/src/QualityMetric.h +++ b/Utilities/XrdAdaptor/src/QualityMetric.h @@ -6,7 +6,7 @@ #include #include -#include "tbb/concurrent_hash_map.h" +#include "tbb/concurrent_unordered_map.h" #include namespace XrdAdaptor { @@ -64,9 +64,9 @@ friend class Source; static std::unique_ptr get(timespec now, const std::string &id); - static QualityMetricFactory *m_instance; + static std::unique_ptr m_instance; - typedef tbb::concurrent_hash_map MetricMap; + typedef tbb::concurrent_unordered_map MetricMap; MetricMap m_sources; }; From 006398c4d34d384f4b1a6b127e62d5bbb139e042 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Wed, 27 Jan 2016 21:46:20 -0600 Subject: [PATCH 153/250] Small fixups of thread-safety issues from static analysis. --- Utilities/XrdAdaptor/src/QualityMetric.cc | 2 +- Utilities/XrdAdaptor/src/QualityMetric.h | 2 +- Utilities/XrdAdaptor/src/XrdRequest.cc | 7 ++++--- Utilities/XrdAdaptor/src/XrdRequestManager.cc | 2 +- Utilities/XrdAdaptor/src/XrdSource.cc | 5 +++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Utilities/XrdAdaptor/src/QualityMetric.cc b/Utilities/XrdAdaptor/src/QualityMetric.cc index c50ed877665b1..07554eccf055d 100644 --- a/Utilities/XrdAdaptor/src/QualityMetric.cc +++ b/Utilities/XrdAdaptor/src/QualityMetric.cc @@ -153,7 +153,7 @@ QualityMetric::get() } -std::unique_ptr QualityMetricFactory::m_instance = std::make_unique(); +[[cms::thread_safe]] std::unique_ptr QualityMetricFactory::m_instance = std::make_unique(); std::unique_ptr diff --git a/Utilities/XrdAdaptor/src/QualityMetric.h b/Utilities/XrdAdaptor/src/QualityMetric.h index 6534300b029d4..f280bd8fb85e8 100644 --- a/Utilities/XrdAdaptor/src/QualityMetric.h +++ b/Utilities/XrdAdaptor/src/QualityMetric.h @@ -64,7 +64,7 @@ friend class Source; static std::unique_ptr get(timespec now, const std::string &id); - static std::unique_ptr m_instance; + [[cms::thread_safe]] static std::unique_ptr m_instance; typedef tbb::concurrent_unordered_map MetricMap; MetricMap m_sources; diff --git a/Utilities/XrdAdaptor/src/XrdRequest.cc b/Utilities/XrdAdaptor/src/XrdRequest.cc index 6d4d5d3111c5f..c46077aa34b7b 100644 --- a/Utilities/XrdAdaptor/src/XrdRequest.cc +++ b/Utilities/XrdAdaptor/src/XrdRequest.cc @@ -1,4 +1,5 @@ +#include #include #include "FWCore/MessageLogger/interface/MessageLogger.h" @@ -11,10 +12,10 @@ using namespace XrdAdaptor; // If you define XRD_FAKE_ERROR, 1/5 read requests should fail. #ifdef XRD_FAKE_ERROR #define FAKE_ERROR_COUNTER 5 -int g_fakeError = 0; +static std::atomic g_fakeError {0}; #else #define FAKE_ERROR_COUNTER 0 -int g_fakeError = 0; +static std::atomic g_fakeError {0}; #endif XrdAdaptor::ClientRequest::~ClientRequest() {} @@ -82,7 +83,7 @@ XrdAdaptor::ClientRequest::HandleResponse(XrdCl::XRootDStatus *stat, XrdCl::AnyO m_promise.set_exception(std::current_exception()); edm::LogWarning("XrdAdaptorInternal") << "Caught a CMSSW exception when running connection recovery."; } - catch (...) + catch (std::exception) { edm::Exception ex(edm::errors::FileReadError); ex << "XrdRequestManager::handle(name='" << m_manager.getFilename() diff --git a/Utilities/XrdAdaptor/src/XrdRequestManager.cc b/Utilities/XrdAdaptor/src/XrdRequestManager.cc index fc656c7d44c03..7968668bc1b8d 100644 --- a/Utilities/XrdAdaptor/src/XrdRequestManager.cc +++ b/Utilities/XrdAdaptor/src/XrdRequestManager.cc @@ -84,7 +84,7 @@ class SendMonitoringInfoHandler : boost::noncopyable, public XrdCl::ResponseHand } }; -SendMonitoringInfoHandler nullHandler; +[[cms::thread_safe]] SendMonitoringInfoHandler nullHandler; static void diff --git a/Utilities/XrdAdaptor/src/XrdSource.cc b/Utilities/XrdAdaptor/src/XrdSource.cc index 247be8d1d7722..234203a9fc230 100644 --- a/Utilities/XrdAdaptor/src/XrdSource.cc +++ b/Utilities/XrdAdaptor/src/XrdSource.cc @@ -3,6 +3,7 @@ #define _GLIBCXX_USE_NANOSLEEP #include #include +#include #include #include #include @@ -23,9 +24,9 @@ //#define XRD_DELAY 5140 #define XRD_DELAY 1000 #define XRD_SLOW_RATE 2 -int g_delayCount = 0; +std::atomic g_delayCount {0}; #else -int g_delayCount = 0; +std::atomic g_delayCount {0}; #endif using namespace XrdAdaptor; From 88665978c41497d78c13ab9a69227aea8eeeaf77 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Wed, 27 Jan 2016 22:30:26 -0600 Subject: [PATCH 154/250] Use C++11 equivalent of boost::noncopyable. --- Utilities/XrdAdaptor/src/XrdSource.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Utilities/XrdAdaptor/src/XrdSource.cc b/Utilities/XrdAdaptor/src/XrdSource.cc index 02c4d3b9b0fb0..8b6b41fd268f8 100644 --- a/Utilities/XrdAdaptor/src/XrdSource.cc +++ b/Utilities/XrdAdaptor/src/XrdSource.cc @@ -82,11 +82,13 @@ class DelayedClose : boost::noncopyable, public XrdCl::ResponseHandler * invoked from an XrdCl callback (that is, we don't need an available callback * thread to timeout). */ -class QueryAttrHandler : boost::noncopyable, public XrdCl::ResponseHandler +class QueryAttrHandler : public XrdCl::ResponseHandler { public: - virtual ~QueryAttrHandler() {} + virtual ~QueryAttrHandler = default; + QueryAttrHandler(const QueryAttrHandler&) = delete; + QueryAttrHandler& operator=(const QueryAttrHandler&) = delete; static XrdCl::XRootDStatus query(XrdCl::FileSystem &fs, const std::string &attr, std::chrono::milliseconds timeout, std::string &result) From 20926bd2fd72b1ab994bbf26f4ef5212aad465f6 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Thu, 28 Jan 2016 10:30:52 +0100 Subject: [PATCH 155/250] switch few branches from float to double to behave exactly as before --- .../plugins/SiStripGainFromCalibTree.cc | 36 +++++++++++++------ .../plugins/ShallowGainCalibration.cc | 20 +++++------ 2 files changed, 35 insertions(+), 21 deletions(-) diff --git a/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc b/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc index 54737145590af..fd698e9a408c0 100644 --- a/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc +++ b/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc @@ -76,7 +76,8 @@ #include - +#include +#include using namespace edm; using namespace reco; @@ -217,17 +218,17 @@ class SiStripGainFromCalibTree : public ConditionDBWriter { const std::vector* trackindex = 0; edm::EDGetTokenT > trackindex_token_; const std::vector* rawid = 0; edm::EDGetTokenT > rawid_token_; - const std::vector* localdirx = 0; edm::EDGetTokenT > localdirx_token_; - const std::vector* localdiry = 0; edm::EDGetTokenT > localdiry_token_; - const std::vector* localdirz = 0; edm::EDGetTokenT > localdirz_token_; + const std::vector* localdirx = 0; edm::EDGetTokenT > localdirx_token_; + const std::vector* localdiry = 0; edm::EDGetTokenT > localdiry_token_; + const std::vector* localdirz = 0; edm::EDGetTokenT > localdirz_token_; const std::vector* firststrip = 0; edm::EDGetTokenT > firststrip_token_; const std::vector* nstrips = 0; edm::EDGetTokenT > nstrips_token_; const std::vector* saturation = 0; edm::EDGetTokenT > saturation_token_; const std::vector* overlapping = 0; edm::EDGetTokenT > overlapping_token_; const std::vector* farfromedge = 0; edm::EDGetTokenT > farfromedge_token_; const std::vector* charge = 0; edm::EDGetTokenT > charge_token_; - const std::vector* path = 0; edm::EDGetTokenT > path_token_; - const std::vector* chargeoverpath = 0; edm::EDGetTokenT > chargeoverpath_token_; + const std::vector* path = 0; edm::EDGetTokenT > path_token_; + const std::vector* chargeoverpath = 0; edm::EDGetTokenT > chargeoverpath_token_; const std::vector* amplitude = 0; edm::EDGetTokenT > amplitude_token_; const std::vector* gainused = 0; edm::EDGetTokenT > gainused_token_; @@ -306,17 +307,17 @@ SiStripGainFromCalibTree::SiStripGainFromCalibTree(const edm::ParameterSet& iCon trackindex_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "trackindex" + CalibSuffix_)); rawid_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "rawid" + CalibSuffix_)); - localdirx_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "localdirx" + CalibSuffix_)); - localdiry_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "localdiry" + CalibSuffix_)); - localdirz_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "localdirz" + CalibSuffix_)); + localdirx_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "localdirx" + CalibSuffix_)); + localdiry_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "localdiry" + CalibSuffix_)); + localdirz_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "localdirz" + CalibSuffix_)); firststrip_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "firststrip" + CalibSuffix_)); nstrips_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "nstrips" + CalibSuffix_)); saturation_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "saturation" + CalibSuffix_)); overlapping_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "overlapping" + CalibSuffix_)); farfromedge_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "farfromedge" + CalibSuffix_)); charge_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "charge" + CalibSuffix_)); - path_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "path" + CalibSuffix_)); - chargeoverpath_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "chargeoverpath"+ CalibSuffix_)); + path_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "path" + CalibSuffix_)); + chargeoverpath_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "chargeoverpath"+ CalibSuffix_)); amplitude_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "amplitude" + CalibSuffix_)); gainused_token_ = consumes >(edm::InputTag(label, CalibPrefix_ + "gainused" + CalibSuffix_)); @@ -671,6 +672,14 @@ void SiStripGainFromCalibTree::processEvent() { if(OldGainRemoving){ClusterChargeOverPath*=(*gainused)[i];} } Charge_Vs_Index_Absolute->Fill(APV->Index,Charge); + + // int xbin = Charge_Vs_Index->getTH2F()->GetXaxis()->FindBin(APV->Index); + // int ybin = Charge_Vs_Index->getTH2F()->GetYaxis()->FindBin(ClusterChargeOverPath); + // if(xbin == 3322 && (ybin == 215 || ybin == 216)) + // cout << endl << endl << endl << + // setprecision(numeric_limits< double >::max_digits10) << ClusterChargeOverPath << " --> (" << xbin <<", " << ybin << ")" << endl << + // "Charge: " << Charge << " Path: " << setprecision(numeric_limits< double >::max_digits10) << (*path)[i] << + // endl << endl << endl; Charge_Vs_Index ->Fill(APV->Index,ClusterChargeOverPath); if(APV->SubDet==StripSubdetector::TIB){ Charge_Vs_PathlengthTIB ->Fill((*path)[i],Charge); @@ -1037,6 +1046,11 @@ SiStripGainFromCalibTree::algoAnalyze(const edm::Event& iEvent, const edm::Event auto handle23 = connect(amplitude , amplitude_token_ , iEvent); auto handle24 = connect(gainused , gainused_token_ , iEvent); + // std::cout << "new event! " << + // " # tracks: " << trackp->size() << std::endl << + // " # clusters: " << firststrip->size() << std::endl; + + processEvent(); } diff --git a/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc b/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc index c29d9dfe0d026..62b09d58666cd 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowGainCalibration.cc @@ -14,17 +14,17 @@ ShallowGainCalibration::ShallowGainCalibration(const edm::ParameterSet& iConfig) { produces > ( Prefix + "trackindex" + Suffix ); produces > ( Prefix + "rawid" + Suffix ); - produces > ( Prefix + "localdirx" + Suffix ); - produces > ( Prefix + "localdiry" + Suffix ); - produces > ( Prefix + "localdirz" + Suffix ); + produces > ( Prefix + "localdirx" + Suffix ); + produces > ( Prefix + "localdiry" + Suffix ); + produces > ( Prefix + "localdirz" + Suffix ); produces > ( Prefix + "firststrip" + Suffix ); produces > ( Prefix + "nstrips" + Suffix ); produces > ( Prefix + "saturation" + Suffix ); produces > ( Prefix + "overlapping" + Suffix ); produces > ( Prefix + "farfromedge" + Suffix ); produces > ( Prefix + "charge" + Suffix ); - produces > ( Prefix + "path" + Suffix ); - produces > ( Prefix + "chargeoverpath" + Suffix ); + produces > ( Prefix + "path" + Suffix ); + produces > ( Prefix + "chargeoverpath" + Suffix ); produces > ( Prefix + "amplitude" + Suffix ); produces > ( Prefix + "gainused" + Suffix ); produces > ( Prefix + "gainusedTick" + Suffix ); @@ -34,17 +34,17 @@ void ShallowGainCalibration:: produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { std::auto_ptr > trackindex ( new std::vector ); std::auto_ptr > rawid ( new std::vector ); - std::auto_ptr > localdirx ( new std::vector ); - std::auto_ptr > localdiry ( new std::vector ); - std::auto_ptr > localdirz ( new std::vector ); + std::auto_ptr > localdirx ( new std::vector ); + std::auto_ptr > localdiry ( new std::vector ); + std::auto_ptr > localdirz ( new std::vector ); std::auto_ptr > firststrip ( new std::vector ); std::auto_ptr > nstrips ( new std::vector ); std::auto_ptr > saturation ( new std::vector ); std::auto_ptr > overlapping ( new std::vector ); std::auto_ptr > farfromedge ( new std::vector ); std::auto_ptr > charge ( new std::vector ); - std::auto_ptr > path ( new std::vector ); - std::auto_ptr > chargeoverpath( new std::vector ); + std::auto_ptr > path ( new std::vector ); + std::auto_ptr > chargeoverpath( new std::vector ); std::auto_ptr > amplitude ( new std::vector ); std::auto_ptr > gainused ( new std::vector ); std::auto_ptr > gainusedTick ( new std::vector ); From 7a413a94e43879d3cbb9ff64247df7418a8afcb4 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Thu, 28 Jan 2016 10:51:48 +0100 Subject: [PATCH 156/250] code cleanup --- .../plugins/SiStripGainFromCalibTree.cc | 16 ---------------- .../ALCARECOPromptCalibProdSiStripGains_cff.py | 1 - 2 files changed, 17 deletions(-) diff --git a/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc b/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc index fd698e9a408c0..d5458e73c0c99 100644 --- a/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc +++ b/CalibTracker/SiStripChannelGain/plugins/SiStripGainFromCalibTree.cc @@ -76,9 +76,6 @@ #include -#include -#include - using namespace edm; using namespace reco; using namespace std; @@ -672,14 +669,6 @@ void SiStripGainFromCalibTree::processEvent() { if(OldGainRemoving){ClusterChargeOverPath*=(*gainused)[i];} } Charge_Vs_Index_Absolute->Fill(APV->Index,Charge); - - // int xbin = Charge_Vs_Index->getTH2F()->GetXaxis()->FindBin(APV->Index); - // int ybin = Charge_Vs_Index->getTH2F()->GetYaxis()->FindBin(ClusterChargeOverPath); - // if(xbin == 3322 && (ybin == 215 || ybin == 216)) - // cout << endl << endl << endl << - // setprecision(numeric_limits< double >::max_digits10) << ClusterChargeOverPath << " --> (" << xbin <<", " << ybin << ")" << endl << - // "Charge: " << Charge << " Path: " << setprecision(numeric_limits< double >::max_digits10) << (*path)[i] << - // endl << endl << endl; Charge_Vs_Index ->Fill(APV->Index,ClusterChargeOverPath); if(APV->SubDet==StripSubdetector::TIB){ Charge_Vs_PathlengthTIB ->Fill((*path)[i],Charge); @@ -1046,11 +1035,6 @@ SiStripGainFromCalibTree::algoAnalyze(const edm::Event& iEvent, const edm::Event auto handle23 = connect(amplitude , amplitude_token_ , iEvent); auto handle24 = connect(gainused , gainused_token_ , iEvent); - // std::cout << "new event! " << - // " # tracks: " << trackp->size() << std::endl << - // " # clusters: " << firststrip->size() << std::endl; - - processEvent(); } diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py index a51f2c1e10b1d..72c07a6775d34 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOPromptCalibProdSiStripGains_cff.py @@ -75,7 +75,6 @@ from CalibTracker.SiStripChannelGain.computeGain_cff import SiStripCalib ALCARECOSiStripCalib = SiStripCalib.clone() ALCARECOSiStripCalib.AlgoMode = cms.untracked.string('PCL') -ALCARECOSiStripCalib.Tracks = cms.untracked.InputTag('ALCARECOCalibrationTracksRefit') ALCARECOSiStripCalib.FirstSetOfConstants = cms.untracked.bool(False) ALCARECOSiStripCalib.harvestingMode = cms.untracked.bool(False) ALCARECOSiStripCalib.doStoreOnDB = cms.bool(False) From 0d1b1ecad8dbd4e7014e475eafb9a1b42bf7c4e7 Mon Sep 17 00:00:00 2001 From: Alessandro Di Mattia Date: Thu, 28 Jan 2016 11:28:00 +0100 Subject: [PATCH 157/250] Fix in ShallowClusterProducer.h --- CalibTracker/SiStripCommon/interface/ShallowClustersProducer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CalibTracker/SiStripCommon/interface/ShallowClustersProducer.h b/CalibTracker/SiStripCommon/interface/ShallowClustersProducer.h index 8f926a95deecd..5e8ed51c3c842 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowClustersProducer.h +++ b/CalibTracker/SiStripCommon/interface/ShallowClustersProducer.h @@ -36,7 +36,7 @@ class ShallowClustersProducer : public edm::EDProducer { NearDigis(const SiStripClusterInfo&); NearDigis(const SiStripClusterInfo&, const edm::DetSetVector&); float max, left, right, first, last, Lleft, Rright; - float etaX() const {return (left+right)/max/2.;} + float etaX() const {return ((left+right)/max)/2.;} float eta() const {return right>left ? max/(max+right) : left/(left+max);} float etaasymm() const {return right>left ? (right-max)/(right+max) : (max-left)/(max+left);} float outsideasymm() const {return (last-first)/(last+first);} From 75a9bea65f2a6cd87e2c3429a513370da28decad Mon Sep 17 00:00:00 2001 From: Suchandra Date: Thu, 28 Jan 2016 14:41:06 +0100 Subject: [PATCH 158/250] argument changed from std::string to const std::string& in TrackerGeometry::moduleType --- Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h | 2 +- Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h b/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h index c4a043be84505..170ceb7296001 100644 --- a/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h +++ b/Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h @@ -65,7 +65,7 @@ class TrackerGeometry final : public TrackingGeometry { void setEndsetDU(SubDetector sid) { theEndsetDU[sid]=detUnits().size();} void fillTestMap(const GeometricDet* gd); - ModuleType moduleType(std::string name) const; + ModuleType moduleType(const std::string& name) const; GeometricDet const * trackerDet() const {return theTrackerDet;} diff --git a/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc b/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc index 78343eebead04..1a44d5b476688 100644 --- a/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc +++ b/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc @@ -337,7 +337,7 @@ float TrackerGeometry::getDetectorThickness(DetId detid) const { return -1.0; } -TrackerGeometry::ModuleType TrackerGeometry::moduleType(std::string name) const { +TrackerGeometry::ModuleType TrackerGeometry::moduleType(const std::string& name) const { if ( name.find("PixelBarrel") != std::string::npos) return ModuleType::Ph1PXB; else if (name.find("PixelForward") != std::string::npos) return ModuleType::Ph1PXF; else if ( name.find("TIB") != std::string::npos) { From 0f1406afe506540eb961142ba393feeb2e24883a Mon Sep 17 00:00:00 2001 From: Raphael Friese Date: Thu, 28 Jan 2016 15:37:15 +0100 Subject: [PATCH 159/250] change to new JetCorrector, old one is not supported any more --- .../plugins/PFMETProducerMVA.cc | 17 ++++++++--------- .../METPUSubtraction/plugins/PFMETProducerMVA.h | 7 ++++--- RecoMET/METPUSubtraction/python/mvaPFMET_cff.py | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc b/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc index 67cb83cf749d3..b0b36de55386c 100644 --- a/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc +++ b/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.cc @@ -16,19 +16,16 @@ PFMETProducerMVA::PFMETProducerMVA(const edm::ParameterSet& cfg) srcPFCandidatesView_ = consumes(cfg.getParameter("srcPFCandidates")); srcVertices_ = consumes(cfg.getParameter("srcVertices")); vInputTag srcLeptonsTags = cfg.getParameter("srcLeptons"); - edm::InputTag srcRho = ( cfg.exists("srcRho") ) ? cfg.getParameter("srcRho") : (edm::InputTag("fixedGridRhoFastjetAll")); - consumes(srcRho); for(vInputTag::const_iterator it=srcLeptonsTags.begin();it!=srcLeptonsTags.end();it++) { srcLeptons_.push_back( consumes( *it ) ); } - + mJetCorrector_ = consumes(cfg.getParameter("corrector")); minNumLeptons_ = cfg.getParameter("minNumLeptons"); globalThreshold_ = cfg.getParameter("globalThreshold"); minCorrJetPt_ = cfg.getParameter ("minCorrJetPt"); useType1_ = cfg.getParameter ("useType1"); - correctorLabel_ = cfg.getParameter("corrector"); verbosity_ = ( cfg.exists("verbosity") ) ? cfg.getParameter("verbosity") : 0; @@ -74,8 +71,11 @@ void PFMETProducerMVA::produce(edm::Event& evt, const edm::EventSetup& es) edm::Handle uncorrJets; evt.getByToken(srcUncorrJets_, uncorrJets); - const JetCorrector* corrector = nullptr; - if( useType1_ ) corrector = JetCorrector::getJetCorrector(correctorLabel_, es); + edm::Handle corrector; + if( useType1_ ) + { + evt.getByToken(mJetCorrector_, corrector); + } edm::Handle pfCandidates_view; evt.getByToken(srcPFCandidatesView_, pfCandidates_view); @@ -193,10 +193,9 @@ PFMETProducerMVA::computeJetInfo(const reco::PFJetCollection& uncorrJets, const edm::ValueMap& jetIds, const reco::VertexCollection& vertices, const reco::Vertex* hardScatterVertex, - const JetCorrector &iCorrector,edm::Event &iEvent,const edm::EventSetup &iSetup, + const reco::JetCorrector &iCorrector,edm::Event &iEvent,const edm::EventSetup &iSetup, std::vector &iLeptons,std::vector &iCands) { - const L1FastjetCorrector* lCorrector = dynamic_cast(&iCorrector); std::vector retVal; for ( reco::PFJetCollection::const_iterator uncorrJet = uncorrJets.begin(); uncorrJet != uncorrJets.end(); ++uncorrJet ) { @@ -222,7 +221,7 @@ PFMETProducerMVA::computeJetInfo(const reco::PFJetCollection& uncorrJets, jetInfo.setP4( corrJet->p4() ); double lType1Corr = 0; if(useType1_) { //Compute the type 1 correction ===> This code is crap - double pCorr = lCorrector->correction(*uncorrJet,iEvent,iSetup); + double pCorr = iCorrector.correction(*uncorrJet); lType1Corr = std::abs(corrJet->pt()-pCorr*uncorrJet->pt()); TLorentzVector pVec; pVec.SetPtEtaPhiM(lType1Corr,0,corrJet->phi(),0); reco::Candidate::LorentzVector pType1Corr; pType1Corr.SetCoordinates(pVec.Px(),pVec.Py(),pVec.Pz(),pVec.E()); diff --git a/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.h b/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.h index 824144f747d47..4e7d9cc39957f 100644 --- a/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.h +++ b/RecoMET/METPUSubtraction/plugins/PFMETProducerMVA.h @@ -30,7 +30,7 @@ #include "DataFormats/PatCandidates/interface/Tau.h" #include "DataFormats/VertexReco/interface/Vertex.h" -#include "JetMETCorrections/Algorithms/interface/L1FastjetCorrector.h" +#include "JetMETCorrections/JetCorrector/interface/JetCorrector.h" #include "RecoMET/METAlgorithms/interface/METAlgo.h" #include "RecoMET/METAlgorithms/interface/PFSpecificAlgo.h" @@ -38,6 +38,7 @@ #include "RecoMET/METPUSubtraction/interface/MvaMEtUtilities.h" #include "RecoJets/JetProducers/interface/PileupJetIdAlgo.h" +#include namespace reco { @@ -60,7 +61,7 @@ namespace reco std::vector computeJetInfo(const reco::PFJetCollection&, const edm::Handle&, const edm::ValueMap&, const reco::VertexCollection&, - const reco::Vertex*, const JetCorrector &iCorr, + const reco::Vertex*, const reco::JetCorrector &iCorr, edm::Event & iEvent,const edm::EventSetup &iSetup, std::vector &iLeptons, std::vector &iCands); @@ -80,11 +81,11 @@ namespace reco //edm::EDGetTokenT srcPFCandidates_; edm::EDGetTokenT > srcPFCandidatesView_; edm::EDGetTokenT srcVertices_; + edm::EDGetTokenT mJetCorrector_; typedef std::vector vInputTag; std::vector > srcLeptons_; int minNumLeptons_; // CV: option to skip MVA MET computation in case there are less than specified number of leptons in the event - std::string correctorLabel_; bool useType1_; double globalThreshold_; diff --git a/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py b/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py index 199344024be47..e5057b1d5a620 100644 --- a/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py +++ b/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py @@ -83,7 +83,7 @@ ), loadMVAfromDB = cms.bool(False), - corrector = cms.string("ak4PFL1Fastjet"), + corrector = cms.InputTag("ak4PFL1FastjetCorrector"), useType1 = cms.bool(True), dZcut = cms.double(0.1), From b408a53ccfb6d883f971a9a5ba135987665e1131 Mon Sep 17 00:00:00 2001 From: Thomas Lenzi Date: Thu, 28 Jan 2016 15:57:46 +0100 Subject: [PATCH 160/250] Added RecHits to the PR for CMSSW_8_0_X --- DataFormats/Phase2TrackerRecHit/BuildFile.xml | 5 + .../interface/Phase2TrackerRecHit1D.h | 33 +++ DataFormats/Phase2TrackerRecHit/src/classes.h | 18 ++ .../Phase2TrackerRecHit/src/classes_def.xml | 12 + .../interface/ClusterParameterEstimator.h | 46 +++ .../Phase2TrackerRecHits/BuildFile.xml | 8 + .../interface/Phase2StripCPEDummy.h | 20 ++ .../plugins/BuildFile.xml | 7 + .../plugins/Phase2StripCPEESProducer.cc | 34 +++ .../plugins/Phase2StripCPEESProducer.h | 36 +++ .../plugins/Phase2TrackerRecHits.cc | 79 +++++ .../plugins/Phase2TrackerRecHits.h | 34 +++ .../python/Phase2StripCPEESProducer_cfi.py | 6 + .../python/Phase2TrackerRecHits_cfi.py | 9 + .../src/Phase2StripCPEDummy.cc | 17 ++ .../Phase2TrackerRecHits/test/BuildFile.xml | 28 ++ .../test/RecHitsValidation.cc | 276 ++++++++++++++++++ .../test/RecHitsValidationTest_cfg.py | 68 +++++ 18 files changed, 736 insertions(+) create mode 100644 DataFormats/Phase2TrackerRecHit/BuildFile.xml create mode 100644 DataFormats/Phase2TrackerRecHit/interface/Phase2TrackerRecHit1D.h create mode 100755 DataFormats/Phase2TrackerRecHit/src/classes.h create mode 100644 DataFormats/Phase2TrackerRecHit/src/classes_def.xml create mode 100644 RecoLocalTracker/ClusterParameterEstimator/interface/ClusterParameterEstimator.h create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/BuildFile.xml create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/plugins/BuildFile.xml create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.cc create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.h create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.cc create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.h create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/python/Phase2StripCPEESProducer_cfi.py create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/python/Phase2TrackerRecHits_cfi.py create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/src/Phase2StripCPEDummy.cc create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/test/BuildFile.xml create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidation.cc create mode 100644 RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidationTest_cfg.py diff --git a/DataFormats/Phase2TrackerRecHit/BuildFile.xml b/DataFormats/Phase2TrackerRecHit/BuildFile.xml new file mode 100644 index 0000000000000..169edbb34d6d4 --- /dev/null +++ b/DataFormats/Phase2TrackerRecHit/BuildFile.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/DataFormats/Phase2TrackerRecHit/interface/Phase2TrackerRecHit1D.h b/DataFormats/Phase2TrackerRecHit/interface/Phase2TrackerRecHit1D.h new file mode 100644 index 0000000000000..aff20dcb9e4b1 --- /dev/null +++ b/DataFormats/Phase2TrackerRecHit/interface/Phase2TrackerRecHit1D.h @@ -0,0 +1,33 @@ +#ifndef DATAFORMATS_PHASE2TRACKERRECHIT_PHASE2TRACKERRECHIT1D_H +#define DATAFORMATS_PHASE2TRACKERRECHIT_PHASE2TRACKERRECHIT1D_H + +#include "DataFormats/Common/interface/DetSetVectorNew.h" + +#include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" +#include "DataFormats/GeometrySurface/interface/LocalError.h" +#include "DataFormats/GeometryVector/interface/LocalPoint.h" + +typedef edm::Ref< edmNew::DetSetVector< Phase2TrackerCluster1D >, Phase2TrackerCluster1D > Phase2ClusterReference; + +class Phase2TrackerRecHit1D { + + public: + + Phase2TrackerRecHit1D() { } + Phase2TrackerRecHit1D(LocalPoint pos, LocalError err, Phase2ClusterReference cluster) : pos_(pos), err_(err), cluster_(cluster) { } + + LocalPoint localPosition() const { return pos_; } + LocalError localPositionError() const { return err_; } + Phase2ClusterReference cluster() const { return cluster_; } + + private: + + LocalPoint pos_; + LocalError err_; + Phase2ClusterReference cluster_; + +}; + +typedef edmNew::DetSetVector< Phase2TrackerRecHit1D > Phase2TrackerRecHit1DCollectionNew; + +#endif diff --git a/DataFormats/Phase2TrackerRecHit/src/classes.h b/DataFormats/Phase2TrackerRecHit/src/classes.h new file mode 100755 index 0000000000000..d4d7e5dab90bd --- /dev/null +++ b/DataFormats/Phase2TrackerRecHit/src/classes.h @@ -0,0 +1,18 @@ +#ifndef DATAFORMATS_PHASE2TRACKERRECHIT_CLASSES_H +#define DATAFORMATS_PHASE2TRACKERRECHIT_CLASSES_H + +#include "DataFormats/Phase2TrackerRecHit/interface/Phase2TrackerRecHit1D.h" +#include "DataFormats/Common/interface/Wrapper.h" +#include "DataFormats/Common/interface/DetSetNew.h" + +namespace { + struct dictionary { + edm::Wrapper< Phase2TrackerRecHit1D > cl0; + edm::Wrapper< std::vector< Phase2TrackerRecHit1D > > cl1; + edm::Wrapper< edmNew::DetSet< Phase2TrackerRecHit1D > > cl2; + edm::Wrapper< std::vector< edmNew::DetSet< Phase2TrackerRecHit1D > > > cl3; + edm::Wrapper< Phase2TrackerRecHit1DCollectionNew > cl4; + }; +} + +#endif diff --git a/DataFormats/Phase2TrackerRecHit/src/classes_def.xml b/DataFormats/Phase2TrackerRecHit/src/classes_def.xml new file mode 100644 index 0000000000000..bf905ea1e9f6f --- /dev/null +++ b/DataFormats/Phase2TrackerRecHit/src/classes_def.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/RecoLocalTracker/ClusterParameterEstimator/interface/ClusterParameterEstimator.h b/RecoLocalTracker/ClusterParameterEstimator/interface/ClusterParameterEstimator.h new file mode 100644 index 0000000000000..d7505521d882e --- /dev/null +++ b/RecoLocalTracker/ClusterParameterEstimator/interface/ClusterParameterEstimator.h @@ -0,0 +1,46 @@ +#ifndef RecoLocalTracker_Cluster_Parameter_Estimator_H +#define RecoLocalTracker_Cluster_Parameter_Estimator_H + +#include "DataFormats/GeometrySurface/interface/LocalError.h" +#include "DataFormats/GeometryVector/interface/LocalPoint.h" + +#include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" +#include "DataFormats/TrajectoryState/interface/LocalTrajectoryParameters.h" +#include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h" + +template +class ClusterParameterEstimator { + + public: + typedef std::pair LocalValues; + typedef std::vector VLocalValues; + virtual LocalValues localParameters( const T&,const GeomDetUnit&) const = 0; + virtual LocalValues localParameters( const T& cluster, const GeomDetUnit& gd, const LocalTrajectoryParameters&) const { + return localParameters(cluster,gd); + } + virtual LocalValues localParameters( const T& cluster, const GeomDetUnit& gd, const TrajectoryStateOnSurface& tsos) const { + return localParameters(cluster,gd,tsos.localParameters()); + } + virtual VLocalValues localParametersV( const T& cluster, const GeomDetUnit& gd) const { + VLocalValues vlp; + vlp.push_back(localParameters(cluster,gd)); + return vlp; + } + virtual VLocalValues localParametersV( const T& cluster, const GeomDetUnit& gd, const TrajectoryStateOnSurface& tsos) const { + VLocalValues vlp; + vlp.push_back(localParameters(cluster,gd,tsos.localParameters())); + return vlp; + } + + virtual ~ClusterParameterEstimator(){} + + //methods needed by FastSim + virtual void enterLocalParameters(unsigned int id, std::pair + &row_col, LocalValues pos_err_info) const {} + virtual void enterLocalParameters(uint32_t id, uint16_t firstStrip, + LocalValues pos_err_info) const {} + virtual void clearParameters() const {} + +}; + +#endif diff --git a/RecoLocalTracker/Phase2TrackerRecHits/BuildFile.xml b/RecoLocalTracker/Phase2TrackerRecHits/BuildFile.xml new file mode 100644 index 0000000000000..521bda7797087 --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/BuildFile.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h b/RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h new file mode 100644 index 0000000000000..82bd0cc78180c --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h @@ -0,0 +1,20 @@ +#ifndef RecoLocalTracker_Phase2TrackerRecHits_Phase2StripCPEDummy_H +#define RecoLocalTracker_Phase2TrackerRecHits_Phase2StripCPEDummy_H + +#include "RecoLocalTracker/ClusterParameterEstimator/interface/ClusterParameterEstimator.h" +#include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" +#include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + + +class Phase2StripCPEDummy : public ClusterParameterEstimator { + + public: + + LocalValues localParameters(const Phase2TrackerCluster1D & cluster, const GeomDetUnit & det) const; + +}; + + +#endif diff --git a/RecoLocalTracker/Phase2TrackerRecHits/plugins/BuildFile.xml b/RecoLocalTracker/Phase2TrackerRecHits/plugins/BuildFile.xml new file mode 100644 index 0000000000000..2ba9ffea49d12 --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/plugins/BuildFile.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.cc b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.cc new file mode 100644 index 0000000000000..6060ba63525cf --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.cc @@ -0,0 +1,34 @@ + +#include "RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.h" +#include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h" + + +Phase2StripCPEESProducer::Phase2StripCPEESProducer(const edm::ParameterSet & p) { + std::string name = p.getParameter("ComponentType"); + + enumMap_[std::string("Phase2StripCPEDummy")] = DUMMY; + if (enumMap_.find(name) == enumMap_.end()) + throw cms::Exception("Unknown StripCPE type") << name; + + cpeNum_ = enumMap_[name]; + pset_ = p; + setWhatProduced(this, name); +} + + +boost::shared_ptr > Phase2StripCPEESProducer::produce(const TkStripCPERecord & iRecord) { + + switch(cpeNum_) { + + case DUMMY: + cpe_ = boost::shared_ptr >(new Phase2StripCPEDummy()); + break; + + } + + return cpe_; +} + + +#include "FWCore/Framework/interface/ModuleFactory.h" +DEFINE_FWK_EVENTSETUP_MODULE(Phase2StripCPEESProducer); diff --git a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.h b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.h new file mode 100644 index 0000000000000..adb935523f83c --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.h @@ -0,0 +1,36 @@ +#ifndef RecoLocaltracker_Phase2TrackerRecHits_Phase2StripCPEESProducer_h +#define RecoLocaltracker_Phase2TrackerRecHits_Phase2StripCPEESProducer_h + +#include "FWCore/Framework/interface/ESProducer.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "RecoLocalTracker/Records/interface/TkStripCPERecord.h" +#include "RecoLocalTracker/ClusterParameterEstimator/interface/ClusterParameterEstimator.h" +#include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" +#include +#include + +#include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h" + + +class Phase2StripCPEESProducer: public edm::ESProducer { + + public: + + Phase2StripCPEESProducer(const edm::ParameterSet&); + boost::shared_ptr > produce(const TkStripCPERecord & iRecord); + + private: + + enum CPE_t { DUMMY }; + std::map enumMap_; + + CPE_t cpeNum_; + edm::ParameterSet pset_; + boost::shared_ptr > cpe_; + +}; +#endif + + + + diff --git a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.cc b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.cc new file mode 100644 index 0000000000000..695e0ba8d58a7 --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.cc @@ -0,0 +1,79 @@ +#include "RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.h" + +#include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" +#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" +#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" +#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" + +#include "DataFormats/Common/interface/DetSetVector.h" +#include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" +#include "DataFormats/Phase2TrackerRecHit/interface/Phase2TrackerRecHit1D.h" + +#include "FWCore/PluginManager/interface/ModuleDef.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include +#include + + +Phase2TrackerRecHits::Phase2TrackerRecHits(edm::ParameterSet const& conf) : + token_(consumes< Phase2TrackerCluster1DCollectionNew >(conf.getParameter("src"))), + cpeTag_(conf.getParameter("Phase2StripCPE")) { + produces(); +} + + +void Phase2TrackerRecHits::produce(edm::StreamID sid, edm::Event& event, const edm::EventSetup& eventSetup) const { + + // Get the Clusters + edm::Handle< Phase2TrackerCluster1DCollectionNew > clusters; + event.getByToken(token_, clusters); + + // load the cpe via the eventsetup + edm::ESHandle > cpe; + eventSetup.get().get(cpeTag_, cpe); + + // Get the geometry + edm::ESHandle< TrackerGeometry > geomHandle; + eventSetup.get< TrackerDigiGeometryRecord >().get(geomHandle); + const TrackerGeometry* tkGeom(&(*geomHandle)); + + edm::ESHandle< TrackerTopology > tTopoHandle; + eventSetup.get< IdealGeometryRecord >().get(tTopoHandle); + //const TrackerTopology* tTopo(tTopoHandle.product()); + + // Global container for the RecHits of each module + std::auto_ptr< Phase2TrackerRecHit1DCollectionNew > outputRecHits(new Phase2TrackerRecHit1DCollectionNew()); + + // Loop over clusters + for (edmNew::DetSetVector< Phase2TrackerCluster1D >::const_iterator DSViter = clusters->begin(); DSViter != clusters->end(); ++DSViter) { + + DetId detId(DSViter->detId()); + + // Geometry + const GeomDetUnit * geomDetUnit(tkGeom->idToDetUnit(detId)); + + // Container for the clusters that will be produced for this modules + Phase2TrackerRecHit1DCollectionNew::FastFiller rechits(*outputRecHits, DSViter->detId()); + + for (edmNew::DetSet< Phase2TrackerCluster1D >::const_iterator clustIt = DSViter->begin(); clustIt != DSViter->end(); ++clustIt) { + ClusterParameterEstimator::LocalValues lv = cpe->localParameters(*clustIt, *geomDetUnit); + + // Create a persistent edm::Ref to the cluster + edm::Ref< edmNew::DetSetVector< Phase2TrackerCluster1D >, Phase2TrackerCluster1D > cluster = edmNew::makeRefTo(clusters, clustIt); + + // Make a RecHit and add it to the DetSet + Phase2TrackerRecHit1D hit(lv.first, lv.second, cluster); + + rechits.push_back(hit); + } + } + + outputRecHits->shrink_to_fit(); + event.put(outputRecHits); + +} + +DEFINE_FWK_MODULE(Phase2TrackerRecHits); diff --git a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.h b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.h new file mode 100644 index 0000000000000..5feda89364160 --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.h @@ -0,0 +1,34 @@ +#ifndef RecoLocalTracker_Phase2TrackerRecHits_Phase2TrackerRecHits_h +#define RecoLocalTracker_Phase2TrackerRecHits_Phase2TrackerRecHits_h + +#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" +#include "DataFormats/DetId/interface/DetId.h" + +#include "FWCore/Framework/interface/global/EDProducer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" + +#include "RecoLocalTracker/Records/interface/TkStripCPERecord.h" +#include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h" + + + class Phase2TrackerRecHits : public edm::global::EDProducer<> { + + public: + + explicit Phase2TrackerRecHits(const edm::ParameterSet& conf); + virtual ~Phase2TrackerRecHits() {}; + void produce(edm::StreamID sid, edm::Event& event, const edm::EventSetup& eventSetup) const override final; + + private: + + edm::EDGetTokenT< Phase2TrackerCluster1DCollectionNew > token_; + edm::ESInputTag cpeTag_; + + }; + +#endif diff --git a/RecoLocalTracker/Phase2TrackerRecHits/python/Phase2StripCPEESProducer_cfi.py b/RecoLocalTracker/Phase2TrackerRecHits/python/Phase2StripCPEESProducer_cfi.py new file mode 100644 index 0000000000000..0b5f8a96216de --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/python/Phase2StripCPEESProducer_cfi.py @@ -0,0 +1,6 @@ +import FWCore.ParameterSet.Config as cms + +phase2StripCPEESProducer = cms.ESProducer("Phase2StripCPEESProducer", + ComponentType = cms.string('Phase2StripCPEDummy'), + parameters = cms.PSet() +) diff --git a/RecoLocalTracker/Phase2TrackerRecHits/python/Phase2TrackerRecHits_cfi.py b/RecoLocalTracker/Phase2TrackerRecHits/python/Phase2TrackerRecHits_cfi.py new file mode 100644 index 0000000000000..78e7a545b169b --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/python/Phase2TrackerRecHits_cfi.py @@ -0,0 +1,9 @@ +import FWCore.ParameterSet.Config as cms + +# RecHits options +siPhase2RecHits = cms.EDProducer("Phase2TrackerRecHits", + src = cms.InputTag("siPhase2Clusters"), + Phase2StripCPE = cms.ESInputTag("phase2StripCPEESProducer", "Phase2StripCPEDummy") +) + + diff --git a/RecoLocalTracker/Phase2TrackerRecHits/src/Phase2StripCPEDummy.cc b/RecoLocalTracker/Phase2TrackerRecHits/src/Phase2StripCPEDummy.cc new file mode 100644 index 0000000000000..0755e40c7978a --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/src/Phase2StripCPEDummy.cc @@ -0,0 +1,17 @@ + +#include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h" + + +Phase2StripCPEDummy::LocalValues Phase2StripCPEDummy::localParameters(const Phase2TrackerCluster1D & cluster, const GeomDetUnit & det) const { + float strippitch = 0.0090; // hardcoded dummy, a la 2S + float striplength = 5.; // hardcoded dummy, a la 2S + std::pair barycenter = cluster.barycenter(); + LocalPoint lp( barycenter.second * strippitch, striplength * (barycenter.first + 1/2), 0 ); + LocalError le( strippitch / 12, 0, striplength / 12 ); + return std::make_pair( lp, le ); +} + + +// needed, otherwise linker misses some refs +#include "FWCore/Utilities/interface/typelookup.h" +TYPELOOKUP_DATA_REG(ClusterParameterEstimator); diff --git a/RecoLocalTracker/Phase2TrackerRecHits/test/BuildFile.xml b/RecoLocalTracker/Phase2TrackerRecHits/test/BuildFile.xml new file mode 100644 index 0000000000000..a54e046a6976b --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/test/BuildFile.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidation.cc b/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidation.cc new file mode 100644 index 0000000000000..ad2cb62b8cfd3 --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidation.cc @@ -0,0 +1,276 @@ +#include +#include +#include +#include + +#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 "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "FWCore/ServiceRegistry/interface/Service.h" + +#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" +#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" +#include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" +#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" + +#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" +#include "DataFormats/SiPixelDetId/interface/PixelSubdetector.h" +#include "DataFormats/Common/interface/DetSetVectorNew.h" +#include "DataFormats/Common/interface/DetSetVector.h" +#include "DataFormats/DetId/interface/DetId.h" +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" +#include "DataFormats/Phase2TrackerRecHit/interface/Phase2TrackerRecHit1D.h" + +#include "SimDataFormats/TrackerDigiSimLink/interface/PixelDigiSimLink.h" +#include "SimDataFormats/Track/interface/SimTrackContainer.h" +#include "SimDataFormats/Vertex/interface/SimVertexContainer.h" +#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h" + +#include "DataFormats/GeometrySurface/interface/LocalError.h" +#include "DataFormats/GeometryVector/interface/LocalPoint.h" + +#include "CommonTools/UtilAlgos/interface/TFileService.h" +#include "CommonTools/Utils/interface/TFileDirectory.h" + +#include +#include +#include + + +struct RecHitHistos { + THStack* numberRecHitsMixed; + TH1D* numberRecHitsPixel; + TH1D* numberRecHitsStrip; + + TH2D* globalPosXY[3]; + TH2D* localPosXY[3]; +}; + +class Phase2TrackerRecHitsValidation : public edm::EDAnalyzer { + + public: + + explicit Phase2TrackerRecHitsValidation(const edm::ParameterSet&); + ~Phase2TrackerRecHitsValidation(); + void beginJob(); + void endJob(); + void analyze(const edm::Event&, const edm::EventSetup&); + + private: + + std::map< unsigned int, RecHitHistos >::iterator createLayerHistograms(unsigned int); + unsigned int getLayerNumber(const DetId&, const TrackerTopology*); + + edm::EDGetTokenT< Phase2TrackerRecHit1DCollectionNew > tokenRecHits_; + + TH2D* trackerLayout_; + TH2D* trackerLayoutXY_; + TH2D* trackerLayoutXYBar_; + TH2D* trackerLayoutXYEC_; + + std::map< unsigned int, RecHitHistos > histograms_; + +}; + +Phase2TrackerRecHitsValidation::Phase2TrackerRecHitsValidation(const edm::ParameterSet& conf) : + tokenRecHits_(consumes< Phase2TrackerRecHit1DCollectionNew >(conf.getParameter("src"))) { + std::cout << "RecHits Validation" << std::endl; + } + + Phase2TrackerRecHitsValidation::~Phase2TrackerRecHitsValidation() { } + + void Phase2TrackerRecHitsValidation::beginJob() { + edm::Service fs; + fs->file().cd("/"); + TFileDirectory td = fs->mkdir("Common"); + // Create common histograms + trackerLayout_ = td.make< TH2D >("RVsZ", "R vs. z position", 6000, -300.0, 300.0, 1200, 0.0, 120.0); + trackerLayoutXY_ = td.make< TH2D >("XVsY", "x vs. y position", 2400, -120.0, 120.0, 2400, -120.0, 120.0); + trackerLayoutXYBar_ = td.make< TH2D >("XVsYBar", "x vs. y position", 2400, -120.0, 120.0, 2400, -120.0, 120.0); + trackerLayoutXYEC_ = td.make< TH2D >("XVsYEC", "x vs. y position", 2400, -120.0, 120.0, 2400, -120.0, 120.0); + } + +void Phase2TrackerRecHitsValidation::endJob() { } + +void Phase2TrackerRecHitsValidation::analyze(const edm::Event& event, const edm::EventSetup& eventSetup) { + + std::cout << "PROCESSING RECHIT EVENT" << std::endl; + + /* + * Get the needed objects + */ + + // Get the RecHitss + edm::Handle< Phase2TrackerRecHit1DCollectionNew > rechits; + event.getByToken(tokenRecHits_, rechits); + + // Get the geometry + edm::ESHandle< TrackerGeometry > geomHandle; + eventSetup.get< TrackerDigiGeometryRecord >().get(geomHandle); + const TrackerGeometry* tkGeom = &(*geomHandle); + + edm::ESHandle< TrackerTopology > tTopoHandle; + eventSetup.get< IdealGeometryRecord >().get(tTopoHandle); + const TrackerTopology* tTopo = tTopoHandle.product(); + + /* + * Validation + */ + + // Loop over modules + for (Phase2TrackerRecHit1DCollectionNew::const_iterator DSViter = rechits->begin(); DSViter != rechits->end(); ++DSViter) { + + // Get the detector unit's id + unsigned int rawid(DSViter->detId()); + DetId detId(rawid); + unsigned int layer(getLayerNumber(detId, tTopo)); + + // Get the geometry of the tracker + const GeomDetUnit* geomDetUnit(tkGeom->idToDetUnit(detId)); + const PixelGeomDetUnit* theGeomDet = dynamic_cast< const PixelGeomDetUnit* >(geomDetUnit); + const PixelTopology& topol = theGeomDet->specificTopology(); + + if (!geomDetUnit) break; + + // Create histograms for the layer if they do not yet exist + std::map< unsigned int, RecHitHistos >::iterator histogramLayer(histograms_.find(layer)); + if (histogramLayer == histograms_.end()) histogramLayer = createLayerHistograms(layer); + + // Number of clusters + unsigned int nRecHitsPixel(0), nRecHitsStrip(0); + + // Loop over the clusters in the detector unit + for (edmNew::DetSet< Phase2TrackerRecHit1D >::const_iterator rechitIt = DSViter->begin(); rechitIt != DSViter->end(); ++rechitIt) { + + /* + * Cluster related variables + */ + + //LocalPoint localPosClu = rechitIt->localPosition(); + LocalPoint localPosClu(1, 2, 3); + //Global3DPoint globalPosClu = geomDetUnit->surface().toGlobal(localPosClu); + Global3DPoint globalPosClu(0, 0, 0); + + // Fill the position histograms + trackerLayout_->Fill(globalPosClu.z(), globalPosClu.perp()); + trackerLayoutXY_->Fill(globalPosClu.x(), globalPosClu.y()); + if (layer < 100) trackerLayoutXYBar_->Fill(globalPosClu.x(), globalPosClu.y()); + else trackerLayoutXYEC_->Fill(globalPosClu.x(), globalPosClu.y()); + + histogramLayer->second.localPosXY[0]->Fill(localPosClu.x(), localPosClu.y()); + histogramLayer->second.globalPosXY[0]->Fill(globalPosClu.z(), globalPosClu.perp()); + + // Pixel module + if (topol.ncolumns() == 32) { + histogramLayer->second.localPosXY[1]->Fill(localPosClu.x(), localPosClu.y()); + histogramLayer->second.globalPosXY[1]->Fill(globalPosClu.z(), globalPosClu.perp()); + ++nRecHitsPixel; + } + // Strip module + else if (topol.ncolumns() == 2) { + histogramLayer->second.localPosXY[2]->Fill(localPosClu.x(), localPosClu.y()); + histogramLayer->second.globalPosXY[2]->Fill(globalPosClu.z(), globalPosClu.perp()); + ++nRecHitsStrip; + } + } + + if (nRecHitsPixel) histogramLayer->second.numberRecHitsPixel->Fill(nRecHitsPixel); + if (nRecHitsStrip) histogramLayer->second.numberRecHitsStrip->Fill(nRecHitsStrip); + } +} + +// Create the histograms +std::map< unsigned int, RecHitHistos >::iterator Phase2TrackerRecHitsValidation::createLayerHistograms(unsigned int ival) { + std::ostringstream fname1, fname2; + + edm::Service fs; + fs->file().cd("/"); + + std::string tag; + unsigned int id; + if (ival < 100) { + id = ival; + fname1 << "Barrel"; + fname2 << "Layer_" << id; + tag = "_layer_"; + } + else { + int side = ival / 100; + id = ival - side * 100; + fname1 << "EndCap_Side_" << side; + fname2 << "Disc_" << id; + tag = "_disc_"; + } + + TFileDirectory td1 = fs->mkdir(fname1.str().c_str()); + TFileDirectory td = td1.mkdir(fname2.str().c_str()); + + RecHitHistos local_histos; + + std::ostringstream histoName; + + /* + * Number of clusters + */ + + histoName.str(""); histoName << "Number_RecHits_Pixel" << tag.c_str() << id; + local_histos.numberRecHitsPixel = td.make< TH1D >(histoName.str().c_str(), histoName.str().c_str(), 20, 0., 20.); + local_histos.numberRecHitsPixel->SetFillColor(kAzure + 7); + + histoName.str(""); histoName << "Number_RecHits_Strip" << tag.c_str() << id; + local_histos.numberRecHitsStrip = td.make< TH1D >(histoName.str().c_str(), histoName.str().c_str(), 20, 0., 20.); + local_histos.numberRecHitsStrip->SetFillColor(kOrange - 3); + + histoName.str(""); histoName << "Number_RecHitss_Mixed" << tag.c_str() << id; + local_histos.numberRecHitsMixed = td.make< THStack >(histoName.str().c_str(), histoName.str().c_str()); + local_histos.numberRecHitsMixed->Add(local_histos.numberRecHitsPixel); + local_histos.numberRecHitsMixed->Add(local_histos.numberRecHitsStrip); + + /* + * Local and Global positions + */ + + histoName.str(""); histoName << "Local_Position_XY_Mixed" << tag.c_str() << id; + local_histos.localPosXY[0] = td.make< TH2D >(histoName.str().c_str(), histoName.str().c_str(), 2000, 0., 0., 2000, 0., 0.); + + histoName.str(""); histoName << "Local_Position_XY_Pixel" << tag.c_str() << id; + local_histos.localPosXY[1] = td.make< TH2D >(histoName.str().c_str(), histoName.str().c_str(), 2000, 0., 0., 2000, 0., 0.); + + histoName.str(""); histoName << "Local_Position_XY_Strip" << tag.c_str() << id; + local_histos.localPosXY[2] = td.make< TH2D >(histoName.str().c_str(), histoName.str().c_str(), 2000, 0., 0., 2000, 0., 0.); + + histoName.str(""); histoName << "Global_Position_XY_Mixed" << tag.c_str() << id; + local_histos.globalPosXY[0] = td.make< TH2D >(histoName.str().c_str(), histoName.str().c_str(), 2400, 0., 0., 2400, 0., 0.); + + histoName.str(""); histoName << "Global_Position_XY_Pixel" << tag.c_str() << id; + local_histos.globalPosXY[1] = td.make< TH2D >(histoName.str().c_str(), histoName.str().c_str(), 2400, 0., 0., 2400, 0., 0.); + + histoName.str(""); histoName << "Global_Position_XY_Strip" << tag.c_str() << id; + local_histos.globalPosXY[2] = td.make< TH2D >(histoName.str().c_str(), histoName.str().c_str(), 2400, 0., 0., 2400, 0., 0.); + + /* + * End + */ + + std::pair< std::map< unsigned int, RecHitHistos >::iterator, bool > insertedIt(histograms_.insert(std::make_pair(ival, local_histos))); + fs->file().cd("/"); + + return insertedIt.first; +} + +unsigned int Phase2TrackerRecHitsValidation::getLayerNumber(const DetId& detid, const TrackerTopology* topo) { + if (detid.det() == DetId::Tracker) { + if (detid.subdetId() == PixelSubdetector::PixelBarrel) return (topo->pxbLayer(detid)); + else if (detid.subdetId() == PixelSubdetector::PixelEndcap) return (100 * topo->pxfSide(detid) + topo->pxfDisk(detid)); + else return 999; + } + return 999; +} + +DEFINE_FWK_MODULE(Phase2TrackerRecHitsValidation); diff --git a/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidationTest_cfg.py b/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidationTest_cfg.py new file mode 100644 index 0000000000000..1748807d3f4c8 --- /dev/null +++ b/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidationTest_cfg.py @@ -0,0 +1,68 @@ +# Imports +import FWCore.ParameterSet.Config as cms + +# Create a new CMS process +process = cms.Process('cluTest') + +# Import all the necessary files +process.load('Configuration.StandardSequences.Services_cff') +process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi') +process.load('FWCore.MessageService.MessageLogger_cfi') +process.load('Configuration.EventContent.EventContent_cff') +process.load('SimGeneral.MixingModule.mixNoPU_cfi') +process.load('Configuration.Geometry.GeometryExtended2023Dev_cff') +process.load('Configuration.StandardSequences.MagneticField_38T_PostLS1_cff') +process.load('Configuration.StandardSequences.RawToDigi_cff') +process.load('Configuration.StandardSequences.L1Reco_cff') +process.load('Configuration.StandardSequences.Reconstruction_cff') +process.load('Configuration.StandardSequences.Validation_cff') +process.load('DQMOffline.Configuration.DQMOfflineMC_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') +process.load('Geometry.TrackerNumberingBuilder.trackerTopologyConstants_cfi') + +process.load('RecoLocalTracker.Phase2TrackerRecHits.Phase2TrackerRecHits_cfi') +process.load('RecoLocalTracker.Phase2TrackerRecHits.Phase2StripCPEESProducer_cfi') + +# Number of events (-1 = all) +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(-1) +) + +# Input file +process.source = cms.Source('PoolSource', + fileNames = cms.untracked.vstring('file:step3.root') +) + +# TAG +from Configuration.AlCa.GlobalTag import GlobalTag +process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:upgradePLS3', '') + +# Output +process.TFileService = cms.Service('TFileService', + fileName = cms.string('file:rechits_validation.root') +) + +# DEBUG +process.MessageLogger = cms.Service('MessageLogger', + debugModules = cms.untracked.vstring('siPhase2RecHits'), + destinations = cms.untracked.vstring('cout'), + cout = cms.untracked.PSet( + threshold = cms.untracked.string('ERROR') + ) +) + + +# Analyzer +process.analysis = cms.EDAnalyzer('Phase2TrackerRecHitsValidation', + src = cms.InputTag("siPhase2RecHits") +) + +# Processes to run +process.rechits_step = cms.Path(process.siPhase2RecHits) +process.validation_step = cms.Path(process.analysis) + +process.schedule = cms.Schedule(process.rechits_step, process.validation_step) + +from SLHCUpgradeSimulations.Configuration.phase2TkCustomsBE5DPixel10Ddev import customise_condOverRides +process = customise_condOverRides(process) + From 24504de0b17def87ad843d4a2bbd25a3e7a9f80a Mon Sep 17 00:00:00 2001 From: Dmitrijus Bugelskis Date: Thu, 28 Jan 2016 16:15:28 +0100 Subject: [PATCH 161/250] Implement simple memory tracking on each PR This is work in progress, mostly to test how PR scripts work. And to start a discussion. Please don't accept, there should be more commits. --- DQMServices/Components/data/html/mbGraph.html | 79 ++++ DQMServices/Components/data/html/mbGraph.js | 375 ++++++++++++++++++ .../Components/scripts/dqm-mbProfile.py | 303 ++++++++++++++ DQMServices/Components/test/driver150a.sh | 11 + DQMServices/Components/test/driver150b.sh | 5 + DQMServices/Components/test/driver150c.sh | 5 + DQMServices/Components/test/runtests.sh | 2 +- 7 files changed, 779 insertions(+), 1 deletion(-) create mode 100644 DQMServices/Components/data/html/mbGraph.html create mode 100644 DQMServices/Components/data/html/mbGraph.js create mode 100755 DQMServices/Components/scripts/dqm-mbProfile.py create mode 100755 DQMServices/Components/test/driver150a.sh create mode 100755 DQMServices/Components/test/driver150b.sh create mode 100755 DQMServices/Components/test/driver150c.sh diff --git a/DQMServices/Components/data/html/mbGraph.html b/DQMServices/Components/data/html/mbGraph.html new file mode 100644 index 0000000000000..57859c5e8b040 --- /dev/null +++ b/DQMServices/Components/data/html/mbGraph.html @@ -0,0 +1,79 @@ + + + + + + mbGraph + + + + + + + + + + + + + + + + +

+ +
+ + +
+ + +
+ +
+

+ Profile loaded from {{ GraphCtrl.profile_url }}. +
+ Reference profile loaded from {{ GraphCtrl.reference_url }}. +

+
+ +
+
+ + +
+
+
+ + + +
+

+ Process: {{ GraphCtrl.graph_data.cmdline }}. + Started at {{ GraphCtrl.graph_data.start_ts*1000 | date:'yyyy-MM-dd HH:mm:ss Z' }} + and contains {{ GraphCtrl.graph_data.frames.length }} frames. +
+ + Reference process: {{ GraphCtrl.graph_data_reference.cmdline }}. + Started at {{ GraphCtrl.graph_data_reference.start_ts*1000 | date:'yyyy-MM-dd HH:mm:ss Z' }} + and contains {{ GraphCtrl.graph_data_reference.frames.length }} frames. + +

+
+ +
+ +
+ + + diff --git a/DQMServices/Components/data/html/mbGraph.js b/DQMServices/Components/data/html/mbGraph.js new file mode 100644 index 0000000000000..936cb75afe80e --- /dev/null +++ b/DQMServices/Components/data/html/mbGraph.js @@ -0,0 +1,375 @@ +var app = angular.module('mbGraph', []); + +app.controller('GraphCtrl', function($scope, $http, $location, Profile, LocParams) { + var me = this; + + me.set_profile = function () { + var target = LocParams.p.profile; + if (!target) { + target = "performance.json"; + } + + me.profile = null; + me.profile_url = target; + me.profile_error = null; + + var p = Profile.load(target); + p.then(function (body) { + me.profile = body.data; + me.update_graph_data(); + }, function (resp) { + me.profile_error = "Failed to load profile: "; + me.profile_error = me.reference_error + resp.status; + me.update_graph_data(); + }); + }; + + me.set_reference = function () { + var target = LocParams.p.reference; + if (!target) { + return; + } + + me.reference = null; + me.reference_url = target; + me.reference_error = null; + var p = Profile.load(target); + p.then(function (body) { + me.reference = body.data; + me.update_graph_data(); + }, function (resp) { + me.reference_error = "Failed to load profile: "; + me.reference_error = me.reference_error + resp.status; + me.update_graph_data(); + }); + }; + + me.update_graph_data = function () { + me.graph_data = null; + me.graph_data_reference = null; + + if (!me.profile) return; + + var pid = LocParams.p.pid; + if (pid === undefined) { + LocParams.setKey("pid", "_sum"); + return; // <- next digest will redraw + } + + me.graph_data = me.profile[pid]; + + if (!me.reference) return; + + if (pid == "_sum") { + me.graph_data_reference = me.reference[pid]; + } else { + me.graph_data_reference = null; + _.some(me.reference, function (v) { + if (v["cmdline"] == me.graph_data["cmdline"]) { + me.graph_data_reference = v; + return true; + } + }); + + } + }; + + $scope.$watch(LocParams.watchFunc('pid'), me.update_graph_data); + $scope.$watch(LocParams.watchFunc('profile'), me.set_profile); + $scope.$watch(LocParams.watchFunc('reference'), me.set_reference); +}); + +app.service("Profile", ['$window', '$http', function($window, $http) { + var x = {}; + var Profile = function () { + var obj = {}; + return obj; + }; + + var pcnt2MB = function (x) { + var PAGE = 4096; + var MEGA = 1024*1024; + return parseFloat(x) * PAGE / MEGA; + }; + + var parseFrame = function (profile, frame) { + // do the sum magic (sum meta-process) + if (! profile["_sum"]) { + profile["_sum"] = { + 'start_ts': frame["time"], + 'frames': [], + 'cmdline': "sum of all processes", + 'cmdline_short': "sum of all processes" + }; + }; + + var sum_pdct = profile["_sum"]; + var sum_frame = { + "p_run": 0, "p_stop": 0, + "pss": 0, "rss": 0, "virt": 0, + "time_diff": frame["time"] - sum_pdct["start_ts"] + }; + + // extract per pid memory usage and group it, well, per pid + angular.forEach(frame["known_pids"], function (proc_dct, key) { + // key of this dict is a pid + if (!profile[key]) { + profile[key] = { + 'start_ts': frame["time"], + 'frames': [], + }; + } + + // update/fill the array + pdct = profile[key]; + + // this needs an update, in cast there was an exec + pdct['cmdline'] = proc_dct["cmdline"]; + if (pdct['cmdline'].length > 42) { + pdct["cmdline_short"] = pdct["cmdline"].substr(0, 45) + "..."; + } else { + pdct["cmdline_short"] = pdct["cmdline"]; + } + + // parse statm + var statm = proc_dct["statm"].split(" "); + var virt = pcnt2MB(statm[0]); + var rss = pcnt2MB(statm[1]); + var pss = parseFloat(proc_dct["smaps_pss"]) / 1024 / 1024; + + // now fill in the sum_pdct + if (proc_dct["running"]) { + pdct["frames"].push({ + 'time_diff': frame["time"] - pdct["start_ts"], + 'rss': rss, + 'pss': pss, + 'virt': virt, + }); + + sum_frame["p_run"] = sum_frame["p_run"] + 1; + + sum_frame["rss"] = sum_frame["rss"] + rss; + sum_frame["pss"] = sum_frame["pss"] + pss; + sum_frame["virt"] = sum_frame["virt"] + virt; + } else { + sum_frame["p_stop"] = sum_frame["p_stop"] + 1; + } + + sum_pdct["frames"].push(sum_frame); + }); + }; + + var makeProfile = function (x) { + var lines = x.split("\n"); + var frames = {}; + var profile = Profile(); + + angular.forEach(lines, function (v) { + var t = v.trim(); + if (t.length < 1) + return; + + var parsed = JSON.parse(t.trim()); + parseFrame(profile, parsed); + }); + + return profile; + }; + + x.load = function (url) { + var p = $http({ + url: url, + method: 'GET', + transformResponse: function(value, head, code) { + if (code != 200) { + return null; + }; + + return makeProfile(value); + } + }); + + return p; + }; + + return x; +}]); + +app.directive('memoryGraph', function ($window) { + var d3 = $window.d3; + + return { + restrict: 'E', + scope: { 'data': '=', 'width': '@', 'height': '@', 'referenceData': '=' }, + link: function (scope, elm, attrs) { + var width = parseInt(scope.width); + var height = parseInt(scope.height); + + var div = d3.select(elm[0]).append("div"); + div.attr("style", "position: relative"); + + var svg = div.append("svg"); + svg.attr("width", width).attr("height", height); + + var chart = nv.models.lineChart() + .margin({left: 100}) + .useInteractiveGuideline(false) + .showLegend(true) + .transitionDuration(350) + .showYAxis(true) + .showXAxis(true) + .forceY(0) + ; + + chart.interactiveLayer.tooltip.enabled(false); + chart.interactiveLayer.tooltip.position({"left": 0, "top": 0}); + + chart.xAxis + .axisLabel('Time (s.)') + // .tickFormat(d3.time.format('%X')); + .tickFormat(d3.format('.01f')); + + chart.yAxis + .axisLabel('Mem (mb)') + .tickFormat(d3.format('.02f')); + + var update = function () { + var data = scope.data; + + //console.log("data", data); + if (!data) { + svg.selectAll("*").remove(); + + svg + .datum([]) + .transition().duration(500) + .call(chart) + return; + } + + var make_xy = function (frames, metric, color, ref) { + var new_data = _.map(frames, function (frame) { + return { 'y': frame[metric], 'x': frame["time_diff"], '_obj': frame }; + }); + + var key = metric; + if (ref) key = key + " (ref)"; + return { values: new_data, 'key': key, 'color': color, classed: 'dashed' }; + }; + + var datum = [ + make_xy(data.frames, 'pss', "#1f77b4", false), + make_xy(data.frames, 'virt', "#ff7f0e", false), + ]; + + if (scope.referenceData) { + datum.push(make_xy(scope.referenceData.frames, 'pss', "#aec7e8", true)); + datum.push(make_xy(scope.referenceData.frames, 'virt', "#ffbb78", true)); + } + + svg + .datum(datum) + .transition().duration(500) + .call(chart) + ; + }; + scope.$watch("data", update); + scope.$watch("referenceData", update); + } + }; +}); + +app.factory('LocParams', ['$location', '$rootScope', function ($location, $rootScope) { + var me = {}; + + me._value = function (v) { + if (v === undefined) { + return null; + } else if (v === false) { + return null; + } else if (v === true) { + return true; + } else { + return v; + } + }; + + me._clear_object = function (obj) { + for (var k in obj) { + if (obj.hasOwnProperty(k)) + delete obj[k]; + } + }; + + // parameters inside a locaton (what we know) + // cannot be modified by the scope + me._params_location = {}; + + // params inside the scope, we can modify this directly + me._params = {}; + + me._update_from_location = function () { + var s = $location.search(); + + me._clear_object(me._params_location); + me._clear_object(me._params); + + _.each(s, function (v, k) { + me._params_location[k] = v; + me._params[k] = v; + }); + + //console.log("params", me); + }; + + // change parameter with history + me.setKey = function (k, v) { + // this will propage to the _params on location event + $location.search(k, me._value(v)); + }; + + //// these are special "flags", they still modify the _params + me.setFlag = function (flag_key, flag_char, value_bool) { + var s = me._params[flag_key] || ""; + + if ((value_bool) && (s.indexOf(flag_char) === -1)) + s += flag_char; + + if ((!value_bool) && (s.indexOf(flag_char) !== -1)) + s = s.replace(flag_char, ''); + + me._params[flag_key] = s || null; + }; + + me.getFlag = function (flag_key, flag_char) { + var s = me._params[flag_key] || ""; + return s.indexOf(flag_char) !== -1; + }; + + me.toggleFlag = function (flag_key, flag_char) { + me.setFlag(flag_key, flag_char, !me.getFlag(flag_key, flag_char)); + }; + + // short for function () { return LocParams.p.x; } + me.watchFunc = function (key) { + return function () { return me.p[key]; }; + }; + + // watcher for async changer (history not advanced) + $rootScope.$watch(function () { return me._params; }, function () { + _.each(me._params, function (v, k) { + var old = me._params_location[k]; + if (old !== v) { + $location.search(k, me._value(v)).replace(); + }; + }); + }, true); + + $rootScope.$on("$locationChangeSuccess", me._update_from_location); + me._update_from_location(); + + me.p = me._params; + $rootScope.LocParams = me; + + return me; +}]); diff --git a/DQMServices/Components/scripts/dqm-mbProfile.py b/DQMServices/Components/scripts/dqm-mbProfile.py new file mode 100755 index 0000000000000..d3da0c8c65875 --- /dev/null +++ b/DQMServices/Components/scripts/dqm-mbProfile.py @@ -0,0 +1,303 @@ +#!/usr/bin/env python + +import os +import collections +import logging +import resource +import time +import argparse +import subprocess +import signal +import json +import inspect +import shutil + +LOG_FORMAT='%(asctime)s: %(name)-20s - %(levelname)-8s - %(message)s' +logging.basicConfig(format=LOG_FORMAT) +log = logging.getLogger("mbProfile") +log.setLevel(logging.INFO) + +def read_procfs(ppath, only_ppid=True): + def read(f): + fp = os.path.join(ppath, f) + with open(fp) as fd: + return fd.read() + + def read_status(): + st = {} + + fp = os.path.join(ppath, "status") + with open(fp) as fd: + for line in fd.readlines(): + if not line: continue + + key, value = line.split(":", 1) + st[key] = value.strip() + + return st + + try: + dct = {} + + dct["statm"] = read("statm").strip() + dct["stat"] = read("stat").strip() + dct["cmdline"] = read("cmdline").strip().replace("\0", " ") + + status = read_status() + dct["status"] = status + dct["pid"] = int(status["Pid"]) + dct["parent_pid"] = int(status["PPid"]) + + return dct + except: + log.warning("Exception in read_procfs.", exc_info=True) + pass + +def build_process_list(): + lst = os.listdir("/proc/") + for f in lst: + if not f.isdigit(): continue + + proc = read_procfs(os.path.join("/proc", f)) + if proc: + yield proc + +def get_children(ppid): + """ Select all processes which are descendant from ppid (exclusive). """ + + pid_dct = {} + for proc in build_process_list(): + proc["_children"] = [] + pid_dct[proc["pid"]] = proc + + # fill in children array + for pid in list(pid_dct.keys()): + parent_pid = pid_dct[pid]["parent_pid"] + + if pid_dct.has_key(parent_pid): + pid_dct[parent_pid]["_children"].append(pid) + + # now just walk down the tree + if ppid is None or not pid_dct.has_key(ppid): + # process has quit, we exit + return [] + + accepted = [] + to_accept = collections.deque([ppid, ]) + + while to_accept: + head = pid_dct[to_accept.popleft()] + + # do not include the monitoring pid + if head["pid"] != ppid: + accepted.append(head) + + to_accept.extend(head.get("_children", [])) + head["children"] = head["_children"] + del head["_children"] + + # deleting children breaks infinite loops + # but Dima, can a process tree contain a loop? yes - via race-condition in reading procfs + + return accepted + +class Profile(object): + def __init__(self, args): + self.time = time.time() + self.final = False + self.pid = None + self.known_pids = {} + + self.ru = {} + self.ru_diff = {} + + self._offset_ru = None + self._args = args + + if self._args.file: + self._file = open(self._args.file, "w") + else: + self._file = None + + self.update() + + def update_ru(self): + fields_to_subtract = ( + "ru_utime", "ru_stime", "ru_maxrss", "ru_minflt", "ru_majflt", "ru_nswap", + "ru_inblock", "ru_oublock", "ru_msgsnd", "ru_msgrcv", "ru_nsignals", "ru_nvcsw", "ru_nivcsw", + ) + + rusage = resource.getrusage(resource.RUSAGE_CHILDREN) + self.ru = rusage + + if self._offset_ru is None: + self._offset_ru = rusage + + for field in fields_to_subtract: + current = getattr(self.ru, field) + base = getattr(self._offset_ru, field) + + self.ru_diff[field] = current - base + + # this is taken from: http://github.com/pixelb/scripts/commits/master/scripts/ps_mem.py + def read_smaps(self, proc_dict): + Private, Shared, Pss = 0, 0, 0 + + fp = os.path.join("/proc/%d" % proc_dict["pid"], "smaps") + with open(fp) as fd: + for line in fd.readlines(): + if line.startswith("Shared"): + Shared += int(line.split()[1]) + elif line.startswith("Private"): + Private += int(line.split()[1]) + elif line.startswith("Pss"): + Pss += int(line.split()[1]) + + proc_dict["smaps_shared"] = Shared * 1024 + proc_dict["smaps_private"] = Private * 1024 + proc_dict["smaps_pss"] = Pss * 1024 + + def update_proc(self): + procs = get_children(os.getpid()) + + # we can only do it here, permision-wise + # ie only for owned processes + for proc in procs: + try: + self.read_smaps(proc) + except: + log.warning("Exception in read_smaps.", exc_info=True) + + # we need to mark not-running ones as such + stopped = set(self.known_pids.keys()) + for proc in procs: + proc["running"] = True + + pid = proc["pid"] + self.known_pids[pid] = proc + + if pid in stopped: + stopped.remove(pid) + + for pid in stopped: + self.known_pids[pid]["running"] = False + + def update(self): + self.time = time.time() + + self.update_ru() + self.update_proc() + + if self._file: + json.dump(self.to_dict(), self._file) + self._file.write("\n") + self._file.flush() + + log.info("Written profile to: %s, took=%.03f", self._args.file, time.time() - self.time) + + def to_dict(self): + dct = collections.OrderedDict() + dct['time'] = self.time + dct['pid'] = self.pid + dct['final'] = self.final + + dct['ru_diff'] = dict(self.ru_diff) + dct['ru'] = dict((k, v) for k, v in inspect.getmembers(self.ru) if k.startswith('ru_')) + dct['known_pids'] = dict(self.known_pids) + return dct + + def finish(self): + self.final = True + self.update() + + if self._file: + self._file.close() + self._file = None + else: + log.info("ru_diff: %s", self.ru_diff) + + +ALARM_TIMER = 1 +ALARM_P_OBJECT = None + +def handle_alarm(num, frame): + if ALARM_P_OBJECT: + ALARM_P_OBJECT.update() + + signal.alarm(ALARM_TIMER) + +def run_and_monitor(args): + profile = Profile(args) + + proc = subprocess.Popen(args.pargs) + profile.pid = proc.pid + + global ALARM_P_OBJECT + ALARM_P_OBJECT = profile + + signal.signal(signal.SIGALRM, handle_alarm) + signal.alarm(ALARM_TIMER) + + proc.wait() + profile.finish() + +def find_and_write_html(p, args): + # create the dir if necessary + if p and not os.path.exists(p): + os.makedirs(p) + + html_paths = [ + os.path.join(os.getenv("CMSSW_RELEASE_BASE"), "src/DQMServices/Components/data/html"), + os.path.join(os.getenv("CMSSW_BASE"),"src/DQMServices/Components/data/html"), + ] + + def find_file(f): + fails = [] + for p in html_paths: + x = os.path.join(p, f) + if os.path.exists(x): + return x + else: + fails.append(x) + + log.warning("Could not find html file: %s (%s)", f, fails) + + for f in ['mbGraph.js', 'mbGraph.html']: + target_fn = os.path.join(p, f) + source_fn = find_file(f) + if source_fn: + log.info("Copying %s to %s", source_fn, target_fn) + shutil.copyfile(source_fn, target_fn) + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Profile child processes and produce data for rss and such graphs.") + parser.add_argument("-f", "--file", type=str, default="performance.json", help="Filename to write.", metavar="performance.json") + parser.add_argument("-i", type=int, help="Time interval between profiles.", default=15) + parser.add_argument('-q', action='store_true', help="Reduce logging.") + parser.add_argument('-w', action='store_true', help="Write html helper files for rendering the performance file.") + parser.add_argument('pargs', nargs=argparse.REMAINDER) + + args = parser.parse_args() + + if not args.pargs: + parser.print_help() + sys.exit(-1) + elif args.pargs[0] == "--": + # compat with 2.6 + args.pargs = args.pargs[1:] + + ALARM_TIMER = args.i + + if args.q: + log.setLevel(logging.WARNING) + + if args.w: + p = os.path.dirname(args.file) + find_and_write_html(p, args) + + ## do some signal magic + #signal.signal(signal.SIGINT, handle_signal) + #signal.signal(signal.SIGTERM, handle_signal) + + run_and_monitor(args) + diff --git a/DQMServices/Components/test/driver150a.sh b/DQMServices/Components/test/driver150a.sh new file mode 100755 index 0000000000000..6798377783939 --- /dev/null +++ b/DQMServices/Components/test/driver150a.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +eval `scramv1 r -sh` + +TNUM=150 + +dqm-mbProfile.py -i 15 -w -f memory_25202.0/performance.json runTheMatrix.py -l 25202.0 + +if [ $? -ne 0 ]; then + exit 1 +fi diff --git a/DQMServices/Components/test/driver150b.sh b/DQMServices/Components/test/driver150b.sh new file mode 100755 index 0000000000000..bfeef2d9b98c1 --- /dev/null +++ b/DQMServices/Components/test/driver150b.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +eval `scramv1 r -sh` + + diff --git a/DQMServices/Components/test/driver150c.sh b/DQMServices/Components/test/driver150c.sh new file mode 100755 index 0000000000000..bfeef2d9b98c1 --- /dev/null +++ b/DQMServices/Components/test/driver150c.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +eval `scramv1 r -sh` + + diff --git a/DQMServices/Components/test/runtests.sh b/DQMServices/Components/test/runtests.sh index 82f72ebd483dd..9a77b7a048f77 100755 --- a/DQMServices/Components/test/runtests.sh +++ b/DQMServices/Components/test/runtests.sh @@ -2,4 +2,4 @@ function die { echo $1; status $2; exit $2; } eval `scram runtime -sh` -python ${LOCAL_TEST_DIR}/whiteRabbit.py -q 1 -j 5 -n 1,2,3,4,6,7,8,9,11,12 --noMail || die 'Failure in running all tests' $? +python ${LOCAL_TEST_DIR}/whiteRabbit.py -q 1 -j 5 -n 1,2,3,4,6,7,8,9,11,12,150 --noMail || die 'Failure in running all tests' $? From 362c6d689814db7f29098045d7114380cd220351 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Thu, 28 Jan 2016 17:14:31 +0100 Subject: [PATCH 162/250] added automated testing --- CalibTracker/SiStripCommon/test/BuildFile.xml | 13 ++-- .../test/testCalibTrackerSiStripCommon.cpp | 4 ++ CalibTracker/SiStripCommon/test/test_all.sh | 6 ++ .../SiStripCommon/test/test_all_cfg.py | 60 +++++++++++++++++++ 4 files changed, 76 insertions(+), 7 deletions(-) create mode 100644 CalibTracker/SiStripCommon/test/testCalibTrackerSiStripCommon.cpp create mode 100755 CalibTracker/SiStripCommon/test/test_all.sh create mode 100755 CalibTracker/SiStripCommon/test/test_all_cfg.py diff --git a/CalibTracker/SiStripCommon/test/BuildFile.xml b/CalibTracker/SiStripCommon/test/BuildFile.xml index 75b737d6aff1d..eb8ace6a51bbc 100644 --- a/CalibTracker/SiStripCommon/test/BuildFile.xml +++ b/CalibTracker/SiStripCommon/test/BuildFile.xml @@ -1,7 +1,6 @@ - - - - - - - + + + + + + diff --git a/CalibTracker/SiStripCommon/test/testCalibTrackerSiStripCommon.cpp b/CalibTracker/SiStripCommon/test/testCalibTrackerSiStripCommon.cpp new file mode 100644 index 0000000000000..6507aa1dd6d40 --- /dev/null +++ b/CalibTracker/SiStripCommon/test/testCalibTrackerSiStripCommon.cpp @@ -0,0 +1,4 @@ +#include "FWCore/Utilities/interface/TestHelper.h" + +RUNTEST() + diff --git a/CalibTracker/SiStripCommon/test/test_all.sh b/CalibTracker/SiStripCommon/test/test_all.sh new file mode 100755 index 0000000000000..c9e8f124d631d --- /dev/null +++ b/CalibTracker/SiStripCommon/test/test_all.sh @@ -0,0 +1,6 @@ +#! /bin/bash + + +echo "TESTING CalibTracker/SiStripCommon ..." +cmsRun ${LOCAL_TEST_DIR}/test_all_cfg.py +echo "... SUCCESSFUL!" \ No newline at end of file diff --git a/CalibTracker/SiStripCommon/test/test_all_cfg.py b/CalibTracker/SiStripCommon/test/test_all_cfg.py new file mode 100755 index 0000000000000..c23d1282941da --- /dev/null +++ b/CalibTracker/SiStripCommon/test/test_all_cfg.py @@ -0,0 +1,60 @@ +#! /bin/env cmsRun + +from CalibTracker.SiStripCommon.shallowTree_test_template import * +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(3) ) +process.TFileService.fileName = 'test_all.root' + +process.load('CalibTracker.SiStripCommon.ShallowGainCalibration_cfi') +process.load('CalibTracker.SiStripCommon.ShallowDigisProducer_cfi') +process.load('CalibTracker.SiStripCommon.ShallowTracksProducer_cfi') +process.load('CalibTracker.SiStripCommon.ShallowEventDataProducer_cfi') +process.load('CalibTracker.SiStripCommon.ShallowTrackClustersProducer_cfi') +process.load('CalibTracker.SiStripCommon.ShallowSimTracksProducer_cfi') +process.load('CalibTracker.SiStripCommon.ShallowSimhitClustersProducer_cfi') +process.load('CalibTracker.SiStripCommon.ShallowClustersProducer_cfi') +process.load('CalibTracker.SiStripCommon.ShallowRechitClustersProducer_cfi') + +process.load('RecoTracker.TrackProducer.TrackRefitters_cff') +process.load('SimGeneral.TrackingAnalysis.simHitTPAssociation_cfi') +process.load("SimTracker.TrackAssociatorProducers.trackAssociatorByHits_cfi") +add_rawRelVals(process) + +process.tracksRefit = process.TrackRefitter.clone() +process.shallowGainCalibration.Tracks = 'tracksRefit' +process.shallowTrackClusters.Tracks = 'tracksRefit' + +process.testTree = cms.EDAnalyzer( + "ShallowTree", + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_shallowGainCalibration_*_*', + 'keep *_shallowDigis_*_*', + 'keep *_shallowTracks_*_*', + 'keep *_shallowEventRun_*_*', + 'keep *_shallowTrackClusters_*_*', + 'keep *_shallowSimTracks_*_*', + 'keep *_shallowSimhitClusters_*_*', + 'keep *_shallowClusters_*_*', + 'keep *_shallowRechitClusters_*_*', + ) + ) + +process.p = cms.Path( + process.MeasurementTrackerEvent* + process.tracksRefit* + process.simHitTPAssocProducer* + process.trackAssociatorByHits* + process.siStripMatchedRecHits* + # Shallow stuff + process.shallowEventRun* + process.shallowSimTracks* + process.shallowTrackClusters* + process.shallowGainCalibration* + process.shallowDigis* + process.shallowTracks* + process.shallowSimhitClusters* + process.shallowClusters* + process.shallowRechitClusters* + #tree dumping + process.testTree +) From a20e68d1d9f843be26c134fcb066a63c992ff55f Mon Sep 17 00:00:00 2001 From: isobelojalvo Date: Thu, 28 Jan 2016 17:20:51 +0100 Subject: [PATCH 163/250] removing the new IDs so we can pass the relvals, these must be readded in pre6 --- .../python/producersLayer1/tauProducer_cfi.py | 113 +++++++++-------- .../PatAlgos/python/tools/tauTools.py | 118 +++++++++--------- 2 files changed, 118 insertions(+), 113 deletions(-) diff --git a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py index f78a0eb55e71f..151932f40634d 100644 --- a/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py +++ b/PhysicsTools/PatAlgos/python/producersLayer1/tauProducer_cfi.py @@ -104,62 +104,65 @@ againstElectronTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5TightElectronRejection"), againstElectronVTightMVA5 = cms.InputTag("hpsPFTauDiscriminationByMVA5VTightElectronRejection"), ##New Run2 MVA isolation - byIsolationMVArun2v1DBoldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), - byVLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), - byLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), - byMediumIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), - byTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), - byVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), - byVVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), - byIsolationMVArun2v1DBnewDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), - byVLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), - byLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), - byMediumIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), - byTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), - byVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), - byVVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), - byIsolationMVArun2v1PWoldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), - byVLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), - byLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), - byMediumIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), - byTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), - byVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), - byVVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), - byIsolationMVArun2v1PWnewDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), - byVLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), - byLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), - byMediumIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), - byTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), - byVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), - byVVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), - chargedIsoPtSumdR03 = cms.InputTag("hpsPFTauChargedIsoPtSumdR03"), - neutralIsoPtSumdR03 = cms.InputTag("hpsPFTauNeutralIsoPtSumdR03"), - puCorrPtSumdR03 = cms.InputTag("hpsPFTauPUcorrPtSumdR03"), - neutralIsoPtSumWeightdR03 = cms.InputTag("hpsPFTauNeutralIsoPtSumWeightdR03"), - footprintCorrectiondR03 = cms.InputTag("hpsPFTauFootprintCorrectiondR03"), - photonPtSumOutsideSignalConedR03 = cms.InputTag("hpsPFTauPhotonPtSumOutsideSignalConedR03"), - byIsolationMVArun2v1DBdR03oldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), - byVLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), - byLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), - byMediumIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), - byTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), - byVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), - byVVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), - byIsolationMVArun2v1PWdR03oldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), - byVLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), - byLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), - byMediumIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), - byTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), - byVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), - byVVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), + ##Commenting out all new algos for pre5 unit test + ##These must be readded in pre6!!! + #byIsolationMVArun2v1DBoldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), + #byVLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), + #byLooseIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), + #byMediumIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), + #byTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), + #byVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), + #byVVTightIsolationMVArun2v1DBoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), + #byIsolationMVArun2v1DBnewDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), + #byVLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), + #byLooseIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), + #byMediumIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), + #byTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), + #byVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), + #byVVTightIsolationMVArun2v1DBnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), + #byIsolationMVArun2v1PWoldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), + #byVLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), + #byLooseIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), + #byMediumIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), + #byTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), + #byVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), + #byVVTightIsolationMVArun2v1PWoldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), + #byIsolationMVArun2v1PWnewDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), + #byVLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), + #byLooseIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), + #byMediumIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), + #byTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), + #byVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), + #byVVTightIsolationMVArun2v1PWnewDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), + #chargedIsoPtSumdR03 = cms.InputTag("hpsPFTauChargedIsoPtSumdR03"), + #neutralIsoPtSumdR03 = cms.InputTag("hpsPFTauNeutralIsoPtSumdR03"), + #puCorrPtSumdR03 = cms.InputTag("hpsPFTauPUcorrPtSumdR03"), + #neutralIsoPtSumWeightdR03 = cms.InputTag("hpsPFTauNeutralIsoPtSumWeightdR03"), + #footprintCorrectiondR03 = cms.InputTag("hpsPFTauFootprintCorrectiondR03"), + #photonPtSumOutsideSignalConedR03 = cms.InputTag("hpsPFTauPhotonPtSumOutsideSignalConedR03"), + #byIsolationMVArun2v1DBdR03oldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), + #byVLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), + #byLooseIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), + #byMediumIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), + #byTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), + #byVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), + #byVVTightIsolationMVArun2v1DBdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), + #byIsolationMVArun2v1PWdR03oldDMwLTraw = cms.InputTag("hpsPFTauDiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), + #byVLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), + #byLooseIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), + #byMediumIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), + #byTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), + #byVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), + #byVVTightIsolationMVArun2v1PWdR03oldDMwLT = cms.InputTag("hpsPFTauDiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), ##New Run2 MVA discriminator against electrons - againstElectronMVA6raw = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection"), - againstElectronMVA6category = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection:category"), - againstElectronVLooseMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6VLooseElectronRejection"), - againstElectronLooseMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6LooseElectronRejection"), - againstElectronMediumMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6MediumElectronRejection"), - againstElectronTightMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6TightElectronRejection"), - againstElectronVTightMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6VTightElectronRejection"), + #againstElectronMVA6raw = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection"), + #againstElectronMVA6category = cms.InputTag("hpsPFTauDiscriminationByMVA6rawElectronRejection:category"), + #againstElectronVLooseMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6VLooseElectronRejection"), + #againstElectronLooseMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6LooseElectronRejection"), + #againstElectronMediumMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6MediumElectronRejection"), + #againstElectronTightMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6TightElectronRejection"), + #againstElectronVTightMVA6 = cms.InputTag("hpsPFTauDiscriminationByMVA6VTightElectronRejection"), + ##the above should be added back in for pre6!! ), # mc matching configurables diff --git a/PhysicsTools/PatAlgos/python/tools/tauTools.py b/PhysicsTools/PatAlgos/python/tools/tauTools.py index fe859e26bc932..ed4bf6b75c51f 100644 --- a/PhysicsTools/PatAlgos/python/tools/tauTools.py +++ b/PhysicsTools/PatAlgos/python/tools/tauTools.py @@ -109,9 +109,10 @@ def _switchToPFTau(process, ("byMediumCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3Hits"), ("byTightCombinedIsolationDeltaBetaCorr3Hits", "DiscriminationByTightCombinedIsolationDBSumPtCorr3Hits"), ("byCombinedIsolationDeltaBetaCorrRaw3Hits", "DiscriminationByRawCombinedIsolationDBSumPtCorr3Hits"), - ("byLooseCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03"), - ("byMediumCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03"), - ("byTightCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03"), + #these should be readded in 8_0_0_pre6 + #("byLooseCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByLooseCombinedIsolationDBSumPtCorr3HitsdR03"), + #("byMediumCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByMediumCombinedIsolationDBSumPtCorr3HitsdR03"), + #("byTightCombinedIsolationDeltaBetaCorr3HitsdR03", "DiscriminationByTightCombinedIsolationDBSumPtCorr3HitsdR03"), ("byLoosePileupWeightedIsolation3Hits", "DiscriminationByLoosePileupWeightedIsolation3Hits"), ("byMediumPileupWeightedIsolation3Hits", "DiscriminationByMediumPileupWeightedIsolation3Hits"), ("byTightPileupWeightedIsolation3Hits", "DiscriminationByTightPileupWeightedIsolation3Hits"), @@ -147,62 +148,63 @@ def _switchToPFTau(process, ("againstMuonLoose3", "DiscriminationByLooseMuonRejection3"), ("againstMuonTight3", "DiscriminationByTightMuonRejection3"), ##New Run2 MVA isolation - ("byIsolationMVArun2v1DBoldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), - ("byVLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), - ("byLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), - ("byMediumIsolationMVArun2v1DBoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), - ("byTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), - ("byVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), - ("byVVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), - ("byIsolationMVArun2v1DBnewDMwLTraw", "DiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), - ("byVLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), - ("byLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), - ("byMediumIsolationMVArun2v1DBnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), - ("byTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), - ("byVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), - ("byVVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), - ("byIsolationMVArun2v1PWoldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), - ("byVLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), - ("byLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), - ("byMediumIsolationMVArun2v1PWoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), - ("byTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), - ("byVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), - ("byVVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), - ("byIsolationMVArun2v1PWnewDMwLTraw", "DiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), - ("byVLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), - ("byLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), - ("byMediumIsolationMVArun2v1PWnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), - ("byTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), - ("byVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), - ("byVVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), - ("chargedIsoPtSumdR03", "ChargedIsoPtSumdR03"), - ("neutralIsoPtSumdR03", "NeutralIsoPtSumdR03"), - ("puCorrPtSumdR03", "PUcorrPtSumdR03"), - ("neutralIsoPtSumWeightdR03", "NeutralIsoPtSumWeightdR03"), - ("footprintCorrectiondR03", "FootprintCorrectiondR03"), - ("photonPtSumOutsideSignalConedR03", "PhotonPtSumOutsideSignalConedR03"), - ("byIsolationMVArun2v1DBdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), - ("byVLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), - ("byLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), - ("byMediumIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), - ("byTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), - ("byVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), - ("byVVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), - ("byIsolationMVArun2v1PWdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), - ("byVLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), - ("byLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), - ("byMediumIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), - ("byTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), - ("byVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), - ("byVVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), + #these should be readded in 8_0_0_pre6 + #("byIsolationMVArun2v1DBoldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBoldDMwLTraw"), + #("byVLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBoldDMwLT"), + #("byLooseIsolationMVArun2v1DBoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBoldDMwLT"), + #("byMediumIsolationMVArun2v1DBoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBoldDMwLT"), + #("byTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBoldDMwLT"), + #("byVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBoldDMwLT"), + #("byVVTightIsolationMVArun2v1DBoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBoldDMwLT"), + #("byIsolationMVArun2v1DBnewDMwLTraw", "DiscriminationByIsolationMVArun2v1DBnewDMwLTraw"), + #("byVLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBnewDMwLT"), + #("byLooseIsolationMVArun2v1DBnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBnewDMwLT"), + #("byMediumIsolationMVArun2v1DBnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBnewDMwLT"), + #("byTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByTightIsolationMVArun2v1DBnewDMwLT"), + #("byVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBnewDMwLT"), + #("byVVTightIsolationMVArun2v1DBnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBnewDMwLT"), + #("byIsolationMVArun2v1PWoldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWoldDMwLTraw"), + #("byVLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWoldDMwLT"), + #("byLooseIsolationMVArun2v1PWoldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWoldDMwLT"), + #("byMediumIsolationMVArun2v1PWoldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWoldDMwLT"), + #("byTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWoldDMwLT"), + #("byVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWoldDMwLT"), + #("byVVTightIsolationMVArun2v1PWoldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWoldDMwLT"), + #("byIsolationMVArun2v1PWnewDMwLTraw", "DiscriminationByIsolationMVArun2v1PWnewDMwLTraw"), + #("byVLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWnewDMwLT"), + #("byLooseIsolationMVArun2v1PWnewDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWnewDMwLT"), + #("byMediumIsolationMVArun2v1PWnewDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWnewDMwLT"), + #("byTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByTightIsolationMVArun2v1PWnewDMwLT"), + #("byVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWnewDMwLT"), + #("byVVTightIsolationMVArun2v1PWnewDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWnewDMwLT"), + #("chargedIsoPtSumdR03", "ChargedIsoPtSumdR03"), + #("neutralIsoPtSumdR03", "NeutralIsoPtSumdR03"), + #("puCorrPtSumdR03", "PUcorrPtSumdR03"), + #("neutralIsoPtSumWeightdR03", "NeutralIsoPtSumWeightdR03"), + #("footprintCorrectiondR03", "FootprintCorrectiondR03"), + #("photonPtSumOutsideSignalConedR03", "PhotonPtSumOutsideSignalConedR03"), + #("byIsolationMVArun2v1DBdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1DBdR03oldDMwLTraw"), + #("byVLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1DBdR03oldDMwLT"), + #("byLooseIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1DBdR03oldDMwLT"), + #("byMediumIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1DBdR03oldDMwLT"), + #("byTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1DBdR03oldDMwLT"), + #("byVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1DBdR03oldDMwLT"), + #("byVVTightIsolationMVArun2v1DBdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1DBdR03oldDMwLT"), + #("byIsolationMVArun2v1PWdR03oldDMwLTraw", "DiscriminationByIsolationMVArun2v1PWdR03oldDMwLTraw"), + #("byVLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVLooseIsolationMVArun2v1PWdR03oldDMwLT"), + #("byLooseIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByLooseIsolationMVArun2v1PWdR03oldDMwLT"), + #("byMediumIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByMediumIsolationMVArun2v1PWdR03oldDMwLT"), + #("byTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByTightIsolationMVArun2v1PWdR03oldDMwLT"), + #("byVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVTightIsolationMVArun2v1PWdR03oldDMwLT"), + #("byVVTightIsolationMVArun2v1PWdR03oldDMwLT", "DiscriminationByVVTightIsolationMVArun2v1PWdR03oldDMwLT"), ##New Run2 MVA discriminator against electrons - ("againstElectronMVA6raw", "DiscriminationByMVA6rawElectronRejection"), - ("againstElectronMVA6category", "DiscriminationByMVA6rawElectronRejection:category"), - ("againstElectronVLooseMVA6", "DiscriminationByMVA6VLooseElectronRejection"), - ("againstElectronLooseMVA6", "DiscriminationByMVA6LooseElectronRejection"), - ("againstElectronMediumMVA6", "DiscriminationByMVA6MediumElectronRejection"), - ("againstElectronTightMVA6", "DiscriminationByMVA6TightElectronRejection"), - ("againstElectronVTightMVA6", "DiscriminationByMVA6VTightElectronRejection"), + #("againstElectronMVA6raw", "DiscriminationByMVA6rawElectronRejection"), + #("againstElectronMVA6category", "DiscriminationByMVA6rawElectronRejection:category"), + #("againstElectronVLooseMVA6", "DiscriminationByMVA6VLooseElectronRejection"), + #("againstElectronLooseMVA6", "DiscriminationByMVA6LooseElectronRejection"), + #("againstElectronMediumMVA6", "DiscriminationByMVA6MediumElectronRejection"), + #("againstElectronTightMVA6", "DiscriminationByMVA6TightElectronRejection"), + #("againstElectronVTightMVA6", "DiscriminationByMVA6VTightElectronRejection"), ] # switch to PFTau collection produced for fixed dR = 0.07 signal cone size From c250e7b3bf16bf4bc1b1da75ae2d867ef16d3bf7 Mon Sep 17 00:00:00 2001 From: Junghwan John Goh Date: Thu, 28 Jan 2016 19:00:31 +0100 Subject: [PATCH 164/250] do not redo sorting, reviving old PR 12090 --- .../interface/MuonShowerInformationFiller.h | 1 - .../src/MuonShowerInformationFiller.cc | 126 +++++++++++------- 2 files changed, 76 insertions(+), 51 deletions(-) diff --git a/RecoMuon/MuonIdentification/interface/MuonShowerInformationFiller.h b/RecoMuon/MuonIdentification/interface/MuonShowerInformationFiller.h index 923d74974b304..9213bffe0b65e 100644 --- a/RecoMuon/MuonIdentification/interface/MuonShowerInformationFiller.h +++ b/RecoMuon/MuonIdentification/interface/MuonShowerInformationFiller.h @@ -103,7 +103,6 @@ class MuonShowerInformationFiller { std::vector dtPositionToDets(const GlobalPoint&) const; std::vector cscPositionToDets(const GlobalPoint&) const; MuonRecHitContainer findPerpCluster(MuonRecHitContainer& muonRecHits) const; - MuonRecHitContainer findPhiCluster(MuonRecHitContainer&, const GlobalPoint&) const; TransientTrackingRecHit::ConstRecHitContainer findThetaCluster(TransientTrackingRecHit::ConstRecHitContainer&, const GlobalPoint&) const; TransientTrackingRecHit::ConstRecHitContainer hitsFromSegments(const GeomDet*,edm::Handle, edm::Handle) const; std::vector getCompatibleDets(const reco::Track&) const; diff --git a/RecoMuon/MuonIdentification/src/MuonShowerInformationFiller.cc b/RecoMuon/MuonIdentification/src/MuonShowerInformationFiller.cc index d383585fe265b..310be33f041f2 100644 --- a/RecoMuon/MuonIdentification/src/MuonShowerInformationFiller.cc +++ b/RecoMuon/MuonIdentification/src/MuonShowerInformationFiller.cc @@ -276,36 +276,7 @@ MuonShowerInformationFiller::hitsFromSegments(const GeomDet* geomDet, // // Find cluster // -MuonTransientTrackingRecHit::MuonRecHitContainer -MuonShowerInformationFiller::findPhiCluster(MuonTransientTrackingRecHit::MuonRecHitContainer& muonRecHits, - const GlobalPoint& refpoint) const { - - if ( muonRecHits.empty() ) return muonRecHits; - - //clustering step by phi - float step = 0.05; - MuonTransientTrackingRecHit::MuonRecHitContainer result; - - stable_sort(muonRecHits.begin(), muonRecHits.end(), AbsLessDPhi(refpoint)); - for (MuonTransientTrackingRecHit::MuonRecHitContainer::const_iterator ihit = muonRecHits.begin(); ihit != muonRecHits.end() - 1; ++ihit) { - if (fabs(deltaPhi((*(ihit+1))->globalPosition().barePhi(), (*ihit)->globalPosition().barePhi() )) < step) { - result.push_back(*ihit); - } else { - break; - } - } - - LogTrace(category_) << "phi front: " << muonRecHits.front()->globalPosition().phi() << endl; - LogTrace(category_) << "phi back: " << muonRecHits.back()->globalPosition().phi() << endl; - - return result; - -} - -// -// -// TransientTrackingRecHit::ConstRecHitContainer MuonShowerInformationFiller::findThetaCluster(TransientTrackingRecHit::ConstRecHitContainer& muonRecHits, const GlobalPoint& refpoint) const { @@ -838,28 +809,83 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { << theAllStationHits.at(3) << endl; //station shower sizes - MuonTransientTrackingRecHit::MuonRecHitContainer muonRecHitsPhiTemp, muonRecHitsPhiBest; + MuonTransientTrackingRecHit::MuonRecHitContainer muonRecHitsPhiBest; TransientTrackingRecHit::ConstRecHitContainer muonRecHitsThetaTemp, muonRecHitsThetaBest; - // send station hits to the clustering algorithm for ( int stat = 0; stat != 4; stat++ ) { - if (!muonRecHits[stat].empty()) { - stable_sort(muonRecHits[stat].begin(), muonRecHits[stat].end(), LessPhi()); - - float dphimax = 0; - for (MuonTransientTrackingRecHit::MuonRecHitContainer::const_iterator iseed = muonRecHits[stat].begin(); iseed != muonRecHits[stat].end(); ++iseed) { - if (!(*iseed)->isValid()) continue; - GlobalPoint refpoint = (*iseed)->globalPosition(); //starting from the one with smallest value of phi - muonRecHitsPhiTemp.clear(); - muonRecHitsPhiTemp = findPhiCluster(muonRecHits[stat], refpoint); //get clustered hits for this iseed - if (muonRecHitsPhiTemp.size() > 1) { - float dphi = fabs(deltaPhi((float)muonRecHitsPhiTemp.back()->globalPosition().barePhi(), (float)muonRecHitsPhiTemp.front()->globalPosition().barePhi())); - if (dphi > dphimax) { - dphimax = dphi; - muonRecHitsPhiBest = muonRecHitsPhiTemp; - } - } //at least two hits - }//loop over seeds + const size_t nhit = muonRecHits[stat].size(); + if (nhit < 2) continue; // Require at least 2 hits + muonRecHitsPhiBest.clear(); + muonRecHitsPhiBest.reserve(nhit); + + // Cluster seeds by global position phi. Best cluster is chosen to give greatest dphi + // Sort by phi (complexity = NLogN with enough memory, or = NLog^2N for insufficient mem) + stable_sort(muonRecHits[stat].begin(), muonRecHits[stat].end(), LessPhi()); + + // Search for gaps (complexity = N) + std::vector clUppers; + for ( size_t ihit = 0; ihit < nhit; ++ihit ) { + const size_t jhit = (ihit+1)%nhit; + const double phi1 = muonRecHits[stat].at(ihit)->globalPosition().phi(); + const double phi2 = muonRecHits[stat].at(jhit)->globalPosition().phi(); + + const double dphi = std::abs(deltaPhi(phi1, phi2)); + if ( dphi >= 0.05 ) clUppers.push_back(ihit); + } + + //station shower sizes + double dphimax = 0; + if ( clUppers.empty() ) { + // No gaps - there is only one cluster. Take all of them + const double refPhi = muonRecHits[stat].at(0)->globalPosition().phi(); + double dphilo = 0, dphihi = 0; + for ( auto& hit : muonRecHits[stat] ) { + muonRecHitsPhiBest.push_back(hit); + const double phi = hit->globalPosition().phi(); + dphilo = std::min(dphilo, deltaPhi(refPhi, phi)); + dphihi = std::max(dphihi, deltaPhi(refPhi, phi)); + } + dphimax = std::abs(dphihi+dphilo); + } else { + // Loop over gaps to find the one with maximum dphi(begin, end) + // By construction, number of gap must be greater than 1. + size_t bestUpper = 0, bestLower = 0; + for ( auto icl = clUppers.begin(); icl != clUppers.end(); ++icl ) { + // upper bound of this cluster + const size_t upper = *icl; + // lower bound is +1 of preceeding upper bound + const auto prevCl = (icl == clUppers.begin()) ? clUppers.end() : icl; + const size_t lower = (*(prevCl-1)+1)%nhit; + + // At least two hit for a cluster + if ( upper == lower ) continue; + + const double phi1 = muonRecHits[stat].at(upper)->globalPosition().phi(); + const double phi2 = muonRecHits[stat].at(lower)->globalPosition().phi(); + + const double dphi = std::abs(deltaPhi(phi1, phi2)); + if ( dphimax < dphi ) { + dphimax = dphi; + bestUpper = upper; + bestLower = lower; + } + } + + if ( bestUpper > bestLower ) { + muonRecHitsPhiBest.reserve(bestUpper-bestLower+1); + std::copy(muonRecHits[stat].begin()+bestLower, + muonRecHits[stat].begin()+bestUpper+1, + std::back_inserter(muonRecHitsPhiBest)); + } else if ( bestUpper < bestLower ) { + muonRecHitsPhiBest.reserve(bestUpper+(nhit-bestLower)+1); + std::copy(muonRecHits[stat].begin(), + muonRecHits[stat].begin()+bestUpper+1, + std::back_inserter(muonRecHitsPhiBest)); + std::copy(muonRecHits[stat].begin()+bestLower, + muonRecHits[stat].end(), + std::back_inserter(muonRecHitsPhiBest)); + } + } //fill showerTs if (!muonRecHitsPhiBest.empty()) { @@ -879,7 +905,7 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { GlobalPoint refpoint = (*iseed)->globalPosition(); //starting from the one with smallest value of phi muonRecHitsThetaTemp.clear(); muonRecHitsThetaTemp = findThetaCluster(muonCorrelatedHits.at(stat), refpoint); - }//loop over seeds + }//loop over seeds if (muonRecHitsThetaTemp.size() > 1) { float dtheta = fabs((float)muonRecHitsThetaTemp.back()->globalPosition().theta() - (float)muonRecHitsThetaTemp.front()->globalPosition().theta()); if (dtheta > dthetamax) { @@ -893,7 +919,6 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { if (muonRecHitsThetaBest.size() > 1 && muonRecHitsPhiBest.size() > 1) theStationShowerDeltaR.at(stat) = sqrt(pow(deltaPhi(muonRecHitsPhiBest.front()->globalPosition().barePhi(),muonRecHitsPhiBest.back()->globalPosition().barePhi()),2)+pow(muonRecHitsThetaBest.front()->globalPosition().theta()-muonRecHitsThetaBest.back()->globalPosition().theta(),2)); - }//not empty container }//loop over station LogTrace(category_) << "deltaR around a track containing all the station hits, by station " @@ -912,3 +937,4 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { return; } + From ccabcdc82c21186e1047c332c22c0ddb01dc3a03 Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 28 Jan 2016 22:36:27 +0100 Subject: [PATCH 165/250] initial commit with updated WP for filter --- DataFormats/METReco/interface/HcalHaloData.h | 7 ++++ DataFormats/METReco/src/classes_def.xml | 3 +- RecoMET/METAlgorithms/src/HcalHaloAlgo.cc | 36 +++++++++++++++++-- .../METFilters/plugins/HcalStripHaloFilter.cc | 8 ++++- .../python/HcalStripHaloFilter_cfi.py | 4 ++- 5 files changed, 52 insertions(+), 6 deletions(-) diff --git a/DataFormats/METReco/interface/HcalHaloData.h b/DataFormats/METReco/interface/HcalHaloData.h index 93e92e68afd81..fe7fc212ce97d 100644 --- a/DataFormats/METReco/interface/HcalHaloData.h +++ b/DataFormats/METReco/interface/HcalHaloData.h @@ -7,6 +7,7 @@ [date]: October 15, 2009 */ #include +#include #include "DataFormats/METReco/interface/PhiWedge.h" #include "DataFormats/DetId/interface/DetId.h" #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" @@ -14,13 +15,19 @@ struct HaloTowerStrip { std::vector > cellTowerIds; float hadEt; + float energyRatio; + float emEt; HaloTowerStrip() { hadEt = 0.0; + energyRatio = -1.0; + emEt = 0.0; cellTowerIds.clear(); } HaloTowerStrip(const HaloTowerStrip& strip) { cellTowerIds = strip.cellTowerIds; hadEt = strip.hadEt; + energyRatio = strip.energyRatio; + emEt = strip.emEt; } }; diff --git a/DataFormats/METReco/src/classes_def.xml b/DataFormats/METReco/src/classes_def.xml index c339d2dd3614d..5a3ac40872017 100644 --- a/DataFormats/METReco/src/classes_def.xml +++ b/DataFormats/METReco/src/classes_def.xml @@ -172,7 +172,8 @@
- + + diff --git a/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc b/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc index 224d50f366101..2a9ededd1285a 100644 --- a/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc +++ b/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc @@ -128,24 +128,38 @@ HcalHaloData HcalHaloAlgo::Calculate(const CaloGeometry& TheCaloGeometry, edm::H } } + // Don't use HF. int maxAbsIEta = 29; + + + std::map iPhiHadEtMap; std::vector sortedCaloTowers; for(CaloTowerCollection::const_iterator tower = TheCaloTowers->begin(); tower != TheCaloTowers->end(); tower++) { - if(abs(tower->ieta()) <= maxAbsIEta && tower->numProblematicHcalCells() > 0) - sortedCaloTowers.push_back(&(*tower)); + if(abs(tower->ieta()) > maxAbsIEta) continue; + + int iPhi = tower->iphi(); + if(!iPhiHadEtMap.count(iPhi)) iPhiHadEtMap[iPhi] = 0.0; + iPhiHadEtMap[iPhi] += tower->hadEt(); + + if(tower->numProblematicHcalCells() > 0) sortedCaloTowers.push_back(&(*tower)); + } + // Sort towers such that lowest iphi and ieta are first, highest last, and towers // with same iphi value are consecutive. Then we can do everything else in one loop. std::sort(sortedCaloTowers.begin(), sortedCaloTowers.end(), CompareTowers); HaloTowerStrip strip; + int prevIEta = -99, prevIPhi = -99; float prevHadEt = 0.; + float prevEmEt = 0.; std::pair prevPair, towerPair; bool wasContiguous = true; + // Loop through and store a vector of pairs (problematicCells, DetId) for each contiguous strip we find for(unsigned int i = 0; i < sortedCaloTowers.size(); i++) { const CaloTower* tower = sortedCaloTowers[i]; @@ -162,22 +176,38 @@ HcalHaloData HcalHaloAlgo::Calculate(const CaloGeometry& TheCaloGeometry, edm::H strip.cellTowerIds.push_back(prevPair); strip.cellTowerIds.push_back(towerPair); strip.hadEt += prevHadEt + tower->hadEt(); + strip.emEt += prevEmEt + tower->emEt(); } if(wasContiguous && isContiguous) { strip.cellTowerIds.push_back(towerPair); strip.hadEt += tower->hadEt(); + strip.emEt += tower->emEt(); } if((wasContiguous && !isContiguous) || i == sortedCaloTowers.size()-1) { //ended the strip, so flush it - if(strip.cellTowerIds.size() > 2) { + + if(strip.cellTowerIds.size() > 3) { + + int iPhi = strip.cellTowerIds.at(0).second.iphi(); + int iPhiLower = (iPhi == 1) ? 72 : iPhi - 1; + int iPhiUpper = (iPhi == 72) ? 1 : iPhi + 1; + + float energyRatio = 0.0; + if(iPhiHadEtMap.count(iPhiLower)) energyRatio += iPhiHadEtMap[iPhiLower]; + if(iPhiHadEtMap.count(iPhiUpper)) energyRatio += iPhiHadEtMap[iPhiUpper]; + energyRatio /= iPhiHadEtMap[iPhi]; + strip.energyRatio = energyRatio; + TheHcalHaloData.getProblematicStrips().push_back( strip ); + } strip = HaloTowerStrip(); } wasContiguous = isContiguous; prevPair = towerPair; + prevEmEt = tower->emEt(); prevIPhi = tower->iphi(); prevIEta = tower->ieta(); prevHadEt = tower->hadEt(); diff --git a/RecoMET/METFilters/plugins/HcalStripHaloFilter.cc b/RecoMET/METFilters/plugins/HcalStripHaloFilter.cc index a3d4e0a88f08f..9f7c9ad01132d 100644 --- a/RecoMET/METFilters/plugins/HcalStripHaloFilter.cc +++ b/RecoMET/METFilters/plugins/HcalStripHaloFilter.cc @@ -18,12 +18,16 @@ class HcalStripHaloFilter : public edm::global::EDFilter<> { const bool taggingMode_; const int maxWeightedStripLength_; + const double maxEnergyRatio_; + const double minHadEt_; edm::EDGetTokenT beamHaloSummaryToken_; }; HcalStripHaloFilter::HcalStripHaloFilter(const edm::ParameterSet & iConfig) : taggingMode_ (iConfig.getParameter ("taggingMode")) , maxWeightedStripLength_ (iConfig.getParameter("maxWeightedStripLength")) + , maxEnergyRatio_ (iConfig.getParameter("maxEnergyRatio")) + , minHadEt_ (iConfig.getParameter("minHadEt")) , beamHaloSummaryToken_(consumes(edm::InputTag("BeamHaloSummary"))) { produces(); @@ -42,7 +46,9 @@ bool HcalStripHaloFilter::filter(edm::StreamID iID, edm::Event & iEvent, const e for (unsigned int iTower = 0; iTower < problematicStrip.cellTowerIds.size(); iTower++) { numContiguousCells += (int)problematicStrip.cellTowerIds[iTower].first; } - if(numContiguousCells > maxWeightedStripLength_) { + if( numContiguousCells > maxWeightedStripLength_ + && problematicStrip.energyRatio < maxEnergyRatio_ + && problematicStrip.hadEt > minHadEt_ ) { pass = false; break; } diff --git a/RecoMET/METFilters/python/HcalStripHaloFilter_cfi.py b/RecoMET/METFilters/python/HcalStripHaloFilter_cfi.py index a297d79160795..f89a2b5f48612 100644 --- a/RecoMET/METFilters/python/HcalStripHaloFilter_cfi.py +++ b/RecoMET/METFilters/python/HcalStripHaloFilter_cfi.py @@ -3,5 +3,7 @@ HcalStripHaloFilter = cms.EDFilter( "HcalStripHaloFilter", taggingMode = cms.bool(False), - maxWeightedStripLength = cms.int32(9) # values higher than this are rejected + maxWeightedStripLength = cms.int32(7), + maxEnergyRatio = cms.double(0.15), + minHadEt = cms.double(100.0) ) From 850ef0218e97890bb14ec873633da4a9ce499292 Mon Sep 17 00:00:00 2001 From: Nick Date: Thu, 28 Jan 2016 22:41:23 +0100 Subject: [PATCH 166/250] fix type --- RecoMET/METFilters/plugins/HcalStripHaloFilter.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoMET/METFilters/plugins/HcalStripHaloFilter.cc b/RecoMET/METFilters/plugins/HcalStripHaloFilter.cc index 9f7c9ad01132d..ccd3718fb973e 100644 --- a/RecoMET/METFilters/plugins/HcalStripHaloFilter.cc +++ b/RecoMET/METFilters/plugins/HcalStripHaloFilter.cc @@ -26,8 +26,8 @@ class HcalStripHaloFilter : public edm::global::EDFilter<> { HcalStripHaloFilter::HcalStripHaloFilter(const edm::ParameterSet & iConfig) : taggingMode_ (iConfig.getParameter ("taggingMode")) , maxWeightedStripLength_ (iConfig.getParameter("maxWeightedStripLength")) - , maxEnergyRatio_ (iConfig.getParameter("maxEnergyRatio")) - , minHadEt_ (iConfig.getParameter("minHadEt")) + , maxEnergyRatio_ (iConfig.getParameter("maxEnergyRatio")) + , minHadEt_ (iConfig.getParameter("minHadEt")) , beamHaloSummaryToken_(consumes(edm::InputTag("BeamHaloSummary"))) { produces(); From 69d33766b907ac6cc31733d7eda3253b7ae5e2fa Mon Sep 17 00:00:00 2001 From: Nick Date: Fri, 29 Jan 2016 01:28:19 +0100 Subject: [PATCH 167/250] safeguard --- RecoMET/METAlgorithms/src/HcalHaloAlgo.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc b/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc index 2a9ededd1285a..e10a39d38d7d8 100644 --- a/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc +++ b/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc @@ -196,6 +196,8 @@ HcalHaloData HcalHaloAlgo::Calculate(const CaloGeometry& TheCaloGeometry, edm::H float energyRatio = 0.0; if(iPhiHadEtMap.count(iPhiLower)) energyRatio += iPhiHadEtMap[iPhiLower]; if(iPhiHadEtMap.count(iPhiUpper)) energyRatio += iPhiHadEtMap[iPhiUpper]; + iPhiHadEtMap[iPhi] = max(iPhiHadEtMap[iPhi], 0.001F); + energyRatio /= iPhiHadEtMap[iPhi]; strip.energyRatio = energyRatio; From dc3d9714f418871ea6784c8e762b300e21aa64e2 Mon Sep 17 00:00:00 2001 From: Joosep Pata Date: Fri, 15 Jan 2016 14:53:01 +0100 Subject: [PATCH 168/250] added negative/positive cMVAv2 conf files Conflicts: RecoBTag/Combined/python/combinedMVA_cff.py removed couts --- .../python/recoLayer0/bTagging_cff.py | 4 ++++ ...didateNegativeCombinedMVAV2Computer_cfi.py | 21 +++++++++++++++++++ ...didatePositiveCombinedMVAV2Computer_cfi.py | 21 +++++++++++++++++++ RecoBTag/Combined/python/combinedMVA_cff.py | 13 +++++++++++- .../negativeCombinedMVAV2BJetTags_cfi.py | 12 +++++++++++ .../negativeCombinedMVAV2Computer_cfi.py | 20 ++++++++++++++++++ .../pfNegativeCombinedMVAV2BJetTags_cfi.py | 12 +++++++++++ .../pfPositiveCombinedMVAV2BJetTags_cfi.py | 12 +++++++++++ .../positiveCombinedMVAV2BJetTags_cfi.py | 12 +++++++++++ .../positiveCombinedMVAV2Computer_cfi.py | 20 ++++++++++++++++++ .../src/CombinedMVAV2JetTagComputer.cc | 3 --- 11 files changed, 146 insertions(+), 4 deletions(-) create mode 100644 RecoBTag/Combined/python/candidateNegativeCombinedMVAV2Computer_cfi.py create mode 100644 RecoBTag/Combined/python/candidatePositiveCombinedMVAV2Computer_cfi.py create mode 100644 RecoBTag/Combined/python/negativeCombinedMVAV2BJetTags_cfi.py create mode 100644 RecoBTag/Combined/python/negativeCombinedMVAV2Computer_cfi.py create mode 100644 RecoBTag/Combined/python/pfNegativeCombinedMVAV2BJetTags_cfi.py create mode 100644 RecoBTag/Combined/python/pfPositiveCombinedMVAV2BJetTags_cfi.py create mode 100644 RecoBTag/Combined/python/positiveCombinedMVAV2BJetTags_cfi.py create mode 100644 RecoBTag/Combined/python/positiveCombinedMVAV2Computer_cfi.py diff --git a/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py b/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py index d19e27946d3a7..7a363ef4ef7a8 100644 --- a/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py +++ b/PhysicsTools/PatAlgos/python/recoLayer0/bTagging_cff.py @@ -69,6 +69,8 @@ , 'positiveCombinedMVABJetTags' : ['impactParameterTagInfos', 'inclusiveSecondaryVertexFinderTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] , 'negativeCombinedMVABJetTags' : ['impactParameterTagInfos', 'inclusiveSecondaryVertexFinderNegativeTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] , 'combinedMVAV2BJetTags' : ['impactParameterTagInfos', 'secondaryVertexTagInfos', 'inclusiveSecondaryVertexFinderTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] + , 'negativeCombinedMVAV2BJetTags' : ['impactParameterTagInfos', 'secondaryVertexNegativeTagInfos', 'inclusiveSecondaryVertexFinderNegativeTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] + , 'positiveCombinedMVAV2BJetTags' : ['impactParameterTagInfos', 'secondaryVertexTagInfos', 'inclusiveSecondaryVertexFinderTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] # new candidate-based framework (supported with RECO/AOD/MiniAOD) , 'pfJetBProbabilityBJetTags' : ['pfImpactParameterTagInfos'] , 'pfJetProbabilityBJetTags' : ['pfImpactParameterTagInfos'] @@ -124,6 +126,8 @@ , 'pfPositiveCombinedMVABJetTags' : ['pfImpactParameterTagInfos', 'pfInclusiveSecondaryVertexFinderTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] , 'pfNegativeCombinedMVABJetTags' : ['pfImpactParameterTagInfos', 'pfInclusiveSecondaryVertexFinderNegativeTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] , 'pfCombinedMVAV2BJetTags' : ['pfImpactParameterTagInfos', 'pfSecondaryVertexTagInfos', 'pfInclusiveSecondaryVertexFinderTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] + , 'pfNegativeCombinedMVAV2BJetTags' : ['pfImpactParameterTagInfos', 'pfSecondaryVertexNegativeTagInfos', 'pfInclusiveSecondaryVertexFinderNegativeTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] + , 'pfPositiveCombinedMVAV2BJetTags' : ['pfImpactParameterTagInfos', 'pfSecondaryVertexTagInfos', 'pfInclusiveSecondaryVertexFinderTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] , 'pfCombinedSecondaryVertexSoftLeptonBJetTags' : ['pfImpactParameterTagInfos', 'pfInclusiveSecondaryVertexFinderTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] , 'pfNegativeCombinedSecondaryVertexSoftLeptonBJetTags' : ['pfImpactParameterTagInfos', 'pfInclusiveSecondaryVertexFinderNegativeTagInfos', 'softPFMuonsTagInfos', 'softPFElectronsTagInfos'] , 'pfBoostedDoubleSecondaryVertexAK8BJetTags' : ['pfImpactParameterTagInfosAK8', 'pfInclusiveSecondaryVertexFinderTagInfosAK8'] diff --git a/RecoBTag/Combined/python/candidateNegativeCombinedMVAV2Computer_cfi.py b/RecoBTag/Combined/python/candidateNegativeCombinedMVAV2Computer_cfi.py new file mode 100644 index 0000000000000..eab8b5c36e5a4 --- /dev/null +++ b/RecoBTag/Combined/python/candidateNegativeCombinedMVAV2Computer_cfi.py @@ -0,0 +1,21 @@ +import FWCore.ParameterSet.Config as cms + +candidateNegativeCombinedMVAV2Computer = cms.ESProducer("CombinedMVAV2JetTagESProducer", + jetTagComputers = cms.vstring( + 'candidateNegativeOnlyJetProbabilityComputer', + 'candidateNegativeOnlyJetBProbabilityComputer', + 'candidateNegativeCombinedSecondaryVertexV2Computer', + 'negativeSoftPFMuonComputer', + 'negativeSoftPFElectronComputer' + ), + mvaName = cms.string("bdt"), + variables = cms.vstring( + ["Jet_CSV", "Jet_CSVIVF", "Jet_JP", "Jet_JBP", "Jet_SoftMu", "Jet_SoftEl"] + ), + spectators = cms.vstring([]), + useCondDB = cms.bool(True), + gbrForestLabel = cms.string("btag_CombinedMVAv2_BDT"), + useGBRForest = cms.bool(True), + useAdaBoost = cms.bool(False), + weightFile = cms.FileInPath('RecoBTag/Combined/data/CombinedMVAV2_13_07_2015.weights.xml.gz') +) diff --git a/RecoBTag/Combined/python/candidatePositiveCombinedMVAV2Computer_cfi.py b/RecoBTag/Combined/python/candidatePositiveCombinedMVAV2Computer_cfi.py new file mode 100644 index 0000000000000..149dbfeceb479 --- /dev/null +++ b/RecoBTag/Combined/python/candidatePositiveCombinedMVAV2Computer_cfi.py @@ -0,0 +1,21 @@ +import FWCore.ParameterSet.Config as cms + +candidatePositiveCombinedMVAV2Computer = cms.ESProducer("CombinedMVAV2JetTagESProducer", + jetTagComputers = cms.vstring( + 'candidatePositiveOnlyJetProbabilityComputer', + 'candidatePositiveOnlyJetBProbabilityComputer', + 'candidatePositiveCombinedSecondaryVertexV2Computer', + 'negativeSoftPFMuonComputer', + 'negativeSoftPFElectronComputer' + ), + mvaName = cms.string("bdt"), + variables = cms.vstring( + ["Jet_CSV", "Jet_CSVIVF", "Jet_JP", "Jet_JBP", "Jet_SoftMu", "Jet_SoftEl"] + ), + spectators = cms.vstring([]), + useCondDB = cms.bool(True), + gbrForestLabel = cms.string("btag_CombinedMVAv2_BDT"), + useGBRForest = cms.bool(True), + useAdaBoost = cms.bool(False), + weightFile = cms.FileInPath('RecoBTag/Combined/data/CombinedMVAV2_13_07_2015.weights.xml.gz') +) diff --git a/RecoBTag/Combined/python/combinedMVA_cff.py b/RecoBTag/Combined/python/combinedMVA_cff.py index 83a63548ab29f..2aaba89d11d07 100644 --- a/RecoBTag/Combined/python/combinedMVA_cff.py +++ b/RecoBTag/Combined/python/combinedMVA_cff.py @@ -11,9 +11,20 @@ from RecoBTag.Combined.pfNegativeCombinedMVABJetTags_cfi import * from RecoBTag.Combined.pfPositiveCombinedMVABJetTags_cfi import * -# CombinedMVA V2 +#combined MVA V2 +from RecoBTag.Combined.combinedMVAV2Computer_cfi import * +from RecoBTag.Combined.negativeCombinedMVAV2Computer_cfi import * +from RecoBTag.Combined.positiveCombinedMVAV2Computer_cfi import * from RecoBTag.Combined.combinedMVAV2BJetTags_cfi import * +from RecoBTag.Combined.negativeCombinedMVAV2BJetTags_cfi import * +from RecoBTag.Combined.positiveCombinedMVAV2BJetTags_cfi import * +from RecoBTag.Combined.candidateCombinedMVAV2Computer_cfi import * +from RecoBTag.Combined.candidateNegativeCombinedMVAV2Computer_cfi import * +from RecoBTag.Combined.candidatePositiveCombinedMVAV2Computer_cfi import * from RecoBTag.Combined.pfCombinedMVAV2BJetTags_cfi import * +from RecoBTag.Combined.pfNegativeCombinedMVAV2BJetTags_cfi import * +from RecoBTag.Combined.pfPositiveCombinedMVAV2BJetTags_cfi import * # Charge tagger from RecoBTag.Combined.pfChargeBJetTags_cfi import * + diff --git a/RecoBTag/Combined/python/negativeCombinedMVAV2BJetTags_cfi.py b/RecoBTag/Combined/python/negativeCombinedMVAV2BJetTags_cfi.py new file mode 100644 index 0000000000000..ef6fb4c87c6fb --- /dev/null +++ b/RecoBTag/Combined/python/negativeCombinedMVAV2BJetTags_cfi.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +negativeCombinedMVAV2BJetTags = cms.EDProducer("JetTagProducer", + jetTagComputer = cms.string('negativeCombinedMVAV2Computer'), + tagInfos = cms.VInputTag( + cms.InputTag("impactParameterTagInfos"), + cms.InputTag("secondaryVertexNegativeTagInfos"), + cms.InputTag("inclusiveSecondaryVertexFinderNegativeTagInfos"), + cms.InputTag("softPFMuonsTagInfos"), + cms.InputTag("softPFElectronsTagInfos") + ) +) diff --git a/RecoBTag/Combined/python/negativeCombinedMVAV2Computer_cfi.py b/RecoBTag/Combined/python/negativeCombinedMVAV2Computer_cfi.py new file mode 100644 index 0000000000000..493aade82a3e9 --- /dev/null +++ b/RecoBTag/Combined/python/negativeCombinedMVAV2Computer_cfi.py @@ -0,0 +1,20 @@ +import FWCore.ParameterSet.Config as cms + +negativeCombinedMVAV2Computer = cms.ESProducer("CombinedMVAV2JetTagESProducer", + jetTagComputers = cms.vstring( + 'negativeOnlyJetProbabilityComputer', + 'negativeOnlyJetBProbabilityComputer', + 'negativeCombinedSecondaryVertexV2Computer', + 'negativeSoftPFMuonComputer', + 'negativeSoftPFElectronComputer' + ), + mvaName = cms.string("bdt"), + variables = cms.vstring( + ["Jet_CSV", "Jet_CSVIVF", "Jet_JP", "Jet_JBP", "Jet_SoftMu", "Jet_SoftEl"] + ), + spectators = cms.vstring([]), + useCondDB = cms.bool(False), + useGBRForest = cms.bool(True), + useAdaBoost = cms.bool(True), + weightFile = cms.FileInPath('RecoBTag/Combined/data/CombinedMVAV2_13_07_2015.weights.xml.gz') +) diff --git a/RecoBTag/Combined/python/pfNegativeCombinedMVAV2BJetTags_cfi.py b/RecoBTag/Combined/python/pfNegativeCombinedMVAV2BJetTags_cfi.py new file mode 100644 index 0000000000000..21bc37de4aafb --- /dev/null +++ b/RecoBTag/Combined/python/pfNegativeCombinedMVAV2BJetTags_cfi.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +pfNegativeCombinedMVAV2BJetTags = cms.EDProducer("JetTagProducer", + jetTagComputer = cms.string('candidateNegativeCombinedMVAV2Computer'), + tagInfos = cms.VInputTag( + cms.InputTag("pfImpactParameterTagInfos"), + cms.InputTag("pfSecondaryVertexNegativeTagInfos"), + cms.InputTag("pfInclusiveSecondaryVertexFinderNegativeTagInfos"), + cms.InputTag("softPFMuonsTagInfos"), + cms.InputTag("softPFElectronsTagInfos") + ) +) diff --git a/RecoBTag/Combined/python/pfPositiveCombinedMVAV2BJetTags_cfi.py b/RecoBTag/Combined/python/pfPositiveCombinedMVAV2BJetTags_cfi.py new file mode 100644 index 0000000000000..e31e376b4faf8 --- /dev/null +++ b/RecoBTag/Combined/python/pfPositiveCombinedMVAV2BJetTags_cfi.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +pfPositiveCombinedMVAV2BJetTags = cms.EDProducer("JetTagProducer", + jetTagComputer = cms.string('candidatePositiveCombinedMVAV2Computer'), + tagInfos = cms.VInputTag( + cms.InputTag("pfImpactParameterTagInfos"), + cms.InputTag("pfSecondaryVertexTagInfos"), + cms.InputTag("pfInclusiveSecondaryVertexFinderTagInfos"), + cms.InputTag("softPFMuonsTagInfos"), + cms.InputTag("softPFElectronsTagInfos") + ) +) diff --git a/RecoBTag/Combined/python/positiveCombinedMVAV2BJetTags_cfi.py b/RecoBTag/Combined/python/positiveCombinedMVAV2BJetTags_cfi.py new file mode 100644 index 0000000000000..61998cd550610 --- /dev/null +++ b/RecoBTag/Combined/python/positiveCombinedMVAV2BJetTags_cfi.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +positiveCombinedMVAV2BJetTags = cms.EDProducer("JetTagProducer", + jetTagComputer = cms.string('positiveCombinedMVAV2Computer'), + tagInfos = cms.VInputTag( + cms.InputTag("impactParameterTagInfos"), + cms.InputTag("secondaryVertexPositiveTagInfos"), + cms.InputTag("inclusiveSecondaryVertexFinderPositiveTagInfos"), + cms.InputTag("softPFMuonsTagInfos"), + cms.InputTag("softPFElectronsTagInfos") + ) +) diff --git a/RecoBTag/Combined/python/positiveCombinedMVAV2Computer_cfi.py b/RecoBTag/Combined/python/positiveCombinedMVAV2Computer_cfi.py new file mode 100644 index 0000000000000..928e0631d39c3 --- /dev/null +++ b/RecoBTag/Combined/python/positiveCombinedMVAV2Computer_cfi.py @@ -0,0 +1,20 @@ +import FWCore.ParameterSet.Config as cms + +positiveCombinedMVAV2Computer = cms.ESProducer("CombinedMVAV2JetTagESProducer", + jetTagComputers = cms.vstring( + 'positiveOnlyJetProbabilityComputer', + 'positiveOnlyJetBProbabilityComputer', + 'positiveCombinedSecondaryVertexV2Computer', + 'positiveSoftPFMuonComputer', + 'positiveSoftPFElectronComputer' + ), + mvaName = cms.string("bdt"), + variables = cms.vstring( + ["Jet_CSV", "Jet_CSVIVF", "Jet_JP", "Jet_JBP", "Jet_SoftMu", "Jet_SoftEl"] + ), + spectators = cms.vstring([]), + useCondDB = cms.bool(False), + useGBRForest = cms.bool(True), + useAdaBoost = cms.bool(True), + weightFile = cms.FileInPath('RecoBTag/Combined/data/CombinedMVAV2_13_07_2015.weights.xml.gz') +) diff --git a/RecoBTag/Combined/src/CombinedMVAV2JetTagComputer.cc b/RecoBTag/Combined/src/CombinedMVAV2JetTagComputer.cc index bc03795654794..bf6963a6a2678 100644 --- a/RecoBTag/Combined/src/CombinedMVAV2JetTagComputer.cc +++ b/RecoBTag/Combined/src/CombinedMVAV2JetTagComputer.cc @@ -99,9 +99,6 @@ float CombinedMVAV2JetTagComputer::discriminator(const JetTagComputer::TagInfoHe inputs["Jet_CSVIVF"] = (*(computers[2]))( TagInfoHelper(ivfTagInfos) ); inputs["Jet_SoftMu"] = (*(computers[3]))( TagInfoHelper(smTagInfos) ); inputs["Jet_SoftEl"] = (*(computers[4]))( TagInfoHelper(seTagInfos) ); -// inputs["Jet_pt"] = 0.0; -// inputs["Jet_eta"] = 0.0; -// inputs["Jet_flavour"] = 0.0; if (inputs["Jet_JP"] <= 0) { inputs["Jet_JP"] = 0; From 478e98ff2eb0da270f9df4e44884a8019582a760 Mon Sep 17 00:00:00 2001 From: Joosep Pata Date: Fri, 29 Jan 2016 08:26:49 +0100 Subject: [PATCH 169/250] migrated computers --- RecoBTag/Combined/python/combinedMVA_EventSetup_cff.py | 4 ++++ RecoBTag/Combined/python/combinedMVA_cff.py | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/RecoBTag/Combined/python/combinedMVA_EventSetup_cff.py b/RecoBTag/Combined/python/combinedMVA_EventSetup_cff.py index fb29b7a5f96fd..d939b4a390fba 100644 --- a/RecoBTag/Combined/python/combinedMVA_EventSetup_cff.py +++ b/RecoBTag/Combined/python/combinedMVA_EventSetup_cff.py @@ -12,6 +12,10 @@ # CombinedMVA V2 from RecoBTag.Combined.combinedMVAV2Computer_cfi import * from RecoBTag.Combined.candidateCombinedMVAV2Computer_cfi import * +from RecoBTag.Combined.negativeCombinedMVAV2Computer_cfi import * +from RecoBTag.Combined.positiveCombinedMVAV2Computer_cfi import * +from RecoBTag.Combined.candidateNegativeCombinedMVAV2Computer_cfi import * +from RecoBTag.Combined.candidatePositiveCombinedMVAV2Computer_cfi import * # Charge tagger from RecoBTag.Combined.candidateChargeBTagComputer_cfi import * diff --git a/RecoBTag/Combined/python/combinedMVA_cff.py b/RecoBTag/Combined/python/combinedMVA_cff.py index 2aaba89d11d07..cffff6c715e27 100644 --- a/RecoBTag/Combined/python/combinedMVA_cff.py +++ b/RecoBTag/Combined/python/combinedMVA_cff.py @@ -12,15 +12,9 @@ from RecoBTag.Combined.pfPositiveCombinedMVABJetTags_cfi import * #combined MVA V2 -from RecoBTag.Combined.combinedMVAV2Computer_cfi import * -from RecoBTag.Combined.negativeCombinedMVAV2Computer_cfi import * -from RecoBTag.Combined.positiveCombinedMVAV2Computer_cfi import * from RecoBTag.Combined.combinedMVAV2BJetTags_cfi import * from RecoBTag.Combined.negativeCombinedMVAV2BJetTags_cfi import * from RecoBTag.Combined.positiveCombinedMVAV2BJetTags_cfi import * -from RecoBTag.Combined.candidateCombinedMVAV2Computer_cfi import * -from RecoBTag.Combined.candidateNegativeCombinedMVAV2Computer_cfi import * -from RecoBTag.Combined.candidatePositiveCombinedMVAV2Computer_cfi import * from RecoBTag.Combined.pfCombinedMVAV2BJetTags_cfi import * from RecoBTag.Combined.pfNegativeCombinedMVAV2BJetTags_cfi import * from RecoBTag.Combined.pfPositiveCombinedMVAV2BJetTags_cfi import * From 16a258ef4fabc70f66be237c74c8eca20e7a172d Mon Sep 17 00:00:00 2001 From: smoortga Date: Fri, 29 Jan 2016 10:08:03 +0100 Subject: [PATCH 170/250] Changed correctVertexMass to False Since the training only uses vertexMass and not correctedSVMass, we put the parameter to false --- RecoBTag/CTagging/python/charmTaggerProducer_cfi.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RecoBTag/CTagging/python/charmTaggerProducer_cfi.py b/RecoBTag/CTagging/python/charmTaggerProducer_cfi.py index 17813a9ceec78..4507e892b00ed 100644 --- a/RecoBTag/CTagging/python/charmTaggerProducer_cfi.py +++ b/RecoBTag/CTagging/python/charmTaggerProducer_cfi.py @@ -25,6 +25,8 @@ useAdaBoost = cms.bool(False) ) +charmTagsComputerCvsL.slComputerCfg.correctVertexMass = False + charmTagsComputerCvsB = charmTagsComputerCvsL.clone( weightFile = cms.FileInPath('RecoBTag/CTagging/data/c_vs_b_sklearn.weight.xml'), variables = c_vs_b_vars_vpset From 9d0cc71695ab012593a1d6d049704b30738cc2f8 Mon Sep 17 00:00:00 2001 From: Martin Grunewald Date: Fri, 29 Jan 2016 10:23:48 +0100 Subject: [PATCH 171/250] Fix Unrunnable Schedule in HION DATA --- HLTrigger/Configuration/python/customizeHLTforALL.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/HLTrigger/Configuration/python/customizeHLTforALL.py b/HLTrigger/Configuration/python/customizeHLTforALL.py index 516970c4688c9..1238a9e8e137f 100644 --- a/HLTrigger/Configuration/python/customizeHLTforALL.py +++ b/HLTrigger/Configuration/python/customizeHLTforALL.py @@ -51,13 +51,19 @@ def customizeHLTforAll(process, menuType = "GRun", _customInfo = None): if hasattr(process,'source'): process.source.fileNames = cms.untracked.vstring( _inputFile ) -# MC customisation - if not _realData: + if _realData: +# Real-Data customisation + if menuType == "HIon": +# fix "Unrunnable schedule" exception + process.hltGtDigis.DaqGtInputTag = cms.InputTag( "rawDataRepacker","","HLT" ) + else: +# Monte-Carlo customisation from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC process = customizeHLTforMC(process) - if _customInfo['menuType'] == "HIon": + if menuType == "HIon": from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag process = MassReplaceInputTag(process,"rawDataRepacker","rawDataCollector") + else: pass From b8a4f13f35e0778a7db37a48dda95957654f7ac9 Mon Sep 17 00:00:00 2001 From: Martin Grunewald Date: Fri, 29 Jan 2016 10:57:43 +0100 Subject: [PATCH 172/250] Fix of Fix Unrunnable Schedule in HION DATA --- HLTrigger/Configuration/python/customizeHLTforALL.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HLTrigger/Configuration/python/customizeHLTforALL.py b/HLTrigger/Configuration/python/customizeHLTforALL.py index 1238a9e8e137f..96b10085ecf8a 100644 --- a/HLTrigger/Configuration/python/customizeHLTforALL.py +++ b/HLTrigger/Configuration/python/customizeHLTforALL.py @@ -55,7 +55,8 @@ def customizeHLTforAll(process, menuType = "GRun", _customInfo = None): # Real-Data customisation if menuType == "HIon": # fix "Unrunnable schedule" exception - process.hltGtDigis.DaqGtInputTag = cms.InputTag( "rawDataRepacker","","HLT" ) + from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag + process = MassReplaceInputTag(process,"rawDataRepacker","rawDataRepacker::@skipCurrentProcess") else: # Monte-Carlo customisation from HLTrigger.Configuration.customizeHLTforMC import customizeHLTforMC From 49077566c2ab0df42582bbf81f74b5ff7ab515d9 Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 22 Jan 2016 14:30:32 +0100 Subject: [PATCH 173/250] migrate fastsim event content to fastsim era --- .../Applications/python/ConfigBuilder.py | 1 - .../EventContent/python/EventContent_cff.py | 23 +- .../Configuration/python/EventContent_cff.py | 321 +++--------------- 3 files changed, 65 insertions(+), 280 deletions(-) diff --git a/Configuration/Applications/python/ConfigBuilder.py b/Configuration/Applications/python/ConfigBuilder.py index dc0a7efd4a143..dd7ba9346c449 100644 --- a/Configuration/Applications/python/ConfigBuilder.py +++ b/Configuration/Applications/python/ConfigBuilder.py @@ -1091,7 +1091,6 @@ def inGeometryKeys(opt): if self._options.fast: self.SIMDefaultCFF = 'FastSimulation.Configuration.SimIdeal_cff' self.RECODefaultCFF= 'FastSimulation.Configuration.Reconstruction_AftMix_cff' - self.EVTCONTDefaultCFF = "FastSimulation.Configuration.EventContent_cff" self.VALIDATIONDefaultCFF = "FastSimulation.Configuration.Validation_cff" self.RECOBEFMIXDefaultCFF = 'FastSimulation.Configuration.Reconstruction_BefMix_cff' self.RECOBEFMIXDefaultSeq = 'reconstruction_befmix' diff --git a/Configuration/EventContent/python/EventContent_cff.py b/Configuration/EventContent/python/EventContent_cff.py index d688423fdb43e..bf09062b8c708 100644 --- a/Configuration/EventContent/python/EventContent_cff.py +++ b/Configuration/EventContent/python/EventContent_cff.py @@ -92,6 +92,17 @@ from DQMOffline.Configuration.DQMOffline_EventContent_cff import * # # +# FastSim +# +# +from FastSimulation.Configuration.EventContent_cff import FASTPUEventContent +import FastSimulation.Configuration.EventContent_cff as fastSimEC +from Configuration.StandardSequences.Eras import eras +if eras.fastSim.isChosen(): + RecoLocalTrackerRECO.outputCommands = fastSimEC.RecoLocalTracker.outputCommands + RecoLocalTrackerFEVT.outputCommands = fastSimEC.RecoLocalTracker.outputCommands + SimG4CoreRAW = fastSimEC.SimRAW + SimG4CoreRECO = fastSimEC.SimRECO # # @@ -514,6 +525,8 @@ PREMIXEventContent.outputCommands.append('keep StripDigiSimLinkedmDetSetVector_simMuonCSCDigis_*_*') PREMIXEventContent.outputCommands.append('keep RPCDigiSimLinkedmDetSetVector_*_*_*') PREMIXEventContent.outputCommands.append('keep DTLayerIdDTDigiSimLinkMuonDigiCollection_*_*_*') +if eras.fastSim.isChosen(): + PREMIXEventContent.outputCommands.extend(fastSimEC.extraPremixContent) PREMIXRAWEventContent.outputCommands.extend(RAWSIMEventContent.outputCommands) PREMIXRAWEventContent.outputCommands.append('keep CrossingFramePlaybackInfoNew_*_*_*') @@ -525,7 +538,8 @@ PREMIXRAWEventContent.outputCommands.append('keep *_*_MuonCSCWireDigiSimLinks_*') PREMIXRAWEventContent.outputCommands.append('keep *_*_RPCDigiSimLink_*') PREMIXRAWEventContent.outputCommands.append('keep DTLayerIdDTDigiSimLinkMuonDigiCollection_*_*_*') - +if eras.fastSim.isChosen(): + PREMIXEventContent.outputCommands.extend(fastSimEC.extraPremixContent) REPACKRAWSIMEventContent.outputCommands.extend(REPACKRAWEventContent.outputCommands) REPACKRAWSIMEventContent.outputCommands.extend(SimG4CoreRAW.outputCommands) @@ -753,3 +767,10 @@ def SwapKeepAndDrop(l): MINIAODEventContent.outputCommands.extend(MicroEventContent.outputCommands) MINIAODSIMEventContent.outputCommands.extend(MicroEventContentMC.outputCommands) + +if eras.fastSim.isChosen(): + fastSimEC.replaceDigisWithSimDigis(FEVTDEBUGHLTEventContent.outputCommands) + fastSimEC.replaceDigisWithSimDigis(FEVTDEBUGEventContent.outputCommands) + fastSimEC.replaceDigisWithSimDigis(RECOSIMEventContent.outputCommands) + fastSimEC.replaceDigisWithSimDigis(AODSIMEventContent.outputCommands) + fastSimEC.replaceDigisWithSimDigis(MINIAODSIMEventContent.outputCommands) diff --git a/FastSimulation/Configuration/python/EventContent_cff.py b/FastSimulation/Configuration/python/EventContent_cff.py index 9032efed3f42e..b6e72dc40f20e 100644 --- a/FastSimulation/Configuration/python/EventContent_cff.py +++ b/FastSimulation/Configuration/python/EventContent_cff.py @@ -1,288 +1,53 @@ import FWCore.ParameterSet.Config as cms -##################################################################### -# -# Event Content definition -# -##################################################################### -from Configuration.EventContent.EventContent_cff import * - -##################################################################### -# The simHits part is definitely different in FastSim -##################################################################### - +# this method replaces outputcommands that apply to normal digis to simdigis +# whenever using this, make sure that this is what you actually want to accomplish +def replaceDigisWithSimDigis(outputCommands): + for e in range(0,len(outputCommands)): + pieces = outputCommands[e].split("_") + if len(pieces) != 4: + continue + label = pieces[1] + pos = label.rfind("Digis") + if pos <= 0 or pos != (len(label) - 5): + continue + if label.find("sim") == 0: + continue + label = "sim"+label[0].upper()+label[1:] + pieces[1] = label + outputCommands[e] = "_".join(pieces) + +extraPremixContent = ['keep *_mix_generalTracks_*'] + +RecoLocalTracker = cms.PSet( + outputCommands = cms.untracked.vstring( + 'keep *_siTrackerGaussianSmearingRecHits_*_*' + )) -FastSimCoreFEVT = cms.PSet( - outputCommands = cms.untracked.vstring('keep *_famosPileUp_*_*', +SimRAW = cms.PSet( + outputCommands = cms.untracked.vstring( + 'keep edmHepMCProduct_source_*_*', 'keep *_famosSimHits_*_*', - 'drop *_g4SimHits_*_*', # if an EDAlias creates this, it must be dropped to avoid a clash - 'keep *_MuonSimHits_*_*') -) - -FastSimCoreFEVT.outputCommands.extend(GeneratorInterfaceRAW.outputCommands) - - -#RECO content -FastSimCoreRECO = cms.PSet( - outputCommands = cms.untracked.vstring('keep SimTracks_famosSimHits_*_*', - 'keep SimVertexs_famosSimHits_*_*') -) -FastSimCoreRECO.outputCommands.extend(GeneratorInterfaceRECO.outputCommands) + 'keep *_MuonSimHits_*_*', + )) -#AOD content -FastSimCoreAOD = cms.PSet( - outputCommands = cms.untracked.vstring() -) -FastSimCoreAOD.outputCommands.extend(GeneratorInterfaceAOD.outputCommands) - -##################################################################### -# The Tracker RecHits are also different -##################################################################### - -#Full Event content -FastSimRecoLocalTrackerFEVT = cms.PSet( - outputCommands = cms.untracked.vstring('keep *_siTrackerGaussianSmearingRecHits_*_*') -) -#RECO content -FastSimRecoLocalTrackerRECO = cms.PSet( - outputCommands = cms.untracked.vstring() -) -#AOD content -FastSimRecoLocalTrackerAOD = cms.PSet( - outputCommands = cms.untracked.vstring() -) - - -##################################################################### -# CaloJet+Tracks are apparently saved nowhere -# Let's save them in the fast simulation (AOD only) -##################################################################### -FastSimCJPT = cms.PSet( +SimRECO = cms.PSet( outputCommands = cms.untracked.vstring( - 'keep *_JetPlusTrackZSPCorJetIcone5_*_*', - 'keep *_ZSPJetCorJetIcone5_*_*' - ) -) - -##################################################################### -# The Calo RecHits are also different -##################################################################### - -#Full Event content -FastSimRecoLocalCaloFEVT = cms.PSet( - outputCommands = cms.untracked.vstring('keep *_caloRecHits_*_*', - 'keep *_hcalRecHits_*_*', - 'keep EBDigiCollection_ecalRecHit_*_*', - 'keep EEDigiCollection_ecalRecHit_*_*') -# 'keep *_particleFlowRecHit_*_*') -) - -#RECO content -FastSimRecoLocalCaloRECO = cms.PSet( - outputCommands = cms.untracked.vstring('keep *_caloRecHits_*_*', - 'keep *_hcalRecHits_*_*', - 'keep EBDigiCollection_ecalRecHit_*_*', - 'keep EEDigiCollection_ecalRecHit_*_*') -# 'keep *_particleFlowRecHit_*_*') -) - -#AOD content -FastSimRecoLocalCaloAOD = cms.PSet( - outputCommands = cms.untracked.vstring() -) - -##################################################################### -# The Tracker Tracks are also different -##################################################################### - -#Full Event content -FastSimRecoTrackerFEVT = cms.PSet( - outputCommands = cms.untracked.vstring('keep *_iterativeGSWithMaterialTracks_*_*', - 'keep *_generalTracksBeforeMixing_*_*') - ) - -#RECO content -FastSimRecoTrackerRECO = cms.PSet( - outputCommands = cms.untracked.vstring('keep *_iterativeGSWithMaterialTracks_*_*', - 'keep *_generalTracksBeforeMixing_*_*') -) - -#AOD content -FastSimRecoTrackerAOD = cms.PSet( - outputCommands = cms.untracked.vstring('keep recoTracks_iterativeGSWithMaterialTracks_*_*', - #'keep *_generalTracksBeforeMixing_*_*' - ) -) - - -##################################################################### -# new Particle Flow Collection with "Fake" Neutral Hadrons -##################################################################### - -#Full Event content -FastSimParticleFlowFEVT = cms.PSet( - outputCommands = cms.untracked.vstring('keep recoPFCandidates_FSparticleFlow_*_*', - #stuff added for two-step processing (simWithSomeReco followed by reconstructionHighLevel): - 'keep *_muon*_*_*', - 'keep *_towerMaker*_*_*', - 'keep *_particleFlow*_*_*', - 'keep *_pf*_*_*', - 'keep *_*DetId*_*_*') -) - -#RECO content -FastSimParticleFlowRECO = cms.PSet( - outputCommands = cms.untracked.vstring('keep recoPFCandidates_FSparticleFlow_*_*') -) - -#AOD content -FastSimParticleFlowAOD = cms.PSet( - outputCommands = cms.untracked.vstring('keep recoPFCandidates_FSparticleFlow_*_*') -) - - - - -# Addition to the event content -# We don't need to remove anything, as the corresponding products are -# not produced anyway in a FastSimulation job. - -##################################################################### -# -# AOD Data Tier definition -# -##################################################################### - -AODEventContent.outputCommands.extend(FastSimRecoLocalTrackerAOD.outputCommands) -AODEventContent.outputCommands.extend(FastSimRecoLocalCaloAOD.outputCommands) -AODEventContent.outputCommands.extend(FastSimRecoTrackerAOD.outputCommands) -AODEventContent.outputCommands.extend(FastSimParticleFlowAOD.outputCommands) - -##################################################################### -# -# AODSIM Data Tier definition -# -##################################################################### - -AODSIMEventContent.outputCommands.extend(FastSimCoreAOD.outputCommands) -AODSIMEventContent.outputCommands.extend(FastSimRecoLocalTrackerAOD.outputCommands) -AODSIMEventContent.outputCommands.extend(FastSimRecoLocalCaloAOD.outputCommands) -AODSIMEventContent.outputCommands.extend(FastSimRecoTrackerAOD.outputCommands) -AODSIMEventContent.outputCommands.extend(FastSimParticleFlowAOD.outputCommands) - -##################################################################### -# -# RECO Data Tier definition -# -##################################################################### - -RECOEventContent.outputCommands.extend(FastSimRecoLocalTrackerRECO.outputCommands) -RECOEventContent.outputCommands.extend(FastSimRecoLocalCaloRECO.outputCommands) -RECOEventContent.outputCommands.extend(FastSimRecoTrackerRECO.outputCommands) -RECOEventContent.outputCommands.extend(FastSimParticleFlowRECO.outputCommands) - -##################################################################### -# -# RECOSIM Data Tier definition -# -##################################################################### - -RECOSIMEventContent.outputCommands.extend(FastSimCoreRECO.outputCommands) -RECOSIMEventContent.outputCommands.extend(FastSimRecoLocalTrackerRECO.outputCommands) -RECOSIMEventContent.outputCommands.extend(FastSimRecoLocalCaloRECO.outputCommands) -RECOSIMEventContent.outputCommands.extend(FastSimRecoTrackerRECO.outputCommands) -RECOSIMEventContent.outputCommands.extend(FastSimParticleFlowRECO.outputCommands) - -##################################################################### -# -# RECODEBUG Data Tier definition -# -##################################################################### - -RECODEBUGEventContent.outputCommands.extend(FastSimCoreRECO.outputCommands) -RECODEBUGEventContent.outputCommands.extend(FastSimRecoLocalTrackerRECO.outputCommands) -RECODEBUGEventContent.outputCommands.extend(FastSimRecoLocalCaloRECO.outputCommands) -RECODEBUGEventContent.outputCommands.extend(FastSimRecoTrackerRECO.outputCommands) -RECODEBUGEventContent.outputCommands.extend(FastSimParticleFlowRECO.outputCommands) - -#################################################################### -# -# FEVT Data Tier re-definition -# -##################################################################### - -FEVTEventContent.outputCommands.extend(FastSimRecoLocalTrackerFEVT.outputCommands) -FEVTEventContent.outputCommands.extend(FastSimRecoLocalCaloFEVT.outputCommands) -FEVTEventContent.outputCommands.extend(FastSimRecoTrackerFEVT.outputCommands) -FEVTEventContent.outputCommands.extend(FastSimParticleFlowFEVT.outputCommands) - -#################################################################### -# -# FEVTSIM Data Tier re-definition -# -##################################################################### - -FEVTSIMEventContent.outputCommands.extend(FastSimCoreFEVT.outputCommands) -FEVTSIMEventContent.outputCommands.extend(FastSimRecoLocalTrackerFEVT.outputCommands) -FEVTSIMEventContent.outputCommands.extend(FastSimRecoLocalCaloFEVT.outputCommands) -FEVTSIMEventContent.outputCommands.extend(FastSimRecoTrackerFEVT.outputCommands) -FEVTSIMEventContent.outputCommands.extend(FastSimParticleFlowFEVT.outputCommands) - -##################################################################### -# -# FEVTDEBUG Data Tier re-definition -# -##################################################################### - -FEVTDEBUGEventContent.outputCommands.extend(FastSimCoreFEVT.outputCommands) -FEVTDEBUGEventContent.outputCommands.extend(FastSimRecoLocalTrackerFEVT.outputCommands) -FEVTDEBUGEventContent.outputCommands.extend(FastSimRecoLocalCaloFEVT.outputCommands) -FEVTDEBUGEventContent.outputCommands.extend(FastSimRecoTrackerFEVT.outputCommands) -FEVTDEBUGEventContent.outputCommands.extend(FastSimParticleFlowFEVT.outputCommands) - -##################################################################### -# -# FEVTDEBUGHLT Data Tier re-definition -# -##################################################################### -FEVTDEBUGHLTEventContent.outputCommands.extend(FastSimCoreFEVT.outputCommands) -FEVTDEBUGHLTEventContent.outputCommands.extend(FastSimRecoLocalTrackerFEVT.outputCommands) -FEVTDEBUGHLTEventContent.outputCommands.extend(FastSimRecoLocalCaloFEVT.outputCommands) -FEVTDEBUGHLTEventContent.outputCommands.extend(FastSimRecoTrackerFEVT.outputCommands) -FEVTDEBUGHLTEventContent.outputCommands.extend(FastSimParticleFlowFEVT.outputCommands) - -################## -# get rid of some edaliases in the output -################## -for _entry in [FEVTDEBUGEventContent,FEVTSIMEventContent,GENRAWEventContent,FEVTDEBUGHLTEventContent,HLTDEBUGEventContent,HLTDebugFEVT,HLTDebugRAW,RAWDEBUGHLTEventContent,RAWRECODEBUGHLTEventContent,RAWRECOSIMHLTEventContent,RAWSIMHLTEventContent,]: - _entry.outputCommands.append('drop *_ecalPreshowerDigis_*_*') - _entry.outputCommands.append('drop *_ecalDigis_*_*') - _entry.outputCommands.append('drop *_hcalDigis_*_*') - _entry.outputCommands.append('drop *_muonDTDigis_*_*') - _entry.outputCommands.append('drop *_muonCSCDigis_*_*') - _entry.outputCommands.append('drop *_muonRPCDigis_*_*') - _entry.outputCommands.append('drop *_gtDigis_*_*') - _entry.outputCommands.append('drop *_hltIter*_*_*') - _entry.outputCommands.append('drop *_hlt*Digis_*_*') - _entry.outputCommands.append('drop *_gmtDigis_*_*') - -##################################################################### -# -# To be used only to create the MinBias sample for "new mixing" (--eventcontent=FASTPU) -# -##################################################################### + 'keep edmHepMCProduct_source_*_*', + 'keep SimTracks_famosSimHits_*_*', + 'keep SimVertexs_famosSimHits_*_*', + )) FASTPUEventContent = cms.PSet( - outputCommands = cms.untracked.vstring('drop *', - 'keep *_famosSimHits_*_*', - 'keep *_MuonSimHits_*_*', - 'drop *_famosSimHits_VertexTypes_*', - 'keep *_generalTracksBeforeMixing_*_*', - 'drop *_generalTracksBeforeMixing_MVAValues_*', - 'drop *_generalTracksBeforeMixing_QualityMasks_*', - 'keep edmHepMCProduct_generatorSmeared_*_*' - ) - ) + outputCommands = cms.untracked.vstring( + 'drop *', + 'keep *_famosSimHits_*_*', + 'keep *_MuonSimHits_*_*', + 'drop *_famosSimHits_VertexTypes_*', + 'keep *_generalTracksBeforeMixing_*_*', + 'drop *_generalTracksBeforeMixing_MVAValues_*', + 'drop *_generalTracksBeforeMixing_QualityMasks_*', + 'keep edmHepMCProduct_generatorSmeared_*_*' + )) -PREMIXEventContent.outputCommands.extend(['keep *_mix_generalTracks_*']) From 78a894685e6d57be17596d60b5f1de2f48593899 Mon Sep 17 00:00:00 2001 From: Lukas Date: Wed, 27 Jan 2016 11:31:30 +0100 Subject: [PATCH 174/250] FastSim: clean up event content --- .../EventContent/python/EventContent_cff.py | 10 ++++----- .../Configuration/python/EventContent_cff.py | 22 +++---------------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/Configuration/EventContent/python/EventContent_cff.py b/Configuration/EventContent/python/EventContent_cff.py index bf09062b8c708..3ed760b5c3688 100644 --- a/Configuration/EventContent/python/EventContent_cff.py +++ b/Configuration/EventContent/python/EventContent_cff.py @@ -768,9 +768,9 @@ def SwapKeepAndDrop(l): MINIAODEventContent.outputCommands.extend(MicroEventContent.outputCommands) MINIAODSIMEventContent.outputCommands.extend(MicroEventContentMC.outputCommands) +# in fastsim, normal digis are edaliases of simdigis +# drop the simdigis to avoid complaints from the outputmodule related to duplicated branches if eras.fastSim.isChosen(): - fastSimEC.replaceDigisWithSimDigis(FEVTDEBUGHLTEventContent.outputCommands) - fastSimEC.replaceDigisWithSimDigis(FEVTDEBUGEventContent.outputCommands) - fastSimEC.replaceDigisWithSimDigis(RECOSIMEventContent.outputCommands) - fastSimEC.replaceDigisWithSimDigis(AODSIMEventContent.outputCommands) - fastSimEC.replaceDigisWithSimDigis(MINIAODSIMEventContent.outputCommands) + for _entry in [FEVTDEBUGHLTEventContent,FEVTDEBUGEventContent,RECOSIMEventContent,AODSIMEventContent]: + fastSimEC.dropSimDigis(_entry.outputCommands) + diff --git a/FastSimulation/Configuration/python/EventContent_cff.py b/FastSimulation/Configuration/python/EventContent_cff.py index b6e72dc40f20e..ef0263fc5a23a 100644 --- a/FastSimulation/Configuration/python/EventContent_cff.py +++ b/FastSimulation/Configuration/python/EventContent_cff.py @@ -1,22 +1,8 @@ import FWCore.ParameterSet.Config as cms -# this method replaces outputcommands that apply to normal digis to simdigis -# whenever using this, make sure that this is what you actually want to accomplish -def replaceDigisWithSimDigis(outputCommands): - for e in range(0,len(outputCommands)): - pieces = outputCommands[e].split("_") - if len(pieces) != 4: - continue - label = pieces[1] - pos = label.rfind("Digis") - if pos <= 0 or pos != (len(label) - 5): - continue - if label.find("sim") == 0: - continue - label = "sim"+label[0].upper()+label[1:] - pieces[1] = label - outputCommands[e] = "_".join(pieces) - +def dropSimDigis(outputCommands): + outputCommands.append("drop *_sim*Digis*_*_*") + extraPremixContent = ['keep *_mix_generalTracks_*'] RecoLocalTracker = cms.PSet( @@ -49,5 +35,3 @@ def replaceDigisWithSimDigis(outputCommands): 'drop *_generalTracksBeforeMixing_QualityMasks_*', 'keep edmHepMCProduct_generatorSmeared_*_*' )) - - From f547243c846e57eea906eed210da8627cac947c7 Mon Sep 17 00:00:00 2001 From: Lukas Date: Tue, 26 Jan 2016 14:03:12 +0100 Subject: [PATCH 175/250] FastSim BugFix : PreMix : fix L1 reco, fix digisim link in muon digis --- .../python/relval_steps.py | 2 +- .../python/DataMixerPreMix_cff.py | 2 +- .../StandardSequences/python/Digi_cff.py | 2 +- .../Configuration/python/DigiAliases_cff.py | 40 ++++++++++++++++--- .../Configuration/python/L1Reco_cff.py | 29 -------------- .../python/customiseForPremixingInput.py | 13 ++---- 6 files changed, 41 insertions(+), 47 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index acea7e68ad1cb..5b8108743dca0 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -619,7 +619,7 @@ def genS(fragment,howMuch): {"-s" : "GEN,SIM,RECOBEFMIX,DIGIPREMIX_S2:pdigi_valid,DATAMIX,L1,L1Reco,RECO,HLT:@relval25ns,VALIDATION", "--datamix" : "PreMix", "--pileup_input" : "dbs:/RelValFS_PREMIXUP15_PU25/%s/GEN-SIM-DIGI-RAW"%(baseDataSetRelease[8],), - "--customise":"SLHCUpgradeSimulations/Configuration/postLS1CustomsPreMixing.customisePostLS1" + "--customise":"SimGeneral/DataMixingModule/customiseForPremixingInput.customiseForPreMixingInput" }, Kby(100,500),step1FastUpg2015Defaults]) diff --git a/Configuration/StandardSequences/python/DataMixerPreMix_cff.py b/Configuration/StandardSequences/python/DataMixerPreMix_cff.py index c27d88e54bb53..499625604f39a 100644 --- a/Configuration/StandardSequences/python/DataMixerPreMix_cff.py +++ b/Configuration/StandardSequences/python/DataMixerPreMix_cff.py @@ -68,4 +68,4 @@ # use an alias to make the mixed track collection available under the usual label from FastSimulation.Configuration.DigiAliases_cff import loadDigiAliases loadDigiAliases(premix = True) - from FastSimulation.Configuration.DigiAliases_cff import generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis + from FastSimulation.Configuration.DigiAliases_cff import generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis,caloStage1LegacyFormatDigis diff --git a/Configuration/StandardSequences/python/Digi_cff.py b/Configuration/StandardSequences/python/Digi_cff.py index d96e88ff56921..54a04085b48d9 100644 --- a/Configuration/StandardSequences/python/Digi_cff.py +++ b/Configuration/StandardSequences/python/Digi_cff.py @@ -41,6 +41,6 @@ # use an alias to make the mixed track collection available under the usual label from FastSimulation.Configuration.DigiAliases_cff import loadDigiAliases loadDigiAliases(premix = False) - from FastSimulation.Configuration.DigiAliases_cff import generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis + from FastSimulation.Configuration.DigiAliases_cff import generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis,caloStage1LegacyFormatDigis diff --git a/FastSimulation/Configuration/python/DigiAliases_cff.py b/FastSimulation/Configuration/python/DigiAliases_cff.py index 7680e230b3336..a7859de0a50ed 100644 --- a/FastSimulation/Configuration/python/DigiAliases_cff.py +++ b/FastSimulation/Configuration/python/DigiAliases_cff.py @@ -9,14 +9,15 @@ muonDTDigis = None muonCSCDigis = None muonRPCDigis = None -gtDigisAliasInfo = None -gmtDigisAliasInfo = None +caloStage1LegacyFormatDigis = None +gtDigis = None +gmtDigis = None def loadDigiAliases(premix=False): nopremix = not premix - global generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis + global generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis,caloStage1LegacyFormatDigis generalTracks = cms.EDAlias( **{"mix" if nopremix else "mixData" : @@ -95,6 +96,9 @@ def loadDigiAliases(premix=False): cms.VPSet( cms.PSet( type = cms.string("DTLayerIdDTDigiMuonDigiCollection") + ), + cms.PSet( + type = cms.string("DTLayerIdDTDigiSimLinkMuonDigiCollection") ) ) } @@ -105,6 +109,9 @@ def loadDigiAliases(premix=False): cms.VPSet( cms.PSet( type = cms.string("RPCDetIdRPCDigiMuonDigiCollection") + ), + cms.PSet( + type = cms.string("RPCDigiSimLinkedmDetSetVector") ) ) } @@ -115,14 +122,35 @@ def loadDigiAliases(premix=False): cms.VPSet( cms.PSet( type = cms.string("CSCDetIdCSCWireDigiMuonDigiCollection"), - fromProductInstance = cms.string("MuonCSCWireDigi" if nopremix else "MuonCSCWireDigisDM")), + fromProductInstance = cms.string("MuonCSCWireDigi" if nopremix else "MuonCSCWireDigisDM"), + toProductInstance = cms.string("MuonCSCWireDigi")), cms.PSet( type = cms.string("CSCDetIdCSCStripDigiMuonDigiCollection"), - fromProductInstance = cms.string("MuonCSCStripDigi" if nopremix else "MuonCSCStripDigisDM") - ) + fromProductInstance = cms.string("MuonCSCStripDigi" if nopremix else "MuonCSCStripDigisDM"), + toProductInstance = cms.string("MuonCSCStripDigi")), + cms.PSet( + type = cms.string('StripDigiSimLinkedmDetSetVector') + ), ) } ) + + # also sim in case of premixing? + caloStage1LegacyFormatDigis = cms.EDAlias( + **{ "simCaloStage1LegacyFormatDigis" : + cms.VPSet( + cms.PSet(type = cms.string("L1GctEmCands")), + cms.PSet(type = cms.string("L1GctEtHads")), + cms.PSet(type = cms.string("L1GctEtMisss")), + cms.PSet(type = cms.string("L1GctEtTotals")), + cms.PSet(type = cms.string("L1GctHFBitCountss")), + cms.PSet(type = cms.string("L1GctHFRingEtSumss")), + cms.PSet(type = cms.string("L1GctHtMisss")), + cms.PSet(type = cms.string("L1GctInternEtSums")), + cms.PSet(type = cms.string("L1GctInternHtMisss")), + cms.PSet(type = cms.string("L1GctInternJetDatas")), + cms.PSet(type = cms.string("L1GctJetCands")))}) + def loadTriggerDigiAliases(): diff --git a/FastSimulation/Configuration/python/L1Reco_cff.py b/FastSimulation/Configuration/python/L1Reco_cff.py index a6f23e3c1646f..1439ff60a3730 100644 --- a/FastSimulation/Configuration/python/L1Reco_cff.py +++ b/FastSimulation/Configuration/python/L1Reco_cff.py @@ -9,35 +9,6 @@ # imported into this namespace, i.e. "from import *". from L1Trigger.Configuration.ConditionalStage1Configuration_cff import * -# some collections have different labels -def _changeLabelForFastSim( object ) : - """ - Takes an InputTag, changes the first letter of the module label to a capital - and adds "sim" in front, e.g. "gctDigid" -> "simGctDigis". - This works for both Run 1 and Run 2 collections. - """ - object.moduleLabel="sim"+object.moduleLabel[0].upper()+object.moduleLabel[1:] - -_changeLabelForFastSim( l1extraParticles.isolatedEmSource ) -_changeLabelForFastSim( l1extraParticles.nonIsolatedEmSource ) - -_changeLabelForFastSim( l1extraParticles.centralJetSource ) -_changeLabelForFastSim( l1extraParticles.tauJetSource ) -_changeLabelForFastSim( l1extraParticles.isoTauJetSource ) -_changeLabelForFastSim( l1extraParticles.forwardJetSource ) - -_changeLabelForFastSim( l1extraParticles.etTotalSource ) -_changeLabelForFastSim( l1extraParticles.etHadSource ) -_changeLabelForFastSim( l1extraParticles.htMissSource ) -_changeLabelForFastSim( l1extraParticles.etMissSource ) - -_changeLabelForFastSim( l1extraParticles.hfRingEtSumsSource ) -_changeLabelForFastSim( l1extraParticles.hfRingBitCountsSource ) - -# This one is subtly different, but is the same for Run 1 and Run 2 FastSim -l1extraParticles.muonSource = cms.InputTag('simGmtDigis') - - # must be set to true when used in HLT, as is the case for FastSim l1extraParticles.centralBxOnly = True diff --git a/SimGeneral/DataMixingModule/python/customiseForPremixingInput.py b/SimGeneral/DataMixingModule/python/customiseForPremixingInput.py index 37d4fa50e02e7..a88985aede1ec 100644 --- a/SimGeneral/DataMixingModule/python/customiseForPremixingInput.py +++ b/SimGeneral/DataMixingModule/python/customiseForPremixingInput.py @@ -4,14 +4,10 @@ def customiseForPreMixingInput(process): from PhysicsTools.PatAlgos.tools.helpers import massSearchReplaceAnyInputTag # Replace TrackingParticles and TrackingVertices globally - for s in process.paths_().keys(): - massSearchReplaceAnyInputTag(getattr(process, s), cms.InputTag("mix", "MergedTrackTruth"), cms.InputTag("mixData", "MergedTrackTruth"), skipLabelTest=True) - - for s in process.endpaths_().keys(): - massSearchReplaceAnyInputTag(getattr(process, s), cms.InputTag("mix", "MergedTrackTruth"), cms.InputTag("mixData", "MergedTrackTruth"), skipLabelTest=True) - - - + # only apply on validation and dqm: we don't want to apply this in the mixing and digitization sequences + for s in process.paths_().keys() + process.endpaths_().keys(): + if s.lower().find("validation")>= 0 or s.lower().find("dqm") >= 0: + massSearchReplaceAnyInputTag(getattr(process, s), cms.InputTag("mix", "MergedTrackTruth"), cms.InputTag("mixData", "MergedTrackTruth"), skipLabelTest=True) # Replace Pixel/StripDigiSimLinks only for the known modules def replaceInputTag(tag, old, new): @@ -67,5 +63,4 @@ def replaceStripDigiSimLink(tag): - return process From e90520385905fe5d7b99789723e61a08cf5599e3 Mon Sep 17 00:00:00 2001 From: Lukas Date: Thu, 28 Jan 2016 13:57:09 +0100 Subject: [PATCH 176/250] fastsim: fix l1 reco for run1 --- .../python/DataMixerPreMix_cff.py | 2 +- .../StandardSequences/python/Digi_cff.py | 4 +- .../python/SimL1Emulator_cff.py | 2 +- .../Configuration/python/DigiAliases_cff.py | 40 ++++++++++++------- 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/Configuration/StandardSequences/python/DataMixerPreMix_cff.py b/Configuration/StandardSequences/python/DataMixerPreMix_cff.py index 499625604f39a..c27d88e54bb53 100644 --- a/Configuration/StandardSequences/python/DataMixerPreMix_cff.py +++ b/Configuration/StandardSequences/python/DataMixerPreMix_cff.py @@ -68,4 +68,4 @@ # use an alias to make the mixed track collection available under the usual label from FastSimulation.Configuration.DigiAliases_cff import loadDigiAliases loadDigiAliases(premix = True) - from FastSimulation.Configuration.DigiAliases_cff import generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis,caloStage1LegacyFormatDigis + from FastSimulation.Configuration.DigiAliases_cff import generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis diff --git a/Configuration/StandardSequences/python/Digi_cff.py b/Configuration/StandardSequences/python/Digi_cff.py index 54a04085b48d9..956aee85b77a5 100644 --- a/Configuration/StandardSequences/python/Digi_cff.py +++ b/Configuration/StandardSequences/python/Digi_cff.py @@ -41,6 +41,4 @@ # use an alias to make the mixed track collection available under the usual label from FastSimulation.Configuration.DigiAliases_cff import loadDigiAliases loadDigiAliases(premix = False) - from FastSimulation.Configuration.DigiAliases_cff import generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis,caloStage1LegacyFormatDigis - - + from FastSimulation.Configuration.DigiAliases_cff import generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis diff --git a/Configuration/StandardSequences/python/SimL1Emulator_cff.py b/Configuration/StandardSequences/python/SimL1Emulator_cff.py index 6bc0a2cf683ed..d872f1802d1e9 100644 --- a/Configuration/StandardSequences/python/SimL1Emulator_cff.py +++ b/Configuration/StandardSequences/python/SimL1Emulator_cff.py @@ -9,5 +9,5 @@ # consider moving these mods to the HLT configuration from FastSimulation.Configuration.DigiAliases_cff import loadTriggerDigiAliases loadTriggerDigiAliases() - from FastSimulation.Configuration.DigiAliases_cff import gtDigis,gmtDigis + from FastSimulation.Configuration.DigiAliases_cff import gtDigis,gmtDigis,gctDigis diff --git a/FastSimulation/Configuration/python/DigiAliases_cff.py b/FastSimulation/Configuration/python/DigiAliases_cff.py index a7859de0a50ed..077dbdcc86096 100644 --- a/FastSimulation/Configuration/python/DigiAliases_cff.py +++ b/FastSimulation/Configuration/python/DigiAliases_cff.py @@ -17,7 +17,7 @@ def loadDigiAliases(premix=False): nopremix = not premix - global generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis,caloStage1LegacyFormatDigis + global generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis generalTracks = cms.EDAlias( **{"mix" if nopremix else "mixData" : @@ -135,7 +135,10 @@ def loadDigiAliases(premix=False): } ) - # also sim in case of premixing? +def loadTriggerDigiAliases(): + + global gctDigis,gtDigis,gmtDigis,caloStage1LegacyFormatDigis + caloStage1LegacyFormatDigis = cms.EDAlias( **{ "simCaloStage1LegacyFormatDigis" : cms.VPSet( @@ -151,25 +154,34 @@ def loadDigiAliases(premix=False): cms.PSet(type = cms.string("L1GctInternJetDatas")), cms.PSet(type = cms.string("L1GctJetCands")))}) - -def loadTriggerDigiAliases(): - - global gtDigis,gmtDigis + gctDigis = cms.EDAlias( + **{ "simGctDigis" : + cms.VPSet( + cms.PSet(type = cms.string("L1GctEmCands")), + cms.PSet(type = cms.string("L1GctEtHads")), + cms.PSet(type = cms.string("L1GctEtMisss")), + cms.PSet(type = cms.string("L1GctEtTotals")), + cms.PSet(type = cms.string("L1GctHFBitCountss")), + cms.PSet(type = cms.string("L1GctHFRingEtSumss")), + cms.PSet(type = cms.string("L1GctHtMisss")), + cms.PSet(type = cms.string("L1GctInternEtSums")), + cms.PSet(type = cms.string("L1GctInternHtMisss")), + cms.PSet(type = cms.string("L1GctInternJetDatas")), + cms.PSet(type = cms.string("L1GctJetCands")))}) gtDigis = cms.EDAlias( - simGtDigis= - cms.VPSet( - cms.PSet(type = cms.string("L1GlobalTriggerReadoutRecord")), - cms.PSet(type = cms.string("L1GlobalTriggerObjectMapRecord")) - ) - ) + **{ "simGtDigis" : + cms.VPSet( + cms.PSet(type = cms.string("L1GlobalTriggerEvmReadoutRecord")), + cms.PSet(type = cms.string("L1GlobalTriggerObjectMapRecord")), + cms.PSet(type = cms.string("L1GlobalTriggerReadoutRecord")))}) gmtDigis = cms.EDAlias ( simGmtDigis = cms.VPSet( - cms.PSet(type = cms.string("L1MuGMTReadoutCollection")) + cms.PSet(type = cms.string("L1MuGMTReadoutCollection")), + cms.PSet(type = cms.string("L1MuGMTCands")) ) ) - From 8628a59f32ec06d06efdee5a47b904a28ffb38df Mon Sep 17 00:00:00 2001 From: Thomas Lenzi Date: Fri, 29 Jan 2016 11:35:55 +0100 Subject: [PATCH 177/250] Moved from stdint.h to cstdint Changed "Dummy" for "Trivial" Tried to move to "std::shared_ptr" but generated errors so used "boost:shared_ptr" Combined .h and .cc files of some of the classes Added "override" statement to EDAnalyzers Removed the "phase2TkCustomsBE5DPixel10Ddev" call in the python files Use "auto" to loop over elements Changed "edmNew::DetSetVector< Phase2TrackerCluster1D >" for Phase2TrackerCluster1DCollectionNew Removed --- .../interface/Phase2TrackerCluster1D.h | 2 +- ...tripCPEDummy.h => Phase2StripCPETrivial.h} | 6 +-- .../plugins/Phase2StripCPEESProducer.cc | 39 ++++++++++++--- .../plugins/Phase2StripCPEESProducer.h | 36 -------------- .../plugins/Phase2TrackerRecHits.cc | 49 ++++++++++++++----- .../plugins/Phase2TrackerRecHits.h | 34 ------------- ...ipCPEDummy.cc => Phase2StripCPETrivial.cc} | 4 +- .../test/RecHitsValidation.cc | 6 +-- .../test/RecHitsValidationTest_cfg.py | 5 -- .../Phase2TrackerClusterizerAlgorithm.h | 2 +- .../plugins/Phase2TrackerClusterizer.cc | 44 ++++++++++++----- .../plugins/Phase2TrackerClusterizer.h | 33 ------------- .../Phase2TrackerClusterizerAlgorithm.cc | 2 +- .../SiPhase2Clusterizer/test/BuildFile.xml | 1 - .../test/ClustersValidation.cc | 6 +-- 15 files changed, 115 insertions(+), 154 deletions(-) rename RecoLocalTracker/Phase2TrackerRecHits/interface/{Phase2StripCPEDummy.h => Phase2StripCPETrivial.h} (64%) delete mode 100644 RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.h delete mode 100644 RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.h rename RecoLocalTracker/Phase2TrackerRecHits/src/{Phase2StripCPEDummy.cc => Phase2StripCPETrivial.cc} (78%) delete mode 100644 RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h diff --git a/DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h b/DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h index 20103a7375e79..880d8c7930870 100644 --- a/DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h +++ b/DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h @@ -1,7 +1,7 @@ #ifndef DATAFORMATS_PHASE2TRACKERCLUSTER_PHASE2TRACKERCLUSTER1D_H #define DATAFORMATS_PHASE2TRACKERCLUSTER_PHASE2TRACKERCLUSTER1D_H -#include +#include #include "DataFormats/Common/interface/DetSetVectorNew.h" diff --git a/RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h b/RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPETrivial.h similarity index 64% rename from RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h rename to RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPETrivial.h index 82bd0cc78180c..d9fe0911dd72a 100644 --- a/RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h +++ b/RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPETrivial.h @@ -1,5 +1,5 @@ -#ifndef RecoLocalTracker_Phase2TrackerRecHits_Phase2StripCPEDummy_H -#define RecoLocalTracker_Phase2TrackerRecHits_Phase2StripCPEDummy_H +#ifndef RecoLocalTracker_Phase2TrackerRecHits_Phase2StripCPETrivial_H +#define RecoLocalTracker_Phase2TrackerRecHits_Phase2StripCPETrivial_H #include "RecoLocalTracker/ClusterParameterEstimator/interface/ClusterParameterEstimator.h" #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" @@ -8,7 +8,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" -class Phase2StripCPEDummy : public ClusterParameterEstimator { +class Phase2StripCPETrivial : public ClusterParameterEstimator { public: diff --git a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.cc b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.cc index 6060ba63525cf..ec8aeab863aad 100644 --- a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.cc +++ b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.cc @@ -1,12 +1,40 @@ +#include "FWCore/Framework/interface/ESProducer.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Framework/interface/ModuleFactory.h" + +#include "RecoLocalTracker/Records/interface/TkStripCPERecord.h" +#include "RecoLocalTracker/ClusterParameterEstimator/interface/ClusterParameterEstimator.h" +#include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPETrivial.h" + +#include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" + +#include + +#include +#include -#include "RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.h" -#include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h" +class Phase2StripCPEESProducer: public edm::ESProducer { + public: + + Phase2StripCPEESProducer(const edm::ParameterSet&); + boost::shared_ptr > produce(const TkStripCPERecord & iRecord); + + private: + + enum CPE_t { TRIVIAL }; + std::map enumMap_; + + CPE_t cpeNum_; + edm::ParameterSet pset_; + boost::shared_ptr > cpe_; + +}; Phase2StripCPEESProducer::Phase2StripCPEESProducer(const edm::ParameterSet & p) { std::string name = p.getParameter("ComponentType"); - enumMap_[std::string("Phase2StripCPEDummy")] = DUMMY; + enumMap_[std::string("Phase2StripCPETrivial")] = TRIVIAL; if (enumMap_.find(name) == enumMap_.end()) throw cms::Exception("Unknown StripCPE type") << name; @@ -15,13 +43,12 @@ Phase2StripCPEESProducer::Phase2StripCPEESProducer(const edm::ParameterSet & p) setWhatProduced(this, name); } - boost::shared_ptr > Phase2StripCPEESProducer::produce(const TkStripCPERecord & iRecord) { switch(cpeNum_) { - case DUMMY: - cpe_ = boost::shared_ptr >(new Phase2StripCPEDummy()); + case TRIVIAL: + cpe_ = boost::shared_ptr >(new Phase2StripCPETrivial()); break; } diff --git a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.h b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.h deleted file mode 100644 index adb935523f83c..0000000000000 --- a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2StripCPEESProducer.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef RecoLocaltracker_Phase2TrackerRecHits_Phase2StripCPEESProducer_h -#define RecoLocaltracker_Phase2TrackerRecHits_Phase2StripCPEESProducer_h - -#include "FWCore/Framework/interface/ESProducer.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "RecoLocalTracker/Records/interface/TkStripCPERecord.h" -#include "RecoLocalTracker/ClusterParameterEstimator/interface/ClusterParameterEstimator.h" -#include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" -#include -#include - -#include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h" - - -class Phase2StripCPEESProducer: public edm::ESProducer { - - public: - - Phase2StripCPEESProducer(const edm::ParameterSet&); - boost::shared_ptr > produce(const TkStripCPERecord & iRecord); - - private: - - enum CPE_t { DUMMY }; - std::map enumMap_; - - CPE_t cpeNum_; - edm::ParameterSet pset_; - boost::shared_ptr > cpe_; - -}; -#endif - - - - diff --git a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.cc b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.cc index 695e0ba8d58a7..c8f61fc59aca6 100644 --- a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.cc +++ b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.cc @@ -1,4 +1,14 @@ -#include "RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.h" +#include "FWCore/Framework/interface/global/EDProducer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "FWCore/PluginManager/interface/ModuleDef.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/Framework/interface/ESHandle.h" #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" @@ -8,15 +18,29 @@ #include "DataFormats/Common/interface/DetSetVector.h" #include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" #include "DataFormats/Phase2TrackerRecHit/interface/Phase2TrackerRecHit1D.h" +#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" +#include "DataFormats/DetId/interface/DetId.h" -#include "FWCore/PluginManager/interface/ModuleDef.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/Framework/interface/ESHandle.h" +#include "RecoLocalTracker/Records/interface/TkStripCPERecord.h" +#include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPETrivial.h" #include #include +class Phase2TrackerRecHits : public edm::global::EDProducer<> { + + public: + + explicit Phase2TrackerRecHits(const edm::ParameterSet& conf); + virtual ~Phase2TrackerRecHits() {}; + void produce(edm::StreamID sid, edm::Event& event, const edm::EventSetup& eventSetup) const override final; + + private: + + edm::EDGetTokenT< Phase2TrackerCluster1DCollectionNew > token_; + edm::ESInputTag cpeTag_; + +}; Phase2TrackerRecHits::Phase2TrackerRecHits(edm::ParameterSet const& conf) : token_(consumes< Phase2TrackerCluster1DCollectionNew >(conf.getParameter("src"))), @@ -24,7 +48,6 @@ Phase2TrackerRecHits::Phase2TrackerRecHits(edm::ParameterSet const& conf) : produces(); } - void Phase2TrackerRecHits::produce(edm::StreamID sid, edm::Event& event, const edm::EventSetup& eventSetup) const { // Get the Clusters @@ -48,21 +71,21 @@ void Phase2TrackerRecHits::produce(edm::StreamID sid, edm::Event& event, const e std::auto_ptr< Phase2TrackerRecHit1DCollectionNew > outputRecHits(new Phase2TrackerRecHit1DCollectionNew()); // Loop over clusters - for (edmNew::DetSetVector< Phase2TrackerCluster1D >::const_iterator DSViter = clusters->begin(); DSViter != clusters->end(); ++DSViter) { - - DetId detId(DSViter->detId()); + for (auto DSViter : *clusters) { + + DetId detId(DSViter.detId()); // Geometry const GeomDetUnit * geomDetUnit(tkGeom->idToDetUnit(detId)); // Container for the clusters that will be produced for this modules - Phase2TrackerRecHit1DCollectionNew::FastFiller rechits(*outputRecHits, DSViter->detId()); + Phase2TrackerRecHit1DCollectionNew::FastFiller rechits(*outputRecHits, DSViter.detId()); - for (edmNew::DetSet< Phase2TrackerCluster1D >::const_iterator clustIt = DSViter->begin(); clustIt != DSViter->end(); ++clustIt) { - ClusterParameterEstimator::LocalValues lv = cpe->localParameters(*clustIt, *geomDetUnit); + for (auto clustIt : DSViter) { + ClusterParameterEstimator< Phase2TrackerCluster1D >::LocalValues lv = cpe->localParameters(clustIt, *geomDetUnit); // Create a persistent edm::Ref to the cluster - edm::Ref< edmNew::DetSetVector< Phase2TrackerCluster1D >, Phase2TrackerCluster1D > cluster = edmNew::makeRefTo(clusters, clustIt); + edm::Ref< Phase2TrackerCluster1DCollectionNew, Phase2TrackerCluster1D > cluster = edmNew::makeRefTo(clusters, &clustIt); // Make a RecHit and add it to the DetSet Phase2TrackerRecHit1D hit(lv.first, lv.second, cluster); diff --git a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.h b/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.h deleted file mode 100644 index 5feda89364160..0000000000000 --- a/RecoLocalTracker/Phase2TrackerRecHits/plugins/Phase2TrackerRecHits.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef RecoLocalTracker_Phase2TrackerRecHits_Phase2TrackerRecHits_h -#define RecoLocalTracker_Phase2TrackerRecHits_Phase2TrackerRecHits_h - -#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" -#include "DataFormats/DetId/interface/DetId.h" - -#include "FWCore/Framework/interface/global/EDProducer.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/InputTag.h" -#include "FWCore/Framework/interface/ESHandle.h" -#include "FWCore/Framework/interface/ConsumesCollector.h" - -#include "RecoLocalTracker/Records/interface/TkStripCPERecord.h" -#include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h" - - - class Phase2TrackerRecHits : public edm::global::EDProducer<> { - - public: - - explicit Phase2TrackerRecHits(const edm::ParameterSet& conf); - virtual ~Phase2TrackerRecHits() {}; - void produce(edm::StreamID sid, edm::Event& event, const edm::EventSetup& eventSetup) const override final; - - private: - - edm::EDGetTokenT< Phase2TrackerCluster1DCollectionNew > token_; - edm::ESInputTag cpeTag_; - - }; - -#endif diff --git a/RecoLocalTracker/Phase2TrackerRecHits/src/Phase2StripCPEDummy.cc b/RecoLocalTracker/Phase2TrackerRecHits/src/Phase2StripCPETrivial.cc similarity index 78% rename from RecoLocalTracker/Phase2TrackerRecHits/src/Phase2StripCPEDummy.cc rename to RecoLocalTracker/Phase2TrackerRecHits/src/Phase2StripCPETrivial.cc index 0755e40c7978a..e830427ab9969 100644 --- a/RecoLocalTracker/Phase2TrackerRecHits/src/Phase2StripCPEDummy.cc +++ b/RecoLocalTracker/Phase2TrackerRecHits/src/Phase2StripCPETrivial.cc @@ -1,8 +1,8 @@ -#include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPEDummy.h" +#include "RecoLocalTracker/Phase2TrackerRecHits/interface/Phase2StripCPETrivial.h" -Phase2StripCPEDummy::LocalValues Phase2StripCPEDummy::localParameters(const Phase2TrackerCluster1D & cluster, const GeomDetUnit & det) const { +Phase2StripCPETrivial::LocalValues Phase2StripCPETrivial::localParameters(const Phase2TrackerCluster1D & cluster, const GeomDetUnit & det) const { float strippitch = 0.0090; // hardcoded dummy, a la 2S float striplength = 5.; // hardcoded dummy, a la 2S std::pair barycenter = cluster.barycenter(); diff --git a/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidation.cc b/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidation.cc index ad2cb62b8cfd3..02bf84306e5d5 100644 --- a/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidation.cc +++ b/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidation.cc @@ -58,9 +58,9 @@ class Phase2TrackerRecHitsValidation : public edm::EDAnalyzer { explicit Phase2TrackerRecHitsValidation(const edm::ParameterSet&); ~Phase2TrackerRecHitsValidation(); - void beginJob(); - void endJob(); - void analyze(const edm::Event&, const edm::EventSetup&); + void beginJob() override; + void endJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: diff --git a/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidationTest_cfg.py b/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidationTest_cfg.py index 1748807d3f4c8..b61df682a12d9 100644 --- a/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidationTest_cfg.py +++ b/RecoLocalTracker/Phase2TrackerRecHits/test/RecHitsValidationTest_cfg.py @@ -51,7 +51,6 @@ ) ) - # Analyzer process.analysis = cms.EDAnalyzer('Phase2TrackerRecHitsValidation', src = cms.InputTag("siPhase2RecHits") @@ -62,7 +61,3 @@ process.validation_step = cms.Path(process.analysis) process.schedule = cms.Schedule(process.rechits_step, process.validation_step) - -from SLHCUpgradeSimulations.Configuration.phase2TkCustomsBE5DPixel10Ddev import customise_condOverRides -process = customise_condOverRides(process) - diff --git a/RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h b/RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h index ac48a111a2425..7f1e229330913 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h +++ b/RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h @@ -16,7 +16,7 @@ class Phase2TrackerClusterizerAlgorithm { Phase2TrackerClusterizerAlgorithm(unsigned int, unsigned int); void setup(const PixelGeomDetUnit*); - void clusterizeDetUnit(const edm::DetSet< Phase2TrackerDigi >&, edmNew::DetSetVector< Phase2TrackerCluster1D >::FastFiller&); + void clusterizeDetUnit(const edm::DetSet< Phase2TrackerDigi >&, Phase2TrackerCluster1DCollectionNew::FastFiller&); private: diff --git a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc index 370d4a9acb97b..a9a259e47e089 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc +++ b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.cc @@ -1,4 +1,15 @@ -#include "RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h" +#include "FWCore/Framework/interface/global/EDProducer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "FWCore/PluginManager/interface/ModuleDef.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/Framework/interface/ESHandle.h" + +#include "RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h" #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" @@ -7,14 +18,24 @@ #include "DataFormats/Common/interface/DetSetVector.h" #include "DataFormats/Phase2TrackerDigi/interface/Phase2TrackerDigi.h" - -#include "FWCore/PluginManager/interface/ModuleDef.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/Framework/interface/ESHandle.h" +#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" +#include "DataFormats/DetId/interface/DetId.h" #include -#include +#include + +class Phase2TrackerClusterizer : public edm::global::EDProducer<> { + + public: + explicit Phase2TrackerClusterizer(const edm::ParameterSet& conf); + virtual ~Phase2TrackerClusterizer(); + void produce(edm::StreamID sid, edm::Event& event, const edm::EventSetup& eventSetup) const override final; + + private: + std::unique_ptr< Phase2TrackerClusterizerAlgorithm > clusterizer_; + edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > token_; + +}; /* @@ -48,9 +69,8 @@ std::auto_ptr< Phase2TrackerCluster1DCollectionNew > outputClusters(new Phase2TrackerCluster1DCollectionNew()); // Go over all the modules - for (edm::DetSetVector< Phase2TrackerDigi >::const_iterator DSViter = digis->begin(); DSViter != digis->end(); ++DSViter) { - - DetId detId(DSViter->detId()); + for (auto DSViter : *digis) { + DetId detId(DSViter.detId()); // Geometry const GeomDetUnit* geomDetUnit(tkGeom->idToDetUnit(detId)); @@ -58,14 +78,14 @@ if (!pixDet) assert(0); // Container for the clusters that will be produced for this modules - edmNew::DetSetVector< Phase2TrackerCluster1D >::FastFiller clusters(*outputClusters, DSViter->detId()); + Phase2TrackerCluster1DCollectionNew::FastFiller clusters(*outputClusters, DSViter.detId()); // Setup the clusterizer algorithm for this detector (see ClusterizerAlgorithm for more details) clusterizer_->setup(pixDet); // Pass the list of Digis to the main algorithm // This function will store the clusters in the previously created container - clusterizer_->clusterizeDetUnit(*DSViter, clusters); + clusterizer_->clusterizeDetUnit(DSViter, clusters); if (clusters.empty()) clusters.abort(); } diff --git a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h deleted file mode 100644 index 852bf201ef06f..0000000000000 --- a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizer.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizer_h -#define RecoLocalTracker_SiPhase2Clusterizer_Phase2TrackerClusterizer_h - -#include "RecoLocalTracker/SiPhase2Clusterizer/interface/Phase2TrackerClusterizerAlgorithm.h" - -#include "DataFormats/TrackerCommon/interface/TrackerTopology.h" -#include "DataFormats/DetId/interface/DetId.h" - -#include "FWCore/Framework/interface/global/EDProducer.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/InputTag.h" -#include "FWCore/Framework/interface/ConsumesCollector.h" - -#include - - - class Phase2TrackerClusterizer : public edm::global::EDProducer<> { - - public: - explicit Phase2TrackerClusterizer(const edm::ParameterSet& conf); - virtual ~Phase2TrackerClusterizer(); - void produce(edm::StreamID sid, edm::Event& event, const edm::EventSetup& eventSetup) const override final; - - private: - std::unique_ptr< Phase2TrackerClusterizerAlgorithm > clusterizer_; - edm::EDGetTokenT< edm::DetSetVector< Phase2TrackerDigi > > token_; - - }; - - -#endif diff --git a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizerAlgorithm.cc b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizerAlgorithm.cc index 40b8fc312cae5..3b366e14bc359 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizerAlgorithm.cc +++ b/RecoLocalTracker/SiPhase2Clusterizer/plugins/Phase2TrackerClusterizerAlgorithm.cc @@ -23,7 +23,7 @@ void Phase2TrackerClusterizerAlgorithm::setup(const PixelGeomDetUnit* pixDet) { * Go over the Digis and create clusters */ -void Phase2TrackerClusterizerAlgorithm::clusterizeDetUnit(const edm::DetSet< Phase2TrackerDigi >& digis, edmNew::DetSetVector< Phase2TrackerCluster1D >::FastFiller& clusters) { +void Phase2TrackerClusterizerAlgorithm::clusterizeDetUnit(const edm::DetSet< Phase2TrackerDigi >& digis, Phase2TrackerCluster1DCollectionNew::FastFiller& clusters) { // Fill the 2D matrix with the hit information : (hit or not) fillMatrix(digis.begin(), digis.end()); diff --git a/RecoLocalTracker/SiPhase2Clusterizer/test/BuildFile.xml b/RecoLocalTracker/SiPhase2Clusterizer/test/BuildFile.xml index 0b99ebcb5a835..598560921edaf 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/test/BuildFile.xml +++ b/RecoLocalTracker/SiPhase2Clusterizer/test/BuildFile.xml @@ -24,5 +24,4 @@ - diff --git a/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc b/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc index c82fd22607c3b..721fbd0d7a53e 100644 --- a/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc +++ b/RecoLocalTracker/SiPhase2Clusterizer/test/ClustersValidation.cc @@ -74,9 +74,9 @@ class Phase2TrackerClusterizerValidation : public edm::EDAnalyzer { explicit Phase2TrackerClusterizerValidation(const edm::ParameterSet&); ~Phase2TrackerClusterizerValidation(); - void beginJob(); - void endJob(); - void analyze(const edm::Event&, const edm::EventSetup&); + void beginJob() override; + void endJob() override; + void analyze(const edm::Event&, const edm::EventSetup&) override; private: From 0dc3a4fff81dfe6c4e4be91af821161f383081ec Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 29 Jan 2016 13:03:28 +0100 Subject: [PATCH 178/250] import calostage1 alias --- Configuration/StandardSequences/python/SimL1Emulator_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configuration/StandardSequences/python/SimL1Emulator_cff.py b/Configuration/StandardSequences/python/SimL1Emulator_cff.py index d872f1802d1e9..ddeed0b5d31c8 100644 --- a/Configuration/StandardSequences/python/SimL1Emulator_cff.py +++ b/Configuration/StandardSequences/python/SimL1Emulator_cff.py @@ -9,5 +9,5 @@ # consider moving these mods to the HLT configuration from FastSimulation.Configuration.DigiAliases_cff import loadTriggerDigiAliases loadTriggerDigiAliases() - from FastSimulation.Configuration.DigiAliases_cff import gtDigis,gmtDigis,gctDigis + from FastSimulation.Configuration.DigiAliases_cff import gtDigis,gmtDigis,gctDigis,caloStage1LegacyFormatDigis From e8f4b9cd291d3743d05c82045adb82f9ed1e5e80 Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 29 Jan 2016 13:03:42 +0100 Subject: [PATCH 179/250] remove redundant alias --- .../Configuration/python/DigiAliases_cff.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/FastSimulation/Configuration/python/DigiAliases_cff.py b/FastSimulation/Configuration/python/DigiAliases_cff.py index 077dbdcc86096..0d3240714099e 100644 --- a/FastSimulation/Configuration/python/DigiAliases_cff.py +++ b/FastSimulation/Configuration/python/DigiAliases_cff.py @@ -97,9 +97,9 @@ def loadDigiAliases(premix=False): cms.PSet( type = cms.string("DTLayerIdDTDigiMuonDigiCollection") ), - cms.PSet( - type = cms.string("DTLayerIdDTDigiSimLinkMuonDigiCollection") - ) + #cms.PSet( + # type = cms.string("DTLayerIdDTDigiSimLinkMuonDigiCollection") + # ) ) } ) @@ -110,9 +110,9 @@ def loadDigiAliases(premix=False): cms.PSet( type = cms.string("RPCDetIdRPCDigiMuonDigiCollection") ), - cms.PSet( - type = cms.string("RPCDigiSimLinkedmDetSetVector") - ) + #cms.PSet( + # type = cms.string("RPCDigiSimLinkedmDetSetVector") + # ) ) } ) @@ -128,9 +128,9 @@ def loadDigiAliases(premix=False): type = cms.string("CSCDetIdCSCStripDigiMuonDigiCollection"), fromProductInstance = cms.string("MuonCSCStripDigi" if nopremix else "MuonCSCStripDigisDM"), toProductInstance = cms.string("MuonCSCStripDigi")), - cms.PSet( - type = cms.string('StripDigiSimLinkedmDetSetVector') - ), + #cms.PSet( + # type = cms.string('StripDigiSimLinkedmDetSetVector') + # ), ) } ) From 8d122183c214593ff447206a6be55b7a01acb520 Mon Sep 17 00:00:00 2001 From: Chiron Date: Fri, 29 Jan 2016 13:42:45 +0100 Subject: [PATCH 180/250] Update ElectronMcMiniAODSignalValidator.cc --- .../ElectronMcMiniAODSignalValidator.cc | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc index 79b5f8ef26280..3e630fd24ab94 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc @@ -371,18 +371,23 @@ void ElectronMcSignalValidatorMiniAOD::analyze(const edm::Event& iEvent, const e if (bestGsfElectron.isEE()) h1_ele_fbrem_mAOD_endcaps->Fill( bestGsfElectron.fbrem() ); // -- pflow over pT - h1_ele_chargedHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); - if (bestGsfElectron.isEB()) h1_ele_chargedHadronRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); - if (bestGsfElectron.isEE()) h1_ele_chargedHadronRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt / bestGsfElectron.pt()); - - h1_ele_neutralHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); -// h1_ele_chargedHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIso_.sumNeutralHadronEt / bestGsfElectron.pt()); - if (bestGsfElectron.isEB()) h1_ele_neutralHadronRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); - if (bestGsfElectron.isEE()) h1_ele_neutralHadronRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt / bestGsfElectron.pt()); - - h1_ele_photonRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); - if (bestGsfElectron.isEB()) h1_ele_photonRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); - if (bestGsfElectron.isEE()) h1_ele_photonRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt / bestGsfElectron.pt()); + double one_over_pt = 1. / bestGsfElectron.pt()); + + h1_ele_chargedHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt * one_over_pt ); + h1_ele_neutralHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt * one_over_pt ); + h1_ele_photonRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt * one_over_pt ); + + if (bestGsfElectron.isEB()) { + h1_ele_chargedHadronRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt * one_over_pt ); + h1_ele_neutralHadronRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt * one_over_pt ); + h1_ele_photonRelativeIso_mAOD_barrel->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt * one_over_pt ); + } + + if (bestGsfElectron.isEE()) { + h1_ele_chargedHadronRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt * one_over_pt ); + h1_ele_neutralHadronRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt * one_over_pt ); + h1_ele_photonRelativeIso_mAOD_endcaps->Fill(bestGsfElectron.pfIsolationVariables().sumPhotonEt * one_over_pt ); + } } } // fin boucle size_t i From e471d83da9198d7a4b216275f680cd770789e6d5 Mon Sep 17 00:00:00 2001 From: Lukas Date: Fri, 29 Jan 2016 14:13:00 +0100 Subject: [PATCH 181/250] FastSim: clean up track fitter cfg, enable tracking to run standalone --- .../python/Reconstruction_BefMix_cff.py | 8 ++++-- .../python/GSTrackFinalFitCommon_cff.py | 28 ------------------- .../python/KFFittingSmootherFifth_cfi.py | 16 ----------- .../python/KFFittingSmootherFirst_cfi.py | 14 ---------- .../KFFittingSmootherForElectrons_cfi.py | 14 ---------- .../python/KFFittingSmootherFourth_cfi.py | 14 ---------- .../python/KFFittingSmootherSecond_cfi.py | 14 ---------- .../python/KFFittingSmootherThird_cfi.py | 14 ---------- ...FittingSmootherWithOutlierRejection_cfi.py | 14 ---------- .../Tracking/python/TobTecStep_cff.py | 3 ++ 10 files changed, 8 insertions(+), 131 deletions(-) delete mode 100644 FastSimulation/Tracking/python/GSTrackFinalFitCommon_cff.py delete mode 100644 FastSimulation/Tracking/python/KFFittingSmootherFifth_cfi.py delete mode 100644 FastSimulation/Tracking/python/KFFittingSmootherFirst_cfi.py delete mode 100644 FastSimulation/Tracking/python/KFFittingSmootherForElectrons_cfi.py delete mode 100644 FastSimulation/Tracking/python/KFFittingSmootherFourth_cfi.py delete mode 100644 FastSimulation/Tracking/python/KFFittingSmootherSecond_cfi.py delete mode 100644 FastSimulation/Tracking/python/KFFittingSmootherThird_cfi.py delete mode 100644 FastSimulation/Tracking/python/KFFittingSmootherWithOutlierRejection_cfi.py diff --git a/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py b/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py index 342d29ca19a96..2312d245d5cfc 100644 --- a/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py +++ b/FastSimulation/Configuration/python/Reconstruction_BefMix_cff.py @@ -28,18 +28,20 @@ # confusing name for the file that imports # the fitters used by the TrackProducer # -from FastSimulation.Tracking.GSTrackFinalFitCommon_cff import * +from TrackingTools.MaterialEffects.Propagators_cff import * +from TrackingTools.TrackFitters.TrackFitters_cff import * +from RecoTracker.TransientTrackingRecHit.TransientTrackingRecHitBuilderWithoutRefit_cfi import * +from TrackingTools.KalmanUpdators.KFUpdatorESProducer_cfi import * +from TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi import * # MeasurementTrackerEvent from RecoLocalTracker.SiPixelRecHits.PixelCPEGeneric_cfi import * from RecoTracker.MeasurementDet.MeasurementTrackerESProducer_cff import * from FastSimulation.Tracking.MeasurementTrackerEventProducer_cfi import MeasurementTrackerEvent - # services needed by tracking from TrackingTools.TransientTrack.TransientTrackBuilder_cfi import TransientTrackBuilderESProducer from RecoTracker.TkNavigation.NavigationSchoolESProducer_cfi import navigationSchoolESProducer - from FastSimulation.Tracking.iterativeTk_cff import * from TrackingTools.TrackFitters.TrackFitters_cff import * diff --git a/FastSimulation/Tracking/python/GSTrackFinalFitCommon_cff.py b/FastSimulation/Tracking/python/GSTrackFinalFitCommon_cff.py deleted file mode 100644 index 51d424af281bf..0000000000000 --- a/FastSimulation/Tracking/python/GSTrackFinalFitCommon_cff.py +++ /dev/null @@ -1,28 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -# KFUpdatorESProducer -from TrackingTools.KalmanUpdators.KFUpdatorESProducer_cfi import * -# Chi2MeasurementEstimatorESProducer -from TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi import * -# KFTrajectoryFitterESProducer -from TrackingTools.TrackFitters.KFTrajectoryFitter_cfi import * -# KFTrajectorySmootherESProducer -from TrackingTools.TrackFitters.KFTrajectorySmoother_cfi import * -# KFFittingSmootherESProducer -from TrackingTools.TrackFitters.KFFittingSmoother_cfi import * -from FastSimulation.Tracking.KFFittingSmootherWithOutlierRejection_cfi import * -from FastSimulation.Tracking.KFFittingSmootherFirst_cfi import * -from FastSimulation.Tracking.KFFittingSmootherSecond_cfi import * -from FastSimulation.Tracking.KFFittingSmootherThird_cfi import * -from FastSimulation.Tracking.KFFittingSmootherFourth_cfi import * -from FastSimulation.Tracking.KFFittingSmootherFifth_cfi import * -from FastSimulation.Tracking.KFFittingSmootherForElectrons_cfi import * -# PropagatorWithMaterialESProducer -from TrackingTools.MaterialEffects.MaterialPropagator_cfi import * -# PropagatorWithMaterialESProducer -from TrackingTools.MaterialEffects.OppositeMaterialPropagator_cfi import * -# TransientRecHitRecordESProducer -from RecoTracker.TransientTrackingRecHit.TransientTrackingRecHitBuilderWithoutRefit_cfi import * -# Generic TrackProducer -from RecoTracker.TrackProducer.CTFFinalFitWithMaterial_cfi import * - diff --git a/FastSimulation/Tracking/python/KFFittingSmootherFifth_cfi.py b/FastSimulation/Tracking/python/KFFittingSmootherFifth_cfi.py deleted file mode 100644 index 28bee763b6235..0000000000000 --- a/FastSimulation/Tracking/python/KFFittingSmootherFifth_cfi.py +++ /dev/null @@ -1,16 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -KFFittingSmootherFifth = cms.ESProducer( - "KFFittingSmootherESProducer", -# EstimateCut = cms.double(20), - EstimateCut = cms.double(-1), - Fitter = cms.string('KFFitter'), -# MinNumberOfHits = cms.int32(7), - MinNumberOfHits = cms.int32(4), - Smoother = cms.string('KFSmoother'), - BreakTrajWith2ConsecutiveMissing = cms.bool(True), - ComponentName = cms.string('KFFittingSmootherFifth'), - NoInvalidHitsBeginEnd = cms.bool(True), - RejectTracks = cms.bool(True), - LogPixelProbabilityCut = cms.double(-16) -) diff --git a/FastSimulation/Tracking/python/KFFittingSmootherFirst_cfi.py b/FastSimulation/Tracking/python/KFFittingSmootherFirst_cfi.py deleted file mode 100644 index 0d08fb85ede17..0000000000000 --- a/FastSimulation/Tracking/python/KFFittingSmootherFirst_cfi.py +++ /dev/null @@ -1,14 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -KFFittingSmootherFirst = cms.ESProducer( - "KFFittingSmootherESProducer", - EstimateCut = cms.double(20), - Fitter = cms.string('KFFitter'), - MinNumberOfHits = cms.int32(7), - Smoother = cms.string('KFSmoother'), - BreakTrajWith2ConsecutiveMissing = cms.bool(True), - ComponentName = cms.string('KFFittingSmootherFirst'), - NoInvalidHitsBeginEnd = cms.bool(True), - RejectTracks = cms.bool(True), - LogPixelProbabilityCut = cms.double(-16) -) diff --git a/FastSimulation/Tracking/python/KFFittingSmootherForElectrons_cfi.py b/FastSimulation/Tracking/python/KFFittingSmootherForElectrons_cfi.py deleted file mode 100644 index e8ddc038a7890..0000000000000 --- a/FastSimulation/Tracking/python/KFFittingSmootherForElectrons_cfi.py +++ /dev/null @@ -1,14 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -KFFittingSmootherForElectrons = cms.ESProducer( - "KFFittingSmootherESProducer", - EstimateCut = cms.double(60.0), - Fitter = cms.string('KFFitter'), - MinNumberOfHits = cms.int32(5), - Smoother = cms.string('KFSmoother'), - BreakTrajWith2ConsecutiveMissing = cms.bool(True), - ComponentName = cms.string('KFFittingSmootherForElectrons'), - NoInvalidHitsBeginEnd = cms.bool(True), - RejectTracks = cms.bool(True), - LogPixelProbabilityCut = cms.double(-16) -) diff --git a/FastSimulation/Tracking/python/KFFittingSmootherFourth_cfi.py b/FastSimulation/Tracking/python/KFFittingSmootherFourth_cfi.py deleted file mode 100644 index 2134e44de7317..0000000000000 --- a/FastSimulation/Tracking/python/KFFittingSmootherFourth_cfi.py +++ /dev/null @@ -1,14 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -KFFittingSmootherFourth = cms.ESProducer( - "KFFittingSmootherESProducer", - EstimateCut = cms.double(-1), - Fitter = cms.string('KFFitter'), - MinNumberOfHits = cms.int32(3), - Smoother = cms.string('KFSmoother'), - BreakTrajWith2ConsecutiveMissing = cms.bool(True), - ComponentName = cms.string('KFFittingSmootherFourth'), - NoInvalidHitsBeginEnd = cms.bool(True), - RejectTracks = cms.bool(True), - LogPixelProbabilityCut = cms.double(-16) -) diff --git a/FastSimulation/Tracking/python/KFFittingSmootherSecond_cfi.py b/FastSimulation/Tracking/python/KFFittingSmootherSecond_cfi.py deleted file mode 100644 index 837795cd29074..0000000000000 --- a/FastSimulation/Tracking/python/KFFittingSmootherSecond_cfi.py +++ /dev/null @@ -1,14 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -KFFittingSmootherSecond = cms.ESProducer( - "KFFittingSmootherESProducer", - EstimateCut = cms.double(10.0), - Fitter = cms.string('KFFitter'), - MinNumberOfHits = cms.int32(3), - Smoother = cms.string('KFSmoother'), - BreakTrajWith2ConsecutiveMissing = cms.bool(True), - ComponentName = cms.string('KFFittingSmootherSecond'), - NoInvalidHitsBeginEnd = cms.bool(True), - RejectTracks = cms.bool(True), - LogPixelProbabilityCut = cms.double(-16) -) diff --git a/FastSimulation/Tracking/python/KFFittingSmootherThird_cfi.py b/FastSimulation/Tracking/python/KFFittingSmootherThird_cfi.py deleted file mode 100644 index 6c9938efa9330..0000000000000 --- a/FastSimulation/Tracking/python/KFFittingSmootherThird_cfi.py +++ /dev/null @@ -1,14 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -KFFittingSmootherThird = cms.ESProducer( - "KFFittingSmootherESProducer", - EstimateCut = cms.double(100.0), - Fitter = cms.string('KFFitter'), - MinNumberOfHits = cms.int32(3), - Smoother = cms.string('KFSmoother'), - BreakTrajWith2ConsecutiveMissing = cms.bool(True), - ComponentName = cms.string('KFFittingSmootherThird'), - NoInvalidHitsBeginEnd = cms.bool(True), - RejectTracks = cms.bool(True), - LogPixelProbabilityCut = cms.double(-16) -) diff --git a/FastSimulation/Tracking/python/KFFittingSmootherWithOutlierRejection_cfi.py b/FastSimulation/Tracking/python/KFFittingSmootherWithOutlierRejection_cfi.py deleted file mode 100644 index 4bb58813560e1..0000000000000 --- a/FastSimulation/Tracking/python/KFFittingSmootherWithOutlierRejection_cfi.py +++ /dev/null @@ -1,14 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -KFFittingSmootherWithOutlierRejection = cms.ESProducer( - "KFFittingSmootherESProducer", - EstimateCut = cms.double(10.0), - Fitter = cms.string('KFFitter'), - MinNumberOfHits = cms.int32(3), - Smoother = cms.string('KFSmoother'), - BreakTrajWith2ConsecutiveMissing = cms.bool(True), - ComponentName = cms.string('KFFittingSmootherWithOutlierRejection'), - NoInvalidHitsBeginEnd = cms.bool(True), - RejectTracks = cms.bool(True), - LogPixelProbabilityCut = cms.double(-16) -) diff --git a/FastSimulation/Tracking/python/TobTecStep_cff.py b/FastSimulation/Tracking/python/TobTecStep_cff.py index 27f09b886b652..095bb6d922f03 100644 --- a/FastSimulation/Tracking/python/TobTecStep_cff.py +++ b/FastSimulation/Tracking/python/TobTecStep_cff.py @@ -36,6 +36,9 @@ hitMasks = cms.InputTag("tobTecStepMasks"), ) +# track fitters +from RecoTracker.IterativeTracking.TobTecStep_cff import tobTecFlexibleKFFittingSmoother,tobTecStepRKTrajectorySmootherForLoopers,tobTecStepRKTrajectorySmoother,tobTecStepRKTrajectoryFitterForLoopers,tobTecStepRKTrajectoryFitter,tobTecStepFitterSmootherForLoopers,tobTecStepFitterSmoother + # tracks tobTecStepTracks = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepTracks.clone( TTRHBuilder = 'WithoutRefit', From 58724e4587dd8392afa20037222d6860de0016fc Mon Sep 17 00:00:00 2001 From: David Lange Date: Fri, 29 Jan 2016 15:27:13 +0100 Subject: [PATCH 182/250] Revert "Clean LHEInterface" --- .../LHEInterface/interface/BranchingRatios.h | 32 ++ .../LHEInterface/interface/Hadronisation.h | 89 ++++ .../LHEInterface/interface/JetClustering.h | 75 ++++ .../LHEInterface/interface/JetInput.h | 97 +++++ .../LHEInterface/interface/JetMatching.h | 82 ++++ .../LHEInterface/interface/JetMatchingMLM.h | 50 +++ .../LHEInterface/plugins/BuildFile.xml | 12 + .../LHEInterface/plugins/LHEAnalyzer.cc | 275 ++++++++++++ .../LHEInterface/plugins/LHEProducer.cc | 306 +++++++++++++ .../LHEInterface/src/BranchingRatios.cc | 60 +++ .../LHEInterface/src/Hadronisation.cc | 155 +++++++ .../LHEInterface/src/JetClustering.cc | 199 +++++++++ .../LHEInterface/src/JetInput.cc | 411 ++++++++++++++++++ .../LHEInterface/src/JetMatching.cc | 66 +++ .../LHEInterface/src/JetMatchingMLM.cc | 234 ++++++++++ .../LHEInterface/src/Matching.h | 121 ++++++ .../LHEInterface/src/SimpleMatrix.h | 47 ++ .../LHEInterface/test/analyze_cfg.py | 54 +++ .../LHEInterface/test/plotMatchingAnalysis.C | 87 ++++ 19 files changed, 2452 insertions(+) create mode 100644 GeneratorInterface/LHEInterface/interface/BranchingRatios.h create mode 100644 GeneratorInterface/LHEInterface/interface/Hadronisation.h create mode 100644 GeneratorInterface/LHEInterface/interface/JetClustering.h create mode 100644 GeneratorInterface/LHEInterface/interface/JetInput.h create mode 100644 GeneratorInterface/LHEInterface/interface/JetMatching.h create mode 100644 GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h create mode 100644 GeneratorInterface/LHEInterface/plugins/LHEAnalyzer.cc create mode 100644 GeneratorInterface/LHEInterface/plugins/LHEProducer.cc create mode 100644 GeneratorInterface/LHEInterface/src/BranchingRatios.cc create mode 100644 GeneratorInterface/LHEInterface/src/Hadronisation.cc create mode 100644 GeneratorInterface/LHEInterface/src/JetClustering.cc create mode 100644 GeneratorInterface/LHEInterface/src/JetInput.cc create mode 100644 GeneratorInterface/LHEInterface/src/JetMatching.cc create mode 100644 GeneratorInterface/LHEInterface/src/JetMatchingMLM.cc create mode 100644 GeneratorInterface/LHEInterface/src/Matching.h create mode 100644 GeneratorInterface/LHEInterface/src/SimpleMatrix.h create mode 100755 GeneratorInterface/LHEInterface/test/analyze_cfg.py create mode 100644 GeneratorInterface/LHEInterface/test/plotMatchingAnalysis.C diff --git a/GeneratorInterface/LHEInterface/interface/BranchingRatios.h b/GeneratorInterface/LHEInterface/interface/BranchingRatios.h new file mode 100644 index 0000000000000..04ce80758afca --- /dev/null +++ b/GeneratorInterface/LHEInterface/interface/BranchingRatios.h @@ -0,0 +1,32 @@ +#ifndef GeneratorInterface_LHEInterface_BranchingRatios_h +#define GeneratorInterface_LHEInterface_BranchingRatios_h + +#include + +#include + +namespace lhef { + +class LHEEvent; +class Hadronisation; + +class BranchingRatios { + public: + BranchingRatios() {} + ~BranchingRatios() {} + + void reset(); + + void set(int pdgId, bool both = true, double value = 1.0); + double getFactor(const Hadronisation *hadronisation, + const boost::shared_ptr &event) const; + + private: + double get(int pdgId, const Hadronisation *hadronisation) const; + + mutable std::map cache; +}; + +} // namespace lhef + +#endif // GeneratorCommon_LHEInterface_BranchingRatios_h diff --git a/GeneratorInterface/LHEInterface/interface/Hadronisation.h b/GeneratorInterface/LHEInterface/interface/Hadronisation.h new file mode 100644 index 0000000000000..351fc443af9af --- /dev/null +++ b/GeneratorInterface/LHEInterface/interface/Hadronisation.h @@ -0,0 +1,89 @@ +#ifndef GeneratorInterface_LHEInterface_Hadronisation_h +#define GeneratorInterface_LHEInterface_Hadronisation_h + +#include +#include +#include + +#include +#include + +#include "HepMC/GenEvent.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PluginManager/interface/PluginFactory.h" + +namespace CLHEP { + class HepRandomEngine; +} + +namespace lhef { + +class LHEEvent; +class LHERunInfo; + +class Hadronisation { + public: + Hadronisation(const edm::ParameterSet ¶ms); + virtual ~Hadronisation(); + + void init(); + bool setEvent(const boost::shared_ptr &event); + void clear(); + + void setRandomEngine(CLHEP::HepRandomEngine* v) { doSetRandomEngine(v); } + + virtual void statistics() {} + virtual double totalBranchingRatio(int pdgId) const { return 1.0; } + + std::auto_ptr hadronize(); + + virtual std::set capabilities() const; + virtual void matchingCapabilities( + const std::set &capabilities); + + inline sigc::signal&>& + onShoweredEvent() { return sigShower; } + inline sigc::signal& onInit() { return sigInit; } + inline sigc::signal& onBeforeHadronisation() + { return sigBeforeHadronisation; } + + static std::auto_ptr create( + const edm::ParameterSet ¶ms); + + typedef edmplugin::PluginFactory Factory; + + protected: + inline bool wantsShoweredEvent() const + { return psRequested && !sigShower.empty(); } + inline bool wantsShoweredEventAsHepMC() const + { return psAsHepMC; } + + bool showeredEvent(const boost::shared_ptr &event); + + inline const boost::shared_ptr &getRawEvent() const + { return rawEvent; } + + virtual void doInit() = 0; + virtual std::auto_ptr doHadronisation() = 0; + virtual void newRunInfo(const boost::shared_ptr &runInfo); + + private: + + virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) { } + + sigc::signal&> sigShower; + sigc::signal sigInit; + sigc::signal sigBeforeHadronisation; + bool psRequested; + bool psAsHepMC; + boost::shared_ptr rawEvent; +}; + +} // namespace lhef + +#define DEFINE_LHE_HADRONISATION_PLUGIN(T) \ + DEFINE_EDM_PLUGIN(lhef::Hadronisation::Factory, T, #T) + +#endif // GeneratorRunInfo_LHEInterface_Hadronisation_h diff --git a/GeneratorInterface/LHEInterface/interface/JetClustering.h b/GeneratorInterface/LHEInterface/interface/JetClustering.h new file mode 100644 index 0000000000000..ff87fac66aa2e --- /dev/null +++ b/GeneratorInterface/LHEInterface/interface/JetClustering.h @@ -0,0 +1,75 @@ +#ifndef GeneratorInterface_LHEInterface_JetClustering_h +#define GeneratorInterface_LHEInterface_JetClustering_h + +#include +#include + +#include "Math/GenVector/PxPyPzE4D.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "GeneratorInterface/LHEInterface/interface/JetInput.h" + +namespace lhef { + +class JetClustering { + public: + typedef JetInput::ParticleVector ParticleVector; + typedef ROOT::Math::PxPyPzE4D FourVector; + + class Jet { + public: + Jet() {} + Jet(const FourVector &p4) : p4_(p4) {} + Jet(const FourVector &p4, const ParticleVector &constituents) : + p4_(p4), constituents_(constituents) {} + Jet(double px, double py, double pz, double e) : + p4_(px, py, pz, e) {} + Jet(double px, double py, double pz, double e, + const ParticleVector &constituents) : + p4_(px, py, pz, e), constituents_(constituents) {} + Jet(ParticleVector::value_type item) : + p4_(item->momentum().px(), item->momentum().py(), + item->momentum().pz(), item->momentum().e()), + constituents_(1) { constituents_[0] = item; } + + const FourVector &p4() const { return p4_; } + const ParticleVector &constituents() const { return constituents_; } + + double px() const { return p4_.Px(); } + double py() const { return p4_.Py(); } + double pz() const { return p4_.Pz(); } + double e() const { return p4_.E(); } + + double momentum() const { return p4_.P(); } + double pt() const { return p4_.Perp(); } + double et() const { return p4_.Et(); } + double theta() const { return p4_.Theta(); } + double eta() const { return p4_.Eta(); } + double phi() const { return p4_.Phi(); } + double m() const { return p4_.M(); } + + private: + FourVector p4_; + ParticleVector constituents_; + }; + + JetClustering(const edm::ParameterSet ¶ms); + JetClustering(const edm::ParameterSet ¶ms, double jetPtMin); + ~JetClustering(); + + std::vector operator () (const ParticleVector &input) const; + + double getJetPtMin() const; + + class Algorithm; + + private: + void init(const edm::ParameterSet ¶ms, double jetPtMin); + + std::auto_ptr jetAlgo; +}; + +} // namespace lhef + +#endif // GeneratorCommon_LHEInterface_JetClustering_h diff --git a/GeneratorInterface/LHEInterface/interface/JetInput.h b/GeneratorInterface/LHEInterface/interface/JetInput.h new file mode 100644 index 0000000000000..08042c16d2e40 --- /dev/null +++ b/GeneratorInterface/LHEInterface/interface/JetInput.h @@ -0,0 +1,97 @@ +#ifndef GeneratorInterface_LHEInterface_JetInput_h +#define GeneratorInterface_LHEInterface_JetInput_h + +#include + +#include "HepMC/GenEvent.h" +#include "HepMC/GenParticle.h" +#include "HepMC/GenVertex.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +namespace lhef { + +class JetInput { + public: + typedef std::vector ParticleBitmap; + typedef std::vector ParticleVector; + typedef std::vector VertexVector; + + JetInput(); + JetInput(const edm::ParameterSet ¶ms); + ~JetInput(); + + ParticleVector operator () (const HepMC::GenEvent *event) const; + + bool getPartonicFinalState() const { return partonicFinalState; } + bool getHardProcessOnly() const { return onlyHardProcess; } + bool getTausAndJets() const { return tausAsJets; } + bool getExcludeResonances() const { return excludeResonances; } + double getPtMin() const { return ptMin; } + const std::vector &getIgnoredParticles() const + { return ignoreParticleIDs; } + const std::vector &getExcludedResonances() const + { return excludedResonances; } + const std::vector &getExcludedFromResonances() const + { return excludedFromResonances; } + + void setPartonicFinalState(bool flag = true) + { partonicFinalState = flag; } + void setHardProcessOnly(bool flag = true) + { onlyHardProcess = flag; } + void setTausAsJets(bool flag = true) { tausAsJets = flag; } + void setExcludeResonances(bool flag = true) { excludeResonances = flag; } + void setPtMin(double ptMin) { this->ptMin = ptMin; } + void setIgnoredParticles(const std::vector &particleIDs); + void setExcludedResonances(const std::vector &particleIds); + void setExcludedFromResonances(const std::vector &particleIds); + + bool isParton(int pdgId) const; + static bool isHadron(int pdgId); + bool isResonance(int pdgId) const; + bool isExcludedFromResonances(int pdgId) const; + bool isHardProcess(const HepMC::GenVertex *vertex, + const VertexVector &hardProcess) const; + bool isIgnored(int pdgId) const; + + enum ResonanceState { + kNo = 0, + kDirect, + kIndirect + }; + + bool hasPartonChildren(ParticleBitmap &invalid, + const ParticleVector &p, + const HepMC::GenParticle *particle) const; + bool fromHardProcess(ParticleBitmap &invalid, + const ParticleVector &p, + const HepMC::GenParticle *particle, + const VertexVector &hardProcess) const; + bool fromSignalVertex(ParticleBitmap &invalid, + const ParticleVector &p, + const HepMC::GenParticle *particle, + const HepMC::GenVertex *signalVertex) const; + ResonanceState fromResonance(ParticleBitmap &invalid, + const ParticleVector &p, + const HepMC::GenParticle *particle, + const HepMC::GenVertex *signalVertex, + const VertexVector &hardProcess) const; + + private: + int testPartonChildren(ParticleBitmap &invalid, + const ParticleVector &p, + const HepMC::GenVertex *v) const; + + std::vector ignoreParticleIDs; + std::vector excludedResonances; + std::vector excludedFromResonances; + bool partonicFinalState; + bool onlyHardProcess; + bool excludeResonances; + bool tausAsJets; + double ptMin; +}; + +} // namespace lhef + +#endif // GeneratorCommon_LHEInterface_JetInput_h diff --git a/GeneratorInterface/LHEInterface/interface/JetMatching.h b/GeneratorInterface/LHEInterface/interface/JetMatching.h new file mode 100644 index 0000000000000..edc05fe2ab28e --- /dev/null +++ b/GeneratorInterface/LHEInterface/interface/JetMatching.h @@ -0,0 +1,82 @@ +#ifndef GeneratorInterface_LHEInterface_JetMatching_h +#define GeneratorInterface_LHEInterface_JetMatching_h + +#include +#include +#include +#include + +#include + +#include "HepMC/GenEvent.h" +#include "HepMC/SimpleVector.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/PluginManager/interface/PluginFactory.h" + +namespace lhef { + +class LHERunInfo; +class LHEEvent; +class JetInput; +class JetClustering; + +class JetMatching { + public: + JetMatching(const edm::ParameterSet ¶ms); + virtual ~JetMatching(); + + struct JetPartonMatch { + JetPartonMatch(const HepMC::FourVector &parton, + const HepMC::FourVector &jet, + double delta, + int pdgId) : + parton(parton), jet(jet), + delta(delta), pdgId(pdgId) {} + + JetPartonMatch(const HepMC::FourVector &parton, + int pdgId) : + parton(parton), delta(-1.0), pdgId(pdgId) {} + + JetPartonMatch(const HepMC::FourVector &jet) : + jet(jet), delta(-1.0), pdgId(0) {} + + inline bool isMatch() const { return delta >= 0 && pdgId; } + inline bool hasParton() const { return pdgId; } + inline bool hasJet() const { return delta >= 0 || !pdgId; } + + HepMC::FourVector parton; + HepMC::FourVector jet; + double delta; + int pdgId; + }; + + virtual void init(const boost::shared_ptr &runInfo); + virtual void beforeHadronisation( + const boost::shared_ptr &event); + + virtual double match(const HepMC::GenEvent *partonLevel, + const HepMC::GenEvent *finalState, + bool showeredFinalState = false) = 0; + + virtual std::set capabilities() const; + + const std::vector &getMatchSummary() const + { return matchSummary; } + + static std::auto_ptr create( + const edm::ParameterSet ¶ms); + + typedef edmplugin::PluginFactory Factory; + + protected: + std::vector matchSummary; +}; + +} // namespace lhef + +#define DEFINE_LHE_JETMATCHING_PLUGIN(T) \ + DEFINE_EDM_PLUGIN(lhef::JetMatching::Factory, T, #T) + +#endif // GeneratorCommon_LHEInterface_JetMatching_h diff --git a/GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h b/GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h new file mode 100644 index 0000000000000..5fbd6a096e3fa --- /dev/null +++ b/GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h @@ -0,0 +1,50 @@ +#ifndef GeneratorInterface_LHEInterface_JetMatchingMLM_h +#define GeneratorInterface_LHEInterface_JetMatchingMLM_h + +#include +#include + +#include "HepMC/GenEvent.h" +#include "HepMC/SimpleVector.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "GeneratorInterface/LHEInterface/interface/JetMatching.h" + +namespace lhef { + +class JetInput; +class JetClustering; + +class JetMatchingMLM : public JetMatching { + public: + JetMatchingMLM(const edm::ParameterSet ¶ms); + ~JetMatchingMLM(); + + private: + std::set capabilities() const; + + double match(const HepMC::GenEvent *partonLevel, + const HepMC::GenEvent *finalState, + bool showeredFinalState); + + enum MatchMode { + kExclusive = 0, + kInclusive + }; + + const double maxDeltaR; + const double minJetPt; + double maxEta; + double matchPtFraction; + bool useEt; + MatchMode matchMode; + + std::auto_ptr partonInput; + std::auto_ptr jetInput; + std::auto_ptr jetClustering; +}; + +} // namespace lhef + +#endif // GeneratorCommon_LHEInterface_JetMatchingMLM_h diff --git a/GeneratorInterface/LHEInterface/plugins/BuildFile.xml b/GeneratorInterface/LHEInterface/plugins/BuildFile.xml index f831ae56b90ba..198afb0afd864 100644 --- a/GeneratorInterface/LHEInterface/plugins/BuildFile.xml +++ b/GeneratorInterface/LHEInterface/plugins/BuildFile.xml @@ -5,6 +5,11 @@ + + + + + @@ -12,6 +17,13 @@ + + + + + + + diff --git a/GeneratorInterface/LHEInterface/plugins/LHEAnalyzer.cc b/GeneratorInterface/LHEInterface/plugins/LHEAnalyzer.cc new file mode 100644 index 0000000000000..085466cdf9c19 --- /dev/null +++ b/GeneratorInterface/LHEInterface/plugins/LHEAnalyzer.cc @@ -0,0 +1,275 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "TH1.h" + +#include "HepMC/GenEvent.h" +#include "HepMC/SimpleVector.h" + +#include "FWCore/Framework/interface/EDAnalyzer.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ServiceRegistry/interface/Service.h" + +#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" + +#include "CommonTools/UtilAlgos/interface/TFileService.h" + +#include "GeneratorInterface/LHEInterface/interface/JetInput.h" +#include "GeneratorInterface/LHEInterface/interface/JetClustering.h" +#include "GeneratorInterface/LHEInterface/interface/LHEEvent.h" + +using namespace lhef; + +class LHEAnalyzer : public edm::EDAnalyzer { + public: + explicit LHEAnalyzer(const edm::ParameterSet ¶ms); + virtual ~LHEAnalyzer(); + + protected: + virtual void analyze(const edm::Event &event, + const edm::EventSetup &es) override; + + + private: + void fillDJRSched(unsigned int min, unsigned int max); + + edm::InputTag sourceLabel; + JetInput jetInput; + + double defaultDeltaCut; + double defaultPtCut; + double maxEta; + bool useEt; + double ptFraction; + + unsigned int binsDelta; + double minDelta; + double maxDelta; + unsigned int binsPt; + double minPt; + double maxPt; + unsigned int minDJR; + unsigned int maxDJR; + + boost::ptr_vector deltaClustering; + std::auto_ptr ptClustering; + std::vector djrSched; + + std::vector histoDelta; + std::vector histoPt; +}; + +LHEAnalyzer::LHEAnalyzer(const edm::ParameterSet ¶ms) : + sourceLabel(params.getParameter("src")), + jetInput(params.getParameter("jetInput")), + defaultDeltaCut(params.getParameter("defaultDeltaCut")), + defaultPtCut(params.getParameter("defaultPtCut")), + maxEta(params.getParameter("maxEta")), + useEt(params.getParameter("useEt")), + ptFraction(params.getUntrackedParameter("ptFraction", 0.75)), + binsDelta(params.getParameter("binsDelta")), + minDelta(params.getParameter("minDelta")), + maxDelta(params.getParameter("maxDelta")), + binsPt(params.getParameter("binsPt")), + minPt(params.getParameter("minPt")), + maxPt(params.getParameter("maxPt")), + minDJR(params.getParameter("minDJR")), + maxDJR(params.getParameter("maxDJR")) +{ + edm::ParameterSet jetClusPSet = + params.getParameter("jetClustering"); + + for(unsigned int i = 0; i <= binsDelta; i++) { + double deltaCut = + minDelta + (maxDelta - minDelta) * i / binsDelta; + jetClusPSet.addParameter("coneRadius", deltaCut); + edm::ParameterSet tmp; + tmp.addParameter("algorithm", jetClusPSet); + deltaClustering.push_back( + new JetClustering(tmp, defaultPtCut * ptFraction)); + } + + jetClusPSet.addParameter("coneRadius", defaultDeltaCut); + edm::ParameterSet tmp; + tmp.addParameter("algorithm", jetClusPSet); + ptClustering.reset(new JetClustering(tmp, minPt * ptFraction)); + + fillDJRSched(minDJR <= 0 ? 1 : minDJR, maxDJR - 1); + + edm::Service fs; + for(unsigned int i = minDJR; i < maxDJR; i++) { + std::ostringstream ss, ss2; + ss << (i + 1) << "#rightarrow" << i << " jets"; + ss2 << i; + TH1 *h = fs->make(("delta" + ss2.str()).c_str(), + ("DJR " + ss.str()).c_str(), + binsDelta, minDelta, maxDelta); + h->SetXTitle("p_{T} [GeV/c^2]"); + h->SetYTitle("#delta#sigma [mb]"); + + if (i == 0) { + h->Delete(); + h = 0; + } + histoDelta.push_back(h); + + std::string what = useEt ? "E" : "p"; + h = fs->make(("pt" + ss2.str()).c_str(), + ("DJR " + ss.str()).c_str(), binsPt, + std::log10(minPt), std::log10(maxPt)); + h->SetXTitle(("log_{10}(" + what + + "_{T} [GeV/c^{2}])").c_str()); + h->SetYTitle("#delta#sigma [mb]"); + + histoPt.push_back(h); + } +} + +LHEAnalyzer::~LHEAnalyzer() +{ +} + +void LHEAnalyzer::fillDJRSched(unsigned int min, unsigned int max) +{ + unsigned int middle = (min + max) / 2; + + djrSched.push_back(middle); + + if (min < middle) + fillDJRSched(min, middle - 1); + if (middle < max) + fillDJRSched(middle + 1, max); +} + +void LHEAnalyzer::analyze(const edm::Event &event, const edm::EventSetup &es) +{ + using boost::bind; + typedef JetClustering::Jet Jet; + + edm::Handle hepmc; + event.getByLabel(sourceLabel, hepmc); + + std::auto_ptr clonedEvent; + const HepMC::GenEvent *genEvent = hepmc->GetEvent(); + if (!genEvent->signal_process_vertex()) { + clonedEvent.reset(new HepMC::GenEvent(*genEvent)); + const HepMC::GenVertex *signalVertex = + LHEEvent::findSignalVertex(clonedEvent.get()); + clonedEvent->set_signal_process_vertex( + const_cast(signalVertex)); + genEvent = clonedEvent.get(); + } + + JetInput::ParticleVector particles = jetInput(genEvent); + + std::vector ptJets = (*ptClustering)(particles); + std::sort(ptJets.begin(), ptJets.end(), + bind(std::greater(), + bind(useEt ? &Jet::et : &Jet::pt, _1), + bind(useEt ? &Jet::et : &Jet::pt, _2))); + + typedef std::pair Pair; + std::vector deltaJets(maxDJR - minDJR + 1, + Pair(-1, binsDelta + 1)); + + for(std::vector::const_iterator djr = djrSched.begin(); + djr != djrSched.end(); ++djr) { +//std::cout << "DJR schedule " << (*djr + 1) << " -> " << *djr << std::endl; + int result = -1; + for(;;) { +//for(int i = minDJR; i <= maxDJR; i++) +//std::cout << "+++ " << i << ": (" << deltaJets[i - minDJR].first << ", " << deltaJets[i - minDJR].second << ")" << std::endl; + int upper = binsDelta + 1; + for(int i = *djr; i >= (int)minDJR; i--) { + if (deltaJets[i - minDJR].second <= + (int)binsDelta) { + upper = deltaJets[i - minDJR].second; + break; + } + } + int lower = -1; + for(int i = *djr + 1; i <= (int)maxDJR; i++) { + if (deltaJets[i - minDJR].first >= 0) { + lower = deltaJets[i - minDJR].first; + break; + } + } +//std::cout << "\t" << lower << " < " << upper << std::endl; + + result = (lower + upper + 2) / 2 - 1; + if (result == lower) + break; + else if (result < lower) { + result = -1; + break; + } + + std::vector jets = + deltaClustering[result](particles); + unsigned int nJets = 0; + for(std::vector::const_iterator iter = + jets.begin(); iter != jets.end(); ++iter) + if ((useEt ? iter->et() : iter->pt()) + > defaultPtCut) + nJets++; + +//std::cout << "\t---(" << *djr << ")--> bin " << result << ": " << nJets << " jets" << std::endl; + + if (nJets < minDJR) + nJets = minDJR; + else if (nJets > maxDJR) + nJets = maxDJR; + + for(int j = nJets; j >= (int)minDJR; j--) { + if (deltaJets[j - minDJR].first < 0 || + result > deltaJets[j - minDJR].first) + deltaJets[j - minDJR].first = result; + } + for(int j = nJets; j <= (int)maxDJR; j++) { + if (deltaJets[j - minDJR].second < + (int)binsDelta || + result < deltaJets[j - minDJR].second) + deltaJets[j - minDJR].second = result; + } + } + +//std::cout << "final " << *djr << ": " << result << std::endl; + TH1 *h = histoDelta[*djr - minDJR]; + h->Fill(h->GetBinCenter(result + 1)); + + h = histoPt[*djr - minDJR]; + if (*djr >= ptJets.size()) + h->Fill(-999.0); + else if (useEt) + h->Fill(std::log10(ptJets[*djr].et())); + else + h->Fill(std::log10(ptJets[*djr].pt())); + } + + if (minDJR <= 0) { + TH1 *h = histoPt[0]; + if (minDJR >= ptJets.size()) + h->Fill(-999.0); + else if (useEt) + h->Fill(std::log10(ptJets[minDJR].et())); + else + h->Fill(std::log10(ptJets[minDJR].pt())); + } +} + +DEFINE_FWK_MODULE(LHEAnalyzer); diff --git a/GeneratorInterface/LHEInterface/plugins/LHEProducer.cc b/GeneratorInterface/LHEInterface/plugins/LHEProducer.cc new file mode 100644 index 0000000000000..922d3e29e7291 --- /dev/null +++ b/GeneratorInterface/LHEInterface/plugins/LHEProducer.cc @@ -0,0 +1,306 @@ +#include +#include + +#include +#include + +#include "HepMC/GenEvent.h" +#include "HepMC/SimpleVector.h" + +#include "FWCore/Framework/interface/one/EDFilter.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/Run.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ServiceRegistry/interface/RandomEngineSentry.h" + +#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" +#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" +#include "SimDataFormats/GeneratorProducts/interface/GenRunInfoProduct.h" + +#include "SimDataFormats/GeneratorProducts/interface/LHERunInfoProduct.h" +#include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h" + +#include "GeneratorInterface/LHEInterface/interface/LHERunInfo.h" +#include "GeneratorInterface/LHEInterface/interface/LHEEvent.h" +#include "GeneratorInterface/LHEInterface/interface/Hadronisation.h" +#include "GeneratorInterface/LHEInterface/interface/JetMatching.h" +#include "GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h" +#include "GeneratorInterface/LHEInterface/interface/BranchingRatios.h" + +using namespace lhef; + +class LHEProducer : public edm::one::EDFilter { + public: + explicit LHEProducer(const edm::ParameterSet ¶ms); + virtual ~LHEProducer(); + + protected: + virtual void beginJob() override; + virtual void endJob() override; + virtual void beginRun(edm::Run const& run, const edm::EventSetup &es) override; + virtual void endRun(edm::Run const&run, const edm::EventSetup &es) override; + virtual void endRunProduce(edm::Run &run, const edm::EventSetup &es) override; + virtual bool filter(edm::Event &event, const edm::EventSetup &es) override; + + private: + double matching(const HepMC::GenEvent *event, bool shower) const; + + bool showeredEvent(const boost::shared_ptr &event); + void onInit(); + void onBeforeHadronisation(); + + unsigned int eventsToPrint; + std::vector removeResonances; + std::auto_ptr hadronisation; + std::auto_ptr jetMatching; + + double extCrossSect; + double extFilterEff; + bool matchSummary; + + boost::shared_ptr partonLevel; + boost::shared_ptr runInfo; + unsigned int index; + bool matchingDone; + double weight; + BranchingRatios branchingRatios; +}; + +LHEProducer::LHEProducer(const edm::ParameterSet ¶ms) : + eventsToPrint(params.getUntrackedParameter("eventsToPrint", 0)), + extCrossSect(params.getUntrackedParameter("crossSection", -1.0)), + extFilterEff(params.getUntrackedParameter("filterEfficiency", -1.0)), + matchSummary(false) +{ + hadronisation = Hadronisation::create( + params.getParameter("hadronisation")); + + if (params.exists("removeResonances")) + removeResonances = + params.getParameter >( + "removeResonances"); + + std::set matchingCapabilities; + if (params.exists("jetMatching")) { + edm::ParameterSet jetParams = + params.getUntrackedParameter( + "jetMatching"); + jetMatching = JetMatching::create(jetParams); + + matchingCapabilities = jetMatching->capabilities(); + hadronisation->matchingCapabilities(matchingCapabilities); + } + + produces("unsmeared"); + produces(); + produces(); + + if (jetMatching.get()) { + if (params.getUntrackedParameter( + "preferShowerVetoCallback", true)) + hadronisation->onShoweredEvent().connect( + sigc::mem_fun(*this, + &LHEProducer::showeredEvent)); + hadronisation->onInit().connect( + sigc::mem_fun(*this, &LHEProducer::onInit)); + hadronisation->onBeforeHadronisation().connect( + sigc::mem_fun(*this, + &LHEProducer::onBeforeHadronisation)); + + matchSummary = matchingCapabilities.count("matchSummary"); + if (matchSummary) { + produces< std::vector >("matchDeltaR"); + produces< std::vector >("matchDeltaPRel"); + } + } + + // force total branching ratio for QCD/QED to 1 + for(int i = 0; i < 6; i++) + branchingRatios.set(i); + for(int i = 9; i < 23; i++) + branchingRatios.set(i); +} + +LHEProducer::~LHEProducer() +{ +} + +void LHEProducer::beginJob() +{ + hadronisation->init(); +} + +void LHEProducer::endJob() +{ + hadronisation.reset(); + jetMatching.reset(); +} + +void LHEProducer::beginRun(edm::Run const& run, const edm::EventSetup &es) +{ + edm::Handle product; + run.getByLabel("source", product); + + runInfo.reset(new LHERunInfo(*product)); + index = 0; +} +void LHEProducer::endRun(edm::Run const& run, const edm::EventSetup &es) +{ +} + +void LHEProducer::endRunProduce(edm::Run &run, const edm::EventSetup &es) +{ + hadronisation->statistics(); + + LHERunInfo::XSec crossSection; + if (runInfo) { + crossSection = runInfo->xsec(); + runInfo->statistics(); + } + + std::auto_ptr runInfo(new GenRunInfoProduct); + + runInfo->setInternalXSec( + GenRunInfoProduct::XSec(crossSection.value(), + crossSection.error())); + runInfo->setExternalXSecLO(extCrossSect); + runInfo->setFilterEfficiency(extFilterEff); + + run.put(runInfo); + + runInfo.reset(); +} + +bool LHEProducer::filter(edm::Event &event, const edm::EventSetup &es) +{ + edm::RandomEngineSentry randomEngineSentry(hadronisation.get(), event.streamID()); + + std::auto_ptr result(new edm::HepMCProduct); + + edm::Handle product; + event.getByLabel("source", product); + + partonLevel.reset(new LHEEvent(runInfo, *product)); + if (!removeResonances.empty()) + partonLevel->removeResonances(removeResonances); + + if (product->pdf()) + partonLevel->setPDF( + std::auto_ptr( + new LHEEvent::PDF(*product->pdf()))); + + hadronisation->setEvent(partonLevel); + + double br = branchingRatios.getFactor(hadronisation.get(), + partonLevel); + + matchingDone = false; + weight = 1.0; + std::auto_ptr hadronLevel(hadronisation->hadronize()); + + if (!hadronLevel.get()) { + if (matchingDone) { + if (weight == 0.0) + partonLevel->count(LHERunInfo::kSelected, br); + else + partonLevel->count(LHERunInfo::kKilled, + br, weight); + } else + partonLevel->count(LHERunInfo::kTried, br); + } + + if (!matchingDone && jetMatching.get() && hadronLevel.get()) + weight = matching(hadronLevel.get(), false); + + if (weight == 0.0) { + edm::LogInfo("Generator|LHEInterface") + << "Event got rejected by the " + "jet matching." << std::endl; + + if (hadronLevel.get()) { + partonLevel->count(LHERunInfo::kSelected); + hadronLevel.reset(); + } + } + + if (!hadronLevel.get()) { + event.put(result, "unsmeared"); + std::auto_ptr info( + new GenEventInfoProduct); + event.put(info); + return false; + } + + partonLevel->count(LHERunInfo::kAccepted, br, weight); + + hadronLevel->set_event_number(++index); + + if (eventsToPrint) { + eventsToPrint--; + hadronLevel->print(); + } + + std::auto_ptr info( + new GenEventInfoProduct(hadronLevel.get())); + result->addHepMCData(hadronLevel.release()); + event.put(result, "unsmeared"); + event.put(info); + + if (jetMatching.get() && matchSummary) { + std::auto_ptr< std::vector > matchDeltaR( + new std::vector); + std::auto_ptr< std::vector > matchDeltaPRel( + new std::vector); + + typedef std::vector Matches; + Matches matches = jetMatching->getMatchSummary(); + + for(Matches::const_iterator iter = matches.begin(); + iter != matches.end(); ++iter) { + if (!iter->isMatch()) + continue; + + matchDeltaR->push_back(iter->delta); + matchDeltaPRel->push_back(iter->jet.rho() / + iter->parton.rho() - 1.0); + } + + event.put(matchDeltaR, "matchDeltaR"); + event.put(matchDeltaPRel, "matchDeltaPRel"); + } + + return true; +} + +double LHEProducer::matching(const HepMC::GenEvent *event, bool shower) const +{ + if (!jetMatching.get()) + return 1.0; + + return jetMatching->match(partonLevel->asHepMCEvent().get(), + event, shower); +} + +bool LHEProducer::showeredEvent(const boost::shared_ptr &event) +{ + weight = matching(event.get(), true); + matchingDone = true; + return weight == 0.0; +} + +void LHEProducer::onInit() +{ + jetMatching->init(runInfo); +} + +void LHEProducer::onBeforeHadronisation() +{ + jetMatching->beforeHadronisation(partonLevel); +} + +DEFINE_FWK_MODULE(LHEProducer); + +DEFINE_LHE_JETMATCHING_PLUGIN(JetMatchingMLM); diff --git a/GeneratorInterface/LHEInterface/src/BranchingRatios.cc b/GeneratorInterface/LHEInterface/src/BranchingRatios.cc new file mode 100644 index 0000000000000..0544ed0ed9e49 --- /dev/null +++ b/GeneratorInterface/LHEInterface/src/BranchingRatios.cc @@ -0,0 +1,60 @@ +#include + +#include + +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include "GeneratorInterface/LHEInterface/interface/LHEEvent.h" +#include "GeneratorInterface/LHEInterface/interface/Hadronisation.h" +#include "GeneratorInterface/LHEInterface/interface/BranchingRatios.h" + +namespace lhef { + +void BranchingRatios::reset() +{ + cache.clear(); +} + +void BranchingRatios::set(int pdgId, bool both, double value) +{ + cache[pdgId] = value; + if (both) + cache[-pdgId] = value; +} + +double BranchingRatios::getFactor( + const Hadronisation *hadronisation, + const boost::shared_ptr &event) const +{ + double factor = 1.0; + const HEPEUP *hepeup = event->getHEPEUP(); + for(int i = 0; i < hepeup->NUP; i++) { + if (hepeup->ISTUP[i] == 1) + factor *= get(hepeup->IDUP[i], hadronisation); + } + return factor; +} + +double BranchingRatios::get(int pdgId, + const Hadronisation *hadronisation) const +{ + std::map::const_iterator pos = cache.find(pdgId); + if (pos == cache.end()) { + double val = hadronisation->totalBranchingRatio(pdgId); + if (val <= 0.0) + val = 1.0; + if (val < 0.99) + edm::LogInfo("Generator|LHEInterface") + << "Particle with pdgId " << pdgId + << " only partly decayed in hadronizer, " + "reducing respective event cross-section " + "contribution with a factor of " + << val << "." << std::endl; + + cache.insert(std::make_pair(pdgId, val)); + return val; + } else + return pos->second; +} + +} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/Hadronisation.cc b/GeneratorInterface/LHEInterface/src/Hadronisation.cc new file mode 100644 index 0000000000000..89e1ba017c70d --- /dev/null +++ b/GeneratorInterface/LHEInterface/src/Hadronisation.cc @@ -0,0 +1,155 @@ +#include +#include + +#include + +#include "HepMC/GenEvent.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/PluginManager/interface/PluginManager.h" +#include "FWCore/PluginManager/interface/PluginFactory.h" + +#include "GeneratorInterface/LHEInterface/interface/LHEEvent.h" +#include "GeneratorInterface/LHEInterface/interface/LHERunInfo.h" +#include "GeneratorInterface/LHEInterface/interface/Hadronisation.h" + +EDM_REGISTER_PLUGINFACTORY(lhef::Hadronisation::Factory, + "GeneratorInterfaceLHEHadronisation"); + +namespace { + class NoHadronisation : public lhef::Hadronisation { + public: + NoHadronisation(const edm::ParameterSet ¶ms) : + Hadronisation(params) {} + ~NoHadronisation() {} + + private: + void doInit() override {} + std::auto_ptr doHadronisation() override + { return getRawEvent()->asHepMCEvent(); } +}; + +} // anonymous namespae + +namespace lhef { + +Hadronisation::Hadronisation(const edm::ParameterSet ¶ms) : + psRequested(false), + psAsHepMC(true) +{ +} + +Hadronisation::~Hadronisation() +{ +} + +void Hadronisation::init() +{ + doInit(); +} + +bool Hadronisation::setEvent(const boost::shared_ptr &event) +{ + bool newRunInfo = !rawEvent || + (rawEvent->getRunInfo() != event->getRunInfo() && + *rawEvent->getRunInfo() != *event->getRunInfo()); + rawEvent = event; + if (newRunInfo) { + this->newRunInfo(event->getRunInfo()); + return true; + } else + return false; +} + +void Hadronisation::clear() +{ +} + +std::set Hadronisation::capabilities() const +{ + return std::set(); +} + +void Hadronisation::matchingCapabilities( + const std::set &capabilities) +{ + psRequested = false; + psAsHepMC = false; + for(std::set::const_iterator iter = capabilities.begin(); + iter != capabilities.end(); ++iter) { + if (*iter == "hepmc") + psAsHepMC = true; + else if (*iter == "psFinalState") + psRequested = true; + else if (*iter == "matchSummary") + /* nothing */; + else if (!this->capabilities().count(*iter)) + throw cms::Exception("Generator|LHEInterface") + << "JetMatching expected capability \"" + << *iter << "\", but hadronizer does not " + "support it." << std::endl; + } +} + +std::auto_ptr Hadronisation::create( + const edm::ParameterSet ¶ms) +{ + std::string name = params.getParameter("generator"); + + if (name == "None") + return std::auto_ptr( + new NoHadronisation(params)); + + std::auto_ptr plugin( + Factory::get()->create(name + "Hadronisation", params)); + + if (!plugin.get()) + throw cms::Exception("InvalidGenerator") + << "Unknown MC generator \"" << name << "\"" + " specified for hadronisation in LHEProducer." + << std::endl; + + edm::LogInfo("Generator|LHEInterface") + << "Using " << name << " to hadronize LHE input." << std::endl; + + return plugin; +} + +std::auto_ptr Hadronisation::hadronize() +{ + std::auto_ptr event = this->doHadronisation(); + if (!event.get()) + return event; + + const HepMC::GenVertex *signalVertex = event->signal_process_vertex(); + if (!signalVertex) { + signalVertex = LHEEvent::findSignalVertex(event.get()); + event->set_signal_process_vertex( + const_cast(signalVertex)); + } + + return event; +} + +void Hadronisation::newRunInfo(const boost::shared_ptr &runInfo) +{ +} + +bool Hadronisation::showeredEvent( + const boost::shared_ptr &event) +{ + if (event.get()) { + const HepMC::GenVertex *signalVertex = + event->signal_process_vertex(); + if (!signalVertex) { + signalVertex = LHEEvent::findSignalVertex(event.get(), false); + event->set_signal_process_vertex( + const_cast(signalVertex)); + } + } + + return sigShower.emit(event); +} + +} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/JetClustering.cc b/GeneratorInterface/LHEInterface/src/JetClustering.cc new file mode 100644 index 0000000000000..3cc2dc50a068e --- /dev/null +++ b/GeneratorInterface/LHEInterface/src/JetClustering.cc @@ -0,0 +1,199 @@ +#include +#include + +#include +#include +#include +#include + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/Exception.h" + +#include "GeneratorInterface/LHEInterface/interface/JetInput.h" +#include "GeneratorInterface/LHEInterface/interface/JetClustering.h" + +namespace lhef { + +class JetClustering::Algorithm { + public: + typedef JetClustering::Jet Jet; + typedef JetClustering::ParticleVector ParticleVector; + + Algorithm(const edm::ParameterSet ¶ms, double jetPtMin) : + jetPtMin(jetPtMin) {} + virtual ~Algorithm() {} + + virtual std::vector operator () ( + const ParticleVector &input) const = 0; + + double getJetPtMin() const { return jetPtMin; } + + private: + double jetPtMin; +}; + +namespace { + class FastJetAlgorithmWrapper : public JetClustering::Algorithm { + public: + FastJetAlgorithmWrapper(const edm::ParameterSet ¶ms, + double jetPtMin); + ~FastJetAlgorithmWrapper() {} + + protected: + std::vector operator () ( + const ParticleVector &input) const override; + + std::auto_ptr plugin; + std::auto_ptr jetDefinition; + }; + + class KtAlgorithm : public FastJetAlgorithmWrapper { + public: + KtAlgorithm(const edm::ParameterSet ¶ms, + double jetPtMin); + ~KtAlgorithm() {} + }; + + class SISConeAlgorithm : public FastJetAlgorithmWrapper { + public: + SISConeAlgorithm(const edm::ParameterSet ¶ms, + double jetPtMin); + ~SISConeAlgorithm() {} + + private: + static fastjet::SISConePlugin::SplitMergeScale + getScale(const std::string &name); + }; +} // anonymous namespace + +FastJetAlgorithmWrapper::FastJetAlgorithmWrapper( + const edm::ParameterSet ¶ms, double jetPtMin) : + JetClustering::Algorithm(params, jetPtMin) +{ +} + +std::vector FastJetAlgorithmWrapper::operator () ( + const ParticleVector &input) const +{ + if (input.empty()) + return std::vector(); + + std::vector jfInput; + jfInput.reserve(input.size()); + for(ParticleVector::const_iterator iter = input.begin(); + iter != input.end(); ++iter) { + jfInput.push_back(fastjet::PseudoJet( + (*iter)->momentum().px(), (*iter)->momentum().py(), + (*iter)->momentum().pz(), (*iter)->momentum().e())); + jfInput.back().set_user_index(iter - input.begin()); + } + + fastjet::ClusterSequence sequence(jfInput, *jetDefinition); + std::vector jets = + sequence.inclusive_jets(getJetPtMin()); + + std::vector result; + result.reserve(jets.size()); + ParticleVector constituents; + for(std::vector::const_iterator iter = jets.begin(); + iter != jets.end(); ++iter) { + std::vector fjConstituents = + sequence.constituents(*iter); + unsigned int size = fjConstituents.size(); + constituents.resize(size); + for(unsigned int i = 0; i < size; i++) + constituents[i] = + input[fjConstituents[i].user_index()]; + + result.push_back( + Jet(iter->px(), iter->py(), iter->pz(), iter->E(), + constituents)); + } + + return result; +} + +KtAlgorithm::KtAlgorithm(const edm::ParameterSet ¶ms, double jetPtMin) : + FastJetAlgorithmWrapper(params, jetPtMin) +{ + jetDefinition.reset(new fastjet::JetDefinition( + fastjet::kt_algorithm, + params.getParameter("ktRParam"), + fastjet::Best)); +} + +SISConeAlgorithm::SISConeAlgorithm( + const edm::ParameterSet ¶ms, double jetPtMin) : + FastJetAlgorithmWrapper(params, jetPtMin) +{ + std::string splitMergeScale = + params.getParameter("splitMergeScale"); + fastjet::SISConePlugin::SplitMergeScale scale; + + if (splitMergeScale == "pt") + scale = fastjet::SISConePlugin::SM_pt; + else if (splitMergeScale == "Et") + scale = fastjet::SISConePlugin::SM_Et; + else if (splitMergeScale == "mt") + scale = fastjet::SISConePlugin::SM_mt; + else if (splitMergeScale == "pttilde") + scale = fastjet::SISConePlugin::SM_pttilde; + else + throw cms::Exception("Configuration") + << "JetClustering SISCone scale '" << splitMergeScale + << "' unknown." << std::endl; + + plugin.reset(new fastjet::SISConePlugin( + params.getParameter("coneRadius"), + params.getParameter("coneOverlapThreshold"), + params.getParameter("maxPasses"), + params.getParameter("protojetPtMin"), + params.getParameter("caching"), + scale)); + jetDefinition.reset(new fastjet::JetDefinition(plugin.get())); +} + +JetClustering::JetClustering(const edm::ParameterSet ¶ms) +{ + double jetPtMin = params.getParameter("jetPtMin"); + init(params, jetPtMin); +} + +JetClustering::JetClustering(const edm::ParameterSet ¶ms, + double jetPtMin) +{ + init(params, jetPtMin); +} + +JetClustering::~JetClustering() +{ +} + +void JetClustering::init(const edm::ParameterSet ¶ms, double jetPtMin) +{ + edm::ParameterSet algoParams = + params.getParameter("algorithm"); + std::string algoName = algoParams.getParameter("name"); + + if (algoName == "KT") + jetAlgo.reset(new KtAlgorithm(algoParams, jetPtMin)); + else if (algoName == "SISCone") + jetAlgo.reset(new SISConeAlgorithm(algoParams, jetPtMin)); + else + throw cms::Exception("Configuration") + << "JetClustering algorithm \"" << algoName + << "\" unknown." << std::endl; +} + +double JetClustering::getJetPtMin() const +{ + return jetAlgo->getJetPtMin(); +} + +std::vector JetClustering::operator () ( + const ParticleVector &input) const +{ + return (*jetAlgo)(input); +} + +} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/JetInput.cc b/GeneratorInterface/LHEInterface/src/JetInput.cc new file mode 100644 index 0000000000000..3a9cf9df33a6e --- /dev/null +++ b/GeneratorInterface/LHEInterface/src/JetInput.cc @@ -0,0 +1,411 @@ +#include +#include + +#include "Math/GenVector/PxPyPzE4D.h" + +#include "HepMC/GenEvent.h" +#include "HepMC/GenParticle.h" +#include "HepMC/GenVertex.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/Exception.h" + +#include "GeneratorInterface/LHEInterface/interface/JetInput.h" + +namespace lhef { + +JetInput::JetInput() : + partonicFinalState(false), + onlyHardProcess(false), + excludeResonances(false), + tausAsJets(false), + ptMin(0.0) +{ +} + +JetInput::JetInput(const edm::ParameterSet ¶ms) : + partonicFinalState(params.getParameter("partonicFinalState")), + onlyHardProcess(params.getParameter("onlyHardProcess")), + excludeResonances(false), + tausAsJets(params.getParameter("tausAsJets")), + ptMin(0.0) +{ + if (params.exists("ignoreParticleIDs")) + setIgnoredParticles( + params.getParameter >( + "ignoreParticleIDs")); + if (params.exists("excludedResonances")) + setExcludedResonances( + params.getParameter >( + "excludedResonances")); + if (params.exists("excludedFromResonances")) + setExcludedFromResonances( + params.getParameter >( + "excludedFromResonances")); +} + +JetInput::~JetInput() +{ +} + +void JetInput::setIgnoredParticles( + const std::vector &particleIDs) +{ + ignoreParticleIDs = particleIDs; + std::sort(ignoreParticleIDs.begin(), ignoreParticleIDs.end()); +} + +void JetInput::setExcludedResonances( + const std::vector &particleIDs) +{ + setExcludeResonances(true); + excludedResonances = particleIDs; + std::sort(excludedResonances.begin(), excludedResonances.end()); +} + +void JetInput::setExcludedFromResonances( + const std::vector &particleIDs) +{ + excludedFromResonances = particleIDs; + std::sort(excludedFromResonances.begin(), excludedFromResonances.end()); +} + +bool JetInput::isParton(int pdgId) const +{ + pdgId = (pdgId > 0 ? pdgId : -pdgId) % 10000; + return (pdgId > 0 && pdgId < 6) || pdgId == 7 || + pdgId == 9 || (tausAsJets && pdgId == 15) || pdgId == 21; + // tops are not considered "regular" partons + // but taus eventually are (since they may hadronize later) +} + +bool JetInput::isHadron(int pdgId) +{ + pdgId = (pdgId > 0 ? pdgId : -pdgId) % 10000; + return (pdgId > 100 && pdgId < 900) || + (pdgId > 1000 && pdgId < 9000); +} + +static inline bool isContained(const std::vector &list, int id) +{ + unsigned int absId = (unsigned int)(id > 0 ? id : -id); + std::vector::const_iterator pos = + std::lower_bound(list.begin(), list.end(), absId); + return pos != list.end() && *pos == absId; +} + +bool JetInput::isResonance(int pdgId) const +{ + if (excludedResonances.empty()) { + // gauge bosons and tops + pdgId = (pdgId > 0 ? pdgId : -pdgId) % 10000; + return (pdgId > 21 && pdgId <= 39) || pdgId == 6 || pdgId == 8; + } + + return isContained(excludedResonances, pdgId); +} + +bool JetInput::isIgnored(int pdgId) const +{ + return isContained(ignoreParticleIDs, pdgId); +} + +bool JetInput::isExcludedFromResonances(int pdgId) const +{ + if (excludedFromResonances.empty()) + return true; + + return isContained(excludedFromResonances, pdgId); +} + +bool JetInput::isHardProcess(const HepMC::GenVertex *vertex, + const VertexVector &hardProcess) const +{ + std::vector::const_iterator pos = + std::lower_bound(hardProcess.begin(), + hardProcess.end(), vertex); + return pos != hardProcess.end() && *pos == vertex; +} + +static unsigned int partIdx(const JetInput::ParticleVector &p, + const HepMC::GenParticle *particle) +{ + JetInput::ParticleVector::const_iterator pos = + std::lower_bound(p.begin(), p.end(), particle); + if (pos == p.end() || *pos != particle) + throw cms::Exception("CorruptedData") + << "HepMC::GenEvent corrupted: Unlisted particles" + " in decay tree." << std::endl; + + return pos - p.begin(); +} + +static void invalidateTree(JetInput::ParticleBitmap &invalid, + const JetInput::ParticleVector &p, + const HepMC::GenVertex *v) +{ + if (!v) + return; + + for(HepMC::GenVertex::particles_out_const_iterator iter = + v->particles_out_const_begin(); + iter != v->particles_out_const_end(); ++iter) { + unsigned int idx = partIdx(p, *iter); + + if (invalid[idx]) + continue; + + invalid[idx] = true; + + const HepMC::GenVertex *v = (*iter)->end_vertex(); + invalidateTree(invalid, p, v); + } +} + +int JetInput::testPartonChildren(JetInput::ParticleBitmap &invalid, + const JetInput::ParticleVector &p, + const HepMC::GenVertex *v) const +{ + if (!v) + return 0; + + for(HepMC::GenVertex::particles_out_const_iterator iter = + v->particles_out_const_begin(); + iter != v->particles_out_const_end(); ++iter) { + unsigned int idx = partIdx(p, *iter); + + if (invalid[idx]) + continue; + + if (isParton((*iter)->pdg_id())) + return 1; + if (isHadron((*iter)->pdg_id())) + return -1; + + const HepMC::GenVertex *v = (*iter)->end_vertex(); + int result = testPartonChildren(invalid, p, v); + if (result) + return result; + } + + return 0; +} + +bool JetInput::hasPartonChildren(ParticleBitmap &invalid, + const ParticleVector &p, + const HepMC::GenParticle *particle) const +{ + return testPartonChildren(invalid, p, particle->end_vertex()) > 0; +} + +bool JetInput::fromHardProcess(ParticleBitmap &invalid, + const ParticleVector &p, + const HepMC::GenParticle *particle, + const VertexVector &hardProcess) const +{ + unsigned int idx = partIdx(p, particle); + + if (invalid[idx]) + return false; + + const HepMC::GenVertex *v = particle->production_vertex(); + if (!v) + return false; + else if (isHardProcess(v, hardProcess)) + return true; + + for(HepMC::GenVertex::particles_in_const_iterator iter = + v->particles_in_const_begin(); + iter != v->particles_in_const_end(); ++iter) + if (fromHardProcess(invalid, p, *iter, hardProcess)) + return true; + + return false; +} + +bool JetInput::fromSignalVertex(ParticleBitmap &invalid, + const ParticleVector &p, + const HepMC::GenParticle *particle, + const HepMC::GenVertex *signalVertex) const +{ + unsigned int idx = partIdx(p, particle); + + if (invalid[idx]) + return false; + + const HepMC::GenVertex *v = particle->production_vertex(); + if (!v) + return false; + else if (v == signalVertex) + return true; + + for(HepMC::GenVertex::particles_in_const_iterator iter = + v->particles_in_const_begin(); + iter != v->particles_in_const_end(); ++iter) + if (fromSignalVertex(invalid, p, *iter, signalVertex)) + return true; + + return false; +} + +JetInput::ResonanceState +JetInput::fromResonance(ParticleBitmap &invalid, + const ParticleVector &p, + const HepMC::GenParticle *particle, + const HepMC::GenVertex *signalVertex, + const VertexVector &hardProcess) const +{ + unsigned int idx = partIdx(p, particle); + int id = particle->pdg_id(); + + if (invalid[idx]) + return kIndirect; + + if (particle->status() == 3 && isResonance(id)) + return kDirect; + + if (!isIgnored(id) && excludedFromResonances.empty() && isParton(id)) + return kNo; + + const HepMC::GenVertex *v = particle->production_vertex(); + if (!v) + return kNo; + else if (v == signalVertex && excludedResonances.empty()) + return kIndirect; + else if (v == signalVertex || isHardProcess(v, hardProcess)) + return kNo; + + for(HepMC::GenVertex::particles_in_const_iterator iter = + v->particles_in_const_begin(); + iter != v->particles_in_const_end(); ++iter) { + ResonanceState result = + fromResonance(invalid, p, *iter, + signalVertex, hardProcess); + switch(result) { + case kNo: + break; + case kDirect: + if ((*iter)->pdg_id() == id) + return kDirect; + if (!isExcludedFromResonances(id)) + break; + case kIndirect: + return kIndirect; + } + } + + return kNo; +} + +JetInput::ParticleVector JetInput::operator () ( + const HepMC::GenEvent *event) const +{ + if (!event->signal_process_vertex()) + throw cms::Exception("InvalidHepMCEvent") + << "HepMC event is lacking signal vertex." + << std::endl; + + VertexVector hardProcess, toLookAt; + std::pair beamParticles = + event->beam_particles(); + toLookAt.push_back(event->signal_process_vertex()); + while(!toLookAt.empty()) { + std::vector next; + for(std::vector::const_iterator v = + toLookAt.begin(); v != toLookAt.end(); ++v) { + if (!*v || isHardProcess(*v, hardProcess)) + continue; + + bool veto = false; + for(HepMC::GenVertex::particles_in_const_iterator iter = + (*v)->particles_in_const_begin(); + iter != (*v)->particles_in_const_end(); ++iter) { + if (*iter == beamParticles.first || + *iter == beamParticles.second) { + veto = true; + break; + } + } + if (veto) + continue; + + hardProcess.push_back(*v); + std::sort(hardProcess.begin(), hardProcess.end()); + + for(HepMC::GenVertex::particles_in_const_iterator iter = + (*v)->particles_in_const_begin(); + iter != (*v)->particles_in_const_end(); ++iter) { + const HepMC::GenVertex *pv = + (*iter)->production_vertex(); + if (pv) + next.push_back(pv); + } + } + + toLookAt = next; + std::sort(toLookAt.begin(), toLookAt.end()); + } + + ParticleVector particles; + for(HepMC::GenEvent::particle_const_iterator iter = event->particles_begin(); + iter != event->particles_end(); ++iter) + particles.push_back(*iter); + + std::sort(particles.begin(), particles.end()); + unsigned int size = particles.size(); + + ParticleBitmap selected(size, false); + ParticleBitmap invalid(size, false); + + for(unsigned int i = 0; i < size; i++) { + const HepMC::GenParticle *particle = particles[i]; + if (invalid[i]) + continue; + if (particle->status() == 1) + selected[i] = true; + + if (partonicFinalState && isParton(particle->pdg_id())) { + if (!particle->end_vertex() && + particle->status() != 1) + // some brokenness in event... + invalid[i] = true; + else if (!hasPartonChildren(invalid, particles, + particle)) { + selected[i] = true; + invalidateTree(invalid, particles, + particle->end_vertex()); + } + } + + if (onlyHardProcess && + !fromHardProcess(invalid, particles, + particle, hardProcess) && + !isHardProcess(particle->end_vertex(), hardProcess)) + invalid[i] = true; + } + + ParticleVector result; + for(unsigned int i = 0; i < size; i++) { + const HepMC::GenParticle *particle = particles[i]; + if (!selected[i] || invalid[i]) + continue; + + if (excludeResonances && + fromResonance(invalid, particles, particle, + event->signal_process_vertex(), + hardProcess)) { + invalid[i] = true; + continue; + } + + if (isIgnored(particle->pdg_id())) + continue; + + if (particle->momentum().perp() >= ptMin) + result.push_back(particle); + } + + return result; +} + +} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/JetMatching.cc b/GeneratorInterface/LHEInterface/src/JetMatching.cc new file mode 100644 index 0000000000000..1f39eb7dad11b --- /dev/null +++ b/GeneratorInterface/LHEInterface/src/JetMatching.cc @@ -0,0 +1,66 @@ +#include +#include + +#include + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/PluginManager/interface/PluginManager.h" +#include "FWCore/PluginManager/interface/PluginFactory.h" + +#include "GeneratorInterface/LHEInterface/interface/LHERunInfo.h" +#include "GeneratorInterface/LHEInterface/interface/LHEEvent.h" + +#include "GeneratorInterface/LHEInterface/interface/JetMatching.h" + +EDM_REGISTER_PLUGINFACTORY(lhef::JetMatching::Factory, + "GeneratorInterfaceLHEJetMatching"); + +namespace lhef { + +JetMatching::JetMatching(const edm::ParameterSet ¶ms) +{ +} + +JetMatching::~JetMatching() +{ +} + +void JetMatching::init(const boost::shared_ptr &runInfo) +{ +} + +void JetMatching::beforeHadronisation( + const boost::shared_ptr &event) +{ +} + +std::set JetMatching::capabilities() const +{ + std::set result; + result.insert("psFinalState"); + result.insert("hepmc"); + return result; +} + +std::auto_ptr JetMatching::create( + const edm::ParameterSet ¶ms) +{ + std::string name = params.getParameter("scheme"); + + std::auto_ptr plugin( + Factory::get()->create("JetMatching" + name, params)); + + if (!plugin.get()) + throw cms::Exception("InvalidJetMatching") + << "Unknown scheme \"" << name << "\"" + " specified for jet matching in LHEProducer." + << std::endl; + + edm::LogInfo("Generator|LHEInterface") + << "Using " << name << " for ME/PS jet matching." << std::endl; + + return plugin; +} + +} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/JetMatchingMLM.cc b/GeneratorInterface/LHEInterface/src/JetMatchingMLM.cc new file mode 100644 index 0000000000000..628e56141793a --- /dev/null +++ b/GeneratorInterface/LHEInterface/src/JetMatchingMLM.cc @@ -0,0 +1,234 @@ +#include +#include +#include +#include +#include +#include + +#include + +#include "Math/GenVector/Cartesian3D.h" +#include "Math/GenVector/VectorUtil.h" + +#include "HepMC/GenEvent.h" +#include "HepMC/SimpleVector.h" + +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/Exception.h" + +#include "GeneratorInterface/LHEInterface/interface/JetInput.h" +#include "GeneratorInterface/LHEInterface/interface/JetClustering.h" +#include "GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h" + +#include "Matching.h" + +// #define DEBUG + +namespace lhef { + +namespace { + template + struct DeltaRSeparation : public std::binary_function { + double operator () (const T1 &v1_, const T2 &v2_) const + { + using namespace ROOT::Math; + Cartesian3D v1(v1_.px(), v1_.py(), v1_.pz()); + Cartesian3D v2(v2_.px(), v2_.py(), v2_.pz()); + return VectorUtil::DeltaR(v1, v2); + } + }; + + // stupid pointer indirection... ugly specialization + template + struct DeltaRSeparation { + double operator () (const HepMC::GenParticle *v1_, + const T2 &v2_) const + { + using namespace ROOT::Math; + Cartesian3D v1(v1_->momentum().px(), + v1_->momentum().py(), + v1_->momentum().pz()); + Cartesian3D v2(v2_.px(), v2_.py(), v2_.pz()); + return VectorUtil::DeltaR(v1, v2); + } + }; + + struct ParticlePtGreater { + double operator () (const HepMC::GenParticle *v1, + const HepMC::GenParticle *v2) + { return v1->momentum().perp() > v2->momentum().perp(); } + }; + + inline HepMC::FourVector convert(const JetClustering::Jet &jet) + { return HepMC::FourVector(jet.px(), jet.py(), jet.pz(), jet.e()); } +} // anonymous namespace + +JetMatchingMLM::JetMatchingMLM(const edm::ParameterSet ¶ms) : + JetMatching(params), + maxDeltaR(params.getParameter("maxDeltaR")), + minJetPt(params.getParameter("jetPtMin")), + maxEta(params.getParameter("maxEta")), + matchPtFraction(0.75), + useEt(params.getParameter("useEt")), + partonInput(new JetInput(params)), + jetInput(new JetInput(*partonInput)) +{ + partonInput->setPartonicFinalState(false); + partonInput->setHardProcessOnly(false); + + if (params.exists("matchPtFraction")) + matchPtFraction = + params.getParameter("matchPtFraction"); + + jetClustering.reset( + new JetClustering(params, minJetPt * matchPtFraction)); + + std::string matchMode = params.getParameter("matchMode"); + if (matchMode == "inclusive") + this->matchMode = kInclusive; + else if (matchMode == "exclusive") + this->matchMode = kExclusive; + else + throw cms::Exception("Configuration") + << "Invalid matching mode '" << matchMode + << "' specified." << std::endl; +} + +JetMatchingMLM::~JetMatchingMLM() +{ +} + +std::set JetMatchingMLM::capabilities() const +{ + std::set result = JetMatching::capabilities(); + result.insert("matchSummary"); + return result; +} + +// implements the MLM method - simply reject or accept +// use polymorphic JetMatching subclasses when modularizing + +double JetMatchingMLM::match(const HepMC::GenEvent *partonLevel, + const HepMC::GenEvent *finalState, + bool showeredFinalState) +{ + JetInput::ParticleVector partons = (*partonInput)(partonLevel); + std::sort(partons.begin(), partons.end(), ParticlePtGreater()); + + JetInput::ParticleVector jetInput = + showeredFinalState ? (*partonInput)(finalState) + : (*this->jetInput)(finalState); + std::sort(jetInput.begin(), jetInput.end(), ParticlePtGreater()); + + std::vector jets = (*jetClustering)(jetInput); + +#ifdef DEBUG + std::cout << "===== Partons:" << std::endl; + for(JetClustering::ParticleVector::const_iterator c = partons.begin(); + c != partons.end(); c++) + std::cout << "\tpid = " << (*c)->pdg_id() + << ", pt = " << (*c)->momentum().perp() + << ", eta = " << (*c)->momentum().eta() + << ", phi = " << (*c)->momentum().phi() + << std::endl; + std::cout << "===== JetInput:" << std::endl; + for(JetClustering::ParticleVector::const_iterator c = jetInput.begin(); + c != jetInput.end(); c++) + std::cout << "\tpid = " << (*c)->pdg_id() + << ", pt = " << (*c)->momentum().perp() + << ", eta = " << (*c)->momentum().eta() + << ", phi = " << (*c)->momentum().phi() + << std::endl; + std::cout << "----- " << jets.size() << " jets:" << std::endl; + for(std::vector::const_iterator iter = jets.begin(); + iter != jets.end(); ++iter) { + std::cout << "* pt = " << iter->pt() + << ", eta = " << iter->eta() + << ", phi = " << iter->phi() + << std::endl; + for(JetClustering::ParticleVector::const_iterator c = iter->constituents().begin(); + c != iter->constituents().end(); c++) + std::cout << "\tpid = " << (*c)->pdg_id() + << ", pt = " << (*c)->momentum().perp() + << ", eta = " << (*c)->momentum().eta() + << ", phi = " << (*c)->momentum().phi() + << std::endl; + } + + using boost::bind; + std::cout << partons.size() << " partons and " + << std::count_if(jets.begin(), jets.end(), + bind(std::greater(), + bind(&JetClustering::Jet::pt, _1), + minJetPt)) << " jets." << std::endl; +#endif + + Matching matching(partons, jets, + DeltaRSeparation()); + + typedef Matching::Match Match; + std::vector matches = + matching.match( + std::less(), + std::bind2nd(std::less(), maxDeltaR)); + +#ifdef DEBUG + for(std::vector::const_iterator iter = matches.begin(); + iter != matches.end(); ++iter) + std::cout << "\tParton " << iter->index1 << " matches jet " + << iter->index2 << " with a Delta_R of " + << matching.delta(*iter) << std::endl; +#endif + + unsigned int unmatchedPartons = 0; + unsigned int unmatchedJets = 0; + + matchSummary.clear(); + for(std::vector::const_iterator iter = matches.begin(); + iter != matches.end(); ++iter) { + if ((useEt ? jets[iter->index2].et() + : jets[iter->index2].pt()) < minJetPt || + std::abs(jets[iter->index2].eta()) > maxEta) + unmatchedPartons++; + matchSummary.push_back( + JetPartonMatch(partons[iter->index1]->momentum(), + convert(jets[iter->index2]), + matching.delta(*iter), + partons[iter->index1]->pdg_id())); + } + + for(Matching::index_type i = 0; i < partons.size(); i++) { + if (!matching.isMatched1st(i)) { + unmatchedPartons++; + matchSummary.push_back( + JetPartonMatch(partons[i]->momentum(), + partons[i]->pdg_id())); + } + } + + for(Matching::index_type i = 0; i < jets.size(); i++) { + if (!matching.isMatched2nd(i)) { + if ((useEt ? jets[i].et() + : jets[i].pt()) >= minJetPt && + std::abs(jets[i].eta()) <= maxEta) + unmatchedJets++; + matchSummary.push_back( + JetPartonMatch(convert(jets[i]))); + } + } + + switch(matchMode) { + case kExclusive: + if (!unmatchedJets && !unmatchedPartons) + return 1.0; + break; + case kInclusive: + if (!unmatchedPartons) + return 1.0; + } + + return 0.0; +} + +} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/Matching.h b/GeneratorInterface/LHEInterface/src/Matching.h new file mode 100644 index 0000000000000..6438330257a67 --- /dev/null +++ b/GeneratorInterface/LHEInterface/src/Matching.h @@ -0,0 +1,121 @@ +#ifndef GeneratorInterface_LHEInterface_Matching_h +#define GeneratorInterface_LHEInterface_Matching_h + +#include +#include +#include +#include + +#include "SimpleMatrix.h" + +namespace lhef { + +template +class Matching { + public: + typedef typename SimpleMatrix::size_type index_type; + + template + Matching(const V1 &v1, const V2 &v2, Separation separation) : + matrix(v1.size(), v2.size()), + matched1(v1.size(), false), + matched2(v2.size(), false) + { + index_type i = 0; + for(typename V1::const_iterator iter1 = v1.begin(); + iter1 != v1.end(); ++iter1, i++) { + index_type j = 0; + for(typename V2::const_iterator iter2 = v2.begin(); + iter2 != v2.end(); ++iter2, j++) + matrix(i, j) = separation(*iter1, *iter2); + + } + } + + struct Match { + typedef typename Matching::index_type index_type; + + inline Match(index_type i1, index_type i2) : + index1(i1), index2(i2) {} + + index_type index1, index2; + }; + + inline Delta delta(index_type index1, index_type index2) const + { return matrix(index1, index2); } + + inline Delta delta(Match match) const + { return matrix(match.index1, match.index2); } + + private: + template + struct Comparator : public std::binary_function { + typedef typename Matching::index_type index_type; + + inline Comparator(const SimpleMatrix &matrix, + SortComparator &sort) : + matrix(matrix), sort(sort) {} + + inline bool operator () (index_type i1, index_type i2) const + { return sort(matrix[i1], matrix[i2]); } + + const SimpleMatrix &matrix; + SortComparator &sort; + }; + + struct AlwaysTrue : public std::unary_function { + inline bool operator () (Delta dummy) { return true; } + }; + + public: + template + std::vector match( + SortComparator sortComparator = SortComparator(), + CutCriterion cutCriterion = CutCriterion()) + { + std::vector matches(matrix.size()); + for(index_type i = 0; i != matrix.size(); i++) + matches[i] = i; + + std::sort(matches.begin(), matches.end(), + Comparator(matrix, sortComparator)); + + std::vector result; + result.reserve(std::min(matrix.rows(), matrix.cols())); + for(typename std::vector::const_iterator iter = + matches.begin(); iter != matches.end(); ++iter) { + + index_type row = matrix.row(*iter); + index_type col = matrix.col(*iter); + if (matched1[row] || matched2[col]) + continue; + + if (!cutCriterion(matrix[*iter])) + continue; + + matched1[row] = true; + matched2[col] = true; + result.push_back(Match(row, col)); + } + + return result; + } + + template + inline std::vector match() + { return match(); } + + inline std::vector match() + { return match, AlwaysTrue>(); } + + inline bool isMatched1st(index_type index) { return matched1[index]; } + inline bool isMatched2nd(index_type index) { return matched2[index]; } + + private: + SimpleMatrix matrix; + std::vector matched1, matched2; +}; + +} // namespace lhef + +#endif // GeneratorEvent_LHEInterface_Matching_h diff --git a/GeneratorInterface/LHEInterface/src/SimpleMatrix.h b/GeneratorInterface/LHEInterface/src/SimpleMatrix.h new file mode 100644 index 0000000000000..2ebec9403c462 --- /dev/null +++ b/GeneratorInterface/LHEInterface/src/SimpleMatrix.h @@ -0,0 +1,47 @@ +#ifndef GeneratorInterface_LHEInterface_SimpleMatrix_h +#define GeneratorInterface_LHEInterface_SimpleMatrix_h + +#include + +namespace lhef { + +template +class SimpleMatrix { + public: + typedef T value_type; + typedef typename std::vector::size_type size_type; + + SimpleMatrix(size_type rows, size_type cols) : + width(cols), height(rows), container(rows * cols) {} + + ~SimpleMatrix() {} + + inline size_type rows() const { return height; } + inline size_type cols() const { return width; } + inline size_type size() const { return container.size(); } + + inline double &operator () (size_type row, size_type col) + { return container[index(row, col)]; } + inline double operator () (size_type row, size_type col) const + { return container[index(row, col)]; } + + inline double &operator [] (size_type index) + { return container[index]; } + inline double operator [] (size_type index) const + { return container[index]; } + + inline size_type row(size_type index) const { return index / width; } + inline size_type col(size_type index) const { return index % width; } + + protected: + size_type index(size_type row, size_type col) const + { return row * width + col; } + + private: + size_type width, height; + std::vector container; +}; + +} // namespace lhef + +#endif // GeneratorEvent_LHEInterface_SimpleMatrix_h diff --git a/GeneratorInterface/LHEInterface/test/analyze_cfg.py b/GeneratorInterface/LHEInterface/test/analyze_cfg.py new file mode 100755 index 0000000000000..43136942c23fe --- /dev/null +++ b/GeneratorInterface/LHEInterface/test/analyze_cfg.py @@ -0,0 +1,54 @@ +#!/usr/bin/env cmsRun +import FWCore.ParameterSet.Config as cms + +process = cms.Process("MatchingAnalysis") + +process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1)) + +process.load("FWCore.MessageService.MessageLogger_cfi") +process.MessageLogger.cerr.threshold = 'INFO' + +process.source = cms.Source("PoolSource", + fileNames = cms.untracked.vstring('file:test.root'), + skipEvents = cms.untracked.uint32(0) +) + +process.TFileService = cms.Service("TFileService", + fileName = cms.string('lheAnalysis.root') +) + +process.lheAnalyzer = cms.EDAnalyzer("LHEAnalyzer", + src = cms.InputTag('VtxSmeared'), + + jetInput = cms.PSet( + partonicFinalState = cms.bool(True), + excludedResonances = cms.vuint32(6), + excludedFromResonances = cms.vuint32(1, 2, 3, 4, 5, 21, 24), + onlyHardProcess = cms.bool(True), + tausAsJets = cms.bool(False), + ), + + jetClustering = cms.PSet( + name = cms.string('SISCone'), + coneOverlapThreshold = cms.double(0.75), + splitMergeScale = cms.string('pttilde'), + maxPasses = cms.int32(0), + protojetPtMin = cms.double(0.0), + caching = cms.bool(False) + ), + + defaultDeltaCut = cms.double(0.7), + defaultPtCut = cms.double(70.0), + maxEta = cms.double(5.0), + useEt = cms.bool(True), + binsDelta = cms.uint32(50), + minDelta = cms.double(0.2), + maxDelta = cms.double(1.2), + binsPt = cms.uint32(100), + minPt = cms.double(10.0), + maxPt = cms.double(1000.0), + minDJR = cms.uint32(0), + maxDJR = cms.uint32(5), +) + +process.p = cms.Path(process.lheAnalyzer) diff --git a/GeneratorInterface/LHEInterface/test/plotMatchingAnalysis.C b/GeneratorInterface/LHEInterface/test/plotMatchingAnalysis.C new file mode 100644 index 0000000000000..d8362e2d4cf75 --- /dev/null +++ b/GeneratorInterface/LHEInterface/test/plotMatchingAnalysis.C @@ -0,0 +1,87 @@ +static const char *names[] = { + "pt0", + "pt1", + "pt2", + "pt3", + "pt4", + "delta1", + "delta2", + "delta3", + "delta4" +}; + +static const char *xtitles[] = { + "log_{10}(E_{T} [GeV/c^{2}])", + "log_{10}(E_{T} [GeV/c^{2}])", + "log_{10}(E_{T} [GeV/c^{2}])", + "log_{10}(E_{T} [GeV/c^{2}])", + "log_{10}(E_{T} [GeV/c^{2}])", + "#DeltaR", + "#DeltaR", + "#DeltaR", + "#DeltaR" +}; +static int n = 9; + +void plotMatchingAnalysis() +{ + TFile *f0 = TFile::Open("ana_tt0j.root"); + TFile *f1 = TFile::Open("ana_tt1j.root"); + TFile *f2 = TFile::Open("ana_tt2j.root"); + TFile *f3 = TFile::Open("ana_tt3j.root"); + TFile *f4 = TFile::Open("ana_tt4j.root"); + + for(int i = 0; i < n; i++) { + TH1 *h0 = (TH1*)f0->Get(TString("lheAnalyzer/") + names[i]); + TH1 *h1 = (TH1*)f1->Get(TString("lheAnalyzer/") + names[i]); + TH1 *h2 = (TH1*)f2->Get(TString("lheAnalyzer/") + names[i]); + TH1 *h3 = (TH1*)f3->Get(TString("lheAnalyzer/") + names[i]); + TH1 *h4 = (TH1*)f4->Get(TString("lheAnalyzer/") + names[i]); + + h0->Sumw2(); + h1->Sumw2(); + h2->Sumw2(); + h3->Sumw2(); + h4->Sumw2(); + + // FIXME: add weights here (xsec / #events) + h0->Scale(3.1821e-07/165633); + h1->Scale(8.98764e-08/55910); + h2->Scale(1.72561e-08/7800); + h3->Scale(2.71928e-09/11747); + h4->Scale(7.20582e-10/11774); + + TH1 *sum = h0->Clone(TString("sum_") + names[i]); + sum->Add(h1); + sum->Add(h2); + sum->Add(h3); + sum->Add(h4); + + sum->SetMarkerColor(kBlack); + sum->SetLineColor(kBlack); + h0->SetMarkerColor(kRed); + h0->SetLineColor(kRed); + h1->SetMarkerColor(kBlue); + h1->SetLineColor(kBlue); + h2->SetMarkerColor(kGreen); + h2->SetLineColor(kGreen); + h3->SetMarkerColor(kCyan); + h3->SetLineColor(kCyan); + h4->SetMarkerColor(kMagenta); + h4->SetLineColor(kMagenta); + + TCanvas *c = new TCanvas(TString("c_") + names[i]); + c->SetLogy(); + + sum->SetXTitle(xtitles[i]); + sum->SetStats(0); + sum->Draw(); + h0->Draw("same"); + h1->Draw("same"); + h2->Draw("same"); + h3->Draw("same"); + h4->Draw("same"); + + c->Print(TString(names[i]) + ".png"); + } +} From f583a5c948b8b9c7ed2e2088c87cc3db2183ebcf Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Fri, 29 Jan 2016 08:29:14 -0600 Subject: [PATCH 183/250] Address review comments from Chris. --- Utilities/XrdAdaptor/src/QualityMetric.cc | 12 ++++++------ Utilities/XrdAdaptor/src/QualityMetric.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Utilities/XrdAdaptor/src/QualityMetric.cc b/Utilities/XrdAdaptor/src/QualityMetric.cc index 07554eccf055d..c31dbf02f389c 100644 --- a/Utilities/XrdAdaptor/src/QualityMetric.cc +++ b/Utilities/XrdAdaptor/src/QualityMetric.cc @@ -153,23 +153,23 @@ QualityMetric::get() } -[[cms::thread_safe]] std::unique_ptr QualityMetricFactory::m_instance = std::make_unique(); +[[cms::thread_safe]] QualityMetricFactory QualityMetricFactory::m_instance; std::unique_ptr QualityMetricFactory::get(timespec now, const std::string &id) { - auto itFound = m_instance->m_sources.find(id); - if (itFound == m_instance->m_sources.end()) + auto itFound = m_instance.m_sources.find(id); + if (itFound == m_instance.m_sources.end()) { // try to make a new one std::unique_ptr source(new QualityMetricUniqueSource(now)); - auto insertResult = m_instance->m_sources.insert(std::make_pair(id, source.get())); + auto insertResult = m_instance.m_sources.insert(std::make_pair(id, source.get())); itFound = insertResult.first; if (insertResult.second) - { // We raced with a different thread for insertion (and the other thread won). + { // Insert was successful; release our reference. source.release(); - } + } // Otherwise, we raced with a different thread and they won; we will delete our new QM source. } return itFound->second->newSource(now); } diff --git a/Utilities/XrdAdaptor/src/QualityMetric.h b/Utilities/XrdAdaptor/src/QualityMetric.h index f280bd8fb85e8..5058bbb467c01 100644 --- a/Utilities/XrdAdaptor/src/QualityMetric.h +++ b/Utilities/XrdAdaptor/src/QualityMetric.h @@ -64,7 +64,7 @@ friend class Source; static std::unique_ptr get(timespec now, const std::string &id); - [[cms::thread_safe]] static std::unique_ptr m_instance; + [[cms::thread_safe]] static QualityMetricFactory m_instance; typedef tbb::concurrent_unordered_map MetricMap; MetricMap m_sources; From def3b4afcb5cf81bc4ed9040d86ec1163646b056 Mon Sep 17 00:00:00 2001 From: Giacomo Govi Date: Thu, 7 Jan 2016 11:03:43 +0100 Subject: [PATCH 184/250] Removed CondCore/DBCommon dependencies --- Alignment/CocoaApplication/BuildFile.xml | 3 - .../CocoaApplication/src/CocoaAnalyzer.cc | 1 - Alignment/CocoaFit/BuildFile.xml | 1 - Alignment/CocoaFit/src/CocoaDBMgr.cc | 1 - .../interface/AlignmentAlgorithmBase.h | 2 +- Alignment/MuonAlignment/BuildFile.xml | 1 - .../CaloMiscalibTools/BuildFile.xml | 1 - .../interface/EcnaAnalyzer.h | 2 +- CalibCalorimetry/EcalTPGTools/BuildFile.xml | 1 - .../EcalTPGTools/plugins/EcalTPGDBCopy.h | 2 +- CalibMuon/CSCCalibration/test/BuildFile.xml | 1 - .../SiPixelConnectivity/BuildFile.xml | 3 - CalibTracker/SiStripDCS/BuildFile.xml | 1 - .../SiStripDCS/interface/SiStripCoralIface.h | 13 +- .../interface/SiStripDetVOffHandler.h | 2 - CalibTracker/SiStripDCS/plugins/BuildFile.xml | 1 - .../SiStripDCS/src/SiStripCoralIface.cc | 20 +- .../SiStripESProducers/plugins/BuildFile.xml | 1 - .../plugins/DBWriter/DummyCondDBWriter.h | 1 - .../plugins/DBWriter/DummyCondObjPrinter.h | 1 - .../DBWriter/SiStripFedCablingManipulator.h | 1 - .../fake/SiStripApvGainBuilderFromTag.h | 1 - ...SiStripNoiseNormalizedWithApvGainBuilder.h | 1 - .../interface/ConditionDBWriter.h | 1 - CondCore/BeamSpotPlugins/BuildFile.xml | 1 - CondCore/CondDB/BuildFile.xml | 1 - CondCore/CondDB/interface/Auth.h | 32 + CondCore/CondDB/interface/Cipher.h | 41 ++ .../interface/CoralServiceFactory.h | 8 +- .../interface/CoralServiceMacros.h | 6 +- .../interface/CoralServiceManager.h | 8 +- .../interface/CredentialStore.h | 12 +- CondCore/CondDB/interface/DecodingKey.h | 136 ++++ CondCore/CondDB/interface/Exception.h | 9 +- .../interface/FileUtils.h | 6 +- CondCore/CondDB/interface/Types.h | 14 +- .../RelationalAuthenticationService.cc | 0 .../plugins/RelationalAuthenticationService.h | 0 .../plugins/XMLAuthenticationService.cc | 0 .../plugins/XMLAuthenticationService.h | 0 CondCore/{DBCommon => CondDB}/src/Cipher.cc | 18 +- CondCore/CondDB/src/ConnectionPool.cc | 12 +- .../src/CoralServiceFactory.cc | 4 +- .../src/CoralServiceManager.cc | 4 +- .../src/CredentialStore.cc | 181 +++-- CondCore/CondDB/src/DbConnectionString.cc | 18 +- .../{DBCommon => CondDB}/src/DecodingKey.cc | 29 +- CondCore/CondDB/src/Exception.cc | 9 + CondCore/CondDB/src/FileUtils.cc | 29 + CondCore/CondDB/src/SessionImpl.h | 2 - CondCore/{DBCommon => CondDB}/src/base64.cc | 0 CondCore/{DBCommon => CondDB}/src/base64.h | 0 CondCore/{DBCommon => CondDB}/src/blowfish.cc | 0 CondCore/{DBCommon => CondDB}/src/blowfish.h | 0 .../CondDB/test/testConditionDatabase_0.cpp | 3 - .../CondDB/test/testReadWritePayloads.cpp | 3 - CondCore/DBCommon/BuildFile.xml | 10 - CondCore/DBCommon/doc/DBCommon.doc | 60 -- CondCore/DBCommon/interface/Auth.h | 33 - .../interface/BlobStreamerPluginFactory.h | 11 - CondCore/DBCommon/interface/Cipher.h | 38 -- CondCore/DBCommon/interface/ClassID.h | 77 --- .../DBCommon/interface/ConvertIOVSyncValue.h | 22 - CondCore/DBCommon/interface/DbConnection.h | 77 --- .../interface/DbConnectionConfiguration.h | 103 --- .../DBCommon/interface/DbOpenTransaction.h | 31 - .../DBCommon/interface/DbScopedTransaction.h | 40 -- CondCore/DBCommon/interface/DbSession.h | 159 ----- CondCore/DBCommon/interface/DbTransaction.h | 45 -- CondCore/DBCommon/interface/DecodingKey.h | 131 ---- CondCore/DBCommon/interface/Exception.h | 36 - .../DBCommon/interface/FipProtocolParser.h | 13 - CondCore/DBCommon/interface/IOVInfo.h | 15 - CondCore/DBCommon/interface/LogDBEntry.h | 31 - CondCore/DBCommon/interface/Logger.h | 111 --- CondCore/DBCommon/interface/PayloadRef.h | 44 -- CondCore/DBCommon/interface/SQLReport.h | 40 -- CondCore/DBCommon/interface/SequenceManager.h | 79 --- .../DBCommon/interface/SharedLibraryName.h | 0 CondCore/DBCommon/interface/TagInfo.h | 3 - CondCore/DBCommon/interface/TagMetadata.h | 23 - CondCore/DBCommon/interface/TechnologyProxy.h | 31 - .../interface/TechnologyProxyFactory.h | 12 - CondCore/DBCommon/interface/Time.h | 1 - CondCore/DBCommon/interface/UserLogInfo.h | 0 .../DBCommon/plugins/BlobStreamingService.cc | 230 ------- CondCore/DBCommon/plugins/BuildFile.xml | 27 - CondCore/DBCommon/plugins/FrontierProxy.cc | 143 ---- CondCore/DBCommon/plugins/OracleProxy.cc | 17 - .../DBCommon/plugins/SQLMonitoringService.cc | 371 ---------- .../DBCommon/plugins/SQLMonitoringService.h | 158 ----- CondCore/DBCommon/plugins/SQLiteProxy.cc | 32 - .../plugins/TBufferBlobStreamingService.cc | 161 ----- .../plugins/TBufferBlobStreamingService.h | 43 -- CondCore/DBCommon/python/CondDBCommon_cfi.py | 19 - CondCore/DBCommon/python/CondDBSetup_cfi.py | 17 - CondCore/DBCommon/src/Auth.cc | 22 - .../DBCommon/src/BlobStreamerPluginFactory.cc | 4 - CondCore/DBCommon/src/ClassID.cc | 64 -- CondCore/DBCommon/src/ConvertIOVSyncValue.cc | 98 --- CondCore/DBCommon/src/DbConnection.cc | 114 ---- .../DBCommon/src/DbConnectionConfiguration.cc | 339 --------- CondCore/DBCommon/src/DbOpenTransaction.cc | 20 - CondCore/DBCommon/src/DbScopedTransaction.cc | 49 -- CondCore/DBCommon/src/DbSession.cc | 334 --------- CondCore/DBCommon/src/DbTransaction.cc | 68 -- CondCore/DBCommon/src/Exception.cc | 21 - CondCore/DBCommon/src/FileUtils.cc | 53 -- CondCore/DBCommon/src/FipProtocolParser.cc | 14 - CondCore/DBCommon/src/IOVInfo.cc | 24 - CondCore/DBCommon/src/LogDBNames.cc | 9 - CondCore/DBCommon/src/LogDBNames.h | 11 - CondCore/DBCommon/src/Logger.cc | 345 ---------- CondCore/DBCommon/src/SQLReport.cc | 27 - CondCore/DBCommon/src/SequenceManager.cc | 177 ----- .../DBCommon/src/TechnologyProxyFactory.cc | 3 - CondCore/DBCommon/src/Time.cc | 1 - CondCore/DBCommon/test/BuildFile.xml | 44 -- CondCore/DBCommon/test/classes.h | 1 - CondCore/DBCommon/test/classes_def.xml | 3 - CondCore/DBCommon/test/testBlobStreaming.cpp | 116 ---- CondCore/DBCommon/test/testCipher.cc | 33 - CondCore/DBCommon/test/testCondObj.h | 12 - CondCore/DBCommon/test/testCondObjCopy.cc | 63 -- .../DBCommon/test/testCoralSQLPrinting.cc | 72 -- CondCore/DBCommon/test/testDbConnection.cc | 66 -- .../DBCommon/test/testDbScopedTransaction.cc | 72 -- CondCore/DBCommon/test/testDbSession.cc | 96 --- CondCore/DBCommon/test/testDbSessionIO.cc | 97 --- CondCore/DBCommon/test/testDbTransaction.cc | 87 --- .../DBCommon/test/testMultipleConnection.cc | 49 -- CondCore/DBCommon/test/testSequenceManager.cc | 29 - .../DBCommon/test/testSingleConnection.cc | 46 -- .../DBCommon/test/testTechnologyPlugin.cc | 54 -- CondCore/DBCommon/test/testTime.cpp | 51 -- CondCore/DBCommon/test/unittest_DBLogger.cpp | 121 ---- .../DBOutputService/interface/Exception.h | 2 +- .../interface/PoolDBOutputService.h | 7 +- .../src/PoolDBOutputService.cc | 74 +- .../test/stubs/IOVPayloadEndOfJob.cc | 2 +- .../test/stubs/MyDataAnalyzer.cc | 7 +- CondCore/EgammaPlugins/BuildFile.xml | 1 - CondCore/HIPlugins/BuildFile.xml | 1 - CondCore/MetaDataService/BuildFile.xml | 6 - .../MetaDataService/doc/MetaDataService.doc | 44 -- CondCore/MetaDataService/interface/MetaData.h | 52 -- .../MetaDataService/interface/MetaDataEntry.h | 13 - .../interface/MetaDataExceptions.h | 5 - CondCore/MetaDataService/src/MetaData.cc | 103 --- CondCore/MetaDataService/test/BuildFile.xml | 3 - .../MetaDataService/test/testMetaData.cpp | 153 ----- CondCore/ORA/src/PVectorHandler.cc | 1 - CondCore/PopCon/interface/PopCon.h | 3 +- .../PopCon/interface/PopConSourceHandler.h | 13 +- CondCore/PopCon/src/PopCon.cc | 14 +- CondCore/PopCon/test/BuildFile.xml | 1 - CondCore/RecoMuonPlugins/BuildFile.xml | 1 - CondCore/TagCollection/BuildFile.xml | 4 - CondCore/TagCollection/data/CRAFT_30X.conf | 293 -------- CondCore/TagCollection/data/GR09_31X.conf | 297 -------- CondCore/TagCollection/data/GlobalTag.db | Bin 120832 -> 0 bytes CondCore/TagCollection/data/GlobalTag.db_30x | Bin 68608 -> 0 bytes .../TagCollection/data/GlobalTag.db_31Xpre4 | Bin 67584 -> 0 bytes CondCore/TagCollection/data/IDEAL_30X.conf | 307 --------- CondCore/TagCollection/data/STARTUP_30X.conf | 307 --------- CondCore/TagCollection/doc/TagCollection.doc | 39 -- CondCore/TagCollection/interface/Exception.h | 22 - CondCore/TagCollection/interface/PfnEditor.h | 27 - .../interface/TagCollectionRetriever.h | 49 -- CondCore/TagCollection/interface/TagDBNames.h | 8 - CondCore/TagCollection/python/CommonUtils.py | 112 --- CondCore/TagCollection/python/DBCopy.py | 302 -------- CondCore/TagCollection/python/DBImpl.py | 84 --- CondCore/TagCollection/python/IdGenerator.py | 107 --- CondCore/TagCollection/python/Node.py | 64 -- CondCore/TagCollection/python/TagTree.py | 646 ------------------ CondCore/TagCollection/python/__init__.py | 0 .../TagCollection/python/cacheconfigParser.py | 60 -- .../TagCollection/python/connectstrParser.py | 112 --- CondCore/TagCollection/python/entryComment.py | 256 ------- CondCore/TagCollection/python/exporter.py | 313 --------- CondCore/TagCollection/python/listobjects.py | 412 ----------- .../TagCollection/python/multivaluedict.py | 180 ----- CondCore/TagCollection/python/seqvaluedict.py | 175 ----- CondCore/TagCollection/python/tagInventory.py | 546 --------------- .../TagCollection/scripts/CRUZET3_V2H.conf | 152 ----- .../TagCollection/scripts/CRUZET3_V2P.conf | 152 ----- .../scripts/cmscond_schema_globaltag | 119 ---- .../scripts/cmscond_tagdb_export | 88 --- .../TagCollection/scripts/cmscond_tagintrees | 103 --- .../scripts/cmscond_taginventory_add | 156 ----- .../scripts/cmscond_taginventory_delete | 108 --- .../scripts/cmscond_taginventory_label | 96 --- .../scripts/cmscond_taginventory_list | 109 --- .../TagCollection/scripts/cmscond_tagtree_add | 219 ------ .../scripts/cmscond_tagtree_clone | 188 ----- .../scripts/cmscond_tagtree_createroot | 136 ---- .../scripts/cmscond_tagtree_delete | 156 ----- .../scripts/cmscond_tagtree_list | 209 ------ .../TagCollection/scripts/createglobaltag | 17 - CondCore/TagCollection/scripts/dbtoconf.cfg | 11 - CondCore/TagCollection/scripts/dbtoconf.py | 223 ------ CondCore/TagCollection/scripts/dbtoweb.cfg | 10 - CondCore/TagCollection/scripts/dbtoweb.py | 276 -------- CondCore/TagCollection/scripts/listoftags | 23 - CondCore/TagCollection/scripts/tagclone.conf | 25 - .../TagCollection/scripts/utils.documetation | 68 -- CondCore/TagCollection/src/PfnEditor.cc | 29 - .../src/TagCollectionRetriever.cc | 164 ----- CondCore/TagCollection/src/TagDBNames.cc | 6 - CondCore/TagCollection/test/BuildFile.xml | 6 - CondCore/TagCollection/test/globtag.conf2 | 10 - CondCore/TagCollection/test/globtag.conf4 | 25 - CondCore/TagCollection/test/input.conf | 36 - .../TagCollection/test/testConfigParser.py | 10 - CondCore/TagCollection/test/testExporter.py | 103 --- .../TagCollection/test/testListDBObjects.py | 29 - CondCore/TagCollection/test/testPfnEditor.cpp | 54 -- CondCore/TagCollection/test/testlonglong.py | 69 -- .../TagCollection/test/writeTestTagDB.cpp | 206 ------ CondCore/Utilities/BuildFile.xml | 2 - CondCore/Utilities/bin/BuildFile.xml | 2 +- .../bin/cmscond_authentication_manager.cpp | 22 +- .../Utilities/bin/cmscond_from_lumiid.cpp | 2 +- ...ond_create_key.cpp => cmscond_key_mgr.cpp} | 34 +- CondCore/Utilities/bin/cmscond_to_lumiid.cpp | 2 +- CondCore/Utilities/interface/CondDBTools.h | 1 - CondCore/Utilities/interface/Utilities.h | 29 +- CondCore/Utilities/src/CondDBTools.cc | 1 - CondCore/Utilities/src/Utilities.cc | 65 +- CondFormats/Common/BuildFile.xml | 2 +- CondFormats/Common/interface/IOVElement.h | 67 -- .../Common/interface/IOVKeysDescription.h | 3 +- CondFormats/Common/interface/IOVSequence.h | 125 ---- CondFormats/Common/interface/SequenceState.h | 39 -- CondFormats/Common/interface/UpdateStamp.h | 52 -- CondFormats/Common/src/IOVSequence.cc | 165 ----- CondFormats/Common/src/SequenceState.cc | 16 - CondFormats/Common/src/UpdateStamp.cc | 30 - CondFormats/Common/src/classes_def.xml | 20 - CondFormats/Common/src/headers.h | 3 +- CondFormats/Common/test/BuildFile.xml | 5 - .../Common/test/ProduceDropBoxMetadata.py | 8 +- CondFormats/Common/test/oldrunPayloadTest | 1 - CondFormats/Common/test/runAllPayloadsTest | 1 - CondFormats/Common/test/runPayloadTest | 1 - CondFormats/Common/test/testPayloadIO.cc | 110 --- .../Common/test/testSerializationCommon.cpp | 8 - CondFormats/DTObjects/BuildFile.xml | 1 - CondFormats/DTObjects/test/BuildFile.xml | 3 - CondFormats/EcalObjects/test/BuildFile.xml | 3 - CondFormats/MFObjects/BuildFile.xml | 1 - CondFormats/MFObjects/test/BuildFile.xml | 3 - .../PhysicsToolsObjects/test/BuildFile.xml | 1 - CondTools/DT/interface/DTHVStatusHandler.h | 11 +- CondTools/DT/interface/DTLVStatusHandler.h | 8 +- CondTools/DT/plugins/BuildFile.xml | 3 - CondTools/DT/src/DTHVStatusHandler.cc | 30 +- CondTools/DT/src/DTLVStatusHandler.cc | 21 +- CondTools/DT/test/BuildFile.xml | 2 - CondTools/Ecal/BuildFile.xml | 1 - CondTools/Ecal/interface/ESDBCopy.h | 2 +- CondTools/Ecal/interface/EcalCondHeader.h | 2 +- CondTools/Ecal/interface/EcalDBCopy.h | 2 +- CondTools/Ecal/interface/EcalGetLaserData.h | 2 +- CondTools/Ecal/interface/EcalTestDevDB.h | 2 +- .../EcalFloatCondObjectContainerHandler.cc | 2 +- CondTools/Ecal/plugins/StoreEcalCondition.cc | 2 +- CondTools/Ecal/src/EcalLaserHandler.cc | 2 +- .../Ecal/src/EcalLaser_weekly_Handler.cc | 2 +- .../src/EcalLaser_weekly_Linearization.cc | 2 +- .../EcalLaser_weekly_Linearization_Check.cc | 2 +- CondTools/Ecal/src/EcalTPGPedfromFile.cc | 2 +- CondTools/Hcal/BuildFile.xml | 3 - CondTools/Hcal/bin/BuildFile.xml | 3 - CondTools/Hcal/plugins/BuildFile.xml | 3 - CondTools/L1Trigger/BuildFile.xml | 1 - CondTools/L1Trigger/interface/DataManager.h | 15 +- CondTools/L1Trigger/interface/Exception.h | 2 +- CondTools/L1Trigger/interface/OMDSReader.h | 25 +- CondTools/L1Trigger/interface/WriterProxy.h | 2 - CondTools/L1Trigger/src/DataManager.cc | 41 +- CondTools/L1Trigger/src/DataWriter.cc | 2 +- CondTools/L1Trigger/src/OMDSReader.cc | 37 +- CondTools/RPC/BuildFile.xml | 3 - .../interface/L1RPCHwConfigSourceHandler.h | 7 +- .../RPC/interface/RPCEMapSourceHandler.h | 7 +- CondTools/RPC/plugins/BuildFile.xml | 3 - .../RPC/src/L1RPCHwConfigSourceHandler.cc | 19 +- CondTools/RPC/src/RPCEMapSourceHandler.cc | 20 +- CondTools/RunInfo/BuildFile.xml | 3 - .../src/FillInfoPopConSourceHandler.cc | 24 +- CondTools/RunInfo/src/L1TriggerScalerRead.cc | 2 +- CondTools/RunInfo/src/RunSummaryRead.cc | 2 +- .../interface/SiStripPopConDbObjHandler.h | 2 - CondTools/SiStrip/plugins/BuildFile.xml | 1 - DQM/L1TMonitor/src/L1TOMDSHelper.cc | 18 +- DQM/RPCMonitorClient/BuildFile.xml | 1 - DQM/RPCMonitorClient/interface/RPCDBHandler.h | 1 - DQM/RPCMonitorClient/src/RPCDBHandler.cc | 1 + .../FFTJetModules/plugins/BuildFile.xml | 1 - JetMETCorrections/Modules/BuildFile.xml | 1 - .../Modules/plugins/BuildFile.xml | 1 - .../DTTPGConfigProducers/BuildFile.xml | 3 - .../plugins/BuildFile.xml | 1 - .../interface/L1GtPsbSetupConfigOnlineProd.h | 2 +- .../src/L1GtPsbSetupConfigOnlineProd.cc | 2 +- .../src/L1CaloHcalScaleConfigOnlineProd.cc | 2 +- .../src/L1MuTriggerScaleKeysOnlineProd.cc | 1 - .../src/L1RCTOmdsFedVectorProducer.cc | 16 +- OnlineDB/CSCCondDB/BuildFile.xml | 1 - OnlineDB/CSCCondDB/test/BuildFile.xml | 1 - OnlineDB/SiStripO2O/plugins/BuildFile.xml | 1 - .../plugins/SiStripPopConConfigDbObjHandler.h | 3 +- .../plugins/SiStripPopConHandlerUnitTest.h | 3 +- .../SiStripPopConHandlerUnitTestGain.h | 3 +- .../SiStripPopConHandlerUnitTestNoise.h | 3 +- RecoBTag/PerformanceDB/plugins/BuildFile.xml | 1 - RecoHI/HiCentralityAlgos/BuildFile.xml | 1 - RecoHI/HiEvtPlaneAlgos/BuildFile.xml | 1 - RecoHI/HiJetAlgos/plugins/BuildFile.xml | 1 - .../PFClusterTools/test/BuildFile.xml | 1 - .../BuildFile.xml | 1 - 323 files changed, 676 insertions(+), 15222 deletions(-) create mode 100644 CondCore/CondDB/interface/Auth.h create mode 100644 CondCore/CondDB/interface/Cipher.h rename CondCore/{DBCommon => CondDB}/interface/CoralServiceFactory.h (76%) rename CondCore/{DBCommon => CondDB}/interface/CoralServiceMacros.h (62%) rename CondCore/{DBCommon => CondDB}/interface/CoralServiceManager.h (79%) rename CondCore/{DBCommon => CondDB}/interface/CredentialStore.h (95%) create mode 100644 CondCore/CondDB/interface/DecodingKey.h rename CondCore/{DBCommon => CondDB}/interface/FileUtils.h (77%) rename CondCore/{DBCommon => CondDB}/plugins/RelationalAuthenticationService.cc (100%) rename CondCore/{DBCommon => CondDB}/plugins/RelationalAuthenticationService.h (100%) rename CondCore/{DBCommon => CondDB}/plugins/XMLAuthenticationService.cc (100%) rename CondCore/{DBCommon => CondDB}/plugins/XMLAuthenticationService.h (100%) rename CondCore/{DBCommon => CondDB}/src/Cipher.cc (83%) rename CondCore/{DBCommon => CondDB}/src/CoralServiceFactory.cc (88%) rename CondCore/{DBCommon => CondDB}/src/CoralServiceManager.cc (86%) rename CondCore/{DBCommon => CondDB}/src/CredentialStore.cc (90%) rename CondCore/{DBCommon => CondDB}/src/DecodingKey.cc (90%) create mode 100644 CondCore/CondDB/src/FileUtils.cc rename CondCore/{DBCommon => CondDB}/src/base64.cc (100%) rename CondCore/{DBCommon => CondDB}/src/base64.h (100%) rename CondCore/{DBCommon => CondDB}/src/blowfish.cc (100%) rename CondCore/{DBCommon => CondDB}/src/blowfish.h (100%) delete mode 100644 CondCore/DBCommon/BuildFile.xml delete mode 100644 CondCore/DBCommon/doc/DBCommon.doc delete mode 100644 CondCore/DBCommon/interface/Auth.h delete mode 100644 CondCore/DBCommon/interface/BlobStreamerPluginFactory.h delete mode 100644 CondCore/DBCommon/interface/Cipher.h delete mode 100644 CondCore/DBCommon/interface/ClassID.h delete mode 100644 CondCore/DBCommon/interface/ConvertIOVSyncValue.h delete mode 100644 CondCore/DBCommon/interface/DbConnection.h delete mode 100644 CondCore/DBCommon/interface/DbConnectionConfiguration.h delete mode 100644 CondCore/DBCommon/interface/DbOpenTransaction.h delete mode 100644 CondCore/DBCommon/interface/DbScopedTransaction.h delete mode 100644 CondCore/DBCommon/interface/DbSession.h delete mode 100644 CondCore/DBCommon/interface/DbTransaction.h delete mode 100644 CondCore/DBCommon/interface/DecodingKey.h delete mode 100644 CondCore/DBCommon/interface/Exception.h delete mode 100644 CondCore/DBCommon/interface/FipProtocolParser.h delete mode 100644 CondCore/DBCommon/interface/IOVInfo.h delete mode 100644 CondCore/DBCommon/interface/LogDBEntry.h delete mode 100644 CondCore/DBCommon/interface/Logger.h delete mode 100644 CondCore/DBCommon/interface/PayloadRef.h delete mode 100644 CondCore/DBCommon/interface/SQLReport.h delete mode 100644 CondCore/DBCommon/interface/SequenceManager.h delete mode 100644 CondCore/DBCommon/interface/SharedLibraryName.h delete mode 100644 CondCore/DBCommon/interface/TagInfo.h delete mode 100644 CondCore/DBCommon/interface/TagMetadata.h delete mode 100644 CondCore/DBCommon/interface/TechnologyProxy.h delete mode 100644 CondCore/DBCommon/interface/TechnologyProxyFactory.h delete mode 100644 CondCore/DBCommon/interface/Time.h delete mode 100644 CondCore/DBCommon/interface/UserLogInfo.h delete mode 100644 CondCore/DBCommon/plugins/BlobStreamingService.cc delete mode 100644 CondCore/DBCommon/plugins/BuildFile.xml delete mode 100644 CondCore/DBCommon/plugins/FrontierProxy.cc delete mode 100644 CondCore/DBCommon/plugins/OracleProxy.cc delete mode 100644 CondCore/DBCommon/plugins/SQLMonitoringService.cc delete mode 100644 CondCore/DBCommon/plugins/SQLMonitoringService.h delete mode 100644 CondCore/DBCommon/plugins/SQLiteProxy.cc delete mode 100644 CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc delete mode 100644 CondCore/DBCommon/plugins/TBufferBlobStreamingService.h delete mode 100644 CondCore/DBCommon/python/CondDBCommon_cfi.py delete mode 100644 CondCore/DBCommon/python/CondDBSetup_cfi.py delete mode 100644 CondCore/DBCommon/src/Auth.cc delete mode 100644 CondCore/DBCommon/src/BlobStreamerPluginFactory.cc delete mode 100644 CondCore/DBCommon/src/ClassID.cc delete mode 100644 CondCore/DBCommon/src/ConvertIOVSyncValue.cc delete mode 100644 CondCore/DBCommon/src/DbConnection.cc delete mode 100644 CondCore/DBCommon/src/DbConnectionConfiguration.cc delete mode 100644 CondCore/DBCommon/src/DbOpenTransaction.cc delete mode 100644 CondCore/DBCommon/src/DbScopedTransaction.cc delete mode 100644 CondCore/DBCommon/src/DbSession.cc delete mode 100644 CondCore/DBCommon/src/DbTransaction.cc delete mode 100644 CondCore/DBCommon/src/Exception.cc delete mode 100644 CondCore/DBCommon/src/FileUtils.cc delete mode 100644 CondCore/DBCommon/src/FipProtocolParser.cc delete mode 100644 CondCore/DBCommon/src/IOVInfo.cc delete mode 100644 CondCore/DBCommon/src/LogDBNames.cc delete mode 100644 CondCore/DBCommon/src/LogDBNames.h delete mode 100644 CondCore/DBCommon/src/Logger.cc delete mode 100644 CondCore/DBCommon/src/SQLReport.cc delete mode 100644 CondCore/DBCommon/src/SequenceManager.cc delete mode 100644 CondCore/DBCommon/src/TechnologyProxyFactory.cc delete mode 100644 CondCore/DBCommon/src/Time.cc delete mode 100644 CondCore/DBCommon/test/BuildFile.xml delete mode 100644 CondCore/DBCommon/test/classes.h delete mode 100644 CondCore/DBCommon/test/classes_def.xml delete mode 100644 CondCore/DBCommon/test/testBlobStreaming.cpp delete mode 100644 CondCore/DBCommon/test/testCipher.cc delete mode 100644 CondCore/DBCommon/test/testCondObj.h delete mode 100644 CondCore/DBCommon/test/testCondObjCopy.cc delete mode 100644 CondCore/DBCommon/test/testCoralSQLPrinting.cc delete mode 100644 CondCore/DBCommon/test/testDbConnection.cc delete mode 100644 CondCore/DBCommon/test/testDbScopedTransaction.cc delete mode 100644 CondCore/DBCommon/test/testDbSession.cc delete mode 100644 CondCore/DBCommon/test/testDbSessionIO.cc delete mode 100644 CondCore/DBCommon/test/testDbTransaction.cc delete mode 100644 CondCore/DBCommon/test/testMultipleConnection.cc delete mode 100644 CondCore/DBCommon/test/testSequenceManager.cc delete mode 100644 CondCore/DBCommon/test/testSingleConnection.cc delete mode 100644 CondCore/DBCommon/test/testTechnologyPlugin.cc delete mode 100644 CondCore/DBCommon/test/testTime.cpp delete mode 100644 CondCore/DBCommon/test/unittest_DBLogger.cpp delete mode 100644 CondCore/MetaDataService/BuildFile.xml delete mode 100644 CondCore/MetaDataService/doc/MetaDataService.doc delete mode 100644 CondCore/MetaDataService/interface/MetaData.h delete mode 100644 CondCore/MetaDataService/interface/MetaDataEntry.h delete mode 100644 CondCore/MetaDataService/interface/MetaDataExceptions.h delete mode 100644 CondCore/MetaDataService/src/MetaData.cc delete mode 100644 CondCore/MetaDataService/test/BuildFile.xml delete mode 100644 CondCore/MetaDataService/test/testMetaData.cpp delete mode 100644 CondCore/TagCollection/BuildFile.xml delete mode 100644 CondCore/TagCollection/data/CRAFT_30X.conf delete mode 100644 CondCore/TagCollection/data/GR09_31X.conf delete mode 100644 CondCore/TagCollection/data/GlobalTag.db delete mode 100644 CondCore/TagCollection/data/GlobalTag.db_30x delete mode 100644 CondCore/TagCollection/data/GlobalTag.db_31Xpre4 delete mode 100644 CondCore/TagCollection/data/IDEAL_30X.conf delete mode 100644 CondCore/TagCollection/data/STARTUP_30X.conf delete mode 100644 CondCore/TagCollection/doc/TagCollection.doc delete mode 100644 CondCore/TagCollection/interface/Exception.h delete mode 100644 CondCore/TagCollection/interface/PfnEditor.h delete mode 100644 CondCore/TagCollection/interface/TagCollectionRetriever.h delete mode 100644 CondCore/TagCollection/interface/TagDBNames.h delete mode 100644 CondCore/TagCollection/python/CommonUtils.py delete mode 100644 CondCore/TagCollection/python/DBCopy.py delete mode 100644 CondCore/TagCollection/python/DBImpl.py delete mode 100644 CondCore/TagCollection/python/IdGenerator.py delete mode 100644 CondCore/TagCollection/python/Node.py delete mode 100644 CondCore/TagCollection/python/TagTree.py delete mode 100644 CondCore/TagCollection/python/__init__.py delete mode 100644 CondCore/TagCollection/python/cacheconfigParser.py delete mode 100644 CondCore/TagCollection/python/connectstrParser.py delete mode 100644 CondCore/TagCollection/python/entryComment.py delete mode 100644 CondCore/TagCollection/python/exporter.py delete mode 100644 CondCore/TagCollection/python/listobjects.py delete mode 100644 CondCore/TagCollection/python/multivaluedict.py delete mode 100644 CondCore/TagCollection/python/seqvaluedict.py delete mode 100644 CondCore/TagCollection/python/tagInventory.py delete mode 100644 CondCore/TagCollection/scripts/CRUZET3_V2H.conf delete mode 100644 CondCore/TagCollection/scripts/CRUZET3_V2P.conf delete mode 100755 CondCore/TagCollection/scripts/cmscond_schema_globaltag delete mode 100755 CondCore/TagCollection/scripts/cmscond_tagdb_export delete mode 100755 CondCore/TagCollection/scripts/cmscond_tagintrees delete mode 100755 CondCore/TagCollection/scripts/cmscond_taginventory_add delete mode 100755 CondCore/TagCollection/scripts/cmscond_taginventory_delete delete mode 100755 CondCore/TagCollection/scripts/cmscond_taginventory_label delete mode 100755 CondCore/TagCollection/scripts/cmscond_taginventory_list delete mode 100755 CondCore/TagCollection/scripts/cmscond_tagtree_add delete mode 100755 CondCore/TagCollection/scripts/cmscond_tagtree_clone delete mode 100755 CondCore/TagCollection/scripts/cmscond_tagtree_createroot delete mode 100755 CondCore/TagCollection/scripts/cmscond_tagtree_delete delete mode 100755 CondCore/TagCollection/scripts/cmscond_tagtree_list delete mode 100755 CondCore/TagCollection/scripts/createglobaltag delete mode 100644 CondCore/TagCollection/scripts/dbtoconf.cfg delete mode 100755 CondCore/TagCollection/scripts/dbtoconf.py delete mode 100644 CondCore/TagCollection/scripts/dbtoweb.cfg delete mode 100755 CondCore/TagCollection/scripts/dbtoweb.py delete mode 100755 CondCore/TagCollection/scripts/listoftags delete mode 100644 CondCore/TagCollection/scripts/tagclone.conf delete mode 100644 CondCore/TagCollection/scripts/utils.documetation delete mode 100644 CondCore/TagCollection/src/PfnEditor.cc delete mode 100644 CondCore/TagCollection/src/TagCollectionRetriever.cc delete mode 100644 CondCore/TagCollection/src/TagDBNames.cc delete mode 100644 CondCore/TagCollection/test/BuildFile.xml delete mode 100644 CondCore/TagCollection/test/globtag.conf2 delete mode 100644 CondCore/TagCollection/test/globtag.conf4 delete mode 100644 CondCore/TagCollection/test/input.conf delete mode 100644 CondCore/TagCollection/test/testConfigParser.py delete mode 100644 CondCore/TagCollection/test/testExporter.py delete mode 100644 CondCore/TagCollection/test/testListDBObjects.py delete mode 100644 CondCore/TagCollection/test/testPfnEditor.cpp delete mode 100644 CondCore/TagCollection/test/testlonglong.py delete mode 100644 CondCore/TagCollection/test/writeTestTagDB.cpp rename CondCore/Utilities/bin/{cmscond_create_key.cpp => cmscond_key_mgr.cpp} (59%) delete mode 100644 CondFormats/Common/interface/IOVElement.h delete mode 100644 CondFormats/Common/interface/IOVSequence.h delete mode 100644 CondFormats/Common/interface/SequenceState.h delete mode 100644 CondFormats/Common/interface/UpdateStamp.h delete mode 100644 CondFormats/Common/src/IOVSequence.cc delete mode 100644 CondFormats/Common/src/SequenceState.cc delete mode 100644 CondFormats/Common/src/UpdateStamp.cc delete mode 100644 CondFormats/Common/test/testPayloadIO.cc diff --git a/Alignment/CocoaApplication/BuildFile.xml b/Alignment/CocoaApplication/BuildFile.xml index c28e43946b02a..2a5b475a99bea 100644 --- a/Alignment/CocoaApplication/BuildFile.xml +++ b/Alignment/CocoaApplication/BuildFile.xml @@ -1,8 +1,6 @@ - - @@ -14,6 +12,5 @@ - diff --git a/Alignment/CocoaApplication/src/CocoaAnalyzer.cc b/Alignment/CocoaApplication/src/CocoaAnalyzer.cc index b1d3cb2bf1aec..a0c6c062658cc 100644 --- a/Alignment/CocoaApplication/src/CocoaAnalyzer.cc +++ b/Alignment/CocoaApplication/src/CocoaAnalyzer.cc @@ -1,5 +1,4 @@ #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/Exception.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/ESHandle.h" diff --git a/Alignment/CocoaFit/BuildFile.xml b/Alignment/CocoaFit/BuildFile.xml index 3475a3141e75c..619b6a96fff5c 100644 --- a/Alignment/CocoaFit/BuildFile.xml +++ b/Alignment/CocoaFit/BuildFile.xml @@ -10,7 +10,6 @@ - diff --git a/Alignment/CocoaFit/src/CocoaDBMgr.cc b/Alignment/CocoaFit/src/CocoaDBMgr.cc index 0d919e6d52a6b..29421a0f8fc62 100644 --- a/Alignment/CocoaFit/src/CocoaDBMgr.cc +++ b/Alignment/CocoaFit/src/CocoaDBMgr.cc @@ -4,7 +4,6 @@ #include "CondFormats/Alignment/interface/AlignTransformErrorExtended.h" #include "DataFormats/GeometryCommonDetAlgo/interface/GlobalError.h" #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/Exception.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/ESHandle.h" diff --git a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h index 32e8e9ee458f6..40c1f9af874f6 100644 --- a/Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h +++ b/Alignment/CommonAlignmentAlgorithm/interface/AlignmentAlgorithmBase.h @@ -33,7 +33,7 @@ class Trajectory; // class TsosVectorCollection; // class TkFittedLasBeamCollection; // class AliClusterValueMap; -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "Alignment/LaserAlignment/interface/TsosVectorCollection.h" #include "DataFormats/Alignment/interface/TkFittedLasBeamCollectionFwd.h" #include "DataFormats/Alignment/interface/AliClusterValueMapFwd.h" diff --git a/Alignment/MuonAlignment/BuildFile.xml b/Alignment/MuonAlignment/BuildFile.xml index 5959cd414f7ee..840fca465bbd2 100644 --- a/Alignment/MuonAlignment/BuildFile.xml +++ b/Alignment/MuonAlignment/BuildFile.xml @@ -12,7 +12,6 @@ - diff --git a/CalibCalorimetry/CaloMiscalibTools/BuildFile.xml b/CalibCalorimetry/CaloMiscalibTools/BuildFile.xml index 5c48b50a62013..b09d508d75a83 100644 --- a/CalibCalorimetry/CaloMiscalibTools/BuildFile.xml +++ b/CalibCalorimetry/CaloMiscalibTools/BuildFile.xml @@ -11,7 +11,6 @@ - diff --git a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h index dd76e37985941..807d6aa3bc201 100644 --- a/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h +++ b/CalibCalorimetry/EcalCorrelatedNoiseAnalysisModules/interface/EcnaAnalyzer.h @@ -48,7 +48,7 @@ #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" diff --git a/CalibCalorimetry/EcalTPGTools/BuildFile.xml b/CalibCalorimetry/EcalTPGTools/BuildFile.xml index f68f1fa80a47e..3653c6a1d060d 100644 --- a/CalibCalorimetry/EcalTPGTools/BuildFile.xml +++ b/CalibCalorimetry/EcalTPGTools/BuildFile.xml @@ -5,7 +5,6 @@ - diff --git a/CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBCopy.h b/CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBCopy.h index 935be6434019f..390c4f4196103 100644 --- a/CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBCopy.h +++ b/CalibCalorimetry/EcalTPGTools/plugins/EcalTPGDBCopy.h @@ -2,7 +2,7 @@ #define ECALTPGDBCOPY_H #include "FWCore/Framework/interface/EDAnalyzer.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "FWCore/Framework/interface/IOVSyncValue.h" diff --git a/CalibMuon/CSCCalibration/test/BuildFile.xml b/CalibMuon/CSCCalibration/test/BuildFile.xml index 6150d34cf54a3..ba81e9855e3b1 100644 --- a/CalibMuon/CSCCalibration/test/BuildFile.xml +++ b/CalibMuon/CSCCalibration/test/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/CalibTracker/SiPixelConnectivity/BuildFile.xml b/CalibTracker/SiPixelConnectivity/BuildFile.xml index 8e015256c9455..80c6763008ffe 100644 --- a/CalibTracker/SiPixelConnectivity/BuildFile.xml +++ b/CalibTracker/SiPixelConnectivity/BuildFile.xml @@ -7,9 +7,6 @@ - - - diff --git a/CalibTracker/SiStripDCS/BuildFile.xml b/CalibTracker/SiStripDCS/BuildFile.xml index fe19a07f40f95..4d6605505bbf7 100644 --- a/CalibTracker/SiStripDCS/BuildFile.xml +++ b/CalibTracker/SiStripDCS/BuildFile.xml @@ -13,7 +13,6 @@ - diff --git a/CalibTracker/SiStripDCS/interface/SiStripCoralIface.h b/CalibTracker/SiStripDCS/interface/SiStripCoralIface.h index 65d1060ae3c84..93a44c78a5be2 100644 --- a/CalibTracker/SiStripDCS/interface/SiStripCoralIface.h +++ b/CalibTracker/SiStripDCS/interface/SiStripCoralIface.h @@ -1,9 +1,7 @@ #ifndef SISTRIPCORALIFACE_H #define SISTRIPCORALIFACE_H -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbScopedTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Session.h" +#include "CondCore/CondDB/interface/Exception.h" #include "CoralBase/TimeStamp.h" #include @@ -36,13 +34,12 @@ class SiStripCoralIface /* member variables*/ std::string m_connectionString; + std::string m_authPath; std::map m_id_map; - // cond::DBSession* session; - cond::DbConnection m_connection; - cond::DbSession m_session; + cond::persistency::Session m_session; + std::auto_ptr m_transaction; // cond::CoralTransaction* m_coraldb; // cond::Connection* con; - std::auto_ptr m_transaction; bool debug_; }; diff --git a/CalibTracker/SiStripDCS/interface/SiStripDetVOffHandler.h b/CalibTracker/SiStripDCS/interface/SiStripDetVOffHandler.h index 62b28999a7106..4ebec53326287 100644 --- a/CalibTracker/SiStripDCS/interface/SiStripDetVOffHandler.h +++ b/CalibTracker/SiStripDCS/interface/SiStripDetVOffHandler.h @@ -6,8 +6,6 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/TagInfo.h" - #include "CondFormats/SiStripObjects/interface/SiStripDetVOff.h" #include "CondFormats/DataRecord/interface/SiStripCondDataRecords.h" diff --git a/CalibTracker/SiStripDCS/plugins/BuildFile.xml b/CalibTracker/SiStripDCS/plugins/BuildFile.xml index 5542f34cb1d41..a4cda2f4b603b 100644 --- a/CalibTracker/SiStripDCS/plugins/BuildFile.xml +++ b/CalibTracker/SiStripDCS/plugins/BuildFile.xml @@ -4,7 +4,6 @@ - diff --git a/CalibTracker/SiStripDCS/src/SiStripCoralIface.cc b/CalibTracker/SiStripDCS/src/SiStripCoralIface.cc index caa365e31c5b8..a1f3c155e08d8 100644 --- a/CalibTracker/SiStripDCS/src/SiStripCoralIface.cc +++ b/CalibTracker/SiStripDCS/src/SiStripCoralIface.cc @@ -1,5 +1,5 @@ #include "CalibTracker/SiStripDCS/interface/SiStripCoralIface.h" - +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "RelationalAccess/ISessionProxy.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/ITable.h" @@ -18,11 +18,9 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" // constructor -SiStripCoralIface::SiStripCoralIface( std::string connectionString , std::string authenticationPath, const bool debug) : m_connectionString(connectionString), m_session(), debug_(debug) +SiStripCoralIface::SiStripCoralIface( std::string connectionString , std::string authenticationPath, const bool debug) : m_connectionString(connectionString), m_authPath( authenticationPath ), m_session(), debug_(debug) { std::cout << "Building coral interface" << std::endl; - m_connection.configuration().setAuthenticationPath(authenticationPath); - m_connection.configure(); initialize(); } @@ -34,10 +32,12 @@ SiStripCoralIface::~SiStripCoralIface() { // open DB connection void SiStripCoralIface::initialize() { - m_session = m_connection.createSession(); - m_session.open(m_connectionString); + cond::persistency::ConnectionPool connection; + connection.setAuthenticationPath(m_authPath); + connection.configure(); + m_session = connection.createSession(m_connectionString); try { - m_transaction.reset( new cond::DbScopedTransaction(m_session) ); + m_transaction.reset( new cond::persistency::TransactionScope(m_session.transaction()) ); m_transaction->start(true); LogTrace("SiStripCoralIface") << "[SiStripCoralIface::" << __func__ << "] Database connection opened"; } @@ -51,7 +51,7 @@ void SiStripCoralIface::initialize() { void SiStripCoralIface::doQuery(std::string queryType, const coral::TimeStamp& startTime, const coral::TimeStamp& endTime, std::vector &vec_changedate, std::vector &vec_actualValue, std::vector &vec_dpname) { - std::auto_ptr query( m_session.schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); + std::auto_ptr query( m_session.coralSession().schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); std::string condition; LogTrace("SiStripCoralIface") << "[SiStripCoralIface::" << __func__ << "] table to be accessed: " << queryType; @@ -118,7 +118,7 @@ void SiStripCoralIface::doQuery(std::string queryType, const coral::TimeStamp& s void SiStripCoralIface::doSettingsQuery(const coral::TimeStamp& startTime, const coral::TimeStamp& endTime, std::vector &vec_changedate, std::vector &vec_settings, std::vector &vec_dpname, std::vector &vec_dpid) { - std::auto_ptr query( m_session.schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); + std::auto_ptr query( m_session.coralSession().schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); query->addToOutputList("FWCAENCHANNEL.CHANGE_DATE","CHANGE_DATE"); query->addToOutputList("FWCAENCHANNEL.SETTINGS_V0","VSET"); query->addToOutputList("FWCAENCHANNEL.DPID","DPID"); @@ -157,7 +157,7 @@ void SiStripCoralIface::doSettingsQuery(const coral::TimeStamp& startTime, const void SiStripCoralIface::doNameQuery(std::vector &vec_dpname, std::vector &vec_dpid) { - std::auto_ptr query( m_session.schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); + std::auto_ptr query( m_session.coralSession().schema(std::string("CMS_TRK_DCS_PVSS_COND")).newQuery()); query->addToOutputList("DP_NAME2ID.DPNAME","DPNAME"); query->addToOutputList("DP_NAME2ID.ID","DPID"); query->addToTableList("DP_NAME2ID"); diff --git a/CalibTracker/SiStripESProducers/plugins/BuildFile.xml b/CalibTracker/SiStripESProducers/plugins/BuildFile.xml index 495560c6965a0..83e06dabe600b 100644 --- a/CalibTracker/SiStripESProducers/plugins/BuildFile.xml +++ b/CalibTracker/SiStripESProducers/plugins/BuildFile.xml @@ -1,7 +1,6 @@ - diff --git a/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondDBWriter.h b/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondDBWriter.h index bba5ee337b009..9b6495219392b 100644 --- a/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondDBWriter.h +++ b/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondDBWriter.h @@ -9,7 +9,6 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" -#include "CondCore/DBCommon/interface/Time.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondObjPrinter.h b/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondObjPrinter.h index cbb266a9c6b09..e6f5153201ab7 100644 --- a/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondObjPrinter.h +++ b/CalibTracker/SiStripESProducers/plugins/DBWriter/DummyCondObjPrinter.h @@ -7,7 +7,6 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/Time.h" #include "FWCore/Utilities/interface/Exception.h" #include diff --git a/CalibTracker/SiStripESProducers/plugins/DBWriter/SiStripFedCablingManipulator.h b/CalibTracker/SiStripESProducers/plugins/DBWriter/SiStripFedCablingManipulator.h index 23e97a8eb3323..dfb171b7409a3 100644 --- a/CalibTracker/SiStripESProducers/plugins/DBWriter/SiStripFedCablingManipulator.h +++ b/CalibTracker/SiStripESProducers/plugins/DBWriter/SiStripFedCablingManipulator.h @@ -8,7 +8,6 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" -#include "CondCore/DBCommon/interface/Time.h" #include "FWCore/Utilities/interface/Exception.h" diff --git a/CalibTracker/SiStripESProducers/plugins/fake/SiStripApvGainBuilderFromTag.h b/CalibTracker/SiStripESProducers/plugins/fake/SiStripApvGainBuilderFromTag.h index 1ac1ee0aaa1b7..5d074c07d87e4 100644 --- a/CalibTracker/SiStripESProducers/plugins/fake/SiStripApvGainBuilderFromTag.h +++ b/CalibTracker/SiStripESProducers/plugins/fake/SiStripApvGainBuilderFromTag.h @@ -2,7 +2,6 @@ #define SiStripApvGainBuilderFromTag_H #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/Exception.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/Framework/interface/Frameworkfwd.h" diff --git a/CalibTracker/SiStripESProducers/plugins/fake/SiStripNoiseNormalizedWithApvGainBuilder.h b/CalibTracker/SiStripESProducers/plugins/fake/SiStripNoiseNormalizedWithApvGainBuilder.h index 5dc63df8f6700..b71ee7269ec2b 100644 --- a/CalibTracker/SiStripESProducers/plugins/fake/SiStripNoiseNormalizedWithApvGainBuilder.h +++ b/CalibTracker/SiStripESProducers/plugins/fake/SiStripNoiseNormalizedWithApvGainBuilder.h @@ -2,7 +2,6 @@ #define SiStripNoiseNormalizedWithApvGainBuilder_H #include "FWCore/ServiceRegistry/interface/Service.h" -#include "CondCore/DBCommon/interface/Exception.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "FWCore/Framework/interface/Frameworkfwd.h" diff --git a/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h b/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h index 6d5c4cdf7ca26..3408ad7a0f008 100644 --- a/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h +++ b/CommonTools/ConditionDBWriter/interface/ConditionDBWriter.h @@ -139,7 +139,6 @@ #include "FWCore/Framework/interface/Frameworkfwd.h" #include "FWCore/Framework/interface/EDAnalyzer.h" #include "FWCore/Framework/interface/Run.h" -#include "CondCore/DBCommon/interface/Time.h" #include "FWCore/Framework/interface/ESHandle.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" diff --git a/CondCore/BeamSpotPlugins/BuildFile.xml b/CondCore/BeamSpotPlugins/BuildFile.xml index fbcd744dbd689..ebff3f7d1f4a4 100644 --- a/CondCore/BeamSpotPlugins/BuildFile.xml +++ b/CondCore/BeamSpotPlugins/BuildFile.xml @@ -1,6 +1,5 @@ - diff --git a/CondCore/CondDB/BuildFile.xml b/CondCore/CondDB/BuildFile.xml index d5cab07b1744b..7a0509ea30b3f 100644 --- a/CondCore/CondDB/BuildFile.xml +++ b/CondCore/CondDB/BuildFile.xml @@ -1,4 +1,3 @@ - diff --git a/CondCore/CondDB/interface/Auth.h b/CondCore/CondDB/interface/Auth.h new file mode 100644 index 0000000000000..df9ab144f769d --- /dev/null +++ b/CondCore/CondDB/interface/Auth.h @@ -0,0 +1,32 @@ +#ifndef CondCore_CondDB_Auth_h +#define CondCore_CondDB_Auth_h + +#include + +namespace cond{ + + namespace auth { + + static constexpr const char* const COND_AUTH_PATH = "COND_AUTH_PATH"; + static constexpr const char* const COND_AUTH_SYS = "COND_AUTH_SYS"; + + static constexpr const char* const COND_ADMIN_GROUP = "COND_ADMIN_GROUP"; + + static constexpr const char* const COND_DEFAULT_ROLE = "COND_DEFAULT_ROLE"; + static constexpr const char* const COND_WRITER_ROLE = "COND_WRITER_ROLE"; + static constexpr const char* const COND_READER_ROLE = "COND_READER_ROLE"; + static constexpr const char* const COND_ADMIN_ROLE = "COND_ADMIN_ROLE"; + + static constexpr const char* const COND_DEFAULT_PRINCIPAL = "COND_DEFAULT_PRINCIPAL"; + + static constexpr const char* const COND_KEY = "Memento"; + + static constexpr unsigned int COND_AUTHENTICATION_KEY_SIZE = 30; + static constexpr unsigned int COND_DB_KEY_SIZE = 30; + + static constexpr const char* const COND_AUTH_PATH_PROPERTY = "AuthenticationFile"; + } + +} +#endif + diff --git a/CondCore/CondDB/interface/Cipher.h b/CondCore/CondDB/interface/Cipher.h new file mode 100644 index 0000000000000..5cdc07c776dd7 --- /dev/null +++ b/CondCore/CondDB/interface/Cipher.h @@ -0,0 +1,41 @@ +#ifndef CondCore_CondDB_Cipher_h +#define CondCore_CondDB_Cipher_h + +#include +#include + +struct BLOWFISH_CTX; + +namespace cond { + + namespace auth { + + class Cipher { + public: + + explicit Cipher( const std::string& key ); + + ~Cipher(); + + size_t encrypt( const std::string& input, unsigned char*& output ); + + std::string decrypt( const unsigned char* input, size_t inputSize ); + + std::string b64encrypt( const std::string& input ); + + std::string b64decrypt( const std::string& input ); + + private: + + size_t bf_process_alloc( const unsigned char* input, size_t input_size, unsigned char*& output, bool decrypt=false ); + + private: + + BLOWFISH_CTX* m_ctx; + }; + } + +} + +#endif // CondCore_CondDB_Cipher_h + diff --git a/CondCore/DBCommon/interface/CoralServiceFactory.h b/CondCore/CondDB/interface/CoralServiceFactory.h similarity index 76% rename from CondCore/DBCommon/interface/CoralServiceFactory.h rename to CondCore/CondDB/interface/CoralServiceFactory.h index 7b1671f327830..b3690518e2c46 100644 --- a/CondCore/DBCommon/interface/CoralServiceFactory.h +++ b/CondCore/CondDB/interface/CoralServiceFactory.h @@ -1,12 +1,12 @@ -#ifndef CondCore_DBCommon_CoralServiceFactory_h -#define CondCore_DBCommon_CoralServiceFactory_h +#ifndef CondCore_CondDB_CoralServiceFactory_h +#define CondCore_CondDB_CoralServiceFactory_h #include "FWCore/PluginManager/interface/PluginFactory.h" #include // -// Package: CondCore/DBCommon +// Package: CondCore/CondDB // Class : CoralServiceFactory // -/**\class CoralServiceFactory CoralServiceFactory.h CondCore/DBCommon/interface/CoralServiceFactory.h +/**\class CoralServiceFactory CoralServiceFactory.h CondCore/CondDB/interface/CoralServiceFactory.h Description: A special edm plugin factory that creates coral::Service diff --git a/CondCore/DBCommon/interface/CoralServiceMacros.h b/CondCore/CondDB/interface/CoralServiceMacros.h similarity index 62% rename from CondCore/DBCommon/interface/CoralServiceMacros.h rename to CondCore/CondDB/interface/CoralServiceMacros.h index 1546337b92a19..c025663990624 100644 --- a/CondCore/DBCommon/interface/CoralServiceMacros.h +++ b/CondCore/CondDB/interface/CoralServiceMacros.h @@ -1,7 +1,7 @@ -#ifndef CondCore_DBCommon_CoralServiceMacros_h -#define CondCore_DBCommon_CoralServiceMacros_h +#ifndef CondCore_CondDB_CoralServiceMacros_h +#define CondCore_CondDB_CoralServiceMacros_h -#include "CondCore/DBCommon/interface/CoralServiceFactory.h" +#include "CondCore/CondDB/interface/CoralServiceFactory.h" #include "CoralKernel/Service.h" #define DEFINE_CORALSERVICE(type,name) \ diff --git a/CondCore/DBCommon/interface/CoralServiceManager.h b/CondCore/CondDB/interface/CoralServiceManager.h similarity index 79% rename from CondCore/DBCommon/interface/CoralServiceManager.h rename to CondCore/CondDB/interface/CoralServiceManager.h index 270a9545af9e8..862dc74edfdf9 100644 --- a/CondCore/DBCommon/interface/CoralServiceManager.h +++ b/CondCore/CondDB/interface/CoralServiceManager.h @@ -1,13 +1,13 @@ -#ifndef CondCore_DBCommon_CoralServiceManager_h -#define CondCore_DBCommon_CoralServiceManager_h +#ifndef CondCore_CondDB_CoralServiceManager_h +#define CondCore_CondDB_CoralServiceManager_h #include "CoralKernel/IPluginManager.h" #include #include // -// Package: CondCore/DBCommon +// Package: CondCore/CondDB // Class : CoralServiceManager // -/**\class CoralServiceManager CoralServiceManager.h CondCore/DBCommon/interface/CoralServiceManager.h +/**\class CoralServiceManager CoralServiceManager.h CondCore/CondDB/interface/CoralServiceManager.h Description: This is a bridge that implement coral::IPluginManager interface and internally uses edm plugin factory to create plugins of type coral::Service. diff --git a/CondCore/DBCommon/interface/CredentialStore.h b/CondCore/CondDB/interface/CredentialStore.h similarity index 95% rename from CondCore/DBCommon/interface/CredentialStore.h rename to CondCore/CondDB/interface/CredentialStore.h index b8022d6fdbbac..fb825cf691283 100644 --- a/CondCore/DBCommon/interface/CredentialStore.h +++ b/CondCore/CondDB/interface/CredentialStore.h @@ -1,13 +1,13 @@ -#ifndef INCLUDE_COND_CREDENTIALSTORE_H -#define INCLUDE_COND_CREDENTAILSTORE_H +#ifndef CondCore_CondDB_CredentialStore_h +#define CondCore_CondDB_CredentialStore_h -#include "CondCore/DBCommon/interface/DecodingKey.h" +#include "CondCore/CondDB/interface/DecodingKey.h" // #include #include -//#include #include // +#include "CoralBase/MessageStream.h" namespace coral { @@ -167,9 +167,9 @@ namespace cond { std::string m_principalKey; std::string m_serviceName; - const ServiceCredentials* m_serviceData; + const auth::ServiceCredentials* m_serviceData; - DecodingKey m_key; + auth::DecodingKey m_key; }; diff --git a/CondCore/CondDB/interface/DecodingKey.h b/CondCore/CondDB/interface/DecodingKey.h new file mode 100644 index 0000000000000..bd17d3297b6c8 --- /dev/null +++ b/CondCore/CondDB/interface/DecodingKey.h @@ -0,0 +1,136 @@ +#ifndef CondCore_CondDB_DecodingKey_h +#define CondCore_CondDB_DecodingKey_h + +#include +#include +#include +#include + +namespace cond { + + namespace auth { + + struct ServiceCredentials { + ServiceCredentials(); + std::string connectionString; + std::string userName; + std::string password; + }; + + class KeyGenerator { + public: + + KeyGenerator(); + + std::string make( size_t keySize ); + std::string makeWithRandomSize( size_t maxSize ); + + private: + + int m_iteration; + + }; + + class DecodingKey { + + public: + + static constexpr const char* const FILE_NAME = "db.key"; + static constexpr const char* const FILE_PATH = ".cms_cond/db.key"; + static constexpr size_t DEFAULT_KEY_SIZE = 100; + + static std::string templateFile(); + + public: + + DecodingKey(); + + virtual ~DecodingKey(){} + + size_t init( const std::string& keyFileName, const std::string& password, bool readMode = true ); + + size_t createFromInputFile( const std::string& inputFileName, size_t generatedKeySize = 0 ); + + void list( std::ostream& out ); + + void flush(); + + const std::string& principalName() const; + + const std::string& principalKey() const; + + bool isNominal() const; + + const std::string& ownerName() const; + + const std::map< std::string, ServiceCredentials >& services() const; + + void addDefaultService( const std::string& connectionString ); + + void addService( const std::string& serviceName, const std::string& connectionString, const std::string& userName, const std::string& password ); + + + private: + + std::string m_fileName; + + bool m_mode; + + std::string m_pwd; + + std::string m_principalName; + + std::string m_principalKey; + + std::string m_owner; + + std::map< std::string, ServiceCredentials > m_services; + + }; + } +} + +inline +cond::auth::KeyGenerator::KeyGenerator():m_iteration(0){ +} + +inline +cond::auth::ServiceCredentials::ServiceCredentials():connectionString(""),userName(""),password(""){ +} + +inline +cond::auth::DecodingKey::DecodingKey():m_fileName(""),m_mode( true ),m_pwd(""),m_principalName(""),m_principalKey(""),m_owner(""),m_services(){ +} + +inline +const std::string& +cond::auth::DecodingKey::principalName() const { + return m_principalName; +} + +inline +const std::string& +cond::auth::DecodingKey::principalKey() const { + return m_principalKey; +} + +inline +bool +cond::auth::DecodingKey::isNominal() const { + return !m_owner.empty(); +} + +inline +const std::string& +cond::auth::DecodingKey::ownerName() const { + return m_owner; +} + +inline +const std::map< std::string, cond::auth::ServiceCredentials >& +cond::auth::DecodingKey::services() const { return m_services; } + +#endif // CondCore_CondDB_DecodingKey_h + + + diff --git a/CondCore/CondDB/interface/Exception.h b/CondCore/CondDB/interface/Exception.h index b9cf9846ee95a..bc1ff29854468 100644 --- a/CondCore/CondDB/interface/Exception.h +++ b/CondCore/CondDB/interface/Exception.h @@ -2,8 +2,6 @@ #define CondCore_CondDB_Exception_h #include "FWCore/Utilities/interface/Exception.h" -// to bw removed after the transition -#include "CondCore/DBCommon/interface/Exception.h" namespace cond { @@ -12,6 +10,8 @@ namespace cond { /// Base exception class for the object to relational access class Exception : public cms::Exception { public: + /// Constructor + explicit Exception( const std::string& message ); /// Constructor Exception( const std::string& message, const std::string& methodName ); /// Destructor @@ -21,6 +21,11 @@ namespace cond { void throwException [[noreturn]] ( const std::string& message, const std::string& methodName ); } + + typedef persistency::Exception Exception; + + void throwException [[noreturn]] ( const std::string& message, const std::string& methodName ); + } #endif diff --git a/CondCore/DBCommon/interface/FileUtils.h b/CondCore/CondDB/interface/FileUtils.h similarity index 77% rename from CondCore/DBCommon/interface/FileUtils.h rename to CondCore/CondDB/interface/FileUtils.h index fddd83170dd8f..61132d58c64a0 100644 --- a/CondCore/DBCommon/interface/FileUtils.h +++ b/CondCore/CondDB/interface/FileUtils.h @@ -1,5 +1,5 @@ -#ifndef CondCoreDBCommon_FileUtils_H -#define CondCoreDBCommon_FileUtils_H +#ifndef CondCore_CondDB_FileUtils_h +#define CondCore_CondDB_FileUtils_h #include namespace cond { @@ -32,5 +32,5 @@ const std::string& cond::FileReader::content() const { return m_content; } -#endif // CondCoreDBCommon_FileUtils_H +#endif // CondCore_CondDB_FileUtils_h diff --git a/CondCore/CondDB/interface/Types.h b/CondCore/CondDB/interface/Types.h index 8ba95bfd7349b..5a3b0c41b38ee 100644 --- a/CondCore/CondDB/interface/Types.h +++ b/CondCore/CondDB/interface/Types.h @@ -19,14 +19,12 @@ namespace cond { - // to be removed after the transition to new DB - typedef enum { UNKNOWN_DB=0, COND_DB, ORA_DB } BackendType; - static constexpr BackendType DEFAULT_DB = COND_DB; - // for the validation of migrated data - typedef enum { ERROR=0, MIGRATED, VALIDATED } MigrationStatus; - static const std::vector validationStatusText = { "Error", - "Migrated", - "Validated" }; + struct UserLogInfo{ + std::string provenance; + std::string usertext; + }; + + typedef enum { SYNCH_ANY = 0, diff --git a/CondCore/DBCommon/plugins/RelationalAuthenticationService.cc b/CondCore/CondDB/plugins/RelationalAuthenticationService.cc similarity index 100% rename from CondCore/DBCommon/plugins/RelationalAuthenticationService.cc rename to CondCore/CondDB/plugins/RelationalAuthenticationService.cc diff --git a/CondCore/DBCommon/plugins/RelationalAuthenticationService.h b/CondCore/CondDB/plugins/RelationalAuthenticationService.h similarity index 100% rename from CondCore/DBCommon/plugins/RelationalAuthenticationService.h rename to CondCore/CondDB/plugins/RelationalAuthenticationService.h diff --git a/CondCore/DBCommon/plugins/XMLAuthenticationService.cc b/CondCore/CondDB/plugins/XMLAuthenticationService.cc similarity index 100% rename from CondCore/DBCommon/plugins/XMLAuthenticationService.cc rename to CondCore/CondDB/plugins/XMLAuthenticationService.cc diff --git a/CondCore/DBCommon/plugins/XMLAuthenticationService.h b/CondCore/CondDB/plugins/XMLAuthenticationService.h similarity index 100% rename from CondCore/DBCommon/plugins/XMLAuthenticationService.h rename to CondCore/CondDB/plugins/XMLAuthenticationService.h diff --git a/CondCore/DBCommon/src/Cipher.cc b/CondCore/CondDB/src/Cipher.cc similarity index 83% rename from CondCore/DBCommon/src/Cipher.cc rename to CondCore/CondDB/src/Cipher.cc index 7687973129dcb..b0ec8d301de36 100644 --- a/CondCore/DBCommon/src/Cipher.cc +++ b/CondCore/CondDB/src/Cipher.cc @@ -1,5 +1,5 @@ -#include "CondCore/DBCommon/interface/Cipher.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Cipher.h" +#include "CondCore/CondDB/interface/Exception.h" #include // blowfish encryption #include "blowfish.h" @@ -7,17 +7,17 @@ #include "base64.h" #include -cond::Cipher::Cipher( const std::string& key ): +cond::auth::Cipher::Cipher( const std::string& key ): m_ctx(new BLOWFISH_CTX){ char* k = const_cast(key.c_str()); Blowfish_Init( m_ctx, reinterpret_cast(k), key.size()); } -cond::Cipher::~Cipher(){ +cond::auth::Cipher::~Cipher(){ delete m_ctx; } -size_t cond::Cipher::bf_process_alloc( const unsigned char* input, +size_t cond::auth::Cipher::bf_process_alloc( const unsigned char* input, size_t input_size, unsigned char*& output, bool decrypt ){ @@ -68,7 +68,7 @@ size_t cond::Cipher::bf_process_alloc( const unsigned char* input, return output_size; } -size_t cond::Cipher::encrypt( const std::string& input, unsigned char*& output ){ +size_t cond::auth::Cipher::encrypt( const std::string& input, unsigned char*& output ){ if( input.empty() ) { output = 0; return 0; @@ -76,7 +76,7 @@ size_t cond::Cipher::encrypt( const std::string& input, unsigned char*& output ) return bf_process_alloc( reinterpret_cast(input.c_str()), input.size(), output, false );; } -std::string cond::Cipher::decrypt( const unsigned char* input, size_t inputSize ){ +std::string cond::auth::Cipher::decrypt( const unsigned char* input, size_t inputSize ){ if( !inputSize ) return ""; unsigned char* out = 0; size_t outSize = bf_process_alloc( input, inputSize, out, true ); @@ -102,7 +102,7 @@ std::string cond::Cipher::decrypt( const unsigned char* input, size_t inputSize return ret; } -std::string cond::Cipher::b64encrypt( const std::string& input ){ +std::string cond::auth::Cipher::b64encrypt( const std::string& input ){ if( input.empty() ) return ""; unsigned char* out = 0; size_t outSize = bf_process_alloc( reinterpret_cast(input.c_str()), input.size(), out, false ); @@ -114,7 +114,7 @@ std::string cond::Cipher::b64encrypt( const std::string& input ){ return ret; } -std::string cond::Cipher::b64decrypt( const std::string& b64in ){ +std::string cond::auth::Cipher::b64decrypt( const std::string& b64in ){ if( b64in.empty() ) return ""; char* input = 0; size_t inputSize = 0; diff --git a/CondCore/CondDB/src/ConnectionPool.cc b/CondCore/CondDB/src/ConnectionPool.cc index 02400141b9e33..3e65f8bd789c2 100644 --- a/CondCore/CondDB/src/ConnectionPool.cc +++ b/CondCore/CondDB/src/ConnectionPool.cc @@ -3,8 +3,8 @@ #include "SessionImpl.h" #include "IOVSchema.h" // -#include "CondCore/DBCommon/interface/CoralServiceManager.h" -#include "CondCore/DBCommon/interface/Auth.h" +#include "CondCore/CondDB/interface/CoralServiceManager.h" +#include "CondCore/CondDB/interface/Auth.h" // CMSSW includes #include "FWCore/ParameterSet/interface/ParameterSet.h" // coral includes @@ -83,14 +83,14 @@ namespace cond { // authentication if( authPath.empty() ){ // first try to check the env... - const char* authEnv = ::getenv( cond::Auth::COND_AUTH_PATH ); + const char* authEnv = ::getenv( cond::auth::COND_AUTH_PATH ); if(authEnv){ authPath += authEnv; } } int authSys = m_authSys; // first attempt, look at the env... - const char* authSysEnv = ::getenv( cond::Auth::COND_AUTH_SYS ); + const char* authSysEnv = ::getenv( cond::auth::COND_AUTH_SYS ); if( authSysEnv ){ authSys = ::atoi( authSysEnv ); } @@ -115,7 +115,7 @@ namespace cond { } if( !authPath.empty() ){ authServiceName = servName; - coral::Context::instance().PropertyManager().property(cond::Auth::COND_AUTH_PATH_PROPERTY)->set(authPath); + coral::Context::instance().PropertyManager().property(cond::auth::COND_AUTH_PATH_PROPERTY)->set(authPath); coral::Context::instance().loadComponent( authServiceName, m_pluginManager ); } @@ -140,7 +140,7 @@ namespace cond { } return boost::shared_ptr( connServ.connect( fullConnectionPars.first, - writeCapable?Auth::COND_WRITER_ROLE:Auth::COND_READER_ROLE, + writeCapable?auth::COND_WRITER_ROLE:auth::COND_READER_ROLE, writeCapable?coral::Update:coral::ReadOnly ) ); } diff --git a/CondCore/DBCommon/src/CoralServiceFactory.cc b/CondCore/CondDB/src/CoralServiceFactory.cc similarity index 88% rename from CondCore/DBCommon/src/CoralServiceFactory.cc rename to CondCore/CondDB/src/CoralServiceFactory.cc index dc094bd08b2c6..804fc79e5bcc5 100644 --- a/CondCore/DBCommon/src/CoralServiceFactory.cc +++ b/CondCore/CondDB/src/CoralServiceFactory.cc @@ -1,5 +1,5 @@ -#include "CondCore/DBCommon/interface/CoralServiceFactory.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/CoralServiceFactory.h" +#include "CondCore/CondDB/interface/Exception.h" #include "CoralKernel/Service.h" EDM_REGISTER_PLUGINFACTORY(cond::CoralServicePluginFactory,"CoralService"); diff --git a/CondCore/DBCommon/src/CoralServiceManager.cc b/CondCore/CondDB/src/CoralServiceManager.cc similarity index 86% rename from CondCore/DBCommon/src/CoralServiceManager.cc rename to CondCore/CondDB/src/CoralServiceManager.cc index 42260c855503a..c096a47c83fad 100644 --- a/CondCore/DBCommon/src/CoralServiceManager.cc +++ b/CondCore/CondDB/src/CoralServiceManager.cc @@ -2,8 +2,8 @@ #include "CoralKernel/ILoadableComponent.h" #include "FWCore/PluginManager/interface/PluginFactory.h" #include "FWCore/PluginManager/interface/PluginInfo.h" -#include "CondCore/DBCommon/interface/CoralServiceManager.h" -#include "CondCore/DBCommon/interface/CoralServiceFactory.h" +#include "CondCore/CondDB/interface/CoralServiceManager.h" +#include "CondCore/CondDB/interface/CoralServiceFactory.h" coral::ILoadableComponent* cond::CoralServiceManager::newComponent( const std::string& componentname ){ return cond::CoralServiceFactory::get()->create(componentname); diff --git a/CondCore/DBCommon/src/CredentialStore.cc b/CondCore/CondDB/src/CredentialStore.cc similarity index 90% rename from CondCore/DBCommon/src/CredentialStore.cc rename to CondCore/CondDB/src/CredentialStore.cc index dda57e7b932d7..cbc6c27e3b573 100644 --- a/CondCore/DBCommon/src/CredentialStore.cc +++ b/CondCore/CondDB/src/CredentialStore.cc @@ -1,12 +1,10 @@ -#include "CondCore/DBCommon/interface/CredentialStore.h" -#include "CondCore/DBCommon/interface/Cipher.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/Auth.h" -#include "CondCore/ORA/interface/SequenceManager.h" +#include "CondCore/CondDB/interface/CredentialStore.h" +#include "CondCore/CondDB/interface/Cipher.h" +#include "CondCore/CondDB/interface/Exception.h" +#include "CondCore/CondDB/interface/Auth.h" // #include "CoralBase/AttributeList.h" #include "CoralBase/Attribute.h" -#include "CoralBase/MessageStream.h" #include "CoralKernel/Context.h" #include "CoralCommon/URIParser.h" #include "RelationalAccess/AuthenticationCredentials.h" @@ -49,7 +47,7 @@ void coral_bridge::AuthenticationCredentialSet::reset(){ void coral_bridge::AuthenticationCredentialSet::registerItem( const std::string& connectionString, const std::string& itemName, const std::string& itemValue ){ - registerItem( connectionString, cond::Auth::COND_DEFAULT_ROLE, itemName, itemValue ); + registerItem( connectionString, cond::auth::COND_DEFAULT_ROLE, itemName, itemValue ); } @@ -70,7 +68,7 @@ void coral_bridge::AuthenticationCredentialSet::registerCredentials( const std::string& connectionString, const std::string& userName, const std::string& password ){ - registerCredentials( connectionString, cond::Auth::COND_DEFAULT_ROLE, userName, password ); + registerCredentials( connectionString, cond::auth::COND_DEFAULT_ROLE, userName, password ); } void @@ -100,7 +98,7 @@ void coral_bridge::AuthenticationCredentialSet::import( const AuthenticationCred const coral::IAuthenticationCredentials* coral_bridge::AuthenticationCredentialSet::get( const std::string& connectionString ) const { - return get( connectionString, cond::Auth::COND_DEFAULT_ROLE ); + return get( connectionString, cond::auth::COND_DEFAULT_ROLE ); } const coral::IAuthenticationCredentials* @@ -120,6 +118,8 @@ const std::map< std::pair, coral::AuthenticationCredent } static const std::string SEQUENCE_TABLE_NAME("COND_CREDENTIAL_SEQUENCE"); +static const std::string SEQUENCE_NAME_COL("NAME"); +static const std::string SEQUENCE_VALUE_COL("VALUE"); static const std::string COND_AUTHENTICATION_TABLE("COND_AUTHENTICATION"); static const std::string PRINCIPAL_ID_COL("P_ID"); @@ -353,16 +353,49 @@ void cond::CredentialStore::closeSession( bool commit ){ m_connection.reset(); } +bool getNextSequenceValue( coral::ISchema& schema, const std::string& sequenceName, int& value ){ + bool ret = false; + std::auto_ptr< coral::IQuery > query( schema.tableHandle( SEQUENCE_TABLE_NAME ).newQuery() ); + query->limitReturnedRows( 1, 0 ); + query->addToOutputList( SEQUENCE_VALUE_COL ); + query->defineOutputType( SEQUENCE_VALUE_COL, coral::AttributeSpecification::typeNameForType() ); + query->setForUpdate(); + std::string whereClause( SEQUENCE_NAME_COL + " = :" + SEQUENCE_NAME_COL ); + coral::AttributeList rowData; + rowData.extend( SEQUENCE_NAME_COL ); + rowData.begin()->data< std::string >() = sequenceName; + query->setCondition( whereClause, rowData ); + coral::ICursor& cursor = query->execute(); + if ( cursor.next() ) { + value = cursor.currentRow().begin()->data()+1; + ret = true; + } else { + return false; + } + // update... + coral::AttributeList updateData; + updateData.extend( SEQUENCE_NAME_COL ); + updateData.extend( SEQUENCE_VALUE_COL ); + std::string setClause( SEQUENCE_VALUE_COL + " = :" + SEQUENCE_VALUE_COL ); + std::string whClause( SEQUENCE_NAME_COL + " = :" + SEQUENCE_NAME_COL ); + coral::AttributeList::iterator iAttribute = updateData.begin(); + iAttribute->data< std::string >() = sequenceName; + ++iAttribute; + iAttribute->data< int >() = value; + schema.tableHandle( SEQUENCE_TABLE_NAME ).dataEditor().updateRows( setClause,whClause,updateData ); + return ret; +} + int cond::CredentialStore::addUser( const std::string& principalName, const std::string& authenticationKey, const std::string& principalKey, const std::string& adminKey ){ coral::ISchema& schema = m_session->nominalSchema(); coral::ITableDataEditor& editor0 = schema.tableHandle(COND_AUTHENTICATION_TABLE).dataEditor(); - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME,schema ); - int principalId = sequenceMgr.getNextId( COND_AUTHENTICATION_TABLE, true ); + int principalId = -1; + if( !getNextSequenceValue( schema, COND_AUTHENTICATION_TABLE, principalId ) ) throwException( "Can't find "+COND_AUTHENTICATION_TABLE+" sequence.","CredentialStore::addUser" ); - Cipher cipher0( authenticationKey ); - Cipher cipher1( adminKey ); + auth::Cipher cipher0( authenticationKey ); + auth::Cipher cipher1( adminKey ); coral::AttributeList authData; editor0.rowBuffer(authData); @@ -430,7 +463,7 @@ void cond::CredentialStore::startSession( bool readMode ){ throwException( "Invalid credentials provided.(0)", "CredentialStore::openSession"); } - Cipher cipher0( m_key.principalKey() ); + auth::Cipher cipher0( m_key.principalKey() ); std::string verifStr = cipher0.b64decrypt( princData.verifKey ); if( verifStr != principalName ){ throwException( "Invalid credentials provided (1)", @@ -442,7 +475,7 @@ void cond::CredentialStore::startSession( bool readMode ){ if(!readMode ) { - Cipher cipher0( m_principalKey ); + auth::Cipher cipher0( m_principalKey ); std::string adminKey = cipher0.b64decrypt( princData.adminKey ); if( adminKey != m_principalKey ){ // not admin user! @@ -465,7 +498,7 @@ void cond::CredentialStore::startSession( bool readMode ){ whereData.extend(ROLE_COL); whereData.extend(SCHEMA_COL); whereData[ P_ID_COL ].data() = m_principalId; - whereData[ ROLE_COL ].data() = Auth::COND_ADMIN_ROLE; + whereData[ ROLE_COL ].data() = auth::COND_ADMIN_ROLE; whereData[ SCHEMA_COL ].data() = storeConnectionString; std::stringstream whereClause; whereClause << "AUTHO."<< C_ID_COL << " = CREDS."<(); const std::string& encryptedConnectionKey = row[ "CREDS."+CONNECTION_KEY_COL ].data(); std::string connectionKey = cipher0.b64decrypt( encryptedConnectionKey ); - Cipher cipher1( connectionKey ); + auth::Cipher cipher1( connectionKey ); const std::string& encryptedUserName = row[ "CREDS."+USERNAME_COL ].data(); const std::string& encryptedPassword = row[ "CREDS."+PASSWORD_COL ].data(); const std::string& verificationKey = row[ "CREDS."+VERIFICATION_KEY_COL ].data(); @@ -513,7 +546,7 @@ void cond::CredentialStore::startSession( bool readMode ){ bool cond::CredentialStore::setPermission( int principalId, const std::string& principalKey, const std::string& role, const std::string& connectionString, int connectionId, const std::string& connectionKey ){ coral::ISchema& schema = m_session->nominalSchema(); - Cipher cipher( principalKey ); + auth::Cipher cipher( principalKey ); std::string encryptedConnectionKey = cipher.b64encrypt( connectionKey ); AuthorizationData authData; @@ -533,8 +566,8 @@ bool cond::CredentialStore::setPermission( int principalId, const std::string& p editor.updateRows( setCl,whereCl, updateData ); } else { - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME,schema ); - int next = sequenceMgr.getNextId( COND_AUTHORIZATION_TABLE, true ); + int next = -1; + if( !getNextSequenceValue( schema, COND_AUTHORIZATION_TABLE, next ) ) throwException( "Can't find "+COND_AUTHORIZATION_TABLE+" sequence.","CredentialStore::setPermission" ); coral::AttributeList insertData; insertData.extend( AUTH_ID_COL ); @@ -563,13 +596,13 @@ std::pair cond::CredentialStore::updateConnection( const std::s bool found = selectConnection( schema, connectionLabel, credsData ); int connId = credsData.id; - Cipher adminCipher( m_principalKey ); + auth::Cipher adminCipher( m_principalKey ); std::string connectionKey(""); coral::ITableDataEditor& editor = schema.tableHandle(COND_CREDENTIAL_TABLE).dataEditor(); if( found ){ connectionKey = adminCipher.b64decrypt( credsData.connectionKey ); - Cipher cipher( connectionKey ); + auth::Cipher cipher( connectionKey ); std::string verificationKey = cipher.b64decrypt( credsData.verificationKey ); if( verificationKey != connectionLabel ){ throwException("Decoding of connection key failed.","CredentialStore::updateConnection"); @@ -595,15 +628,14 @@ std::pair cond::CredentialStore::updateConnection( const std::s if(!found){ - KeyGenerator gen; - connectionKey = gen.make( Auth::COND_DB_KEY_SIZE ); - Cipher cipher( connectionKey ); + auth::KeyGenerator gen; + connectionKey = gen.make( auth::COND_DB_KEY_SIZE ); + auth::Cipher cipher( connectionKey ); std::string encryptedUserName = cipher.b64encrypt( userName ); std::string encryptedPassword = cipher.b64encrypt( password ); std::string encryptedLabel = cipher.b64encrypt( connectionLabel ); - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME,schema ); - connId = sequenceMgr.getNextId( COND_CREDENTIAL_TABLE, true ); + if( !getNextSequenceValue( schema, COND_CREDENTIAL_TABLE, connId ) ) throwException( "Can't find "+COND_CREDENTIAL_TABLE+" sequence.","CredentialStore::updateConnection" ); coral::AttributeList insertData; insertData.extend( CONNECTION_ID_COL ); @@ -635,7 +667,7 @@ std::pair cond::CredentialStore::updateConnection( const std::s authData.extend( C_ID_COL ); authData[ AUTH_ID_COL ].data() = authId; authData[ P_ID_COL ].data() = m_principalId; - authData[ ROLE_COL ].data() = Auth::COND_ADMIN_ROLE; + authData[ ROLE_COL ].data() = auth::COND_ADMIN_ROLE; authData[ SCHEMA_COL ].data() = defaultConnectionString( m_serviceData->connectionString, m_serviceName, userName ); authData[ AUTH_KEY_COL ].data() = adminCipher.b64encrypt( connectionKey ) ; authData[ C_ID_COL ].data() = connId; @@ -674,12 +706,12 @@ cond::CredentialStore::setUpForService( const std::string& serviceName, if(!boost::filesystem::exists(authPath) || !boost::filesystem::is_directory( authPath )){ throwException( "Authentication Path is invalid.","cond::CredentialStore::setUpForService" ); } - boost::filesystem::path file( DecodingKey::FILE_PATH ); + boost::filesystem::path file( auth::DecodingKey::FILE_PATH ); fullPath /= file; - m_key.init( fullPath.string(), Auth::COND_KEY ); + m_key.init( fullPath.string(), auth::COND_KEY ); - std::map< std::string, ServiceCredentials >::const_iterator iK = m_key.services().find( serviceName ); + std::map< std::string, auth::ServiceCredentials >::const_iterator iK = m_key.services().find( serviceName ); if( iK == m_key.services().end() ){ std::string msg(""); msg += "Service \""+serviceName+"\" can't be open with the current key."; @@ -704,6 +736,17 @@ cond::CredentialStore::setUpForConnectionString( const std::string& connectionSt return setUpForService( serviceName, authPath ); } +void addSequence( coral::ISchema& schema, const std::string& name ){ + // Create the entry in the table + coral::AttributeList insertData; + insertData.extend( SEQUENCE_NAME_COL ); + insertData.extend(SEQUENCE_VALUE_COL); + coral::AttributeList::iterator iAttribute = insertData.begin(); + iAttribute->data< std::string >() = name; + ++iAttribute; + iAttribute->data< int >() = -1; + schema.tableHandle( SEQUENCE_TABLE_NAME ).dataEditor().insertRow( insertData ); +} bool cond::CredentialStore::createSchema( const std::string& connectionString, const std::string& userName, const std::string& password ) { @@ -714,11 +757,22 @@ cond::CredentialStore::createSchema( const std::string& connectionString, const if(schema.existsTable(COND_AUTHENTICATION_TABLE)) { throwException("Credential database, already exists.","CredentialStore::create"); } - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME, schema ); + + coral::TableDescription dseq; + dseq.setName( SEQUENCE_TABLE_NAME ); + + dseq.insertColumn( SEQUENCE_NAME_COL, coral::AttributeSpecification::typeNameForType() ); + dseq.setNotNullConstraint( SEQUENCE_NAME_COL ); + dseq.insertColumn( SEQUENCE_VALUE_COL,coral::AttributeSpecification::typeNameForType() ); + dseq.setNotNullConstraint( SEQUENCE_VALUE_COL ); + dseq.setPrimaryKey( std::vector< std::string >( 1, SEQUENCE_NAME_COL ) ); + schema.createTable( dseq ); + int columnSize = 2000; // authentication table - sequenceMgr.create( COND_AUTHENTICATION_TABLE ); + + addSequence( schema, COND_AUTHENTICATION_TABLE ); coral::TableDescription descr0; descr0.setName( COND_AUTHENTICATION_TABLE ); descr0.insertColumn( PRINCIPAL_ID_COL, coral::AttributeSpecification::typeNameForType()); @@ -740,7 +794,7 @@ cond::CredentialStore::createSchema( const std::string& connectionString, const schema.createTable( descr0 ); // authorization table - sequenceMgr.create( COND_AUTHORIZATION_TABLE ); + addSequence( schema, COND_AUTHORIZATION_TABLE ); coral::TableDescription descr1; descr1.setName( COND_AUTHORIZATION_TABLE ); descr1.insertColumn( AUTH_ID_COL, coral::AttributeSpecification::typeNameForType()); @@ -766,7 +820,7 @@ cond::CredentialStore::createSchema( const std::string& connectionString, const schema.createTable( descr1 ); // credential table - sequenceMgr.create( COND_CREDENTIAL_TABLE ); + addSequence( schema, COND_CREDENTIAL_TABLE ); coral::TableDescription descr2; descr2.setName( COND_CREDENTIAL_TABLE ); descr2.insertColumn( CONNECTION_ID_COL, coral::AttributeSpecification::typeNameForType()); @@ -828,16 +882,16 @@ bool cond::CredentialStore::installAdmin( const std::string& userName, const std throwException(msg,"CredentialStore::installAdmin"); } - KeyGenerator gen; - m_principalKey = gen.make( Auth::COND_DB_KEY_SIZE ); + auth::KeyGenerator gen; + m_principalKey = gen.make( auth::COND_DB_KEY_SIZE ); coral::ITableDataEditor& editor0 = schema.tableHandle(COND_AUTHENTICATION_TABLE).dataEditor(); - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME,schema ); - int principalId = sequenceMgr.getNextId( COND_AUTHENTICATION_TABLE, true ); + int principalId = -1; + if( !getNextSequenceValue( schema, COND_AUTHENTICATION_TABLE, principalId ) ) throwException( "Can't find "+COND_AUTHENTICATION_TABLE+" sequence.","CredentialStore::installAdmin" ); - Cipher cipher0( m_key.principalKey() ); - Cipher cipher1( m_principalKey ); + auth::Cipher cipher0( m_key.principalKey() ); + auth::Cipher cipher1( m_principalKey ); coral::AttributeList authData; editor0.rowBuffer(authData); @@ -849,16 +903,17 @@ bool cond::CredentialStore::installAdmin( const std::string& userName, const std editor0.insertRow( authData ); std::string connLabel = schemaLabelForCredentialStore( connectionString ); - DecodingKey tmpKey; - std::string connectionKey = gen.make( Auth::COND_DB_KEY_SIZE ); + auth::DecodingKey tmpKey; + std::string connectionKey = gen.make( auth::COND_DB_KEY_SIZE ); std::string encryptedConnectionKey = cipher1.b64encrypt( connectionKey ); - Cipher cipher2( connectionKey ); + auth::Cipher cipher2( connectionKey ); std::string encryptedUserName = cipher2.b64encrypt( userName ); std::string encryptedPassword = cipher2.b64encrypt( password ); std::string encryptedLabel = cipher2.b64encrypt( connLabel ); - int connId = sequenceMgr.getNextId( COND_CREDENTIAL_TABLE, true ); + int connId = -1; + if( !getNextSequenceValue( schema, COND_CREDENTIAL_TABLE, connId ) ) throwException( "Can't find "+COND_CREDENTIAL_TABLE+" sequence.","CredentialStore::installAdmin" ); coral::ITableDataEditor& editor1 = schema.tableHandle(COND_CREDENTIAL_TABLE).dataEditor(); coral::AttributeList connectionData; @@ -871,14 +926,15 @@ bool cond::CredentialStore::installAdmin( const std::string& userName, const std connectionData[ CONNECTION_KEY_COL ].data() = encryptedConnectionKey; editor1.insertRow( connectionData ); - int authId = sequenceMgr.getNextId( COND_AUTHORIZATION_TABLE, true ); + int authId = -1; + if( !getNextSequenceValue( schema, COND_AUTHORIZATION_TABLE, authId ) ) throwException( "Can't find "+COND_AUTHORIZATION_TABLE+" sequence.","CredentialStore::installAdmin" ); coral::ITableDataEditor& editor2 = schema.tableHandle(COND_AUTHORIZATION_TABLE).dataEditor(); coral::AttributeList permissionData; editor2.rowBuffer(permissionData); permissionData[ AUTH_ID_COL ].data() = authId; permissionData[ P_ID_COL ].data() = principalId; - permissionData[ ROLE_COL ].data() = Auth::COND_ADMIN_ROLE; + permissionData[ ROLE_COL ].data() = auth::COND_ADMIN_ROLE; permissionData[ SCHEMA_COL ].data() = connectionString; permissionData[ AUTH_KEY_COL ].data() = encryptedConnectionKey; permissionData[ C_ID_COL ].data() = connId; @@ -899,8 +955,8 @@ bool cond::CredentialStore::updatePrincipal( const std::string& principalName, PrincipalData princData; bool found = selectPrincipal( schema, principalName, princData ); - Cipher adminCipher( m_principalKey ); - Cipher cipher( authenticationKey ); + auth::Cipher adminCipher( m_principalKey ); + auth::Cipher cipher( authenticationKey ); std::string verifStr = cipher.b64encrypt( principalName ); std::string principalKey(""); if( setAdmin ) principalKey = m_principalKey; @@ -926,14 +982,13 @@ bool cond::CredentialStore::updatePrincipal( const std::string& principalName, editor.updateRows( setClause.str(),whereClause, updateData ); } else { if( principalKey.empty() ) { - KeyGenerator gen; - principalKey = gen.make( Auth::COND_DB_KEY_SIZE ); + auth::KeyGenerator gen; + principalKey = gen.make( auth::COND_DB_KEY_SIZE ); } coral::ITableDataEditor& editor0 = schema.tableHandle(COND_AUTHENTICATION_TABLE).dataEditor(); - ora::SequenceManager sequenceMgr( SEQUENCE_TABLE_NAME,schema ); - principalId = sequenceMgr.getNextId( COND_AUTHENTICATION_TABLE, true ); + if( !getNextSequenceValue( schema, COND_AUTHENTICATION_TABLE, principalId ) ) throwException( "Can't find "+COND_AUTHENTICATION_TABLE+" sequence.","CredentialStore::updatePrincipal" ); coral::AttributeList authData; editor0.rowBuffer(authData); @@ -953,7 +1008,7 @@ bool cond::CredentialStore::updatePrincipal( const std::string& principalName, if(!found){ throwException("Credential Store connection has not been defined.","CredentialStore::updatePrincipal"); } - setPermission( principalId, principalKey, Auth::COND_ADMIN_ROLE, connString, credsData.id, adminCipher.b64decrypt( credsData.connectionKey ) ); + setPermission( principalId, principalKey, auth::COND_ADMIN_ROLE, connString, credsData.id, adminCipher.b64decrypt( credsData.connectionKey ) ); } session.close(); @@ -986,7 +1041,7 @@ bool cond::CredentialStore::setPermission( const std::string& principal, throwException( msg, "CredentialStore::setPermission"); } - Cipher cipher( m_principalKey ); + auth::Cipher cipher( m_principalKey ); bool ret = setPermission( princData.id, cipher.b64decrypt( princData.adminKey), role, connectionString, credsData.id, cipher.b64decrypt( credsData.connectionKey ) ); session.close(); return ret; @@ -1111,7 +1166,7 @@ bool cond::CredentialStore::selectForUser( coral_bridge::AuthenticationCredentia session.start( true ); coral::ISchema& schema = m_session->nominalSchema(); - Cipher cipher( m_principalKey ); + auth::Cipher cipher( m_principalKey ); std::auto_ptr query(schema.newQuery()); query->addToTableList(COND_AUTHORIZATION_TABLE, "AUTHO"); @@ -1150,7 +1205,7 @@ bool cond::CredentialStore::selectForUser( coral_bridge::AuthenticationCredentia const std::string& encryptedPassword = row[ "CREDS."+PASSWORD_COL ].data(); const std::string& encryptedLabel = row[ "CREDS."+VERIFICATION_KEY_COL ].data(); std::string authKey = cipher.b64decrypt( encryptedAuthKey ); - Cipher connCipher( authKey ); + auth::Cipher connCipher( authKey ); if( connCipher.b64decrypt( encryptedLabel ) == connectionLabel ){ destinationData.registerCredentials( connectionString, role, connCipher.b64decrypt( encryptedUserName ), connCipher.b64decrypt( encryptedPassword ) ); } @@ -1175,7 +1230,7 @@ bool cond::CredentialStore::importForPrincipal( const std::string& principal, } bool imported = false; - Cipher cipher( m_principalKey ); + auth::Cipher cipher( m_principalKey ); std::string princKey = cipher.b64decrypt( princData.adminKey); const std::map< std::pair, coral::AuthenticationCredentials* >& creds = dataSource.data(); @@ -1189,7 +1244,7 @@ bool cond::CredentialStore::importForPrincipal( const std::string& principal, std::string password = iConn->second->valueForItem( coral::IAuthenticationCredentials::passwordItem()); // first import the connections std::pair conn = updateConnection( schemaLabel( serviceName, userName ), userName, password, forceUpdateConnection ); - Cipher cipher( m_principalKey ); + auth::Cipher cipher( m_principalKey ); // than set the permission for the specific role setPermission( princData.id, princKey, role, connectionString, conn.first, conn.second ); imported = true; @@ -1241,7 +1296,7 @@ bool cond::CredentialStore::listConnections( std::mapaddToOutputList( CONNECTION_KEY_COL ); coral::ICursor& cursor = query->execute(); bool found = false; - Cipher cipher0(m_principalKey ); + auth::Cipher cipher0(m_principalKey ); while ( cursor.next() ) { std::string userName(""); std::string password(""); @@ -1250,7 +1305,7 @@ bool cond::CredentialStore::listConnections( std::map(); const std::string& encryptedVerif = row[ VERIFICATION_KEY_COL].data(); std::string connKey = cipher0.b64decrypt( encryptedKey ); - Cipher cipher1( connKey ); + auth::Cipher cipher1( connKey ); std::string verif = cipher1.b64decrypt( encryptedVerif ); if( verif == connLabel ){ const std::string& encryptedUserName = row[ USERNAME_COL].data(); @@ -1356,7 +1411,7 @@ bool cond::CredentialStore::exportAll( coral_bridge::AuthenticationCredentialSet query->setCondition( whereClause.str(), whereData ); coral::ICursor& cursor = query->execute(); bool found = false; - Cipher cipher0( m_principalKey ); + auth::Cipher cipher0( m_principalKey ); while ( cursor.next() ) { const coral::AttributeList& row = cursor.currentRow(); const std::string& role = row[ "AUTHO."+ROLE_COL ].data(); @@ -1367,7 +1422,7 @@ bool cond::CredentialStore::exportAll( coral_bridge::AuthenticationCredentialSet std::string userName(""); std::string password(""); std::string connectionKey = cipher0.b64decrypt( encryptedConnection ); - Cipher cipher1( connectionKey ); + auth::Cipher cipher1( connectionKey ); std::string verifKey = cipher1.b64decrypt( encryptedVerifKey ); if( verifKey == connectionLabel ){ const std::string& encryptedUserName = row[ "CREDS."+USERNAME_COL].data(); diff --git a/CondCore/CondDB/src/DbConnectionString.cc b/CondCore/CondDB/src/DbConnectionString.cc index b99c8608b2a2a..71b663fd2198f 100644 --- a/CondCore/CondDB/src/DbConnectionString.cc +++ b/CondCore/CondDB/src/DbConnectionString.cc @@ -2,7 +2,7 @@ #include "CondCore/CondDB/interface/Utils.h" #include "DbConnectionString.h" // -#include "CondCore/DBCommon/interface/FipProtocolParser.h" +#include "FWCore/ParameterSet/interface/FileInPath.h" #include "FWCore/Catalog/interface/SiteLocalConfig.h" #include "FWCore/ServiceRegistry/interface/Service.h" @@ -26,9 +26,18 @@ namespace cond { return count; } + std::string parseFipConnectionString(const std::string& fipConnect){ + std::string connect("sqlite_file:"); + std::string::size_type pos=fipConnect.find(':'); + std::string fipLocation=fipConnect.substr(pos+1); + edm::FileInPath fip(fipLocation); + connect.append( fip.fullPath() ); + return connect; + } + std::pair getConnectionParams( const std::string& connectionString, const std::string& transactionId ){ - if( connectionString.empty() ) throwException( "The connection string is empty.","getConnectionParams"); + if( connectionString.empty() ) cond::throwException( "The connection string is empty.","getConnectionParams"); std::string protocol = getConnectionProtocol( connectionString ); std::string finalConn = connectionString; std::string refreshConn(""); @@ -39,7 +48,7 @@ namespace cond { if(nslash==1){ edm::Service localconfservice; if( !localconfservice.isAvailable() ){ - throwException("edm::SiteLocalConfigService is not available","getConnectionParams"); + cond::throwException("edm::SiteLocalConfigService is not available","getConnectionParams"); } finalConn=localconfservice->lookupCalibConnect(connectionString); } @@ -64,8 +73,7 @@ namespace cond { } } } else if ( protocol == "sqlite_fip" ){ - cond::FipProtocolParser parser; - finalConn = parser.getRealConnect( connectionString ); + finalConn = parseFipConnectionString( connectionString ); } return std::make_pair( finalConn, refreshConn ); } diff --git a/CondCore/DBCommon/src/DecodingKey.cc b/CondCore/CondDB/src/DecodingKey.cc similarity index 90% rename from CondCore/DBCommon/src/DecodingKey.cc rename to CondCore/CondDB/src/DecodingKey.cc index e5a0079f0c628..b72c829a19546 100644 --- a/CondCore/DBCommon/src/DecodingKey.cc +++ b/CondCore/CondDB/src/DecodingKey.cc @@ -1,7 +1,7 @@ -#include "CondCore/DBCommon/interface/DecodingKey.h" -#include "CondCore/DBCommon/interface/FileUtils.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/Cipher.h" +#include "CondCore/CondDB/interface/DecodingKey.h" +#include "CondCore/CondDB/interface/FileUtils.h" +#include "CondCore/CondDB/interface/Exception.h" +#include "CondCore/CondDB/interface/Cipher.h" // #include #include @@ -71,7 +71,7 @@ namespace cond { } -std::string cond::KeyGenerator::make( size_t keySize ){ +std::string cond::auth::KeyGenerator::make( size_t keySize ){ ::srand( m_iteration+2 ); int rseed = ::rand(); int seed = ::time( NULL)%10 + rseed; @@ -84,7 +84,7 @@ std::string cond::KeyGenerator::make( size_t keySize ){ return ret; } -std::string cond::KeyGenerator::makeWithRandomSize( size_t maxSize ){ +std::string cond::auth::KeyGenerator::makeWithRandomSize( size_t maxSize ){ ::srand( m_iteration+2 ); int rseed = ::rand(); int seed = ::time( NULL)%10 + rseed; @@ -93,10 +93,7 @@ std::string cond::KeyGenerator::makeWithRandomSize( size_t maxSize ){ return make( sz ); } -const std::string cond::DecodingKey::FILE_NAME("db.key"); -const std::string cond::DecodingKey::FILE_PATH(".cms_cond/"+FILE_NAME); - -std::string cond::DecodingKey::templateFile(){ +std::string cond::auth::DecodingKey::templateFile(){ std::stringstream s; s<"<"< +#include + +bool cond::FileReader::read(const std::string& fileName){ + std::ifstream inputFile; + inputFile.open (fileName.c_str()); + if(!inputFile.good()){ + std::stringstream msg; + msg << "File \"" << fileName << "\" cannot be open."; + inputFile.close(); + throw cond::Exception(msg.str()); + } + // get pointer to associated buffer object + std::filebuf* pbuf=inputFile.rdbuf(); + // get file size using buffer's members + long size=pbuf->pubseekoff (0,std::ios::end,std::ios::in); + pbuf->pubseekpos (0,std::ios::in); + // allocate memory to contain file data + char* buffer=new char[size+1]; + // get file data + pbuf->sgetn (buffer,size); + inputFile.close(); + buffer[size]=0; + m_content += buffer; + delete [] buffer; + return true; +} diff --git a/CondCore/CondDB/src/SessionImpl.h b/CondCore/CondDB/src/SessionImpl.h index bd267da50ec6a..dff8258fd1921 100644 --- a/CondCore/CondDB/src/SessionImpl.h +++ b/CondCore/CondDB/src/SessionImpl.h @@ -5,8 +5,6 @@ #include "IOVSchema.h" #include "GTSchema.h" // -#include "CondCore/DBCommon/interface/DbSession.h" -// #include "RelationalAccess/ConnectionService.h" #include "RelationalAccess/ISessionProxy.h" // diff --git a/CondCore/DBCommon/src/base64.cc b/CondCore/CondDB/src/base64.cc similarity index 100% rename from CondCore/DBCommon/src/base64.cc rename to CondCore/CondDB/src/base64.cc diff --git a/CondCore/DBCommon/src/base64.h b/CondCore/CondDB/src/base64.h similarity index 100% rename from CondCore/DBCommon/src/base64.h rename to CondCore/CondDB/src/base64.h diff --git a/CondCore/DBCommon/src/blowfish.cc b/CondCore/CondDB/src/blowfish.cc similarity index 100% rename from CondCore/DBCommon/src/blowfish.cc rename to CondCore/CondDB/src/blowfish.cc diff --git a/CondCore/DBCommon/src/blowfish.h b/CondCore/CondDB/src/blowfish.h similarity index 100% rename from CondCore/DBCommon/src/blowfish.h rename to CondCore/CondDB/src/blowfish.h diff --git a/CondCore/CondDB/test/testConditionDatabase_0.cpp b/CondCore/CondDB/test/testConditionDatabase_0.cpp index 788cf571ae0ef..a68536d7eeb84 100644 --- a/CondCore/CondDB/test/testConditionDatabase_0.cpp +++ b/CondCore/CondDB/test/testConditionDatabase_0.cpp @@ -6,9 +6,6 @@ // #include "CondCore/CondDB/interface/ConnectionPool.h" // -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbSession.h" #include "MyTestData.h" // #include diff --git a/CondCore/CondDB/test/testReadWritePayloads.cpp b/CondCore/CondDB/test/testReadWritePayloads.cpp index e701d5df5bf80..18958141c8f0b 100644 --- a/CondCore/CondDB/test/testReadWritePayloads.cpp +++ b/CondCore/CondDB/test/testReadWritePayloads.cpp @@ -7,9 +7,6 @@ // #include "CondCore/CondDB/interface/ConnectionPool.h" // -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbSession.h" #include "MyTestData.h" // #include "ArrayPayload.h" // #include "SimplePayload.h" diff --git a/CondCore/DBCommon/BuildFile.xml b/CondCore/DBCommon/BuildFile.xml deleted file mode 100644 index bd44da2f67856..0000000000000 --- a/CondCore/DBCommon/BuildFile.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/CondCore/DBCommon/doc/DBCommon.doc b/CondCore/DBCommon/doc/DBCommon.doc deleted file mode 100644 index dd9cf2872f933..0000000000000 --- a/CondCore/DBCommon/doc/DBCommon.doc +++ /dev/null @@ -1,60 +0,0 @@ - -/*! - -\page CondCore_DBCommon Package CondCore/DBCommon - -
- - - -Source code (CVS tag: @CVS_TAG@) - -Administrative privileges - -
- -\section desc Description - - -Central base package encapsulates the interaction with databases. - -\subsection interface Public interface - - -- AuthenticationMethod -- ConfigSessionFromParameterSet -- ConnectionConfiguration -- ConnectMode -- ContainerIterator -- DBSession -- Exception -- MessageLevel -- ObjectRelationalMappingUtility -- PoolStorageManager -- Ref -- RelationalStorageManager -- SessionConfiguration -- Time -- TokenBuilder - -\subsection modules Modules - -None - -\subsection tests Unit tests and examples - -testCondObjRef: unit test cond::Ref wrapper class
-testCondObjCopy: test container copy functionality
-testGenericCondObjCopy: test copy objects by token
-testTokenBuilder: test building pool token by external parameters
-testContainerIterator: test container iterator functionality
-testServiceLoader: test serviceloader
- -\section status Status and planned development - -stable - -
-Last updated: -@DATE@ Author: Z. Xie -*/ - diff --git a/CondCore/DBCommon/interface/Auth.h b/CondCore/DBCommon/interface/Auth.h deleted file mode 100644 index 5b3a3d6ba3a7c..0000000000000 --- a/CondCore/DBCommon/interface/Auth.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef COND_DBCommon_Roles_h -#define COND_DBCommon_Roles_h - -#include - -namespace cond{ - - class Auth { - - public: - - static const char* COND_AUTH_PATH; - static const char* COND_AUTH_SYS; - - static const std::string COND_ADMIN_GROUP; - - static const std::string COND_DEFAULT_ROLE; - static const std::string COND_WRITER_ROLE; - static const std::string COND_READER_ROLE; - static const std::string COND_ADMIN_ROLE; - static const std::string COND_DEFAULT_PRINCIPAL; - - static const std::string COND_KEY; - static const unsigned int COND_AUTHENTICATION_KEY_SIZE = 30; - static const unsigned int COND_DB_KEY_SIZE = 30; - - static const std::string COND_AUTH_PATH_PROPERTY; - - }; -} - -#endif -// DBSESSION_H diff --git a/CondCore/DBCommon/interface/BlobStreamerPluginFactory.h b/CondCore/DBCommon/interface/BlobStreamerPluginFactory.h deleted file mode 100644 index 98184008a12e9..0000000000000 --- a/CondCore/DBCommon/interface/BlobStreamerPluginFactory.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef CondCore_DBCommon_BlobStreamerPluginFactory_h -#define CondCore_DBCommon_BlobStreamerPluginFactory_h -#include "FWCore/PluginManager/interface/PluginFactory.h" -#include "CondCore/ORA/interface/IBlobStreamingService.h" -#include - -namespace cond { - typedef edmplugin::PluginFactory< ora::IBlobStreamingService*() > BlobStreamerPluginFactory; -} - -#endif diff --git a/CondCore/DBCommon/interface/Cipher.h b/CondCore/DBCommon/interface/Cipher.h deleted file mode 100644 index 962dfdf0e7825..0000000000000 --- a/CondCore/DBCommon/interface/Cipher.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef INCLUDE_COND_CIPHER_H -#define INCLUDE_COND_CIPHER_H - -#include -#include - -struct BLOWFISH_CTX; - -namespace cond { - - class Cipher { - public: - - explicit Cipher( const std::string& key ); - - ~Cipher(); - - size_t encrypt( const std::string& input, unsigned char*& output ); - - std::string decrypt( const unsigned char* input, size_t inputSize ); - - std::string b64encrypt( const std::string& input ); - - std::string b64decrypt( const std::string& input ); - - private: - - size_t bf_process_alloc( const unsigned char* input, size_t input_size, unsigned char*& output, bool decrypt=false ); - - private: - - BLOWFISH_CTX* m_ctx; - }; - -} - -#endif - diff --git a/CondCore/DBCommon/interface/ClassID.h b/CondCore/DBCommon/interface/ClassID.h deleted file mode 100644 index f132c68bbfbe5..0000000000000 --- a/CondCore/DBCommon/interface/ClassID.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef CondCoreDBCommon_ClassID_H -#define CondCoreDBCommon_ClassID_H -#include -#include -#include - -namespace cond { - - namespace idCategories { - std::string const pythonIDCategory("CondPythonID"); - } - - - - char const * className(const std::type_info& t); - - - class ClassInfo { - public: - virtual ~ClassInfo(){} - inline ClassInfo(const std::type_info& t) : tinfo(t) {} - //inline ClassInfo(const std::type_info& t, int); - inline const std::type_info& type() const { return tinfo;} - std::string pluginName(std::string const & prefix) const; - virtual std::string resource() const=0; - private: - //ClassIDRegistry * registry; - //const char * registerMe(const std::type_info& t); - const std::type_info& tinfo; - }; - - - /**class ClassIDRegistry { - public: - typedef ClassInfo Elem; - std::vector sids; - std::vector csids; - ClassIDRegistry(std::string const & pfix); - - const char * registerMe(const std::type_info& t); - - private: - std::string prefix; - - }; - **/ - - template - struct ClassID : public ClassInfo { - ClassID() : ClassInfo(typeid(T)) {} - ClassID(char const * res ) : ClassInfo(typeid(T)), m_res(res) {} -// ClassID(int i) : ClassInfo(typeid(T),i) {} - virtual std::string resource() const { return m_res;} - private: - std::string m_res; - }; - - -} - -/** -// magic: works only if a file local registry exists in the file -#define ELEM_CONSTR(xx_) \ - cond::ClassInfo::ClassInfo(const std::type_info& t,int) : tinfo(t) {registry = &xx_;registerMe(t);} -**/ - -#include "FWCore/PluginManager/interface/PluginFactory.h" -namespace cond{ - typedef edmplugin::PluginFactory ClassInfoFactory; -} - -#define PYTHON_ID(type_, plugName_, uname_) \ - namespace pythonID { struct EDM_PLUGIN_SYM(plugName_, uname_) : public cond::ClassID { EDM_PLUGIN_SYM(plugName_ , uname_) () : cond::ClassID(::plugName_){}};} \ - DEFINE_EDM_PLUGIN(cond::ClassInfoFactory, EDM_PLUGIN_SYM(pythonID::plugName_, uname_) , EDM_PLUGIN_SYM(pythonID::plugName_, uname_)().pluginName(cond::idCategories::pythonIDCategory).c_str() ) - - -#endif // CondCoreDBCommon_ClassID_H diff --git a/CondCore/DBCommon/interface/ConvertIOVSyncValue.h b/CondCore/DBCommon/interface/ConvertIOVSyncValue.h deleted file mode 100644 index 09f15553ceebd..0000000000000 --- a/CondCore/DBCommon/interface/ConvertIOVSyncValue.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef COND_DBCommon_ConvertIOVSyncValue_H -#define COND_DBCommon__ConvertIOVSyncValue_H - -#include "CondCore/DBCommon/interface/Time.h" -#include "FWCore/Framework/interface/IOVSyncValue.h" - -namespace cond { - - edm::IOVSyncValue toIOVSyncValue(cond::Time_t time, cond::TimeType timetype, bool startOrStop); - - cond::Time_t fromIOVSyncValue(edm::IOVSyncValue const & time, cond::TimeType timetype); - - // min max sync value.... - edm::IOVSyncValue limitedIOVSyncValue(cond::Time_t time, cond::TimeType timetype); - - edm::IOVSyncValue limitedIOVSyncValue(edm::IOVSyncValue const & time, cond::TimeType timetype); - - -} - - -#endif diff --git a/CondCore/DBCommon/interface/DbConnection.h b/CondCore/DBCommon/interface/DbConnection.h deleted file mode 100644 index 51fe35a6c6868..0000000000000 --- a/CondCore/DBCommon/interface/DbConnection.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef COND_DBCommon_DbConnection_h -#define COND_DBCommon_DbConnection_h - -#include -#include -#include "DbConnectionConfiguration.h" -#include "DbSession.h" -// -// Package: CondCore/DBCommon -// Class: DbConnection -// -/**\class DbConnection DbConnection.h CondCore/DBCommon/interface/DbConnection.h - Description: Class to prepare database connection setup -*/ - -namespace coral { - class ConnectionService; - class ISessionProxy; - class IMonitoringReporter; - class IWebCacheControl; -} - -namespace edm{ - class ParameterSet; -} - -namespace ora { - class ConnectionPool; -} - -namespace cond{ - - /* - **/ - class DbConnection{ - public: - DbConnection(); - - DbConnection(const DbConnection& conn); - - virtual ~DbConnection(); - - DbConnection& operator=(const DbConnection& conn); - - void configure(); - - void configure( cond::DbConfigurationDefaults defaultItem ); - - void configure( const edm::ParameterSet& connectionPset ); - - void close(); - - bool isOpen() const; - - DbSession createSession() const; - - DbConnectionConfiguration & configuration(); - DbConnectionConfiguration const & configuration() const; - - boost::shared_ptr connectionPool() const; - - coral::IConnectionService& connectionService() const; - - const coral::IMonitoringReporter& monitoringReporter() const; - - coral::IWebCacheControl& webCacheControl() const; - - private: - class ConnectionImpl; - - private: - boost::shared_ptr m_implementation; - - }; -} -#endif -// DBCONNECTION_H diff --git a/CondCore/DBCommon/interface/DbConnectionConfiguration.h b/CondCore/DBCommon/interface/DbConnectionConfiguration.h deleted file mode 100644 index 3285d6d37eef5..0000000000000 --- a/CondCore/DBCommon/interface/DbConnectionConfiguration.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef COND_DBCommon_DbConnectionConfiguration_h -#define COND_DBCommon_DbConnectionConfiguration_h -// -// Package: CondCore/DBCommon -// Class: DbConnectionConfiguration -// -/**\class ConnectionConfiguration ConnectionConfiguration.h CondCore/DBCommon/interface/ConnectionConfiguration.h - Description: set cofiguration parameters of the session -*/ -// -// -#include -// coral includes -#include "CoralBase/MessageStream.h" -#include "RelationalAccess/IMonitoring.h" - -namespace coral { - class IConnectionServiceConfiguration; -} - -namespace edm{ - class ParameterSet; -} - -namespace cond{ - class CoralServiceManager; - - enum DbConfigurationDefaults { CoralDefaults, CmsDefaults, ProdDefaults, ToolDefaults, WebDefaults}; - - enum DbAuthenticationSystem { UndefinedAuthentication=0,CondDbKey, CoralXMLFile }; - - class DbConnectionConfiguration{ - public: - static const std::vector& defaultConfigurations(); - public: - DbConnectionConfiguration(); - DbConnectionConfiguration( bool connectionSharing, - int connectionTimeOut, - bool readOnlySessionOnUpdateConnections, - int connectionRetrialPeriod, - int connectionRetrialTimeOut, - bool poolAutomaticCleanUp, - const std::string& authenticationPath, - const std::string& transactionId, - coral::MsgLevel msgLev, - coral::monitor::Level monitorLev, - bool SQLMonitoring ); - - DbConnectionConfiguration( const DbConnectionConfiguration& rhs); - ~DbConnectionConfiguration(); - DbConnectionConfiguration& operator=( const DbConnectionConfiguration& rhs); - // configuration from edm parameter set - void setParameters( const edm::ParameterSet& connectionPset ); - // configuration for individual connection parameters - void setConnectionSharing( bool flag ); - void setConnectionTimeOut( int timeOut ); - void setReadOnlySessionOnUpdateConnections( bool flag ); - void setConnectionRetrialPeriod( int period ); - void setConnectionRetrialTimeOut( int timeout ); - void setPoolAutomaticCleanUp( bool flag ); - // authentication - void setAuthenticationPath( const std::string& p ); - void setAuthenticationSystem( int authSysCode ); - // transaction Id for multijob (used by frontier) - void setTransactionId( std::string const & tid); - // message level - void setMessageLevel( coral::MsgLevel l ); - // monitoring level - void setMonitoringLevel( coral::monitor::Level l ); - // SQL monitoring - void setSQLMonitoring( bool flag ); - // force the coral configuration - void configure( coral::IConnectionServiceConfiguration& coralConfig) const; - // getters - bool isConnectionSharingEnabled() const; - int connectionTimeOut() const; - bool isReadOnlySessionOnUpdateConnectionEnabled() const; - int connectionRetrialPeriod() const; - int connectionRetrialTimeOut() const; - bool isPoolAutomaticCleanUpEnabled() const; - const std::string& authenticationPath() const; - const std::string& transactionId() const; - coral::MsgLevel messageLevel() const; - bool isSQLMonitoringEnabled() const; - private: - std::pair m_connectionSharing; - std::pair m_connectionTimeOut; - std::pair m_readOnlySessionOnUpdateConnections; - std::pair m_connectionRetrialPeriod; - std::pair m_connectionRetrialTimeOut; - std::pair m_poolAutomaticCleanUp; - std::string m_authPath; - int m_authSys; - std::string m_transactionId; - coral::MsgLevel m_messageLevel; - coral::monitor::Level m_monitoringLevel; - //int m_idleConnectionCleanupPeriod; - - bool m_SQLMonitoring; - CoralServiceManager* m_pluginManager; - }; -} -#endif diff --git a/CondCore/DBCommon/interface/DbOpenTransaction.h b/CondCore/DBCommon/interface/DbOpenTransaction.h deleted file mode 100644 index c16f183416dd2..0000000000000 --- a/CondCore/DBCommon/interface/DbOpenTransaction.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef CondCore_DBCommon_DbOpenTransaction_H -#define CondCore_DBCommon_DbOpenTransaction_H -// -// Package: DBCommon -// Class : DbOpenTransaction -// -/**\class DbScopedTransaction DbScopedTransaction.h CondCore/DBCommon/interface/DbScopedTransaction.h - Description: -*/ -// -// - -namespace cond{ - - class DbTransaction; - - class DbOpenTransaction { - public: - explicit DbOpenTransaction( cond::DbTransaction& transaction ); - - ~DbOpenTransaction(); - /// start transaction - /// current transaction is readonly - void ok(); - private: - cond::DbTransaction& m_transaction; - bool m_status; - - }; -} -#endif diff --git a/CondCore/DBCommon/interface/DbScopedTransaction.h b/CondCore/DBCommon/interface/DbScopedTransaction.h deleted file mode 100644 index 3d2b4bfb31261..0000000000000 --- a/CondCore/DBCommon/interface/DbScopedTransaction.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef CondCore_DBCommon_DbScopedTransaction_H -#define CondCore_DBCommon_DbScopedTransaction_H -// -// Package: DBCommon -// Class : DbScopedTransaction -// -/**\class DbScopedTransaction DbScopedTransaction.h CondCore/DBCommon/interface/DbScopedTransaction.h - Description: -*/ -// -// - -namespace cond{ - - class DbSession; - - class DbScopedTransaction { - public: - explicit DbScopedTransaction( cond::DbSession& session ); - - ~DbScopedTransaction(); - /// start transaction - int start(bool readOnly = false); - /// commit transaction. Will disconnect from database if connection timeout==0 or connectted time close to the threshold - int commit(); - /// rollback transaction - bool rollback(); - /// query if locally has been activated - bool isLocallyActive() const; - /// current transaction is active - int isActive() const; - /// current transaction is readonly - bool isReadOnly() const; - private: - cond::DbSession& m_session; - bool m_locallyActive; - - }; -} -#endif diff --git a/CondCore/DBCommon/interface/DbSession.h b/CondCore/DBCommon/interface/DbSession.h deleted file mode 100644 index d9565aada0513..0000000000000 --- a/CondCore/DBCommon/interface/DbSession.h +++ /dev/null @@ -1,159 +0,0 @@ -#ifndef COND_DBCommon_DbSession_h -#define COND_DBCommon_DbSession_h - -#include "CondCore/ORA/interface/Database.h" -#include "CondCore/ORA/interface/PoolToken.h" -#include -#include - -// -// Package: CondCore/DBCommon -// Class: DbSession -// -/**\class DbSession DbSession.h CondCore/DBCommon/interface/DbSession.h - Description: Class to prepare database connection setup -*/ - -namespace coral { - class IConnectionService; - class ISchema; - class ISessionProxy; -} - -namespace cond{ - - class DbTransaction; - class DbConnection; - class SessionImpl; - - /* - **/ - class DbSession{ - public: - static const char* COND_SCHEMA_VERSION; - static const char* CHANGE_SCHEMA_VERSION; - - public: - DbSession(); - - explicit DbSession( const DbConnection& connection ); - - DbSession( const DbSession& rhs ); - - virtual ~DbSession(); - - DbSession& operator=( const DbSession& rhs ); - - const std::string& connectionString() const; - - const DbConnection& connection() const; - - bool isTransactional() const; - - const std::string& blobStreamingService() const; - - void open( const std::string& connectionString, bool readOnly=false ); - void open( const std::string& connectionString, const std::string& role, bool readOnly=false ); - void openReadOnly( const std::string& connectionString, const std::string& id ); - void open( boost::shared_ptr& coralSession, const std::string& connectionString, const std::string& schemaName="" ); - void close(); - - bool isOpen() const; - - DbTransaction& transaction(); - - bool createDatabase(); - - // TEMPORARY, for the IOV schema changeover. - bool isOldSchema(); - - coral::ISchema& schema(const std::string& schemaName); - - coral::ISchema& nominalSchema(); - - bool deleteMapping( const std::string& mappingVersion ); - - bool importMapping( const std::string& sourceConnectionString, - const std::string& contName ); - - ora::Object getObject( const std::string& objectId ); - - template boost::shared_ptr getTypedObject( const std::string& objectId ); - - template std::string storeObject( const T* object, const std::string& containerName ); - - std::string storeObject( const ora::Object& objectRef, const std::string& containerName ); - - template bool updateObject( const T* object, const std::string& objectId ); - - bool deleteObject( const std::string& objectId ); - - std::string importObject( cond::DbSession& fromDatabase, const std::string& objectId ); - - std::string classNameForItem( const std::string& objectId ); - - void flush(); - - ora::Database& storage(); - - private: - - boost::shared_ptr m_implementation; - }; - - class PoolTokenParser : public ora::ITokenParser { - public: - explicit PoolTokenParser( ora::Database& db ); - ~PoolTokenParser(){ - } - ora::OId parse( const std::string& poolToken ); - std::string className( const std::string& poolToken ); - - private: - ora::Database& m_db; - }; - - class PoolTokenWriter : public ora::ITokenWriter { - public: - explicit PoolTokenWriter( ora::Database& db ); - ~PoolTokenWriter(){ - } - std::string write( const ora::OId& oid ); - private: - ora::Database& m_db; - }; - - template inline boost::shared_ptr DbSession::getTypedObject( const std::string& objectId ){ - ora::OId oid; - oid.fromString( objectId ); - return storage().fetch( oid ); - } - - template inline std::string DbSession::storeObject( const T* object, - const std::string& containerName ){ - std::string ret(""); - if( object ){ - ora::OId oid = storage().insert( containerName, *object ); - storage().flush(); - ret = oid.toString(); - } - return ret; - } - - template inline bool DbSession::updateObject( const T* object, - const std::string& objectId ){ - bool ret = false; - if( object ){ - ora::OId oid; - oid.fromString( objectId ); - storage().update( oid, *object ); - storage().flush(); - ret = true; - } - return ret; - } - -} - -#endif -// DBSESSION_H diff --git a/CondCore/DBCommon/interface/DbTransaction.h b/CondCore/DBCommon/interface/DbTransaction.h deleted file mode 100644 index 1e500072ad8c6..0000000000000 --- a/CondCore/DBCommon/interface/DbTransaction.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef CondCore_DBCommon_DbTransaction_H -#define CondCore_DBCommon_DbTransaction_H - -// -// Package: DBCommon -// Class : DbTransaction -// -/**\class DbTransaction DbTransaction.h CondCore/DBCommon/interface/DbTransaction.h - Description: -*/ -// -// - -namespace ora { - class Transaction; -} - -namespace cond{ - class DbTransaction { - - public: - DbTransaction( ora::Transaction& dbTrans, bool owned=true ); - - ~DbTransaction(); - /// start transaction - int start(bool readOnly = false); - /// commit transaction. - int commit(); - /// force the commit, regardless to the transaction clients - bool forceCommit(); - /// rollback transaction - bool rollback(); - /// current transaction is active - int isActive() const; - /// current transaction is readonly - bool isReadOnly() const; - private: - ora::Transaction& m_dbTrans; - bool m_readOnly; - int m_clients; - bool m_owned; - - }; -} -#endif diff --git a/CondCore/DBCommon/interface/DecodingKey.h b/CondCore/DBCommon/interface/DecodingKey.h deleted file mode 100644 index c732f6f13d789..0000000000000 --- a/CondCore/DBCommon/interface/DecodingKey.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef CondCoreDBCommon_DecodingKey_H -#define CondCoreDBCommon_DecodingKey_H - -#include -#include -#include -#include - -namespace cond { - - struct ServiceCredentials { - ServiceCredentials(); - std::string connectionString; - std::string userName; - std::string password; - }; - - class KeyGenerator { - public: - - KeyGenerator(); - - std::string make( size_t keySize ); - std::string makeWithRandomSize( size_t maxSize ); - - private: - - int m_iteration; - - }; - - class DecodingKey { - - public: - - static const std::string FILE_NAME; - static const std::string FILE_PATH; - static const size_t DEFAULT_KEY_SIZE = 100; - static std::string templateFile(); - - public: - - DecodingKey(); - - virtual ~DecodingKey(){} - - size_t init( const std::string& keyFileName, const std::string& password, bool readMode = true ); - - size_t createFromInputFile( const std::string& inputFileName, size_t generatedKeySize = 0 ); - - void list( std::ostream& out ); - - void flush(); - - const std::string& principalName() const; - - const std::string& principalKey() const; - - bool isNominal() const; - - const std::string& ownerName() const; - - const std::map< std::string, ServiceCredentials >& services() const; - - void addDefaultService( const std::string& connectionString ); - - void addService( const std::string& serviceName, const std::string& connectionString, const std::string& userName, const std::string& password ); - - - private: - - std::string m_fileName; - - bool m_mode; - - std::string m_pwd; - - std::string m_principalName; - - std::string m_principalKey; - - std::string m_owner; - - std::map< std::string, ServiceCredentials > m_services; - - }; -} - -inline -cond::KeyGenerator::KeyGenerator():m_iteration(0){ -} - -inline -cond::ServiceCredentials::ServiceCredentials():connectionString(""),userName(""),password(""){ -} - -inline -cond::DecodingKey::DecodingKey():m_fileName(""),m_mode( true ),m_pwd(""),m_principalName(""),m_principalKey(""),m_owner(""),m_services(){ -} - -inline -const std::string& -cond::DecodingKey::principalName() const { - return m_principalName; -} - -inline -const std::string& -cond::DecodingKey::principalKey() const { - return m_principalKey; -} - -inline -bool -cond::DecodingKey::isNominal() const { - return !m_owner.empty(); -} - -inline -const std::string& -cond::DecodingKey::ownerName() const { - return m_owner; -} - -inline -const std::map< std::string, cond::ServiceCredentials >& -cond::DecodingKey::services() const { return m_services; } - -#endif // CondCoreDBCommon_DecodingKey_H - - diff --git a/CondCore/DBCommon/interface/Exception.h b/CondCore/DBCommon/interface/Exception.h deleted file mode 100644 index 450a5ded48b3c..0000000000000 --- a/CondCore/DBCommon/interface/Exception.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifdef COND_EXP_WARNING -#warning please ignore previous warning -#endif -#ifndef COND_EXCEPTION_H -#define COND_EXCEPTION_H -#include "FWCore/Utilities/interface/Exception.h" -#include -namespace cond{ - class Exception : public cms::Exception{ - public: - explicit Exception( const std::string& message ); - virtual ~Exception() throw(); - }; - class noDataForRequiredTimeException : public Exception{ - public: - noDataForRequiredTimeException(const std::string& from, - const std::string& rcd, - const std::string& current); - virtual ~noDataForRequiredTimeException() throw(); - }; - class RefException : public Exception{ - public: - RefException(const std::string& from, - const std::string& msg); - virtual ~RefException() throw(){} - }; - class TransactionException : public Exception{ - public: - TransactionException(const std::string& from, - const std::string& msg); - virtual ~TransactionException() throw(){} - }; - - void throwException [[noreturn]] ( std::string const& message, std::string const& methodName ); -} -#endif diff --git a/CondCore/DBCommon/interface/FipProtocolParser.h b/CondCore/DBCommon/interface/FipProtocolParser.h deleted file mode 100644 index d61401a4109bf..0000000000000 --- a/CondCore/DBCommon/interface/FipProtocolParser.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef DBCommon_FipProtocolParser_H -#define DBCommon_FipProtocolParser_H -#include -namespace cond{ - class FipProtocolParser{ - public: - FipProtocolParser(); - ~FipProtocolParser(); - std::string getRealConnect(const std::string& fipConnect) const; - }; -}//ns cond -#endif - diff --git a/CondCore/DBCommon/interface/IOVInfo.h b/CondCore/DBCommon/interface/IOVInfo.h deleted file mode 100644 index 3f676dca6193a..0000000000000 --- a/CondCore/DBCommon/interface/IOVInfo.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef COND_DBCommon_IOVInfo_H -#define COND_DBCommon_IOVInfo_H - -#include - -namespace cond { - - // return a formatted information about the current user taken from the environment - std::string userInfo(); - - -} - - -#endif // COND_DBCommon_IOVInfo_H diff --git a/CondCore/DBCommon/interface/LogDBEntry.h b/CondCore/DBCommon/interface/LogDBEntry.h deleted file mode 100644 index 9837334598ac3..0000000000000 --- a/CondCore/DBCommon/interface/LogDBEntry.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef CondCore_DBCommon_LogDBEntry_H -#define CondCore_DBCommon_LogDBEntry_H -#include -namespace cond{ - - class UserLogInfo{ - public: - std::string provenance; - std::string usertext; - }; - - class NullUserLogInfo : public UserLogInfo{ - }; - - class LogDBEntry{ - public: - unsigned long long logId; - std::string destinationDB; - std::string provenance; - std::string usertext; - std::string iovtag; - std::string iovtimetype; - unsigned int payloadIdx; - unsigned long long lastSince; - std::string payloadClass; - std::string payloadToken; - std::string exectime; - std::string execmessage; - }; -} -#endif diff --git a/CondCore/DBCommon/interface/Logger.h b/CondCore/DBCommon/interface/Logger.h deleted file mode 100644 index 289ebeacb1284..0000000000000 --- a/CondCore/DBCommon/interface/Logger.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef CONDCORE_DBCOMMON_LOGGER_H -#define CONDCORE_DBCOMMON_LOGGER_H - -#include "CondCore/DBCommon/interface/DbSession.h" -#include - -// -// Package: CondCore/DBCommon -// Class : Logger -// -/**\class -*/ -// -// Author: Zhen Xie -// - -namespace coral{ - //class ISchema; - class IQuery; -} -namespace cond{ - class UserLogInfo; - class LogDBEntry; - class SequenceManager; - class Logger{ - public: - explicit Logger(DbSession& sessionHandle); - ~Logger(); - - void connect( const std::string& logConnectionString, bool readOnly=false ); - //NB. for oracle only schema owner can do this - void createLogDBIfNonExist(); - // - //the current local time will be registered as execution time - // payloadName and containerName are also logged but they are deduced from payloadToken - void logOperationNow( - const cond::UserLogInfo& userlogInfo, - const std::string& destDB, - const std::string& payloadToken, - const std::string& payloadClass, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince - ); - // - //the current local time will be registered as execution time - // - // payloadName and containerName are also logged but they are deduced from payloadToken - void logFailedOperationNow( - const cond::UserLogInfo& userlogInfo, - const std::string& destDB, - const std::string& payloadToken, - const std::string& payloadClass, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince, - const std::string& exceptionMessage - ); - // - // Here we query the log for the last entry for these payloads. - // Parameter LogDBEntry& result is both input and output - // As input, it defines query condition. - // Last: in the sense of max rowid satisfies the requirement - // Note: if empty logentry is given, the absolute max is returned which - // normally is useless. - // return empty struct is no result found - // - void LookupLastEntryByProvenance( const std::string& provenance, - LogDBEntry& logentry, - bool filterFailedOp=true) const; - // - // Here we query the log for the last entry for these payloads. - // Parameter LogDBEntry& result is both input and output - // As input, it defines query condition. - // Last: in the sense of max rowid satisfies the requirement - // Note: if empty logentry is given, the absolute max is returned which - // normally is useless. - // - void LookupLastEntryByTag( const std::string& iovtag, - LogDBEntry& logentry, - bool filterFailedOp=true) const; - - void LookupLastEntryByTag( const std::string& iovtag, - const std::string & connectionStr, - LogDBEntry& logentry, - bool filterFailedOp=true) const; - - private: - void insertLogRecord(unsigned long long logId, - const std::string& utctime, - const std::string& destDB, - const std::string& payloadToken, - const std::string& payloadClass, - const cond::UserLogInfo& userLogInfo, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince, - const std::string& exceptionMessage); - - mutable DbSession m_sessionHandle; - //coral::ISchema& m_schema; - bool m_locked; - coral::IQuery* m_statusEditorHandle; - SequenceManager* m_sequenceManager; - bool m_logTableExists; - }; -}//ns cond -#endif diff --git a/CondCore/DBCommon/interface/PayloadRef.h b/CondCore/DBCommon/interface/PayloadRef.h deleted file mode 100644 index b95e83822926c..0000000000000 --- a/CondCore/DBCommon/interface/PayloadRef.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef CondCore_DBCommon_PayloadRef_h -#define CondCore_DBCommon_PayloadRef_h -#include "CondCore/DBCommon/interface/DbTransaction.h" - -namespace cond { - - /* manages various types of wrappers... - */ - template - class PayloadRef { - public: - - PayloadRef() {} - ~PayloadRef(){} - - // dereference (does not re-load) - const DataT & operator*() const { - return *m_Data; - } - - void clear() { - m_Data.reset(); - } - - - bool load( DbSession& dbSess, std::string const & itoken) { - clear(); - bool ok = false; - // is it ok to open a transaction here? or could be at higher level? - boost::shared_ptr tmp = dbSess.getTypedObject( itoken ); - if (tmp.get()) { - m_Data = tmp; - ok = true; - } - return ok; - } - - - private: - boost::shared_ptr m_Data; - }; - -} -#endif // CondCore_PayloadProxy_h diff --git a/CondCore/DBCommon/interface/SQLReport.h b/CondCore/DBCommon/interface/SQLReport.h deleted file mode 100644 index 0a0b5382e9634..0000000000000 --- a/CondCore/DBCommon/interface/SQLReport.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef CondCoreDBCommon_SQLReport_H -#define CondCoreDBCommon_SQLReport_H -#include -#include -#include "CondCore/DBCommon/interface/DbConnection.h" - -namespace cond { - - class DbConnection; - - class SQLReport { - - public: - - explicit SQLReport(DbConnection& connection); - - virtual ~SQLReport(){} - - void reportForConnection(const std::string& connectionString); - - bool putOnFile(std::string fileName=std::string("")); - - private: - - SQLReport(); - - DbConnection m_connection; - - std::stringstream m_report; - - }; -} - -inline -cond::SQLReport::SQLReport(DbConnection& connection):m_connection(connection),m_report(){ -} - -#endif // CondCoreDBCommon_SQLReport_H - - diff --git a/CondCore/DBCommon/interface/SequenceManager.h b/CondCore/DBCommon/interface/SequenceManager.h deleted file mode 100644 index 5bc106640e50f..0000000000000 --- a/CondCore/DBCommon/interface/SequenceManager.h +++ /dev/null @@ -1,79 +0,0 @@ -#ifndef CondCore_DBCommon_SequenceManager_h -#define CondCore_DBCommon_SequenceManager_h - -#include -#include -#include "CondCore/DBCommon/interface/DbSession.h" -// -// Package: DBCommon -// Class : SequenceManager -// -/**\class SequenceManager SequenceManager.h CondCore/DBCommon/interface/SequenceManager.h - Description: utility class. Handle sequences. Universal to all DB backend. -*/ -// -// Author: Zhen Xie -// -namespace coral{ - class ISchema; - class AttributeList; -} -namespace cond { - class CoralTransaction; - class SequenceManager { - public: - /// Constructor - SequenceManager(cond::DbSession& coraldb, - const std::string& sequenceTableName); - - /// Destructor - ~SequenceManager(); - - /// Increments and returns a new valid oid for a table - unsigned long long incrementId( const std::string& reftableName ); - - /// Updates the last used id - void updateId( const std::string& reftableName, - unsigned long long lastId ); - - /// Clears the internal state - void clear(); - - /// Whether sequence table exists - bool existSequencesTable(); - - /// Creates the table holding the sequences - void createSequencesTable(); - - private: - - /// Locks the id entry in the ref table and returns the lastId value - bool lockEntry( coral::ISchema& schema, - const std::string& reftableName, - unsigned long long& lastId ); - void init(); - private: - /// The coraldb in use - cond::DbSession m_coraldb; - - /// Sequence table name - std::string m_sequenceTableName; - - /// Map of ids used. - std::map< std::string, unsigned long long > m_tableToId; - - /// Flag indicating whether the sequence table exists - bool m_sequenceTableExists; - - /// The where clause pinning a sequence entry - std::string m_whereClause; - - /// The data for the where clause - coral::AttributeList* m_whereData; - - /// The set clause for updating a sequence entry - std::string m_setClause; - bool m_started; - }; -}//ns cond -#endif diff --git a/CondCore/DBCommon/interface/SharedLibraryName.h b/CondCore/DBCommon/interface/SharedLibraryName.h deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/CondCore/DBCommon/interface/TagInfo.h b/CondCore/DBCommon/interface/TagInfo.h deleted file mode 100644 index 2568915a33c0b..0000000000000 --- a/CondCore/DBCommon/interface/TagInfo.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef CondCore_DBCommon_TagInfo_H -#define CondCore_DBCommon_TagInfo_H -#endif diff --git a/CondCore/DBCommon/interface/TagMetadata.h b/CondCore/DBCommon/interface/TagMetadata.h deleted file mode 100644 index 2cdf02f3dc5fe..0000000000000 --- a/CondCore/DBCommon/interface/TagMetadata.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef DBCommon_TagMetadata_h -#define DBCommon_TagMetadata_h -#include -#include -namespace cond{ - class TagMetadata{ - public: - std::string tag; - std::string pfn; - std::string recordname; - std::string labelname; - std::string objectname; - std::size_t hashvalue()const{ - boost::hash hasher; - std::size_t result=hasher(tag+pfn); - return result; - } - bool operator<(const TagMetadata& toCompare ) const { - return this->hashvalue() -namespace cond{ - class DbSession; - class TechnologyProxy{ - public: - explicit TechnologyProxy( ){} - virtual ~TechnologyProxy(){} - virtual void initialize( const DbConnection& connection )=0; - virtual std::string getRealConnectString( const std::string&userconnect ) const=0; - virtual std::string getRealConnectString( const std::string&userconnect, const std::string& transactionId ) const=0; - virtual bool isTransactional() const=0; - private: - TechnologyProxy( const TechnologyProxy& ); - const TechnologyProxy& operator=(const TechnologyProxy&); - }; -}//ns cond -#endif diff --git a/CondCore/DBCommon/interface/TechnologyProxyFactory.h b/CondCore/DBCommon/interface/TechnologyProxyFactory.h deleted file mode 100644 index 9ee524f5cb1fa..0000000000000 --- a/CondCore/DBCommon/interface/TechnologyProxyFactory.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef CondCore_DBCommon_TechnologyProxyFactory_h -#define CondCore_DBCommon_TechnologyProxyFactory_h -#include "FWCore/PluginManager/interface/PluginFactory.h" -#include "CondCore/DBCommon/interface/TechnologyProxy.h" -#include "CondCore/DBCommon/interface/Exception.h" - -#include -#include -namespace cond{ - typedef edmplugin::PluginFactory< cond::TechnologyProxy*() > TechnologyProxyFactory; -} -#endif diff --git a/CondCore/DBCommon/interface/Time.h b/CondCore/DBCommon/interface/Time.h deleted file mode 100644 index 00393549438d9..0000000000000 --- a/CondCore/DBCommon/interface/Time.h +++ /dev/null @@ -1 +0,0 @@ -#include "CondFormats/Common/interface/Time.h" diff --git a/CondCore/DBCommon/interface/UserLogInfo.h b/CondCore/DBCommon/interface/UserLogInfo.h deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/CondCore/DBCommon/plugins/BlobStreamingService.cc b/CondCore/DBCommon/plugins/BlobStreamingService.cc deleted file mode 100644 index 40c337272d607..0000000000000 --- a/CondCore/DBCommon/plugins/BlobStreamingService.cc +++ /dev/null @@ -1,230 +0,0 @@ -#include "CondCore/DBCommon/interface/BlobStreamerPluginFactory.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" - -#include "CondCore/ORA/interface/IBlobStreamingService.h" - -#include "TBufferBlobStreamingService.h" - - -// -#include -// -#include "CoralBase/Blob.h" -// -#include -#include -#include -#include -#include - -// Function for testing BlobStreamingService -namespace test { - namespace BlobStreaming { - int test(); - } -} - -namespace cond { - - class BlobStreamingService : virtual public ora::IBlobStreamingService { - friend int test::BlobStreaming::test(); - - public: - - - BlobStreamingService(); - - virtual ~BlobStreamingService(); - - boost::shared_ptr write( const void* addressOfInputData, edm::TypeWithDict const & classDictionary, bool useCompression=true ) override; - - void read( const coral::Blob& blobData, void* addressOfContainer, edm::TypeWithDict const & classDictionary ) override; - - - private: - - typedef std::pair uuid; - - static const size_t m_idsize=sizeof(uuid); - static const size_t m_offset = m_idsize + sizeof(unsigned long long); - static const size_t nVariants=3; - - enum Variant { OLD, COMPRESSED_TBUFFER, COMPRESSED_CHARS }; - static uuid const variantIds[nVariants]; - - - static Variant findVariant(const void* address); - static int isVectorChar(edm::TypeWithDict const & classDictionary); - - - static boost::shared_ptr compress(const void* addr, size_t isize); - static boost::shared_ptr expand(const coral::Blob& blobIn); - - - boost::shared_ptr rootService; - - }; - - - BlobStreamingService::BlobStreamingService() : rootService(new cond::TBufferBlobStreamingService()){} - - BlobStreamingService::~BlobStreamingService(){} - - boost::shared_ptr BlobStreamingService::write( const void* addressOfInputData, edm::TypeWithDict const & classDictionary, bool useCompression ) { - boost::shared_ptr blobOut; - int const k = isVectorChar(classDictionary); - switch (k) { - case 0 : - { - // at the moment we write TBuffer compressed, than we see.... - // we may wish to avoid one buffer copy... - boost::shared_ptr buffer = rootService->write(addressOfInputData, classDictionary); - if( useCompression ){ - blobOut = compress(buffer->startingAddress(),buffer->size()); - *reinterpret_cast(blobOut->startingAddress()) = variantIds[COMPRESSED_TBUFFER]; - } else { - blobOut = buffer; - } - } - break; - case 1 : - { - if( useCompression ){ - std::vector const & v = *reinterpret_cast< std::vector const *> (addressOfInputData); - blobOut = compress(&v.front(),v.size()); - *reinterpret_cast(blobOut->startingAddress()) = variantIds[COMPRESSED_CHARS]; - } else { - blobOut = rootService->write(addressOfInputData,classDictionary); - } - } - break; - case 2 : - { - if( useCompression ){ - std::vector const & v = *reinterpret_cast const *> (addressOfInputData); - blobOut = compress(&v.front(),v.size()); - *reinterpret_cast(blobOut->startingAddress()) = variantIds[COMPRESSED_CHARS]; - } else { - blobOut = rootService->write(addressOfInputData,classDictionary); - } - } - break; - - } - return blobOut; - - } - - - void BlobStreamingService::read( const coral::Blob& blobData, void* addressOfContainer, edm::TypeWithDict const & classDictionary ) { - // protect against small blobs... - Variant v = (size_t(blobData.size()) < m_offset) ? OLD : findVariant(blobData.startingAddress()); - switch (v) { - case OLD : - { - rootService->read( blobData, addressOfContainer, classDictionary); - } - break; - case COMPRESSED_TBUFFER : - { - boost::shared_ptr blobIn = expand(blobData); - rootService->read( *blobIn, addressOfContainer, classDictionary); - } - break; - case COMPRESSED_CHARS : - { - boost::shared_ptr blobIn = expand(blobData); - int const k = isVectorChar(classDictionary); - switch (k) { - case 0 : - { - // error!!! - } - break; - case 1: - { - std::vector & v = *reinterpret_cast< std::vector *> (addressOfContainer); - // we should avoid the copy! - v.resize(blobIn->size()); - std::memcpy(&v.front(),blobIn->startingAddress(),v.size()); - } - break; - case 2: - { - std::vector & v = *reinterpret_cast< std::vector *> (addressOfContainer); - // we should avoid the copy! - v.resize(blobIn->size()); - std::memcpy(&v.front(),blobIn->startingAddress(),v.size()); - } - break; - } - } - } - } - - - - - const BlobStreamingService::uuid BlobStreamingService::variantIds[nVariants] = { - BlobStreamingService::uuid(0,0) - ,BlobStreamingService::uuid(0xf4e92f169c974e8eLL, 0x97851f372586010dLL) - ,BlobStreamingService::uuid(0xc9a95a45e60243cfLL, 0x8dc549534f9a9274LL) - }; - - - int BlobStreamingService::isVectorChar(edm::TypeWithDict const& classDictionary) { - if (classDictionary == typeid(std::vector)) return 1; - if (classDictionary == typeid(std::vector)) return 2; - return 0; - } - - - - BlobStreamingService::Variant BlobStreamingService::findVariant(const void* address) { - uuid const & id = *reinterpret_cast(address); - uuid const * v = std::find(variantIds,variantIds+nVariants,id); - return (v==variantIds+nVariants) ? OLD : (Variant)(v-variantIds); - } - - - boost::shared_ptr BlobStreamingService::compress(const void* addr, size_t isize) { - uLongf destLen = compressBound(isize); - size_t usize = destLen + m_offset; - boost::shared_ptr theBlob( new coral::Blob(usize)); - void * startingAddress = (unsigned char*)(theBlob->startingAddress())+ m_offset; - int zerr = compress2( (unsigned char*)(startingAddress), &destLen, - (unsigned char*)(addr), isize, - 9); - if (zerr!=0) edm::LogError("BlobStreamingService")<< "Compression error " << zerr; - destLen+= m_idsize + sizeof(unsigned long long); - theBlob->resize(destLen); - - startingAddress = (unsigned char*)(theBlob->startingAddress())+ m_idsize; - // write expanded size; - *reinterpret_cast(startingAddress)=isize; - return theBlob; - } - - boost::shared_ptr BlobStreamingService::expand(const coral::Blob& blobIn) { - if (size_t(blobIn.size()) < m_offset) return boost::shared_ptr(new coral::Blob()); - long long csize = blobIn.size() - m_offset; - unsigned char const * startingAddress = (unsigned char const*)(blobIn.startingAddress())+ m_idsize; - unsigned long long usize = *reinterpret_cast(startingAddress); - startingAddress += sizeof(unsigned long long); - boost::shared_ptr theBlob( new coral::Blob(usize)); - uLongf destLen = usize; - int zerr = uncompress((unsigned char *)(theBlob->startingAddress()), &destLen, - startingAddress, csize); - if (zerr!=0 || usize!=destLen) - edm::LogError("BlobStreamingService")<< "uncompressing error " << zerr - << " original size was " << usize - << " new size is " << destLen; - - return theBlob; - } - -} - -// keep the old good name -DEFINE_EDM_PLUGIN(cond::BlobStreamerPluginFactory,cond::BlobStreamingService,"COND/Services/BlobStreamingService"); diff --git a/CondCore/DBCommon/plugins/BuildFile.xml b/CondCore/DBCommon/plugins/BuildFile.xml deleted file mode 100644 index 126e691392b4a..0000000000000 --- a/CondCore/DBCommon/plugins/BuildFile.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CondCore/DBCommon/plugins/FrontierProxy.cc b/CondCore/DBCommon/plugins/FrontierProxy.cc deleted file mode 100644 index ee1d59c0536b1..0000000000000 --- a/CondCore/DBCommon/plugins/FrontierProxy.cc +++ /dev/null @@ -1,143 +0,0 @@ -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "RelationalAccess/IWebCacheControl.h" -#include "FWCore/Catalog/interface/SiteLocalConfig.h" -#include "FWCore/ServiceRegistry/interface/Service.h" - -#include "CondCore/DBCommon/interface/TechnologyProxy.h" -#include -#include - -namespace cond{ - class FrontierProxy: public TechnologyProxy{ - public: - FrontierProxy(); - ~FrontierProxy(); - void initialize( const DbConnection& connection) override; - std::string getRealConnectString( const std::string&userconnect ) const override; - std::string getRealConnectString( const std::string&userconnect, const std::string& transactionId ) const override; - bool isTransactional() const override { return false;} - - private: - //static unsigned int countslash(const std::string& input); - std::string makeRealConnectString( const std::string& initialConnection, const std::string& transactionId ) const ; - private: - const DbConnection* m_dbConnection; - std::vector m_refreshtablelist; - }; -}//ns cond - - -cond::FrontierProxy::FrontierProxy(): - m_dbConnection(0), - m_refreshtablelist(){ - m_refreshtablelist.reserve(10); - //table names for IOVSequence in ORA - //FIXME: do not use hard-coded names, ORA should provide them for a given container... - m_refreshtablelist.push_back("ORA_C_COND_IOVSEQUENCE"); - m_refreshtablelist.push_back("ORA_C_COND_IOVSEQU_A0"); - m_refreshtablelist.push_back("ORA_C_COND_IOVSEQU_A1"); - // do not refesh tag table in production... - // m_refreshtablelist.push_back(cond::MetaDataNames::metadataTable()); -} - -cond::FrontierProxy::~FrontierProxy(){ - m_refreshtablelist.clear(); -} - -namespace cond { - - unsigned int - countslash(const std::string& input) { - unsigned int count=0; - std::string::size_type slashpos( 0 ); - while( slashpos!=std::string::npos){ - slashpos = input.find('/', slashpos ); - if ( slashpos != std::string::npos ){ - ++count; - // start next search after this word - slashpos += 1; - } - } - return count; - } - - std::string - cond::FrontierProxy::makeRealConnectString( const std::string& initialConnection, - const std::string& transactionId ) const { - std::string realConn = initialConnection; - // for testing - //std::string res = initialConnection; - std::string proto("frontier://"); - std::string::size_type fpos=initialConnection.find(proto); - unsigned int nslash=countslash(initialConnection.substr(proto.size(),initialConnection.size()-fpos)); - if(nslash==1){ - edm::Service localconfservice; - if( !localconfservice.isAvailable() ){ - throw cms::Exception("edm::SiteLocalConfigService is not available"); - } - realConn=localconfservice->lookupCalibConnect(initialConnection); - //res=localconfservice->lookupCalibConnect(initialConnection); - } - if (!transactionId.empty()) { - size_t l = realConn.rfind('/'); - realConn.insert(l,"(freshkey="+transactionId+')'); - //size_t l = res.rfind('/'); - //res.insert(l,"(freshkey="+transactionId+')'); - } - - std::string refreshConnect; - std::string::size_type startRefresh = realConn.find("://"); - if (startRefresh != std::string::npos){ - startRefresh += 3; - } - std::string::size_type endRefresh=realConn.rfind("/", std::string::npos); - if (endRefresh == std::string::npos){ - refreshConnect = realConn; - }else{ - refreshConnect = realConn.substr(startRefresh, endRefresh-startRefresh); - if(refreshConnect.substr(0,1) != "("){ - //if the connect string is not a complicated parenthesized string, - // an http:// needs to be at the beginning of it - refreshConnect.insert(0, "http://"); - } - } - std::vector::const_iterator ibeg=m_refreshtablelist.begin(); - std::vector::const_iterator iend=m_refreshtablelist.end(); - for(std::vector::const_iterator it=ibeg; it!=iend; ++it){ - m_dbConnection->webCacheControl().refreshTable(refreshConnect,*it ); - } - - //std::cout << "***** frontier connection string " << std::endl; - //std::cout << res << std::endl; - return realConn; - } - -} - -std::string -cond::FrontierProxy::getRealConnectString( const std::string&userconnect ) const { - if( ! m_dbConnection ){ - throwException("The Technology Proxy has not been initialized.","FrontierProxy::getRealConnectString"); - } - return makeRealConnectString( userconnect, m_dbConnection->configuration().transactionId() ); -} - -std::string -cond::FrontierProxy::getRealConnectString( const std::string&userconnect, const std::string& transId ) const{ - if( ! m_dbConnection ){ - throwException("The Technology Proxy has not been initialized.","FrontierProxy::getRealConnectString"); - } - const std::string* tId = &transId; - if( transId.empty() ) tId = &m_dbConnection->configuration().transactionId(); - return makeRealConnectString( userconnect, *tId ); -} - -void -cond::FrontierProxy::initialize( const DbConnection& connection ) { - m_dbConnection = &connection; -} - -#include "CondCore/DBCommon/interface/TechnologyProxyFactory.h" -DEFINE_EDM_PLUGIN(cond::TechnologyProxyFactory,cond::FrontierProxy,"frontier"); diff --git a/CondCore/DBCommon/plugins/OracleProxy.cc b/CondCore/DBCommon/plugins/OracleProxy.cc deleted file mode 100644 index 62ddb06b00107..0000000000000 --- a/CondCore/DBCommon/plugins/OracleProxy.cc +++ /dev/null @@ -1,17 +0,0 @@ -#include "CondCore/DBCommon/interface/TechnologyProxy.h" -namespace cond { - class OracleProxy: public TechnologyProxy { - public: - OracleProxy(){} - ~OracleProxy(){} - void initialize( const DbConnection& ) override{ - } - std::string getRealConnectString( const std::string &userconnect ) const override{ return userconnect;} - std::string getRealConnectString( const std::string &userconnect, const std::string& ) const override{ return userconnect;} - bool isTransactional() const override { return true;} - }; -}//ns cond - - -#include "CondCore/DBCommon/interface/TechnologyProxyFactory.h" -DEFINE_EDM_PLUGIN(cond::TechnologyProxyFactory,cond::OracleProxy,"oracle"); diff --git a/CondCore/DBCommon/plugins/SQLMonitoringService.cc b/CondCore/DBCommon/plugins/SQLMonitoringService.cc deleted file mode 100644 index 2d23cced6d8a1..0000000000000 --- a/CondCore/DBCommon/plugins/SQLMonitoringService.cc +++ /dev/null @@ -1,371 +0,0 @@ -#include "SQLMonitoringService.h" -#include "RelationalAccess/MonitoringException.h" -#include "CoralBase/MessageStream.h" -#include "CoralBase/TimeStamp.h" -#include "CoralKernel/Context.h" -#include "CoralKernel/IHandle.h" -#include "CondCore/DBCommon/interface/CoralServiceMacros.h" - -namespace cond -{ - SessionMonitor::SessionMonitor() - : active( false ), level( coral::monitor::Default ), stream() - { - } - - SessionMonitor::SessionMonitor( bool act, coral::monitor::Level lvl ) - : active( act ), level( lvl ), stream() - { - } - - SQLMonitoringService::SQLMonitoringService( const std::string& key ) - : coral::Service( key ), - m_events() - { - } - - SQLMonitoringService::~SQLMonitoringService() - { - } - - void SQLMonitoringService::setLevel( const std::string& contextKey, coral::monitor::Level level ) - { - Repository::const_iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - { - m_events[contextKey] = SessionMonitor(); - m_monitoredDS.insert( contextKey ); - } - - m_events[contextKey].level = level; - - if( level == coral::monitor::Off ) - { - m_events[contextKey].active = false; - } - else - { - m_events[contextKey].active = true; - } - } - - coral::monitor::Level SQLMonitoringService::level( const std::string& contextKey ) const - { - Repository::const_iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::level", this->name() ); - - return (*rit).second.level; - } - - bool SQLMonitoringService::active( const std::string& contextKey ) const - { - Repository::const_iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::active", this->name() ); - - return (*rit).second.active; - } - - void SQLMonitoringService::enable( const std::string& contextKey ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::enable", this->name() ); - - (*rit).second.active = true; - } - - void SQLMonitoringService::disable( const std::string& contextKey ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::disable", this->name() ); - - (*rit).second.active = false; - } - - //relaxing filter on coral monitoring level due to a bug in the connection pool - void SQLMonitoringService::record( const std::string& contextKey, coral::monitor::Source source, coral::monitor::Type type, const std::string& description ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record( const std::string& , coral::monitor::Source, coral::monitor::Type, const std::string& )", this->name() ); - - bool active = (*rit).second.active; - //coral::monitor::Level level = (*rit).second.level; - - if( active/* && (type & level)*/ ) - { - (*rit).second.stream.push_back( coral::monitor::createEvent( source, type, description ) ); - } - } - - void SQLMonitoringService::record( const std::string& contextKey, coral::monitor::Source source, coral::monitor::Type type, const std::string& description, int data ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record( const std::string& , coral::monitor::Source, coral::monitor::Type, const std::string&, int )", this->name() ); - - bool active = (*rit).second.active; - //coral::monitor::Level level = (*rit).second.level; - - if( active/* && (type & level)*/ ) - { - (*rit).second.stream.push_back( coral::monitor::createEvent( source, type, description, data ) ); - } - } - - void SQLMonitoringService::record( const std::string& contextKey, coral::monitor::Source source, coral::monitor::Type type, const std::string& description, long long data ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record( const std::string& , coral::monitor::Source, coral::monitor::Type, const std::string&, long long )", this->name() ); - - bool active = (*rit).second.active; - //coral::monitor::Level level = (*rit).second.level; - - if( active/* && (type & level)*/ ) - { - (*rit).second.stream.push_back( coral::monitor::createEvent( source, type, description, data ) ); - } - } - - void SQLMonitoringService::record( const std::string& contextKey, coral::monitor::Source source, coral::monitor::Type type, const std::string& description, double data ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record( const std::string& , coral::monitor::Source, coral::monitor::Type, const std::string&, double )", this->name() ); - - bool active = (*rit).second.active; - //coral::monitor::Level level = (*rit).second.level; - - if( active/* && (type & level)*/ ) - { - (*rit).second.stream.push_back( coral::monitor::createEvent( source, type, description, data ) ); - } - } - - void SQLMonitoringService::record( const std::string& contextKey, coral::monitor::Source source, coral::monitor::Type type, const std::string& description, const std::string& data ) - { - Repository::iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record( const std::string& , coral::monitor::Source, coral::monitor::Type, const std::string&, const std::string& )", this->name() ); - - bool active = (*rit).second.active; - //coral::monitor::Level level = (*rit).second.level; - - if( active /*&& (type & level)*/ ) - { - (*rit).second.stream.push_back( coral::monitor::createEvent( source, type, description, data ) ); - } - } - - const coral::IMonitoringReporter& SQLMonitoringService::reporter() const - { - return( static_cast(*this) ); - } - - // The coral::IMonitoringReporter interface implementation - std::set< std::string > SQLMonitoringService::monitoredDataSources() const - { - return m_monitoredDS; - } - - void SQLMonitoringService::report( unsigned int /*level*/ ) const - { - Repository::const_iterator rit; - coral::MessageStream log( "MonitoringService" ); - - // Dummy reporting so far - for( rit = m_events.begin(); rit != m_events.end(); ++rit ) - reportForSession( rit, log ); - } - - void SQLMonitoringService::report( const std::string& contextKey, unsigned int /* level */ ) const - { - Repository::const_iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record", this->name() ); - - // Dummy reporting so far - coral::MessageStream log( "MonitoringService" ); - - reportForSession( rit, log ); - } - - void SQLMonitoringService::reportToOutputStream( const std::string& contextKey, std::ostream& os, unsigned int /* level */ ) const - { - Repository::const_iterator rit; - - if( ( rit = m_events.find( contextKey ) ) == m_events.end() ) - throw coral::MonitoringException( "Monitoring for session " + contextKey + " not initialized...", "MonitoringService::record", this->name() ); - - // Dummy reporting so far - coral::MessageStream log( "MonitoringService" ); - - reportForSession( rit, os ); - } - - void SQLMonitoringService::reportOnEvent( EventStream::const_iterator& it, std::ostream& os ) const - { - std::string source(""); - switch( it->m_source ) { - case coral::monitor::Application: - source = "Application"; - break; - case coral::monitor::Session: - source = "Session"; - break; - case coral::monitor::Transaction: - source = "Transaction"; - break; - case coral::monitor::Statement: - source = "Statement"; - break; - default: - source = ""; - }; - - std::string type(""); - switch( it->m_type ) { - case coral::monitor::Info: - type = "Info"; - break; - case coral::monitor::Time: - type = "Time"; - break; - case coral::monitor::Warning: - type = "Warning"; - break; - case coral::monitor::Error: - type = "Error"; - break; - case coral::monitor::Config: - type = "Config"; - break; - default: - type = ""; - }; - - if(it->m_source == coral::monitor::Statement || it->m_source == coral::monitor::Transaction) - { - os << boost::posix_time::to_iso_extended_string((*it).m_time.time()) << ": " - << source << "; " - << type << "; " - <<(*it).m_description << ";"<< std::endl; - } - } - - - void SQLMonitoringService::reportOnEvent( EventStream::const_iterator& it,coral::MessageStream& os ) const - { - std::string source(""); - switch( it->m_source ) { - case coral::monitor::Application: - source = "Application"; - break; - case coral::monitor::Session: - source = "Session"; - break; - case coral::monitor::Transaction: - source = "Transaction"; - break; - case coral::monitor::Statement: - source = "Statement"; - break; - default: - source = ""; - }; - - std::string type(""); - switch( it->m_type ) { - case coral::monitor::Info: - type = "Info"; - break; - case coral::monitor::Time: - type = "Time"; - break; - case coral::monitor::Warning: - type = "Warning"; - break; - case coral::monitor::Error: - type = "Error"; - break; - case coral::monitor::Config: - type = "Config"; - break; - default: - type = ""; - }; - - if(it->m_source == coral::monitor::Statement || it->m_source == coral::monitor::Transaction) - { - os << boost::posix_time::to_iso_extended_string((*it).m_time.time()) << ": " - << source << "; " - << type << "; " - << (*it).m_description < -#include -#include - -namespace coral -{ - class MessageStream; -} - -namespace cond -{ - /// The raw stream of recorder monitoring events - typedef std::vector EventStream; - - /// The session related book-keeping of monitored events - struct SessionMonitor{ - SessionMonitor(); - SessionMonitor( bool, coral::monitor::Level ); - - bool active; - coral::monitor::Level level; - EventStream stream; - }; - - /// The repository of monitored events for all sessions where event streams - /// are identified by session key - typedef std::map< std::string, SessionMonitor > Repository; - - class SQLMonitoringService : public coral::Service, virtual public coral::monitor::IMonitoringService, virtual public coral::IMonitoringReporter - { - - public: - explicit SQLMonitoringService( const std::string& ); - virtual ~SQLMonitoringService(); - - public: - /** The implementation coral::IMonitoringService interface */ - /** - * Sets the level - * @param contextKey The session ID for which to make the report - * @param level The monitoring level ( Default, Debug, Trace ) - */ - virtual void setLevel( const std::string& contextKey, coral::monitor::Level level ); - - /** - * Return current monitoring level - */ - virtual coral::monitor::Level level( const std::string& contextKey ) const; - - /** - * Return monitoring activity status - */ - virtual bool active( const std::string& contextKey ) const; - - virtual void enable( const std::string& contextKey ); - virtual void disable( const std::string& contextKey ); - - /** - * Records an event without a payload ( time event for example ) - */ - virtual void record( const std::string& contextKey, - coral::monitor::Source source, - coral::monitor::Type type, - const std::string& description ); - - /** - * Records an event with a payload - */ - virtual void record( const std::string& contextKey, - coral::monitor::Source source, - coral::monitor::Type type, - const std::string& description, - int data ); - - /** - * Records an event with a payload - */ - virtual void record( const std::string& contextKey, - coral::monitor::Source source, - coral::monitor::Type type, - const std::string& description, - long long data ); - - /** - * Records an event with a payload - */ - virtual void record( const std::string& contextKey, - coral::monitor::Source source, - coral::monitor::Type type, - const std::string& description, - double data ); - - /** - * Records an event with a payload - */ - virtual void record( const std::string& contextKey, - coral::monitor::Source source, - coral::monitor::Type type, - const std::string& description, - const std::string& data ); - - /** - * Return the current reporter - */ - virtual const coral::IMonitoringReporter& reporter() const; - - // - // The coral::IMonitoringReporter interface implementation - // - - /** - * Return the set of currently monitored data sources - */ - virtual std::set< std::string > monitoredDataSources() const; - - /** - * Reports all the events - * @param contextKey The session ID for which to make the report - */ - virtual void report( unsigned int level ) const; - - /** - * Reports the events to the default reporter - * @param contextKey The session ID for which to make the report - */ - virtual void report( const std::string& contextKey, unsigned int level ) const; - - /** - * Reports the events to the specified output stream - * @param contextKey The session ID for which to make the report - */ - virtual void reportToOutputStream( const std::string& contextKey, std::ostream& os, unsigned int level ) const; - - void reportOnEvent( EventStream::const_iterator& it, std::ostream& os ) const; - void reportOnEvent( EventStream::const_iterator& it, coral::MessageStream& os ) const; - - void reportForSession( Repository::const_iterator& it, std::ostream& os ) const; - void reportForSession( Repository::const_iterator& it, coral::MessageStream& os ) const; - private: - - /// The all events repository classified by the sessions' keys - Repository m_events; - std::set m_monitoredDS; - }; -} // namespace cond - -#endif // COND_SQLMONITORINGSERVICE_H diff --git a/CondCore/DBCommon/plugins/SQLiteProxy.cc b/CondCore/DBCommon/plugins/SQLiteProxy.cc deleted file mode 100644 index f1e84ce28bdb5..0000000000000 --- a/CondCore/DBCommon/plugins/SQLiteProxy.cc +++ /dev/null @@ -1,32 +0,0 @@ -#include "CondCore/DBCommon/interface/FipProtocolParser.h" -#include "CondCore/DBCommon/interface/TechnologyProxy.h" -#include -namespace cond{ - class SQLiteProxy:public TechnologyProxy{ - public: - SQLiteProxy(){} - ~SQLiteProxy(){} - void initialize( const DbConnection& ) override{ - } - std::string - getRealConnectString( const std::string &userconnect ) const override{ - if( userconnect.find("sqlite_fip:") != std::string::npos ){ - cond::FipProtocolParser p; - return p.getRealConnect( userconnect ); - } - return userconnect; - } - - std::string - getRealConnectString( const std::string &userconnect, const std::string& ) const override { - return getRealConnectString( userconnect ); - } - - bool isTransactional() const override { return true;} - - }; -}//ns cond - -#include "CondCore/DBCommon/interface/TechnologyProxyFactory.h" -DEFINE_EDM_PLUGIN(cond::TechnologyProxyFactory,cond::SQLiteProxy,"sqlite"); - diff --git a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc b/CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc deleted file mode 100644 index 48981f659197d..0000000000000 --- a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc +++ /dev/null @@ -1,161 +0,0 @@ -#include "CondCore/DBCommon/interface/BlobStreamerPluginFactory.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "TBufferBlobStreamingService.h" -// -#include -#include -#include -#include -// -#include "TBufferFile.h" - -#include "FWCore/Utilities/interface/TypeWithDict.h" - -typedef void (TBuffer::*WriteArrayFn_t)(const void *obj, Int_t n); -typedef void (TBuffer::*ReadArrayFn_t)(void *obj, Int_t n); - -#define PRIMITIVE(x) { \ - typeid(x), \ - reinterpret_cast( \ - (void (TBuffer::*)(const x*, Int_t))&TBuffer::WriteFastArray), \ - reinterpret_cast( \ - (void (TBuffer::*)(x*, Int_t))&TBuffer::ReadFastArray) \ -} - -struct Primitive { - const std::type_info &type; - WriteArrayFn_t writeArrayFn; - ReadArrayFn_t readArrayFn; - - inline bool operator == (const std::type_info &other) const - { return type == other; } -} static const primitives[] = { - PRIMITIVE(Bool_t), - PRIMITIVE(Char_t), - PRIMITIVE(UChar_t), - PRIMITIVE(Short_t), - PRIMITIVE(UShort_t), - PRIMITIVE(Int_t), - PRIMITIVE(UInt_t), - PRIMITIVE(Long_t), - PRIMITIVE(ULong_t), - PRIMITIVE(Long64_t), - PRIMITIVE(ULong64_t), - PRIMITIVE(Float_t), - PRIMITIVE(Double_t) -}; - -static const std::size_t nPrimitives = - (sizeof primitives / sizeof primitives[0]); - -#undef PRIMTIVE - -cond::TBufferBlobTypeInfo::TBufferBlobTypeInfo( edm::TypeWithDict const & type_) - : m_arraySize(0), m_class(0), m_primitive(0) -{ - edm::TypeWithDict type = type_; - while(true) { - type = type.finalType(); - - if (!type.isArray()) - break; - - if (!m_arraySize) - m_arraySize = 1; - m_arraySize *= type.arrayLength(); - type = type.toType(); - } - - if (type.isClass()) { - const std::type_info &typeInfo = type.typeInfo(); - m_class = TClass::GetClass(typeInfo); - if (!m_class) - throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo " - "No ROOT class registered for " + type.name()); - } else if (type.isFundamental()) { - if (!m_arraySize) - throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo " - "Only arrays of primitive types supported. " - "Please to not use a Blob for this member."); - - m_primitive = std::find(primitives, primitives + nPrimitives, - type.typeInfo()) - primitives; - if (m_primitive >= nPrimitives) - throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo " - "Cannot handle primitive type " + type.name()); - } else - throw cond::Exception("TBufferBlobTypeInfo::TBufferBlobTypeInfo " - "Cannot handle C++ type " + type.name()); -} - - -cond::TBufferBlobStreamingService::TBufferBlobStreamingService(){ -} - -cond::TBufferBlobStreamingService::~TBufferBlobStreamingService(){ -} - -#include -namespace { - inline char * reallocInBlob( boost::shared_ptr theBlob, char* p, size_t newsize, size_t oldsize) { - // various checks missing.... - theBlob->resize(newsize); - return (char*)theBlob->startingAddress(); - - } -} - -boost::shared_ptr cond::TBufferBlobStreamingService::write( const void* addr, - edm::TypeWithDict const & classDictionary, - bool ){ - TBufferBlobTypeInfo theType( classDictionary ); - if (theType.m_class && theType.m_class->GetActualClass(addr) != theType.m_class) - throw cond::Exception("TBufferBlobWriter::write object to stream is " - "not of actual class."); - - boost::shared_ptr theBlob( new coral::Blob ); - //theBlob->resize(1024); - - // with new root... - // TBufferFile buffer(TBufferFile::kWrite, theBlob->size(), theBlob->startingAddress(), kFALSE, boost::bind(reallocInBlob, theBlob,_1,_2,_3)); - TBufferFile buffer(TBufferFile::kWrite); - buffer.InitMap(); - - if (theType.m_arraySize && !theType.m_class) - (buffer.*primitives[theType.m_primitive].writeArrayFn)(addr, theType.m_arraySize); - else if (theType.m_arraySize) - buffer.WriteFastArray(const_cast(addr), theType.m_class, theType.m_arraySize); - else - buffer.StreamObject(const_cast(addr), theType.m_class); - - Int_t size = buffer.Length(); - - theBlob->resize(size); - void *startingAddress = theBlob->startingAddress(); - std::memcpy(startingAddress, buffer.Buffer(), size); - - return theBlob; -} - -void cond::TBufferBlobStreamingService::read( const coral::Blob& blobData, - void* addr, - edm::TypeWithDict const & classDictionary ){ - TBufferBlobTypeInfo theType( classDictionary ); - const void *startingAddress = blobData.startingAddress(); - size_t size = blobData.size(); - if (!size) - return; - - TBufferFile buffer(TBufferFile::kRead, size, - const_cast(startingAddress), kFALSE); - - buffer.InitMap(); - - if (theType.m_arraySize && !theType.m_class) - (buffer.*primitives[theType.m_primitive].readArrayFn)(addr, theType.m_arraySize); - else if (theType.m_arraySize) - buffer.ReadFastArray(addr, theType.m_class, theType.m_arraySize); - else - buffer.StreamObject(addr, theType.m_class); -} - diff --git a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.h b/CondCore/DBCommon/plugins/TBufferBlobStreamingService.h deleted file mode 100644 index 33deb51d803d6..0000000000000 --- a/CondCore/DBCommon/plugins/TBufferBlobStreamingService.h +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef CondCore_DBCommon_TBufferBlobStreamer_h -#define CondCore_DBCommon_TBufferBlobStreamer_h - -#include "CondCore/ORA/interface/IBlobStreamingService.h" -// -#include -// -#include "CoralBase/Blob.h" - -#include "FWCore/Utilities/interface/TypeWithDict.h" - -#include "TClass.h" - -namespace cond { - class TBufferBlobTypeInfo { - public: - TBufferBlobTypeInfo( const edm::TypeWithDict& type ); - - /// length of the plain C array (zero otherwise) - std::size_t m_arraySize; - - /// The class as seen by the ROOT streaming services - TClass *m_class; - - /// the primitive C++ type if m_class is unset - unsigned int m_primitive; - }; - - class TBufferBlobStreamingService : virtual public ora::IBlobStreamingService { - public: - TBufferBlobStreamingService(); - - virtual ~TBufferBlobStreamingService(); - - boost::shared_ptr write( const void* addressOfInputData, edm::TypeWithDict const & classDictionary, bool useCompression=false ); - - void read( const coral::Blob& blobData, void* addressOfContainer, edm::TypeWithDict const & classDictionary ); - - }; - -} - -#endif // COND_TBUFFERBLOBSTREAMER_H diff --git a/CondCore/DBCommon/python/CondDBCommon_cfi.py b/CondCore/DBCommon/python/CondDBCommon_cfi.py deleted file mode 100644 index 68742784c4a78..0000000000000 --- a/CondCore/DBCommon/python/CondDBCommon_cfi.py +++ /dev/null @@ -1,19 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -CondDBCommon = cms.PSet( - DBParameters = cms.PSet( - authenticationPath = cms.untracked.string(''), - authenticationSystem = cms.untracked.int32(0), - connectionRetrialPeriod = cms.untracked.int32(10), - idleConnectionCleanupPeriod = cms.untracked.int32(10), - messageLevel = cms.untracked.int32(0), - enablePoolAutomaticCleanUp = cms.untracked.bool(False), - enableConnectionSharing = cms.untracked.bool(True), - connectionRetrialTimeOut = cms.untracked.int32(60), - connectionTimeOut = cms.untracked.int32(60), - enableReadOnlySessionOnUpdateConnection = cms.untracked.bool(False) - ), - connect = cms.string('protocol://db/schema') ##db/schema" - -) - diff --git a/CondCore/DBCommon/python/CondDBSetup_cfi.py b/CondCore/DBCommon/python/CondDBSetup_cfi.py deleted file mode 100644 index e4931346f067e..0000000000000 --- a/CondCore/DBCommon/python/CondDBSetup_cfi.py +++ /dev/null @@ -1,17 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -CondDBSetup = cms.PSet( - DBParameters = cms.PSet( - authenticationPath = cms.untracked.string(''), - authenticationSystem = cms.untracked.int32(0), - connectionRetrialPeriod = cms.untracked.int32(10), - idleConnectionCleanupPeriod = cms.untracked.int32(10), - messageLevel = cms.untracked.int32(0), - enablePoolAutomaticCleanUp = cms.untracked.bool(False), - enableConnectionSharing = cms.untracked.bool(True), - connectionRetrialTimeOut = cms.untracked.int32(60), - connectionTimeOut = cms.untracked.int32(60), - enableReadOnlySessionOnUpdateConnection = cms.untracked.bool(False) - ) -) - diff --git a/CondCore/DBCommon/src/Auth.cc b/CondCore/DBCommon/src/Auth.cc deleted file mode 100644 index ac9853c9e4de0..0000000000000 --- a/CondCore/DBCommon/src/Auth.cc +++ /dev/null @@ -1,22 +0,0 @@ -//local includes -#include "CondCore/DBCommon/interface/Auth.h" - -namespace cond{ - - const char* Auth::COND_AUTH_PATH = "COND_AUTH_PATH"; - const char* Auth::COND_AUTH_SYS = "COND_AUTH_SYS"; - - const std::string Auth::COND_ADMIN_GROUP("COND_ADMIN_GROUP"); - - const std::string Auth::COND_DEFAULT_ROLE("COND_DEFAULT_ROLE"); - const std::string Auth::COND_WRITER_ROLE("COND_WRITER_ROLE"); - const std::string Auth::COND_READER_ROLE("COND_READER_ROLE"); - const std::string Auth::COND_ADMIN_ROLE("COND_ADMIN_ROLE"); - const std::string Auth::COND_DEFAULT_PRINCIPAL("COND_DEFAULT_PRINCIPAL"); - const std::string Auth::COND_KEY("Memento"); - - // horrible workaround: coral does not allow to define custom properties: only the pre-defined ones can be used! In this case, AuthenticationFile - const std::string Auth::COND_AUTH_PATH_PROPERTY("AuthenticationFile"); - - -} diff --git a/CondCore/DBCommon/src/BlobStreamerPluginFactory.cc b/CondCore/DBCommon/src/BlobStreamerPluginFactory.cc deleted file mode 100644 index d87725fe7c109..0000000000000 --- a/CondCore/DBCommon/src/BlobStreamerPluginFactory.cc +++ /dev/null @@ -1,4 +0,0 @@ -#include "CondCore/DBCommon/interface/BlobStreamerPluginFactory.h" -EDM_REGISTER_PLUGINFACTORY(cond::BlobStreamerPluginFactory,"BlobStreamerPlugin"); - - diff --git a/CondCore/DBCommon/src/ClassID.cc b/CondCore/DBCommon/src/ClassID.cc deleted file mode 100644 index ada6848983164..0000000000000 --- a/CondCore/DBCommon/src/ClassID.cc +++ /dev/null @@ -1,64 +0,0 @@ -#include "CondCore/DBCommon/interface/ClassID.h" -#include "CondCore/ORA/interface/Guid.h" -#include -#include "cxxabi.h" - -namespace cond { - - char const * className(const std::type_info& t) { - int status=0; - return __cxxabiv1::__cxa_demangle(t.name(), 0, 0, &status); - } - -// namespace { -// std::string id(const std::type_info& t) { -// const Reflex::Type type=Reflex::Type::ByTypeInfo(t); -// std::string s; -// if (type) { -// Reflex::PropertyList pl = type.Properties(); -// if ( pl.HasProperty("ClassID") ) { -// s = pl.PropertyAsString("ClassID"); -// } -// else { -// char buff[20]; -// genMD5(type.Name(Reflex::SCOPED),buff); -// Guid* gd = reinterpret_cast(buff); -// s = gd->toString(); -// } -// } -// else { -// // only for test -// std::string name = className(t); -// char buff[20]; -// genMD5(name,buff); -// Guid* gd = reinterpret_cast(buff); -// s = gd->toString(); -// } -// return s; -// } -// } - - - /** - ClassIDRegistry::ClassIDRegistry(std::string const & pfix) : prefix(pfix+"/"){} - - const char * ClassIDRegistry::registerMe(const std::type_info& t) { - sids.push_back(prefix+id(t)+"\0"); - csids.push_back(sids.back().data()); - return sids.back().c_str(); - } - - const char * ClassInfo::registerMe(const std::type_info& t) { - return registry->registerMe(t); - } - - **/ - - std::string ClassInfo::pluginName(std::string const & prefix) const { - return prefix + "/" +className(tinfo); - //return prefix + "/" +id(tinfo); - } - -} - -EDM_REGISTER_PLUGINFACTORY(cond::ClassInfoFactory, "CondFormatsID"); diff --git a/CondCore/DBCommon/src/ConvertIOVSyncValue.cc b/CondCore/DBCommon/src/ConvertIOVSyncValue.cc deleted file mode 100644 index 0f67b21789d15..0000000000000 --- a/CondCore/DBCommon/src/ConvertIOVSyncValue.cc +++ /dev/null @@ -1,98 +0,0 @@ -#include "CondCore/DBCommon/interface/ConvertIOVSyncValue.h" -#include "DataFormats/Provenance/interface/LuminosityBlockID.h" - - -namespace cond { - - edm::IOVSyncValue toIOVSyncValue(cond::Time_t time, cond::TimeType timetype, bool startOrStop) { - switch (timetype) { - case cond::runnumber : - return edm::IOVSyncValue( edm::EventID(time, - startOrStop ? 0 : edm::EventID::maxEventNumber(), - startOrStop ? 0 : edm::EventID::maxEventNumber()) - ); - case cond::lumiid : - { - edm::LuminosityBlockID l(time); - return edm::IOVSyncValue(edm::EventID(l.run(), - l.luminosityBlock(), - startOrStop ? 0 : edm::EventID::maxEventNumber()) - ); - } - case cond::timestamp : - return edm::IOVSyncValue( edm::Timestamp(time)); - default: - return edm::IOVSyncValue::invalidIOVSyncValue(); - } - } - - cond::Time_t fromIOVSyncValue(edm::IOVSyncValue const & time, cond::TimeType timetype) { - switch (timetype) { - case cond::runnumber : - return time.eventID().run(); - case cond::lumiid : - { - edm::LuminosityBlockID lum(time.eventID().run(), time.luminosityBlockNumber()); - return lum.value(); - } - case cond::timestamp : - return time.time().value(); - default: - return 0; - } - } - - // the minimal maximum-time an IOV can extend to - edm::IOVSyncValue limitedIOVSyncValue(cond::Time_t time, cond::TimeType timetype) { - switch (timetype) { - case cond::runnumber : - // last lumi and event of this run - return edm::IOVSyncValue( edm::EventID(time, - edm::EventID::maxEventNumber(), - edm::EventID::maxEventNumber()) - ); - case cond::lumiid : - { - // the same lumiblock - edm::LuminosityBlockID l(time); - return edm::IOVSyncValue(edm::EventID(l.run(), - l.luminosityBlock(), - edm::EventID::maxEventNumber()) - ); - } - case cond::timestamp : - // next event ? - return edm::IOVSyncValue::invalidIOVSyncValue(); - default: - return edm::IOVSyncValue::invalidIOVSyncValue(); - } - } - - edm::IOVSyncValue limitedIOVSyncValue(edm::IOVSyncValue const & time, cond::TimeType timetype) { - switch (timetype) { - case cond::runnumber : - // last event of this run - return edm::IOVSyncValue(edm::EventID(time.eventID().run(), - edm::EventID::maxEventNumber(), - edm::EventID::maxEventNumber()) - ); - case cond::lumiid : - // the same lumiblock - return edm::IOVSyncValue(edm::EventID(time.eventID().run(), - time.luminosityBlockNumber(), - edm::EventID::maxEventNumber()) - ); - case cond::timestamp : - // same lumiblock - return edm::IOVSyncValue(edm::EventID(time.eventID().run(), - time.luminosityBlockNumber(), - edm::EventID::maxEventNumber()) - ); - default: - return edm::IOVSyncValue::invalidIOVSyncValue(); - } - } - -} - - diff --git a/CondCore/DBCommon/src/DbConnection.cc b/CondCore/DBCommon/src/DbConnection.cc deleted file mode 100644 index 3649e2861dc59..0000000000000 --- a/CondCore/DBCommon/src/DbConnection.cc +++ /dev/null @@ -1,114 +0,0 @@ -//local includes -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/Exception.h" -// ora includes -#include "CondCore/ORA/interface/ConnectionPool.h" - -namespace cond { - class DbConnection::ConnectionImpl { - public: - ConnectionImpl(): - m_initialized(false), - m_connectionPool( new ora::ConnectionPool ), - m_configuration(){ - } - - virtual ~ConnectionImpl(){ - close(); - } - - void close(){ - m_connectionPool.reset(); - } - - bool m_initialized; - boost::shared_ptr m_connectionPool; - DbConnectionConfiguration m_configuration; - }; -} - -cond::DbConnection::DbConnection(): - m_implementation(new ConnectionImpl()){ - configure(); -} - -cond::DbConnection::DbConnection(const DbConnection& conn): - m_implementation( conn.m_implementation ){ -} - -cond::DbConnection::~DbConnection(){ -} - -cond::DbConnection& cond::DbConnection::operator=(const cond::DbConnection& conn) -{ - if(this!=&conn) m_implementation = conn.m_implementation; - return *this; -} - -void cond::DbConnection::configure() -{ - m_implementation->m_configuration.configure( m_implementation->m_connectionPool->configuration() ); - m_implementation->m_initialized = true; -} - -void cond::DbConnection::configure( cond::DbConfigurationDefaults defaultItem ){ - m_implementation->m_configuration = DbConnectionConfiguration::defaultConfigurations()[ defaultItem ]; - configure(); -} - -void -cond::DbConnection::configure( const edm::ParameterSet& connectionPset ){ - m_implementation->m_configuration.setParameters( connectionPset ); - configure(); -} - -cond::DbSession cond::DbConnection::createSession() const{ - if(!isOpen()) - throw cond::Exception("DbConnection::createSession: cannot create session. Connection has been closed."); - return cond::DbSession( *this ); -} - - -void cond::DbConnection::close() -{ - m_implementation->close(); -} - -bool cond::DbConnection::isOpen() const -{ - return m_implementation->m_connectionPool.get(); -} - -cond::DbConnectionConfiguration & cond::DbConnection::configuration() -{ - return m_implementation->m_configuration; -} - -cond::DbConnectionConfiguration const & cond::DbConnection::configuration() const -{ - return m_implementation->m_configuration; -} - -boost::shared_ptr cond::DbConnection::connectionPool() const { - return m_implementation->m_connectionPool; -} - -coral::IConnectionService& cond::DbConnection::connectionService() const { - if(!isOpen()) - throw cond::Exception("DbConnection::connectionService: cannot get connection service. Connection has not been open."); - return m_implementation->m_connectionPool->connectionService(); -} - -const coral::IMonitoringReporter& cond::DbConnection::monitoringReporter() const { - if(!isOpen()) - throw cond::Exception("DbConnection::monitoringReporter: cannot get connection service. Connection has not been open."); - return m_implementation->m_connectionPool->connectionService().monitoringReporter(); -} - -coral::IWebCacheControl& cond::DbConnection::webCacheControl() const{ - if(!isOpen()) - throw cond::Exception("DbConnection::webCacheControl: cannot get connection service. Connection has not been open."); - return m_implementation->m_connectionPool->connectionService().webCacheControl(); -} - diff --git a/CondCore/DBCommon/src/DbConnectionConfiguration.cc b/CondCore/DBCommon/src/DbConnectionConfiguration.cc deleted file mode 100644 index 4efa93dade98f..0000000000000 --- a/CondCore/DBCommon/src/DbConnectionConfiguration.cc +++ /dev/null @@ -1,339 +0,0 @@ -//local includes -#include "CondCore/DBCommon/interface/DbConnectionConfiguration.h" -#include "CondCore/DBCommon/interface/CoralServiceManager.h" -#include "CondCore/DBCommon/interface/Auth.h" -// CMSSW includes -#include "FWCore/ParameterSet/interface/ParameterSet.h" -//#include "FWCore/MessageLogger/interface/MessageLogger.h" -// coral includes -#include "RelationalAccess/IConnectionServiceConfiguration.h" -#include "CoralKernel/Context.h" -#include "CoralKernel/IProperty.h" -#include "CoralKernel/IPropertyManager.h" -// externals -#include - -const std::vector& -cond::DbConnectionConfiguration::defaultConfigurations(){ - static const std::vector s_defaultConfigurations = - { cond::DbConnectionConfiguration(), - cond::DbConnectionConfiguration( false, 0, false, 10, 60, false, "", "", coral::Error, coral::monitor::Off, false ), - cond::DbConnectionConfiguration( false, 0, false, 10, 60, false, "", "", coral::Error, coral::monitor::Off, false ), - cond::DbConnectionConfiguration( false, 0, false, 10, 60, false, "", "",coral::Error, coral::monitor::Off, false ), - cond::DbConnectionConfiguration( false, 0, false, 10, 60, false, "", "",coral::Error, coral::monitor::Off, false ) - }; - return s_defaultConfigurations; -} - -cond::DbConnectionConfiguration::DbConnectionConfiguration(): - m_connectionSharing(false,false), - m_connectionTimeOut(false,0), - m_readOnlySessionOnUpdateConnections(false,false), - m_connectionRetrialPeriod(false,0), - m_connectionRetrialTimeOut(false,0), - m_poolAutomaticCleanUp(false,false), - m_authPath(""), - m_authSys(0), - m_transactionId(), - m_messageLevel(coral::Error), - m_monitoringLevel(coral::monitor::Off), - m_SQLMonitoring(false), - m_pluginManager(new CoralServiceManager){ -} - -cond::DbConnectionConfiguration::DbConnectionConfiguration( bool connectionSharing, - int connectionTimeOut, - bool readOnlySessionOnUpdateConnections, - int connectionRetrialPeriod, - int connectionRetrialTimeOut, - bool poolAutomaticCleanUp, - const::std::string& authenticationPath, - const::std::string& transactionId, - coral::MsgLevel msgLev, - coral::monitor::Level monitorLev, - bool SQLMonitoring ): - m_connectionSharing(true,connectionSharing), - m_connectionTimeOut(true,connectionTimeOut), - m_readOnlySessionOnUpdateConnections(true,readOnlySessionOnUpdateConnections), - m_connectionRetrialPeriod(true,connectionRetrialPeriod), - m_connectionRetrialTimeOut(true,connectionRetrialTimeOut), - m_poolAutomaticCleanUp(true,poolAutomaticCleanUp), - m_authPath(authenticationPath), - m_authSys(0), - m_transactionId(transactionId), - m_messageLevel(msgLev), - m_monitoringLevel(monitorLev), - m_SQLMonitoring(SQLMonitoring), - m_pluginManager(new CoralServiceManager){ -} - -cond::DbConnectionConfiguration::DbConnectionConfiguration( const cond::DbConnectionConfiguration& rhs): - m_connectionSharing(rhs.m_connectionSharing), - m_connectionTimeOut(rhs.m_connectionTimeOut), - m_readOnlySessionOnUpdateConnections(rhs.m_readOnlySessionOnUpdateConnections), - m_connectionRetrialPeriod(rhs.m_connectionRetrialPeriod), - m_connectionRetrialTimeOut(rhs.m_connectionRetrialTimeOut), - m_poolAutomaticCleanUp(rhs.m_poolAutomaticCleanUp), - m_authPath(rhs.m_authPath), - m_authSys(rhs.m_authSys), - m_transactionId(rhs.m_transactionId), - m_messageLevel(rhs.m_messageLevel), - m_monitoringLevel(rhs.m_monitoringLevel), - m_SQLMonitoring(rhs.m_SQLMonitoring), - m_pluginManager(new CoralServiceManager){ -} - -cond::DbConnectionConfiguration::~DbConnectionConfiguration(){ - delete m_pluginManager; -} - -cond::DbConnectionConfiguration& -cond::DbConnectionConfiguration::operator=( const cond::DbConnectionConfiguration& rhs){ - m_connectionSharing = rhs.m_connectionSharing; - m_connectionTimeOut = rhs.m_connectionTimeOut; - m_readOnlySessionOnUpdateConnections = rhs.m_readOnlySessionOnUpdateConnections; - m_connectionRetrialPeriod = rhs.m_connectionRetrialPeriod; - m_connectionRetrialTimeOut = rhs.m_connectionRetrialTimeOut; - m_poolAutomaticCleanUp = rhs.m_poolAutomaticCleanUp; - m_authPath = rhs.m_authPath; - m_authSys = rhs.m_authSys; - m_transactionId=rhs.m_transactionId; - m_messageLevel = rhs.m_messageLevel; - m_monitoringLevel = rhs.m_monitoringLevel; - m_SQLMonitoring = rhs.m_SQLMonitoring; - return *this; -} - -void cond::DbConnectionConfiguration::setParameters( const edm::ParameterSet& connectionPset ){ - std::string authPath = connectionPset.getUntrackedParameter("authenticationPath",""); - setAuthenticationPath(authPath); - int authSysPar = connectionPset.getUntrackedParameter("authenticationSystem",0); - setAuthenticationSystem( authSysPar ); - setTransactionId(connectionPset.getUntrackedParameter("transactionId","")); - int messageLevel = connectionPset.getUntrackedParameter("messageLevel",0); - coral::MsgLevel level = coral::Error; - switch (messageLevel) { - case 0 : - level = coral::Error; - break; - case 1: - level = coral::Warning; - break; - case 2: - level = coral::Info; - break; - case 3: - level = coral::Debug; - break; - default: - level = coral::Error; - } - setMessageLevel(level); - bool enableConnectionSharing = connectionPset.getUntrackedParameter("enableConnectionSharing",true); - setConnectionSharing( enableConnectionSharing ); - int connectionTimeOut = connectionPset.getUntrackedParameter("connectionTimeOut",600); - setConnectionTimeOut( connectionTimeOut ); - bool enableReadOnlySessionOnUpdateConnection = connectionPset.getUntrackedParameter("enableReadOnlySessionOnUpdateConnection",true); - setReadOnlySessionOnUpdateConnections( enableReadOnlySessionOnUpdateConnection ); - int connectionRetrialPeriod = connectionPset.getUntrackedParameter("connectionRetrialPeriod",30); - setConnectionRetrialPeriod( connectionRetrialPeriod ); - int connectionRetrialTimeOut = connectionPset.getUntrackedParameter("connectionRetrialTimeOut",180); - setConnectionRetrialTimeOut( connectionRetrialTimeOut ); - bool enablePoolAutomaticCleanUp = connectionPset.getUntrackedParameter("enablePoolAutomaticCleanUp",false); - setPoolAutomaticCleanUp( enablePoolAutomaticCleanUp ); - //int idleConnectionCleanupPeriod = connectionPset.getUntrackedParameter("idleConnectionCleanupPeriod",300); -} - -void cond::DbConnectionConfiguration::setConnectionSharing( bool flag ){ - m_connectionSharing.first = true; - m_connectionSharing.second = flag; -} - -void cond::DbConnectionConfiguration::setConnectionTimeOut( int timeOut ){ - m_connectionTimeOut.first = true; - m_connectionTimeOut.second = timeOut; -} - -void cond::DbConnectionConfiguration::setReadOnlySessionOnUpdateConnections( bool flag ){ - m_readOnlySessionOnUpdateConnections.first = true; - m_readOnlySessionOnUpdateConnections.second = flag; -} - -void cond::DbConnectionConfiguration::setConnectionRetrialPeriod( int period ){ - m_connectionRetrialPeriod.first = true; - m_connectionRetrialPeriod.second = period; -} - -void cond::DbConnectionConfiguration::setConnectionRetrialTimeOut( int timeout ){ - m_connectionRetrialTimeOut.first = true; - m_connectionRetrialTimeOut.second = timeout; -} - -void cond::DbConnectionConfiguration::setPoolAutomaticCleanUp( bool flag ){ - m_poolAutomaticCleanUp.first = true; - m_poolAutomaticCleanUp.second = flag; -} - -void cond::DbConnectionConfiguration::setAuthenticationPath( const std::string& p ){ - m_authPath = p; -} - -void cond::DbConnectionConfiguration::setAuthenticationSystem( int authSysCode ){ - m_authSys = authSysCode; -} - -void cond::DbConnectionConfiguration::setTransactionId( std::string const & tid) { - m_transactionId=tid; -} - -void cond::DbConnectionConfiguration::setMessageLevel( coral::MsgLevel l ) { - m_messageLevel = l; -} - -void cond::DbConnectionConfiguration::setMonitoringLevel( coral::monitor::Level l) -{ - m_monitoringLevel = l; -} - - -void cond::DbConnectionConfiguration::setSQLMonitoring( bool flag ){ - m_SQLMonitoring = flag; -} - -void cond::DbConnectionConfiguration::configure( coral::IConnectionServiceConfiguration& coralConfig) const -{ - // message streaming - coral::MessageStream::setMsgVerbosity( m_messageLevel ); - std::string authServiceName("CORAL/Services/EnvironmentAuthenticationService"); - std::string authPath = m_authPath; - // authentication - if( authPath.empty() ){ - // first try to check the env... - const char* authEnv = ::getenv( Auth::COND_AUTH_PATH ); - if(authEnv){ - authPath += authEnv; - } - } - int authSys = m_authSys; - // first attempt, look at the env... - const char* authSysEnv = ::getenv( Auth::COND_AUTH_SYS ); - if( authSysEnv ){ - authSys = ::atoi( authSysEnv ); - } - if( authSys != CondDbKey && authSys != CoralXMLFile ){ - // take the default - authSys = CondDbKey; - } - std::string servName(""); - if( authSys == CondDbKey ){ - if( authPath.empty() ){ - const char* authEnv = ::getenv("HOME"); - if(authEnv){ - authPath += authEnv; - } - } - servName = "COND/Services/RelationalAuthenticationService"; - //edm::LogInfo("DbSessionInfo") << "Authentication using Keys"; - } else if( authSys == CoralXMLFile ){ - if( authPath.empty() ){ - authPath = "."; - } - servName = "COND/Services/XMLAuthenticationService"; - //edm::LogInfo("DbSessionInfo") << "Authentication using XML File"; - } - if( !authPath.empty() ){ - authServiceName = servName; - coral::Context::instance().PropertyManager().property(Auth::COND_AUTH_PATH_PROPERTY)->set(authPath); - coral::Context::instance().loadComponent( authServiceName, m_pluginManager ); - } - coralConfig.setAuthenticationService( authServiceName ); - // connection sharing - if(m_connectionSharing.first) - { - if(m_connectionSharing.second) coralConfig.enableConnectionSharing(); - else coralConfig.disableConnectionSharing(); - } - // connection timeout - if(m_connectionTimeOut.first) - { - coralConfig.setConnectionTimeOut(m_connectionTimeOut.second); - } - // read only session on update connection - if(m_readOnlySessionOnUpdateConnections.first) - { - if(m_readOnlySessionOnUpdateConnections.second) coralConfig.enableReadOnlySessionOnUpdateConnections(); - else coralConfig.disableReadOnlySessionOnUpdateConnections(); - } - // pool automatic clean up - if(m_poolAutomaticCleanUp.first) - { - if(m_poolAutomaticCleanUp.second) coralConfig.enablePoolAutomaticCleanUp(); - else coralConfig.disablePoolAutomaticCleanUp(); - } - // connection retrial period - if(m_connectionRetrialPeriod.first) - { - coralConfig.setConnectionRetrialPeriod( m_connectionRetrialPeriod.second ); - } - // connection retrial timeout - if( m_connectionRetrialTimeOut.first) - { - coralConfig.setConnectionRetrialTimeOut(m_connectionRetrialTimeOut.second ); - } - // monitoring level - coralConfig.setMonitoringLevel( m_monitoringLevel ); - // SQL monitoring - if( m_SQLMonitoring ) - { - std::string pluginName("COND/Services/SQLMonitoringService"); - coral::Context::instance().loadComponent( pluginName, m_pluginManager ); - coralConfig.setMonitoringLevel(coral::monitor::Trace); - } - -} - -bool cond::DbConnectionConfiguration::isConnectionSharingEnabled() const -{ - return m_connectionSharing.second; -} - -int cond::DbConnectionConfiguration::connectionTimeOut() const { - return m_connectionTimeOut.second; -} - -bool cond::DbConnectionConfiguration::isReadOnlySessionOnUpdateConnectionEnabled() const { - return m_readOnlySessionOnUpdateConnections.second; -} - -int cond::DbConnectionConfiguration::connectionRetrialPeriod() const { - return m_connectionRetrialPeriod.second; -} - -int cond::DbConnectionConfiguration::connectionRetrialTimeOut() const { - return m_connectionRetrialTimeOut.second; -} - -bool cond::DbConnectionConfiguration::isPoolAutomaticCleanUpEnabled() const { - return m_poolAutomaticCleanUp.second; -} - -const std::string& cond::DbConnectionConfiguration::authenticationPath() const -{ - return m_authPath; -} - -const std::string& cond::DbConnectionConfiguration::transactionId() const { - return m_transactionId; -} - - -coral::MsgLevel cond::DbConnectionConfiguration::messageLevel() const -{ - return m_messageLevel; -} - -bool cond::DbConnectionConfiguration::isSQLMonitoringEnabled() const -{ - return m_SQLMonitoring; -} - diff --git a/CondCore/DBCommon/src/DbOpenTransaction.cc b/CondCore/DBCommon/src/DbOpenTransaction.cc deleted file mode 100644 index 5861c824f2270..0000000000000 --- a/CondCore/DBCommon/src/DbOpenTransaction.cc +++ /dev/null @@ -1,20 +0,0 @@ -// local includes -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbOpenTransaction.h" - -cond::DbOpenTransaction::DbOpenTransaction( cond::DbTransaction& transaction ): - m_transaction(transaction),m_status(false){ -} - -#include -cond::DbOpenTransaction::~DbOpenTransaction(){ - if(!m_status && m_transaction.isActive() ) { - m_transaction.rollback(); - } -} - -void cond::DbOpenTransaction::ok() -{ - m_status = true; -} - diff --git a/CondCore/DBCommon/src/DbScopedTransaction.cc b/CondCore/DBCommon/src/DbScopedTransaction.cc deleted file mode 100644 index ab8bcf87f4965..0000000000000 --- a/CondCore/DBCommon/src/DbScopedTransaction.cc +++ /dev/null @@ -1,49 +0,0 @@ -// local includes -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbScopedTransaction.h" - -cond::DbScopedTransaction::DbScopedTransaction( cond::DbSession& session ): - m_session(session),m_locallyActive(false){ -} - -cond::DbScopedTransaction::~DbScopedTransaction(){ - if(m_locallyActive) { - m_session.transaction().rollback(); - } -} - -int cond::DbScopedTransaction::start(bool readOnly){ - if(m_locallyActive) return -1; - int ret = m_session.transaction().start( readOnly ); - m_locallyActive = true; - return ret; -} - -int cond::DbScopedTransaction::commit(){ - if(!m_locallyActive) return -1; - int ret = m_session.transaction().commit(); - m_locallyActive = false; - return ret; -} - -bool cond::DbScopedTransaction::rollback(){ - if(!m_locallyActive) return false; - bool ret = m_session.transaction().rollback(); - m_locallyActive = false; - return ret; -} - -bool cond::DbScopedTransaction::isLocallyActive() const { - return m_locallyActive; -} - -int cond::DbScopedTransaction::isActive() const { - return m_session.transaction().isActive(); -} - -bool cond::DbScopedTransaction::isReadOnly() const -{ - return m_session.transaction().isReadOnly(); -} - diff --git a/CondCore/DBCommon/src/DbSession.cc b/CondCore/DBCommon/src/DbSession.cc deleted file mode 100644 index 3e57b5a63e4a1..0000000000000 --- a/CondCore/DBCommon/src/DbSession.cc +++ /dev/null @@ -1,334 +0,0 @@ -//local includes -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/BlobStreamerPluginFactory.h" -#include "CondCore/DBCommon/interface/Auth.h" -// CMSSW includes -#include "FWCore/PluginManager/interface/PluginFactory.h" -#include "CondCore/DBCommon/interface/TechnologyProxyFactory.h" -#include "CondCore/ORA/interface/ConnectionPool.h" -// coral includes -#include "RelationalAccess/ISessionProxy.h" - -namespace cond { - - inline std::auto_ptr buildTechnologyProxy(const std::string&userconnect, - const DbConnection& connection){ - std::string protocol; - std::size_t pos=userconnect.find_first_of(':'); - if( pos!=std::string::npos ){ - protocol=userconnect.substr(0,pos); - std::size_t p=protocol.find_first_of('_'); - if(p!=std::string::npos){ - protocol=protocol.substr(0,p); - } - }else{ - throw cond::Exception(userconnect +":connection string format error"); - } - std::auto_ptr ptr(cond::TechnologyProxyFactory::get()->create(protocol)); - (*ptr).initialize(connection); - return ptr; - } - - class SessionImpl { - public: - SessionImpl(): - connection(), - blobStreamingService( "COND/Services/BlobStreamingService" ), - database(), - transaction(), - isOpen(false){ - } - - explicit SessionImpl( const DbConnection& connection ): - connection(new DbConnection(connection)), - blobStreamingService( "COND/Services/BlobStreamingService" ), - database(), - transaction(), - isOpen(false){ - } - - - virtual ~SessionImpl(){ - close(); - } - - void open( const std::string& connectionString, - const std::string& role, - bool readOnly ){ - close(); - if( connection.get() ){ - if(!connection->isOpen()){ - throw cond::Exception("DbSession::open: cannot open session. Underlying connection is closed."); - } - boost::shared_ptr connPool = connection->connectionPool(); - database.reset( new ora::Database( connPool ) ); - - ora::IBlobStreamingService* blobStreamer = cond::BlobStreamerPluginFactory::get()->create( blobStreamingService ); - if(!blobStreamer) throw cond::Exception("DbSession::open: cannot find required plugin. No instance of ora::IBlobStreamingService has been loaded.."); - database->configuration().setBlobStreamingService( blobStreamer ); - //database->configuration().properties().setFlag( ora::Configuration::automaticDatabaseCreation() ); - database->configuration().properties().setFlag( ora::Configuration::automaticContainerCreation() ); - // open the db connection - technologyProxy = buildTechnologyProxy(connectionString, *connection); - std::string connStr = (*technologyProxy).getRealConnectString( connectionString ); - database->connect( connStr, role, readOnly ); - transaction.reset( new cond::DbTransaction( database->transaction() ) ); - isOpen = true; - } - } - - void openReadOnly( const std::string& connectionString, - const std::string& transactionId ){ - close(); - if( connection.get() ){ - if(!connection->isOpen()){ - throw cond::Exception("DbSession::open: cannot open session. Underlying connection is closed."); - } - boost::shared_ptr connPool = connection->connectionPool(); - database.reset( new ora::Database( connPool ) ); - - ora::IBlobStreamingService* blobStreamer = cond::BlobStreamerPluginFactory::get()->create( blobStreamingService ); - if(!blobStreamer) throw cond::Exception("DbSession::open: cannot find required plugin. No instance of ora::IBlobStreamingService has been loaded.."); - database->configuration().setBlobStreamingService( blobStreamer ); - // open the db connection - technologyProxy = buildTechnologyProxy(connectionString, *connection); - std::string connStr = (*technologyProxy).getRealConnectString(connectionString, transactionId); - database->connect( connStr, Auth::COND_READER_ROLE, true ); - transaction.reset( new cond::DbTransaction( database->transaction() ) ); - isOpen = true; - } - } - - void open( boost::shared_ptr& coralSession, - const std::string& connectionString, - const std::string& schemaName ){ - close(); - database.reset( new ora::Database ); - - ora::IBlobStreamingService* blobStreamer = cond::BlobStreamerPluginFactory::get()->create( blobStreamingService ); - if(!blobStreamer) throw cond::Exception("DbSession::open: cannot find required plugin. No instance of ora::IBlobStreamingService has been loaded.."); - database->configuration().setBlobStreamingService( blobStreamer ); - database->configuration().properties().setFlag( ora::Configuration::automaticContainerCreation() ); - database->connect( coralSession, connectionString, schemaName ); - transaction.reset( new cond::DbTransaction( database->transaction(), false ) ); - isOpen = true; - } - - void close(){ - transaction.reset(); - database.reset(); - isOpen = false; - } - - std::auto_ptr connection; - std::auto_ptr technologyProxy; - std::string const blobStreamingService; - std::auto_ptr database; - std::auto_ptr transaction; - bool isOpen; - }; - -} - -const char* cond::DbSession::COND_SCHEMA_VERSION = "2.0.0"; -const char* cond::DbSession::CHANGE_SCHEMA_VERSION = "2.0.0"; - -cond::DbSession::DbSession(): - m_implementation( new SessionImpl ){ -} - -cond::DbSession::DbSession( const DbConnection& connection ): - m_implementation( new SessionImpl ( connection ) ){ -} - -cond::DbSession::DbSession( const DbSession& rhs ): - m_implementation( rhs.m_implementation ){ -} - -cond::DbSession::~DbSession(){ -} - -cond::DbSession& cond::DbSession::operator=( const cond::DbSession& rhs ){ - if(this!=&rhs) m_implementation = rhs.m_implementation; - return *this; -} - -void cond::DbSession::open( const std::string& connectionString, bool readOnly ) -{ - std::string emptyRole(""); - m_implementation->open( connectionString, emptyRole, readOnly ); -} - -void cond::DbSession::open( const std::string& connectionString, const std::string& asRole, bool readOnly ) -{ - m_implementation->open( connectionString, asRole, readOnly ); -} - -void cond::DbSession::openReadOnly( const std::string& connectionString, const std::string& id ) -{ - m_implementation->openReadOnly( connectionString, id ); -} - -void cond::DbSession::open( boost::shared_ptr& coralSession, const std::string& connectionString, const std::string& schemaName ){ - m_implementation->open( coralSession, connectionString, schemaName ); -} - -void cond::DbSession::close() -{ - m_implementation->close(); -} - -bool cond::DbSession::isOpen() const { - return m_implementation->isOpen; -} - -const std::string& cond::DbSession::connectionString() const { - if(!m_implementation->database.get()) - throw cond::Exception("DbSession::connectionString: cannot get connection string. Session has not been open."); - return m_implementation->database->connectionString(); -} - -cond::DbConnection const & cond::DbSession::connection() const { - return *(m_implementation->connection); -} - - -bool cond::DbSession::isTransactional() const { - return m_implementation->technologyProxy->isTransactional(); -} - -const std::string& cond::DbSession::blobStreamingService() const -{ - return m_implementation->blobStreamingService; -} - -cond::DbTransaction& cond::DbSession::transaction() -{ - if(!m_implementation->transaction.get()) - throw cond::Exception("DbSession::transaction: cannot get transaction. Session has not been open."); - return *m_implementation->transaction; -} - -ora::Database& cond::DbSession::storage(){ - if(!m_implementation->database.get()) - throw cond::Exception("DbSession::storage: cannot access the database. Session has not been open."); - return *m_implementation->database; -} - -bool cond::DbSession::createDatabase(){ - bool created = false; - if ( !storage().exists() ){ - created = true; - storage().create( std::string(COND_SCHEMA_VERSION) ); - } - return created; -} - -bool cond::DbSession::isOldSchema() -{ - ora::Version dbVer = storage().schemaVersion(); - if (dbVer == ora::Version::poolSchemaVersion()) return true; - dbVer = storage().schemaVersion( true ); - return dbVer < ora::Version::fromString( std::string( CHANGE_SCHEMA_VERSION ) ); -} - -coral::ISchema& cond::DbSession::schema( const std::string& schemaName ) -{ - return storage().storageAccessSession().get().schema( schemaName ); -} - -coral::ISchema& cond::DbSession::nominalSchema() -{ - return storage().storageAccessSession().get().nominalSchema(); -} - -bool cond::DbSession::deleteMapping( const std::string& mappingVersion ){ - ora::DatabaseUtility utility = storage().utility(); - utility.eraseMapping( mappingVersion ); - return true; -} - -bool cond::DbSession::importMapping( const std::string& sourceConnectionString, - const std::string& contName ){ - ora::DatabaseUtility utility = storage().utility(); - std::auto_ptr technologyProxy = buildTechnologyProxy(sourceConnectionString, *(m_implementation->connection)); - utility.importContainerSchema( (*technologyProxy).getRealConnectString( sourceConnectionString ), contName ); - return true; -} - -std::string cond::DbSession::storeObject( const ora::Object& object, const std::string& containerName ){ - ora::OId oid = storage().insertItem( containerName, object ); - storage().flush(); - return oid.toString(); -} - -ora::Object cond::DbSession::getObject( const std::string& objectId ){ - ora::OId oid; - oid.fromString( objectId ); - return storage().fetchItem( oid ); -} - -bool cond::DbSession::deleteObject( const std::string& objectId ){ - ora::OId oid; - oid.fromString( objectId ); - storage().erase( oid ); - storage().flush(); - return true; -} - -std::string cond::DbSession::importObject( cond::DbSession& fromDatabase, const std::string& objectId ){ - ora::OId oid; - oid.fromString( objectId ); - ora::Object data = fromDatabase.getObject( objectId ); - ora::Container cont = fromDatabase.storage().containerHandle( oid.containerId() ); - std::string ret = storeObject( data, cont.name() ); - data.destruct(); - return ret; -} - -std::string cond::DbSession::classNameForItem( const std::string& objectId ){ - ora::OId oid; - oid.fromString( objectId ); - std::string ret(""); - if( !oid.isInvalid() ){ - ora::Container cont = storage().containerHandle( oid.containerId() ); - ret = cont.realClassName(); - } - return ret; -} - -void cond::DbSession::flush(){ - storage().flush(); -} - -cond::PoolTokenParser::PoolTokenParser( ora::Database& db ): - m_db( db ){ -} - -ora::OId cond::PoolTokenParser::parse( const std::string& poolToken ){ - std::pair oidData = parseToken( poolToken ); - if( oidData.first.empty() ){ - throwException("Could not resolve Container name from token=\""+poolToken+"\".","PoolTokenParser::parse"); - } - ora::Container cont = m_db.containerHandle( oidData.first ); - return ora::OId( cont.id(), oidData.second ); -} - -std::string cond::PoolTokenParser::className( const std::string& oraToken ){ - ora::OId oid; - oid.fromString( oraToken ); - ora::Container cont = m_db.containerHandle( oid.containerId() ); - return cont.className(); -} - -cond::PoolTokenWriter::PoolTokenWriter( ora::Database& db ): - m_db( db ){ -} - -std::string cond::PoolTokenWriter::write( const ora::OId& oid ){ - ora::Container cont = m_db.containerHandle( oid.containerId() ); - return writeToken( cont.name(), oid.containerId(), oid.itemId(), cont.className() ); -} diff --git a/CondCore/DBCommon/src/DbTransaction.cc b/CondCore/DBCommon/src/DbTransaction.cc deleted file mode 100644 index dc355aae04655..0000000000000 --- a/CondCore/DBCommon/src/DbTransaction.cc +++ /dev/null @@ -1,68 +0,0 @@ -// local includes -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/ORA/interface/Transaction.h" -// coral & pool includes -#include "RelationalAccess/ISessionProxy.h" -#include "RelationalAccess/ITransaction.h" - -cond::DbTransaction::DbTransaction( ora::Transaction& dbTrans, bool owned ): - m_dbTrans( dbTrans ),m_readOnly(true),m_clients(0),m_owned(owned ){ -} - -cond::DbTransaction::~DbTransaction(){ - if( m_owned ) rollback(); -} - -int cond::DbTransaction::start(bool readOnly){ - if(!m_clients){ - m_dbTrans.start( readOnly ); - m_readOnly = readOnly; - } else { - if(readOnly != m_readOnly) - return -1; - } - ++m_clients; - return m_clients; -} - -int cond::DbTransaction::commit(){ - if(!m_clients) return -1; - else{ - --m_clients; - if(m_clients == 0){ - m_dbTrans.commit(); - } - } - return m_clients; -} - -bool cond::DbTransaction::forceCommit(){ - bool doCommit = false; - if(m_clients){ - m_dbTrans.commit(); - doCommit = true; - } - m_clients = 0; - return doCommit; -} - -bool cond::DbTransaction::rollback(){ - bool doRollBack = false; - if(m_clients){ - m_dbTrans.rollback(); - doRollBack = true; - } - m_clients = 0; - return doRollBack; -} - -int cond::DbTransaction::isActive() const { - if(!m_dbTrans.isActive()) return 0; - return m_clients; -} - -bool cond::DbTransaction::isReadOnly() const -{ - return m_dbTrans.isActive( true ); -} - diff --git a/CondCore/DBCommon/src/Exception.cc b/CondCore/DBCommon/src/Exception.cc deleted file mode 100644 index 3ba297e1a77c6..0000000000000 --- a/CondCore/DBCommon/src/Exception.cc +++ /dev/null @@ -1,21 +0,0 @@ -#include "CondCore/DBCommon/interface/Exception.h" -cond::Exception::Exception( const std::string& message ):cms::Exception("Conditions",message){} -cond::Exception::~Exception() throw(){} - -cond::noDataForRequiredTimeException::noDataForRequiredTimeException( -const std::string& from, const std::string& rcd, const std::string& current ): - cond::Exception(from+": no data available in "+rcd+" at time "+current){} -cond::noDataForRequiredTimeException::~noDataForRequiredTimeException() throw(){} - -cond::RefException::RefException( const std::string& from, const std::string& msg): - cond::Exception(std::string("Error in building cond::Ref ")+from+" "+msg){} - -cond::TransactionException::TransactionException( const std::string& from, const std::string& msg): - cond::Exception(std::string("Transaction Error ")+from+" "+msg){} - -namespace cond { - void throwException( std::string const& message, - std::string const& methodName ){ - throw Exception( methodName + ": " + message ); - } -} diff --git a/CondCore/DBCommon/src/FileUtils.cc b/CondCore/DBCommon/src/FileUtils.cc deleted file mode 100644 index a91b15d11d63c..0000000000000 --- a/CondCore/DBCommon/src/FileUtils.cc +++ /dev/null @@ -1,53 +0,0 @@ -#include "CondCore/DBCommon/interface/FileUtils.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include -#include - -bool cond::FileReader::read(const std::string& fileName){ - /**struct stat st; - if (stat(inputFileName.c_str(), &st) < 0){ - seal::MessageStream log( this, this->name(),seal::Msg::Verbose ); - log << seal::Msg::Error << "File \"" << inputFileName << "\" not found." << seal::flush; - return false; - } - - std::vector buf(st.st_size, 0); - int fd = open(inputFileName.c_str(), O_RDONLY); - if (fd < 0){ - seal::MessageStream log( this, this->name(),seal::Msg::Verbose ); - log << seal::Msg::Error << "File \"" << inputFileName << "\" cannot be open." << seal::flush; - close(fd); - return false; - } - - if (read(fd, &buf[0], st.st_size) != st.st_size){ - seal::MessageStream log( this, this->name(),seal::Msg::Verbose ); - log << seal::Msg::Error << "File \"" << inputFileName << "\" cannot be open for reading." << seal::flush; - close(fd); - return false; - } - std::string content(&buf[0], &buf[0]+st.st_size); - **/ - std::ifstream inputFile; - inputFile.open (fileName.c_str()); - if(!inputFile.good()){ - std::stringstream msg; - msg << "File \"" << fileName << "\" cannot be open."; - inputFile.close(); - throw cond::Exception(msg.str()); - } - // get pointer to associated buffer object - std::filebuf* pbuf=inputFile.rdbuf(); - // get file size using buffer's members - long size=pbuf->pubseekoff (0,std::ios::end,std::ios::in); - pbuf->pubseekpos (0,std::ios::in); - // allocate memory to contain file data - char* buffer=new char[size+1]; - // get file data - pbuf->sgetn (buffer,size); - inputFile.close(); - buffer[size]=0; - m_content += buffer; - delete [] buffer; - return true; -} diff --git a/CondCore/DBCommon/src/FipProtocolParser.cc b/CondCore/DBCommon/src/FipProtocolParser.cc deleted file mode 100644 index 9203db80f286e..0000000000000 --- a/CondCore/DBCommon/src/FipProtocolParser.cc +++ /dev/null @@ -1,14 +0,0 @@ -#include "CondCore/DBCommon/interface/FipProtocolParser.h" -#include "FWCore/ParameterSet/interface/FileInPath.h" -cond::FipProtocolParser::FipProtocolParser(){} -cond::FipProtocolParser::~FipProtocolParser(){} - -std::string -cond::FipProtocolParser::getRealConnect(const std::string& fipConnect) const{ - std::string connect("sqlite_file:"); - std::string::size_type pos=fipConnect.find(':'); - std::string fipLocation=fipConnect.substr(pos+1); - edm::FileInPath fip(fipLocation); - connect.append( fip.fullPath() ); - return connect; -} diff --git a/CondCore/DBCommon/src/IOVInfo.cc b/CondCore/DBCommon/src/IOVInfo.cc deleted file mode 100644 index 78241f3287317..0000000000000 --- a/CondCore/DBCommon/src/IOVInfo.cc +++ /dev/null @@ -1,24 +0,0 @@ -#include "CondCore/DBCommon/interface/IOVInfo.h" - -#include -#include -#include -#include -namespace cond { - - std::string userInfo() { - // this are really static stuff - std::ostringstream user_info; - char * user= ::getenv("USER"); - std::vector hname(1024,'\0'); - char * hostname = &hname.front(); - ::gethostname(hostname, 1024); - char * pwd = ::getenv("PWD"); - if (user) { user_info<< "USER=" << user <<";" ;} else { user_info<< "USER="<< "??;";} - if (hostname[0] != '\0') {user_info<< "HOSTNAME=" << hostname <<";";} - else { user_info<< "HOSTNAME="<< "??;";} - if (pwd) {user_info<< "PWD=" << pwd <<";";} else {user_info<< "PWD="<< "??;";} - return user_info.str(); - } - -} diff --git a/CondCore/DBCommon/src/LogDBNames.cc b/CondCore/DBCommon/src/LogDBNames.cc deleted file mode 100644 index 9ab5024b3c8b1..0000000000000 --- a/CondCore/DBCommon/src/LogDBNames.cc +++ /dev/null @@ -1,9 +0,0 @@ -#include "LogDBNames.h" -std::string -cond::LogDBNames::SequenceTableName(){ - return std::string("COND_SEQUENCE_TABLE"); -} -std::string -cond::LogDBNames::LogTableName(){ - return std::string("COND_LOG_TABLE"); -} diff --git a/CondCore/DBCommon/src/LogDBNames.h b/CondCore/DBCommon/src/LogDBNames.h deleted file mode 100644 index 1d53cfad1fe28..0000000000000 --- a/CondCore/DBCommon/src/LogDBNames.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef CondCore_DBCommon_LogDBNames_h -#define CondCore_DBCommon_LogDBNames_h -#include -namespace cond{ - class LogDBNames{ - public: - static std::string SequenceTableName(); - static std::string LogTableName(); - }; -}//ns cond -#endif diff --git a/CondCore/DBCommon/src/Logger.cc b/CondCore/DBCommon/src/Logger.cc deleted file mode 100644 index 92fcbdd6426eb..0000000000000 --- a/CondCore/DBCommon/src/Logger.cc +++ /dev/null @@ -1,345 +0,0 @@ -#include "CondCore/DBCommon/interface/Logger.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" -#include "CondCore/DBCommon/interface/SequenceManager.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbScopedTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/Auth.h" -#include "CondCore/ORA/interface/PoolToken.h" -#include "RelationalAccess/ISchema.h" -#include "RelationalAccess/ITable.h" -#include "RelationalAccess/ITableDataEditor.h" -#include "RelationalAccess/IQuery.h" -#include "RelationalAccess/ICursor.h" -#include "RelationalAccess/TableDescription.h" -#include "RelationalAccess/ITablePrivilegeManager.h" -#include "CoralBase/Attribute.h" -#include "CoralBase/AttributeList.h" -#include "CoralBase/AttributeSpecification.h" -#include "LogDBNames.h" -#include //no i/o just types - -#include -#include -namespace cond{ - template - std::string to_string(const T& t){ - std::stringstream ss; - ss<() ); - description.setPrimaryKey( std::vector( 1, std::string("LOGID"))); - description.insertColumn(std::string("EXECTIME"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("EXECTIME")); - - description.insertColumn(std::string("IOVTAG"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("IOVTAG")); - - description.insertColumn(std::string("IOVTIMETYPE"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("IOVTIMETYPE")); - - description.insertColumn(std::string("PAYLOADCLASS"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("PAYLOADCLASS")); - - description.insertColumn(std::string("PAYLOADTOKEN"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("PAYLOADTOKEN")); - - description.insertColumn(std::string("PAYLOADINDEX"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("PAYLOADINDEX")); - - description.insertColumn(std::string("LASTSINCE"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("LASTSINCE")); - - description.insertColumn(std::string("DESTINATIONDB"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("DESTINATIONDB")); - - description.insertColumn(std::string("PROVENANCE"), - coral::AttributeSpecification::typeNameForType() ); - description.insertColumn(std::string("USERTEXT"), - coral::AttributeSpecification::typeNameForType() ); - description.insertColumn(std::string("EXECMESSAGE"), - coral::AttributeSpecification::typeNameForType() ); - m_sessionHandle.nominalSchema().createTable( description ); - m_logTableExists=true; - trans.commit(); -} -void -cond::Logger::logOperationNow( - const cond::UserLogInfo& userlogInfo, - const std::string& destDB, - const std::string& payloadClass, - const std::string& payloadToken, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince - ){ - cond::DbScopedTransaction trans( m_sessionHandle ); - trans.start(false); - //aquireutctime - //using namespace boost::posix_time; - boost::posix_time::ptime p=boost::posix_time::microsec_clock::universal_time(); - std::string now=cond::to_string(p.date().year())+"-"+cond::to_string(p.date().month())+"-"+cond::to_string(p.date().day())+"-"+cond::to_string(p.time_of_day().hours())+":"+cond::to_string(p.time_of_day().minutes())+":"+cond::to_string(p.time_of_day().seconds()); - //aquireentryid - if(!m_sequenceManager){ - m_sequenceManager=new cond::SequenceManager(m_sessionHandle,cond::LogDBNames::SequenceTableName()); - } - unsigned long long targetLogId=m_sequenceManager->incrementId(LogDBNames::LogTableName()); - //insert log record with the new id - this->insertLogRecord(targetLogId,now,destDB,payloadClass,payloadToken,userlogInfo,iovtag,iovtimetype,payloadIdx,lastSince,"OK"); - trans.commit(); -} -void -cond::Logger::logFailedOperationNow( - const cond::UserLogInfo& userlogInfo, - const std::string& destDB, - const std::string& payloadClass, - const std::string& payloadToken, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince, - const std::string& exceptionMessage - ){ - cond::DbScopedTransaction trans( m_sessionHandle ); - trans.start(false); - //aquireutctime - boost::posix_time::ptime p=boost::posix_time::microsec_clock::universal_time(); - std::string now=cond::to_string(p.date().year())+"-"+cond::to_string(p.date().month())+"-"+cond::to_string(p.date().day())+"-"+cond::to_string(p.time_of_day().hours())+":"+cond::to_string(p.time_of_day().minutes())+":"+cond::to_string(p.time_of_day().seconds()); - //aquireentryid - if(!m_sequenceManager){ - m_sequenceManager=new cond::SequenceManager(m_sessionHandle,cond::LogDBNames::SequenceTableName()); - } - unsigned long long targetLogId=m_sequenceManager->incrementId(LogDBNames::LogTableName()); - //insert log record with the new id - this->insertLogRecord(targetLogId,now,destDB,payloadClass,payloadToken,userlogInfo,iovtag,iovtimetype,payloadIdx,lastSince,exceptionMessage); - trans.commit(); -} - -void -cond::Logger::LookupLastEntryByProvenance(const std::string& provenance, - LogDBEntry& logentry, - bool filterFailedOp) const{ - //construct where - std::string whereClause=cond::LogDBNames::LogTableName(); - whereClause+=".PROVENANCE=:provenance"; - if(filterFailedOp){ - whereClause+=std::string(" AND "); - whereClause+=cond::LogDBNames::LogTableName(); - whereClause+=std::string(".EXECMESSAGE=:execmessage"); - } - coral::AttributeList BindVariableList; - BindVariableList.extend("provenance",typeid(std::string) ); - BindVariableList.extend("execmessage",typeid(std::string) ); - BindVariableList["provenance"].data()=provenance; - BindVariableList["execmessage"].data()="OK"; - m_sessionHandle.transaction().start(true); - { - std::auto_ptr query(m_sessionHandle.nominalSchema().tableHandle( cond::LogDBNames::LogTableName() ).newQuery()); - // construct select - query->addToOutputList( "LOGID" ); - query->defineOutputType( "LOGID", "unsigned long long" ); - query->addToOutputList( "DESTINATIONDB" ); - query->addToOutputList( "PROVENANCE" ); - query->addToOutputList( "USERTEXT" ); - query->addToOutputList( "IOVTAG" ); - query->addToOutputList( "IOVTIMETYPE" ); - query->addToOutputList( "PAYLOADINDEX" ); - query->defineOutputType( "PAYLOADINDEX", "unsigned int" ); - query->addToOutputList( "LASTSINCE" ); - query->defineOutputType( "LASTSINCE", "unsigned long long" ); - query->addToOutputList( "PAYLOADCLASS" ); - query->addToOutputList( "PAYLOADTOKEN" ); - query->addToOutputList( "EXECTIME" ); - query->addToOutputList( "EXECMESSAGE" ); - - query->setCondition( whereClause, BindVariableList ); - query->addToOrderList( cond::LogDBNames::LogTableName()+".LOGID desc" ); - query->limitReturnedRows(); - coral::ICursor& cursor = query->execute(); - if( cursor.next() ) { - const coral::AttributeList& row = cursor.currentRow(); - logentry.logId=row["LOGID"].data(); - logentry.destinationDB=row["DESTINATIONDB"].data(); - logentry.provenance=row["PROVENANCE"].data(); - logentry.usertext=row["USERTEXT"].data(); - logentry.iovtag=row["IOVTAG"].data(); - logentry.iovtimetype=row["IOVTIMETYPE"].data(); - logentry.payloadIdx=row["PAYLOADINDEX"].data(); - logentry.lastSince=row["LASTSINCE"].data(); - logentry.payloadClass=row["PAYLOADCLASS"].data(); - logentry.payloadToken=row["PAYLOADTOKEN"].data(); - logentry.exectime=row["EXECTIME"].data(); - logentry.execmessage=row["EXECMESSAGE"].data(); - } - } - m_sessionHandle.transaction().commit(); -} -void -cond::Logger::LookupLastEntryByTag( const std::string& iovtag, - const std::string & connectionStr, - cond::LogDBEntry& logentry, - bool filterFailedOp) const{ - coral::AttributeList BindVariableList; - BindVariableList.extend("IOVTAG",typeid(std::string) ); - BindVariableList["IOVTAG"].data()=iovtag; - std::string whereClause(""); - whereClause+=std::string("IOVTAG=:IOVTAG"); - if(connectionStr!=""){ - whereClause+=std::string(" AND "); - whereClause+=std::string("DESTINATIONDB=:DESTINATIONDB"); - BindVariableList.extend("DESTINATIONDB",typeid(std::string) ); - BindVariableList["DESTINATIONDB"].data()=connectionStr; - } - if(filterFailedOp){ - whereClause+=std::string(" AND "); - whereClause+=std::string("EXECMESSAGE=:EXECMESSAGE"); - BindVariableList.extend("EXECMESSAGE",typeid(std::string) ); - BindVariableList["EXECMESSAGE"].data()="OK"; - } - m_sessionHandle.transaction().start(true); - { - std::auto_ptr query( m_sessionHandle.nominalSchema().tableHandle(cond::LogDBNames::LogTableName()).newQuery() ); - // construct select - query->addToOutputList( "LOGID" ); - query->defineOutputType( "LOGID", "unsigned long long" ); - query->addToOutputList( "DESTINATIONDB" ); - query->addToOutputList( "PROVENANCE" ); - query->addToOutputList( "USERTEXT" ); - query->addToOutputList( "IOVTAG" ); - query->addToOutputList( "IOVTIMETYPE" ); - query->addToOutputList( "PAYLOADINDEX" ); - query->defineOutputType( "PAYLOADINDEX", "unsigned int" ); - query->addToOutputList( "LASTSINCE" ); - query->defineOutputType( "LASTSINCE", "unsigned long long" ); - query->addToOutputList( "PAYLOADCLASS" ); - query->addToOutputList( "PAYLOADTOKEN" ); - query->addToOutputList( "EXECTIME" ); - query->addToOutputList( "EXECMESSAGE" ); - - query->setCondition( whereClause, BindVariableList ); - query->addToOrderList( "LOGID DESC" ); - query->limitReturnedRows(); - coral::ICursor& cursor = query->execute(); - if( cursor.next() ) { - const coral::AttributeList& row = cursor.currentRow(); - logentry.logId=row["LOGID"].data(); - logentry.destinationDB=row["DESTINATIONDB"].data(); - logentry.provenance=row["PROVENANCE"].data(); - logentry.usertext=row["USERTEXT"].data(); - logentry.iovtag=row["IOVTAG"].data(); - logentry.iovtimetype=row["IOVTIMETYPE"].data(); - logentry.payloadIdx=row["PAYLOADINDEX"].data(); - logentry.lastSince=row["LASTSINCE"].data(); - logentry.payloadClass=row["PAYLOADCLASS"].data(); - logentry.payloadToken=row["PAYLOADTOKEN"].data(); - logentry.exectime=row["EXECTIME"].data(); - logentry.execmessage=row["EXECMESSAGE"].data(); - - } - } - m_sessionHandle.transaction().commit(); -} -void -cond::Logger::LookupLastEntryByTag( const std::string& iovtag, - LogDBEntry& logentry, - bool filterFailedOp ) const{ - LookupLastEntryByTag(iovtag,"",logentry,filterFailedOp); -} -void -cond::Logger::insertLogRecord(unsigned long long logId, - const std::string& utctime, - const std::string& destDB, - const std::string& payloadClass, - const std::string& payloadToken, - const cond::UserLogInfo& userLogInfo, - const std::string& iovtag, - const std::string& iovtimetype, - unsigned int payloadIdx, - unsigned long long lastSince, - const std::string& exceptionMessage){ - try{ - coral::AttributeList rowData; - rowData.extend("LOGID"); - rowData.extend("EXECTIME"); - rowData.extend("DESTINATIONDB"); - rowData.extend("PAYLOADCLASS"); - rowData.extend("PAYLOADTOKEN"); - rowData.extend("PROVENANCE"); - rowData.extend("USERTEXT"); - rowData.extend("IOVTAG"); - rowData.extend("IOVTIMETYPE"); - rowData.extend("PAYLOADINDEX"); - rowData.extend("LASTSINCE"); - rowData.extend("EXECMESSAGE"); - rowData["LOGID"].data< unsigned long long >() = logId; - rowData["EXECTIME"].data< std::string >() = utctime; - rowData["DESTINATIONDB"].data< std::string >() = destDB; - rowData["PAYLOADCLASS"].data< std::string >() = payloadClass; - std::string ptok = payloadToken; - if( payloadToken.empty() ) ptok = "NA"; - rowData["PAYLOADTOKEN"].data< std::string >() = ptok; - rowData["PROVENANCE"].data< std::string >() = userLogInfo.provenance; - rowData["USERTEXT"].data< std::string >() = userLogInfo.usertext; - rowData["IOVTAG"].data< std::string >() = iovtag; - rowData["IOVTIMETYPE"].data< std::string >() = iovtimetype; - rowData["PAYLOADINDEX"].data< unsigned int >() = payloadIdx; - rowData["LASTSINCE"].data< unsigned long long >() = lastSince; - rowData["EXECMESSAGE"].data< std::string >() = exceptionMessage; - m_sessionHandle.nominalSchema().tableHandle(cond::LogDBNames::LogTableName()).dataEditor().insertRow(rowData); - }catch(const std::exception& er){ - throw cond::Exception(std::string(er.what())); - } -} - -cond::Logger::~Logger(){ - if( m_sequenceManager ){ - delete m_sequenceManager; - m_sequenceManager=0; - } -} diff --git a/CondCore/DBCommon/src/SQLReport.cc b/CondCore/DBCommon/src/SQLReport.cc deleted file mode 100644 index f687bfe865d12..0000000000000 --- a/CondCore/DBCommon/src/SQLReport.cc +++ /dev/null @@ -1,27 +0,0 @@ -#include "CondCore/DBCommon/interface/SQLReport.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "RelationalAccess/IMonitoringReporter.h" -#include - -constexpr char SQLREPORT_DEFAULT_FILENAME[] = "sqlreport.out"; - -void cond::SQLReport::reportForConnection(const std::string& connectionString){ - m_report << "-- connection: "<< connectionString << std::endl; - m_connection.monitoringReporter().reportToOutputStream( connectionString, m_report ); -} - -bool cond::SQLReport::putOnFile(std::string fileName){ - std::ofstream outFile; - if(fileName.empty()) fileName.append(SQLREPORT_DEFAULT_FILENAME); - outFile.open(fileName.c_str()); - if(!outFile.good()){ - std::stringstream msg; - msg << "Cannot open the output file \""< -cond::SequenceManager::SequenceManager(cond::DbSession& coraldb, - const std::string& sequenceTableName): - m_coraldb(coraldb), - m_sequenceTableName( sequenceTableName ), - m_tableToId(), - m_sequenceTableExists( false ), - m_whereClause( std::string("REFTABLE_NAME")+" =:"+std::string("REFTABLE_NAME")), - m_whereData( 0 ), - m_setClause( std::string("IDVALUE")+" = "+std::string("IDVALUE")+" + 1"), - m_started( false ) -{ - m_whereData = new coral::AttributeList; - m_whereData->extend(std::string("REFTABLE_NAME")); - init(); -} -void -cond::SequenceManager::init(){ - m_sequenceTableExists=m_coraldb.nominalSchema().existsTable(m_sequenceTableName) ; - m_started=true; -} -cond::SequenceManager::~SequenceManager() -{ - delete m_whereData; -} -unsigned long long -cond::SequenceManager::incrementId( const std::string& tableName ){ - std::map< std::string, unsigned long long >::iterator iSequence = m_tableToId.find( tableName ); - coral::ISchema& schema=m_coraldb.nominalSchema(); - if ( iSequence == m_tableToId.end() ) { - // Make sure that the sequence table exists. - if ( ! m_sequenceTableExists ) { - throw cond::Exception("SequenceManager::incrementId"); - } - // Lock the entry in the table. - unsigned long long lastIdUsed = 0; - if ( ! ( this->lockEntry( schema, tableName, lastIdUsed ) ) ) { - // Create the entry in the table if it does not exist. - coral::AttributeList rowData; - rowData.extend("REFTABLE_NAME"); - rowData.extend("IDVALUE"); - coral::AttributeList::iterator iAttribute = rowData.begin(); - iAttribute->data< std::string >() = tableName; - ++iAttribute; - unsigned long long startingIdValue = lastIdUsed; - iAttribute->data< unsigned long long >() = startingIdValue; - try{ - schema.tableHandle( m_sequenceTableName ).dataEditor().insertRow( rowData ); - m_tableToId.insert( std::make_pair( tableName, startingIdValue ) ); - return startingIdValue; - }catch(const coral::DataEditorException& er){ - this->lockEntry( schema, tableName, lastIdUsed ); - ++lastIdUsed; - iSequence = m_tableToId.insert( std::make_pair( tableName, lastIdUsed ) ).first; - m_whereData->begin()->data() = tableName; - schema.tableHandle(m_sequenceTableName).dataEditor().updateRows(m_setClause,m_whereClause,*m_whereData ); - return lastIdUsed; - //startingIdValue = lastIdUsed+1; - //m_tableToId.insert( std::make_pair( tableName, startingIdValue ) ); - }catch(std::exception& er){ - throw cond::Exception(er.what()); - } - - } - // Add the entry into the map. - iSequence = m_tableToId.insert( std::make_pair( tableName, lastIdUsed ) ).first; - } - // Increment the oid transiently - unsigned long long& oid = iSequence->second; - this->lockEntry( schema, tableName, oid ); - ++oid; - // Increment the oid in the database as well - - m_whereData->begin()->data() = tableName; - schema.tableHandle(m_sequenceTableName).dataEditor().updateRows(m_setClause,m_whereClause,*m_whereData ); - - return oid; -} -/* -void -cond::SequenceManager::updateId( const std::string& tableName, - unsigned long long lastId ){ - // Make sure that the sequence table exists. - if ( ! m_sequenceTableExists ) { - throw; - } - bool update = false; - coral::IQuery* query = m_coraldb.nominalSchema().tableHandle( m_sequenceTableName ).newQuery(); - query->limitReturnedRows( 1, 0 ); - query->addToOutputList( std::string("IDVALUE") ); - query->defineOutputType( std::string("IDVALUE"),coral::AttributeSpecification::typeNameForType() ); - m_whereData->begin()->data< std::string >() = tableName; - query->setCondition( m_whereClause, *m_whereData ); - coral::ICursor& cursor = query->execute(); - if ( cursor.next() ) { - update = true; - } - delete query; - - coral::AttributeList rowData; - rowData.extend( std::string("IDVALUE") ); - rowData.extend( std::string("REFTABLE_NAME") ); - coral::AttributeList::iterator iAttribute = rowData.begin(); - iAttribute->data< unsigned long long >() = lastId; - ++iAttribute; - iAttribute->data< std::string >() = tableName; - coral::ISchema& schema= m_coraldb.nominalSchema(); - if ( update ) { - // Update the entry in the table - std::string setClause(std::string("IDVALUE")+" =: "+std::string("IDVALUE")); - schema.tableHandle( m_sequenceTableName ).dataEditor().updateRows( setClause,m_whereClause,rowData ); - m_tableToId.erase( tableName ); - } else { - schema.tableHandle( m_sequenceTableName ).dataEditor().insertRow( rowData ); - } - m_tableToId.insert( std::make_pair( tableName, lastId ) ); -} -*/ -void -cond::SequenceManager::clear() -{ - m_tableToId.clear(); -} -bool -cond::SequenceManager::existSequencesTable(){ - return m_sequenceTableExists; -} -void -cond::SequenceManager::createSequencesTable() -{ - coral::ISchema& schema= m_coraldb.nominalSchema(); - coral::TableDescription description( "CONDSEQ" ); - description.setName(m_sequenceTableName); - description.insertColumn(std::string("REFTABLE_NAME"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("REFTABLE_NAME")); - description.insertColumn(std::string("IDVALUE"), - coral::AttributeSpecification::typeNameForType() ); - description.setNotNullConstraint(std::string("IDVALUE")); - description.setPrimaryKey( std::vector< std::string >( 1, std::string("REFTABLE_NAME"))); - schema.createTable( description ).privilegeManager().grantToPublic( coral::ITablePrivilegeManager::Select ); - m_sequenceTableExists=true; -} - -bool -cond::SequenceManager::lockEntry( coral::ISchema& schema, - const std::string& sequenceName, - unsigned long long& lastId ){ - std::auto_ptr< coral::IQuery > query( schema.tableHandle(m_sequenceTableName).newQuery()); - query->limitReturnedRows( 1, 0 ); - query->addToOutputList( std::string("IDVALUE") ); - query->defineOutputType( std::string("IDVALUE"), coral::AttributeSpecification::typeNameForType() ); - query->setForUpdate(); - m_whereData->begin()->data< std::string >() = sequenceName; - query->setCondition( m_whereClause, *m_whereData ); - coral::ICursor& cursor = query->execute(); - if ( cursor.next() ) { - lastId = cursor.currentRow().begin()->data< unsigned long long >(); - return true; - }else { - cursor.close(); - return false; - } -} diff --git a/CondCore/DBCommon/src/TechnologyProxyFactory.cc b/CondCore/DBCommon/src/TechnologyProxyFactory.cc deleted file mode 100644 index 69d0da9f33975..0000000000000 --- a/CondCore/DBCommon/src/TechnologyProxyFactory.cc +++ /dev/null @@ -1,3 +0,0 @@ -#include "CondCore/DBCommon/interface/TechnologyProxyFactory.h" -EDM_REGISTER_PLUGINFACTORY(cond::TechnologyProxyFactory,"DBTechnologyPlugin"); - diff --git a/CondCore/DBCommon/src/Time.cc b/CondCore/DBCommon/src/Time.cc deleted file mode 100644 index 0ee3ca46fef92..0000000000000 --- a/CondCore/DBCommon/src/Time.cc +++ /dev/null @@ -1 +0,0 @@ -#include "CondCore/DBCommon/interface/Time.h" diff --git a/CondCore/DBCommon/test/BuildFile.xml b/CondCore/DBCommon/test/BuildFile.xml deleted file mode 100644 index f70dceb09e719..0000000000000 --- a/CondCore/DBCommon/test/BuildFile.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/CondCore/DBCommon/test/classes.h b/CondCore/DBCommon/test/classes.h deleted file mode 100644 index ce14cbeb65c42..0000000000000 --- a/CondCore/DBCommon/test/classes.h +++ /dev/null @@ -1 +0,0 @@ -#include "CondCore/DBCommon/test/testCondObj.h" diff --git a/CondCore/DBCommon/test/classes_def.xml b/CondCore/DBCommon/test/classes_def.xml deleted file mode 100644 index f48f00d96cd6c..0000000000000 --- a/CondCore/DBCommon/test/classes_def.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/CondCore/DBCommon/test/testBlobStreaming.cpp b/CondCore/DBCommon/test/testBlobStreaming.cpp deleted file mode 100644 index 7855e9383b715..0000000000000 --- a/CondCore/DBCommon/test/testBlobStreaming.cpp +++ /dev/null @@ -1,116 +0,0 @@ -// -// unit test, include files as they exists only in the plugin... -// -#include "CondCore/DBCommon/plugins/BlobStreamingService.cc" -#include "CondCore/DBCommon/plugins/TBufferBlobStreamingService.cc" - -#include -#include -#include -#include - -namespace test { - namespace BlobStreaming { - int test() { - - using namespace cond; - - BlobStreamingService streamer; - - // white box tests... - for (size_t i=0; i!=BlobStreamingService::nVariants; ++i) - std::cout << i << " " << std::hex << BlobStreamingService::variantIds[i].first << "-" - << BlobStreamingService::variantIds[i].second << std::dec << std::endl; - - std::vector crap(1024); - for(size_t i=0; i!=crap.size(); ++i) - crap[i] = i%256; - crap[3]=5; crap[10]=123; - - BlobStreamingService::Variant id = BlobStreamingService::findVariant(&crap.front()); - std::cout << "shall be zero " << id << std::endl; - - *reinterpret_cast(&crap.front()) = BlobStreamingService::variantIds[BlobStreamingService::COMPRESSED_TBUFFER]; - id = BlobStreamingService::findVariant(&crap.front()); - std::cout << "shall be one " << id << std::endl; - - boost::shared_ptr blob1 = BlobStreamingService::compress(&crap.front(), crap.size()); - unsigned long long s = *reinterpret_cast((unsigned char*)(blob1->startingAddress())+ BlobStreamingService::m_idsize); - std::cout << "compressed " << blob1->size() << " " << s << std::endl; - - boost::shared_ptr blob2 = BlobStreamingService::expand(*blob1); - std::cout << "expanded (shall be " << crap.size() << ") "<< blob2->size() << std::endl; - std::vector crap2(1024); - ::memcpy(&crap2.front(),blob2->startingAddress(),blob2->size()); - if (crap!=crap2) std::cout << "compress - expansion failed" << std::endl; - - // back-box test - - std::vector vf(1024); - for(size_t i=0; i!=vf.size(); ++i) - vf[i] = float(i)+float(i)/1000.; - - edm::TypeWithDict vType = edm::TypeWithDict( typeid(std::vector) ); - - { - // old mode - cond::TBufferBlobStreamingService tstreamer; - boost::shared_ptr blob = tstreamer.write(&vf,vType); - std::cout << "old format size " << blob->size() << std::endl; - BlobStreamingService::Variant id = BlobStreamingService::findVariant(blob->startingAddress()); - std::cout << "shall be zero " << id << std::endl; - - //void * p; - std::vector vf2; - streamer.read(*blob,&vf2,vType); - //std::vector const & vf2 = *reinterpret_cast const *>(p); - if (vf!=vf2) std::cout << "reading old format failed" << std::endl; - } - { - // new mode - boost::shared_ptr blob = streamer.write(&vf,vType); - std::cout << "new format size " << blob->size() << std::endl; - BlobStreamingService::Variant id = BlobStreamingService::findVariant(blob->startingAddress()); - std::cout << "shall be one " << id << std::endl; - std::vector vf2; - streamer.read(*blob,&vf2,vType); - if (vf!=vf2) std::cout << "reading new format failed" << std::endl; - } - - // CBLOB... - std::vector vc = crap; - - edm::TypeWithDict cType = edm::TypeWithDict( typeid(std::vector) ); - - { - // old mode - cond::TBufferBlobStreamingService tstreamer; - boost::shared_ptr blob = tstreamer.write(&vc,cType); - std::cout << "old format size " << blob->size() << std::endl; - BlobStreamingService::Variant id = BlobStreamingService::findVariant(blob->startingAddress()); - std::cout << "shall be zero " << id << std::endl; - - //void * p; - std::vector vc2; - streamer.read(*blob,&vc2,cType); - if (vc!=vc2) std::cout << "reading old format failed" << std::endl; - } - { - // new mode - boost::shared_ptr blob = streamer.write(&vc,cType); - std::cout << "new format size " << blob->size() << std::endl; - BlobStreamingService::Variant id = BlobStreamingService::findVariant(blob->startingAddress()); - std::cout << "shall be two " << id << std::endl; - std::vector vc2; - streamer.read(*blob,&vc2,cType); - if (vc!=vc2) std::cout << "reading new format failed" << std::endl; - } - - return 0; - } - } -} - -int main() { - return test::BlobStreaming::test(); -} diff --git a/CondCore/DBCommon/test/testCipher.cc b/CondCore/DBCommon/test/testCipher.cc deleted file mode 100644 index 0f73e4a84641e..0000000000000 --- a/CondCore/DBCommon/test/testCipher.cc +++ /dev/null @@ -1,33 +0,0 @@ -#include "CondCore/DBCommon/interface/DecodingKey.h" -#include "CondCore/DBCommon/interface/Cipher.h" -#include - -int main(){ - cond::KeyGenerator gen; - // empty string to encode - std::string empty(""); - std::string k0 = gen.makeWithRandomSize( 100 ); - cond::Cipher c_en( k0 ); - std::string e = c_en.b64encrypt( empty ); - cond::Cipher c_de( k0 ); - std::string d = c_de.b64decrypt(e); - if( empty != d ){ - std::cout <<"##### Error: encoded ["< -#include -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection connection; - connection.configuration().setMessageLevel(coral::Error); - connection.configure(); - try{ - cond::DbSession sourceSession = connection.createSession(); - sourceSession.open("sqlite_file:source.db"); - boost::shared_ptr myobj( new testCondObj ); - myobj->data.insert(std::make_pair(1,"strangestring1")); - myobj->data.insert(std::make_pair(100,"strangestring2")); - sourceSession.transaction().start(false); - sourceSession.createDatabase(); - std::string token = sourceSession.storeObject(myobj.get(), "mycontainer"); - std::cout<<"token "< myinstance = sourceSession.getTypedObject( token ); - std::cout<<"mem pointer "<data[1]<data[100]< newRef = destSession.getTypedObject( t ); - destSession.transaction().commit(); - std::cout<<"committed"< -#include -#include - -int main() { - std::string monitoringServiceName = "COND/Services/SQLMonitoringService"; - std::string authServiceName = "COND/Services/XMLAuthenticationService"; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::CoralServiceManager m_pluginManager; - std::string authpath("/afs/cern.ch/cms/DB/conddb"); - std::string pathenv(std::string("CORAL_AUTH_PATH=")+authpath); - ::putenv(const_cast(pathenv.c_str())); - coral::MessageStream::setMsgVerbosity( coral::Debug ); - coral::Context::instance().loadComponent("CORAL/Services/ConnectionService"); - coral::Context::instance().loadComponent(monitoringServiceName, &m_pluginManager); - coral::Context::instance().loadComponent(authServiceName, &m_pluginManager); - //coral::Context::instance().PropertyManager().property("AuthenticationFile")->set(std::string("/build/gg/key.dat")); - coral::IHandle connectionService=coral::Context::instance().query(); - connectionService->configuration().setAuthenticationService( authServiceName ); - connectionService->configuration().setMonitoringService( monitoringServiceName ); - connectionService->configuration().setMonitoringLevel(coral::monitor::Trace); - std::string connectionString("oracle://cms_orcoff_prep/CMS_COND_UNIT_TESTS"); - - coral::ISessionProxy* session = connectionService->connect( connectionString ); - session->transaction().start(); - // creates a dummy table to be looked up - std::string T1("TEST_DROP_ME"); - session->nominalSchema().dropIfExistsTable( T1 ); - coral::TableDescription descr; - descr.setName( T1 ); - descr.insertColumn("N_X",coral::AttributeSpecification::typeNameForType()); - descr.insertColumn("N_S",coral::AttributeSpecification::typeNameForType()); - session->nominalSchema().createTable( descr ); - session->nominalSchema().dropIfExistsTable( T1 ); - session->transaction().commit(); - delete session; - connectionService->monitoringReporter().report(); - std::cout << "Available reporter : " << std::endl; - std::set< std::string > rep = connectionService->monitoringReporter().monitoredDataSources(); - std::set< std::string >::iterator iter; - for ( iter = rep.begin( ); iter != rep.end( ); iter++ ) - std::cout << "reporter : " << *iter << std::endl; - std::cout << "SQL Monitoring report for session" << std::endl; - connectionService->monitoringReporter().reportToOutputStream( connectionString, std::cout ); - - - return 0; - -} diff --git a/CondCore/DBCommon/test/testDbConnection.cc b/CondCore/DBCommon/test/testDbConnection.cc deleted file mode 100644 index 045d92f1cd7dd..0000000000000 --- a/CondCore/DBCommon/test/testDbConnection.cc +++ /dev/null @@ -1,66 +0,0 @@ -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/standard.h" -#include -#include - -void enableStatus( bool flag ){ - if( flag ){ - std::cout << " ENABLED;"; - } else { - std::cout << " DISABLED;"; - } -} - -void dumpConnectionConfiguration( const cond::DbConnectionConfiguration& conf ){ - std::cout << " Connection Sharing: "; - enableStatus( conf.isConnectionSharingEnabled() ); - std::cout << std::endl; - std::cout << " Connection TimeOut: "< -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection* conn = new cond::DbConnection; - conn->configure( cond::CmsDefaults ); - std::string connStr("sqlite_file:testDbScopedTransaction.db"); - std::string tok0(""); - try { - cond::DbSession s0 = conn->createSession(); - delete conn; - s0.open( connStr ); - s0.transaction().start(); - std::cout << "Transaction active at beginning A="< -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection* conn = new cond::DbConnection; - conn->configure( cond::CmsDefaults ); - std::string connStr("sqlite_file:testDbSession.db"); - { - std::cout << "######### test 0"<createSession(); - session.close(); - try { - session.nominalSchema(); - std::cout << "ERROR: expected exception not thrown (0)"<createSession(); - session.open( connStr ); - s = session; - if(!s.isOpen()){ - std::cout << "ERROR: s should be open now..."< -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection* conn = new cond::DbConnection; - conn->configure( cond::CmsDefaults ); - std::string connStr0("sqlite_file:testDbSessionIO0.db"); - std::string connStr1("sqlite_file:testDbSessionIO1.db"); - cond::DbSession s0; - { - std::cout << "######### test 0"<createSession(); - session.open( connStr0 ); - s0 = session; - if(!s0.isOpen()){ - std::cout << "ERROR: s0 should be open now..."<createSession(); - delete conn; - s1.open( connStr1 ); - std::string tok0(""); - std::string tok1(""); - try { - std::cout << "######### test 2"< data( new int(100) ); - s0.createDatabase(); - tok0 = s0.storeObject( data.get(),"cont0"); - std::cout << "Stored object with id = "< sdata( new std::string("blabla") ); - s1.createDatabase(); - tok1 = s1.storeObject(sdata.get(),"cont1"); - std::cout << "Stored object with id = "< result=rschema.listTables(); - for(std::set::iterator it=result.begin(); it!=result.end(); ++it){ - std::cout<<"table names: "<<*it< read0 = s0.getTypedObject( tok0 ); - std::cout << "Object with id="< read1= s1.getTypedObject( tok1 ); - std::cout << "Object with id="< read2= s0.getTypedObject( tok2 ); - std::cout << "Object with id="< -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection* conn = new cond::DbConnection; - conn->configure( cond::CmsDefaults ); - std::string connStr("sqlite_file:testDbTransaction.db"); - std::string tok0(""); - try { - cond::DbSession s0 = conn->createSession(); - delete conn; - s0.open( connStr ); - std::cout << "Transaction active at beginning="< -#include -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection connection; - connection.configuration().setMessageLevel( coral::Error ); - connection.configure(); - // - cond::DbSession session = connection.createSession(); - session.open( "sqlite_file:testMultipleConnection0.db" ); - session.transaction().start(false); - session.transaction().commit(); - boost::shared_ptr myobj( new testCondObj ); - myobj->data.insert(std::make_pair(10,"ten")); - myobj->data.insert(std::make_pair(2,"two")); - session.transaction().start(false); - session.createDatabase(); - session.storeObject(myobj.get(), "testCondObjContainer"); - session.transaction().commit(); - cond::DbSession session2 = connection.createSession(); - session2.open( "sqlite_file:testMultipleConnection1.db" ); - session2.transaction().start(false); - coral::ISchema& schema = session2.nominalSchema(); - schema.dropIfExistsTable( "mytest" ); - coral::TableDescription description0; - description0.setName( "mytest" ); - description0.insertColumn( "ID",coral::AttributeSpecification::typeNameForId( typeid(int) ) ); - description0.insertColumn( "X",coral::AttributeSpecification::typeNameForId( typeid(float) ) ); - description0.insertColumn( "Y",coral::AttributeSpecification::typeNameForId( typeid(float) ) ); - description0.insertColumn( "ORDER",coral::AttributeSpecification::typeNameForId( typeid(int) ) ); - std::vector idx_cols; - idx_cols.push_back("ORDER"); - description0.createIndex("IDX1",idx_cols,false); - schema.createTable( description0 ); - std::set result=schema.listTables(); - for(std::set::iterator it=result.begin(); it!=result.end(); ++it){ - std::cout<<"table names: "<<*it< -#include -//#include -//#include - -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection connection; - connection.configuration().setMessageLevel( coral::Error ); - connection.configure(); - cond::DbSession session = connection.createSession(); - session.open( "sqlite_file:testSequenceManager.db" ); - session.transaction().start(false); - cond::SequenceManager sequenceGenerator(session,"mysequenceDepot"); - if( !sequenceGenerator.existSequencesTable() ){ - sequenceGenerator.createSequencesTable(); - } - unsigned long long targetId=sequenceGenerator.incrementId("MYLOGDATA"); - std::cout<<"targetId for table MYLOGDATA "< -#include - - -#include -#include -void wait ( int seconds ) -{ - clock_t endwait; - endwait=clock()+seconds*CLOCKS_PER_SEC; - while (clock() < endwait) {} -} -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection connection; - connection.configuration().setMessageLevel( coral::Error ); - connection.configuration().setPoolAutomaticCleanUp( false ); - connection.configuration().setConnectionTimeOut(0); - connection.configure(); - cond::DbSession session = connection.createSession(); - session.open( "sqlite_file:testSingleConnection.db" ); - boost::shared_ptr myobj( new testCondObj ); - myobj->data.insert(std::make_pair(10,"ten")); - myobj->data.insert(std::make_pair(2,"two")); - session.transaction().start(false); - session.createDatabase(); - std::cout<<"waiting for 5 sec in pool transaction..."< result=session.nominalSchema().listTables(); - session.transaction().commit(); - for(std::set::iterator it=result.begin(); it!=result.end(); ++it){ - std::cout<<"table name "<<*it< - -struct Connections { - const char * conStr; - bool readOnly; -}; - -int main(){ - try { - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - std::vector psets; - edm::ParameterSet pSet; - pSet.addParameter("@service_type",std::string("SiteLocalConfigService")); - psets.push_back(pSet); - edm::ServiceToken services(edm::ServiceRegistry::createSet(psets)); - edm::ServiceRegistry::Operate operate(services); - - std::cout<<"testing Connection Handler "< -#include -#include "DataFormats/Provenance/interface/Timestamp.h" -int main() { - std::cout << cond::userInfo() << std::endl; - ::timeval tv; - gettimeofday(&tv,0); - std::cout<<"sec "< -#include -//#include -//#include -#include - -namespace cond{ - class TokenBuilder{ - public: - TokenBuilder(): m_token("") { - } - - ~TokenBuilder() { - } - - void set( const std::string& dictLib, - const std::string& className, - const std::string& containerName, - int pkcolumnValue=0) { - - ora::SharedLibraryName libName; - edmplugin::SharedLibrary shared( libName(dictLib) ); - m_token = writeToken(containerName, 0, pkcolumnValue, className); - } - - std::string const & tokenAsString() const { - return m_token; - } - private: - std::string m_token; - }; -}//ns cond - -int main(){ - cond::TokenBuilder tk; - tk.set("CondFormatsCalibration", - "Pedestals", - "Pedestals", - 0); - std::string const tok1 = tk.tokenAsString(); - tk.set("CondFormatsCalibration", - "Pedestals", - "Pedestals", - 1); - std::string const tok2 = tk.tokenAsString(); - std::string constr("sqlite_file:unittest_DBLogger.db"); - //std::string constr("oracle://devdb10/cms_xiezhen_dev"); - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - cond::DbConnection connection; - connection.configuration().setMessageLevel( coral::Error ); - connection.configure(); - cond::DbSession session = connection.createSession(); - session.open( constr ); - cond::Logger mylogger( session ); - cond::UserLogInfo a; - a.provenance="me"; - mylogger.createLogDBIfNonExist(); - mylogger.logOperationNow(a,constr,std::string("Pedestals"),tok1,"mytag1","runnumber",0,1); - std::cout<<"1. waiting"< namespace cond{ class UnregisteredRecordException : public Exception{ diff --git a/CondCore/DBOutputService/interface/PoolDBOutputService.h b/CondCore/DBOutputService/interface/PoolDBOutputService.h index 5a9fbe6a65723..6a51ab31b5c95 100644 --- a/CondCore/DBOutputService/interface/PoolDBOutputService.h +++ b/CondCore/DBOutputService/interface/PoolDBOutputService.h @@ -2,9 +2,6 @@ #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/TagInfo.h" #include "CondCore/CondDB/interface/Session.h" #include #include @@ -51,7 +48,6 @@ namespace cond{ // std::string tag( const std::string& recordName ); bool isNewTagRequest( const std::string& recordName ); - const cond::Logger& queryLog() const; // template @@ -146,6 +142,7 @@ namespace cond{ void setLogHeaderForRecord(const std::string& recordName, const std::string& provenance, const std::string& usertext); + // // Retrieve tag information of the data // @@ -201,8 +198,6 @@ namespace cond{ std::vector m_currentTimes; cond::persistency::Session m_session; - std::string m_logConnectionString; - std::auto_ptr m_logdb; bool m_dbstarted; std::map m_callbacks; diff --git a/CondCore/DBOutputService/src/PoolDBOutputService.cc b/CondCore/DBOutputService/src/PoolDBOutputService.cc index 79cd5cd1355aa..b89a852221438 100644 --- a/CondCore/DBOutputService/src/PoolDBOutputService.cc +++ b/CondCore/DBOutputService/src/PoolDBOutputService.cc @@ -1,7 +1,5 @@ #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "CondCore/DBOutputService/interface/Exception.h" -//#include "CondCore/DBCommon/interface/TagInfo.h" -//#include "CondCore/DBCommon/interface/IOVInfo.h" #include "CondCore/CondDB/interface/ConnectionPool.h" #include "DataFormats/Provenance/interface/EventID.h" #include "DataFormats/Provenance/interface/Timestamp.h" @@ -10,8 +8,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 @@ -36,19 +32,14 @@ cond::service::PoolDBOutputService::fillRecord( edm::ParameterSet & pset) { 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)); - } + 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_dbstarted( false ), m_callbacks(), m_closeIOV(false), @@ -66,15 +57,6 @@ cond::service::PoolDBOutputService::PoolDBOutputService(const edm::ParameterSet std::string connectionString = iConfig.getParameter("connect"); m_session = connection.createSession( connectionString, true ); - 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 ) ); - } - typedef std::vector< edm::ParameterSet > Parameters; Parameters toPut=iConfig.getParameter("toPut"); for(Parameters::iterator itToPut = toPut.begin(); itToPut != toPut.end(); ++itToPut) @@ -127,11 +109,6 @@ cond::service::PoolDBOutputService::initDB( bool ) try{ if( !m_session.existsDatabase() ) m_session.createDatabase(); - //init logdb if required - 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" ); } @@ -220,9 +197,6 @@ 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"); try{ // FIX ME: synchronization type and description have to be passed as the other parameters? @@ -231,17 +205,7 @@ 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); - } }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"); } @@ -261,10 +225,6 @@ 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? @@ -274,17 +234,7 @@ 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); - } }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"); } @@ -303,9 +253,6 @@ 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(""); try{ cond::persistency::IOVEditor editor = m_session.editIov( myrecord.m_tag ); @@ -313,17 +260,7 @@ cond::service::PoolDBOutputService::appendSinceTime( const std::string& payloadI 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); - } }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())); - } cond::throwException(std::string(er.what()), "PoolDBOutputService::appendSinceTime"); } @@ -382,13 +319,6 @@ cond::service::PoolDBOutputService::setLogHeaderForRecord(const std::string& rec 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; -} - // Still required. void cond::service::PoolDBOutputService::tagInfo(const std::string& recordName,cond::TagInfo_t& result ){ diff --git a/CondCore/DBOutputService/test/stubs/IOVPayloadEndOfJob.cc b/CondCore/DBOutputService/test/stubs/IOVPayloadEndOfJob.cc index ec76625a71378..7e5274c038fb8 100644 --- a/CondCore/DBOutputService/test/stubs/IOVPayloadEndOfJob.cc +++ b/CondCore/DBOutputService/test/stubs/IOVPayloadEndOfJob.cc @@ -2,7 +2,7 @@ #include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "CondFormats/Calibration/interface/Pedestals.h" #include "IOVPayloadEndOfJob.h" diff --git a/CondCore/DBOutputService/test/stubs/MyDataAnalyzer.cc b/CondCore/DBOutputService/test/stubs/MyDataAnalyzer.cc index fc63c4587f8ef..efd69f13fef53 100644 --- a/CondCore/DBOutputService/test/stubs/MyDataAnalyzer.cc +++ b/CondCore/DBOutputService/test/stubs/MyDataAnalyzer.cc @@ -5,9 +5,9 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/Event.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" +//#include "CondCore/DBCommon/interface/LogDBEntry.h" +#include "CondCore/CondDB/interface/Exception.h" +//#include "CondCore/DBCommon/interface/DbTransaction.h" #include "CondFormats/Calibration/interface/Pedestals.h" #include "MyDataAnalyzer.h" @@ -33,7 +33,6 @@ void MyDataAnalyzer::endJob(){ return; } try{ - mydbservice->setLogHeaderForRecord(m_record,"mynullsource","this is zhen's dummy test"); std::string tag=mydbservice->tag(m_record); Pedestals* myped=new Pedestals; if( mydbservice->isNewTagRequest(m_record) ){ diff --git a/CondCore/EgammaPlugins/BuildFile.xml b/CondCore/EgammaPlugins/BuildFile.xml index 71e165168411a..0d3e2df72c15c 100644 --- a/CondCore/EgammaPlugins/BuildFile.xml +++ b/CondCore/EgammaPlugins/BuildFile.xml @@ -1,6 +1,5 @@ - diff --git a/CondCore/HIPlugins/BuildFile.xml b/CondCore/HIPlugins/BuildFile.xml index e8e4e794a498d..5fb85ac08fc62 100644 --- a/CondCore/HIPlugins/BuildFile.xml +++ b/CondCore/HIPlugins/BuildFile.xml @@ -1,6 +1,5 @@ - diff --git a/CondCore/MetaDataService/BuildFile.xml b/CondCore/MetaDataService/BuildFile.xml deleted file mode 100644 index b64fed96cc695..0000000000000 --- a/CondCore/MetaDataService/BuildFile.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/CondCore/MetaDataService/doc/MetaDataService.doc b/CondCore/MetaDataService/doc/MetaDataService.doc deleted file mode 100644 index 0bf7ce03bb662..0000000000000 --- a/CondCore/MetaDataService/doc/MetaDataService.doc +++ /dev/null @@ -1,44 +0,0 @@ - -/*! - -\page CondCore_MetaDataService Package CondCore/MetaDataService - -
- - - -Source code (CVS tag: @CVS_TAG@) - -Administrative privileges - -
- -\section desc Description - - -Package handles iov metadata - -\subsection interface Public interface - - -- MetaDataExceptions -- MetaData -- MetaDataNames - -\subsection modules Modules - -None - - -\subsection tests Unit tests and examples - -- testMetaData : functionality test - -\section status Status and planned development - -Stable - -
-Last updated: -@DATE@ Author: Z.Xie -*/ - diff --git a/CondCore/MetaDataService/interface/MetaData.h b/CondCore/MetaDataService/interface/MetaData.h deleted file mode 100644 index 25d02c065eebd..0000000000000 --- a/CondCore/MetaDataService/interface/MetaData.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef CondCore_MetaDataService_METADATA_H -#define CondCore_MetaDataService_METADATA_H -#include -#include -#include "CondCore/DBCommon/interface/Time.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "MetaDataEntry.h" -// -// Package: MetaDataService -// Class : MetaData -// -/**\class MetaData MetaData.h CondCore/MetaDataService/interface/MetaDataService.h - Description: class for handling IOV metadata -*/ -// -// Author: Zhen Xie -// -namespace cond{ - class MetaData { - public: - // constructor - explicit MetaData( cond::DbSession& userSession ); - // destructor - ~MetaData(); - // add metadata entry - bool addMapping(const std::string& name, const std::string& token,cond::TimeType timetype=cond::runnumber); - // replace iov token associated with a given tag - //bool replaceToken(const std::string& name, const std::string& newtoken); - // if given iov tag exists - bool hasTag( const std::string& name ) const; - // list all tags - void listAllTags( std::vector& result ) const; - // list all entries in the metadata table - //void listAllEntries( std::vector& result ) const; - // get iov token associated with given tag - const std::string getToken( const std::string& tagname ) const; - // get the metadata table entry by tag name - //void getEntryByTag( const std::string& tagname, cond::MetaDataEntry& result )const; - // delete all entries in the metadata table - void deleteAllEntries(); - // delete metadata entry selected by iov token - //void deleteEntryByToken( const std::string& token ); - // delete metadata entry selected by tag name - void deleteEntryByTag( const std::string& tag ); - private: - // create metadata table - //void createTable(const std::string& tabname); - mutable cond::DbSession m_userSession; - }; -} -#endif - diff --git a/CondCore/MetaDataService/interface/MetaDataEntry.h b/CondCore/MetaDataService/interface/MetaDataEntry.h deleted file mode 100644 index 15deae681d586..0000000000000 --- a/CondCore/MetaDataService/interface/MetaDataEntry.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef CondCore_MetaDataService_MetaDataEntry_H -#define CondCore_MetaDataService_MetaDataEntry_H -#include -#include "CondCore/DBCommon/interface/Time.h" -namespace cond{ - class MetaDataEntry{ - public: - std::string tagname; - std::string iovtoken; - cond::TimeType timetype; - }; -} -#endif diff --git a/CondCore/MetaDataService/interface/MetaDataExceptions.h b/CondCore/MetaDataService/interface/MetaDataExceptions.h deleted file mode 100644 index 44cc10a279d0c..0000000000000 --- a/CondCore/MetaDataService/interface/MetaDataExceptions.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef COND_METADATAEXCEPTIONS_H -#define COND_METADATAEXCEPTIONS_H -#warning "obsolete" -#include "CondCore/DBCommon/interface/Exception.h" -#endif diff --git a/CondCore/MetaDataService/src/MetaData.cc b/CondCore/MetaDataService/src/MetaData.cc deleted file mode 100644 index 5ff78172bb7c6..0000000000000 --- a/CondCore/MetaDataService/src/MetaData.cc +++ /dev/null @@ -1,103 +0,0 @@ -#include "CondCore/MetaDataService/interface/MetaData.h" -#include "CondCore/ORA/interface/Database.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "RelationalAccess/SchemaException.h" -#include -//#include - - -namespace { - - std::string mdErrorPrefix(const std::string& source, const std::string& name) { - return source+std::string(": metadata entry \"")+name+std::string("\" "); - } - - - void mdError(const std::string& source, const std::string& name, const std::string& mess) { - throw cond::Exception(mdErrorPrefix(source,name)+mess); - } - - void mdDuplicateEntryError(const std::string& source, const std::string& name) { - mdError(source, name, "Already exists"); - } - - void mdNoEntry(const std::string& source, const std::string& name) { - mdError(source, name, "does not exists"); - } - -} - - -cond::MetaData::MetaData(cond::DbSession& userSession):m_userSession( userSession ){ -} -cond::MetaData::~MetaData(){ -} -bool -cond::MetaData::addMapping(const std::string& name, - const std::string& iovtoken, - cond::TimeType ){ - try{ - ora::OId oid; - oid.fromString( iovtoken ); - m_userSession.storage().setObjectName( name, oid ); - }catch( const coral::DuplicateEntryInUniqueKeyException& er ){ - mdDuplicateEntryError("addMapping",name); - }catch(std::exception& er){ - mdError("MetaData::addMapping",name,er.what()); - } - return true; -} - -const std::string -cond::MetaData::getToken( const std::string& name ) const{ - bool ok=false; - std::string iovtoken(""); - try{ - ora::OId oid; - ok = m_userSession.storage().getItemId( name, oid ); - if(ok) { - iovtoken = oid.toString(); - } - }catch(const std::exception& er){ - mdError("MetaData::getToken", name,er.what() ); - } - if (!ok) mdNoEntry("MetaData::getToken", name); - return iovtoken; -} - -bool cond::MetaData::hasTag( const std::string& name ) const{ - bool result=false; - try{ - ora::OId oid; - result = m_userSession.storage().getItemId( name, oid ); - }catch(const std::exception& er){ - mdError("MetaData::hasTag", name, er.what() ); - } - return result; -} - -void -cond::MetaData::listAllTags( std::vector& result ) const{ - try{ - m_userSession.storage().listObjectNames( result ); - }catch(const std::exception& er){ - throw cond::Exception( std::string("MetaData::listAllTags: " )+er.what() ); - } -} - -void -cond::MetaData::deleteAllEntries(){ - try{ - m_userSession.storage().eraseAllNames(); - }catch(const std::exception& er){ - throw cond::Exception( std::string("MetaData::deleteAllEntries: " )+er.what() ); - } -} - -void cond::MetaData::deleteEntryByTag( const std::string& tag ){ - try{ - m_userSession.storage().eraseObjectName( tag ); - }catch(const std::exception& er){ - throw cond::Exception( std::string("MetaData::deleteEntryByTag: " )+er.what() ); - } -} diff --git a/CondCore/MetaDataService/test/BuildFile.xml b/CondCore/MetaDataService/test/BuildFile.xml deleted file mode 100644 index 38335f2bbf7e0..0000000000000 --- a/CondCore/MetaDataService/test/BuildFile.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/CondCore/MetaDataService/test/testMetaData.cpp b/CondCore/MetaDataService/test/testMetaData.cpp deleted file mode 100644 index c1aeb96b0b132..0000000000000 --- a/CondCore/MetaDataService/test/testMetaData.cpp +++ /dev/null @@ -1,153 +0,0 @@ -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/MetaDataService/interface/MetaData.h" -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/standard.h" -#include "FWCore/PluginManager/interface/SharedLibrary.h" - -#include "CondCore/DBCommon/interface/Time.h" -#include -#include -#include -#include -#include -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - try{ - cond::DbConnection connection; - connection.configuration().setPoolAutomaticCleanUp( false ); - connection.configure(); - cond::DbSession coralDb = connection.createSession(); - coralDb.open("sqlite_file:meta.db"); - - //test errors - coralDb.transaction().start(false); - if(coralDb.storage().exists()){ - coralDb.storage().drop(); - } - coralDb.createDatabase(); - - coralDb.transaction().commit(); - - coralDb.transaction().start(true); - cond::MetaData metadata(coralDb); - if(metadata.hasTag("crap")) std::cout << "ERROR: wrong assertion" << std::endl; - /** - try { - cond::MetaDataEntry result; - metadata.getEntryByTag("crap", result); - } catch (cond::Exception const & ce) { - std::cout << "OK " << ce.what() << std::endl; - } - **/ - try { - metadata.getToken("crap"); - } catch (cond::Exception const & ce) { - std::cout << "OK " << ce.what() << std::endl; - } - try { - std::vector alltags; - metadata.listAllTags(alltags); - } catch (cond::Exception const & ce) { - std::cout << "OK " << ce.what() << std::endl; - } - - coralDb.transaction().commit(); - - - coralDb.transaction().start(false); - std::string t1("token1"); - metadata.addMapping("mytest1",t1); - coralDb.transaction().commit(); - - //test errors - coralDb.transaction().start(true); - if(metadata.hasTag("crap")) std::cout << "wrong: crap shall not be there" << std::endl; - /** - try { - cond::MetaDataEntry result; - metadata.getEntryByTag("crap", result); - } catch (cond::Exception const & ce) { - std::cout << "OK " << ce.what() << std::endl; - } - **/ - try { - metadata.getToken("crap"); - } catch (cond::Exception const & ce) { - std::cout << "OK " << ce.what() << std::endl; - } - coralDb.transaction().commit(); - - - - std::string t2("token2"); - coralDb.transaction().start(false); - metadata.addMapping("mytest2",t2,cond::timestamp); - coralDb.transaction().commit(); - - coralDb.transaction().start(true); - if(!metadata.hasTag("mytest1")) std::cout << "wrong: mytest1 IS there" << std::endl; - std::string tok1=metadata.getToken("mytest1"); - cond::MetaDataEntry r1; - /** - metadata.getEntryByTag("mytest1",r1); - **/ - coralDb.transaction().commit(); - - std::cout<<"got token1 "< alltags; - metadata.listAllTags(alltags); - coralDb.transaction().commit(); - - std::copy (alltags.begin(), - alltags.end(), - std::ostream_iterator(std::cout,"\n") - ); - - }catch(cond::Exception& er){ - std::cout< #include @@ -79,7 +78,7 @@ namespace popcon { cond::TagInfo_t m_tagInfo; - cond::LogDBEntry m_logDBEntry; + cond::LogDBEntry_t m_logDBEntry; bool m_close; Time_t m_lastTill; diff --git a/CondCore/PopCon/interface/PopConSourceHandler.h b/CondCore/PopCon/interface/PopConSourceHandler.h index 3df83c9b877d0..c3c870286937a 100644 --- a/CondCore/PopCon/interface/PopConSourceHandler.h +++ b/CondCore/PopCon/interface/PopConSourceHandler.h @@ -1,13 +1,8 @@ #ifndef PopConSourceHandler_H #define PopConSourceHandler_H -//#include "CondCore/DBCommon/interface/DbSession.h" -//#include "CondCore/DBCommon/interface/DbTransaction.h" - #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 #include @@ -108,11 +103,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 +116,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 +176,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..a11b60e5423ce 100644 --- a/CondCore/PopCon/src/PopCon.cc +++ b/CondCore/PopCon/src/PopCon.cc @@ -58,13 +58,13 @@ namespace popcon { 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 << "------" <queryLog().LookupLastEntryByTag( m_tag, m_logDBEntry ); - std::cout <<" ------ log info found in another db "<< "------" <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 "<< "------" < - diff --git a/CondCore/RecoMuonPlugins/BuildFile.xml b/CondCore/RecoMuonPlugins/BuildFile.xml index b061a4f9de476..4c426375ab24a 100644 --- a/CondCore/RecoMuonPlugins/BuildFile.xml +++ b/CondCore/RecoMuonPlugins/BuildFile.xml @@ -1,6 +1,5 @@ - diff --git a/CondCore/TagCollection/BuildFile.xml b/CondCore/TagCollection/BuildFile.xml deleted file mode 100644 index 5ac9b41863fa0..0000000000000 --- a/CondCore/TagCollection/BuildFile.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/CondCore/TagCollection/data/CRAFT_30X.conf b/CondCore/TagCollection/data/CRAFT_30X.conf deleted file mode 100644 index 506e729a98479..0000000000000 --- a/CondCore/TagCollection/data/CRAFT_30X.conf +++ /dev/null @@ -1,293 +0,0 @@ -[COMMON] -connect=sqlite_file:GlobalTag.db -#connect=oracle://cms_orcon_prod/CMS_COND_31X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - TrackerGeometry_v5_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=TrackerAlignmentRcd}; - TrackerGeometryErrors_v5_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTAlignmentRcd_CRAFT_segments-globalMuons_31X_v7_offline{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=DTAlignmentRcd}; - DTIdealGeometryErrors200_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCAlignmentRcd_CRAFT_PG-hardware-globalMuons_31X_v3_offline{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCIdealGeometryErrors310me42_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=GlobalPositionRcd}; - SiPixelGainCalibration_31X_GainRun66439{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - SiPixelGainCalibrationHLT_31X_GainRun66439{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTRcd}; - SiPixelLorentzAngle_v02_offline{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiPixelQuality_v03{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelQuality,recordname=SiPixelQualityRcd}; - SiPixelCPEGenericErrorParm{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelCPEGenericErrorParm,recordname=SiPixelCPEGenericErrorParmRcd}; - SiPixelTemplateDBObject_v7{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelTemplateDBObject,recordname=SiPixelTemplateDBObjectRcd}; - SiStripGain_CRAFT_22X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripNoise_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripLorentzAngle_CRAFT_22X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripThreshold_CRAFT_31X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripThresholdRcd}; - SiStripClusterThreshold_Standard_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripClusterThresholdRcd}; - SiStripPedestals_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripBadChannel_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - SiStripBadChannel_HotStrip_CRAFT_v3_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripBadStrip,recordname=SiStripBadFiberRcd}; - SiStripBadModule_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadModuleRcd}; - SiStripDetVOff_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripDetVOff,recordname=SiStripDetVOffRcd}; - SiStripDeDxMip_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxMip_3D_Rcd}; - SiStripDeDxElectron_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxElectron_3D_Rcd}; - SiStripDeDxProton_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxProton_3D_Rcd}; - SiStripDeDxKaon_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxKaon_3D_Rcd}; - SiStripDeDxPion_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxPion_3D_Rcd}; - SiStripDeDxMip_30X_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=PhysicsTools::Calibration::HistogramD2D,recordname=SiStripDeDxMipRcd}; - t0_CRAFT_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTT0,recordname=DTT0Rcd}; - DT_tTrig_CRAFT31X_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTTtrig,recordname=DTTtrigRcd}; - dead_CRUZET_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - noise_CRAFT_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - DT_vDrift_CRAFT_V02_offline{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTMtime,recordname=DTMtimeRcd}; - CSCDBGains_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_ME42_March2009_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCDDUMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - CSCBadChambers_CRAFT_KillAllME42{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCBadChambers,recordname=CSCBadChambersRcd}; - CSCL1TPParameters{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCL1TPParameters,recordname=CSCL1TPParametersRcd}; - HcalPedestals_ADC_v9.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - HcalPedestalWidths_ADC_v7.01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - HcalElectronicsMap_v6.07_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - HcalGains_v2.27_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - HcalQIEData_NormalMode_v7.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - HcalRespCorrs_v1.01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - HcalChannelQuality_v1.06_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalChannelQuality,recordname=HcalChannelQualityRcd}; - HcalL1TriggerObjects_v1.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalL1TriggerObjects,recordname=HcalL1TriggerObjectsRcd}; - HcalPFCorrs_v1.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPFCorrs,recordname=HcalPFCorrsRcd}; - HcalTimeCorrs_v1.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalTimeCorrs,recordname=HcalTimeCorrsRcd}; - HcalLUTCorrs_v1.01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalLUTCorrs,recordname=HcalLUTCorrsRcd}; - HcalZSThresholds_v1.00_offline{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalZSThresholds,recordname=HcalZSThresholdsRcd}; - EcalPedestals_v5_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_AllCruzet_EEB0v2_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_AllCruzet_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_TestPulse_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstants_AllCruzet_EEB0v2_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - EcalMappingElectronics_EEMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalMappingElectronics,recordname=EcalMappingElectronicsRcd}; - EcalTimeCalibConstants_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalTimeCalibConstantsRcd}; - EcalClusterCrackCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterCrackCorrParametersRcd}; - EcalClusterEnergyCorrectionParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyCorrectionParametersRcd}; - EcalClusterEnergyUncertaintyParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyUncertaintyParametersRcd}; - EcalClusterLocalContCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterLocalContCorrParametersRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_2_0_0_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - TauNeuralClassifier{pfn=frontier://FrontierProd/CMS_COND_31X_BTAU,objectname=MVAComputerContainer,recordname=TauTagMVAComputerRcd}; - Early10TeVCollision_3p8cm_v3_mc_IDEAL{pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - RPCStripNoises_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=RPCStripNoises,recordname=RPCStripNoisesRcd}; - SiPixelFedCablingMap_v16{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_CRAFT_31X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - DT_map_compact_CRUZET{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CaloEcalScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEcalScale,recordname=L1CaloEcalScaleRcd}; - L1CaloGeometry_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloGeometry,recordname=L1CaloGeometryRecord}; - L1CaloHcalScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloHcalScale,recordname=L1CaloHcalScaleRcd}; - L1EmEtScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctChannelMask_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctChannelMask,recordname=L1GctChannelMaskRcd}; - L1GctJetFinderParams_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtPrescaleFactorsAlgoTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsAlgoTrigRcd}; - L1GtPrescaleFactorsTechTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsTechTrigRcd}; - L1GtPsbSetup_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPsbSetup,recordname=L1GtPsbSetupRcd}; - L1GtStableParameters_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1GtTriggerMaskAlgoTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskAlgoTrigRcd}; - L1GtTriggerMaskTechTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskTechTrigRcd}; - L1GtTriggerMaskVetoAlgoTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoAlgoTrigRcd}; - L1GtTriggerMaskVetoTechTrig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoTechTrigRcd}; - L1GtTriggerMenu_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMenu,recordname=L1GtTriggerMenuRcd}; - L1HfRingEtScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HfRingEtScaleRcd}; - L1HtMissScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HtMissScaleRcd}; - L1JetEtScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuCSCPtLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCPtLut,recordname=L1MuCSCPtLutRcd}; - L1MuCSCTFAlignment_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFAlignment,recordname=L1MuCSCTFAlignmentRcd}; - L1MuCSCTFConfiguration_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFConfiguration,recordname=L1MuCSCTFConfigurationRcd}; - L1MuDTEtaPatternLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuDTTFMasks_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFMasks,recordname=L1MuDTTFMasksRcd}; - L1MuDTTFParameters_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFParameters,recordname=L1MuDTTFParametersRcd}; - L1MuGMTChannelMask_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTChannelMask,recordname=L1MuGMTChannelMaskRcd}; - L1MuGMTParameters_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1MuGMTScales_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTScales,recordname=L1MuGMTScalesRcd}; - L1MuTriggerPtScale_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerPtScale,recordname=L1MuTriggerPtScaleRcd}; - L1MuTriggerScales_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerScales,recordname=L1MuTriggerScalesRcd}; - L1RCTChannelMask_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTChannelMask,recordname=L1RCTChannelMaskRcd}; - L1RCTParameters_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1RPCConeDefinition_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConeDefinition,recordname=L1RPCConeDefinitionRcd}; - L1RPCConfig_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConfig,recordname=L1RPCConfigRcd}; - L1TriggerKey_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd}; - L1TriggerKeyList_CRAFT_offline{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - XMLFILE_Geometry_310_Final{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=GeometryFile,recordname=GeometryFileRcd}; - TKRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PGeometricDet,recordname=IdealGeometryRecord}; - EBRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalBarrelRcd}; - EERECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalEndcapRcd}; - EPRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalPreshowerRcd}; - HCALRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PHcalRcd}; - CTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCaloTowerRcd}; - CSCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=CSCRecoGeometryRcd}; - CSCRECODIGI_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=CSCRecoDigiParameters,recordname=CSCRecoDigiParametersRcd}; - DTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=DTRecoGeometryRcd}; - RPCRECO_Geometry_310_FixRot{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=RPCRecoGeometryRcd}; - ZDCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PZdcRcd}; - CASTORRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCastorRcd}; - AlCaRecoHLTpaths8e29_1e31_v5{pfn=frontier://FrontierProd/CMS_COND_31X_HLT,objectname=AlCaRecoTriggerBits,recordname=AlCaRecoTriggerBitsRcd}; - L1RPCHwConfig_v1{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=L1RPCHwConfig,recordname=L1RPCHwConfigRcd}; - runinfo_31X_test{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=RunInfo,recordname=RunInfoRcd}; - lumi83037_v1_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::LuminosityInfo,recordname=LuminosityInfoRcd}; - hltscaler83037_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::HLTScaler,recordname=HLTScalerRcd} - -[TAGTREE CRAFT08_31X_V1] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=TrackerGeometry_v5_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - TrackerGeometryErrors{parent=Calibration,tagname=TrackerGeometryErrors_v5_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTGeometry{parent=Calibration,tagname=DTAlignmentRcd_CRAFT_segments-globalMuons_31X_v7_offline,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - DTGeometryErrors{parent=Calibration,tagname=DTIdealGeometryErrors200_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGeometry{parent=Calibration,tagname=CSCAlignmentRcd_CRAFT_PG-hardware-globalMuons_31X_v3_offline,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCIdealGeometryErrors310me42_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGain{parent=Calibration,tagname=SiPixelGainCalibration_31X_GainRun66439,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainHLT{parent=Calibration,tagname=SiPixelGainCalibrationHLT_31X_GainRun66439,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelLangle{parent=Calibration,tagname=SiPixelLorentzAngle_v02_offline,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelQuality{parent=Calibration,tagname=SiPixelQuality_v03,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelCPE{parent=Calibration,tagname=SiPixelCPEGenericErrorParm,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelTemplate{parent=Calibration,tagname=SiPixelTemplateDBObject_v7,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripGain_CRAFT_22X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripNoise{parent=Calibration,tagname=SiStripNoise_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_CRAFT_22X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripThresh{parent=Calibration,tagname=SiStripThreshold_CRAFT_31X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripClusThresh{parent=Calibration,tagname=SiStripClusterThreshold_Standard_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadChan{parent=Calibration,tagname=SiStripBadChannel_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadFiber{parent=Calibration,tagname=SiStripBadChannel_HotStrip_CRAFT_v3_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadModule{parent=Calibration,tagname=SiStripBadModule_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDetV{parent=Calibration,tagname=SiStripDetVOff_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDeDxMip{parent=Calibration,tagname=SiStripDeDxMip_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxElectron{parent=Calibration,tagname=SiStripDeDxElectron_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxProton{parent=Calibration,tagname=SiStripDeDxProton_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxKaon{parent=Calibration,tagname=SiStripDeDxKaon_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxPion{parent=Calibration,tagname=SiStripDeDxPion_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDx{parent=Calibration,tagname=SiStripDeDxMip_30X_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTT0{parent=Calibration,tagname=t0_CRAFT_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTTrig{parent=Calibration,tagname=DT_tTrig_CRAFT31X_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - DTDeadFlag{parent=Calibration,tagname=dead_CRUZET_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTStatusFlag{parent=Calibration,tagname=noise_CRAFT_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTvDrift{parent=Calibration,tagname=DT_vDrift_CRAFT_V02_offline,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - CSCGain{parent=Calibration,tagname=CSCDBGains_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_ME42_March2009_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCBadChambers{parent=Calibration,tagname=CSCBadChambers_CRAFT_KillAllME42,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCL1TPParameters{parent=Calibration,tagname=CSCL1TPParameters,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - HCALPedestals{parent=Calibration,tagname=HcalPedestals_ADC_v9.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=HcalPedestalWidths_ADC_v7.01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALEmap{parent=Calibration,tagname=HcalElectronicsMap_v6.07_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALGain{parent=Calibration,tagname=HcalGains_v2.27_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALQie{parent=Calibration,tagname=HcalQIEData_NormalMode_v7.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=HcalRespCorrs_v1.01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALChannelQuality{parent=Calibration,tagname=HcalChannelQuality_v1.06_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALL1Trigger{parent=Calibration,tagname=HcalL1TriggerObjects_v1.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalPFCorrs{parent=Calibration,tagname=HcalPFCorrs_v1.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalTimeCorrs{parent=Calibration,tagname=HcalTimeCorrs_v1.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalLUTCorrs{parent=Calibration,tagname=HcalLUTCorrs_v1.01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalZSThresholds{parent=Calibration,tagname=HcalZSThresholds_v1.00_offline,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_v5_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_AllCruzet_EEB0v2_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_AllCruzet_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_TestPulse_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_AllCruzet_EEB0v2_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALEEMap{parent=Calibration,tagname=EcalMappingElectronics_EEMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTimeCalib{parent=Calibration,tagname=EcalTimeCalibConstants_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusCrackCorr{parent=Calibration,tagname=EcalClusterCrackCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyCorr{parent=Calibration,tagname=EcalClusterEnergyCorrectionParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyUncertainty{parent=Calibration,tagname=EcalClusterEnergyUncertaintyParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusLocalContCorr{parent=Calibration,tagname=EcalClusterLocalContCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_2_0_0_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUNeuralClassifier{parent=Calibration,tagname=TauNeuralClassifier,pfn=frontier://FrontierProd/CMS_COND_31X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=Early10TeVCollision_3p8cm_v3_mc_IDEAL,pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT}; - RPCStripNoise{parent=Calibration,tagname=RPCStripNoises_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_v16,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_CRAFT_31X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - DTROMap{parent=Calibration,tagname=DT_map_compact_CRUZET,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - L1CaloEcalScale{parent=Calibration,tagname=L1CaloEcalScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloGeometry{parent=Calibration,tagname=L1CaloGeometry_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloHcalScale{parent=Calibration,tagname=L1CaloHcalScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctChannelMask{parent=Calibration,tagname=L1GctChannelMask_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsAlgoTrig{parent=Calibration,tagname=L1GtPrescaleFactorsAlgoTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsTechTrig{parent=Calibration,tagname=L1GtPrescaleFactorsTechTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPsbSetup{parent=Calibration,tagname=L1GtPsbSetup_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskAlgoTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskTechTrig{parent=Calibration,tagname=L1GtTriggerMaskTechTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoAlgoTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoTechTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoTechTrig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMenu{parent=Calibration,tagname=L1GtTriggerMenu_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HfRingEtScale{parent=Calibration,tagname=L1HfRingEtScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HtMissScale{parent=Calibration,tagname=L1HtMissScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCPtLut{parent=Calibration,tagname=L1MuCSCPtLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFAlignment{parent=Calibration,tagname=L1MuCSCTFAlignment_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFConfiguration{parent=Calibration,tagname=L1MuCSCTFConfiguration_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFMasks{parent=Calibration,tagname=L1MuDTTFMasks_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFParameters{parent=Calibration,tagname=L1MuDTTFParameters_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTChannelMask{parent=Calibration,tagname=L1MuGMTChannelMask_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTScales{parent=Calibration,tagname=L1MuGMTScales_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerPtScale{parent=Calibration,tagname=L1MuTriggerPtScale_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerScales{parent=Calibration,tagname=L1MuTriggerScales_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTChannelMask{parent=Calibration,tagname=L1RCTChannelMask_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConeDefinition{parent=Calibration,tagname=L1RPCConeDefinition_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConfig{parent=Calibration,tagname=L1RPCConfig_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_CRAFT_offline,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - GeomXMLFILE{parent=Calibration,tagname=XMLFILE_Geometry_310_Final,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomTKRECO{parent=Calibration,tagname=TKRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEBRECO{parent=Calibration,tagname=EBRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEERECO{parent=Calibration,tagname=EERECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEPRECO{parent=Calibration,tagname=EPRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomHCALRECO{parent=Calibration,tagname=HCALRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCTRECO{parent=Calibration,tagname=CTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECO{parent=Calibration,tagname=CSCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECODIGI{parent=Calibration,tagname=CSCRECODIGI_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomDTRECO{parent=Calibration,tagname=DTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomRPCRECO{parent=Calibration,tagname=RPCRECO_Geometry_310_FixRot,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomZDCRECO{parent=Calibration,tagname=ZDCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCASTORRECO{parent=Calibration,tagname=CASTORRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - AlCaRecoTriggerBits{parent=Calibration,tagname=AlCaRecoHLTpaths8e29_1e31_v5,pfn=frontier://FrontierProd/CMS_COND_31X_HLT}; - L1RPCHwConfig{parent=Calibration,tagname=L1RPCHwConfig_v1,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - RunInfo{parent=Calibration,tagname=runinfo_31X_test,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - LumiInfo{parent=Calibration,tagname=lumi83037_v1_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - HLTScaler{parent=Calibration,tagname=hltscaler83037_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO} diff --git a/CondCore/TagCollection/data/GR09_31X.conf b/CondCore/TagCollection/data/GR09_31X.conf deleted file mode 100644 index f2329489dc927..0000000000000 --- a/CondCore/TagCollection/data/GR09_31X.conf +++ /dev/null @@ -1,297 +0,0 @@ -[COMMON] -connect=sqlite_file:GlobalTag.db -#connect=oracle://cms_orcon_prod/CMS_COND_31X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - TrackerGeometry_v5_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=TrackerAlignmentRcd}; - TrackerGeometryErrors_v5_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTAlignmentRcd_CRAFT_segments-globalMuons_31X_v7_offline{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=DTAlignmentRcd}; - DTIdealGeometryErrors200_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCAlignmentRcd_CRAFT_PG-hardware-globalMuons_31X_v3_offline{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCIdealGeometryErrors310me42_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=GlobalPositionRcd}; - SiPixelGainCalibration_31X_GainRun66439{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - SiPixelGainCalibrationHLT_31X_GainRun66439{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTRcd}; - SiPixelLorentzAngle_v02_offline{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiPixelQuality_v03{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelQuality,recordname=SiPixelQualityRcd}; - SiPixelCPEGenericErrorParm{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelCPEGenericErrorParm,recordname=SiPixelCPEGenericErrorParmRcd}; - SiPixelTemplateDBObject_v7{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelTemplateDBObject,recordname=SiPixelTemplateDBObjectRcd}; - SiStripGain_CRAFT_22X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripNoise_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripLorentzAngle_CRAFT_22X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripThreshold_CRAFT_31X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripThresholdRcd}; - SiStripClusterThreshold_Standard_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripClusterThresholdRcd}; - SiStripPedestals_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripBadChannel_CRAFT_21X_v4_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - SiStripBadChannel_HotStrip_CRAFT_v3_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiStripBadStrip,recordname=SiStripBadFiberRcd}; - SiStripBadModule_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadModuleRcd}; - SiStripDetVOff_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripDetVOff,recordname=SiStripDetVOffRcd}; - SiStripDeDxMip_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxMip_3D_Rcd}; - SiStripDeDxElectron_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxElectron_3D_Rcd}; - SiStripDeDxProton_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxProton_3D_Rcd}; - SiStripDeDxKaon_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxKaon_3D_Rcd}; - SiStripDeDxPion_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxPion_3D_Rcd}; - SiStripDeDxMip_30X_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=PhysicsTools::Calibration::HistogramD2D,recordname=SiStripDeDxMipRcd}; - t0_CRAFT_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTT0,recordname=DTT0Rcd}; - DT_tTrig_CRAFT31X_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTTtrig,recordname=DTTtrigRcd}; - dead_CRUZET_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - noise_CRAFT_V01_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - DT_vDrift_CRAFT_V02_offline{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTMtime,recordname=DTMtimeRcd}; - CSCDBGains_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_ME42_March2009_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCDDUMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - CSCBadChambers_CRAFT_KillAllME42{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCBadChambers,recordname=CSCBadChambersRcd}; - CSCBadStrips_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadStrips,recordname=CSCBadStripsRcd}; - CSCBadWires_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadWires,recordname=CSCBadWiresRcd}; - CSCL1TPParameters{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCL1TPParameters,recordname=CSCL1TPParametersRcd}; - HcalPedestals_ADC_v7.02_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - HcalPedestalWidths_ADC_v7.01_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - HcalElectronicsMap_v7.01_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - HcalGains_v2.08_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - HcalQIEData_NormalMode_v7.00_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - HcalRespCorrs_v1.02_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - HcalChannelQuality_v1.06_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalChannelQuality,recordname=HcalChannelQualityRcd}; - HcalL1TriggerObjects_v1.00_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalL1TriggerObjects,recordname=HcalL1TriggerObjectsRcd}; - HcalPFCorrs_v2.00_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPFCorrs,recordname=HcalPFCorrsRcd}; - HcalTimeCorrs_v1.00_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalTimeCorrs,recordname=HcalTimeCorrsRcd}; - HcalLUTCorrs_v1.01_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalLUTCorrs,recordname=HcalLUTCorrsRcd}; - HcalZSThresholds_v1.01_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalZSThresholds,recordname=HcalZSThresholdsRcd}; - EcalPedestals_v5_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_AllCruzet_EEB0v2_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_AllCruzet_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_TestPulse_online{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstants_AllCruzet_EEB0v2_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - EcalMappingElectronics_EEMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalMappingElectronics,recordname=EcalMappingElectronicsRcd}; - EcalTimeCalibConstants_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalTimeCalibConstantsRcd}; - EcalClusterCrackCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterCrackCorrParametersRcd}; - EcalClusterEnergyCorrectionParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyCorrectionParametersRcd}; - EcalClusterEnergyUncertaintyParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyUncertaintyParametersRcd}; - EcalClusterLocalContCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterLocalContCorrParametersRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_2_0_0_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - TauNeuralClassifier{pfn=frontier://FrontierProd/CMS_COND_31X_BTAU,objectname=MVAComputerContainer,recordname=TauTagMVAComputerRcd}; - Early10TeVCollision_3p8cm_v3_mc_IDEAL{pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - RPCStripNoises_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=RPCStripNoises,recordname=RPCStripNoisesRcd}; - SiPixelFedCablingMap_v16{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_CRAFT_31X_v1_offline{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - DT_map_compact_2009_V02{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CaloEcalScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEcalScale,recordname=L1CaloEcalScaleRcd}; - L1CaloGeometry_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloGeometry,recordname=L1CaloGeometryRecord}; - L1CaloHcalScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloHcalScale,recordname=L1CaloHcalScaleRcd}; - L1EmEtScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctChannelMask_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctChannelMask,recordname=L1GctChannelMaskRcd}; - L1GctJetFinderParams_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtPrescaleFactorsAlgoTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsAlgoTrigRcd}; - L1GtPrescaleFactorsTechTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsTechTrigRcd}; - L1GtPsbSetup_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPsbSetup,recordname=L1GtPsbSetupRcd}; - L1GtStableParameters_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1GtTriggerMaskAlgoTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskAlgoTrigRcd}; - L1GtTriggerMaskTechTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskTechTrigRcd}; - L1GtTriggerMaskVetoAlgoTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoAlgoTrigRcd}; - L1GtTriggerMaskVetoTechTrig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoTechTrigRcd}; - L1GtTriggerMenu_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMenu,recordname=L1GtTriggerMenuRcd}; - L1HfRingEtScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HfRingEtScaleRcd}; - L1HtMissScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HtMissScaleRcd}; - L1JetEtScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuCSCPtLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCPtLut,recordname=L1MuCSCPtLutRcd}; - L1MuCSCTFAlignment_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFAlignment,recordname=L1MuCSCTFAlignmentRcd}; - L1MuCSCTFConfiguration_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFConfiguration,recordname=L1MuCSCTFConfigurationRcd}; - L1MuDTEtaPatternLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuDTTFMasks_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFMasks,recordname=L1MuDTTFMasksRcd}; - L1MuDTTFParameters_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFParameters,recordname=L1MuDTTFParametersRcd}; - L1MuGMTChannelMask_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTChannelMask,recordname=L1MuGMTChannelMaskRcd}; - L1MuGMTParameters_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1MuGMTScales_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTScales,recordname=L1MuGMTScalesRcd}; - L1MuTriggerPtScale_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerPtScale,recordname=L1MuTriggerPtScaleRcd}; - L1MuTriggerScales_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerScales,recordname=L1MuTriggerScalesRcd}; - L1RCTChannelMask_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTChannelMask,recordname=L1RCTChannelMaskRcd}; - L1RCTParameters_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1RPCConeDefinition_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConeDefinition,recordname=L1RPCConeDefinitionRcd}; - L1RPCConfig_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConfig,recordname=L1RPCConfigRcd}; - L1TriggerKey_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd}; - L1TriggerKeyList_CRAFT_hlt{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - XMLFILE_Geometry_310_Final{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=GeometryFile,recordname=GeometryFileRcd}; - TKRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PGeometricDet,recordname=IdealGeometryRecord}; - EBRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalBarrelRcd}; - EERECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalEndcapRcd}; - EPRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalPreshowerRcd}; - HCALRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PHcalRcd}; - CTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCaloTowerRcd}; - CSCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=CSCRecoGeometryRcd}; - CSCRECODIGI_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=CSCRecoDigiParameters,recordname=CSCRecoDigiParametersRcd}; - DTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=DTRecoGeometryRcd}; - RPCRECO_Geometry_310_FixRot{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=RPCRecoGeometryRcd}; - ZDCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PZdcRcd}; - CASTORRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCastorRcd}; - AlCaRecoHLTpaths8e29_1e31_v5{pfn=frontier://FrontierProd/CMS_COND_31X_HLT,objectname=AlCaRecoTriggerBits,recordname=AlCaRecoTriggerBitsRcd}; - L1RPCHwConfig_v1{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=L1RPCHwConfig,recordname=L1RPCHwConfigRcd}; - runinfo_31X_test{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=RunInfo,recordname=RunInfoRcd}; - lumi83037_v1_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::LuminosityInfo,recordname=LuminosityInfoRcd}; - hltscaler83037_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::HLTScaler,recordname=HLTScalerRcd} - -[TAGTREE GR09_31X] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=TrackerGeometry_v5_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - TrackerGeometryErrors{parent=Calibration,tagname=TrackerGeometryErrors_v5_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTGeometry{parent=Calibration,tagname=DTAlignmentRcd_CRAFT_segments-globalMuons_31X_v7_offline,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - DTGeometryErrors{parent=Calibration,tagname=DTIdealGeometryErrors200_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGeometry{parent=Calibration,tagname=CSCAlignmentRcd_CRAFT_PG-hardware-globalMuons_31X_v3_offline,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCIdealGeometryErrors310me42_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGain{parent=Calibration,tagname=SiPixelGainCalibration_31X_GainRun66439,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainHLT{parent=Calibration,tagname=SiPixelGainCalibrationHLT_31X_GainRun66439,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelLangle{parent=Calibration,tagname=SiPixelLorentzAngle_v02_offline,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelQuality{parent=Calibration,tagname=SiPixelQuality_v03,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelCPE{parent=Calibration,tagname=SiPixelCPEGenericErrorParm,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelTemplate{parent=Calibration,tagname=SiPixelTemplateDBObject_v7,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripGain_CRAFT_22X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripNoise{parent=Calibration,tagname=SiStripNoise_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_CRAFT_22X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripThresh{parent=Calibration,tagname=SiStripThreshold_CRAFT_31X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripClusThresh{parent=Calibration,tagname=SiStripClusterThreshold_Standard_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadChan{parent=Calibration,tagname=SiStripBadChannel_CRAFT_21X_v4_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadFiber{parent=Calibration,tagname=SiStripBadChannel_HotStrip_CRAFT_v3_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripBadModule{parent=Calibration,tagname=SiStripBadModule_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDetV{parent=Calibration,tagname=SiStripDetVOff_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDeDxMip{parent=Calibration,tagname=SiStripDeDxMip_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxElectron{parent=Calibration,tagname=SiStripDeDxElectron_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxProton{parent=Calibration,tagname=SiStripDeDxProton_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxKaon{parent=Calibration,tagname=SiStripDeDxKaon_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxPion{parent=Calibration,tagname=SiStripDeDxPion_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDx{parent=Calibration,tagname=SiStripDeDxMip_30X_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTT0{parent=Calibration,tagname=t0_CRAFT_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTTrig{parent=Calibration,tagname=DT_tTrig_CRAFT31X_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - DTDeadFlag{parent=Calibration,tagname=dead_CRUZET_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTStatusFlag{parent=Calibration,tagname=noise_CRAFT_V01_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTvDrift{parent=Calibration,tagname=DT_vDrift_CRAFT_V02_offline,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - CSCGain{parent=Calibration,tagname=CSCDBGains_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_ME42_March2009_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCBadChambers{parent=Calibration,tagname=CSCBadChambers_CRAFT_KillAllME42,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCBadStrips{parent=Calibration,tagname=CSCBadStrips_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCBadWires{parent=Calibration,tagname=CSCBadWires_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCL1TPParameters{parent=Calibration,tagname=CSCL1TPParameters,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - HCALPedestals{parent=Calibration,tagname=HcalPedestals_ADC_v7.02_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=HcalPedestalWidths_ADC_v7.01_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALEmap{parent=Calibration,tagname=HcalElectronicsMap_v7.01_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALGain{parent=Calibration,tagname=HcalGains_v2.08_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALQie{parent=Calibration,tagname=HcalQIEData_NormalMode_v7.00_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=HcalRespCorrs_v1.02_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALChannelQuality{parent=Calibration,tagname=HcalChannelQuality_v1.06_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALL1Trigger{parent=Calibration,tagname=HcalL1TriggerObjects_v1.00_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalPFCorrs{parent=Calibration,tagname=HcalPFCorrs_v2.00_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalTimeCorrs{parent=Calibration,tagname=HcalTimeCorrs_v1.00_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalLUTCorrs{parent=Calibration,tagname=HcalLUTCorrs_v1.01_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalZSThresholds{parent=Calibration,tagname=HcalZSThresholds_v1.01_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_v5_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_AllCruzet_EEB0v2_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_AllCruzet_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_TestPulse_online,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_AllCruzet_EEB0v2_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALEEMap{parent=Calibration,tagname=EcalMappingElectronics_EEMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTimeCalib{parent=Calibration,tagname=EcalTimeCalibConstants_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusCrackCorr{parent=Calibration,tagname=EcalClusterCrackCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyCorr{parent=Calibration,tagname=EcalClusterEnergyCorrectionParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyUncertainty{parent=Calibration,tagname=EcalClusterEnergyUncertaintyParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusLocalContCorr{parent=Calibration,tagname=EcalClusterLocalContCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_2_0_0_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUNeuralClassifier{parent=Calibration,tagname=TauNeuralClassifier,pfn=frontier://FrontierProd/CMS_COND_31X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=Early10TeVCollision_3p8cm_v3_mc_IDEAL,pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT}; - RPCStripNoise{parent=Calibration,tagname=RPCStripNoises_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_v16,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_CRAFT_31X_v1_offline,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - DTROMap{parent=Calibration,tagname=DT_map_compact_2009_V02,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - L1CaloEcalScale{parent=Calibration,tagname=L1CaloEcalScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloGeometry{parent=Calibration,tagname=L1CaloGeometry_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloHcalScale{parent=Calibration,tagname=L1CaloHcalScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctChannelMask{parent=Calibration,tagname=L1GctChannelMask_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsAlgoTrig{parent=Calibration,tagname=L1GtPrescaleFactorsAlgoTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsTechTrig{parent=Calibration,tagname=L1GtPrescaleFactorsTechTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPsbSetup{parent=Calibration,tagname=L1GtPsbSetup_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskAlgoTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskTechTrig{parent=Calibration,tagname=L1GtTriggerMaskTechTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoAlgoTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoTechTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoTechTrig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMenu{parent=Calibration,tagname=L1GtTriggerMenu_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HfRingEtScale{parent=Calibration,tagname=L1HfRingEtScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HtMissScale{parent=Calibration,tagname=L1HtMissScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCPtLut{parent=Calibration,tagname=L1MuCSCPtLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFAlignment{parent=Calibration,tagname=L1MuCSCTFAlignment_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFConfiguration{parent=Calibration,tagname=L1MuCSCTFConfiguration_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFMasks{parent=Calibration,tagname=L1MuDTTFMasks_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFParameters{parent=Calibration,tagname=L1MuDTTFParameters_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTChannelMask{parent=Calibration,tagname=L1MuGMTChannelMask_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTScales{parent=Calibration,tagname=L1MuGMTScales_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerPtScale{parent=Calibration,tagname=L1MuTriggerPtScale_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerScales{parent=Calibration,tagname=L1MuTriggerScales_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTChannelMask{parent=Calibration,tagname=L1RCTChannelMask_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConeDefinition{parent=Calibration,tagname=L1RPCConeDefinition_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConfig{parent=Calibration,tagname=L1RPCConfig_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_CRAFT_hlt,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - GeomXMLFILE{parent=Calibration,tagname=XMLFILE_Geometry_310_Final,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomTKRECO{parent=Calibration,tagname=TKRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEBRECO{parent=Calibration,tagname=EBRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEERECO{parent=Calibration,tagname=EERECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEPRECO{parent=Calibration,tagname=EPRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomHCALRECO{parent=Calibration,tagname=HCALRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCTRECO{parent=Calibration,tagname=CTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECO{parent=Calibration,tagname=CSCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECODIGI{parent=Calibration,tagname=CSCRECODIGI_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomDTRECO{parent=Calibration,tagname=DTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomRPCRECO{parent=Calibration,tagname=RPCRECO_Geometry_310_FixRot,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomZDCRECO{parent=Calibration,tagname=ZDCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCASTORRECO{parent=Calibration,tagname=CASTORRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - AlCaRecoTriggerBits{parent=Calibration,tagname=AlCaRecoHLTpaths8e29_1e31_v5,pfn=frontier://FrontierProd/CMS_COND_31X_HLT}; - L1RPCHwConfig{parent=Calibration,tagname=L1RPCHwConfig_v1,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - RunInfo{parent=Calibration,tagname=runinfo_31X_test,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - LumiInfo{parent=Calibration,tagname=lumi83037_v1_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - HLTScaler{parent=Calibration,tagname=hltscaler83037_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO} diff --git a/CondCore/TagCollection/data/GlobalTag.db b/CondCore/TagCollection/data/GlobalTag.db deleted file mode 100644 index af6c04d803b19a561401a97037ed8518df72cfbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 120832 zcmeEv31D4C+4jttwx|2PC(YI+P1h{lOKH>OCJjxRG)ea*y-jY?+a|f`%}q!b3McIQ zq9P(70xBXRDk35(Dk1_RA|fIpA|fIp@+qS7$^X1FbIv{I-kWm5hx+}WDLRug?|bH% zGxyALX5M+;y3Lj0SSYJG5^W2{vWnOs#yMM;mBpC&6!ZQYflKa6a{uj0PX2Q+l7#pp z2@ZuUo6#Oo^q z4OJx#MFra%wiYxL_8~~G8uDJUE9fJ;w3b2Ul!Xhq#bd$!ts!VtY}y*wR9{`YqoJa- zF7bMBNo}CGK9D6#o0XF&&dHjamD3*TiB**5WNq10S5dwxP+D2NsXQwy?+js1nLnRf z1rn$+5)HOC=-OyLlyEu71Ct<}8*a*~4{Wc`+Ek7IZ>g+YkkuY+3(2$vSu%I$+R@3g zj&gHKK>;kmB|5IkQ3Q|Fw_`JEsKWmP)(_2 z$S~ZLP<;z>I-1*)AzFj`L#?h{7G%}bR#X+&?#S90*fBRp<&>9|S7HpAvaR4GuVDN~ zmk-uJuZv7WBdZ;YAY&wg8AGUT&Jz<5vS!sb#jD~s;sx<@@wE7ncuagxJRrUy?iF7W zpA(-JH;e1VhsBlRVsWlGQydYUqD{1jpx7n0h-y(GO2itmToj1;Vz$T>(^SUHnmE*~ zE3e|AQFY;(a8IbUJQ!{-3ATp!M}x6&q+K?Va8n2`P+MbamFni^)^L01q{7<9rlHNz zNP8?CimqC`xJ>_96OA-2E~%<(D5>65Dxu11tE&nNw(mC0-0a0DRRuwphazpESoBD7 zYq+JoEz}S^* zpZtKO^-0e+$QP*o*@D7co}HHrnE=-5!ohP1-wO4{@d!8e4o7%euYs__I)-qA)rqjoYDE~Znh=&+yAYOGbqEVB z%D=#({PQi!f3Zcw;v$RkUuexjxWGzBIL(@baH=&D;Ur5SoOl$$gu@8NhY^h1k6`Q$ z1Y>FtjIKa1su;n@6$nNwMlgI1f?*j5hE73XjzKVFD3w)+=Mb_cjLffy=ftz(De<^? z814S+;vVq@al81WxKUgyJ}52|7l>YQTy%>LaZoggy<)ql6_uh)tP`um60u0k6*(eZ zOcrCsa52dEhw+y2hViQLlJUIpjPa!LnDLPDE#p4pZsShlHscoK2ICszD&rF4JmW0m zs1Y;TjRVGhW4E!@s4-46N{v&E6-J@4z?frX8Pko4#%N=xVeq&4oBVbD3V)G5$Dig; z@JIQB{C<8fzl-0&Z{;`f>-g3D3Vsnkho9g*Jjz>nGvCK|@_N3BZ{X|sDSR2v=kxe1 zp24T`@q8p7GFWha=9v_pI6>hVXHa8DfJ-A!Rv7lpAH zg`J%gMxzuSK1^Xp2ZfOch3)MWwzW~%+DhS}Llho7NMSfk;ei7bwzN>#+)QC8L}61C zg^i6A?%z*gFi7FPeH1n{P`Gz5g?si;xO+E+yLM5yb0>v6c2Kx|JB8b}QMh$0g&XmID0mQvu05^b0&p3ITU7RQ<#-SVP+Q523GN#TeQ6b>Iw;jm#8 z4joFNX%422qTCc{Gt)VBQ&Z?~_I>=vn8ZDNcohD`q<`SwKn)Dkz<*#3Q2XcNZw&t% z_%~1k12ym;Qv-uI<^|iR{SRd!CO#l08(%cm@gMV@>}@2xpZ^BF|J@4=1K4L3KI*PXOfCn=GirDi-B$~3$m zWtue1+!5FqZw(36fI9H83jXeug;EXkRVuxhs>c5UCM+?*_?WSPe~!;*UuFe;b^w-` zV(wa4EGxGz77cflw03pILecsI(NO1sNNZC=T`bt%6pS{>=jkr23rjUeuCEhsL&2x` zDtKLeZADFVvRS^cC|(FB_XgQjpB&mz2Ige{m=>R8*69{5AIaTf6)wH+wB6@CwOd6$ zxHpMjqe=eDaBQMkrQ3NQMd%kkz$f|#KRm(QoVzey>6;?q&QPbW@zPLZRir88g;yH- z!PNyIC-{eqjyEgvmc}8AJG!ai^ikVds_~pFs^jtgF&`Jz(nm7j$NGYoqm~-~uVLa6G1|D^ zn8)wqi`g}Ow*G&az?zt07Vj$N5e(b1a!W&{J%Lv2zhYOfp$PkU`P*v_9O(=1JSlfd{fIygwB6hbUD6INd+s@oDBR?Af}Xu_V&g5oxFG z;D#tBF?g@SjoPTAyCD8}2~S&cAlTj>Y6bc<|LD=F-a)M<)D-HB1zYVd)-$p=LR|*u z8kkf4W2*6g3lnX|b4E3Pgm+`7;9j=nf7H+$=a@@p&&OP+w7#L81_@Z61d1ygx(hG^ zF0ID|A=cGd)*5Va|BZ6b@l|d;bJ;uFEXvMRAede@c`-_nq7dxAkpJxdWCFAl@(N< zk9_ly>CFCQYVjQOO=QoYUkU0mW&eWQ+ZuiKmWA%#68EAEIsGcb$ZT`vu9e>Yu|}GB zyvHuvz8NLS_EnM^cXvH9E4eruga3mO#J(BD$?AV`#%7vpcCAUMooFQXKPV8aTlDQH zQf9x4MD2eVegA(_MHZ!{TdIN`$$ucf1-|mr9c24_ zIXzH$u6M?V1}c6-MA=gjN?hc<0^a<7;mvd7l|&<*G_U22K90Y9%l`1|LYtK|SBGosIu&g5s6$#Df> z%A37!Pd$G8VFlLQT1)oi4lE~H1SF$OqGV> zt?*U64JE~uoy*OVg5?@o�W$I{+`k(-VkSl$-+4<-S3imYFN@k*l7!Hq_Zs5{aS% zpa-S(JIdWj^;`gDnQxTvQgb6ZM}@MvB2XHP1sgVz5q7Kmitb(>uU9Q5F#RW>mimU; zzQim**P@`*TiU&3k(|U(mNLcp13548opWcA>-Vw0&G12n-m9T|Mf?H0BEs^f0JO+A z=;?*#M(3rlJGE`$rr3ebhT_r^d@jeI%_}BgZwi15eFGmTFpHfR!_KE~%uY94Cy)w! zBOS~)7cX9_IySVp8myGV9vN$FWUKiu2>{CX1>{=)8^+QZEc{j(kHG$JFh7rvXSXAX zS)+>0Er9@DodBw?q8%kb9Nu3NX-ChFFCu&g1-n}c)bcLrl(j~JF^HQ~|A4<@=oUlK zKJQ0yi+vS0fc~Iqow*o;b4V74-rHKT9;Tt6@{cEYuK=;m7lf{n=vp&?+E)*)yOuin z#nR9gJR%1a1?Z6xrY8ZgYkk4elbvy@SuHzR$_8(7eWX0J)vo4-_JmqaR7iCb;7|1p zA6#QD#H+0;HvVd>$8@d<#<@WLYkcLeYc+U^xg3)=J&bIrkN2vyjYe&yQYX6q2FfYE zP-wVlTWzkzd_Y0$taDa*Rp(6~ZIrcJka!Ka)xP1HR=Ea>dW^uykL08hkaGc)RlZU7 zt~8fA14T`l#wd(;t~!kn^qIc{y=n>x++uwY{wTvc{I}1VIw6b z6JTN*a7+7xd!oc#9k74M_^_tzGJL#CiMIg1q(Au9u=VCWmMmCW?znQPvt?Wz}85@#eN6@mU$cD@ijQ>YL+JwS>t+Sy#K1b!cm+cqqQVU+Lt0@yozVe9t1al4s~^^HBFYHLbp z8i6G>{g)jzHf{HnA@p0fnZ=j@?xJmnHssZat(#zDtRTOssY@Qh%`Ygeuf@hdbyrN! zRT8gJ{%yYCO6$9}nicp?aQ2GILQN$&af``Os_m(`R4>lQ6M(tZ7pB~X>)xUVO}+ga z&xfkdF);EZr&0y#7GJ3Pmujgum&%VXRJ2@IRonS$Psf{=o~`n8M- z1f#7-3i9jeOQ;naZ*mu*V?`rOsfzHRYCC3qDA-ol5sB#qsf0^BWSuYU^?~B5x|-_x z)>^Y@DSiCa2fH?fx^Seqq&3*t8E(dr(yFb+v>Dii&tT`n7HSyRToNGG`a`TQ-eR%M z=GvuX6oed33&oICXG2L3_fC=Kbbsxqe<*P#$yj?Rx*O$eZlFLecm8Dms=x8iVrV zYtJakVtoYGMtJ+NPpY;VC5)5mQ2|KMFG$Zmx%4SP8e{l<%IJi@8sj}!NkTv-r2%=L zU*y&X`6;WB^}0e;u=9}n2^(WBfkbp&1FgX?TEkv*X)f*5R2Br<0H z5uNH%0Ki_q0O3968Z>DFpv>r7H5G`Ho}dP(J-(rK;{{ymK-q`7UG+vKu#**#eN`*Z z@bC5wwafEVG_gzdR8G3CNm~t1waYKm_MPTTtOCfb4oo>>A-wH02q*uETzC4))z$t@ zb}bV<#_Psq#zg)Ro`K8%1^+A_Hn+^LkUwR)+9fJW)v1o|p#YX1~b$LUNT*_It6K&i!?vSXYOu?P5&PiG*bT4TO+i1Z!}U zxuwW{t7@<(jrJHS!!!|`4EFEjMfB=OU~iIr8_Ln-zZ{Kym&5+i`dJS9Hk6~$Z#mTZ z-$e|k`o|f!8YTRBoSGlbF8bGZ04ENc8?nqtzkO8~I=6Z(cD6T%TQCWe93k?POw>5?Zy-ec zA_Uvb<+)@mQCWZq%)1QkaScGU`-Nz1bLL_jVpZYJ&Xl8|npRX6xKser<`<-;)m)RS zrVtyNYiR}gxAvNr{_! zgtKo!84mg_gPQ-(XW~MUYkbFO#7wA;1X#_R|+tX_{QvUVZsWptdFPkiU`x20?Z!2n2o19 z4M=4}GZ^;=hAY)Zk}3c>-7iQ_w=<|yc4S9U6O7?owmq@SNfatb?+rli_KUo)%hk!1 z*4M;>$%raZA*sKC(B&H;=0!LVPJtj3HG=#b2r=IXogRchPf|x+TCWlng8CZ>oqiFz zqGkXmJ5=jJX0c$OKaWSI@!aZwjrxUE?SC;7A4U7W+t|Q=&YQSkA7exrl>D#F67*$i zP%-uVdSmEFC9I-dEz&DUR7C06*?x-`v<#~F1iaK(t^yH8uV0M47N`fKX|uIovL3#gc$rG8@p9M8IeH1rDF-jAgYYsrzeBI`G_T zz&g_}RO<<6#R7S_I$!tmc?1&7r3kbWe$gUlxP~JAy2)9Gx7YMYsG)cg0CjY*17lA?RYA|Wt1V*hpz^rvIb_O2=)7BGU+rMW)VStfqG?=-jgQ05< zn7RtV*mWwHyG{dx*H$oj?T1BCJD9zWg5m2tFnwJG#;+T|{B;``!0rYU*tft4_83kc zKLduam%tSE1{lNsAqIgxY%EyB(!nM+S1bav*eWoLm4Ruj7K~$i!8~>l3}oH-X6XeZ z*=4X@ycYILp9E9c7rifc*nE-4Ns#mA($nG{cx;%xfo<*b;Y6ibw1j8g1Tib+bbN-2gZ z#WtmwrxXj7Vx&^+REnueu~sPtE5&A|n5`7cm14Y7>{p5jOR-`phAhRFrI@o6i{9Gqipfi{dMSo4#rCC`zZ46YVgys{V2UYBv4$xI zF~ugPn8g&!m|`4L>|=_FOtF$FhBC!grkKkViib+keswsvw#kQuH*AxqzVq{b7Y>KH(v9>7&H^t_rnB5f1n__%Z>~D$*PO-u% zhB(C*rf3A^_w!hBUfR?}A*oSuC zVf3KYUtnB;Hh&}57Vb3eG44luf82N)t^H-JH@+p97>brYRb-)^=Zh6+LQBE|Bqs>_Qn|#4eKY#q44kU&1bt@uloiim6Xfe1D4j zPw@aMPC&&EsJH?ZZ=m83RD6PpTTt-~D$YU0KX~SuGXJyKSu*|?JqNptT_*7^XP3+P z3U-BzuVh!s_$qdlj6c9WAmb0R56bvM>_alXnq4j953>);_!@SNj6cFYBI9e>wKD!F z`>2esW7o;}dUm~xZ(ujb_+#v2GQN@BDC3W_kIVQbc9V>6W;e_D7Iuq_KfyjB<4>|r z%J@_4Q!>7l-74cxvro(THg=ngKf^vFqqcgXm2>~k`{liexf&$G|V z_zUa{GX5g_qKxlicggrm>`OAfo82wrFS9Sp_#SqTjK9LZBIA46y)ynP`>KrZWB1AU zYwT+>{yO`*jK9IYA>;em{WAV0`=*S)#l9uuZ?kX9_yP8SjK9OaBjX3zgEIau`>u>1 zVh_pqd+d8MewaNh<44#dGJcdjs^KF}`7J=dbaL`E2$jwmfE5* zy0{>Y?m;G44`GW&wM$2M7xxRV(Hd?R<>nF|sJ%<7J#aPd4JCO|A2~e~C6tT$g|g2Y zhPApGKp|_^cfp~(GJ?3UUl1+UP&~+DKm=;u1%S4#XnFjA{V*5w3#rL6fs{u`0Ut<# z_NK-loi=3W_Y-D_4YS?{%=#egj%2-^*Dsi`H5f2Oc$)f+$uRoG3OC}EwdciC8;b1Q zeqkN52ARe9343;?;V*3MYFHHk=xjId2gR8m`9hA)y(doUV~P`O+@)~QH|*oS--%b~D7 zU`;ev&!3H20Dp|!qlvC4$}d{p5RP=0MI&tmtzB(lobv~D3~k^@4jK6eRlx^+VbyNg z)KIahth&RRU@l)uje_!2C^)I?1*(LootVInRJ1ooyjKMIfqp>-t?_uD7TPNU8%}pG zI>@hnJIQlFKv($#swwHV#_3gu;?|NNy^5%;jv&s-tOymZY$ym76*P1&wPpI7c6~V3 znIegRuk-~Bj3#TWxjHu+^;uF3)`Z&R22$B2AG|t zatLy_lkMJKd1q52J;LSv0*G0o%@R4vVA&_}A*dnt)J9@SgAM7TuI*Myu$T1<_K-Eo zELu#jBaG7$2b&}~GGOzfUD_`+;{P8kUZTc6&*A@n3G;Dg{Mz`g@oCK84;dSc`NkN` z41S1jfU9^X-^>efM)>#O5xyNeg>CMhBFz{Eie&nl=4%*!XWRT2yu+NOWjMlB>CPeb z*w&1d%wSnFAY3T#T#=@Q4#&id<w^V0h=60LyE%To{L5roW-K1PdGbci->R`@zEtN<3 zKs_{ZHWbn(KtcTgv&Oj;Cd{O}$2)iDj7{K=8J`V>>Eob~Ey1(KXa(@Ljmv~AV=QEO zQkF4V%k*)~u`@_M#*wFwQj}))bB{@bJZ&`Os$|ngy5ys$L6|uTLiJozM@S((6?O07 zwoy}{kUkO$s#+!wcN8EUIfP_uf8a z7&N92hDNq5!B7#`7;Hi|dk|#HrEG|yss6lK3>plzOaV1jd4qU@nm|jY2AXS)MmU@N z5zHb#0oiL1WMzf*P1NLKva30nOqx@R_GpzVsXB;t_jEjw2qgFgA?j@M`zi}d$ z)2FU81Q$&bi#d8wY#F)^Jr|Ajv|bMYvVNlA)J zW0AhY0a~aN9PWt)BgG8Tmjmtm5h9H)Xat%^g3@|LzmP|_mAd$g=8hKGNU$k}a)*m) zxTLxCoS|Y8{h2?TO0UOZBIKDhLCkkw6Ti*Ogft?V$)UP%-KTh7vZsh5cdC63GmEOg zr48zyOb;+7Srf%VTO~fPav>v8O{H9UAq`d9p60sOsl@5761wI{^sDNU=xLGb=J-s= zrKS=mQ|0O#)qKZQHfM_CdMHYppmgMzZu8@frys>NcTtZcRqW{sCCLP*JYy(hSJG(8 zSYEs4Ayh&qjiw%+1e$HoYv*VTCzymeg?_`mgZNMarx#9t)|*sg@u`5CYYb8EnyoW< z8nxm%DIN~V@`XyUOrmLe&R8+ipd0{3-xlmr`u-on(ilsFFPuI6StB4mk0kmx;9%`N zIargP_N3D_oT>V^ddT~ic>?T(!?7u=SMzhiwky6=9uVPyE>-e$yop{9gsHToXTE4l zEWwSQ%R3)Vpr-J$*A7ln=~OS-*B*&d+|k;65|9?@5-t{QZAC%I52Eyi2xoplB708C z%~d>gXJ;6PGCj9?9sKDs1-#fr^a0@D3r{1M>!?|t?bsoMWJjGe=N#5Wob!fRg- zy!<8l{(PTZUUm;Prz~I2tr7Bl`KM-Xzjbj(oXQKPe91hCnWbVfOY6GpB$q z<($qGtpJWUYwNevNcz~V3BEhMvZB<*P;MN(ssoK8gm#EVv2FN}DTe|lafj*ZQoL0t z9b@(>U9xS&d(Jq)->VmPsWo_{IiK7$h@nkP8wf_PC zKXSe^5De77e^3pO{~z{YYX2E*6BEB?n_xG0J^TPPi1i}Vc*l6rco0@Q=NkuM%{R{& z&3_NepU?3t@oitj3;1aEDtH1u!!Bgx+*JQdH-;H{DHJq91Iz!4DckwT99aGzSpJtj zru7&7ziRn^8b`C705eqVBrIUXt*x9h_748RNibS&Ci(w*UVIgHcBhN2Vx^cVMi_rE zerS9dwz}sS&9LcPXpG{2fc5X^U>AItZ{us=J$DE^1$~=+lAZsq-omohIGZ3ntI2Z3 zO~SV3bZk(}I0YJNQ>}XyX*g_Yr*uJ_wi;sf?!;EgB}2u8wz`wM{ssNWsA+B%rmTWnq#mbtDIhND^oZb}VgyWX2Lm)RQ(Bk_78%ioSA5h{Q#X zxT!#k6$yM%BgEN-5UcH|{rOnLNmwZjLM5#LDypvbEryD-Y}x=}dOn2eLH90FLcNB% z2hxnikmkwf*}YInodwlhkWX6#x!OnDxd3v#y1IihUg%`JeLh6aD&fLyBwgT0x6Xq! zzV5mO(y8+yRn=IZ2dP?wt%GFBJV;c{*Up86>UZ8|x+TxKr6$)|o~O5-NuOW+QD0oJ_JVaK~#Y!WT7 z&A(iH0v5Xui=T<#v-@GS`#damUmqjJh-|e4iLWkGOyJZV(IWeLO~JB-);ZVXvxj)Z z3QIT3%c-KsNMV=4J}^P#soWe>6S7hDnX3i?4cTN-K$u$;35!jpQa4pBmC1=zF!i+T ziuX}1kE}QR)+7$Qbq4Xa;oZY)Qx~25K&^_@aHPQ#DqP&8tk`gSFvFRAgZ54+htkTXWPM}yu?LUt_&Dd|)+k7NX=L`5Lypr$b z5q>7d`j6x6&m*w+|26-MVH(q52eh0$jrqV1SOuMBe9-t5dv72GQ# zu-Lx^cKXkYFNyDq=foexAH@^Oz{qa-cC2hr*+t{TY}tlsxRbjQ7u(wu+VF~9Vc(+6 zFWLFFf;N$4=h36Nw^~Ny6NaouFqH^J+0_%peAP|Ft(DnjcBaaxmtA6CE4wRpxqTgw zrlsrx=UQ5{vJ0JSX-oV5Jcs>Y+NOW8BwyFYSyXyy!D9oR>LzJgPcWl-34^5M|oqd)x zw#7AW-(qjuDk8mYSYN&uwL&hQjnMP?(_rde6WHP)Y!;A zKoFG-j((ToND+ zXT)O{Qx0YE94;y)xofz?auwc*05tSFaX|@bB#qbjs6|et@tn?E@6{`1=RzZ=1R4uf zS-RO-{WkI?@C@=AtbRX>AEE^}&Fw_NSE|Q<@i3i1#soNlx2Kc+3NW*x z(A2N#3muN8Lz)w1zl2uCVQA@}_W6j`l9V@x*)K@m5tl#L?q;;0Q~6N&Qe<{mF0&b-SZK#C`w79YBH>5_B~P$#nm5b zOrdU;B=v{Zc(>`@U#m-+@MEBQ*3+{6LU2;sZEVqwt{np`ai1Tl=7p zM8vqCeG_^)LFnnGdw+w})AK1BdxPv7(3!ChIy2Qz@%6p#xd!_h#MuoH>$mB?J!-}h zpPsO~+m0NjmpdJyl5 zi|^V&VlslGFHE@cLi^tdu^zL&upPsv9)5SS&qGS{|5-f1aQgo!&iY=D)BfMV>E5@n zkUt%>{ZgFbZ^JkKwZ`qnw~e0~f56%N8N5y`66<&XYlTgs3(P^+ird83#G{z)|6Z(x zbzp<&6z3xKGx!d`++WT9X_oIyKtUS9&KWDzB+Nx`bA;x$)bO#+;-cO;YA1VHfR54U z5@{nje#r2+ovTBLaE5)mZl{`z;e>s=PL|Wk&NC;8g(#?(#e$thUl1}i4#X^4mO$bt z^q6!ch>ixa4~++tis#r4`=FY>dV3pHN*5hgM9miCBwQUTA0+g< zh7`Ro*$b-r^svUn?5u6tnyz?4jbz8^b|py0p3~LbHJLo9$F6Vs%_J|;|DV62q<(Qx zt*~DD7?Z!GI-bSOPJV~g%c5T(O@+hG^_l@vO*%$_@=Sss+d}%hk$0)>qtWzv;<|?U z;TT$taW!cA9lX=kSMP@9!H}`|rUj z-$G+37(ea4en$8>gy%eat^1jC4U8hV*b zYZSC*Dy^yPVwV=Xluv<1hBXoz*-B$FyGUwag%CE1m+(nY$g)O2VYX73$Sx!W`2|WU z7xM`+kKyq=#vuzIPuM4p&vJj6qdoxvNb$!IcA+04lUXv(!V1+6N+vo zAWT!=fznKiK}i*z{o{mGat)g7EcV}|btaVb$Hv=dQ0L?AU)kTGH0uPE^n~zl$6ZQx z-^~6Bt;{o^rAPa>j_ICWb<=0CzYx~(IM$m-wL-jyKF$R-T;)E-{)@DZ z##RIkVW0EIa{P|)*_*SeL0mpiQoEeNmL>Cn>?tyjC0 zo?<>bo&ApF-EsLVF)dd;Ggj##?~2P`?o@KcI@X1?JRBX0L0+WhE-yv3+|3deW50$P zjsNS6v)I3zp9c&eR4|GZV*O!`k%igFL@*5v#jE@_n1@~m z1JR4V-@G1Vy68pU9v*lZNDjbgb`j5mt?Mls zJ2%1V=MLj8umRi;3!q1_68JQHgTH9J0>+*S#2m3e6oR+sR8cBU z19Q(-u^TIh2SmGwiKAfeIZs>yW`S$O4cHU74QxGki~Gd4z~S>4P6IuIJ%X3StKtpu z7Ceu|j8>c!+HKSum1y~=7)#LZXBp{e^&{bv;BEdV{wiAhvncAozjvtt$?alu@z~rv zHdl|$-D7k4*xWug*N@HpV{-v%jw5Ds9@!j7HYbwJkz{iw*&IqXr;^RFWOFXr985MR zlf^9R9S7LCQn7PU&8RWtpT#dl^Z%j7Z<+W7zTiI!PQ6O(;15H>z`ubS_`g&GGpxz@ z6v|YeLi5-MU7N!^4-?^ZYZBx$lzcAxKzu!i=R%xqO@ugCiRZAZ99(!xFn$}IZY znh^imn#Hb6X|Td)LNmu256wK4TMoN|z7pePDeNkq4W&$L9F+8@WEQ)el$>p0o+&lP z#x*k7Wu$=x0QuE?1)l+p3~LND^k;QCyOcES?QNb01seY+8&%AxGJ+U`FEFmhy8na5 zQ^so;=O>B0RO@;FmtKp3XL%oMfR;J+`jT@PSFJh8En8(R)t;u*>?C#Om^SbA_Au1o z1HG#?G{beTy=P2Iw)Qr1oR@{x%3Q{6v-&zE?Lwxr*wWh01wv_L7?+?Xt@d2Nq^9lg zJis_(?YgF2K7Bk{J}O;zV%2UUEz{}3>XXl|hmYHe)2g9XQ^%oQTFwsNbXR8jv^5nz zkpqORoD$NMVbUNP|4nub{y)Ve;}gbk-p<~}<-g+J2`k;)3|ef*gI;BX4pAO0CbFCc zY)?gFTRP-{x$Z){zFZn9l89{SI$!ih(v@DsN;Avz7RL)v+|fO*i)hHX5N(x}6YSN!;EJqmq1L93hO7>l??PUxHp)L^7U*on>WL9!f?fyVh69 zv?nNQiZ#vLR$kR-*?bkOy15xH5JRb-P7A4MAL&og+N`N&dG>s;&(ZEy0`pv3Xh|X5 zMtTV7pyuq35ZX1q&>Zr)7Hf*RCOZ#!rS*w$iBP5W9;6TV59x$88E&4|^uepA+Gqm1 zo=ViM*};~n^r%<&uK;rX&kitgomg&s)R@jc!%x9R@PYTc1K4lP0-L!a*^fJ!v(GA$ z|1P}2sol)6TYNnd7RXzznP&0)0!gb!*~K?w6M-B_!mcgV;LZNwa?G`POC30xT!muM zBMpgYw!pjpOT=x_CU%p5xNOhU5ksf4giFM8BnjKe^mHHh3wOfGGIyae-`x?XhEMRl znQ%$iH~PX}uMNS`S!SATfnwub{AAmGWkG&NC<;c(SRg|?&lMs3YAsyOE8x!Zv>TC;vc(c8wps<}h zrDLZe2GSWF5z6(xP)h4n`(MkzqCXbaysL4-XC{mr*7|J!$E*eB#-*!e6G%2Gaf++_ z^CeoGko87l8kPNaUu8#oZ?xu{tF?EKxS>h{s%^hQX!hTP@)^G<)=+Dnxud8;KV*U} zsBMvxi0ZY9k>K7W`$j6uZT%=qUf*T0jcNK_7W+mj%cuR8C2Y+__qW)t7ROL05#15U zN^q_S>sG&5%~me_e<{LLm&s28lw%4+NX`WTeabJ;F>6lzg-$XZ^5P|l0h^RY=%4h9 z9ANqoVUPbIMX+dONoHK=ojdqRcIFHs)>ZhYUdp4TT=z)m{nnf6Rm$lc`@CN`Ymk+1?wD_PXLdF)dLzSeyI1N1 z8(MDcgq!HG@9al87WZ8ayGQC*IqaLL9G~-Bj^oxMbMyRS-Ho}bqu*6w-$3wp_=jJZ z8s2^w-!)+0K=7aS3$NOLl)+jr2Wx*hu=Lr=UT4w%wg3KTAG1zzde~%RGSAZ{i42I z#cj5Vowb*&ANN!juGb(i0oN-eTyF~De%&u_v$e+cYf?ti#4rV^AVxJK(Vc=}0p|DpSK&)%}e z9j@+&Y+tSJLBuO^n;DZeG9iA?7ouE`+29OW@oYUWZ9LhHL?{pWMcHSSn=5A~`fGJR z64}H{-|@2Y)Sm?LUB3`LR+%&BQJJ|crajM-B())3HxTrLexX~ffb%uzvBCDjx~;PT z>Aobm@A!pt`Tr<(`Ts~a-Zq{$zG>WS^co=}06X+yI0g7H|1|hO4)F?D&zdkF{tml^ z^(ywC0ly#b>h~i9em@L#PIDf+&fdP1E;8N^#~4*IwhjMpd;XXK z&mV?58#|F*>+FZhV>YmFnGV+O@cp4HeI&aEvvGUe^6C5|4bDG| zZ26-NWgm`HeoOBkbKw2M(B41T)v5RI=^RKF+#WaUX&c~w>(mX)_<<#}0oVOAcQm3L<4sabh#Rvw&{H)rM9 zS$TO@zND33Y2{;D`I}b0rQNNX(*VxWYFs`p6BS7~?jpVLiY^6;vg_%m+ z|HlCTH>zyl-#`ugN7aCv{~P=Nzh-4%0Q;yoffIbE!WZ!0jbGsW-%W;vQ+cI0i8qx0 z273dy;#}=PoTAOc8sUqY1*{1SVmM~5$xsJ)zx#0eIq><9&)oOj@#nzjzmL!Vcjfv$6hHj6Ov?iCMQgPqJ7j?WJDE?EDvHhx#EC`+_`e-)t^xkZxf0Ofz z0rv0r%>JDX_HQFk5$K)AKIR?0|No)?o&oxAZ69%z-QYfqc++>rg>G`5*Z{{LIR z*tG}#zovoz{}JQU#(7}kn_~(-rM)2jz#9)oT0y?Cj5a7*fcv%&Oj*i7H-Zn8|o zWpaaqpR{K}eBX<}_idD@e4b)=x^)t}Q%U%}2!!9Z{*&x; zDfI258jA6I9vHuI@=})b33f+(x9Vu-s79$z|e zQ}Vz6SQ_u|xy{-8rtyBrt(Ka``@6OUd2_ghot=ut`$1d7Wn<2IC5`t?qVcxr*ctmy zf@!$s@t#FI-kO4({ewLqwOk{hCi0#IB5%Vc@@C(5H9hSqK{9#I29viv;rko=mP^ZS zppwcv3sm0r`2809CaK{VkDJST7P!1^xHsATS|fg7NRfHZ2AQ`F_b2uZt>r4bV)LF2 zHg8+)4fb_X^B%`JD(SqlK<90j>UH)tTTPy$IU@PIbHV3r&njMH_bCnU0aQikoe4s3 zdlL03`>IlOGkRx&(c4ydh25(aT$J9Kp!BvCUS?lW3T{sCIpFj*Y))@>k5)(~_0EG| z9>ey_!@f*o%Bojc z_$q5(W%;YDfR#n?%$a0Yt1N|;)v&T4R@TJIvRGLeD~n@geLTSbJ;48+Jehj0DFgi9 z%2$E%TcCUxD1Qd(Y=iQ1p!z)J|3LXdP<|1Vj|Al}LHSNleiW2X1?68s`C3qZ7nBbM z<&Q!6W>9__l+Om`zd`wOP<|bhj|b)NLHT}AejxsR{NKZkk2Co0x(6HpU4ndj4U%X7 zKK@?czk&M(YT$jVf%liU`(gR%^nZZ2`~C8}HNgM?B(YmNoaYUaLAjx@a69NxZ59tNi?;WQ z_zQmIi@!j#cQjeGW`XAMcAtc5=*|auw>!mqMLFI%>xXk}^|Zhz$AkNYZ{O&&hYsy27M z8+rJ<7tJqy_z(J3xKY-oq1IrVK-}4h#xI~>&YJRt2ZGV2(}U5_!j{&^{$OiW7gop= z`FxT6yE->^Vl~aVpx^N^U&V3w#VymSGSAQif2EJRwuf39Hbk&l9u0SB zyl&?$(47@jr96Hq9a&Hze%hZxoUpco1#@Z2GU%QY)!4nnuEjWB0=!-Vrvg0Pp8}j= zZ8NulbJnQ@$GL=l^ukp5j*>2qb4~a^=@0%fYpcX}+(0Nl7LiuFanfs)G;%mf8sE7l z{HJ{3OCJ!{5NnIM2fe!U`0hU1u7Olzms?L4!kt9r__42Y=(n-csyC}a3gr|;di}6V zkm@&(3Yb#J7eQSR>XZFJrS?CJO(*`(eB+14PX1dShJVsa*z}0iWNrb?lA<`@ToEV@ z#)1u-BGESVj*+HNL-+DU`T6#1NrpvQ$Mq)_=S5$|A-?myR-?H(bGAm5^Cfs&SXAhA zdX%$FcK#rMU-)k#hv{9pRUZ@2cD8}WLnXSeg#&?^&uNk{BP z?IghGeFMg<20aNk30xV5#owY4g+q|ht(UJ>Rmd|~QlwA% z2tNM!-vsh=Um*HH8m-;t>g-(f2Th?M^@Uq@2I{@zX($Nq~@p6w5c8vnbP_<)#V ze8^bDzsa}ZTwhmz#{YinhOJi6g;Q5YjvAboO_J@kllvG?vgd*x@YVi2V5fD+tibT5 z-us<(&Op&Ay)}3`Ft?Q6eD^g0|IQaMb!9EqL9-a12^4DOmiiJ{<0?ewO(6tZ;{KbE zUh$1|&q_N2Yy^Ujq}Jai`T_l{nckrtKNwA!1zYKQSOEPhW$pyFSD0r{9E>08Nb3_ zk@4@??_~TcdsW82XTO*6YwR@{|AGBM#;>#2W&B6>M;X7t-jMNsvHz0spV*&d{Ac!O z8NbQil<{BKUu66idrQWDWq+0N-`L+|{CD{k@3^)X&L{N{Zz)!uxDia zGxjqXKg*t#@z2@MW&9j_PR74rzmW0s?0FgglKoP~FR&M6{44e=8NbM0l<}|GuVwra zdr8LszyA*Juy^P=IO9ylFkY9j!3`M;E@V8250dd_z)SJAmyU_hw`B^9>#~s zcsL&};}Lv>j7Rd3G9JZ8$#^s$E#onKjEu+fu`(XV$H{m+A1~txe1eQ8@`*B@#3#vk zGM_BtDSV2Ir}C*Xp2nxq_;0cp6A`r5qhSBt$9{p!f9k&jR;RffL$dU1)P|{dW2CJk z*hupWeVQhr^= zwe;6jJb}>P@P#hFFMF)R<{AuT^i?NU1>-r%kB)+6snS!W5%3><0o%(PX;z2ypQWZ* z^5`iBitv7zfpx}$SYK+u1iU2Lbu<)f2n5#W!-<|=s-Y>@d+?w2dVh-7X+_M9a);f=4QMQs!sGUt!C-2+K2;tGzi<1 zK=7~i2i_WGwV5sQeW1+n-B%we4{f!75mynCe~?7wR2fi#e&3%0srmn5^8b}?+-9uj z-{+M$kaPH-)&aCy$IL(~uTg5TOTU2L6CmCzdd9!|dPd9(!`4wbnc6doGI36f=*I6t zb3`6J!up$EtP|D|Ic=3#NoP-zAd@tJoRmfd_^aOnM6DkAt)mN|UsW<@O#$wbN?_MD zfxhJzG-RD_u1)gnnDA?s^y%F3FMe?%R<~K6(z#;_ESeEZ+v0?CIrL<2`bX@-tD3^U zV+uf<_t$&IN4t3Zvwy^x=NYMq%g0Fk{bYUG!h}OZ^o)PSu`FcXK37mOqPE#A%k z#KQlC)^C};hS|`U+bR1vSmJZW-CW@%rk1Hc1?_Xp_I-F}ZuouXGkdwYZT`tTJ|+CX z9@vCZ*vIpz1l)fKSn3kk&(oiJuLKq*wQHZbcdiK*kPxroi$6yWW9d2$p zna`$#noe~#A@zv`JQyGD_rZF4hshNjdcP8nASc#tqCEKyf*$4ei<>9@Q zpi-jY2+4`9;K7DEb}? z?GdGK_|#*eeIGr%@LLqs{=xs(i&Ou1!UE_)z7s0|@51Q!?%jY}qo;Sgt0^WpZ%U|R zc`D2`6{WV}y@MWayx+&`=^f{S_MQMstlz{FVg&8IgP_Oxg%0q)lkUZG%COtzXfRS9qsD!9Jh)|KdvoNfa-J{0gd(# zG|CI4JS(OGk`fJMJ6GhR`~!{j0BPrnDS%S?SL7r80v+oeVOIC)UojP)`@o-iK9AQ$ zs?QOA(N+83%diTcZhRbM1$XiFumIfaZolvS@5bKga=(ZMVaF*`;_K)LTsrg&)BQff zvEFG;4JP?xN{!|^IcuZ3k_dg8U-U@tRA>0`_+d&yb~|YTs{4`_3>=(DEcap0I*ZJs^#fgvW z;ApuES*H;6B)`z%-ifXr+&QhBjOvI8(77P2iGH!VdMCK57kR`#wNm26#Tql7K)4h9 z;!^t`#x|1w&m8#sY5~vp?R+ixR5tdz)pzyIGy{%>i`Q00Telo&jnT@CSC*VYPcYNh z6VP7!k=`8nhIlPok}PX9wry>o@_A?zIA*av&F9t1W?LBFgaqKabp1)0XZgw;H|_4tG#A2P!OmOSl({lj*D81QH)Wsc zH~Ve98RkM*<+O~7cD0AwnL*+t z0ar787>4&N-T}kF_G#vfVVo5(mrE3IJdIXp|BVmteh{)bSczC zBe6((`ckOOOoK|1R9TYYQn7oNv?3^FOovjQR4Sa|QmP7fOfP^uZ5re=r93~~k;k@9 zTMS{=R0tPJ;i5Dxge4oSAG=yZQx}p3y#9f{iT*8MKaHzMTi_}4p^-^m|5O3yv8Ur2 zG!9F*f7z3upg`ubpJ)ZUPwJeMi#)O?q8zF+=1kEVagRF_XG0}}y#M9Og3Mx1X&q(j zB>n$ojCbTY?8jPODV-0F&&K^T#zC&!=w-1dwOrbij?08NeJsSPnljjrw3s&K#?F8= za}3I-Y9W2B-n+C90F6n5!t~Kl$d;v>K1M5))C5LPqnk$|YgIv0*%Ml*O>IU^A?%S3 z_GI=$b+kejeB>lZJq`dKmr^QMO8ll}ian&8(@ zku48O^8fcpf}ZXFZ z{}F++oDM5H(k0_WE~g2-GnpwOzB@|MAFX;+C>$$h%VgW;v4AM&NpEvFls{6;kbl!C zu-Lu`z|3fooj(RwHTz%aO2Je#*xI>($mGzCqX;$eFRJ-O!mZ}MD2cRUpEpWmQc`K@ z7TEFRQHgNn4BK;cLP<2zNf{r?rIJ8H4ykjfyttqu&L%-=y|PrFMYp-F#%GQe*+{U> zyK{z%X}F|$U-nQjiT=#bqH5G5GEJc}U1v_|x&~ZN83}1}n&ooeC-v0KYKkaw=jKeN zTuuQ=o90g*U`&}@P6FezBo{Ig)x5}+mpT~GKG}7zQ;CyYC3H=9=ttAft0y?F6g{P( zdh|?UTxFHh7F8@cA8=+WRM)P_i7KU3v8N-Hi%d{3BMHWtQ_z%y-U=sSIOUMQ-LBs+ zdzzp|@u8G2y$_*?^s8V}ZNw)7+OL9o6>Ocs)5LO~FxI1C6-^aO!Geyzwo&0|aiFwb ztx&chaqAe+`%xBwfb{=o(f9u#zLD{b#)BeL^sv9N&*Hy-@4w!jQRb9DfS-e=gI(wP z;_~|1K%k+1nj5d<+b@Mh$o& z@$VtCg4CHEpjzy!)Ur78Q!#&qEYa44T)eVscxEiF4`kKTeOWnPK(A^}*4(U|XiF?7 zYs;p(itRvxwg0so)>-tKMyeV_*Z z^)(>FgbR3Eay*%(_#T-0cx` z#=!C)Eqx6v|Dh5Fmj90E>HIJ(UZxGk(q=Zj9DFGI=Pm!a{eNaK9QpuPGekgH|)R`xqu zhH#(uU4DoVmN^Iq*(;=CAJ<(LCWNI9!U6VM5<91Am$pEjz65f$X5P$RCb>QgyCg(+ z7ddz1V5)c7qY?6%g^(A>^6zIarC0yqV%~CsoK~yA0p=mpIb%JTt`|t57PM3%tlD3!uuz7wdmhzd624g8glA-~E)m$Hrb+U_1F@aNuMXO}CZ?7s^30aR1BWwol zFD$KaUlx^~MvI1!Zh@(5eXykjXA8UFLu4Z@j8O8X1Ye$&v`T}rxL-8A9wQg~u)J4i zUt=w9AST-r&!0HjkB8iZ%fP-DhlYMHZZUsbISIZK5J%S9=d zlw7VlH&gzeH`Q5SbS*k2EmnH^U8+e+aP`#mU^1z-tFt5;Y&=9~*#qUU}Yd0!^jXjQceqA_Dz)$bf-8q7o+<&Q05WtU9Vwb`-px8-q_nW8C z>p=I!lhnAp#@4M2c7~$GHKjG1itUGpC)I|U*LxLPI}QZb(Ly9;>ikG6s8%VZe*Lyk zxaB}>t*s)*3i|a*?R=ENcB~eks#`@{NpW3$b*)^fyU6woDVt46H9ObSj!LRaE6OX_ zdG`8V30BOYbdG(EL$q{#zI`27FR#y{_P>B#$gq=tD@OB2*fZ=E_IExS{b(Wf`8V@M z-UUvu3;9+2X8uL~9kl<~aNK#4G22*W)WJ7+56=GIV|)*%hyEd^i&bK$XooHF2gN7E z-QxQ=!~aY1N1Xq+S0ZbqA!d6#K`%{?6{AI_ffZC~G8Sc*JLRmA=AF%k7 zDi_cTPfMHi8|nH?Y94gCy{fXTqB3y8*0()tUP$$xusYkvegnPr&Om5i$N`gnO_Id7 zEbNr{$mmMZW1)Myf~taYa0YIffVbP3YtVzZXAd$zD8y$Q)V4{(GlQWO?u3(JTj-I! zC)Bpa)hGv9{o4r9&Hz0)I(+2icv5N+$|%>cLgu=f91&crj~UU8i`E_R7!I0^6;#`4dC+hd!t5);Tj z<5ckH`4zkk{y!J-vGAM%H+Ae{*22p5%s*p0JdS8@X?L){xL+RZCKxPd8|2y*-|g&8 z^$x~gIQALnWN(E|p7OYM8~by@d&)jd*^skOoz1Q6Pl>O$^!YiXewcyzkb#L3`{YhJ zO6yS@yoQ*X)y2iP>>x4i=+Pk0ZiYC$7UFDm_f6Z$nix9}AR(w_ABS}MX5gnO>5c5a z(5Y7A&duy&kY(4zi+=-qLr=E!?KSLrQmKxsT*v-s?=>leYW7j6WNre!_G)--J@Dh? zZpxYG^eQN5f2Y^fIa4C6#29Q&C1lzI-qp1!Cp+vz(3`apdfG?h2REmfE5W}Ls^T8iM@23m5yg$WkBlB5-J=@r$s6tgjQIi$H8AYHC1>atBV0MZ7YchqK=LUDdM6xS-n zOR8)|H79Tn{&?F^?lLIra$i*GRhAP73}pCn3P4M{ExKT%treeqV5*CHhIdc9p3ggt zl;Q(2I~NLRB~Zvz1v{sL6x8g3olOwy;}E?YNa&p!z|RsOilLMz=j-gOa<5YHnNY}B zhsn88I8hdt%bCO(kf*POTzy3x50KoML>!~L;n-8(eYBLMuK5Fb_MEi_@}&~Kr-bB5 zGo90+MeBc4*$yUtCcXe3o;G;@9c8>~eB1c2amZM0jKHejxB18US-gR-;G@{D@qKVJ z>%|T4_Ai(Gcj|ZXIX*`9J>C;09qi{QK_>a})Sf_}<)f9NIvEmSKO+TlB%0}+m+%2$zZd|XQzG@pWwqB)#BE0OFNObDtDckXJl}FA+{d3OS4}I(ozlFZ*w)026D>i$Z1Kr-?*6?NTb|or}nMr`ErRy`4heE~#?lnY|nOdW5^1{axzE zr$qSphC%5rsOX>jF7`K4iO-|h7om~66B_z)zrg+qjU>{Do$T{aoVf#v+Rf>m>@BJ2 zp1`rsL5b%7i`j9;Zi6-NqiElMk#qmmyoxvRqp3ETg7Yf6lZNJSfu_r-J+jk|zf@telL?F|L7U zKw%Z7EIuoZ+Q~S7;i{=l`u?MgJ;yR)cCOBWk1qRmJ!RBqPP*;eb+S4YbGn*Td(ZFm zs0pIyXwVTgb)%_Bq}_E$>8P5et91AZJf`YHgTUzgxI&00kXyntycQ~Sk7KVw1}v1R z+rouDst7{Qg6NrX>6(;~f<2LeMK4YD?MpqcaV6PyH1wES%dx&uYBFcrC`hTJJ z9!k%xpr%c+UH94(E~<2U4u+|RvJ{#~kLOwj%k0bA$%RbTPSRe=1!7x3C8)_&H5ahU ztjYrnTPfEyeMpX_iq!?{%Y@1Gdf2U>77(*b1rDjzKj3r?K_q|L4mX z{||zlFWdOL@s#lewCsaM1y=b6@n7=?&=2%t4nRA9_m=MrsU=Ym8=> zkp|vLwFrPY3Z_Pu35{%($4GW5Y1j)Od;}C`T0@{PUnvY{m&lUPa-_YC!iPzq!EvCW z>|&P|JC~ahXiywz2)jsX=#>{f7z$aIfWmAAG>BbD3i4~87Gsoi&kW0m=V7o5NF|_G zJ)}?14C&KTKMfXYrGhr!!Zs{DF1hnm3b4yOPb%p39roW)m_d#_^-TV4b}q^FB8l|i znL!>rXR4|0-`F`MwiivL>&}_vx>FA%Z}D_ztwSGdIfMNL7@6d~QxC3h@-(-Sa@?6g zjypBVpZIjyyQ_(n^4K|tJa+0y+8cbDEqC{L(q(53x$M+anb-ML=(!J4DyN+@$!Vu9 z@oRjF)Nys_%3;geiicK6PH3$-lr-Kodz zm-$3JTBxqRi~R-~v&ea;hI@%mNFGlx_yUexcWSs7`FO46D!X#qIXfCxdx4K5wS=Jz zB)%xs;drT@=VNU(dBFTIHt^N>zs@*|;amSa;}YX4tmfTd+yW-BJB_=I`;2da&GRwi zN#hygd93ZfYP^A!fq#fWVmQ|HCX00J6V8S8?-H#0trKOU5+nb1u~#&qAL$U?SWW1~ zEZ{P%23`w(&rgcm@r`kh__}yNJd7QIr^K`31*{OhCjKP;W*mhFz;)_0Gx$_Ko)7r{9Pt0i|C9ZH zZZbwP;~b3lR~T0t*BLi~$@dQ9F5_Ns`9266fG5D_`y9Ljy#j{NH;uQ20Y=}^Vj@=i zv&0;+Koo-2_f$~|&*3$&9oQ}QWA@)JV&W*ceb0kW@vFe@dxN+I`+#?1PvAb-89XE& z!&!i5uqXHu&K$fU-ZGA#%>QTVuZMxu_qzs&6Bes?m&^DvcA1PXWtYnM5_XA$vau z`|ZkJ$(Ciw@hR~XDN&?EiWEsv)Ww?=B~lkj-LfRg)J2)PsM|XDqPVu>*m7#bK^in^ zn;JoZv_;Z3Mr#;FP_#{46m8n17tj_>QKV_w6loeHtqb(`{rzU%oA-8CdcI@>+5O`; zyEC)i zpV1>+T0S)s!+$M(n2O~uRXCwW4{;q_|1)?8Q2JNW&D_@y)3@mi-Q#_Mv+_Jn_)9V! z`2{r^Eb+o!jE*l(15vOf5uyNpmJj-iGp+f=Gz?$Eu9m}-eGV^+6MH%2*N7;IqCA4d zb)ynu+yvS16TE<3SuCH8*SuW~>z=D(|%`ZMAg#&@&~o})SNTb0=FA%CIs4cZMAsuvP~ zSb}VL3tqs{!o-fo{RNr9;2X>ELegTz>NuJMn(W?wE|08~LW=(!%Hy=fGB_sL@$J3nXczDie%x{vf zP^qxN%7+1;7*9bq90f1nrzxqQOMatVAmS%${UqWpt5gVbfK8k0Jo z@R!LQ)Hru0cVdp65^?Ih#@Q}Q>hOTykZH+-=$1C^%7^EshNM2m{rXJXE%4ldA6$1b zFBaPbf-|a5?rkamB=e%V1811a9Gg6SF}j&VvD~yYxwpE=xy7;EfxDm}wlf9iR+rS< zF~2smDwjOQvU(0_Wfe1?%D$aI2Gu6=);)~tKf@aySpWBXsgE(`=Q*0mFYoMQD($ak z9(KP#oWdPbX4ToQp++u_fW69Hhp|`9cLfUgY(v;&PV+fGQiWj zey}Dlk*w(C;K1g(&*5Z6QYQ@EZOLp;$N{%bqpSboJDTNw)h%!1P?qOE6#M-}8$GsB zGRL9V_n}pmCp{Eg|I=CSBYiP_Z|ZZY7W#8K?)~@ssQ)qL`Q4ep+w;NY8_2c)28$Tk zyK->S-APY+((jT1Dt>SAO_Xk{$IG&7!);emx1)Y%@H3Z>cDdl;`Q~JTcP4dm(C^5! z=3|13lSpSD?lQ%xbR_jM=C=pqG-vCo+jtQ-P96AZPwMBW-^Su14bm}0w$0}EbZ9GY z*X&W=IefJx^)>FV4SMWO-?)Z8QgNHzajC=C2Pf9cN2Ywntf|wa(-P{H#yv=aSza^yu&t-Fq2# z7cEt<(L6ZsPwITsU+3KFEcH9?RCjr*vycV8F1eGws1w-}n&m`tjT3o}GwDn2q&MP3 z16JZrG*_MIb2#Zu>g2rNlj*w+1Ke~FO!IL!@EezI7CiSP^^E<0t5ap(ozU{+)&2df z9J-kmMB8~~zn&FE%kJcTrr_)Cw*c0OXd7*lbc9AE9j0MPhiFLBt+Z9rEwn|_&9qt4 zO|(hUjkHnHK^l~F9?g@qh>9dFreaA;s6^6IDwVX1$|NnPa!KdYd`T;)LefgAlym_t zkaQs}l(dSfBwa*{B(0`uNo%M^(#5n`(j~M+(psvOw2tZ|T}n$Ot*3fP8>m6jWwcDv zMrxF_iJByBre;Z(({f2$s72Bhv_jHWYL#>)t(0^Xt&(&#t(J5Rt&wyst(CNm+9YkK zc1b&^L()#_l(dVwB<-edNqeYA(q8J7w2%5ET}SIA?WcZ8*VB4QjV>+?(17;;S3O>* zujGiIR%ZO}VzTemxBp9dC-2zj56e_I2I9d+R`=c-WIE-zzYQn7zn%Aof;+2zn6sfQ z+mlmhJvv$NJe1V)xW6?RPDZwm<}tlrw-j!Bm+J-C-ph$Z*oR#=5x$8JohvMAEwOlYI5LqQ&P8M z{zhlS7Hs#9dJMAREO-Gw8?y&;@KaB7x@c%ikW!Bw1ym%42Cof!pJ%1kd+&S2@ zXJIENVb7d_J$)MX)G64LCt**VfSs6teey}zONiFv#a}ebuX{(>(xEJ zy5F~>1E1X94%^lSyLK(?nl-SiSHrGa1-o)3Y-=m*iWRUeEwIa%!!|d=HZ{REHo`7j z2HVg8TVD^mbSZ3I9c*na?2;w0ix^ z4=A?=z!mQejxTcd->h)|2@RZVuPRg4{ElEH6bX~MdCC%yqsk&ey72{0HLlP zp^$i6K;BvE@$(ZJ500fDU6DA!nG*q5 zOXEX*{QsXu&v^8I=|kzS@RP#h18IRX4`v=|ZlSRCi~qmpR{Z}{%=xWP&1UAt zx0tf=d77d<%+M%d(#$`2uX~^Mu6TQL-^L;$05OEWhyWBr1V90YlTn1fNC1>T0-y?) z4)00)J`jch_ec}~%Ao+D2>+9`1aT#9%%P|N6hj3-JxtJIRI$N*KoJxGD&z=`Q8mg7QL$KZ>0ss{d08oVgA*#wT(J{s|$i>hB&?Dp! zw8*r_K`wq2G5|`SAEgB-W{tyT2e{-hu>X}~mg7B|~eJBF=UyB~63KYo%$zCoh z0r+3fcn{4-Q8-<)8|9$?YxyoJH|1vXWG9!Gvjl)a`0vO@_}6adDn(EM&_>%vW$wHR zGysZO1Hhc`FqKATS%$c{!2iGV{QpLX_?+XIzgIZ!_bcAl7^?Y0y2~g4^wM@3qf>m< zzd~Q)>;FyqJ7(|vlvzA;8KBjaYGcLEy}WzyY32a_Ug}$^@1%a5p21w8=JW<80i8@w zab)4E%octV3IOzPe5YVyTt3`Cqb9O(|C@lA3jwnm+?S2r1DHhQ(irZ45HLVw$8rA~ zG5MrFJDzw_U5TvuzW9Woc`a{X;O~fiZS(-PnGblM^#E!y-N}cp+7!lTa7$by2lbxm z0Sw{u-<=-7Dl|22+nC`~<(Ac$fR!v)51D<9>DsD9zc&h3fvx5 zU?yPvhe+JD_`To|!Yp0pYqM_;3BO(TB*HA#0|+?&nhT0=Cnlirp~08560M3Hi}LNT zRixv=x7TYOhCJW)9C`rE!>kBpG=TQcr3dhgo$oVx0D(S$!QnlN{lB%|dCz;=`;_;p z_nP;0zWQ@10Gxlv3IPAgl%H<~r1eMSh@!Orm+Vm*Rnm_Jua$#$Ba8n3F?;qF{P&!F zi-PUEDOkVj&@GO|8I&cGuRi>+u9X|u;aHmVYlk!n2yw4&%h4?-K-5o zZcm;GoZiGe#aIy5$U_T&L` zI9Y*+qroqaMUxMYokk#q^>Q#rnf365Jp!}!CLUQjmZ#jl|ByCp7_`IjLWeak63BE! zo68B1I;!UuMrIw;j4)(u+=6DgGjRC-$L;LDWJjRYPv+tOPvHN5k=KLq{~OHdx{%(P zZb?7Hq_4kV0_Z1Fhgs!g4*eI8{C|TrfX12sUq#cr?|R>0V*m5r5q={c<)HspD?sws zX=&^imMs84b@3mj2mlnb000?6R*hM$j<`<4G+%KU#zl>fyjxnJr3 zbD92c$^D-V$o-1_UkL2KfjWOCC%Iqg|CONs8$9HvbCCN7MF*e=Ism3AKIM@62Za7# z1p2=zec2)RZxHH#6{!D)-2chkuhXOsK8h5cU! z_P_bIZ^X#`T_ONb)*06DW9y@DYF9iMHU}683dQ1g3-f2Qa0IDGZVA%bCP2H%M<2ERA z01F@oV1A6>Cf*DXkMlh)Y5=8B12D(_m(*#hNp$YGXaJN#1He@HCUv;%ex?7Hf&OoP zs((i95q7`g|K|h$Z(z26N^LQAzbXLChXR19^Cz@67Idl_0Cms+=+ZmzH)xGp#}E;M zeu=-qlvf8m08{^uX?2eJwvSY8fEs867#{y0(yCZ}``M}sPy<~6Q}+*OWvs6K+=HSC zP&LYR&3*4{)QY-sl7I>VltK`|wDs@P3RJX20965~g9?B-qc^BUD&!8;S22J(hyj@T zuha4z_3e?WHb6PF0n9z&cd1$GAFy&pDhE&oIRNu@zeY`{5{`kquX3|jK>)yQoZ)M z;VAFJ#s9zQ^8a7V=KsH72SJwqf6~bi{{JZ*0%pg$p4K523Wj?nkoJrnKt-yaHsfH^$=!Y2l};l#s441IkU%bckt%h^8dGB^lxDQW{1~(IL-H$|GyQD zUf};L{phy*|28lESLxqoQupC>2kY?tgqgozNcOEI^6K0vIRLB1r$7q5v+^-_Ioq;4uAp^a)XbQV|8v zGv%ckm+H^sH>d(sKo!9BF>lefU<$)TwOkWzfKq4!n11(vXvD2_Rm1^GAP!(Up`XyO zjhbXZ64eD*2wea(e)};E*>WeUQsn{WLmt3%RzISxu~0n9+-pQvAJM0pOUMIiw5e+B+Oc70#F2CIDJ!v6m|x&NOCEuTuk zrqi&~rorBI7wp}4!)7wD)2GAEm;rmwJ+SxQ3p;Zr?0xsa&YA^#|NXGDXT#2!1N*=O zupjvd?1K-&KJ*am!wR%L6{a+MGfO3%p eFjW7!ajO3dq6<(Zx&TI#@6p_ve4h}Ffd2;zj;|g7 diff --git a/CondCore/TagCollection/data/GlobalTag.db_30x b/CondCore/TagCollection/data/GlobalTag.db_30x deleted file mode 100644 index 8d2796d2590cd9991839b62a79789c907723db73..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 68608 zcmeHw349#Im3MWw?UwJ`vaDOOEz6Rv%d%|Cm!uiVvUOP+`L@R+X(Ww3nvrKl!ZtQA zKoaf%Ap{5zLVysi03kpKR|q+l&9d2S!e$ea&0bkHKfZ6X+5P3qm)&H)|EubAre(DW zxxPr4*VFZ0*T1T|u6|YTRnOkGP$F0`7>$ht5(PDE8j~cpv!H-6c`>v9&BU!_39|mS z1gHO;jv!h2IWg*$|5AP~T_tUhHl)k_v4pg%Gcp795(`BJf~VuB!YDw0U@Q^k_kLeP zi?7@3#kH}`>u>dV8`}Iel?VLQ6EK#x&v-AM1Jd?dWN3>F|2mIy+hl3QEr_ zYGzrPl&s=F{n1z;?AJSE9mIN|GjN(7x37P zdqbu)c~(+0tE!}{^3yZQb7RX350P!DuxFMF@a!f6Lj+eO(qsUZ7e)I{1p5=tyjT#K z8gS+z!q7lU@s$^i4o1=;!hybE*b+;5L05NcdqelZf<4}YYl=inr3Ix;@{G*=RTrp& z=1b=p^HX&(!_d+)sW~s3PHi(&xtf|@9kos6-<5Zje^LHH`GN9X<*$`Dl|NHnS6)$G zP@YkqP##w9SMFABS8i6W6OYhiZvK)BGt{1zcF8}tC)5=>9SpYwLXoCGIMf#lBtp@M zzozPdKQs_T4I1fp7U>)u42L4Y3o^U=2Qmg@(MTc`jBTl?Xx4tVMiLcG?LGdc&JGVp z>S{gUZ9Ar_C507IXl^UvwgjUi!9?s#LpU@P83{%b@s@D3FA(mE#zT}sM6EhR-4%-t zSmH)AZ)igsX-9(_o1uEkY7u`^Pm>M88;eC_@#@M-47<0;AmBYK!#MAO9PYRC~v@y8@v^Kd3bVITdv?f^sTAj=X ztx9HsRwfsKRwOe(3zHzM;55jhQILhhAPf8;^Y?+w>j0VC3^Hdc$ZQ&HXO)A@EC$KQ z0#PZl85uIDB*y0TX#MY?<-e`GrF>I)1MU80<$2|4Ievh?55&!wMAKau`P`l0k)>08n_q_0Y^N-s#yNKZ%)OZQ86OSelm zOV>$POP5KfrI-|!2BqWDA;~9oNV}v)X{)qRs+87BE2TVXxwJ@{Bh8quNYdq(6TR#* zqUX;OJ$H`irI!*tdzR>#Gel3HCVI&wM90U8j*SsbB#6f2L}M|cr%n+a9VHr#5{*QN zj*Jiuhl!p%N%X`CqM;Dc;bEdfLqrD$i3Wp22L_1t_Y>{wBN_-0J${_1-%s?|F``G0 z5WuHqjL;h-PIGUA~-XW+u^P%ZM&rN_5E*qKg+3U9^bk!i7W^EFe06KGAveh|Zl$ zbj}>2vu6{XHH+xXnM5-(h^i{l8N6;!pH9E0O(Uu((-ky&UIKx@T>QkOf9h|l1g1*h zPp|~2{Y%O(8U9WEO_jh@3H-^Fz%)sg*;lCjXRtx0+@dU!AD1^teieIoq^xSA5lL+*B*lu8`k~scc!;O!98jdvr0NDzMjP4=(f&6x z<)r){@{Mu^zMG5K=h)^+oB!zrYD>*#DFBULPa+l?ZHvaBH9Ol7843seTxa5kTE&6s z5QJnem^9g>r0MZ>w|0%pS6fTgnaCZ{P(0{w4x9}7yMlp}?a_gt1)6i?8mPDd+iH)zVw zRL%s!fS>CC@2m|?%5&6)h87dPsmt3Ej09t$e%@HS05wYt_fGA9Cfm=T z(=U{tlD*R3NC%`0_B4WilfQ#mYE5B@bQtPkKh*03+B(=csh~YR4?>#5fg$r3(wyax zW_w9e$K~<)maBEyh0;NaI^m0jhP1f%Rf@=cc&&(;Ul8qbhiL6Z!DH>nRBM-JBf*JE z-jh@#v?n;4sH){D_EjRrN<^3G5S>#h&o5K!4p&G=_3qIV^qg)Fjq;Vik^ZjXGx1P= z+!u|8<6E{^7DBdc*%gW>qC>I3h^N}4btl@hKwsv7o|c(LUqf$rsk#H|d1^_#cWw*} zpkEwA*UWQ=k~A4yz`PZ509)z?jQ7YVmZ;mxs%&V@p}t^jaxg9itR=3oB8$}qEUQ>^ z)-)W5M1tYT(KJEeEq0AJvPj*r&Qg+H!GT~r5eUaq;S7dWl*T>a7P*FtEaY&;u<9F* z1>?if@PL3bhg5^1!5Q~}Tj&61ucXFcO6`9Z+r^;a_sIVyUn7@5n;w*wvCks#BL0HK zYDGmY+7FhM+NykA7%#Afnh3^dooSK)q`252#c35AF$Ig%dW;Yp26Y-QbOiM*?#Eb( zablz&B9>tL9bk%F!n7Bv`T45^jK|a49vDSbDL)Whq08v}1!@`E2T!$@?>qOf~@W-2&uU0h(gbIJJS3I)D+t0gO8U|YZ^o}F_wtL$R(pT<~zO)AKZE9#cTc+-*tw;33h~AH$1f%;c=RAH~*^m;pFmwVuy(2&5a#CNOzUjT?ZKx&=GBMy)L_MHWwmf~a8F1r{Em52*2t zKp}{|tzJ(c5wQG3^lRKkf4oF(LPx6QWr(-8@fym&sF(tw^-yM zzoY2jV5py_^TCn8sDHd}ePty@=nZ4f4mN^dx`l2$Jp@>*-C~_wrPiAD;gZlmVmR&} zY(ima+0d*1e$FB=dkDZ*xdj_osn+v$HH>KdqejDW!sG8>hl&GbrCSv7{eLM_ZovHi z6?rRG(%aboVwbvY{l9_S=mxdQTZOtoeM4Iy9*i}FM~4H{AyY_mI2uSaMI!^EspD4y z)h8HBkw#`WxXCQ_B}Z#4U6rqKe=syOoY3)%djc?S5Pgl?=wsDtJ@2Y01`+uIjFK&} z=-8-^k{awJ3e0M^m}jfhdM|a46cIYmU<}t#pU^S7D9O}EfL-MlJIN~525& zsV$6fYyp5;?-nYy&QgCGJWal6OK_iFELvHn1`}Xv7%BX>mS(akUsnLhrUqo*jT-~2UF*vx!yo5 ze5R_>M<%V;fuXn`TL^ph`>Xwx_-~{ijHc+w=ong@(KR*t0%Mxe%y>>0LK3!2 zngq%;eZHUBtkyQ|0Q_hy+J{(&x;)J_9zV8!0+}m)QCNL}z7VO$nyA5xeUv1c%C7MM zdh?{vJof~>DIL1{JwjI#^d{HPm)5D?%{#QFhQWF?6dAG%-+r$bfmGqsdCs9guX8|m zoM$H4MoVWVhNCV|SBL0Ox`TsS1Dt$VvOR?)Y;>E1Sgob~r=~!IPYtGwr-lKu)-9&^ z{x4_B^-7lfMeM*^EWIr4XFp}vGTJX_`#apMR+N0XMLDUT{qu#SqEyR~HA2O&hqwhu^Prvj_|G-X%xEzOuBRkYWt}+-wL`~hj zhrB+IuN$i6&anhyq~0U-9!cFXY4qa5dvv?nfN|f@Gd2eYnqW|YNK+MmCP!1nnE}At z?tqup0dXyAd>e26#_ER|4V9F!FWwfctpnJ?0J?2bP<>HCjQ=5qUHujEV{)nVfV7_d z1q<04{`+y$*TH8C)bLsorgl(oc-Anx1hUgHX?8GlqYv@7t2MmlQVfmJKx_ad7dIh{ zAR8Y5?JfZlZE6E%_&gK+2}}%{$>t}QJR+mW#?lSsy6!WgZwy^}ypC#vJAkVaU z3z%IlVTN1O&Ae;lQD`3&?Sc473yvi;RSHNgE|En0-^7%2*sFh+yi$5x+Q^<`WQTCU zzw`Ul&azff8~7?5baIryeZfT37wjJJbAK^8*JT0ga|_$!46EnBO@ZsOfbDS!o9H%sy#&5}VOHqWfv0ll zO{azdwc91?k-cga*L+hvUGYA9J2OJ8T*SWDW$a0*OYN-DD{vRIteBz&n*;p`*kXJ10l z`}KFkZ@kF%F^{h+5kRl0XUhy}t1^Eh1AdnoIC9J$`*0{Vb{?X|&VM8JV{T(VYKz@_ zI*}5)2obT1--!LF%h*pHQFmY`3XSWOcZ{H2fdq!sNGgbx;UEjhBQ7D&9_HWJ0uqyb zUo*59gQ1}@p+GQSOFEB$(?fxM*d=!4kh-m^PRlNjsX@24Ou;q64NM~hc!yl#9XV)u zdBE$kzdSue!{A)Re$Zv?M-Qk~CA2cvR)vY+g+7N(Hljb^GWy_tbEaVon8C=HUQ*^L zia_d*Xvm{M7`K4g?-E9||Md(Oy(?gow@rFm3bX%VA7$&EntyQENK|)|FMSZO1-4b$ zZjq>Amx&r4GNwO>!ZOj(Gj9*&Ko%(=4Y@=*IjGk2Z3|Qhv=ZbW>c(t7B{)qEV1q8f zB0)?2*TA~$Y7_%a3%9^&A;1f|#PbgrpF{0qE$zP4j2S_MV%z{=z$L)ReoN^gg7gZ( z<28ddATt19{Vu^GeU{P#nB|4*)qt*!|UPrrN}_hZCMX1b6|L zc!}f2EQ?~HrDW&Pz|Ikv_AsCxcZn+I|3RiasI6gb8P=Mz!YtJ#dF zW5aOVj+$aR9-S16H1-BoG9#k)TW!aC#$w~aGi?n$P0{!WR-jYzY~Rf-a-6!QThDf6 z(xlk3eR@RQZ{0>dQA%9wC?B~vQkvTkZVHgz6dP7Y16V8H6s+FtuL{;w zVU0-VY5ibhC=quE!ut;EK1D*KTQFA{zRZZD&+YEx0SP z!7b$64O!;Comt-M)DG#sAM0jOZ1wylzBUI#Q{W4AC zOFMLzuLH9n6U=q|k@BS))7X2PSq6#xWsoT25^I;35_}`4OaioE4u=P~#6q8lsB&xXK?c@QY%DO)i| z6M#9vye#nY=7LwsdCO;OJZ(SK+)P5A1HM3BHj76s57+Q?v!V%l_w zqVX2izR6~oO>~rOMClQYzN88p9LDhlwbL!@}J88{{Pee2eSAF z@kiblru=_Q`TzL+`~Q$&`%ASESF{XS`3|*@eB~#~ccf>*_@FW>-6;J+dP{jnu23FT zZkO}qR(RuC$bQWJn!U;%XScEc!;;ET4ADn08<;7Dq)VkHsaok&wkzwEIZ8HG6Rwvp zk^AIs`5pNy^54MM&*zkHD=(xq#6?P}M0@khjd2^6E44g`?@i-#2GQHr=&~lGS`RWe zcU9>@G-8TbK;;5u6^~KhDOIshDd7Rez`346XwR=P30${Ksp26NkGZ$EoZ=!ueYDRrr1y%3y6jyrQG zX+k%kDXkHhtyej-lGFG9basNV6Vj0Mm|P~`raYy!(f8TG;`}Gh>~QmU z=2-N~&~!DkzFxXIqP-pA-AgBwJLmr2FRE`EjCN?#FOz*q#uq-Esxs$g=%Rk zEr;*c*1f%6?#5N@!se zIVZq~;C*)bJ5}uBeN0yD`g@yd|3P#)TKkuj|6=$z^*2=lQzh`HQv!-4OHmsC^Vu<` z{4+ZSkH7aQNyV=;D*5vN$p0jNRsM{8tvn*P$rZ2+`kD0C(o@nc(kT4sR^iKEVgJJZ z41NM`XXhp=v>bV+tf@xX_ovkVq^g}#|8sTrl=?pw|DCD-vm`V_P5u8iYY2yF8Q_2L z2PfgY{kJgq{eB&L0Iq{y?-qFRo(W$d-+`y@d*PS+u)I~ylYR|v+b>IZ;5*@vv_)D0 z{omWr1U|s7fUm$7mb)Db3}VUY>{cvEn)ZO(&(QkAHn7D)-|2eY#%|js;1q2Ir;1mJ z@hxQfCamprtGTUXkXca=nL;j;*bJE#GJdP^)W?ap#o)y@>AY&smQ&zmZ3a&)`;69+ zj*%OXZH|IfxCtz=tP|NtEQ<|QaB$NIMDpq&Qp!=owRVxZlf>U>@K0-SpOTZDCXjgin7<^G%J%!+F%H1XcF9J)Xt+49{$ z?3_Zd#ar5$54Q0d3U?5^4`mO+qROSPF1}Csobom0ZdYuQ2e%q2xGay zvILQ~bU}TR(PL2+p#V!4NAH({#JHdfSo%mk$n1QpCtaK}N0K@!IEvp4f*tWDJyH?M z#|x^fBxsc1dde_`7=woXlx3Wtpp@l>3D&HrWQ^WUzu}!Cwf{V650mytN2MrM@otdr zL)-rv`~bcyGdUlte#hlASj)Rtep&vZ{BKHzvQpWp99OQuc_0re&nka`JpHCCY53f>=miRA}D-8h!cvMO)t;yXa9~`fKlX;OQ1Z`}8WI zjR(33oc`?o3HbW+2efx$-MxQMq}sF^IHb1|8r#W+;V?CGTHHf`ui4l#dt`;O*$lSX zbsVL!OIr@K8j~EO`F|EW$dn(Utv-ad8^SnVqD+_nLH@G*3HhAdAs0yhhW_9ooTt+( zt(Io6AHqNIHF)I0f9v++o1+OT27GHg)=Ld-q9S6CVjfbu590Mg{1IP@xL#WO*k?$z z*A#uYCq+~*_+IvDh_3cQv{uCWP&bLD8l?HygOJPXf!rz~_rP9~(+$pg*r&i>*A2dw znftpq-`+*&DeQ*lG>Gpt#qaBM5Z6<=mwf`_1ziv?73lYNaPffdJ+X`31Bv`jNR$YP zyW2^^?8n&0A+Wjw0$N7z!X5_Eh1z;Rb|>U2+9B5>BD!ObF6Z2rVq>Sw%G>ZjgLvTf z-TDI#eKSl(Aic+wzO6My+S;$Mk3hO`H>Ar%+_&!H(x$cSZgvYqidrGEPKeyx!bPk- z8v8J0a(6+dSjgPeZ0!ZvjfB!-qTJvW{j1q=vg;vI&=dkZLf;mFDGzYtWzjWcI z|2yTbilAs}M8SP8>@+=Re~Ww;jX+GRNZ&na?0?X9dXKQbp|T1?M(YLMI$@Owv+sbP zdlG!DqJ2AL*>8OkyP{A>PJpdd=Wh*jqa<@~af1C7r6Ode;+sQU#8RC@>@OixJPer% zk)bySsn6CrPGP;|&f%=EJ_Luz#&q_lqOwc|p{ zZoATl+J#pUfSmR!UWIE1icOm|vR8u!F&TnxhcgEQT>H=pb9rR{2qd)^^6Vi)(j1%F=P6l-&15}u zP?HivItEqn51IU@4_FNg53#4fFFXjoR>hv&kM7VIRAKdZ5W0AbJqIA74OLIWdPUpJ`bAiv|3*ejb-^o9l zc)tHTZTWvJU}7$=HDbNP5mP!dFf3;9hBe1YF)_4RP@WJm*^M7V^pQz5$=*xoGej*^ z?-s;okhLGsAGewB1@*`6c6I}La7xqG=cj0+q77OCxV3jc%)8U=+WPDp=IA+N`yB13 zqf)VMxFfxRWpJeI*tN|hpbv8}ETGRP{Zh6{bF+E6Z zTBKKEZdw$+(=#p4>SHlwM3dvYA}#my9ln5aqVXr%!f1gq^aKu@At{xqHUJav6{PV$ zgVi$SR%MBNne;ExRq*}&F$7%b@Azr8)8>M|aWen}$!&gnAXZiFKgrLxMMX)# zoJPCAF6p!zyCjeA{3Yt%2~QWn96pxl9i>A)xLYLtMy%&D=mlvxk_6C~I6&JC2Ps1C zis|II+K_hUha>Dn2Y-ya2kRSCtDH`~7_Y3-Dy3FW?RUu0m;(q@RrUjk#n}@}66#SG zXHUebXvZwxrl@jS%(h&eK9QI-S-SVB7@lA zBkT%?oTSxm(vc?F0cUP~k zuJT)8sE^YWDB1{qLB4s&jGnzX{tH#A1BpTJ3-12KS=v ze`6SG^;H-#+^5<9p0bFf+5e8Fne@y=;;i<+QBxw#{x^~`sTV0ov;Q4Q5p%HrT}$@A zC1n4*ddmLSaWeDU37oS3r4pF3|NR5C|1F=g|HX{gQ2S5W|0Z%tA7|Tkld_G+viZi? zkYmwoP1*mZZP3y7Ql(5IsLZT02U7K!Qvos3U!47Ksi}h1*F6|BjL^+WPT&7i_CLR! z@qQ}SsS@}DE&&DWnp5^acK2UXpa1UNe@%V<|FL}j|3TURoYi%qQ}#b%-`4wN|8s_x zLbx`#iL}8}_CI`6+?4&#l>LwH6-)cd!pfuAc&Xn{+5hN%r<}h|wNQLCTHTUO+5h0= zN9t+C=egmW&NTL!vj3T~|KS!s`s#Ij^_2aOc39f)!XRtP{>M1iWy=1CP1*lov3bh= zhnwz9+5g}i(<%F(U`*eRKV|>JrtE*F?0=^0e|`(=HNt8~GsMw59I-rW22R=kU=!i2 zDf^#TX!Lh#|3m&ij!UmH=~d~g(l?}U!Se5i@cQ!;oCErE>Az)J&VcuyCGrZnKwd4E z%hmEGcm(mtyX7v}3m$=g|6!aDlz^A8E8rLC2KiR`4tNTA0OtlhDL)JUVXw(wm*14X zEq_n`k^E!%UHNA?7vR^*G-Vc?fh<#Ulp^>VTd!<#6c%3I3Y@LKi`PA&OQ<(JY6(lgQ%(! zl<05c{12S#f|$jL4hoDjC286;qSL1noxyXbs`NV}gXqkeL}$$+I(s(JIdh24olA7y zJfidG6J4-?=)#3W7cC;Xcrno>ONcIAN_5#WqM4aQ#m=^@Ec(4-1<~wmqB%K4b90I2 zF%Ai8rW(S`=1jg3Ub?naM?etW${o12NYv=H63i)d>r(cQa=?%6}Mt&M1VJJF5~ zqMe;YySj+(-AlB)n`loDQJ;@!Z!gh(`-tw}PxQb6q6ZHWJ#>iZ;lo6a93gu2DA8lb zi2D6Rj~}P@-!H9X(gV^X(v#A&(u=VC{krrf&ieYE^dsrV(!1~g_6zs`nru<#B{&(b` z%D+$;{0A*img9V}HA-_p<_GNy3jlIUNUt(Y4 z*H_uA{Q3%eg?MAEk-f;TUu0k8*B96e{Q3p<1%7>=JwYuUE0F z`1NXbHNSp=u5#mEFp(A7LNi*W1`_{Q6P$QGUIh-OjHcV;|$!JJ=okdMCS+ zU+-df@$1Lg$NBYcb~nG?!|vhNd)dAG`U&<4e!Y*~$FHAcpXAs3+5P^%3?6zdp(y<=4m9WBjVuQN7OUby%;{dL7s6 zyxs<$Vb2Krze7y9N&YYSDtU?YDXAJB7!LjB^WcGGhPtDqRHg%xy(3=joZF`EhGw5` z*`@hW5iE-o44Bw8ZY-FvBo#@jYD-xahrx18)KKmC9iR+miW?XL{E%zF8LGFm)&SJE zaysGZJiAL7IubKBz&_|2aJnsrWIo7!fjA)=%oHCrl*13W1PmvqsdX^r^y3UaZd=_P z9MJ68>CA()z_b7YyV?yHH?|&2D(be{dJe~pb4)n6$H7sd8#QYnTewpg;a)WyU zKPi(jo@TP@U`Xd^I@%nL1`@Ef8|dsi5$va534FQ)V^s1EaZsABoHR`^o2Ts?(WIpA zDXq{_M0Qo(fkY@8_xs>$v}-IJ4_fR=O*TQBcZ8U9izwQE7K4Y*Yai5^9o+gtxob%E1i``-bPICF_ey*-J}DpcsMy|69%}aTL{)g#Ito z*E|-XN_ z(sECj*Sf@{_OG&0ro`ay|D5#S(xvQ|xc#mDC1)fvRexEl*3vZvSgPB^wEP-=j!+oL zuJv|bFcH=L=~2!<<}&A(C6}rD%No)XqWki@m_+E$Py%juoq(mz3D9$MF$vJ0p#*%? zWdhD8mzX_anrFmx^d5c|lG(x2i%1P4{M%gO2a}7{hE-+S8_+#2rsL`y!qa~f&PQD0 zBxfZTss0+h&UHDvZgjx43vzgSkoC3S>OM6KCr*w29^Xr9^k=DTZgH6!G5+si(6-6) zopKdC{Z--{dCz<30D{SU<8_j!C(Z6CWg2dB$Z3@>MM?gI%Osyo=Bb@En|Zb2F<94a zQp+t(Ktr`YL*Vzi1Wzi-T(x)e4hB{m(d)*r94T=xW{EOE=lI7 z?NxQwR5XM`Ly-|28#h4;48DPGgb?!GE|G)DY|C3l-njcZM@-Jq(D-k{`M67*!Q=|H zp+s~JrYqc39L#v4+NY(}TOI-39WGNM+W&C|om(X|b{nDp^Rn-;bLrf^zn0mpL0wt~Nd?EDrC|K@FdnglF6k)I%<)!9M5`_LAgEOWE38^*Q2N=7<`wC4`V4aE)ASLAHAXOh>l!3E3V( z$e(hFd_GxZ%vmTNyYo;dY`cU&w}%n_{Vwr?$wEu_r#mHe!WHgH1)lg#IG=QlQ((v8 zjujnoI7h?bzX|6)mpIh^XRLAx3V1_qG%-a}rWe_y5HeabwF+WbWjpLKvp zcgp1P^(EJ<^?U{ziH4wD5pxwA04BI_P}Up{z=@&xn?Rm$334jA&iJe|7yR2o@wAcJ z&NYm*wLJrb`M3jSnqMb87)+KM)yIrAwfdMGD;D8A<`SnbS*GqN7D`^jcWEk&!LYbY zCXh#6f<%&QjSq2~L)0{&CZDxywaF6TBQ60?B}Cp|L)O*5y z))h9_tA~@d>NcPsoy)V(K|Nf1AQ20lwq?{3o+?LxpLYewGrPf_S>G@|mWQKZ>bPmq z$1$^pkd|5Fp0J;Bh0QY?P1dMQg*6UU%2L2a&55U0B|`h$q-ZujorB40Yb`R~nyqk+ zP+qjg9l(QNKm^_9$%R>kMzDgzF2a* z+K%RKv_dMS3)RVqeEPDNCq<-J#_Qv${cbHg4Qdvss&=rHHw7sLNh-NSb{z0yyq|`0`}E z+K+E+qcp_fcacai?B5lI5)s?pw6aO-4k60?SHzQ!IbNjIr0nG$CL4UX!=u-zxNX8O?uQ)^u9xL zV`Gs}WH5?$n82bldWu%u=@-=f*B$CsdZX*^?eMpDG7Y8`v23ru0s zJ1FgwfUv(bDYnr?#gaSKp2AXeQ5fXLq7nG5HaZ>uz776EZK24?w5f62<1?fP@KslU z#$4Fq|F==||9b+bc2+5w@~^RL??w3@cm+Q$@4yMbzk+VyIh+Y{2B(B>l(Ml-__sLv zyoH&c?!ICBg8P|8-Eyv;CE%g=>`@Q$&GebBypCbtd( z1vy3(8`%d^_PXTMQWV)n6dTyp+Tfw>V#%%{ffa^8HM>e12{nNgRS?L^LLS6{td-{R z!C4hx6)p!$9QV3D{rKSJ>mZVs2@#Qn@|5F)Gs}oi2Z0Oz+LYsimz9E_vlM)BsOuWr z@xe<==;kg{FRHr7sm&$bUZ$IaWSOw7a2uR#ICga4_Q=50t*d+0+u8J zK6~JMQWoZuzyd=ck6l3mRQH9Rgu4XJnQvqx=W^ofUe@Pl3u;Mb}8Z+d1 zS;U@eu$S9U5au3%i{^kWP7q$^aDwohrHCSDwt>Ioy!Euj+2j~Fa~8PbT&+d=3Bueh z@bZ~ph!cbtoTJAm-!tdqk>wc%XP$9_Fn0u$tAZmkGv`uz2AL85%DE@t+!+RYmi+`_ zehzs4bg)IE$k26c`e7v87x0Q{5GdqjHDiumUAw&80dSrIUMc5Io2~J*Ln9pg|2FiX z#crXZ2tkf>fgei+c&Vw{$=dIeHy#&AHsgzyRZxYChX3= z61(!pu~+v5cIh9(&fRY8+Hb}_-YwY0zaG1Ki?FMI8TR#lQ`)9Jm4&1PNFY48x+}2rLV_U}4~arNJgx9F)WI zpa2#KOJIqRAv74doM^+*&3q>CBxWYxN^nC)npvIssotT0^Hd z@x30#A)F=R*euJ2!_^ZVG`wokGm2MU_)Ohm2exGcTM-@agw*vX%spm>!omP<(t^3M3p!6^mBMrdY_2J0Y$eV~KhG*#1o4$1ea>V%O*@O62GNLay2HWQ z*URZKdni9F%M7C9u$R#*r6B$A>!tc*=Hb^%=mn4rz6@-BcoyrjCS#EvWSP9^L6+%? zj%v(M=&cikIVqtK8rhBIlDTvu8ii;juMN6$C@u=_#u+V5(O7J@#qrB5>jB&|^&9U< zU^GLI-<&yELhv;f2*+p83(|&oV}78YdWN>PQ$M54z8+i;)(*;a%4B-3at!*veGJw- zH_AU^Zz_GtQ@H&N|Hc=nnRRtiayH*F=4)v2b$h+qM;d)=wR(CS1GhGHdmDV-0$)R8 zo426IQKqP1O+is4cskMQDJtmg=z&t->uKxkXelTty)rac&8)ANt`6CNd2}Yc9&JkS zCTH*zDGnbSN~B_UbovT9dfVE{ixPpM&_D{iyeJYK2!;cF!EjN5&wIdEP+&elEQcq; zgBJi93P<|_;Y28m_4jLhH;iG?Bq!PD_m;ZP#z4~!+E{N8UbW4!HdUvC## z5BRGlWEJn7{obOio-oRl=jQMVk(_U<5Z3fq>S9XpD(4E3B6Xqqh-Ngcecp`BK)t(i z5?Tg_QZg8u+vmTR=u%3^h;9q%|EBzZ|AyV&)Z^xDT+~ zQ>67>;Oq92WVs=^k9{;nQjfE|7m};WASqT1eC#%ogciRq95gr7mGwX@cP+%ki|%G0 zAu-(|XYF3F%S*u)x$a`Oa<;R@Olc=cuQ8-M*ewpydJ5OHLpr|%(n87I#%|`)riNw@ z1oBoxpoAC8ZuVgkFbqUjw}QWF75E~HyVyKViFF)% zJG+)kSam?#Ad-_05iuBVW!G3WLiOO1{=bTSg|V+lozi~x@9?P+hwq$i(mgl{_$BxO zd0To%`UN!aE9EM=QSO!))=TEg0rn32fmA8S;4|QMX!4(v-;n=N{<$(o$;aAZqtXjK z;pMO?zEgQrc}e+8<@?IJyt{x_NL3a~)CG~^qtV;Y-qY3TYasqFBpsWav$EAN)4iH3XoyFwiB{3l!!;o z@l+?RNY$PY-I^yY4U?M2CJk7(RSH3hzBHDc@3l%-Ceg_6hjW^b-fmiO|L)6 zQh)>7Vs~FW`AWouix^bZFql}zPpZ-sVonE2^nyuQXEDa?3HW-!{n5SJSUarzDydc3 zrh_7YPe#S`QCGmD%k(vylg<^&W<2OPX{GUtSg?k*&3g5ybt~D8WCCSz2f@69M;N|zgJ#ByB)=9ez~GzEPoX{f6ikqzD`~w{U_GhpO$Wc zFTHN;{8`HWo&6`ut!w?k%?khz0Bjiea)XlEaTz=}2qWD9}Y*;5eUgDjLG zn1${EuUPPIV^0cWDSo{69`+INb9aMZDEPOs&zgoyyV)&--D+ar%$~3fo$SL9Sh)*X ztP;=Pw8deTgymPHumw_DN#9U!%(L*)Fe7XRPfNjdn=R8Wb}hKYUT`Z!{MQsCYZ!qn z=YDwM9R@-kq*8m^A7qakgOp~f^Lmb8R22g@M zpvhRK?DcUH+F}UB*r!M+rPZE-(5lT45??c;?0z9+w`<%Sg;?$;h=~uj2>YZE6XuAU zM!=@;{~T=LQ~nMk_T9>PjNt2)x$^&#{|ux4HS!QV{H>Cw;~U^>@C zLu-TIWv^>HR7bcc@2oI*SpwlL_GOe_EHo5m-@#*kd6{KN6?)2d}eNj87Q$Wia#lz|>0mHTJUhICW`#@CAq117_^67U(^*_~K!& zkic<7pmmrpvzN38_y@yr_7VyBO#yg9U!_@(!E%e1^S1-L`h}(P8+! zKq?QJseGD!!ARwLXiGW4IjzFV%h6WrNYK7Xn(9eYgnETfdCi zrzr}bnWKl;a~wkdSY!`Efad@C(hE%93O}9$nC;&pKLk5~H{|cbUuT&jN&l)Wl-^LZ z*}e3ZnBPk;$g`joSYgidCv5CfjNeiT&{u_4%Xz0rpMH8LNV9db1<>$vfr8^J82ocMOIj*a@%QyX^mAyt3eJ{pUUBfHh@ zPVsSMv*&FPUsaSP?tZ0FOog?`Fb`=GF_{5maqY2Xg4#7jW1XW>^6gEHO3t$1R+KG& zMBn*j3DS4nQi@Y|>4-4ih|y3*zeI^N-;~y&Szez8k!_JP=Au28Kyw~UC@CFNN0w5T J8m4tt{|~K96Vo&C3n}IF)jLpoKUU8BC+1^so@h*RA4YPl8p2FV4$us(Bb#v zTHovs`a0@%1cKES`-4?k2=iJdTuO44S(2OEKTgkCwMt1T$xwGR46dfuz5dofTgQQ5 zQ$wfwe!Q>4Ul;Hf@!S@bxXC3&%Zo~4;Zw<`hLWPL*3PEJR)0ftTWe!cQP~xmo>N|~ zq$;_fo_Hb@4a(Z+JMOw2=Mdu}E|2sU1^oL1MXhc4zpJ@s4ehVBx3s^|-qc>xUecb| zp4J}M9@g&F?$B=4Zj6M3G3qm-gYn*QaCF`3iprfmq3E6_e?ur4vi7CSx)KWVM?`;qRk&je4@9+2Xwu0|oD4sd-ds@@$YU?1kGtwS86^;hNgG13!GTcz# z#+zesbZr(&mS~99yotV2)$8gSEz!Pqe`7cnPDFbAi9|fn9!d;K8E=b%45%40fEKtS zwHaYqipIv}sd9v+sS2GXe;v??y1K z9>LU&2&Pmbm|TWnQZa&w3lZqE5KNe)B2>iKycn(jM`-!q*1o2FN&7t7{j1uG+Oyh| z+GE;-+TGgi+AZ4k+SS_S+Nd_99n*TX%e4Jkht{m^(6(!vw6)r5ZMjyWgYQ>dWd2>NDyS>Lcp?>YeIs>doqP>Q(9)HL1qb z0kvB_tnO9Y)m>_Xx>envR;er1WonVSNS&)rS0}2f^54oYl%FX-QT|@}uJR4#%gPs& z&nV}Wmz3v~r!bR{5XZjj!_tiP&hC^VShh`eSH*$!xZ-R zQrOc&VRtu$p%8^fk5U*6Qh3>A6dpN3;o-v+9y&zf!GjbYI6&e4{S@xoN8#SR6n1q{ z7zj|<*-2qX2Zej~P}ts1VOtx8t*sQcv{2aGOyTa`6zSNfTT9`lO%!h2Na2PJ6s})S;ktDc z*3?kAb}fa~)f84$QCL|?VMPUnYt~S>dNqZsR#CWeC57eX6s}l7VObf4%a>DFT1w%v zWfU%5O5u_v6fRy&VMz&v#l;jB6;W7NNMS(%h57ju=H*eCn@i!MMHDVvNa2D76z1em zIDbBc^X5@FcP@o<=1@3$HiffhQ8;rZg)?SQIDI;W)22~4bt;8ZrcgL}GKG^SQ8;lT zg}P4R1paN0A5Xu>jiXT0#%pNwJpZB4H2lP*f9!9p2F7aO&#(rl{VUpkGW;9+8>@k_ z8u+uRfpLnevQJa{pTt%(?LI9}eMl`+KCN`HAF-PdmErHuB)w*F8CFCm#@7FQMs=5dq%LYk~|%Z^oB!Gx%D99oOckRWY}WJAcETe zM7E1zPcKh>Slz0;sx-2{LB!ksOHG}nAMw*pjUQWCO|fJ+for7O7ms0=E0!D%)hS8Q^+sC=)}9S6x%y-7|?(HpIu+#bhUb;^~m zPqszcZgs{$<`i!-W0UnxYb!Sq9v;HELLz908?D4fyL}V60~|hZ@S>VGkT=^a9<#kv6R9yMvS=2(#_-2mO9TW~OD1h3Ey|M4!vi>&%|8IW!zj)U`LXw~8L9 zBix6tl|)>q@5}HMaExnlj{$gT(pXB*y0HmHtXu*&>lb#?Lhs$aHM|#BaEn5^WH&3;&Z(vJ~YQxeIn`oIHze$#7Bk< z8SZEj<&J~IIo>3mnyuIRjegu3I{7h!A@M?Ai~A8sp6yMtX#ZC-oa!xCUs9WuA1No5 zN$koCH|O6PHKiBpM{4MdrMa@PC%G$(xxffb9a_Wv7_Ude{$xm=q02)+7hh*MIWpvm zvptK7DE3wn(IUOEoW5Y5*v`J@kt9z$gLI4N;)S##Z_?t0def?ELz)~cT0+CeGl;WM zxjfrF1QvP|*j=D+E2WiNbESXKpX|iv8g|R_g`#muvT;F1fj1e^e6tEEDH;Z|$}x$} zl@4A=%l9ZPPxqJ6luM-07>*BylZn%r3T4oooE`kgKF_1HTu0fcxo0h#Nfh$TTa+!= zo3w#N`g%T{?2L3`=pV9%OHw6Ci%g4vq($B&iS}Q}v{CgZ>YzGaxm%gRu4RR?h4+-{ zbxX^|cbaS;?#|pKObWhF^EdKP<}DAYiOcn1b(0|llOEJ=ct@xw8BYuc!aV~4O!?gJ z6@r|MT(&dHcotb%?lmi=*|Sm??T=q-R*Ywnl~Qk6i7dnSO^ZKXuuuXjDd-o6Gt`4g zb8(HH2Yi(HU1>J9z#!I$4IP)^cB+TmuDj*tC1g`3Z6$^7JJN# zUXpp(YmW~{E_K+mJ&T-_c*}`s|67=LjW%9=r^=Mm%0%`s+u~`2@2NC{MU zQPW+47Nxn;`i&e`ddp#NglOmncoUc!w^|RD8=an!B4z-4!^ybOak=Z#5)DSXXxDSd#%izG zSd~2+MyK_5vtc}kY^?H@jmuZ+`^stW$W^FIsR-j4NMGqudU z>MeXPg*t(TKwwAqBD(46PoQ`ky%q252D5G{S=yj!4<#{<#xnL)ZVn;Z`4oh2@Fu)x zy{&s}2(%|dS%eCT5GH;@$a;@L);Wa?M6wCt6e)!NhLCk0h158N_)lf-=on@TlGfX2hh91%J0Ij%E2H-+Mj{swcaGBlxn?;?-fxp7{~%Uu!-6i=^qg~ zjPCZIi6`@u$V0WaJd9M?8VJuqT{O}k8w|%XkEnqiCfyWm#z1V9H?h?IC$T(g|MS$R z)OE@m${zN2EQKi6Q*XX?IX>+Ur>(Cnin-AWE@YtITLzBS>D%~`Vsm9jyH8ZRyS`0= zjRz9yyh(^|H0IZtxygsmuKUKz-`_HCbsIk z`C5@a1Nk=i94T!^?INe~L*`a*GDo)9K2|BSJ@cl5DOA#JQe_OpZt*6zZ?m~hX&Gs3 z31lm#Ng`q94diV0CMQvAt5Q6l{hQ&*TVyHEih#^oZ!$+V*{T#WZQp|X%i%(8bSc#q z1F@UDi52a?jcM=J%G6J&Ta<4pS18li^Q`S{4DJ?d&u)DqU$mkJYp6Gmeu6#x+^^ah z>%2prcYDk8zFm4{aVZ80o&dK9a0uWr77YpS@|JL{Nw4K2kUV*4jwjIlo~euVW3z0u zqAEjlhA7Bu@+R-_PQ8{F1n0TEc*|V}{ej?K>wu>r&;Y`YXsF-%h17R?OZ{l0Ud#7x zV(|!$JB1~ZBXvw0aY8B5w|+xHqc;g>cIew`cH>2~?5)G13!47ub6Pq(_XVqh75Hzk z2LxYyaA*WGF7s#?76BttkKTOFV1n!&-ekx8`fk2p^M?}A)0GtgI{1u6Bg3?YuO8aa zGYI1mC)GamHiH`iecl9$_J4$FcWT?AogY&*JGTq7NMGrd={vi9k_eum>;47VW%4Ep>X6($it@ z)_jTh@GuU9jyrlCGZsP`>diX{>F_3GbdSD|p9#qAT&wpKO}DCYKYh~j9K_A!zK7gB z-sDEw^(|a3&p3ZYEumy0a>`LWTfCbOqT0QQ+TW&^@{L9$Azu}C8nfRZd5k%vgCQldL@R9&%f~$=%zcmlo45Z4>F_7zYjJM0~h03Ztl~*qV#e z4q=P8bo-ihUomY~a@(nJB4{LS`vfd0lF5vKoMvxw#QOh61}mQ}X#Z8pYl@G3gK>kv zOK$g<^kDO0y^x##(dX6BCB6&S50vY$w{k@e>D$Vw{^YAgC(sh_9l(;HU-k6zlM?3-M3(=6P{oZmlyiac`-;$xd;0!%e;lIsEM9gpEc;Gu zQn-Gi2wmRN6ytvj(~hgZQtwk&!=kR6{XcdmYq^9*+!WS}bBj?Q7|lt$27Q(MWn6lC z!`||Bs8=uMgVG?95i{e4KnG^SZ6isfOv*g&dlb6YTjIxibRX{=8UkKlTSLJ49wDs9 zo3LcJ-Y6Fpyf1JpD!6zWoMhi&CuWF()NXH510j7qe-)z*iAY~E*t`=nuuvk|H59B_ zTip<7Nk#_4@`6-D-clVrs<-gjmdqQq@e2*Gbwi`XBDv)q#2xh}?y{g>&U;q+;Kj_Y zi7*!~e2esh-qMd=rnm9wh|D0L<6NjbV*YC9CJXAzyh%&VKB6CLY{}Yjdh9jZgfV>P zZc`GGsUzMpCE9-%)841$!y>m!`4y~aE7{Ae>k`_(@kltP*V!j8jz(5h>F5=Q-F-0f z9`ly>;X&QcTUK4v7b0yAj3z@NnA>j%S8WVdhN~;l^BXj|V5*NKhciS$=%6>DXQTT1 zLqaE;H|K_M!>JaG@C5NO*wa36dKeG_fp|PRylIndRNS;_C)Q>0ew=hSR5i#iNInbU zQE$Rqj_YN-RVPMbkyu|G6N)7CnL9>eO}H~IJ-x@hCAasOUdxl?Cz|rZckB=ZFnd8q z%P+|0F>mR%MD&_@x%kkN6&Vw)K#CPeF5)e@lLPtzKFrE$6AL<0vA$4SO`luISs4Tm zcoRI@pN@G@b%~esY=FPz;xOZ*vU~?pP+*k*ilwsQt z1yOz8L=panru_@G+yaUJaZKB-Rcbk~-v1tK_3u;9sYliAu)t@^H(_OeuX4F^SlOr) zuwS$9vRBxB>~eZI%U`ZK2^P}|{cT~k<^al3i82F#u+x` zIhD8a*MnY|XC|;N*QIQgS3?QpnhC63B)=Z1cbr>I^hGAUYN6~=C4EsP=nEHuUdS_0 zvB2-EYvxMB3)g^Dya1#%oU}TJNH*o!aNmMelzNVt`pWrEmYi~;&o}8S=2>)7g`Hmp zdfq(HmvRxy=MvpeY@Jt1PtP@%SH;fHt zCV9csogkb0T+?zuE}05)C4YMU6e7z8F4gd-&LjC# zO!;#s6HkX!n4dBS)SStn=JFI~Pa^7`NOqd(sS|Of)Ieb)xt& zL!CGclzbf&QJAR{h=RfhY!`hBktdks$>SxNxi&{sa_G9fWb+`Ht z>X&g67*`LdSHmXoed=RC_ep6 zGdZNSgH3gFaR#!@prK@rRxX~ltPqOlYO6$?9019XplF7+7?Gy3f1!8~+P&YxX3fI3kxZVVb5DDl~?RInq3B4Zm|vi|8@pv0`(aQGD`4uavmV z`HsP3o8r(5AfB{YjlpXXW*bqqxr-5Ho30pA%^3>4brNAsN+^bgZfhPgU#sLXuBiv5 zMU3WbV~Uo`BWQv#Rm_&yF#6OzBsiRLj-dwU5dc`&$NB{4FQ%HRsy@VX-}7* zqq$l|0FWrP|8dGW2CTdi4ns|B&{S>;wMCm)|m0?&w54XZ?C5HO28|SRlIs z;g-K~N92OcUxkC`LRhy~Mzj=<>|M(WrmR(7$7qU9mrVWdn`b zd?jP;Ka4I%wtq$YFNS|(e`7T;Rs(-NHJ~Y~GDPEl0hIl;e_%(nPh;f2UW;hEv{iJ%YdW9NPx2c87Zp)Ba9-9lLu;ZKt+S z{W-9@pNBQ@L3Oh_U-?JnP38T{F{KH|6Vup_+3RTY=h#s^#Q*X(;A}yh@Wj^B#)Dz$ zwqXz_4|(fNYIL2Xa^ti0$BDYmq#mmgRADu?E&}S}8c?hGsm8!sNwphz)%1gD*;+7d zD;I0A<9HDK`Zj2>QXXK>l>t~o@^t4-#Et1>Vfo0Y2%fVp%P zm}_~;`&YV{4P)3<`-pL+$+)-N#b~6svI~q$%E2hk4g)KQF>Tki6I^*Kz$M;%M;URM zTd;dTEiVIAl(&63r)JrYZ6oI8CUa|P24*97%Ui%)PzvTUUf$+qoY~r`-3@yFGSEvo zeb-W=TidoxATL=8vMAinB_OBo;WmP6)e>+u@xO_(s_UW6Swk0%E2f2h2ZfWWZ^+ReURbW^%N0KN(JnK| zH|!Atv;~g{p*4LO6$W>-&D<;>H41u&w&#f^QFBD;_RCnOeT$#U3|_AM)*)q@qgM-0 zIb`B!sG>#(@*ot=^B^V4Dw(o75{1-hCu$?)0Ih^1p z5%h+gM*v3lFLX9R8FniEw`DmeaP0mYH~d_{*!Z`O8jP3=9S+!!87QZYGl)z_JJkO3 zm3F4Iqva=+8_@1wh7I7a)cNXiwN^c(o`rvoN7dKW@2J1h@_F0tgzt}c05AAy_yzis z_G9&Dnxf6p7Hd_SAO1k1+Evgcd>pO*%i0g;|G zMTCWHQ)L{$q06)x=~pk(HlhYI&QEFlB9aUApvFkrz*SghMYM}av@L?8OKcFYG#%?= zqme5Nf;Q}pO*H?{qxJtcwHLJ8w7Ax;t<)x|KU6=hJ_f%$-RcH^9|!Cc@0~eY9=;9DzlYcr7qJp72w>f@6x$3~Z#>q4`mjbS_9!MFC7qzJ67)y*$P;FBWa(rd z0MDWh@Z<}ghhau2hapJEL~jphiv{h$HcFqA#A&2t4^Z;$R`U0^%H&NOuXd;|V*1nu zo-&cdy)CXzo81GB;#P2!3y!;+rM9v$Znms{izjc}X;}g9V(%fjO_tnS8y%x8 zdpGDyc7k3hp1x&Ah6xokHBiHi;F2|bv)`PO0RtZLcUbao9A}%Mu^T{L><4v?NdNi< zl*=`7VDAJ|NduVVOTLac1h^7FBFIv;fxQDf1wQb|3cR-7&f{a(fSz9ux~!$E>ue|x z^+2k?ORNJ~Op@7E+g;ENbypI{c5{||ZkroxVfz)}DBcDRq0f2wR%(ngp8{iG+gY%b zYz2#0LY~=TW05!pTTg>0e+ziT+T+w_;xXX|wwxp>n@uUBwUTUE5^o+MDYd4Ql$VU5wcGYp2ovE3{ea zKVd%ql=?0p0ye9w)LHPi^#$nqyjK}f_94xDMZ^66FYws!;csaiFSlBJWZxdlG|gw< zLP7Fl)+h2!fTNqr`7ywmqX`azESumrj!RAXLH2c!7DPc>C!Fq%JB~b?~>RWx*8e@Qc zk*NI^^$THGPDurue)fMrUDyYzEXe13jkOA12EK|gNV27UuE$DNE?wAX!Bf}^o>Eby z&veVIiyo&J%Rux7Jz$W%!J8p-slz@6T7EZZvKhW{R6b07SvNL?kaoyQ`+U&oj>W== zy#|JYqhOHD{MF0k^L$xx6ypi#L5u$K5#AY6>M&{vvQL7Zdl~43BJ(dDh5)(HVV?l8 zp5nvck$w3K2Q40Mb$OV53@rJFz#_}|`~m8#?R5il;^4@TK{KE2l_M=r(KQq2e4J5KgRH2zNn+&}QYR;piAH!Dvl>)4ln>-hhX zQN1bM(vq9vw}(T=QSPwK3YLFw!}gDl%q&N}Su}Nz=8 z4Dp7%B|Z`d0Idzcz#&02R+r_hh?Gs;EE|u-R~7drmfHVh=40^gyBw$e9a!r>rF61? z!@Abz7;duPbfy?EP)bz?9v4U6X{e{Kk7`@~LcZ8l-ZFOJO1;i*!0zj;tJo0itgKlV z+*{QLaGF8Pa9vjHS9(kO$T_`+17kG=;KZD;v4mb2hb6MFqV2zt^>f~m-+zT(T}<#~ zNFHsm*O|JpF>bBpk@6MZQVv`$jrx(YFxeFuCzD;O4wtp=<=#?lIcr+$@(#HQmdu^u zp=4!^NYt>_J?kyG{xkX(7aR&7>MjnvVql+~@h0f_X}vCsS@1uw$q6 zZJEKDT(YduSu8=#d&oNFQPxSPEOTrZRcN6_m;^agn)i@((wi)r{~uM(GkDPc4A%Hx z2L8u);aU49Sn>Zt`EON)$L;CxyuC;*f*0Z6|bND9M80~;3@eZ6ITn5kL$KYXn6rRSfhCb3Q=$r0_Zo*^0D0&ti$zO$M^3UVs z;cM_z{(V?1{u3-0|MSn;|2OP9u}~8hUF6-_@boOaJ_`@f!W*>k3@yAw3y;yld$jN* zExbw#57WZiwD3GFyif~|)WSQp@Ki0lRtpc-!ke}5Y%Q$ZgvV>){aSd!7GAN1hiu_3 zyNG+v7GAW4M{VIUc-e4ap6r|cor94#)Zdm;eA|qA{SoCg@VEYo`hg+!6ncT{)mzaA zJg7d79^ggwJlg-4)Ni2m{|NgDztosE5iNg#R)lt6p>05`--#W^{n}CJ3k+$eaCUe- zJQ3cB*8aHm4BGm6?Q>}9-_X8?cK$Q%mp~u5UAbAg78nFcC5jWv!%9GDRvMJe%35Wm zvLx+3PnoMsRmQRZ#*F5tx(3*R=h$=n`Yd~vUq8w|%CFC`XZZCa>?8d8G<%v~pJGq( z>znLNe*F~t6u-W~-r(2Q+3Wmzo}K5{*Vt?P`YL;sUteLb@axO$Wq$o6`y{`<#9rdp zPq0t$>x=9~e*HN6IKRHYUf|b{v5!%U?(U|rr-#DcUJAou3j6vf?C+;=V1U9%gu-LT zC_H|g!f2Gj!9faRF$#q(^3V|dK5>G=M1sQMVG5H;3P(mL937?b)3Vt z`cC#ve!ZSu&#yPI8~F7`b|b&u#BSo(o7v6$`Y!e^e!Yd=!msaU@8;KA*{%Hg9`+u7 zy^Y<*ukU5=<=5NU?fm*a_C9{SgWbWe?`QAl*E`vr{CXF=i(l_%ck}B#>>hr-m)*;+ z_p$r<^?r6gzdpbo;MWJ)gZ%msdx&2jW)Ji02iOPr^%3?6zdp(y<=4m9WBmF-_CbDq zoITF3A7UTk*C*H${Q6<`VSas*J;|@eH)?#d#y4zy)5bS$eDg*dc%D5^^Z!ZgAmM+m z!#Lfqj#utfHex6EVD<^WH_AW?&Vtv}U|B$hq;kR~^guALOp8m4z#N9%;B69fA~lgb zwn_{L8#7Uas(;7UK&QGX+9v?b>4&pQ{#1C;Zj3bKP}pVqt)bUa!3Fgp;)BPz?XC8 z4=T<(yh%8g8mHG(t~Vr{jPwGgDcI)=j;@nQ81)c?Kp0;Rf1}lU><8563hrL!Mr00S9_BXPAPizs%oPQd`C>8vdU7}qPP^> zJ;_OVlOx*yI)<~qJdD}vmA_Q_*>7;VzV1S;d>}Pj-^g?4);JW4U3aYeo-%lww+tRi z&C=JDmZ2hSDl~=^Up9|*>^&q*7>XaCLcl^ZHF2Rg+VH8m*ZuKf>2B46s zGj!Tt+r=20RZb4!rH;MZtDNbM@=*7aRvt4_NHTA!Jhyn06H86g>v-obm!38cb*=@m zMM+~Nf$#Dr@I-2=?BeAns+BDCJ<#qlMQ4g5nKyfrd1Yz}`EkWdqblO6hPc{2T8nYa zn`cgAIHIj=c9XXp1XGh`KSMd7-dFgLMR}bO&O4HDqc;g+|G$yO|GAjCPsSO4CHn$v zyin`UKuam9MeyFz#6R#f*L;RbnDMozF>uW?r+T>Y43*_>Z)NFDEhM~gBM+vgnoX=3 z$0eF~B;+n{LV~FUdNm)IDG5_S&XQq9Ip`$ePHz&DDYy^jvl*n2rkrjHN~2`rCb94L zCN`y}=3_gbh8!cMjOy;r3}j?6p7&8}5svZL9UgPRQuFkdnnqhL(zWQFS&;Nho?vb2 zkW>@z^PGpdne$-N&i9-L+cT7h+r8x>oSI{HrIYm|G@t} zi}C+ab(Qilr3QKsEg9PQ#iPQh5-ZboFL`FB?UBf|{gyKQu(wQKkt){P%8kxOp70uq zyM}&gx=d*H+GV=zZb<$^UgZ~Mmv3}jUgaD7B>zEg@<&pIaA`yXldC*$r|bqV$$h}9 z+=9$195an)C=>U1%Y>N!?`GI>tHVxRr}DSZ z@+}66*Y1lqcNa%8Rc^kebOmIi9O;xyx`|YR4|^-Y;nWKAEm7jq&7OQqR*Vp1y4Pb* zcul^{nLJm#wwFezV$0+W$9n8TUXx$$NM5?uv*kXcOFj0ux8zTxO7(5k8~GY1tquvA_PA##$K;&IG!8Ko?5hI0gDkcAjx8#qc7VDLzq7Sl+4vdmuf@OJZ zx5$+K2fU>(+W&U)|5bn;`&MZB$FX02FWc^F-C1rAq}J+d7K`P%sf%S~&y28XY*XHz z_m;PCs@j}RICQ_v^zAPCTx#DW=Q(e322xe#ZiZ9w%qB=~VA3qZtv^npp7kc`c&bvb z2GlpY$eB%>PqNdkFjgZ>U?8uPY(;AF!(Uef^E3HtU_` zv@?dDva%^Q3h!Ovq3+I}a4eLF#HHp_MFm&RF}rLLjVGKjRPdL*6+E1()fk0Zk;jqNpEt7Q=9ZX<+Q492)xbW*#O-QtuFSGH>o|Tjk>>>y5&q#;h4r%IGZS{ z!%ujVf*I@v_&(YKF;We!b0jee!=AcMUwn8Fju2e0(dqg@yu@q@Z0tpEnK+SJukS0S z3cg4lTE;m^NB++zkC~iwW*um<3Kxx6Lzy&1`i-jl=s7ZUuxsP}O( z7h4AW|LVOM+$**qSW`&)KQSfxCyoFA`lzOizD=MgpQ8T*AcoqLXSu2 z^a%YPq3a{`euNH?&<6^ID9xisDHIxALc2?7dI_yBp#dhe!Gva*&=M0GV?ujOXp#x7 zGNEB6w9SO(nb1NL8fij1O=zkKtu>*+CbZdvW}DD*6B=(q`%P%Vjp6_Qq2m94l|J1X z?I+q-l^5U`;5uzcc^9<)zNY<1T>}K4JJbTT33|V?*biX;dLE{Ux3hm|DeVXhQ4eD_ zFiD9370{Hn8=<`n1a-rvYlX?>R!5z^2`?UIXXazr~eMNgIt&Nba6Ctcv(C%xq zA-Pl=ycX(9l@Vo~jaC{_G-3*UBM#a?LJWPMHDu*Q5$3?TnqnN#?yE9GwyY!zGCQnF zxeaq=g&o4B%(x+F_vJ?VkSJ7KxKja2$jrmCjPN^4sXQ1~Y^Iw_95_FVDQPgEyo24` z+O~x9h!`{FVi{p-q7+fyz#*nwHlUyaBAD|kddxAEa)SHhS^!In41lGDHakMHOI%HDo8d()(P3#QFEoDSj8Xuv#9$7`}|1tdEv|ec}Vyp)K)N4QkNW9=DI0ncXbr$RZ{u&q{?@@-7R-mBd0t4iSfSvdV zU~JB0t|~kH@3+R5|6|MlvE{!5Zt?fF{I}!(emfoiw}9IJ|JB~mJ^<^R0igIT(PyVz2I$i7Uln zkV*&!NgyeWX27N5I7o{K2TAOUByGr39RFw$;U5WF!iKK1iExh=67G@M>>09rc5<+z zVuC6bn>n#`pPd}9xPb7A%lM8<)aA32BNi7BVzHnfbNTG#n8kU7SuA$X1{^*+IaqN4 zffb9V`&>RdIY{vm0x1@lO}!a?c5;~FLckQOB9(4-6D?zG3!)IJpb$vKlHn-3kr-^t zqaZN=tXMK!#%>@6+hXYm81eyDtcqeBX4eygxpX=Nasl9p)lyzd2iZG`Y);QPB5^(; z5)1l%r{hkJLtH{Q#Nzeu&EU9`LlEZ!f>`Dtz^-#FxH^%89Ks$JJH#D^=gt*-Kv)Ra zVY#c^&fY=KQQ6DdKw3Z`!{U2vHC=a_h{Ccw&FosaD3i-HH=?l9cjq!f6fP!2Vewt< zOou^R+6a~cf)g&|HMYYA#KZA}7cK@}e6td=mKC*~ zUE^5wZ6k7#N#4q?2H9EzZULG0|H_q>4AyfEu%tVn3@9hj${$jmQ$B_9{_ipB|C*!! zZc-az=Qn^g{dMX+>Icy`ysmyh{TuZszy+P66#yA@mv%%O#@@l5@FMUsFn@ob{T!Zz zj{sBfERcX7)SlBmt9@PK0E-?Y6I$*TTIN`QS)1&))eW_@C{G8n+niyIoW3fSt1P}w zhSIptxR;np4YXu(RFHF-JtYgwaO{t)7#1opM<%teJ2S6NGjB^cb`WIMnY}I zRN!3KS~lZ)mv$v2zF8fm@7Rbiw;OC*5NTT%)G?X;7JVWVVe9D}FvA-S23ucgMA`b+ zi*8O?FvIJq;z*FvS=!!!^cJwtX^+a&0eU*|VaW zpV`{U!?Y5pzLPKZsiCxf6l_X_Cd7$&q5F2rz!*X=T_MEp2l9@{pzdgch!G} z{q7QNJM49@f>r*bzzqE&EOW=~XX{9h3Y^xc^-{57^Dgce@N z7QyxAj$Rniw)vunwk_EZZCj~^Nn_H~&TpgI<2sb46+n9y#9BjRbx#($RJ$}bSMU8cgglOZncV(a%nznn5PeLBe z8%pTLv-`5pjpz5vcVbtBKOmZgrOtQIXeTtdC!0r-hYUnDMA#sP4`+uMK9U7u_%d4m zFJxUb|39xi09@~WSmc*!G(j=;2~O z4`YJOGjKnmjJa`l`xyP zvG;Oz%Q{717cT~OG0aVP@o#0faUOeT#Q}^90AQ?2FwR@pd+a?Nhb}Gwbg?1mW_GLS zJgr`lLl_qW!q|8fH?ns-tt)qM9ODw;7#qo4&u($|!5qdopJ0q-R<5%{aS8dP0Xb}O zAz+Io!{zK|Y49i+IB0P`ffkqYg~u5uL@38AruM%83OqpBco29yhk(R02Pbyt)d$pb z>JgxPOalhUdF6hr3ie=)FcCUGp9Su3cAsC_dj&UTDIxYsVBc?M0`?Wiy^Dd|YkVl* zU@w?Q7gFI$VE7gS!`Eo=Ut=G$GetR+ZvmiujW6jd?0K6)@^KF7TLMU5;}iHYd(Ndy zEI@r11Ju{Z$(Pu(ZZ%+m?YjinzN*A^eT#jRj$mZpC)9ie#_v*K{HhX}`wQ$D8<$kN z6=1(b0Q)uih|jZ+5Sytq+s83~mjLtE5cfIuwB)dqUBevpcPUVR4RN1gPf0FYa}(IV zOM(4su)WEiBsQmFX%B}1E(Hv*(J#HhJ}lUr*wPjtu<=&TvnK?jocnP=;6eZb8w{_q z4@m|w7vzY*g+K&07+z+N3kKsriy(oQ0TNi1AJI$fgOb7SCF(Mc4qOIwV0EMDZeC=M z5g#8s1$gKPmVl9XOn?M01xT<_3oo!oO;%IYQ~(7R0w~zX+VkuY$tK2U4i#Jos9=NP zS@r?D$0&gnTmr0M0*yrm9u1^knmC`4$HNgtoHmoa9D zGS=u-#4^aJ~-@^P&Q+dZwrXHrQdJ(~)H zO_aG$kU<%Oa_QCq%&sdy0M(AGUxha>9lpPoVait^T5dAcpm%Y241XvQJzZH5 z2=Dd9qtVDPddpz-(1xDD;BYdONRAK$Lwz_j*f|tWwsjv1_auj1x1^N(rZ=VJ)U=dO zKXO6j1w(4ja0sxVmyE;kDQ_7HrRw#z++wayFOWAYhPqqhf%uLfp=Gv&5|vfK;~WMS zO(O{fVtJuLzu`^BnN*#=hnwmd-$9(5z@MojZy-Uea}vp}Ap%L}U>E!=bYcsqMUn8= zy$K&kZP)8Kbb=I4A7y5t*`Slzd2gbQrnc#oQWS66vK0nLD=MAs(s@UvdCi-M)a=w& zd_TMKzGNCy9F9gH26}WY!D`f`@fDfyAuc{oXvyqVkGYza+M@4kY{{A{Pg(Man9N@B zmMNS5f1T9-KMWndMe2WIx9>IeVKt?Of%mygod`dGf1!L(d8g8clY&xZ7W*Z<0KJOk z^^GiUALsu#bpCUo^RG&sfA$7i>z}yNe*u*K_`p4>t{tDQ6 zTNm*^SNku7+P_@DE?}=YoBYM~{`05cX>m?Dm%ZwkI?Tc9U=bAm;klarX0umJvM0^| z5@`NoWkr9}*~_+55}}UARsZv#`Y-EcD*L33hwJ_qL-!x+Mf#h}UP{yFn}iJJLit}U z<}4H0CoC4O{l5&_|3KuTzX|L`*O+co|1Z+OC)NMi$6b6G^#8Y${{I%z|KB{O|8MWQ ze#gJZ^#7>_d_D>VTCPCO6)3s_QCFbr3Zz|ux+@TP1sbnF<`pQt0igdzyc9ipaTn}V1XJe5QGJqus{|TD8mAASfCFJBw~R|ym&F?U!WBWN)~l?ZIj+mYW)Imod85 z*Ws@V_=^H{_09gGk}O;$MazpyV&PNCriPNDuGY?`##Vnrb6aa;QBm2|@o9R_wr$F_ zgAVaLL3<{Qq|*rNGiM=LMxjz^2y zJDOVRIt~==_8(Zzvx`*9R-&St_H_Aq)mudzQNX@Nb|p3t?r;luJpjDob*!MyKjI>(?u(DUQ#<%7^V+bVRPs{24fSF7zFu z`Hb5$eL_xno41;=w+~m{*hm}p%(%29UG-y2awF~kjoJTPa(6fO;8+d(vDScw(@<&u z(@yq3?b@fbd$e=V0obA~RR2T$4$k`?!r5Q1>Qk5EWZ;MJ3-Xw9of1}j$}(60{5$;a zz5;EU8(7S$fcXHOW7~hW$@w4Q_TNSAe-8am?0*hft>5u$ zAIXOnvdE4;9D58|1nW9 zE~q3@66yf1r44 z+OTA??=e1^G5en}`=2rUA2M7Tv;P^h|8Z;&urd1|VU99p|HF*{$LxQ`?0=jc#GlBW tu-cJ^IAiudBk=4SN@5`qgC%>nQ(M6&p}LTo)&hS0cVhqZ{{dA1;HUrq diff --git a/CondCore/TagCollection/data/IDEAL_30X.conf b/CondCore/TagCollection/data/IDEAL_30X.conf deleted file mode 100644 index d7c3efd2ddffc..0000000000000 --- a/CondCore/TagCollection/data/IDEAL_30X.conf +++ /dev/null @@ -1,307 +0,0 @@ -[COMMON] -connect=sqlite_file:GlobalTag.db -#connect=oracle://cms_orcon_prod/CMS_COND_31X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - TrackerIdealGeometry210_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=TrackerAlignmentRcd}; - TrackerIdealGeometryErrors210_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTIdealGeometry200_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=DTAlignmentRcd}; - DTIdealGeometryErrors200_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCIdealGeometry310me42_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCIdealGeometryErrors310me42_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=GlobalPositionRcd}; - SiPixelGainCalibration_31X_ideal_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - SiPixelGainCalibrationHLT_31X_ideal_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTRcd}; - SiPixelGainCalibrationSim_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineSimRcd}; - SiPixelGainCalibrationSim_hlt_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTSimRcd}; - SiPixelLorentzAngle_v02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiPixelLorentzAngleSim_v02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleSimRcd}; - SiPixelQuality_v03_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelQuality,recordname=SiPixelQualityRcd}; - SiPixelCPEGenericErrorParm{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelCPEGenericErrorParm,recordname=SiPixelCPEGenericErrorParmRcd}; - SiPixelTemplateDBObject_v7{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelTemplateDBObject,recordname=SiPixelTemplateDBObjectRcd}; - SiStripApvGain_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripApvGain_IdealSim_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainSimRcd}; - SiStripNoises_Ideal_DecMode_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripLorentzAngle_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripLorentzAngle_IdealSim_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleSimRcd}; - SiStripThreshold_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripThresholdRcd}; - SiStripClusterThreshold_Standard_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripClusterThresholdRcd}; - SiStripPedestals_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripBadComponents_realisticMC_31X_v1{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - SiStripBadFiber_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadFiberRcd}; - SiStripBadModule_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadModuleRcd}; - SiStripDetVOff_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripDetVOff,recordname=SiStripDetVOffRcd}; - SiStripDeDxMip_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxMip_3D_Rcd}; - SiStripDeDxElectron_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxElectron_3D_Rcd}; - SiStripDeDxProton_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxProton_3D_Rcd}; - SiStripDeDxKaon_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxKaon_3D_Rcd}; - SiStripDeDxPion_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxPion_3D_Rcd}; - SiStripDeDxMip_30X_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=PhysicsTools::Calibration::HistogramD2D,recordname=SiStripDeDxMipRcd}; - t0Fake_20X_Sept15_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTT0,recordname=DTT0Rcd}; - DT_tTrig_IDEAL_V01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTTtrig,recordname=DTTtrigRcd}; - DT_dead_IDEAL_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - DT_noise_IDEAL_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - vDrift_CSA08_S156_V2fix_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTMtime,recordname=DTMtimeRcd}; - CSCDBGains_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_ME42_March2009_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCDDUMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - CSCBadChambers_none_FiveLiveME42PLUS_v2{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadChambers,recordname=CSCBadChambersRcd}; - CSCBadStrips_mc{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadStrips,recordname=CSCBadStripsRcd}; - CSCBadWires_mc{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadWires,recordname=CSCBadWiresRcd}; - CSCL1TPParameters{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCL1TPParameters,recordname=CSCL1TPParametersRcd}; - HcalPedestals_ADC_v7.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - HcalPedestalWidths_ADC_v7.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - HcalElectronicsMap_v8.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - HcalGains_v4.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - HcalQIEData_NormalMode_v7.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - HcalRespCorrs_v1.02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - HcalChannelQuality_v1.06_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalChannelQuality,recordname=HcalChannelQualityRcd}; - HcalL1TriggerObjects_v1.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalL1TriggerObjects,recordname=HcalL1TriggerObjectsRcd}; - HcalPFCorrs_v2.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPFCorrs,recordname=HcalPFCorrsRcd}; - HcalTimeCorrs_v1.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalTimeCorrs,recordname=HcalTimeCorrsRcd}; - HcalZSThresholds_v1.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalZSThresholds,recordname=HcalZSThresholdsRcd}; - HcalLUTCorrs_v1.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalLUTCorrs,recordname=HcalLUTCorrsRcd}; - EcalPedestals_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_n_avg1_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstantsMC_avg1_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsMCRcd}; - EcalIntercalibConstants_avg1_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - EcalMappingElectronics_EEMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalMappingElectronics,recordname=EcalMappingElectronicsRcd}; - EcalTimeCalibConstants_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalTimeCalibConstantsRcd}; - EcalClusterCrackCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterCrackCorrParametersRcd}; - EcalClusterEnergyCorrectionParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyCorrectionParametersRcd}; - EcalClusterEnergyUncertaintyParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyUncertaintyParametersRcd}; - EcalClusterLocalContCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterLocalContCorrParametersRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_2_0_0_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - TauNeuralClassifier{pfn=frontier://FrontierProd/CMS_COND_31X_BTAU,objectname=MVAComputerContainer,recordname=TauTagMVAComputerRcd}; - Early10TeVCollision_3p8cm_v3_mc_IDEAL{pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - RPCStripNoises_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=RPCStripNoises,recordname=RPCStripNoisesRcd}; - SiPixelFedCablingMap_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - DT_map_compact10ddu31X_V01{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CaloEcalScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEcalScale,recordname=L1CaloEcalScaleRcd}; - L1CaloGeometry_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloGeometry,recordname=L1CaloGeometryRecord}; - L1CaloHcalScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloHcalScale,recordname=L1CaloHcalScaleRcd}; - L1EmEtScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctChannelMask_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctChannelMask,recordname=L1GctChannelMaskRcd}; - L1GctJetFinderParams_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtPrescaleFactorsAlgoTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsAlgoTrigRcd}; - L1GtPrescaleFactorsTechTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsTechTrigRcd}; - L1GtPsbSetup_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPsbSetup,recordname=L1GtPsbSetupRcd}; - L1GtStableParameters_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1GtTriggerMaskAlgoTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskAlgoTrigRcd}; - L1GtTriggerMaskTechTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskTechTrigRcd}; - L1GtTriggerMaskVetoAlgoTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoAlgoTrigRcd}; - L1GtTriggerMaskVetoTechTrig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoTechTrigRcd}; - L1GtTriggerMenu_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMenu,recordname=L1GtTriggerMenuRcd}; - L1HfRingEtScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HfRingEtScaleRcd}; - L1HtMissScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HtMissScaleRcd}; - L1JetEtScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuCSCPtLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCPtLut,recordname=L1MuCSCPtLutRcd}; - L1MuCSCTFAlignment_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFAlignment,recordname=L1MuCSCTFAlignmentRcd}; - L1MuCSCTFConfiguration_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFConfiguration,recordname=L1MuCSCTFConfigurationRcd}; - L1MuDTEtaPatternLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuDTTFMasks_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFMasks,recordname=L1MuDTTFMasksRcd}; - L1MuDTTFParameters_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFParameters,recordname=L1MuDTTFParametersRcd}; - L1MuGMTChannelMask_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTChannelMask,recordname=L1MuGMTChannelMaskRcd}; - L1MuGMTParameters_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1MuGMTScales_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTScales,recordname=L1MuGMTScalesRcd}; - L1MuTriggerPtScale_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerPtScale,recordname=L1MuTriggerPtScaleRcd}; - L1MuTriggerScales_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerScales,recordname=L1MuTriggerScalesRcd}; - L1RCTChannelMask_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTChannelMask,recordname=L1RCTChannelMaskRcd}; - L1RCTParameters_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1RPCConeDefinition_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConeDefinition,recordname=L1RPCConeDefinitionRcd}; - L1RPCConfig_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConfig,recordname=L1RPCConfigRcd}; - L1TriggerKey_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd}; - L1TriggerKeyList_IDEAL_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - XMLFILE_Geometry_310_Final{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=GeometryFile,recordname=GeometryFileRcd}; - TKRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PGeometricDet,recordname=IdealGeometryRecord}; - EBRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalBarrelRcd}; - EERECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalEndcapRcd}; - EPRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalPreshowerRcd}; - HCALRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PHcalRcd}; - CTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCaloTowerRcd}; - CSCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=CSCRecoGeometryRcd}; - CSCRECODIGI_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=CSCRecoDigiParameters,recordname=CSCRecoDigiParametersRcd}; - DTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=DTRecoGeometryRcd}; - RPCRECO_Geometry_310_FixRot{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=RPCRecoGeometryRcd}; - ZDCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PZdcRcd}; - CASTORRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCastorRcd}; - AlCaRecoHLTpaths8e29_1e31_v5{pfn=frontier://FrontierProd/CMS_COND_31X_HLT,objectname=AlCaRecoTriggerBits,recordname=AlCaRecoTriggerBitsRcd}; - L1RPCHwConfig_IDEAL{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=L1RPCHwConfig,recordname=L1RPCHwConfigRcd}; - lumi83037_v1_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::LuminosityInfo,recordname=LuminosityInfoRcd}; - hltscaler83037_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::HLTScaler,recordname=HLTScalerRcd} - -[TAGTREE MC_31X_V1] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=TrackerIdealGeometry210_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - TrackerGeometryErrors{parent=Calibration,tagname=TrackerIdealGeometryErrors210_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTGeometry{parent=Calibration,tagname=DTIdealGeometry200_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTGeometryErrors{parent=Calibration,tagname=DTIdealGeometryErrors200_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGeometry{parent=Calibration,tagname=CSCIdealGeometry310me42_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCIdealGeometryErrors310me42_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGain{parent=Calibration,tagname=SiPixelGainCalibration_31X_ideal_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainHLT{parent=Calibration,tagname=SiPixelGainCalibrationHLT_31X_ideal_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainSim{parent=Calibration,tagname=SiPixelGainCalibrationSim_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelGainHLTSim{parent=Calibration,tagname=SiPixelGainCalibrationSim_hlt_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelLangle{parent=Calibration,tagname=SiPixelLorentzAngle_v02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelLangleSim{parent=Calibration,tagname=SiPixelLorentzAngleSim_v02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelQuality{parent=Calibration,tagname=SiPixelQuality_v03_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelCPE{parent=Calibration,tagname=SiPixelCPEGenericErrorParm,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelTemplate{parent=Calibration,tagname=SiPixelTemplateDBObject_v7,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripApvGain_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripGainsSim{parent=Calibration,tagname=SiStripApvGain_IdealSim_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripNoise{parent=Calibration,tagname=SiStripNoises_Ideal_DecMode_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripLangleSim{parent=Calibration,tagname=SiStripLorentzAngle_IdealSim_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripThresh{parent=Calibration,tagname=SiStripThreshold_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripClusThresh{parent=Calibration,tagname=SiStripClusterThreshold_Standard_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadChan{parent=Calibration,tagname=SiStripBadComponents_realisticMC_31X_v1,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadFiber{parent=Calibration,tagname=SiStripBadFiber_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadModule{parent=Calibration,tagname=SiStripBadModule_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDetV{parent=Calibration,tagname=SiStripDetVOff_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDeDxMip{parent=Calibration,tagname=SiStripDeDxMip_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxElectron{parent=Calibration,tagname=SiStripDeDxElectron_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxProton{parent=Calibration,tagname=SiStripDeDxProton_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxKaon{parent=Calibration,tagname=SiStripDeDxKaon_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxPion{parent=Calibration,tagname=SiStripDeDxPion_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDx{parent=Calibration,tagname=SiStripDeDxMip_30X_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTT0{parent=Calibration,tagname=t0Fake_20X_Sept15_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTTrig{parent=Calibration,tagname=DT_tTrig_IDEAL_V01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTDeadFlag{parent=Calibration,tagname=DT_dead_IDEAL_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTStatusFlag{parent=Calibration,tagname=DT_noise_IDEAL_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTvDrift{parent=Calibration,tagname=vDrift_CSA08_S156_V2fix_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGain{parent=Calibration,tagname=CSCDBGains_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_ME42_March2009_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCBadChambers{parent=Calibration,tagname=CSCBadChambers_none_FiveLiveME42PLUS_v2,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCBadStrips{parent=Calibration,tagname=CSCBadStrips_mc,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCBadWires{parent=Calibration,tagname=CSCBadWires_mc,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCL1TPParameters{parent=Calibration,tagname=CSCL1TPParameters,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - HCALPedestals{parent=Calibration,tagname=HcalPedestals_ADC_v7.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=HcalPedestalWidths_ADC_v7.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALEmap{parent=Calibration,tagname=HcalElectronicsMap_v8.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALGain{parent=Calibration,tagname=HcalGains_v4.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALQie{parent=Calibration,tagname=HcalQIEData_NormalMode_v7.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=HcalRespCorrs_v1.02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALChannelQuality{parent=Calibration,tagname=HcalChannelQuality_v1.06_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALL1Trigger{parent=Calibration,tagname=HcalL1TriggerObjects_v1.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPFCorrs{parent=Calibration,tagname=HcalPFCorrs_v2.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalTimeCorrs{parent=Calibration,tagname=HcalTimeCorrs_v1.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalZSThresholds{parent=Calibration,tagname=HcalZSThresholds_v1.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalLUTCorrs{parent=Calibration,tagname=HcalLUTCorrs_v1.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_n_avg1_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalibMC{parent=Calibration,tagname=EcalIntercalibConstantsMC_avg1_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_avg1_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALEEMap{parent=Calibration,tagname=EcalMappingElectronics_EEMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTimeCalib{parent=Calibration,tagname=EcalTimeCalibConstants_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusCrackCorr{parent=Calibration,tagname=EcalClusterCrackCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyCorr{parent=Calibration,tagname=EcalClusterEnergyCorrectionParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyUncertainty{parent=Calibration,tagname=EcalClusterEnergyUncertaintyParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusLocalContCorr{parent=Calibration,tagname=EcalClusterLocalContCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_2_0_0_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUNeuralClassifier{parent=Calibration,tagname=TauNeuralClassifier,pfn=frontier://FrontierProd/CMS_COND_31X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=Early10TeVCollision_3p8cm_v3_mc_IDEAL,pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT}; - RPCStripNoise{parent=Calibration,tagname=RPCStripNoises_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - DTROMap{parent=Calibration,tagname=DT_map_compact10ddu31X_V01,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - L1CaloEcalScale{parent=Calibration,tagname=L1CaloEcalScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloGeometry{parent=Calibration,tagname=L1CaloGeometry_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloHcalScale{parent=Calibration,tagname=L1CaloHcalScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctChannelMask{parent=Calibration,tagname=L1GctChannelMask_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsAlgoTrig{parent=Calibration,tagname=L1GtPrescaleFactorsAlgoTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsTechTrig{parent=Calibration,tagname=L1GtPrescaleFactorsTechTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPsbSetup{parent=Calibration,tagname=L1GtPsbSetup_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskAlgoTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskTechTrig{parent=Calibration,tagname=L1GtTriggerMaskTechTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoAlgoTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoTechTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoTechTrig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMenu{parent=Calibration,tagname=L1GtTriggerMenu_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HfRingEtScale{parent=Calibration,tagname=L1HfRingEtScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HtMissScale{parent=Calibration,tagname=L1HtMissScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCPtLut{parent=Calibration,tagname=L1MuCSCPtLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFAlignment{parent=Calibration,tagname=L1MuCSCTFAlignment_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFConfiguration{parent=Calibration,tagname=L1MuCSCTFConfiguration_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFMasks{parent=Calibration,tagname=L1MuDTTFMasks_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFParameters{parent=Calibration,tagname=L1MuDTTFParameters_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTChannelMask{parent=Calibration,tagname=L1MuGMTChannelMask_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTScales{parent=Calibration,tagname=L1MuGMTScales_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerPtScale{parent=Calibration,tagname=L1MuTriggerPtScale_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerScales{parent=Calibration,tagname=L1MuTriggerScales_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTChannelMask{parent=Calibration,tagname=L1RCTChannelMask_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConeDefinition{parent=Calibration,tagname=L1RPCConeDefinition_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConfig{parent=Calibration,tagname=L1RPCConfig_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_IDEAL_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - GeomXMLFILE{parent=Calibration,tagname=XMLFILE_Geometry_310_Final,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomTKRECO{parent=Calibration,tagname=TKRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEBRECO{parent=Calibration,tagname=EBRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEERECO{parent=Calibration,tagname=EERECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEPRECO{parent=Calibration,tagname=EPRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomHCALRECO{parent=Calibration,tagname=HCALRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCTRECO{parent=Calibration,tagname=CTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECO{parent=Calibration,tagname=CSCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECODIGI{parent=Calibration,tagname=CSCRECODIGI_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomDTRECO{parent=Calibration,tagname=DTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomRPCRECO{parent=Calibration,tagname=RPCRECO_Geometry_310_FixRot,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomZDCRECO{parent=Calibration,tagname=ZDCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCASTORRECO{parent=Calibration,tagname=CASTORRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - AlCaRecoTriggerBits{parent=Calibration,tagname=AlCaRecoHLTpaths8e29_1e31_v5,pfn=frontier://FrontierProd/CMS_COND_31X_HLT}; - L1RPCHwConfig{parent=Calibration,tagname=L1RPCHwConfig_IDEAL,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - LumiInfo{parent=Calibration,tagname=lumi83037_v1_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - HLTScaler{parent=Calibration,tagname=hltscaler83037_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO} diff --git a/CondCore/TagCollection/data/STARTUP_30X.conf b/CondCore/TagCollection/data/STARTUP_30X.conf deleted file mode 100644 index 73bea07e1f09a..0000000000000 --- a/CondCore/TagCollection/data/STARTUP_30X.conf +++ /dev/null @@ -1,307 +0,0 @@ -[COMMON] -connect=sqlite_file:GlobalTag.db -#connect=oracle://cms_orcon_prod/CMS_COND_31X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - TrackerCRAFTScenario310_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=TrackerAlignmentRcd}; - TrackerCRAFTScenarioErrors310_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTCRAFTScenario310_v2_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=DTAlignmentRcd}; - DTIdealGeometryErrors200_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCCRAFTScenario310me42_v2_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCIdealGeometryErrors310me42_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=Alignments,recordname=GlobalPositionRcd}; - SiPixelGainCalibration_31X_startup_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - SiPixelGainCalibrationHLT_31X_startup_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTRcd}; - SiPixelGainCalibrationSim_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineSimRcd}; - SiPixelGainCalibrationSim_hlt_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelGainCalibrationForHLT,recordname=SiPixelGainCalibrationForHLTSimRcd}; - SiPixelLorentzAngle_v02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiPixelLorentzAngleSim_v02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleSimRcd}; - SiPixelQuality_v03_mc{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelQuality,recordname=SiPixelQualityRcd}; - SiPixelCPEGenericErrorParm{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelCPEGenericErrorParm,recordname=SiPixelCPEGenericErrorParmRcd}; - SiPixelTemplateDBObject_v7{pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL,objectname=SiPixelTemplateDBObject,recordname=SiPixelTemplateDBObjectRcd}; - SiStripApvGain_StartUp_31X_v3{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripApvGain_IdealSim_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainSimRcd}; - SiStripNoises_Ideal_DecMode_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripLorentzAngle_StartUp_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripLorentzAngle_IdealSim_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleSimRcd}; - SiStripThreshold_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripThresholdRcd}; - SiStripClusterThreshold_Standard_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripThreshold,recordname=SiStripClusterThresholdRcd}; - SiStripPedestals_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripBadComponents_realisticMC_31X_v1{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - SiStripBadFiber_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadFiberRcd}; - SiStripBadModule_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadModuleRcd}; - SiStripDetVOff_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripDetVOff,recordname=SiStripDetVOffRcd}; - SiStripDeDxMip_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxMip_3D_Rcd}; - SiStripDeDxElectron_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxElectron_3D_Rcd}; - SiStripDeDxProton_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxProton_3D_Rcd}; - SiStripDeDxKaon_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxKaon_3D_Rcd}; - SiStripDeDxPion_3D_30X{pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS,objectname=PhysicsTools::Calibration::HistogramD3D,recordname=SiStripDeDxPion_3D_Rcd}; - SiStripDeDxMip_30X_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=PhysicsTools::Calibration::HistogramD2D,recordname=SiStripDeDxMipRcd}; - t0Fake_20X_Sept15_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTT0,recordname=DTT0Rcd}; - DT_tTrig_STARTUP_smearing12ns_mc{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTTtrig,recordname=DTTtrigRcd}; - DT_dead_IDEAL_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - DT_noise_IDEAL_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - vDrift_CSA08_S156_V2fix_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=DTMtime,recordname=DTMtimeRcd}; - CSCDBGains_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_ME42_March2009_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_ME42_offline{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCDDUMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - CSCBadChambers_none_FiveLiveME42PLUS_v2{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadChambers,recordname=CSCBadChambersRcd}; - CSCBadStrips_mc{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadStrips,recordname=CSCBadStripsRcd}; - CSCBadWires_mc{pfn=frontier://FrontierProd/CMS_COND_31X_CSC,objectname=CSCBadWires,recordname=CSCBadWiresRcd}; - CSCL1TPParameters{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCL1TPParameters,recordname=CSCL1TPParametersRcd}; - HcalPedestals_ADC_v7.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - HcalPedestalWidths_ADC_v7.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - HcalElectronicsMap_v8.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - HcalGains_v4.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - HcalQIEData_NormalMode_v7.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - HcalRespCorrs_v1.02_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - HcalChannelQuality_v1.06_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalChannelQuality,recordname=HcalChannelQualityRcd}; - HcalL1TriggerObjects_v1.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalL1TriggerObjects,recordname=HcalL1TriggerObjectsRcd}; - HcalPFCorrs_v2.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalPFCorrs,recordname=HcalPFCorrsRcd}; - HcalTimeCorrs_v1.00_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalTimeCorrs,recordname=HcalTimeCorrsRcd}; - HcalZSThresholds_v1.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalZSThresholds,recordname=HcalZSThresholdsRcd}; - HcalLUTCorrs_v1.01_mc{pfn=frontier://FrontierProd/CMS_COND_31X_HCAL,objectname=HcalLUTCorrs,recordname=HcalLUTCorrsRcd}; - EcalPedestals_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_n_avg1_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstantsMC_avg1_ideal{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsMCRcd}; - EcalIntercalibConstants_avg1_startup_10percentEE{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - EcalMappingElectronics_EEMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=EcalMappingElectronics,recordname=EcalMappingElectronicsRcd}; - EcalTimeCalibConstants_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalTimeCalibConstantsRcd}; - EcalClusterCrackCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterCrackCorrParametersRcd}; - EcalClusterEnergyCorrectionParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyCorrectionParametersRcd}; - EcalClusterEnergyUncertaintyParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterEnergyUncertaintyParametersRcd}; - EcalClusterLocalContCorrParameters_may2009_mc{pfn=frontier://FrontierProd/CMS_COND_31X_ECAL,objectname=EcalFunParams,recordname=EcalClusterLocalContCorrParametersRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_2_0_0_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - TauNeuralClassifier{pfn=frontier://FrontierProd/CMS_COND_31X_BTAU,objectname=MVAComputerContainer,recordname=TauTagMVAComputerRcd}; - Early10TeVCollision_3p8cm_v3_mc_STARTUP{pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - RPCStripNoises_v1_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=RPCStripNoises,recordname=RPCStripNoisesRcd}; - SiPixelFedCablingMap_mc{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_Ideal_31X_v2{pfn=frontier://FrontierProd/CMS_COND_31X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - DT_map_compact10ddu31X_V01{pfn=frontier://FrontierProd/CMS_COND_31X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CaloEcalScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEcalScale,recordname=L1CaloEcalScaleRcd}; - L1CaloGeometry_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloGeometry,recordname=L1CaloGeometryRecord}; - L1CaloHcalScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloHcalScale,recordname=L1CaloHcalScaleRcd}; - L1EmEtScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctChannelMask_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctChannelMask,recordname=L1GctChannelMaskRcd}; - L1GctJetFinderParams_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtPrescaleFactorsAlgoTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsAlgoTrigRcd}; - L1GtPrescaleFactorsTechTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPrescaleFactors,recordname=L1GtPrescaleFactorsTechTrigRcd}; - L1GtPsbSetup_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtPsbSetup,recordname=L1GtPsbSetupRcd}; - L1GtStableParameters_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1GtTriggerMaskAlgoTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskAlgoTrigRcd}; - L1GtTriggerMaskTechTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskTechTrigRcd}; - L1GtTriggerMaskVetoAlgoTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoAlgoTrigRcd}; - L1GtTriggerMaskVetoTechTrig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMask,recordname=L1GtTriggerMaskVetoTechTrigRcd}; - L1GtTriggerMenu_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1GtTriggerMenu,recordname=L1GtTriggerMenuRcd}; - L1HfRingEtScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HfRingEtScaleRcd}; - L1HtMissScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1HtMissScaleRcd}; - L1JetEtScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuCSCPtLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCPtLut,recordname=L1MuCSCPtLutRcd}; - L1MuCSCTFAlignment_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFAlignment,recordname=L1MuCSCTFAlignmentRcd}; - L1MuCSCTFConfiguration_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuCSCTFConfiguration,recordname=L1MuCSCTFConfigurationRcd}; - L1MuDTEtaPatternLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuDTTFMasks_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFMasks,recordname=L1MuDTTFMasksRcd}; - L1MuDTTFParameters_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuDTTFParameters,recordname=L1MuDTTFParametersRcd}; - L1MuGMTChannelMask_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTChannelMask,recordname=L1MuGMTChannelMaskRcd}; - L1MuGMTParameters_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1MuGMTScales_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuGMTScales,recordname=L1MuGMTScalesRcd}; - L1MuTriggerPtScale_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerPtScale,recordname=L1MuTriggerPtScaleRcd}; - L1MuTriggerScales_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1MuTriggerScales,recordname=L1MuTriggerScalesRcd}; - L1RCTChannelMask_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTChannelMask,recordname=L1RCTChannelMaskRcd}; - L1RCTParameters_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1RPCConeDefinition_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConeDefinition,recordname=L1RPCConeDefinitionRcd}; - L1RPCConfig_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1RPCConfig,recordname=L1RPCConfigRcd}; - L1TriggerKey_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd}; - L1TriggerKeyList_STARTUP_v3{pfn=frontier://FrontierProd/CMS_COND_31X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - XMLFILE_Geometry_310_Final{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=GeometryFile,recordname=GeometryFileRcd}; - TKRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PGeometricDet,recordname=IdealGeometryRecord}; - EBRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalBarrelRcd}; - EERECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalEndcapRcd}; - EPRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PEcalPreshowerRcd}; - HCALRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PHcalRcd}; - CTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCaloTowerRcd}; - CSCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=CSCRecoGeometryRcd}; - CSCRECODIGI_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=CSCRecoDigiParameters,recordname=CSCRecoDigiParametersRcd}; - DTRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=DTRecoGeometryRcd}; - RPCRECO_Geometry_310_FixRot{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=RecoIdealGeometry,recordname=RPCRecoGeometryRcd}; - ZDCRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PZdcRcd}; - CASTORRECO_Geometry_31X{pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY,objectname=PCaloGeometry,recordname=PCastorRcd}; - AlCaRecoHLTpaths8e29_1e31_v5{pfn=frontier://FrontierProd/CMS_COND_31X_HLT,objectname=AlCaRecoTriggerBits,recordname=AlCaRecoTriggerBitsRcd}; - L1RPCHwConfig_STARTUP{pfn=frontier://FrontierProd/CMS_COND_31X_RPC,objectname=L1RPCHwConfig,recordname=L1RPCHwConfigRcd}; - lumi83037_v1_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::LuminosityInfo,recordname=LuminosityInfoRcd}; - hltscaler83037_iovFrom1{pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO,objectname=lumi::HLTScaler,recordname=HLTScalerRcd} - -[TAGTREE STARTUP_31X_V1] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=TrackerCRAFTScenario310_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - TrackerGeometryErrors{parent=Calibration,tagname=TrackerCRAFTScenarioErrors310_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - DTGeometry{parent=Calibration,tagname=DTCRAFTScenario310_v2_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - DTGeometryErrors{parent=Calibration,tagname=DTIdealGeometryErrors200_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGeometry{parent=Calibration,tagname=CSCCRAFTScenario310me42_v2_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCIdealGeometryErrors310me42_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGain{parent=Calibration,tagname=SiPixelGainCalibration_31X_startup_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainHLT{parent=Calibration,tagname=SiPixelGainCalibrationHLT_31X_startup_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - PixelGainSim{parent=Calibration,tagname=SiPixelGainCalibrationSim_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelGainHLTSim{parent=Calibration,tagname=SiPixelGainCalibrationSim_hlt_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelLangle{parent=Calibration,tagname=SiPixelLorentzAngle_v02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - PixelLangleSim{parent=Calibration,tagname=SiPixelLorentzAngleSim_v02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelQuality{parent=Calibration,tagname=SiPixelQuality_v03_mc,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiPixelCPE{parent=Calibration,tagname=SiPixelCPEGenericErrorParm,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelTemplate{parent=Calibration,tagname=SiPixelTemplateDBObject_v7,pfn=frontier://FrontierProd/CMS_COND_31X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripApvGain_StartUp_31X_v3,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripGainsSim{parent=Calibration,tagname=SiStripApvGain_IdealSim_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripNoise{parent=Calibration,tagname=SiStripNoises_Ideal_DecMode_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_StartUp_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripLangleSim{parent=Calibration,tagname=SiStripLorentzAngle_IdealSim_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripThresh{parent=Calibration,tagname=SiStripThreshold_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripClusThresh{parent=Calibration,tagname=SiStripClusterThreshold_Standard_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadChan{parent=Calibration,tagname=SiStripBadComponents_realisticMC_31X_v1,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadFiber{parent=Calibration,tagname=SiStripBadFiber_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripBadModule{parent=Calibration,tagname=SiStripBadModule_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDetV{parent=Calibration,tagname=SiStripDetVOff_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - SiStripDeDxMip{parent=Calibration,tagname=SiStripDeDxMip_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxElectron{parent=Calibration,tagname=SiStripDeDxElectron_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxProton{parent=Calibration,tagname=SiStripDeDxProton_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxKaon{parent=Calibration,tagname=SiStripDeDxKaon_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDxPion{parent=Calibration,tagname=SiStripDeDxPion_3D_30X,pfn=frontier://FrontierProd/CMS_COND_31X_PHYSICSTOOLS}; - SiStripDeDx{parent=Calibration,tagname=SiStripDeDxMip_30X_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTT0{parent=Calibration,tagname=t0Fake_20X_Sept15_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTTrig{parent=Calibration,tagname=DT_tTrig_STARTUP_smearing12ns_mc,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - DTDeadFlag{parent=Calibration,tagname=DT_dead_IDEAL_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTStatusFlag{parent=Calibration,tagname=DT_noise_IDEAL_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - DTvDrift{parent=Calibration,tagname=vDrift_CSA08_S156_V2fix_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCGain{parent=Calibration,tagname=CSCDBGains_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_ME42_March2009_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_ME42_offline,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCBadChambers{parent=Calibration,tagname=CSCBadChambers_none_FiveLiveME42PLUS_v2,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCBadStrips{parent=Calibration,tagname=CSCBadStrips_mc,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCBadWires{parent=Calibration,tagname=CSCBadWires_mc,pfn=frontier://FrontierProd/CMS_COND_31X_CSC}; - CSCL1TPParameters{parent=Calibration,tagname=CSCL1TPParameters,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - HCALPedestals{parent=Calibration,tagname=HcalPedestals_ADC_v7.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=HcalPedestalWidths_ADC_v7.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALEmap{parent=Calibration,tagname=HcalElectronicsMap_v8.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALGain{parent=Calibration,tagname=HcalGains_v4.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALQie{parent=Calibration,tagname=HcalQIEData_NormalMode_v7.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=HcalRespCorrs_v1.02_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALChannelQuality{parent=Calibration,tagname=HcalChannelQuality_v1.06_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALL1Trigger{parent=Calibration,tagname=HcalL1TriggerObjects_v1.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HCALPFCorrs{parent=Calibration,tagname=HcalPFCorrs_v2.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalTimeCorrs{parent=Calibration,tagname=HcalTimeCorrs_v1.00_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalZSThresholds{parent=Calibration,tagname=HcalZSThresholds_v1.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - HcalLUTCorrs{parent=Calibration,tagname=HcalLUTCorrs_v1.01_mc,pfn=frontier://FrontierProd/CMS_COND_31X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_n_avg1_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALInterCalibMC{parent=Calibration,tagname=EcalIntercalibConstantsMC_avg1_ideal,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_avg1_startup_10percentEE,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALEEMap{parent=Calibration,tagname=EcalMappingElectronics_EEMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - ECALTimeCalib{parent=Calibration,tagname=EcalTimeCalibConstants_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusCrackCorr{parent=Calibration,tagname=EcalClusterCrackCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyCorr{parent=Calibration,tagname=EcalClusterEnergyCorrectionParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusEnergyUncertainty{parent=Calibration,tagname=EcalClusterEnergyUncertaintyParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - ECALClusLocalContCorr{parent=Calibration,tagname=EcalClusterLocalContCorrParameters_may2009_mc,pfn=frontier://FrontierProd/CMS_COND_31X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_2_0_0_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - BTAUNeuralClassifier{parent=Calibration,tagname=TauNeuralClassifier,pfn=frontier://FrontierProd/CMS_COND_31X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=Early10TeVCollision_3p8cm_v3_mc_STARTUP,pfn=frontier://FrontierProd/CMS_COND_31X_BEAMSPOT}; - RPCStripNoise{parent=Calibration,tagname=RPCStripNoises_v1_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_mc,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_Ideal_31X_v2,pfn=frontier://FrontierProd/CMS_COND_31X_STRIP}; - DTROMap{parent=Calibration,tagname=DT_map_compact10ddu31X_V01,pfn=frontier://FrontierProd/CMS_COND_31X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://FrontierProd/CMS_COND_31X_FROM21X}; - L1CaloEcalScale{parent=Calibration,tagname=L1CaloEcalScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloGeometry{parent=Calibration,tagname=L1CaloGeometry_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1CaloHcalScale{parent=Calibration,tagname=L1CaloHcalScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctChannelMask{parent=Calibration,tagname=L1GctChannelMask_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsAlgoTrig{parent=Calibration,tagname=L1GtPrescaleFactorsAlgoTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPrescaleFactorsTechTrig{parent=Calibration,tagname=L1GtPrescaleFactorsTechTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtPsbSetup{parent=Calibration,tagname=L1GtPsbSetup_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskAlgoTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskTechTrig{parent=Calibration,tagname=L1GtTriggerMaskTechTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoAlgoTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoAlgoTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMaskVetoTechTrig{parent=Calibration,tagname=L1GtTriggerMaskVetoTechTrig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1GtTriggerMenu{parent=Calibration,tagname=L1GtTriggerMenu_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HfRingEtScale{parent=Calibration,tagname=L1HfRingEtScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1HtMissScale{parent=Calibration,tagname=L1HtMissScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCPtLut{parent=Calibration,tagname=L1MuCSCPtLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFAlignment{parent=Calibration,tagname=L1MuCSCTFAlignment_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuCSCTFConfiguration{parent=Calibration,tagname=L1MuCSCTFConfiguration_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFMasks{parent=Calibration,tagname=L1MuDTTFMasks_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuDTTFParameters{parent=Calibration,tagname=L1MuDTTFParameters_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTChannelMask{parent=Calibration,tagname=L1MuGMTChannelMask_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuGMTScales{parent=Calibration,tagname=L1MuGMTScales_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerPtScale{parent=Calibration,tagname=L1MuTriggerPtScale_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1MuTriggerScales{parent=Calibration,tagname=L1MuTriggerScales_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTChannelMask{parent=Calibration,tagname=L1RCTChannelMask_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConeDefinition{parent=Calibration,tagname=L1RPCConeDefinition_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1RPCConfig{parent=Calibration,tagname=L1RPCConfig_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_STARTUP_v3,pfn=frontier://FrontierProd/CMS_COND_31X_L1T}; - GeomXMLFILE{parent=Calibration,tagname=XMLFILE_Geometry_310_Final,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomTKRECO{parent=Calibration,tagname=TKRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEBRECO{parent=Calibration,tagname=EBRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEERECO{parent=Calibration,tagname=EERECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomEPRECO{parent=Calibration,tagname=EPRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomHCALRECO{parent=Calibration,tagname=HCALRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCTRECO{parent=Calibration,tagname=CTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECO{parent=Calibration,tagname=CSCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCSCRECODIGI{parent=Calibration,tagname=CSCRECODIGI_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomDTRECO{parent=Calibration,tagname=DTRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomRPCRECO{parent=Calibration,tagname=RPCRECO_Geometry_310_FixRot,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomZDCRECO{parent=Calibration,tagname=ZDCRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - GeomCASTORRECO{parent=Calibration,tagname=CASTORRECO_Geometry_31X,pfn=frontier://FrontierProd/CMS_COND_31X_GEOMETRY}; - AlCaRecoTriggerBits{parent=Calibration,tagname=AlCaRecoHLTpaths8e29_1e31_v5,pfn=frontier://FrontierProd/CMS_COND_31X_HLT}; - L1RPCHwConfig{parent=Calibration,tagname=L1RPCHwConfig_STARTUP,pfn=frontier://FrontierProd/CMS_COND_31X_RPC}; - LumiInfo{parent=Calibration,tagname=lumi83037_v1_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO}; - HLTScaler{parent=Calibration,tagname=hltscaler83037_iovFrom1,pfn=frontier://FrontierProd/CMS_COND_31X_RUN_INFO} diff --git a/CondCore/TagCollection/doc/TagCollection.doc b/CondCore/TagCollection/doc/TagCollection.doc deleted file mode 100644 index 6db0692ec1555..0000000000000 --- a/CondCore/TagCollection/doc/TagCollection.doc +++ /dev/null @@ -1,39 +0,0 @@ - -/*! - -\page CondCore_TagCollection Package CondCore/TagCollection - -
- - - -Source code (CVS tag: @CVS_TAG@) - -Administrative privileges - -
- -\section desc Description - -Package to manage high level super tags - -\subsection interface Public interface - - - -\subsection modules Modules - - - -\subsection tests Unit tests and examples - -Unknown - -\section status Status and planned development - -testing - -
-Last updated: -@DATE@ Author: Z.Xie -*/ - diff --git a/CondCore/TagCollection/interface/Exception.h b/CondCore/TagCollection/interface/Exception.h deleted file mode 100644 index e73a3a81ad42f..0000000000000 --- a/CondCore/TagCollection/interface/Exception.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef CondCore_TagCollection_Exception_h -#define CondCore_TagCollection_Exception_h -#include "CondCore/DBCommon/interface/Exception.h" -#include -namespace cond{ - class nonExistentGlobalTagInventoryException : public Exception{ - public: - nonExistentGlobalTagInventoryException( const std::string& source ) : Exception( source+std::string(": global tag inventory does not exist") ){ - } - virtual ~nonExistentGlobalTagInventoryException() throw(){ - } - }; - - class nonExistentGlobalTagException : public Exception{ - public: - nonExistentGlobalTagException( const std::string& source , const std::string& globaltagName ) : Exception( source+std::string(": global tag: "+globaltagName+" does not exist") ){ - } - virtual ~nonExistentGlobalTagException() throw(){ - } - }; -} -#endif diff --git a/CondCore/TagCollection/interface/PfnEditor.h b/CondCore/TagCollection/interface/PfnEditor.h deleted file mode 100644 index 39cc2d64ad03a..0000000000000 --- a/CondCore/TagCollection/interface/PfnEditor.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef CondCore_TagCollection_PfnEditor -#define CondCore_TagCollection_PfnEditor - - -#include - -namespace cond{ - - // edit the pfn accordind to rules given in its constructor - class PfnEditor { - public: - PfnEditor(); - PfnEditor(std::string const & ipre, - std::string const & ipos); - - std::string operator()(std::string const & pfn) const; - - private: - std::string prefix; - std::string postfix; - bool off; - }; - - -} -#endif // CondCore_TagCollection_PfnEditor - diff --git a/CondCore/TagCollection/interface/TagCollectionRetriever.h b/CondCore/TagCollection/interface/TagCollectionRetriever.h deleted file mode 100644 index 5b35d9b498d91..0000000000000 --- a/CondCore/TagCollection/interface/TagCollectionRetriever.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef CondCore_TagCollection_TagCollectionRetriever_h -#define CondCore_TagCollection_TagCollectionRetriever_h -// -// Package: CondCore/TagCollection -// Class: TagCollectionRetriever -// -/**\class TagCollectionRetriever TagCollectionRetriever.h CondCore/TagCollection/interface/TagCollectionRetriever.h - Description: utility class to retrieve tag collection from db with given tag tree and node -*/ -// -// Author: Zhen Xie -// - -#include -#include -#include "CondCore/DBCommon/interface/TagMetadata.h" -#include "CondCore/TagCollection/interface/PfnEditor.h" -#include "CondCore/DBCommon/interface/DbSession.h" -namespace cond{ - class TagCollectionRetriever{ - public: - /// constructor - explicit TagCollectionRetriever( cond::DbSession& coraldb ); - TagCollectionRetriever( cond::DbSession& coraldb, - std::string const & prefix, - std::string const & postfix); - /// destructor - ~TagCollectionRetriever(); - - bool existsTagDatabase(); - - bool existsTagCollection( const std::string& globaltag ); - - bool selectTagCollection( const std::string& globaltag, - std::set& result); - /** - given global tag return the basic tag collection. The global tag has the format TreeName::NodeName - */ - void getTagCollection( const std::string& globaltag, - std::set& result); - private: - /// parse global tag string returns result in pair - std::pair parseglobaltag(const std::string& globaltag); - cond::DbSession m_coraldb; - PfnEditor pfnEditor; - - }; -}//ns cond -#endif diff --git a/CondCore/TagCollection/interface/TagDBNames.h b/CondCore/TagCollection/interface/TagDBNames.h deleted file mode 100644 index a30669e76d3ce..0000000000000 --- a/CondCore/TagCollection/interface/TagDBNames.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef COND_TAGDBNAMES_H -#define COND_TAGDBNAMES_H -#include -namespace cond{ - extern const std::string tagTreeTablePrefix; - extern const std::string tagInventoryTable; -} -#endif diff --git a/CondCore/TagCollection/python/CommonUtils.py b/CondCore/TagCollection/python/CommonUtils.py deleted file mode 100644 index cb7ee23357fb5..0000000000000 --- a/CondCore/TagCollection/python/CommonUtils.py +++ /dev/null @@ -1,112 +0,0 @@ - -def inventoryTableName(): - return 'TAGINVENTORY_TABLE' -def inventoryIDTableName(): - return 'TAGINVENTORY_IDS' -def treeTableName(treename): - return 'TAGTREE_TABLE_'+str.upper(treename) -def treeIDTableName(treename): - return 'TAGTREE_'+str.upper(treename)+'_IDS' -def commentTableName(): - return 'ENTRYCOMMENT_TABLE' - -import coral -def dropAllTreeTables(dbsession): - """drop all tagtree related tables - """ - try: - dbsession.transaction().start(False) - tablelist = dbsession.nominalSchema().listTables() - for tname in tablelist: - if tname.find('TAGTREE_') != -1: - dbsession.nominalSchema().dropTable(tname) - dbsession.transaction().commit() - except Exception as e: - raise Exception(str(e)) - -def tagInTrees(dbsession,tagname,pfn=''): - """returns the tree names which contain the given tag - select tagid from taginventory_table where tagname=tagname - select count(*) from tablename where tablename.tagid=tagid - """ - try: - dbsession.transaction().start(True) - invquery = dbsession.nominalSchema().tableHandle(inventoryTableName()).newQuery() - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('tagname','string') - conditionbindDict['tagname'].setData(tagname) - condition='tagname = :tagname' - if len(pfn) !=0 : - condition+=' AND pfn = :pfn' - conditionbindDict.extend('pfn','string') - conditionbindDict['pfn'].setData(pfn) - invquery.setCondition(condition,conditionbindDict) - invquery.addToOutputList('tagid') - invquery.addToOutputList('pfn') - cursor = invquery.execute() - tagidmap={} - while ( next(cursor) ): - tagid=cursor.currentRow()['tagid'].data() - pfn=cursor.currentRow()['pfn'].data() - tagidmap[pfn]=tagid - cursor.close() - dbsession.transaction().commit() - del invquery - if len(tagidmap)==0: - return tagidmap - - result={} - treetablelist=[] - dbsession.transaction().start(True) - tablelist = dbsession.nominalSchema().listTables() - for t in tablelist: - if t.find('TAGTREE_TABLE_')!= -1: - treetablelist.append(t) - for (pfn,tagid) in tagidmap.items(): - result[pfn]=[] - condition='tagid = :tagid' - for t in treetablelist: - conditionBind=coral.AttributeList() - conditionBind.extend('tagid','unsigned long') - conditionBind['tagid'].setData(tagid) - q=dbsession.nominalSchema().tableHandle(t).newQuery() - q.addToOutputList('count(*)','count') - myresult=coral.AttributeList() - myresult.extend('count','unsigned long') - q.defineOutput(myresult) - q.setCondition(condition,conditionBind) - cr=q.execute() - while (next(cr)): - if cr.currentRow()['count'].data()!=0: - result[pfn].append(t[len('TAGTREE_TABLE_'):]) - cr.close() - del q - dbsession.transaction().commit() - return result - except Exception as e: - raise Exception(str(e)) - -if __name__ == "__main__": - #context = coral.Context() - #context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:testInventory.db', - accessMode = coral.access_Update ) - try: - print 'TEST 1' - intrees=tagInTrees(session,'Tracker_Geometry_CRUZET3') - print intrees - print 'TEST 2' - hello=tagInTrees(session,'Tracker_Geometry_CRUZ3') - print hello - print 'TEST 3' - kitty=tagInTrees(session,'Tracker_Geometry_CRUZET3','pfnme') - print kitty - print 'TEST 4' - mikey=tagInTrees(session,'Tracker_Geometry_CRUZET3','frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT') - print mikey - del session - except Exception as e: - print "Failed in unit test" - print str(e) - del session diff --git a/CondCore/TagCollection/python/DBCopy.py b/CondCore/TagCollection/python/DBCopy.py deleted file mode 100644 index c1c1fbaf2f62f..0000000000000 --- a/CondCore/TagCollection/python/DBCopy.py +++ /dev/null @@ -1,302 +0,0 @@ -from __future__ import absolute_import -import coral -from . import CommonUtils, TagTree, tagInventory - -class DBCopy(object): - - def __init__( self, sourcesession, destsession, rowcachesize=1024 ): - self.__sourcesession=sourcesession - self.__destsession=destsession - self.__rowcachesize=rowcachesize - - def resetrowcachesize( self, newrowcachesize): - self.__rowcachesize=newrowcachesize - - def copyInventory( self ): - """copy entire inventory. The original inventory in the source db will be wiped. - """ - inv=tagInventory.tagInventory(self.__destsession) - inv.createInventoryTable() - dest_transaction=self.__destsession.transaction() - source_transaction=self.__sourcesession.transaction() - try: - dest_transaction.start(False) - #copy inventory table - data=coral.AttributeList() - my_editor=self.__destsession.nominalSchema().tableHandle(CommonUtils.inventoryTableName()).dataEditor() - source_transaction.start(True) - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.inventoryTableName()).newQuery() - conditionData=coral.AttributeList() - source_query.setCondition('',conditionData) - source_query.setRowCacheSize(self.__rowcachesize) - my_editor.rowBuffer(data) - source_query.defineOutput(data) - bulkOperation=my_editor.bulkInsert(data,self.__rowcachesize) - cursor=source_query.execute() - while (next(cursor) ): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - - #copy inventory id table - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.inventoryIDTableName()).newQuery() - my_ideditor=self.__destsession.nominalSchema().tableHandle(CommonUtils.inventoryIDTableName()).dataEditor() - iddata=coral.AttributeList() - source_query.setCondition('',conditionData) - source_query.setRowCacheSize(self.__rowcachesize) - my_ideditor.rowBuffer(iddata) - source_query.defineOutput(iddata) - bulkOperation=my_ideditor.bulkInsert(iddata,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - - #copy comment table if exists - if self.__sourcesession.nominalSchema().existsTable(CommonUtils.commentTableName()): - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.commentTableName()).newQuery() - my_commenteditor=self.__destsession.nominalSchema().tableHandle(CommonUtils.commentTableName()).dataEditor() - commentdata=coral.AttributeList() - qcondition=coral.AttributeList() - qcondition.extend('tablename','string') - qcondition['tablename'].setData(CommonUtils.commentTableName()) - source_query.setCondition('tablename = :tablename',qcondition) - source_query.setRowCacheSize(self.__rowcachesize) - my_commenteditor.rowBuffer(commentdata) - source_query.defineOutput(commentdata) - bulkOperation=my_commenteditor.bulkInsert(commentdata,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - - source_transaction.commit() - dest_transaction.commit() - except Exception as e: - source_transaction.rollback() - dest_transaction.rollback() - raise Exception(str(e)) - - def copyTrees( self, treenames ): - """copy tree from an external source. - Merge inventory if existing in the destination - """ - allleafs=[] - for treename in treenames: - t=TagTree.tagTree(self.__sourcesession,treename) - allleafs.append(t.getAllLeaves()) - #create a unique tag list - merged={} - for s in allleafs: - for x in s: - merged[x.tagid]=1 - sourceinv=tagInventory.tagInventory(self.__sourcesession) - sourcetags=sourceinv.getAllEntries() - entries=[] - for i in merged.keys(): - for n in sourcetags: - if n.tagid==i: - entry={} - entry['tagid']=i - entry['tagname']=n.tagname - entry['pfn']=n.pfn - entry['recordname']=n.recordname - entry['objectname']=n.objectname - entry['labelname']=n.labelname - entries.append(entry) - inv=tagInventory.tagInventory(self.__destsession) - tagiddict=inv.bulkInsertEntries(entries) - dest_transaction=self.__destsession.transaction() - source_transaction=self.__sourcesession.transaction() - #copy table contents - try: - for treename in treenames: - desttree=TagTree.tagTree(self.__destsession,treename) - desttree.createTagTreeTable() - dest_transaction.start(False) - source_transaction.start(True) - #copy tree tables - data=coral.AttributeList() - dest_editor=self.__destsession.nominalSchema().tableHandle(CommonUtils.treeTableName(treename)).dataEditor() - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.treeTableName(treename)).newQuery() - conditionData=coral.AttributeList() - source_query.setCondition('',conditionData) - source_query.setRowCacheSize(self.__rowcachesize) - dest_editor.rowBuffer(data) - source_query.defineOutput(data) - bulkOperation=dest_editor.bulkInsert(data,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - #copy id tables - iddata=coral.AttributeList() - dest_editor=self.__destsession.nominalSchema().tableHandle(CommonUtils.treeIDTableName(treename)).dataEditor() - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.treeIDTableName(treename)).newQuery() - conditionData=coral.AttributeList() - source_query.setCondition('',conditionData) - source_query.setRowCacheSize(self.__rowcachesize) - dest_editor.rowBuffer(iddata) - source_query.defineOutput(iddata) - bulkOperation=dest_editor.bulkInsert(iddata,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - #copy comment tables if exist - if self.__sourcesession.nominalSchema().existsTable(CommonUtils.commentTableName()): - data=coral.AttributeList() - dest_editor=self.__destsession.nominalSchema().tableHandle(CommonUtils.commentTableName()).dataEditor() - source_query=self.__sourcesession.nominalSchema().tableHandle(CommonUtils.commentTableName()).newQuery() - conditionData=coral.AttributeList() - source_query.setCondition('tablename = :tablename',conditionData) - conditionData.extend('tablename','string') - conditionData['tablename'].setData(CommonUtils.treeTableName(treename)) - source_query.setRowCacheSize(self.__rowcachesize) - dest_editor.rowBuffer(data) - source_query.defineOutput(data) - bulkOperation=dest_editor.bulkInsert(data,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - - source_transaction.commit() - dest_transaction.commit() - #fix leaf node links - desttree.replaceLeafLinks(tagiddict) - except Exception as e: - source_transaction.rollback() - dest_transaction.rollback() - raise Exception(str(e)) - - - def copyDB( self ): - """copy all globaltag related tables from an external source. - The destination database must be empty. If not so, it will be cleaned implicitly. Inventory are implicitly copied as well. - """ - dest_transaction=self.__destsession.transaction() - source_transaction=self.__sourcesession.transaction() - tablelist=[] - alltablelist=[] - trees=[] - try: - source_transaction.start(True) - tablelist=list(self.__sourcesession.nominalSchema().listTables()) - source_transaction.commit() - except Exception as e: - source_transaction.rollback() - raise Exception(str(e)) - try: - i = tablelist.index(CommonUtils.inventoryTableName()) - alltablelist.append(CommonUtils.inventoryTableName()) - except ValueError: - raise 'Error: '+CommonUtils.inventoryTableName()+' does not exist in the source' - try: - i = tablelist.index(CommonUtils.inventoryIDTableName()) - alltablelist.append(CommonUtils.inventoryIDTableName()) - except ValueError: - raise 'Error: '+CommonUtils.inventoryIDTableName()+' does not exist' - - try: - i = tablelist.index(CommonUtils.commentTableName()) - alltablelist.append(CommonUtils.commentTableName()) - except ValueError: - pass - - for tablename in tablelist: - posbeg=tablename.find('TAGTREE_TABLE_') - if posbeg != -1: - treename=tablename[posbeg+len('TAGTREE_TABLE_'):] - trees.append(treename) - for tree in trees: - try: - tablelist.index(CommonUtils.treeIDTableName(tree)) - except ValueError: - print 'non-existing id table for tree ',tree - continue - alltablelist.append(CommonUtils.treeTableName(tree)) - alltablelist.append(CommonUtils.treeIDTableName(tree)) - #schema preparation - inv=tagInventory.tagInventory(self.__destsession) - inv.createInventoryTable() - for treename in trees: - t=TagTree.tagTree(self.__destsession,treename) - t.createTagTreeTable() - #copy table contents - try: - for mytable in alltablelist: - dest_transaction.start(False) - source_transaction.start(True) - data=coral.AttributeList() - my_editor=self.__destsession.nominalSchema().tableHandle(mytable).dataEditor() - source_query=self.__sourcesession.nominalSchema().tableHandle(mytable).newQuery() - conditionData=coral.AttributeList() - source_query.setCondition('',conditionData) - source_query.setRowCacheSize(self.__rowcachesize) - my_editor.rowBuffer(data) - source_query.defineOutput(data) - bulkOperation=my_editor.bulkInsert(data,self.__rowcachesize) - cursor=source_query.execute() - while next(cursor): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del source_query - source_transaction.commit() - dest_transaction.commit() - except Exception as e: - source_transaction.rollback() - dest_transaction.rollback() - raise Exception(str(e)) - -if __name__ == "__main__": - #context = coral.Context() - #context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - - sourcesession = svc.connect( 'sqlite_file:source.db', - accessMode = coral.access_Update ) - destsession = svc.connect( 'sqlite_file:dest.db', - accessMode = coral.access_Update ) - try: - dbcp=DBCopy(sourcesession,destsession,1024) - print "TEST copyInventory" - dbcp.copyInventory() - print "TEST copytrees" - treenames=['CRUZET3_V2H'] - dbcp.copyTrees(treenames) - del sourcesession - del destsession - except Exception as e: - print "Failed in unit test" - print str(e) - del sourcesession - del destsession - - sourcesession = svc.connect( 'sqlite_file:source.db', - accessMode = coral.access_Update ) - destsession = svc.connect( 'sqlite_file:dest2.db', - accessMode = coral.access_Update ) - try: - dbcp=DBCopy(sourcesession,destsession,1024) - print "TEST full dbCopy" - dbcp.copyDB() - del sourcesession - del destsession - except Exception as e: - print "Failed in unit test" - print str(e) - del sourcesession - del destsession diff --git a/CondCore/TagCollection/python/DBImpl.py b/CondCore/TagCollection/python/DBImpl.py deleted file mode 100644 index 030f47d8494e1..0000000000000 --- a/CondCore/TagCollection/python/DBImpl.py +++ /dev/null @@ -1,84 +0,0 @@ -from __future__ import absolute_import -import coral -from . import IdGenerator - -class DBImpl(object): - """Class wrap up all the database operations.\n - """ - def __init__( self , schema): - """Input: coral schema handle. - """ - self.__schema = schema - def existRow( self, tableName, condition, conditionbindDict): - """Return true if one row fulfills the selection criteria - """ - try: - tableHandle = self.__schema.tableHandle(tableName) - query = tableHandle.newQuery() - query.setCondition(condition,conditionbindDict) - cursor = query.execute() - result=False - while ( next(cursor) ): - result=True - cursor.close() - del query - return result - except Exception as e: - raise Exception(str(e)) - def insertOneRow( self, tableName, tabrowDefDict, tabrowValueDict ): - """Insert row - """ - try: - tableHandle = self.__schema.tableHandle(tableName) - editor = tableHandle.dataEditor() - inputData = coral.AttributeList() - for name,type in tabrowDefDict.items(): - # print name, type - inputData.extend( name, type ) - inputData[name].setData(tabrowValueDict[name]) - editor.insertRow( inputData ) - except Exception as e: - raise Exception(str(e)) - def bulkInsert( self, tableName, tabrowDefDict, bulkinput): - """Bulk insert bulkinput=[{}] - """ - try: - dataEditor=self.__schema.tableHandle(tableName).dataEditor() - insertdata=coral.AttributeList() - for (columnname,columntype) in tabrowDefDict.items(): - insertdata.extend(columnname,columntype) - - bulkOperation=dataEditor.bulkInsert(insertdata,len(bulkinput)) - for valuedict in bulkinput: - for (columnname,columnvalue) in valuedict.items(): - insertdata[columnname].setData(columnvalue) - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - except Exception as e: - raise Exception(str(e)) - def deleteRows( self, tableName, condition, conditionbindDict ): - """Delete row(s) - """ - try: - tableHandle = self.__schema.tableHandle(tableName) - editor = tableHandle.dataEditor() - editor.deleteRows( condition, conditionbindDict ) - except Exception as e: - raise Exception(str(e)) - - def dropTable( self, tableName ): - """Drop specified table. - """ - self.__schema.dropIfExistsTable( tableName ) - def tableExists( self, tableName ): - """Tell whether table exists - """ - try: - self.__schema.tableHandle(tableName) - return True - except coral.Exception as e: - return False - -if __name__ == "__main__": - pass diff --git a/CondCore/TagCollection/python/IdGenerator.py b/CondCore/TagCollection/python/IdGenerator.py deleted file mode 100644 index 14b326837c191..0000000000000 --- a/CondCore/TagCollection/python/IdGenerator.py +++ /dev/null @@ -1,107 +0,0 @@ -from __future__ import absolute_import -import coral -from . import DBImpl -class IdGenerator(object): - """Manages the autoincremental ID values.\n - Input: coral.schema object - """ - def __init__( self , schema ): - self.__schema = schema - self.__idTableColumnName = 'nextID' - self.__idTableColumnType = 'unsigned long' - def getNewID( self, IDtableName): - """Return the ID value in the specified ID table.\n - Input: ID table name - """ - try: - query = self.__schema.tableHandle(IDtableName).newQuery() - query.addToOutputList(self.__idTableColumnName) - query.setForUpdate() #lock it - cursor = query.execute() - result = 0 - while ( next(cursor) ): - result = cursor.currentRow()[self.__idTableColumnName].data() - del query - return result - except Exception as e: - raise Exception(str(e)) - def incrementNextID( self, IDtableName ): - """Set the nextID in the IDTableName to current id value + 1 .\n - Input: ID table name. - """ - try: - tableHandle = self.__schema.tableHandle(IDtableName) - query = tableHandle.newQuery() - query.addToOutputList(self.__idTableColumnName) - query.setForUpdate() #lock it - cursor = query.execute() - result = 0 - while ( next(cursor) ): - result = cursor.currentRow()[0].data() - del query - dataEditor = tableHandle.dataEditor() - inputData = coral.AttributeList() - inputData.extend( 'newid', self.__idTableColumnType ) - inputData['newid'].setData(result+1) - dataEditor.updateRows('nextID = :newid','',inputData) - except Exception as e: - raise Exception(str(e)) - #def getIDTableName( self, tableName ): - # """Returns the ID table name associated with given table.\n - # No check on the existence of the table.\n - # Input: data table name - # Output: ID table name - # """ - # return tableName+'_IDs' - def createIDTable( self, idtableName, deleteOld=True ): - """Create ID table 'tableName_ID' for the given table.\n - Input: name of the table which needs new associated id table - Output: name of the id table created - """ - dbop=DBImpl.DBImpl(self.__schema) - try: - if dbop.tableExists(idtableName) is True: - if deleteOld is True: - dbop.dropTable(idtableName) - else: - return - description = coral.TableDescription(); - description.setName(idtableName) - description.insertColumn(self.__idTableColumnName, self.__idTableColumnType) - idtableHandle=self.__schema.createTable( description ) - idtableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - inputData = coral.AttributeList() - editor = idtableHandle.dataEditor() - editor.rowBuffer( inputData ) - inputData[self.__idTableColumnName].setData(1) - editor.insertRow( inputData ) - except Exception as e: - raise Exception(str(e)) -if __name__ == "__main__": - idtableName = 'TagTreeTable_IDS' - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:data.db', accessMode = coral.access_Update ) - transaction = session.transaction() - try: - transaction.start() - schema = session.nominalSchema() - generator=IdGenerator(schema) - generator.createIDTable( idtableName ) - transaction.commit() - transaction.start(True) - result=generator.getNewID(idtableName) - print 'new id ',result - transaction.commit() - transaction.start(False) - generator.incrementNextID(idtableName) - print 'new id ',generator.getNewID(idtableName) - transaction.commit() - del session - except coral.Exception as e: - transaction.rollback() - print str(e) - del session - except Exception as e: - print "Failed in unit test" - print str(e) - del session diff --git a/CondCore/TagCollection/python/Node.py b/CondCore/TagCollection/python/Node.py deleted file mode 100644 index 3086ada78a1be..0000000000000 --- a/CondCore/TagCollection/python/Node.py +++ /dev/null @@ -1,64 +0,0 @@ -class Node(object): - def __init__( self ): - """__init__ - """ - self.__dict__.setdefault('nodeid',0) - self.__dict__.setdefault('nodelabel','ROOT') - self.__dict__.setdefault('lft',0) - self.__dict__.setdefault('rgt',0) - self.__dict__.setdefault('parentid',0) - self.__dict__.setdefault('globalsince',0) - self.__dict__.setdefault('globaltill',0) - self.__dict__.setdefault('tagid',0) - def __repr__( self ): - """__repr__ - """ - return self.__dict__.__repr__() - def __setattr__( self, name, value ): - if not name in self.__dict__: - raise AttributeError("Unknown attribute "+name) - self.__dict__[name]=value - def __getattr__( self, name ): - if not name in self.__dict__: - raise AttributeError("Unknown attribute "+name) - return self.__dict__[name] - def empty( self ): - if self.__dict__['nodelabel']=='': - return True - return False -class LeafNode(Node): - """The leaf node - """ - def __init__( self ): - """__init__ - """ - super(Node,self).__init__() - super(Node,self).__setattr__( 'tagid',0 ) - self.__dict__.setdefault('tagname','') - #self.__dict__.setdefault('tagid',0) - self.__dict__.setdefault('pfn','') - self.__dict__.setdefault('recordname','') - self.__dict__.setdefault('objectname','') - self.__dict__.setdefault('labelname','') - def __repr__( self ): - """__repr__ - """ - if self.tagname=='': - return '' - return self.__dict__.__repr__() -if __name__ == "__main__": - node=Node() - node.nodeid=1 - print node.nodeid - print node.nodelabel - print node.lft - try: - node.foreign='a' - except AttributeError: - print 'caught right exception' - except Exception as er: - print 'unexpected error' - print str(er) - leaf=LeafNode() - print leaf.__class__.__name__,'isLeaf',str(leaf.tagid) - print node.__class__.__name__,'isLeaf',str(node.tagid) diff --git a/CondCore/TagCollection/python/TagTree.py b/CondCore/TagCollection/python/TagTree.py deleted file mode 100644 index 47969b2dcab67..0000000000000 --- a/CondCore/TagCollection/python/TagTree.py +++ /dev/null @@ -1,646 +0,0 @@ -from __future__ import absolute_import -import os -import coral -from . import IdGenerator, Node, DBImpl -class tagTree(object): - """Class manages tag tree. Note: tree name is not case sensitive. - Tree name is always converted to upper case - """ - def __init__( self, session, treename ): - self.__session = session - self.__tagTreeTableName = 'TAGTREE_TABLE_'+str.upper(treename) - self.__tagTreeIDs = 'TAGTREE_'+str.upper(treename)+'_IDS' - self.__tagInventoryTableName = 'TAGINVENTORY_TABLE' - self.__tagTreeTableColumns = {'nodeid':'unsigned long', 'nodelabel':'string', 'lft':'unsigned long', 'rgt':'unsigned long', 'parentid':'unsigned long', 'tagid':'unsigned long', 'globalsince':'unsigned long long', 'globaltill':'unsigned long long'} - self.__tagTreeTableNotNullColumns = ['nodelabel','lft','rgt','parentid'] - self.__tagTreeTableUniqueColumns = ['nodelabel'] - self.__tagTreeTablePK = ('nodeid') - def existTagTreeTable( self ): - """Check if tree table exists - """ - transaction=self.__session.transaction() - try: - transaction.start(True) - schema = self.__session.nominalSchema() - result=schema.existsTable(self.__tagTreeTableName) - transaction.commit() - #print result - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - return result - def createTagTreeTable( self ): - """Create tag tree table. Existing table will be deleted. - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - schema = self.__session.nominalSchema() - schema.dropIfExistsTable( self.__tagTreeTableName ) - description = coral.TableDescription(); - description.setName( self.__tagTreeTableName ) - for columnName, columnType in self.__tagTreeTableColumns.items(): - description.insertColumn(columnName, columnType) - for columnName in self.__tagTreeTableNotNullColumns : - description.setNotNullConstraint(columnName,True) - for columnName in self.__tagTreeTableUniqueColumns : - description.setUniqueConstraint(columnName) - description.setPrimaryKey( self.__tagTreeTablePK ) - #description.createForeignKey('tagid_FK','tagid',self.__tagInventoryTableName,'tagid') - self.__tagTreeTableHandle = schema.createTable( description ) - self.__tagTreeTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - self.__tagTreeTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - self.__tagTreeTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - self.__tagTreeTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - #create also the associated id table - generator=IdGenerator.IdGenerator(self.__session.nominalSchema()) - generator.createIDTable(self.__tagTreeIDs,True) - transaction.commit() - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def importFromTree( self, sourcetreename ): - """fill up this tree by cloning from the given source tree - in the SAME database - """ - sourcetagTreeTableName = 'TAGTREE_TABLE_'+str.upper(sourcetreename) - sourcetagTreeIDs = 'TAGTREE_'+str.upper(sourcetreename)+'_IDS' - - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - r1=schema.existsTable(sourcetagTreeTableName) - r2=schema.existsTable(sourcetagTreeIDs) - r3=schema.existsTable(self.__tagTreeTableName) - r4=schema.existsTable(self.__tagTreeIDs) - transaction.commit() - if r1 and r2 is False: - raise "source tag tree doesn't exist "+str(sourcetreename) - if r3 and r4 is True: - transaction.start(False) - schema.truncateTable(self.__tagTreeTableName) - schema.truncateTable(self.__tagTreeIDs) - transaction.commit() - else: - self.createTagTreeTable() - transaction.start(False) - schema.truncateTable(self.__tagTreeIDs) - transaction.commit() - nresult=0 - try: - transaction.start(False) - insertwtQuery=schema.tableHandle(self.__tagTreeTableName).dataEditor().insertWithQuery() - insertwtQuery.query().addToTableList(sourcetagTreeTableName) - nresult=insertwtQuery.execute() - transaction.commit() - del insertwtQuery - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - #print nresult,' rows copied from ',sourcetagTreeTableName - - try: - transaction.start(False) - insertwtQuery=schema.tableHandle(self.__tagTreeIDs).dataEditor().insertWithQuery() - insertwtQuery.query().addToTableList(sourcetagTreeIDs) - nresult=insertwtQuery.execute() - transaction.commit() - del insertwtQuery - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - #print nresult,' rows copied from ',sourcetagTreeIDs - - def replaceLeafLinks(self, leafnodelinks ): - """modify the tagid link in leafnodes - Input: {oldtagid:newtagid , oldtagid:newtagid} - This function does not check if the nodes are all really leafs. User has to check before passing the input argument - """ - if len(leafnodelinks.keys())==0: - raise 'TagTree::replaceLeafLinks: empty input ' - - transaction=self.__session.transaction() - transaction.start(False) - schema = self.__session.nominalSchema() - try: - updateAction="tagid = :newtagid" - updateCondition="tagid = :oldtagid" - updateData=coral.AttributeList() - updateData.extend('newtagid','unsigned long') - updateData.extend('oldtagid','unsigned long') - mybulkOperation=schema.tableHandle(self.__tagTreeTableName).dataEditor().bulkUpdateRows("tagid = :newtagid","tagid = :oldtagid",updateData,1000) - for oldtagid in leafnodelinks.keys(): - updateData['newtagid'].setData(leafnodelinks[oldtagid]) - updateData['oldtagid'].setData(oldtagid) - mybulkOperation.processNextIteration() - mybulkOperation.flush() - transaction.commit() - del mybulkOperation - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def insertNode( self, node, parentLabel='ROOT' ): - """Append a new node to specified parent. \n - Silently ignore duplicate entry \n - Input: new node. \n - Input: name of the parent node. \n - Output: result nodeid - """ - nodeid=node.nodeid - nodelabel=node.nodelabel - parentid=0 - tagid=node.tagid - lft=1 - rgt=2 - globalsince=node.globalsince - globaltill=node.globaltill - duplicate=False - transaction=self.__session.transaction() - try: - if parentLabel != 'ROOT': - parentNode=self.getNode(parentLabel) - if parentNode.empty(): - raise ValueError("non-existing parent node "+parentLabel) - parentid=parentNode.nodeid - lft=parentNode.rgt - rgt=parentNode.rgt+1 - ##start readonly transaction - transaction.start(False) - condition='nodelabel=:nodelabel' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('nodelabel','string') - conditionbindDict['nodelabel'].setData(nodelabel) - dbop=DBImpl.DBImpl(self.__session.nominalSchema()) - duplicate=dbop.existRow(self.__tagTreeTableName,condition,conditionbindDict) - if duplicate is False: - generator=IdGenerator.IdGenerator(self.__session.nominalSchema()) - nodeid=generator.getNewID(self.__tagTreeIDs) - if duplicate is False: - tabrowValueDict={'nodeid':nodeid, 'nodelabel':nodelabel, - 'lft':lft, 'rgt':rgt, 'parentid':parentid, - 'tagid':tagid, 'globalsince':globalsince, - 'globaltill':globaltill - } - if parentLabel != 'ROOT': - self.__openGap(self.__session.nominalSchema().tableHandle(self.__tagTreeTableName),parentNode.rgt,1 ) - dbop.insertOneRow(self.__tagTreeTableName, - self.__tagTreeTableColumns, - tabrowValueDict) - generator.incrementNextID(self.__tagTreeIDs) - transaction.commit() - return nodeid - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def renameNodes( self, nodenamemap): - """ - rename selected nodes \n - Input: {oldnodename:newnodename} - Output: [renamednodeid] - """ - transaction=self.__session.transaction() - allnodes={} - try: - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - query.addToOutputList('nodelabel') - cursor = query.execute() - while ( next(cursor) ): - nodelabel=cursor.currentRow()['nodelabel'].data() - if nodelabel in nodenamemap: - allnodes[nodelabel]=nodenamemap[nodelabel] - else: - allnodes[nodelabel]=nodelabel - transaction.commit() - del query - if len(allnodes.values())!=len(set(allnodes.values())): - raise "new node labels are not unique in the tree" - transaction.start(False) - editor = schema.tableHandle(self.__tagTreeTableName).dataEditor() - inputData = coral.AttributeList() - inputData.extend('oldnodelabel','string') - inputData.extend('newnodelabel','string') - for nodelabelpair in nodenamemap.items(): - inputData['oldnodelabel'].setData(nodelabelpair[0]) - inputData['newnodelabel'].setData(nodelabelpair[1]) - editor.updateRows( "nodelabel = :newnodelabel", "nodelabel = :oldnodelabel", inputData ) - transaction.commit() - except coral.Exception as er: - transaction.rollback() - del query - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - del query - raise Exception(str(er)) - - def getNodeById( self, nodeid ): - """return result of query "select * from treetable where nodeid=:nodeid" in Node structure \n - Input: id of the node to get.\n - Output: selected node - """ - result=Node.Node() - transaction=self.__session.transaction() - try: - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - condition = 'nodeid =:nodeid' - conditionData = coral.AttributeList() - conditionData.extend( 'nodeid','unsigned int' ) - conditionData['nodeid'].setData(nodeid) - query.setCondition( condition, conditionData) - cursor = query.execute() - while ( next(cursor) ): - result.tagid=cursor.currentRow()['tagid'].data() - result.nodeid=cursor.currentRow()['nodeid'].data() - result.nodelabel=cursor.currentRow()['nodelabel'].data() - result.lft=cursor.currentRow()['lft'].data() - result.rgt=cursor.currentRow()['rgt'].data() - result.parentid=cursor.currentRow()['parentid'].data() - result.globalsince=cursor.currentRow()['globalsince'].data() - result.globaltill=cursor.currentRow()['globaltill'].data() - transaction.commit() - del query - return result - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def getNode( self, label='ROOT' ): - """return result of query "select * from treetable where nodelabel=label" in Node structure \n - Input: name of the node to get. Default to 'ROOT' \n - Output: selected node - """ - result=Node.Node() - if label=='ROOT': - return result - transaction=self.__session.transaction() - try: - transaction.start(True) - query=self.__session.nominalSchema().tableHandle(self.__tagTreeTableName).newQuery() - condition = 'nodelabel =:nodelabel' - conditionData = coral.AttributeList() - conditionData.extend( 'nodelabel','string' ) - query.setCondition( condition, conditionData) - conditionData['nodelabel'].setData(label) - cursor = query.execute() - while ( next(cursor) ): - result.tagid=cursor.currentRow()['tagid'].data() - result.nodeid=cursor.currentRow()['nodeid'].data() - result.nodelabel=cursor.currentRow()['nodelabel'].data() - result.lft=cursor.currentRow()['lft'].data() - result.rgt=cursor.currentRow()['rgt'].data() - result.parentid=cursor.currentRow()['parentid'].data() - result.globalsince=cursor.currentRow()['globalsince'].data() - result.globaltill=cursor.currentRow()['globaltill'].data() - transaction.commit() - del query - return result - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - def getPath( self, label ): - """Get the path to arrive from ROOT to the given node.\n - Input: labe of the node - Output: list of the labels of the nodes in the path - query "SELECT nodelabel FROM treetable WHERE lft<%s AND rgt>%s ORDER BY lft ASC" - """ - result=[] - lft=0 - rgt=0 - try: - me=self.getNode(label) - lft=me.lft - rgt=me.rgt - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - query.addToOutputList('nodelabel') - condition = 'lft <:lft AND rgt>:rgt' - conditionData = coral.AttributeList() - conditionData.extend( 'lft','unsigned long' ) - conditionData.extend( 'rgt','unsigned long' ) - conditionData['lft'].setData(lft) - conditionData['rgt'].setData(rgt) - query.setCondition( condition, conditionData) - query.addToOrderList( 'lft' ) - cursor = query.execute() - while ( next(cursor) ): - resultNodeLabel = cursor.currentRow()['nodelabel'].data() - result.append( resultNodeLabel ) - transaction.commit() - del query - return result - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - def getAllLeaves( self ): - """Get all leaf nodes.\n - Output: list of leaf nodes - Query "SELECT * FROM treetable WHERE lft=rgt-1" - """ - result=[] - try: - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - condition = 'lft=rgt-1' - conditionData = coral.AttributeList() - query.setCondition( condition, conditionData) - cursor = query.execute() - while ( next(cursor) ): - resultNode=Node.Node() - resultNode.tagid=cursor.currentRow()['tagid'].data() - resultNode.nodeid=cursor.currentRow()['nodeid'].data() - resultNode.nodelabel=cursor.currentRow()['nodelabel'].data() - resultNode.lft=cursor.currentRow()['lft'].data() - resultNode.rgt=cursor.currentRow()['rgt'].data() - resultNode.parentid=cursor.currentRow()['parentid'].data() - resultNode.globalsince=cursor.currentRow()['globalsince'].data() - resultNode.globaltill=cursor.currentRow()['globaltill'].data() - result.append( resultNode ) - transaction.commit() - del query - return result - except coral.Exception as er: - transaction.rollback() - del query - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - del query - raise Exception(str(er)) - def getSubtree( self, label='ROOT' ): - """Get the tree under node(included) with specified label. - Input: node label - Output: subtree in list of Node - Query "SELECT p1.* FROM treetable AS p1, treetable AS p2 WHERE p1.lft BETWEEN p2.lft AND p2.rgt AND p2.nodelabel=%s ORDER BY p1.lft ASC" - """ - result=[] - try: - if label=='ROOT' : - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - for columnName in self.__tagTreeTableColumns: - query.addToOutputList(columnName) - cursor = query.execute() - while ( next(cursor) ): - resultNode=Node.Node() - resultNode.tagid=cursor.currentRow()['tagid'].data() - resultNode.nodeid=cursor.currentRow()['nodeid'].data() - resultNode.nodelabel=cursor.currentRow()['nodelabel'].data() - resultNode.lft=cursor.currentRow()['lft'].data() - resultNode.rgt=cursor.currentRow()['rgt'].data() - resultNode.parentid=cursor.currentRow()['parentid'].data() - resultNode.globalsince=cursor.currentRow()['globalsince'].data() - resultNode.globaltill=cursor.currentRow()['globaltill'].data() - result.append(resultNode) - transaction.commit() - del query - return result - else: - me=self.getNode(label) - parentlft=me.lft - parentrgt=me.rgt - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.newQuery() - query.addToTableList( self.__tagTreeTableName,'p1' ) - query.addToTableList( self.__tagTreeTableName,'p2' ) - for columnname in self.__tagTreeTableColumns.keys(): - query.addToOutputList( 'p1.'+columnname ) - condition = 'p1.lft BETWEEN p2.lft AND p2.rgt AND p2.nodelabel = :nodelabel' - query.addToOrderList( "p1.lft" ); - conditionData = coral.AttributeList() - conditionData.extend( 'nodelabel','string' ) - conditionData['nodelabel'].setData(label) - query.setCondition( condition, conditionData) - cursor = query.execute() - while ( next(cursor) ): - resultNode=Node.Node() - resultNode.tagid=cursor.currentRow()['p1.tagid'].data() - resultNode.nodeid=cursor.currentRow()['p1.nodeid'].data() - resultNode.nodelabel=cursor.currentRow()['p1.nodelabel'].data() - resultNode.lft=cursor.currentRow()['p1.lft'].data() - resultNode.rgt=cursor.currentRow()['p1.rgt'].data() - resultNode.parentid=cursor.currentRow()['p1.parentid'].data() - resultNode.globalsince=cursor.currentRow()['p1.globalsince'].data() - resultNode.globaltill=cursor.currentRow()['p1.globaltill'].data() - result.append(resultNode) - transaction.commit() - del query - return result - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - def nChildren( self, label='ROOT' ): - """Number of children nodes of the given node - Input: label of the parent node - Output: number of children - """ - if label is 'ROOT' : - #"select count(*) from tagTreeTable" - try: - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagTreeTableName).newQuery() - query.addToOutputList('count(*)', 'ct') - mycounts=coral.AttributeList() - mycounts.extend('ct', 'unsigned long'); - query.defineOutput( mycounts ); - cursor = query.execute(); - while ( next(cursor) ): - n= cursor.currentRow()['ct'].data() - transaction.commit() - del query - return n - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - else: - me=self.getNode(label) - return int((me.rgt-me.lft)/2) - def deleteSubtree( self, label='ROOT' ): - """Delete the subtree under the specified node(included).\n - Input: label of the top node - query: DELETE FROM treetable WHERE lft >=%me.lft AND rgt<=%me.rgt - __closeGap() - """ - transaction=self.__session.transaction() - try: - if label=='ROOT' : - transaction.start(False) - self.__session.nominalSchema().dropIfExistsTable(self.__tagTreeTableName) - self.__session.nominalSchema().dropIfExistsTable(self.__tagTreeIDs) - #editor = tableHandle.dataEditor() - #conditionData = coral.AttributeList() - #editor.deleteRows('',conditionData) - #idtableHandle = self.__session.nominalSchema().tableHandle(self.__tagTreeIDs) - #ideditor = idtableHandle.dataEditor() - #ideditor.deleteRows('',conditionData) - transaction.commit() - else : - myparent=self.getNodeById(self.getNode(label).nodeid) - parentlft=myparent.lft - parentrgt=myparent.rgt - n=self.nChildren(label) - transaction.start(False) - tableHandle = self.__session.nominalSchema().tableHandle(self.__tagTreeTableName) - editor = tableHandle.dataEditor() - condition = 'lft >= :parentlft AND rgt <= :parentrgt' - conditionData = coral.AttributeList() - conditionData.extend('parentlft','unsigned long') - conditionData.extend('parentrgt','unsigned long') - conditionData['parentlft'].setData(parentlft) - conditionData['parentrgt'].setData(parentrgt) - editor.deleteRows( condition, conditionData ) - self.__closeGap(tableHandle,parentlft,parentrgt,n) - transaction.commit() - except coral.Exception as er: - transaction.rollback() - raise Exception(str(er)) - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - def deleteNode( self, label ): - """ - DELETE FROM treetable WHERE nodename=label - """ - assert (label !='ROOT') - transaction=self.__session.transaction() - try: - myparent=self.getNodeById(self.getNode(label).nodeid) - parentlft=myparent.lft - parentrgt=myparent.rgt - transaction.start(False) - tableHandle = self.__session.nominalSchema().tableHandle(self.__tagTreeTableName) - editor = tableHandle.dataEditor() - condition = 'nodelabel = :nodelabel' - conditionData = coral.AttributeList() - conditionData.extend('nodelabel','string') - conditionData['nodelabel'].setData(label) - editor.deleteRows( condition, conditionData ) - self.__closeGap(tableHandle,parentlft,parentrgt,1) - transaction.commit() - except Exception as er: - print str(er) - transaction.rollback() - raise Exception(str(er)) - def __openGap(self,tableHandle,parentrgt,n): - """Update the parent node after inserting. Must be called inside update transaction.\n - Input: rootrgt is the rgt of the parent node. \n - Input: n is the number of positions to add - """ - delta=2*n - inputData = coral.AttributeList() - inputData.extend('parentrgt','unsigned long') - inputData['parentrgt'].setData(parentrgt) - editor = tableHandle.dataEditor() - setClause = 'lft=lft+'+str(delta) - condition = 'lft>:parentrgt' - editor.updateRows(setClause, condition, inputData) - setClause = 'rgt=rgt+'+str(delta) - condition = 'rgt>=:parentrgt' - editor.updateRows(setClause, condition, inputData) - def __closeGap(self, tableHandle,parentlft,parentrgt,n): - """Update the node lft rgt values after removing. Must be called inside update transaction.\n - """ - assert (parentlft!=0 and parentrgt!=0 and n!=0) - assert (parentrgt>parentlft) - delta=2*n - editor = tableHandle.dataEditor() - setClause1 = 'lft=lft-'+str(delta) - condition1 = 'lft>'+str(parentrgt) - inputData =coral.AttributeList() - editor.updateRows(setClause1,condition1,inputData) - setClause2 = 'rgt=rgt-'+str(delta) - condition2 = 'rgt>'+str(parentrgt) - editor.updateRows(setClause2,condition2,inputData) -if __name__ == "__main__": - os.putenv( "CORAL_AUTH_PATH", "." ) - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:testTree.db', - accessMode = coral.access_Update ) - #session = svc.connect( 'oracle://devdb10/cms_xiezhen_dev', - # accessMode = coral.access_Update ) - try: - #create a tree named 'mytest' - mytree=tagTree(session,'mytest2') - mytree.createTagTreeTable() - mynode=Node.Node() - mynode.nodelabel='A' - mynode.globalsince=1 - mynode.globaltill=10 - mytree.insertNode(mynode,'ROOT') - result=mytree.getNode('A') - print result - mynode=Node.Node() - mynode.nodelabel='AC1' - mynode.globalsince=2 - mynode.globaltill=5 - mytree.insertNode(mynode,'A') - result=mytree.getNode('A') - print result - result=mytree.getNode('AC1') - print result - result=mytree.getPath('AC1') - print result - result=mytree.getAllLeaves() - print 'all leafs',result - mynode=Node.Node() - mynode.nodelabel='AB2' - mynode.globalsince=3 - mynode.globaltill=7 - mytree.insertNode(mynode,'A') - result=mytree.getNode('A') - print 'Node A ',result - result=mytree.getNode('AB2') - print 'Node AB2 ',result - result=mytree.getPath('AB2') - print 'Path to AB2 ',result - allleafs=mytree.getAllLeaves() - print 'all leaves again',allleafs - print 'number of children ',mytree.nChildren('A') - print 'number of children ',mytree.nChildren('ROOT') - result=mytree.getSubtree('A') - print 'subtree of A ',result - newtree=tagTree(session,'mynewtest') - newtree.importFromTree('mytest2') - newlinks={} - for l in allleafs: - newlinks[l.tagid]=1234 - newtree.replaceLeafLinks(newlinks) - del session - except Exception as e: - print "Failed in unit test" - print str(e) - del session diff --git a/CondCore/TagCollection/python/__init__.py b/CondCore/TagCollection/python/__init__.py deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/CondCore/TagCollection/python/cacheconfigParser.py b/CondCore/TagCollection/python/cacheconfigParser.py deleted file mode 100644 index ca9f2149f5ffc..0000000000000 --- a/CondCore/TagCollection/python/cacheconfigParser.py +++ /dev/null @@ -1,60 +0,0 @@ -from xml.dom.minidom import parse,parseString,getDOMImplementation,Node - -class cacheconfigParser(object): - def __init__(self): - self.__configstr='' - self.__configfile='' - ###parse result - self.__parameterDict={} - def handleFrontierConnect(self,dom): - #print 'handleFrontierConnect' - nodelist=dom.getElementsByTagName('frontier-connect')[0].childNodes - #print nodelist - for node in nodelist: - if node.nodeType!=Node.TEXT_NODE and node.nodeType!=Node.COMMENT_NODE: - tagname=node.tagName - attrs=node.attributes - for attrName in attrs.keys(): - attrNode=attrs.get(attrName) - attrValue=attrNode.nodeValue - if tagname in self.__parameterDict: - self.__parameterDict[tagname].append((attrName,attrValue)) - else: - valuelist=[] - valuelist.append((attrName,attrValue)) - self.__parameterDict[tagname]=valuelist - def parse(self,filename): - """ - Parse an XML file by name - """ - dom=parse(filename) - self.handleFrontierConnect(dom) - dom.unlink() - def parseString(self,strbuff): - dom=parseString(strbuff) - self.handleFrontierConnect(dom) - dom.unlink() - def proxylist(self): - return self.__parameterDict['proxy'] - def serverlist(self): - return self.__parameterDict['server'] - def parameterdict(self): - return self.__parameterDict -if __name__ == '__main__': - mydocstr="""""" - p=cacheconfigParser() - p.parseString(mydocstr) - print 'proxies' - print p.proxylist() - print 'servers' - print p.serverlist() - print 'parameterdict' - print p.parameterdict() - - p.parse('/afs/cern.ch/cms/SITECONF/CERN/JobConfig/site-local-config.xml') - print 'proxies' - print p.proxylist() - print 'servers' - print p.serverlist() - print 'parameterdict' - print p.parameterdict() diff --git a/CondCore/TagCollection/python/connectstrParser.py b/CondCore/TagCollection/python/connectstrParser.py deleted file mode 100644 index a719ad16ff110..0000000000000 --- a/CondCore/TagCollection/python/connectstrParser.py +++ /dev/null @@ -1,112 +0,0 @@ -from __future__ import absolute_import -import re -class connectstrParser(object): - def __init__(self,connectstr): - self.__connectstr=connectstr - self.__pattern=re.compile('(^[\w]+)(://)(.+)(/)(.+)') - self.__protocol='' - self.__schemaname='' - self.__servicename='' - self.__servlettotranslate=[] - def parse(self): - result=re.match(self.__pattern,self.__connectstr) - if result is not None: - protocol=result.group(1) - if protocol!='frontier' and protocol!='oracle': - raise 'unsupported technology',protocol - self.__protocol=protocol - self.__schemaname=result.group(5) - self.__servicename=result.group(3) - if self.__protocol=='frontier': - if self.__servicename.find('(')==-1: - if self.__servicename.find('/')==-1: - self.__servlettotranslate.append(self.__servicename) - elif self.__servicename.find('/') == -1: - self.__servlettotranslate.append(self.__servicename.split('(',1)[0]) - self.__servlettotranslate.append('('+self.__servicename.split('(',1)[1]) - - def protocol(self): - return self.__protocol - def schemaname(self): - return self.__schemaname - def service(self): - return self.__servicename - def needsitelocalinfo(self): - if self.__protocol=='frontier': - if len(self.__servlettotranslate)==0: - return False - else : - return True - else: - return False - def servlettotranslate(self): - """return a list, first is the servlet name, second is whatever additional parameter, if any. - """ - return self.__servlettotranslate - def fullfrontierStr(self,schemaname,parameterDict): - if len(parameterDict)==0: - raise 'empty frontier parameters, cannot construct full connect string' - result='frontier://' - for k,v in parameterDict.items(): - ##if attr name=url, concatenate; if attrname=value discard - if k=='load' and v[0][0]=='balance': - result+='(loadbalance='+v[0][1]+')' - continue - for (attrname,attrvalue) in v: - if attrname=='url': - if k=='server': - fields=attrvalue.rsplit('/') - if len(fields)>3: - fields[-1]=self.servlettotranslate()[0] - attrvalue='/'.join(fields) - result+='('+k+'url='+attrvalue+')' - else: - result+='('+k+'='+attrvalue+')' - if len(self.servlettotranslate())>1: - result+=self.servlettotranslate()[1] - result+='/'+schemaname - return result -if __name__ == '__main__': - from . import cacheconfigParser - o='oracle://cms_orcoff_prep/CMS_LUMI_DEV_OFFLINE' - parser=connectstrParser(o) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo() - print 'case 1' - f1='frontier://cmsfrontier.cern.ch:8000/LumiPrep/CMS_LUMI_DEV_OFFLINE' - parser=connectstrParser(f1) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo() - print 'case 2' - f2='frontier://(serverurl=cmsfrontier.cern.ch:8000/LumiPrep/CMS_LUMI_DEV_OFFLINE)' - parser=connectstrParser(f2) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo() - print 'case 3' - f3='frontier://(proxyurl=http://cmst0frontier.cern.ch:3128)(proxyurl=http://cmst0frontier.cern.ch:3128)(proxyurl=http://cmst0frontier1.cern.ch:3128)(proxyurl=http://cmst0frontier2.cern.ch:3128)(serverurl=http://cmsfrontier.cern.ch:8000/LumiPrep)(serverurl=http://cmsfrontier.cern.ch:8000)/LumiPrep)(serverurl=http://cmsfrontier1.cern.ch:8000/LumiPrep)(serverurl=http://cmsfrontier2.cern.ch:8000/LumiPrep)(serverurl=http://cmsfrontier3.cern.ch:8000/LumiPrep)(serverurl=http://cmsfrontier4.cern.ch:8000/LumiPrep)/CMS_LUMI_DEV_OFFLINE' - parser=connectstrParser(f3) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo() - print 'case 4' - f4='frontier://LumiPrep/CMS_LUMI_DEV_OFFLINE' - parser=connectstrParser(f4) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo(),parser.servlettotranslate() - if parser.needsitelocalinfo(): - sitelocalconfig='/afs/cern.ch/cms/SITECONF/CERN/JobConfig/site-local-config.xml' - frontierparser=cacheconfigParser.cacheconfigParser() - frontierparser.parse(sitelocalconfig) - print 'full frontier string' - print parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict()) - print 'case 5' - f5='frontier://LumiPrep(otherparameter=value)/CMS_LUMI_DEV_OFFLINE' - parser=connectstrParser(f5) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo(),parser.servlettotranslate() - print parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict()) - print 'case 6' - f6='frontier://LumiCalc/CMS_LUMI_PROD' - parser=connectstrParser(f6) - parser.parse() - print parser.protocol(),parser.service(),parser.schemaname(),parser.needsitelocalinfo(),parser.servlettotranslate() - print parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict()) diff --git a/CondCore/TagCollection/python/entryComment.py b/CondCore/TagCollection/python/entryComment.py deleted file mode 100644 index 0ae725c774a8e..0000000000000 --- a/CondCore/TagCollection/python/entryComment.py +++ /dev/null @@ -1,256 +0,0 @@ -from __future__ import absolute_import -import coral -from . import DBImpl -from . import CommonUtils - -class entryComment(object): - """Class add optional comment on given entry in a given table\n - """ - def __init__( self, session ): - """Input: coral schema handle. - """ - self.__session = session - self.__entryCommentTableColumns={'entryid':'unsigned long','tablename':'string','comment':'string'} - self.__entryCommentTableNotNullColumns=['entryid','tablename'] - self.__entryCommentTablePK=('entryid','tablename') - - def existCommentTable(self): - """Check if entry comment table exists - """ - try: - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - result=schema.existsTable(CommonUtils.commentTableName()) - transaction.commit() - #print result - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - return result - - def createEntryCommentTable(self): - """Create entry comment able.Existing table will be deleted. - """ - try: - transaction=self.__session.transaction() - transaction.start() - schema = self.__session.nominalSchema() - schema.dropIfExistsTable(CommonUtils.commentTableName()) - description = coral.TableDescription() - description.setName(CommonUtils.commentTableName()) - for columnName, columnType in self.__entryCommentTableColumns.items(): - description.insertColumn(columnName,columnType) - for columnName in self.__entryCommentTableNotNullColumns: - description.setNotNullConstraint(columnName,True) - description.setPrimaryKey(self.__entryCommentTablePK) - tablehandle=schema.createTable(description) - tablehandle.privilegeManager().grantToPublic(coral.privilege_Select) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def insertComment( self, tablename, entryid,comment ): - """insert comment on the given entry of given table - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - tabrowValueDict={'entryid':entryid,'tablename':tablename,'comment':comment} - schema = self.__session.nominalSchema() - dbop=DBImpl.DBImpl(schema) - dbop.insertOneRow(CommonUtils.commentTableName(),self.__entryCommentTableColumns,tabrowValueDict) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def bulkinsertComments( self, tableName,bulkinput): - """bulk insert comments for a given table - bulkinput [{'entryid':unsigned long, 'tablename':string,'comment':string}] - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - schema = self.__session.nominalSchema() - dbop=DBImpl.DBImpl(schema) - dbop.bulkInsert(CommonUtils.commentTableName(),self.__entryCommentTableColumns,bulkinput) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def getCommentForId( self, tableName, entryid ): - """get comment for given id in given table - """ - transaction=self.__session.transaction() - comment='' - try: - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(CommonUtils.commentTableName()).newQuery() - condition='entryid = :entryid AND tablename = :tablename' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('entryid','unsigned long') - conditionbindDict.extend('tablename','string') - conditionbindDict['entryid'].setData(entryid) - conditionbindDict['tablename'].setData(tableName) - query.addToOutputList('comment') - query.setCondition(condition,conditionbindDict) - cursor=query.execute() - if next(cursor): - comment=cursor.currentRow()['comment'].data() - cursor.close() - transaction.commit() - del query - return comment - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def getCommentsForTable( self, tableName ): - """get all comments for given table - result=[(entryid,comment)] - """ - transaction=self.__session.transaction() - result=[] - - try: - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(CommonUtils.commentTableName()).newQuery() - condition='tablename = :tablename' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('tablename','string') - conditionbindDict['tablename'].setData(tableName) - query.addToOutputList('entryid') - query.addToOutputList('comment') - query.setCondition(condition,conditionbindDict) - cursor=query.execute() - while next(cursor): - comment=cursor.currentRow()['comment'].data() - entryid=cursor.currentRow()['entryid'].data() - result.append((entryid,comment)) - cursor.close() - transaction.commit() - del query - return result - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def modifyCommentForId( self, tableName, entryid, newcomment ): - """replace comment for given entry for given table - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - editor = self.__session.nominalSchema().tableHandle(CommonUtils.commentTableName()).dataEditor() - inputData = coral.AttributeList() - inputData.extend('newcomment','string') - inputData.extend('entryid','unsigned long') - inputData.extend('tablename','string') - inputData['newcomment'].setData(newcomment) - inputData['entryid'].setData(entryid) - inputData['tablename'].setData(tableName) - editor.updateRows( "comment = :newcomment", "entryid = :entryid AND tablename = :tablename", inputData ) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def replaceId( self, tableName, oldentryid, newentryid ): - """replace entryid in given table - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - editor = self.__session.nominalSchema().tableHandle(CommonUtils.commentTableName()).dataEditor() - inputData = coral.AttributeList() - inputData.extend('newentryid','unsigned long') - inputData.extend('oldentryid','unsigned long') - inputData.extend('tablename','string') - inputData['newentryid'].setData(newentryid) - inputData['oldentryid'].setData(oldentryid) - inputData['tablename'].setData(tableName) - editor.updateRows( "entryid = :newentryid", "entryid = :oldentryid AND tablename = :tablename", inputData ) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def deleteCommentForId( self, tablename, entryid): - """delete selected comment entry - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - dbop=DBImpl.DBImpl(self.__session.nominalSchema()) - condition='tablename = :tablename AND entryid = :entryid' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('tablename','string') - conditionbindDict.extend('entryid','unsigned long') - conditionbindDict['tablename'].setData(tablename) - conditionbindDict['entryid'].setData(entryid) - dbop.deleteRows(CommonUtils.commentTableName(),condition,conditionbindDict) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def clearAllEntriesForTable( self, tablename ): - """delete all entries related with given table - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - dbop=DBImpl.DBImpl(self.__session.nominalSchema()) - condition='tablename = :tablename' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('tablename','string') - conditionbindDict['tablename'].setData(tablename) - dbop.deleteRows(CommonUtils.commentTableName(),condition,conditionbindDict) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - -if __name__ == "__main__": - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:testentryComment.db', - accessMode = coral.access_Update ) - try: - entrycomment=entryComment(session) - print "test create entrycomment table" - entrycomment.createEntryCommentTable() - print "test insert one comment" - entrycomment.insertComment(CommonUtils.inventoryTableName(),12,'comment1') - entrycomment.insertComment(CommonUtils.treeTableName('ABCTREE'),12,'comment1') - print "test bulk insert" - bulkinput=[] - bulkinput.append({'entryid':21,'tablename':CommonUtils.inventoryTableName(),'comment':'mycomment'}) - bulkinput.append({'entryid':22,'tablename':CommonUtils.inventoryTableName(),'comment':'mycomment2'}) - bulkinput.append({'entryid':23,'tablename':CommonUtils.inventoryTableName(),'comment':'mycomment3'}) - bulkinput.append({'entryid':24,'tablename':CommonUtils.inventoryTableName(),'comment':'mycomment4'}) - entrycomment.bulkinsertComments(CommonUtils.inventoryTableName(),bulkinput) - print "test getCommentsForTable ",CommonUtils.inventoryTableName() - results=entrycomment.getCommentsForTable(CommonUtils.inventoryTableName()) - print results - result=entrycomment.getCommentForId(CommonUtils.inventoryTableName(),23) - print result - entrycomment.modifyCommentForId(CommonUtils.inventoryTableName(),23, 'mynewcomment' ) - print entrycomment.getCommentForId(CommonUtils.inventoryTableName(),23) - print 'test replaceid' - entrycomment.replaceId(CommonUtils.inventoryTableName(),23,33 ) - print entrycomment.getCommentForId(CommonUtils.inventoryTableName(),33) - print 'test deletecomment for id' - entrycomment.deleteCommentForId(CommonUtils.inventoryTableName(), 24) - print entrycomment.getCommentsForTable(CommonUtils.inventoryTableName()) - print 'clearAllEntriesForTable' - entrycomment.clearAllEntriesForTable(CommonUtils.inventoryTableName()) - print entrycomment.getCommentsForTable(CommonUtils.inventoryTableName()) - del session - except Exception as e: - print "Failed in unit test" - print str(e) - del session - diff --git a/CondCore/TagCollection/python/exporter.py b/CondCore/TagCollection/python/exporter.py deleted file mode 100644 index 129c52eb8b5d0..0000000000000 --- a/CondCore/TagCollection/python/exporter.py +++ /dev/null @@ -1,313 +0,0 @@ -''' -exporter(sourceSession,destSession[,rowCachesize]) -Input parameter sourceSession : session proxy for source schema providing logical service name & access mode -Input parameter destSession : session proxy for destination schema providing logical service name & access mode -Input parameter rowCachesize : the number of rows to be cached at the client side, default value =100 -Output paramter : the exporter object -''' -from __future__ import absolute_import - -import os -import coral -import time -import math -from .multivaluedict import mseqdict -from .listobjects import listobjects,listschema,listtables,listtableset - -class exporter: - "exporter class for CoralTools" - m_sourceSession = 0 - m_destSession = 0 - m_rowCachesize = 100 - - def __init__( self,sourceSession,destSession,rowCachesize=100 ): - try: - - self.m_sourceSession = sourceSession - self.m_destSession = destSession - self.m_rowCachesize = rowCachesize - - self.m_sourceSession.transaction().start() - self.m_destSession.transaction().start() - - except Exception as e: - raise Exception("Error in Initializer: " + str(e)) - -#Copies the schema objects from source to destination, without copying data. - def copyschema(self ): - try: - - listsourceTable=listschema( self.m_sourceSession.nominalSchema() ) - listdestTable=listobjects( self.m_destSession.nominalSchema() ) - self._checktable(listsourceTable,listdestTable) - - for key,value in listsourceTable.items(): - iTable = key - print iTable - self._copytablelayout(iTable) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copyschema SUCCESS" - - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copyschema method: " + str(e)) - return False - -#Copies the schema objects from source to destination, including data. - def copydata(self,rowCount=-1 ): - try: - - self.m_sourceSession.transaction().start() - self.m_destSession.transaction().start() - - listsourceTable=listschema( self.m_sourceSession.nominalSchema() ) - listdestTable=listobjects( self.m_destSession.nominalSchema() ) - self._checktable(listsourceTable,listdestTable) - - selectionclause="" - selectionparameters=coral.AttributeList() - for key,value in listsourceTable.items(): - iTable = key - print iTable - currentCount = 0 - self._copytablelayout(iTable) - self._copydatalayout(iTable,selectionclause,selectionparameters,currentCount,rowCount) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copydata SUCCESS" - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copydata method: " + str(e)) - return False - -#Copies the specified table schema without copying data. - def copytableschema(self,tablename ): - try: - - iTable="" - listsourceTable=listtables( self.m_sourceSession.nominalSchema(),tablename ) - listdestTable=listtables(self.m_destSession.nominalSchema(),tablename ) - self._checktable(listsourceTable,listdestTable) - - for key,value in listsourceTable.items(): - iTable = key - print iTable - self._copytablelayout(iTable) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copytableschema SUCCESS" - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copytableschema method: " + str(e)+" : "+iTable) - return False - -#Copies the specified table schema including data. - def copytabledata(self,tablename,selectionclause,selectionparameters,rowCount=-1 ): - try: - - iTable="" - listsourceTable=listtables( self.m_sourceSession.nominalSchema(),tablename ) - listdestTable=listtables( self.m_destSession.nominalSchema(),tablename ) - - currentCount = 0 - for key,value in listsourceTable.items(): - iTable = key - print iTable - tableexists = self._checkdata(iTable,listdestTable) - - if not tableexists: - self._copytablelayout(iTable) - - self._copydatalayout(iTable,selectionclause,selectionparameters,currentCount,rowCount) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copytabledata SUCCESS" - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copytabledata method: " + str(e)+" : " + iTable) - return False - -#Copies the specified list of tables ordered by hierarchy without copying data. - def copytablelistschema(self,tableset ): - try: - - iTable="" - listsourceTable=listtableset( self.m_sourceSession.nominalSchema(),tableset ) - listdestTable=listtableset( self.m_destSession.nominalSchema(),tableset ) - self._checktable(listsourceTable,listdestTable) - - for key,value in listsourceTable.items(): - iTable = key - print iTable - self._copytablelayout(iTable) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copytablelistschema SUCCESS" - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copytablelistschema method: " + str(e)+" : "+iTable) - return False - -#Copies the specified list of tables ordered by hierarchy including data. - def copytablelistdata(self,tablelist,rowCount=-1): - try: - - iTable="" - tableset=[] - for table in tablelist: - i=0 - for parameter in table: - if i==0: - tableset.append(parameter) - i=i+1 - - listsourceTable=listtableset( self.m_sourceSession.nominalSchema(),tableset ) - listdestTable=listtableset( self.m_destSession.nominalSchema(),tableset ) - for key,value in listsourceTable.items(): - iTable = key - print iTable - currentCount = 0 - selectionclause="" - selectionparameters=coral.AttributeList() - for table in tablelist: - i=0 - for parameter in table: - if i==0: - table=parameter - if table==iTable: - if i==1: - selectionclause = parameter - if i==2: - selectionparameters = parameter - i=i+1 - - tableexists = self._checkdata(iTable,listdestTable) - - if not tableexists: - self._copytablelayout(iTable) - - self._copydatalayout(iTable,selectionclause,selectionparameters,currentCount,rowCount) - - self.m_destSession.transaction().commit() - self.m_sourceSession.transaction().commit() - print "copytablelistdata SUCCESS" - return True - - except Exception as e: - self.m_destSession.transaction().rollback() - self.m_sourceSession.transaction().commit() - raise Exception ("Error in copytablelistdata method: " + str(e) + " : "+ iTable) - return False - -#Copies the schema objects from source to destination - def _copytablelayout(self,iTable ): - try: - - description = self.m_sourceSession.nominalSchema().tableHandle( iTable ).description() - table = self.m_destSession.nominalSchema().createTable( description ) - - return True - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#Copies the data from source to destination - def _copydatalayout(self,iTable,selectionclause,selectionparameters,currentCount,rowCount ): - try: - data=coral.AttributeList() - sourceEditor = self.m_sourceSession.nominalSchema().tableHandle( iTable ).dataEditor() - destEditor = self.m_destSession.nominalSchema().tableHandle( iTable ).dataEditor() - - sourceEditor.rowBuffer(data) - sourcequery = self.m_sourceSession.nominalSchema().tableHandle( iTable ).newQuery() - sourcequery.setCondition(selectionclause,selectionparameters) - sourcequery.setRowCacheSize(self.m_rowCachesize) - sourcequery.defineOutput(data) - - bulkOperation = destEditor.bulkInsert(data,self.m_rowCachesize ) - - cursor=sourcequery.execute() - - for row in cursor: - currentCount = currentCount+1 - bulkOperation.processNextIteration() - if currentCount == rowCount: - bulkOperation.flush() - self.m_destSession.transaction().commit() - self.m_destSession.transaction().start() - currentCount = 0 - bulkOperation.flush() - del bulkOperation - del sourcequery - - return True - - except Exception as e: - raise Exception (" " + str(e)) - return False - - #Checks if table exists in destination schema - def _checktable(self,listsourceTable,listdestTable ): - try: - - for key,value in listsourceTable.items(): - table=key - for key,value in listdestTable.items(): - if key==table: - raise Exception( "Table exists in Destination Schema : " ) - - return True - - except Exception as e: - raise Exception (" " + str(e) + table) - return False - -#Checks if data exists in the table in destination schema - def _checkdata(self,iTable,listdestTable ): - try: - - foundtable=False - founddata=False - for key,value in listdestTable.items(): - if key==iTable: - counter=0 - # Run a query on the destination table - query = self.m_destSession.nominalSchema().tableHandle( iTable ).newQuery() - cursor = query.execute() - foundtable=True - for row in cursor: - counter=counter+1 - del query - if (counter > 0): - founddata=True - - return foundtable - - except Exception as e: - raise Exception (" " + str(e) + iTable) - return False - - def __del__( self ): - print "" diff --git a/CondCore/TagCollection/python/listobjects.py b/CondCore/TagCollection/python/listobjects.py deleted file mode 100644 index 774df6129a5ce..0000000000000 --- a/CondCore/TagCollection/python/listobjects.py +++ /dev/null @@ -1,412 +0,0 @@ -from __future__ import absolute_import -import os -import coral -from .multivaluedict import mseqdict - -''' -dumpobjectlist(schema) -Dumps the list of tables and views grouped and ordered by hierarchy, specifying the existing constraints and indexes. -Input parameter schema : a schema object, obtained by the sessionproxy object -Output paramter : none -''' -def dumpobjectlist( schema ): - try: - - dTableInfo=listobjects( schema ) - - print "--------------------------------------" - print "Listing Table Description " - print "--------------------------------------" - for key,value in dTableInfo.items(): - tableName= key - _printTableInfo(schema,tableName) - - print "Listing View Information" - print "--------------------------------------" - for viewName in schema.listViews(): - _printViewInfo(schema,viewName) - - except Exception as e: - raise Exception ("Error in dumpobjectlist method: " + str(e)) - return False - -#Returns the list of tables ordered by hierarchy -def listobjects( schema ): - try: - - listOfTableNames = schema.listTables() - - #Dictionaries are created for resolving table dependencies - dTable=mseqdict( [], {}) - dRefTable=mseqdict( [], {}) - dCopyTable=mseqdict( [], {}) - - for tableName in listOfTableNames: - - #Add tablename to dictionary - dTable.append(tableName,'') - description = coral.TableDescription() - description.setName( tableName ) - table = schema.tableHandle(tableName ) - - numberOfForeignKeys = table.description().numberOfForeignKeys() - for i in range(0, numberOfForeignKeys): - foreignKey = table.description().foreignKey( i ) - columnNames = foreignKey.columnNames() - #Add referenced tablename to dictionary - dRefTable.append (tableName, foreignKey.referencedTableName()) - columnNamesR = foreignKey.referencedColumnNames() - - #For retrieving the tables in order of dependency - r1=mseqdict( [], {}) - r2=mseqdict( [], {}) - - for rTable, refTable in dRefTable.items(): - for table in refTable: - r1.append(table,'') - r1.append(rTable,'') - - for rTable, refTable in r1.items(): - test=rTable - for rTable1, refTable1 in dRefTable.items(): - if rTable1==test: - for table in refTable1: - if rTable1!=table: - r2.append(table,'') - - for key,value in r2.items(): - r1.remove(key,'') - dTable.remove(key,'') - - for key,value in r1.items(): - dTable.remove(key,'') - - for key,value in dTable.items(): - dCopyTable.append(key,'') - - for key,value in r2.items(): - dCopyTable.append(key,'') - - for key,value in r1.items(): - dCopyTable.append(key,'') - - return dCopyTable - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#For printing the Table Information -def _printTableInfo( schema,tableName ): - try: - - description = coral.TableDescription() - description.setName( tableName ) - table = schema.tableHandle(tableName ) - - numberOfColumns = table.description().numberOfColumns() - print "Table " , tableName - print "Columns : " , numberOfColumns - for i in range(0, numberOfColumns): - column = table.description().columnDescription( i ) - print "" , column.name() , " (" , column.type() , ")" - if ( column.isUnique() ): - print " UNIQUE"; - if ( column.isNotNull() ): - print " NOT NULL" - - if ( table.description().hasPrimaryKey() ): - columnNames = table.description().primaryKey().columnNames() - print "" - print "Primary key defined for column :" - for iColumn in columnNames: - print " ",iColumn , " " - - numberOfUniqueConstraints = table.description().numberOfUniqueConstraints() - print "" - print "Unique Constraints : " , numberOfUniqueConstraints - for i in range( 0, numberOfUniqueConstraints ): - uniqueConstraint = table.description().uniqueConstraint( i ) - print "" , uniqueConstraint.name() , " defined for column" - columnNames = uniqueConstraint.columnNames() - for iColumn in columnNames: - print " ",iColumn - - numberOfIndices = table.description().numberOfIndices() - print "" - print "Index : " , numberOfIndices - for i in range(0, numberOfIndices ): - index = table.description().index( i ) - print "" , index.name() - if ( index.isUnique() ): - print " (UNIQUE)" - print " defined for column" - columnNames = index.columnNames() - for iColumn in columnNames: - print " ",iColumn - - numberOfForeignKeys = table.description().numberOfForeignKeys() - print "" - print "Foreign Keys : " , numberOfForeignKeys - for i in range(0, numberOfForeignKeys): - foreignKey = table.description().foreignKey( i ) - print "" , foreignKey.name() , " defined for column" - columnNames = foreignKey.columnNames() - for iColumn in columnNames: - print " ",iColumn - print " references -> " , foreignKey.referencedTableName() , "on Column "; - columnNamesR = foreignKey.referencedColumnNames() - for iColumn in columnNamesR: - print " ",iColumn - - print "--------------------------------------" - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#For printing the View Information -def _printViewInfo( schema,viewName ): - try: - - view = schema.viewHandle(viewName ) - numberOfColumns = view.numberOfColumns() - print "View " , view.name() - print "has", " ", numberOfColumns , " columns :" - for i in range( 0,numberOfColumns ): - column = view.column( i ) - print "" , column.name(), " (", column.type() , ")" - if ( column.isUnique() ): - print " UNIQUE" - if ( column.isNotNull() ): - print " NOT NULL" - - print " definition string : " , view.definition() - - print "--------------------------------------" - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#Returns the list of tables ordered by hierarchy and checks for circular dependency between tables in source schema -def listschema( schema ): - try: - listOfTableNames = schema.listTables() - - #Dictionaries are created for resolving table dependencies - dTable=mseqdict( [], {}) - dRefTable=mseqdict( [], {}) - dCopyTable=mseqdict( [], {}) - dCircTable=mseqdict( [], {}) - - for tableName in listOfTableNames: - - #Add tablename to dictionary - dTable.append(tableName,'') - description = coral.TableDescription() - description.setName( tableName ) - table = schema.tableHandle(tableName ) - - numberOfForeignKeys = table.description().numberOfForeignKeys() - for i in range(0, numberOfForeignKeys): - foreignKey = table.description().foreignKey( i ) - columnNames = foreignKey.columnNames() - #Add referenced tablename to dictionary - dRefTable.append (tableName, foreignKey.referencedTableName()) - dCircTable.append (tableName, foreignKey.referencedTableName()) - columnNamesR = foreignKey.referencedColumnNames() - - #For checking circular dependency between the tables - d1=mseqdict( [], {}) - d2=mseqdict( [], {}) - - for rTable, refTable in dCircTable.items(): - for table in refTable: - d1.append(rTable,table) - - dCircTable.swap() - for rTable, refTable in dCircTable.items(): - for table in refTable: - d2.append(rTable,table) - - for key,value in d1.items(): - firsttable=key - secondtable=value - for key,value in d2.items(): - if key==firsttable and value==secondtable: - raise Exception ("Circular Dependency exists between tables : "+firsttable,secondtable) - - #For retrieving the tables in order of dependency - r1=mseqdict( [], {}) - r2=mseqdict( [], {}) - - for rTable, refTable in dRefTable.items(): - for table in refTable: - r1.append(table,'') - r1.append(rTable,'') - - for rTable, refTable in r1.items(): - test=rTable - for rTable1, refTable1 in dRefTable.items(): - if rTable1==test: - for table in refTable1: - if rTable1!=table: - r2.append(table,'') - - for key,value in r2.items(): - r1.remove(key,'') - dTable.remove(key,'') - - for key,value in r1.items(): - dTable.remove(key,'') - - for key,value in dTable.items(): - dCopyTable.append(key,'') - - for key,value in r2.items(): - dCopyTable.append(key,'') - - for key,value in r1.items(): - dCopyTable.append(key,'') - - return dCopyTable - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#Returns the tablename for the specified table schema -def listtables( schema,tablename ): - try: - listOfTableNames = schema.listTables() - - #Dictionaries are created for resolving table dependencies - dTable=mseqdict( [], {}) - dCopyTable=mseqdict( [], {}) - - for tableName in listOfTableNames: - if tablename==tableName: - #Add tablename to dictionary - dTable.append(tableName,'') - description = coral.TableDescription() - description.setName( tableName ) - table = schema.tableHandle(tableName ) - - numberOfForeignKeys = table.description().numberOfForeignKeys() - for i in range(0, numberOfForeignKeys): - foreignKey = table.description().foreignKey( i ) - columnNames = foreignKey.columnNames() - columnNamesR = foreignKey.referencedColumnNames() - - for key,value in dTable.items(): - dCopyTable.append(key,'') - - return dCopyTable - - except Exception as e: - raise Exception (" " + str(e)) - return False - -#Returns the list of tables ordered by hierarchy for the specified list of tables and also checks for circular dependency between the tables -def listtableset( schema,tableset ): - try: - listOfTableNames = schema.listTables() - - #Dictionaries are created for resolving table dependencies - dTable=mseqdict( [], {}) - dCircTable=mseqdict( [], {}) - dCopyTable=mseqdict( [], {}) - dTempTable=mseqdict( [], {}) - - for table in listOfTableNames: - for tableName in tableset: - if tableName==table: - #Add tablename to dictionary - dTable.append(tableName,'') - description = coral.TableDescription() - description.setName( tableName ) - table = schema.tableHandle(tableName ) - - numberOfForeignKeys = table.description().numberOfForeignKeys() - for i in range(0, numberOfForeignKeys): - foreignKey = table.description().foreignKey( i ) - columnNames = foreignKey.columnNames() - #Add referenced tablename to dictionary - dTable.append (tableName, foreignKey.referencedTableName()) - dCircTable.append (tableName, foreignKey.referencedTableName()) - columnNamesR = foreignKey.referencedColumnNames() - - #For checking circular dependency between the tables - d1=mseqdict( [], {}) - d2=mseqdict( [], {}) - - for rTable, refTable in dCircTable.items(): - for table in refTable: - d1.append(rTable,table) - - dCircTable.swap() - for rTable, refTable in dCircTable.items(): - for table in refTable: - d2.append(rTable,table) - - for key,value in d1.items(): - firsttable=key - secondtable=value - for key,value in d2.items(): - if key==firsttable and value==secondtable: - raise Exception ("Circular Dependency exists between tables : "+firsttable,secondtable) - - #For retrieving the tables in order of dependency - r1=mseqdict( [], {}) - r2=mseqdict( [], {}) - - for rTable, refTable in dTable.items(): - for table in refTable: - r1.append(table,'') - r1.append(rTable,'') - - for rTable, refTable in r1.items(): - test=rTable - for rTable1, refTable1 in dTable.items(): - if rTable1==test: - for table in refTable1: - if rTable1!=table: - r2.append(table,'') - - for key,value in r2.items(): - r1.remove(key,'') - - for key,value in r2.items(): - dTempTable.append(key,'') - - for key,value in r1.items(): - dTempTable.append(key,'') - - for key,value in dTempTable.items(): - iTable= key - for table in tableset: - if table==iTable: - dCopyTable.append(key,'') - - return dCopyTable - - except Exception as e: - raise Exception (" " + str(e)) - return False - -if __name__ == "__main__": - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:source.db', - accessMode = coral.access_Update ) - session.transaction().start(True) - schema=session.nominalSchema() - print 'TEST listobjects' - print listobjects(schema) - print 'TEST dumpobjectlist' - dumpobjectlist(schema) - print 'TEST listtables' - print listtables(schema,'TAGINVENTORY_TABLE') - - session.transaction().commit() - del session diff --git a/CondCore/TagCollection/python/multivaluedict.py b/CondCore/TagCollection/python/multivaluedict.py deleted file mode 100644 index 6727612cf8233..0000000000000 --- a/CondCore/TagCollection/python/multivaluedict.py +++ /dev/null @@ -1,180 +0,0 @@ -# Sequential Dictionary Class # -''' -msedict - multiple value dictionary, keeps multiple values per key -You can slice, add, sort with dictionaries. The functional operations map, filter, reduce can also be used . -The dictionary can also be used like a stack with push and pop. It can be used to Split , reverse and swap keys and values. -''' -from __future__ import absolute_import - -from .seqvaluedict import seqdict #Sequential Single Value Dictionary -from UserList import UserList - -class MyUserList(UserList): - from UserList import UserList - def __init__(self,parent,liste=None): - UserList.__init__(self,liste) - self.parent = parent #remember parent for call-back - def __delitem__(self, i): - del self.data[i] - if self.data==[]: #call-back, deletes item of parent - index = self.parent.values().index([]) - del self.parent[index:index+1] - -class mseqdict(seqdict): #Sequential Multiple Value Dictionary - def __init__(self,List=[],Dict={}): - self.list = [] - self.dict = {} - if not List: - pass - elif type(List)==type({}): - for key,value in List.items(): - self.__setitem__(key,value) - elif List and not Dict: #dict.items() - for key,value in List: - if isinstance(value,MyUserList): - for v in value: - self.__setitem__(key,v) - else: - self.__setitem__(key,value) - elif type(List)==type(Dict)==type([]): - for key,value in map(None,List,Dict): - self.__setitem__(key,value) - else: - if isinstance(Dict.values()[0],MyUserList): - self.dict = Dict - self.list = List - else: - for key in List: - value = Dict[key] - if type(value)==type([]): - for v in value: - self.__setitem__(key,v) - else: - self.__setitem__(key,value) - def __setitem__(self,key,value): - if key not in self.dict: - self.list.append(key) - if isinstance(value,MyUserList): - self.dict[key] = value - else: - self.dict[key]=MyUserList(self,[value]) - else: - values = self.dict[key] - if isinstance(value,MyUserList): - for v in value: - if not v in values: - values.extend(MyUserList(self,[v])) - else: - if not value in values: - values.extend(MyUserList(self,[value])) - def __delitem__(self, key): - del self.dict[key] - self.list.remove(key) - - def append(self,key,value): - self.__setitem__(key,value) - def __setslice__(self,start,stop,newdict): - start = max(start,0); stop = max(stop,0) - delindexes = [] - for key in newdict.keys(): - if key in self.dict: - index = self.list.index(key) - delindexes.append(index) - if index < start: - start = start - 1 - stop = stop - 1 - elif index >= stop: - pass - else: - stop = stop - 1 - else: - self.dict[key]=UserList(self) - delindexes.sort() - delindexes.reverse() - for index in delindexes: - key = self.list[index] - #del self.dict[key] - del self.list[index] - self.list[start:stop] = newdict.list[:] - self.update(newdict.dict) - def copy(self): - values = map(lambda x:x[:],self.values()) - return self.__class__(self.list,values) - def count(self,value): - vallist = self.dict.values() - return map(lambda x,y=value:x.count(y),vallist).count(1) - def filter(self,function,filtervalues=0): - if filtervalues == 1: #consider key and all keyvalues at once - dict = self.__class__() - for key,values in self.items(): - if function(key,values): - dict[key]=values - return dict - elif filtervalues == 2: #consider key and every keyvalue for itself - dict = self.__class__() - for key,values in self.items(): - for value in values: - if function(key,value): - dict[key]=value - return dict - else: #consider key only - liste=filter(function,self.list) - dict = {} - for i in liste: - dict[i]=self.dict[i] - return self.__class__(liste,dict) - def map(self,function,mapvalues=2): - if mapvalues == 1: #consider key and all keyvalues at once - dict = self.__class__() - for key,values in self.items(): - k,v = function(key,values) - dict[k]=v - return dict - else: #if mapvalues!=1: #consider key and every keyvalue for itself - dict = self.__class__() - for key,values in self.items(): - for value in values: - k,v = function(key,value) - dict[k]=v - return dict - def pop(self,key='...None',value='...None'): - if value=='...None': - if key=='...None': - pos = -1 - key = self.list[pos] - else: - pos = self.list.index(key) - tmp = self.dict[key] - del self.dict[key] - return {self.list.pop(pos):tmp} - else: - val = self.dict[key] - index = val.index(value) - tmp = val[index] - del val[index] - return {key:tmp} - def remove(self,key,value='...None'): - if value=='...None': - del self[key] - else: - index = self[key].index(value) - del self[key][index] - def sort(self,func1=None,func2=None): - if not func1: - self.list.sort() - else: - self.list.sort(*[func1]) - if func2: - for value in self.values(): - value.sort(*[func2]) - - def swap(self): - tmp = self.__class__() - for key,values in self.items(): - for value in values: - tmp[value]=key - self.list,self.dict = tmp.list,tmp.dict - del tmp - - def __repr__(self):return 'mseqdict(\n%s,\n%s)'%(self.list,self.dict) - diff --git a/CondCore/TagCollection/python/seqvaluedict.py b/CondCore/TagCollection/python/seqvaluedict.py deleted file mode 100644 index b91c4fcb32bf7..0000000000000 --- a/CondCore/TagCollection/python/seqvaluedict.py +++ /dev/null @@ -1,175 +0,0 @@ -# Sequential Dictionary Class # -''' -The sequential dictionary is a combination of a list and a dictionary so you can do most operations defined with lists . -seqdict - single value dictionary , keeps one value for one key -''' -from functools import reduce - -class seqdict: - def __init__(self,List=[],Dict={}): - if type(List)==type({}): - self.list = List.keys() - self.dict = List.copy() - elif List and not Dict: - self.list=[] - self.dict={} - for i,j in List: - self.list.append(i) - self.dict[i]=j - elif type(List)==type(Dict)==type([]): - self.list = List - self.dict = {} - for key,value in map(None,List,Dict): - self.dict[key] = value - else: - self.list,self.dict = List[:],Dict.copy() - - def append(self,key,value): - if key in self.dict: - self.list.remove(key) - self.list.append(key) - self.dict[key]=value - def check(self): - if len(self.dict)==len(self.list): - l1=self.list[:];l1.sort() - l2=self.dict.keys();l2.sort() - return l1==l2 - return -1 - def clear(self): - self.list=[];self.dict={} - def copy(self): - if self.__class__ is seqdict: - return self.__class__(self.list,self.dict) - import copy - return copy.copy(self) - def __cmp__(self,other): - return cmp(self.dict,other.dict) or cmp(self.list,other.list) - def __getitem__(self,key): - if type(key)==type([]): - newdict={} - for i in key: - newdict[i]=self.dict[i] - return self.__class__(key,newdict) - return self.dict[key] - def __setitem__(self,key,value): - if key not in self.dict: - self.list.append(key) - self.dict[key]=value - def __delitem__(self, key): - del self.dict[key] - self.list.remove(key) - def __getslice__(self,start,stop): - start = max(start,0); stop = max(stop,0) - newdict = self.__class__() - for key in self.list[start:stop]: - newdict.dict[key]=self.dict[key] - newdict.list[:]=self.list[start:stop] - return newdict - def __setslice__(self,start,stop,newdict): - start = max(start,0); stop = max(stop,0) - delindexes = [] - for key in newdict.keys(): - if key in self.dict: - index = self.list.index(key) - delindexes.append(index) - if index < start: - start = start - 1 - stop = stop - 1 - elif index >= stop: - pass - else: - stop = stop - 1 - delindexes.sort() - delindexes.reverse() - for index in delindexes: - key = self.list[index] - del self.dict[key] - del self.list[index] - for key in self.list[start:stop]: - del self.dict[key] - self.list[start:stop] = newdict.list[:] - self.update(newdict.dict) - def __delslice__(self, start, stop): - start = max(start, 0); stop = max(stop, 0) - for key in self.list[start:stop]: - del self.dict[key] - del self.list[start:stop] - def __add__(self,other): - newdict = self.__class__() - for key,value in self.items()+other.items(): - newdict.append(key,value) - return newdict - def __radd__(self,other): - newdict = self.__class__() - for key,value in other.items()+self.items(): - newdict.append(key,value) - return newdict - def count(self,value): - vallist = self.dict.values() - return vallist.count(value) - def extend(self,other): - self.update(other) - def filter(self,function): - liste=filter(function,self.list) - dict = {} - for i in liste: - dict[i]=self.dict[i] - return self.__class__(liste,dict) - def get(self, key, failobj=None): - return self.dict.get(key, failobj) - def index(self,key):return self.list.index(key) - def insert(self,i,x):self.__setslice__(i,i,x) - def items(self):return map(None,self.list,self.values()) - def has_key(self,key):return key in self.dict - def keys(self):return self.list - def map(self,function): - return self.__class__(map(function,self.items())) - def values(self): - nlist = [] - for key in self.list: - nlist.append(self.dict[key]) - return nlist - def __len__(self):return len(self.list) - def pop(self,key=None): - if key==None: - pos = -1 - key = self.list[pos] - else: - pos = self.list.index(key) - tmp = self.dict[key] - del self.dict[key] - return {self.list.pop(pos):tmp} - def push(self,key,value): - self.append(key,value) - def reduce(self,function,start=None): - return reduce(function,self.items(),start) - def remove(self,key): - del self.dict[key] - self.list.remove(key) - def reverse(self):self.list.reverse() - def sort(self,*args):self.list.sort(*args) - def split(self,function,Ignore=None): - splitdict = seqdict() #self.__class__() - for key in self.list: - skey = function(key) - if skey != Ignore: - if skey not in splitdict: - splitdict[skey] = self.__class__() - splitdict[skey][key] = self.dict[key] - return splitdict - def swap(self): - tmp = self.__class__(map(lambda x_y:(x_y[1],x_y[0]),self.items())) - self.list,self.dict = tmp.list,tmp.dict - def update(self,newdict): - for key,value in newdict.items(): - self.__setitem__(key,value) - def slice(self,From,To=None,Step=1): - From = self.list.index(From) - if To:To = self.list.index(To) - else : - To = From + 1 - List = range(From,To,Step) - def getitem(pos,self=self):return self.list[pos] - return self.__getitem__(map(getitem,List)) - def __repr__(self):return 'seqdict(\n%s,\n%s)'%(self.list,self.dict) - diff --git a/CondCore/TagCollection/python/tagInventory.py b/CondCore/TagCollection/python/tagInventory.py deleted file mode 100644 index 01df3a3659ca2..0000000000000 --- a/CondCore/TagCollection/python/tagInventory.py +++ /dev/null @@ -1,546 +0,0 @@ -from __future__ import absolute_import -import coral -from . import CommonUtils, IdGenerator, Node, DBImpl -class tagInventory(object): - """Class manages tag inventory - """ - def __init__( self , session ): - """Input: coral session handle - """ - self.__session = session - self.__tagInventoryTableName=CommonUtils.inventoryTableName() - self.__tagInventoryIDName=CommonUtils.inventoryIDTableName() - self.__tagInventoryTableColumns = {'tagid':'unsigned long', 'tagname':'string', 'pfn':'string','recordname':'string', 'objectname':'string', 'labelname':'string'} - self.__tagInventoryTableNotNullColumns = ['tagname','pfn','recordname','objectname'] - #self.__tagInventoryTableUniqueColumns = ['tagname'] - self.__tagInventoryTablePK = ('tagid') - def dropme( self ): - """Drop inventory related tables - """ - try: - transaction=self.__session.transaction() - transaction.start(False) - schema = self.__session.nominalSchema() - schema.dropIfExistsTable( self.__tagInventoryIDName ) - schema.dropIfExistsTable( self.__tagInventoryTableName ) - transaction.commit() - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - return - - def existInventoryTable( self ): - """Check if inventory table exists - """ - try: - transaction=self.__session.transaction() - transaction.start(True) - schema = self.__session.nominalSchema() - result=schema.existsTable(self.__tagInventoryTableName) - transaction.commit() - #print result - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - return result - def createInventoryTable( self ): - """Create tag inventory table. Existing table will be deleted. - """ - try: - transaction=self.__session.transaction() - transaction.start() - schema = self.__session.nominalSchema() - schema.dropIfExistsTable( self.__tagInventoryTableName ) - description = coral.TableDescription(); - description.setName( self.__tagInventoryTableName ) - for columnName, columnType in self.__tagInventoryTableColumns.items(): - description.insertColumn(columnName, columnType) - for columnName in self.__tagInventoryTableNotNullColumns : - description.setNotNullConstraint(columnName,True) - #for columnName in self.__tagInventoryTableUniqueColumns : - #description.setUniqueConstraint(columnName) - #combinedunique1=('pfn','recordname','objectname','labelname') - #description.setUniqueConstraint(combinedunique1) - #combinedunique2=('tagname','pfn') - #description.setUniqueConstraint(combinedunique2) - description.setPrimaryKey( self.__tagInventoryTablePK ) - self.__tagInventoryTableHandle = schema.createTable( description ) - self.__tagInventoryTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - #create also the associated id table - generator=IdGenerator.IdGenerator(schema) - generator.createIDTable(self.__tagInventoryIDName,True) - transaction.commit() - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - def addEntry( self, leafNode ): - """Add entry into the inventory.\n - Input: base tag info. If identical data found already exists, do nothing - Output: tagid. if tagid=0, there's no new entry added, i.e.no new tagid - - """ - tagid=0 - transaction=self.__session.transaction() - duplicate=False - try: - transaction.start(True) - schema = self.__session.nominalSchema() - query = schema.tableHandle(self.__tagInventoryTableName).newQuery() - condition='tagname=:tagname' - conditionbindDict=coral.AttributeList() - conditionbindDict.extend('tagname','string') - conditionbindDict['tagname'].setData(leafNode.tagname) - if len(leafNode.pfn)!=0: - condition+=' AND pfn=:pfn' - conditionbindDict.extend('pfn','string') - conditionbindDict['pfn'].setData(leafNode.pfn) - query.setCondition(condition,conditionbindDict) - #duplicate=dbop.existRow(self.__tagInventoryTableName,condition,conditionbindDict) - cursor=query.execute() - while( next(cursor) ): - duplicate=True - tagid=cursor.currentRow()['tagid'].data() - cursor.close() - transaction.commit() - del query - #transaction.commit() - if duplicate is False: - transaction.start(False) - generator=IdGenerator.IdGenerator(schema) - tagid=generator.getNewID(self.__tagInventoryIDName) - tabrowValueDict={'tagid':tagid,'tagname':leafNode.tagname,'objectname':leafNode.objectname,'pfn':leafNode.pfn,'labelname':leafNode.labelname,'recordname':leafNode.recordname} - dbop=DBImpl.DBImpl(schema) - dbop.insertOneRow(self.__tagInventoryTableName, - self.__tagInventoryTableColumns, - tabrowValueDict) - generator.incrementNextID(self.__tagInventoryIDName) - transaction.commit() - return tagid - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def addEntriesReplaceService( self, newservicename ): - """ clone all existing entries only servicename in pfn are different - return collection of new (oldtagid,newtagid) pair - """ - newtaglinks=[] - transaction=self.__session.transaction() - try: - results=[] - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - for columnName in self.__tagInventoryTableColumns: - query.addToOutputList(columnName) - cursor=query.execute() - while next(cursor): - tagid=cursor.currentRow()['tagid'].data() - tagname=cursor.currentRow()['tagname'].data() - pfn=cursor.currentRow()['pfn'].data() - (servicename,schemaname)=pfn.rsplit('/',1) - newpfn=('/').join([newservicename,schemaname]) - #k=(' ').join([tagname,newpfn]) - objname=cursor.currentRow()['objectname'].data() - redname=cursor.currentRow()['recordname'].data() - labname=cursor.currentRow()['labelname'].data() - #return a tuple - r=(tagid,tagname,newpfn,objname,redname,labname) - results.append(r) - transaction.commit() - del query - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - inv=tagInventory(self.__session) - try: - for r in results: - nd=Node.LeafNode() - oldtagid=r[0] - nd.tagname=r[1] - nd.pfn=r[2] - nd.objectname=r[3] - nd.recordname=r[4] - #if not r.items()[1][2] is None: - nd.labelname=r[5] - n=inv.addEntry(nd) - if n==0: - raise "addEntry returns 0" - newtaglinks.append((oldtagid,n)) - return newtaglinks - except Exception as e: - print str(e) - raise Exception(str(e)) - - def modifyEntriesReplaceService( self, newservicename ): - """ replace all existing entries replace service name in pfn - no change in other parameters - """ - transaction=self.__session.transaction() - try: - allpfns=[] - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - query.addToOutputList('pfn') - cursor=query.execute() - while next(cursor): - pfn=cursor.currentRow()['pfn'].data() - allpfns.append(pfn) - transaction.commit() - del query - except Exception as er: - transaction.rollback() - del query - raise Exception(str(er)) - try: - transaction.start(False) - editor = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).dataEditor() - inputData = coral.AttributeList() - inputData.extend('newpfn','string') - inputData.extend('oldpfn','string') - for pfn in allpfns: - (servicename,schemaname)=pfn.rsplit('/',1) - newpfn=('/').join([newservicename,schemaname]) - inputData['newpfn'].setData(newpfn) - inputData['oldpfn'].setData(pfn) - editor.updateRows( "pfn = :newpfn", "pfn = :oldpfn", inputData ) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def cloneEntry( self, sourcetagid, pfn ): - """ clone an existing entry with different pfn parameter - Input: sourcetagid, pfn. - Output: tagid of the new entry. Return 0 in case no new entry created or required entry already exists. - """ - newtagid=sourcetagid - if len(pfn)==0: - return newtagid - try: - nd=self.getEntryById(sourcetagid) - if nd.tagid==0: - return newtagid - oldpfn=nd.pfn - if oldpfn==pfn: - return nd.tagid - transaction=self.__session.transaction() - transaction.start(False) - schema = self.__session.nominalSchema() - generator=IdGenerator.IdGenerator(schema) - newtagid=generator.getNewID(self.__tagInventoryIDName) - tabrowValueDict={'tagid':newtagid,'tagname':nd.tagname,'objectname':nd.objectname,'pfn':pfn,'labelname':nd.labelname,'recordname':nd.recordname} - dbop=DBImpl.DBImpl(schema) - dbop.insertOneRow(self.__tagInventoryTableName, - self.__tagInventoryTableColumns, - tabrowValueDict) - generator.incrementNextID(self.__tagInventoryIDName) - transaction.commit() - return newtagid - except Exception as er: - transaction.rollback() - raise Exception(str(er)) - - def getEntryByName( self, tagName, pfn ): - """Get basic tag from inventory by tagName+pfn. pfn can be empty\n - Input: tagname,pfn - Output: leafNode - throw if more than one entry is found. - """ - leafnode = Node.LeafNode() - transaction=self.__session.transaction() - try: - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - for columnName in self.__tagInventoryTableColumns: - query.addToOutputList(columnName) - conditionData = coral.AttributeList() - condition = "tagname=:tagname" - conditionData.extend( 'tagname','string' ) - conditionData['tagname'].setData(tagName) - if len(pfn)!=0 : - condition += " AND pfn=:pfn" - conditionData.extend( 'pfn','string' ) - conditionData['pfn'].setData(pfn) - query.setCondition(condition,conditionData) - cursor = query.execute() - counter=0 - while ( next(cursor) ): - if counter > 0 : - raise ValueError("tagName "+tagName+" is not unique, please further specify parameter pfn") - counter+=1 - leafnode.tagid=cursor.currentRow()['tagid'].data() - leafnode.tagname=cursor.currentRow()['tagname'].data() - leafnode.objectname=cursor.currentRow()['objectname'].data() - leafnode.pfn=cursor.currentRow()['pfn'].data() - leafnode.labelname=cursor.currentRow()['labelname'].data() - leafnode.recordname=cursor.currentRow()['recordname'].data() - transaction.commit() - del query - return leafnode - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def getEntryById( self, tagId ): - """Get basic tag from inventory by id.\n - Input: tagid - Output: leafNode - """ - leafnode = Node.LeafNode() - transaction=self.__session.transaction() - try: - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - for columnName in self.__tagInventoryTableColumns: - query.addToOutputList(columnName) - condition = "tagid=:tagid" - conditionData = coral.AttributeList() - conditionData.extend( 'tagid','unsigned long' ) - conditionData['tagid'].setData(tagId) - query.setCondition( condition, conditionData) - cursor = query.execute() - while ( next(cursor) ): - #print 'got it' - leafnode.tagid=cursor.currentRow()['tagid'].data() - leafnode.tagname=cursor.currentRow()['tagname'].data() - leafnode.objectname=cursor.currentRow()['objectname'].data() - leafnode.pfn=cursor.currentRow()['pfn'].data() - leafnode.labelname=cursor.currentRow()['labelname'].data() - leafnode.recordname=cursor.currentRow()['recordname'].data() - transaction.commit() - del query - return leafnode - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def getAllEntries( self ): - """Get all entries in the inventory - Output: list of leafNode objects - """ - result=[] - transaction=self.__session.transaction() - try: - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - for columnName in self.__tagInventoryTableColumns: - query.addToOutputList(columnName) - cursor = query.execute() - while ( next(cursor) ): - leafnode = Node.LeafNode() - leafnode.tagid=cursor.currentRow()['tagid'].data() - leafnode.tagname=cursor.currentRow()['tagname'].data() - leafnode.objectname=cursor.currentRow()['objectname'].data() - leafnode.pfn=cursor.currentRow()['pfn'].data() - leafnode.recordname=cursor.currentRow()['recordname'].data() - leafnode.labelname=cursor.currentRow()['labelname'].data() - result.append(leafnode) - transaction.commit() - del query - return result - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - def getIDsByName( self, name ): - """get tagids correspond to a given tag name - """ - transaction=self.__session.transaction() - ids=[] - try: - transaction.start(True) - query = self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).newQuery() - condition='tagname = :tagname' - conditionBindData=coral.AttributeList() - conditionBindData.extend('tagname','string') - conditionBindData['tagname'].setData(name) - query.addToOutputList(tagid) - query.setCondition(condition,conditionBindData) - cursor = query.execute() - while ( next(cursor) ): - tagid=cursor.currentRow()['tagid'].data() - ids.append(tagid) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - return ids - def deleteAllEntries( self ): - """Delete all entries in the inventory - """ - transaction=self.__session.transaction() - try: - transaction.start(False) - schema = self.__session.nominalSchema() - dbop=DBImpl.DBImpl(schema) - inputData = coral.AttributeList() - dbop.deleteRows(self.__tagInventoryTableName, - '', - inputData) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def deleteEntryByName( self, tagname ): - """Delete entry with given tag name - """ - try: - transaction=self.__session.transaction() - transaction.start(False) - schema = self.__session.nominalSchema() - dbop=DBImpl.DBImpl(schema) - inputData = coral.AttributeList() - inputData.extend( "tagname","string" ) - inputData[0].setData(tagname) - dbop.deleteRows(self.__tagInventoryTableName, - 'tagname=:tagname', - inputData) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def replaceTagLabel( self, tagname, label ): - """Replace the run time label of the given tag - """ - try: - transaction=self.__session.transaction() - transaction.start(False) - schema = self.__session.nominalSchema() - inputData = coral.AttributeList() - inputData.extend( "labelname","string" ) - inputData.extend( "tagname", "string" ) - inputData[0].setData(label) - inputData[1].setData(tagname) - editor = schema.tableHandle(self.__tagInventoryTableName).dataEditor() - editor.updateRows( "labelname=:labelname", "tagname=:tagname", inputData ) - transaction.commit() - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - - def bulkInsertEntries( self, entries ): - """insert a chunk of entries. - Input: entries [{tagid:unsigned long, tagname:string , pfn:string , recordname:string , objectname:string, labelname:string }] - Output: {oldtagid:newtagid} of the inserted entries. If tag already exists, old tagid is returned - """ - transaction=self.__session.transaction() - results={} - ihad=[] - try: - if self.existInventoryTable(): - ihad=self.getAllEntries() - else: - self.createInventoryTable() - #clean input list removing duplicates - for e in entries: - for n in ihad: - if n.tagname==e['tagname'] and n.pfn==e['pfn']: - results[n.tagid]=n.tagid - entries.remove(e) - transaction.start(False) - query=self.__session.nominalSchema().tableHandle(self.__tagInventoryIDName).newQuery() - query.addToOutputList('nextID') - query.setForUpdate() - cursor = query.execute() - nextid=0 - while next(cursor): - nextid=cursor.currentRow()[0].data() - idEditor = self.__session.nominalSchema().tableHandle(self.__tagInventoryIDName).dataEditor() - inputData = coral.AttributeList() - inputData.extend( 'delta', 'unsigned long' ) - - delta=len(entries) - if nextid==0: - nextid=1 - delta=1 - - inputData['delta'].setData(delta) - idEditor.updateRows('nextID = nextID + :delta','',inputData) - - dataEditor=self.__session.nominalSchema().tableHandle(self.__tagInventoryTableName).dataEditor() - insertdata=coral.AttributeList() - insertdata.extend('tagid','unsigned long') - insertdata.extend('tagname','string') - insertdata.extend('pfn','string') - insertdata.extend('recordname','string') - insertdata.extend('objectname','string') - insertdata.extend('labelname','string') - bulkOperation=dataEditor.bulkInsert(insertdata,delta) - for entry in entries: - insertdata['tagid'].setData(nextid) - insertdata['tagname'].setData(entry['tagname']) - insertdata['pfn'].setData(entry['pfn']) - insertdata['recordname'].setData(entry['recordname']) - insertdata['objectname'].setData(entry['objectname']) - insertdata['labelname'].setData(entry['labelname']) - bulkOperation.processNextIteration() - results[entry['tagid']]=nextid - nextid=nextid+1 - bulkOperation.flush() - transaction.commit() - del bulkOperation - del query - return results - except Exception as e: - transaction.rollback() - raise Exception(str(e)) - -if __name__ == "__main__": - #context = coral.Context() - #context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - session = svc.connect( 'sqlite_file:testInventory.db', - accessMode = coral.access_Update ) - try: - inv=tagInventory(session) - inv.createInventoryTable() - tagentry=Node.LeafNode() - tagentry.tagname='ecalpedestalsfromonline' - tagentry.objectname='EcalPedestals' - tagentry.pfn='oracle://devdb10/CMS_COND_ECAL' - tagentry.recordname='EcalPedestalsRcd' - tagentry.labelname='' - inv.addEntry(tagentry) - tagentry.tagname='crap' - tagentry.objectname='MyPedestals' - tagentry.pfn='oracle://devdb10/CMS_COND_ME' - tagentry.recordname='MyPedestalsRcd' - tagentry.labelname='mylabel' - inv.addEntry(tagentry) - result=inv.getAllEntries() - print 'get all##\t',result - result=inv.getEntryByName('ecalpedestalsfromonline','oracle://devdb10/CMS_COND_ECAL') - print 'get ecalpedestalsfromonline##\t',result - result=inv.getEntryByName('crap','oracle://devdb10/CMS_COND_ME') - print 'get crap##\t',result - result=inv.getEntryById(0) - print 'get by id 0##\t',result - inv.deleteEntryByName('ecalpedestalsfromonline') - print 'TESTING getEntryByName' - result=inv.getEntryByName('ecalpedestalsfromonline','oracle://devdb10/CMS_COND_ECAL') - print 'get ecalpedestalsfromonline##\t',result - result=inv.getEntryByName('crap','oracle://devdb10/CMS_COND_ME') - print 'get crap##\t',result - print 'TESTING cloneEntry' - newid=inv.cloneEntry(result.tagid,'fontier://crap/crap') - print 'newid ',newid - print 'TESTING addEntriesReplaceService' - newtagids=inv.addEntriesReplaceService('oracle://cms_orcoff_int') - print 'new tag ids ',newtagids - print 'TESTING modifyEntriesReplaceService' - inv.modifyEntriesReplaceService('oracle://cms_orcoff_int9r') - print 'TESTING bulkInsertEntries' - entries=[] - entries.append({'tagid':10,'tagname':'tag1','pfn':'dbdb','recordname':'myrcd','objectname':'bobo','labelname':''}) - entries.append({'tagid':11,'tagname':'tag2','pfn':'dbdb','recordname':'mdrcd','objectname':'bobo','labelname':''}) - entries.append({'tagid':12,'tagname':'tag3','pfn':'dbdb','recordname':'ndrcd','objectname':'bobo','labelname':''}) - entries.append({'tagid':13,'tagname':'tag4','pfn':'dbdb','recordname':'ndrcd','objectname':'bobo','labelname':''}) - a=inv.bulkInsertEntries(entries) - print a - del session - - except Exception as e: - print "Failed in unit test" - print str(e) - del session - diff --git a/CondCore/TagCollection/scripts/CRUZET3_V2H.conf b/CondCore/TagCollection/scripts/CRUZET3_V2H.conf deleted file mode 100644 index aa3e3e7e17a01..0000000000000 --- a/CondCore/TagCollection/scripts/CRUZET3_V2H.conf +++ /dev/null @@ -1,152 +0,0 @@ -[COMMON] -connect=sqlite_file:dbtoconf.db -#connect=oracle://cms_orcoff_int2r/CMS_COND_20X_GLOBALTAG -#connect=oracle://cms_orcon_prod/CMS_COND_20X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - Tracker_Geometry_CRUZET3{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=TrackerAlignmentRcd}; - Tracker_GeometryErr_CRUZET3{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTAlignmentRcd_CRUZET2_V3_data{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=DTAlignmentRcd}; - DTAlignmentErrorRcd_CRUZET2_V3_data{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCAlignmentRcd_CRUZET2_V3_data{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCAlignmentErrorRcd_CRUZET2_V3_data{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=GlobalPositionRcd}; - V2_trivial_TBuffer_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - trivial_LorentzAngle_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiStripGain_Ideal_20X{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripNoise_TKCC_20X_v3_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripPedestals_TKCC_20X_v3_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripLorentzAngle_Ideal_20X{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripBadChannel_TKCC_20X_v3_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - t0_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT,objectname=DTT0,recordname=DTT0Rcd}; - tTrig_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT,objectname=DTTtrig,recordname=DTTtrigRcd}; - dead_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - noise_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - CSCDBGains_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCChamberIndex{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCChamberIndex,recordname=CSCChamberIndexRcd}; - CSCDDUMap{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - hcal_pedestals_fC_v6.00_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - hcal_widths_fC_v6.00_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - official_emap_v5.01{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - hcal_gains_v2.00_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - qie_normalmode_v6.00{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - hcal_respcorr_trivial_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - EcalPedestals_v2_online{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_CosmGain200{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_FromCruzet3_v1_online{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_TestPulse_online{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstants_CosmGain200{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_1_8_0_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - EarlyCollision_5p3cm_mc{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - SiPixelFedCablingMap_PIB_fed20ch10{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_TKCC_20X_v3_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - map_CRUZET{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CSCTPParameters_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1CSCTPParameters,recordname=L1CSCTPParametersRcd}; - L1EmEtScale_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctJetCounterNegativeEta_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GctJetCounterSetup,recordname=L1GctJetCounterNegativeEtaRcd}; - L1GctJetCounterPositiveEta_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GctJetCounterSetup,recordname=L1GctJetCounterPositiveEtaRcd}; - L1GctJetEtCalibrationFunction_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GctJetEtCalibrationFunction,recordname=L1GctJetCalibFunRcd}; - L1GctJetFinderParams_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtStableParameters_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1JetEtScale_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuDTEtaPatternLut_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuGMTParameters_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1RCTParameters_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1TriggerKeyList_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - L1TriggerKey_CRUZET_hlt{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd} - -[TAGTREE CRUZET3_V2H] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=Tracker_Geometry_CRUZET3,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - TrackerGeometryErrors{parent=Calibration,tagname=Tracker_GeometryErr_CRUZET3,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - DTGeometry{parent=Calibration,tagname=DTAlignmentRcd_CRUZET2_V3_data,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - DTGeometryErrors{parent=Calibration,tagname=DTAlignmentErrorRcd_CRUZET2_V3_data,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - CSCGeometry{parent=Calibration,tagname=CSCAlignmentRcd_CRUZET2_V3_data,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCAlignmentErrorRcd_CRUZET2_V3_data,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT}; - PixelGain{parent=Calibration,tagname=V2_trivial_TBuffer_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL}; - PixelLangle{parent=Calibration,tagname=trivial_LorentzAngle_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripGain_Ideal_20X,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - SiStripNoise{parent=Calibration,tagname=SiStripNoise_TKCC_20X_v3_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_TKCC_20X_v3_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_Ideal_20X,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - SiStripBad{parent=Calibration,tagname=SiStripBadChannel_TKCC_20X_v3_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - DTT0{parent=Calibration,tagname=t0_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT}; - DTTrig{parent=Calibration,tagname=tTrig_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT}; - DTDeadFlag{parent=Calibration,tagname=dead_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT}; - DTStatusFlag{parent=Calibration,tagname=noise_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT}; - CSCGain{parent=Calibration,tagname=CSCDBGains_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCChambIndex{parent=Calibration,tagname=CSCChamberIndex,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - HCALPedestals{parent=Calibration,tagname=hcal_pedestals_fC_v6.00_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=hcal_widths_fC_v6.00_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - HCALEmap{parent=Calibration,tagname=official_emap_v5.01,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - HCALGain{parent=Calibration,tagname=hcal_gains_v2.00_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - HCALQie{parent=Calibration,tagname=qie_normalmode_v6.00,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=hcal_respcorr_trivial_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_v2_online,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_CosmGain200,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_FromCruzet3_v1_online,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_TestPulse_online,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_CosmGain200,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_1_8_0_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=EarlyCollision_5p3cm_mc,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_BEAMSPOT}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_PIB_fed20ch10,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_PIXEL}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_TKCC_20X_v3_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_STRIP}; - DTROMap{parent=Calibration,tagname=map_CRUZET,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_CSC}; - L1CSCTPParameters{parent=Calibration,tagname=L1CSCTPParameters_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GctJetCounterNegativeEta{parent=Calibration,tagname=L1GctJetCounterNegativeEta_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GctJetCounterPositiveEta{parent=Calibration,tagname=L1GctJetCounterPositiveEta_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GctJetEtCalibrationFunction{parent=Calibration,tagname=L1GctJetEtCalibrationFunction_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_CRUZET_hlt,pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_L1T} diff --git a/CondCore/TagCollection/scripts/CRUZET3_V2P.conf b/CondCore/TagCollection/scripts/CRUZET3_V2P.conf deleted file mode 100644 index a319e4c806f4e..0000000000000 --- a/CondCore/TagCollection/scripts/CRUZET3_V2P.conf +++ /dev/null @@ -1,152 +0,0 @@ -[COMMON] -connect=sqlite_file:CRUZET3.db -#connect=oracle://cms_orcoff_int2r/CMS_COND_20X_GLOBALTAG -#connect=oracle://cms_orcon_prod/CMS_COND_20X_GLOBALTAG - -[TAGINVENTORY] -tagdata= - Tracker_Geometry_CRUZET3{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=TrackerAlignmentRcd}; - Tracker_GeometryErr_CRUZET3{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=TrackerAlignmentErrorRcd}; - DTAlignmentRcd_CRUZET2_V3_data{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=DTAlignmentRcd}; - DTAlignmentErrorRcd_CRUZET2_V3_data{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=DTAlignmentErrorRcd}; - CSCAlignmentRcd_CRUZET2_V3_data{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=CSCAlignmentRcd}; - CSCAlignmentErrorRcd_CRUZET2_V3_data{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=AlignmentErrors,recordname=CSCAlignmentErrorRcd}; - IdealGeometry{pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=GlobalPositionRcd}; - V2_trivial_TBuffer_mc{pfn=frontier://PromptProd/CMS_COND_20X_PIXEL,objectname=SiPixelGainCalibrationOffline,recordname=SiPixelGainCalibrationOfflineRcd}; - trivial_LorentzAngle_mc{pfn=frontier://PromptProd/CMS_COND_20X_PIXEL,objectname=SiPixelLorentzAngle,recordname=SiPixelLorentzAngleRcd}; - SiStripGain_Ideal_20X{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStripNoise_TKCC_20X_v3_hlt{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripNoises,recordname=SiStripNoisesRcd}; - SiStripPedestals_TKCC_20X_v3_hlt{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripPedestals,recordname=SiStripPedestalsRcd}; - SiStripLorentzAngle_Ideal_20X{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd}; - SiStripBadChannel_TKCC_20X_v3_hlt{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripBadStrip,recordname=SiStripBadChannelRcd}; - t0_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_DT,objectname=DTT0,recordname=DTT0Rcd}; - tTrig_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_DT,objectname=DTTtrig,recordname=DTTtrigRcd}; - dead_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_DT,objectname=DTDeadFlag,recordname=DTDeadFlagRcd}; - noise_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_DT,objectname=DTStatusFlag,recordname=DTStatusFlagRcd}; - CSCDBGains_mc{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCDBGains,recordname=CSCDBGainsRcd}; - CSCDBNoiseMatrix_mc{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd}; - CSCDBCrosstalk_mc{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd}; - CSCDBPedestals_mc{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd}; - CSCChamberIndex{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCChamberIndex,recordname=CSCChamberIndexRcd}; - CSCDDUMap{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCDDUMap,recordname=CSCDDUMapRcd}; - hcal_pedestals_fC_v6.00_hlt{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd}; - hcal_widths_fC_v6.00_hlt{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd}; - official_emap_v5.01{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd}; - hcal_gains_v2.00_hlt{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd}; - qie_normalmode_v6.00{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd}; - hcal_respcorr_trivial_mc{pfn=frontier://PromptProd/CMS_COND_20X_HCAL,objectname=HcalRespCorrs,recordname=HcalRespCorrsRcd}; - EcalPedestals_v2_online{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalPedestals,recordname=EcalPedestalsRcd}; - EcalADCToGeVConstant_CosmGain200{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd}; - EcalChannelStatus_FromCruzet3_v1_online{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalChannelStatus,recordname=EcalChannelStatusRcd}; - EcalGainRatios_TestPulse_online{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd}; - EcalIntercalibConstants_CosmGain200{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibConstantsRcd}; - EcalIntercalibErrors_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalIntercalibErrorsRcd}; - EcalWeightXtalGroups_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd}; - EcalTBWeights_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd}; - EcalLaserAlphas_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAlphasRcd}; - EcalLaserAPDPNRatios_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd}; - EcalLaserAPDPNRatiosRef_mc{pfn=frontier://PromptProd/CMS_COND_20X_ECAL,objectname=EcalFloatCondObjectContainer,recordname=EcalLaserAPDPNRatiosRefRcd}; - probBTagPDF2D_tag_mc{pfn=frontier://PromptProd/CMS_COND_20X_BTAU,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability2DRcd}; - probBTagPDF3D_tag_mc{pfn=frontier://PromptProd/CMS_COND_20X_BTAU,objectname=TrackProbabilityCalibration,recordname=BTagTrackProbability3DRcd}; - MVAJetTags_CMSSW_1_8_0_mc{pfn=frontier://PromptProd/CMS_COND_20X_BTAU,objectname=MVAComputerContainer,recordname=BTauGenericMVAJetTagComputerRcd}; - EarlyCollision_5p3cm_mc{pfn=frontier://PromptProd/CMS_COND_20X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd}; - SiPixelFedCablingMap_PIB_fed20ch10{pfn=frontier://PromptProd/CMS_COND_20X_PIXEL,objectname=SiPixelFedCablingMap,recordname=SiPixelFedCablingMapRcd}; - SiStripFedCabling_TKCC_20X_v3_hlt{pfn=frontier://PromptProd/CMS_COND_20X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd}; - map_CRUZET{pfn=frontier://PromptProd/CMS_COND_20X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd}; - RPCEMap_v2{pfn=frontier://PromptProd/CMS_COND_20X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd}; - CSCChamberMap{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCChamberMap,recordname=CSCChamberMapRcd}; - CSCCrateMap{pfn=frontier://PromptProd/CMS_COND_20X_CSC,objectname=CSCCrateMap,recordname=CSCCrateMapRcd}; - L1CSCTPParameters_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1CSCTPParameters,recordname=L1CSCTPParametersRcd}; - L1EmEtScale_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1CaloEtScale,recordname=L1EmEtScaleRcd}; - L1GctJetCounterNegativeEta_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GctJetCounterSetup,recordname=L1GctJetCounterNegativeEtaRcd}; - L1GctJetCounterPositiveEta_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GctJetCounterSetup,recordname=L1GctJetCounterPositiveEtaRcd}; - L1GctJetEtCalibrationFunction_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GctJetEtCalibrationFunction,recordname=L1GctJetCalibFunRcd}; - L1GctJetFinderParams_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GctJetFinderParams,recordname=L1GctJetFinderParamsRcd}; - L1GtBoardMaps_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GtBoardMaps,recordname=L1GtBoardMapsRcd}; - L1GtParameters_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GtParameters,recordname=L1GtParametersRcd}; - L1GtStableParameters_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1GtStableParameters,recordname=L1GtStableParametersRcd}; - L1JetEtScale_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1CaloEtScale,recordname=L1JetEtScaleRcd}; - L1MuDTEtaPatternLut_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuDTEtaPatternLut,recordname=L1MuDTEtaPatternLutRcd}; - L1MuDTExtLut_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuDTExtLut,recordname=L1MuDTExtLutRcd}; - L1MuDTPhiLut_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuDTPhiLut,recordname=L1MuDTPhiLutRcd}; - L1MuDTPtaLut_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuDTPtaLut,recordname=L1MuDTPtaLutRcd}; - L1MuDTQualPatternLut_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuDTQualPatternLut,recordname=L1MuDTQualPatternLutRcd}; - L1MuGMTParameters_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1MuGMTParameters,recordname=L1MuGMTParametersRcd}; - L1RCTParameters_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1RCTParameters,recordname=L1RCTParametersRcd}; - L1TriggerKeyList_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1TriggerKeyList,recordname=L1TriggerKeyListRcd}; - L1TriggerKey_CRUZET_hlt{pfn=frontier://PromptProd/CMS_COND_20X_L1T,objectname=L1TriggerKey,recordname=L1TriggerKeyRcd} - -[TAGTREE CRUZET3_V2P] -root=All -nodedata=Calibration{parent=All} -leafdata= - TrackerGeometry{parent=Calibration,tagname=Tracker_Geometry_CRUZET3,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - TrackerGeometryErrors{parent=Calibration,tagname=Tracker_GeometryErr_CRUZET3,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - DTGeometry{parent=Calibration,tagname=DTAlignmentRcd_CRUZET2_V3_data,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - DTGeometryErrors{parent=Calibration,tagname=DTAlignmentErrorRcd_CRUZET2_V3_data,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - CSCGeometry{parent=Calibration,tagname=CSCAlignmentRcd_CRUZET2_V3_data,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - CSCGeometryErrors{parent=Calibration,tagname=CSCAlignmentErrorRcd_CRUZET2_V3_data,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - GlobalPosition{parent=Calibration,tagname=IdealGeometry,pfn=frontier://PromptProd/CMS_COND_20X_ALIGNMENT}; - PixelGain{parent=Calibration,tagname=V2_trivial_TBuffer_mc,pfn=frontier://PromptProd/CMS_COND_20X_PIXEL}; - PixelLangle{parent=Calibration,tagname=trivial_LorentzAngle_mc,pfn=frontier://PromptProd/CMS_COND_20X_PIXEL}; - SiStripGain{parent=Calibration,tagname=SiStripGain_Ideal_20X,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - SiStripNoise{parent=Calibration,tagname=SiStripNoise_TKCC_20X_v3_hlt,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - SiStripPedestals{parent=Calibration,tagname=SiStripPedestals_TKCC_20X_v3_hlt,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - SiStripLangle{parent=Calibration,tagname=SiStripLorentzAngle_Ideal_20X,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - SiStripBad{parent=Calibration,tagname=SiStripBadChannel_TKCC_20X_v3_hlt,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - DTT0{parent=Calibration,tagname=t0_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_DT}; - DTTrig{parent=Calibration,tagname=tTrig_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_DT}; - DTDeadFlag{parent=Calibration,tagname=dead_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_DT}; - DTStatusFlag{parent=Calibration,tagname=noise_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_DT}; - CSCGain{parent=Calibration,tagname=CSCDBGains_mc,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_mc,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_mc,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_mc,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCChambIndex{parent=Calibration,tagname=CSCChamberIndex,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCDDUMap{parent=Calibration,tagname=CSCDDUMap,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - HCALPedestals{parent=Calibration,tagname=hcal_pedestals_fC_v6.00_hlt,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - HCALPedWidths{parent=Calibration,tagname=hcal_widths_fC_v6.00_hlt,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - HCALEmap{parent=Calibration,tagname=official_emap_v5.01,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - HCALGain{parent=Calibration,tagname=hcal_gains_v2.00_hlt,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - HCALQie{parent=Calibration,tagname=qie_normalmode_v6.00,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - HCALRespCorr{parent=Calibration,tagname=hcal_respcorr_trivial_mc,pfn=frontier://PromptProd/CMS_COND_20X_HCAL}; - ECALPedestals{parent=Calibration,tagname=EcalPedestals_v2_online,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_CosmGain200,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALChanStatus{parent=Calibration,tagname=EcalChannelStatus_FromCruzet3_v1_online,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_TestPulse_online,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_CosmGain200,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALInterCalibErrors{parent=Calibration,tagname=EcalIntercalibErrors_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_mc,pfn=frontier://PromptProd/CMS_COND_20X_ECAL}; - BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag_mc,pfn=frontier://PromptProd/CMS_COND_20X_BTAU}; - BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag_mc,pfn=frontier://PromptProd/CMS_COND_20X_BTAU}; - BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_1_8_0_mc,pfn=frontier://PromptProd/CMS_COND_20X_BTAU}; - BEAMSPOT{parent=Calibration,tagname=EarlyCollision_5p3cm_mc,pfn=frontier://PromptProd/CMS_COND_20X_BEAMSPOT}; - SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_PIB_fed20ch10,pfn=frontier://PromptProd/CMS_COND_20X_PIXEL}; - SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_TKCC_20X_v3_hlt,pfn=frontier://PromptProd/CMS_COND_20X_STRIP}; - DTROMap{parent=Calibration,tagname=map_CRUZET,pfn=frontier://PromptProd/CMS_COND_20X_DT}; - RPCCabling{parent=Calibration,tagname=RPCEMap_v2,pfn=frontier://PromptProd/CMS_COND_20X_RPC}; - CSCChambMap{parent=Calibration,tagname=CSCChamberMap,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - CSCCrateMap{parent=Calibration,tagname=CSCCrateMap,pfn=frontier://PromptProd/CMS_COND_20X_CSC}; - L1CSCTPParameters{parent=Calibration,tagname=L1CSCTPParameters_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1EmEtScale{parent=Calibration,tagname=L1EmEtScale_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GctJetCounterNegativeEta{parent=Calibration,tagname=L1GctJetCounterNegativeEta_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GctJetCounterPositiveEta{parent=Calibration,tagname=L1GctJetCounterPositiveEta_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GctJetEtCalibrationFunction{parent=Calibration,tagname=L1GctJetEtCalibrationFunction_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GctJetFinderParams{parent=Calibration,tagname=L1GctJetFinderParams_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GtBoardMaps{parent=Calibration,tagname=L1GtBoardMaps_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GtParameters{parent=Calibration,tagname=L1GtParameters_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1GtStableParameters{parent=Calibration,tagname=L1GtStableParameters_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1JetEtScale{parent=Calibration,tagname=L1JetEtScale_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuDTEtaPatternLut{parent=Calibration,tagname=L1MuDTEtaPatternLut_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuDTExtLut{parent=Calibration,tagname=L1MuDTExtLut_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuDTPhiLut{parent=Calibration,tagname=L1MuDTPhiLut_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuDTPtaLut{parent=Calibration,tagname=L1MuDTPtaLut_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuDTQualPatternLut{parent=Calibration,tagname=L1MuDTQualPatternLut_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1MuGMTParameters{parent=Calibration,tagname=L1MuGMTParameters_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1RCTParameters{parent=Calibration,tagname=L1RCTParameters_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1TriggerKeyList{parent=Calibration,tagname=L1TriggerKeyList_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T}; - L1TriggerKey{parent=Calibration,tagname=L1TriggerKey_CRUZET_hlt,pfn=frontier://PromptProd/CMS_COND_20X_L1T} diff --git a/CondCore/TagCollection/scripts/cmscond_schema_globaltag b/CondCore/TagCollection/scripts/cmscond_schema_globaltag deleted file mode 100755 index 420a5c45c208c..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_schema_globaltag +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env python -import os,coral -from optparse import OptionParser, Option, OptionValueError -from CondCore.TagCollection import tagInventory,TagTree,CommonUtils - -class globaltagSchemaCreator: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file. - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -C, --create: create tables. - -D, --drop: drop tables related to tree with given name. - -T, --Tree=treename: - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='' - self.__verbose=False - self.__mode=0 # 1 is to create; -1 is to drop - self.__treename='' - - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB.") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-C","--create",action="store_true",dest="create",help="create tables. With -T option, it creates tables related to the given tree and inventory tables are created if not existant; with no -T option, only inventory tables are created ") - self.__parser.add_option("-D","--drop",action="store_true",dest="drop",help="drop tables. With -T option, tables related to the given tree are droped; with no -T option, all tables are droped.") - self.__parser.add_option("-T","--tree",action="store",dest="treename",help="treename") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(create=False) - self.__parser.set_defaults(drop=False) - self.__parser.set_defaults(treename='') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not options.connectstring: - raise OptionValueError("option -%s is required"%('c')) - self.__connectstring=self.__parser.values.connectstring - - if not options.drop and not options.create: - raise OptionValueError("option -%s or -%s is required"%('C','D')) - if options.drop and options.create: - raise OptionValueError("option -%s and -%s are exclusive"%('C','D')) - if options.drop: - self.__mode=-1 - if options.create: - self.__mode=1 - if options.treename: - self.__treename=self.__parser.values.treename - - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - else: - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__verbose=self.__parser.values.verbose - - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - if self.__mode==-1: - if len(self.__treename)!=0: - print 'Drop tables related to '+self.__treename - else: - print 'Drop all tables' - else: - if len(self.__treename)!=0: - print 'Create tables related to '+self.__treename - else: - print 'Create tag inventory tables' - - def act(self): - """Do action - """ - svc = coral.ConnectionService() - session=svc.connect(self.__connectstring,accessMode=coral.access_Update) - if self.__mode==1: #create - inv=tagInventory.tagInventory(session) - if inv.existInventoryTable() is False: - inv.createInventoryTable() - if len(self.__treename)!=0: - tt=TagTree.tagTree(session,self.__treename) - if tt.existTagTreeTable() is False: - tt.createTagTreeTable() - else: - print 'tree '+treename+' already exists. Do nothing' - return - if self.__mode==-1: #drop - if len(self.__treename) != 0: - tt=TagTree.tagTree(session,self.__treename) - tt.deleteSubtree('ROOT') - else: - #delete inventory and all trees - inv=tagInventory.tagInventory(session) - inv.dropme() - CommonUtils.dropAllTreeTables(session) - del session -if __name__ == "__main__": - schemamanager=globaltagSchemaCreator() - schemamanager.parsecmdln() - schemamanager.act() diff --git a/CondCore/TagCollection/scripts/cmscond_tagdb_export b/CondCore/TagCollection/scripts/cmscond_tagdb_export deleted file mode 100755 index 525b44b774349..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagdb_export +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python -import coral -from optparse import OptionParser, Option, OptionValueError -from CondCore.TagCollection import DBCopy,tagInventory,TagTree - -class tagdbExporter: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -s, --source=source: source db connect string (required). - -d, --dest=dest: destination db connect string (required). - -P, --path=authpath: path to authentication file - -a, --all: copy all tag db, existing tag db content is wiped.(default if no -a, -I, -T options are specified) - -I, --inventory: copy only the inventory, existing inventoru is wiped. - -T, --tree=tree: copy selected tree. Inventory is updated accordingly. - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser(option_class=MyOption) - self.__source='' - self.__dest='' - self.__all=False - self.__inv=False - self.__tree='' - self.__authpath='' - self.__verbose=False - - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-s","--source",action="store",dest="source",type="string",help="source db connect string (required)") - self.__parser.add_option("-d","--dest",action="store",dest="dest",type="string",help="destination db connect string (required).") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication file") - self.__parser.add_option("-a","--all",action="store_true",dest="all",help="copy all tag db, existing tag db content is wiped.(default if no -a, -I, -T options are specified)") - self.__parser.add_option("-I","--inventory",action="store_true",dest="inventory",help="copy only the inventory, existing inventoru is wiped.") - self.__parser.add_option("-T","--tree",action="store",dest="tree",type="string",help="copy selected tree. Inventory is updated accordingly.") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(verbose=False) - - (options, args) = self.__parser.parse_args() - if !options.source and !options.dest: - raise OptionValueError("option -%s and -%s are required"%('s','d')) - if !options.all and !options.inventory and !options.tree: - self.__all=True - elif options.all: - self.__all=True - elif options.inventory: - self.__inventory=True - elif options.tree: - self.__tree=self.__parser.values.tree - raise OptionValueError("options -%s, -%s and -%s are exclusive"%('a','I','T')) - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - self.__verbose=self.__parser.values.verbose - - if self.__parser.values.verbose is True: - print 'source: ',self.__source - print 'dest: ',self.__dest - print 'authpath: ',self.__authpath - print 'all: ',self.__all - print 'inventory: ',self.__inv - print 'tree: ',self.__tree - def exportDB(self): - """export db according to cmdline options - """ - sourcesession=svc.connect(self.__source,accessMode=coral.access_Update) - destsession=svc.connect(self.__dest,accessMode = coral.access_Update) - try: - dbcp=DBCopy(sourcesession,destsession,1024) - if self.__all: - dbcp.copyDB() - elif self.__inv: - dbcp.copyInventory() - elif len(self.__tree) != 0: - dbcp.copyTrees([self.__tree]) - del sourcesession - del destsession - except Exception, e: - print str(e) - del sourcesession - del destsession -if __name__ == "__main__": - tagexporter=tagdbExporter() - tagexporter.parsecmdln() - tagexporter.exportDB() diff --git a/CondCore/TagCollection/scripts/cmscond_tagintrees b/CondCore/TagCollection/scripts/cmscond_tagintrees deleted file mode 100755 index 9f87a50c0bd57..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagintrees +++ /dev/null @@ -1,103 +0,0 @@ -#!/usr/bin/env python -import os,coral -from ConfigParser import ConfigParser -from optparse import OptionParser, Option, OptionValueError -from CondCore.TagCollection import CommonUtils,connectstrParser,cacheconfigParser - -def update_frontier_connection(conn_str): - '''updates frontier connection with proxy server information''' - parser=connectstrParser.connectstrParser(conn_str) - parser.parse() - if parser.needsitelocalinfo(): - sitelocalconfig = os.environ.get('$CMS_PATH', '/afs/cern.ch/cms/' ) + "SITECONF/CERN/JobConfig/site-local-config.xml" - frontierparser=cacheconfigParser.cacheconfigParser() - frontierparser.parse(sitelocalconfig) - #print "full frontier string: " + str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) - return str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) #str because default unicode - return str(conn_str) - -class tagInTrees: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -t, --tag: tag to print on detail(optional) - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__tag='' - self.__pfn='' - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB(required)") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-t","--tag",action="store",dest="tag",type="string",help="tag to print") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(tag='') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.connectstring: - raise OptionValueError("option -%s is required"%('c')) - self.__connectstring=update_frontier_connection(self.__parser.values.connectstring) - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - self.__tag=self.__parser.values.tag - self.__verbose=self.__parser.values.verbose - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'tag: ',self.__tag - def printme(self): - """ - print requested tag inventory entry or all - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_ReadOnly ) - try: - intrees=CommonUtils.tagInTrees(session,self.__tag) - del session - for (iP,iT) in intrees.items(): - print "\t%s\t%s"%('# Tag #',self.__tag) - print "\t%s\t%s"%('# pfn #',iP) - print '\t# Trees #', iT - print '\n' - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagprinter=tagInTrees() - tagprinter.parsecmdln() - tagprinter.printme() - - diff --git a/CondCore/TagCollection/scripts/cmscond_taginventory_add b/CondCore/TagCollection/scripts/cmscond_taginventory_add deleted file mode 100755 index 6498a4b6b320c..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_taginventory_add +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,tagInventory,CommonUtils,entryComment -def stripws(myinput): - result=('').join(myinput.split(' ')) - result=('').join(result.split('\n')) - return result -def converttagdata(value): - mytagdata={} - startbrack=value.find('{') - endbrack=value.find('}') - metadatastr=value[startbrack+1:endbrack] - mytagdata['tagname']=value[0:startbrack] - metadatalist=metadatastr.split(',') - for pair in metadatalist: - mydata=pair.split('=',1) - mytagdata[mydata[0]]=mydata[1] - return mytagdata -def converttagcollection(value): - cleanvalue=stripws(value) - mytagcollection=[] - taglist=cleanvalue.split(';') - for tagdata in taglist: - mytagcollection.append(converttagdata(tagdata)) - return mytagcollection -def check_tagdata(option, opt, value): - try: - return converttagcollection(value) - except ValueError: - raise OptionValueError( - "option %s: invalid tagdata: %r" % (opt, value)) -class MyOption (Option): - TYPES = Option.TYPES + ("tagdata",) - TYPE_CHECKER = copy(Option.TYPE_CHECKER) - TYPE_CHECKER["tagdata"] = check_tagdata - -class tagInventoryBuilder: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -f, --file=filename: configuration file. -t will not be considered together with the -f option. The connect parameter will be overwritten by option -c. - -c, --connect=connectstring: connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file. - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -t, --tag=tagdata: \"tag1{pfn=string,objectname=string, recordname=string, labelname=string};tag2{...}\" - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser(option_class=MyOption) - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='' - self.__tagcollection=[] - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-f","--file",action="store",dest="filename",help="populate the inventory from the given file. -t will not be considered together with the -f option. The connect parameter will be overwritten by option -c.") - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file.") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-t","--tagdata",action="store",dest="tagdata",type="tagdata",help=" \"tagname{pfn:string,objectname:string,recordname:string, labelname:string}\" ") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(filename='') - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(tagdata=[]) - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if options.filename and options.connectstring: - print 'Warning: -c option ',options.connectstring, 'overwrites the connection string in ',options.filename - #raise OptionValueError("option -%s and -%s are exclusive"%('f','c')) - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - else: - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__verbose=self.__parser.values.verbose - if self.__parser.values.filename!='': - configparser=ConfigParser() - configparser.read(self.__parser.values.filename) - if options.connectstring: - self.__connectstring=self.__parser.values.connectstring - else: - self.__connectstring=configparser.get("COMMON","connect") - data=stripws(configparser.get("TAGINVENTORY",'tagdata')) - self.__tagcollection=converttagcollection(data) - if self.__parser.values.verbose is True: - print 'config file: ',self.__parser.values.filename - else: - self.__connectstring=self.__parser.values.connectstring - data=stripws(self.__parser.values.tagdata) - self.__tagcollection=converttagcollection(data) - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'tagdata: ',self.__tagcollection - def addEntries(self): - """ - Add entries in the tag inventory - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - try: - inv=tagInventory.tagInventory(session) - #print 'about to create table' - if inv.existInventoryTable() is False: - inv.createInventoryTable() - if len(self.__tagcollection)!=0: - for item in self.__tagcollection: - tagentry=Node.LeafNode() - tagentry.tagname=item['tagname'] - tagentry.objectname=item['objectname'] - tagentry.pfn=item['pfn'] - tagentry.recordname=item['recordname'] - if item.has_key('labelname'): - tagentry.labelname=item['labelname'] - else: - tagentry.labelname='' - tagid=inv.addEntry(tagentry) - if item.has_key('comment'): - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is False: - entrycomment.createEntryCommentTable() - entrycomment.insertComment(CommonUtils.inventoryTableName(),tagid,item['comment']) - del session - except Exception, e: - print str(e) - del session -if __name__ == "__main__": - tagbuilder=tagInventoryBuilder() - tagbuilder.parsecmdln() - tagbuilder.addEntries() - diff --git a/CondCore/TagCollection/scripts/cmscond_taginventory_delete b/CondCore/TagCollection/scripts/cmscond_taginventory_delete deleted file mode 100755 index 2abcaaa97024a..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_taginventory_delete +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,tagInventory,CommonUtils,entryComment -class tagInventoryDelete: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -a, --all: print all - -t, --tag: tag to print - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__tag='' - self.__all=True - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" -# parser = OptionParser(option_class=MyOption) -# self.__parser.add_option("-f","--file",action="store",dest="filename",help="configuration file") - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB(required)") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-a","--all",action="store_true",dest="all",help="delete all entries") - self.__parser.add_option("-t","--tag",action="store",dest="tag",type="string",help="tag to delete") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(filename='') - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(tag='') - self.__parser.set_defaults(all=True) - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.connectstring: - raise OptionValueError("option -%s is required"%('c')) - self.__connectstring=self.__parser.values.connectstring - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - self.__all=self.__parser.values.all - self.__tag=self.__parser.values.tag - self.__verbose=self.__parser.values.verbose - if self.__parser.values.verbose is True: - print 'config file: ',self.__parser.values.filename - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'print all: ',self.__all - print 'tag: ',self.__tag - def deleteme(self): - """ - delete requested tag inventory entry or all - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - inv=tagInventory.tagInventory(session) - try: - if self.__all is True: - inv.deleteAllEntries() - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is True: - entrycomment.clearAllEntriesForTable(CommonUtils.inventoryTableName()) - else: - inv.deleteEntryByName(self.__tag) - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is True: - ids=inv.getIDsByName(self.__tag) - for id in id: - entrycomment.deleteCommentForId(CommonUtils.inventoryTableName(),id) - del session - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagdelete=tagInventoryDelete() - tagdelete.parsecmdln() - tagdelete.deleteme() - - diff --git a/CondCore/TagCollection/scripts/cmscond_taginventory_label b/CondCore/TagCollection/scripts/cmscond_taginventory_label deleted file mode 100755 index 49c6bb439b192..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_taginventory_label +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import tagInventory -class tagInventoryLabel: - def __init__(self): - """ - Attach a runtime label to a tag in the inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -t, --tag=tagname: tag associated with the label(required) - -l, --label=label: label name(required) - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__tagname='' - self.__label='' - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-t","--tag",action="store",dest="tagname",type="string",help="tag associated with the label(required)") - self.__parser.add_option("-l","--label",action="store",dest="label",type="string",help="label name(required). Existing label will be replaced.") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(tagname='') - self.__parser.set_defaults(label='') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - self.__connectstring=self.__parser.values.connectstring - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - if len(self.__parser.values.tagname)==0 : - raise Exception, 'non-empty tag must be provided with option -t' - self.__tagname=self.__parser.values.tagname - self.__label=self.__parser.values.label - self.__verbose=self.__parser.values.verbose - if self.__parser.values.verbose is True: - print 'config file: ',self.__parser.values.filename - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'tagname: ',self.__tagname - print 'label: ',self.__label - def addLabel(self): - """ - Attach label to a tag in the inventory - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - try: - inv=tagInventory.tagInventory(session) - if inv.existInventoryTable() is False: - raise Exception, 'non-existent tag inventory' - inv.replaceTagLabel(self.__tagname,self.__label) - del session - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagbuilder=tagInventoryLabel() - tagbuilder.parsecmdln() - tagbuilder.addLabel() - - diff --git a/CondCore/TagCollection/scripts/cmscond_taginventory_list b/CondCore/TagCollection/scripts/cmscond_taginventory_list deleted file mode 100755 index e6bdeed2a08c3..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_taginventory_list +++ /dev/null @@ -1,109 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,tagInventory,connectstrParser,cacheconfigParser - -def update_frontier_connection(conn_str): - '''updates frontier connection with proxy server information''' - parser=connectstrParser.connectstrParser(conn_str) - parser.parse() - if parser.needsitelocalinfo(): - sitelocalconfig = os.environ.get('$CMS_PATH', '/afs/cern.ch/cms/' ) + "SITECONF/CERN/JobConfig/site-local-config.xml" - frontierparser=cacheconfigParser.cacheconfigParser() - frontierparser.parse(sitelocalconfig) - #print "full frontier string: " + str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) - return str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) #str because default unicode - return str(conn_str) - -class tagInventoryPrinter: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -t, --tag: tag to print on detail(optional) - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__tag='' - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB(required)") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-t","--tag",action="store",dest="tag",type="string",help="tag to print") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(tag='') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.connectstring: - raise OptionValueError("option -%s is required"%('c')) - self.__connectstring=update_frontier_connection(self.__parser.values.connectstring) - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - self.__tag=self.__parser.values.tag - self.__verbose=self.__parser.values.verbose - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'tag: ',self.__tag - def printme(self): - """ - print requested tag inventory entry or all - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_ReadOnly ) - inv=tagInventory.tagInventory(session) - try: - result=inv.getAllEntries() - if len(self.__tag)==0: - print '%s\t%s\t%s'%('#ID#','#Name#','#pfn#') - for r in result: - print '%s\t%s\t%s'%(r.tagid,r.tagname,r.pfn) - else: - print '%s\t%s\t%s\t%s\t%s\t%s'%('#ID#','#Name#','#pfn#','#objectname#','#recordname#','#label#') - for item in result: - if item.tagname==self.__tag: - print '%s\t%s\t%s\t%s\t%s\t%s'%(item.tagid,item.tagname,item.pfn,item.objectname,item.recordname,item.labelname) - del session - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagprinter=tagInventoryPrinter() - tagprinter.parsecmdln() - tagprinter.printme() - - diff --git a/CondCore/TagCollection/scripts/cmscond_tagtree_add b/CondCore/TagCollection/scripts/cmscond_tagtree_add deleted file mode 100755 index 8db689601d57d..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagtree_add +++ /dev/null @@ -1,219 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,TagTree,tagInventory,CommonUtils,entryComment -def stripws(myinput): - result=('').join(myinput.split(' ')) - result=('').join(result.split('\n')) - return result - -def convertnodedata(mynodevalue): - mynodedata={} -# datastr=('').join(value.split(' ')) - startbrack=mynodevalue.find('{') - endbrack=mynodevalue.find('}') - metagdatastr=mynodevalue[startbrack+1:endbrack] - mynodedata['nodelabel']=mynodevalue[0:startbrack] - metadatalist=metagdatastr.split(',') - for pair in metadatalist: - mydata=pair.split('=',1) - mynodedata[mydata[0]]=mydata[1] - #print 'mynodedata' - return mynodedata - -def convertnodecollection(value): - cleanvalue=stripws(value) - mynodecollection=[] - nodelist=cleanvalue.split(';') - for nodedata in nodelist: - mynodecollection.append(convertnodedata(nodedata)) - return mynodecollection - -def check_nodedata(option, opt, value): - try: - return convertnodecollection(value) - except ValueError: - raise OptionValueError( - "option %s: invalid nodedata: %r" % (opt, value)) -class MyOption (Option): - TYPES = Option.TYPES + ("nodedata",) - TYPE_CHECKER = copy(Option.TYPE_CHECKER) - TYPE_CHECKER["nodedata"] = check_nodedata - -class tagTreeBuilder: - def __init__(self): - """ - Class add node to an existing tag tree - usage: %prog [options] - -f, --file=filename: use file to populate the tag tree. -l will not be considered together with the -f option. The connect parameter will be overwritten by option -c. - -c, --connect=connectstring: connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file. - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -T, --tree=treename: name of the tree to create(required). Note: the tree name is case insensitive, it is always internally converted to uppercase. - -n, --node=node: one or a collection of non-leaf node(s) to attach to the tree. \"node1{parent=string,globalsince=unsigned long long,globaltill=unsigned long long};node2{...}\". - -l, --leafnode=leafnode: one or a collection of leaf node(s) to attach to the tree. \"node1{parent=string,tagname=string};node2{...}\". - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser(option_class=MyOption) - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='' - self.__treename='' - self.__nodecollection=[] - self.__leafcollection=[] - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-f","--file",action="store",dest="filename",help="populate the tag tree from the given file. -l will not be considered together with the -f option. The connect parameter will be overwritten by option -c.") - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file.") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-T","--tree",action="store",dest="treename",type="string",help="name of the tree to create(required). Note: the tree name is case insensitive, it is internally converted to uppercase") - self.__parser.add_option("-n","--nodedata",action="store",dest="nodedata",type="nodedata",help="one or a collection of non-leaf node(s) to attach to the tree. \"node1{parent=string,globalsince=unsigned long long,globaltill=unsigned long long};node2{...}\"") - self.__parser.add_option("-l","--leafdata",action="store",dest="leafdata",type="nodedata",help=" one or a collection of leaf node(s) to attach to the tree. \"node1{parent=string,tagname=string};node2{...}\" ") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(filename='') - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='') - self.__parser.set_defaults(nodedata=[]) - self.__parser.set_defaults(leafdata=[]) - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.treename: - raise OptionValueError("option -%s --%s is required "%('T','tree')) - self.__treename=str.upper(self.__parser.values.treename) - if options.filename and options.connectstring: - print 'Warning: -c option ',options.connectstring, 'overwrites the connection string in ',options.filename - #raise OptionValueError("option -%s and -%s are exclusive"%('f','c')) - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - else: - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__verbose=self.__parser.values.verbose - - if self.__parser.values.filename!='': - treesection=' '.join(['TAGTREE',self.__treename]) - #print treesection - configparser=ConfigParser() - configparser.read(self.__parser.values.filename) - if options.connectstring: - self.__connectstring=self.__parser.values.connectstring - else: - self.__connectstring=configparser.get('COMMON','connect') - if configparser.has_option(treesection, 'nodedata'): - nodedata=stripws(configparser.get(treesection,'nodedata')) - self.__nodecollection=convertnodecollection(nodedata) - if configparser.has_option(treesection, 'leafdata'): - leafdata=stripws(configparser.get(treesection,'leafdata')) - self.__leafcollection=convertnodecollection(leafdata) - #print self.__leafcollection - if self.__parser.values.verbose is True: - print 'config file: ',self.__parser.values.filename - else: - self.__connectstring=self.__parser.values.connectstring - if self.__parser.nodedata: - nodedata=stripws(self.__parser.values.nodedata) - self.__nodecollection=convertnodedata(nodedata) - if self.__parser.leafdata: - leafdata=stripws(self.__parser.values.leafdata) - self.__leafcollection=convertnodedata(leafdata) - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - print 'tree: ',self.__treename - print 'nodecollection: ',self.__nodecollection - print 'leafcollection: ',self.__leafcollection - - def addEntries(self): - """ - Add nodes in the tag tree - """ - if len(self.__nodecollection)==0 and len(self.__leafcollection)==0: - print 'empty data, do nothing' - return - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - try: - mytree=TagTree.tagTree(session,self.__treename) - if mytree.existTagTreeTable() is False: - raise Exception,'non-existing tag tree table, use cmscond_tagtree_createroot to create the table and tree root first' - for item in self.__nodecollection: - mynode=Node.Node() - mynode.globalsince=0 - mynode.globaltill=0 - mynode.tagid=0 - mynode.nodelabel=item['nodelabel'] - if item.has_key('globalsince'): - mynode.globalsince=nodedata['globalsince'] - if item.has_key('globaltill'): - mynode.globaltill=nodedata['globaltill'] - if not item.has_key('parent'): - raise KeyError,'no parent parameter for'+mynode.nodelabel - newnodeid=mytree.insertNode(mynode,item['parent']) - if item.has_key('comment'): - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is False: - entrycomment.createEntryCommentTable() - entrycomment.insertComment(CommonUtils.treeTableName(self.__treename),newnodeid ,item['comment']) - if len(self.__leafcollection)!=0: - inv=tagInventory.tagInventory(session) - for leafdata in self.__leafcollection: - myleaf=Node.Node() - myleaf.globalsince=0 - myleaf.globaltill=0 - myleaf.tagid=0 - myleaf.nodelabel=leafdata['nodelabel'] - # print 'again ',myleaf.nodelabel - if leafdata.has_key('tagname') is False: - raise ValueError, "tagname is not specified for the leaf node "+myleaf.nodelabel - tagname=leafdata['tagname'] - mypfn='' - if leafdata.has_key('pfn') is True: - mypfn=leafdata['pfn'] - # print 'leafdata pfn ',mypfn - result=inv.getEntryByName(tagname,mypfn) - if result.tagid == 0: - raise ValueError, "unknown tag \'"+leafdata['tagname']+" "+leafdata['pfn']+"\' in the inventory" - myleaf.tagid=result.tagid - if not leafdata.has_key('parent'): - raise KeyError,'no parent parameter for'+myleaf.nodelabel - newnodeid=mytree.insertNode(myleaf,leafdata['parent']) - if leafdata.has_key('comment'): - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is False: - entrycomment.createEntryCommentTable() - entrycomment.insertComment(CommonUtils.treeTableName(self.__treename),newnodeid,item['comment']) - del session - except Exception, e: - print str(e) - del session -if __name__ == "__main__": - tagtreebuilder=tagTreeBuilder() - tagtreebuilder.parsecmdln() - tagtreebuilder.addEntries() - - diff --git a/CondCore/TagCollection/scripts/cmscond_tagtree_clone b/CondCore/TagCollection/scripts/cmscond_tagtree_clone deleted file mode 100755 index e56f989c3e633..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagtree_clone +++ /dev/null @@ -1,188 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -#from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,TagTree,tagInventory,CommonUtils,entryComment - -def stripws(myinput): - result=('').join(myinput.split(' ')) - result=('').join(result.split('\n')) - return result - -def copycomments(session,sourcetreename,desttreename): - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is False: - entrycomment.createEntryCommentTable() - session.transaction().start(False) - data=coral.AttributeList() - editor=session.nominalSchema().tableHandle(CommonUtils.treeTableName(desttreename)).dataEditor() - query=session.nominalSchema().tableHandle(CommonUtils.treeTableName(sourcetreename)).newQuery() - conditionData=coral.AttributeList() - query.setCondition('',conditionData) - query.setRowCacheSize(2048) - editor.rowBuffer(data) - query.defineOutput(data) - bulkOperation=editor.bulkInsert(data,2048) - cursor=query.execute() - while (cursor.next() ): - bulkOperation.processNextIteration() - bulkOperation.flush() - del bulkOperation - del query - session.transaction().commit() - -class tagTreeClone: - def __init__(self): - """ - Class clone an existing tree to a new one only changing pfn in leaf nodes. - usage: %prog [options] - -f, --file=filename: configuration file (required). The connect parameter will be overwritten by option -c if present. - -c, --connect=connectstring: connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file. - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -T, --tree=treename: name of the tree to clone(required) - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='' - self.__filename='' - self.__sourcetreename='' - self.__targettreename='' - self.__realclone=False - self.__service_replace='' - self.__schema_replace='' - self.__connect_replace='' - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n " - self.__parser.add_option("-f","--file",action="store",dest="filename",help="configuration file for input(required). The connect parameter will be overwritten by option -c if present.") - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file.") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-T","--tree",action="store",dest="treename",type="string",help="name of the tree to create(required). Note: the tree name is case insensitive, it is internally converted to uppercase") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.treename: - raise OptionValueError("option -%s --%s is required "%('T','tree')) - if not self.__parser.values.filename: - raise OptionValueError("option -%s --%s is required "%('f','file')) - self.__sourcetreename=self.__parser.values.treename.upper() - self.__filename=self.__parser.values.filename - if os.path.exists(self.__filename)==False: - print 'non-existing input file ',self.__filename - return - if options.filename and options.connectstring: - #raise OptionValueError("option -%s and -%s are exclusive"%('f','c')) - print 'Warning: -c option ',options.connectstring, 'overwrites the connection string in ',options.filename - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - else: - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__verbose=self.__parser.values.verbose - - clonesection=' '.join(['CLONE',self.__sourcetreename]) - configparser=ConfigParser() - configparser.read(self.__filename) - if options.connectstring: - self.__connectstring=self.__parser.values.connectstring - else: - self.__connectstring=configparser.get("COMMON","connect") - sections=configparser.sections() - if not clonesection in sections: - print 'section ', clonesection, 'not found in ',self.__filename - print 'do nothing' - return - self.__targettreename=stripws(configparser.get(clonesection,'target')) - try: - self.__service_replace=stripws(configparser.get(clonesection,'service_replace')) - except NoOptionError: - pass - - try: - self.__schema_replace=stripws(configparser.get(clonesection,'schema_replace')) - except NoOptionError: - pass - - try: - self.__connect_replace=stripws(configparser.get(clonesection,'connect_replace')) - except NoOptionError: - pass - - if self.__parser.values.verbose is True: - print 'config file: ',self.__filename - print 'connect: ',self.__connectstring - print 'sourcetree: ',self.__sourcetreename - print 'targettree: ',self.__targettreename - print 'service_replace: ',self.__service_replace - print 'schema_replace: ',self.__schema_replace - print 'connect_replace: ',self.__connect_replace - if len(self.__service_replace)==0 and len(self.__schema_replace)==0 and len(self.__connect_replace)==0: - self.__realclone=True - - def clonetree(self): - """ - Create a clone tree - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session=svc.connect( self.__connectstring,accessMode = coral.access_Update ) - allLeafs=[] - try: - newtree=TagTree.tagTree(session,self.__targettreename) - newtree.importFromTree(self.__sourcetreename) - allLeafs=newtree.getAllLeaves() - if self.__realclone is True: - copycomments(session,self.__sourcetreename,self.__targettreename) - del session - return - #the rest don't know how to handle comments yet - if len(self.__service_replace) != 0: - inv=tagInventory.tagInventory(session) - newtaglinks=inv.addEntriesReplaceService(self.__service_replace) - leafreplacement={} - for leaf in allLeafs: - oldtagid=leaf.tagid - newtagid=0 - for item in newtaglinks: - if item[0]==oldtagid: - newtagid=item[1] - if newtagid == 0: - raise "no replacement tagid found for tagid ",oldtagid - leafreplacement[oldtagid]=newtagid - newtree.replaceLeafLinks(leafreplacement) - del session - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagtreeclone=tagTreeClone() - tagtreeclone.parsecmdln() - tagtreeclone.clonetree() - - diff --git a/CondCore/TagCollection/scripts/cmscond_tagtree_createroot b/CondCore/TagCollection/scripts/cmscond_tagtree_createroot deleted file mode 100755 index b756edff6689a..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagtree_createroot +++ /dev/null @@ -1,136 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -#from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,TagTree,tagInventory -def stripws(myinput): - result=('').join(myinput.split(' ')) - result=('').join(result.split('\n')) - return result -class tagTreeRootBuilder: - def __init__(self): - """ - Class add node in the tag tree - usage: %prog [options] - -f, --file=filename: configuration file. The connect parameter will be overwritten by option -c. - -c, --connect=connectstring: connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file. - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -T, --tree=treename: name of the tree to create(required). Note: the tree name is case insensitive, it is always internally converted to uppercase. - -r, --rootname=rootnodename(default 'All') - -a, --all: attach all tags in the inventory as leafs under the root - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__rootname='' - self.__treename='' - self.__all=False - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-f","--file",action="store",dest="filename",help="configuration file. The connect parameter will be overwritten by option -c.") - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB. If -c, -f both given -c value will overwrite the connect parameter in the config file.") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-T","--tree",action="store",dest="treename",type="string",help="name of the tree to create(required). Note: the tree name is case insensitive, it is internally converted to uppercase") - self.__parser.add_option("-r","--rootname",action="store",dest="rootname",type="string",help="root node name (default \'All\')") - self.__parser.add_option("-a","--all",action="store_true",dest="all",help="attach all tags in the inventory as leafs under the root(optional). Note: the leafnode names in this case are identical to the tag name") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(filename='') - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(rootname='All') - self.__parser.set_defaults(all=False) - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - - if not self.__parser.values.treename: - raise OptionValueError("option -%s --%s is required "%('T','tree')) - self.__treename=self.__parser.values.treename - if options.filename and options.connectstring: - #raise OptionValueError("option -%s and -%s are exclusive"%('f','c')) - print 'Warning: -c option ',options.connectstring, 'overwrites the connection string in ',options.filename - if len(self.__parser.values.authpath)!=0: - self.__authpath=self.__parser.values.authpath - else: - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__verbose=self.__parser.values.verbose - self.__all=self.__parser.values.all - if self.__parser.values.filename!='': - configparser=ConfigParser() - configparser.read(self.__parser.values.filename) - if options.connectstring: - self.__connectstring=self.__parser.values.connectstring - else: - self.__connectstring=configparser.get("COMMON","connect") - sections=configparser.sections() - for section in sections: - treesection=' '.join(['TAGTREE',str.upper(self.__treename)]) - self.__rootname=stripws(configparser.get(treesection,'root')) - if self.__parser.values.verbose is True: - print 'config file: ',self.__parser.values.filename - else: - self.__connectstring=self.__parser.values.connectstring - self.__rootname=self.__parser.values.rootname - if self.__parser.values.verbose is True: - print 'connect: ',self.__connectstring - print 'tree: ',self.__treename - print 'root: ',self.__rootname - - def createRootNode(self): - """ - Create root node for the the given tree - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - try: - mytree=TagTree.tagTree(session,self.__treename) - if mytree.existTagTreeTable() is False: - mytree.createTagTreeTable() - mynode=Node.Node() - mynode.nodelabel=self.__rootname - mynode.globalsince=0 - mynode.globaltill=4294967295 - mynode.tagid=0 - mytree.insertNode(mynode,'ROOT') - if self.__all is True: - inv=tagInventory.tagInventory(session) - result=inv.getAllEntries() - for tag in result: - myleaf=Node.Node() - myleaf.nodelabel=tag.tagname - myleaf.tagid=tag.tagid - mytree.insertNode(myleaf,self.__rootname) - except Exception, e: - print str(e) - del session -if __name__ == "__main__": - tagtreerootbuilder=tagTreeRootBuilder() - tagtreerootbuilder.parsecmdln() - tagtreerootbuilder.createRootNode() - - diff --git a/CondCore/TagCollection/scripts/cmscond_tagtree_delete b/CondCore/TagCollection/scripts/cmscond_tagtree_delete deleted file mode 100755 index 6e0bac4a46948..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagtree_delete +++ /dev/null @@ -1,156 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node -from CondCore.TagCollection import TagTree,CommonUtils,entryComment -class tagTreeDelete: - def __init__(self): - """ - Class add entry in the tag inventory - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -T, --tree=treename: tree to delete. Note: the tree name is case insensitive, it is always internally converted to uppercase. - -a, --all: print all - -n, --node: root node of the branch to delete - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__branch='' - self.__node='' - self.__all=True - self.__treename='' - self.__verbose=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB(required)") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-T","--tree",action="store",dest="treename",type="string",help="delete the tree with given name. Note: the tree name is case insensitive, it is internally converted to uppercase") - self.__parser.add_option("-a","--all",action="store_true",dest="all",help="delete all tag trees") - self.__parser.add_option("-b","--branch",action="store",dest="branch",help="root node of the branch to delete") - self.__parser.add_option("-n","--node",action="store",dest="node",help="delete a single node. The rest of the tree will be rearranged") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(branch='') - self.__parser.set_defaults(node='') - self.__parser.set_defaults(all=False) - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.connectstring: - raise OptionValueError("option -%s is required"%('c')) - if self.__parser.values.treename and self.__parser.values.all: - raise OptionValueError("option -%s and -%s are exclusive"%('a','T')) - if self.__parser.values.branch and self.__parser.values.all: - raise OptionValueError("option -%s and -%s are exclusive"%('a','b')) - if self.__parser.values.node and self.__parser.values.all: - raise OptionValueError("option -%s and -%s are exclusive"%('a','n')) - if self.__parser.values.node and self.__parser.values.branch: - raise OptionValueError("option -%s and -%s are exclusive"%('b','n')) - self.__treename=self.__parser.values.treename - self.__all=self.__parser.values.all - self.__branch=self.__parser.values.branch - self.__node=self.__parser.values.node - self.__connectstring=self.__parser.values.connectstring - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - self.__all=self.__parser.values.all - self.__verbose=self.__parser.values.verbose - if not self.__parser.values.treename and not self.__parser.values.all: - self.__all=True - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - if self.__all is True: - print 'delete all: ',self.__all - else: - print 'delete tree: ',self.__treename - if len(self.__branch)==0 and len(self.__node)==0: - print 'delete from root' - if len(self.__branch)!=0: - print 'delete branch',self.__branch - if len(self.__node)!= 0: - print 'delete node: ',self.__node - def deleteme(self): - """ - delete requested tag tree and selected branch or all - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - #try: - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_Update ) - if self.__all is True: - transaction=session.transaction() - transaction.start(True) - schema=session.nominalSchema() - tablelist=schema.listTables() - treelist=[] - for tablename in tablelist: - if tablename.find("TAGTREE_TABLE_") != -1: - treelist.append(tablename[len("TAGTREE_TABLE_"):]) - transaction.commit() - for treename in treelist: - tree=TagTree.tagTree(session,treename) - tree.deleteSubtree( 'ROOT' ) - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is True: - entrycomment.clearAllEntriesForTable(CommonUtils.treeTableName(treename)) - del session - return - tree=TagTree.tagTree(session,self.__treename) - if self.__branch=='' and self.__node=='': - tree.deleteSubtree( 'ROOT' ) - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is True: - entrycomment.clearAllEntriesForTable(CommonUtils.treeTableName(self.__treename)) - else: - if self.__branch != '': - print self.__branch - tree.deleteSubtree(self.__branch) - entrycomment=entryComment.entryComment(session) - if entrycomment.existCommentTable() is True: - nodes=tree.getSubtree(self.__branch) - for node in nodes: - entrycomment.deleteCommentForId(CommonUtils.treeTableName(self.__treename),node.nodeid) - - if self.__node != '': - tree.deleteNode(self.__node) - if entrycomment.existCommentTable() is True: - node=getNode(self.__node) - entrycomment.deleteCommentForId(CommonUtils.treeTableName(self.__treename),node.nodeid) - del session - #except Exception, e: - # print str(e) -if __name__ == "__main__": - tagdelete=tagTreeDelete() - tagdelete.parsecmdln() - tagdelete.deleteme() - - diff --git a/CondCore/TagCollection/scripts/cmscond_tagtree_list b/CondCore/TagCollection/scripts/cmscond_tagtree_list deleted file mode 100755 index 7b886005a2ed1..0000000000000 --- a/CondCore/TagCollection/scripts/cmscond_tagtree_list +++ /dev/null @@ -1,209 +0,0 @@ -#!/usr/bin/env python -import os -from ConfigParser import ConfigParser -from copy import copy -from optparse import OptionParser, Option, OptionValueError -import coral -from CondCore.TagCollection import Node,tagInventory,TagTree,connectstrParser,cacheconfigParser - -def update_frontier_connection(conn_str): - '''updates frontier connection with proxy server information''' - parser=connectstrParser.connectstrParser(conn_str) - parser.parse() - if parser.needsitelocalinfo(): - sitelocalconfig = os.environ.get('$CMS_PATH', '/afs/cern.ch/cms/' ) + "SITECONF/CERN/JobConfig/site-local-config.xml" - frontierparser=cacheconfigParser.cacheconfigParser() - frontierparser.parse(sitelocalconfig) - #print "full frontier string: " + str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) - return str(parser.fullfrontierStr(parser.schemaname(),frontierparser.parameterdict())) #str because default unicode - return str(conn_str) - -class tagTreePrinter: - def __init__(self): - """ - Class print/list tag tree - usage: %prog [options] - -c, --connect=connectstring: connection string to the tag DB (required) - -u, --user=user: user name - -p, --password=password: password - -P, --path=path: path to authentication.xml - -a, --all: print overview of all trees (default) - -T, --tree=treename: name of the tree. Note: the tree name is case insensitive, it is always internally converted to uppercase. - -l, --leaf: print only leaf nodes - -n, --node: root node of the branch to print - -v, --verbose: switch on verbose mode - -h, --help: print usage - """ - self.__parser=OptionParser() - self.__connectstring='' - self.__user='' - self.__password='' - self.__authpath='.' - self.__node='' - self.__leafonly=False - self.__verbose=False - self.__treename='' - self.__all=False - def parsecmdln(self): - """ - Parse commandline - """ - usage = "usage: \%prog [options] \n" - self.__parser.add_option("-c","--connect",action="store",dest="connectstring",type="string",help="connection string to the tag DB(required)") - self.__parser.add_option("-u","--user",action="store",dest="user",type="string",help="user name") - self.__parser.add_option("-p","--password",action="store",dest="password",type="string",help="password") - self.__parser.add_option("-P","--path",action="store",dest="authpath",type="string",help="path to authentication.xml") - self.__parser.add_option("-a","--all",action="store_true",dest="all",help="print overview of all trees(default)") - self.__parser.add_option("-l","--leaf",action="store_true",dest="leaf",help="print leaf nodes only") - self.__parser.add_option("-T","--tree",action="store",dest="treename",type="string",help="Print overview of the tree with given name. Note: the tree name is case insensitive, it is internally converted to uppercase") - self.__parser.add_option("-n","--node",action="store",dest="node",type="string",help="root node of the branch to print. Exclusive with -a option") - self.__parser.add_option("-v","--verbose",action="store_true",dest="verbose",help="verbose mode") - self.__parser.set_defaults(connectstring='') - self.__parser.set_defaults(user='') - self.__parser.set_defaults(password='') - self.__parser.set_defaults(authpath='.') - self.__parser.set_defaults(all=False) - self.__parser.set_defaults(leaf=False) - self.__parser.set_defaults(treename='') - self.__parser.set_defaults(node='') - self.__parser.set_defaults(verbose=False) - (options, args) = self.__parser.parse_args() - if not self.__parser.values.connectstring: - raise OptionValueError("option -%s is required"%('c')) - - if self.__parser.values.treename and self.__parser.values.all: - raise OptionValueError("option -%s and -%s are exclusive"%('a','T')) - if self.__parser.values.node and self.__parser.values.all: - raise OptionValueError("option -%s and -%s are exclusive"%('a','n')) - self.__treename=self.__parser.values.treename - self.__all=self.__parser.values.all - self.__connectstring=update_frontier_connection(self.__parser.values.connectstring) - self.__user=self.__parser.values.user - self.__password=self.__parser.values.password - self.__authpath=self.__parser.values.authpath - self.__leaf=self.__parser.values.leaf - self.__node=self.__parser.values.node - self.__verbose=self.__parser.values.verbose - if not self.__parser.values.treename and not self.__parser.values.all: - self.__all=True - if self.__parser.values.verbose is True: - print 'connectstring: ',self.__connectstring - print 'user: ',self.__user - print 'password: ',self.__password - print 'authpath: ',self.__authpath - if self.__all is True: - print 'print all' - else: - print 'print tree: ',self.__treename - print 'print node: ',self.__node - if self.__leaf is True: - print 'print leaf only' - def printme(self): - """ - print requested tag inventory entry or all - """ - #context = coral.Context() - #if self.__verbose is True: - # context.setVerbosityLevel( 'DEBUG' ) - #else: - # context.setVerbosityLevel( 'ERROR' ) - svc = coral.ConnectionService() - config=svc.configuration() - os.environ['CORAL_AUTH_PATH']=self.__authpath - config.setDefaultAuthenticationService('CORAL/Services/XMLAuthenticationService') - session = svc.connect( self.__connectstring,accessMode = coral.access_ReadOnly ) - inv=tagInventory.tagInventory(session) - if self.__all is True: - transaction=session.transaction() - transaction.start(True) - schema=session.nominalSchema() - tablelist=schema.listTables() - treelist=[] - for tablename in tablelist: - if tablename.find("TAGTREE_TABLE_") != -1: - treelist.append(tablename[len("TAGTREE_TABLE_"):]) - transaction.commit() - for treename in treelist: - print 'tree: ',treename - mytree=TagTree.tagTree(session,treename) - if self.__leaf is True: - result=mytree.getAllLeaves() - print '%s\t%s\t%s\t%s\t%s\t%s\t%s'%('#ID#','#leafNode#','#parent#','#tagname#','#record#','#object#','#pfn#') - for r in result: - if r.parentid != 0: - parentnode=mytree.getNodeById(r.parentid) - parentname=parentnode.nodelabel - tagcontent=inv.getEntryById(r.tagid) - print '%s\t%s\t%s\t%s\t%s\t%s\t%s'%(r.nodeid,r.nodelabel,parentname,tagcontent.tagname,tagcontent.recordname,tagcontent.objectname,tagcontent.pfn) - else: - print ' root:%s'%(r.nodelabel) - else: - result=mytree.getSubtree('ROOT') - for r in result: - if r.parentid !=0: - parentnode=mytree.getNodeById(r.parentid) - parentname=parentnode.nodelabel - if r.tagid != 0: - tagcontent=inv.getEntryById(r.tagid) - print ' leafnode:%s parent:%s tag:%s record:%s object:%s label:%s pfn:%s'%(r.nodelabel,parentname,tagcontent.tagname,tagcontent.recordname,tagcontent.objectname,tagcontent.labelname,tagcontent.pfn) - else: - print ' node:%s parent:%s'%(r.nodelabel,parentname) - - else: - print ' root:%s'%(r.nodelabel) - del session - return - #list node - mytree=TagTree.tagTree(session,self.__treename) - try: - if self.__leaf is True : - result=mytree.getAllLeaves() - for r in result: - if r.parentid !=0: - parentnode=mytree.getNodeById(r.parentid) - parentname=parentnode.nodelabel - if self.__node is not '': - if self.__node == parentname: - print 'leafnode:%s parent:%s'%(r.nodelabel,parentname) - else: - print 'leafnode:%s parent:%s'%(r.nodelabel,parentname) - else: - print 'root:%s'%(r.nodelabel) - else: - if self.__node=='': - result=mytree.getSubtree('ROOT') - for r in result: - if r.parentid !=0: - parentnode=mytree.getNodeById(r.parentid) - parentname=parentnode.nodelabel - if r.tagid != 0: - tagcontent=inv.getEntryById(r.tagid) - print ' leafnode:%s parent:%s tag:%s record:%s object:%s label:%s pfn:%s'%(r.nodelabel,parentname,tagcontent.tagname,tagcontent.recordname,tagcontent.objectname,tagcontent.labelname,tagcontent.pfn) - else: - print 'node:%s parent:%s'%(r.nodelabel,parentname) - else: - print 'root:%s'%(r.nodelabel) - else: - result=mytree.getSubtree(self.__node) - for r in result: - if r.parentid !=0: - parentnode=mytree.getNodeById(r.parentid) - parentname=parentnode.nodelabel - if r.tagid != 0: - tagcontent=inv.getEntryById(r.tagid) - print ' leafnode:%s parent:%s tag:%s record:%s object:%s label:%s pfn:%s'%(r.nodelabel,parentname,tagcontent.tagname,tagcontent.recordname,tagcontent.objectname,tagcontent.labelname,tagcontent.pfn) - else: - print 'node:%s parent:%s'%(r.nodelabel,parentname) - else: - print 'node:%s'%(r.nodelabel) - del session - except Exception, e: - print str(e) - del session - -if __name__ == "__main__": - tagprinter=tagTreePrinter() - tagprinter.parsecmdln() - tagprinter.printme() - - diff --git a/CondCore/TagCollection/scripts/createglobaltag b/CondCore/TagCollection/scripts/createglobaltag deleted file mode 100755 index 21afd6c3619d9..0000000000000 --- a/CondCore/TagCollection/scripts/createglobaltag +++ /dev/null @@ -1,17 +0,0 @@ - -if [ "$#" != "2" ]; then - echo "Usage: $0 " - exit 1 -fi - - -echo "Executing : cmscond_taginventory_add -f $1" -cmscond_taginventory_add -f $1 -sleep 2 - -echo "Executing : cmscond_tagtree_createroot -f $1 -T $2 ....." -cmscond_tagtree_createroot -f $1 -T $2 -sleep 2 - -echo "Executing : cmscond_tagtree_add -f $1 -T $2 ....." -cmscond_tagtree_add -f $1 -T $2 diff --git a/CondCore/TagCollection/scripts/dbtoconf.cfg b/CondCore/TagCollection/scripts/dbtoconf.cfg deleted file mode 100644 index 43709894f9e9f..0000000000000 --- a/CondCore/TagCollection/scripts/dbtoconf.cfg +++ /dev/null @@ -1,11 +0,0 @@ -[Common] - -Account: CMS_COND_21X_GLOBALTAG -#Conn_string_gtag: sqlite_file:CRUZET3.db -Conn_string_gtag: frontier://cmsfrontier:8000/FrontierInt/CMS_COND_21X_GLOBALTAG -Globtag: IDEAL_V5 -Confoutput: IDEAL_V5.conf -#AuthPath: /afs/cern.ch/cms/DB/conddb -#Conn_rep: frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0) -#Conn_rep: frontier://PromptProd -#Tag_rep: CRUZET3_V2H diff --git a/CondCore/TagCollection/scripts/dbtoconf.py b/CondCore/TagCollection/scripts/dbtoconf.py deleted file mode 100755 index 730915c2ec727..0000000000000 --- a/CondCore/TagCollection/scripts/dbtoconf.py +++ /dev/null @@ -1,223 +0,0 @@ -#!/usr/bin/env python -import os,string,sys,commands,time,ConfigParser - -MAXRETRIES=10 # number of retries before giving up - -CONFIGFILE='dbtoconf.cfg' -CONFIG = ConfigParser.ConfigParser() -print 'Reading configuration file from ',CONFIGFILE -CONFIG.read(CONFIGFILE) - -# this is for [COMMON] part of the myconf.conf - -print " " -print "dbtoconf.py:" -ACCOUNT=CONFIG.get('Common','Account') -CONNSTRINGGLOBTAG=CONFIG.get('Common','Conn_string_gtag') -GLOBTAG=CONFIG.get('Common','Globtag') -CONFFILE=CONFIG.get('Common','Confoutput') -AUTHPATH='' -try: - AUTHPATH=CONFIG.get('Common','AuthPath') -except: - print "WARNING: No authpath fount in config file" - -CONNREP='' -try: - CONNREP=CONFIG.get('Common','Conn_rep') -except: - print "WARNING: No CONN_REP fount in config file" - -TAGREP='' -try: - TAGREP=CONFIG.get('Common','Tag_rep') -except: - print "WARNING: No TAG_REP fount in config file" - -print -print "Configuration:" -print "================================" -print "Account:",ACCOUNT -print "CONNSTRING:",CONNSTRINGGLOBTAG -print "GLOBALTAG:",GLOBTAG -print "CONF OUTPUT:",CONFFILE -print "Auth. Path:",AUTHPATH -print "Conn. replacement:",CONNREP -print "TAG replacement:",TAGREP -print "================================" - -# this is for tags -TMPTAG='tmptag.list' - - -def myparser(input,parstag): - if input.find(parstag)!=-1: - first=input.split(parstag) - second=first[1].split() - out=second[0] - else: - out='-1' - return out - -# main start here -###################################### -# initialization - - - - - -root='' -node='' -globparent='' -leafnode=[] -parent=[] -tag=[] -pfn=[] -object=[] -record=[] -connstring=[] -account=[] -label=[] - -os.system('rm -f '+TMPTAG) -tagtree_cmd = 'cmscond_tagtree_list -c '+CONNSTRINGGLOBTAG+' -T '+GLOBTAG -if AUTHPATH != '': - tagtree_cmd += ' -P ' + AUTHPATH - -os.system(tagtree_cmd +' > '+TMPTAG) - -nlines=0 -tmp=open(TMPTAG,'r') -while tmp: - line=tmp.readline() - if len(line)==0: - break - nlines=nlines+1 - line=string.strip(line) - if line.find('leafnode')==-1: - out=myparser(line,'root:') - if out!='-1': - root=out - out=myparser(line,'node:') - if out!='-1': - node=out - out=myparser(line,'parent:') - if out!='-1': - globparent=out - else: - leafnode.append(myparser(line,'leafnode:')) - parent.append(myparser(line,'parent:')) - tag.append(myparser(line,'tag:')) - pfn.append(myparser(line,'pfn:')) - record.append(myparser(line,'record:')) - label.append(myparser(line,'label:')) - object.append(myparser(line,'object:')) - connstring.append(myparser(line,'pfn:').split('/CMS_COND')[0]) - account.append('CMS_COND'+myparser(line,'pfn:').split('/CMS_COND')[1]) -# print nlines,line - -tmp.close() -print 'Read '+str(nlines)+' lines...' -print 'Read ',len(leafnode),' leafnodes' -print 'Read ',len(parent),' parent' -print 'Read ',len(tag),' tag' -print 'Read ',len(pfn),' pfn' - -if len(leafnode)!=len(parent) or len(leafnode)!=len(tag) or len(leafnode)!=len(pfn): - print "# of leafnodes different from parent/tag/pfn" - sys.exit() - -#output -#print root,node,globparent - - -# for i in range(0,len(leafnode)): -# command='cmscond_taginventory_list -c '+CONNSTRINGGLOBTAG+' -t '+tag[i] -# if AUTHPATH != '': -# command += ' -P ' + AUTHPATH - -# # print "COMMAND=",command -# # put in a loop until it succeed -# for ntime in range(0,MAXRETRIES): -# fullout=commands.getoutput(command) -# # 'cmscond_taginventory_list -c'+CONNSTRINGGLOBTAG+' -t '+tag[i]) -# linesout=fullout.split('\n') -# # print fullout -# # print len(linesout) -# if(len(linesout)>1): -# # success -# break -# print "Try: ",ntime, ".....",tag[i] -# time.sleep(0.5) -# if(len(linesout)<=1): -# print "Unable to get information on tag:",tag[i]," after ", MAXRETRIES, "retries" -# print "Giving up here..." -# sys.exit(1) - -# # print tag[i] -# for i2 in range(0,len(linesout)): -# # print linesout[i2] -# if linesout[i2].split()[2]==pfn[i]: -# #same pfn and tag -# object.append(linesout[i2].split()[3]) -# record.append(linesout[i2].split()[4]) -# if CONNREP!='': -# connstring.append(CONNREP) -# else: -# connstring.append(pfn[i].split('/CMS_COND')[0]) -# account.append('CMS_COND'+pfn[i].split('/CMS_COND')[1]) -# #print "TAG: " + tag[i] + " LABEL: " + linesout[i2].split()[5] -# label.append(linesout[i2].split()[5]) - -# print "Leafnode:",i,leafnode[i] -# print "Parent=",parent[i] -# print "Tag=",tag[i] -# print "Pfn=",pfn[i] -# print "Object=",object[i] -# print "Record=",record[i] -# print "Connstring=",connstring[i] -# print "Account=",account[i] -# print "==================================" - - -# open output conf file -conf=open(CONFFILE,'w') -conf.write('[COMMON]\n') -conf.write('connect=sqlite_file:' + GLOBTAG + '.db\n') -conf.write('#connect=oracle://cms_orcoff_int2r/'+ACCOUNT+'\n') -conf.write('#connect=oracle://cms_orcon_prod/'+ACCOUNT+'\n') -conf.write('\n') -conf.write('[TAGINVENTORY]\n') -conf.write('tagdata=\n') -for iline in range(0,len(leafnode)): - # print iline - if label[iline] == 'None': - outline=' '+tag[iline]+'{pfn='+connstring[iline]+'/'+account[iline]+',objectname='+object[iline]+',recordname='+record[iline]+'}' - else: - outline=' '+tag[iline]+'{pfn='+connstring[iline]+'/'+account[iline]+',objectname='+object[iline]+',recordname='+record[iline]+',labelname='+label[iline]+'}' - - if iline != len(leafnode)-1: - outline=outline+';' - outline=outline+'\n' - conf.write(outline) - -conf.write("\n") -if TAGREP=='': - conf.write('[TAGTREE '+GLOBTAG+']\n') -else: - conf.write('[TAGTREE '+TAGREP+']\n') - -conf.write('root='+root+'\n') -conf.write('nodedata='+node+'{parent='+globparent+'}\n') -conf.write('leafdata=\n') -for ileaf in range(0,len(leafnode)): - outline=' '+leafnode[ileaf]+'{parent='+parent[ileaf]+',tagname='+tag[ileaf]+',pfn='+connstring[ileaf]+'/'+account[ileaf]+'}' - if ileaf!=len(leafnode)-1: - outline=outline+';' - outline=outline+'\n' - conf.write(outline) - -conf.close() - -print CONFFILE+' ready. Plase have a look' diff --git a/CondCore/TagCollection/scripts/dbtoweb.cfg b/CondCore/TagCollection/scripts/dbtoweb.cfg deleted file mode 100644 index 2ed9f282fd4e2..0000000000000 --- a/CondCore/TagCollection/scripts/dbtoweb.cfg +++ /dev/null @@ -1,10 +0,0 @@ -[Common] - -Account: CMS_COND_31X_GLOBALTAG -Conn_string_gtag: frontier://cmsfrontier:8000/PromptProd/CMS_COND_31X_GLOBALTAG -#Conn_string_gtag: sqlite_file:GlobalTag.db -#AuthPath: /afs/cern.ch/cms/DB/conddb -Globtag: All -#Globtag: GR09_P_V6 -Rootdir: ./web_gt_31X -HTMLName: web_gt_31X.html diff --git a/CondCore/TagCollection/scripts/dbtoweb.py b/CondCore/TagCollection/scripts/dbtoweb.py deleted file mode 100755 index c0b43ca71d49c..0000000000000 --- a/CondCore/TagCollection/scripts/dbtoweb.py +++ /dev/null @@ -1,276 +0,0 @@ -#!/usr/bin/env python -import os,string,sys,commands,time,ConfigParser,operator - -from operator import itemgetter -MAXRETRIES=10 # number of retries before giving up - -CONFIGFILE='dbtoweb.cfg' -CONFIG = ConfigParser.ConfigParser() -print 'Reading configuration file from ',CONFIGFILE -CONFIG.read(CONFIGFILE) - -# this is for [COMMON] part of the myconf.conf - -print " " -print "dbtoconf.py:" -ACCOUNT=CONFIG.get('Common','Account') -CONNSTRINGGLOBTAG=CONFIG.get('Common','Conn_string_gtag') -GLOBTAG=CONFIG.get('Common','Globtag') -ROOTDIR=CONFIG.get('Common','Rootdir') -HTMLNAME=CONFIG.get('Common','HTMLName') - -AUTHPATH='' -try: - AUTHPATH=CONFIG.get('Common','AuthPath') -except: - print "WARNING: No authpath fount in config file" - - -print -print "Configuration:" -print "================================" -print "Account:",ACCOUNT -print "CONNSTRING:",CONNSTRINGGLOBTAG -print "Auth. Path:",AUTHPATH -print "GLOBALTAG:",GLOBTAG -print "Root dir:",ROOTDIR - -print "================================" - - -def myparser(input,parstag): - out='-1' - - if input.find(parstag)!=-1: - first=input.split(parstag) - second=first[1].split() -# print second - if (len(second)>=1): - out=second[0] - - return out - - - -def single(currgtag): - - root='' - node='' - globparent='' - leafnode=[] - parent=[] - tag=[] - pfn=[] - object=[] - record=[] - connstring=[] - account=[] - - htmltag=open(currgtag+'.html','w') - htmltag.write('\n') - htmltag.write('\n') - htmltag.write('

Tag List for Global Tag: '+currgtag+'

\n') - htmltag.write('

The first time you access a tag below you have to login (HN credentials)
') - htmltag.write('Then you can come back here and access all tags

\n') - - - htmltag.write('\n') - htmltag.write('\n') - htmltag.write('\n') - htmltag.write('\n') - htmltag.write('\n') - - - TMPTAG=commands.getoutput('mktemp') - os.system('cmscond_tagtree_list -c '+CONNSTRINGGLOBTAG+' -T '+currgtag+' > '+TMPTAG) -# os.system('cat '+TMPTAG) - nlines=0 - tmp=open(TMPTAG,'r') - while tmp: - line=tmp.readline() - if len(line)==0: - break - nlines=nlines+1 - line=string.strip(line) - if line.find('leafnode')==-1: - out=myparser(line,'root:') - if out!='-1': - root=out - out=myparser(line,'node:') - if out!='-1': - node=out - out=myparser(line,'parent:') - if out!='-1': - globparent=out - else: - leafnode.append(myparser(line,'leafnode:')) - parent.append(myparser(line,'parent:')) - tag.append(myparser(line,'tag:')) - pfn.append(myparser(line,'pfn:')) - - # print nlines,line - - tmp.close() - print 'Read '+str(nlines)+' lines...' - print 'Read ',len(leafnode),' leafnodes' - print 'Read ',len(parent),' parent' - print 'Read ',len(tag),' tag' - print 'Read ',len(pfn),' pfn' - - if len(leafnode)!=len(parent) or len(leafnode)!=len(tag) or len(leafnode)!=len(pfn): - print "# of leafnodes different from parent/tag/pfn" - sys.exit() - - #output - #print root,node,globparent - #`create dictionary - tagdict={} - for i in range(0,len(leafnode)): - tagdict[i]=pfn[i] - - sortindex=sorted(tagdict.items(), key=itemgetter(1)) - - # print tagdict - # for i in range(0,len(leafnode)): - # print sortindex[i][0] - - print 'Scanning tags:' - for i in range(0,len(leafnode)): - index=sortindex[i][0] - #lm - # command='cmscond_list_iov -c '+pfn[i].replace('frontier:','frontier://cmsfrontier:8000')+' -t '+tag[i] - # - # for ntime in range(0,MAXRETRIES): - # fullout=commands.getoutput(command) - # if fullout.count(tag[i])>=1: - # # success - # break - # print "Try: ",ntime, ".....",tag[i] - # time.sleep(0.5) - # if fullout.count(tag[i])<1: - # print "Unable to get information on tag:",tag[i]," after ", MAXRETRIES, "retries" - # print "Giving up here..." - # sys.exit(1) - - # adding tag to tag list page with link to condweb page - # first define needed parameters - TEMP=pfn[index].split('/') - ACCOUNT=TEMP[len(TEMP)-1] - TEMP=ACCOUNT.split('_') - DET=TEMP[len(TEMP)-1] - HREFSTRING='https://cmsweb.cern.ch/conddb/IOVManagement/get_iovs?det='+DET+'&service=cms_orcoff_prod&schema='+ACCOUNT+'&viacache=CHECKED&sel_tag='+tag[index]+'&tags=Display+IOV+for+selected+tags&destTag=&firstSince=&lastTill=' -# print 'href= '+HREFSTRING - - - htmltag.write('\n') -# htmltag.write('\n') - htmltag.write('\n') - htmltag.write('\n') - htmltag.write('\n') - # open output file - #lm - #taginfo=open(tag[i],'w') - #taginfo.write(pfn[i]+'\n') - #taginfo.write('========================================================\n') - #taginfo.write(fullout) - #taginfo.close() -# -# print '%-50s - %-30s' % (pfn[i],tag[i]) - os.system('rm -f '+TMPTAG) - htmltag.write('
TagSource
'+tag[i]+''+tag[index]+''+pfn[index]+'
\n') - htmltag.write('

This list was created on: '+time.ctime()+'

\n') - htmltag.write('\n\n') - htmltag.close() - return 'done' - -# main start here -###################################### -# initialization -# first change to root dir -TOBECREATED=0 -try: - if not os.path.exists(ROOTDIR): - os.mkdir(ROOTDIR) - os.chdir(ROOTDIR) - TOBECREATED=1 - BASEDIR=os.getcwd() - print 'ROOTDIR created, current dir= '+BASEDIR - else: - os.chdir(ROOTDIR) - BASEDIR=os.getcwd() - print 'ROOTDIR exists already, current dir= '+BASEDIR -except: - print "ERROR: it is impossible to chdir in",ROOTDIR - sys.exit(1) - -HTMLTMP=HTMLNAME+'.tmp' -if TOBECREATED==1 : - htmlroot=open(HTMLTMP,'w') -else: - os.system('head -n -4 '+HTMLNAME+' > '+HTMLTMP) - htmlroot=open(HTMLTMP,'a') - -if TOBECREATED==1: - # create root html - htmlroot.write('\n') - htmlroot.write('\n') - htmlroot.write('

Global Tag List:

\n') - htmlroot.write('\n') - htmlroot.write('\n') - htmlroot.write('\n') - htmlroot.write('\n') - htmlroot.write('\n') - - -treelist=[] - -if GLOBTAG=="All" : - # need to create a list of trees - TMPTAGLIST=commands.getoutput('mktemp') - os.system('cmscond_tagtree_list -c '+CONNSTRINGGLOBTAG+' > '+TMPTAGLIST) - ntrees=0 - tmplist=open(TMPTAGLIST,'r') - while tmplist: - line=tmplist.readline() - if len(line)==0: - break - line=string.strip(line) - if line.find('tree:')!=1: - out=myparser(line,'tree:') - if out!='-1': - treelist.append(out) - ntrees=ntrees+1 - tmplist.close() - os.system('rm -f '+TMPTAGLIST) -else: - treelist.append(GLOBTAG) - -print "Found trees:" -for tree in range(0,len(treelist)): - print str(tree)+': Tree= '+treelist[tree] - # adding global tag to main page - htmlroot.write('\n') - file=treelist[tree]+'/'+treelist[tree]+'.html' - htmlroot.write('\n') - htmlroot.write('\n') - htmlroot.write('\n') - - # start creating files - os.chdir(BASEDIR) - TREEDIR=BASEDIR+'/'+treelist[tree] - if not os.path.exists(TREEDIR): - os.mkdir(TREEDIR) - os.chdir(TREEDIR) - print 'TREEDIR created, current dir is '+os.getcwd() - - single(treelist[tree]) - os.chdir(BASEDIR) - -htmlroot.write('
Global TagSource
'+treelist[tree]+''+ACCOUNT+'
\n') -htmlroot.write('

This list was created on: '+time.ctime()+'

\n') -htmlroot.write('\n\n') -htmlroot.close() -print 'A new root html has been created: ' -print BASEDIR+'/'+HTMLTMP -print 'Please check and replace (in case)' -# os.system('cp '+HTMLTMP+' '+HTMLNAME+' ; rm -f '+HTMLTMP) diff --git a/CondCore/TagCollection/scripts/listoftags b/CondCore/TagCollection/scripts/listoftags deleted file mode 100755 index 303531df99868..0000000000000 --- a/CondCore/TagCollection/scripts/listoftags +++ /dev/null @@ -1,23 +0,0 @@ -#! /bin/sh -if [ "$2" == "" ]; then - NAME=`basename $0` - echo "Usage: $NAME " - echo - echo "Examples" - echo - echo "Read the PHYS14_25_V1 global tag from Oracle:" - echo " $NAME oracle://cms_orcon_adg/CMS_COND_31X_GLOBALTAG PHYS14_25_V1" - echo - echo "Read the PHYS14_25_V1 global tag from Frontier:" - echo " $NAME frontier://FrontierProd/CMS_COND_31X_GLOBALTAG PHYS14_25_V1" - exit 1 -fi - -CONNECT=$1 -TREE=$2 -cmscond_tagtree_list -c $CONNECT -P /afs/cern.ch/cms/DB/conddb -T $TREE \ - | grep 'leafnode' \ - | awk '{print $4,$6,$1,$3}' \ - | sed -e 's/\ - -examples of usage: -listoftags sqlite_file:CRUZET.db CRUZET3_V2P ---> to get a list of all tags in CRUZET3_V2P -listoftags frontier://cmsfrontier.cern.ch:8000/FrontierProd/CMS_COND_20X_GLOBALTAG CRUZET3_V2P ---> the same from frontier - -============================================================================================================== -createglobaltag: - -create a new global tag based on an external configuration file - -it calls the taginventory_add, tagtree_createroot, tagtree_add in sequence and perform all needed actions. -For a configuration example look at CRUZET3_V2P.conf file. For a detailed explanation, please have a look at -https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideTagCollectionConcept. - -execute as: -createglobaltag - -examples of usage: -createglobaltag CRUZET3_V2P.conf CRUZET3_V2P - -remarks: -- multiple tags can be present in a single configuration file -- the tag inventory list is automatically checked against the DB repository to avoid repeated entries -=============================================================================================================== -dbtoconf.py - -create a conf file from an existing global tag with possibility to replace connect string and/or tagname. -The parameters to dbtoconf are given by a dbtoconf.cfg file - -execute as: -dbtoconf.py - -explanation of cfg (using as example dbtoconf.cfg): -############################################################################################# -[Common] - -# Account is the account from which you should get the global tag -Account: CMS_COND_20X_GLOBALTAG - -# Conn_string_gtag is the connect string for the DB to look for -Conn_string_gtag: sqlite_file:CRUZET3.db -#Conn_string_gtag: frontier://cmsfrontier:8000/PromptProd/CMS_COND_20X_GLOBALTAG - -# Globtag is the tag to read and put in conf -Globtag: CRUZET3_V2P - -#Confoutput is the output configuration file -Confoutput: CRUZET3_V2H.conf - -#AuthPath is the authorization path -#AuthPath: /afs/cern.ch/cms/DB/conddb - -# Conn_rep is useful to replace the connect string. An use case is to get a new global tag as a copy -# of an existing one, replacing only the connect string -Conn_rep: frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0) -#Conn_rep: frontier://PromptProd - -#Tag_rep is the new name of the tag in case a replacemnet string is given -Tag_rep: CRUZET3_V2H -############################################################################################# diff --git a/CondCore/TagCollection/src/PfnEditor.cc b/CondCore/TagCollection/src/PfnEditor.cc deleted file mode 100644 index 8dd00e8b728a4..0000000000000 --- a/CondCore/TagCollection/src/PfnEditor.cc +++ /dev/null @@ -1,29 +0,0 @@ -#include "CondCore/TagCollection/interface/PfnEditor.h" - -namespace cond{ - - PfnEditor::PfnEditor() : off(true){} - - PfnEditor::PfnEditor(std::string const & ipre, - std::string const & ipos) : - prefix(ipre), - postfix(ipos), - off(prefix.empty() && postfix.empty()) - {} - - - std::string PfnEditor::operator()(std::string const & pfn) const { - if (off) return pfn; - // FIXME ad-hoc - if (pfn.find("FrontierInt")!=std::string::npos) return pfn; - if (pfn.find("FrontierPrep")!=std::string::npos) return pfn; - if (pfn.find("sqlite")!=std::string::npos) return pfn; - - size_t pos=std::string::npos; - if (!prefix.empty()) pos = pfn.rfind('/'); - return prefix + ( (pos == std::string::npos) ? pfn : - pfn.substr(pos+1) - ) + postfix; - } - -} diff --git a/CondCore/TagCollection/src/TagCollectionRetriever.cc b/CondCore/TagCollection/src/TagCollectionRetriever.cc deleted file mode 100644 index e7988fb7daac6..0000000000000 --- a/CondCore/TagCollection/src/TagCollectionRetriever.cc +++ /dev/null @@ -1,164 +0,0 @@ -// -// Package: CondCore/TagCollection -// Class: TagCollectionRetriever -// -// Author: Zhen Xie -// -#include "CondCore/TagCollection/interface/TagCollectionRetriever.h" -#include "CondCore/TagCollection/interface/TagDBNames.h" -#include "RelationalAccess/ISchema.h" -#include "RelationalAccess/ITable.h" -#include "RelationalAccess/IQuery.h" -#include "RelationalAccess/ICursor.h" -#include "CoralBase/AttributeList.h" -#include "CoralBase/Attribute.h" -#include "RelationalAccess/SchemaException.h" -#include "CondCore/TagCollection/interface/Exception.h" - -cond::TagCollectionRetriever::TagCollectionRetriever( cond::DbSession& coraldb ): - m_coraldb(coraldb) -{} - - -cond::TagCollectionRetriever::TagCollectionRetriever( cond::DbSession& coraldb, - std::string const & prefix, - std::string const & postfix) : - m_coraldb(coraldb), pfnEditor(prefix,postfix) -{} - - - -cond::TagCollectionRetriever::~TagCollectionRetriever(){} - -bool cond::TagCollectionRetriever::existsTagDatabase(){ - return m_coraldb.nominalSchema().existsTable(cond::tagInventoryTable); -} - -#include -bool cond::TagCollectionRetriever::existsTagCollection( const std::string& globaltag ){ - if(!existsTagDatabase()){ - throw cond::nonExistentGlobalTagInventoryException("TagCollectionRetriever::selectTagCollection"); - } - std::pair treenodepair=parseglobaltag(globaltag); - std::string treename=treenodepair.first; - std::string nodename=treenodepair.second; - std::string treetablename(cond::tagTreeTablePrefix); - if( !treename.empty() ){ - for(unsigned int i=0; i& result){ - if(!selectTagCollection( globaltag, result ) ) - throw cond::nonExistentGlobalTagException("TagCollectionRetriever::getTagCollection",globaltag); -} - -bool -cond::TagCollectionRetriever::selectTagCollection( const std::string& globaltag, - std::set& result){ - if(!m_coraldb.nominalSchema().existsTable(cond::tagInventoryTable)){ - throw cond::nonExistentGlobalTagInventoryException("TagCollectionRetriever::selectTagCollection"); - } - std::pair treenodepair=parseglobaltag(globaltag); - std::string treename=treenodepair.first; - std::string nodename=treenodepair.second; - //std::cout<<"treename "<addToTableList( treetablename, "p1" ); - query->addToTableList( treetablename, "p2" ); - query->addToOutputList( "p1.tagid" ); - query->setRowCacheSize( 100 ); - coral::AttributeList bindData; - bindData.extend( "nodelabel",typeid(std::string) ); - bindData.extend( "tagid",typeid(unsigned int) ); - bindData["tagid"].data()=0; - bindData["nodelabel"].data()=nodename; - query->setCondition( "p1.lft BETWEEN p2.lft AND p2.rgt AND p2.nodelabel = :nodelabel AND p1.tagid <> :tagid", bindData ); - coral::AttributeList qresult; - qresult.extend("tagid", typeid(unsigned int)); - query->defineOutput(qresult); - std::vector leaftagids; - leaftagids.reserve(100); - coral::ICursor& cursor = query->execute(); - while( cursor.next() ) { - const coral::AttributeList& row = cursor.currentRow(); - leaftagids.push_back(row["tagid"].data()); - } - cursor.close(); - delete query; - std::vector::iterator it; - std::vector::iterator itBeg=leaftagids.begin(); - std::vector::iterator itEnd=leaftagids.end(); - coral::ITable& tagInventorytable=m_coraldb.nominalSchema().tableHandle(cond::tagInventoryTable); - for( it=itBeg; it!=itEnd; ++it ){ - coral::IQuery* leaftagquery=tagInventorytable.newQuery(); - leaftagquery->addToOutputList( "tagname" ); - leaftagquery->addToOutputList( "pfn" ); - leaftagquery->addToOutputList( "recordname" ); - leaftagquery->addToOutputList( "objectname" ); - leaftagquery->addToOutputList( "labelname" ); - coral::AttributeList myresult; - myresult.extend("tagname",typeid(std::string)); - myresult.extend("pfn",typeid(std::string)); - myresult.extend("recordname",typeid(std::string)); - myresult.extend("objectname",typeid(std::string)); - myresult.extend("labelname",typeid(std::string)); - leaftagquery->defineOutput( myresult ); - coral::AttributeList bindVariableList; - bindVariableList.extend("tagid",typeid(unsigned int)); - leaftagquery->setCondition( "tagid = :tagid",bindVariableList ); - leaftagquery->limitReturnedRows(1,0); - bindVariableList["tagid"].data()=*it; - coral::ICursor& cursor2 =leaftagquery->execute(); - if( cursor2.next() ){ - const coral::AttributeList& row = cursor2.currentRow(); - cond::TagMetadata tagmetadata; - std::string tagname=row["tagname"].data(); - tagmetadata.tag=tagname; - tagmetadata.pfn=pfnEditor(row["pfn"].data()); - tagmetadata.recordname=row["recordname"].data(); - tagmetadata.objectname=row["objectname"].data(); - tagmetadata.labelname=row["labelname"].data(); - if(! result.insert(tagmetadata).second ){ - throw cond::Exception("cond::TagCollectionRetriever::getTagCollection tag "+tagname+" from "+tagmetadata.pfn+" already exist, cannot insert in the tag collection "); - } - } - cursor2.close(); - delete leaftagquery; - } - return true; -} - -std::pair -cond::TagCollectionRetriever::parseglobaltag(const std::string& globaltag){ - std::pair result; - std::size_t pos=globaltag.find("::"); - if(pos==std::string::npos){ - result.first=""; - result.second=globaltag; - }else{ - result.first=globaltag.substr(0,pos); - result.second=globaltag.substr(pos+2); - } - return result; -} - diff --git a/CondCore/TagCollection/src/TagDBNames.cc b/CondCore/TagCollection/src/TagDBNames.cc deleted file mode 100644 index 62e883992579f..0000000000000 --- a/CondCore/TagCollection/src/TagDBNames.cc +++ /dev/null @@ -1,6 +0,0 @@ -#include "CondCore/TagCollection/interface/TagDBNames.h" -namespace cond { -const std::string tagTreeTablePrefix("TAGTREE_TABLE"); -const std::string tagInventoryTable("TAGINVENTORY_TABLE"); -} - diff --git a/CondCore/TagCollection/test/BuildFile.xml b/CondCore/TagCollection/test/BuildFile.xml deleted file mode 100644 index fe0379f9fa4ed..0000000000000 --- a/CondCore/TagCollection/test/BuildFile.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/CondCore/TagCollection/test/globtag.conf2 b/CondCore/TagCollection/test/globtag.conf2 deleted file mode 100644 index 31f3a917736cc..0000000000000 --- a/CondCore/TagCollection/test/globtag.conf2 +++ /dev/null @@ -1,10 +0,0 @@ -[COMMON] -connect=sqlite_file:GRUMMDB.db - -[TAGINVENTORY] -tagdata=TrackerIdealGeometry170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=TrackerAlignment,recordname=TrackerAlignmentRcd};TrackerIdealGeometryErrors170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=TrackerAlignmentError,recordname=TrackerAlignmentErrorRcd};DTIdealGeometry170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=DTAlignment,recordname=DTAlignmentRcd};DTIdealGeometryErrors170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=DTAlignmentError,recordname=DTAlignmentErrorRcd};CSCIdealGeometry170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=CSCAlignment,recordname=CSCAlignmentRcd};CSCIdealGeometryErrors170{pfn=frontier://Frontier/CMS_COND_18X_ALIGNMENT,objectname=CSCAlignmentError,recordname=CSCAlignmentErrorRcd};V2_trivial_TBuffer{pfn=frontier://Frontier/CMS_COND_18X_PIXEL,objectname=SiPixelGainCalibration,recordname=SiPixelGainCalibrationRcd};CSA07_SiStrip_Ideal_Gain_v2{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd};SiStripNoise_Fake_PeakMode_18X{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripFakeNoise,recordname=SiStripFakeNoiseRcd};CSA07_SiStrip_Ideal_LAngle_v2{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripLorentzAngle,recordname=SiStripLorentzAngleRcd};GRENt0{pfn=frontier://Frontier/CMS_COND_18X_DT,objectname=DTT0Rcd,recordname=DTT0Rcd};GRENttrigTet{pfn=frontier://Frontier/CMS_COND_18X_DT,objectname=DTTrigRcd,recordname=DTTrigRcd};GRENnoise{pfn=frontier://Frontier/CMS_COND_18X_DT,objectname=DTStatusFlag,recordname=DTStatusFlagRcd};CSCDBGains_ideal{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCDBGains,recordname=CSCDBGainsRcd};CSCDBNoiseMatrix_ideal{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCDBNoiseMatrix,recordname=CSCDBNoiseMatrixRcd};CSCDBCrosstalk_ideal{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCDBCrosstalk,recordname=CSCDBCrosstalkRcd};CSCDBPedestals_ideal{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCDBPedestals,recordname=CSCDBPedestalsRcd};CSCChamberIndex{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCChamberIndex,recordname=CSCChamberIndexRcd};CSCDDUMap{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCDDUMap,recordname=CSCDDUMapRcd};hcal_pedestals_fC_v2_grmm{pfn=frontier://Frontier/CMS_COND_ON_18X_HCAL,objectname=HcalPedestals,recordname=HcalPedestalsRcd};hcal_widths_fC_v2_grmm{pfn=frontier://Frontier/CMS_COND_ON_18X_HCAL,objectname=HcalPedestalWidths,recordname=HcalPedestalWidthsRcd};official_emap_v5_080208{pfn=frontier://Frontier/CMS_COND_ON_18X_HCAL,objectname=HcalElectronicsMap,recordname=HcalElectronicsMapRcd};hcal_gains_v2_gren_reprocessing{pfn=frontier://Frontier/CMS_COND_ON_18X_HCAL,objectname=HcalGains,recordname=HcalGainsRcd};qie_normalmode_v3{pfn=frontier://Frontier/CMS_COND_ON_18X_HCAL,objectname=HcalQIEData,recordname=HcalQIEDataRcd};EcalPedestals_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalPedestals,recordname=EcalPedestalsRcd};EcalADCToGeVConstant_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalADCToGeVConstant,recordname=EcalADCToGeVConstantRcd};EcalGainRatios_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalGainRatios,recordname=EcalGainRatiosRcd};EcalIntercalibConstants_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalIntercalibConstants,recordname=EcalIntercalibConstantsRcd};EcalWeightXtalGroups_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalWeightXtalGroups,recordname=EcalWeightXtalGroupsRcd};EcalTBWeights_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalTBWeights,recordname=EcalTBWeightsRcd};EcalLaserAlphas_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalLaserAlphas,recordname=EcalLaserAlphasRcd};EcalLaserAPDPNRatios_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalLaserAPDPNRatios,recordname=EcalLaserAPDPNRatiosRcd};EcalLaserAPDPNRatiosRef_trivial{pfn=frontier://Frontier/CMS_COND_18X_ECAL,objectname=EcalLaserAPDPNRatiosRef,recordname=EcalLaserAPDPNRatiosRefRcd};probBTagPDF2D_tag{pfn=frontier://Frontier/CMS_COND_18X_BTAU,objectname=BTagTrackProbability2D,recordname=BTagTrackProbability2DRcd};probBTagPDF3D_tag{pfn=frontier://Frontier/CMS_COND_18X_BTAU,objectname=BTagTrackProbability3D,recordname=BTagTrackProbability3DRcd};MVAJetTags_CMSSW_1_7_0_pre1{pfn=frontier://Frontier/CMS_COND_18X_BTAU,objectname=BTauGenericMVAJetTagComputer,recordname=BTauGenericMVAJetTagComputerRcd};EarlyCollision{pfn=frontier://Frontier/CMS_COND_18X_BEAMSPOT,objectname=BeamSpotObjects,recordname=BeamSpotObjectsRcd};SiPixelFedCablingMap_v1{pfn=frontier://Frontier/CMS_COND_18X_PIXEL,objectname=SiPixelFedCablingMapRcd,recordname=SiPixelFedCablingMapRcd};SiStripFedCabling_18X{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripFedCabling,recordname=SiStripFedCablingRcd};GRENmap_774{pfn=frontier://Frontier/CMS_COND_18X_DT,objectname=DTReadOutMapping,recordname=DTReadOutMappingRcd};RPCEMap_v2{pfn=frontier://Frontier/CMS_COND_18X_RPC,objectname=RPCEMap,recordname=RPCEMapRcd};CSCChamberMap{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCChamberMap,recordname=CSCChamberMapRcd};CSCCrateMap{pfn=frontier://Frontier/CMS_COND_18X_CSC,objectname=CSCCrateMap,recordname=CSCCrateMapRcd} - -[TAGTREE GRUMM] -root=All -nodedata=Calibration{parent=All} -leafdata=TrackerGeometry{parent=Calibration,tagname=TrackerIdealGeometry170};TrackerGeometryErrors{parent=Calibration,tagname=TrackerIdealGeometryErrors170};DTGeometry{parent=Calibration,tagname=DTIdealGeometry170};DTGeometryErrors{parent=Calibration,tagname=DTIdealGeometryErrors170};CSCGeometry{parent=Calibration,tagname=CSCIdealGeometry170};CSCGeometryErrors{parent=Calibration,tagname=CSCIdealGeometryErrors170};PixelGain{parent=Calibration,tagname=V2_trivial_TBuffer};SiStripGain{parent=Calibration,tagname=CSA07_SiStrip_Ideal_Gain_v2};SiStripNoise{parent=Calibration,tagname=SiStripNoise_Fake_PeakMode_18X};SiStripLangle{parent=Calibration,tagname=CSA07_SiStrip_Ideal_LAngle_v2};DTT0{parent=Calibration,tagname=GRENt0};DTTrig{parent=Calibration,tagname=GRENttrigTet};DTNoise{parent=Calibration,tagname=GRENnoise};CSCGain{parent=Calibration,tagname=CSCDBGains_ideal};CSCNoise{parent=Calibration,tagname=CSCDBNoiseMatrix_ideal};CSCCrosstalk{parent=Calibration,tagname=CSCDBCrosstalk_ideal};CSCPedestals{parent=Calibration,tagname=CSCDBPedestals_ideal};CSCChambIndex{parent=Calibration,tagname=CSCChamberIndex};CSCDDUMap{parent=Calibration,tagname=CSCDDUMap};HCALPedestals{parent=Calibration,tagname=hcal_pedestals_fC_v2_grmm};HCALPedWidths{parent=Calibration,tagname=hcal_widths_fC_v2_grmm};HCALEmap{parent=Calibration,tagname=official_emap_v5_080208};HCALGain{parent=Calibration,tagname=hcal_gains_v2_gren_reprocessing};HCALQie{parent=Calibration,tagname=qie_normalmode_v3};ECALPedestals{parent=Calibration,tagname=EcalPedestals_trivial};ECALADCToGeV{parent=Calibration,tagname=EcalADCToGeVConstant_trivial};ECALGainRatios{parent=Calibration,tagname=EcalGainRatios_trivial};ECALInterCalib{parent=Calibration,tagname=EcalIntercalibConstants_trivial};ECALWeightXtal{parent=Calibration,tagname=EcalWeightXtalGroups_trivial};ECALTBWeight{parent=Calibration,tagname=EcalTBWeights_trivial};ECALLaserAlpha{parent=Calibration,tagname=EcalLaserAlphas_trivial};ECALLaserAPDPN{parent=Calibration,tagname=EcalLaserAPDPNRatios_trivial};ECALLaserAPDPNRef{parent=Calibration,tagname=EcalLaserAPDPNRatiosRef_trivial};BTAGProb2D{parent=Calibration,tagname=probBTagPDF2D_tag};BTAGProb3D{parent=Calibration,tagname=probBTagPDF3D_tag};BTAUJetTagComputer{parent=Calibration,tagname=MVAJetTags_CMSSW_1_7_0_pre1};BEAMSPOT{parent=Calibration,tagname=EarlyCollision};SiPixelCabling{parent=Calibration,tagname=SiPixelFedCablingMap_v1};SiStripCabling{parent=Calibration,tagname=SiStripFedCabling_18X};DTROMap{parent=Calibration,tagname=GRENmap_774};RPCCabling{parent=Calibration,tagname=RPCEMap_v2};CSCChambMap{parent=Calibration,tagname=CSCChamberMap};CSCCrateMap{parent=Calibration,tagname=CSCCrateMap} diff --git a/CondCore/TagCollection/test/globtag.conf4 b/CondCore/TagCollection/test/globtag.conf4 deleted file mode 100644 index a0da4c46ae80c..0000000000000 --- a/CondCore/TagCollection/test/globtag.conf4 +++ /dev/null @@ -1,25 +0,0 @@ -[COMMON] -connect=oracle://devdb10/cms_xiezhen_dev - -[TAGINVENTORY] -tagdata= - CSA07_SiStrip_Ideal_Gain_v2{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiStrip_Ideal_Gain_v3{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SiPixel_Ideal_Gain_v4{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SPixel_Ideal_Gain_v4{pfn=frontier://Frontier/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd}; - SPixel_Ideal_Gain_v4{pfn=frontier://FrontierON/CMS_COND_18X_STRIP,objectname=SiStripApvGain,recordname=SiStripApvGainRcd} - -[TAGTREE GRUMM] -root=All - -nodedata= - Calibration{parent=All}; - Alignment{parent=All}; - CableMap{parent=All} - -leafdata= - SiStripGain{parent=Calibration,tagname=CSA07_SiStrip_Ideal_Gain_v2,pfn=frontier://Frontier/CMS_COND_18X_STRIP}; - SiStripGainForAlign{parent=Alignment,tagname=CSA07_SiStrip_Ideal_Gain_v2}; - SiStripGainFor{parent=Alignment,tagname=SiPixel_Ideal_Gain_v4}; - SiStripFor{parent=Alignment,tagname=SiPixel_Ideal_Gain_v4}; - SiStripOn{parent=CableMap,tagname=SPixel_Ideal_Gain_v4,pfn=frontier://FrontierON/CMS_COND_18X_STRIP} diff --git a/CondCore/TagCollection/test/input.conf b/CondCore/TagCollection/test/input.conf deleted file mode 100644 index 9eae92df934c5..0000000000000 --- a/CondCore/TagCollection/test/input.conf +++ /dev/null @@ -1,36 +0,0 @@ -[COMMON] -connect=sqlite_file:pippo.db - -[TAGINVENTORY] -tagdata= - mytest{pfn=sqlite_file:mytest.db,objectname=Pedestals,recordname=PedestalsRcd,labelname=lab3d}; - mytest{pfn=sqlite_file:acopymytest.db,objectname=Pedestals,recordname=PedestalsRcd,labelname=lab3d}; - mypedestals{pfn=sqlite_file:mytest.db,objectname=Pedestals,recordname=PedestalsRcd,labelname=lab2}; - anothermytest{pfn=sqlite_file:mytest.db,objectname=Pedestals,recordname=anotherPedestalsRcd}; - frog{pfn=frontier://(proxyurl=http://localhost:3128)(serverurl=http://frontier1.cms:8000/FrontierOnProd)(serverurl=http://frontier2.cms:8000/FrontierOnProd)(retrieve-ziplevel=0)/CMS_COND_20X_ALIGNMENT,objectname=Alignments,recordname=TrackerAlignmentRcd,objectname=Alig,recordname=AligRcd} - -[TAGTREE MYTREE1] -root=All -nodedata= - Calibration{parent=All,comment='Mar-2-17:55:55-2009'}; - Alignment{parent=All,comment='Mar-3'} - -leafdata= - EcalCalib{parent=Calibration,tagname=mytest,pfn=sqlite_file:mytest.db}; - HcalCalib{parent=Calibration,tagname=mypedestals}; - DTCalib{parent=Calibration,tagname=mytest,pfn=sqlite_file:acopymytest.db}; - MuonAlign{parent=Alignment,tagname=anothermytest}; - TAlign{parent=Alignment,tagname=frog} - -[TAGTREE MYTREE2] -root=All -nodedata= - CSACalibration{parent=All}; - CSAAlignment{parent=All} - -leafdata= - mytestoriginal{parent=Calibration,tagname=mytest,pfn=sqlite_file:mytest.db}; - mytestcopy{parent=Calibration,tagname=mytest,pfn=sqlite_file:acopymytest.db}; - mypedestals{parent=Calibration,tagname=mypedestals}; - anothermytest{parent=Alignment,tagname=anothermytest} - diff --git a/CondCore/TagCollection/test/testConfigParser.py b/CondCore/TagCollection/test/testConfigParser.py deleted file mode 100644 index a2897d080c34c..0000000000000 --- a/CondCore/TagCollection/test/testConfigParser.py +++ /dev/null @@ -1,10 +0,0 @@ -from ConfigParser import * - -config= ConfigParser() -config.read('input.conf') -for section in config.sections(): - print section - for option in config.options(section): - print " ", option, "=", config.get(section, option) -print config.get("COMMON", "connect") - diff --git a/CondCore/TagCollection/test/testExporter.py b/CondCore/TagCollection/test/testExporter.py deleted file mode 100644 index ec08ddc175e94..0000000000000 --- a/CondCore/TagCollection/test/testExporter.py +++ /dev/null @@ -1,103 +0,0 @@ -#Coral package:CoralTools -import os -import coral -from CondCore.TagCollection.exporter import exporter - -#os.environ["CORAL_AUTH_PATH"]="/afs/cern.ch/sw/lcg/app/pool/db/python" -#os.environ["CORAL_DBLOOKUP_PATH"]="/afs/cern.ch/sw/lcg/app/pool/db/python" - -try: - #Initialize Connection Service - svc = coral.ConnectionService() - - #open session proxy for source schema providing logical service name & access mode - sourceSession = svc.connect( 'sqlite_file:source.db', accessMode = coral.access_Update ) - - #open session proxy for destination schema providing logical service name & access mode - destSession = svc.connect( 'sqlite_file:dest.db', accessMode = coral.access_Update ) - - rowCachesize=1000 - exp=exporter( sourceSession,destSession,rowCachesize ) - - try: - print "copyschema() : Copies the schema objects from source to destination, without copying data." - exp.copyschema() - print "Tables created" - except Exception as e: - print "Test Failed" - print str(e) - - try: - print "copydata(rowCount) : Copies the schema objects from source to destination, including data copy." - exp.copydata(rowCount=100) - print "Data copied" - except Exception as e: - print "Test Failed" - print str(e) - - try: - print "copytableschema(tablename) : Copies the specified table schema without copying data." - tablename = "T1" - exp.copytableschema(tablename) - print "Table created" - except Exception as e: - print "Test Failed" - print str(e) - - try: - print "copytabledata(tablename,selectionclause,selectionparameters,rowCount) : Copies the specified table schema, including data copy." - tablename = "T1" - selectionclause= "id >= :idmin and id < :idmax " - selectionparameters = coral.AttributeList() - selectionparameters.extend( "idmin","int") - selectionparameters.extend( "idmax","int") - selectionparameters["idmin"].setData(0) - selectionparameters["idmax"].setData(2) - exp.copytabledata(tablename,selectionclause,selectionparameters,rowCount=100) - print "Data copied" - except Exception as e: - print "Test Failed" - print str(e) - - try: - print "copytablelistschema(tablelist) : Copies the specified list of tables ordered by hierarchy without copying data." - tableset = ['T3','T1','T2'] - exp.copytablelistschema(tableset) - print "Tables created" - except Exception as e: - print "Test Failed" - print str(e) - - try: - print "copytablelistdata(tablelist,rowCount) : Copies the specified list of tables ordered by hierarchy, including data copy." - table1 = "T3" - selectionclause1= "id >= 4 and id < 8 " - - table2 = "T2" - selectionclause2= "id >= :idmin and id < :idmax " - selectionparameters2 = coral.AttributeList() - selectionparameters2.extend( "idmin","int") - selectionparameters2.extend( "idmax","int") - selectionparameters2["idmin"].setData(0) - selectionparameters2["idmax"].setData(34) - - table3 = "T1" - - tablelist1 = [table1,selectionclause1] - tablelist2 = [table2,selectionclause2,selectionparameters2] - tablelist3 = [table3] - - tablelist = [tablelist1,tablelist2,tablelist3] - exp.copytablelistdata(tablelist,rowCount=100) - print "Data copied " - except Exception as e: - print "Test Failed" - print str(e) - - del sourceSession - del destSession -except Exception as e: - print "Test FAILED" - print str(e) - - diff --git a/CondCore/TagCollection/test/testListDBObjects.py b/CondCore/TagCollection/test/testListDBObjects.py deleted file mode 100644 index 25636c265786a..0000000000000 --- a/CondCore/TagCollection/test/testListDBObjects.py +++ /dev/null @@ -1,29 +0,0 @@ -import os -import coral -from CondCore.TagCollection.listobjects import dumpobjectlist - -#os.environ["CORAL_AUTH_PATH"]="/afs/cern.ch/sw/lcg/app/pool/db/python" -#os.environ["CORAL_DBLOOKUP_PATH"]="/afs/cern.ch/sw/lcg/app/pool/db/python" - -try: - #Initialize Connection Service - svc = coral.ConnectionService() - - #open session proxy using MySQL technology providing logical service name & access mode - session = svc.connect( 'sqlite_file:my2test.db', accessMode = coral.access_Update ) - transaction = session.transaction() - transaction.start(True) - - schema = session.nominalSchema() - result = dumpobjectlist( schema ) - transaction.commit() - del session - - print "[SUCCESS] Test for dumpobjectlist passed." - -except Exception as e: - transaction.rollback() - print "Test FAILED" - print str(e) - - diff --git a/CondCore/TagCollection/test/testPfnEditor.cpp b/CondCore/TagCollection/test/testPfnEditor.cpp deleted file mode 100644 index af83e4dc84f5b..0000000000000 --- a/CondCore/TagCollection/test/testPfnEditor.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "CondCore/TagCollection/interface/PfnEditor.h" - -#include - -int err = 0; - -void error(char const * m) { - ++err; - std::cerr << m << std::endl; -} - -int main() { - - std::string det("STRIP"); - std::string cond("CMS_COND_31X_"); - std::string pfn("oracle://cmsarc_lb/CMS_COND_31X_STRIP"); - std::string pre1("oracle://cmsarc_lb/"); - std::string pre2("oracle://cmsprod/"); - - std::string post("_0911"); - - { - cond::PfnEditor ed("",""); - if (ed(pfn)!=pfn) - error("error adding null pre and null post"); - } - - { - cond::PfnEditor ed("",post); - if (ed(pfn)!=pfn+post) - error("error adding null pre and post"); - } - - { - cond::PfnEditor ed(pre2,""); - if (ed(pfn)!=pre2+cond+det) - error("error changing pre and null post"); - } - - { - cond::PfnEditor ed(pre2,post); - if (ed(pfn)!=pre2+cond+det+post) - error("error changing pre and post"); - } - - { - cond::PfnEditor ed(pre1+cond,post); - if (ed(det)!=pre1+cond+det+post) - error("error adding pre and post"); - } - - - return err; -} diff --git a/CondCore/TagCollection/test/testlonglong.py b/CondCore/TagCollection/test/testlonglong.py deleted file mode 100644 index 36b39eb40018d..0000000000000 --- a/CondCore/TagCollection/test/testlonglong.py +++ /dev/null @@ -1,69 +0,0 @@ -import os -import coral -os.putenv( "CORAL_AUTH_PATH", "." ) -svc = coral.ConnectionService() -session = svc.connect( 'sqlite_file:testcoral.db',accessMode = coral.access_Update ) -#session = svc.connect( 'oracle://devdb10/cms_xiezhen_dev',accessMode = coral.access_Update ) -TreeTableName = 'TAGTREE_TABLE' -TreeTableColumns = {'nodeid':'unsigned long', 'nodelabel':'string', 'lft':'unsigned long', 'rgt':'unsigned long', 'parentid':'unsigned long', 'tagid':'unsigned long', 'globalsince':'unsigned long long', 'globaltill':'unsigned long long'} -TreeTableValues = {'nodeid':1, 'nodelabel':'testtest', 'lft':5, 'rgt':6, 'parentid':4, 'tagid':2, 'globalsince':1235, 'globaltill':9457} -TreeTableNotNullColumns = ['nodelabel','lft','rgt','parentid'] -TreeTableUniqueColumns = ['nodelabel'] -TreeTablePK = ('nodeid') -transaction=session.transaction() -try: - transaction.start(False) - schema = session.nominalSchema() - schema.dropIfExistsTable( TreeTableName ) - description = coral.TableDescription(); - description.setName( TreeTableName ) - for columnName, columnType in TreeTableColumns.items(): - description.insertColumn(columnName, columnType) - for columnName in TreeTableNotNullColumns : - description.setNotNullConstraint(columnName,True) - for columnName in TreeTableUniqueColumns : - description.setUniqueConstraint(columnName) - description.setPrimaryKey( TreeTablePK ) - TreeTableHandle = schema.createTable( description ) - print 'created' - TreeTableHandle.privilegeManager().grantToPublic( coral.privilege_Select ) - editor=TreeTableHandle.dataEditor() - inputData=coral.AttributeList() - for name,type in TreeTableColumns.items(): - inputData.extend(name,type) - inputData[name].setData(TreeTableValues[name]) - editor.insertRow(inputData) - transaction.commit() - transaction.start(True) - query=session.nominalSchema().tableHandle(TreeTableName).newQuery() - condition = 'nodelabel =:nodelabel' - conditionData = coral.AttributeList() - conditionData.extend( 'nodelabel','string' ) - query.setCondition( condition, conditionData) - conditionData['nodelabel'].setData('testtest') - cursor = query.execute() - while ( next(cursor) ): - tagid=cursor.currentRow()['tagid'].data() - print 'tagid',tagid - nodeid=cursor.currentRow()['nodeid'].data() - print 'nodeid',nodeid - nodelabel=cursor.currentRow()['nodelabel'].data() - print 'nodelabel',nodelabel - lft=cursor.currentRow()['lft'].data() - print 'lft',lft - rgt=cursor.currentRow()['rgt'].data() - print 'rgt',rgt - parentid=cursor.currentRow()['parentid'].data() - print 'parentid',parentid - globalsince=cursor.currentRow()['globalsince'].data() - print 'globalsince',globalsince - globaltill=cursor.currentRow()['globaltill'].data() - print 'globaltill',globaltill - transaction.commit() - del session -except Exception as e: - print "Failed in unit test" - print str(e) - transaction.rollback() - del session - diff --git a/CondCore/TagCollection/test/writeTestTagDB.cpp b/CondCore/TagCollection/test/writeTestTagDB.cpp deleted file mode 100644 index b6122f208d6cf..0000000000000 --- a/CondCore/TagCollection/test/writeTestTagDB.cpp +++ /dev/null @@ -1,206 +0,0 @@ -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/TagMetadata.h" -#include "RelationalAccess/ISchema.h" -#include "RelationalAccess/ITable.h" -#include "RelationalAccess/TableDescription.h" -#include "RelationalAccess/ITableDataEditor.h" -#include "RelationalAccess/ITablePrivilegeManager.h" -#include "RelationalAccess/IBulkOperation.h" -#include "CoralBase/AttributeList.h" -#include "CoralBase/Attribute.h" -#include "CoralBase/AttributeSpecification.h" -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/standard.h" -#include -int main(){ - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - const std::string tagTreeTable("TAGTREE_TABLE_MYTREE1"); - const std::string tagInventoryTable("TAGINVENTORY_TABLE"); - try{ - cond::DbConnection connection; - connection.configuration().setMessageLevel( coral::Error ); - connection.configure(); - cond::DbSession session = connection.createSession(); - session.open( "sqlite_file:tagDB.db" ); - session.transaction().start(false); - coral::TableDescription tagTreeTableDesc; - coral::TableDescription tagInventoryTableDesc; - tagTreeTableDesc.setName(tagTreeTable); - tagTreeTableDesc.insertColumn("nodeid", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagTreeTableDesc.insertColumn("nodelabel", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagTreeTableDesc.insertColumn("lft", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagTreeTableDesc.insertColumn("rgt", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagTreeTableDesc.insertColumn("parentid", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagTreeTableDesc.insertColumn("tagid", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagTreeTableDesc.insertColumn("globalsince", coral::AttributeSpecification::typeNameForId( typeid(unsigned long long) ) ); - tagTreeTableDesc.insertColumn("globaltill", coral::AttributeSpecification::typeNameForId( typeid(unsigned long long) ) ); - tagTreeTableDesc.insertColumn("comment", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - std::vector cols; - cols.push_back( "nodeid" ); - tagTreeTableDesc.setPrimaryKey( cols ); - tagTreeTableDesc.setNotNullConstraint( "nodelabel" ); - tagTreeTableDesc.setNotNullConstraint( "lft" ); - tagTreeTableDesc.setNotNullConstraint( "rgt" ); - tagTreeTableDesc.setNotNullConstraint( "tagid" ); - tagTreeTableDesc.setUniqueConstraint( "nodelabel" ); - coral::ITable& treetable=session.nominalSchema().createTable( tagTreeTableDesc ); - treetable.privilegeManager().grantToPublic( coral::ITablePrivilegeManager::Select); - - tagInventoryTableDesc.setName(tagInventoryTable); - tagInventoryTableDesc.insertColumn("tagid", coral::AttributeSpecification::typeNameForId( typeid(unsigned int) ) ); - tagInventoryTableDesc.insertColumn("tagname", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagInventoryTableDesc.insertColumn("pfn", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagInventoryTableDesc.insertColumn("recordname", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagInventoryTableDesc.insertColumn("objectname", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagInventoryTableDesc.insertColumn("labelname", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - tagInventoryTableDesc.insertColumn("comment", coral::AttributeSpecification::typeNameForId( typeid(std::string) ) ); - std::vector pkcols; - pkcols.push_back( "tagid" ); - tagInventoryTableDesc.setPrimaryKey( pkcols ); - tagInventoryTableDesc.setNotNullConstraint( "tagname" ); - tagInventoryTableDesc.setNotNullConstraint( "pfn" ); - tagInventoryTableDesc.setNotNullConstraint( "recordname" ); - tagInventoryTableDesc.setNotNullConstraint( "objectname" ); - tagInventoryTableDesc.setNotNullConstraint( "labelname" ); - tagInventoryTableDesc.setUniqueConstraint( "tagname" ); - coral::ITable& inventorytable=session.nominalSchema().createTable( tagInventoryTableDesc ); - inventorytable.privilegeManager().grantToPublic( coral::ITablePrivilegeManager::Select); - std::cout<<"all tables are created"< > tagcollection; - std::string tagname; - cond::TagMetadata tagmetadata; - tagname="mytest"; - tagmetadata.pfn="sqlite_file:mytest.db"; - tagmetadata.recordname="PedestalsRcd"; - tagmetadata.objectname="Pedestals"; - tagmetadata.labelname="lab3d"; - tagcollection.push_back(std::pair(tagname,tagmetadata)); - tagname="mypedestals"; - tagmetadata.pfn="sqlite_file:mytest.db"; - tagmetadata.recordname="PedestalsRcd"; - tagmetadata.objectname="Pedestals"; - tagmetadata.labelname="lab2"; - tagcollection.push_back(std::pair(tagname,tagmetadata)); - tagname="anothermytest"; - tagmetadata.pfn="sqlite_file:mytest.db"; - tagmetadata.recordname="anotherPedestalsRcd"; - tagmetadata.objectname="Pedestals"; - tagmetadata.labelname=""; - tagcollection.push_back(std::pair(tagname,tagmetadata)); - - std::cout<<"populate tag inventory"< >::iterator itBeg=tagcollection.begin(); - std::vector< std::pair >::iterator itEnd=tagcollection.end(); - unsigned int tagid=0; - for(std::vector< std::pair >::iterator it=itBeg;it!=itEnd;++it) { - ++tagid; - data["tagid"].data() = tagid; - data["tagname"].data() = it->first; - data["pfn"].data() = it->second.pfn; - data["recordname"].data() = it->second.recordname; - data["objectname"].data() = it->second.objectname; - data["labelname"].data() = it->second.labelname; - rowInserter->processNextIteration(); - } - rowInserter->flush(); - delete rowInserter; - struct nodedata{ - unsigned int nodeid; - std::string nodelabel; - unsigned int lft; - unsigned int rgt; - unsigned int tagid; - }; - std::cout<<"building test tag tree"<()=1; - nodedata["nodelabel"].data()="All"; - nodedata["lft"].data()=1; - nodedata["rgt"].data()=12; - nodedata["parentid"].data()=0; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=0; - treeInserter->processNextIteration(); - - nodedata["nodeid"].data()=2; - nodedata["nodelabel"].data()="Calibration"; - nodedata["lft"].data()=2; - nodedata["rgt"].data()=7; - nodedata["parentid"].data()=1; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=0; - treeInserter->processNextIteration(); - - nodedata["nodeid"].data()=3; - nodedata["nodelabel"].data()="Alignment"; - nodedata["lft"].data()=8; - nodedata["rgt"].data()=11; - nodedata["parentid"].data()=1; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=0; - treeInserter->processNextIteration(); - - nodedata["nodeid"].data()=4; - nodedata["nodelabel"].data()="mycalib11"; - nodedata["lft"].data()=3; - nodedata["rgt"].data()=4; - nodedata["parentid"].data()=2; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=1; - treeInserter->processNextIteration(); - - nodedata["nodeid"].data()=5; - nodedata["nodelabel"].data()="mycalib2"; - nodedata["lft"].data()=5; - nodedata["rgt"].data()=6; - nodedata["parentid"].data()=2; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=2; - treeInserter->processNextIteration(); - - nodedata["nodeid"].data()=6; - nodedata["nodelabel"].data()="myalign1"; - nodedata["lft"].data()=9; - nodedata["rgt"].data()=10; - nodedata["parentid"].data()=3; - nodedata["globalsince"].data()=0; - nodedata["globaltill"].data()=0; - nodedata["comment"].data()=""; - nodedata["tagid"].data()=3; - treeInserter->processNextIteration(); - treeInserter->flush(); - session.transaction().commit(); - delete treeInserter; - }catch(const cond::Exception& er){ - std::cout<<"error "< - - diff --git a/CondCore/Utilities/bin/BuildFile.xml b/CondCore/Utilities/bin/BuildFile.xml index 91e931aa723cc..95623f0ef3e73 100644 --- a/CondCore/Utilities/bin/BuildFile.xml +++ b/CondCore/Utilities/bin/BuildFile.xml @@ -2,7 +2,7 @@ - + diff --git a/CondCore/Utilities/bin/cmscond_authentication_manager.cpp b/CondCore/Utilities/bin/cmscond_authentication_manager.cpp index a6c5ec78f2ec0..0a5cd5bc56f7c 100644 --- a/CondCore/Utilities/bin/cmscond_authentication_manager.cpp +++ b/CondCore/Utilities/bin/cmscond_authentication_manager.cpp @@ -1,8 +1,8 @@ -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbScopedTransaction.h" -#include "CondCore/DBCommon/interface/Auth.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/CredentialStore.h" +//#include "CondCore/CondDB/interface/DbSession.h" +//#include "CondCore/CondDB/interface/DbScopedTransaction.h" +#include "CondCore/CondDB/interface/Auth.h" +#include "CondCore/CondDB/interface/Exception.h" +#include "CondCore/CondDB/interface/CredentialStore.h" #include "CondCore/Utilities/interface/Utilities.h" // #include "RelationalAccess/AuthenticationCredentials.h" @@ -96,7 +96,7 @@ int cond::AuthenticationManager::execute(){ std::string authPath(""); if( hasOptionValue("authPath") ) authPath = getOptionValue("authPath"); if( authPath.empty() ){ - const char* authEnv = ::getenv( Auth::COND_AUTH_PATH ); + const char* authEnv = ::getenv( auth::COND_AUTH_PATH ); if(authEnv){ authPath += authEnv; } else { @@ -161,8 +161,8 @@ int cond::AuthenticationManager::execute(){ if( update_princ ){ bool adminOpt = hasOptionValue("admin"); std::string key = getOptionValue("key"); - DecodingKey pk; - pk.init( key, Auth::COND_KEY ); + auth::DecodingKey pk; + pk.init( key, auth::COND_KEY ); credDb.updatePrincipal( pk.principalName(), pk.principalKey(), adminOpt ); return 0; } @@ -360,7 +360,7 @@ int cond::AuthenticationManager::execute(){ xmlFile.openConnectionEntry( connectStr ); started = true; connections.insert( connectStr ); - std::pair defRoleKey(connectStr,Auth::COND_DEFAULT_ROLE); + std::pair defRoleKey(connectStr,auth::COND_DEFAULT_ROLE); std::map< std::pair, coral::AuthenticationCredentials* >::const_iterator iDef = creds.find( defRoleKey ); if( iDef != creds.end() ){ xmlFile.addCredentialEntry( iDef->second->valueForItem( coral::IAuthenticationCredentials::userItem() ), @@ -368,7 +368,7 @@ int cond::AuthenticationManager::execute(){ } } const std::string& role = iEntry->first.second; - if( role != Auth::COND_DEFAULT_ROLE ){ + if( role != auth::COND_DEFAULT_ROLE ){ xmlFile.openRoleEntry( role ); xmlFile.addCredentialEntry( iEntry->second->valueForItem( coral::IAuthenticationCredentials::userItem() ), iEntry->second->valueForItem( coral::IAuthenticationCredentials::passwordItem() ) ); @@ -379,6 +379,8 @@ int cond::AuthenticationManager::execute(){ return 0; } + std::cout <<"ERROR: no command specified."< diff --git a/CondCore/Utilities/bin/cmscond_create_key.cpp b/CondCore/Utilities/bin/cmscond_key_mgr.cpp similarity index 59% rename from CondCore/Utilities/bin/cmscond_create_key.cpp rename to CondCore/Utilities/bin/cmscond_key_mgr.cpp index 980b963a053e9..98c7ea24e8dd2 100644 --- a/CondCore/Utilities/bin/cmscond_create_key.cpp +++ b/CondCore/Utilities/bin/cmscond_key_mgr.cpp @@ -1,8 +1,8 @@ #include "CondCore/Utilities/interface/Utilities.h" -#include "CondCore/DBCommon/interface/DecodingKey.h" -#include "CondCore/DBCommon/interface/Cipher.h" -#include "CondCore/DBCommon/interface/Auth.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/DecodingKey.h" +#include "CondCore/CondDB/interface/Cipher.h" +#include "CondCore/CondDB/interface/Auth.h" +#include "CondCore/CondDB/interface/Exception.h" #include #include @@ -10,33 +10,33 @@ #include namespace cond { - class CreateKeyUtilities : public Utilities { + class KeyMgrUtilities : public Utilities { public: - CreateKeyUtilities(); - ~CreateKeyUtilities(); + KeyMgrUtilities(); + ~KeyMgrUtilities(); int execute() override; }; } -cond::CreateKeyUtilities::CreateKeyUtilities():Utilities("cmscond_create_key"){ +cond::KeyMgrUtilities::KeyMgrUtilities():Utilities("cmscond_key_mgr"){ addOption("create","c","creating from input file data"); addOption("read","r","read data from input file"); addOption("generate","g","generate a new key when not specified"); addOption("dump_template","d","dump an input file template"); } -cond::CreateKeyUtilities::~CreateKeyUtilities(){ +cond::KeyMgrUtilities::~KeyMgrUtilities(){ } -int cond::CreateKeyUtilities::execute(){ +int cond::KeyMgrUtilities::execute(){ std::string inFile(""); if( hasOptionValue("create") ) { inFile = getOptionValue("create"); size_t keySize = 0; - if( hasOptionValue("generate") ) keySize = Auth::COND_AUTHENTICATION_KEY_SIZE; + if( hasOptionValue("generate") ) keySize = auth::COND_AUTHENTICATION_KEY_SIZE; if(!inFile.empty()){ - DecodingKey key; - key.init( DecodingKey::FILE_NAME, Auth::COND_KEY, false ); + auth::DecodingKey key; + key.init( auth::DecodingKey::FILE_NAME, auth::COND_KEY, false ); key.createFromInputFile( inFile, keySize ); if( hasDebug() ) key.list( std::cout ); key.flush(); @@ -48,8 +48,8 @@ int cond::CreateKeyUtilities::execute(){ if( hasOptionValue("read") ) { inFile = getOptionValue("read"); if(!inFile.empty()){ - DecodingKey key; - key.init( inFile, Auth::COND_KEY ); + auth::DecodingKey key; + key.init( inFile, auth::COND_KEY ); key.list( std::cout ); return 0; } @@ -57,7 +57,7 @@ int cond::CreateKeyUtilities::execute(){ } if( hasOptionValue("dump_template") ) { - std::cout < diff --git a/CondCore/Utilities/interface/CondDBTools.h b/CondCore/Utilities/interface/CondDBTools.h index dfac3367a7e0b..39ffe66352def 100644 --- a/CondCore/Utilities/interface/CondDBTools.h +++ b/CondCore/Utilities/interface/CondDBTools.h @@ -2,7 +2,6 @@ #define Utilities_CondDBTools_h #include "CondCore/CondDB/interface/Time.h" -#include "CondCore/DBCommon/interface/DbSession.h" // #include diff --git a/CondCore/Utilities/interface/Utilities.h b/CondCore/Utilities/interface/Utilities.h index 364219dcd844c..d37d4759dfee0 100644 --- a/CondCore/Utilities/interface/Utilities.h +++ b/CondCore/Utilities/interface/Utilities.h @@ -1,8 +1,7 @@ #ifndef Utilities_Utilities_h #define Utilities_Utilities_h -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/DbSession.h" +#include "CondCore/CondDB/interface/Exception.h" #include #include #include @@ -12,7 +11,7 @@ namespace edm { } namespace cond { - class DbConnection; + //class DbConnection; class UtilitiesError : public Exception { public: @@ -28,16 +27,10 @@ namespace cond { virtual int execute(); int run( int argc, char** argv ); - + + void addConnectOption( std::string const& fullName, std::string const& shortName, std::string const& helpEntry ); void addAuthenticationOptions(); - void addConnectOption(); - void addConnectOption(const std::string& connectionOptionName, - const std::string& shortName, - const std::string& helpEntry ); - void addLogDBOption(); - void addDictionaryOption(); void addConfigFileOption(); - void addSQLOutputOption(); template void addOption(const std::string& fullName, const std::string& shortName, @@ -56,13 +49,13 @@ namespace cond { bool hasOptionValue(const std::string& fullName); bool hasDebug(); void initializePluginManager(); - cond::DbSession openDbSession( const std::string& connectionParameterName, bool readOnly=false ); - cond::DbSession openDbSession( const std::string& connectionParameterName, const std::string& role, bool readOnly=false ); + //cond::DbSession openDbSession( const std::string& connectionParameterName, bool readOnly=false ); + //cond::DbSession openDbSession( const std::string& connectionParameterName, const std::string& role, bool readOnly=false ); protected: - cond::DbSession newDbSession( const std::string& connectionString, bool readOnly=false ); - cond::DbSession newDbSession( const std::string& connectionString, const std::string& role, bool readOnly=false ); - void initializeForDbConnection(); + //cond::DbSession newDbSession( const std::string& connectionString, bool readOnly=false ); + //cond::DbSession newDbSession( const std::string& connectionString, const std::string& role, bool readOnly=false ); + //void initializeForDbConnection(); private: @@ -80,8 +73,8 @@ namespace cond { boost::program_options::options_description m_options; boost::program_options::positional_options_description m_positionalOptions; boost::program_options::variables_map m_values; - cond::DbConnection* m_dbConnection; - std::set m_dbSessions; + //cond::DbConnection* m_dbConnection; + //std::set m_dbSessions; }; diff --git a/CondCore/Utilities/src/CondDBTools.cc b/CondCore/Utilities/src/CondDBTools.cc index bea6f874b0352..2a9ddeee84a51 100644 --- a/CondCore/Utilities/src/CondDBTools.cc +++ b/CondCore/Utilities/src/CondDBTools.cc @@ -3,7 +3,6 @@ #include "CondCore/CondDB/interface/ConnectionPool.h" // #include "CondCore/CondDB/src/DbCore.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" // #include #include diff --git a/CondCore/Utilities/src/Utilities.cc b/CondCore/Utilities/src/Utilities.cc index f7e4f8841974e..76ea02745c423 100644 --- a/CondCore/Utilities/src/Utilities.cc +++ b/CondCore/Utilities/src/Utilities.cc @@ -4,18 +4,18 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" //local includes -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/SQLReport.h" +//#include "CondCore/DBCommon/interface/DbConnection.h" +//#include "CondCore/DBCommon/interface/SQLReport.h" #include "CondCore/Utilities/interface/Utilities.h" #include "FWCore/PluginManager/interface/PluginManager.h" #include "FWCore/PluginManager/interface/standard.h" #include "FWCore/PluginManager/interface/SharedLibrary.h" -#include "CondCore/ORA/interface/SharedLibraryName.h" +//#include "CondCore/ORA/interface/SharedLibraryName.h" #include #include #include -#include "CondCore/DBCommon/interface/Auth.h" +#include "CondCore/CondDB/interface/Auth.h" cond::UtilitiesError::UtilitiesError(const std::string& message ):Exception(message){ @@ -28,9 +28,7 @@ cond::Utilities::Utilities( const std::string& commandName, std::string(" [options] ")+positionalParameter +std::string(" \n")), m_positionalOptions(), - m_values(), - m_dbConnection(0), - m_dbSessions(){ + m_values(){ m_options.add_options() ("debug","switch on debug mode") ("help,h", "help message") @@ -43,7 +41,6 @@ cond::Utilities::Utilities( const std::string& commandName, cond::Utilities::~Utilities(){ - if(m_dbConnection) delete m_dbConnection; } int cond::Utilities::execute(){ @@ -69,26 +66,7 @@ int cond::Utilities::run( int argc, char** argv ){ std::cout << m_options < dictionaries = - m_values["dictionary"].as >(); - if(!dictionaries.empty()){ - ora::SharedLibraryName libName; - BOOST_FOREACH(std::string const & dict, dictionaries) - edmplugin::SharedLibrary( libName(dict) ); - } - } ret = execute(); - if(m_dbConnection){ - if(m_options.find_nothrow("sql",false) && m_values.count("sql")){ - cond::SQLReport report(*m_dbConnection); - for(std::set::const_iterator iSess = m_dbSessions.begin(); - iSess != m_dbSessions.end(); - iSess++) report.reportForConnection(*iSess); - report.putOnFile(); - } - } - }catch( cond::Exception& err ){ std::cout << err.what() << std::endl; ret = 1; @@ -100,36 +78,18 @@ int cond::Utilities::run( int argc, char** argv ){ return ret; } -void -cond::Utilities::addAuthenticationOptions(){ - addOption("authPath","P","path to authentication xml"); - addOption("user","u","user name"); - addOption("pass","p","password"); -} - -void -cond::Utilities::addConnectOption(){ - addOption("connect","c","connection string (required)"); - m_dbSessions.insert("connect"); -} - void cond::Utilities::addConnectOption(const std::string& connectionOptionName, const std::string& shortName, const std::string& helpEntry ){ addOption(connectionOptionName,shortName,helpEntry); - m_dbSessions.insert(connectionOptionName); } - void -cond::Utilities::addLogDBOption(){ - addConnectOption("logDB","l","logDB(optional"); -} - -void -cond::Utilities::addDictionaryOption(){ - addOption >("dictionary","D","data dictionaries (required if no plugin available)"); +cond::Utilities::addAuthenticationOptions(){ + addOption("authPath","P","path to authentication xml"); + addOption("user","u","user name"); + addOption("pass","p","password"); } void @@ -137,11 +97,6 @@ cond::Utilities::addConfigFileOption(){ addOption("configFile","f","configuration file(optional)"); } -void -cond::Utilities::addSQLOutputOption(){ - addOption("sql","S","dump the sql output (optional)"); -} - void cond::Utilities::parseCommand( int argc, char** argv ){ boost::program_options::store(boost::program_options::command_line_parser(argc, argv).options(m_options).positional(m_positionalOptions).run(), m_values); if(m_options.find_nothrow("configFile",false)){ @@ -203,6 +158,7 @@ void cond::Utilities::initializePluginManager(){ // dummy, to avoid to adapt non-CondCore clients } +/** void cond::Utilities::initializeForDbConnection(){ if(!m_dbConnection){ m_dbConnection = new cond::DbConnection(); @@ -269,6 +225,7 @@ cond::DbSession cond::Utilities::openDbSession( const std::string& connectionPar std::string connectionString = getOptionValue( connectionParameterName ); return newDbSession( connectionString, readOnly ); } +**/ std::string cond::Utilities::getValueIfExists(const std::string& fullName){ std::string val(""); diff --git a/CondFormats/Common/BuildFile.xml b/CondFormats/Common/BuildFile.xml index a412821acae1d..dbeed8c62f51f 100644 --- a/CondFormats/Common/BuildFile.xml +++ b/CondFormats/Common/BuildFile.xml @@ -3,10 +3,10 @@ + - diff --git a/CondFormats/Common/interface/IOVElement.h b/CondFormats/Common/interface/IOVElement.h deleted file mode 100644 index e1de14446efd3..0000000000000 --- a/CondFormats/Common/interface/IOVElement.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef Cond_IOVElement_h -#define Cond_IOVElement_h - -#include "CondFormats/Common/interface/Time.h" -#include "CondCore/ORA/interface/OId.h" -#include - -namespace cond { - - /** Element of an IOV Sequence - include the since time, token to the wrapper - */ - class IOVElement { - public: - IOVElement(): - m_sinceTime(0), - m_wrapper(""), - m_oid(){} - - explicit IOVElement(cond::Time_t it) : - m_sinceTime(it), - m_wrapper(""), - m_oid(){} - - IOVElement(cond::Time_t it, - std::string const& itoken): - m_sinceTime(it), - m_wrapper(""), - m_oid(){ - m_oid.fromString( itoken ); - } - - cond::Time_t sinceTime() const {return m_sinceTime;} - - std::string token() const { - return m_oid.toString(); - } - - bool operator==(IOVElement const & rh) const { - return sinceTime()==rh.sinceTime() - && token()==rh.token(); - } - - void swapToken( ora::ITokenParser& parser ) const { - if( !m_wrapper.empty() ){ - const_cast(this)->m_oid = parser.parse( m_wrapper ); - const_cast(this)->m_wrapper.clear(); - } - } - - void swapOId( ora::ITokenWriter& writer ) const { - if( !m_oid.isInvalid() ){ - const_cast(this)->m_wrapper = writer.write( m_oid ); - } - } - - private: - cond::Time_t m_sinceTime; - std::string m_wrapper; - ora::OId m_oid; -}; - - -} // ns cond - - -#endif diff --git a/CondFormats/Common/interface/IOVKeysDescription.h b/CondFormats/Common/interface/IOVKeysDescription.h index 909adc470f067..02cb190f2da17 100644 --- a/CondFormats/Common/interface/IOVKeysDescription.h +++ b/CondFormats/Common/interface/IOVKeysDescription.h @@ -1,8 +1,7 @@ #ifndef Cond_IOVKeysDescription_h #define Cond_IOVKeysDescription_h -#include "CondFormats/Serialization/interface/Serializable.h" - +#include "CondFormats/Common/interface/IOVDescription.h" #include "CondFormats/Common/interface/SmallWORMDict.h" #include diff --git a/CondFormats/Common/interface/IOVSequence.h b/CondFormats/Common/interface/IOVSequence.h deleted file mode 100644 index d8f7bc9066786..0000000000000 --- a/CondFormats/Common/interface/IOVSequence.h +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef Cond_IOVSequence_h -#define Cond_IOVSequence_h - -#include "CondFormats/Common/interface/UpdateStamp.h" -#include "CondFormats/Common/interface/IOVElement.h" -#include "CondFormats/Common/interface/Time.h" -#include "CondFormats/Common/interface/IOVProvenance.h" -#include "CondFormats/Common/interface/IOVDescription.h" -#include "CondFormats/Common/interface/IOVUserMetaData.h" - -#include "CondCore/ORA/interface/QueryableVector.h" - -#include -#include -#include - -namespace cond { - - /** a time order sequence of interval-of-validity - The time associated to each interval is the end-validity (till time) - the end of each interval is the begin of the next - it is a UpdateStamp by mixin (I'll regret..) - */ - class IOVSequence : public UpdateStamp{ - public: - typedef cond::IOVElement Item; - typedef ora::QueryableVector Container; - typedef Container::iterator iterator; - typedef Container::const_iterator const_iterator; - enum ScopeType { Unknown=-1, Obsolete, Tag, TagInGT, ChildTag, ChildTagInGT }; - - IOVSequence(); - - // the real default constructor... - explicit IOVSequence( cond::TimeType ttype ); - - // constructor for the editor - IOVSequence(int type, cond::Time_t till, std::string const& imetadata); - - ~IOVSequence(); - - IOVSequence(IOVSequence const & rh); - IOVSequence & operator=(IOVSequence const & rh); - - // append a new item, return position of last inserted entry - size_t add(cond::Time_t time, std::string const & token, std::string const& payloadClassName ); - - // remove last entry, return position of last entry still valid - size_t truncate(); - - // find IOV for which time is valid (this is not STANDARD std::find!) - const_iterator find(cond::Time_t time) const; - - // find IOV with a given since (this is not STANDARD std::find!) - const_iterator findSince(cond::Time_t time) const; - - // true if an iov with since==time already exists - bool exist(cond::Time_t time) const; - - cond::TimeType timeType() const { return cond::timeTypeSpecs[m_timetype].type;} - - // FIXME shall we cache it? - cond::Time_t firstSince() const { return iovs().front().sinceTime();} - - cond::Time_t lastTill() const { return m_lastTill;} - - void updateLastTill(cond::Time_t till) { m_lastTill=till;} - - void updateMetadata( const std::string& metadata, bool append=true ); - - void setScope( ScopeType type ) { m_scope = type;} - - public: - Container const & iovs() const; - - // if true the "sorted" sequence is not guaranted to be the same as in previous version - bool notOrdered() const { return m_notOrdered;} - - std::string const & metadata() const { return m_metadata;} - - std::set const& payloadClasses() const { return m_payloadClasses; } - - ScopeType scope() const { return m_scope;} - - void loadAll() const; - - public: - - // the real persistent container... - Container & piovs() { - m_iovs.load(); - return m_iovs; - } - Container const & piovs() const { - m_iovs.load(); - return m_iovs; - } - - void swapTokens( ora::ITokenParser& parser ) const; - void swapOIds( ora::ITokenWriter& writer ) const; - - private: - - // iovs is not in order: take action! - void disorder(); - - // sort the container in m_sorted - Container const & sortMe() const; - - private: - - Container m_iovs; - int m_timetype; - cond::Time_t m_lastTill; - bool m_notOrdered; - std::string m_metadata; // FIXME not used??? - std::set m_payloadClasses; - ScopeType m_scope; - - mutable Container * m_sorted; - -}; - -}//ns cond -#endif diff --git a/CondFormats/Common/interface/SequenceState.h b/CondFormats/Common/interface/SequenceState.h deleted file mode 100644 index c807ae6c6b399..0000000000000 --- a/CondFormats/Common/interface/SequenceState.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef Cond_SequenceState_h -#define Cond_SequenceState_h - -#include "CondFormats/Common/interface/Time.h" -#include - -namespace cond { - - class IOVSequence; - - /** capture the state of a IOV sequence at a given time - */ - class SequenceState { - public: - ~SequenceState(); - SequenceState(); - explicit SequenceState(IOVSequence const & seq); - - unsigned int size() const { return m_size; } - - int revision() const { return m_revision;} - - cond::Time_t timestamp() const { return m_timestamp;} - - std::string const & comment() const { return m_comment;} - - - private: - - unsigned int m_size; - int m_revision; - cond::Time_t m_timestamp; - std::string m_comment; - - }; - -} - -#endif diff --git a/CondFormats/Common/interface/UpdateStamp.h b/CondFormats/Common/interface/UpdateStamp.h deleted file mode 100644 index 896866a5f57a8..0000000000000 --- a/CondFormats/Common/interface/UpdateStamp.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef Cond_UpdateStamp_h -#define Cond_UpdateStamp_h - -#include "CondFormats/Serialization/interface/Serializable.h" - -#include "CondFormats/Common/interface/Time.h" -#include - - -// Unit test class for UpdateStamp -namespace { - class TestUpdateStamp; -} - -namespace cond { - - /** class to "stamp" a new version of an updateble persistent object - it includes a timestamp, a sequential revision number and a comment - no history in mantained at the moment - */ - class UpdateStamp { - friend class ::TestUpdateStamp; - - public: - // constrcutor creates and invalid stamp - UpdateStamp(); - - UpdateStamp(UpdateStamp const & rhs); - - virtual ~UpdateStamp(); - - // stamp and return current revision number; - int stamp( std::string const & icomment, bool append=false); - - int revision() const { return m_revision;} - - cond::Time_t timestamp() const { return m_timestamp;} - - std::string const & comment() const { return m_comment;} - - private: - - int m_revision; - cond::Time_t m_timestamp; - std::string m_comment; - - COND_SERIALIZABLE; -}; - -} // nc cond - -#endif diff --git a/CondFormats/Common/src/IOVSequence.cc b/CondFormats/Common/src/IOVSequence.cc deleted file mode 100644 index 273bb95cafcf6..0000000000000 --- a/CondFormats/Common/src/IOVSequence.cc +++ /dev/null @@ -1,165 +0,0 @@ -#include "CondFormats/Common/interface/IOVSequence.h" -#include "CondFormats/Common/interface/Time.h" -#include -#include - -namespace cond { - - IOVSequence::IOVSequence() : - m_iovs(), - m_timetype(-1), - m_lastTill(0), - m_notOrdered(false), - m_metadata(""), - m_payloadClasses(), - m_scope( Unknown ), - m_sorted(0) {} - - IOVSequence::IOVSequence( cond::TimeType ttype ) : - m_iovs(), - m_timetype(ttype), - m_lastTill(timeTypeSpecs[ttype].endValue), - m_notOrdered(false), - m_metadata(" "), - m_payloadClasses(), - m_scope( Unknown ), - m_sorted(0) {} - - IOVSequence::IOVSequence(int ttype, - cond::Time_t till, - std::string const& imetadata) : - m_iovs(), - m_timetype(ttype), - m_lastTill(till), - m_notOrdered(false), - m_metadata(imetadata), - m_payloadClasses(), - m_scope( Unknown ), - m_sorted(0) {} - - IOVSequence::~IOVSequence(){ - delete m_sorted; - } - - IOVSequence::IOVSequence(IOVSequence const & rh) : - UpdateStamp(rh), - m_iovs(rh.m_iovs), - m_timetype(rh.m_timetype), - m_lastTill(rh.m_lastTill), - m_notOrdered(rh.m_notOrdered), - m_metadata(rh.m_metadata), - m_payloadClasses(rh.m_payloadClasses), - m_scope( rh.m_scope ), - m_sorted(0) {} - - IOVSequence & IOVSequence::operator=(IOVSequence const & rh) { - delete m_sorted; m_sorted=0; - - m_iovs = rh.m_iovs; - m_timetype = rh.m_timetype; - m_lastTill=rh.m_lastTill; - m_notOrdered=rh.m_notOrdered; - m_metadata = rh.m_metadata; - m_payloadClasses = rh.m_payloadClasses; - m_scope = rh.m_scope; - return *this; - } - - - void IOVSequence::loadAll() const { - // m_provenance.get(); - // m_description.get(); - // m_userMetadata.get(); - m_iovs.load(); - } - - IOVSequence::Container const & IOVSequence::iovs() const { - if (m_sorted) return *m_sorted; - if (m_notOrdered) return sortMe(); - return m_iovs; - } - - IOVSequence::Container const & IOVSequence::sortMe() const { - m_iovs.load(); - delete m_sorted; // shall not be necessary; - Container * local = new Container(m_iovs); - std::sort(local->begin(), local->end(), boost::bind(std::less(), - boost::bind(&Item::sinceTime,_1), - boost::bind(&Item::sinceTime,_2) - ) ); - m_sorted = local; - return *m_sorted; - } - - - size_t IOVSequence::add(cond::Time_t time, - std::string const & token, - std::string const & payloadClassName ) { - if (!piovs().empty() && ( m_notOrdered || timelastTill()) return iovs().end(); - IOVSequence::const_iterator p = std::upper_bound(iovs().begin(),iovs().end(),Item(time), - boost::bind(std::less(), - boost::bind(&Item::sinceTime,_1), - boost::bind(&Item::sinceTime,_2) - ) - ); - return (p!=iovs().begin()) ? p-1 : iovs().end(); - } - - - IOVSequence::const_iterator IOVSequence::findSince(cond::Time_t time) const { - IOVSequence::const_iterator p = find(time); - return (p!=iovs().end() && (*p).sinceTime()==time) ? p : iovs().end(); - } - - bool IOVSequence::exist(cond::Time_t time) const { - return findSince(time)!=iovs().end(); - } - - void IOVSequence::updateMetadata( const std::string& metadata, - bool append ){ - std::string sep(". "); - if( !metadata.empty() ){ - if (append && !m_metadata.empty()) { - m_metadata += sep + metadata; - } - else m_metadata = metadata; - } - } - - void IOVSequence::disorder() { - m_notOrdered=true; - delete m_sorted; m_sorted=0; - } - - void IOVSequence::swapTokens( ora::ITokenParser& parser ) const { - for( IOVSequence::const_iterator iT = m_iovs.begin(); - iT != m_iovs.end(); ++iT ){ - iT->swapToken( parser ); - // adding the classname 'by hand' - std::string className = parser.className( iT->token() ); - const_cast(this)->m_payloadClasses.insert( className ); - } - } - - void IOVSequence::swapOIds( ora::ITokenWriter& writer ) const { - for( IOVSequence::const_iterator iT = m_iovs.begin(); - iT != m_iovs.end(); ++iT ){ - iT->swapOId( writer ); - } - } - -} - diff --git a/CondFormats/Common/src/SequenceState.cc b/CondFormats/Common/src/SequenceState.cc deleted file mode 100644 index e877115f92207..0000000000000 --- a/CondFormats/Common/src/SequenceState.cc +++ /dev/null @@ -1,16 +0,0 @@ -#include "CondFormats/Common/interface/SequenceState.h" -#include "CondFormats/Common/interface/IOVSequence.h" - -namespace cond { - - SequenceState::~SequenceState(){} - - SequenceState::SequenceState() : - m_size(0), m_revision(-1), m_timestamp(0), m_comment("not stamped"){} - - SequenceState::SequenceState(IOVSequence const & seq) : - m_size(seq.piovs().size()), m_revision(seq.revision()), - m_timestamp(seq.timestamp()), - m_comment(seq.comment()){} - -} diff --git a/CondFormats/Common/src/UpdateStamp.cc b/CondFormats/Common/src/UpdateStamp.cc deleted file mode 100644 index 4abf546ec0dde..0000000000000 --- a/CondFormats/Common/src/UpdateStamp.cc +++ /dev/null @@ -1,30 +0,0 @@ -#include "CondFormats/Common/interface/UpdateStamp.h" -#include "CondFormats/Common/interface/TimeConversions.h" - -namespace { - const std::string sep(". "); -} - -namespace cond { - - UpdateStamp::UpdateStamp() : - m_revision(-1), m_timestamp(0), m_comment("not stamped"){} - - UpdateStamp::UpdateStamp(UpdateStamp const & rhs) { - m_revision = rhs.m_revision; - m_timestamp = rhs.m_timestamp; - m_comment = rhs.m_comment; - } - - UpdateStamp::~UpdateStamp(){} - - // stamp and return current revision number; - int UpdateStamp::stamp(std::string const & icomment, bool append) { - m_revision++; - m_timestamp = cond::time::now(); - if (append && !icomment.empty()) m_comment += sep + icomment; - else m_comment = icomment; - return m_revision; - } - -} diff --git a/CondFormats/Common/src/classes_def.xml b/CondFormats/Common/src/classes_def.xml index d10a91c1d6d69..ba5ad159050e4 100644 --- a/CondFormats/Common/src/classes_def.xml +++ b/CondFormats/Common/src/classes_def.xml @@ -1,29 +1,9 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/CondFormats/Common/src/headers.h b/CondFormats/Common/src/headers.h index 4ef7032ea545e..79df8ad9bc923 100644 --- a/CondFormats/Common/src/headers.h +++ b/CondFormats/Common/src/headers.h @@ -1,4 +1,3 @@ -#include "CondFormats/Common/interface/IOVSequence.h" #include "CondFormats/Common/interface/GenericSummary.h" #include "CondFormats/Common/interface/FileBlob.h" #include "CondFormats/Common/interface/FileBlobCollection.h" @@ -6,6 +5,8 @@ #include "CondFormats/Common/interface/BaseKeyed.h" #include "CondFormats/Common/interface/IOVKeysDescription.h" +#include "CondFormats/Common/interface/IOVProvenance.h" +#include "CondFormats/Common/interface/IOVUserMetaData.h" #include "CondFormats/Common/interface/ConfObject.h" #include "CondFormats/Common/interface/DropBoxMetadata.h" diff --git a/CondFormats/Common/test/BuildFile.xml b/CondFormats/Common/test/BuildFile.xml index f78a11ebca799..6215c77da8c1d 100644 --- a/CondFormats/Common/test/BuildFile.xml +++ b/CondFormats/Common/test/BuildFile.xml @@ -1,12 +1,8 @@ - - - - @@ -15,7 +11,6 @@ - diff --git a/CondFormats/Common/test/ProduceDropBoxMetadata.py b/CondFormats/Common/test/ProduceDropBoxMetadata.py index b3afc8fc40160..d42827fd7634a 100644 --- a/CondFormats/Common/test/ProduceDropBoxMetadata.py +++ b/CondFormats/Common/test/ProduceDropBoxMetadata.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms process = cms.Process("myprocess") -process.load("CondCore.DBCommon.CondDBCommon_cfi") +process.load("CondCore.CondDB.CondDB_cfi") process.CondDBCommon.connect = 'sqlite_file:DropBoxMetadata.db' @@ -87,11 +87,11 @@ process.p = cms.Path(process.mywriter) -from CondCore.DBCommon.CondDBCommon_cfi import CondDBCommon -CondDBCommon.connect = "sqlite_file:DropBoxMetadata.db" +from CondCore.CondDB.CondDB_cfi import CondDB +CondDB.connect = "sqlite_file:DropBoxMetadata.db" process.PoolDBOutputService = cms.Service("PoolDBOutputService", - CondDBCommon, + CondDB, toPut = cms.VPSet(cms.PSet(record = cms.string('DropBoxMetadataRcd'), tag = cms.string('DropBoxMetadata'), timetype = cms.untracked.string('runnumber') diff --git a/CondFormats/Common/test/oldrunPayloadTest b/CondFormats/Common/test/oldrunPayloadTest index 1c5295296d136..b94d717f22971 100755 --- a/CondFormats/Common/test/oldrunPayloadTest +++ b/CondFormats/Common/test/oldrunPayloadTest @@ -20,7 +20,6 @@ sed -i "s/THEHEADER/$3/g" $1_test.cc echo "" > bfile echo "" >> bfile -echo "" >> bfile echo "" >> bfile echo "" >> bfile echo "" >> bfile diff --git a/CondFormats/Common/test/runAllPayloadsTest b/CondFormats/Common/test/runAllPayloadsTest index 5a2ef6d4a5952..a2bc86a41f647 100755 --- a/CondFormats/Common/test/runAllPayloadsTest +++ b/CondFormats/Common/test/runAllPayloadsTest @@ -20,7 +20,6 @@ sed -i "s/THECLASS/$class/g" ${cname}_test.cc sed -i "s/THEPACKAGE/$1/g" ${cname}_test.cc echo "" > bfile echo "" >> bfile -echo "" >> bfile echo "" >> bfile mv bfile BuildFile scramv1 b diff --git a/CondFormats/Common/test/runPayloadTest b/CondFormats/Common/test/runPayloadTest index df63f2380021a..6c86b076a01b0 100755 --- a/CondFormats/Common/test/runPayloadTest +++ b/CondFormats/Common/test/runPayloadTest @@ -22,7 +22,6 @@ sed -i "s/THEHEADER/$3/g" ${cname}_test.cc echo "" > bfile echo "" >> bfile -echo "" >> bfile echo "" >> bfile mv bfile BuildFile diff --git a/CondFormats/Common/test/testPayloadIO.cc b/CondFormats/Common/test/testPayloadIO.cc deleted file mode 100644 index dfbcf33111b76..0000000000000 --- a/CondFormats/Common/test/testPayloadIO.cc +++ /dev/null @@ -1,110 +0,0 @@ -// -// test Payload I/O -// -// requires a few sed.... - -#include "CondCore/DBCommon/interface/DbScopedTransaction.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/standard.h" -#include "RelationalAccess/ISchema.h" -#include "RelationalAccess/TableDescription.h" -#include "CoralBase/AttributeSpecification.h" -#include "DataSvc/Ref.h" -#include - -#include - - -#ifdef ALLCLASSES -#include "CondFormats/THEPACKAGE/src/classes.h" -#else -#include "CondFormats/THEPACKAGE/interface/THEHEADER.h" -#endif - -typedef THECLASS Payload; - - - -int main(int argc, char** ) { -try{ - - // this is the correct container name following cms rules (container name = C++ type name) - // std::string className = cond::classNameForTypeId(typeid(THECLASS)); - - // for this test we use the class name THECLASS as typed by the user including space, typedefs etc - // this makes further mapping query easier at script level.... - std::string className("THECLASS"); - - edmplugin::PluginManager::Config config; - edmplugin::PluginManager::configure(edmplugin::standard::config()); - - unsigned int nobjects=10; - std::vector payTok; - - - //write.... - { - cond::DbConnection conn; - conn.configure( cond::CmsDefaults ); - cond::DbSession session = conn.createSession(); - session.open("sqlite_file:test.db"); - - cond::DbScopedTransaction tr(session); - tr.start(false); - - unsigned int iw; - for (iw = 0; iw < nobjects; ++iw ) { - boost::shared_ptr payload(new Payload); - std::string pToken = session.storeObject(payload.get(),className); - payTok.push_back(pToken); - } - - tr.commit(); - if (payTok.size()!=nobjects) - throw std::string("not all object written!"); - - } - - //read.... - { - cond::DbConnection conn; - conn.configure( cond::CmsDefaults ); - cond::DbSession session = conn.createSession(); - session.open("sqlite_file:test.db"); - - cond::DbScopedTransaction tr(session); - tr.start(true); - - unsigned int ir; - for (ir = 0; ir < payTok.size(); ++ir ) { - boost::shared_ptr payload = session.getTypedObject(payTok[ir]); - Payload const & p = *payload; - } - - if (ir!=nobjects) - throw std::string("not all object read!"); - - tr.commit(); - - } - - - - //read - - - - } catch (const std::exception& e){ - std::cout << "ERROR: " << e.what() << std::endl; - throw; - } catch (const std::string& e){ - std::cout << "ERROR: " << e << std::endl; - throw; - } - - return 0; -} - diff --git a/CondFormats/Common/test/testSerializationCommon.cpp b/CondFormats/Common/test/testSerializationCommon.cpp index 1206ed96af2b8..a02465c2d6e2c 100644 --- a/CondFormats/Common/test/testSerializationCommon.cpp +++ b/CondFormats/Common/test/testSerializationCommon.cpp @@ -12,18 +12,11 @@ int main() testSerialization(); testSerialization(); testSerialization(); - //testSerialization(); not used in the future testSerialization(); testSerialization(); - //testSerialization(); not used in the future testSerialization(); testSerialization(); - //testSerialization(); abstract - testSerialization(); testSerialization(); - //testSerialization(); not used in the future - //testSerialization>(); not used in the future - //testSerialization>(); not used in the future testSerialization>(); //testSerialization, DropBoxMetadata::Parameters>>(); no const-key std::map template (we could provide it, but it is equivalent to a non-const key std::map, and looks unused/should be unused) testSerialization>(); @@ -32,7 +25,6 @@ int main() testSerialization>(); testSerialization, DropBoxMetadata::Parameters>>(); testSerialization>(); - //testSerialization>(); not used in the future return 0; } diff --git a/CondFormats/DTObjects/BuildFile.xml b/CondFormats/DTObjects/BuildFile.xml index fd479deead662..8878df8ad93e5 100644 --- a/CondFormats/DTObjects/BuildFile.xml +++ b/CondFormats/DTObjects/BuildFile.xml @@ -3,7 +3,6 @@ - diff --git a/CondFormats/DTObjects/test/BuildFile.xml b/CondFormats/DTObjects/test/BuildFile.xml index 0bac1c5e8a427..92298f994857e 100644 --- a/CondFormats/DTObjects/test/BuildFile.xml +++ b/CondFormats/DTObjects/test/BuildFile.xml @@ -1,10 +1,7 @@ - - - diff --git a/CondFormats/EcalObjects/test/BuildFile.xml b/CondFormats/EcalObjects/test/BuildFile.xml index 09609669b0bea..7c0e6dd21c2f8 100644 --- a/CondFormats/EcalObjects/test/BuildFile.xml +++ b/CondFormats/EcalObjects/test/BuildFile.xml @@ -3,10 +3,7 @@ - - - diff --git a/CondFormats/MFObjects/BuildFile.xml b/CondFormats/MFObjects/BuildFile.xml index 613293980e054..0049720db2e73 100644 --- a/CondFormats/MFObjects/BuildFile.xml +++ b/CondFormats/MFObjects/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/CondFormats/MFObjects/test/BuildFile.xml b/CondFormats/MFObjects/test/BuildFile.xml index 24728f0b3293a..76888cca3fee4 100644 --- a/CondFormats/MFObjects/test/BuildFile.xml +++ b/CondFormats/MFObjects/test/BuildFile.xml @@ -1,10 +1,7 @@ - - - diff --git a/CondFormats/PhysicsToolsObjects/test/BuildFile.xml b/CondFormats/PhysicsToolsObjects/test/BuildFile.xml index 046900bfd3c2c..6dda84e755684 100644 --- a/CondFormats/PhysicsToolsObjects/test/BuildFile.xml +++ b/CondFormats/PhysicsToolsObjects/test/BuildFile.xml @@ -1,7 +1,6 @@ - diff --git a/CondTools/DT/interface/DTHVStatusHandler.h b/CondTools/DT/interface/DTHVStatusHandler.h index 3c0d6dd17d6e3..353eec395fcaa 100644 --- a/CondTools/DT/interface/DTHVStatusHandler.h +++ b/CondTools/DT/interface/DTHVStatusHandler.h @@ -20,7 +20,7 @@ // Collaborating Class Declarations -- //------------------------------------ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "CondCore/DBCommon/interface/DbConnection.h" +#include "CondCore/CondDB/interface/Session.h" #include "CondFormats/DTObjects/interface/DTHVStatus.h" #include @@ -131,12 +131,9 @@ class DTHVStatusHandler: public popcon::PopConSourceHandler { long long int lastStamp; int maxPayload; - cond::DbConnection omds_conn; - cond::DbConnection util_conn; - cond::DbConnection buff_conn; - cond::DbSession omds_session; - cond::DbSession util_session; - cond::DbSession buff_session; + cond::persistency::Session omds_session; + cond::persistency::Session util_session; + cond::persistency::Session buff_session; std::string mapVersion; std::string splitVersion; diff --git a/CondTools/DT/interface/DTLVStatusHandler.h b/CondTools/DT/interface/DTLVStatusHandler.h index fa834eef5d55a..549858cdfad66 100644 --- a/CondTools/DT/interface/DTLVStatusHandler.h +++ b/CondTools/DT/interface/DTLVStatusHandler.h @@ -20,7 +20,7 @@ // Collaborating Class Declarations -- //------------------------------------ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "CondCore/DBCommon/interface/DbConnection.h" +#include "CondCore/CondDB/interface/Session.h" #include "CondFormats/DTObjects/interface/DTLVStatus.h" #include @@ -60,10 +60,8 @@ class DTLVStatusHandler: public popcon::PopConSourceHandler { std::string bufferConnect; DTLVStatus* ccbStatus; - cond::DbConnection omds_conn; - cond::DbConnection buff_conn; - cond::DbSession omds_session; - cond::DbSession buff_session; + cond::persistency::Session omds_session; + cond::persistency::Session buff_session; }; diff --git a/CondTools/DT/plugins/BuildFile.xml b/CondTools/DT/plugins/BuildFile.xml index 61fed8e8a4471..677c3bb2f90e8 100644 --- a/CondTools/DT/plugins/BuildFile.xml +++ b/CondTools/DT/plugins/BuildFile.xml @@ -1,8 +1,5 @@ - - - diff --git a/CondTools/DT/src/DTHVStatusHandler.cc b/CondTools/DT/src/DTHVStatusHandler.cc index 8c4c3afcf2ff0..eaf84219aba53 100644 --- a/CondTools/DT/src/DTHVStatusHandler.cc +++ b/CondTools/DT/src/DTHVStatusHandler.cc @@ -18,8 +18,7 @@ #include "CondTools/DT/interface/DTHVAbstractCheck.h" #include "CondFormats/DTObjects/interface/DTHVStatus.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "DataFormats/MuonDetId/interface/DTWireId.h" @@ -74,9 +73,6 @@ DTHVStatusHandler::DTHVStatusHandler( const edm::ParameterSet& ps ) : bwdTime( ps.getParameter ( "bwdTime" ) ), fwdTime( ps.getParameter ( "fwdTime" ) ), minTime( ps.getParameter ( "minTime" ) ), - omds_conn(), - util_conn(), - buff_conn(), omds_session(), util_session(), buff_session(), @@ -104,38 +100,26 @@ void DTHVStatusHandler::getNewObjects() { // online DB connection - data std::cout << "configure omds DbConnection" << std::endl; + cond::persistency::ConnectionPool connection; // conn->configure( cond::CmsDefaults ); - omds_conn.configuration().setAuthenticationPath( onlineAuthentication ); - omds_conn.configure(); + connection.setAuthenticationPath( onlineAuthentication ); + connection.configure(); std::cout << "create omds DbSession" << std::endl; - omds_session = omds_conn.createSession(); - std::cout << "open omds session" << std::endl; - omds_session.open( onlineConnect ); + omds_session = connection.createSession( onlineConnect ); std::cout << "start omds transaction" << std::endl; omds_session.transaction().start(); std::cout << "" << std::endl; // online DB connection - util - std::cout << "configure util DbConnection" << std::endl; - // conn->configure( cond::CmsDefaults ); - util_conn.configuration().setAuthenticationPath( onlineAuthentication ); - util_conn.configure(); std::cout << "create util DbSession" << std::endl; - util_session = util_conn.createSession(); - std::cout << "open util session" << std::endl; - util_session.open( onlineConnect ); + util_session = connection.createSession( onlineConnect ); std::cout << "startutil transaction" << std::endl; util_session.transaction().start(); std::cout << "" << std::endl; // buffer DB connection - std::cout << "configure buffer DbConnection" << std::endl; - buff_conn.configuration().setAuthenticationPath( onlineAuthentication ); - buff_conn.configure(); std::cout << "create buffer DbSession" << std::endl; - buff_session = buff_conn.createSession(); - std::cout << "open buffer session" << std::endl; - buff_session.open( bufferConnect ); + buff_session = connection.createSession( bufferConnect ); std::cout << "start buffer transaction" << std::endl; buff_session.transaction().start(); diff --git a/CondTools/DT/src/DTLVStatusHandler.cc b/CondTools/DT/src/DTLVStatusHandler.cc index 10c705082d0a0..4b96dd5bf2712 100644 --- a/CondTools/DT/src/DTLVStatusHandler.cc +++ b/CondTools/DT/src/DTLVStatusHandler.cc @@ -16,7 +16,7 @@ #include "CondFormats/DTObjects/interface/DTLVStatus.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/ITable.h" @@ -46,8 +46,6 @@ DTLVStatusHandler::DTLVStatusHandler( const edm::ParameterSet& ps ): onlineAuthentication( ps.getParameter ( "onlineAuthentication" ) ), bufferConnect( ps.getParameter ( "bufferDB" ) ), - omds_conn(), - buff_conn(), omds_session(), buff_session() { std::cout << " PopCon application for DT DCS data (CCB status) export " @@ -67,25 +65,18 @@ void DTLVStatusHandler::getNewObjects() { // online DB connection std::cout << "configure omds DbConnection" << std::endl; - // conn->configure( cond::CmsDefaults ); - omds_conn.configuration().setAuthenticationPath( onlineAuthentication ); - omds_conn.configure(); + cond::persistency::ConnectionPool connection; + connection.setAuthenticationPath( onlineAuthentication ); + connection.configure(); std::cout << "create omds DbSession" << std::endl; - omds_session = omds_conn.createSession(); - std::cout << "open omds session" << std::endl; - omds_session.open( onlineConnect ); + omds_session = connection.createSession( onlineConnect ); std::cout << "start omds transaction" << std::endl; omds_session.transaction().start(); std::cout << "" << std::endl; // buffer DB connection - std::cout << "configure buffer DbConnection" << std::endl; - buff_conn.configuration().setAuthenticationPath( onlineAuthentication ); - buff_conn.configure(); std::cout << "create buffer DbSession" << std::endl; - cond::DbSession buff_session = buff_conn.createSession(); - std::cout << "open buffer session" << std::endl; - buff_session.open( bufferConnect ); + cond::persistency::Session buff_session = connection.createSession(bufferConnect); std::cout << "start buffer transaction" << std::endl; buff_session.transaction().start(); diff --git a/CondTools/DT/test/BuildFile.xml b/CondTools/DT/test/BuildFile.xml index 50525193e9d59..a5e62be822285 100644 --- a/CondTools/DT/test/BuildFile.xml +++ b/CondTools/DT/test/BuildFile.xml @@ -1,7 +1,6 @@ - @@ -14,6 +13,5 @@ - diff --git a/CondTools/Ecal/BuildFile.xml b/CondTools/Ecal/BuildFile.xml index 0440b7d22611a..e5322c664472b 100644 --- a/CondTools/Ecal/BuildFile.xml +++ b/CondTools/Ecal/BuildFile.xml @@ -1,4 +1,3 @@ - diff --git a/CondTools/Ecal/interface/ESDBCopy.h b/CondTools/Ecal/interface/ESDBCopy.h index 531730aef4da8..e87105146bb75 100644 --- a/CondTools/Ecal/interface/ESDBCopy.h +++ b/CondTools/Ecal/interface/ESDBCopy.h @@ -2,7 +2,7 @@ #define ESDBCOPY_H #include "FWCore/Framework/interface/EDAnalyzer.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "FWCore/Framework/interface/IOVSyncValue.h" diff --git a/CondTools/Ecal/interface/EcalCondHeader.h b/CondTools/Ecal/interface/EcalCondHeader.h index d08f567a51c98..03c86a1545b2e 100644 --- a/CondTools/Ecal/interface/EcalCondHeader.h +++ b/CondTools/Ecal/interface/EcalCondHeader.h @@ -11,7 +11,7 @@ * $Id: EcalCondHeader.h,v 1.2 2008/10/22 08:41:31 argiro Exp $ */ -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include struct EcalCondHeader { diff --git a/CondTools/Ecal/interface/EcalDBCopy.h b/CondTools/Ecal/interface/EcalDBCopy.h index 88925d1af5914..d378a0091f5c7 100644 --- a/CondTools/Ecal/interface/EcalDBCopy.h +++ b/CondTools/Ecal/interface/EcalDBCopy.h @@ -2,7 +2,7 @@ #define ECALDBCOPY_H #include "FWCore/Framework/interface/EDAnalyzer.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "FWCore/Framework/interface/IOVSyncValue.h" diff --git a/CondTools/Ecal/interface/EcalGetLaserData.h b/CondTools/Ecal/interface/EcalGetLaserData.h index 3b96b3f113421..6b4330e7860aa 100644 --- a/CondTools/Ecal/interface/EcalGetLaserData.h +++ b/CondTools/Ecal/interface/EcalGetLaserData.h @@ -2,7 +2,7 @@ #define ECALGETLASERDATA_H #include "FWCore/Framework/interface/EDAnalyzer.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "FWCore/Framework/interface/IOVSyncValue.h" diff --git a/CondTools/Ecal/interface/EcalTestDevDB.h b/CondTools/Ecal/interface/EcalTestDevDB.h index d9a78dc346089..4fe71d3393ae2 100644 --- a/CondTools/Ecal/interface/EcalTestDevDB.h +++ b/CondTools/Ecal/interface/EcalTestDevDB.h @@ -2,7 +2,7 @@ #define ECALTESTDEVDB_H #include "FWCore/Framework/interface/EDAnalyzer.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "FWCore/Framework/interface/IOVSyncValue.h" diff --git a/CondTools/Ecal/plugins/EcalFloatCondObjectContainerHandler.cc b/CondTools/Ecal/plugins/EcalFloatCondObjectContainerHandler.cc index 4288be6e30a71..1f84cd3d3bb40 100644 --- a/CondTools/Ecal/plugins/EcalFloatCondObjectContainerHandler.cc +++ b/CondTools/Ecal/plugins/EcalFloatCondObjectContainerHandler.cc @@ -7,7 +7,7 @@ */ #include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "CondTools/Ecal/interface/EcalFloatCondObjectContainerHandler.h" #include "CondTools/Ecal/interface/EcalFloatCondObjectContainerXMLTranslator.h" #include "CondTools/Ecal/interface/DOMHelperFunctions.h" diff --git a/CondTools/Ecal/plugins/StoreEcalCondition.cc b/CondTools/Ecal/plugins/StoreEcalCondition.cc index bc33ed780ee20..38cc3fe572a4e 100644 --- a/CondTools/Ecal/plugins/StoreEcalCondition.cc +++ b/CondTools/Ecal/plugins/StoreEcalCondition.cc @@ -3,7 +3,7 @@ #include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/Event.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" diff --git a/CondTools/Ecal/src/EcalLaserHandler.cc b/CondTools/Ecal/src/EcalLaserHandler.cc index cc16f31fed8d2..2fa35339870be 100644 --- a/CondTools/Ecal/src/EcalLaserHandler.cc +++ b/CondTools/Ecal/src/EcalLaserHandler.cc @@ -2,7 +2,7 @@ #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" #include "OnlineDB/EcalCondDB/interface/LMFSextuple.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "OnlineDB/EcalCondDB/interface/Tm.h" diff --git a/CondTools/Ecal/src/EcalLaser_weekly_Handler.cc b/CondTools/Ecal/src/EcalLaser_weekly_Handler.cc index 287648a64ce2f..69d7139eee959 100644 --- a/CondTools/Ecal/src/EcalLaser_weekly_Handler.cc +++ b/CondTools/Ecal/src/EcalLaser_weekly_Handler.cc @@ -2,7 +2,7 @@ #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" #include "OnlineDB/EcalCondDB/interface/LMFSextuple.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "OnlineDB/EcalCondDB/interface/Tm.h" diff --git a/CondTools/Ecal/src/EcalLaser_weekly_Linearization.cc b/CondTools/Ecal/src/EcalLaser_weekly_Linearization.cc index 65cf05a893ba8..ec97338ea9054 100644 --- a/CondTools/Ecal/src/EcalLaser_weekly_Linearization.cc +++ b/CondTools/Ecal/src/EcalLaser_weekly_Linearization.cc @@ -2,7 +2,7 @@ #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" #include "OnlineDB/EcalCondDB/interface/LMFSextuple.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "OnlineDB/EcalCondDB/interface/Tm.h" diff --git a/CondTools/Ecal/src/EcalLaser_weekly_Linearization_Check.cc b/CondTools/Ecal/src/EcalLaser_weekly_Linearization_Check.cc index 6dc70e88cd650..2339e43688169 100644 --- a/CondTools/Ecal/src/EcalLaser_weekly_Linearization_Check.cc +++ b/CondTools/Ecal/src/EcalLaser_weekly_Linearization_Check.cc @@ -2,7 +2,7 @@ #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" #include "OnlineDB/EcalCondDB/interface/LMFSextuple.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "DataFormats/EcalDetId/interface/EBDetId.h" #include "OnlineDB/EcalCondDB/interface/Tm.h" diff --git a/CondTools/Ecal/src/EcalTPGPedfromFile.cc b/CondTools/Ecal/src/EcalTPGPedfromFile.cc index 85e6ef8dc6ccb..ddf26bed56d02 100644 --- a/CondTools/Ecal/src/EcalTPGPedfromFile.cc +++ b/CondTools/Ecal/src/EcalTPGPedfromFile.cc @@ -3,7 +3,7 @@ #include "OnlineDB/EcalCondDB/interface/EcalLogicID.h" #include "OnlineDB/EcalCondDB/interface/LMFSextuple.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "DataFormats/Provenance/interface/Timestamp.h" #include "OnlineDB/EcalCondDB/interface/Tm.h" diff --git a/CondTools/Hcal/BuildFile.xml b/CondTools/Hcal/BuildFile.xml index 979f4b2c29897..e6871c0c7312a 100644 --- a/CondTools/Hcal/BuildFile.xml +++ b/CondTools/Hcal/BuildFile.xml @@ -8,10 +8,7 @@ - - - diff --git a/CondTools/Hcal/bin/BuildFile.xml b/CondTools/Hcal/bin/BuildFile.xml index 7e39d36cb8c12..b06ede29109e0 100644 --- a/CondTools/Hcal/bin/BuildFile.xml +++ b/CondTools/Hcal/bin/BuildFile.xml @@ -6,9 +6,6 @@ - - - diff --git a/CondTools/Hcal/plugins/BuildFile.xml b/CondTools/Hcal/plugins/BuildFile.xml index 0590b90ef04e0..bd27e846c1078 100644 --- a/CondTools/Hcal/plugins/BuildFile.xml +++ b/CondTools/Hcal/plugins/BuildFile.xml @@ -4,11 +4,8 @@ - - - diff --git a/CondTools/L1Trigger/BuildFile.xml b/CondTools/L1Trigger/BuildFile.xml index 1ff6867032899..a66917175bb09 100644 --- a/CondTools/L1Trigger/BuildFile.xml +++ b/CondTools/L1Trigger/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/CondTools/L1Trigger/interface/DataManager.h b/CondTools/L1Trigger/interface/DataManager.h index 826f5ae1d4af4..600c0d6220e83 100644 --- a/CondTools/L1Trigger/interface/DataManager.h +++ b/CondTools/L1Trigger/interface/DataManager.h @@ -2,8 +2,7 @@ #define CondTools_L1Trigger_DataManager_h #include "FWCore/Framework/interface/DataKeyTags.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" +#include "CondCore/CondDB/interface/Session.h" #include @@ -30,18 +29,18 @@ class DataManager bool isOMDS = false ); void setDebug( bool debug ) ; - cond::DbSession* dbSession() + cond::persistency::Session dbSession() { return session ; } - cond::DbConnection* dbConnection() - { return connection ; } protected: //Returns type object for provided type name - edm::eventsetup::TypeTag findType (const std::string & type) const; + edm::eventsetup::TypeTag findType (const std::string & type); // Database connection management - cond::DbSession * session; - cond::DbConnection * connection ; + cond::persistency::Session session; + +private: + bool debugFlag = false; }; } diff --git a/CondTools/L1Trigger/interface/Exception.h b/CondTools/L1Trigger/interface/Exception.h index 0aac07756937a..499cc5b8c0435 100644 --- a/CondTools/L1Trigger/interface/Exception.h +++ b/CondTools/L1Trigger/interface/Exception.h @@ -23,7 +23,7 @@ #include // user include files -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" // forward declarations diff --git a/CondTools/L1Trigger/interface/OMDSReader.h b/CondTools/L1Trigger/interface/OMDSReader.h index d4480c43e9c1c..f8cb95a7f8b19 100644 --- a/CondTools/L1Trigger/interface/OMDSReader.h +++ b/CondTools/L1Trigger/interface/OMDSReader.h @@ -118,7 +118,7 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); // Assume data type of condition RHS is std::string const QueryResults basicQuery( @@ -130,7 +130,7 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); // Assume data type of condition RHS is std::string @@ -143,7 +143,7 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); // Assume data type of condition RHS is std::string const QueryResults basicQueryView( @@ -155,7 +155,7 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); // For any data type of condition RHS. // Example usage, for an int key: @@ -170,7 +170,7 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); // For any data type of condition RHS. // Example usage, for an int key: @@ -185,18 +185,18 @@ namespace l1t // must have only one row const std::string& conditionRHSName = "" // if empty, conditionRHS must have only one column - ) const ; + ); template< class T > const QueryResults singleAttribute( const T& data ) const ; std::vector< std::string > columnNames( const std::string& schemaName, // for nominal schema, use "" - const std::string& tableName ) const ; + const std::string& tableName ); std::vector< std::string > columnNamesView( const std::string& schemaName, // for nominal schema, use "" - const std::string& viewName ) const ; + const std::string& viewName ); // ---------- static member functions -------------------- @@ -220,11 +220,12 @@ namespace l1t const std::string& tableName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { + coral::ISessionProxy& coralSession = session.coralSession(); coral::ISchema& schema = schemaName.empty() ? - session->nominalSchema() : - session->schema( schemaName ) ; + coralSession.nominalSchema() : + coralSession.schema( schemaName ) ; coral::ITable& table = schema.tableHandle( tableName ) ; @@ -283,7 +284,7 @@ namespace l1t const std::string& tableName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { std::vector< std::string > columnNames ; columnNames.push_back( columnName ) ; diff --git a/CondTools/L1Trigger/interface/WriterProxy.h b/CondTools/L1Trigger/interface/WriterProxy.h index 65a72b31e25b8..b4255b2d5de2e 100644 --- a/CondTools/L1Trigger/interface/WriterProxy.h +++ b/CondTools/L1Trigger/interface/WriterProxy.h @@ -8,8 +8,6 @@ #include "FWCore/ServiceRegistry/interface/Service.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" -//#include "CondCore/DBCommon/interface/DbSession.h" -//#include "CondCore/DBCommon/interface/DbScopedTransaction.h" #include "CondTools/L1Trigger/interface/Exception.h" diff --git a/CondTools/L1Trigger/src/DataManager.cc b/CondTools/L1Trigger/src/DataManager.cc index d11b93340bb4b..26f7734ff4fdb 100644 --- a/CondTools/L1Trigger/src/DataManager.cc +++ b/CondTools/L1Trigger/src/DataManager.cc @@ -1,4 +1,5 @@ #include "CondTools/L1Trigger/interface/DataManager.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" @@ -10,8 +11,7 @@ namespace l1t { DataManager::DataManager() - : session( 0 ), - connection( 0 ) {} + : session( 0 ){} DataManager::DataManager (const std::string & connectString, const std::string & authenticationPath, @@ -25,36 +25,24 @@ namespace l1t const std::string & authenticationPath, bool isOMDS ) { - connection = new cond::DbConnection() ; setDebug( false ) ; + cond::persistency::ConnectionPool connection; + connection.setAuthenticationPath( authenticationPath ) ; + if( debugFlag ) connection.setMessageVerbosity( coral::Debug ); + else connection.setMessageVerbosity( coral::Error ) ; + connection.configure() ; - if( !isOMDS ) - { - connection->configuration().setConnectionSharing( true ) ; - connection->configuration().setReadOnlySessionOnUpdateConnections( - true ) ; - } - - connection->configuration().setAuthenticationPath( authenticationPath ) ; - connection->configure() ; - - session = new cond::DbSession( connection->createSession() ) ; - session->open( connectString, isOMDS ) ; + session = connection.createSession( connectString, isOMDS ); } DataManager::~DataManager () { // delete all in reverse direction - if( connection ) - connection->close() ; - if( session ) - session->close() ; + session.close() ; - delete connection ; - delete session ; } -edm::eventsetup::TypeTag DataManager::findType (const std::string & type) const +edm::eventsetup::TypeTag DataManager::findType (const std::string & type) { static edm::eventsetup::TypeTag defaultType; edm::eventsetup::TypeTag typeTag = edm::eventsetup::TypeTag::findType (type); @@ -69,13 +57,6 @@ edm::eventsetup::TypeTag DataManager::findType (const std::string & type) const void DataManager::setDebug( bool debug ) { - if( debug ) - { - connection->configuration().setMessageLevel( coral::Debug ) ; - } - else - { - connection->configuration().setMessageLevel( coral::Error ) ; - } + debugFlag = debug; } } diff --git a/CondTools/L1Trigger/src/DataWriter.cc b/CondTools/L1Trigger/src/DataWriter.cc index cb803ca2e6780..6a8653af8b361 100644 --- a/CondTools/L1Trigger/src/DataWriter.cc +++ b/CondTools/L1Trigger/src/DataWriter.cc @@ -2,7 +2,7 @@ #include "CondTools/L1Trigger/interface/DataWriter.h" #include "CondTools/L1Trigger/interface/Exception.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Exception.h" #include "CondCore/CondDB/interface/Serialization.h" diff --git a/CondTools/L1Trigger/src/OMDSReader.cc b/CondTools/L1Trigger/src/OMDSReader.cc index 11208205cf35b..d2d6de0adbdaa 100644 --- a/CondTools/L1Trigger/src/OMDSReader.cc +++ b/CondTools/L1Trigger/src/OMDSReader.cc @@ -19,7 +19,6 @@ #include "CondTools/L1Trigger/interface/OMDSReader.h" #include "RelationalAccess/ITableDescription.h" #include "RelationalAccess/IColumn.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" // // constants, enums and typedefs @@ -43,7 +42,7 @@ namespace l1t const std::string& authenticationPath ) : DataManager( connectString, authenticationPath, true ) { - session->transaction().start( true ) ; + session.transaction().start( true ) ; } void @@ -51,7 +50,7 @@ namespace l1t const std::string& authenticationPath ) { DataManager::connect( connectString, authenticationPath, true ) ; - session->transaction().start( true ) ; + session.transaction().start( true ) ; } // OMDSReader::OMDSReader(const OMDSReader& rhs) @@ -90,11 +89,12 @@ OMDSReader::~OMDSReader() const std::string& tableName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { + coral::ISessionProxy& coralSession = session.coralSession(); coral::ISchema& schema = schemaName.empty() ? - session->nominalSchema() : - session->schema( schemaName ) ; + coralSession.nominalSchema() : + coralSession.schema( schemaName ) ; coral::ITable& table = schema.tableHandle( tableName ) ; @@ -153,7 +153,7 @@ OMDSReader::~OMDSReader() const std::string& tableName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { std::vector< std::string > columnNames ; columnNames.push_back( columnName ) ; @@ -164,11 +164,12 @@ OMDSReader::~OMDSReader() std::vector< std::string > OMDSReader::columnNames( const std::string& schemaName, - const std::string& tableName ) const + const std::string& tableName ) { + coral::ISessionProxy& coralSession = session.coralSession(); coral::ISchema& schema = schemaName.empty() ? - session->nominalSchema() : - session->schema( schemaName ) ; + coralSession.nominalSchema() : + coralSession.schema( schemaName ) ; coral::ITable& table = schema.tableHandle( tableName ) ; const coral::ITableDescription& tableDesc = table.description() ; @@ -194,11 +195,12 @@ OMDSReader::~OMDSReader() const std::string& viewName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { + coral::ISessionProxy& coralSession = session.coralSession(); coral::ISchema& schema = schemaName.empty() ? - session->nominalSchema() : - session->schema( schemaName ) ; + coralSession.nominalSchema() : + coralSession.schema( schemaName ) ; // coral::IView& view = schema.viewHandle( viewName ) ; @@ -266,7 +268,7 @@ OMDSReader::~OMDSReader() const std::string& viewName, const std::string& conditionLHS, const QueryResults conditionRHS, - const std::string& conditionRHSName ) const + const std::string& conditionRHSName ) { std::vector< std::string > columnNames ; columnNames.push_back( columnName ) ; @@ -277,11 +279,12 @@ OMDSReader::~OMDSReader() std::vector< std::string > OMDSReader::columnNamesView( const std::string& schemaName, - const std::string& viewName ) const + const std::string& viewName ) { + coral::ISessionProxy& coralSession = session.coralSession(); coral::ISchema& schema = schemaName.empty() ? - session->nominalSchema() : - session->schema( schemaName ) ; + coralSession.nominalSchema() : + coralSession.schema( schemaName ) ; std::set< std::string > views = schema.listViews (); std::vector< std::string > names ; diff --git a/CondTools/RPC/BuildFile.xml b/CondTools/RPC/BuildFile.xml index a1c30d78086a0..a345017172c37 100644 --- a/CondTools/RPC/BuildFile.xml +++ b/CondTools/RPC/BuildFile.xml @@ -2,10 +2,7 @@ - - - diff --git a/CondTools/RPC/interface/L1RPCHwConfigSourceHandler.h b/CondTools/RPC/interface/L1RPCHwConfigSourceHandler.h index 6dadfb2873b3f..d6237cc8c1d64 100644 --- a/CondTools/RPC/interface/L1RPCHwConfigSourceHandler.h +++ b/CondTools/RPC/interface/L1RPCHwConfigSourceHandler.h @@ -20,9 +20,7 @@ -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" +#include "CondCore/CondDB/interface/Session.h" #include "RelationalAccess/ITable.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/IQuery.h" @@ -48,8 +46,7 @@ namespace popcon private: L1RPCHwConfig * disabledDevs; - cond::DbSession * session; - cond::DbConnection * connection ; + cond::persistency::Session session; std::string m_name; int m_dummy; int m_validate; diff --git a/CondTools/RPC/interface/RPCEMapSourceHandler.h b/CondTools/RPC/interface/RPCEMapSourceHandler.h index 117c17633d07f..5c4fe45b99f20 100644 --- a/CondTools/RPC/interface/RPCEMapSourceHandler.h +++ b/CondTools/RPC/interface/RPCEMapSourceHandler.h @@ -30,9 +30,7 @@ -#include "CondCore/DBCommon/interface/DbTransaction.h" -#include "CondCore/DBCommon/interface/DbSession.h" -#include "CondCore/DBCommon/interface/DbConnection.h" +#include "CondCore/CondDB/interface/Session.h" #include "RelationalAccess/ITable.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/IQuery.h" @@ -58,8 +56,7 @@ namespace popcon private: RPCEMap * eMap; - cond::DbSession * session; - cond::DbConnection * connection ; + cond::persistency::Session session; std::string m_name; int m_dummy; int m_validate; diff --git a/CondTools/RPC/plugins/BuildFile.xml b/CondTools/RPC/plugins/BuildFile.xml index a1bf179932b47..e7902be5488a3 100644 --- a/CondTools/RPC/plugins/BuildFile.xml +++ b/CondTools/RPC/plugins/BuildFile.xml @@ -1,8 +1,5 @@ - - - diff --git a/CondTools/RPC/src/L1RPCHwConfigSourceHandler.cc b/CondTools/RPC/src/L1RPCHwConfigSourceHandler.cc index b1bbad5a17eb9..6414ab6621a50 100644 --- a/CondTools/RPC/src/L1RPCHwConfigSourceHandler.cc +++ b/CondTools/RPC/src/L1RPCHwConfigSourceHandler.cc @@ -1,6 +1,7 @@ #include "CondTools/RPC/interface/L1RPCHwConfigSourceHandler.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" #include "FWCore/ServiceRegistry/interface/Service.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" popcon::L1RPCHwConfigSourceHandler::L1RPCHwConfigSourceHandler(const edm::ParameterSet& ps): @@ -80,27 +81,23 @@ void popcon::L1RPCHwConfigSourceHandler::getNewObjects() void popcon::L1RPCHwConfigSourceHandler::ConnectOnlineDB(std::string connect, std::string authPath) { std::cout << "L1RPCHwConfigSourceHandler: connecting to " << connect << "..." << std::flush; - connection = new cond::DbConnection() ; + cond::persistency::ConnectionPool connection; // session->configuration().setAuthenticationMethod(cond::XML); - connection->configuration().setAuthenticationPath( authPath ) ; - connection->configure(); - session = new cond::DbSession(connection->createSession()); - session->open(connect,true) ; + connection.setAuthenticationPath( authPath ) ; + connection.configure(); + session = connection.createSession( connect,true ); std::cout << "Done." << std::endl; } void popcon::L1RPCHwConfigSourceHandler::DisconnectOnlineDB() { - connection->close() ; - delete connection ; - session->close(); - delete session ; + session.close(); } void popcon::L1RPCHwConfigSourceHandler::readHwConfig1() { - session->transaction().start( true ); - coral::ISchema& schema = session->nominalSchema(); + session.transaction().start( true ); + coral::ISchema& schema = session.nominalSchema(); std::string condition=""; coral::AttributeList conditionData; std::cout << std::endl <<"L1RPCHwConfigSourceHandler: start to build L1RPC Hw Config..." << std::flush << std::endl << std::endl; diff --git a/CondTools/RPC/src/RPCEMapSourceHandler.cc b/CondTools/RPC/src/RPCEMapSourceHandler.cc index a3f01fa5d9941..1636018b25bc3 100644 --- a/CondTools/RPC/src/RPCEMapSourceHandler.cc +++ b/CondTools/RPC/src/RPCEMapSourceHandler.cc @@ -1,6 +1,7 @@ #include "CondTools/RPC/interface/RPCEMapSourceHandler.h" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" #include "FWCore/ServiceRegistry/interface/Service.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" popcon::RPCEMapSourceHandler::RPCEMapSourceHandler(const edm::ParameterSet& ps) : @@ -64,28 +65,23 @@ void popcon::RPCEMapSourceHandler::getNewObjects() void popcon::RPCEMapSourceHandler::ConnectOnlineDB(std::string connect, std::string authPath) { + cond::persistency::ConnectionPool connection; std::cout << "RPCEMapConfigSourceHandler: connecting to " << connect << "..." << std::flush; - connection = new cond::DbConnection() ; -// session->configuration().setAuthenticationMethod(cond::XML); - connection->configuration().setAuthenticationPath( authPath ) ; - connection->configure(); - session = new cond::DbSession(connection->createSession()); - session->open(connect,true) ; + connection.setAuthenticationPath( authPath ) ; + connection.configure(); + session = connection.createSession( connect,true ); std::cout << "Done." << std::endl; } void popcon::RPCEMapSourceHandler::DisconnectOnlineDB() { - connection->close() ; - delete connection ; - session->close(); - delete session ; + session.close(); } void popcon::RPCEMapSourceHandler::readEMap1() { - session->transaction().start( true ); - coral::ISchema& schema = session->nominalSchema(); + session.transaction().start( true ); + coral::ISchema& schema = session.nominalSchema(); std::string condition=""; coral::AttributeList conditionData; diff --git a/CondTools/RunInfo/BuildFile.xml b/CondTools/RunInfo/BuildFile.xml index ab36cdc2c9378..b440144a4391a 100644 --- a/CondTools/RunInfo/BuildFile.xml +++ b/CondTools/RunInfo/BuildFile.xml @@ -1,7 +1,4 @@ - - - diff --git a/CondTools/RunInfo/src/FillInfoPopConSourceHandler.cc b/CondTools/RunInfo/src/FillInfoPopConSourceHandler.cc index 650b92533fae0..db81641f1cb05 100644 --- a/CondTools/RunInfo/src/FillInfoPopConSourceHandler.cc +++ b/CondTools/RunInfo/src/FillInfoPopConSourceHandler.cc @@ -1,10 +1,9 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" #include "CondFormats/Common/interface/TimeConversions.h" #include "CondTools/RunInfo/interface/FillInfoPopConSourceHandler.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbConnectionConfiguration.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" +#include "RelationalAccess/ISessionProxy.h" #include "RelationalAccess/ISchema.h" #include "RelationalAccess/IQuery.h" #include "RelationalAccess/ICursor.h" @@ -75,20 +74,17 @@ void FillInfoPopConSourceHandler::getNewObjects() { } //retrieve the data from the relational database source - cond::DbConnection dbConnection; + cond::persistency::ConnectionPool connection; //configure the connection if( m_debug ) { - dbConnection.configuration().setMessageLevel( coral::Debug ); + connection.setMessageVerbosity( coral::Debug ); } else { - dbConnection.configuration().setMessageLevel( coral::Error ); + connection.setMessageVerbosity( coral::Error ); } - dbConnection.configuration().setPoolAutomaticCleanUp( false ); - dbConnection.configuration().setConnectionTimeOut( 0 ); - dbConnection.configuration().setAuthenticationPath( m_authpath ); - dbConnection.configure(); + connection.setAuthenticationPath( m_authpath ); + connection.configure(); //create a sessiom - cond::DbSession session = dbConnection.createSession(); - session.open( m_connectionString, true ); + cond::persistency::Session session = connection.createSession( m_connectionString, true ); //run the first query against the schema logging fill information coral::ISchema& runTimeLoggerSchema = session.nominalSchema(); //start the transaction against the fill logging schema @@ -283,7 +279,7 @@ void FillInfoPopConSourceHandler::getNewObjects() { continue; } //run the second and third query against the schema hosting detailed DIP information - coral::ISchema& beamCondSchema = session.schema( m_dipSchema ); + coral::ISchema& beamCondSchema = session.coralSession().schema( m_dipSchema ); //start the transaction against the DIP "deep" database backend schema session.transaction().start( true ); //prepare the WHERE clause for both queries @@ -408,8 +404,6 @@ void FillInfoPopConSourceHandler::getNewObjects() { session.transaction().commit(); //close the session session.close(); - //close the connection - dbConnection.close(); //store log information m_userTextLog = ss.str(); edm::LogInfo( m_name ) << "Transferring " << m_to_transfer.size() << " payload(s); from " << m_name << "::getNewObjects"; diff --git a/CondTools/RunInfo/src/L1TriggerScalerRead.cc b/CondTools/RunInfo/src/L1TriggerScalerRead.cc index 5f8f3531bd6e5..3974752bba101 100644 --- a/CondTools/RunInfo/src/L1TriggerScalerRead.cc +++ b/CondTools/RunInfo/src/L1TriggerScalerRead.cc @@ -15,7 +15,7 @@ #include "CoralBase/AttributeSpecification.h" //#include "SealBase/TimeInfo.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "CoralBase/TimeStamp.h" diff --git a/CondTools/RunInfo/src/RunSummaryRead.cc b/CondTools/RunInfo/src/RunSummaryRead.cc index 0dc0be4562572..2ce15ac1ffcf1 100644 --- a/CondTools/RunInfo/src/RunSummaryRead.cc +++ b/CondTools/RunInfo/src/RunSummaryRead.cc @@ -15,7 +15,7 @@ #include "CoralBase/AttributeSpecification.h" //#include "SealBase/TimeInfo.h" -#include "CondCore/DBCommon/interface/Time.h" +#include "CondCore/CondDB/interface/Time.h" #include "CoralBase/TimeStamp.h" diff --git a/CondTools/SiStrip/interface/SiStripPopConDbObjHandler.h b/CondTools/SiStrip/interface/SiStripPopConDbObjHandler.h index 7f0189ff45e6a..925ec0f80b660 100644 --- a/CondTools/SiStrip/interface/SiStripPopConDbObjHandler.h +++ b/CondTools/SiStrip/interface/SiStripPopConDbObjHandler.h @@ -6,8 +6,6 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" -#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" #include #include diff --git a/CondTools/SiStrip/plugins/BuildFile.xml b/CondTools/SiStrip/plugins/BuildFile.xml index e6db09fc799da..6ff926d8954f0 100644 --- a/CondTools/SiStrip/plugins/BuildFile.xml +++ b/CondTools/SiStrip/plugins/BuildFile.xml @@ -8,7 +8,6 @@ - diff --git a/DQM/L1TMonitor/src/L1TOMDSHelper.cc b/DQM/L1TMonitor/src/L1TOMDSHelper.cc index a610d51d28f55..12350a98c967e 100644 --- a/DQM/L1TMonitor/src/L1TOMDSHelper.cc +++ b/DQM/L1TMonitor/src/L1TOMDSHelper.cc @@ -29,30 +29,18 @@ bool L1TOMDSHelper::connect(string iOracleDB,string iPathCondDB,int &error){ error = NO_ERROR; // Initializing variables - bool SessionExists = false; bool SessionOpen = false; - bool ConnectionExists = false; - bool ConnectionOpen = false; bool out = false; m_omdsReader = new l1t::OMDSReader(); m_omdsReader->connect(m_oracleDB,m_pathCondDB); // Testing session - if(m_omdsReader->dbSession()){ - SessionExists = true; - if(m_omdsReader->dbSession()->isOpen()){SessionOpen = true;} - } + if(!m_omdsReader->dbSession().connectionString().empty()){SessionOpen = true;} - // Testing connection - if(m_omdsReader->dbConnection()){ - ConnectionExists = true; - if(m_omdsReader->dbSession()->isOpen()){ConnectionOpen = true;} - } - // Defining output and error message if needed - if (SessionExists && SessionOpen && ConnectionExists && ConnectionOpen){out = true;} - else if(!SessionExists || !ConnectionExists) {error = WARNING_DB_CONN_FAILED;} + if (SessionOpen){out = true;} + else {error = WARNING_DB_CONN_FAILED;} return out; diff --git a/DQM/RPCMonitorClient/BuildFile.xml b/DQM/RPCMonitorClient/BuildFile.xml index 8434033c6cc5a..3e24fe18562f1 100644 --- a/DQM/RPCMonitorClient/BuildFile.xml +++ b/DQM/RPCMonitorClient/BuildFile.xml @@ -18,7 +18,6 @@ - diff --git a/DQM/RPCMonitorClient/interface/RPCDBHandler.h b/DQM/RPCMonitorClient/interface/RPCDBHandler.h index 878f0d7d28b95..442523b88a77f 100644 --- a/DQM/RPCMonitorClient/interface/RPCDBHandler.h +++ b/DQM/RPCMonitorClient/interface/RPCDBHandler.h @@ -8,7 +8,6 @@ #include #include -#include "CondCore/DBCommon/interface/TagInfo.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" #include "CondFormats/RPCObjects/interface/RPCDQMObject.h" #include "CondFormats/DataRecord/interface/RPCDQMObjectRcd.h" diff --git a/DQM/RPCMonitorClient/src/RPCDBHandler.cc b/DQM/RPCMonitorClient/src/RPCDBHandler.cc index 090a464f8ebc9..e047e839f60a9 100644 --- a/DQM/RPCMonitorClient/src/RPCDBHandler.cc +++ b/DQM/RPCMonitorClient/src/RPCDBHandler.cc @@ -1,3 +1,4 @@ +#include "CondCore/CondDB/interface/Types.h" #include "DQM/RPCMonitorClient/interface/RPCDBHandler.h" RPCDBHandler::RPCDBHandler(const edm::ParameterSet& iConfig) : diff --git a/JetMETCorrections/FFTJetModules/plugins/BuildFile.xml b/JetMETCorrections/FFTJetModules/plugins/BuildFile.xml index f74fcf16998b9..033c2eade7a39 100644 --- a/JetMETCorrections/FFTJetModules/plugins/BuildFile.xml +++ b/JetMETCorrections/FFTJetModules/plugins/BuildFile.xml @@ -1,7 +1,6 @@ - diff --git a/JetMETCorrections/Modules/BuildFile.xml b/JetMETCorrections/Modules/BuildFile.xml index 9325c22e2f401..72af7c44de676 100644 --- a/JetMETCorrections/Modules/BuildFile.xml +++ b/JetMETCorrections/Modules/BuildFile.xml @@ -1,7 +1,6 @@ - diff --git a/JetMETCorrections/Modules/plugins/BuildFile.xml b/JetMETCorrections/Modules/plugins/BuildFile.xml index cfc19860df15d..f5eb11060c010 100644 --- a/JetMETCorrections/Modules/plugins/BuildFile.xml +++ b/JetMETCorrections/Modules/plugins/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/L1TriggerConfig/DTTPGConfigProducers/BuildFile.xml b/L1TriggerConfig/DTTPGConfigProducers/BuildFile.xml index 765b9dc3d1a06..347075adbecbe 100644 --- a/L1TriggerConfig/DTTPGConfigProducers/BuildFile.xml +++ b/L1TriggerConfig/DTTPGConfigProducers/BuildFile.xml @@ -1,7 +1,4 @@ - - - diff --git a/L1TriggerConfig/DTTPGConfigProducers/plugins/BuildFile.xml b/L1TriggerConfig/DTTPGConfigProducers/plugins/BuildFile.xml index d7c01efa12432..f9b5558fa717e 100644 --- a/L1TriggerConfig/DTTPGConfigProducers/plugins/BuildFile.xml +++ b/L1TriggerConfig/DTTPGConfigProducers/plugins/BuildFile.xml @@ -3,7 +3,6 @@ - diff --git a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h index 7f09f2178e361..9d478d539382f 100644 --- a/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h +++ b/L1TriggerConfig/L1GtConfigProducers/interface/L1GtPsbSetupConfigOnlineProd.h @@ -54,7 +54,7 @@ class L1GtPsbSetupConfigOnlineProd : static bool notPsbColumnName(const std::string& columnName); /// Creates a new PSB object from a GT_PSB_SETUP entry and adds. - void addPsbFromDb(const std::string& psbKey, std::vector& psbSetup) const; + void addPsbFromDb(const std::string& psbKey, std::vector& psbSetup); /// Creates a default valued PSB from an empty foreign key in the GT_SETUP table. void addDefaultPsb(const std::string& psbColumn, std::vector& psbSetup) const; diff --git a/L1TriggerConfig/L1GtConfigProducers/src/L1GtPsbSetupConfigOnlineProd.cc b/L1TriggerConfig/L1GtConfigProducers/src/L1GtPsbSetupConfigOnlineProd.cc index b55f25bf5270d..9f24983c4fb3c 100644 --- a/L1TriggerConfig/L1GtConfigProducers/src/L1GtPsbSetupConfigOnlineProd.cc +++ b/L1TriggerConfig/L1GtConfigProducers/src/L1GtPsbSetupConfigOnlineProd.cc @@ -113,7 +113,7 @@ bool L1GtPsbSetupConfigOnlineProd::notPsbColumnName(const std::string& columnNam } void L1GtPsbSetupConfigOnlineProd::addPsbFromDb(const std::string& psbKey, std::vector< - L1GtPsbConfig>& psbSetup) const { + L1GtPsbConfig>& psbSetup) { // SQL> describe gt_psb_setup; // (heavily pruned to just the stuff we need to set up a GtPsbConfig) diff --git a/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc b/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc index c64730dbe277e..e089e7871a10b 100644 --- a/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc +++ b/L1TriggerConfig/L1ScalesProducers/src/L1CaloHcalScaleConfigOnlineProd.cc @@ -185,7 +185,7 @@ L1CaloHcalScaleConfigOnlineProd::newObject( const std::string& objectKey ) std::string schemaName("CMS_HCL_HCAL_COND"); - coral::ISchema& schema = m_omdsReader.dbSession()->schema( schemaName ) ; + coral::ISchema& schema = m_omdsReader.dbSession().coralSession().schema( schemaName ) ; coral::IQuery* query = schema.newQuery(); ; diff --git a/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc b/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc index 4176849af50ae..9ce13e0c0cee9 100644 --- a/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc +++ b/L1TriggerConfig/L1ScalesProducers/src/L1MuTriggerScaleKeysOnlineProd.cc @@ -15,7 +15,6 @@ #include "CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h" #include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "CondCore/DBCommon/interface/Exception.h" class L1MuTriggerScaleKeysOnlineProd : public L1ObjectKeysOnlineProdBase { diff --git a/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc b/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc index c7b2c4bbfd926..ee79e9a96eb6a 100644 --- a/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc +++ b/L1TriggerConfig/RCTConfigProducers/src/L1RCTOmdsFedVectorProducer.cc @@ -28,7 +28,7 @@ #include "FWCore/Framework/interface/ESHandle.h" // OMDS stuff -#include "RelationalAccess/ISession.h" +#include "RelationalAccess/ISessionProxy.h" #include "RelationalAccess/ITransaction.h" #include "RelationalAccess/IRelationalDomain.h" #include "RelationalAccess/ISchema.h" @@ -39,9 +39,7 @@ #include "CoralBase/Attribute.h" #include "CoralKernel/Context.h" -#include "CondCore/DBCommon/interface/DbConnection.h" -#include "CondCore/DBCommon/interface/DbConnectionConfiguration.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" +#include "CondCore/CondDB/interface/ConnectionPool.h" // end OMDS stuff #include "CondFormats/RunInfo/interface/RunInfo.h" @@ -132,20 +130,18 @@ L1RCTOmdsFedVectorProducer::produce(const RunInfoRcd& iRecord) // DO THE DATABASE STUFF //make connection object - cond::DbConnection connection; + cond::persistency::ConnectionPool connection; //set in configuration object authentication path - connection.configuration().setAuthenticationPath(authpath); + connection.setAuthenticationPath(authpath); connection.configure(); //create session object from connection - cond::DbSession session = connection.createSession(); + cond::persistency::Session session = connection.createSession(connectionString,true ); - session.open(connectionString,true); - session.transaction().start(true); // (true=readOnly) - coral::ISchema& schema = session.schema("CMS_RUNINFO"); + coral::ISchema& schema = session.coralSession().schema("CMS_RUNINFO"); //condition coral::AttributeList conditionData; diff --git a/OnlineDB/CSCCondDB/BuildFile.xml b/OnlineDB/CSCCondDB/BuildFile.xml index 8989c694cff5a..078b5730fa7ae 100644 --- a/OnlineDB/CSCCondDB/BuildFile.xml +++ b/OnlineDB/CSCCondDB/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/OnlineDB/CSCCondDB/test/BuildFile.xml b/OnlineDB/CSCCondDB/test/BuildFile.xml index bdbb6f3091ed4..9a664129e78e5 100644 --- a/OnlineDB/CSCCondDB/test/BuildFile.xml +++ b/OnlineDB/CSCCondDB/test/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/OnlineDB/SiStripO2O/plugins/BuildFile.xml b/OnlineDB/SiStripO2O/plugins/BuildFile.xml index 868c861dc78cc..93352973e8f9b 100644 --- a/OnlineDB/SiStripO2O/plugins/BuildFile.xml +++ b/OnlineDB/SiStripO2O/plugins/BuildFile.xml @@ -4,7 +4,6 @@ - diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h b/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h index 066611a38b61e..57ee0e06b309c 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h +++ b/OnlineDB/SiStripO2O/plugins/SiStripPopConConfigDbObjHandler.h @@ -8,8 +8,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" -#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" +#include "CondCore/CondDB/interface/Types.h" #include "OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h" #include "OnlineDB/SiStripConfigDb/interface/SiStripDbParams.h" diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTest.h b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTest.h index fc63378126213..76ef95c5cd416 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTest.h +++ b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTest.h @@ -8,8 +8,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" -#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" +#include "CondCore/CondDB/interface/Types.h" #include "OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h" #include "OnlineDB/SiStripConfigDb/interface/SiStripDbParams.h" diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h index 0d114253847aa..df9ac56898e9c 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h +++ b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestGain.h @@ -8,8 +8,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" -#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" +#include "CondCore/CondDB/interface/Types.h" #include "OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h" #include "OnlineDB/SiStripConfigDb/interface/SiStripDbParams.h" diff --git a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h index aefcfa3c89a59..2078b45941810 100644 --- a/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h +++ b/OnlineDB/SiStripO2O/plugins/SiStripPopConHandlerUnitTestNoise.h @@ -8,8 +8,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondCore/PopCon/interface/PopConSourceHandler.h" -#include "CondCore/DBCommon/interface/TagInfo.h" -#include "CondCore/DBCommon/interface/LogDBEntry.h" +#include "CondCore/CondDB/interface/Types.h" #include "OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h" #include "OnlineDB/SiStripConfigDb/interface/SiStripDbParams.h" diff --git a/RecoBTag/PerformanceDB/plugins/BuildFile.xml b/RecoBTag/PerformanceDB/plugins/BuildFile.xml index 0618ec9fe8cf2..174635818fa14 100644 --- a/RecoBTag/PerformanceDB/plugins/BuildFile.xml +++ b/RecoBTag/PerformanceDB/plugins/BuildFile.xml @@ -11,7 +11,6 @@ - diff --git a/RecoHI/HiCentralityAlgos/BuildFile.xml b/RecoHI/HiCentralityAlgos/BuildFile.xml index d035747489468..d0c42e1fc95d0 100644 --- a/RecoHI/HiCentralityAlgos/BuildFile.xml +++ b/RecoHI/HiCentralityAlgos/BuildFile.xml @@ -15,7 +15,6 @@ - diff --git a/RecoHI/HiEvtPlaneAlgos/BuildFile.xml b/RecoHI/HiEvtPlaneAlgos/BuildFile.xml index 072bb484df156..ee95955bea069 100644 --- a/RecoHI/HiEvtPlaneAlgos/BuildFile.xml +++ b/RecoHI/HiEvtPlaneAlgos/BuildFile.xml @@ -16,7 +16,6 @@ - diff --git a/RecoHI/HiJetAlgos/plugins/BuildFile.xml b/RecoHI/HiJetAlgos/plugins/BuildFile.xml index 231e1009b5c6f..3df31073c0ba9 100644 --- a/RecoHI/HiJetAlgos/plugins/BuildFile.xml +++ b/RecoHI/HiJetAlgos/plugins/BuildFile.xml @@ -5,7 +5,6 @@ - diff --git a/RecoParticleFlow/PFClusterTools/test/BuildFile.xml b/RecoParticleFlow/PFClusterTools/test/BuildFile.xml index cc38b3c8d4a6d..3aa42b5339e1f 100644 --- a/RecoParticleFlow/PFClusterTools/test/BuildFile.xml +++ b/RecoParticleFlow/PFClusterTools/test/BuildFile.xml @@ -1,7 +1,6 @@ - diff --git a/SimCalorimetry/EcalSelectiveReadoutProducers/BuildFile.xml b/SimCalorimetry/EcalSelectiveReadoutProducers/BuildFile.xml index dbbd40d427a54..be4673a455779 100644 --- a/SimCalorimetry/EcalSelectiveReadoutProducers/BuildFile.xml +++ b/SimCalorimetry/EcalSelectiveReadoutProducers/BuildFile.xml @@ -7,7 +7,6 @@ - From 994e759ee0fe98970f7ce1df4fcf907963fa835b Mon Sep 17 00:00:00 2001 From: Giacomo Govi Date: Thu, 14 Jan 2016 16:31:33 +0100 Subject: [PATCH 185/250] Added TagLog feature --- CondCore/CondDB/interface/IOVEditor.h | 2 + CondCore/CondDB/interface/Utils.h | 32 ++++ CondCore/CondDB/src/DbCore.h | 4 +- CondCore/CondDB/src/GTSchema.h | 24 +-- CondCore/CondDB/src/IDbSchema.h | 13 +- CondCore/CondDB/src/IOVEditor.cc | 65 +++++--- CondCore/CondDB/src/IOVSchema.cc | 144 +++++------------- CondCore/CondDB/src/IOVSchema.h | 104 +++++-------- .../src/PoolDBOutputService.cc | 11 +- 9 files changed, 186 insertions(+), 213 deletions(-) diff --git a/CondCore/CondDB/interface/IOVEditor.h b/CondCore/CondDB/interface/IOVEditor.h index a379af86fcadc..055edc38a619d 100644 --- a/CondCore/CondDB/interface/IOVEditor.h +++ b/CondCore/CondDB/interface/IOVEditor.h @@ -76,6 +76,8 @@ namespace cond { // execute the update/intert queries and reset the buffer bool flush(); bool flush( const boost::posix_time::ptime& operationTime ); + bool flush( const std::string& logText ); + bool flush( const std::string& logText, const boost::posix_time::ptime& operationTime ); private: void checkTransaction( const std::string& ctx ); diff --git a/CondCore/CondDB/interface/Utils.h b/CondCore/CondDB/interface/Utils.h index 175faf673f648..b2ebf669a4dd8 100644 --- a/CondCore/CondDB/interface/Utils.h +++ b/CondCore/CondDB/interface/Utils.h @@ -8,6 +8,9 @@ #include #include #include +#include +#include +#include // #include @@ -46,6 +49,35 @@ namespace cond { return arch; } + inline std::string getUserName(){ + char username[LOGIN_NAME_MAX]; + int retcode = getlogin_r(username,LOGIN_NAME_MAX); + if( retcode ) return ""; + return std::string(username); + } + + inline std::string getHostName(){ + char hostname[HOST_NAME_MAX]; + int retcode = gethostname(hostname,HOST_NAME_MAX); + if( retcode ) return ""; + return std::string(hostname); + } + + inline std::string getCommand(){ + std::string commName(""); + try{ + std::ifstream comm("/proc/self/cmdline"); + std::getline(comm,commName); + size_t ind = commName.find('\0'); + while( ind != std::string::npos ){ + commName.replace(ind,1,1,' '); + ind = commName.find('\0'); + } + } catch ( std::ifstream::failure ){ + commName = "unknown"; + } + return commName; + } } namespace persistency { diff --git a/CondCore/CondDB/src/DbCore.h b/CondCore/CondDB/src/DbCore.h index 74a74d0414200..994e4dd206a9c 100644 --- a/CondCore/CondDB/src/DbCore.h +++ b/CondCore/CondDB/src/DbCore.h @@ -46,7 +46,7 @@ // macros for the schema definition // table definition -#define table( NAME ) namespace NAME {\ +#define conddb_table( NAME ) namespace NAME {\ static constexpr char const* tname = #NAME ;\ }\ namespace NAME @@ -71,7 +71,7 @@ #define SELECT_COLUMN_MACRO(...) GET_4TH_ARG(__VA_ARGS__, FIXSIZE_COLUMN, VARSIZE_COLUMN, WRONG_PAR_NUMBER_ERROR ) // the final column definition macro -#define column( ... ) SELECT_COLUMN_MACRO(__VA_ARGS__)(__VA_ARGS__) +#define conddb_column( ... ) SELECT_COLUMN_MACRO(__VA_ARGS__)(__VA_ARGS__) namespace cond { diff --git a/CondCore/CondDB/src/GTSchema.h b/CondCore/CondDB/src/GTSchema.h index 72056883192f6..56be5b5ec6038 100644 --- a/CondCore/CondDB/src/GTSchema.h +++ b/CondCore/CondDB/src/GTSchema.h @@ -10,14 +10,14 @@ namespace cond { namespace persistency { - table( GLOBAL_TAG ) { + conddb_table( GLOBAL_TAG ) { - column( NAME, std::string ); - column( VALIDITY, cond::Time_t ); - column( DESCRIPTION, std::string ); - column( RELEASE, std::string ); - column( SNAPSHOT_TIME, boost::posix_time::ptime ); - column( INSERTION_TIME, boost::posix_time::ptime ); + conddb_column( NAME, std::string ); + conddb_column( VALIDITY, cond::Time_t ); + conddb_column( DESCRIPTION, std::string ); + conddb_column( RELEASE, std::string ); + conddb_column( SNAPSHOT_TIME, boost::posix_time::ptime ); + conddb_column( INSERTION_TIME, boost::posix_time::ptime ); class Table : public IGTTable { public: @@ -38,16 +38,16 @@ namespace cond { }; } - table ( GLOBAL_TAG_MAP ) { + conddb_table ( GLOBAL_TAG_MAP ) { static constexpr unsigned int PAYLOAD_HASH_SIZE = 40; - column( GLOBAL_TAG_NAME, std::string ); + conddb_column( GLOBAL_TAG_NAME, std::string ); // to be changed to RECORD_NAME! - column( RECORD, std::string ); + conddb_column( RECORD, std::string ); // to be changed to RECORD_LABEL! - column( LABEL, std::string ); - column( TAG_NAME, std::string ); + conddb_column( LABEL, std::string ); + conddb_column( TAG_NAME, std::string ); class Table : public IGTMapTable { public: diff --git a/CondCore/CondDB/src/IDbSchema.h b/CondCore/CondDB/src/IDbSchema.h index 92f64379bb445..500d5c9020f7c 100644 --- a/CondCore/CondDB/src/IDbSchema.h +++ b/CondCore/CondDB/src/IDbSchema.h @@ -90,6 +90,15 @@ namespace cond { const boost::posix_time::ptime& insertionTime ) = 0; }; + class ITagLogTable { + public: + virtual ~ITagLogTable(){} + virtual bool exists() = 0; + virtual void create() = 0; + virtual void insert( const std::string& tag, const boost::posix_time::ptime& eventTime, const std::string& userName, const std::string& hostName, + const std::string& command, const std::string& action, const std::string& userText ) = 0; + }; + class IIOVSchema { public: virtual ~IIOVSchema(){} @@ -98,9 +107,7 @@ namespace cond { virtual ITagTable& tagTable() = 0; virtual IIOVTable& iovTable() = 0; virtual IPayloadTable& payloadTable() = 0; - virtual ITagMigrationTable& tagMigrationTable() = 0; - virtual IPayloadMigrationTable& payloadMigrationTable() = 0; - virtual std::string parsePoolToken( const std::string& poolToken ) = 0; + virtual ITagLogTable& tagLogTable() = 0; }; class IGTTable { diff --git a/CondCore/CondDB/src/IOVEditor.cc b/CondCore/CondDB/src/IOVEditor.cc index 8ffcca7274dc1..61f8247e8ea82 100644 --- a/CondCore/CondDB/src/IOVEditor.cc +++ b/CondCore/CondDB/src/IOVEditor.cc @@ -1,4 +1,5 @@ #include "CondCore/CondDB/interface/IOVEditor.h" +#include "CondCore/CondDB/interface/Utils.h" #include "SessionImpl.h" // @@ -150,56 +151,80 @@ namespace cond { bool iovSorter( const std::tuple& f, const std::tuple& s ){ return std::get<0>(f) < std::get<0>(s); } - - bool IOVEditor::flush( const boost::posix_time::ptime& operationTime ){ + + bool IOVEditor::flush( const std::string& logText, const boost::posix_time::ptime& operationTime ){ bool ret = false; checkTransaction( "IOVEditor::flush" ); if( m_data->change ){ if( m_data->description.empty() ) throwException( "A non-empty description string is mandatory.","IOVEditor::flush" ); if( m_data->validationMode ) m_session->iovSchema().tagTable().setValidationMode(); if( !m_data->exists ){ + // set the creation time ( only available in the migration from v1...) + if( m_data->creationTime.is_not_a_date_time() ) m_data->creationTime = operationTime; m_session->iovSchema().tagTable().insert( m_data->tag, m_data->timeType, m_data->payloadType, m_data->synchronizationType, m_data->endOfValidity, m_data->description, m_data->lastValidatedTime, m_data->creationTime ); + if( m_session->iovSchema().tagLogTable().exists() ) + m_session->iovSchema().tagLogTable().insert( m_data->tag, m_data->creationTime, cond::getUserName(),cond::getHostName(), cond::getCommand(), + std::string("New tag created."),std::string("-") ); m_data->exists = true; ret = true; } else { m_session->iovSchema().tagTable().update( m_data->tag, m_data->endOfValidity, m_data->description, m_data->lastValidatedTime, operationTime ); + if( m_session->iovSchema().tagLogTable().exists() ) + m_session->iovSchema().tagLogTable().insert( m_data->tag, operationTime, cond::getUserName(),cond::getHostName(), cond::getCommand(), + std::string("Tag header updated."),std::string("-") ); ret = true; } m_data->change = false; } if( m_data->iovBuffer.size() ) { - std::sort(m_data->iovBuffer.begin(),m_data->iovBuffer.end(),iovSorter); - cond::Time_t l = std::get<0>(m_data->iovBuffer.front()); - if( m_data->synchronizationType != cond::SYNCH_ANY && m_data->synchronizationType != cond::SYNCH_VALIDATION ){ - // retrieve the last since - cond::Time_t last = 0; - cond::Hash h; - m_session->iovSchema().iovTable().getLastIov( m_data->tag, last, h ); - // check if the min iov is greater then the last since - if( l <= last ){ - std::stringstream msg; - msg << "Can't insert iov since "<tag<<": last since is "<synchronizationType )<<"\""; - throwException( msg.str(),"IOVEditor::flush"); - } - } - + cond::Time_t l = std::get<0>(m_data->iovBuffer.front()); + if( m_data->synchronizationType != cond::SYNCH_ANY && m_data->synchronizationType != cond::SYNCH_VALIDATION ){ + // retrieve the last since + cond::Time_t last = 0; + cond::Hash h; + m_session->iovSchema().iovTable().getLastIov( m_data->tag, last, h ); + // check if the min iov is greater then the last since + if( l <= last ){ + std::stringstream msg; + msg << "Can't insert iov since "<tag<<": last since is "<synchronizationType )<<"\""; + throwException( msg.str(),"IOVEditor::flush"); + } + } + // set the insertion time ( only for the migration from v1 will be available... ) + for( auto& iov : m_data->iovBuffer ){ + boost::posix_time::ptime& insertionTime = std::get<2>(iov); + if( insertionTime.is_not_a_date_time() ) insertionTime = operationTime; + } // insert the new iovs m_session->iovSchema().iovTable().insertMany( m_data->tag, m_data->iovBuffer ); + std::stringstream msg; + msg << m_data->iovBuffer.size() << " iov(s) inserted."; + if( m_session->iovSchema().tagLogTable().exists() ) + m_session->iovSchema().tagLogTable().insert( m_data->tag, operationTime, cond::getUserName(), cond::getHostName(), cond::getCommand(), + msg.str(),logText ); m_data->iovBuffer.clear(); ret = true; } return ret; } + bool IOVEditor::flush( const std::string& logText ){ + return flush( logText, boost::posix_time::microsec_clock::universal_time() ); + } + + bool IOVEditor::flush( const boost::posix_time::ptime& operationTime ){ + return flush( std::string("-"), operationTime ); + } + bool IOVEditor::flush(){ - return flush( boost::posix_time::microsec_clock::universal_time() ); + return flush( std::string("-"), boost::posix_time::microsec_clock::universal_time() ); } - + void IOVEditor::checkTransaction( const std::string& ctx ){ if( !m_session.get() ) throwException("The session is not active.",ctx ); if( !m_session->isTransactionActive( false ) ) throwException("The transaction is not active.",ctx ); diff --git a/CondCore/CondDB/src/IOVSchema.cc b/CondCore/CondDB/src/IOVSchema.cc index 427679ada9efa..1688ff4a3efe3 100644 --- a/CondCore/CondDB/src/IOVSchema.cc +++ b/CondCore/CondDB/src/IOVSchema.cc @@ -297,6 +297,37 @@ namespace cond { deleteFromTable( m_schema, tname, buffer ); } + TAG_LOG::Table::Table( coral::ISchema& schema ): + m_schema( schema ){ + } + + bool TAG_LOG::Table::exists(){ + return existsTable( m_schema, tname ); + } + + void TAG_LOG::Table::create(){ + if( exists() ){ + throwException( "TAG_LOG table already exists in this schema.", + "TAG_LOG::create"); + } + TableDescription< TAG_NAME, EVENT_TIME, USER_NAME, HOST_NAME, COMMAND, ACTION, USER_TEXT > descr( tname ); + descr.setPrimaryKey(); + descr.setForeignKey< TAG_NAME, TAG::NAME >( "TAG_NAME_FK" ); + createTable( m_schema, descr.get() ); + } + + void TAG_LOG::Table::insert( const std::string& tag, + const boost::posix_time::ptime& eventTime, + const std::string& userName, + const std::string& hostName, + const std::string& command, + const std::string& action, + const std::string& userText){ + RowBuffer< TAG_NAME, EVENT_TIME, USER_NAME, HOST_NAME, COMMAND, ACTION, USER_TEXT > + dataToInsert( std::tie( tag, eventTime, userName, hostName, command, action, userText ) ); + insertInTable( m_schema, tname, dataToInsert.get() ); + } + PAYLOAD::Table::Table( coral::ISchema& schema ): m_schema( schema ){ } @@ -371,104 +402,11 @@ namespace cond { return payloadHash; } - TAG_MIGRATION::Table::Table( coral::ISchema& schema ): - m_schema( schema ){ - } - - bool TAG_MIGRATION::Table::exists(){ - return existsTable( m_schema, tname ); - } - - void TAG_MIGRATION::Table::create(){ - if( exists() ){ - throwException( "TAG_MIGRATION table already exists in this schema.", - "TAG_MIGRATION::create"); - } - TableDescription< SOURCE_ACCOUNT, SOURCE_TAG, TAG_NAME, STATUS_CODE, INSERTION_TIME > descr( tname ); - descr.setPrimaryKey(); - descr.setForeignKey< TAG_NAME, TAG::NAME >( "TAG_NAME_FK" ); - createTable( m_schema, descr.get() ); - } - - bool TAG_MIGRATION::Table::select( const std::string& sourceAccount, const std::string& sourceTag, std::string& tagName, int& statusCode ){ - Query< TAG_NAME, STATUS_CODE > q( m_schema ); - q.addCondition( sourceAccount ); - q.addCondition( sourceTag ); - for ( auto row : q ) { - std::tie( tagName, statusCode ) = row; - } - - return q.retrievedRows(); - - } - - void TAG_MIGRATION::Table::insert( const std::string& sourceAccount, const std::string& sourceTag, const std::string& tagName, - int statusCode, const boost::posix_time::ptime& insertionTime ){ - RowBuffer< SOURCE_ACCOUNT, SOURCE_TAG, TAG_NAME, STATUS_CODE, INSERTION_TIME > - dataToInsert( std::tie( sourceAccount, sourceTag, tagName, statusCode, insertionTime ) ); - insertInTable( m_schema, tname, dataToInsert.get() ); - } - - void TAG_MIGRATION::Table::updateValidationCode( const std::string& sourceAccount, const std::string& sourceTag, int statusCode ){ - UpdateBuffer buffer; - buffer.setColumnData< STATUS_CODE >( std::tie( statusCode ) ); - buffer.addWhereCondition( sourceAccount ); - buffer.addWhereCondition( sourceTag ); - updateTable( m_schema, tname, buffer ); - } - - PAYLOAD_MIGRATION::Table::Table( coral::ISchema& schema ): - m_schema( schema ){ - } - - bool PAYLOAD_MIGRATION::Table::exists(){ - return existsTable( m_schema, tname ); - } - - void PAYLOAD_MIGRATION::Table::create(){ - if( exists() ){ - throwException( "PAYLOAD_MIGRATION table already exists in this schema.", - "PAYLOAD_MIGRATION::create"); - } - TableDescription< SOURCE_ACCOUNT, SOURCE_TOKEN, PAYLOAD_HASH, INSERTION_TIME > descr( tname ); - descr.setPrimaryKey(); - descr.setForeignKey< PAYLOAD_HASH, PAYLOAD::HASH >( "PAYLOAD_HASH_FK" ); - createTable( m_schema, descr.get() ); - } - - bool PAYLOAD_MIGRATION::Table::select( const std::string& sourceAccount, const std::string& sourceToken, std::string& payloadId ){ - Query< PAYLOAD_HASH > q( m_schema ); - q.addCondition( sourceAccount ); - q.addCondition( sourceToken ); - for ( auto row : q ) { - std::tie( payloadId ) = row; - } - - return q.retrievedRows(); - } - - void PAYLOAD_MIGRATION::Table::insert( const std::string& sourceAccount, const std::string& sourceToken, const std::string& payloadId, - const boost::posix_time::ptime& insertionTime ){ - RowBuffer< SOURCE_ACCOUNT, SOURCE_TOKEN, PAYLOAD_HASH, INSERTION_TIME > - dataToInsert( std::tie( sourceAccount, sourceToken, payloadId, insertionTime ) ); - insertInTable( m_schema, tname, dataToInsert.get() ); - } - - void PAYLOAD_MIGRATION::Table::update( const std::string& sourceAccount, const std::string& sourceToken, const std::string& payloadId, - const boost::posix_time::ptime& insertionTime ){ - UpdateBuffer buffer; - buffer.setColumnData< PAYLOAD_HASH, INSERTION_TIME >( std::tie( payloadId, insertionTime ) ); - buffer.addWhereCondition( sourceAccount ); - buffer.addWhereCondition( sourceToken ); - updateTable( m_schema, tname, buffer ); - } - IOVSchema::IOVSchema( coral::ISchema& schema ): m_tagTable( schema ), m_iovTable( schema ), - m_payloadTable( schema ), - m_tagMigrationTable( schema ), - m_payloadMigrationTable( schema ){ + m_tagLogTable( schema ), + m_payloadTable( schema ){ } bool IOVSchema::exists(){ @@ -484,6 +422,7 @@ namespace cond { m_tagTable.create(); m_payloadTable.create(); m_iovTable.create(); + m_tagLogTable.create(); created = true; } return created; @@ -497,21 +436,14 @@ namespace cond { return m_iovTable; } + ITagLogTable& IOVSchema::tagLogTable(){ + return m_tagLogTable; + } + IPayloadTable& IOVSchema::payloadTable(){ return m_payloadTable; } - ITagMigrationTable& IOVSchema::tagMigrationTable(){ - return m_tagMigrationTable; - } - - IPayloadMigrationTable& IOVSchema::payloadMigrationTable(){ - return m_payloadMigrationTable; - } - - std::string IOVSchema::parsePoolToken( const std::string& ){ - throwException("CondDB V2 can't parse a pool token.","IOVSchema::parsePoolToken"); - } } } diff --git a/CondCore/CondDB/src/IOVSchema.h b/CondCore/CondDB/src/IOVSchema.h index 6a450e83e2f78..7bc435726a46d 100644 --- a/CondCore/CondDB/src/IOVSchema.h +++ b/CondCore/CondDB/src/IOVSchema.h @@ -10,17 +10,17 @@ namespace cond { namespace persistency { - table( TAG ) { + conddb_table( TAG ) { - column( NAME, std::string ); - column( TIME_TYPE, cond::TimeType ); - column( OBJECT_TYPE, std::string ); - column( SYNCHRONIZATION, cond::SynchronizationType ); - column( END_OF_VALIDITY, cond::Time_t ); - column( DESCRIPTION, std::string ); - column( LAST_VALIDATED_TIME, cond::Time_t ); - column( INSERTION_TIME, boost::posix_time::ptime ); - column( MODIFICATION_TIME, boost::posix_time::ptime ); + conddb_column( NAME, std::string ); + conddb_column( TIME_TYPE, cond::TimeType ); + conddb_column( OBJECT_TYPE, std::string ); + conddb_column( SYNCHRONIZATION, cond::SynchronizationType ); + conddb_column( END_OF_VALIDITY, cond::Time_t ); + conddb_column( DESCRIPTION, std::string ); + conddb_column( LAST_VALIDATED_TIME, cond::Time_t ); + conddb_column( INSERTION_TIME, boost::posix_time::ptime ); + conddb_column( MODIFICATION_TIME, boost::posix_time::ptime ); class Table : public ITagTable { public: @@ -45,16 +45,16 @@ namespace cond { }; } - table ( PAYLOAD ) { + conddb_table ( PAYLOAD ) { static constexpr unsigned int PAYLOAD_HASH_SIZE = 40; - column( HASH, std::string, PAYLOAD_HASH_SIZE ); - column( OBJECT_TYPE, std::string ); - column( DATA, cond::Binary ); - column( STREAMER_INFO, cond::Binary ); - column( VERSION, std::string ); - column( INSERTION_TIME, boost::posix_time::ptime ); + conddb_column( HASH, std::string, PAYLOAD_HASH_SIZE ); + conddb_column( OBJECT_TYPE, std::string ); + conddb_column( DATA, cond::Binary ); + conddb_column( STREAMER_INFO, cond::Binary ); + conddb_column( VERSION, std::string ); + conddb_column( INSERTION_TIME, boost::posix_time::ptime ); class Table : public IPayloadTable { public: @@ -76,12 +76,12 @@ namespace cond { }; } - table( IOV ) { + conddb_table( IOV ) { - column( TAG_NAME, std::string ); - column( SINCE, cond::Time_t ); - column( PAYLOAD_HASH, std::string, PAYLOAD::PAYLOAD_HASH_SIZE ); - column( INSERTION_TIME, boost::posix_time::ptime ); + conddb_column( TAG_NAME, std::string ); + conddb_column( SINCE, cond::Time_t ); + conddb_column( PAYLOAD_HASH, std::string, PAYLOAD::PAYLOAD_HASH_SIZE ); + conddb_column( INSERTION_TIME, boost::posix_time::ptime ); struct SINCE_GROUP { typedef cond::Time_t type; @@ -135,53 +135,28 @@ namespace cond { }; } - // temporary... to be removed after the changeover. - table( TAG_MIGRATION ) { - - column( SOURCE_ACCOUNT, std::string ); - column( SOURCE_TAG, std::string ); - column( TAG_NAME, std::string ); - column( STATUS_CODE, int ); - column( INSERTION_TIME, boost::posix_time::ptime ); - - class Table : public ITagMigrationTable { - public: - explicit Table( coral::ISchema& schema ); - virtual ~Table(){} - bool exists(); - void create(); - bool select( const std::string& sourceAccount, const std::string& sourceTag, std::string& tagName, int& statusCode); - void insert( const std::string& sourceAccount, const std::string& sourceTag, const std::string& tagName, - int statusCode, const boost::posix_time::ptime& insertionTime); - void updateValidationCode( const std::string& sourceAccount, const std::string& sourceTag, int statusCode ); - private: - coral::ISchema& m_schema; - }; - } + conddb_table( TAG_LOG ) { - // temporary... to be removed after the changeover. - table( PAYLOAD_MIGRATION ) { - - column( SOURCE_ACCOUNT, std::string ); - column( SOURCE_TOKEN, std::string ); - column( PAYLOAD_HASH, std::string, PAYLOAD::PAYLOAD_HASH_SIZE ); - column( INSERTION_TIME, boost::posix_time::ptime ); - - class Table : public IPayloadMigrationTable { + conddb_column( TAG_NAME, std::string ); + conddb_column( EVENT_TIME, boost::posix_time::ptime ); + conddb_column( USER_NAME, std::string ); + conddb_column( HOST_NAME, std::string ); + conddb_column( COMMAND, std::string ); + conddb_column( ACTION, std::string ); + conddb_column( USER_TEXT, std::string ); + + class Table : public ITagLogTable { public: explicit Table( coral::ISchema& schema ); virtual ~Table(){} bool exists(); - void create(); - bool select( const std::string& sourceAccount, const std::string& sourceToken, std::string& payloadId ); - void insert( const std::string& sourceAccount, const std::string& sourceToken, const std::string& payloadId, - const boost::posix_time::ptime& insertionTime); - void update( const std::string& sourceAccount, const std::string& sourceToken, const std::string& payloadId, - const boost::posix_time::ptime& insertionTime); + void create(); + void insert( const std::string& tag, const boost::posix_time::ptime& eventTime, const std::string& userName, const std::string& hostName, + const std::string& command, const std::string& action, const std::string& userText ); private: coral::ISchema& m_schema; }; - } + } class IOVSchema : public IIOVSchema { public: @@ -191,16 +166,13 @@ namespace cond { bool create(); ITagTable& tagTable(); IIOVTable& iovTable(); + ITagLogTable& tagLogTable(); IPayloadTable& payloadTable(); - ITagMigrationTable& tagMigrationTable(); - IPayloadMigrationTable& payloadMigrationTable(); - std::string parsePoolToken( const std::string& ); private: TAG::Table m_tagTable; IOV::Table m_iovTable; + TAG_LOG::Table m_tagLogTable; PAYLOAD::Table m_payloadTable; - TAG_MIGRATION::Table m_tagMigrationTable; - PAYLOAD_MIGRATION::Table m_payloadMigrationTable; }; } } diff --git a/CondCore/DBOutputService/src/PoolDBOutputService.cc b/CondCore/DBOutputService/src/PoolDBOutputService.cc index b89a852221438..6e35b4e4494f7 100644 --- a/CondCore/DBOutputService/src/PoolDBOutputService.cc +++ b/CondCore/DBOutputService/src/PoolDBOutputService.cc @@ -203,7 +203,8 @@ cond::service::PoolDBOutputService::createNewIOV( const std::string& firstPayloa cond::persistency::IOVEditor editor = m_session.createIov( payloadType, myrecord.m_tag, myrecord.m_timetype, cond::SYNCH_ANY ); editor.setDescription( "New Tag" ); editor.insert( firstSinceTime, firstPayloadId ); - editor.flush(); + cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); + editor.flush( a.usertext ); myrecord.m_isNewTag=false; }catch(const std::exception& er){ cond::throwException(std::string(er.what()) + " from PoolDBOutputService::createNewIOV ", @@ -232,7 +233,8 @@ cond::service::PoolDBOutputService::createNewIOV( const std::string& firstPayloa editor.setDescription( "New Tag" ); payloadType = editor.payloadType(); editor.insert( firstSinceTime, firstPayloadId ); - editor.flush(); + cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); + editor.flush( a.usertext ); myrecord.m_isNewTag=false; }catch(const std::exception& er){ cond::throwException(std::string(er.what()) + " from PoolDBOutputService::createNewIOV ", @@ -258,7 +260,8 @@ cond::service::PoolDBOutputService::appendSinceTime( const std::string& payloadI cond::persistency::IOVEditor editor = m_session.editIov( myrecord.m_tag ); payloadType = editor.payloadType(); editor.insert( time, payloadId ); - editor.flush(); + cond::UserLogInfo a=this->lookUpUserLogInfo(recordName); + editor.flush( a.usertext ); }catch(const std::exception& er){ cond::throwException(std::string(er.what()), @@ -306,7 +309,7 @@ cond::service::PoolDBOutputService::closeIOV(Time_t lastTill, const std::string& } cond::persistency::IOVEditor editor = m_session.editIov( myrecord.m_tag ); editor.setEndOfValidity( lastTill ); - editor.flush(); + editor.flush("Tag closed."); scope.close(); } From cf4a95d3261a32d6ce22cbb52dec083bd18ff228 Mon Sep 17 00:00:00 2001 From: Salvatore Di Guida Date: Tue, 12 Jan 2016 15:28:40 +0100 Subject: [PATCH 186/250] Added security option in Frontier connections. When the signature parameter is set to sig, FroNTier requests that the server sends digital signatures on every response. Add frontier security option as a string data member in ConnectionPool, and define appropriate setter. The frontier security option is turned on for all sessions using the same ConnectionPool for configuring the server access via CORAL. Add FroNTier security option in DBParameters PSet of CondDB setup. Put a default value for the authentication path in ConnectionPool. When setting connection parameters from a ParameterSet in ConnectionPool, if a parameter is not defined, keep the values already set in the data members (i.e. default if no other setters called, or the ones currently available). Removed duplicated code for setting table time to live parameters of Condition schema in ConnectionPool. Removed the unused dbFormat parameter in CondDB_cfi.py as we only support CondDBv2, and dropped unused CondDBboost_cfi. New unit test for ConnectionPool. Add a warning about unsupported connection strings. Conflicts: CondCore/CondDB/src/ConnectionPool.cc CondCore/CondDB/src/DbConnectionString.cc --- CondCore/CondDB/interface/ConnectionPool.h | 22 +-- CondCore/CondDB/python/CondDB_cfi.py | 2 +- CondCore/CondDB/python/CondDBboost_cfi.py | 12 -- CondCore/CondDB/src/ConnectionPool.cc | 110 +++++++------- CondCore/CondDB/src/DbConnectionString.cc | 116 +++++++------- CondCore/CondDB/src/DbConnectionString.h | 2 +- CondCore/CondDB/test/BuildFile.xml | 4 + CondCore/CondDB/test/testConnectionPool.cpp | 158 ++++++++++++++++++++ 8 files changed, 296 insertions(+), 130 deletions(-) delete mode 100644 CondCore/CondDB/python/CondDBboost_cfi.py create mode 100644 CondCore/CondDB/test/testConnectionPool.cpp diff --git a/CondCore/CondDB/interface/ConnectionPool.h b/CondCore/CondDB/interface/ConnectionPool.h index ceafb54a4cd08..93f91134045f7 100644 --- a/CondCore/CondDB/interface/ConnectionPool.h +++ b/CondCore/CondDB/interface/ConnectionPool.h @@ -36,29 +36,33 @@ namespace cond { void setMessageVerbosity( coral::MsgLevel level ); void setAuthenticationPath( const std::string& p ); void setAuthenticationSystem( int authSysCode ); + void setFrontierSecurity( const std::string& signature ); void setLogging( bool flag ); bool isLoggingEnabled() const; void setParameters( const edm::ParameterSet& connectionPset ); void configure(); - Session createSession( const std::string& connectionString, bool writeCapable=false ); + Session createSession( const std::string& connectionString, bool writeCapable = false ); Session createReadOnlySession( const std::string& connectionString, const std::string& transactionId ); - boost::shared_ptr createCoralSession( const std::string& connectionString, bool writeCapable=false ); + 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 ); + const std::string& transactionId, + bool writeCapable = false ); Session createSession( const std::string& connectionString, - const std::string& transactionId, - bool writeCapable=false ); - void configure( coral::IConnectionServiceConfiguration& coralConfig); + const std::string& transactionId, + bool writeCapable = false ); + void configure( coral::IConnectionServiceConfiguration& coralConfig ); private: - std::string m_authPath; + std::string m_authPath = std::string( "" ); int m_authSys = 0; coral::MsgLevel m_messageLevel = coral::Error; bool m_loggingEnabled = false; + //The frontier security option is turned on for all sessions + //usig this wrapper of the CORAL connection setup for configuring the server access + std::string m_frontierSecurity = std::string( "" ); // this one has to be moved! - cond::CoralServiceManager* m_pluginManager = 0; + cond::CoralServiceManager* m_pluginManager = nullptr; std::map m_dbTypes; }; } diff --git a/CondCore/CondDB/python/CondDB_cfi.py b/CondCore/CondDB/python/CondDB_cfi.py index 5a3927e1b91f2..3c4969ba1988a 100644 --- a/CondCore/CondDB/python/CondDB_cfi.py +++ b/CondCore/CondDB/python/CondDB_cfi.py @@ -4,9 +4,9 @@ DBParameters = cms.PSet( authenticationPath = cms.untracked.string(''), authenticationSystem = cms.untracked.int32(0), + security = cms.untracked.string(''), messageLevel = cms.untracked.int32(0), ), connect = cms.string(''), - dbFormat = cms.untracked.int32(0) ) diff --git a/CondCore/CondDB/python/CondDBboost_cfi.py b/CondCore/CondDB/python/CondDBboost_cfi.py deleted file mode 100644 index 4bdd412977015..0000000000000 --- a/CondCore/CondDB/python/CondDBboost_cfi.py +++ /dev/null @@ -1,12 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -CondDBboost = cms.PSet( - DBParameters = cms.PSet( - authenticationPath = cms.untracked.string(''), - authenticationSystem = cms.untracked.int32(0), - messageLevel = cms.untracked.int32(0), - ), - connect = cms.string('protocol://db/schema'), ##db/schema" - dbFormat = cms.untracked.int32(1) -) - diff --git a/CondCore/CondDB/src/ConnectionPool.cc b/CondCore/CondDB/src/ConnectionPool.cc index 3e65f8bd789c2..cc97b9a28164c 100644 --- a/CondCore/CondDB/src/ConnectionPool.cc +++ b/CondCore/CondDB/src/ConnectionPool.cc @@ -39,46 +39,53 @@ namespace cond { m_authSys = authSysCode; } + void ConnectionPool::setFrontierSecurity( const std::string& signature ){ + m_frontierSecurity = signature; + } + void ConnectionPool::setLogging( bool flag ){ m_loggingEnabled = flag; } void ConnectionPool::setParameters( const edm::ParameterSet& connectionPset ){ - setAuthenticationPath( connectionPset.getUntrackedParameter("authenticationPath","") ); - setAuthenticationSystem( connectionPset.getUntrackedParameter("authenticationSystem",0) ); - int messageLevel = connectionPset.getUntrackedParameter("messageLevel",0); - coral::MsgLevel level = coral::Error; + //set the connection parameters from a ParameterSet + //if a parameter is not defined, keep the values already set in the data members + //(i.e. default if no other setters called, or the ones currently available) + setAuthenticationPath( connectionPset.getUntrackedParameter( "authenticationPath", m_authPath ) ); + setAuthenticationSystem( connectionPset.getUntrackedParameter( "authenticationSystem", m_authSys ) ); + setFrontierSecurity( connectionPset.getUntrackedParameter( "security", m_frontierSecurity ) ); + int messageLevel = connectionPset.getUntrackedParameter( "messageLevel", 0 ); //0 corresponds to Error level, current default + coral::MsgLevel level = m_messageLevel; switch (messageLevel) { - case 0 : - level = coral::Error; - break; + case 0: + level = coral::Error; + break; case 1: - level = coral::Warning; - break; + level = coral::Warning; + break; case 2: - level = coral::Info; - break; + level = coral::Info; + break; case 3: - level = coral::Debug; - break; + level = coral::Debug; + break; default: - level = coral::Error; + level = coral::Error; } - setMessageVerbosity(level); - setLogging( connectionPset.getUntrackedParameter("logging",false) ); + setMessageVerbosity( level ); + setLogging( connectionPset.getUntrackedParameter( "logging", m_loggingEnabled ) ); } bool ConnectionPool::isLoggingEnabled() const { return m_loggingEnabled; } - void ConnectionPool::configure( coral::IConnectionServiceConfiguration& coralConfig){ - + void ConnectionPool::configure( coral::IConnectionServiceConfiguration& coralConfig ){ coralConfig.disablePoolAutomaticCleanUp(); coralConfig.disableConnectionSharing(); // message streaming coral::MessageStream::setMsgVerbosity( m_messageLevel ); - std::string authServiceName("CORAL/Services/EnvironmentAuthenticationService"); + std::string authServiceName( "CORAL/Services/EnvironmentAuthenticationService" ); std::string authPath = m_authPath; // authentication if( authPath.empty() ){ @@ -92,26 +99,26 @@ namespace cond { // first attempt, look at the env... const char* authSysEnv = ::getenv( cond::auth::COND_AUTH_SYS ); if( authSysEnv ){ - authSys = ::atoi( authSysEnv ); + authSys = ::atoi( authSysEnv ); } if( authSys !=CondDbKey && authSys != CoralXMLFile ){ - // take the default - authSys = CondDbKey; + // take the default + authSys = CondDbKey; } - std::string servName(""); + std::string servName( "" ); if( authSys == CondDbKey ){ - if( authPath.empty() ){ - const char* authEnv = ::getenv("HOME"); - if(authEnv){ - authPath += authEnv; - } - } - servName = "COND/Services/RelationalAuthenticationService"; + if( authPath.empty() ){ + const char* authEnv = ::getenv( "HOME" ); + if(authEnv) { + authPath += authEnv; + } + } + servName = "COND/Services/RelationalAuthenticationService"; } else if( authSys == CoralXMLFile ){ - if( authPath.empty() ){ - authPath = "."; - } - servName = "COND/Services/XMLAuthenticationService"; + if( authPath.empty() ){ + authPath = "."; + } + servName = "COND/Services/XMLAuthenticationService"; } if( !authPath.empty() ){ authServiceName = servName; @@ -128,36 +135,27 @@ namespace cond { } boost::shared_ptr ConnectionPool::createCoralSession( const std::string& connectionString, - const std::string& transactionId, - bool writeCapable ){ + const std::string& transactionId, + bool writeCapable ){ coral::ConnectionService connServ; - std::pair fullConnectionPars = getConnectionParams( connectionString, transactionId ); + //all sessions opened with this connection service will share the same frontier security option. + std::pair fullConnectionPars = getConnectionParams( connectionString, transactionId, m_frontierSecurity ); if( !fullConnectionPars.second.empty() ) { - // 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 ); + //all sessions opened with this connection service will share the same TTL settings for TAG, IOV, and PAYLOAD tables. + 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 ) ); + 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 ){ - coral::ConnectionService connServ; - std::pair fullConnectionPars = getConnectionParams( connectionString, transactionId ); - if( !fullConnectionPars.second.empty() ) { - // 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 ); - } - + const std::string& transactionId, + bool writeCapable ){ boost::shared_ptr coralSession = createCoralSession( connectionString, transactionId, writeCapable ); - std::shared_ptr impl( new SessionImpl( coralSession, connectionString ) ); return Session( impl ); } @@ -171,7 +169,7 @@ namespace cond { } boost::shared_ptr ConnectionPool::createCoralSession( const std::string& connectionString, - bool writeCapable ){ + bool writeCapable ){ return createCoralSession( connectionString, "", writeCapable ); } diff --git a/CondCore/CondDB/src/DbConnectionString.cc b/CondCore/CondDB/src/DbConnectionString.cc index 71b663fd2198f..14ac4f4751e00 100644 --- a/CondCore/CondDB/src/DbConnectionString.cc +++ b/CondCore/CondDB/src/DbConnectionString.cc @@ -10,70 +10,84 @@ namespace cond { namespace persistency { - - unsigned int - countslash(const std::string& input) { - unsigned int count=0; + unsigned int countslash( const std::string& input ) { + unsigned int count = 0; std::string::size_type slashpos( 0 ); - while( slashpos!=std::string::npos){ - slashpos = input.find('/', slashpos ); - if ( slashpos != std::string::npos ){ - ++count; - // start next search after this word - slashpos += 1; - } + while( slashpos != std::string::npos ) { + slashpos = input.find('/', slashpos ); + if( slashpos != std::string::npos ) { + ++count; + // start next search after this word + slashpos += 1; + } } return count; } - std::string parseFipConnectionString(const std::string& fipConnect){ - std::string connect("sqlite_file:"); - std::string::size_type pos=fipConnect.find(':'); - std::string fipLocation=fipConnect.substr(pos+1); - edm::FileInPath fip(fipLocation); + std::string parseFipConnectionString( const std::string& fipConnect ){ + std::string connect( "sqlite_file:" ); + std::string::size_type pos = fipConnect.find( ':' ); + std::string fipLocation = fipConnect.substr( pos+1 ); + edm::FileInPath fip( fipLocation ); connect.append( fip.fullPath() ); return connect; } + //FIXME: sdg this function does not support frontier connections strings like + //frontier://cmsfrontier.cern.ch:8000/FrontierPrep/CMS_CONDITIONS + //as http://cmsfrontier.cern.ch:8000/FrontierPrep(freshkey=foo) is an invalid URI. std::pair getConnectionParams( const std::string& connectionString, - const std::string& transactionId ){ - if( connectionString.empty() ) cond::throwException( "The connection string is empty.","getConnectionParams"); + const std::string& transactionId, + const std::string& signature ) { + if( connectionString.empty() ) cond::throwException( "The connection string is empty.", "getConnectionParams" ); std::string protocol = getConnectionProtocol( connectionString ); std::string finalConn = connectionString; - std::string refreshConn(""); - if( protocol == "frontier" ){ - std::string protocol("frontier://"); - std::string::size_type fpos=connectionString.find(protocol); - unsigned int nslash=countslash(connectionString.substr(protocol.size(),connectionString.size()-fpos)); - if(nslash==1){ - edm::Service localconfservice; - if( !localconfservice.isAvailable() ){ - cond::throwException("edm::SiteLocalConfigService is not available","getConnectionParams"); - } - finalConn=localconfservice->lookupCalibConnect(connectionString); - } - if (!transactionId.empty()) { - size_t l = finalConn.rfind('/'); - finalConn.insert(l,"(freshkey="+transactionId+')'); - } + std::string refreshConn( "" ); + if( protocol == "frontier" ) { + std::string protocol( "frontier://" ); + std::string::size_type fpos = connectionString.find( protocol ); + unsigned int nslash = countslash( connectionString.substr( protocol.size(), connectionString.size() - fpos ) ); + if( nslash==1 ) { + edm::Service localconfservice; + if( !localconfservice.isAvailable() ) { + cond::throwException( "edm::SiteLocalConfigService is not available", "getConnectionParams" ); + } + finalConn = localconfservice->lookupCalibConnect( connectionString ); + } + if( !transactionId.empty() ) { + size_t l = finalConn.rfind('/'); + finalConn.insert( l, "(freshkey="+transactionId+')' ); + } + + //When the signature parameter is set to sig, FroNTier requests that the server sends digital signatures on every response. + //We test here that the signature string, if defined, is actually set to sig, otherwise we throw an exception + std::string signatureParameter( "sig" ); + if( !signature.empty() ) { + if( signature.compare( signatureParameter ) == 0 ) { + std::string::size_type s = finalConn.rfind('/'); + finalConn.insert( s, "(security="+signature+')' ); + } else { + cond::throwException( "The FroNTier security option is invalid.", "getConnectionParams" ); + } + } - std::string::size_type startRefresh = finalConn.find("://"); - if (startRefresh != std::string::npos){ - startRefresh += 3; - } - std::string::size_type endRefresh=finalConn.rfind("/", std::string::npos); - if (endRefresh == std::string::npos){ - refreshConn = finalConn; - } else{ - refreshConn = finalConn.substr(startRefresh, endRefresh-startRefresh); - if(refreshConn.substr(0,1) != "("){ - //if the connect string is not a complicated parenthesized string, - // an http:// needs to be at the beginning of it - refreshConn.insert(0, "http://"); - } - } - } else if ( protocol == "sqlite_fip" ){ - finalConn = parseFipConnectionString( connectionString ); + std::string::size_type startRefresh = finalConn.find( "://" ); + if( startRefresh != std::string::npos ) { + startRefresh += 3; + } + std::string::size_type endRefresh=finalConn.rfind( "/", std::string::npos ); + if( endRefresh == std::string::npos ) { + refreshConn = finalConn; + } else { + refreshConn = finalConn.substr( startRefresh, endRefresh - startRefresh ); + if( refreshConn.substr( 0, 1 ) != "(" ) { + //if the connect string is not a complicated parenthesized string, + // an http:// needs to be at the beginning of it + refreshConn.insert( 0, "http://" ); + } + } + } else if( protocol == "sqlite_fip" ) { + finalConn = parseFipConnectionString( connectionString ); } return std::make_pair( finalConn, refreshConn ); } diff --git a/CondCore/CondDB/src/DbConnectionString.h b/CondCore/CondDB/src/DbConnectionString.h index 6c28219286c75..cbdbbb0a4b474 100644 --- a/CondCore/CondDB/src/DbConnectionString.h +++ b/CondCore/CondDB/src/DbConnectionString.h @@ -9,7 +9,7 @@ namespace cond { namespace persistency { - std::pair getConnectionParams( const std::string& initialConnection, const std::string& transId ); + std::pair getConnectionParams( const std::string& initialConnection, const std::string& transId, const std::string& signature ); } diff --git a/CondCore/CondDB/test/BuildFile.xml b/CondCore/CondDB/test/BuildFile.xml index c0feaaadcf3e3..1f3f65cd247cb 100644 --- a/CondCore/CondDB/test/BuildFile.xml +++ b/CondCore/CondDB/test/BuildFile.xml @@ -28,3 +28,7 @@ + + + + diff --git a/CondCore/CondDB/test/testConnectionPool.cpp b/CondCore/CondDB/test/testConnectionPool.cpp new file mode 100644 index 0000000000000..8455d9382cd8a --- /dev/null +++ b/CondCore/CondDB/test/testConnectionPool.cpp @@ -0,0 +1,158 @@ +//Framework includes +#include "FWCore/PluginManager/interface/PluginManager.h" +#include "FWCore/PluginManager/interface/standard.h" +#include "FWCore/PluginManager/interface/SharedLibrary.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ServiceRegistry/interface/ServiceRegistry.h" +//Module includes +#include "CondCore/CondDB/interface/ConnectionPool.h" +#include "CondCore/CondDB/interface/PayloadProxy.h" +//Entity class +#include "CondFormats/RunInfo/interface/RunInfo.h" +//CORAL includes +#include "RelationalAccess/ISessionProxy.h" +#include "RelationalAccess/ISchema.h" +#include "RelationalAccess/ITransaction.h" +#include "RelationalAccess/ITable.h" +#include "RelationalAccess/IColumn.h" +#include "RelationalAccess/IQuery.h" +#include "RelationalAccess/ICursor.h" +#include "CoralBase/AttributeSpecification.h" +#include "CoralBase/AttributeList.h" +#include "CoralBase/Attribute.h" +//BOOST includes +#include +// +#include +#include +#include +#include + +void testCreateCoralSession( cond::persistency::ConnectionPool & connPool, std::string const & connectionString, bool const writeCapable ) { + boost::shared_ptr session = connPool.createCoralSession( connectionString, writeCapable ); + session->transaction().start( true ); + coral::ISchema& schema = session->nominalSchema(); + std::string tagTable( "TAG" ); + std::string iovTable( "IOV" ); + std::string payloadTable( "PAYLOAD" ); + std::string tag( "RunInfo_v1_mc" ); + std::string object( "RunInfo" ); + std::string hash( "cfd8987f899e99de69626e8a91b5c6b1506b82de" ); + std::unique_ptr query( schema.tableHandle( tagTable ).newQuery() ); + query->addToOutputList( "OBJECT_TYPE" ); + query->defineOutputType( "OBJECT_TYPE", "string" ); + std::string tagWhereClause( "NAME=:tag" ); + coral::AttributeList tagBindVariableList; + tagBindVariableList.extend( "tag", typeid(std::string) ); + tagBindVariableList[ "tag" ].data() = tag; + query->setCondition( tagWhereClause, tagBindVariableList ); + coral::ICursor& tagCursor = query->execute(); + while( tagCursor.next() ) { + tagCursor.currentRow().toOutputStream( std::cout ) << std::endl; + } + query.reset( schema.tableHandle( iovTable ).newQuery() ); + query->addToOutputList( "SINCE" ); + query->defineOutputType( "SINCE", "unsigned long long" ); + std::string iovWhereClause( "TAG_NAME=:tag" ); + coral::AttributeList iovBindVariableList; + iovBindVariableList.extend( "tag", typeid(std::string) ); + iovBindVariableList[ "tag" ].data() = tag; + query->setCondition( iovWhereClause, iovBindVariableList ); + coral::ICursor& iovCursor = query->execute(); + while( iovCursor.next() ) { + iovCursor.currentRow().toOutputStream( std::cout ) << std::endl; + } + query.reset( schema.tableHandle( payloadTable ).newQuery() ); + query->addToOutputList( "OBJECT_TYPE" ); + query->defineOutputType( "OBJECT_TYPE", "string" ); + std::string payloadWhereClause( "HASH=:hash" ); + coral::AttributeList payloadBindVariableList; + payloadBindVariableList.extend( "hash", typeid(std::string) ); + payloadBindVariableList[ "hash" ].data() = hash; + query->setCondition( payloadWhereClause, payloadBindVariableList ); + coral::ICursor& payloadCursor = query->execute(); + while( payloadCursor.next() ) { + payloadCursor.currentRow().toOutputStream( std::cout ) << std::endl; + } + session->transaction().commit(); +} + +void testCreateSession( cond::persistency::ConnectionPool & connPool, std::string const & connectionString, bool const writeCapable ) { + cond::persistency::Session session = connPool.createSession( connectionString, writeCapable ); + cond::persistency::PayloadProxy pp; + pp.setUp( session ); + pp.loadTag( "RunInfo_v1_mc" ); + pp.setIntervalFor( 1, true ); + std::cout << "run number: " << pp().m_run << std::endl; +} + +void testCreateReadOnlySession( cond::persistency::ConnectionPool & connPool, std::string const & connectionString, std::string const & transactionId ) { + cond::persistency::Session session = connPool.createReadOnlySession( connectionString, transactionId ); + session.transaction().start(); + cond::persistency::IOVProxy iov = session.readIov( "RunInfo_v1_mc", true ); + std::cout << "Loaded size="<( currentIov.payloadId )->m_run << std::endl; + session.transaction().commit(); +} + +int main (int argc, char** argv) { + edmplugin::PluginManager::Config config; + edmplugin::PluginManager::configure( edmplugin::standard::config() ); + + std::vector psets; + edm::ParameterSet pSet; + pSet.addParameter( "@service_type", std::string( "SiteLocalConfigService" ) ); + psets.push_back( pSet ); + static const edm::ServiceToken services( edm::ServiceRegistry::createSet( psets ) ); + static const edm::ServiceRegistry::Operate operate( services ); + + std::array connectionStrings{ { "frontier://FrontierPrep/CMS_CONDITIONS", + "frontier://(proxyconfigurl=http://cmst0frontier.cern.ch/t0.pac)(backupproxyurl=http://cmst0frontier.cern.ch:3128)(backupproxyurl=http://cmst0frontier1.cern.ch:3128)(backupproxyurl=http://cmst0frontier2.cern.ch:3128)(backupproxyurl=http://cmsbpfrontier.cern.ch:3128)(backupproxyurl=http://cmsbpfrontier1.cern.ch:3128)(backupproxyurl=http://cmsbpfrontier2.cern.ch:3128)(backupproxyurl=http://cmsbproxy.fnal.gov:3128)(serverurl=http://cmsfrontier.cern.ch:8000/FrontierPrep)(serverurl=http://cmsfrontier1.cern.ch:8000/FrontierPrep)(serverurl=http://cmsfrontier2.cern.ch:8000/FrontierPrep)(serverurl=http://cmsfrontier3.cern.ch:8000/FrontierPrep)(serverurl=http://cmsfrontier4.cern.ch:8000/FrontierPrep)/CMS_CONDITIONS" + } + }; + try { + //************* + for( const auto& connectionString : connectionStrings ) { + std::cout << "# Connecting with db in '" << connectionString << "'" << std::endl; + cond::persistency::ConnectionPool connPool; + //connPool.setMessageVerbosity( coral::Debug ); + //connPool.configure(); + try { + connPool.createCoralSession( connectionString, true ); + } catch( const std::exception& e ) { + std::cout << "EXPECTED EXCEPTION: " << e.what() << std::endl; + } + testCreateCoralSession( connPool, connectionString, false ); + testCreateSession( connPool, connectionString, false ); + testCreateReadOnlySession( connPool, connectionString, "" ); + testCreateReadOnlySession( connPool, connectionString, "testConnectionPool" ); + connPool.setFrontierSecurity( "foo" ); + connPool.configure(); + try { + connPool.createCoralSession( connectionString, false ); + } catch( const cms::Exception& e ) { + std::cout << "EXPECTED EXCEPTION: " << e.what() << std::endl; + } + edm::ParameterSet dbParameters; + dbParameters.addUntrackedParameter( "authenticationPath", std::string( "" ) ); + dbParameters.addUntrackedParameter( "authenticationSystem", 0 ); + dbParameters.addUntrackedParameter( "messageLevel", 3 ); + dbParameters.addUntrackedParameter( "security", std::string( "sig" ) ); + dbParameters.addUntrackedParameter( "logging", false ); + connPool.setParameters( dbParameters ); + connPool.configure(); + testCreateCoralSession( connPool, connectionString, false ); + testCreateSession( connPool, connectionString, false ); + testCreateReadOnlySession( connPool, connectionString, "" ); + testCreateReadOnlySession( connPool, connectionString, "testConnectionPool" ); + } + } catch (const std::exception& e){ + std::cout << "ERROR: " << e.what() << std::endl; + return -1; + } catch (...){ + std::cout << "UNEXPECTED FAILURE." << std::endl; + return -1; + } +} + From fc4cbe8e664aa2ac190a8b68e584da62176b27e6 Mon Sep 17 00:00:00 2001 From: Salvatore Di Guida Date: Thu, 14 Jan 2016 11:17:14 +0100 Subject: [PATCH 187/250] Cleanup: use CondDB ParameterSet defined for CondDBv2 instead of CondDBSetup for CondDBv1. --- .../python/FrontierConditions_GlobalTag_cfi.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py b/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py index 83f8d25b76f69..48c2db1ba5174 100644 --- a/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py +++ b/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py @@ -1,12 +1,12 @@ import FWCore.ParameterSet.Config as cms -from CondCore.DBCommon.CondDBSetup_cfi import * +from CondCore.CondDB.CondDB_cfi import * +CondDB_prod = CondDB.clone( connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) print '# Conditions read from CMS_CONDITIONS via FrontierProd ' GlobalTag = cms.ESSource("PoolDBESSource", - CondDBSetup, - connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS'), + CondDB_prod, globaltag = cms.string('UNSPECIFIED'), toGet = cms.VPSet( ), # hook to override or add single payloads ) From b12daa598d01e5b257c1cdffd308bee3fccbd733 Mon Sep 17 00:00:00 2001 From: Salvatore Di Guida Date: Fri, 15 Jan 2016 12:50:22 +0100 Subject: [PATCH 188/250] Final clean up: * Added RelationalAuthenticationService and XMLAuthenticationService plugins in CondCore/CondDB * Use the newly defined auth namespace in CondDB * Add missing dependencies in plugins BuildFile of CondDB * Fix for one DBCommon left over * Fix for non-required dependencies --- CondCore/CondDB/plugins/BuildFile.xml | 16 ++ .../RelationalAuthenticationService.cc | 8 +- .../plugins/RelationalAuthenticationService.h | 2 +- .../plugins/XMLAuthenticationService.cc | 11 +- CondCore/CondDB/test/testTempWrapper_1.cpp | 174 ------------------ .../test/HcalRecNumberingTester.cc | 1 - .../test/HcalSimNumberingTester.cc | 1 - 7 files changed, 26 insertions(+), 187 deletions(-) delete mode 100644 CondCore/CondDB/test/testTempWrapper_1.cpp diff --git a/CondCore/CondDB/plugins/BuildFile.xml b/CondCore/CondDB/plugins/BuildFile.xml index 2157cae5cff01..167e5207929c2 100644 --- a/CondCore/CondDB/plugins/BuildFile.xml +++ b/CondCore/CondDB/plugins/BuildFile.xml @@ -2,4 +2,20 @@ + + + + + + + + + + + + + + + + diff --git a/CondCore/CondDB/plugins/RelationalAuthenticationService.cc b/CondCore/CondDB/plugins/RelationalAuthenticationService.cc index 81bdaff3bad92..d737b00bf87ef 100644 --- a/CondCore/CondDB/plugins/RelationalAuthenticationService.cc +++ b/CondCore/CondDB/plugins/RelationalAuthenticationService.cc @@ -1,8 +1,8 @@ -#include "CondCore/DBCommon/interface/Auth.h" -#include "CondCore/DBCommon/interface/Exception.h" +#include "CondCore/CondDB/interface/Auth.h" +#include "CondCore/CondDB/interface/Exception.h" #include "RelationalAccess/AuthenticationCredentials.h" #include "RelationalAccess/AuthenticationServiceException.h" -#include "CondCore/DBCommon/interface/CoralServiceMacros.h" +#include "CondCore/CondDB/interface/CoralServiceMacros.h" #include "RelationalAuthenticationService.h" // #include "RelationalAccess/AuthenticationServiceException.h" @@ -30,7 +30,7 @@ cond::RelationalAuthenticationService::RelationalAuthenticationService::Relation { boost::function1 cb(boost::bind(&cond::RelationalAuthenticationService::RelationalAuthenticationService::setAuthenticationPath, this, _1)); - coral::Property* pm = dynamic_cast(coral::Context::instance().PropertyManager().property(Auth::COND_AUTH_PATH_PROPERTY)); + coral::Property* pm = dynamic_cast(coral::Context::instance().PropertyManager().property(auth::COND_AUTH_PATH_PROPERTY)); if(pm){ setAuthenticationPath( pm->get() ); m_callbackID = pm->registerCallback(cb); diff --git a/CondCore/CondDB/plugins/RelationalAuthenticationService.h b/CondCore/CondDB/plugins/RelationalAuthenticationService.h index 7afbce0c484b5..4b5124e84f1d1 100644 --- a/CondCore/CondDB/plugins/RelationalAuthenticationService.h +++ b/CondCore/CondDB/plugins/RelationalAuthenticationService.h @@ -1,7 +1,7 @@ #ifndef COND_XMLAUTHENTITACTIONSERVICE_H #define COND_XMLAUTHENTITACTIONSERVICE_H -#include "CondCore/DBCommon/interface/CredentialStore.h" +#include "CondCore/CondDB/interface/CredentialStore.h" // #include "RelationalAccess/IAuthenticationService.h" #include "CoralKernel/Service.h" diff --git a/CondCore/CondDB/plugins/XMLAuthenticationService.cc b/CondCore/CondDB/plugins/XMLAuthenticationService.cc index 5e0984d999dca..f9dd34fb4dfe5 100644 --- a/CondCore/CondDB/plugins/XMLAuthenticationService.cc +++ b/CondCore/CondDB/plugins/XMLAuthenticationService.cc @@ -1,14 +1,13 @@ -//#include "CondCore/DBCommon/interface/DecodingKey.h" -#include "CondCore/DBCommon/interface/FileUtils.h" -#include "CondCore/DBCommon/interface/Exception.h" -#include "CondCore/DBCommon/interface/Auth.h" +#include "CondCore/CondDB/interface/FileUtils.h" +#include "CondCore/CondDB/interface/Exception.h" +#include "CondCore/CondDB/interface/Auth.h" #include "RelationalAccess/AuthenticationCredentials.h" #include "CoralCommon/Cipher.h" #include "RelationalAccess/AuthenticationServiceException.h" #include "CoralKernel/IPropertyManager.h" #include "CoralKernel/Property.h" #include "CoralKernel/Context.h" -#include "CondCore/DBCommon/interface/CoralServiceMacros.h" +#include "CondCore/CondDB/interface/CoralServiceMacros.h" #include "FWCore/Concurrency/interface/Xerces.h" #include "xercesc/parsers/XercesDOMParser.hpp" #include "xercesc/framework/MemBufInputSource.hpp" @@ -96,7 +95,7 @@ cond::XMLAuthenticationService::XMLAuthenticationService::XMLAuthenticationServi { boost::function1 cb(boost::bind(&cond::XMLAuthenticationService::XMLAuthenticationService::setAuthenticationPath, this, _1)); - coral::Property* pm = dynamic_cast(coral::Context::instance().PropertyManager().property(Auth::COND_AUTH_PATH_PROPERTY)); + coral::Property* pm = dynamic_cast(coral::Context::instance().PropertyManager().property(auth::COND_AUTH_PATH_PROPERTY)); if(pm){ setAuthenticationPath( pm->get() ); m_callbackID = pm->registerCallback(cb); diff --git a/CondCore/CondDB/test/testTempWrapper_1.cpp b/CondCore/CondDB/test/testTempWrapper_1.cpp deleted file mode 100644 index 1a12261d5e218..0000000000000 --- a/CondCore/CondDB/test/testTempWrapper_1.cpp +++ /dev/null @@ -1,174 +0,0 @@ -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/standard.h" -#include "FWCore/PluginManager/interface/SharedLibrary.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/ServiceRegistry/interface/ServiceRegistry.h" -// -#include "CondCore/CondDB/interface/CondDB.h" -#include "CondCore/MetaDataService/interface/MetaData.h" -#include "CondCore/DBCommon/interface/DbTransaction.h" -// -#include -#include -#include -#include - -using namespace cond::db; - -void dumpSince( cond::Time_t target, IOVProxy& data ){ - auto i = data.find( target ); - if( i == data.end() ) { - std::cout <<"No valid IOV for time="<( tag1, cond::runnumber, cond::OFFLINE ); - std::cout <<"Now the database "< { public: diff --git a/Geometry/HcalCommonData/test/HcalSimNumberingTester.cc b/Geometry/HcalCommonData/test/HcalSimNumberingTester.cc index 1aea844a97735..0764568eba030 100644 --- a/Geometry/HcalCommonData/test/HcalSimNumberingTester.cc +++ b/Geometry/HcalCommonData/test/HcalSimNumberingTester.cc @@ -38,7 +38,6 @@ #include "Geometry/Records/interface/HcalSimNumberingRecord.h" #include "Geometry/HcalCommonData/interface/HcalDDDSimConstants.h" -#include "CoralBase/Exception.h" class HcalSimNumberingTester : public edm::one::EDAnalyzer<> { public: From 9737ee2d4b722e61a02b7da2c3781f4eb8df42e5 Mon Sep 17 00:00:00 2001 From: Giacomo Govi Date: Thu, 28 Jan 2016 14:14:38 +0100 Subject: [PATCH 189/250] Backward compatibility fix: make CondCore/DBCommon/python/CondDBCommon_cfi.py and CondCore/DBCommon/python/CondDBSetup_cfi.py deprecated ( a message is printed out ) and point to CondCore/CondDB/python/CondDB_cfi.py. --- CondCore/DBCommon/python/CondDBCommon_cfi.py | 8 ++++++++ CondCore/DBCommon/python/CondDBSetup_cfi.py | 9 +++++++++ .../python/loadRecoTauTagMVAsFromPrepDB_cfi.py | 7 +++---- 3 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 CondCore/DBCommon/python/CondDBCommon_cfi.py create mode 100644 CondCore/DBCommon/python/CondDBSetup_cfi.py diff --git a/CondCore/DBCommon/python/CondDBCommon_cfi.py b/CondCore/DBCommon/python/CondDBCommon_cfi.py new file mode 100644 index 0000000000000..ce07672080bde --- /dev/null +++ b/CondCore/DBCommon/python/CondDBCommon_cfi.py @@ -0,0 +1,8 @@ +print " ################################################################### " +print " # WARNING: this module is deprecated. # " +print " # Please use CondCore.CondDB.CondDB_cfi.py # " +print " ################################################################### " + +from CondCore.CondDB.CondDB_cfi import * +CondDBCommon = CondDB.clone() + diff --git a/CondCore/DBCommon/python/CondDBSetup_cfi.py b/CondCore/DBCommon/python/CondDBSetup_cfi.py new file mode 100644 index 0000000000000..604f35b8a04af --- /dev/null +++ b/CondCore/DBCommon/python/CondDBSetup_cfi.py @@ -0,0 +1,9 @@ +print " ################################################################### " +print " # WARNING: this module is deprecated. # " +print " # Please use CondCore.CondDB.CondDB_cfi.py # " +print " ################################################################### " + +from CondCore.CondDB.CondDB_cfi import * +CondDBSetup = CondDB.clone() +CondDBSetup.__delattr__('connect') + diff --git a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py index 07074167ddf85..5cf9f053a8e4a 100644 --- a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py +++ b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py @@ -1,13 +1,12 @@ import socket '''Helper procedure that loads mva inputs from database''' -from CondCore.DBCommon.CondDBSetup_cfi import * +from CondCore.CondDB.CondDB_cfi import * +CondDB.connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') # prod database loadRecoTauTagMVAsFromPrepDB = cms.ESSource("PoolDBESSource", - CondDBSetup, + CondDB, DumpStat = cms.untracked.bool(False), toGet = cms.VPSet(), - # connect = cms.string("frontier://FrontierPrep/CMS_COND_PHYSICSTOOLS") # prep database - connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') # prod database ) From c77265e83c80d529f491651a982f11f5a478b19c Mon Sep 17 00:00:00 2001 From: Salvatore Di Guida Date: Thu, 28 Jan 2016 19:05:49 +0100 Subject: [PATCH 190/250] Define a unique configuration for CondDBESSource including FroNTier servlets for fetching Condition payloads in CondCore/ESSources/python/CondDBESSource_cfi.py. This is then loaded in Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py and cloned in RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py. --- .../ESSources/python/CondDBESSource_cfi.py | 20 +++++++++++++++ .../ESSources/python/PoolDBESSource_cfi.py | 25 ++++++++++--------- .../FrontierConditions_GlobalTag_cfi.py | 11 +------- .../loadRecoTauTagMVAsFromPrepDB_cfi.py | 10 +++----- 4 files changed, 37 insertions(+), 29 deletions(-) create mode 100644 CondCore/ESSources/python/CondDBESSource_cfi.py diff --git a/CondCore/ESSources/python/CondDBESSource_cfi.py b/CondCore/ESSources/python/CondDBESSource_cfi.py new file mode 100644 index 0000000000000..cb491530d6b25 --- /dev/null +++ b/CondCore/ESSources/python/CondDBESSource_cfi.py @@ -0,0 +1,20 @@ +#This is the default configuration for the connection to the frontier servlets +#in order to fetch the condition payloads in CMSSW. +import FWCore.ParameterSet.Config as cms +from CondCore.CondDB.CondDB_cfi import * + +CondDBConnection = CondDB.clone( connect = cms.string( 'frontier://FrontierProd/CMS_CONDITIONS' ) ) +print '# Conditions read from CMS_CONDITIONS via FrontierProd ' +GlobalTag = cms.ESSource( "PoolDBESSource", + CondDBConnection, + globaltag = cms.string( '' ), + snapshotTime = cms.string( '' ), + toGet = cms.VPSet(), # hook to override or add single payloads + DumpStat = cms.untracked.bool( False ), + ReconnectEachRun = cms.untracked.bool( False ), + RefreshAlways = cms.untracked.bool( False ), + RefreshEachRun = cms.untracked.bool( False ), + RefreshOpenIOVs = cms.untracked.bool( False ), + pfnPostfix = cms.untracked.string( '' ), + pfnPrefix = cms.untracked.string( '' ), + ) diff --git a/CondCore/ESSources/python/PoolDBESSource_cfi.py b/CondCore/ESSources/python/PoolDBESSource_cfi.py index 71e5948607321..10fd13830bfa6 100644 --- a/CondCore/ESSources/python/PoolDBESSource_cfi.py +++ b/CondCore/ESSources/python/PoolDBESSource_cfi.py @@ -1,15 +1,16 @@ import FWCore.ParameterSet.Config as cms - from CondCore.CondDB.CondDB_cfi import * -GlobalTag = cms.ESSource("PoolDBESSource", - CondDB, - globaltag = cms.string(''), - snapshotTime = cms.string(''), - RefreshAlways = cms.untracked.bool(False), - RefreshOpenIOVs = cms.untracked.bool(False), - RefreshEachRun = cms.untracked.bool(False), - ReconnectEachRun = cms.untracked.bool(False), - DumpStat=cms.untracked.bool(False), - toGet = cms.VPSet( ) # hook to override or add single payloads -) +GlobalTag = cms.ESSource( "PoolDBESSource", + CondDB, + globaltag = cms.string( '' ), + snapshotTime = cms.string( '' ), + toGet = cms.VPSet(), # hook to override or add single payloads + DumpStat = cms.untracked.bool( False ), + ReconnectEachRun = cms.untracked.bool( False ), + RefreshAlways = cms.untracked.bool( False ), + RefreshEachRun = cms.untracked.bool( False ), + RefreshOpenIOVs = cms.untracked.bool( False ), + pfnPostfix = cms.untracked.string( '' ), + pfnPrefix = cms.untracked.string( '' ), + ) diff --git a/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py b/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py index 48c2db1ba5174..64dd7bee46345 100644 --- a/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py +++ b/Configuration/StandardSequences/python/FrontierConditions_GlobalTag_cfi.py @@ -1,12 +1,3 @@ import FWCore.ParameterSet.Config as cms -from CondCore.CondDB.CondDB_cfi import * -CondDB_prod = CondDB.clone( connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') ) - -print '# Conditions read from CMS_CONDITIONS via FrontierProd ' - -GlobalTag = cms.ESSource("PoolDBESSource", - CondDB_prod, - globaltag = cms.string('UNSPECIFIED'), - toGet = cms.VPSet( ), # hook to override or add single payloads -) +from CondCore.ESSources.CondDBESSource_cfi import GlobalTag diff --git a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py index 5cf9f053a8e4a..3f0ae4553f066 100644 --- a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py +++ b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py @@ -1,14 +1,10 @@ import socket +import FWCore.ParameterSet.Config as cms '''Helper procedure that loads mva inputs from database''' -from CondCore.CondDB.CondDB_cfi import * -CondDB.connect = cms.string('frontier://FrontierProd/CMS_CONDITIONS') # prod database -loadRecoTauTagMVAsFromPrepDB = cms.ESSource("PoolDBESSource", - CondDB, - DumpStat = cms.untracked.bool(False), - toGet = cms.VPSet(), -) +from CondCore.ESSources.CondDBESSource_cfi import GlobalTag +loadRecoTauTagMVAsFromPrepDB = GlobalTag.clone() if socket.getfqdn().find('.cms') != -1: loadRecoTauTagMVAsFromPrepDB.connect = cms.string('frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)(failovertoserver=no)/CMS_CONDITIONS') From 119385e6e7dd5db65e33e344103169bccad0af59 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Fri, 29 Jan 2016 09:28:52 -0600 Subject: [PATCH 191/250] Refactor memory management protocol for QueryAttrHandler. All "real" state is kept in a sub-object; the QueryAttrHandler keeps a weak_ptr to the "real" state. While the main thread is waiting, it keeps a reference to the shared_ptr for the state, keeping the weak_ptr alive. If the timeout occurs, the shared_ptr is dropped and the weak_ptr cannot be locked. The QueryAttrHandler is always deleted by the callback if it is successfully registered. --- Utilities/XrdAdaptor/src/XrdSource.cc | 72 ++++++++++++++------------- 1 file changed, 37 insertions(+), 35 deletions(-) diff --git a/Utilities/XrdAdaptor/src/XrdSource.cc b/Utilities/XrdAdaptor/src/XrdSource.cc index 8b6b41fd268f8..86ccd27024f5f 100644 --- a/Utilities/XrdAdaptor/src/XrdSource.cc +++ b/Utilities/XrdAdaptor/src/XrdSource.cc @@ -84,44 +84,43 @@ class DelayedClose : boost::noncopyable, public XrdCl::ResponseHandler */ class QueryAttrHandler : public XrdCl::ResponseHandler { + friend std::unique_ptr std::make_unique(); + public: - virtual ~QueryAttrHandler = default; + virtual ~QueryAttrHandler() = default; QueryAttrHandler(const QueryAttrHandler&) = delete; QueryAttrHandler& operator=(const QueryAttrHandler&) = delete; static XrdCl::XRootDStatus query(XrdCl::FileSystem &fs, const std::string &attr, std::chrono::milliseconds timeout, std::string &result) { - std::shared_ptr handler(new QueryAttrHandler()); + auto handler = std::make_unique(); + auto l_state = std::make_shared(); + handler->m_state = l_state; XrdCl::Buffer arg(attr.size()); arg.FromString(attr); - // On error or exception thrown, drop the reference to ourself - std::unique_ptr> self_ref_guard(nullptr, [&](QueryAttrHandler*) {handler->m_self.reset();}); - handler->m_self = handler; - XrdCl::XRootDStatus st = fs.Query(XrdCl::QueryCode::Config, arg, handler.get()); if (!st.IsOK()) { return st; } - // Successfully registered the callback; keep the self-reference until the - // callback release it. - self_ref_guard.release(); + // Successfully registered the callback; it will always delete itself, so we shouldn't. + handler.release(); - std::unique_lock guard(handler->m_mutex); + std::unique_lock guard(l_state->m_mutex); // Wait until some status is available or a timeout. - handler->m_condvar.wait_for(guard, timeout, [&]{return handler->m_status.get();}); + l_state->m_condvar.wait_for(guard, timeout, [&]{return l_state->m_status.get();}); - if (handler->m_status) + if (l_state->m_status) { - if (handler->m_status->IsOK()) + if (l_state->m_status->IsOK()) { - result = handler->m_response->ToString(); + result = l_state->m_response->ToString(); } - return *(handler->m_status); + return *(l_state->m_status); } else { // We had a timeout; construct a reasonable message. @@ -140,19 +139,19 @@ class QueryAttrHandler : public XrdCl::ResponseHandler // NOTE: we own the status and response pointers. std::unique_ptr response_mgr; response_mgr.reset(response); - // On exit from this function, release the self-reference. Order matters! m_self reset must be done after - // condvar is notified. - std::unique_ptr> self_ref_guard(nullptr, [&](char *) {m_self.reset();}); + + // Lock our state information then dispose of our object. + auto l_state = m_state.lock(); + delete this; + if (!l_state) {return;} + // On function exit, notify any waiting threads. - std::unique_ptr> notify_guard(nullptr, [&](char *) {m_condvar.notify_all();}); + std::unique_ptr> notify_guard(nullptr, [&](char *) {l_state->m_condvar.notify_all();}); { - // m_mutex protects m_status - std::unique_lock guard(m_mutex); // On exit from the block, make sure m_status is set; it needs to be set before we notify threads. - std::unique_ptr> exit_guard(nullptr, [&](char *) {m_status.reset(new XrdCl::XRootDStatus(XrdCl::stError, XrdCl::errInternal));}); + std::unique_ptr> exit_guard(nullptr, [&](char *) {if (!l_state->m_status) l_state->m_status.reset(new XrdCl::XRootDStatus(XrdCl::stError, XrdCl::errInternal));}); if (!status) {return;} - m_status.reset(status); if (status->IsOK()) { if (!response) {return;} @@ -160,25 +159,28 @@ class QueryAttrHandler : public XrdCl::ResponseHandler response->Get(buf_ptr); // AnyObject::Set lacks specialization for nullptr response->Set(static_cast(nullptr)); - m_response.reset(buf_ptr); + l_state->m_response.reset(buf_ptr); } - exit_guard.release(); + l_state->m_status.reset(status); } } - // Self-reference; if we timed out waiting for the callback, we must keep the memory alive until - // the Xrootd framework invokes the callback. - std::shared_ptr m_self; + // Represents the current state of the callback. The parent class only manages a weak_ptr + // to the state. If the asynchronous callback cannot lock the weak_ptr, then it assumes the + // main thread has given up and doesn't touch any of the state variables. + struct QueryAttrState { - // Synchronize between the callback thread and the main thread; condvar predicate - // is having m_status set. m_mutex protects m_status. - std::mutex m_mutex; - std::condition_variable m_condvar; + // Synchronize between the callback thread and the main thread; condvar predicate + // is having m_status set. m_mutex protects m_status. + std::mutex m_mutex; + std::condition_variable m_condvar; - // Results from the server - std::unique_ptr m_status; - std::unique_ptr m_response; + // Results from the server + std::unique_ptr m_status; + std::unique_ptr m_response; + }; + std::weak_ptr m_state; }; From 2ef8f99d56099c444e1ef58b0007881b59c42865 Mon Sep 17 00:00:00 2001 From: Brian Bockelman Date: Fri, 29 Jan 2016 09:51:09 -0600 Subject: [PATCH 192/250] Correct lifetime of outstanding open-file request. Previously, the presence of a pointer in m_file indicated an open- file request was outstanding. However, after the file was opened, the unique_ptr was moved to the Source object (which does a synchronous network query in its constructor). Hence, it appeared there was no outstanding file-open and a second one could start. Now, we keep a separate boolean flag that is only set to false when the HandleResponse method exits. --- Utilities/XrdAdaptor/src/XrdRequestManager.cc | 11 ++++++++++- Utilities/XrdAdaptor/src/XrdRequestManager.h | 5 ++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Utilities/XrdAdaptor/src/XrdRequestManager.cc b/Utilities/XrdAdaptor/src/XrdRequestManager.cc index bbd5ee6dd7f76..831a0993264c0 100644 --- a/Utilities/XrdAdaptor/src/XrdRequestManager.cc +++ b/Utilities/XrdAdaptor/src/XrdRequestManager.cc @@ -1005,6 +1005,9 @@ XrdAdaptor::RequestManager::OpenHandler::~OpenHandler() void XrdAdaptor::RequestManager::OpenHandler::HandleResponseWithHosts(XrdCl::XRootDStatus *status_ptr, XrdCl::AnyObject *, XrdCl::HostList *hostList_ptr) { + // Make sure that we set m_outstanding_open to false on exit from this function. + std::unique_ptr> outstanding_guard(nullptr, [&](char*){m_outstanding_open=false;}); + std::shared_ptr source; std::unique_ptr status(status_ptr); std::unique_ptr hostList(hostList_ptr); @@ -1105,7 +1108,7 @@ XrdAdaptor::RequestManager::OpenHandler::open() // and make a call into xrootd (when it invokes m_file.reset()). Hence, our callback // holds our mutex and attempts to grab an Xrootd mutex; RequestManager::requestFailure holds // an Xrootd mutex and tries to hold m_mutex. This is a classic deadlock. - if (m_file.get()) + if (m_outstanding_open) { return m_shared_future; } @@ -1118,6 +1121,11 @@ XrdAdaptor::RequestManager::OpenHandler::open() std::string new_name = manager.m_name + ((manager.m_name.find("?") == manager.m_name.npos) ? "?" : "&") + opaque; edm::LogVerbatim("XrdAdaptorInternal") << "Trying to open URL: " << new_name; m_file.reset(new XrdCl::File()); + m_outstanding_open = true; + + // Always make sure we release m_file and set m_outstanding_open to false on error. + std::unique_ptr> exit_guard(nullptr, [&](char*){m_outstanding_open = false; m_file.reset();}); + XrdCl::XRootDStatus status; if (!(status = m_file->Open(new_name, manager.m_flags, manager.m_perms, this)).IsOK()) { @@ -1131,6 +1139,7 @@ XrdAdaptor::RequestManager::OpenHandler::open() manager.addConnections(ex); throw ex; } + exit_guard.release(); // Have a strong self-reference for as long as the callback is in-progress. m_self = self_ptr; return m_shared_future; diff --git a/Utilities/XrdAdaptor/src/XrdRequestManager.h b/Utilities/XrdAdaptor/src/XrdRequestManager.h index cf6bac45bf025..e30df58328034 100644 --- a/Utilities/XrdAdaptor/src/XrdRequestManager.h +++ b/Utilities/XrdAdaptor/src/XrdRequestManager.h @@ -257,7 +257,10 @@ class RequestManager : boost::noncopyable { OpenHandler(std::weak_ptr manager); std::shared_future > m_shared_future; std::promise > m_promise; - // When this is not null, there is a file-open in process + // Set to true only when there is an outstanding open request; not + // protected by m_mutex, so the caller is required to know it is in a + // thread-safe context. + std::atomic m_outstanding_open {false}; // Can only be touched when m_mutex is held. std::unique_ptr m_file; std::recursive_mutex m_mutex; From f94c2270ee2e6a10d70021df16704ba2ed8027bd Mon Sep 17 00:00:00 2001 From: Bugra Date: Thu, 3 Dec 2015 13:27:01 +0100 Subject: [PATCH 193/250] =?UTF-8?q?mfirst=20commit=20for=20Top=20MINIAOD?= =?UTF-8?q?=20S=C3=84ingleLepton=20module?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DQM/Physics/interface/TopDQMHelpers.h | 73 ++ DQM/Physics/python/DQMTopMiniAOD_cff.py | 7 + .../python/topSingleLeptonDQM_miniAOD_cfi.py | 849 +++++++++++++++ DQM/Physics/src/TopDQMHelpers.cc | 184 ++++ DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc | 978 ++++++++++++++++++ DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h | 354 +++++++ DQM/Physics/src/plugins.cc | 4 + DQM/Physics/test/topDQM_production_miniAOD.py | 121 +++ .../Configuration/python/DQMOffline_cff.py | 5 +- 9 files changed, 2574 insertions(+), 1 deletion(-) create mode 100644 DQM/Physics/python/DQMTopMiniAOD_cff.py create mode 100644 DQM/Physics/python/topSingleLeptonDQM_miniAOD_cfi.py create mode 100644 DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc create mode 100644 DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h create mode 100644 DQM/Physics/test/topDQM_production_miniAOD.py diff --git a/DQM/Physics/interface/TopDQMHelpers.h b/DQM/Physics/interface/TopDQMHelpers.h index b3531506398cc..087352e0399f5 100644 --- a/DQM/Physics/interface/TopDQMHelpers.h +++ b/DQM/Physics/interface/TopDQMHelpers.h @@ -12,6 +12,13 @@ #include #include "FWCore/Framework/interface/ConsumesCollector.h" #include "FWCore/Framework/interface/EDConsumerBase.h" + +#include "DataFormats/PatCandidates/interface/Muon.h" +#include "DataFormats/PatCandidates/interface/Electron.h" +#include "DataFormats/PatCandidates/interface/Jet.h" +#include "DataFormats/PatCandidates/interface/MET.h" + +using namespace std; /** \fn accept TopDQMHelpers.h "DQM/Physics/interface/TopDQMHelpers.h" @@ -63,6 +70,72 @@ inline bool accept(const edm::Event& event, in TopQuarkAnalysis/TopJetCombination package. It may be extended to include b tag information. */ +class Calculate_miniAOD { + public: + /// default constructor + Calculate_miniAOD(int maxNJets, double wMass); + /// default destructor + ~Calculate_miniAOD() {}; + + /// calculate W boson mass estimate + double massWBoson(const std::vector& jets); + /// calculate t-quark mass estimate + double massTopQuark(const std::vector& jets); + /// calculate b-tagged t-quark mass estimate + // double massBTopQuark(const std::vector& jets, std::vector + // bjet); + double massBTopQuark(const std::vector& jets, + std::vector VbtagWP, double btagWP_); + + /// calculate W boson transverse mass estimate + double tmassWBoson(pat::Muon* lep, const pat::MET& met, + const pat::Jet& b); + /// calculate top quark transverse mass estimate + double tmassTopQuark(pat::Muon* lep, const pat::MET& met, + const pat::Jet& b); + + + /// calculate W boson transverse mass estimate + double tmassWBoson(pat::Electron* lep, const pat::MET& met, + const pat::Jet& b); + /// calculate top quark transverse mass estimate + double tmassTopQuark(pat::Electron* lep, const pat::MET& met, + const pat::Jet& b); + + private: + /// do the calculation; this is called only once per event by the first + /// function call to return a mass estimate. The once calculated values + /// are cached afterwards + void operator()(const std::vector& jets); + /// do the calculation of the t-quark mass with one b-jet + void operator2(const std::vector&, std::vector, double); + /// do the calculation of the transverse top and W masses + void operator()(const pat::Jet& bJet, pat::Electron* lepton, + const pat::MET& met); + + void operator()(const pat::Jet& bJet, pat::Muon* lepton, + const pat::MET& met); + + private: + /// indicate failed associations + bool failed_; + /// max. number of jets to be considered + int maxNJets_; + /// paramater of the w boson mass + double wMass_; + /// cache of w boson mass estimate + double massWBoson_; + /// cache of top quark mass estimate + double massTopQuark_; + /// cache of b-tagged top quark mass estimate + double massBTopQuark_; + /// cache of W boson transverse mass estimate + double tmassWBoson_; + /// cache of top quark transverse mass estimate + double tmassTopQuark_; +}; + + class Calculate { public: diff --git a/DQM/Physics/python/DQMTopMiniAOD_cff.py b/DQM/Physics/python/DQMTopMiniAOD_cff.py new file mode 100644 index 0000000000000..e61eb0535e3b7 --- /dev/null +++ b/DQM/Physics/python/DQMTopMiniAOD_cff.py @@ -0,0 +1,7 @@ +import FWCore.ParameterSet.Config as cms + +from DQM.Physics.topSingleLeptonDQM_miniAOD_cfi import * + +topPhysicsminiAOD = cms.Sequence( process.topSingleMuonMediumDQM_miniAOD + + process.topSingleElectronMediumDQM_miniAOD + ) diff --git a/DQM/Physics/python/topSingleLeptonDQM_miniAOD_cfi.py b/DQM/Physics/python/topSingleLeptonDQM_miniAOD_cfi.py new file mode 100644 index 0000000000000..e9bb64832a96c --- /dev/null +++ b/DQM/Physics/python/topSingleLeptonDQM_miniAOD_cfi.py @@ -0,0 +1,849 @@ +import FWCore.ParameterSet.Config as cms + +looseMuonCut = " (isGlobalMuon || isTrackerMuon) && isPFMuon" +looseIsoCut = "(pfIsolationR04.sumChargedHadronPt + max(0., pfIsolationR04.sumNeutralHadronEt + pfIsolationR04.sumPhotonEt - 0.5 * pfIsolationR04.sumPUPt) ) / pt < 0.2" + +tightMuonCut = " isGlobalMuon && isPFMuon && globalTrack.normalizedChi2 < 10. && globalTrack.hitPattern.numberOfValidMuonHits > 0 && " + \ + "numberOfMatchedStations > 1 && innerTrack.hitPattern.numberOfValidPixelHits > 0 && innerTrack.hitPattern.trackerLayersWithMeasurement > 8" + # CB PV cut! +tightIsoCut = "(pfIsolationR04.sumChargedHadronPt + max(0., pfIsolationR04.sumNeutralHadronEt + pfIsolationR04.sumPhotonEt - 0.5 * pfIsolationR04.sumPUPt) ) / pt < 0.12" + +EletightIsoCut = "(pfIsolationVariables.sumChargedHadronPt + max(0., pfIsolationVariables.sumNeutralHadronEt + pfIsolationVariables.sumPhotonEt - 0.5 * pfIsolationVariables.sumPUPt) ) / pt < 0.1" +ElelooseIsoCut = "(pfIsolationVariables.sumChargedHadronPt + max(0., pfIsolationVariables.sumNeutralHadronEt + pfIsolationVariables.sumPhotonEt - 0.5 * pfIsolationVariables.sumPUPt) ) / pt < 0.15" + +topSingleLeptonDQM_miniAOD = cms.EDAnalyzer("TopSingleLeptonDQM_miniAOD", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("Physics/Top/TopSingleLeptonDQM_miniAOD/"), + ## [mandatory] + sources = cms.PSet( +# muons = cms.InputTag("slimmedMuons"), + + elecs = cms.InputTag("slimmedElectrons"), + jets = cms.InputTag("slimmedJets"), + mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"), + + pvs = cms.InputTag("offlineSlimmedPrimaryVertices") + ), + ## [optional] : when omitted the verbosity level is set to STANDARD + monitoring = cms.PSet( + verbosity = cms.string("DEBUG") + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras + pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates + #select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") + ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + ##electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.5) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>15 & abs(eta)<2.5 & abs(gsfTrack.d0)<1 & abs(gsfTrack.dz)<20"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + isolation = cms.string(ElelooseIsoCut), + ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string(looseMuonCut + " && pt>10 & abs(eta)<2.4"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot + isolation = cms.string(looseIsoCut), + ), + ## [optional] : when omitted all monitoring plots for jets will + ## be filled from uncorrected jets + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + ## when omitted monitor plots will be filled w/o additional cut on + ## jetID + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") +# ), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>30 & abs(eta)<2.5 "), + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass befor filling the event monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.), + upperEdge = cms.double(110.) + ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + paths = cms.vstring(['HLT_Mu3:HLT_QuadJet15U', + 'HLT_Mu5:HLT_QuadJet15U', + 'HLT_Mu7:HLT_QuadJet15U', + 'HLT_Mu9:HLT_QuadJet15U']) + ) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied + #trigger = cms.PSet( + # src = cms.InputTag("TriggerResults","","HLT"), + # select = cms.vstring(['HLT_Mu11', 'HLT_Ele15_LW_L1R', 'HLT_QuadJet30']) + #), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlineSlimmedPrimaryVertices")#, + #select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') + ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + ## + selection = cms.VPSet( + cms.PSet( + label = cms.string("jets:step0"), + src = cms.InputTag("slimmedJets"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(2), + ), + ) +) + +topSingleMuonLooseDQM_miniAOD = cms.EDAnalyzer("TopSingleLeptonDQM_miniAOD", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("Physics/Top/TopSingleMuonLooseDQM_miniAOD/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("slimmedMuons"), + elecs = cms.InputTag("slimmedElectrons"), + jets = cms.InputTag("slimmedJets"), + mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"), + pvs = cms.InputTag("offlineSlimmedPrimaryVertices") + ), + ## [optional] : when omitted the verbosity level is set to STANDARD + monitoring = cms.PSet( + verbosity = cms.string("DEBUG") + ), + pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates + #select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") + ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string(looseMuonCut + " && pt > 10 & abs(eta)<2.4"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot + isolation = cms.string(looseIsoCut) + ), + ## [optional] : when omitted all monitoring plots for jets + ## will be filled w/o extras + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + ## when omitted monitor plots will be filled w/o additional cut on + ## jetID + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>30 & abs(eta)<2.5"), + ## when omitted monitor histograms for b-tagging will not be filled + jetBTaggers = cms.PSet( + trackCountingEff = cms.PSet( + label = cms.InputTag("trackCountingHighEffBJetTags" ), + workingPoint = cms.double(1.25) + ), + trackCountingPur = cms.PSet( + label = cms.InputTag("trackCountingHighPurBJetTags" ), + workingPoint = cms.double(3.00) + ), + secondaryVertex = cms.PSet( + label = cms.InputTag("simpleSecondaryVertexHighEffBJetTags"), + workingPoint = cms.double(2.05) + ), + cvsVertex = cms.PSet( + label = cms.InputTag("combinedSecondaryVertexBJetTags"), + workingPoint = cms.double(0.898) + # CSV Tight from https://twiki.cern.ch/twiki/bin/viewauth/CMS/BTagPerformanceOP#B_tagging_Operating_Points_for_5 + ) + ), + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass befor filling the event monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.), + upperEdge = cms.double(110.) + ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + paths = cms.vstring(['HLT_Mu3:HLT_QuadJet15U', + 'HLT_Mu5:HLT_QuadJet15U', + 'HLT_Mu7:HLT_QuadJet15U', + 'HLT_Mu9:HLT_QuadJet15U', + 'HLT_Mu11:HLT_QuadJet15U']) + ) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied + #trigger = cms.PSet( + # src = cms.InputTag("TriggerResults","","HLT"), + # select = cms.vstring(['HLT_Mu11']) + #), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlineSlimmedPrimaryVertices")#, + #select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') + ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + selection = cms.VPSet( + cms.PSet( + label = cms.string("muons:step0"), + src = cms.InputTag("slimmedMuons"), + select = cms.string(looseMuonCut + looseIsoCut + " && pt>10 & abs(eta)<2.4"), # CB what about iso? CD Added looseIso + min = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets:step1"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + #select = cms.string("pt>30 & abs(eta)<2.5 & emEnergyFraction>0.01"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets:step2"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(2), + ), + cms.PSet( + label = cms.string("jets:step3"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(3), + ), + cms.PSet( + label = cms.string("jets:step4"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") +# ), + min = cms.int32(4), + ), + ) +) +topSingleMuonMediumDQM_miniAOD = cms.EDAnalyzer("TopSingleLeptonDQM_miniAOD", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("Physics/Top/TopSingleMuonMediumDQM_miniAOD/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("slimmedMuons"), + elecs = cms.InputTag("slimmedElectrons"), + jets = cms.InputTag("slimmedJets"), + mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"), + pvs = cms.InputTag("offlineSlimmedPrimaryVertices") + + ), + ## [optional] : when omitted the verbosity level is set to STANDARD + monitoring = cms.PSet( + verbosity = cms.string("DEBUG") + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras + pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates + #select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") + ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string(looseMuonCut + " && pt>20 & abs(eta)<2.1"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot + isolation = cms.string(looseIsoCut) + ), + ## [optional] : when omitted all monitoring plots for jets + ## will be filled w/o extras + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + ## when omitted monitor plots will be filled w/o additional cut on + ## jetID + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>30 & abs(eta)<2.5 "), + ## when omitted monitor histograms for b-tagging will not be filled + jetBTaggers = cms.PSet( + trackCountingEff = cms.PSet( + label = cms.InputTag("trackCountingHighEffBJetTags" ), + workingPoint = cms.double(1.25) + ), + trackCountingPur = cms.PSet( + label = cms.InputTag("trackCountingHighPurBJetTags" ), + workingPoint = cms.double(3.00) + ), + secondaryVertex = cms.PSet( + label = cms.InputTag("simpleSecondaryVertexHighEffBJetTags"), + workingPoint = cms.double(2.05) + ), + cvsVertex = cms.PSet( + label = cms.InputTag("combinedSecondaryVertexBJetTags"), + workingPoint = cms.double(0.898) + # CSV Tight from https://twiki.cern.ch/twiki/bin/viewauth/CMS/BTagPerformanceOP#B_tagging_Operating_Points_for_5 + ) + ), + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass before filling the event monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.), + upperEdge = cms.double(110.) + ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty +# triggerExtras = cms.PSet( +# src = cms.InputTag("TriggerResults","","HLT"), +# paths = cms.vstring(['HLT_Mu3:HLT_QuadJet15U', +# 'HLT_Mu5:HLT_QuadJet15U', +# 'HLT_Mu7:HLT_QuadJet15U', +# 'HLT_Mu9:HLT_QuadJet15U', +# 'HLT_Mu11:HLT_QuadJet15U']) +# ) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied + #trigger = cms.PSet( + # src = cms.InputTag("TriggerResults","","HLT"), + # select = cms.vstring(['HLT_Mu15_v2']) + #), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlineSlimmedPrimaryVertices")#, + #select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') + ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + selection = cms.VPSet( + cms.PSet( + label = cms.string("muons:step0"), + src = cms.InputTag("slimmedMuons"), + select = cms.string(tightMuonCut +"&&"+ tightIsoCut + " && pt>20 & abs(eta)<2.1"), # CB what about iso? CD Added tightIso + min = cms.int32(1), + max = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets:step1"), + #src = cms.InputTag("slimmedJets"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + #select = cms.string("pt>30 & abs(eta)<2.5 & emEnergyFraction>0.01"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets:step2"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(2), + ), + cms.PSet( + label = cms.string("jets:step3"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(3), + ), + cms.PSet( + label = cms.string("jets:step4"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") +# ), + min = cms.int32(4), + ), + ) +) + +topSingleElectronLooseDQM_miniAOD = cms.EDAnalyzer("TopSingleLeptonDQM_miniAOD", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("Physics/Top/TopSingleElectronLooseDQM_miniAOD/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("slimmedMuons"), + elecs = cms.InputTag("slimmedElectrons"), + jets = cms.InputTag("slimmedJets"), + mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"), + pvs = cms.InputTag("offlineSlimmedPrimaryVertices") + + ), + ## [optional] : when omitted the verbosity level is set to STANDARD + monitoring = cms.PSet( + verbosity = cms.string("DEBUG") + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras + pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates + #select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") + ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.0) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>20 & abs(eta)<2.5"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + isolation = cms.string(ElelooseIsoCut), + ), + ## [optional] : when omitted all monitoring plots for jets + ## will be filled w/o extras + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + ## when omitted monitor plots will be filled w/o additional cut on + ## jetID + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + #select = cms.string("pt>30 & abs(eta)<2.5 & emEnergyFraction>0.01"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + ## when omitted monitor histograms for b-tagging will not be filled + jetBTaggers = cms.PSet( + trackCountingEff = cms.PSet( + label = cms.InputTag("trackCountingHighEffBJetTags" ), + workingPoint = cms.double(1.25) + ), + trackCountingPur = cms.PSet( + label = cms.InputTag("trackCountingHighPurBJetTags" ), + workingPoint = cms.double(3.00) + ), + secondaryVertex = cms.PSet( + label = cms.InputTag("simpleSecondaryVertexHighEffBJetTags"), + workingPoint = cms.double(2.05) + ), + cvsVertex = cms.PSet( + label = cms.InputTag("combinedSecondaryVertexBJetTags"), + workingPoint = cms.double(0.898) + # CSV Tight from https://twiki.cern.ch/twiki/bin/viewauth/CMS/BTagPerformanceOP#B_tagging_Operating_Points_for_5 + ) + ), + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass before filling the event monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.), + upperEdge = cms.double(110.) + ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + paths = cms.vstring(['HLT_Ele15_LW_L1R:HLT_QuadJetU15']) + ) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied + #trigger = cms.PSet( + # src = cms.InputTag("TriggerResults","","HLT"), + # select = cms.vstring(['HLT_Ele15_SW_CaloEleId_L1R']) + #), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlineSlimmedPrimaryVertices")#, + #select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') + ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + selection = cms.VPSet( + cms.PSet( + label = cms.string("elecs:step0"), + src = cms.InputTag("slimmedElectrons"), + select = cms.string("pt>20 & abs(eta)<2.5 && "+ElelooseIsoCut), + min = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets:step1"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets:step2"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") +# ), + min = cms.int32(2), + ), + cms.PSet( + label = cms.string("jets:step3"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(3), + ), + cms.PSet( + label = cms.string("jets:step4"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(4), + ), + ) +) + +topSingleElectronMediumDQM_miniAOD = cms.EDAnalyzer("TopSingleLeptonDQM_miniAOD", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("Physics/Top/TopSingleElectronMediumDQM_miniAOD/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("slimmedMuons"), + elecs = cms.InputTag("slimmedElectrons"), + jets = cms.InputTag("slimmedJets"), + mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"), + pvs = cms.InputTag("offlineSlimmedPrimaryVertices") + + ), + ## [optional] : when omitted the verbosity level is set to STANDARD + monitoring = cms.PSet( + verbosity = cms.string("DEBUG") + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras + pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates + #select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") + ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.0) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>20 & abs(eta)<2.5"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + isolation = cms.string(ElelooseIsoCut), + ), + ## [optional] : when omitted all monitoring plots for jets + ## will be filled w/o extras + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + ## when omitted monitor plots will be filled w/o additional cut on + ## jetID + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>30 & abs(eta)<2.5 "), + ## when omitted monitor histograms for b-tagging will not be filled + jetBTaggers = cms.PSet( + trackCountingEff = cms.PSet( + label = cms.InputTag("trackCountingHighEffBJetTags" ), + workingPoint = cms.double(1.25) + ), + trackCountingPur = cms.PSet( + label = cms.InputTag("trackCountingHighPurBJetTags" ), + workingPoint = cms.double(3.00) + ), + secondaryVertex = cms.PSet( + label = cms.InputTag("simpleSecondaryVertexHighEffBJetTags"), + workingPoint = cms.double(2.05) + ), + cvsVertex = cms.PSet( + label = cms.InputTag("combinedSecondaryVertexBJetTags"), + workingPoint = cms.double(0.898) + # CSV Tight from https://twiki.cern.ch/twiki/bin/viewauth/CMS/BTagPerformanceOP#B_tagging_Operating_Points_for_5 + ) + ), + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass before filling the event monitoring plots + massExtras = cms.PSet( + lowerEdge = cms.double( 70.), + upperEdge = cms.double(110.) + ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty + #triggerExtras = cms.PSet( + # src = cms.InputTag("TriggerResults","","HLT"), + # paths = cms.vstring([ 'HLT_Ele15_LW_L1R:HLT_QuadJetU15']) + #) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied + #trigger = cms.PSet( + # src = cms.InputTag("TriggerResults","","HLT"), + # select = cms.vstring(['HLT_Ele15_SW_CaloEleId_L1R']) + #), + ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( + src = cms.InputTag("offlineSlimmedPrimaryVertices")#, + #select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') + ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + selection = cms.VPSet( + cms.PSet( + label = cms.string("elecs:step0"), + src = cms.InputTag("slimmedElectrons"), + select = cms.string("pt>30 & abs(eta)<2.5 & abs(gsfTrack.d0)<0.02 & gsfTrack.hitPattern().numberOfHits('MISSING_INNER_HITS') <= 0 & (abs(superCluster.eta) <= 1.4442 || abs(superCluster.eta) >= 1.5660) & " + EletightIsoCut), + min = cms.int32(1), + max = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets:step1"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") +# ), + min = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets:step2"), + src = cms.InputTag("slimmedJets"), +# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(2), + ), + cms.PSet( + label = cms.string("jets:step3"), + src = cms.InputTag("slimmedJets"), + # jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(3), + ), + cms.PSet( + label = cms.string("jets:step4"), + src = cms.InputTag("slimmedJets"), + # jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<2.5 "), + #jetID = cms.PSet( + #label = cms.InputTag("ak5JetID"), + #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") + # ), + min = cms.int32(4), + ), + ) +) diff --git a/DQM/Physics/src/TopDQMHelpers.cc b/DQM/Physics/src/TopDQMHelpers.cc index 3d4ec44dde80f..23d89ad000ae1 100644 --- a/DQM/Physics/src/TopDQMHelpers.cc +++ b/DQM/Physics/src/TopDQMHelpers.cc @@ -157,3 +157,187 @@ void Calculate::operator2(const std::vector& jets, massBTopQuark_ = (jets[maxBPtIndices[0]].p4() + jets[maxBPtIndices[1]].p4() + jets[maxBPtIndices[2]].p4()).mass(); } + + + + + + + + +Calculate_miniAOD::Calculate_miniAOD(int maxNJets, double wMass) + : failed_(false), + maxNJets_(maxNJets), + wMass_(wMass), + massWBoson_(-1.), + massTopQuark_(-1.), + massBTopQuark_(-1.), + tmassWBoson_(-1), + tmassTopQuark_(-1) {} + +double Calculate_miniAOD::massWBoson(const std::vector& jets) { + if (!failed_ && massWBoson_ < 0) operator()(jets); + return massWBoson_; +} + +double Calculate_miniAOD::massTopQuark(const std::vector& jets) { + if (!failed_ && massTopQuark_ < 0) operator()(jets); + return massTopQuark_; +} + +double Calculate_miniAOD::massBTopQuark(const std::vector& jets, + std::vector VbtagWP, double btagWP_) { + + if (!failed_ && massBTopQuark_ < 0) operator2(jets, VbtagWP, btagWP_); + return massBTopQuark_; +} + +double Calculate_miniAOD::tmassWBoson(pat::Muon* mu, const pat::MET& met, + const pat::Jet& b) { + if (tmassWBoson_ < 0) operator()(b, mu, met); + return tmassWBoson_; +} + +double Calculate_miniAOD::tmassTopQuark(pat::Electron* lepton, + const pat::MET& met, const pat::Jet& b) { + if (tmassTopQuark_ < 0) operator()(b, lepton, met); + return tmassTopQuark_; +} + +void Calculate_miniAOD::operator()(const pat::Jet& bJet, pat::Muon* lepton, + const pat::MET& met) { + double metT = sqrt(pow(met.px(), 2) + pow(met.py(), 2)); + double lepT = sqrt(pow(lepton->px(), 2) + pow(lepton->py(), 2)); + double bT = sqrt(pow(bJet.px(), 2) + pow(bJet.py(), 2)); + reco::Particle::LorentzVector WT = lepton->p4() + met.p4(); + tmassWBoson_ = + sqrt(pow(metT + lepT, 2) - (WT.px() * WT.px()) - (WT.py() * WT.py())); + reco::Particle::LorentzVector topT = WT + bJet.p4(); + tmassTopQuark_ = sqrt(pow((metT + lepT + bT), 2) - (topT.px() * topT.px()) - + (topT.py() * topT.py())); +} + + +void Calculate_miniAOD::operator()(const pat::Jet& bJet, pat::Electron* lepton, + const pat::MET& met) { + double metT = sqrt(pow(met.px(), 2) + pow(met.py(), 2)); + double lepT = sqrt(pow(lepton->px(), 2) + pow(lepton->py(), 2)); + double bT = sqrt(pow(bJet.px(), 2) + pow(bJet.py(), 2)); + reco::Particle::LorentzVector WT = lepton->p4() + met.p4(); + tmassWBoson_ = + sqrt(pow(metT + lepT, 2) - (WT.px() * WT.px()) - (WT.py() * WT.py())); + reco::Particle::LorentzVector topT = WT + bJet.p4(); + tmassTopQuark_ = sqrt(pow((metT + lepT + bT), 2) - (topT.px() * topT.px()) - + (topT.py() * topT.py())); +} + + +void Calculate_miniAOD::operator()(const std::vector& jets) { + if (maxNJets_ < 0) maxNJets_ = jets.size(); + failed_ = jets.size() < (unsigned int)maxNJets_; + if (failed_) { + return; + } + + // associate those jets with maximum pt of the vectorial + // sum to the hadronic decay chain + double maxPt = -1.; + std::vector maxPtIndices; + maxPtIndices.push_back(-1); + maxPtIndices.push_back(-1); + maxPtIndices.push_back(-1); + + for (int idx = 0; idx < maxNJets_; ++idx) { + for (int jdx = 0; jdx < maxNJets_; ++jdx) { + if (jdx <= idx) continue; + for (int kdx = 0; kdx < maxNJets_; ++kdx) { + if (kdx == idx || kdx == jdx) continue; + reco::Particle::LorentzVector sum = + jets[idx].p4() + jets[jdx].p4() + jets[kdx].p4(); + if (maxPt < 0. || maxPt < sum.pt()) { + maxPt = sum.pt(); + maxPtIndices.clear(); + maxPtIndices.push_back(idx); + maxPtIndices.push_back(jdx); + maxPtIndices.push_back(kdx); + } + } + } + } + massTopQuark_ = (jets[maxPtIndices[0]].p4() + jets[maxPtIndices[1]].p4() + + jets[maxPtIndices[2]].p4()).mass(); + + // associate those jets that get closest to the W mass + // with their invariant mass to the W boson + double wDist = -1.; + std::vector wMassIndices; + wMassIndices.push_back(-1); + wMassIndices.push_back(-1); + for (unsigned idx = 0; idx < maxPtIndices.size(); ++idx) { + for (unsigned jdx = 0; jdx < maxPtIndices.size(); ++jdx) { + if (jdx == idx || maxPtIndices[idx] > maxPtIndices[jdx]) continue; + reco::Particle::LorentzVector sum = + jets[maxPtIndices[idx]].p4() + jets[maxPtIndices[jdx]].p4(); + if (wDist < 0. || wDist > fabs(sum.mass() - wMass_)) { + wDist = fabs(sum.mass() - wMass_); + wMassIndices.clear(); + wMassIndices.push_back(maxPtIndices[idx]); + wMassIndices.push_back(maxPtIndices[jdx]); + } + } + } + massWBoson_ = + (jets[wMassIndices[0]].p4() + jets[wMassIndices[1]].p4()).mass(); +} + +void Calculate_miniAOD::operator2(const std::vector& jets, + std::vector bjet, double btagWP) { + if (maxNJets_ < 0) maxNJets_ = jets.size(); + failed_ = jets.size() < (unsigned int)maxNJets_; + + if (failed_) { + return; + } + + if (jets.size() != bjet.size()) { + return; + } + + // associate those jets with maximum pt of the vectorial + // sum to the hadronic decay chain. Require ONLY 1 btagged jet + double maxBPt = -1.; + std::vector maxBPtIndices; + maxBPtIndices.push_back(-1); + maxBPtIndices.push_back(-1); + maxBPtIndices.push_back(-1); + for (int idx = 0; idx < maxNJets_; ++idx) { + for (int jdx = 0; jdx < maxNJets_; ++jdx) { + if (jdx <= idx) continue; + for (int kdx = 0; kdx < maxNJets_; ++kdx) { + if (kdx == idx || kdx == jdx) continue; + // require only 1b-jet + if ((bjet[idx] > btagWP && bjet[jdx] <= btagWP && + bjet[kdx] <= btagWP) || + (bjet[idx] <= btagWP && bjet[jdx] > btagWP && + bjet[kdx] <= btagWP) || + (bjet[idx] <= btagWP && bjet[jdx] <= btagWP && + bjet[kdx] > btagWP)) { + reco::Particle::LorentzVector sum = + jets[idx].p4() + jets[jdx].p4() + jets[kdx].p4(); + if (maxBPt < 0. || maxBPt < sum.pt()) { + maxBPt = sum.pt(); + maxBPtIndices.clear(); + maxBPtIndices.push_back(idx); + maxBPtIndices.push_back(jdx); + maxBPtIndices.push_back(kdx); + } + } + } + } + } + if (maxBPtIndices[0] < 0 || maxBPtIndices[1] < 0 || maxBPtIndices[2] < 0) + return; + massBTopQuark_ = (jets[maxBPtIndices[0]].p4() + jets[maxBPtIndices[1]].p4() + + jets[maxBPtIndices[2]].p4()).mass(); +} + diff --git a/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc new file mode 100644 index 0000000000000..f7a28d26ec07a --- /dev/null +++ b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc @@ -0,0 +1,978 @@ +#include "JetMETCorrections/Objects/interface/JetCorrectionsRecord.h" +#include "DataFormats/JetReco/interface/CaloJet.h" +#include "DataFormats/BTauReco/interface/JetTag.h" +#include "DataFormats/JetReco/interface/PFJet.h" +#include "DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h" +#include "DataFormats/Math/interface/deltaR.h" +#include +#include "FWCore/Utilities/interface/EDGetToken.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "FWCore/Framework/interface/EDConsumerBase.h" + +#include "DataFormats/PatCandidates/interface/Muon.h" +#include "DataFormats/PatCandidates/interface/Electron.h" +#include "DataFormats/PatCandidates/interface/Jet.h" +#include "DataFormats/PatCandidates/interface/MET.h" +using namespace std; +namespace TopSingleLepton_miniAOD { + +// maximal number of leading jets +// to be used for top mass estimate +static const unsigned int MAXJETS = 4; +// nominal mass of the W boson to +// be used for the top mass estimate +static const double WMASS = 80.4; + +MonitorEnsemble::MonitorEnsemble(const char* label, + const edm::ParameterSet& cfg, + edm::ConsumesCollector&& iC) + : label_(label), + elecIso_(nullptr), + elecSelect_(nullptr), + pvSelect_(nullptr), + muonIso_(nullptr), + muonSelect_(nullptr), + jetIDSelect_(nullptr), + includeBTag_(false), + lowerEdge_(-1.), + upperEdge_(-1.), + logged_(0) { + + // sources have to be given; this PSet is not optional + edm::ParameterSet sources = cfg.getParameter("sources"); + // muons_ = iC.consumes >( + // sources.getParameter("muons")); + + + muons_ = iC.consumes >( + sources.getParameter("muons")); + + + elecs_ = iC.consumes >( + sources.getParameter("elecs")); + pvs_ = iC.consumes >( + sources.getParameter("pvs")); + jets_ = iC.consumes >( + sources.getParameter("jets")); + for (edm::InputTag const& tag : + sources.getParameter >("mets")) + mets_.push_back(iC.consumes >(tag)); + // electronExtras are optional; they may be omitted or + // empty + if (cfg.existsAs("elecExtras")) { + // rho for PF isolation with EA corrections + // eventrhoToken_ = + // iC.consumes(edm::InputTag("fixedGridRhoFastjetAll")); + + edm::ParameterSet elecExtras = + cfg.getParameter("elecExtras"); + // select is optional; in case it's not found no + // selection will be applied + if (elecExtras.existsAs("select")) { + elecSelect_.reset( new StringCutObjectSelector( + elecExtras.getParameter("select"))); + } + // isolation is optional; in case it's not found no + // isolation will be applied + if (elecExtras.existsAs("isolation")) { + elecIso_.reset( new StringCutObjectSelector( + elecExtras.getParameter("isolation"))); + } + // electronId is optional; in case it's not found the + // InputTag will remain empty + if (elecExtras.existsAs("electronId")) { + edm::ParameterSet elecId = + elecExtras.getParameter("electronId"); + electronId_ = iC.consumes >( + elecId.getParameter("src")); + eidCutValue_ = elecId.getParameter("cutValue"); + } + } + // pvExtras are opetional; they may be omitted or empty + if (cfg.existsAs("pvExtras")) { + edm::ParameterSet pvExtras = + cfg.getParameter("pvExtras"); + // select is optional; in case it's not found no + // selection will be applied + if (pvExtras.existsAs("select")) { + pvSelect_.reset(new StringCutObjectSelector( + pvExtras.getParameter("select"))); + } + } + // muonExtras are optional; they may be omitted or empty + if (cfg.existsAs("muonExtras")) { + edm::ParameterSet muonExtras = + cfg.getParameter("muonExtras"); + // select is optional; in case it's not found no + // selection will be applied + if (muonExtras.existsAs("select")) { + muonSelect_.reset(new StringCutObjectSelector( + muonExtras.getParameter("select"))); + } + // isolation is optional; in case it's not found no + // isolation will be applied + if (muonExtras.existsAs("isolation")) { + muonIso_.reset(new StringCutObjectSelector( + muonExtras.getParameter("isolation"))); + } + } + + // jetExtras are optional; they may be omitted or + // empty + if (cfg.existsAs("jetExtras")) { + edm::ParameterSet jetExtras = + cfg.getParameter("jetExtras"); + // jetCorrector is optional; in case it's not found + // the InputTag will remain empty + if (jetExtras.existsAs("jetCorrector")) { + jetCorrector_ = jetExtras.getParameter("jetCorrector"); + } + // read jetID information if it exists + if (jetExtras.existsAs("jetID")) { + edm::ParameterSet jetID = + jetExtras.getParameter("jetID"); + jetIDLabel_ = iC.consumes( + jetID.getParameter("label")); + jetIDSelect_.reset(new StringCutObjectSelector( + jetID.getParameter("select"))); + } + // select is optional; in case it's not found no + // selection will be applied (only implemented for + // CaloJets at the moment) + if (jetExtras.existsAs("select")) { + jetSelect_ = jetExtras.getParameter("select"); + } + // jetBDiscriminators are optional; in case they are + // not found the InputTag will remain empty; they + // consist of pairs of edm::JetFlavorAssociation's & + // corresponding working points + /* includeBTag_ = jetExtras.existsAs("jetBTaggers"); + if (includeBTag_) { + edm::ParameterSet btagEff = + jetExtras.getParameter("jetBTaggers") + .getParameter("trackCountingEff"); + btagEff_ = iC.consumes( + btagEff.getParameter("label")); + btagEffWP_ = btagEff.getParameter("workingPoint"); + edm::ParameterSet btagPur = + jetExtras.getParameter("jetBTaggers") + .getParameter("trackCountingPur"); + btagPur_ = iC.consumes( + btagPur.getParameter("label")); + btagPurWP_ = btagPur.getParameter("workingPoint"); + edm::ParameterSet btagVtx = + jetExtras.getParameter("jetBTaggers") + .getParameter("secondaryVertex"); + btagVtx_ = iC.consumes( + btagVtx.getParameter("label")); + btagVtxWP_ = btagVtx.getParameter("workingPoint"); + edm::ParameterSet btagCSV = + jetExtras.getParameter("jetBTaggers") + .getParameter("cvsVertex"); + btagCSV_ = iC.consumes( + btagCSV.getParameter("label")); + btagCSVWP_ = btagCSV.getParameter("workingPoint"); + + + }*/ + } + + // triggerExtras are optional; they may be omitted or empty + if (cfg.existsAs("triggerExtras")) { + edm::ParameterSet triggerExtras = + cfg.getParameter("triggerExtras"); + triggerTable_ = iC.consumes( + triggerExtras.getParameter("src")); + triggerPaths_ = + triggerExtras.getParameter >("paths"); + } + + // massExtras is optional; in case it's not found no mass + // window cuts are applied for the same flavor monitor + // histograms + if (cfg.existsAs("massExtras")) { + edm::ParameterSet massExtras = + cfg.getParameter("massExtras"); + lowerEdge_ = massExtras.getParameter("lowerEdge"); + upperEdge_ = massExtras.getParameter("upperEdge"); + } + + // setup the verbosity level for booking histograms; + // per default the verbosity level will be set to + // STANDARD. This will also be the chosen level in + // the case when the monitoring PSet is not found + verbosity_ = STANDARD; + if (cfg.existsAs("monitoring")) { + edm::ParameterSet monitoring = + cfg.getParameter("monitoring"); + if (monitoring.getParameter("verbosity") == "DEBUG") + verbosity_ = DEBUG; + if (monitoring.getParameter("verbosity") == "VERBOSE") + verbosity_ = VERBOSE; + if (monitoring.getParameter("verbosity") == "STANDARD") + verbosity_ = STANDARD; + } + // and don't forget to do the histogram booking + directory_ = cfg.getParameter("directory"); + // book(ibooker); +} + +void MonitorEnsemble::book(DQMStore::IBooker & ibooker) { + // set up the current directory path + std::string current(directory_); + current += label_; + ibooker.setCurrentFolder(current); + + // determine number of bins for trigger monitoring + unsigned int nPaths = triggerPaths_.size(); + + // --- [STANDARD] --- // + // Run Number + hists_["RunNumb_"] = ibooker.book1D("RunNumber", "Run Nr.", 1.e4, 1.5e5, 3.e5); + // instantaneous luminosity + hists_["InstLumi_"] = ibooker.book1D("InstLumi", "Inst. Lumi.", 100, 0., 1.e3); + // number of selected primary vertices + hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{pvs}", 100, 0., 100.); + // pt of the leading muon + hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu)", 50, 0., 250.); + // muon multiplicity before std isolation + hists_["muonMult_"] = ibooker.book1D("MuonMult", "N_{All}(#mu)", 10, 0., 10.); + // muon multiplicity after std isolation + hists_["muonMultIso_"] = ibooker.book1D("MuonMultIso", + "N_{Iso}(#mu)", 10, 0., 10.); + // pt of the leading electron + hists_["elecPt_"] = ibooker.book1D("ElecPt", "pt(e)", 50, 0., 250.); + // electron multiplicity before std isolation + hists_["elecMult_"] = ibooker.book1D("ElecMult", "N_{All}(e)", 10, 0., 10.); + // electron multiplicity after std isolation + hists_["elecMultIso_"] = ibooker.book1D("ElecMultIso", "N_{Iso}(e)", 10, 0., 10.); + // multiplicity of jets with pt>20 (corrected to L2+L3) + hists_["jetMult_"] = ibooker.book1D("JetMult", "N_{30}(jet)", 10, 0., 10.); + // trigger efficiency estimates for single lepton triggers + hists_["triggerEff_"] = ibooker.book1D("TriggerEff", + "Eff(trigger)", nPaths, 0., nPaths); + // monitored trigger occupancy for single lepton triggers + hists_["triggerMon_"] = ibooker.book1D("TriggerMon", + "Mon(trigger)", nPaths, 0., nPaths); + // MET (calo) + hists_["slimmedMETs_"] = ibooker.book1D("slimmedMETs", "MET_{slimmed}", 50, 0., 200.); + // W mass estimate + hists_["massW_"] = ibooker.book1D("MassW", "M(W)", 60, 0., 300.); + // Top mass estimate + hists_["massTop_"] = ibooker.book1D("MassTop", "M(Top)", 50, 0., 500.); + // b-tagged Top mass + hists_["massBTop_"] = ibooker.book1D("MassBTop", "M(Top, 1 b-tag)", 50, 0., 500.); + // set bin labels for trigger monitoring + triggerBinLabels(std::string("trigger"), triggerPaths_); + + if (verbosity_ == STANDARD) return; + + // --- [VERBOSE] --- // + // eta of the leading muon + hists_["muonEta_"] = ibooker.book1D("MuonEta", "#eta(#mu)", 30, -3., 3.); + // relative isolation of the candidate muon (depending on the decay channel) + hists_["muonRelIso_"] = ibooker.book1D( + "MuonRelIso", "Iso_{Rel}(#mu) (#Delta#beta Corrected)", 50, 0., 1.); + // eta of the leading electron + hists_["elecEta_"] = ibooker.book1D("ElecEta", "#eta(e)", 30, -3., 3.); + // std isolation variable of the leading electron + hists_["elecRelIso_"] = ibooker.book1D("ElecRelIso", "Iso_{Rel}(e)", 50, 0., 1.); + // multiplicity of btagged jets (for track counting high efficiency) with + // pt(L2L3)>30 + hists_["jetMultBEff_"] = ibooker.book1D("JetMultBEff", + "N_{30}(TCHE)", 10, 0., 10.); + // btag discriminator for track counting high efficiency for jets with + // pt(L2L3)>30 + hists_["jetBDiscEff_"] = ibooker.book1D("JetBDiscEff", + "Disc_{TCHE}(jet)", 100, 0., 10.); + // eta of the 1. leading jet (corrected to L2+L3) + hists_["jet1Eta_"] = ibooker.book1D("Jet1Eta", "#eta_{L2L3}(jet1)", 60, -3., 3.); + // pt of the 1. leading jet (corrected to L2+L3) + hists_["jet1Pt_"] = ibooker.book1D("Jet1Pt", "pt_{L2L3}(jet1)", 60, 0., 300.); + // eta of the 2. leading jet (corrected to L2+L3) + hists_["jet2Eta_"] = ibooker.book1D("Jet2Eta", "#eta_{L2L3}(jet2)", 60, -3., 3.); + // pt of the 2. leading jet (corrected to L2+L3) + hists_["jet2Pt_"] = ibooker.book1D("Jet2Pt", "pt_{L2L3}(jet2)", 60, 0., 300.); + // eta of the 3. leading jet (corrected to L2+L3) + hists_["jet3Eta_"] = ibooker.book1D("Jet3Eta", "#eta_{L2L3}(jet3)", 60, -3., 3.); + // pt of the 3. leading jet (corrected to L2+L3) + hists_["jet3Pt_"] = ibooker.book1D("Jet3Pt", "pt_{L2L3}(jet3)", 60, 0., 300.); + // eta of the 4. leading jet (corrected to L2+L3) + hists_["jet4Eta_"] = ibooker.book1D("Jet4Eta", "#eta_{L2L3}(jet4)", 60, -3., 3.); + // pt of the 4. leading jet (corrected to L2+L3) + hists_["jet4Pt_"] = ibooker.book1D("Jet4Pt", "pt_{L2L3}(jet4)", 60, 0., 300.); + // MET (tc) + hists_["slimmedMETsNoHF_"] = ibooker.book1D("slimmedMETsNoHF", "MET_{slimmedNoHF}", 50, 0., 200.); + // MET (pflow) + hists_["slimmedMETsPuppi_"] = ibooker.book1D("slimmedMETsPuppi", "MET_{slimmedPuppi}", 50, 0., 200.); + // dz for muons (to suppress cosmis) + hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.); + // dxy for muons (to suppress cosmics) + hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY", + "d_{xy}(#mu)", 50, -0.1, 0.1, 50, -0.1, 0.1); + + // set axes titles for dxy for muons + hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1); + hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2); + + if (verbosity_ == VERBOSE) return; + + // --- [DEBUG] --- // + // charged hadron isolation component of the candidate muon (depending on the + // decay channel) + hists_["muonChHadIso_"] = ibooker.book1D("MuonChHadIsoComp", + "ChHad_{IsoComponent}(#mu)", 50, 0., 5.); + // neutral hadron isolation component of the candidate muon (depending on the + // decay channel) + hists_["muonNeHadIso_"] = ibooker.book1D("MuonNeHadIsoComp", + "NeHad_{IsoComponent}(#mu)", 50, 0., 5.); + // photon isolation component of the candidate muon (depending on the decay + // channel) + hists_["muonPhIso_"] = ibooker.book1D("MuonPhIsoComp", + "Photon_{IsoComponent}(#mu)", 50, 0., 5.); + // charged hadron isolation component of the candidate electron (depending on + // the decay channel) + hists_["elecChHadIso_"] = ibooker.book1D("ElectronChHadIsoComp", + "ChHad_{IsoComponent}(e)", 50, 0., 5.); + // neutral hadron isolation component of the candidate electron (depending on + // the decay channel) + hists_["elecNeHadIso_"] = ibooker.book1D("ElectronNeHadIsoComp", + "NeHad_{IsoComponent}(e)", 50, 0., 5.); + // photon isolation component of the candidate electron (depending on the + // decay channel) + hists_["elecPhIso_"] = ibooker.book1D("ElectronPhIsoComp", + "Photon_{IsoComponent}(e)", 50, 0., 5.); + // multiplicity of btagged jets (for track counting high purity) with + // pt(L2L3)>30 + hists_["jetMultBPur_"] = ibooker.book1D("JetMultBPur", + "N_{30}(TCHP)", 10, 0., 10.); + // btag discriminator for track counting high purity + hists_["jetBDiscPur_"] = ibooker.book1D("JetBDiscPur", + "Disc_{TCHP}(Jet)", 100, 0., 10.); + // multiplicity of btagged jets (for simple secondary vertex) with pt(L2L3)>30 + hists_["jetMultBVtx_"] = ibooker.book1D("JetMultBVtx", + "N_{30}(SSVHE)", 10, 0., 10.); + // btag discriminator for simple secondary vertex + hists_["jetBDiscVtx_"] = ibooker.book1D("JetBDiscVtx", + "Disc_{SSVHE}(Jet)", 35, -1., 6.); + // multiplicity for combined secondary vertex + hists_["jetMultCSVtx_"] = ibooker.book1D("JetMultCSV", "N_{30}(CSV)", 10, 0., 10.); + // btag discriminator for combined secondary vertex + hists_["jetBCVtx_"] = ibooker.book1D("JetDiscCSV", + "Disc_{CSV}(JET)", 100, -1., 2.); + // pt of the 1. leading jet (uncorrected) + hists_["jet1PtRaw_"] = ibooker.book1D("Jet1PtRaw", "pt_{Raw}(jet1)", 60, 0., 300.); + // pt of the 2. leading jet (uncorrected) + hists_["jet2PtRaw_"] = ibooker.book1D("Jet2PtRaw", "pt_{Raw}(jet2)", 60, 0., 300.); + // pt of the 3. leading jet (uncorrected) + hists_["jet3PtRaw_"] = ibooker.book1D("Jet3PtRaw", "pt_{Raw}(jet3)", 60, 0., 300.); + // pt of the 4. leading jet (uncorrected) + hists_["jet4PtRaw_"] = ibooker.book1D("Jet4PtRaw", "pt_{Raw}(jet4)", 60, 0., 300.); + // selected events + hists_["eventLogger_"] = ibooker.book2D("EventLogger", + "Logged Events", 9, 0., 9., 10, 0., 10.); + + // set axes titles for selected events + hists_["eventLogger_"]->getTH1()->SetOption("TEXT"); + hists_["eventLogger_"]->setBinLabel(1, "Run", 1); + hists_["eventLogger_"]->setBinLabel(2, "Block", 1); + hists_["eventLogger_"]->setBinLabel(3, "Event", 1); + hists_["eventLogger_"]->setBinLabel(4, "pt_{L2L3}(jet1)", 1); + hists_["eventLogger_"]->setBinLabel(5, "pt_{L2L3}(jet2)", 1); + hists_["eventLogger_"]->setBinLabel(6, "pt_{L2L3}(jet3)", 1); + hists_["eventLogger_"]->setBinLabel(7, "pt_{L2L3}(jet4)", 1); + hists_["eventLogger_"]->setBinLabel(8, "M_{W}", 1); + hists_["eventLogger_"]->setBinLabel(9, "M_{Top}", 1); + hists_["eventLogger_"]->setAxisTitle("logged evts", 2); + return; +} + +void MonitorEnsemble::fill(const edm::Event& event, + const edm::EventSetup& setup) { + // fetch trigger event if configured such + edm::Handle triggerTable; + + if (!triggerTable_.isUninitialized()) { + if (!event.getByToken(triggerTable_, triggerTable)) return; + } + + /* + ------------------------------------------------------------ + + Primary Vertex Monitoring + + ------------------------------------------------------------ + */ + // fill monitoring plots for primary verices + edm::Handle > pvs; + if (!event.getByToken(pvs_, pvs)) return; + unsigned int pvMult = 0; + for (edm::View::const_iterator pv = pvs->begin(); + pv != pvs->end(); ++pv) { + if (!pvSelect_ || (*pvSelect_)(*pv)) pvMult++; + } + fill("pvMult_", pvMult); + + /* + ------------------------------------------------------------ + + Run and Inst. Luminosity information (Inst. Lumi. filled now with a dummy + value=5.0) + + ------------------------------------------------------------ + */ + if (!event.eventAuxiliary().run()) return; + fill("RunNumb_", event.eventAuxiliary().run()); + + double dummy = 5.; + fill("InstLumi_", dummy); + + /* + ------------------------------------------------------------ + + Electron Monitoring + + ------------------------------------------------------------ + */ + + // fill monitoring plots for electrons + edm::Handle > elecs; + if (!event.getByToken(elecs_, elecs)) return; + + // check availability of electron id + edm::Handle > electronId; + if (!electronId_.isUninitialized()) { + if (!event.getByToken(electronId_, electronId)) return; + } + + // loop electron collection + unsigned int eMult = 0, eMultIso = 0; + std::vector isoElecs; + +// for (edm::View::const_iterator elec = elecs->begin(); +// elec != elecs->end(); ++elec) { +// if (elec->gsfElectronRef().isNull()) { +// continue; +// } + + for (edm::View::const_iterator elec = elecs->begin(); + elec != elecs->end(); ++elec) { + + +// reco::GsfElectronRef elec = elec->gsfElectronRef(); + // restrict to electrons with good electronId + // if (electronId_.isUninitialized() ? true : ((double)(*electronId)[elec] >= + // eidCutValue_)) { + + if(true){//no electron id applied yet! + if (!elecSelect_ || (*elecSelect_)(*elec)) { + + double el_ChHadIso = elec->pfIsolationVariables().sumChargedHadronPt; + double el_NeHadIso = elec->pfIsolationVariables().sumNeutralHadronEt; + double el_PhIso = elec->pfIsolationVariables().sumPhotonEt; + double el_pfRelIso = + (el_ChHadIso + + max(0., el_NeHadIso + el_PhIso - + 0.5 * elec->pfIsolationVariables().sumPUPt)) / + elec->pt(); + if (eMult == 0) { + // restrict to the leading electron + fill("elecPt_", elec->pt()); + fill("elecEta_", elec->eta()); + fill("elecRelIso_", el_pfRelIso); + fill("elecChHadIso_", el_ChHadIso); + fill("elecNeHadIso_", el_NeHadIso); + fill("elecPhIso_", el_PhIso); + } + // in addition to the multiplicity counter buffer the iso + // electron candidates for later overlap check with jets + ++eMult; + if (!elecIso_ || (*elecIso_)(*elec)) { + isoElecs.push_back(&(*elec)); + ++eMultIso; + } + } + } + } + fill("elecMult_", eMult); + fill("elecMultIso_", eMultIso); + + /* + ------------------------------------------------------------ + + Muon Monitoring + + ------------------------------------------------------------ + */ + + // fill monitoring plots for muons + unsigned int mMult = 0, mMultIso = 0; + + edm::Handle > muons; + edm::View::const_iterator muonit; + + if (!event.getByToken(muons_, muons)) return; + +//for (edm::View::const_iterator muonit = muons->begin(); +// muonit != muons->end(); ++muonit) { + + + for (edm::View::const_iterator muon = muons->begin(); + muon != muons->end(); ++muon) { + + + +// if (muonit->muonRef().isNull()) continue; +// reco::MuonRef muon = muonit->muonRef(); + + // restrict to globalMuons + if (muon->isGlobalMuon()) { + fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track! + fill("muonDelXY_", muon->innerTrack()->vx(), muon->innerTrack()->vy()); + + + + // apply preselection + if (!muonSelect_ || (*muonSelect_)(*muon)) { + +// if (true){ + + double chHadPt = muon->pfIsolationR04().sumChargedHadronPt; + double neHadEt = muon->pfIsolationR04().sumNeutralHadronEt; + double phoEt = muon->pfIsolationR04().sumPhotonEt; + + double pfRelIso = + (chHadPt + + max(0., neHadEt + phoEt - 0.5 * muon->pfIsolationR04().sumPUPt)) / + muon->pt(); // CB dBeta corrected iso! + + if (mMult == 0) { + // restrict to leading muon + fill("muonPt_", muon->pt()); + fill("muonEta_", muon->eta()); + + fill("muonRelIso_", pfRelIso); + + fill("muonChHadIso_", chHadPt); + fill("muonNeHadIso_", neHadEt); + fill("muonPhIso_", phoEt); + } + ++mMult; + if (!muonIso_ || (*muonIso_)(*muon)) ++mMultIso; + } + } + } + fill("muonMult_", mMult); + fill("muonMultIso_", mMultIso); + + /* + ------------------------------------------------------------ + + Jet Monitoring + + ------------------------------------------------------------ + */ + + // check availability of the btaggers +/* edm::Handle btagEff, btagPur, btagVtx, btagCSV; + if (includeBTag_) { + if (!event.getByToken(btagEff_, btagEff)) return; + if (!event.getByToken(btagPur_, btagPur)) return; + if (!event.getByToken(btagVtx_, btagVtx)) return; + if (!event.getByToken(btagCSV_, btagCSV)) return; + }*/ + // load jet corrector if configured such +/* const JetCorrector* corrector = 0; + if (!jetCorrector_.empty()) { + // check whether a jet correcto is in the event setup or not + if (setup.find(edm::eventsetup::EventSetupRecordKey::makeKey< + JetCorrectionsRecord>())) { + corrector = JetCorrector::getJetCorrector(jetCorrector_, setup); + } else { + edm::LogVerbatim("TopSingleLeptonDQM_miniAOD") + << "\n" + << "-----------------------------------------------------------------" + "-------------------- \n" + << " No JetCorrectionsRecord available from EventSetup: " + " \n" + << " - Jets will not be corrected. " + " \n" + << " - If you want to change this add the following lines to your " + "cfg file: \n" + << " " + " \n" + << " ## load jet corrections " + " \n" + << " " + "process.load(\"JetMETCorrections.Configuration." + "JetCorrectionServicesAllAlgos_cff\") \n" + << " process.prefer(\"ak5CaloL2L3\") " + " \n" + << " " + " \n" + << "-----------------------------------------------------------------" + "-------------------- \n"; + } + }*/ + + // loop jet collection + std::vector correctedJets; + std::vector JetTagValues; + unsigned int mult = 0, multBEff = 0, multBPur = 0, multBVtx = 0, multCSV = 0; + + edm::Handle > jets; + if (!event.getByToken(jets_, jets)) { + return; + } + + //edm::Handle jetID; +/* if (jetIDSelect_) { + if (!event.getByToken(jetIDLabel_, jetID)) return; + }*/ + + for (edm::View::const_iterator jet = jets->begin(); + jet != jets->end(); ++jet) { + // check jetID for calo jets + unsigned int idx = jet - jets->begin(); + // if (jetIDSelect_ && + // dynamic_cast(jets->refAt(idx).get())) { + // if (!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue; + // } + // chekc additional jet selection for calo, pf and bare reco jets + // if (dynamic_cast(&*jet)) { + // reco::CaloJet sel = dynamic_cast(*jet); + // sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + // StringCutObjectSelector jetSelect(jetSelect_); + // if (!jetSelect(sel)) { + // continue; + // } + // } else if (dynamic_cast(&*jet)) { + // reco::PFJet sel = dynamic_cast(*jet); + // sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + // StringCutObjectSelector jetSelect(jetSelect_); + // if (!jetSelect(sel)) continue; + // } else { + pat::Jet sel = *jet; + // sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + StringCutObjectSelector jetSelect(jetSelect_); + if (!jetSelect(sel)) continue; + // } + + // prepare jet to fill monitor histograms + pat::Jet monitorJet = *jet; + // monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + correctedJets.push_back(monitorJet); + ++mult; // determine jet multiplicity +// if (includeBTag_) { + // fill b-discriminators +// edm::RefToBase jetRef = jets->refAt(idx); +// fill("jetBDiscEff_", (*btagEff)[jetRef]); +// if ((*btagEff)[jetRef] > btagEffWP_) ++multBEff; +// fill("jetBDiscPur_", (*btagPur)[jetRef]); +// if ((*btagPur)[jetRef] > btagPurWP_) ++multBPur; +// fill("jetBDiscVtx_", (*btagVtx)[jetRef]); +// if ((*btagVtx)[jetRef] > btagVtxWP_) ++multBVtx; +// fill("jetBCVtx_", (*btagCSV)[jetRef]); +// if ((*btagCSV)[jetRef] > btagCSVWP_) ++multCSV; + + + fill("jetBDiscEff_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); //hard coded discriminator and value right now. + if (monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags") > 0.89) ++multBEff; + + + // Fill a vector with Jet b-tag WP for later M3+1tag calculation: CSV + // tagger + JetTagValues.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); +// } + // fill pt (raw or L2L3) for the leading four jets + if (idx == 0) { + fill("jet1Pt_", monitorJet.pt()); + fill("jet1PtRaw_", jet->pt()); + fill("jet1Eta_", monitorJet.eta()); + }; + if (idx == 1) { + fill("jet2Pt_", monitorJet.pt()); + fill("jet2PtRaw_", jet->pt()); + fill("jet2Eta_", monitorJet.eta()); + } + if (idx == 2) { + fill("jet3Pt_", monitorJet.pt()); + fill("jet3PtRaw_", jet->pt()); + fill("jet3Eta_", monitorJet.eta()); + } + if (idx == 3) { + fill("jet4Pt_", monitorJet.pt()); + fill("jet4PtRaw_", jet->pt()); + fill("jet4Eta_", monitorJet.eta()); + } + } + fill("jetMult_", mult); + fill("jetMultBEff_", multBEff); + fill("jetMultBPur_", multBPur); + fill("jetMultBVtx_", multBVtx); + fill("jetMultCSVtx_", multCSV); + + /* + ------------------------------------------------------------ + + MET Monitoring + + ------------------------------------------------------------ + */ + + // fill monitoring histograms for met + for (std::vector > >::const_iterator + met_ = mets_.begin(); + met_ != mets_.end(); ++met_) { + edm::Handle > met; + if (!event.getByToken(*met_, met)) continue; + if (met->begin() != met->end()) { + unsigned int idx = met_ - mets_.begin(); + if (idx == 0) fill("slimmedMETs_", met->begin()->et()); + if (idx == 1) fill("slimmedMETsNoHF_", met->begin()->et()); + if (idx == 2) fill("slimmedMETsPuppi_", met->begin()->et()); + } + } + + /* + ------------------------------------------------------------ + + Event Monitoring + + ------------------------------------------------------------ + */ + + // fill W boson and top mass estimates + + Calculate_miniAOD eventKinematics(MAXJETS, WMASS); + double wMass = eventKinematics.massWBoson(correctedJets); + double topMass = eventKinematics.massTopQuark(correctedJets); + if (wMass >= 0 && topMass >= 0) { + fill("massW_", wMass); + fill("massTop_", topMass); + } + + // Fill M3 with Btag (CSV Tight) requirement + + // if (!includeBTag_) return; + if (correctedJets.size() != JetTagValues.size()) return; + double btopMass = + eventKinematics.massBTopQuark(correctedJets, JetTagValues, 0.89); //hard coded CSVv2 value + + if (btopMass >= 0) fill("massBTop_", btopMass); + + // fill plots for trigger monitoring + /* if ((lowerEdge_ == -1. && upperEdge_ == -1.) || + (lowerEdge_ < wMass && wMass < upperEdge_)) { + if (!triggerTable_.isUninitialized()) + fill(event, *triggerTable, "trigger", triggerPaths_); + if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) { + // log runnumber, lumi block, event number & some + // more pysics infomation for interesting events + fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run()); + fill("eventLogger_", 1.5, logged_ + 0.5, + event.eventAuxiliary().luminosityBlock()); + fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event()); + if (correctedJets.size() > 0) + fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt()); + if (correctedJets.size() > 1) + fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt()); + if (correctedJets.size() > 2) + fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt()); + if (correctedJets.size() > 3) + fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt()); + fill("eventLogger_", 7.5, logged_ + 0.5, wMass); + fill("eventLogger_", 8.5, logged_ + 0.5, topMass); + ++logged_; + } + }*/ +} +} + +TopSingleLeptonDQM_miniAOD::TopSingleLeptonDQM_miniAOD(const edm::ParameterSet& cfg) + : vertexSelect_(nullptr), + beamspot_(""), + beamspotSelect_(nullptr), + MuonStep(nullptr), + ElectronStep(nullptr), + PvStep(nullptr), + METStep(nullptr) { + JetSteps.clear(); +// CaloJetSteps.clear(); +// PFJetSteps.clear(); + // configure preselection + edm::ParameterSet presel = + cfg.getParameter("preselection"); + if (presel.existsAs("trigger")) { + edm::ParameterSet trigger = + presel.getParameter("trigger"); + triggerTable__ = consumes( + trigger.getParameter("src")); + triggerPaths_ = trigger.getParameter >("select"); + } + if (presel.existsAs("beamspot")) { + edm::ParameterSet beamspot = + presel.getParameter("beamspot"); + beamspot_ = beamspot.getParameter("src"); + beamspot__ = + consumes(beamspot.getParameter("src")); + beamspotSelect_.reset(new StringCutObjectSelector( + beamspot.getParameter("select"))); + } + + // conifgure the selection + sel_ = cfg.getParameter >("selection"); + setup_ = cfg.getParameter("setup"); + for (unsigned int i = 0; i < sel_.size(); ++i) { + selectionOrder_.push_back(sel_.at(i).getParameter("label")); + selection_[selectionStep(selectionOrder_.back())] = std::make_pair( + sel_.at(i), + std::unique_ptr( + new TopSingleLepton_miniAOD::MonitorEnsemble( + selectionStep(selectionOrder_.back()).c_str(), + setup_, consumesCollector()))); + } + for (std::vector::const_iterator selIt = selectionOrder_.begin(); + selIt != selectionOrder_.end(); ++selIt) { + std::string key = selectionStep(*selIt), type = objectType(*selIt); + cout<(selection_[key].first, + consumesCollector())); + cout<<"muon step"<( + selection_[key].first, consumesCollector())); + cout<<"elec step"<(selection_[key].first, + consumesCollector())); + cout<<"pvs step"<>( + new SelectionStep(selection_[key].first, consumesCollector()))); + cout<<"jets step"<>( +// new SelectionStep(selection_[key].first, consumesCollector()))); +// } + // if (type == "jets/calo") { + // CaloJetSteps.push_back(std::unique_ptr>( + // new SelectionStep(selection_[key].first, consumesCollector()))); + // } + if (type == "met") { + METStep.reset(new SelectionStep(selection_[key].first, + consumesCollector())); + cout<<"met step"<second.second->book(ibooker); + } +} +void TopSingleLeptonDQM_miniAOD::analyze(const edm::Event& event, + const edm::EventSetup& setup) { + + if (!triggerTable__.isUninitialized()) { + edm::Handle triggerTable; + if (!event.getByToken(triggerTable__, triggerTable)) return; + if (!accept(event, *triggerTable, triggerPaths_)) return; + } + if (!beamspot__.isUninitialized()) { + edm::Handle beamspot; + if (!event.getByToken(beamspot__, beamspot)) return; + if (!(*beamspotSelect_)(*beamspot)) return; + } + // cout<<" apply selection steps"<::const_iterator selIt = selectionOrder_.begin(); + selIt != selectionOrder_.end(); ++selIt) { + std::string key = selectionStep(*selIt), type = objectType(*selIt); + if (selection_.find(key) != selection_.end()) { + if (type == "empty") { + selection_[key].second->fill(event, setup); + } + if (type == "muons" && MuonStep != 0) { + if (MuonStep->select(event)) { + ++passed; + // cout<<"selected event! "<fill(event, setup); + } else + break; + } + // cout<<" apply selection steps 2"<select(event/*, "electron"*/)) { + ++passed; + selection_[key].second->fill(event, setup); + } else + break; + } + // cout<<" apply selection steps 3"<selectVertex(event)) { + ++passed; + selection_[key].second->fill(event, setup); + } else + break; + } + // cout<<" apply selection steps 4"<select(event, setup)) { + ++passed; + selection_[key].second->fill(event, setup); + } else + break; + } + } +/* if (type == "jets/pf") { + nPFJetSteps++; + if (PFJetSteps[nPFJetSteps] != NULL) { + if (PFJetSteps[nPFJetSteps]->select(event, setup)) { + ++passed; + selection_[key].second->fill(event, setup); + } else + break; + } + } + if (type == "jets/calo") { + nCaloJetSteps++; + if (CaloJetSteps[nCaloJetSteps] != NULL) { + if (CaloJetSteps[nCaloJetSteps]->select(event, setup)) { + ++passed; + selection_[key].second->fill(event, setup); + } else + break; + } + }*/ + if (type == "met" && METStep != 0) { + if (METStep->select(event)) { + ++passed; + selection_[key].second->fill(event, setup); + } else + break; + } + } + } +} + +// Local Variables: +// show-trailing-whitespace: t +// truncate-lines: t +// End: diff --git a/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h new file mode 100644 index 0000000000000..3755d0ab42deb --- /dev/null +++ b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h @@ -0,0 +1,354 @@ +#ifndef TOPSINGLELEPTONDQM_MINIAOD +#define TOPSINGLELEPTONDQM_MINIAOD + +#include +#include +#include "FWCore/Utilities/interface/EDGetToken.h" +#include "FWCore/Framework/interface/Event.h" +#include "DQMServices/Core/interface/DQMStore.h" +#include "DQMServices/Core/interface/MonitorElement.h" + +#include "DataFormats/JetReco/interface/Jet.h" +#include "DQM/Physics/interface/TopDQMHelpers.h" +#include "DataFormats/Common/interface/ValueMap.h" +#include "DataFormats/METReco/interface/CaloMET.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +#include "JetMETCorrections/Objects/interface/JetCorrector.h" +#include "DataFormats/EgammaCandidates/interface/GsfElectron.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "FWCore/Framework/interface/EDConsumerBase.h" +#include "FWCore/Utilities/interface/EDGetToken.h" + + +#include "DataFormats/PatCandidates/interface/Muon.h" +#include "DataFormats/PatCandidates/interface/Electron.h" +#include "DataFormats/PatCandidates/interface/Jet.h" +#include "DataFormats/PatCandidates/interface/MET.h" +/** + \class MonitorEnsemble TopDQMHelpers.h + "DQM/Physics/interface/TopDQMHelpers.h" + + \brief Helper class to define histograms for monitoring of + muon/electron/jet/met quantities. + + Helper class to contain histograms for the monitoring of + muon/electron/jet/met quantities. + This class can be instantiated several times after several event selection + steps. It can + be used to fill histograms in three different granularity levels according to + STANDARD + (<10 histograms), VERBOSE(<20 histograms), DEBUG(<30 histgorams). Note that + for the sake + of simplicity and to force the analyst to keep the number of histograms to be + monitored + small the MonitorEnsemble class contains the histograms for all objects at + once. It should + not contain much more than 10 histograms though in the STANDARD + configuration, as these + histograms will be monitored at each SelectionStep. Monitoring of histograms + after selec- + tion steps within the same object collection needs to be implemented within + the Monitor- + Ensemble. It will not be covered by the SelectionStep class. +*/ + +namespace TopSingleLepton_miniAOD { + +class MonitorEnsemble { + public: + /// different verbosity levels + enum Level { + STANDARD, + VERBOSE, + DEBUG + }; + + public: + /// default contructor + MonitorEnsemble(const char* label, const edm::ParameterSet& cfg, + edm::ConsumesCollector&& iC); + /// default destructor + ~MonitorEnsemble() {}; + + /// book histograms in subdirectory _directory_ + void book(DQMStore::IBooker & ibooker); + /// fill monitor histograms with electronId and jetCorrections + void fill(const edm::Event& event, const edm::EventSetup& setup); + + private: + /// deduce monitorPath from label, the label is expected + /// to be of type 'selectionPath:monitorPath' + std::string monitorPath(const std::string& label) const { + return label.substr(label.find(':') + 1); + }; + /// deduce selectionPath from label, the label is + /// expected to be of type 'selectionPath:monitorPath' + std::string selectionPath(const std::string& label) const { + return label.substr(0, label.find(':')); + }; + + /// set configurable labels for trigger monitoring histograms + void triggerBinLabels(std::string channel, + const std::vector labels); + /// fill trigger monitoring histograms + void fill(const edm::Event& event, const edm::TriggerResults& triggerTable, + std::string channel, const std::vector labels) const; + + /// check if histogram was booked + bool booked(const std::string histName) const { + return hists_.find(histName.c_str()) != hists_.end(); + }; + /// fill histogram if it had been booked before + void fill(const std::string histName, double value) const { + if (booked(histName.c_str())) + hists_.find(histName.c_str())->second->Fill(value); + }; + /// fill histogram if it had been booked before (2-dim version) + void fill(const std::string histName, double xValue, double yValue) const { + if (booked(histName.c_str())) + hists_.find(histName.c_str())->second->Fill(xValue, yValue); + }; + /// fill histogram if it had been booked before (2-dim version) + void fill(const std::string histName, double xValue, double yValue, + double zValue) const { + if (booked(histName.c_str())) + hists_.find(histName.c_str())->second->Fill(xValue, yValue, zValue); + }; + + private: + /// verbosity level for booking + Level verbosity_; + /// instance label + std::string label_; + /// considers a vector of METs + std::vector > > mets_; + /// input sources for monitoring + edm::EDGetTokenT > jets_; + edm::EDGetTokenT > muons_; + edm::EDGetTokenT > elecs_; + edm::EDGetTokenT > pvs_; + /// trigger table + edm::EDGetTokenT triggerTable_; + /// trigger paths for monitoring, expected + /// to be of form signalPath:MonitorPath + std::vector triggerPaths_; + + /// electronId label + edm::EDGetTokenT > electronId_; + /// electronId pattern we expect the following pattern: + /// 0: fails + /// 1: passes electron ID only + /// 2: passes electron Isolation only + /// 3: passes electron ID and Isolation only + /// 4: passes conversion rejection + /// 5: passes conversion rejection and ID + /// 6: passes conversion rejection and Isolation + /// 7: passes the whole selection + /// As described on + /// https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID + // int eidPattern_; + // the cut for the MVA Id + double eidCutValue_; + /// extra isolation criterion on electron + std::unique_ptr > elecIso_; + /// extra selection on electrons + std::unique_ptr > elecSelect_; + + /// extra selection on primary vertices; meant to investigate the pile-up + /// effect + std::unique_ptr > pvSelect_; + + /// extra isolation criterion on muon + std::unique_ptr > muonIso_; + + /// extra selection on muons + std::unique_ptr > muonSelect_; + + /// jetCorrector + std::string jetCorrector_; + /// jetID as an extra selection type + edm::EDGetTokenT jetIDLabel_; + /// extra jetID selection on calo jets + std::unique_ptr > jetIDSelect_; + /// extra selection on jets (here given as std::string as it depends + /// on the the jet type, which selections are valid and which not) + std::string jetSelect_; + /// include btag information or not + /// to be determined from the cfg + bool includeBTag_; + /// btag discriminator labels + edm::EDGetTokenT btagEff_, btagPur_, btagVtx_, + btagCSV_; + /// btag working points + double btagEffWP_, btagPurWP_, btagVtxWP_, btagCSVWP_; + /// mass window upper and lower edge + double lowerEdge_, upperEdge_; + + /// number of logged interesting events + int logged_; + + /// histogram container + std::map hists_; + edm::EDConsumerBase tmpConsumerBase; + + std::string directory_; +}; + +inline void MonitorEnsemble::triggerBinLabels( + std::string channel, const std::vector labels) { + for (unsigned int idx = 0; idx < labels.size(); ++idx) { + hists_[(channel + "Mon_").c_str()] + ->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1); + hists_[(channel + "Eff_").c_str()] + ->setBinLabel(idx + 1, "[" + selectionPath(labels[idx]) + "]|[" + + monitorPath(labels[idx]) + "]", + 1); + } +} + +inline void MonitorEnsemble::fill(const edm::Event& event, + const edm::TriggerResults& triggerTable, + std::string channel, + const std::vector labels) const { + for (unsigned int idx = 0; idx < labels.size(); ++idx) { + if (accept(event, triggerTable, monitorPath(labels[idx]))) { + fill((channel + "Mon_").c_str(), idx + 0.5); + // take care to fill triggerMon_ before evts is being called + int evts = hists_.find((channel + "Mon_").c_str()) + ->second->getBinContent(idx + 1); + double value = hists_.find((channel + "Eff_").c_str()) + ->second->getBinContent(idx + 1); + fill( + (channel + "Eff_").c_str(), idx + 0.5, + 1. / evts * (accept(event, triggerTable, selectionPath(labels[idx])) - + value)); + } + } +} +} + +#include + +#include "DQM/Physics/interface/TopDQMHelpers.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "FWCore/Common/interface/TriggerNames.h" +#include "DataFormats/BeamSpot/interface/BeamSpot.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/Common/interface/TriggerResults.h" +#include "DQMServices/Core/interface/DQMEDAnalyzer.h" + +/** + \class TopSingleLeptonDQM TopSingleLeptonDQM.h + "DQM/Physics/plugins/TopSingleLeptonDQM.h" + + \brief Module to apply a monitored selection of top like events in the + semi-leptonic channel + + Plugin to apply a monitored selection of top like events with some minimal + flexibility + in the number and definition of the selection steps. To achieve this + flexibility it + employes the SelectionStep class. The MonitorEnsemble class is used to + provide a well + defined set of histograms to be monitored after each selection step. The + SelectionStep + class provides a flexible and intuitive selection via the StringCutParser. + SelectionStep + and MonitorEnsemble classes are interleaved. The monitoring starts after a + preselection + step (which is not monitored in the context of this module) with an instance + of the + MonitorEnsemble class. The following objects are supported for selection: + + - jets : of type pat::Jet (jets) + + - elecs : of type pat::Electron + - muons : of type pat::Muon + - met : of type pat::MET + + These types have to be present as prefix of the selection step paramter + _label_ separated + from the rest of the label by a ':' (e.g. in the form "jets:step0"). The + class expects + selection labels of this type. They will be disentangled by the private + helper functions + _objectType_ and _seletionStep_ as declared below. +*/ + +/// define MonitorEnsembple to be used +// using TopSingleLepton::MonitorEnsemble; + +class TopSingleLeptonDQM_miniAOD : public DQMEDAnalyzer { + public: + /// default constructor + TopSingleLeptonDQM_miniAOD(const edm::ParameterSet& cfg); + /// default destructor + ~TopSingleLeptonDQM_miniAOD() {}; + + /// do this during the event loop + virtual void analyze(const edm::Event& event, const edm::EventSetup& setup); + + protected: + //Book histograms + void bookHistograms(DQMStore::IBooker &, + edm::Run const &, edm::EventSetup const &) override; + + private: + /// deduce object type from ParameterSet label, the label + /// is expected to be of type 'objectType:selectionStep' + std::string objectType(const std::string& label) { + return label.substr(0, label.find(':')); + }; + /// deduce selection step from ParameterSet label, the + /// label is expected to be of type 'objectType:selectionStep' + std::string selectionStep(const std::string& label) { + return label.substr(label.find(':') + 1); + }; + + private: + /// trigger table + edm::EDGetTokenT triggerTable__; + /// trigger paths + std::vector triggerPaths_; + /// string cut selector + std::unique_ptr > vertexSelect_; + + /// beamspot + edm::InputTag beamspot_; + edm::EDGetTokenT beamspot__; + /// string cut selector + std::unique_ptr > beamspotSelect_; + + /// needed to guarantee the selection order as defined by the order of + /// ParameterSets in the _selection_ vector as defined in the config + std::vector selectionOrder_; + /// this is the heart component of the plugin; std::string keeps a label + /// the selection step for later identification, edm::ParameterSet keeps + /// the configuration of the selection for the SelectionStep class, + /// MonitoringEnsemble keeps an instance of the MonitorEnsemble class to + /// be filled _after_ each selection step + std::map > > + selection_; + std::unique_ptr > MuonStep; + std::unique_ptr > ElectronStep; + std::unique_ptr > PvStep; + std::unique_ptr > METStep; + std::vector > > JetSteps; +// std::vector > > CaloJetSteps; +// std::vector > > PFJetSteps; + + std::vector sel_; + edm::ParameterSet setup_; +}; + +#endif + +/* Local Variables: */ +/* show-trailing-whitespace: t */ +/* truncate-lines: t */ +/* End: */ diff --git a/DQM/Physics/src/plugins.cc b/DQM/Physics/src/plugins.cc index 20ec33543b1a6..ed1d1ac580ba8 100644 --- a/DQM/Physics/src/plugins.cc +++ b/DQM/Physics/src/plugins.cc @@ -10,8 +10,12 @@ #include "DQM/Physics/src/QcdLowPtDQM.h" #include "DQM/Physics/src/QcdHighPtDQM.h" #include "DQM/Physics/src/TopDiLeptonOfflineDQM.h" + #include "DQM/Physics/src/TopSingleLeptonDQM.h" +#include "DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h" + #include "DQM/Physics/src/SingleTopTChannelLeptonDQM.h" + #include "DQM/Physics/src/SusyDQM.h" #include "DQM/Physics/src/QcdUeDQM.h" #include "DQM/Physics/src/HiggsDQM.h" diff --git a/DQM/Physics/test/topDQM_production_miniAOD.py b/DQM/Physics/test/topDQM_production_miniAOD.py new file mode 100644 index 0000000000000..e7c397c5eecb4 --- /dev/null +++ b/DQM/Physics/test/topDQM_production_miniAOD.py @@ -0,0 +1,121 @@ +import FWCore.ParameterSet.Config as cms + +process = cms.Process('TOPDQM') + +## imports of standard configurations +process.load('DQMOffline.Configuration.DQMOffline_cff') +process.load('Configuration.StandardSequences.EndOfProcess_cff') +process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff') + +## -------------------------------------------------------------------- +## Frontier Conditions: (adjust accordingly!!!) +## +## For CMSSW_3_8_X MC use ---> 'START38_V12::All' +## For Data (38X re-processing) use ---> 'GR_R_38X_V13::All' +## For Data (38X prompt reco) use ---> 'GR10_P_V10::All' +## +## For more details have a look at: WGuideFrontierConditions +## -------------------------------------------------------------------- +##process.GlobalTag.globaltag = 'GR_R_42_V14::All' +process.GlobalTag.globaltag = 'PRE_ST62_V8::All' + + +#dbs search --query 'find file where site=srm-eoscms.cern.ch and dataset=/RelValTTbar/CMSSW_7_0_0_pre3-PRE_ST62_V8-v1/GEN-SIM-RECO' +#dbs search --query 'find dataset where dataset=/RelValTTbar/CMSSW_7_0_0_pre6*/GEN-SIM-RECO' + +## input file(s) for testing +process.source = cms.Source("PoolSource", + #fileNames = cms.untracked.vstring("file:input.root',") + fileNames = cms.untracked.vstring( + #"/store/relval/CMSSW_6_2_0_pre1-START61_V8/RelValTTbarLepton/GEN-SIM-RECO/v1/00000/C6CC53CC-6E6D-E211-8EAB-003048D3756A.root'," + + #/RelValTTbar/CMSSW_7_0_0_pre6-PRE_ST62_V8-v1/GEN-SIM-RECO + #'/store/relval/CMSSW_7_0_0_pre6/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/B627D32C-0B3C-E311-BBE6-0026189438E6.root', + #'/store/relval/CMSSW_7_0_0_pre6/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/72477A84-F93B-E311-BF63-003048FFD720.root', + #'/store/relval/CMSSW_7_0_0_pre6/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/12A06D7A-F93B-E311-AA64-003048678BEA.root' + # '/store/relval/CMSSW_7_1_0_pre4/RelValTTbarLepton_13/GEN-SIM-RECO/POSTLS171_V1-v2/00000/48ED95A2-66AA-E311-9865-02163E00E5AE.root' +# '/store/relval/CMSSW_7_1_0_pre9/RelValTTbarLepton_13/GEN-SIM-RECO/POSTLS171_V11-v1/00000/90D92DC6-67F0-E311-8D2E-0025905A613C.root' + + '/store/mc/RunIISpring15MiniAODv2/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/74X_mcRun2_asymptotic_v2_ext3-v1/10000/003964D7-D06E-E511-A8DA-001517F7F524.root' + ) +) + +## number of events +process.maxEvents = cms.untracked.PSet( + input = cms.untracked.int32(-1) +) + +## apply VBTF electronID (needed for the current implementation +## of topSingleElectronDQMLoose and topSingleElectronDQMMedium) +#process.load("Configuration.StandardSequences.GeometryRecoDB_cff") +process.load("Configuration.StandardSequences.GeometryRecoDB_cff") +process.load("Configuration.StandardSequences.MagneticField_cff") +process.load("DQM.Physics.topElectronID_cff") +process.load('Configuration/StandardSequences/Reconstruction_cff') + + +## output +process.output = cms.OutputModule("PoolOutputModule", + fileName = cms.untracked.string('topDQM_production.root'), + outputCommands = cms.untracked.vstring( + 'drop *_*_*_*', + 'keep *_*_*_TOPDQM', + 'drop *_TriggerResults_*_TOPDQM', + 'drop *_simpleEleId70cIso_*_TOPDQM', + ), + splitLevel = cms.untracked.int32(0), + dataset = cms.untracked.PSet( + dataTier = cms.untracked.string(''), + filterName = cms.untracked.string('') + ) +) + +## load jet corrections +#process.load("JetMETCorrections.Configuration.JetCorrectionServicesAllAlgos_cff") +#process.prefer("ak4PFL2L3") + +## check the event content +process.content = cms.EDAnalyzer("EventContentAnalyzer") + +## configure message logger +process.load("FWCore.MessageLogger.MessageLogger_cfi") +process.MessageLogger.cerr.threshold = 'INFO' +process.MessageLogger.categories.append('TopSingleLeptonDQM' ) +process.MessageLogger.cerr.TopSingleLeptonDQM = cms.untracked.PSet(limit = cms.untracked.int32(1)) +process.MessageLogger.categories.append('TopDiLeptonOfflineDQM') +process.MessageLogger.cerr.TopDiLeptonOfflineDQM = cms.untracked.PSet(limit = cms.untracked.int32(1)) +process.MessageLogger.categories.append('SingleTopTChannelLeptonDQM' ) +process.MessageLogger.cerr.SingleTopTChannelLeptonDQM = cms.untracked.PSet(limit = cms.untracked.int32(1)) +process.MessageLogger.cerr.FwkReport.reportEvery = 100 +process.MEtoEDMConverter.deleteAfterCopy = cms.untracked.bool(False) ## line added to avoid crash when changing run number + + +process.load("DQM.Physics.topSingleLeptonDQM_miniAOD_cfi") + + +## path definitions +process.p = cms.Path( +# process.simpleEleId70cIso * +# process.DiMuonDQM + +# process.DiElectronDQM + +# process.ElecMuonDQM + + #process.topSingleMuonLooseDQM + + process.topSingleMuonMediumDQM_miniAOD + + #process.topSingleElectronLooseDQM + + process.topSingleElectronMediumDQM_miniAOD +# process.singleTopMuonMediumDQM + +# process.singleTopElectronMediumDQM +) +process.endjob = cms.Path( + process.endOfProcess +) +process.fanout = cms.EndPath( + process.output +) + +## schedule definition +process.schedule = cms.Schedule( + process.p, + process.endjob, + process.fanout +) diff --git a/DQMOffline/Configuration/python/DQMOffline_cff.py b/DQMOffline/Configuration/python/DQMOffline_cff.py index d956609430ddb..9efced67a7e96 100644 --- a/DQMOffline/Configuration/python/DQMOffline_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_cff.py @@ -42,6 +42,7 @@ from DQMOffline.RecoB.PrimaryVertexMonitor_cff import * from DQMOffline.RecoB.dqmAnalyzer_cff import * from DQM.Physics.DQMPhysics_cff import * +from DQM.Physics.DQMTopMiniAOD_cff import * from Validation.RecoTau.DQMSequences_cfi import * from DQM.TrackingMonitorSource.TrackingSourceConfig_Tier0_cff import * # miniAOD DQM validation @@ -131,9 +132,11 @@ DQMOfflineBTag = cms.Sequence( bTagPlotsDATA ) + DQMOfflineMiniAOD = cms.Sequence() #Post sequences are automatically placed in the EndPath by ConfigBuilder if PAT is run. #miniAOD DQM sequences need to access the filter results. -PostDQMOfflineMiniAOD = cms.Sequence(miniAODDQMSequence*jetMETDQMOfflineSourceMiniAOD*tracksDQMMiniAOD) +PostDQMOfflineMiniAOD = cms.Sequence(miniAODDQMSequence*jetMETDQMOfflineSourceMiniAOD*tracksDQMMiniAOD*topPhysicsminiAOD) PostDQMOffline = cms.Sequence() + From b717d7ed0c9a88c07ac7f9b7233673f4bd291c4b Mon Sep 17 00:00:00 2001 From: Bugra Date: Thu, 3 Dec 2015 16:41:06 +0100 Subject: [PATCH 194/250] bugfix --- DQM/Physics/python/DQMTopMiniAOD_cff.py | 4 ++-- DQM/Physics/src/plugins.cc | 1 + DQM/Physics/test/topDQM_production_miniAOD.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DQM/Physics/python/DQMTopMiniAOD_cff.py b/DQM/Physics/python/DQMTopMiniAOD_cff.py index e61eb0535e3b7..2259085811f0c 100644 --- a/DQM/Physics/python/DQMTopMiniAOD_cff.py +++ b/DQM/Physics/python/DQMTopMiniAOD_cff.py @@ -2,6 +2,6 @@ from DQM.Physics.topSingleLeptonDQM_miniAOD_cfi import * -topPhysicsminiAOD = cms.Sequence( process.topSingleMuonMediumDQM_miniAOD + - process.topSingleElectronMediumDQM_miniAOD +topPhysicsminiAOD = cms.Sequence( topSingleMuonMediumDQM_miniAOD + *topSingleElectronMediumDQM_miniAOD ) diff --git a/DQM/Physics/src/plugins.cc b/DQM/Physics/src/plugins.cc index ed1d1ac580ba8..5bc62fda6aa88 100644 --- a/DQM/Physics/src/plugins.cc +++ b/DQM/Physics/src/plugins.cc @@ -33,6 +33,7 @@ DEFINE_FWK_MODULE(QcdPhotonsDQM); DEFINE_FWK_MODULE(QcdLowPtDQM); DEFINE_FWK_MODULE(QcdHighPtDQM); DEFINE_FWK_MODULE(TopSingleLeptonDQM); +DEFINE_FWK_MODULE(TopSingleLeptonDQM_miniAOD); DEFINE_FWK_MODULE(SingleTopTChannelLeptonDQM); DEFINE_FWK_MODULE(TopDiLeptonOfflineDQM); DEFINE_FWK_MODULE(RecoSusyDQM); diff --git a/DQM/Physics/test/topDQM_production_miniAOD.py b/DQM/Physics/test/topDQM_production_miniAOD.py index e7c397c5eecb4..cb41319b6e7c7 100644 --- a/DQM/Physics/test/topDQM_production_miniAOD.py +++ b/DQM/Physics/test/topDQM_production_miniAOD.py @@ -17,7 +17,7 @@ ## For more details have a look at: WGuideFrontierConditions ## -------------------------------------------------------------------- ##process.GlobalTag.globaltag = 'GR_R_42_V14::All' -process.GlobalTag.globaltag = 'PRE_ST62_V8::All' +process.GlobalTag.globaltag = 'MCRUN2_74_V9' #dbs search --query 'find file where site=srm-eoscms.cern.ch and dataset=/RelValTTbar/CMSSW_7_0_0_pre3-PRE_ST62_V8-v1/GEN-SIM-RECO' From 19bad6945573ea5f110fb4592dcc1522dd9bfffa Mon Sep 17 00:00:00 2001 From: Bugra Date: Thu, 3 Dec 2015 18:28:38 +0100 Subject: [PATCH 195/250] added single top analyzer, bugfix for ttbarsinglelepton --- DQM/Physics/python/DQMTopMiniAOD_cff.py | 3 + .../python/singleTopDQM_miniAOD_cfi.py | 453 +++++++ .../src/SingleTopTChannelLeptonDQM_miniAOD.cc | 1106 +++++++++++++++++ .../src/SingleTopTChannelLeptonDQM_miniAOD.h | 368 ++++++ DQM/Physics/src/TopDQMHelpers.cc | 15 + DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc | 12 +- DQM/Physics/src/plugins.cc | 5 +- DQM/Physics/test/topDQM_harvesting_cfg.py | 2 +- DQM/Physics/test/topDQM_production_miniAOD.py | 7 +- 9 files changed, 1958 insertions(+), 13 deletions(-) create mode 100644 DQM/Physics/python/singleTopDQM_miniAOD_cfi.py create mode 100644 DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc create mode 100644 DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h diff --git a/DQM/Physics/python/DQMTopMiniAOD_cff.py b/DQM/Physics/python/DQMTopMiniAOD_cff.py index 2259085811f0c..d5f081dd9186d 100644 --- a/DQM/Physics/python/DQMTopMiniAOD_cff.py +++ b/DQM/Physics/python/DQMTopMiniAOD_cff.py @@ -1,7 +1,10 @@ import FWCore.ParameterSet.Config as cms from DQM.Physics.topSingleLeptonDQM_miniAOD_cfi import * +from DQM.Physics.singleTopDQM_miniAOD_cfi import * topPhysicsminiAOD = cms.Sequence( topSingleMuonMediumDQM_miniAOD *topSingleElectronMediumDQM_miniAOD + *singleTopMuonMediumDQM_miniAOD + *singleTopElectronMediumDQM_miniAOD ) diff --git a/DQM/Physics/python/singleTopDQM_miniAOD_cfi.py b/DQM/Physics/python/singleTopDQM_miniAOD_cfi.py new file mode 100644 index 0000000000000..c9ecbb85e72ea --- /dev/null +++ b/DQM/Physics/python/singleTopDQM_miniAOD_cfi.py @@ -0,0 +1,453 @@ +import FWCore.ParameterSet.Config as cms + +EletightIsoCut = "(pfIsolationVariables.sumChargedHadronPt + max(0., pfIsolationVariables.sumNeutralHadronEt + pfIsolationVariables.sumPhotonEt - 0.5 * pfIsolationVariables.sumPUPt) ) / pt < 0.1" +ElelooseIsoCut = "(pfIsolationVariables.sumChargedHadronPt + max(0., pfIsolationVariables.sumNeutralHadronEt + pfIsolationVariables.sumPhotonEt - 0.5 * pfIsolationVariables.sumPUPt) ) / pt < 0.15" + + +singleTopTChannelLeptonDQM_miniAOD = cms.EDAnalyzer("SingleTopTChannelLeptonDQM_miniAOD", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("Physics/Top/SingleTopDQM/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("slimmedMuons"), + elecs = cms.InputTag("slimmedElectrons"), + jets = cms.InputTag("slimmedJets"), + mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"), + pvs = cms.InputTag("offlineSlimmedPrimaryVertices") + ), + ## [optional] : when omitted the verbosity level is set to STANDARD + monitoring = cms.PSet( + verbosity = cms.string("DEBUG") + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras +# pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates +# select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") +# ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + ##electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.5) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>15 & abs(eta)<2.5 & abs(gsfTrack.d0)<1 & abs(gsfTrack.dz)<20"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + isolation = cms.string(ElelooseIsoCut), + ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string("pt>10 & abs(eta)<2.1 & isGlobalMuon & abs(globalTrack.d0)<1 & abs(globalTrack.dz)<20"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot +# isolation = cms.string("(isolationR03.sumPt+isolationR03.emEt+isolationR03.hadEt)/pt<0.1"), + ), + ## [optional] : when omitted all monitoring plots for jets will + ## be filled from uncorrected jets + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + #jetCorrector = cms.string("ak4CaloL2L3"), + ## when omitted monitor plots will be filled w/o additional cut on + ## jetID +# jetID = cms.PSet( +# label = cms.InputTag("ak4JetID"), +# select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") +# ), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>15 & abs(eta)<2.5 & emEnergyFraction>0.01"), + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass befor filling the event monitoring plots +# massExtras = cms.PSet( +# lowerEdge = cms.double( 70.), +# upperEdge = cms.double(110.) +# ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty + triggerExtras = cms.PSet( + src = cms.InputTag("TriggerResults","","HLT"), + paths = cms.vstring(['HLT_Mu3:HLT_QuadJet15U', + 'HLT_Mu5:HLT_QuadJet15U', + 'HLT_Mu7:HLT_QuadJet15U', + 'HLT_Mu9:HLT_QuadJet15U']) + ) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied +# trigger = cms.PSet( +# src = cms.InputTag("TriggerResults","","HLT"), +# select = cms.vstring(['HLT_Mu11', 'HLT_Ele15_LW_L1R', 'HLT_QuadJet30']) +# ), + ## [optional] : when omitted no preselection is applied +# vertex = cms.PSet( +# src = cms.InputTag("offlineSlimmedPrimaryVertices"), +# select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') +# ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + ## + selection = cms.VPSet( + cms.PSet( + label = cms.string("jets/calo:step0"), + src = cms.InputTag("ak4CaloJets"), + select = cms.string("pt>20 & abs(eta)<2.1 & 0.051 & restrictedEMF<1") + ), + min = cms.int32(2), + ) + ) +) + +singleTopMuonMediumDQM_miniAOD = cms.EDAnalyzer("SingleTopTChannelLeptonDQM_miniAOD", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("Physics/Top/SingleTopMuonMediumDQM/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("slimmedMuons"), + elecs_gsf = cms.InputTag("slimmedElectrons"), + elecs = cms.InputTag("slimmedElectrons"), + jets = cms.InputTag("slimmedJets"), + mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"), + pvs = cms.InputTag("offlineSlimmedPrimaryVertices") + ), + ## [optional] : when omitted the verbosity level is set to STANDARD + monitoring = cms.PSet( + verbosity = cms.string("DEBUG") + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras +# pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates +# select = cms.string("") #abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") +# ), + ## [optional] : when omitted all monitoring plots for muons + ## will be filled w/o extras + muonExtras = cms.PSet( + ## when omitted muon plots will be filled w/o additional pre- + ## selection of the muon candidates + select = cms.string("abs(eta)<2.1") + ## & isGlobalMuon & innerTrack.numberOfValidHits>10 & globalTrack.normalizedChi2>-1 & globalTrack.normalizedChi2<10 + ##& (isolationR03.sumPt+isolationR03.emEt+isolationR03.hadEt)/pt<0.1"), + ## when omitted isolated muon multiplicity plot will be equi- + ## valent to inclusive muon multiplicity plot + ## isolation = cms.string("(isolationR03.sumPt+isolationR03.emEt+isolationR03.hadEt)/pt<10" ) + ## isolation = cms.string("(isolationR03.sumPt+isolationR03.emEt+isolationR03.hadEt)/pt<0.1") + ), + ## [optional] : when omitted all monitoring plots for jets + ## will be filled w/o extras + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + ## when omitted monitor plots will be filled w/o additional cut on + ## jetID +# jetID = cms.PSet( +# label = cms.InputTag("ak4JetID"), +# select = cms.string(""), ##fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") +# ), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>15 & abs(eta)<2.5"), # & neutralEmEnergyFraction >0.01 & chargedEmEnergyFraction>0.01"), + ## when omitted monitor histograms for b-tagging will not be filled + jetBTaggers = cms.PSet( + trackCountingEff = cms.PSet( + label = cms.InputTag("trackCountingHighEffBJetTags" ), + workingPoint = cms.double(1.25) + ), + trackCountingPur = cms.PSet( + label = cms.InputTag("trackCountingHighPurBJetTags" ), + workingPoint = cms.double(3.41) + ), + secondaryVertex = cms.PSet( + label = cms.InputTag("simpleSecondaryVertexHighEffBJetTags"), + workingPoint = cms.double(2.05) + ), + combinedSecondaryVertex = cms.PSet( + label = cms.InputTag("combinedSecondaryVertexBJetTags"), + workingPoint = cms.double(0.898) + ) + ) + ) + ## [optional] : when omitted no mass window will be applied + ## for the W mass before filling the event monitoring plots +# massExtras = cms.PSet( +# lowerEdge = cms.double( 70.), +# upperEdge = cms.double(110.) +# ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty +# triggerExtras = cms.PSet( +# src = cms.InputTag("TriggerResults","","HLT"), +# paths = cms.vstring(['HLT_IsoMu17_eta2p1_CentralPFNoPUJet30_BTagIPIter_v1']) +# 'HLT_IsoMu24_eta2p1_v12', +# 'HLT_IsoMu20_eta2p1_CentralPFJet30_BTagIPIter_v2', +# 'HLT_IsoMu20_eta2p1_CentralPFJet30_BTagIPIter_v3']) +# ) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied +# trigger = cms.PSet( +# src = cms.InputTag("TriggerResults","","HLT"), +# select = cms.vstring(['HLT_IsoMu17_eta2p1_CentralPFNoPUJet30_BTagIPIter_v1']) +# ), + ## [optional] : when omitted no preselection is applied +# vertex = cms.PSet( +# src = cms.InputTag("offlineSlimmedPrimaryVertices"), +# select = cms.string('!isFake && ndof >= 4 && abs(z)<24. && position.Rho <= 2.0') +# ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + selection = cms.VPSet( + cms.PSet( + label = cms.string("presel"), + src = cms.InputTag("offlineSlimmedPrimaryVertices"), +# select = cms.string('!isFake && ndof >= 4 && abs(z)<24. && position.Rho <= 2.0 '), + + ), + cms.PSet( + label = cms.string("muons:step0"), + src = cms.InputTag("slimmedMuons"), + select = cms.string("pt>20 & abs(eta)<2.1 & isGlobalMuon & isTrackerMuon & innerTrack.numberOfValidHits>10 & globalTrack.hitPattern.numberOfValidMuonHits>0 & globalTrack.normalizedChi2<10 & innerTrack.hitPattern.pixelLayersWithMeasurement>=1 & numberOfMatches>1 & abs(innerTrack.dxy)<0.02 & (pfIsolationR04.sumChargedHadronPt + pfIsolationR04.sumNeutralHadronEt + pfIsolationR04.sumPhotonEt)/pt < 0.15"), + + min = cms.int32(1), + max = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets:step1"), + src = cms.InputTag("slimmedJets"), + #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string(" pt>30 & abs(eta)<4.5 & numberOfDaughters>1 & ((abs(eta)>2.4) || ( chargedHadronEnergyFraction > 0 & chargedMultiplicity>0 & chargedEmEnergyFraction<0.99)) & neutralEmEnergyFraction < 0.99 & neutralHadronEnergyFraction < 0.99"), + + min = cms.int32(1), + max = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets:step2"), + src = cms.InputTag("slimmedJets"), + #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string(" pt>30 & abs(eta)<4.5 & numberOfDaughters>1 & ((abs(eta)>2.4) || ( chargedHadronEnergyFraction > 0 & chargedMultiplicity>0 & chargedEmEnergyFraction<0.99)) & neutralEmEnergyFraction < 0.99 & neutralHadronEnergyFraction < 0.99"), + + min = cms.int32(2), + max = cms.int32(2), + ) + ) +) + +singleTopElectronMediumDQM_miniAOD = cms.EDAnalyzer("SingleTopTChannelLeptonDQM_miniAOD", + ## ------------------------------------------------------ + ## SETUP + ## + ## configuration of the MonitoringEnsemble(s) + ## [mandatory] : optional PSets may be omitted + ## + setup = cms.PSet( + ## sub-directory to write the monitor histograms to + ## [mandatory] : should not be changed w/o explicit + ## communication to TopCom! + directory = cms.string("Physics/Top/SingleTopElectronMediumDQM/"), + ## [mandatory] + sources = cms.PSet( + muons = cms.InputTag("slimmedMuons"), + elecs_gsf = cms.InputTag("slimmedElectrons"), + elecs = cms.InputTag("slimmedElectrons"), + jets = cms.InputTag("slimmedJets"), + mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"), + pvs = cms.InputTag("offlineSlimmedPrimaryVertices") + + ), + ## [optional] : when omitted the verbosity level is set to STANDARD + monitoring = cms.PSet( + verbosity = cms.string("DEBUG") + ), + ## [optional] : when omitted all monitoring plots for primary vertices + ## will be filled w/o extras +# pvExtras = cms.PSet( + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the primary vertex candidates +# select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") +# ), + ## [optional] : when omitted all monitoring plots for electrons + ## will be filled w/o extras + elecExtras = cms.PSet( + ## when omitted electron plots will be filled w/o cut on electronId + ##electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.5) ), + ## when omitted electron plots will be filled w/o additional pre- + ## selection of the electron candidates + select = cms.string("pt>25"), ## & abs(eta)<2.5 & (dr03TkSumPt+dr03EcalRecHitSumEt+dr03HcalTowerSumEt)/pt<0.1"), + ## when omitted isolated electron multiplicity plot will be equi- + ## valent to inclusive electron multiplicity plot + ## isolation = cms.string(ElelooseIsoCut), + + ), + ## [optional] : when omitted all monitoring plots for jets + ## will be filled w/o extras + jetExtras = cms.PSet( + ## when omitted monitor plots for pt will be filled from uncorrected + ## jets + #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + ## when omitted monitor plots will be filled w/o additional cut on + ## jetID +# jetID = cms.PSet( +# label = cms.InputTag("ak4JetID"), +# select = cms.string(" ") +# ), + ## when omitted no extra selection will be applied on jets before + ## filling the monitor histograms; if jetCorrector is present the + ## selection will be applied to corrected jets + select = cms.string("pt>15 & abs(eta)<2.5"), ## & emEnergyFraction>0.01"), + ## when omitted monitor histograms for b-tagging will not be filled + jetBTaggers = cms.PSet( + trackCountingEff = cms.PSet( + label = cms.InputTag("trackCountingHighEffBJetTags" ), + workingPoint = cms.double(1.25) + ), + trackCountingPur = cms.PSet( + label = cms.InputTag("trackCountingHighPurBJetTags" ), + workingPoint = cms.double(3.41) + ), + secondaryVertex = cms.PSet( + label = cms.InputTag("simpleSecondaryVertexHighEffBJetTags"), + workingPoint = cms.double(2.05) + ), + combinedSecondaryVertex = cms.PSet( + label = cms.InputTag("combinedSecondaryVertexBJetTags"), + workingPoint = cms.double(0.898) + ) + ) + ), + ## [optional] : when omitted no mass window will be applied + ## for the W mass before filling the event monitoring plots +# massExtras = cms.PSet( +# lowerEdge = cms.double( 70.), +# upperEdge = cms.double(110.) +# ), + ## [optional] : when omitted the monitoring plots for triggering + ## will be empty +# triggerExtras = cms.PSet( +# src = cms.InputTag("TriggerResults","","HLT"), +# paths = cms.vstring([ 'HLT_Ele15_LW_L1R:HLT_QuadJetU15']) +## paths = cms.vstring(['']) +# ) + ), + ## ------------------------------------------------------ + ## PRESELECTION + ## + ## setup of the event preselection, which will not + ## be monitored + ## [mandatory] : but may be empty + ## + preselection = cms.PSet( + ## [optional] : when omitted no preselection is applied +# trigger = cms.PSet( +# src = cms.InputTag("TriggerResults","","HLT"), +# select = cms.vstring(['HLT_Ele15_SW_CaloEleId_L1R']) +# ), + ## [optional] : when omitted no preselection is applied +# vertex = cms.PSet( +# src = cms.InputTag("offlineSlimmedPrimaryVertices"), +# select = cms.string('!isFake && ndof >= 4 && abs(z)<24. && position.Rho <= 2.0') +# ) + ), + ## ------------------------------------------------------ + ## SELECTION + ## + ## monitor histrograms are filled after each selection + ## step, the selection is applied in the order defined + ## by this vector + ## [mandatory] : may be empty or contain an arbitrary + ## number of PSets + selection = cms.VPSet( + cms.PSet( + label = cms.string("presel"), + src = cms.InputTag("offlineSlimmedPrimaryVertices"), +# select = cms.string('!isFake && ndof >= 4 && abs(z)<24. && position.Rho <= 2.0'), + ), + cms.PSet( + label = cms.string("elecs:step0"), + src = cms.InputTag("slimmedElectrons"), +## electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.5) ), + select = cms.string("pt>30 & abs(eta)<2.5 & abs(gsfTrack.d0)<0.02 && gsfTrack.hitPattern().numberOfHits('MISSING_INNER_HITS') <= 0 && (abs(superCluster.eta) <= 1.4442 || abs(superCluster.eta) >= 1.5660) && " + EletightIsoCut), + min = cms.int32(1), + max = cms.int32(1), + ), + cms.PSet( + label = cms.string("jets:step1"), + src = cms.InputTag("slimmedJets"), + #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<4.5 & numberOfDaughters>1 & ((abs(eta)>2.4) || ( chargedHadronEnergyFraction > 0 & chargedMultiplicity>0 & chargedEmEnergyFraction<0.99)) & neutralEmEnergyFraction < 0.99 & neutralHadronEnergyFraction < 0.99"), + + min = cms.int32(1), + max = cms.int32(1), + + ), + cms.PSet( + label = cms.string("jets:step2"), + src = cms.InputTag("slimmedJets"), + #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string("pt>30 & abs(eta)<4.5 & numberOfDaughters>1 & ((abs(eta)>2.4) || ( chargedHadronEnergyFraction > 0 & chargedMultiplicity>0 & chargedEmEnergyFraction<0.99)) & neutralEmEnergyFraction < 0.99 & neutralHadronEnergyFraction < 0.99"), + + min = cms.int32(2), + max = cms.int32(2), + + ), + ) +) diff --git a/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc new file mode 100644 index 0000000000000..4f54b85855226 --- /dev/null +++ b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc @@ -0,0 +1,1106 @@ +#include "JetMETCorrections/Objects/interface/JetCorrectionsRecord.h" +#include "DataFormats/JetReco/interface/CaloJet.h" +#include "DataFormats/BTauReco/interface/JetTag.h" +#include "DataFormats/JetReco/interface/PFJet.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +#include "DataFormats/GsfTrackReco/interface/GsfTrack.h" +#include "DataFormats/Math/interface/deltaR.h" +#include +#include "FWCore/Utilities/interface/EDGetToken.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "FWCore/Framework/interface/EDConsumerBase.h" +#include "DataFormats/PatCandidates/interface/Electron.h" +using namespace std; +namespace SingleTopTChannelLepton_miniAOD { + +// maximal number of leading jets +// to be used for top mass estimate +static const unsigned int MAXJETS = 4; +// nominal mass of the W boson to +// be used for the top mass estimate +static const double WMASS = 80.4; + +MonitorEnsemble::MonitorEnsemble(const char* label, + const edm::ParameterSet& cfg, + const edm::VParameterSet& vcfg, + edm::ConsumesCollector&& iC) + : label_(label), + pvSelect_(nullptr), + jetIDSelect_(nullptr), + includeBTag_(false), + lowerEdge_(-1.), + upperEdge_(-1.), + logged_(0) { + // sources have to be given; this PSet is not optional + edm::ParameterSet sources = cfg.getParameter("sources"); + muons_ = iC.consumes>( + sources.getParameter("muons")); + elecs_gsf_ = iC.consumes>( + sources.getParameter("elecs_gsf")); + + jets_ = iC.consumes>( + sources.getParameter("jets")); + for (edm::InputTag const& tag : + sources.getParameter>("mets")) + mets_.push_back(iC.consumes>(tag)); + pvs_ = iC.consumes>( + sources.getParameter("pvs")); + // electronExtras are optional; they may be omitted or + // empty + if (cfg.existsAs("elecExtras")) { + edm::ParameterSet elecExtras = + cfg.getParameter("elecExtras"); + // select is optional; in case it's not found no + // selection will be applied + if (elecExtras.existsAs("select")) { + elecSelect_ = vcfg[1].getParameter("select"); + } + // isolation is optional; in case it's not found no + // isolation will be applied + if (elecExtras.existsAs("isolation")) { + elecIso_ = elecExtras.getParameter("isolation"); + } + + + // electronId is optional; in case it's not found the + // InputTag will remain empty + if (elecExtras.existsAs("electronId")) { + edm::ParameterSet elecId = + elecExtras.getParameter("electronId"); + electronId_ = iC.consumes>( + elecId.getParameter("src")); + eidCutValue_ = elecId.getParameter("cutValue"); + } + } + // pvExtras are opetional; they may be omitted or empty + if (cfg.existsAs("pvExtras")) { + edm::ParameterSet pvExtras = + cfg.getParameter("pvExtras"); + // select is optional; in case it's not found no + // selection will be applied + if (pvExtras.existsAs("select")) { + pvSelect_.reset(new StringCutObjectSelector( + pvExtras.getParameter("select"))); + } + } + // muonExtras are optional; they may be omitted or empty + if (cfg.existsAs( + "muonExtras")) { // && vcfg.existsAs + // >("selection")){ + edm::ParameterSet muonExtras = + cfg.getParameter("muonExtras"); + + // select is optional; in case it's not found no + // selection will be applied + if (muonExtras.existsAs("select")) { + muonSelect_ = vcfg[1].getParameter("select"); + } + // isolation is optional; in case it's not found no + // isolation will be applied + if (muonExtras.existsAs("isolation")) { + muonIso_ = muonExtras.getParameter("isolation"); + } + } + + + // jetExtras are optional; they may be omitted or + // empty + if (cfg.existsAs("jetExtras")) { + edm::ParameterSet jetExtras = + cfg.getParameter("jetExtras"); + // jetCorrector is optional; in case it's not found + // the InputTag will remain empty + if (jetExtras.existsAs("jetCorrector")) { + jetCorrector_ = jetExtras.getParameter("jetCorrector"); + } + // read jetID information if it exists + if (jetExtras.existsAs("jetID")) { + edm::ParameterSet jetID = + jetExtras.getParameter("jetID"); + jetIDLabel_ = iC.consumes( + jetID.getParameter("label")); + jetIDSelect_.reset(new StringCutObjectSelector( + jetID.getParameter("select"))); + } + // select is optional; in case it's not found no + // selection will be applied (only implemented for + // CaloJets at the moment) + if (jetExtras.existsAs("select")) { + + jetSelect_ = jetExtras.getParameter("select"); + jetSelect_ = vcfg[2].getParameter("select"); + } + + // jetBDiscriminators are optional; in case they are + // not found the InputTag will remain empty; they + // consist of pairs of edm::JetFlavorAssociation's & + // corresponding working points + /* includeBTag_ = jetExtras.existsAs("jetBTaggers"); + if (includeBTag_) { + edm::ParameterSet btagEff = + jetExtras.getParameter("jetBTaggers") + .getParameter("trackCountingEff"); + btagEff_ = iC.consumes( + btagEff.getParameter("label")); + btagEffWP_ = btagEff.getParameter("workingPoint"); + edm::ParameterSet btagPur = + jetExtras.getParameter("jetBTaggers") + .getParameter("trackCountingPur"); + btagPur_ = iC.consumes( + btagPur.getParameter("label")); + btagPurWP_ = btagPur.getParameter("workingPoint"); + edm::ParameterSet btagVtx = + jetExtras.getParameter("jetBTaggers") + .getParameter("secondaryVertex"); + btagVtx_ = iC.consumes( + btagVtx.getParameter("label")); + btagVtxWP_ = btagVtx.getParameter("workingPoint"); + edm::ParameterSet btagCombVtx = + jetExtras.getParameter("jetBTaggers") + .getParameter("combinedSecondaryVertex"); + btagCombVtx_ = iC.consumes( + btagCombVtx.getParameter("label")); + btagCombVtxWP_ = btagCombVtx.getParameter("workingPoint"); + } + */ + } + + // triggerExtras are optional; they may be omitted or empty + if (cfg.existsAs("triggerExtras")) { + edm::ParameterSet triggerExtras = + cfg.getParameter("triggerExtras"); + triggerTable_ = iC.consumes( + triggerExtras.getParameter("src")); + triggerPaths_ = + triggerExtras.getParameter>("paths"); + } + + // massExtras is optional; in case it's not found no mass + // window cuts are applied for the same flavor monitor + // histograms + if (cfg.existsAs("massExtras")) { + edm::ParameterSet massExtras = + cfg.getParameter("massExtras"); + lowerEdge_ = massExtras.getParameter("lowerEdge"); + upperEdge_ = massExtras.getParameter("upperEdge"); + } + + // setup the verbosity level for booking histograms; + // per default the verbosity level will be set to + // STANDARD. This will also be the chosen level in + // the case when the monitoring PSet is not found + verbosity_ = STANDARD; + if (cfg.existsAs("monitoring")) { + edm::ParameterSet monitoring = + cfg.getParameter("monitoring"); + if (monitoring.getParameter("verbosity") == "DEBUG") + verbosity_ = DEBUG; + if (monitoring.getParameter("verbosity") == "VERBOSE") + verbosity_ = VERBOSE; + if (monitoring.getParameter("verbosity") == "STANDARD") + verbosity_ = STANDARD; + } + // and don't forget to do the histogram booking + directory_ = cfg.getParameter("directory"); + + + muonSelect.reset(new StringCutObjectSelector(muonSelect_)); + muonIso.reset(new StringCutObjectSelector(muonIso_)); + + //jetSelectCalo=0; + //jetSelectPF=0; + //jetSelectJet=0; + + elecSelect.reset(new StringCutObjectSelector(elecSelect_)); + elecIso.reset(new StringCutObjectSelector(elecIso_)); + +} + +void MonitorEnsemble::book(DQMStore::IBooker & ibooker) { + // set up the current directory path + std::string current(directory_); + current += label_; + ibooker.setCurrentFolder(current); + + // determine number of bins for trigger monitoring + unsigned int nPaths = triggerPaths_.size(); + + // --- [STANDARD] --- // + // number of selected primary vertices + hists_["pvMult_"] = ibooker.book1D("PvMult", "N_{pvs}", 100, 0., 100.); + // pt of the leading muon + hists_["muonPt_"] = ibooker.book1D("MuonPt", "pt(#mu)", 50, 0., 250.); + // muon multiplicity before std isolation + hists_["muonMult_"] = ibooker.book1D("MuonMult", "N_{20}(#mu)", 10, 0., 10.); + // muon multiplicity after std isolation + hists_["muonMultIso_"] = ibooker.book1D("MuonMultIso", "N_{Iso}(#mu)", 10, 0., 10.); + // pt of the leading electron + hists_["elecPt_"] = ibooker.book1D("ElecPt", "pt(e)", 50, 0., 250.); + // electron multiplicity before std isolation + hists_["elecMult_"] = ibooker.book1D("ElecMult", "N_{30}(e)", 10, 0., 10.); + // electron multiplicity after std isolation + hists_["elecMultIso_"] = ibooker.book1D("ElecMultIso", "N_{Iso}(e)", 10, 0., 10.); + // multiplicity of jets with pt>20 (corrected to L2+L3) + hists_["jetMult_"] = ibooker.book1D("JetMult", "N_{30}(jet)", 10, 0., 10.); + // trigger efficiency estimates for single lepton triggers + hists_["triggerEff_"] = ibooker.book1D("TriggerEff", + "Eff(trigger)", nPaths, 0., nPaths); + // monitored trigger occupancy for single lepton triggers + hists_["triggerMon_"] = ibooker.book1D("TriggerMon", + "Mon(trigger)", nPaths, 0., nPaths); + + hists_["slimmedMETs_"] = ibooker.book1D("slimmedMETs", "MET_{slimmed}", 50, 0., 200.); + + // MET (calo) + hists_["slimmedMETsNoHF_"] = ibooker.book1D("slimmedMETsNoHF", "MET_{slimmedNoHF}", 50, 0., 200.); + // MET (pflow) + hists_["slimmedMETsPuppi_"] = ibooker.book1D("slimmedMETsPuppi", "MET_{slimmedPuppi}", 50, 0., 200.); + // W mass estimate + hists_["massW_"] = ibooker.book1D("MassW", "M(W)", 60, 0., 300.); + // Top mass estimate + hists_["massTop_"] = ibooker.book1D("MassTop", "M(Top)", 50, 0., 500.); + // W mass transverse estimate mu + hists_["MTWm_"] = ibooker.book1D("MTWm", "M_{T}^{W}(#mu)", 60, 0., 300.); + // Top mass transverse estimate mu + hists_["mMTT_"] = ibooker.book1D("mMTT", "M_{T}^{t}(#mu)", 50, 0., 500.); + + // W mass transverse estimate e + hists_["MTWe_"] = ibooker.book1D("MTWe", "M_{T}^{W}(e)", 60, 0., 300.); + // Top mass transverse estimate e + hists_["eMTT_"] = ibooker.book1D("eMTT", "M_{T}^{t}(e)", 50, 0., 500.); + + // set bin labels for trigger monitoring + triggerBinLabels(std::string("trigger"), triggerPaths_); + + if (verbosity_ == STANDARD) return; + + // --- [VERBOSE] --- // + + // eta of the leading muon + hists_["muonEta_"] = ibooker.book1D("MuonEta", "#eta(#mu)", 30, -3., 3.); + // std isolation variable of the leading muon + hists_["muonPFRelIso_"] = ibooker.book1D("MuonPFRelIso", + "PFIso_{Rel}(#mu)", 50, 0., 1.); + hists_["muonRelIso_"] = ibooker.book1D("MuonRelIso", "Iso_{Rel}(#mu)", 50, 0., 1.); + + // eta of the leading electron + hists_["elecEta_"] = ibooker.book1D("ElecEta", "#eta(e)", 30, -3., 3.); + // std isolation variable of the leading electron + hists_["elecRelIso_"] = ibooker.book1D("ElecRelIso", "Iso_{Rel}(e)", 50, 0., 1.); + hists_["elecPFRelIso_"] = ibooker.book1D("ElecPFRelIso", + "PFIso_{Rel}(e)", 50, 0., 1.); + + // multiplicity of btagged jets (for track counting high efficiency) with + // pt(L2L3)>30 + hists_["jetMultBEff_"] = ibooker.book1D("JetMultBEff", + "N_{30}(b/eff)", 10, 0., 10.); + // btag discriminator for track counting high efficiency for jets with + // pt(L2L3)>30 + hists_["jetBDiscEff_"] = ibooker.book1D("JetBDiscEff", + "Disc_{b/eff}(jet)", 100, 0., 10.); + + // eta of the 1. leading jet + hists_["jet1Eta_"] = ibooker.book1D("Jet1Eta", "#eta (jet1)", 50, -5., 5.); + // eta of the 2. leading jet + hists_["jet2Eta_"] = ibooker.book1D("Jet2Eta", "#eta (jet2)", 50, -5., 5.); + + // pt of the 1. leading jet (corrected to L2+L3) + hists_["jet1Pt_"] = ibooker.book1D("Jet1Pt", "pt_{L2L3}(jet1)", 60, 0., 300.); + // pt of the 2. leading jet (corrected to L2+L3) + hists_["jet2Pt_"] = ibooker.book1D("Jet2Pt", "pt_{L2L3}(jet2)", 60, 0., 300.); + + // eta and pt of the b-tagged jet (filled only when nJets==2) + hists_["TaggedJetEta_"] = ibooker.book1D("TaggedJetEta", + "#eta (Tagged jet)", 50, -5., 5.); + hists_["TaggedJetPt_"] = ibooker.book1D("TaggedJetPt", + "pt_{L2L3}(Tagged jet)", 60, 0., 300.); + + // eta and pt of the jet not passing b-tag (filled only when nJets==2) + hists_["UnTaggedJetEta_"] = ibooker.book1D("UnTaggedJetEta", + "#eta (UnTagged jet)", 50, -5., 5.); + hists_["UnTaggedJetPt_"] = ibooker.book1D("UnTaggedJetPt", + "pt_{L2L3}(UnTagged jet)", 60, 0., 300.); + + // eta and pt of the most forward jet in the event with nJets==2 + hists_["FwdJetEta_"] = ibooker.book1D("FwdJetEta", "#eta (Fwd jet)", 50, -5., 5.); + hists_["FwdJetPt_"] = ibooker.book1D("FwdJetPt", + "pt_{L2L3}(Fwd jet)", 60, 0., 300.); + + // 2D histogram (pt,eta) of the b-tagged jet (filled only when nJets==2) + hists_["TaggedJetPtEta_"] = ibooker.book2D("TaggedJetPt_Eta", + "(pt vs #eta)_{L2L3}(Tagged jet)", 60, 0., 300., 50, -5., 5.); + + // 2D histogram (pt,eta) of the not-b tagged jet (filled only when nJets==2) + hists_["UnTaggedJetPtEta_"] = ibooker.book2D("UnTaggedJetPt_Eta", + "(pt vs #eta)_{L2L3}(UnTagged jet)", 60, 0., 300., 50, -5., 5.); + + + + // dz for muons (to suppress cosmis) + hists_["muonDelZ_"] = ibooker.book1D("MuonDelZ", "d_{z}(#mu)", 50, -25., 25.); + // dxy for muons (to suppress cosmics) + hists_["muonDelXY_"] = ibooker.book2D("MuonDelXY", + "d_{xy}(#mu)", 50, -0.1, 0.1, 50, -0.1, 0.1); + + // set axes titles for dxy for muons + hists_["muonDelXY_"]->setAxisTitle("x [cm]", 1); + hists_["muonDelXY_"]->setAxisTitle("y [cm]", 2); + + if (verbosity_ == VERBOSE) return; + + // --- [DEBUG] --- // + + // relative muon isolation from charged hadrons for the leading muon + hists_["muonChHadIso_"] = ibooker.book1D("MuonChHadIso", + "Iso_{ChHad}(#mu)", 100, 0., 1.); + // relative muon isolation from neutral hadrons for the leading muon + hists_["muonNeuHadIso_"] = ibooker.book1D("MuonNeuHadIso", + "Iso_{NeuHad}(#mu)", 100, 0., 1.); + // relative muon isolation from photons for the leading muon + hists_["muonPhIso_"] = ibooker.book1D("MuonPhIso", "Iso_{Ph}(#mu)", 100, 0., 1.); + + // relative electron isolation from charged hadrons for the leading electron + hists_["elecChHadIso_"] = ibooker.book1D("ElecChHadIso", + "Iso_{ChHad}(e)", 100, 0., 1.); + // relative electron isolation from neutral hadrons for the leading electron + hists_["elecNeuHadIso_"] = ibooker.book1D("ElecNeuHadIso", + "Iso_{NeuHad}(e)", 100, 0., 1.); + // relative electron isolation from photons for the leading electron + hists_["elecPhIso_"] = ibooker.book1D("ElecPhIso", "Iso_{Ph}(e)", 100, 0., 1.); + + // multiplicity of btagged jets (for track counting high purity) with + // pt(L2L3)>30 + hists_["jetMultBPur_"] = ibooker.book1D("JetMultBPur", + "N_{30}(b/pur)", 10, 0., 10.); + // btag discriminator for track counting high purity + hists_["jetBDiscPur_"] = ibooker.book1D("JetBDiscPur", + "Disc_{b/pur}(Jet)", 200, -10., 10.); + // btag discriminator for track counting high purity for 1. leading jet + hists_["jet1BDiscPur_"] = ibooker.book1D("Jet1BDiscPur", + "Disc_{b/pur}(Jet1)", 200, -10., 10.); + // btag discriminator for track counting high purity for 2. leading jet + hists_["jet2BDiscPur_"] = ibooker.book1D("Jet2BDiscPur", + "Disc_{b/pur}(Jet2)", 200, -10., 10.); + + // multiplicity of btagged jets (for simple secondary vertex) with pt(L2L3)>30 + hists_["jetMultBVtx_"] = ibooker.book1D("JetMultBVtx", + "N_{30}(b/vtx)", 10, 0., 10.); + // btag discriminator for simple secondary vertex + hists_["jetBDiscVtx_"] = ibooker.book1D("JetBDiscVtx", + "Disc_{b/vtx}(Jet)", 35, -1., 6.); + + // multiplicity of btagged jets (for combined secondary vertex) with + // pt(L2L3)>30 + hists_["jetMultBCombVtx_"] = ibooker.book1D("JetMultBCombVtx", + "N_{30}(b/CSV)", 10, 0., 10.); + // btag discriminator for combined secondary vertex + hists_["jetBDiscCombVtx_"] = ibooker.book1D("JetBDiscCombVtx", + "Disc_{b/CSV}(Jet)", 60, -1., 2.); + // btag discriminator for combined secondary vertex for 1. leading jet + hists_["jet1BDiscCombVtx_"] = ibooker.book1D("Jet1BDiscCombVtx", + "Disc_{b/CSV}(Jet1)", 60, -1., 2.); + // btag discriminator for combined secondary vertex for 2. leading jet + hists_["jet2BDiscCombVtx_"] = ibooker.book1D("Jet2BDiscCombVtx", + "Disc_{b/CSV}(Jet2)", 60, -1., 2.); + + // pt of the 1. leading jet (uncorrected) + hists_["jet1PtRaw_"] = ibooker.book1D("Jet1PtRaw", "pt_{Raw}(jet1)", 60, 0., 300.); + // pt of the 2. leading jet (uncorrected) + hists_["jet2PtRaw_"] = ibooker.book1D("Jet2PtRaw", "pt_{Raw}(jet2)", 60, 0., 300.); + + // selected events + hists_["eventLogger_"] = ibooker.book2D("EventLogger", + "Logged Events", 9, 0., 9., 10, 0., 10.); + + // set axes titles for selected events + hists_["eventLogger_"]->getTH1()->SetOption("TEXT"); + hists_["eventLogger_"]->setBinLabel(1, "Run", 1); + hists_["eventLogger_"]->setBinLabel(2, "Block", 1); + hists_["eventLogger_"]->setBinLabel(3, "Event", 1); + hists_["eventLogger_"]->setBinLabel(4, "pt_{L2L3}(jet1)", 1); + hists_["eventLogger_"]->setBinLabel(5, "pt_{L2L3}(jet2)", 1); + hists_["eventLogger_"]->setBinLabel(6, "pt_{L2L3}(jet3)", 1); + hists_["eventLogger_"]->setBinLabel(7, "pt_{L2L3}(jet4)", 1); + hists_["eventLogger_"]->setBinLabel(8, "M_{W}", 1); + hists_["eventLogger_"]->setBinLabel(9, "M_{Top}", 1); + hists_["eventLogger_"]->setAxisTitle("logged evts", 2); + return; +} + +void MonitorEnsemble::fill(const edm::Event& event, + const edm::EventSetup& setup) { + //cout<<"1"< triggerTable; + if (!triggerTable_.isUninitialized()) { + if (!event.getByToken(triggerTable_, triggerTable)) return; + } + //cout<<"2"<> pvs; + if (!event.getByToken(pvs_, pvs)) return; + //cout<<"3"<::const_iterator pv = pvs->begin(); + pv != pvs->end(); ++pv) { + if (!pvSelect_ || (*pvSelect_)(*pv)) pvMult++; + } + fill("pvMult_", pvMult); + + /* + ------------------------------------------------------------ + + Electron Monitoring + + ------------------------------------------------------------ + */ + + // fill monitoring plots for electrons + edm::Handle> elecs_gsf; + + + + + + + if (!event.getByToken(elecs_gsf_, elecs_gsf)) return; + //cout<<"4"<> electronId; + if (!electronId_.isUninitialized()) { + if (!event.getByToken(electronId_, electronId)) { + return; + } + }*/ + // loop electron collection + unsigned int eMult = 0, eMultIso = 0; + std::vector isoElecs; + pat::Electron e; + + unsigned int idx_gsf = 0; + for ( edm::View::const_iterator elec = elecs_gsf->begin(); elec != elecs_gsf->end(); ++elec) { + // if (elec->gsfElectronRef().isNull()) continue; + + + + + // restrict to electrons with good electronId +// if (electronId_.isUninitialized() ? true : ((double)(*electronId)[elec] >= +// eidCutValue_)) { + + if (true){ + if ((*elecSelect)(*elec)) { + double isolationRel = + (elec->dr03TkSumPt() + elec->dr03EcalRecHitSumEt() + + elec->dr03HcalTowerSumEt()) / + elec->pt(); + + double isolationChHad = + elec->pt() / + (elec->pt() + elec->pfIsolationVariables().sumChargedHadronPt); + double isolationNeuHad = + elec->pt() / + (elec->pt() + elec->pfIsolationVariables().sumNeutralHadronEt); + double isolationPhoton = + elec->pt() / + (elec->pt() + elec->pfIsolationVariables().sumPhotonEt); + double el_ChHadIso = elec->pfIsolationVariables().sumChargedHadronPt; + double el_NeHadIso = elec->pfIsolationVariables().sumNeutralHadronEt; + double el_PhIso = elec->pfIsolationVariables().sumPhotonEt; + double PFisolationRel = + (el_ChHadIso + + max(0., el_NeHadIso + el_PhIso - + 0.5 * elec->pfIsolationVariables().sumPUPt)) / + elec->pt(); + + if (eMult == 0) { + // restrict to the leading electron + fill("elecPt_", elec->pt()); + fill("elecEta_", elec->eta()); + fill("elecRelIso_", isolationRel); + fill("elecPFRelIso_", PFisolationRel); + fill("elecChHadIso_", isolationChHad); + fill("elecNeuHadIso_", isolationNeuHad); + fill("elecPhIso_", isolationPhoton); + } + // in addition to the multiplicity counter buffer the iso + // electron candidates for later overlap check with jets + ++eMult; + if ((*elecIso)(*elec)) { + if (eMultIso == 0) e = *elec; + isoElecs.push_back(&(*elec)); + ++eMultIso; + } + } + } + idx_gsf++; + } + + fill("elecMult_", eMult); + fill("elecMultIso_", eMultIso); + + /* + ------------------------------------------------------------ + + Muon Monitoring + + ------------------------------------------------------------ + */ + + // fill monitoring plots for muons + unsigned int mMult = 0, mMultIso = 0; + + edm::Handle> muons; + //edm::View::const_iterator muonit; + //reco::MuonRef muon; + pat::Muon mu; + + if (!event.getByToken(muons_, muons)) return; + //cout<<"5"<::const_iterator muon = muons->begin(); muon != muons->end(); + ++muon) { // for now, to use Reco::Muon need to substitute muonit + // with muon + // and comment the MuonRef and PFCandidate parts + + //if (muonit->muonRef().isNull()) continue; + //reco::MuonRef muon = muonit->muonRef(); + + //if (muon->innerTrack().isNull()) continue; + + // restrict to globalMuons + if (muon->isGlobalMuon()) { + fill("muonDelZ_", muon->globalTrack()->vz()); + fill("muonDelXY_", muon->globalTrack()->vx(), muon->globalTrack()->vy()); + + // apply selection + if ((*muonSelect)(*muon)) { + + double isolationRel = + (muon->isolationR03().sumPt + muon->isolationR03().emEt + + muon->isolationR03().hadEt) / + muon->pt(); + double isolationChHad = + muon->pt() / + (muon->pt() + muon->pfIsolationR04().sumChargedHadronPt); + double isolationNeuHad = + muon->pt() / + (muon->pt() + muon->pfIsolationR04().sumNeutralHadronEt); + double isolationPhoton = + muon->pt() / (muon->pt() + muon->pfIsolationR04().sumPhotonEt); + double PFisolationRel = (muon->pfIsolationR04().sumChargedHadronPt + + muon->pfIsolationR04().sumNeutralHadronEt + + muon->pfIsolationR04().sumPhotonEt) / + muon->pt(); + + if (mMult == 0) { + // restrict to leading muon + fill("muonPt_", muon->pt()); + fill("muonEta_", muon->eta()); + fill("muonRelIso_", isolationRel); + fill("muonChHadIso_", isolationChHad); + fill("muonNeuHadIso_", isolationNeuHad); + fill("muonPhIso_", isolationPhoton); + fill("muonPFRelIso_", PFisolationRel); + } + ++mMult; + + if ((*muonIso)(*muon)) { + if (mMultIso == 0) mu = *muon; + ++mMultIso; + } + } + } + } + fill("muonMult_", mMult); + fill("muonMultIso_", mMultIso); + + /* + ------------------------------------------------------------ + + Jet Monitoring + + ------------------------------------------------------------ + */ + // check availability of the btaggers +/* edm::Handle btagEff, btagPur, btagVtx, btagCombVtx; + if (includeBTag_) { + if (!event.getByToken(btagEff_, btagEff)) return; + if (!event.getByToken(btagPur_, btagPur)) return; + if (!event.getByToken(btagVtx_, btagVtx)) return; + if (!event.getByToken(btagCombVtx_, btagCombVtx)) return; + }*/ + + // load jet corrector if configured such + /* const JetCorrector* corrector = 0; + if (!jetCorrector_.empty()) { + // check whether a jet correcto is in the event setup or not + if (setup.find(edm::eventsetup::EventSetupRecordKey::makeKey< + JetCorrectionsRecord>())) { + corrector = JetCorrector::getJetCorrector(jetCorrector_, setup); + } else { + edm::LogVerbatim("SingleTopTChannelLeptonDQM_miniAOD") + << "\n" + << "-----------------------------------------------------------------" + "-------------------- \n" + << " No JetCorrectionsRecord available from EventSetup:\n" + << " - Jets will not be corrected.\n" + << " - If you want to change this add the following lines to your " + "cfg file:\n" + << "\n" + << " ## load jet corrections\n" + << " " + "process.load(\"JetMETCorrections.Configuration." + "JetCorrectionServicesAllAlgos_cff\") \n" + << " process.prefer(\"ak5CaloL2L3\")\n" + << "\n" + << "-----------------------------------------------------------------" + "-------------------- \n"; + } + }*/ + + // loop jet collection + std::vector correctedJets; + unsigned int mult = 0, multBEff = 0, multBPur = 0, multNoBPur = 0, + multBVtx = 0, multBCombVtx = 0; + + edm::Handle> jets; + if (!event.getByToken(jets_, jets)) return; + //cout<<"6"< jetID; + if (jetIDSelect_) { + if (!event.getByToken(jetIDLabel_, jetID)) return; + }*/ + + vector bJetDiscVal; + vector NobJetDiscVal; + pat::Jet TaggedJetCand; + pat::Jet UnTaggedJetCand; + pat::Jet FwdJetCand; + for (edm::View::const_iterator jet = jets->begin(); + jet != jets->end(); ++jet) { + // check jetID for calo jets + // unsigned int idx = jet - jets->begin(); +/* if (dynamic_cast(&*jet)) { + if (jetIDSelect_ && + dynamic_cast(jets->refAt(idx).get())) { + if (!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue; + } + } + + // check additional jet selection for calo, pf and bare reco jets + if (dynamic_cast(&*jet)) { + reco::CaloJet sel = dynamic_cast(*jet); + sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + if ( jetSelectCalo==0) + jetSelectCalo.reset(new StringCutObjectSelector(jetSelect_)); + if (!((*jetSelectCalo)(sel))) { + continue; + } + } else if (dynamic_cast(&*jet)) { + reco::PFJet sel = dynamic_cast(*jet); + sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + if ( jetSelectPF==0) + jetSelectPF.reset(new StringCutObjectSelector(jetSelect_)); + if (!((*jetSelectPF)(sel))) continue; + } else {*/ + pat::Jet sel = *jet; + //sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + if ( jetSelectJet==0) + jetSelectJet.reset(new StringCutObjectSelector(jetSelect_)); + + if (!((*jetSelectJet)(sel))) continue; + // } + // check for overlaps -- comment this to be synchronous with the selection + // bool overlap=false; + // for(std::vector::const_iterator + // elec=isoElecs.begin(); elec!=isoElecs.end(); ++elec){ + // if(reco::deltaR((*elec)->eta(), (*elec)->phi(), jet->eta(), + // jet->phi())<0.4){overlap=true; break;} + //} if(overlap){continue;} + + // prepare jet to fill monitor histograms + pat::Jet monitorJet = *jet; + // monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + correctedJets.push_back(monitorJet); + + ++mult; // determine jet multiplicity + + + fill("jetBDiscEff_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); //hard coded discriminator and value right now. + if (monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags") > 0.89) ++multBEff; + + + + if (monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags") > 0.89) { + if (multBPur == 0) { + TaggedJetCand = monitorJet; + // TaggedJetCand = *jet; + bJetDiscVal.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); + + } else if (multBPur == 1) { + bJetDiscVal.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); + if (bJetDiscVal[1] > bJetDiscVal[0]) TaggedJetCand = monitorJet; + // TaggedJetCand = *jet; + } + ++multBPur; + } else { + if (multNoBPur == 0) { + UnTaggedJetCand = monitorJet; + NobJetDiscVal.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); + + } else if (multNoBPur == 1) { + NobJetDiscVal.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); + if (NobJetDiscVal[1] < NobJetDiscVal[0]) UnTaggedJetCand = monitorJet; + } + + ++multNoBPur; + } + + + if (monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags") > 0.89) ++multBEff; + if (mult == 1) { + fill("jet1BDiscPur_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); + } else if (mult == 2) { + fill("jet2BDiscPur_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); + } + + fill("jetBDiscPur_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); + + /* if (includeBTag_) { + // fill b-discriminators + edm::RefToBase jetRef = jets->refAt(idx); + if ((*btagVtx)[jetRef] > btagVtxWP_) ++multBVtx; + if ((*btagCombVtx)[jetRef] > btagCombVtxWP_) ++multBCombVtx; + if ((*btagPur)[jetRef] > btagPurWP_) { + if (multBPur == 0) { + TaggedJetCand = monitorJet; + // TaggedJetCand = *jet; + bJetDiscVal.push_back((*btagPur)[jetRef]); + + } else if (multBPur == 1) { + bJetDiscVal.push_back((*btagPur)[jetRef]); + if (bJetDiscVal[1] > bJetDiscVal[0]) TaggedJetCand = monitorJet; + // TaggedJetCand = *jet; + } + ++multBPur; + } else { + if (multNoBPur == 0) { + UnTaggedJetCand = monitorJet; + NobJetDiscVal.push_back((*btagPur)[jetRef]); + + } else if (multNoBPur == 1) { + NobJetDiscVal.push_back((*btagPur)[jetRef]); + if (NobJetDiscVal[1] < NobJetDiscVal[0]) UnTaggedJetCand = monitorJet; + } + + ++multNoBPur; + } + + if ((*btagEff)[jetRef] > btagEffWP_) ++multBEff; + + if (mult == 1) { + fill("jet1BDiscPur_", (*btagPur)[jetRef]); + fill("jet1BDiscCombVtx_", (*btagCombVtx)[jetRef]); + } else if (mult == 2) { + fill("jet2BDiscPur_", (*btagPur)[jetRef]); + fill("jet2BDiscCombVtx_", (*btagCombVtx)[jetRef]); + } + + fill("jetBDiscEff_", (*btagEff)[jetRef]); + fill("jetBDiscPur_", (*btagPur)[jetRef]); + fill("jetBDiscVtx_", (*btagVtx)[jetRef]); + fill("jetBDiscCombVtx_", (*btagCombVtx)[jetRef]); + }*/ + // fill pt (raw or L2L3) for the leading jets + if (mult == 1) { + fill("jet1Pt_", monitorJet.pt()); + fill("jet1Eta_", monitorJet.eta()); + fill("jet1PtRaw_", jet->pt()); + FwdJetCand = monitorJet; + } + + if (mult == 2) { + fill("jet2Pt_", monitorJet.pt()); + fill("jet2Eta_", monitorJet.eta()); + fill("jet2PtRaw_", jet->pt()); + + if (abs(monitorJet.eta()) > abs(FwdJetCand.eta())) { + FwdJetCand = monitorJet; + } + + fill("FwdJetPt_", FwdJetCand.pt()); + fill("FwdJetEta_", FwdJetCand.eta()); + } + } + + if (multNoBPur == 1 && multBPur == 1) { + + fill("TaggedJetPtEta_", TaggedJetCand.pt(), TaggedJetCand.eta()); + fill("UnTaggedJetPtEta_", UnTaggedJetCand.pt(), UnTaggedJetCand.eta()); + + fill("TaggedJetPt_", TaggedJetCand.pt()); + fill("TaggedJetEta_", TaggedJetCand.eta()); + fill("UnTaggedJetPt_", UnTaggedJetCand.pt()); + fill("UnTaggedJetEta_", UnTaggedJetCand.eta()); + } + + fill("jetMult_", mult); + fill("jetMultBEff_", multBEff); + fill("jetMultBPur_", multBPur); + fill("jetMultBVtx_", multBVtx); + fill("jetMultBCombVtx_", multBCombVtx); + + /* + ------------------------------------------------------------ + + MET Monitoring + + ------------------------------------------------------------ + */ + + // fill monitoring histograms for met + pat::MET mET; + + for (std::vector>>::const_iterator + met_ = mets_.begin(); + met_ != mets_.end(); ++met_) { + edm::Handle> met; + if (!event.getByToken(*met_, met)) continue; + mET = *(met->begin()); + if (met->begin() != met->end()) { + unsigned int idx = met_ - mets_.begin(); + if (idx == 0) fill("slimmedMETs_", met->begin()->et()); + if (idx == 1) fill("slimmedMETsNoHF_", met->begin()->et()); + if (idx == 2) fill("slimmedMETsPuppi_", met->begin()->et()); + + } + } + + /* + ------------------------------------------------------------ + + Event Monitoring + + ------------------------------------------------------------ + */ + + // fill W boson and top mass estimates + Calculate_miniAOD eventKinematics(MAXJETS, WMASS); + double wMass = eventKinematics.massWBoson(correctedJets); + double topMass = eventKinematics.massTopQuark(correctedJets); + if (wMass >= 0 && topMass >= 0) { + fill("massW_", wMass); + fill("massTop_", topMass); + } + // fill plots for trigger monitoring + if ((lowerEdge_ == -1. && upperEdge_ == -1.) || + (lowerEdge_ < wMass && wMass < upperEdge_)) { + if (!triggerTable_.isUninitialized()) + fill(event, *triggerTable, "trigger", triggerPaths_); + if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) { + // log runnumber, lumi block, event number & some + // more pysics infomation for interesting events + fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run()); + fill("eventLogger_", 1.5, logged_ + 0.5, + event.eventAuxiliary().luminosityBlock()); + fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event()); + if (correctedJets.size() > 0) + fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt()); + if (correctedJets.size() > 1) + fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt()); + if (correctedJets.size() > 2) + fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt()); + if (correctedJets.size() > 3) + fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt()); + fill("eventLogger_", 7.5, logged_ + 0.5, wMass); + fill("eventLogger_", 8.5, logged_ + 0.5, topMass); + ++logged_; + } + } + if (multBPur != 0 && mMultIso == 1) { + + double mtW = eventKinematics.tmassWBoson(&mu, mET, TaggedJetCand); + fill("MTWm_", mtW); + double MTT = eventKinematics.tmassTopQuark(&mu, mET, TaggedJetCand); + fill("mMTT_", MTT); + } + + if (multBPur != 0 && eMultIso == 1) { + double mtW = eventKinematics.tmassWBoson(&e, mET, TaggedJetCand); + fill("MTWe_", mtW); + double MTT = eventKinematics.tmassTopQuark(&e, mET, TaggedJetCand); + fill("eMTT_", MTT); + } +} +} + +SingleTopTChannelLeptonDQM_miniAOD::SingleTopTChannelLeptonDQM_miniAOD( + const edm::ParameterSet& cfg) + : vertexSelect_(nullptr), + beamspot_(""), + beamspotSelect_(nullptr), + MuonStep(nullptr), + ElectronStep(nullptr), + PvStep(nullptr), + METStep(nullptr) { + JetSteps.clear(); + + + // configure preselection + edm::ParameterSet presel = + cfg.getParameter("preselection"); + if (presel.existsAs("trigger")) { + edm::ParameterSet trigger = + presel.getParameter("trigger"); + triggerTable__ = consumes( + trigger.getParameter("src")); + triggerPaths_ = trigger.getParameter>("select"); + } + if (presel.existsAs("vertex")) { + edm::ParameterSet vertex = presel.getParameter("vertex"); + vertex_ = vertex.getParameter("src"); + vertex__ = + consumes(vertex.getParameter("src")); + vertexSelect_.reset(new StringCutObjectSelector( + vertex.getParameter("select"))); + } + if (presel.existsAs("beamspot")) { + edm::ParameterSet beamspot = + presel.getParameter("beamspot"); + beamspot_ = beamspot.getParameter("src"); + beamspot__ = + consumes(beamspot.getParameter("src")); + beamspotSelect_.reset(new StringCutObjectSelector( + beamspot.getParameter("select"))); + } + // conifgure the selection + std::vector sel = + cfg.getParameter>("selection"); + + for (unsigned int i = 0; i < sel.size(); ++i) { + selectionOrder_.push_back(sel.at(i).getParameter("label")); + selection_[selectionStep(selectionOrder_.back())] = std::make_pair( + sel.at(i), + std::unique_ptr( + new SingleTopTChannelLepton_miniAOD::MonitorEnsemble( + selectionStep(selectionOrder_.back()).c_str(), + cfg.getParameter("setup"), + cfg.getParameter>("selection"), + consumesCollector()))); + } + for (std::vector::const_iterator selIt = selectionOrder_.begin(); + selIt != selectionOrder_.end(); ++selIt) { + std::string key = selectionStep(*selIt), type = objectType(*selIt); + if (selection_.find(key) != selection_.end()) { + using std::unique_ptr; + + if (type == "muons") { + MuonStep.reset(new SelectionStep(selection_[key].first, + consumesCollector())); + } + if (type == "elecs") { + ElectronStep.reset(new SelectionStep( + selection_[key].first, consumesCollector())); + } + + if (type == "pvs") { + PvStep.reset(new SelectionStep(selection_[key].first, + consumesCollector())); + } + if (type == "jets") { + JetSteps.push_back(std::unique_ptr>( + new SelectionStep(selection_[key].first, + consumesCollector()))); + } + if (type == "met") { + METStep.reset(new SelectionStep(selection_[key].first, + consumesCollector())); + } + } + } +} +void SingleTopTChannelLeptonDQM_miniAOD::bookHistograms(DQMStore::IBooker & ibooker, + edm::Run const &, edm::EventSetup const & ){ + + for (auto selIt = selection_.begin(); selIt != selection_.end(); ++selIt) { + selIt->second.second->book(ibooker); + } +} +void SingleTopTChannelLeptonDQM_miniAOD::analyze(const edm::Event& event, + const edm::EventSetup& setup) { + if (!triggerTable__.isUninitialized()) { + edm::Handle triggerTable; + if (!event.getByToken(triggerTable__, triggerTable)) return; + if (!accept(event, *triggerTable, triggerPaths_)) return; + } + if (!beamspot__.isUninitialized()) { + edm::Handle beamspot; + if (!event.getByToken(beamspot__, beamspot)) return; + if (!(*beamspotSelect_)(*beamspot)) return; + } + + if (!vertex__.isUninitialized()) { + edm::Handle> vertex; + if (!event.getByToken(vertex__, vertex)) return; + edm::View::const_iterator pv = vertex->begin(); + if (!(*vertexSelect_)(*pv)) return; + } + + // apply selection steps + unsigned int passed = 0; + unsigned int nJetSteps = -1; + + for (std::vector::const_iterator selIt = selectionOrder_.begin(); + selIt != selectionOrder_.end(); ++selIt) { + std::string key = selectionStep(*selIt), type = objectType(*selIt); + if (selection_.find(key) != selection_.end()) { + if (type == "empty") { + selection_[key].second->fill(event, setup); + } + if (type == "presel") { + selection_[key].second->fill(event, setup); + } + if (type == "elecs" && ElectronStep != 0) { + if (ElectronStep->select(event)) { + ++passed; + selection_[key].second->fill(event, setup); + } else + break; + } + if (type == "muons" && MuonStep != 0) { + if (MuonStep->select(event)) { + ++passed; + selection_[key].second->fill(event, setup); + } else + break; + } + if (type == "jets") { + nJetSteps++; + if (JetSteps[nJetSteps]) { + if (JetSteps[nJetSteps]->select(event, setup)) { + ++passed; + selection_[key].second->fill(event, setup); + } else + break; + } + } + if (type == "met" && METStep != 0) { + if (METStep->select(event)) { + ++passed; + selection_[key].second->fill(event, setup); + } else + break; + } + } + } +} diff --git a/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h new file mode 100644 index 0000000000000..74b372e8fee41 --- /dev/null +++ b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h @@ -0,0 +1,368 @@ +#ifndef SINGLETOPTCHANNELLEPTONDQM_MINIAOD +#define SINGLETOPTCHANNELLEPTONDQM_MINIAOD + +#include +#include + +#include "FWCore/Framework/interface/Event.h" +#include "DQMServices/Core/interface/DQMStore.h" +#include "DQMServices/Core/interface/MonitorElement.h" + +#include "DataFormats/JetReco/interface/Jet.h" +#include "DQM/Physics/interface/TopDQMHelpers.h" +#include "DataFormats/MuonReco/interface/Muon.h" +#include "DataFormats/Common/interface/ValueMap.h" +#include "DataFormats/METReco/interface/CaloMET.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +#include "JetMETCorrections/Objects/interface/JetCorrector.h" +#include "DataFormats/EgammaCandidates/interface/GsfElectron.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "FWCore/Framework/interface/ConsumesCollector.h" +#include "FWCore/Framework/interface/EDConsumerBase.h" +#include "FWCore/Utilities/interface/EDGetToken.h" +#include "DataFormats/PatCandidates/interface/Electron.h" + +/** + \class MonitorEnsemble TopDQMHelpers.h + "DQM/Physics/interface/TopDQMHelpers.h" + + \brief Helper class to define histograms for monitoring of + muon/electron/jet/met quantities. + + Helper class to contain histograms for the monitoring of + muon/electron/jet/met quantities. + This class can be instantiated several times after several event selection + steps. It can + be used to fill histograms in three different granularity levels according to + STANDARD + (<10 histograms), VERBOSE(<20 histograms), DEBUG(<30 histgorams). Note that + for the sake + of simplicity and to force the analyst to keep the number of histograms to be + monitored + small the MonitorEnsemble class contains the histograms for all objects at + once. It should + not contain much more than 10 histograms though in the STANDARD + configuration, as these + histograms will be monitored at each SelectionStep. Monitoring of histograms + after selec- + tion steps within the same object collection needs to be implemented within + the Monitor- + Ensemble. It will not be covered by the SelectionStep class. +*/ + +namespace SingleTopTChannelLepton_miniAOD { + +class MonitorEnsemble { + public: + /// different verbosity levels + enum Level { + STANDARD, + VERBOSE, + DEBUG + }; + + public: + /// default contructor + MonitorEnsemble(const char* label, const edm::ParameterSet& cfg, + const edm::VParameterSet& vcfg, edm::ConsumesCollector&& iC); + /// default destructor + ~MonitorEnsemble() {} + + /// book histograms in subdirectory _directory_ + void book(DQMStore::IBooker & ibooker); + /// fill monitor histograms with electronId and jetCorrections + void fill(const edm::Event& event, const edm::EventSetup& setup); + + private: + /// deduce monitorPath from label, the label is expected + /// to be of type 'selectionPath:monitorPath' + std::string monitorPath(const std::string& label) const { + return label.substr(label.find(':') + 1); + }; + /// deduce selectionPath from label, the label is + /// expected to be of type 'selectionPath:monitorPath' + std::string selectionPath(const std::string& label) const { + return label.substr(0, label.find(':')); + }; + + /// set configurable labels for trigger monitoring histograms + void triggerBinLabels(std::string channel, + const std::vector labels); + /// fill trigger monitoring histograms + void fill(const edm::Event& event, const edm::TriggerResults& triggerTable, + std::string channel, const std::vector labels) const; + + /// check if histogram was booked + bool booked(const std::string histName) const { + return hists_.find(histName.c_str()) != hists_.end(); + }; + /// fill histogram if it had been booked before + void fill(const std::string histName, double value) const { + if (booked(histName.c_str())) + hists_.find(histName.c_str())->second->Fill(value); + }; + /// fill histogram if it had been booked before (2-dim version) + void fill(const std::string histName, double xValue, double yValue) const { + if (booked(histName.c_str())) + hists_.find(histName.c_str())->second->Fill(xValue, yValue); + }; + /// fill histogram if it had been booked before (2-dim version) + void fill(const std::string histName, double xValue, double yValue, + double zValue) const { + if (booked(histName.c_str())) + hists_.find(histName.c_str())->second->Fill(xValue, yValue, zValue); + }; + + private: + /// verbosity level for booking + Level verbosity_; + /// instance label + std::string label_; + /// considers a vector of METs + std::vector > > mets_; + // std::vector mets_; + /// input sources for monitoring + edm::EDGetTokenT > jets_; + edm::EDGetTokenT > muons_; + edm::EDGetTokenT > elecs_gsf_; + edm::EDGetTokenT > elecs_; + edm::EDGetTokenT > pvs_; + + // edm::InputTag elecs_, elecs_gsf_, muons_, muons_reco_, jets_, pvs_; + + /// trigger table + // edm::InputTag triggerTable_; + edm::EDGetTokenT triggerTable_; + + /// trigger paths for monitoring, expected + /// to be of form signalPath:MonitorPath + std::vector triggerPaths_; + + /// electronId label + // edm::InputTag electronId_; + edm::EDGetTokenT > electronId_; + + /// electronId pattern we expect the following pattern: + /// 0: fails + /// 1: passes electron ID only + /// 2: passes electron Isolation only + /// 3: passes electron ID and Isolation only + /// 4: passes conversion rejection + /// 5: passes conversion rejection and ID + /// 6: passes conversion rejection and Isolation + /// 7: passes the whole selection + /// As described on + /// https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID + // int eidPattern_; + // the cut for the MVA Id + double eidCutValue_; + /// extra isolation criterion on electron + std::string elecIso_; + /// extra selection on electrons + std::string elecSelect_; + + /// extra selection on primary vertices; meant to investigate the pile-up + /// effect + std::unique_ptr > pvSelect_; + + /// extra isolation criterion on muon + std::string muonIso_; + /// extra selection on muons + std::string muonSelect_; + + /// jetCorrector + std::string jetCorrector_; + /// jetID as an extra selection type + edm::EDGetTokenT jetIDLabel_; + + /// extra jetID selection on calo jets + std::unique_ptr > jetIDSelect_; + + /// extra selection on jets (here given as std::string as it depends + /// on the the jet type, which selections are valid and which not) + std::string jetSelect_; + /// include btag information or not + /// to be determined from the cfg + bool includeBTag_; + /// btag discriminator labels + // edm::InputTag btagEff_, btagPur_, btagVtx_, btagCombVtx_; + edm::EDGetTokenT btagEff_, btagPur_, btagVtx_, + btagCombVtx_; + + /// btag working points + double btagEffWP_, btagPurWP_, btagVtxWP_, btagCombVtxWP_; + /// mass window upper and lower edge + double lowerEdge_, upperEdge_; + + /// number of logged interesting events + int logged_; + /// storage manager + /// histogram container + std::map hists_; + edm::EDConsumerBase tmpConsumerBase; + + std::string directory_; + + std::unique_ptr > muonSelect; + std::unique_ptr > muonIso; + + std::unique_ptr > jetSelectCalo; + std::unique_ptr > jetSelectPF; + std::unique_ptr > jetSelectJet; + + std::unique_ptr > elecSelect; + std::unique_ptr > elecIso; + + +}; + +inline void MonitorEnsemble::triggerBinLabels( + std::string channel, const std::vector labels) { + for (unsigned int idx = 0; idx < labels.size(); ++idx) { + hists_[(channel + "Mon_").c_str()] + ->setBinLabel(idx + 1, "[" + monitorPath(labels[idx]) + "]", 1); + hists_[(channel + "Eff_").c_str()] + ->setBinLabel(idx + 1, "[" + selectionPath(labels[idx]) + "]|[" + + monitorPath(labels[idx]) + "]", + 1); + } +} + +inline void MonitorEnsemble::fill(const edm::Event& event, + const edm::TriggerResults& triggerTable, + std::string channel, + const std::vector labels) const { + for (unsigned int idx = 0; idx < labels.size(); ++idx) { + if (accept(event, triggerTable, monitorPath(labels[idx]))) { + fill((channel + "Mon_").c_str(), idx + 0.5); + // take care to fill triggerMon_ before evts is being called + int evts = hists_.find((channel + "Mon_").c_str()) + ->second->getBinContent(idx + 1); + double value = hists_.find((channel + "Eff_").c_str()) + ->second->getBinContent(idx + 1); + fill( + (channel + "Eff_").c_str(), idx + 0.5, + 1. / evts * (accept(event, triggerTable, selectionPath(labels[idx])) - + value)); + } + } +} +} + +#include + +#include "DQM/Physics/interface/TopDQMHelpers.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/ServiceRegistry/interface/Service.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" + +#include "FWCore/Common/interface/TriggerNames.h" +#include "DataFormats/BeamSpot/interface/BeamSpot.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/Common/interface/TriggerResults.h" +#include "DQMServices/Core/interface/DQMEDAnalyzer.h" + +/** + \class SingleTopTChannelLeptonDQM_miniAOD SingleTopTChannelLeptonDQM_miniAOD.h + "DQM/Physics/plugins/SingleTopTChannelLeptonDQM_miniAOD.h" + + \brief Module to apply a monitored selection of top like events in the + semi-leptonic channel + + Plugin to apply a monitored selection of top like events with some minimal + flexibility in the number and definition of the selection steps. To achieve + this flexibility it employes the SelectionStep class. The MonitorEnsemble + class is used to provide a well defined set of histograms to be monitored + after each selection step. The SelectionStep class provides a flexible and + intuitive selection via the StringCutParser. SelectionStep and + MonitorEnsemble classes are interleaved. The monitoring starts after a + preselection step (which is not monitored in the context of this module) with + an instance of the MonitorEnsemble class. The following objects are supported + for selection: + + - jets : of type pat::Jet (jets), reco::CaloJet (jets/calo) or reco::PFJet + (jets/pflow) + - elecs : of type pat::Electron + - muons : of type pat::Muon + - met : of type pat::MET + + These types have to be present as prefix of the selection step paramter + _label_ separated from the rest of the label by a ':' (e.g. in the form + "jets:step0"). The class expects selection labels of this type. They will be + disentangled by the private helper functions _objectType_ and _seletionStep_ + as declared below. +*/ + +/// define MonitorEnsembple to be used +// using SingleTopTChannelLepton_miniAOD::MonitorEnsemble; + +class SingleTopTChannelLeptonDQM_miniAOD : public DQMEDAnalyzer { + public: + /// default constructor + SingleTopTChannelLeptonDQM_miniAOD(const edm::ParameterSet& cfg); + /// default destructor + ~SingleTopTChannelLeptonDQM_miniAOD() {}; + + /// do this during the event loop + virtual void analyze(const edm::Event& event, const edm::EventSetup& setup); + + protected: + //Book histograms + void bookHistograms(DQMStore::IBooker &, + edm::Run const &, edm::EventSetup const &) override; + + private: + /// deduce object type from ParameterSet label, the label + /// is expected to be of type 'objectType:selectionStep' + std::string objectType(const std::string& label) { + return label.substr(0, label.find(':')); + }; + /// deduce selection step from ParameterSet label, the + /// label is expected to be of type 'objectType:selectionStep' + std::string selectionStep(const std::string& label) { + return label.substr(label.find(':') + 1); + }; + + private: + /// trigger table + edm::EDGetTokenT triggerTable__; + + /// trigger paths + std::vector triggerPaths_; + /// primary vertex + edm::InputTag vertex_; + edm::EDGetTokenT vertex__; + /// string cut selector + std::unique_ptr > vertexSelect_; + + /// beamspot + edm::InputTag beamspot_; + edm::EDGetTokenT beamspot__; + /// string cut selector + std::unique_ptr > beamspotSelect_; + + /// needed to guarantee the selection order as defined by the order of + /// ParameterSets in the _selection_ vector as defined in the config + std::vector selectionOrder_; + /// this is the heart component of the plugin; std::string keeps a label + /// the selection step for later identification, edm::ParameterSet keeps + /// the configuration of the selection for the SelectionStep class, + /// MonitoringEnsemble keeps an instance of the MonitorEnsemble class to + /// be filled _after_ each selection step + std::map< + std::string, + std::pair > > + selection_; + + std::unique_ptr > MuonStep; + std::unique_ptr > ElectronStep; + std::unique_ptr > PvStep; + + std::vector > > JetSteps; + + std::unique_ptr > METStep; + std::vector sel; +}; + +#endif diff --git a/DQM/Physics/src/TopDQMHelpers.cc b/DQM/Physics/src/TopDQMHelpers.cc index 23d89ad000ae1..5832ae953750d 100644 --- a/DQM/Physics/src/TopDQMHelpers.cc +++ b/DQM/Physics/src/TopDQMHelpers.cc @@ -198,12 +198,27 @@ double Calculate_miniAOD::tmassWBoson(pat::Muon* mu, const pat::MET& met, return tmassWBoson_; } +double Calculate_miniAOD::tmassWBoson(pat::Electron* mu, const pat::MET& met, + const pat::Jet& b) { + if (tmassWBoson_ < 0) operator()(b, mu, met); + return tmassWBoson_; +} + + double Calculate_miniAOD::tmassTopQuark(pat::Electron* lepton, const pat::MET& met, const pat::Jet& b) { if (tmassTopQuark_ < 0) operator()(b, lepton, met); return tmassTopQuark_; } + +double Calculate_miniAOD::tmassTopQuark(pat::Muon* lepton, + const pat::MET& met, const pat::Jet& b) { + if (tmassTopQuark_ < 0) operator()(b, lepton, met); + return tmassTopQuark_; +} + + void Calculate_miniAOD::operator()(const pat::Jet& bJet, pat::Muon* lepton, const pat::MET& met) { double metT = sqrt(pow(met.px(), 2) + pow(met.py(), 2)); diff --git a/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc index f7a28d26ec07a..9932500a0db73 100644 --- a/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc +++ b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc @@ -835,27 +835,27 @@ TopSingleLeptonDQM_miniAOD::TopSingleLeptonDQM_miniAOD(const edm::ParameterSet& for (std::vector::const_iterator selIt = selectionOrder_.begin(); selIt != selectionOrder_.end(); ++selIt) { std::string key = selectionStep(*selIt), type = objectType(*selIt); - cout<(selection_[key].first, consumesCollector())); - cout<<"muon step"<( selection_[key].first, consumesCollector())); - cout<<"elec step"<(selection_[key].first, consumesCollector())); - cout<<"pvs step"<>( new SelectionStep(selection_[key].first, consumesCollector()))); - cout<<"jets step"<>( @@ -868,7 +868,7 @@ TopSingleLeptonDQM_miniAOD::TopSingleLeptonDQM_miniAOD(const edm::ParameterSet& if (type == "met") { METStep.reset(new SelectionStep(selection_[key].first, consumesCollector())); - cout<<"met step"< Date: Thu, 21 Jan 2016 11:41:17 +0100 Subject: [PATCH 196/250] cleaned unnecessary comments, corrected output folder for singleTop package, updated DQMOffline.py --- .../python/singleTopDQM_miniAOD_cfi.py | 305 ++---------- .../python/topSingleLeptonDQM_miniAOD_cfi.py | 440 +----------------- .../src/SingleTopTChannelLeptonDQM_miniAOD.cc | 198 +------- .../src/SingleTopTChannelLeptonDQM_miniAOD.h | 84 +--- DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc | 223 +-------- DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h | 85 +--- .../Configuration/python/DQMOffline_cff.py | 1 + 7 files changed, 87 insertions(+), 1249 deletions(-) diff --git a/DQM/Physics/python/singleTopDQM_miniAOD_cfi.py b/DQM/Physics/python/singleTopDQM_miniAOD_cfi.py index c9ecbb85e72ea..0ff4b7b167596 100644 --- a/DQM/Physics/python/singleTopDQM_miniAOD_cfi.py +++ b/DQM/Physics/python/singleTopDQM_miniAOD_cfi.py @@ -5,18 +5,11 @@ singleTopTChannelLeptonDQM_miniAOD = cms.EDAnalyzer("SingleTopTChannelLeptonDQM_miniAOD", - ## ------------------------------------------------------ - ## SETUP - ## - ## configuration of the MonitoringEnsemble(s) - ## [mandatory] : optional PSets may be omitted - ## + setup = cms.PSet( - ## sub-directory to write the monitor histograms to - ## [mandatory] : should not be changed w/o explicit - ## communication to TopCom! - directory = cms.string("Physics/Top/SingleTopDQM/"), - ## [mandatory] + + directory = cms.string("Physics/Top/SingleTopDQM_miniAOD/"), + sources = cms.PSet( muons = cms.InputTag("slimmedMuons"), elecs = cms.InputTag("slimmedElectrons"), @@ -24,64 +17,29 @@ mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"), pvs = cms.InputTag("offlineSlimmedPrimaryVertices") ), - ## [optional] : when omitted the verbosity level is set to STANDARD + monitoring = cms.PSet( verbosity = cms.string("DEBUG") ), - ## [optional] : when omitted all monitoring plots for primary vertices - ## will be filled w/o extras -# pvExtras = cms.PSet( - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the primary vertex candidates -# select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") -# ), - ## [optional] : when omitted all monitoring plots for electrons - ## will be filled w/o extras + elecExtras = cms.PSet( - ## when omitted electron plots will be filled w/o cut on electronId - ##electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.5) ), - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the electron candidates + select = cms.string("pt>15 & abs(eta)<2.5 & abs(gsfTrack.d0)<1 & abs(gsfTrack.dz)<20"), - ## when omitted isolated electron multiplicity plot will be equi- - ## valent to inclusive electron multiplicity plot + isolation = cms.string(ElelooseIsoCut), ), - ## [optional] : when omitted all monitoring plots for muons - ## will be filled w/o extras + muonExtras = cms.PSet( - ## when omitted muon plots will be filled w/o additional pre- - ## selection of the muon candidates + select = cms.string("pt>10 & abs(eta)<2.1 & isGlobalMuon & abs(globalTrack.d0)<1 & abs(globalTrack.dz)<20"), - ## when omitted isolated muon multiplicity plot will be equi- - ## valent to inclusive muon multiplicity plot -# isolation = cms.string("(isolationR03.sumPt+isolationR03.emEt+isolationR03.hadEt)/pt<0.1"), + ), - ## [optional] : when omitted all monitoring plots for jets will - ## be filled from uncorrected jets + jetExtras = cms.PSet( - ## when omitted monitor plots for pt will be filled from uncorrected - ## jets - #jetCorrector = cms.string("ak4CaloL2L3"), - ## when omitted monitor plots will be filled w/o additional cut on - ## jetID -# jetID = cms.PSet( -# label = cms.InputTag("ak4JetID"), -# select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") -# ), - ## when omitted no extra selection will be applied on jets before - ## filling the monitor histograms; if jetCorrector is present the - ## selection will be applied to corrected jets + select = cms.string("pt>15 & abs(eta)<2.5 & emEnergyFraction>0.01"), ), - ## [optional] : when omitted no mass window will be applied - ## for the W mass befor filling the event monitoring plots -# massExtras = cms.PSet( -# lowerEdge = cms.double( 70.), -# upperEdge = cms.double(110.) -# ), - ## [optional] : when omitted the monitoring plots for triggering - ## will be empty + triggerExtras = cms.PSet( src = cms.InputTag("TriggerResults","","HLT"), paths = cms.vstring(['HLT_Mu3:HLT_QuadJet15U', @@ -90,34 +48,11 @@ 'HLT_Mu9:HLT_QuadJet15U']) ) ), - ## ------------------------------------------------------ - ## PRESELECTION - ## - ## setup of the event preselection, which will not - ## be monitored - ## [mandatory] : but may be empty - ## + preselection = cms.PSet( - ## [optional] : when omitted no preselection is applied -# trigger = cms.PSet( -# src = cms.InputTag("TriggerResults","","HLT"), -# select = cms.vstring(['HLT_Mu11', 'HLT_Ele15_LW_L1R', 'HLT_QuadJet30']) -# ), - ## [optional] : when omitted no preselection is applied -# vertex = cms.PSet( -# src = cms.InputTag("offlineSlimmedPrimaryVertices"), -# select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') -# ) + ), - ## ------------------------------------------------------ - ## SELECTION - ## - ## monitor histrograms are filled after each selection - ## step, the selection is applied in the order defined - ## by this vector - ## [mandatory] : may be empty or contain an arbitrary - ## number of PSets - ## + selection = cms.VPSet( cms.PSet( label = cms.string("jets/calo:step0"), @@ -133,18 +68,11 @@ ) singleTopMuonMediumDQM_miniAOD = cms.EDAnalyzer("SingleTopTChannelLeptonDQM_miniAOD", - ## ------------------------------------------------------ - ## SETUP - ## - ## configuration of the MonitoringEnsemble(s) - ## [mandatory] : optional PSets may be omitted - ## + setup = cms.PSet( - ## sub-directory to write the monitor histograms to - ## [mandatory] : should not be changed w/o explicit - ## communication to TopCom! - directory = cms.string("Physics/Top/SingleTopMuonMediumDQM/"), - ## [mandatory] + + directory = cms.string("Physics/Top/SingleTopMuonMediumDQM_miniAOD/"), + sources = cms.PSet( muons = cms.InputTag("slimmedMuons"), elecs_gsf = cms.InputTag("slimmedElectrons"), @@ -153,47 +81,20 @@ mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"), pvs = cms.InputTag("offlineSlimmedPrimaryVertices") ), - ## [optional] : when omitted the verbosity level is set to STANDARD + monitoring = cms.PSet( verbosity = cms.string("DEBUG") ), - ## [optional] : when omitted all monitoring plots for primary vertices - ## will be filled w/o extras -# pvExtras = cms.PSet( - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the primary vertex candidates -# select = cms.string("") #abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") -# ), - ## [optional] : when omitted all monitoring plots for muons - ## will be filled w/o extras + muonExtras = cms.PSet( - ## when omitted muon plots will be filled w/o additional pre- - ## selection of the muon candidates + select = cms.string("abs(eta)<2.1") - ## & isGlobalMuon & innerTrack.numberOfValidHits>10 & globalTrack.normalizedChi2>-1 & globalTrack.normalizedChi2<10 - ##& (isolationR03.sumPt+isolationR03.emEt+isolationR03.hadEt)/pt<0.1"), - ## when omitted isolated muon multiplicity plot will be equi- - ## valent to inclusive muon multiplicity plot - ## isolation = cms.string("(isolationR03.sumPt+isolationR03.emEt+isolationR03.hadEt)/pt<10" ) - ## isolation = cms.string("(isolationR03.sumPt+isolationR03.emEt+isolationR03.hadEt)/pt<0.1") + ), - ## [optional] : when omitted all monitoring plots for jets - ## will be filled w/o extras + jetExtras = cms.PSet( - ## when omitted monitor plots for pt will be filled from uncorrected - ## jets - #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), - ## when omitted monitor plots will be filled w/o additional cut on - ## jetID -# jetID = cms.PSet( -# label = cms.InputTag("ak4JetID"), -# select = cms.string(""), ##fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") -# ), - ## when omitted no extra selection will be applied on jets before - ## filling the monitor histograms; if jetCorrector is present the - ## selection will be applied to corrected jets + select = cms.string("pt>15 & abs(eta)<2.5"), # & neutralEmEnergyFraction >0.01 & chargedEmEnergyFraction>0.01"), - ## when omitted monitor histograms for b-tagging will not be filled jetBTaggers = cms.PSet( trackCountingEff = cms.PSet( label = cms.InputTag("trackCountingHighEffBJetTags" ), @@ -213,54 +114,18 @@ ) ) ) - ## [optional] : when omitted no mass window will be applied - ## for the W mass before filling the event monitoring plots -# massExtras = cms.PSet( -# lowerEdge = cms.double( 70.), -# upperEdge = cms.double(110.) -# ), - ## [optional] : when omitted the monitoring plots for triggering - ## will be empty -# triggerExtras = cms.PSet( -# src = cms.InputTag("TriggerResults","","HLT"), -# paths = cms.vstring(['HLT_IsoMu17_eta2p1_CentralPFNoPUJet30_BTagIPIter_v1']) -# 'HLT_IsoMu24_eta2p1_v12', -# 'HLT_IsoMu20_eta2p1_CentralPFJet30_BTagIPIter_v2', -# 'HLT_IsoMu20_eta2p1_CentralPFJet30_BTagIPIter_v3']) -# ) + ), - ## ------------------------------------------------------ - ## PRESELECTION - ## - ## setup of the event preselection, which will not - ## be monitored - ## [mandatory] : but may be empty - ## + preselection = cms.PSet( - ## [optional] : when omitted no preselection is applied -# trigger = cms.PSet( -# src = cms.InputTag("TriggerResults","","HLT"), -# select = cms.vstring(['HLT_IsoMu17_eta2p1_CentralPFNoPUJet30_BTagIPIter_v1']) -# ), - ## [optional] : when omitted no preselection is applied -# vertex = cms.PSet( -# src = cms.InputTag("offlineSlimmedPrimaryVertices"), -# select = cms.string('!isFake && ndof >= 4 && abs(z)<24. && position.Rho <= 2.0') -# ) + ), - ## ------------------------------------------------------ - ## SELECTION - ## - ## monitor histrograms are filled after each selection - ## step, the selection is applied in the order defined - ## by this vector - ## [mandatory] : may be empty or contain an arbitrary - ## number of PSets + selection = cms.VPSet( cms.PSet( label = cms.string("presel"), src = cms.InputTag("offlineSlimmedPrimaryVertices"), -# select = cms.string('!isFake && ndof >= 4 && abs(z)<24. && position.Rho <= 2.0 '), + ), cms.PSet( @@ -274,7 +139,7 @@ cms.PSet( label = cms.string("jets:step1"), src = cms.InputTag("slimmedJets"), - #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string(" pt>30 & abs(eta)<4.5 & numberOfDaughters>1 & ((abs(eta)>2.4) || ( chargedHadronEnergyFraction > 0 & chargedMultiplicity>0 & chargedEmEnergyFraction<0.99)) & neutralEmEnergyFraction < 0.99 & neutralHadronEnergyFraction < 0.99"), min = cms.int32(1), @@ -283,7 +148,7 @@ cms.PSet( label = cms.string("jets:step2"), src = cms.InputTag("slimmedJets"), - #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), + select = cms.string(" pt>30 & abs(eta)<4.5 & numberOfDaughters>1 & ((abs(eta)>2.4) || ( chargedHadronEnergyFraction > 0 & chargedMultiplicity>0 & chargedEmEnergyFraction<0.99)) & neutralEmEnergyFraction < 0.99 & neutralHadronEnergyFraction < 0.99"), min = cms.int32(2), @@ -293,18 +158,11 @@ ) singleTopElectronMediumDQM_miniAOD = cms.EDAnalyzer("SingleTopTChannelLeptonDQM_miniAOD", - ## ------------------------------------------------------ - ## SETUP - ## - ## configuration of the MonitoringEnsemble(s) - ## [mandatory] : optional PSets may be omitted - ## + setup = cms.PSet( - ## sub-directory to write the monitor histograms to - ## [mandatory] : should not be changed w/o explicit - ## communication to TopCom! - directory = cms.string("Physics/Top/SingleTopElectronMediumDQM/"), - ## [mandatory] + + directory = cms.string("Physics/Top/SingleTopElectronMediumDQM_miniAOD/"), + sources = cms.PSet( muons = cms.InputTag("slimmedMuons"), elecs_gsf = cms.InputTag("slimmedElectrons"), @@ -314,47 +172,21 @@ pvs = cms.InputTag("offlineSlimmedPrimaryVertices") ), - ## [optional] : when omitted the verbosity level is set to STANDARD + monitoring = cms.PSet( verbosity = cms.string("DEBUG") ), - ## [optional] : when omitted all monitoring plots for primary vertices - ## will be filled w/o extras -# pvExtras = cms.PSet( - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the primary vertex candidates -# select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") -# ), - ## [optional] : when omitted all monitoring plots for electrons - ## will be filled w/o extras + elecExtras = cms.PSet( - ## when omitted electron plots will be filled w/o cut on electronId - ##electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.5) ), - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the electron candidates - select = cms.string("pt>25"), ## & abs(eta)<2.5 & (dr03TkSumPt+dr03EcalRecHitSumEt+dr03HcalTowerSumEt)/pt<0.1"), - ## when omitted isolated electron multiplicity plot will be equi- - ## valent to inclusive electron multiplicity plot - ## isolation = cms.string(ElelooseIsoCut), + + select = cms.string("pt>25"), + ), - ## [optional] : when omitted all monitoring plots for jets - ## will be filled w/o extras + jetExtras = cms.PSet( - ## when omitted monitor plots for pt will be filled from uncorrected - ## jets - #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), - ## when omitted monitor plots will be filled w/o additional cut on - ## jetID -# jetID = cms.PSet( -# label = cms.InputTag("ak4JetID"), -# select = cms.string(" ") -# ), - ## when omitted no extra selection will be applied on jets before - ## filling the monitor histograms; if jetCorrector is present the - ## selection will be applied to corrected jets - select = cms.string("pt>15 & abs(eta)<2.5"), ## & emEnergyFraction>0.01"), - ## when omitted monitor histograms for b-tagging will not be filled + + select = cms.string("pt>15 & abs(eta)<2.5"), jetBTaggers = cms.PSet( trackCountingEff = cms.PSet( label = cms.InputTag("trackCountingHighEffBJetTags" ), @@ -374,57 +206,20 @@ ) ) ), - ## [optional] : when omitted no mass window will be applied - ## for the W mass before filling the event monitoring plots -# massExtras = cms.PSet( -# lowerEdge = cms.double( 70.), -# upperEdge = cms.double(110.) -# ), - ## [optional] : when omitted the monitoring plots for triggering - ## will be empty -# triggerExtras = cms.PSet( -# src = cms.InputTag("TriggerResults","","HLT"), -# paths = cms.vstring([ 'HLT_Ele15_LW_L1R:HLT_QuadJetU15']) -## paths = cms.vstring(['']) -# ) ), - ## ------------------------------------------------------ - ## PRESELECTION - ## - ## setup of the event preselection, which will not - ## be monitored - ## [mandatory] : but may be empty - ## + preselection = cms.PSet( - ## [optional] : when omitted no preselection is applied -# trigger = cms.PSet( -# src = cms.InputTag("TriggerResults","","HLT"), -# select = cms.vstring(['HLT_Ele15_SW_CaloEleId_L1R']) -# ), - ## [optional] : when omitted no preselection is applied -# vertex = cms.PSet( -# src = cms.InputTag("offlineSlimmedPrimaryVertices"), -# select = cms.string('!isFake && ndof >= 4 && abs(z)<24. && position.Rho <= 2.0') -# ) + ), - ## ------------------------------------------------------ - ## SELECTION - ## - ## monitor histrograms are filled after each selection - ## step, the selection is applied in the order defined - ## by this vector - ## [mandatory] : may be empty or contain an arbitrary - ## number of PSets + selection = cms.VPSet( cms.PSet( label = cms.string("presel"), src = cms.InputTag("offlineSlimmedPrimaryVertices"), -# select = cms.string('!isFake && ndof >= 4 && abs(z)<24. && position.Rho <= 2.0'), ), cms.PSet( label = cms.string("elecs:step0"), src = cms.InputTag("slimmedElectrons"), -## electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.5) ), select = cms.string("pt>30 & abs(eta)<2.5 & abs(gsfTrack.d0)<0.02 && gsfTrack.hitPattern().numberOfHits('MISSING_INNER_HITS') <= 0 && (abs(superCluster.eta) <= 1.4442 || abs(superCluster.eta) >= 1.5660) && " + EletightIsoCut), min = cms.int32(1), max = cms.int32(1), @@ -432,7 +227,6 @@ cms.PSet( label = cms.string("jets:step1"), src = cms.InputTag("slimmedJets"), - #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<4.5 & numberOfDaughters>1 & ((abs(eta)>2.4) || ( chargedHadronEnergyFraction > 0 & chargedMultiplicity>0 & chargedEmEnergyFraction<0.99)) & neutralEmEnergyFraction < 0.99 & neutralHadronEnergyFraction < 0.99"), min = cms.int32(1), @@ -442,7 +236,6 @@ cms.PSet( label = cms.string("jets:step2"), src = cms.InputTag("slimmedJets"), - #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<4.5 & numberOfDaughters>1 & ((abs(eta)>2.4) || ( chargedHadronEnergyFraction > 0 & chargedMultiplicity>0 & chargedEmEnergyFraction<0.99)) & neutralEmEnergyFraction < 0.99 & neutralHadronEnergyFraction < 0.99"), min = cms.int32(2), diff --git a/DQM/Physics/python/topSingleLeptonDQM_miniAOD_cfi.py b/DQM/Physics/python/topSingleLeptonDQM_miniAOD_cfi.py index e9bb64832a96c..7f65e9aaddaf8 100644 --- a/DQM/Physics/python/topSingleLeptonDQM_miniAOD_cfi.py +++ b/DQM/Physics/python/topSingleLeptonDQM_miniAOD_cfi.py @@ -12,20 +12,9 @@ ElelooseIsoCut = "(pfIsolationVariables.sumChargedHadronPt + max(0., pfIsolationVariables.sumNeutralHadronEt + pfIsolationVariables.sumPhotonEt - 0.5 * pfIsolationVariables.sumPUPt) ) / pt < 0.15" topSingleLeptonDQM_miniAOD = cms.EDAnalyzer("TopSingleLeptonDQM_miniAOD", - ## ------------------------------------------------------ - ## SETUP - ## - ## configuration of the MonitoringEnsemble(s) - ## [mandatory] : optional PSets may be omitted - ## setup = cms.PSet( - ## sub-directory to write the monitor histograms to - ## [mandatory] : should not be changed w/o explicit - ## communication to TopCom! directory = cms.string("Physics/Top/TopSingleLeptonDQM_miniAOD/"), - ## [mandatory] sources = cms.PSet( -# muons = cms.InputTag("slimmedMuons"), elecs = cms.InputTag("slimmedElectrons"), jets = cms.InputTag("slimmedJets"), @@ -33,64 +22,27 @@ pvs = cms.InputTag("offlineSlimmedPrimaryVertices") ), - ## [optional] : when omitted the verbosity level is set to STANDARD monitoring = cms.PSet( verbosity = cms.string("DEBUG") ), - ## [optional] : when omitted all monitoring plots for primary vertices - ## will be filled w/o extras pvExtras = cms.PSet( - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the primary vertex candidates - #select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") ), - ## [optional] : when omitted all monitoring plots for electrons - ## will be filled w/o extras - elecExtras = cms.PSet( - ## when omitted electron plots will be filled w/o cut on electronId - ##electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.5) ), - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the electron candidates + + elecExtras = cms.PSet( select = cms.string("pt>15 & abs(eta)<2.5 & abs(gsfTrack.d0)<1 & abs(gsfTrack.dz)<20"), - ## when omitted isolated electron multiplicity plot will be equi- - ## valent to inclusive electron multiplicity plot isolation = cms.string(ElelooseIsoCut), ), - ## [optional] : when omitted all monitoring plots for muons - ## will be filled w/o extras muonExtras = cms.PSet( - ## when omitted muon plots will be filled w/o additional pre- - ## selection of the muon candidates select = cms.string(looseMuonCut + " && pt>10 & abs(eta)<2.4"), - ## when omitted isolated muon multiplicity plot will be equi- - ## valent to inclusive muon multiplicity plot isolation = cms.string(looseIsoCut), ), - ## [optional] : when omitted all monitoring plots for jets will - ## be filled from uncorrected jets jetExtras = cms.PSet( - ## when omitted monitor plots for pt will be filled from uncorrected - ## jets -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), - ## when omitted monitor plots will be filled w/o additional cut on - ## jetID - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") -# ), - ## when omitted no extra selection will be applied on jets before - ## filling the monitor histograms; if jetCorrector is present the - ## selection will be applied to corrected jets select = cms.string("pt>30 & abs(eta)<2.5 "), ), - ## [optional] : when omitted no mass window will be applied - ## for the W mass befor filling the event monitoring plots massExtras = cms.PSet( lowerEdge = cms.double( 70.), upperEdge = cms.double(110.) ), - ## [optional] : when omitted the monitoring plots for triggering - ## will be empty triggerExtras = cms.PSet( src = cms.InputTag("TriggerResults","","HLT"), paths = cms.vstring(['HLT_Mu3:HLT_QuadJet15U', @@ -99,61 +51,26 @@ 'HLT_Mu9:HLT_QuadJet15U']) ) ), - ## ------------------------------------------------------ - ## PRESELECTION - ## - ## setup of the event preselection, which will not - ## be monitored - ## [mandatory] : but may be empty - ## preselection = cms.PSet( - ## [optional] : when omitted no preselection is applied - #trigger = cms.PSet( - # src = cms.InputTag("TriggerResults","","HLT"), - # select = cms.vstring(['HLT_Mu11', 'HLT_Ele15_LW_L1R', 'HLT_QuadJet30']) - #), - ## [optional] : when omitted no preselection is applied + vertex = cms.PSet( src = cms.InputTag("offlineSlimmedPrimaryVertices")#, - #select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') ) ), - ## ------------------------------------------------------ - ## SELECTION - ## - ## monitor histrograms are filled after each selection - ## step, the selection is applied in the order defined - ## by this vector - ## [mandatory] : may be empty or contain an arbitrary - ## number of PSets - ## selection = cms.VPSet( cms.PSet( label = cms.string("jets:step0"), src = cms.InputTag("slimmedJets"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(2), ), ) ) topSingleMuonLooseDQM_miniAOD = cms.EDAnalyzer("TopSingleLeptonDQM_miniAOD", - ## ------------------------------------------------------ - ## SETUP - ## - ## configuration of the MonitoringEnsemble(s) - ## [mandatory] : optional PSets may be omitted - ## + setup = cms.PSet( - ## sub-directory to write the monitor histograms to - ## [mandatory] : should not be changed w/o explicit - ## communication to TopCom! directory = cms.string("Physics/Top/TopSingleMuonLooseDQM_miniAOD/"), - ## [mandatory] sources = cms.PSet( muons = cms.InputTag("slimmedMuons"), elecs = cms.InputTag("slimmedElectrons"), @@ -161,42 +78,17 @@ mets = cms.VInputTag("slimmedMETs", "slimmedMETsNoHF", "slimmedMETsPuppi"), pvs = cms.InputTag("offlineSlimmedPrimaryVertices") ), - ## [optional] : when omitted the verbosity level is set to STANDARD monitoring = cms.PSet( verbosity = cms.string("DEBUG") ), pvExtras = cms.PSet( - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the primary vertex candidates - #select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") ), - ## [optional] : when omitted all monitoring plots for muons - ## will be filled w/o extras muonExtras = cms.PSet( - ## when omitted muon plots will be filled w/o additional pre- - ## selection of the muon candidates select = cms.string(looseMuonCut + " && pt > 10 & abs(eta)<2.4"), - ## when omitted isolated muon multiplicity plot will be equi- - ## valent to inclusive muon multiplicity plot isolation = cms.string(looseIsoCut) ), - ## [optional] : when omitted all monitoring plots for jets - ## will be filled w/o extras jetExtras = cms.PSet( - ## when omitted monitor plots for pt will be filled from uncorrected - ## jets -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), - ## when omitted monitor plots will be filled w/o additional cut on - ## jetID - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), - ## when omitted no extra selection will be applied on jets before - ## filling the monitor histograms; if jetCorrector is present the - ## selection will be applied to corrected jets select = cms.string("pt>30 & abs(eta)<2.5"), - ## when omitted monitor histograms for b-tagging will not be filled jetBTaggers = cms.PSet( trackCountingEff = cms.PSet( label = cms.InputTag("trackCountingHighEffBJetTags" ), @@ -213,18 +105,14 @@ cvsVertex = cms.PSet( label = cms.InputTag("combinedSecondaryVertexBJetTags"), workingPoint = cms.double(0.898) - # CSV Tight from https://twiki.cern.ch/twiki/bin/viewauth/CMS/BTagPerformanceOP#B_tagging_Operating_Points_for_5 ) ), ), - ## [optional] : when omitted no mass window will be applied - ## for the W mass befor filling the event monitoring plots massExtras = cms.PSet( lowerEdge = cms.double( 70.), upperEdge = cms.double(110.) ), - ## [optional] : when omitted the monitoring plots for triggering - ## will be empty + triggerExtras = cms.PSet( src = cms.InputTag("TriggerResults","","HLT"), paths = cms.vstring(['HLT_Mu3:HLT_QuadJet15U', @@ -234,33 +122,11 @@ 'HLT_Mu11:HLT_QuadJet15U']) ) ), - ## ------------------------------------------------------ - ## PRESELECTION - ## - ## setup of the event preselection, which will not - ## be monitored - ## [mandatory] : but may be empty - ## preselection = cms.PSet( - ## [optional] : when omitted no preselection is applied - #trigger = cms.PSet( - # src = cms.InputTag("TriggerResults","","HLT"), - # select = cms.vstring(['HLT_Mu11']) - #), - ## [optional] : when omitted no preselection is applied vertex = cms.PSet( src = cms.InputTag("offlineSlimmedPrimaryVertices")#, - #select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') ) ), - ## ------------------------------------------------------ - ## SELECTION - ## - ## monitor histrograms are filled after each selection - ## step, the selection is applied in the order defined - ## by this vector - ## [mandatory] : may be empty or contain an arbitrary - ## number of PSets selection = cms.VPSet( cms.PSet( label = cms.string("muons:step0"), @@ -271,63 +137,32 @@ cms.PSet( label = cms.string("jets:step1"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), - #select = cms.string("pt>30 & abs(eta)<2.5 & emEnergyFraction>0.01"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(1), ), cms.PSet( label = cms.string("jets:step2"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(2), ), cms.PSet( label = cms.string("jets:step3"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(3), ), cms.PSet( label = cms.string("jets:step4"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") -# ), min = cms.int32(4), ), ) ) topSingleMuonMediumDQM_miniAOD = cms.EDAnalyzer("TopSingleLeptonDQM_miniAOD", - ## ------------------------------------------------------ - ## SETUP - ## - ## configuration of the MonitoringEnsemble(s) - ## [mandatory] : optional PSets may be omitted - ## setup = cms.PSet( - ## sub-directory to write the monitor histograms to - ## [mandatory] : should not be changed w/o explicit - ## communication to TopCom! directory = cms.string("Physics/Top/TopSingleMuonMediumDQM_miniAOD/"), - ## [mandatory] sources = cms.PSet( muons = cms.InputTag("slimmedMuons"), elecs = cms.InputTag("slimmedElectrons"), @@ -336,44 +171,17 @@ pvs = cms.InputTag("offlineSlimmedPrimaryVertices") ), - ## [optional] : when omitted the verbosity level is set to STANDARD monitoring = cms.PSet( verbosity = cms.string("DEBUG") ), - ## [optional] : when omitted all monitoring plots for primary vertices - ## will be filled w/o extras pvExtras = cms.PSet( - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the primary vertex candidates - #select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") ), - ## [optional] : when omitted all monitoring plots for muons - ## will be filled w/o extras muonExtras = cms.PSet( - ## when omitted muon plots will be filled w/o additional pre- - ## selection of the muon candidates select = cms.string(looseMuonCut + " && pt>20 & abs(eta)<2.1"), - ## when omitted isolated muon multiplicity plot will be equi- - ## valent to inclusive muon multiplicity plot isolation = cms.string(looseIsoCut) ), - ## [optional] : when omitted all monitoring plots for jets - ## will be filled w/o extras - jetExtras = cms.PSet( - ## when omitted monitor plots for pt will be filled from uncorrected - ## jets - #jetCorrector = cms.string("topDQMak5PFCHSL2L3"), - ## when omitted monitor plots will be filled w/o additional cut on - ## jetID - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), - ## when omitted no extra selection will be applied on jets before - ## filling the monitor histograms; if jetCorrector is present the - ## selection will be applied to corrected jets + jetExtras = cms.PSet( select = cms.string("pt>30 & abs(eta)<2.5 "), - ## when omitted monitor histograms for b-tagging will not be filled jetBTaggers = cms.PSet( trackCountingEff = cms.PSet( label = cms.InputTag("trackCountingHighEffBJetTags" ), @@ -390,54 +198,19 @@ cvsVertex = cms.PSet( label = cms.InputTag("combinedSecondaryVertexBJetTags"), workingPoint = cms.double(0.898) - # CSV Tight from https://twiki.cern.ch/twiki/bin/viewauth/CMS/BTagPerformanceOP#B_tagging_Operating_Points_for_5 ) ), ), - ## [optional] : when omitted no mass window will be applied - ## for the W mass before filling the event monitoring plots massExtras = cms.PSet( lowerEdge = cms.double( 70.), upperEdge = cms.double(110.) ), - ## [optional] : when omitted the monitoring plots for triggering - ## will be empty -# triggerExtras = cms.PSet( -# src = cms.InputTag("TriggerResults","","HLT"), -# paths = cms.vstring(['HLT_Mu3:HLT_QuadJet15U', -# 'HLT_Mu5:HLT_QuadJet15U', -# 'HLT_Mu7:HLT_QuadJet15U', -# 'HLT_Mu9:HLT_QuadJet15U', -# 'HLT_Mu11:HLT_QuadJet15U']) -# ) ), - ## ------------------------------------------------------ - ## PRESELECTION - ## - ## setup of the event preselection, which will not - ## be monitored - ## [mandatory] : but may be empty - ## preselection = cms.PSet( - ## [optional] : when omitted no preselection is applied - #trigger = cms.PSet( - # src = cms.InputTag("TriggerResults","","HLT"), - # select = cms.vstring(['HLT_Mu15_v2']) - #), - ## [optional] : when omitted no preselection is applied vertex = cms.PSet( src = cms.InputTag("offlineSlimmedPrimaryVertices")#, - #select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') ) ), - ## ------------------------------------------------------ - ## SELECTION - ## - ## monitor histrograms are filled after each selection - ## step, the selection is applied in the order defined - ## by this vector - ## [mandatory] : may be empty or contain an arbitrary - ## number of PSets selection = cms.VPSet( cms.PSet( label = cms.string("muons:step0"), @@ -448,67 +221,34 @@ ), cms.PSet( label = cms.string("jets:step1"), - #src = cms.InputTag("slimmedJets"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), - #select = cms.string("pt>30 & abs(eta)<2.5 & emEnergyFraction>0.01"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(1), ), cms.PSet( label = cms.string("jets:step2"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(2), ), cms.PSet( label = cms.string("jets:step3"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(3), ), cms.PSet( label = cms.string("jets:step4"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") -# ), min = cms.int32(4), ), ) ) topSingleElectronLooseDQM_miniAOD = cms.EDAnalyzer("TopSingleLeptonDQM_miniAOD", - ## ------------------------------------------------------ - ## SETUP - ## - ## configuration of the MonitoringEnsemble(s) - ## [mandatory] : optional PSets may be omitted - ## setup = cms.PSet( - ## sub-directory to write the monitor histograms to - ## [mandatory] : should not be changed w/o explicit - ## communication to TopCom! directory = cms.string("Physics/Top/TopSingleElectronLooseDQM_miniAOD/"), - ## [mandatory] sources = cms.PSet( muons = cms.InputTag("slimmedMuons"), elecs = cms.InputTag("slimmedElectrons"), @@ -517,47 +257,17 @@ pvs = cms.InputTag("offlineSlimmedPrimaryVertices") ), - ## [optional] : when omitted the verbosity level is set to STANDARD monitoring = cms.PSet( verbosity = cms.string("DEBUG") ), - ## [optional] : when omitted all monitoring plots for primary vertices - ## will be filled w/o extras pvExtras = cms.PSet( - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the primary vertex candidates - #select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") ), - ## [optional] : when omitted all monitoring plots for electrons - ## will be filled w/o extras elecExtras = cms.PSet( - ## when omitted electron plots will be filled w/o cut on electronId - #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.0) ), - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the electron candidates select = cms.string("pt>20 & abs(eta)<2.5"), - ## when omitted isolated electron multiplicity plot will be equi- - ## valent to inclusive electron multiplicity plot isolation = cms.string(ElelooseIsoCut), ), - ## [optional] : when omitted all monitoring plots for jets - ## will be filled w/o extras jetExtras = cms.PSet( - ## when omitted monitor plots for pt will be filled from uncorrected - ## jets -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), - ## when omitted monitor plots will be filled w/o additional cut on - ## jetID - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), - ## when omitted no extra selection will be applied on jets before - ## filling the monitor histograms; if jetCorrector is present the - ## selection will be applied to corrected jets - #select = cms.string("pt>30 & abs(eta)<2.5 & emEnergyFraction>0.01"), select = cms.string("pt>30 & abs(eta)<2.5 "), - ## when omitted monitor histograms for b-tagging will not be filled jetBTaggers = cms.PSet( trackCountingEff = cms.PSet( label = cms.InputTag("trackCountingHighEffBJetTags" ), @@ -574,50 +284,23 @@ cvsVertex = cms.PSet( label = cms.InputTag("combinedSecondaryVertexBJetTags"), workingPoint = cms.double(0.898) - # CSV Tight from https://twiki.cern.ch/twiki/bin/viewauth/CMS/BTagPerformanceOP#B_tagging_Operating_Points_for_5 ) ), ), - ## [optional] : when omitted no mass window will be applied - ## for the W mass before filling the event monitoring plots massExtras = cms.PSet( lowerEdge = cms.double( 70.), upperEdge = cms.double(110.) ), - ## [optional] : when omitted the monitoring plots for triggering - ## will be empty triggerExtras = cms.PSet( src = cms.InputTag("TriggerResults","","HLT"), paths = cms.vstring(['HLT_Ele15_LW_L1R:HLT_QuadJetU15']) ) ), - ## ------------------------------------------------------ - ## PRESELECTION - ## - ## setup of the event preselection, which will not - ## be monitored - ## [mandatory] : but may be empty - ## preselection = cms.PSet( - ## [optional] : when omitted no preselection is applied - #trigger = cms.PSet( - # src = cms.InputTag("TriggerResults","","HLT"), - # select = cms.vstring(['HLT_Ele15_SW_CaloEleId_L1R']) - #), - ## [optional] : when omitted no preselection is applied vertex = cms.PSet( src = cms.InputTag("offlineSlimmedPrimaryVertices")#, - #select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') ) ), - ## ------------------------------------------------------ - ## SELECTION - ## - ## monitor histrograms are filled after each selection - ## step, the selection is applied in the order defined - ## by this vector - ## [mandatory] : may be empty or contain an arbitrary - ## number of PSets selection = cms.VPSet( cms.PSet( label = cms.string("elecs:step0"), @@ -628,63 +311,34 @@ cms.PSet( label = cms.string("jets:step1"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(1), ), cms.PSet( label = cms.string("jets:step2"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") -# ), min = cms.int32(2), ), cms.PSet( label = cms.string("jets:step3"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(3), ), cms.PSet( label = cms.string("jets:step4"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(4), ), ) ) topSingleElectronMediumDQM_miniAOD = cms.EDAnalyzer("TopSingleLeptonDQM_miniAOD", - ## ------------------------------------------------------ - ## SETUP - ## - ## configuration of the MonitoringEnsemble(s) - ## [mandatory] : optional PSets may be omitted - ## setup = cms.PSet( - ## sub-directory to write the monitor histograms to - ## [mandatory] : should not be changed w/o explicit - ## communication to TopCom! + directory = cms.string("Physics/Top/TopSingleElectronMediumDQM_miniAOD/"), - ## [mandatory] sources = cms.PSet( muons = cms.InputTag("slimmedMuons"), elecs = cms.InputTag("slimmedElectrons"), @@ -693,46 +347,17 @@ pvs = cms.InputTag("offlineSlimmedPrimaryVertices") ), - ## [optional] : when omitted the verbosity level is set to STANDARD monitoring = cms.PSet( verbosity = cms.string("DEBUG") ), - ## [optional] : when omitted all monitoring plots for primary vertices - ## will be filled w/o extras pvExtras = cms.PSet( - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the primary vertex candidates - #select = cms.string("abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake") ), - ## [optional] : when omitted all monitoring plots for electrons - ## will be filled w/o extras elecExtras = cms.PSet( - ## when omitted electron plots will be filled w/o cut on electronId - #electronId = cms.PSet( src = cms.InputTag("mvaTrigV0"), cutValue = cms.double(0.0) ), - ## when omitted electron plots will be filled w/o additional pre- - ## selection of the electron candidates select = cms.string("pt>20 & abs(eta)<2.5"), - ## when omitted isolated electron multiplicity plot will be equi- - ## valent to inclusive electron multiplicity plot isolation = cms.string(ElelooseIsoCut), ), - ## [optional] : when omitted all monitoring plots for jets - ## will be filled w/o extras jetExtras = cms.PSet( - ## when omitted monitor plots for pt will be filled from uncorrected - ## jets -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), - ## when omitted monitor plots will be filled w/o additional cut on - ## jetID - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), - ## when omitted no extra selection will be applied on jets before - ## filling the monitor histograms; if jetCorrector is present the - ## selection will be applied to corrected jets select = cms.string("pt>30 & abs(eta)<2.5 "), - ## when omitted monitor histograms for b-tagging will not be filled jetBTaggers = cms.PSet( trackCountingEff = cms.PSet( label = cms.InputTag("trackCountingHighEffBJetTags" ), @@ -749,50 +374,19 @@ cvsVertex = cms.PSet( label = cms.InputTag("combinedSecondaryVertexBJetTags"), workingPoint = cms.double(0.898) - # CSV Tight from https://twiki.cern.ch/twiki/bin/viewauth/CMS/BTagPerformanceOP#B_tagging_Operating_Points_for_5 ) ), ), - ## [optional] : when omitted no mass window will be applied - ## for the W mass before filling the event monitoring plots massExtras = cms.PSet( lowerEdge = cms.double( 70.), upperEdge = cms.double(110.) ), - ## [optional] : when omitted the monitoring plots for triggering - ## will be empty - #triggerExtras = cms.PSet( - # src = cms.InputTag("TriggerResults","","HLT"), - # paths = cms.vstring([ 'HLT_Ele15_LW_L1R:HLT_QuadJetU15']) - #) ), - ## ------------------------------------------------------ - ## PRESELECTION - ## - ## setup of the event preselection, which will not - ## be monitored - ## [mandatory] : but may be empty - ## preselection = cms.PSet( - ## [optional] : when omitted no preselection is applied - #trigger = cms.PSet( - # src = cms.InputTag("TriggerResults","","HLT"), - # select = cms.vstring(['HLT_Ele15_SW_CaloEleId_L1R']) - #), - ## [optional] : when omitted no preselection is applied vertex = cms.PSet( src = cms.InputTag("offlineSlimmedPrimaryVertices")#, - #select = cms.string('abs(x)<1. & abs(y)<1. & abs(z)<20. & tracksSize>3 & !isFake') ) ), - ## ------------------------------------------------------ - ## SELECTION - ## - ## monitor histrograms are filled after each selection - ## step, the selection is applied in the order defined - ## by this vector - ## [mandatory] : may be empty or contain an arbitrary - ## number of PSets selection = cms.VPSet( cms.PSet( label = cms.string("elecs:step0"), @@ -804,45 +398,25 @@ cms.PSet( label = cms.string("jets:step1"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") -# ), min = cms.int32(1), ), cms.PSet( label = cms.string("jets:step2"), src = cms.InputTag("slimmedJets"), -# jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(2), ), cms.PSet( label = cms.string("jets:step3"), src = cms.InputTag("slimmedJets"), - # jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(3), ), cms.PSet( label = cms.string("jets:step4"), src = cms.InputTag("slimmedJets"), - # jetCorrector = cms.string("topDQMak5PFCHSL2L3"), select = cms.string("pt>30 & abs(eta)<2.5 "), - #jetID = cms.PSet( - #label = cms.InputTag("ak5JetID"), - #select = cms.string("fHPD < 0.98 & n90Hits>1 & restrictedEMF<1") - # ), min = cms.int32(4), ), ) diff --git a/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc index 4f54b85855226..e1dff4594440b 100644 --- a/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc +++ b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc @@ -87,8 +87,7 @@ MonitorEnsemble::MonitorEnsemble(const char* label, } // muonExtras are optional; they may be omitted or empty if (cfg.existsAs( - "muonExtras")) { // && vcfg.existsAs - // >("selection")){ + "muonExtras")) { edm::ParameterSet muonExtras = cfg.getParameter("muonExtras"); @@ -133,38 +132,6 @@ MonitorEnsemble::MonitorEnsemble(const char* label, jetSelect_ = vcfg[2].getParameter("select"); } - // jetBDiscriminators are optional; in case they are - // not found the InputTag will remain empty; they - // consist of pairs of edm::JetFlavorAssociation's & - // corresponding working points - /* includeBTag_ = jetExtras.existsAs("jetBTaggers"); - if (includeBTag_) { - edm::ParameterSet btagEff = - jetExtras.getParameter("jetBTaggers") - .getParameter("trackCountingEff"); - btagEff_ = iC.consumes( - btagEff.getParameter("label")); - btagEffWP_ = btagEff.getParameter("workingPoint"); - edm::ParameterSet btagPur = - jetExtras.getParameter("jetBTaggers") - .getParameter("trackCountingPur"); - btagPur_ = iC.consumes( - btagPur.getParameter("label")); - btagPurWP_ = btagPur.getParameter("workingPoint"); - edm::ParameterSet btagVtx = - jetExtras.getParameter("jetBTaggers") - .getParameter("secondaryVertex"); - btagVtx_ = iC.consumes( - btagVtx.getParameter("label")); - btagVtxWP_ = btagVtx.getParameter("workingPoint"); - edm::ParameterSet btagCombVtx = - jetExtras.getParameter("jetBTaggers") - .getParameter("combinedSecondaryVertex"); - btagCombVtx_ = iC.consumes( - btagCombVtx.getParameter("label")); - btagCombVtxWP_ = btagCombVtx.getParameter("workingPoint"); - } - */ } // triggerExtras are optional; they may be omitted or empty @@ -209,10 +176,6 @@ MonitorEnsemble::MonitorEnsemble(const char* label, muonSelect.reset(new StringCutObjectSelector(muonSelect_)); muonIso.reset(new StringCutObjectSelector(muonIso_)); - //jetSelectCalo=0; - //jetSelectPF=0; - //jetSelectJet=0; - elecSelect.reset(new StringCutObjectSelector(elecSelect_)); elecIso.reset(new StringCutObjectSelector(elecIso_)); @@ -431,13 +394,11 @@ void MonitorEnsemble::book(DQMStore::IBooker & ibooker) { void MonitorEnsemble::fill(const edm::Event& event, const edm::EventSetup& setup) { - //cout<<"1"< triggerTable; if (!triggerTable_.isUninitialized()) { if (!event.getByToken(triggerTable_, triggerTable)) return; } - //cout<<"2"<> pvs; if (!event.getByToken(pvs_, pvs)) return; - //cout<<"3"<::const_iterator pv = pvs->begin(); pv != pvs->end(); ++pv) { @@ -474,14 +434,7 @@ void MonitorEnsemble::fill(const edm::Event& event, if (!event.getByToken(elecs_gsf_, elecs_gsf)) return; - //cout<<"4"<> electronId; - if (!electronId_.isUninitialized()) { - if (!event.getByToken(electronId_, electronId)) { - return; - } - }*/ + // loop electron collection unsigned int eMult = 0, eMultIso = 0; std::vector isoElecs; @@ -489,14 +442,6 @@ void MonitorEnsemble::fill(const edm::Event& event, unsigned int idx_gsf = 0; for ( edm::View::const_iterator elec = elecs_gsf->begin(); elec != elecs_gsf->end(); ++elec) { - // if (elec->gsfElectronRef().isNull()) continue; - - - - - // restrict to electrons with good electronId -// if (electronId_.isUninitialized() ? true : ((double)(*electronId)[elec] >= -// eidCutValue_)) { if (true){ if ((*elecSelect)(*elec)) { @@ -524,7 +469,6 @@ void MonitorEnsemble::fill(const edm::Event& event, elec->pt(); if (eMult == 0) { - // restrict to the leading electron fill("elecPt_", elec->pt()); fill("elecEta_", elec->eta()); fill("elecRelIso_", isolationRel); @@ -533,8 +477,7 @@ void MonitorEnsemble::fill(const edm::Event& event, fill("elecNeuHadIso_", isolationNeuHad); fill("elecPhIso_", isolationPhoton); } - // in addition to the multiplicity counter buffer the iso - // electron candidates for later overlap check with jets + ++eMult; if ((*elecIso)(*elec)) { if (eMultIso == 0) e = *elec; @@ -561,21 +504,12 @@ void MonitorEnsemble::fill(const edm::Event& event, unsigned int mMult = 0, mMultIso = 0; edm::Handle> muons; - //edm::View::const_iterator muonit; - //reco::MuonRef muon; + pat::Muon mu; if (!event.getByToken(muons_, muons)) return; - //cout<<"5"<::const_iterator muon = muons->begin(); muon != muons->end(); - ++muon) { // for now, to use Reco::Muon need to substitute muonit - // with muon - // and comment the MuonRef and PFCandidate parts - - //if (muonit->muonRef().isNull()) continue; - //reco::MuonRef muon = muonit->muonRef(); - - //if (muon->innerTrack().isNull()) continue; + ++muon) { // restrict to globalMuons if (muon->isGlobalMuon()) { @@ -631,42 +565,6 @@ void MonitorEnsemble::fill(const edm::Event& event, ------------------------------------------------------------ */ - // check availability of the btaggers -/* edm::Handle btagEff, btagPur, btagVtx, btagCombVtx; - if (includeBTag_) { - if (!event.getByToken(btagEff_, btagEff)) return; - if (!event.getByToken(btagPur_, btagPur)) return; - if (!event.getByToken(btagVtx_, btagVtx)) return; - if (!event.getByToken(btagCombVtx_, btagCombVtx)) return; - }*/ - - // load jet corrector if configured such - /* const JetCorrector* corrector = 0; - if (!jetCorrector_.empty()) { - // check whether a jet correcto is in the event setup or not - if (setup.find(edm::eventsetup::EventSetupRecordKey::makeKey< - JetCorrectionsRecord>())) { - corrector = JetCorrector::getJetCorrector(jetCorrector_, setup); - } else { - edm::LogVerbatim("SingleTopTChannelLeptonDQM_miniAOD") - << "\n" - << "-----------------------------------------------------------------" - "-------------------- \n" - << " No JetCorrectionsRecord available from EventSetup:\n" - << " - Jets will not be corrected.\n" - << " - If you want to change this add the following lines to your " - "cfg file:\n" - << "\n" - << " ## load jet corrections\n" - << " " - "process.load(\"JetMETCorrections.Configuration." - "JetCorrectionServicesAllAlgos_cff\") \n" - << " process.prefer(\"ak5CaloL2L3\")\n" - << "\n" - << "-----------------------------------------------------------------" - "-------------------- \n"; - } - }*/ // loop jet collection std::vector correctedJets; @@ -675,11 +573,6 @@ void MonitorEnsemble::fill(const edm::Event& event, edm::Handle> jets; if (!event.getByToken(jets_, jets)) return; - //cout<<"6"< jetID; - if (jetIDSelect_) { - if (!event.getByToken(jetIDLabel_, jetID)) return; - }*/ vector bJetDiscVal; vector NobJetDiscVal; @@ -688,49 +581,16 @@ void MonitorEnsemble::fill(const edm::Event& event, pat::Jet FwdJetCand; for (edm::View::const_iterator jet = jets->begin(); jet != jets->end(); ++jet) { - // check jetID for calo jets - // unsigned int idx = jet - jets->begin(); -/* if (dynamic_cast(&*jet)) { - if (jetIDSelect_ && - dynamic_cast(jets->refAt(idx).get())) { - if (!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue; - } - } - // check additional jet selection for calo, pf and bare reco jets - if (dynamic_cast(&*jet)) { - reco::CaloJet sel = dynamic_cast(*jet); - sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); - if ( jetSelectCalo==0) - jetSelectCalo.reset(new StringCutObjectSelector(jetSelect_)); - if (!((*jetSelectCalo)(sel))) { - continue; - } - } else if (dynamic_cast(&*jet)) { - reco::PFJet sel = dynamic_cast(*jet); - sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); - if ( jetSelectPF==0) - jetSelectPF.reset(new StringCutObjectSelector(jetSelect_)); - if (!((*jetSelectPF)(sel))) continue; - } else {*/ pat::Jet sel = *jet; - //sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + if ( jetSelectJet==0) jetSelectJet.reset(new StringCutObjectSelector(jetSelect_)); if (!((*jetSelectJet)(sel))) continue; - // } - // check for overlaps -- comment this to be synchronous with the selection - // bool overlap=false; - // for(std::vector::const_iterator - // elec=isoElecs.begin(); elec!=isoElecs.end(); ++elec){ - // if(reco::deltaR((*elec)->eta(), (*elec)->phi(), jet->eta(), - // jet->phi())<0.4){overlap=true; break;} - //} if(overlap){continue;} // prepare jet to fill monitor histograms pat::Jet monitorJet = *jet; - // monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); correctedJets.push_back(monitorJet); ++mult; // determine jet multiplicity @@ -744,13 +604,11 @@ void MonitorEnsemble::fill(const edm::Event& event, if (monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags") > 0.89) { if (multBPur == 0) { TaggedJetCand = monitorJet; - // TaggedJetCand = *jet; bJetDiscVal.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); } else if (multBPur == 1) { bJetDiscVal.push_back(monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); if (bJetDiscVal[1] > bJetDiscVal[0]) TaggedJetCand = monitorJet; - // TaggedJetCand = *jet; } ++multBPur; } else { @@ -776,51 +634,7 @@ void MonitorEnsemble::fill(const edm::Event& event, fill("jetBDiscPur_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); - /* if (includeBTag_) { - // fill b-discriminators - edm::RefToBase jetRef = jets->refAt(idx); - if ((*btagVtx)[jetRef] > btagVtxWP_) ++multBVtx; - if ((*btagCombVtx)[jetRef] > btagCombVtxWP_) ++multBCombVtx; - if ((*btagPur)[jetRef] > btagPurWP_) { - if (multBPur == 0) { - TaggedJetCand = monitorJet; - // TaggedJetCand = *jet; - bJetDiscVal.push_back((*btagPur)[jetRef]); - - } else if (multBPur == 1) { - bJetDiscVal.push_back((*btagPur)[jetRef]); - if (bJetDiscVal[1] > bJetDiscVal[0]) TaggedJetCand = monitorJet; - // TaggedJetCand = *jet; - } - ++multBPur; - } else { - if (multNoBPur == 0) { - UnTaggedJetCand = monitorJet; - NobJetDiscVal.push_back((*btagPur)[jetRef]); - - } else if (multNoBPur == 1) { - NobJetDiscVal.push_back((*btagPur)[jetRef]); - if (NobJetDiscVal[1] < NobJetDiscVal[0]) UnTaggedJetCand = monitorJet; - } - - ++multNoBPur; - } - - if ((*btagEff)[jetRef] > btagEffWP_) ++multBEff; - - if (mult == 1) { - fill("jet1BDiscPur_", (*btagPur)[jetRef]); - fill("jet1BDiscCombVtx_", (*btagCombVtx)[jetRef]); - } else if (mult == 2) { - fill("jet2BDiscPur_", (*btagPur)[jetRef]); - fill("jet2BDiscCombVtx_", (*btagCombVtx)[jetRef]); - } - fill("jetBDiscEff_", (*btagEff)[jetRef]); - fill("jetBDiscPur_", (*btagPur)[jetRef]); - fill("jetBDiscVtx_", (*btagVtx)[jetRef]); - fill("jetBDiscCombVtx_", (*btagCombVtx)[jetRef]); - }*/ // fill pt (raw or L2L3) for the leading jets if (mult == 1) { fill("jet1Pt_", monitorJet.pt()); diff --git a/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h index 74b372e8fee41..8962ab7b2b33d 100644 --- a/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h +++ b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h @@ -22,33 +22,6 @@ #include "FWCore/Utilities/interface/EDGetToken.h" #include "DataFormats/PatCandidates/interface/Electron.h" -/** - \class MonitorEnsemble TopDQMHelpers.h - "DQM/Physics/interface/TopDQMHelpers.h" - - \brief Helper class to define histograms for monitoring of - muon/electron/jet/met quantities. - - Helper class to contain histograms for the monitoring of - muon/electron/jet/met quantities. - This class can be instantiated several times after several event selection - steps. It can - be used to fill histograms in three different granularity levels according to - STANDARD - (<10 histograms), VERBOSE(<20 histograms), DEBUG(<30 histgorams). Note that - for the sake - of simplicity and to force the analyst to keep the number of histograms to be - monitored - small the MonitorEnsemble class contains the histograms for all objects at - once. It should - not contain much more than 10 histograms though in the STANDARD - configuration, as these - histograms will be monitored at each SelectionStep. Monitoring of histograms - after selec- - tion steps within the same object collection needs to be implemented within - the Monitor- - Ensemble. It will not be covered by the SelectionStep class. -*/ namespace SingleTopTChannelLepton_miniAOD { @@ -142,19 +115,7 @@ class MonitorEnsemble { // edm::InputTag electronId_; edm::EDGetTokenT > electronId_; - /// electronId pattern we expect the following pattern: - /// 0: fails - /// 1: passes electron ID only - /// 2: passes electron Isolation only - /// 3: passes electron ID and Isolation only - /// 4: passes conversion rejection - /// 5: passes conversion rejection and ID - /// 6: passes conversion rejection and Isolation - /// 7: passes the whole selection - /// As described on - /// https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID - // int eidPattern_; - // the cut for the MVA Id + double eidCutValue_; /// extra isolation criterion on electron std::string elecIso_; @@ -262,39 +223,7 @@ inline void MonitorEnsemble::fill(const edm::Event& event, #include "DataFormats/Common/interface/TriggerResults.h" #include "DQMServices/Core/interface/DQMEDAnalyzer.h" -/** - \class SingleTopTChannelLeptonDQM_miniAOD SingleTopTChannelLeptonDQM_miniAOD.h - "DQM/Physics/plugins/SingleTopTChannelLeptonDQM_miniAOD.h" - - \brief Module to apply a monitored selection of top like events in the - semi-leptonic channel - - Plugin to apply a monitored selection of top like events with some minimal - flexibility in the number and definition of the selection steps. To achieve - this flexibility it employes the SelectionStep class. The MonitorEnsemble - class is used to provide a well defined set of histograms to be monitored - after each selection step. The SelectionStep class provides a flexible and - intuitive selection via the StringCutParser. SelectionStep and - MonitorEnsemble classes are interleaved. The monitoring starts after a - preselection step (which is not monitored in the context of this module) with - an instance of the MonitorEnsemble class. The following objects are supported - for selection: - - - jets : of type pat::Jet (jets), reco::CaloJet (jets/calo) or reco::PFJet - (jets/pflow) - - elecs : of type pat::Electron - - muons : of type pat::Muon - - met : of type pat::MET - - These types have to be present as prefix of the selection step paramter - _label_ separated from the rest of the label by a ':' (e.g. in the form - "jets:step0"). The class expects selection labels of this type. They will be - disentangled by the private helper functions _objectType_ and _seletionStep_ - as declared below. -*/ - -/// define MonitorEnsembple to be used -// using SingleTopTChannelLepton_miniAOD::MonitorEnsemble; + class SingleTopTChannelLeptonDQM_miniAOD : public DQMEDAnalyzer { public: @@ -341,14 +270,9 @@ class SingleTopTChannelLeptonDQM_miniAOD : public DQMEDAnalyzer { /// string cut selector std::unique_ptr > beamspotSelect_; - /// needed to guarantee the selection order as defined by the order of - /// ParameterSets in the _selection_ vector as defined in the config + std::vector selectionOrder_; - /// this is the heart component of the plugin; std::string keeps a label - /// the selection step for later identification, edm::ParameterSet keeps - /// the configuration of the selection for the SelectionStep class, - /// MonitoringEnsemble keeps an instance of the MonitorEnsemble class to - /// be filled _after_ each selection step + std::map< std::string, std::pair("elecExtras")) { - // rho for PF isolation with EA corrections - // eventrhoToken_ = - // iC.consumes(edm::InputTag("fixedGridRhoFastjetAll")); + edm::ParameterSet elecExtras = cfg.getParameter("elecExtras"); @@ -142,39 +140,6 @@ MonitorEnsemble::MonitorEnsemble(const char* label, if (jetExtras.existsAs("select")) { jetSelect_ = jetExtras.getParameter("select"); } - // jetBDiscriminators are optional; in case they are - // not found the InputTag will remain empty; they - // consist of pairs of edm::JetFlavorAssociation's & - // corresponding working points - /* includeBTag_ = jetExtras.existsAs("jetBTaggers"); - if (includeBTag_) { - edm::ParameterSet btagEff = - jetExtras.getParameter("jetBTaggers") - .getParameter("trackCountingEff"); - btagEff_ = iC.consumes( - btagEff.getParameter("label")); - btagEffWP_ = btagEff.getParameter("workingPoint"); - edm::ParameterSet btagPur = - jetExtras.getParameter("jetBTaggers") - .getParameter("trackCountingPur"); - btagPur_ = iC.consumes( - btagPur.getParameter("label")); - btagPurWP_ = btagPur.getParameter("workingPoint"); - edm::ParameterSet btagVtx = - jetExtras.getParameter("jetBTaggers") - .getParameter("secondaryVertex"); - btagVtx_ = iC.consumes( - btagVtx.getParameter("label")); - btagVtxWP_ = btagVtx.getParameter("workingPoint"); - edm::ParameterSet btagCSV = - jetExtras.getParameter("jetBTaggers") - .getParameter("cvsVertex"); - btagCSV_ = iC.consumes( - btagCSV.getParameter("label")); - btagCSVWP_ = btagCSV.getParameter("workingPoint"); - - - }*/ } // triggerExtras are optional; they may be omitted or empty @@ -449,21 +414,10 @@ void MonitorEnsemble::fill(const edm::Event& event, unsigned int eMult = 0, eMultIso = 0; std::vector isoElecs; -// for (edm::View::const_iterator elec = elecs->begin(); -// elec != elecs->end(); ++elec) { -// if (elec->gsfElectronRef().isNull()) { -// continue; -// } for (edm::View::const_iterator elec = elecs->begin(); elec != elecs->end(); ++elec) { - -// reco::GsfElectronRef elec = elec->gsfElectronRef(); - // restrict to electrons with good electronId - // if (electronId_.isUninitialized() ? true : ((double)(*electronId)[elec] >= - // eidCutValue_)) { - if(true){//no electron id applied yet! if (!elecSelect_ || (*elecSelect_)(*elec)) { @@ -484,8 +438,7 @@ void MonitorEnsemble::fill(const edm::Event& event, fill("elecNeHadIso_", el_NeHadIso); fill("elecPhIso_", el_PhIso); } - // in addition to the multiplicity counter buffer the iso - // electron candidates for later overlap check with jets + ++eMult; if (!elecIso_ || (*elecIso_)(*elec)) { isoElecs.push_back(&(*elec)); @@ -513,18 +466,12 @@ void MonitorEnsemble::fill(const edm::Event& event, if (!event.getByToken(muons_, muons)) return; -//for (edm::View::const_iterator muonit = muons->begin(); -// muonit != muons->end(); ++muonit) { for (edm::View::const_iterator muon = muons->begin(); muon != muons->end(); ++muon) { - -// if (muonit->muonRef().isNull()) continue; -// reco::MuonRef muon = muonit->muonRef(); - // restrict to globalMuons if (muon->isGlobalMuon()) { fill("muonDelZ_", muon->innerTrack()->vz()); // CB using inner track! @@ -534,8 +481,7 @@ void MonitorEnsemble::fill(const edm::Event& event, // apply preselection if (!muonSelect_ || (*muonSelect_)(*muon)) { - -// if (true){ + double chHadPt = muon->pfIsolationR04().sumChargedHadronPt; double neHadEt = muon->pfIsolationR04().sumNeutralHadronEt; @@ -573,47 +519,6 @@ void MonitorEnsemble::fill(const edm::Event& event, ------------------------------------------------------------ */ - // check availability of the btaggers -/* edm::Handle btagEff, btagPur, btagVtx, btagCSV; - if (includeBTag_) { - if (!event.getByToken(btagEff_, btagEff)) return; - if (!event.getByToken(btagPur_, btagPur)) return; - if (!event.getByToken(btagVtx_, btagVtx)) return; - if (!event.getByToken(btagCSV_, btagCSV)) return; - }*/ - // load jet corrector if configured such -/* const JetCorrector* corrector = 0; - if (!jetCorrector_.empty()) { - // check whether a jet correcto is in the event setup or not - if (setup.find(edm::eventsetup::EventSetupRecordKey::makeKey< - JetCorrectionsRecord>())) { - corrector = JetCorrector::getJetCorrector(jetCorrector_, setup); - } else { - edm::LogVerbatim("TopSingleLeptonDQM_miniAOD") - << "\n" - << "-----------------------------------------------------------------" - "-------------------- \n" - << " No JetCorrectionsRecord available from EventSetup: " - " \n" - << " - Jets will not be corrected. " - " \n" - << " - If you want to change this add the following lines to your " - "cfg file: \n" - << " " - " \n" - << " ## load jet corrections " - " \n" - << " " - "process.load(\"JetMETCorrections.Configuration." - "JetCorrectionServicesAllAlgos_cff\") \n" - << " process.prefer(\"ak5CaloL2L3\") " - " \n" - << " " - " \n" - << "-----------------------------------------------------------------" - "-------------------- \n"; - } - }*/ // loop jet collection std::vector correctedJets; @@ -625,56 +530,21 @@ void MonitorEnsemble::fill(const edm::Event& event, return; } - //edm::Handle jetID; -/* if (jetIDSelect_) { - if (!event.getByToken(jetIDLabel_, jetID)) return; - }*/ - for (edm::View::const_iterator jet = jets->begin(); jet != jets->end(); ++jet) { // check jetID for calo jets unsigned int idx = jet - jets->begin(); - // if (jetIDSelect_ && - // dynamic_cast(jets->refAt(idx).get())) { - // if (!(*jetIDSelect_)((*jetID)[jets->refAt(idx)])) continue; - // } - // chekc additional jet selection for calo, pf and bare reco jets - // if (dynamic_cast(&*jet)) { - // reco::CaloJet sel = dynamic_cast(*jet); - // sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); - // StringCutObjectSelector jetSelect(jetSelect_); - // if (!jetSelect(sel)) { - // continue; - // } - // } else if (dynamic_cast(&*jet)) { - // reco::PFJet sel = dynamic_cast(*jet); - // sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); - // StringCutObjectSelector jetSelect(jetSelect_); - // if (!jetSelect(sel)) continue; - // } else { + pat::Jet sel = *jet; - // sel.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + StringCutObjectSelector jetSelect(jetSelect_); if (!jetSelect(sel)) continue; - // } // prepare jet to fill monitor histograms pat::Jet monitorJet = *jet; - // monitorJet.scaleEnergy(corrector ? corrector->correction(*jet) : 1.); + correctedJets.push_back(monitorJet); ++mult; // determine jet multiplicity -// if (includeBTag_) { - // fill b-discriminators -// edm::RefToBase jetRef = jets->refAt(idx); -// fill("jetBDiscEff_", (*btagEff)[jetRef]); -// if ((*btagEff)[jetRef] > btagEffWP_) ++multBEff; -// fill("jetBDiscPur_", (*btagPur)[jetRef]); -// if ((*btagPur)[jetRef] > btagPurWP_) ++multBPur; -// fill("jetBDiscVtx_", (*btagVtx)[jetRef]); -// if ((*btagVtx)[jetRef] > btagVtxWP_) ++multBVtx; -// fill("jetBCVtx_", (*btagCSV)[jetRef]); -// if ((*btagCSV)[jetRef] > btagCSVWP_) ++multCSV; - fill("jetBDiscEff_", monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags")); //hard coded discriminator and value right now. if (monitorJet.bDiscriminator("pfCombinedInclusiveSecondaryVertexV2BJetTags") > 0.89) ++multBEff; @@ -761,31 +631,6 @@ void MonitorEnsemble::fill(const edm::Event& event, if (btopMass >= 0) fill("massBTop_", btopMass); - // fill plots for trigger monitoring - /* if ((lowerEdge_ == -1. && upperEdge_ == -1.) || - (lowerEdge_ < wMass && wMass < upperEdge_)) { - if (!triggerTable_.isUninitialized()) - fill(event, *triggerTable, "trigger", triggerPaths_); - if (logged_ <= hists_.find("eventLogger_")->second->getNbinsY()) { - // log runnumber, lumi block, event number & some - // more pysics infomation for interesting events - fill("eventLogger_", 0.5, logged_ + 0.5, event.eventAuxiliary().run()); - fill("eventLogger_", 1.5, logged_ + 0.5, - event.eventAuxiliary().luminosityBlock()); - fill("eventLogger_", 2.5, logged_ + 0.5, event.eventAuxiliary().event()); - if (correctedJets.size() > 0) - fill("eventLogger_", 3.5, logged_ + 0.5, correctedJets[0].pt()); - if (correctedJets.size() > 1) - fill("eventLogger_", 4.5, logged_ + 0.5, correctedJets[1].pt()); - if (correctedJets.size() > 2) - fill("eventLogger_", 5.5, logged_ + 0.5, correctedJets[2].pt()); - if (correctedJets.size() > 3) - fill("eventLogger_", 6.5, logged_ + 0.5, correctedJets[3].pt()); - fill("eventLogger_", 7.5, logged_ + 0.5, wMass); - fill("eventLogger_", 8.5, logged_ + 0.5, topMass); - ++logged_; - } - }*/ } } @@ -798,8 +643,7 @@ TopSingleLeptonDQM_miniAOD::TopSingleLeptonDQM_miniAOD(const edm::ParameterSet& PvStep(nullptr), METStep(nullptr) { JetSteps.clear(); -// CaloJetSteps.clear(); -// PFJetSteps.clear(); + // configure preselection edm::ParameterSet presel = cfg.getParameter("preselection"); @@ -835,40 +679,27 @@ TopSingleLeptonDQM_miniAOD::TopSingleLeptonDQM_miniAOD(const edm::ParameterSet& for (std::vector::const_iterator selIt = selectionOrder_.begin(); selIt != selectionOrder_.end(); ++selIt) { std::string key = selectionStep(*selIt), type = objectType(*selIt); - //cout<(selection_[key].first, consumesCollector())); - //cout<<"muon step"<( selection_[key].first, consumesCollector())); - //cout<<"elec step"<(selection_[key].first, consumesCollector())); - //cout<<"pvs step"<>( new SelectionStep(selection_[key].first, consumesCollector()))); - //cout<<"jets step"<>( -// new SelectionStep(selection_[key].first, consumesCollector()))); -// } - // if (type == "jets/calo") { - // CaloJetSteps.push_back(std::unique_ptr>( - // new SelectionStep(selection_[key].first, consumesCollector()))); - // } + if (type == "met") { METStep.reset(new SelectionStep(selection_[key].first, consumesCollector())); - //cout<<"met step"<::const_iterator selIt = selectionOrder_.begin(); selIt != selectionOrder_.end(); ++selIt) { std::string key = selectionStep(*selIt), type = objectType(*selIt); @@ -908,21 +738,21 @@ void TopSingleLeptonDQM_miniAOD::analyze(const edm::Event& event, if (type == "muons" && MuonStep != 0) { if (MuonStep->select(event)) { ++passed; - // cout<<"selected event! "<fill(event, setup); } else break; } - // cout<<" apply selection steps 2"<select(event/*, "electron"*/)) { + + if (ElectronStep->select(event)) { ++passed; selection_[key].second->fill(event, setup); } else break; } - // cout<<" apply selection steps 3"<selectVertex(event)) { ++passed; @@ -930,7 +760,7 @@ void TopSingleLeptonDQM_miniAOD::analyze(const edm::Event& event, } else break; } - // cout<<" apply selection steps 4"<select(event, setup)) { - ++passed; - selection_[key].second->fill(event, setup); - } else - break; - } - } - if (type == "jets/calo") { - nCaloJetSteps++; - if (CaloJetSteps[nCaloJetSteps] != NULL) { - if (CaloJetSteps[nCaloJetSteps]->select(event, setup)) { - ++passed; - selection_[key].second->fill(event, setup); - } else - break; - } - }*/ + if (type == "met" && METStep != 0) { if (METStep->select(event)) { ++passed; diff --git a/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h index 3755d0ab42deb..40477d15c9ed0 100644 --- a/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h +++ b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h @@ -25,33 +25,7 @@ #include "DataFormats/PatCandidates/interface/Electron.h" #include "DataFormats/PatCandidates/interface/Jet.h" #include "DataFormats/PatCandidates/interface/MET.h" -/** - \class MonitorEnsemble TopDQMHelpers.h - "DQM/Physics/interface/TopDQMHelpers.h" - - \brief Helper class to define histograms for monitoring of - muon/electron/jet/met quantities. - - Helper class to contain histograms for the monitoring of - muon/electron/jet/met quantities. - This class can be instantiated several times after several event selection - steps. It can - be used to fill histograms in three different granularity levels according to - STANDARD - (<10 histograms), VERBOSE(<20 histograms), DEBUG(<30 histgorams). Note that - for the sake - of simplicity and to force the analyst to keep the number of histograms to be - monitored - small the MonitorEnsemble class contains the histograms for all objects at - once. It should - not contain much more than 10 histograms though in the STANDARD - configuration, as these - histograms will be monitored at each SelectionStep. Monitoring of histograms - after selec- - tion steps within the same object collection needs to be implemented within - the Monitor- - Ensemble. It will not be covered by the SelectionStep class. -*/ + namespace TopSingleLepton_miniAOD { @@ -136,19 +110,7 @@ class MonitorEnsemble { /// electronId label edm::EDGetTokenT > electronId_; - /// electronId pattern we expect the following pattern: - /// 0: fails - /// 1: passes electron ID only - /// 2: passes electron Isolation only - /// 3: passes electron ID and Isolation only - /// 4: passes conversion rejection - /// 5: passes conversion rejection and ID - /// 6: passes conversion rejection and Isolation - /// 7: passes the whole selection - /// As described on - /// https://twiki.cern.ch/twiki/bin/view/CMS/SimpleCutBasedEleID - // int eidPattern_; - // the cut for the MVA Id + double eidCutValue_; /// extra isolation criterion on electron std::unique_ptr > elecIso_; @@ -241,46 +203,6 @@ inline void MonitorEnsemble::fill(const edm::Event& event, #include "DataFormats/Common/interface/TriggerResults.h" #include "DQMServices/Core/interface/DQMEDAnalyzer.h" -/** - \class TopSingleLeptonDQM TopSingleLeptonDQM.h - "DQM/Physics/plugins/TopSingleLeptonDQM.h" - - \brief Module to apply a monitored selection of top like events in the - semi-leptonic channel - - Plugin to apply a monitored selection of top like events with some minimal - flexibility - in the number and definition of the selection steps. To achieve this - flexibility it - employes the SelectionStep class. The MonitorEnsemble class is used to - provide a well - defined set of histograms to be monitored after each selection step. The - SelectionStep - class provides a flexible and intuitive selection via the StringCutParser. - SelectionStep - and MonitorEnsemble classes are interleaved. The monitoring starts after a - preselection - step (which is not monitored in the context of this module) with an instance - of the - MonitorEnsemble class. The following objects are supported for selection: - - - jets : of type pat::Jet (jets) - - - elecs : of type pat::Electron - - muons : of type pat::Muon - - met : of type pat::MET - - These types have to be present as prefix of the selection step paramter - _label_ separated - from the rest of the label by a ':' (e.g. in the form "jets:step0"). The - class expects - selection labels of this type. They will be disentangled by the private - helper functions - _objectType_ and _seletionStep_ as declared below. -*/ - -/// define MonitorEnsembple to be used -// using TopSingleLepton::MonitorEnsemble; class TopSingleLeptonDQM_miniAOD : public DQMEDAnalyzer { public: @@ -339,8 +261,7 @@ class TopSingleLeptonDQM_miniAOD : public DQMEDAnalyzer { std::unique_ptr > PvStep; std::unique_ptr > METStep; std::vector > > JetSteps; -// std::vector > > CaloJetSteps; -// std::vector > > PFJetSteps; + std::vector sel_; edm::ParameterSet setup_; diff --git a/DQMOffline/Configuration/python/DQMOffline_cff.py b/DQMOffline/Configuration/python/DQMOffline_cff.py index 9efced67a7e96..c79a4e2f8f0aa 100644 --- a/DQMOffline/Configuration/python/DQMOffline_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_cff.py @@ -75,6 +75,7 @@ DQMOfflineFakeHLT = cms.Sequence( DQMOffline ) DQMOfflineFakeHLT.remove( HLTMonitoring ) + DQMOfflinePrePOGMC = cms.Sequence( pvMonitor * bTagPlotsDATA * dqmPhysics ) From a410254e176c1997790144665e8bb2f27ef6756f Mon Sep 17 00:00:00 2001 From: Bugra Date: Fri, 22 Jan 2016 11:37:44 +0100 Subject: [PATCH 197/250] added missing file --- DQM/Physics/test/topDQM_production_miniAOD.py | 120 +++++++++++++++++- 1 file changed, 114 insertions(+), 6 deletions(-) diff --git a/DQM/Physics/test/topDQM_production_miniAOD.py b/DQM/Physics/test/topDQM_production_miniAOD.py index 72032a977fbe6..d87f4f9803e34 100644 --- a/DQM/Physics/test/topDQM_production_miniAOD.py +++ b/DQM/Physics/test/topDQM_production_miniAOD.py @@ -30,13 +30,121 @@ #"/store/relval/CMSSW_6_2_0_pre1-START61_V8/RelValTTbarLepton/GEN-SIM-RECO/v1/00000/C6CC53CC-6E6D-E211-8EAB-003048D3756A.root'," #/RelValTTbar/CMSSW_7_0_0_pre6-PRE_ST62_V8-v1/GEN-SIM-RECO - #'/store/relval/CMSSW_7_0_0_pre6/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/B627D32C-0B3C-E311-BBE6-0026189438E6.root', - #'/store/relval/CMSSW_7_0_0_pre6/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/72477A84-F93B-E311-BF63-003048FFD720.root', - #'/store/relval/CMSSW_7_0_0_pre6/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/12A06D7A-F93B-E311-AA64-003048678BEA.root' - # '/store/relval/CMSSW_7_1_0_pre4/RelValTTbarLepton_13/GEN-SIM-RECO/POSTLS171_V1-v2/00000/48ED95A2-66AA-E311-9865-02163E00E5AE.root' -# '/store/relval/CMSSW_7_1_0_pre9/RelValTTbarLepton_13/GEN-SIM-RECO/POSTLS171_V11-v1/00000/90D92DC6-67F0-E311-8D2E-0025905A613C.root' + # '/store/relval/CMSSW_7_0_0_pre6/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/B627D32C-0B3C-E311-BBE6-0026189438E6.root', + # '/store/relval/CMSSW_7_0_0_pre6/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/72477A84-F93B-E311-BF63-003048FFD720.root', + # '/store/relval/CMSSW_7_0_0_pre6/RelValTTbar/GEN-SIM-RECO/PRE_ST62_V8-v1/00000/12A06D7A-F93B-E311-AA64-003048678BEA.root' + # '/store/relval/CMSSW_7_1_0_pre4/RelValTTbarLepton_13/GEN-SIM-RECO/POSTLS171_V1-v2/00000/48ED95A2-66AA-E311-9865-02163E00E5AE.root' +# '/store/relval/CMSSW_7_1_0_pre9/RelValTTbarLepton_13/GEN-SIM-RECO/POSTLS171_V11-v1/00000/90D92DC6-67F0-E311-8D2E-0025905A613C.root' + + '/store/mc/RunIISpring15MiniAODv2/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/74X_mcRun2_asymptotic_v2_ext3-v1/10000/003964D7-D06E-E511-A8DA-001517F7F524.root', + '/store/mc/RunIISpring15MiniAODv2/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/74X_mcRun2_asymptotic_v2_ext3-v1/10000/0041D4C0-D86E-E511-8D6B-001E67A3E8F9.root', + '/store/mc/RunIISpring15MiniAODv2/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/74X_mcRun2_asymptotic_v2_ext3-v1/10000/00962466-E86E-E511-9105-0026189438D7.root', + '/store/mc/RunIISpring15MiniAODv2/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/74X_mcRun2_asymptotic_v2_ext3-v1/10000/00A7C4B3-766E-E511-973F-002618943904.root', + '/store/mc/RunIISpring15MiniAODv2/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/74X_mcRun2_asymptotic_v2_ext3-v1/10000/020B5100-426E-E511-888A-0026189437F9.root', + '/store/mc/RunIISpring15MiniAODv2/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/74X_mcRun2_asymptotic_v2_ext3-v1/10000/024E3A40-706F-E511-AE4B-68B5996BD98E.root', + '/store/mc/RunIISpring15MiniAODv2/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/74X_mcRun2_asymptotic_v2_ext3-v1/10000/025CB88B-706F-E511-9F87-6CC2173D46A0.root' + +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/00000/B4414D37-CF97-E511-B2C4-002590747DE2.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/00000/B4414D37-CF97-E511-B2C4-002590747DE2.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/006945CA-3088-E511-96C4-0025905A497A.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/04B296F0-2A88-E511-A760-002618943856.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/04F9A001-2888-E511-ABEC-0025905A60B6.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/0A37E1C7-668B-E511-81DC-FACADE0000AF.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/0A401EEE-2A88-E511-AFBC-0026189438AD.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/0A5583EC-2A88-E511-A990-0CC47A4D768C.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/0E9802F4-2A88-E511-B4EE-002618943970.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/1609D954-5D87-E511-AB94-0025907B4F64.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/1646260C-189A-E511-9854-0025904C66E4.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/16DF38A8-2388-E511-B447-0CC47A4C8E56.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/182952B2-6C89-E511-9CF7-0CC47A4D76C0.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/1A473DEA-2A88-E511-8DC0-00261894393E.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/1A5653A9-2388-E511-BE59-0025905A60AA.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/2002E1DA-2A88-E511-B93C-0CC47A78A4B8.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/2031DEEF-2A88-E511-ADF1-0CC47A4C8EEA.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/20ED3D7F-2588-E511-AC35-00505602077D.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/22B66702-2188-E511-AB24-20CF305616E2.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/24B786E8-A087-E511-80C3-002618943950.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/2A2AF453-2188-E511-9918-0025907B503A.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/2AEC7850-1F88-E511-832C-0025907B503A.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/2C573255-009A-E511-A1DB-0025905C2CD2.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/30F9373F-3188-E511-9769-0CC47A4C8ECA.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/34BFD4ED-2A88-E511-8609-0CC47A4D7634.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/366DF93F-3188-E511-BF1D-0CC47A4C8EB6.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/3ACD13F0-2A88-E511-9FD6-0CC47A4C8F12.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/4467632E-2188-E511-A5F1-002590D0B044.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/508CF007-189A-E511-AB08-0025905C3D6A.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/5204AAEB-9F87-E511-AA0B-0026189438CC.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/642A7DD7-2A88-E511-BB53-0CC47A4D767E.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/64395FEB-2A88-E511-929E-0026189437FD.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/689CC1E6-3888-E511-8D89-0CC47A4C8E0E.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/6A1E3BFF-2788-E511-B16D-0CC47A4D767E.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/6E848416-7D8B-E511-82A9-047D7BD6DF34.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/74096A0B-189A-E511-AC3C-0025905C9742.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/74788752-1F88-E511-9F39-20CF305616E2.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/748ED45E-3C88-E511-8E27-0025905964B6.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/7C7F85C8-668B-E511-A3D0-FACADE0000AF.root', +# '/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/7CACA6D7-2A88-E511-83D9-0CC47A78A472.root', + + + + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/7E65204F-1F88-E511-8D2C-002590D0B044.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/8072C45A-948B-E511-9106-00266CFFA1AC.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/82F384FF-2788-E511-B894-0CC47A78A4B8.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/8414FF0E-7D8B-E511-8007-047D7B881D26.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/848000A9-2388-E511-B9D2-0025905A60FE.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/868B6D02-2888-E511-B667-0CC47A78A472.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/86F0A513-0A89-E511-9D31-A01D48EE8318.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/8C081F49-AD91-E511-A1FA-0025904CDDFA.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/8C9B920B-189A-E511-8523-0025904C63FA.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/8EB36200-2888-E511-8DC3-0025905A6136.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/90D9B150-1F88-E511-BD7A-002590D0B058.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/924B4D60-3C88-E511-BEA7-0025905A60BE.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/949C8F64-FF99-E511-B8DE-0025905BA734.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/94FD91A8-2388-E511-9F33-0CC47A78A42E.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/96BFF2B0-2888-E511-8916-002590D0B0D4.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/9A33A5D1-668B-E511-93F1-002590AC4BF8.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/A06767EC-2A88-E511-BE75-00261894398C.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/AA123970-FF99-E511-A864-0025904C641C.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/AA8972DE-5787-E511-9DCB-002590D0AFC6.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/AE9D38EE-5A87-E511-A5B2-002590D0AFB6.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/B66A08F1-2A88-E511-A98F-0025905A6094.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/B80D1283-5E87-E511-B089-002590D0B046.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/BAB37002-2888-E511-BBE0-0CC47A78A472.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/C02D41A7-2388-E511-8C02-0CC47A4D761A.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/C041AD83-5E87-E511-8258-002590D0B052.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/C05800A4-2388-E511-ADE5-0026189438FD.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/C84167BF-9C87-E511-A3C2-002618943940.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/D221EED8-2588-E511-9A68-002590D0AFF4.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/D63C75F1-2A88-E511-8B15-0025905B860E.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/DA0B72BF-9C87-E511-8734-002618943916.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/DE080BE8-3888-E511-B2BD-0CC47A4C8E0E.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/E240F1C1-9C87-E511-9374-0026189438CC.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/EE697B2B-3788-E511-857E-0CC47A7452D0.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/F231403E-3E88-E511-A3E6-0025905B855E.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/F4FD5AF0-2A88-E511-8C28-0CC47A4C8F10.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/F675A30B-189A-E511-B35B-0025904C63FA.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/FA529E5B-5987-E511-8F30-005056020786.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/FAA42B44-A087-E511-9D9E-00248C0BE005.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/20000/FAC5E021-3788-E511-8953-0CC47A4D7618.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/0028B733-4C87-E511-BBEE-002590D0B052.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/12DF8FB8-5C87-E511-88A1-0025907B5002.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/1607DD10-5E87-E511-BEC7-0025905A60D2.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/2821C96A-5087-E511-86F9-002590D0B086.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/2A04A99D-7187-E511-A3B5-0025905A6088.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/2EA9647A-5887-E511-8BF8-002590D0B09A.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/2EEA626F-D18E-E511-9FDE-02163E00F449.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/368618C7-2F8E-E511-BCB2-6CC2173C3DD0.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/48DCFD10-5E87-E511-8193-0025905A6138.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/4A2F3EE2-6087-E511-8D3F-0025905A612E.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/524B846A-5087-E511-81AE-002590D0B0CC.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/76FAB9E2-6087-E511-B1E0-0025905A6080.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/A625DC4C-4C87-E511-A0C6-002590D0B052.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/A69D21E3-5C87-E511-BCF5-0CC47A4DEEF8.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/B8AFEA2D-B786-E511-964E-0025905AA9CC.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/F828D2E2-6087-E511-BDBD-0025905A6138.root', + #'/store/mc/RunIIFall15DR76/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/25nsFlat10to25TSG_76X_mcRun2_asymptotic_v11_ext3-v1/30000/FEEE3F10-5E87-E511-B346-0025905B85D6.root', + - '/store/mc/RunIISpring15MiniAODv2/TT_TuneCUETP8M1_13TeV-powheg-pythia8/MINIAODSIM/74X_mcRun2_asymptotic_v2_ext3-v1/10000/003964D7-D06E-E511-A8DA-001517F7F524.root' ) ) From f68863463a30dfcdb8089dd79cfda26664a04b3b Mon Sep 17 00:00:00 2001 From: Bugra Date: Fri, 22 Jan 2016 11:58:19 +0100 Subject: [PATCH 198/250] asd --- DQMOffline/Configuration/python/DQMOffline_cff.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/DQMOffline/Configuration/python/DQMOffline_cff.py b/DQMOffline/Configuration/python/DQMOffline_cff.py index c79a4e2f8f0aa..bc623a366fb1f 100644 --- a/DQMOffline/Configuration/python/DQMOffline_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_cff.py @@ -42,7 +42,6 @@ from DQMOffline.RecoB.PrimaryVertexMonitor_cff import * from DQMOffline.RecoB.dqmAnalyzer_cff import * from DQM.Physics.DQMPhysics_cff import * -from DQM.Physics.DQMTopMiniAOD_cff import * from Validation.RecoTau.DQMSequences_cfi import * from DQM.TrackingMonitorSource.TrackingSourceConfig_Tier0_cff import * # miniAOD DQM validation @@ -64,18 +63,14 @@ DQMOfflinePOG = cms.Sequence( DQMOfflinePrePOG * DQMMessageLogger ) -HLTMonitoring = cms.Sequence( OfflineHLTMonitoring ) - DQMOffline = cms.Sequence( DQMOfflinePreDPG * DQMOfflinePrePOG * - HLTMonitoring * dqmFastTimerServiceLuminosity * DQMMessageLogger ) DQMOfflineFakeHLT = cms.Sequence( DQMOffline ) DQMOfflineFakeHLT.remove( HLTMonitoring ) - DQMOfflinePrePOGMC = cms.Sequence( pvMonitor * bTagPlotsDATA * dqmPhysics ) @@ -114,9 +109,6 @@ produceDenoms * pfTauRunDQMValidation ) -DQMOfflineTracking = cms.Sequence( TrackingDQMSourceTier0Common * - pvMonitor - ) DQMOfflineMuon = cms.Sequence( dtSources * rpcTier0Source * cscSources * @@ -132,7 +124,9 @@ DQMOfflineEGamma = cms.Sequence( egammaDQMOffline ) DQMOfflineBTag = cms.Sequence( bTagPlotsDATA ) - + +HLTMonitoring = cms.Sequence( OfflineHLTMonitoring ) + DQMOfflineMiniAOD = cms.Sequence() @@ -141,3 +135,4 @@ PostDQMOfflineMiniAOD = cms.Sequence(miniAODDQMSequence*jetMETDQMOfflineSourceMiniAOD*tracksDQMMiniAOD*topPhysicsminiAOD) PostDQMOffline = cms.Sequence() + From 17ecb65f86ff8fdb9cc60188e089481dcb93ca83 Mon Sep 17 00:00:00 2001 From: Bugra Date: Mon, 25 Jan 2016 17:39:19 +0100 Subject: [PATCH 199/250] fix DQMOffline_cff --- DQMOffline/Configuration/python/DQMOffline_cff.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/DQMOffline/Configuration/python/DQMOffline_cff.py b/DQMOffline/Configuration/python/DQMOffline_cff.py index bc623a366fb1f..b60efef4fd925 100644 --- a/DQMOffline/Configuration/python/DQMOffline_cff.py +++ b/DQMOffline/Configuration/python/DQMOffline_cff.py @@ -42,6 +42,7 @@ from DQMOffline.RecoB.PrimaryVertexMonitor_cff import * from DQMOffline.RecoB.dqmAnalyzer_cff import * from DQM.Physics.DQMPhysics_cff import * +from DQM.Physics.DQMTopMiniAOD_cff import * from Validation.RecoTau.DQMSequences_cfi import * from DQM.TrackingMonitorSource.TrackingSourceConfig_Tier0_cff import * # miniAOD DQM validation @@ -63,8 +64,11 @@ DQMOfflinePOG = cms.Sequence( DQMOfflinePrePOG * DQMMessageLogger ) +HLTMonitoring = cms.Sequence( OfflineHLTMonitoring ) + DQMOffline = cms.Sequence( DQMOfflinePreDPG * DQMOfflinePrePOG * + HLTMonitoring * dqmFastTimerServiceLuminosity * DQMMessageLogger ) @@ -109,6 +113,9 @@ produceDenoms * pfTauRunDQMValidation ) +DQMOfflineTracking = cms.Sequence( TrackingDQMSourceTier0Common * + pvMonitor + ) DQMOfflineMuon = cms.Sequence( dtSources * rpcTier0Source * cscSources * @@ -124,10 +131,7 @@ DQMOfflineEGamma = cms.Sequence( egammaDQMOffline ) DQMOfflineBTag = cms.Sequence( bTagPlotsDATA ) - -HLTMonitoring = cms.Sequence( OfflineHLTMonitoring ) - - + DQMOfflineMiniAOD = cms.Sequence() #Post sequences are automatically placed in the EndPath by ConfigBuilder if PAT is run. @@ -135,4 +139,3 @@ PostDQMOfflineMiniAOD = cms.Sequence(miniAODDQMSequence*jetMETDQMOfflineSourceMiniAOD*tracksDQMMiniAOD*topPhysicsminiAOD) PostDQMOffline = cms.Sequence() - From b44f90a4fe1e386bc9560f86b6be39c3057a0150 Mon Sep 17 00:00:00 2001 From: Bugra Date: Fri, 29 Jan 2016 17:27:55 +0100 Subject: [PATCH 200/250] Final comments from David Lange implemented --- DQM/Physics/interface/TopDQMHelpers.h | 1 - .../src/SingleTopTChannelLeptonDQM_miniAOD.cc | 36 +++++++++---------- .../src/SingleTopTChannelLeptonDQM_miniAOD.h | 10 +++--- DQM/Physics/src/TopDQMHelpers.cc | 16 ++++----- 4 files changed, 31 insertions(+), 32 deletions(-) diff --git a/DQM/Physics/interface/TopDQMHelpers.h b/DQM/Physics/interface/TopDQMHelpers.h index 087352e0399f5..2d83ad5c14112 100644 --- a/DQM/Physics/interface/TopDQMHelpers.h +++ b/DQM/Physics/interface/TopDQMHelpers.h @@ -18,7 +18,6 @@ #include "DataFormats/PatCandidates/interface/Jet.h" #include "DataFormats/PatCandidates/interface/MET.h" -using namespace std; /** \fn accept TopDQMHelpers.h "DQM/Physics/interface/TopDQMHelpers.h" diff --git a/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc index e1dff4594440b..783a2bf789cc3 100644 --- a/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc +++ b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.cc @@ -763,11 +763,11 @@ SingleTopTChannelLeptonDQM_miniAOD::SingleTopTChannelLeptonDQM_miniAOD( : vertexSelect_(nullptr), beamspot_(""), beamspotSelect_(nullptr), - MuonStep(nullptr), - ElectronStep(nullptr), - PvStep(nullptr), - METStep(nullptr) { - JetSteps.clear(); + muonStep_(nullptr), + electronStep_(nullptr), + pvStep_(nullptr), + metStep_(nullptr) { + jetSteps_.clear(); // configure preselection @@ -819,25 +819,25 @@ SingleTopTChannelLeptonDQM_miniAOD::SingleTopTChannelLeptonDQM_miniAOD( using std::unique_ptr; if (type == "muons") { - MuonStep.reset(new SelectionStep(selection_[key].first, + muonStep_.reset(new SelectionStep(selection_[key].first, consumesCollector())); } if (type == "elecs") { - ElectronStep.reset(new SelectionStep( + electronStep_.reset(new SelectionStep( selection_[key].first, consumesCollector())); } if (type == "pvs") { - PvStep.reset(new SelectionStep(selection_[key].first, + pvStep_.reset(new SelectionStep(selection_[key].first, consumesCollector())); } if (type == "jets") { - JetSteps.push_back(std::unique_ptr>( + jetSteps_.push_back(std::unique_ptr>( new SelectionStep(selection_[key].first, consumesCollector()))); } if (type == "met") { - METStep.reset(new SelectionStep(selection_[key].first, + metStep_.reset(new SelectionStep(selection_[key].first, consumesCollector())); } } @@ -884,15 +884,15 @@ void SingleTopTChannelLeptonDQM_miniAOD::analyze(const edm::Event& event, if (type == "presel") { selection_[key].second->fill(event, setup); } - if (type == "elecs" && ElectronStep != 0) { - if (ElectronStep->select(event)) { + if (type == "elecs" && electronStep_ != 0) { + if (electronStep_->select(event)) { ++passed; selection_[key].second->fill(event, setup); } else break; } - if (type == "muons" && MuonStep != 0) { - if (MuonStep->select(event)) { + if (type == "muons" && muonStep_ != 0) { + if (muonStep_->select(event)) { ++passed; selection_[key].second->fill(event, setup); } else @@ -900,16 +900,16 @@ void SingleTopTChannelLeptonDQM_miniAOD::analyze(const edm::Event& event, } if (type == "jets") { nJetSteps++; - if (JetSteps[nJetSteps]) { - if (JetSteps[nJetSteps]->select(event, setup)) { + if (jetSteps_[nJetSteps]) { + if (jetSteps_[nJetSteps]->select(event, setup)) { ++passed; selection_[key].second->fill(event, setup); } else break; } } - if (type == "met" && METStep != 0) { - if (METStep->select(event)) { + if (type == "met" && metStep_ != 0) { + if (metStep_->select(event)) { ++passed; selection_[key].second->fill(event, setup); } else diff --git a/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h index 8962ab7b2b33d..803b5c08e33f7 100644 --- a/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h +++ b/DQM/Physics/src/SingleTopTChannelLeptonDQM_miniAOD.h @@ -279,13 +279,13 @@ class SingleTopTChannelLeptonDQM_miniAOD : public DQMEDAnalyzer { std::unique_ptr > > selection_; - std::unique_ptr > MuonStep; - std::unique_ptr > ElectronStep; - std::unique_ptr > PvStep; + std::unique_ptr > muonStep_; + std::unique_ptr > electronStep_; + std::unique_ptr > pvStep_; - std::vector > > JetSteps; + std::vector > > jetSteps_; - std::unique_ptr > METStep; + std::unique_ptr > metStep_; std::vector sel; }; diff --git a/DQM/Physics/src/TopDQMHelpers.cc b/DQM/Physics/src/TopDQMHelpers.cc index 5832ae953750d..66b6304839ada 100644 --- a/DQM/Physics/src/TopDQMHelpers.cc +++ b/DQM/Physics/src/TopDQMHelpers.cc @@ -67,8 +67,8 @@ void Calculate::operator()(const std::vector& jets) { maxPtIndices.push_back(-1); for (int idx = 0; idx < maxNJets_; ++idx) { - for (int jdx = 0; jdx < maxNJets_; ++jdx) { - if (jdx <= idx) continue; + for (int jdx = idx+1; jdx < maxNJets_; ++jdx) { + //if (jdx <= idx) continue; for (int kdx = 0; kdx < maxNJets_; ++kdx) { if (kdx == idx || kdx == jdx) continue; reco::Particle::LorentzVector sum = @@ -128,8 +128,8 @@ void Calculate::operator2(const std::vector& jets, maxBPtIndices.push_back(-1); maxBPtIndices.push_back(-1); for (int idx = 0; idx < maxNJets_; ++idx) { - for (int jdx = 0; jdx < maxNJets_; ++jdx) { - if (jdx <= idx) continue; + for (int jdx = idx+1; jdx < maxNJets_; ++jdx) { + //if (jdx <= idx) continue; for (int kdx = 0; kdx < maxNJets_; ++kdx) { if (kdx == idx || kdx == jdx) continue; // require only 1b-jet @@ -263,8 +263,8 @@ void Calculate_miniAOD::operator()(const std::vector& jets) { maxPtIndices.push_back(-1); for (int idx = 0; idx < maxNJets_; ++idx) { - for (int jdx = 0; jdx < maxNJets_; ++jdx) { - if (jdx <= idx) continue; + for (int jdx = idx+1; jdx < maxNJets_; ++jdx) { + //if (jdx <= idx) continue; for (int kdx = 0; kdx < maxNJets_; ++kdx) { if (kdx == idx || kdx == jdx) continue; reco::Particle::LorentzVector sum = @@ -326,8 +326,8 @@ void Calculate_miniAOD::operator2(const std::vector& jets, maxBPtIndices.push_back(-1); maxBPtIndices.push_back(-1); for (int idx = 0; idx < maxNJets_; ++idx) { - for (int jdx = 0; jdx < maxNJets_; ++jdx) { - if (jdx <= idx) continue; + for (int jdx = idx+1; jdx < maxNJets_; ++jdx) { + //if (jdx <= idx) continue; for (int kdx = 0; kdx < maxNJets_; ++kdx) { if (kdx == idx || kdx == jdx) continue; // require only 1b-jet From b54cb6ea3fd0a8bbf61c991eb726fbdd756c7b71 Mon Sep 17 00:00:00 2001 From: Lindsey Gray Date: Fri, 29 Jan 2016 18:21:59 +0100 Subject: [PATCH 201/250] Add QIETypes to es_hardcode for upgrade customization, fixes HGCal unit test --- SLHCUpgradeSimulations/Configuration/python/HCalCustoms.py | 1 + 1 file changed, 1 insertion(+) diff --git a/SLHCUpgradeSimulations/Configuration/python/HCalCustoms.py b/SLHCUpgradeSimulations/Configuration/python/HCalCustoms.py index 2afd2d47d6d7f..e363865700e57 100644 --- a/SLHCUpgradeSimulations/Configuration/python/HCalCustoms.py +++ b/SLHCUpgradeSimulations/Configuration/python/HCalCustoms.py @@ -31,6 +31,7 @@ def customise_HcalPhase1(process): 'RecoParams', 'RespCorrs', 'QIEData', + 'QIETypes', 'Gains', 'Pedestals', 'PedestalWidths', From 1331bbd913cdb70faeda8e10d3ebab5364ea2aa3 Mon Sep 17 00:00:00 2001 From: James Castle Date: Fri, 29 Jan 2016 22:08:24 +0100 Subject: [PATCH 202/250] Remove muon isolation filter for TkAlZMuMuHI and TkAlUpsilonMuMuHI. Experience with 2015 data shows that these filters kill yields in heavy ions --- .../python/ALCARECOTkAlUpsilonMuMuHI_cff.py | 11 ++++++----- .../python/ALCARECOTkAlZMuMuHI_cff.py | 9 +++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlUpsilonMuMuHI_cff.py b/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlUpsilonMuMuHI_cff.py index de33d47c29e5c..b8f4a26e935ce 100644 --- a/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlUpsilonMuMuHI_cff.py +++ b/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlUpsilonMuMuHI_cff.py @@ -10,13 +10,14 @@ ALCARECOTkAlUpsilonMuMuHIDCSFilter = ALCARECOTkAlUpsilonMuMuDCSFilter.clone() ALCARECOTkAlUpsilonMuMuHIGoodMuons = ALCARECOTkAlUpsilonMuMuGoodMuons.clone() -ALCARECOTkAlUpsilonMuMuHIRelCombIsoMuons = ALCARECOTkAlUpsilonMuMuRelCombIsoMuons.clone() -ALCARECOTkAlUpsilonMuMuHIRelCombIsoMuons.src = 'ALCARECOTkAlUpsilonMuMuHIGoodMuons' -ALCARECOTkAlUpsilonMuMuHIRelCombIsoMuons.cut = '(isolationR03().sumPt + isolationR03().emEt + isolationR03().hadEt)/pt < 0.3' +#ALCARECOTkAlUpsilonMuMuHIRelCombIsoMuons = ALCARECOTkAlUpsilonMuMuRelCombIsoMuons.clone() +#ALCARECOTkAlUpsilonMuMuHIRelCombIsoMuons.src = 'ALCARECOTkAlUpsilonMuMuHIGoodMuons' +#ALCARECOTkAlUpsilonMuMuHIRelCombIsoMuons.cut = '(isolationR03().sumPt + isolationR03().emEt + isolationR03().hadEt)/pt < 0.3' ALCARECOTkAlUpsilonMuMuHI = ALCARECOTkAlUpsilonMuMu.clone( src = 'hiGeneralTracks' ) -ALCARECOTkAlUpsilonMuMuHI.GlobalSelector.muonSource = 'ALCARECOTkAlUpsilonMuMuHIRelCombIsoMuons' +ALCARECOTkAlUpsilonMuMuHI.GlobalSelector.muonSource = 'ALCARECOTkAlUpsilonMuMuHIGoodMuons' -seqALCARECOTkAlUpsilonMuMuHI = cms.Sequence(ALCARECOTkAlUpsilonMuMuHIHLT+ALCARECOTkAlUpsilonMuMuHIDCSFilter+ALCARECOTkAlUpsilonMuMuHIGoodMuons+ALCARECOTkAlUpsilonMuMuHIRelCombIsoMuons+ALCARECOTkAlUpsilonMuMuHI) +#seqALCARECOTkAlUpsilonMuMuHI = cms.Sequence(ALCARECOTkAlUpsilonMuMuHIHLT+ALCARECOTkAlUpsilonMuMuHIDCSFilter+ALCARECOTkAlUpsilonMuMuHIGoodMuons+ALCARECOTkAlUpsilonMuMuHIRelCombIsoMuons+ALCARECOTkAlUpsilonMuMuHI) +seqALCARECOTkAlUpsilonMuMuHI = cms.Sequence(ALCARECOTkAlUpsilonMuMuHIHLT+ALCARECOTkAlUpsilonMuMuHIDCSFilter+ALCARECOTkAlUpsilonMuMuHIGoodMuons+ALCARECOTkAlUpsilonMuMuHI) diff --git a/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlZMuMuHI_cff.py b/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlZMuMuHI_cff.py index 0c8170fbfd631..4ab28df37c825 100644 --- a/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlZMuMuHI_cff.py +++ b/Alignment/CommonAlignmentProducer/python/ALCARECOTkAlZMuMuHI_cff.py @@ -10,12 +10,13 @@ ALCARECOTkAlZMuMuHIDCSFilter = ALCARECOTkAlZMuMuDCSFilter.clone() ALCARECOTkAlZMuMuHIGoodMuons = ALCARECOTkAlZMuMuGoodMuons.clone() -ALCARECOTkAlZMuMuHIRelCombIsoMuons = ALCARECOTkAlZMuMuRelCombIsoMuons.clone() -ALCARECOTkAlZMuMuHIRelCombIsoMuons.src = 'ALCARECOTkAlZMuMuHIGoodMuons' +#ALCARECOTkAlZMuMuHIRelCombIsoMuons = ALCARECOTkAlZMuMuRelCombIsoMuons.clone() +#ALCARECOTkAlZMuMuHIRelCombIsoMuons.src = 'ALCARECOTkAlZMuMuHIGoodMuons' ALCARECOTkAlZMuMuHI = ALCARECOTkAlZMuMu.clone( src = 'hiGeneralTracks' ) -ALCARECOTkAlZMuMuHI.GlobalSelector.muonSource = 'ALCARECOTkAlZMuMuHIRelCombIsoMuons' +ALCARECOTkAlZMuMuHI.GlobalSelector.muonSource = 'ALCARECOTkAlZMuMuHIGoodMuons' -seqALCARECOTkAlZMuMuHI = cms.Sequence(ALCARECOTkAlZMuMuHIHLT+ALCARECOTkAlZMuMuHIDCSFilter+ALCARECOTkAlZMuMuHIGoodMuons+ALCARECOTkAlZMuMuHIRelCombIsoMuons+ALCARECOTkAlZMuMuHI) +#seqALCARECOTkAlZMuMuHI = cms.Sequence(ALCARECOTkAlZMuMuHIHLT+ALCARECOTkAlZMuMuHIDCSFilter+ALCARECOTkAlZMuMuHIGoodMuons+ALCARECOTkAlZMuMuHIRelCombIsoMuons+ALCARECOTkAlZMuMuHI) +seqALCARECOTkAlZMuMuHI = cms.Sequence(ALCARECOTkAlZMuMuHIHLT+ALCARECOTkAlZMuMuHIDCSFilter+ALCARECOTkAlZMuMuHIGoodMuons+ALCARECOTkAlZMuMuHI) From 544dc719b1022b04aeecc1f0ebbcd151ac586dff Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Fri, 29 Jan 2016 15:36:42 -0600 Subject: [PATCH 203/250] Allow a modification to depend on multiple Modifiers Allow a configuration modification to only be applied if multiple Modifiers have been chosen. This is done using the '&' operator to join all the required Modifiers. --- FWCore/ParameterSet/python/Config.py | 45 +++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/FWCore/ParameterSet/python/Config.py b/FWCore/ParameterSet/python/Config.py index 93a3e70bbbd89..b04e1e19a2c99 100644 --- a/FWCore/ParameterSet/python/Config.py +++ b/FWCore/ParameterSet/python/Config.py @@ -1110,6 +1110,27 @@ def __call__(self,obj): for k,v in self.__args.iteritems(): setattr(obj,k,v) +class _AndModifier(object): + """A modifier which only applies if multiple Modifiers are chosen""" + def __init__(self, lhs, rhs): + self.__lhs = lhs + self.__rhs = rhs + def isChosen(self): + return self.__lhs.isChosen() and self.__rhs.isChosen() + def toModify(self,obj, func=None,**kw): + if not self.isChosen(): + return + self.__lhs.toModify(obj,func, **kw) + def makeProcessModifier(self,func): + """This is used to create a ProcessModifer that can perform actions on the process as a whole. + This takes as argument a callable object (e.g. function) that takes as its sole argument an instance of Process. + In order to work, the value returned from this function must be assigned to a uniquely named variable.""" + return ProcessModifier(self,func) + def __and__(self, other): + return _AndModifier(self,other) + + + class Modifier(object): """This class is used to define standard modifications to a Process. An instance of this class is declared to denote a specific modification,e.g. era2017 could @@ -1149,6 +1170,9 @@ def _setChosen(self): self.__chosen = True def isChosen(self): return self.__chosen + def __and__(self, other): + return _AndModifier(self,other) + class ModifierChain(object): """A Modifier made up of a list of Modifiers @@ -1963,6 +1987,25 @@ def __init__(self): p.extend(testProcMod) self.assert_(not hasattr(p,"a")) self.assertEqual(p.b.fred.value(),3) - + #check combining + m1 = Modifier() + m2 = Modifier() + p = Process("test",m1) + p.a = EDAnalyzer("MyAnalyzer", fred = int32(1), wilma = int32(1)) + (m1 & m2).toModify(p.a, fred = int32(2)) + self.assertEqual(p.a.fred, 1) + m1 = Modifier() + m2 = Modifier() + p = Process("test",m1,m2) + p.a = EDAnalyzer("MyAnalyzer", fred = int32(1), wilma = int32(1)) + (m1 & m2).toModify(p.a, fred = int32(2)) + self.assertEqual(p.a.fred, 2) + m1 = Modifier() + m2 = Modifier() + m3 = Modifier() + p = Process("test",m1,m2,m3) + p.a = EDAnalyzer("MyAnalyzer", fred = int32(1), wilma = int32(1)) + (m1 & m2 & m3).toModify(p.a, fred = int32(2)) + self.assertEqual(p.a.fred, 2) unittest.main() From 948bbecf2c1deef25caf8a8d4d668b9d591bc70d Mon Sep 17 00:00:00 2001 From: Junghwan John Goh Date: Sat, 30 Jan 2016 01:03:03 +0100 Subject: [PATCH 204/250] use barePhi, sort by theta to sort by AbsDTheta --- .../interface/MuonShowerInformationFiller.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoMuon/MuonIdentification/interface/MuonShowerInformationFiller.h b/RecoMuon/MuonIdentification/interface/MuonShowerInformationFiller.h index 9213bffe0b65e..328448dbbddd7 100644 --- a/RecoMuon/MuonIdentification/interface/MuonShowerInformationFiller.h +++ b/RecoMuon/MuonIdentification/interface/MuonShowerInformationFiller.h @@ -142,7 +142,7 @@ class MuonShowerInformationFiller { AbsLessDTheta(const GlobalPoint& point) : thePoint(point) {} bool operator()(const TransientTrackingRecHit::ConstRecHitPointer& lhs, const TransientTrackingRecHit::ConstRecHitPointer& rhs) const{ - return ( fabs(lhs->globalPosition().phi() - thePoint.phi()) < fabs(rhs->globalPosition().phi() - thePoint.phi()) ); + return ( fabs(lhs->globalPosition().bareTheta() - thePoint.bareTheta()) < fabs(rhs->globalPosition().bareTheta() - thePoint.bareTheta()) ); } GlobalPoint thePoint; }; @@ -151,7 +151,7 @@ class MuonShowerInformationFiller { LessPhi() : thePoint(0,0,0) {} bool operator()(const MuonTransientTrackingRecHit::MuonRecHitPointer& lhs, const MuonTransientTrackingRecHit::MuonRecHitPointer& rhs) const{ - return (lhs->globalPosition().phi() < rhs->globalPosition().phi()); + return (lhs->globalPosition().barePhi() < rhs->globalPosition().barePhi()); } GlobalPoint thePoint; }; From fe51df1225a78fc61bb887e229b270163cbacf17 Mon Sep 17 00:00:00 2001 From: wmtan Date: Sat, 30 Jan 2016 04:23:51 +0100 Subject: [PATCH 205/250] C++11 modernization for FWLite --- DataFormats/FWLite/interface/ESHandle.h | 10 +-- DataFormats/FWLite/interface/Handle.h | 66 +++++++-------- .../FWLite/interface/InternalDataKey.h | 6 +- DataFormats/FWLite/interface/Record.h | 6 +- DataFormats/FWLite/src/ChainEvent.cc | 14 ++-- DataFormats/FWLite/src/DataGetterHelper.cc | 28 +++---- DataFormats/FWLite/src/EntryFinder.cc | 4 +- DataFormats/FWLite/src/ErrorThrower.cc | 4 +- DataFormats/FWLite/src/Event.cc | 51 ++++++------ DataFormats/FWLite/src/EventBase.cc | 4 +- DataFormats/FWLite/src/EventSetup.cc | 19 ++--- DataFormats/FWLite/src/LuminosityBlock.cc | 32 ++++---- DataFormats/FWLite/src/LuminosityBlockBase.cc | 4 +- DataFormats/FWLite/src/MultiChainEvent.cc | 18 ++-- DataFormats/FWLite/src/Record.cc | 20 ++--- DataFormats/FWLite/src/Run.cc | 30 ++++--- DataFormats/FWLite/src/RunBase.cc | 4 +- DataFormats/FWLite/src/RunFactory.cc | 2 +- .../FWLite/test/format_type_name.cppunit.cpp | 19 ++--- DataFormats/FWLite/test/record.cppunit.cpp | 15 ++-- DataFormats/FWLite/test/test.cppunit.cpp | 34 ++++---- FWCore/FWLite/bin/storageSize.cc | 4 +- FWCore/FWLite/bin/storageSizeForBranch.cc | 10 +-- FWCore/FWLite/interface/BranchMapReader.h | 6 +- FWCore/FWLite/interface/setRefStreamer.h | 2 +- FWCore/FWLite/src/BareRootProductGetter.cc | 4 +- FWCore/FWLite/src/BranchMapReader.cc | 72 ++++++++-------- FWCore/FWLite/src/FWLiteEnabler.cc | 8 +- FWCore/FWLite/src/RefStreamer.cc | 4 +- FWCore/FWLite/src/branchToClass.cc | 4 +- FWCore/FWLite/test/ref_t.cppunit.cpp | 82 +++++++++---------- .../interface/TFWLiteSelector.h | 2 +- .../src/TFWLiteSelectorBasic.cc | 8 +- .../src/ThingsTSelector.cc | 12 +-- .../TFWLiteSelectorTest/src/ThingsTSelector.h | 2 +- .../src/ThingsTSelector2.cc | 4 +- 36 files changed, 295 insertions(+), 319 deletions(-) diff --git a/DataFormats/FWLite/interface/ESHandle.h b/DataFormats/FWLite/interface/ESHandle.h index 11f7aa5761954..245915ed64362 100644 --- a/DataFormats/FWLite/interface/ESHandle.h +++ b/DataFormats/FWLite/interface/ESHandle.h @@ -38,20 +38,20 @@ class ESHandle friend class fwlite::Record; public: - ESHandle(): m_data(0), m_exception(eshandle_not_set_exception()) {} + ESHandle(): m_data(nullptr), m_exception(eshandle_not_set_exception()) {} // ---------- const member functions --------------------- - bool isValid() const { return 0!=m_data;} + bool isValid() const { return nullptr != m_data;} const T& operator*() const { - if(0!=m_exception.get()) { + if(nullptr != m_exception.get()) { throw *m_exception; } return *m_data; } const T* operator->() const { - if(0!=m_exception.get()) { + if(nullptr != m_exception.get()) { throw *m_exception; } return m_data; @@ -70,7 +70,7 @@ class ESHandle m_data(static_cast(iData)), m_exception() {} ESHandle(cms::Exception* iException) : - m_data(0), m_exception(iException) {} + m_data(nullptr), m_exception(iException) {} //ESHandle(const ESHandle&); // stop default //const ESHandle& operator=(const ESHandle&); // stop default diff --git a/DataFormats/FWLite/interface/Handle.h b/DataFormats/FWLite/interface/Handle.h index 42ed68325fd76..fe90fe71033ac 100644 --- a/DataFormats/FWLite/interface/Handle.h +++ b/DataFormats/FWLite/interface/Handle.h @@ -45,11 +45,11 @@ class Handle // of reco::JetTracksAssociation::Container typedef edm::Wrapper TempWrapT; - Handle() : data_(0), errorThrower_(ErrorThrower::unsetErrorThrower()) {} + Handle() : data_(nullptr), errorThrower_(ErrorThrower::unsetErrorThrower()) {} ~Handle() { delete errorThrower_;} Handle(const Handle& iOther) : data_(iOther.data_), - errorThrower_( iOther.errorThrower_? iOther.errorThrower_->clone(): 0) {} + errorThrower_( iOther.errorThrower_? iOther.errorThrower_->clone(): nullptr) {} const Handle& operator=(const Handle& iOther) { Handle temp(iOther); @@ -58,10 +58,10 @@ class Handle } // ---------- const member functions --------------------- - bool isValid() const { return data_ != 0; } + bool isValid() const { return data_ != nullptr; } ///Returns true only if Handle was used in a 'get' call and the data could not be found - bool failedToGet() const {return errorThrower_ != 0; } + bool failedToGet() const {return errorThrower_ != nullptr; } T const* product() const { check(); return data_;} @@ -90,8 +90,8 @@ class Handle template void getByLabel(const P& iP, const char* iModuleLabel, - const char* iProductInstanceLabel = 0, - const char* iProcessLabel = 0) { + const char* iProductInstanceLabel = nullptr, + const char* iProcessLabel = nullptr) { TempWrapT* temp; void* pTemp = &temp; iP.getByLabel(TempWrapT::typeInfo(), @@ -100,8 +100,8 @@ class Handle iProcessLabel, pTemp); delete errorThrower_; - errorThrower_ = 0; - if(0==temp) { + errorThrower_ = nullptr; + if(nullptr == temp) { errorThrower_=ErrorThrower::errorThrowerBranchNotFoundException(TempWrapT::typeInfo(), iModuleLabel, iProductInstanceLabel, @@ -109,7 +109,7 @@ class Handle return; } data_ = temp->product(); - if(data_==0) { + if(data_== nullptr) { errorThrower_=ErrorThrower::errorThrowerProductNotFoundException(TempWrapT::typeInfo(), iModuleLabel, iProductInstanceLabel, @@ -120,8 +120,8 @@ class Handle // void getByLabel(const fwlite::Event& iEvent, // const char* iModuleLabel, - // const char* iProductInstanceLabel = 0, - // const char* iProcessLabel = 0) { + // const char* iProductInstanceLabel = nullptr, + // const char* iProcessLabel = nullptr) { // TempWrapT* temp; // void* pTemp = &temp; // iEvent.getByLabel(TempWrapT::typeInfo(), @@ -130,8 +130,8 @@ class Handle // iProcessLabel, // pTemp); // delete errorThrower_; - // errorThrower_ = 0; - // if(0==temp) { + // errorThrower_ = nullptr; + // if(nullptr == temp) { // errorThrower_=ErrorThrower::errorThrowerBranchNotFoundException(TempWrapT::typeInfo(), // iModuleLabel, // iProductInstanceLabel, @@ -139,7 +139,7 @@ class Handle // return; // } // data_ = temp->product(); - // if(data_==0) { + // if(data_ == nullptr) { // errorThrower_=ErrorThrower::errorThrowerProductNotFoundException(TempWrapT::typeInfo(), // iModuleLabel, // iProductInstanceLabel, @@ -149,8 +149,8 @@ class Handle // // void getByLabel(const fwlite::ChainEvent& iEvent, // const char* iModuleLabel, - // const char* iProductInstanceLabel = 0, - // const char* iProcessLabel = 0) { + // const char* iProductInstanceLabel = nullptr, + // const char* iProcessLabel = nullptr) { // TempWrapT* temp; // void* pTemp = &temp; // iEvent.getByLabel(TempWrapT::typeInfo(), @@ -159,8 +159,8 @@ class Handle // iProcessLabel, // pTemp); // delete errorThrower_; - // errorThrower_ = 0; - // if(0==temp) { + // errorThrower_ = nullptr; + // if(nullptr == temp) { // errorThrower_=ErrorThrower::errorThrowerBranchNotFoundException(TempWrapT::typeInfo(), // iModuleLabel, // iProductInstanceLabel, @@ -168,7 +168,7 @@ class Handle // return; // } // data_ = temp->product(); - // if(data_==0) { + // if(data_ == nullptr) { // errorThrower_=ErrorThrower::errorThrowerProductNotFoundException(TempWrapT::typeInfo(), // iModuleLabel, // iProductInstanceLabel, @@ -179,8 +179,8 @@ class Handle // // void getByLabel(const fwlite::MultiChainEvent& iEvent, // const char* iModuleLabel, - // const char* iProductInstanceLabel = 0, - // const char* iProcessLabel = 0) { + // const char* iProductInstanceLabel = nullptr, + // const char* iProcessLabel = nullptr) { // TempWrapT* temp; // void* pTemp = &temp; // iEvent.getByLabel(TempWrapT::typeInfo(), @@ -188,9 +188,9 @@ class Handle // iProductInstanceLabel, // iProcessLabel, // pTemp); - // if ( 0 != errorThrower_ ) delete errorThrower_; - // errorThrower_ = 0; - // if(0==temp) { + // if ( nullptr != errorThrower_ ) delete errorThrower_; + // errorThrower_ = nullptr; + // if(nullptr == temp) { // errorThrower_=ErrorThrower::errorThrowerBranchNotFoundException(TempWrapT::typeInfo(), // iModuleLabel, // iProductInstanceLabel, @@ -198,7 +198,7 @@ class Handle // return; // } // data_ = temp->product(); - // if(data_==0) { + // if(data_ == nullptr) { // errorThrower_=ErrorThrower::errorThrowerProductNotFoundException(TempWrapT::typeInfo(), // iModuleLabel, // iProductInstanceLabel, @@ -208,8 +208,8 @@ class Handle const std::string getBranchNameFor(const fwlite::EventBase& iEvent, const char* iModuleLabel, - const char* iProductInstanceLabel = 0, - const char* iProcessLabel = 0) + const char* iProductInstanceLabel = nullptr, + const char* iProcessLabel = nullptr) { return iEvent.getBranchNameFor(TempWrapT::typeInfo(), iModuleLabel, @@ -219,8 +219,8 @@ class Handle // const std::string getBranchNameFor(const fwlite::Event& iEvent, // const char* iModuleLabel, - // const char* iProductInstanceLabel = 0, - // const char* iProcessLabel = 0) { + // const char* iProductInstanceLabel = nullptr, + // const char* iProcessLabel = nullptr) { // return iEvent.getBranchNameFor(TempWrapT::typeInfo(), // iModuleLabel, // iProductInstanceLabel, @@ -229,8 +229,8 @@ class Handle // // const std::string getBranchNameFor(const fwlite::ChainEvent& iEvent, // const char* iModuleLabel, - // const char* iProductInstanceLabel = 0, - // const char* iProcessLabel = 0) { + // const char* iProductInstanceLabel = nullptr, + // const char* iProcessLabel = nullptr) { // return iEvent.getBranchNameFor(TempWrapT::typeInfo(), // iModuleLabel, // iProductInstanceLabel, @@ -241,8 +241,8 @@ class Handle // // const std::string getBranchNameFor(const fwlite::MultiChainEvent& iEvent, // const char* iModuleLabel, - // const char* iProductInstanceLabel = 0, - // const char* iProcessLabel = 0) { + // const char* iProductInstanceLabel = nullptr, + // const char* iProcessLabel = nullptr) { // return iEvent.getBranchNameFor(TempWrapT::typeInfo(), // iModuleLabel, // iProductInstanceLabel, diff --git a/DataFormats/FWLite/interface/InternalDataKey.h b/DataFormats/FWLite/interface/InternalDataKey.h index d8347543fd376..4936f47dd1b9f 100644 --- a/DataFormats/FWLite/interface/InternalDataKey.h +++ b/DataFormats/FWLite/interface/InternalDataKey.h @@ -39,9 +39,9 @@ namespace fwlite { char const* iProduct, char const* iProcess) : type_(iType), - module_(iModule!=0? iModule:kEmpty()), - product_(iProduct!=0?iProduct:kEmpty()), - process_(iProcess!=0?iProcess:kEmpty()) {} + module_(iModule != nullptr ? iModule : kEmpty()), + product_(iProduct != nullptr ? iProduct : kEmpty()), + process_(iProcess != nullptr ? iProcess : kEmpty()) {} ~DataKey() { } diff --git a/DataFormats/FWLite/interface/Record.h b/DataFormats/FWLite/interface/Record.h index 01f1da8c09f22..958a99e4c0ed8 100644 --- a/DataFormats/FWLite/interface/Record.h +++ b/DataFormats/FWLite/interface/Record.h @@ -86,14 +86,14 @@ namespace fwlite bool Record::get(HANDLE& iHandle, const char* iLabel) const { - const void* value = 0; + const void* value = nullptr; cms::Exception* e = get(edm::TypeID(iHandle.typeInfo()),iLabel,value); - if(0==e){ + if(nullptr == e){ iHandle = HANDLE(value); } else { iHandle = HANDLE(e); } - return 0==e; + return nullptr == e; } } /* fwlite */ diff --git a/DataFormats/FWLite/src/ChainEvent.cc b/DataFormats/FWLite/src/ChainEvent.cc index 2eb996b366050..65dcda8eb1c91 100644 --- a/DataFormats/FWLite/src/ChainEvent.cc +++ b/DataFormats/FWLite/src/ChainEvent.cc @@ -43,19 +43,17 @@ ChainEvent::ChainEvent(std::vector const& iFileNames): accumulatedSize_.reserve(iFileNames.size()+1); fileNames_.reserve(iFileNames.size()); - for (std::vector::const_iterator it= iFileNames.begin(), itEnd = iFileNames.end(); - it!=itEnd; - ++it) { - TFile *tfilePtr = TFile::Open(it->c_str()); + for (auto const& fileName : iFileNames) { + TFile *tfilePtr = TFile::Open(fileName.c_str()); file_ = std::shared_ptr(tfilePtr); gROOT->GetListOfFiles()->Remove(tfilePtr); TTree* tree = dynamic_cast(file_->Get(edm::poolNames::eventTreeName().c_str())); - if (0 == tree) { - throw cms::Exception("NotEdmFile")<<"The file "<<*it<<" has no 'Events' TTree and therefore is not an EDM ROOT file"; + if (nullptr == tree) { + throw cms::Exception("NotEdmFile")<<"The file "<GetEntries(); if (nEvents > 0) { // skip empty files - fileNames_.push_back(*it); + fileNames_.push_back(fileName); // accumulatedSize_ is the entry # at the beginning of this file accumulatedSize_.push_back(summedSize); summedSize += nEvents; @@ -215,7 +213,7 @@ ChainEvent::switchToFile(Long64_t iIndex) TFile *tfilePtr = TFile::Open(fileNames_[iIndex].c_str()); file_ = std::shared_ptr(tfilePtr); gROOT->GetListOfFiles()->Remove(tfilePtr); - event_ = std::shared_ptr(new Event(file_.get())); + event_ = std::make_shared(file_.get()); } // diff --git a/DataFormats/FWLite/src/DataGetterHelper.cc b/DataFormats/FWLite/src/DataGetterHelper.cc index 4e798fe65a64b..f51f90412373e 100644 --- a/DataFormats/FWLite/src/DataGetterHelper.cc +++ b/DataFormats/FWLite/src/DataGetterHelper.cc @@ -58,7 +58,7 @@ namespace fwlite { getter_(getter), tcTrained_(false) { - if(0==tree) { + if(nullptr == tree) { throw cms::Exception("NoTree")<<"The TTree pointer passed to the constructor was null"; } tree_ = tree; @@ -125,7 +125,7 @@ namespace fwlite { //iData.pObj_ = iData.obj_.address(); //iData.branch_->SetAddress(&(iData.pObj_)); ////If a REF to this was requested in the past, we might as well do the work now - //if(0!=iData.pProd_) { + //if(nullptr != iData.pProd_) { // iData.pProd_ = iData.obj_.address(); //} //obj.destruct(); @@ -133,7 +133,7 @@ namespace fwlite { TTreeCache* tcache = dynamic_cast (branchMap_->getFile()->GetCacheRead()); - if (0 == tcache) { + if (nullptr == tcache) { iData.branch_->GetEntry(eventEntry); } else { if (!tcTrained_) { @@ -167,12 +167,12 @@ namespace fwlite { //if we have to lookup the process label, remember it and register the product again std::string foundProcessLabel; - TBranch* branch = 0; + TBranch* branch = nullptr; std::shared_ptr theData; - if (0==iProcessLabel || iProcessLabel==key.kEmpty() || + if (nullptr == iProcessLabel || iProcessLabel == key.kEmpty() || strlen(iProcessLabel)==0) { - std::string const* lastLabel=0; + std::string const* lastLabel = nullptr; //have to search in reverse order since newest are on the bottom const edm::ProcessHistory& h = DataGetterHelper::history(); for (edm::ProcessHistory::const_reverse_iterator iproc = h.rbegin(), eproc = h.rend(); @@ -181,15 +181,15 @@ namespace fwlite { lastLabel = &(iproc->processName()); branch=findBranch(tree_,name,iproc->processName()); - if(0!=branch) { + if(nullptr != branch) { break; } } - if(0==branch) { + if(nullptr == branch) { return branchNotFound; } //do we already have this one? - if(0!=lastLabel) { + if(nullptr != lastLabel) { internal::DataKey fullKey(type,iModuleLabel,iProductInstanceLabel,lastLabel->c_str()); itFind = data_.find(fullKey); if(itFind != data_.end()) { @@ -203,7 +203,7 @@ namespace fwlite { } else { //we have all the pieces branch = findBranch(tree_,name,key.process()); - if(0==branch){ + if(nullptr == branch){ return branchNotFound; } } @@ -230,7 +230,7 @@ namespace fwlite { } internal::DataKey newKey(edm::TypeID(iInfo),newModule,newProduct,newProcess); - if(0 == theData.get()) { + if(nullptr == theData.get()) { //We do not already have this data as another key //create an instance of the object to be used as a buffer @@ -277,7 +277,7 @@ namespace fwlite { internal::Data& theData = DataGetterHelper::getBranchDataFor(iInfo, iModuleLabel, iProductInstanceLabel, iProcessLabel); - if (0 != theData.branch_) { + if (nullptr != theData.branch_) { return std::string(theData.branch_->GetName()); } return std::string(""); @@ -297,7 +297,7 @@ namespace fwlite { internal::Data& theData = DataGetterHelper::getBranchDataFor(iInfo, iModuleLabel, iProductInstanceLabel, iProcessLabel); - if (0 != theData.branch_) { + if (nullptr != theData.branch_) { if(eventEntry != theData.lastProduct_) { //haven't gotten the data for this event getBranchData(getter_.get(), eventEntry, theData); @@ -325,7 +325,7 @@ namespace fwlite { //Only the product instance label may be empty char const* pIL = bDesc.productInstanceName().c_str(); if(pIL[0] == 0) { - pIL = 0; + pIL = nullptr; } internal::DataKey k(type, bDesc.moduleLabel().c_str(), diff --git a/DataFormats/FWLite/src/EntryFinder.cc b/DataFormats/FWLite/src/EntryFinder.cc index 27884cf188d6d..f12c50f471e8c 100644 --- a/DataFormats/FWLite/src/EntryFinder.cc +++ b/DataFormats/FWLite/src/EntryFinder.cc @@ -108,7 +108,7 @@ namespace fwlite { EntryFinder::fillIndex(BranchMapReader const& branchMap) { if (empty()) { TTree* meta = dynamic_cast(branchMap.getFile()->Get(edm::poolNames::metaDataTreeName().c_str())); - if (0 == meta) { + if (nullptr == meta) { throw cms::Exception("NoMetaTree") << "The TFile does not contain a TTree named " << edm::poolNames::metaDataTreeName(); } @@ -119,7 +119,7 @@ namespace fwlite { b->GetEntry(0); TTree* eventTree = branchMap.getEventTree(); TBranch* auxBranch = eventTree->GetBranch(edm::BranchTypeToAuxiliaryBranchName(edm::InEvent).c_str()); - if(0 == auxBranch) { + if(nullptr == auxBranch) { throw cms::Exception("NoEventAuxilliary") << "The TTree " << edm::poolNames::eventTreeName() << " does not contain a branch named 'EventAuxiliary'"; diff --git a/DataFormats/FWLite/src/ErrorThrower.cc b/DataFormats/FWLite/src/ErrorThrower.cc index 5c9e1f4bb7b39..8d8c54477e349 100644 --- a/DataFormats/FWLite/src/ErrorThrower.cc +++ b/DataFormats/FWLite/src/ErrorThrower.cc @@ -32,7 +32,7 @@ namespace { edm::TypeID type(*type_); throw edm::Exception(edm::errors::ProductNotFound)<<"A branch was found for \n type ='"<(&branchMap_,NoDelete()), std::shared_ptr(new internal::ProductGetter(this)), true) { - if(0 == iFile) { + if(nullptr == iFile) { throw cms::Exception("NoFile") << "The TFile pointer passed to the constructor was null"; } - if(0 == branchMap_.getEventTree()) { + if(nullptr == branchMap_.getEventTree()) { throw cms::Exception("NoEventTree") << "The TFile contains no TTree named " << edm::poolNames::eventTreeName(); } //need to know file version in order to determine how to read the basic event info @@ -138,7 +138,7 @@ namespace fwlite { TTree* eventTree = branchMap_.getEventTree(); if(fileVersion_ >= 3) { auxBranch_ = eventTree->GetBranch(edm::BranchTypeToAuxiliaryBranchName(edm::InEvent).c_str()); - if(0 == auxBranch_) { + if(nullptr == auxBranch_) { throw cms::Exception("NoEventAuxilliary") << "The TTree " << edm::poolNames::eventTreeName() << " does not contain a branch named 'EventAuxiliary'"; @@ -147,7 +147,7 @@ namespace fwlite { } else { pOldAux_ = new edm::EventAux(); auxBranch_ = eventTree->GetBranch(edm::BranchTypeToAuxBranchName(edm::InEvent).c_str()); - if(0 == auxBranch_) { + if(nullptr == auxBranch_) { throw cms::Exception("NoEventAux") << "The TTree " << edm::poolNames::eventTreeName() << " does not contain a branch named 'EventAux'"; @@ -169,10 +169,8 @@ namespace fwlite { // } Event::~Event() { - for(std::vector::iterator it = labels_.begin(), itEnd = labels_.end(); - it != itEnd; - ++it) { - delete [] *it; + for(auto const& label : labels_) { + delete [] label; } delete pOldAux_; } @@ -291,10 +289,8 @@ Event::atEnd() const { std::vector const& Event::getProcessHistory() const { if (procHistoryNames_.empty()) { - const edm::ProcessHistory& h = history(); - for (edm::ProcessHistory::const_iterator iproc = h.begin(), eproc = h.end(); - iproc != eproc; ++iproc) { - procHistoryNames_.push_back(iproc->processName()); + for (auto const& proc : history()) { + procHistoryNames_.push_back(proc.processName()); } } return procHistoryNames_; @@ -335,7 +331,7 @@ Event::updateAux(Long_t eventIndex) const { if(auxBranch_->GetEntryNumber() != eventIndex) { auxBranch_->GetEntry(eventIndex); //handling dealing with old version - if(0 != pOldAux_) { + if(nullptr != pOldAux_) { conversion(*pOldAux_,aux_); } } @@ -355,7 +351,7 @@ Event::history() const { if(historyMap_.empty() || newFormat) { procHistoryNames_.clear(); TTree *meta = dynamic_cast(branchMap_.getFile()->Get(edm::poolNames::metaDataTreeName().c_str())); - if(0 == meta) { + if(nullptr == meta) { throw cms::Exception("NoMetaTree") << "The TFile does not appear to contain a TTree named " << edm::poolNames::metaDataTreeName(); } @@ -428,13 +424,13 @@ Event::getThinnedProducts(edm::ProductID const& pid, edm::TriggerNames const& Event::triggerNames(edm::TriggerResults const& triggerResults) const { edm::TriggerNames const* names = triggerNames_(triggerResults); - if (names != 0) return *names; + if (names != nullptr) return *names; if (!parameterSetRegistryFilled_) { fillParameterSetRegistry(); names = triggerNames_(triggerResults); } - if (names != 0) return *names; + if (names != nullptr) return *names; throw cms::Exception("TriggerNamesNotFound") << "TriggerNames not found in ParameterSet registry"; @@ -447,7 +443,7 @@ Event::fillParameterSetRegistry() const { parameterSetRegistryFilled_ = true; TTree* meta = dynamic_cast(branchMap_.getFile()->Get(edm::poolNames::metaDataTreeName().c_str())); - if (0 == meta) { + if (nullptr == meta) { throw cms::Exception("NoMetaTree") << "The TFile does not contain a TTree named " << edm::poolNames::metaDataTreeName(); } @@ -462,13 +458,13 @@ Event::fillParameterSetRegistry() const { typedef std::map PsetMap; PsetMap psetMap; - TTree* psetTree(0); + TTree* psetTree(nullptr); if (meta->FindBranch(edm::poolNames::parameterSetMapBranchName().c_str()) != 0) { PsetMap *psetMapPtr = &psetMap; TBranch* b = meta->GetBranch(edm::poolNames::parameterSetMapBranchName().c_str()); b->SetAddress(&psetMapPtr); b->GetEntry(0); - } else if(0 == (psetTree = dynamic_cast(branchMap_.getFile()->Get(edm::poolNames::parameterSetsTreeName().c_str())))) { + } else if(nullptr == (psetTree = dynamic_cast(branchMap_.getFile()->Get(edm::poolNames::parameterSetsTreeName().c_str())))) { throw cms::Exception("NoParameterSetMapTree") << "The TTree " << edm::poolNames::parameterSetsTreeName() << " could not be found in the file."; @@ -488,10 +484,9 @@ Event::fillParameterSetRegistry() const { } else { // Merge into the parameter set registry. edm::pset::Registry& psetRegistry = *edm::pset::Registry::instance(); - for(PsetMap::const_iterator i = psetMap.begin(), iEnd = psetMap.end(); - i != iEnd; ++i) { - edm::ParameterSet pset(i->second.pset()); - pset.setID(i->first); + for(auto const& item : psetMap) { + edm::ParameterSet pset(item.second.pset()); + pset.setID(item.first); psetRegistry.insertMapped(pset); } } @@ -507,7 +502,7 @@ Event::triggerResultsByName(std::string const& process) const { } edm::TriggerNames const* names = triggerNames_(*hTriggerResults); - if (names == 0 && !parameterSetRegistryFilled_) { + if (names == nullptr && !parameterSetRegistryFilled_) { fillParameterSetRegistry(); names = triggerNames_(*hTriggerResults); } @@ -521,7 +516,7 @@ void Event::throwProductNotFoundException(std::type_info const& iType, char const* iModule, char const* iProduct, char const* iProcess) { edm::TypeID type(iType); throw edm::Exception(edm::errors::ProductNotFound) << "A branch was found for \n type ='" << type.className() << "'\n module='" << iModule - << "'\n productInstance='" << ((0!=iProduct)?iProduct:"") << "'\n process='" << ((0 != iProcess) ? iProcess : "") << "'\n" + << "'\n productInstance='" << ((nullptr != iProduct)?iProduct:"") << "'\n process='" << ((nullptr != iProcess) ? iProcess : "") << "'\n" "but no data is available for this Event"; } diff --git a/DataFormats/FWLite/src/EventBase.cc b/DataFormats/FWLite/src/EventBase.cc index b2e5087204f36..7cf369e2a270c 100644 --- a/DataFormats/FWLite/src/EventBase.cc +++ b/DataFormats/FWLite/src/EventBase.cc @@ -44,8 +44,8 @@ namespace fwlite void* prodPtr = ∏ getByLabel(iWrapperInfo, iTag.label().c_str(), - iTag.instance().empty()?static_cast(0):iTag.instance().c_str(), - iTag.process().empty()?static_cast (0):iTag.process().c_str(), + iTag.instance().empty() ? static_cast(nullptr) : iTag.instance().c_str(), + iTag.process().empty() ? static_cast (nullptr) : iTag.process().c_str(), prodPtr); if(prod == nullptr || !prod->isPresent()) { edm::TypeID productType(iWrapperInfo); diff --git a/DataFormats/FWLite/src/EventSetup.cc b/DataFormats/FWLite/src/EventSetup.cc index 0ef8270c1f155..de201d08dacaf 100644 --- a/DataFormats/FWLite/src/EventSetup.cc +++ b/DataFormats/FWLite/src/EventSetup.cc @@ -47,9 +47,8 @@ m_file(iFile) EventSetup::~EventSetup() { - for(std::vector::iterator it = m_records.begin(), itEnd=m_records.end(); - it !=itEnd; ++it) { - delete *it; + for(auto const& record : m_records) { + delete record; } } @@ -84,14 +83,14 @@ EventSetup::exists(const char* iRecordName) const { std::string realName = unformat_mangled_to_type(iRecordName); TObject* obj = m_file->Get(realName.c_str()); - if(0==obj) { + if(nullptr == obj) { return false; } TTree* tree = dynamic_cast(obj); - if(0==tree) { + if(nullptr == tree) { return false; } - return 0 != tree->FindBranch(kRecordAuxiliaryBranchName); + return nullptr != tree->FindBranch(kRecordAuxiliaryBranchName); } RecordID @@ -99,19 +98,19 @@ EventSetup::recordID(const char* iRecordName) const { std::string treeName = format_type_to_mangled(iRecordName); TObject* obj = m_file->Get(treeName.c_str()); - if(0==obj) { + if(nullptr == obj) { throw cms::Exception("UnknownRecord")<<"The TTree for the record "<GetName(); } TTree* tree = dynamic_cast(obj); - if(0==tree) { + if(nullptr == tree) { throw cms::Exception("UnknownRecord")<<"The object corresponding to "<GetName()<<" is not a TTree and therefore is not a Record"; } - if(0 == tree->FindBranch(kRecordAuxiliaryBranchName)) { + if(nullptr == tree->FindBranch(kRecordAuxiliaryBranchName)) { throw cms::Exception("UnknownRecord")<<"The TTree corresponding to "<GetName()<<" does not have the proper structure to be a Record"; } //do we already have this Record? std::string name(iRecordName); - for(std::vector::iterator it = m_records.begin(), itEnd=m_records.end(); it!=itEnd;++it){ + for(std::vector::const_iterator it = m_records.begin(), itEnd=m_records.end(); it!=itEnd;++it){ if((*it)->name()==name) { return it - m_records.begin(); } diff --git a/DataFormats/FWLite/src/LuminosityBlock.cc b/DataFormats/FWLite/src/LuminosityBlock.cc index 67075940df34e..2197e0912717c 100644 --- a/DataFormats/FWLite/src/LuminosityBlock.cc +++ b/DataFormats/FWLite/src/LuminosityBlock.cc @@ -45,17 +45,17 @@ namespace fwlite { LuminosityBlock::LuminosityBlock(TFile* iFile): branchMap_(new BranchMapReader(iFile)), pAux_(&aux_), - pOldAux_(0), + pOldAux_(nullptr), fileVersion_(-1), dataHelper_(branchMap_->getLuminosityBlockTree(), std::shared_ptr(new LumiHistoryGetter(this)), branchMap_) { - if(0==iFile) { + if(nullptr == iFile) { throw cms::Exception("NoFile")<<"The TFile pointer passed to the constructor was null"; } - if(0==branchMap_->getLuminosityBlockTree()) { + if(nullptr == branchMap_->getLuminosityBlockTree()) { throw cms::Exception("NoLumiTree")<<"The TFile contains no TTree named " <getLuminosityBlockTree(); if(fileVersion_ >= 3) { auxBranch_ = luminosityBlockTree->GetBranch(edm::BranchTypeToAuxiliaryBranchName(edm::InLumi).c_str()); - if(0==auxBranch_) { + if(nullptr == auxBranch_) { throw cms::Exception("NoLuminosityBlockAuxilliary")<<"The TTree " <GetBranch(edm::BranchTypeToAuxBranchName(edm::InLuminosityBlock).c_str()); -// if(0==auxBranch_) { +// if(nullptr == auxBranch_) { // throw cms::Exception("NoLuminosityBlockAux")<<"The TTree " // <SetAddress(&pOldAux_); } branchMap_->updateLuminosityBlock(0); - runFactory_ = std::shared_ptr(new RunFactory()); + runFactory_ = std::make_shared(); } LuminosityBlock::LuminosityBlock(std::shared_ptr branchMap, std::shared_ptr runFactory): branchMap_(branchMap), pAux_(&aux_), - pOldAux_(0), + pOldAux_(nullptr), fileVersion_(-1), dataHelper_(branchMap_->getLuminosityBlockTree(), std::shared_ptr(new LumiHistoryGetter(this)), @@ -99,7 +99,7 @@ namespace fwlite { runFactory_(runFactory) { - if(0==branchMap_->getLuminosityBlockTree()) { + if(nullptr == branchMap_->getLuminosityBlockTree()) { throw cms::Exception("NoLumiTree")<<"The TFile contains no TTree named " <getLuminosityBlockTree(); if(fileVersion_ >= 3) { auxBranch_ = luminosityBlockTree->GetBranch(edm::BranchTypeToAuxiliaryBranchName(edm::InLumi).c_str()); - if(0==auxBranch_) { + if(nullptr == auxBranch_) { throw cms::Exception("NoLuminosityBlockAuxilliary")<<"The TTree " <GetBranch(edm::BranchTypeToAuxBranchName(edm::InLuminosityBlock).c_str()); - if(0==auxBranch_) { + if(nullptr == auxBranch_) { throw cms::Exception("NoLuminosityBlockAux")<<"The TTree " <::iterator it = labels_.begin(), itEnd=labels_.end(); - it != itEnd; - ++it) { - delete [] *it; + for(auto const& label : labels_) { + delete [] label; } delete pOldAux_; } @@ -246,7 +244,7 @@ LuminosityBlock::updateAux(Long_t luminosityBlockIndex) const if(auxBranch_->GetEntryNumber() != luminosityBlockIndex) { auxBranch_->GetEntry(luminosityBlockIndex); //handling dealing with old version - if(0 != pOldAux_) { + if(nullptr != pOldAux_) { conversion(*pOldAux_,aux_); } } @@ -269,7 +267,7 @@ LuminosityBlock::history() const if(historyMap_.empty() || newFormat) { procHistoryNames_.clear(); TTree *meta = dynamic_cast(branchMap_->getFile()->Get(edm::poolNames::metaDataTreeName().c_str())); - if(0==meta) { + if(nullptr == meta) { throw cms::Exception("NoMetaTree")<<"The TFile does not appear to contain a TTree named " <(0):iTag.instance().c_str(), - iTag.process().empty()?static_cast (0):iTag.process().c_str(), + iTag.instance().empty() ? static_cast(nullptr) : iTag.instance().c_str(), + iTag.process().empty() ? static_cast(nullptr) : iTag.process().c_str(), prodPtr); if(prod == nullptr || !prod->isPresent()) { edm::TypeID productType(iWrapperInfo); diff --git a/DataFormats/FWLite/src/MultiChainEvent.cc b/DataFormats/FWLite/src/MultiChainEvent.cc index de4b8db45cffe..9f889d1b0c686 100644 --- a/DataFormats/FWLite/src/MultiChainEvent.cc +++ b/DataFormats/FWLite/src/MultiChainEvent.cc @@ -72,10 +72,10 @@ namespace fwlite { std::vector const& iFileNames2, bool useSecFileMapSorted) { - event1_ = std::shared_ptr (new ChainEvent(iFileNames1)); - event2_ = std::shared_ptr (new ChainEvent(iFileNames2)); + event1_ = std::make_shared(iFileNames1); + event2_ = std::make_shared(iFileNames2); - getter_ = std::shared_ptr(new internal::MultiProductGetter(this)); + getter_ = std::make_shared(this); if (event1_->size() == 0) { std::cout << "------------------------------------------------------------------------" << std::endl; @@ -116,7 +116,7 @@ namespace fwlite { // Loop over events, when a new file is encountered, store the first run number from this file, // and the last run number from the last file. - TFile * lastFile = 0; + TFile * lastFile = nullptr; std::pair eventRange; bool firstFile = true; @@ -440,18 +440,18 @@ edm::TriggerNames const& MultiChainEvent::triggerNames(edm::TriggerResults const& triggerResults) const { edm::TriggerNames const* names = triggerNames_(triggerResults); - if (names != 0) return *names; + if (names != nullptr) return *names; event1_->fillParameterSetRegistry(); names = triggerNames_(triggerResults); - if (names != 0) return *names; + if (names != nullptr) return *names; // If we cannot find it in the primary file, this probably will // not help but try anyway event2_->to(event1_->id()); event2_->fillParameterSetRegistry(); names = triggerNames_(triggerResults); - if (names != 0) return *names; + if (names != nullptr) return *names; throw cms::Exception("TriggerNamesNotFound") << "TriggerNames not found in ParameterSet registry"; @@ -469,12 +469,12 @@ MultiChainEvent::triggerResultsByName(std::string const& process) const { edm::TriggerNames const* names = triggerNames_(*hTriggerResults); - if (names == 0) { + if (names == nullptr) { event1_->fillParameterSetRegistry(); names = triggerNames_(*hTriggerResults); } - if (names == 0) { + if (names == nullptr) { event2_->to(event1_->id()); event2_->fillParameterSetRegistry(); names = triggerNames_(*hTriggerResults); diff --git a/DataFormats/FWLite/src/Record.cc b/DataFormats/FWLite/src/Record.cc index d512b354d11f9..8142ab94f67dd 100644 --- a/DataFormats/FWLite/src/Record.cc +++ b/DataFormats/FWLite/src/Record.cc @@ -139,17 +139,17 @@ void Record::resetCaches() { for(auto&b : m_branches){ - TClass* cls=0; + TClass* cls = nullptr; EDataType dt; - if(0==b.second.first or 0==b.second.second) continue; + if(nullptr == b.second.first or nullptr == b.second.second) continue; if(0==b.second.first->GetExpectedType(cls,dt)) { cls->Destructor(b.second.second); - b.second.second=0; + b.second.second = nullptr; } } for(auto&b : m_branches){ - if(0==b.second.first) continue; - assert(b.second.second==0); + if(nullptr == b.second.first) continue; + assert(b.second.second == nullptr); } } @@ -181,8 +181,8 @@ Record::get(const edm::TypeID& iType, cms::Exception* returnValue = nullptr; std::pair& branch = m_branches[std::make_pair(iType,iLabel)]; - if(0==branch.first){ - branch.second=0; + if(nullptr == branch.first){ + branch.second = nullptr; if(!edm::hasDictionary(iType.typeInfo())){ returnValue = new cms::Exception("UnknownType"); (*returnValue)<<"The type " @@ -194,7 +194,7 @@ Record::get(const edm::TypeID& iType, std::string branchName = fwlite::format_type_to_mangled(iType.className())+"__"+iLabel; branch.first = m_tree->FindBranch(branchName.c_str()); - if(0==branch.first){ + if(nullptr == branch.first){ returnValue = new cms::Exception("NoDataAvailable"); (*returnValue)<<"The data of type " <SetAddress(&branch.second); iData = branch.second; branch.first->GetEntry(m_entry); diff --git a/DataFormats/FWLite/src/Run.cc b/DataFormats/FWLite/src/Run.cc index 1e6f478d68508..4eebe26e4d139 100644 --- a/DataFormats/FWLite/src/Run.cc +++ b/DataFormats/FWLite/src/Run.cc @@ -44,17 +44,17 @@ namespace fwlite { Run::Run(TFile* iFile): branchMap_(new BranchMapReader(iFile)), pAux_(&aux_), - pOldAux_(0), + pOldAux_(nullptr), fileVersion_(-1), dataHelper_(branchMap_->getRunTree(), std::shared_ptr(new RunHistoryGetter(this)), branchMap_) { - if(0==iFile) { + if(nullptr == iFile) { throw cms::Exception("NoFile")<<"The TFile pointer passed to the constructor was null"; } - if(0==branchMap_->getRunTree()) { + if(nullptr == branchMap_->getRunTree()) { throw cms::Exception("NoRunTree")<<"The TFile contains no TTree named " <getRunTree(); if(fileVersion_ >= 3) { auxBranch_ = runTree->GetBranch(edm::BranchTypeToAuxiliaryBranchName(edm::InRun).c_str()); - if(0==auxBranch_) { + if(nullptr == auxBranch_) { throw cms::Exception("NoRunAuxilliary")<<"The TTree " <GetBranch(edm::BranchTypeToAuxBranchName(edm::InRun).c_str()); -// if(0==auxBranch_) { +// if(nullptr == auxBranch_) { // throw cms::Exception("NoRunAux")<<"The TTree " // < branchMap): branchMap_(branchMap), pAux_(&aux_), - pOldAux_(0), + pOldAux_(nullptr), fileVersion_(-1), dataHelper_(branchMap_->getRunTree(), std::shared_ptr(new RunHistoryGetter(this)), branchMap_) { - if(0==branchMap_->getRunTree()) { + if(nullptr == branchMap_->getRunTree()) { throw cms::Exception("NoRunTree")<<"The TFile contains no TTree named " <getRunTree(); if(fileVersion_ >= 3) { auxBranch_ = runTree->GetBranch(edm::BranchTypeToAuxiliaryBranchName(edm::InRun).c_str()); - if(0==auxBranch_) { + if(nullptr == auxBranch_) { throw cms::Exception("NoRunAuxilliary")<<"The TTree " <GetBranch(edm::BranchTypeToAuxBranchName(edm::InRun).c_str()); - if(0==auxBranch_) { + if(nullptr == auxBranch_) { throw cms::Exception("NoRunAux")<<"The TTree " <::iterator it = labels_.begin(), itEnd=labels_.end(); - it != itEnd; - ++it) { - delete [] *it; + for(auto const& label : labels_) { + delete [] label; } delete pOldAux_; } @@ -244,7 +242,7 @@ Run::updateAux(Long_t runIndex) const if(auxBranch_->GetEntryNumber() != runIndex) { auxBranch_->GetEntry(runIndex); //handling dealing with old version - if(0 != pOldAux_) { + if(nullptr != pOldAux_) { conversion(*pOldAux_,aux_); } } @@ -266,7 +264,7 @@ Run::history() const if(historyMap_.empty() || newFormat) { procHistoryNames_.clear(); TTree *meta = dynamic_cast(branchMap_->getFile()->Get(edm::poolNames::metaDataTreeName().c_str())); - if(0==meta) { + if(nullptr == meta) { throw cms::Exception("NoMetaTree")<<"The TFile does not appear to contain a TTree named " <(0):iTag.instance().c_str(), - iTag.process().empty()?static_cast (0):iTag.process().c_str(), + iTag.instance().empty() ? static_cast(nullptr) : iTag.instance().c_str(), + iTag.process().empty() ? static_cast(nullptr) : iTag.process().c_str(), prodPtr); if(prod == nullptr || !prod->isPresent()) { edm::TypeID productType(iWrapperInfo); diff --git a/DataFormats/FWLite/src/RunFactory.cc b/DataFormats/FWLite/src/RunFactory.cc index d14b23e664308..a0a5a68d38d70 100644 --- a/DataFormats/FWLite/src/RunFactory.cc +++ b/DataFormats/FWLite/src/RunFactory.cc @@ -25,7 +25,7 @@ namespace fwlite { std::shared_ptr RunFactory::makeRun(std::shared_ptr branchMap) const { if (not run_) { - run_ = std::shared_ptr(new fwlite::Run(branchMap)); + run_ = std::make_shared(branchMap); } return run_; } diff --git a/DataFormats/FWLite/test/format_type_name.cppunit.cpp b/DataFormats/FWLite/test/format_type_name.cppunit.cpp index e44ed0a72d38c..d0a09e0de2b23 100644 --- a/DataFormats/FWLite/test/format_type_name.cppunit.cpp +++ b/DataFormats/FWLite/test/format_type_name.cppunit.cpp @@ -47,19 +47,16 @@ void testFormatTypeName::test() classToFriendly.push_back( Values("Aa, Ee >","Aa_9Bb_9Cc_3Dd_0_3_4Ee_9Ff_0_4_0")); classToFriendly.push_back( Values("Aa, Ee >","Aa_9Bb_9Cc_3Dd_0_3_4Ee_9Ff_3Gg_0_4_0")); - for(std::vector::iterator itInfo = classToFriendly.begin(), - itInfoEnd = classToFriendly.end(); - itInfo != itInfoEnd; - ++itInfo) { - //std::cout <first<second != fwlite::format_type_to_mangled(itInfo->first) ) { - std::cout <<"class name: '"<first<<"' has wrong mangled name \n" - <<"expect: '"<second<<"' got: '"<first)<<"'"<first != fwlite::unformat_mangled_to_type(itInfo->second) ) { - std::cout <<"mangled name: '"<second<<"' has wrong type name \n" - <<"expect: '"<first<<"' got: '"<second)<<"'"< >::const_iterator it = dataIds.begin(), - itEnd = dataIds.end(); - it != itEnd; - ++it) { - std::cout <first<< " '"<second<<"'"<first == "std::vector") && - (it->second =="") ) { + for(auto const& dataId : dataIds) { + std::cout << dataId.first << " '" << dataId.second << "'" << std::endl; + if((dataId.first == "std::vector") && + (dataId.second == "")) { ++matches; continue; } - if( (it->first == "edmtest::Simple") && - (it->second =="") ) { + if((dataId.first == "edmtest::Simple") && + (dataId.second == "")) { ++matches; } } diff --git a/DataFormats/FWLite/test/test.cppunit.cpp b/DataFormats/FWLite/test/test.cppunit.cpp index 44e95699a801f..c98a58a4ee9a7 100644 --- a/DataFormats/FWLite/test/test.cppunit.cpp +++ b/DataFormats/FWLite/test/test.cppunit.cpp @@ -23,7 +23,7 @@ Test program for edm::Ref use in ROOT. #include "DataFormats/Common/interface/Handle.h" #include "DataFormats/Provenance/interface/ProductID.h" -static char* gArgV = 0; +static char* gArgV = nullptr; extern "C" char** environ; @@ -94,8 +94,8 @@ CPPUNIT_TEST_SUITE_REGISTRATION(testRefInROOT); static void checkMatch(const edmtest::OtherThingCollection* pOthers, const edmtest::ThingCollection* pThings) { - CPPUNIT_ASSERT(pOthers != 0); - CPPUNIT_ASSERT(pThings != 0); + CPPUNIT_ASSERT(pOthers != nullptr); + CPPUNIT_ASSERT(pThings != nullptr); CPPUNIT_ASSERT(pOthers->size() == pThings->size()); //This test requires at least one entry @@ -248,11 +248,10 @@ void testRefInROOT::testRefFirst() pOthers.getByLabel(events,"OtherThing","testUserTag"); //std::cout <<"got OtherThing"<begin(), itEnd=pOthers->end() ; - itOther != itEnd; ++itOther) { + for(auto const& other : *pOthers) { //std::cout <<"getting ref"<ref.get()->a < arbitraryBigNumber); + CPPUNIT_ASSERT(other.ref.get()->a < arbitraryBigNumber); } //std::cout <<"get all Refs"< pOthers; pOthers.getByLabel(events,"OtherThing","testUserTag"); - for(edmtest::OtherThingCollection::const_iterator itOther=pOthers->begin(), itEnd=pOthers->end() ; - itOther != itEnd; ++itOther) { + for(auto const& other : *pOthers) { //std::cout <<"getting ref"<ref.isAvailable()); - CPPUNIT_ASSERT_THROW(itOther->ref.get(), cms::Exception); + CPPUNIT_ASSERT(not other.ref.isAvailable()); + CPPUNIT_ASSERT_THROW(other.ref.get(), cms::Exception); } } } @@ -378,18 +376,18 @@ void testRefInROOT::testGoodChain() eventChain.Add((tmpdir + "goodDataFormatsFWLite.root").c_str()); eventChain.Add((tmpdir + "good2DataFormatsFWLite.root").c_str()); - edm::Wrapper *pOthers =0; + edm::Wrapper *pOthers = nullptr; eventChain.SetBranchAddress("edmtestOtherThings_OtherThing_testUserTag_TEST.",&pOthers); - edm::Wrapper* pThings = 0; + edm::Wrapper* pThings = nullptr; eventChain.SetBranchAddress("edmtestThings_Thing__TEST.",&pThings); int nev = eventChain.GetEntries(); for( int ev=0; evproduct(),pThings->product()); } */ @@ -401,18 +399,18 @@ void testRefInROOT::failChainWithMissingFile() eventChain.Add((tmpdir + "goodDataFormatsFWLite.root").c_str()); eventChain.Add("thisFileDoesNotExist.root"); - edm::Wrapper *pOthers =0; + edm::Wrapper *pOthers = nullptr; eventChain.SetBranchAddress("edmtestOtherThings_OtherThing_testUserTag_TEST.",&pOthers); - edm::Wrapper* pThings = 0; + edm::Wrapper* pThings = nullptr; eventChain.SetBranchAddress("edmtestThings_Thing__TEST.",&pThings); int nev = eventChain.GetEntries(); for( int ev=0; evproduct(),pThings->product()); } diff --git a/FWCore/FWLite/bin/storageSize.cc b/FWCore/FWLite/bin/storageSize.cc index f785acd9c47d0..4d4e4ed0c2674 100644 --- a/FWCore/FWLite/bin/storageSize.cc +++ b/FWCore/FWLite/bin/storageSize.cc @@ -69,13 +69,13 @@ int main(int argc, char* argv[]) try FWLiteEnabler::enable(); TClass* cls = TClass::GetClass(className.c_str()); - if(0==cls) { + if(nullptr == cls) { std::cerr <<"class '"<New(); - if(0==objInstance) { + if(nullptr == objInstance) { std::cerr <<"unable to create a default instance of the class "<()); TFile* file = TFile::Open(fileName.c_str()); - if (0 == file) { + if (nullptr == file) { std::cerr <<"failed to open '"< (file->Get("Events")); - if(0 == eventTree) { + if(nullptr == eventTree) { std::cerr <<"The file '"<GetBranch(branchName.c_str()); - if(0==branch) { + if(nullptr == branch) { std::cerr <<"The Events TTree does not contain the branch "<GetClassName()); - if(0==cls) { + if(nullptr == cls) { std::cerr <<"class '"<GetClassName()<<"' is unknown by ROOT\n"; return 1; } void* objInstance = cls->New(); - if(0==objInstance) { + if(nullptr == objInstance) { std::cerr <<"unable to create a default instance of the class "<GetClassName(); return 1; } diff --git a/FWCore/FWLite/interface/BranchMapReader.h b/FWCore/FWLite/interface/BranchMapReader.h index afa993e6b6fc2..1a27ca6c10cf6 100644 --- a/FWCore/FWLite/interface/BranchMapReader.h +++ b/FWCore/FWLite/interface/BranchMapReader.h @@ -69,7 +69,7 @@ namespace fwlite { class BranchMapReader { public: BranchMapReader(TFile* file); - BranchMapReader() : strategy_(0),fileVersion_(0) {} + BranchMapReader() : strategy_(nullptr),fileVersion_(0) {} // ---------- const member functions --------------------- @@ -100,8 +100,8 @@ namespace fwlite { // ---------- member data -------------------------------- private: - std::auto_ptr newStrategy(TFile* file, int fileVersion); - std::auto_ptr strategy_; + std::unique_ptr newStrategy(TFile* file, int fileVersion); + std::unique_ptr strategy_; int fileVersion_; }; } diff --git a/FWCore/FWLite/interface/setRefStreamer.h b/FWCore/FWLite/interface/setRefStreamer.h index ba6241e1eb3db..77516d5b9dd66 100644 --- a/FWCore/FWLite/interface/setRefStreamer.h +++ b/FWCore/FWLite/interface/setRefStreamer.h @@ -32,7 +32,7 @@ namespace fwlite { class GetterOperate { public: - GetterOperate( edm::EDProductGetter const* iEP): old_(0) { + GetterOperate(edm::EDProductGetter const* iEP): old_(nullptr) { old_ = setRefStreamer(iEP); } ~GetterOperate() { diff --git a/FWCore/FWLite/src/BareRootProductGetter.cc b/FWCore/FWLite/src/BareRootProductGetter.cc index 3ea80856433fa..db8c946966f6b 100644 --- a/FWCore/FWLite/src/BareRootProductGetter.cc +++ b/FWCore/FWLite/src/BareRootProductGetter.cc @@ -73,7 +73,7 @@ edm::WrapperBase const* BareRootProductGetter::getIt(edm::ProductID const& pid) const { // std::cout << "getIt called " << pid << std::endl; TFile* currentFile = dynamic_cast(gROOT->GetListOfFiles()->Last()); - if(0 == currentFile) { + if(nullptr == currentFile) { throw cms::Exception("FileNotFound") << "unable to find the TFile '" << gROOT->GetListOfFiles()->Last() << "'\n" << "retrieved by calling 'gROOT->GetListOfFiles()->Last()'\n" @@ -84,7 +84,7 @@ BareRootProductGetter::getIt(edm::ProductID const& pid) const { } TTree* eventTree = branchMap_.getEventTree(); // std::cout << "eventTree " << eventTree << std::endl; - if(0 == eventTree) { + if(nullptr == eventTree) { throw cms::Exception("NoEventsTree") << "unable to find the TTree '" << edm::poolNames::eventTreeName() << "' in the last open file, \n" << "file: '" << branchMap_.getFile()->GetName() diff --git a/FWCore/FWLite/src/BranchMapReader.cc b/FWCore/FWLite/src/BranchMapReader.cc index 6cc9f10ef767b..174e8330aecb0 100644 --- a/FWCore/FWLite/src/BranchMapReader.cc +++ b/FWCore/FWLite/src/BranchMapReader.cc @@ -39,7 +39,7 @@ namespace fwlite { static const edm::BranchDescription kDefaultBranchDescription; BMRStrategy::BMRStrategy(TFile* file, int fileVersion) - : currentFile_(file), eventTree_(0), luminosityBlockTree_(0), runTree_(0), + : currentFile_(file), eventTree_(nullptr), luminosityBlockTree_(nullptr), runTree_(nullptr), eventEntry_(-1), luminosityBlockEntry_(-1), runEntry_(-1), fileVersion_(fileVersion) { // do in derived obects // updateFile(file); @@ -97,14 +97,14 @@ namespace fwlite { fileUUID_ = currentFile_->GetUUID(); branchDescriptionMap_.clear(); bDesc_.clear(); - return 0 != eventTree_; + return nullptr != eventTree_; } TBranch* Strategy::getBranchRegistry(edm::ProductRegistry** ppReg) { - TBranch* bReg(0); + TBranch* bReg(nullptr); TTree* metaDataTree = dynamic_cast(currentFile_->Get(edm::poolNames::metaDataTreeName().c_str())); - if(0 != metaDataTree) { + if(nullptr != metaDataTree) { bReg = metaDataTree->GetBranch(edm::poolNames::productDescriptionBranchName().c_str()); bReg->SetAddress(ppReg); bReg->GetEntry(0); @@ -115,8 +115,8 @@ namespace fwlite { std::vector const& Strategy::getBranchDescriptions() { if(bDesc_.empty()) { - for(bidToDesc::const_iterator i = branchDescriptionMap_.begin(); i != branchDescriptionMap_.end(); ++i) { - bDesc_.push_back(i->second); + for(auto const& item : branchDescriptionMap_) { + bDesc_.push_back(item.second); } } return bDesc_; @@ -181,7 +181,7 @@ namespace fwlite { edm::ProductRegistry* pReg = ® TBranch* br = getBranchRegistry(&pReg); - if(0 != br) { + if(nullptr != br) { edm::ProductRegistry::ProductList& prodList = reg.productListUpdator(); for(auto& item : prodList) { @@ -195,7 +195,7 @@ namespace fwlite { mapperFilled_ = true; } reg.setFrozen(false); - return 0 != br; + return nullptr != br; } // v7 has differences in product status that are not implemented in BranchMapReader yet @@ -262,9 +262,9 @@ namespace fwlite { bool BranchMapReaderStrategyV8::updateFile(TFile* file) { Strategy::updateFile(file); mapperFilled_ = false; - entryInfoBranch_ = 0; + entryInfoBranch_ = nullptr; TTree* metaDataTree = dynamic_cast(currentFile_->Get(edm::poolNames::eventMetaDataTreeName().c_str())); - if(0 != metaDataTree) { + if(nullptr != metaDataTree) { entryInfoBranch_ = metaDataTree->GetBranch(BranchTypeToBranchEntryInfoBranchName(edm::InEvent).c_str()); // std::cout << "entryInfoBranch for " << BranchTypeToBranchEntryInfoBranchName(edm::InEvent) << " " << entryInfoBranch_ << std::endl; } else { @@ -280,7 +280,7 @@ namespace fwlite { edm::ProductRegistry* pReg = ® TBranch *br = getBranchRegistry(&pReg); - if(0 != br) { + if(nullptr != br) { edm::ProductRegistry::ProductList& prodList = reg.productListUpdator(); for(auto& item : prodList) { @@ -293,7 +293,7 @@ namespace fwlite { } } reg.setFrozen(false); - return 0 != br; + return nullptr != br; } bool BranchMapReaderStrategyV8::updateMap() { @@ -305,11 +305,9 @@ namespace fwlite { entryInfoBranch_->GetEntry(eventEntry_); - for(std::vector::const_iterator it = pEventEntryInfoVector_->begin(), - itEnd = pEventEntryInfoVector_->end(); - it != itEnd; ++it) { -// eventInfoMap_.insert(*it); - } +// for(auto const& item : *pEventEntryInfoVector_) { +// eventInfoMap_.insert(item); +// } mapperFilled_ = true; return true; } @@ -325,14 +323,14 @@ namespace fwlite { virtual edm::BranchID productToBranchID(edm::ProductID const& pid) override; virtual edm::BranchListIndexes const& branchListIndexes() const override {return history_.branchListIndexes();} private: - std::auto_ptr branchIDLists_; + std::unique_ptr branchIDLists_; TTree* eventHistoryTree_; edm::History history_; edm::History* pHistory_; }; BranchMapReaderStrategyV11::BranchMapReaderStrategyV11(TFile* file, int fileVersion) - : Strategy(file, fileVersion), eventHistoryTree_(0), pHistory_(&history_) { + : Strategy(file, fileVersion), eventHistoryTree_(nullptr), pHistory_(&history_) { updateFile(file); } @@ -366,7 +364,7 @@ namespace fwlite { mapperFilled_ = false; TTree* metaDataTree = dynamic_cast(currentFile_->Get(edm::poolNames::metaDataTreeName().c_str())); - if(0 == metaDataTree) { + if(nullptr == metaDataTree) { throw edm::Exception(edm::errors::EventCorruption) <<"No "< branchIDLists_; + std::unique_ptr branchIDLists_; TTree* eventsTree_; edm::BranchListIndexes branchListIndexes_; edm::BranchListIndexes* pBranchListIndexes_; }; BranchMapReaderStrategyV17::BranchMapReaderStrategyV17(TFile* file, int fileVersion) - : Strategy(file, fileVersion), eventsTree_(0), pBranchListIndexes_(&branchListIndexes_) { + : Strategy(file, fileVersion), eventsTree_(nullptr), pBranchListIndexes_(&branchListIndexes_) { updateFile(file); } @@ -482,7 +480,7 @@ namespace fwlite { Strategy::updateFile(file); mapperFilled_ = false; TTree* metaDataTree = dynamic_cast(currentFile_->Get(edm::poolNames::metaDataTreeName().c_str())); - if(0==metaDataTree) { + if(nullptr == metaDataTree) { throw edm::Exception(edm::errors::EventCorruption) <<"No "<(file->Get(edm::poolNames::metaDataTreeName().c_str())); - if(0==metaDataTree) { + if(nullptr == metaDataTree) { return 0; } @@ -608,7 +606,7 @@ bool BranchMapReader::updateRun(Long_t newRun) { } bool BranchMapReader::updateFile(TFile* file) { - if(0 == strategy_.get()) { + if(nullptr == strategy_.get()) { strategy_ = newStrategy(file, getFileVersion(file)); return true; } @@ -645,20 +643,20 @@ BranchMapReader::getBranchDescriptions() { } -std::auto_ptr +std::unique_ptr BranchMapReader::newStrategy(TFile* file, int fileVersion) { - std::auto_ptr s; + std::unique_ptr s; if(fileVersion >= 17) { - s = std::auto_ptr(new internal::BranchMapReaderStrategyV17(file, fileVersion)); + s = std::unique_ptr(new internal::BranchMapReaderStrategyV17(file, fileVersion)); } else if(fileVersion >= 11) { - s = std::auto_ptr(new internal::BranchMapReaderStrategyV11(file, fileVersion)); + s = std::unique_ptr(new internal::BranchMapReaderStrategyV11(file, fileVersion)); } else if(fileVersion >= 8) { - s = std::auto_ptr(new internal::BranchMapReaderStrategyV8(file, fileVersion)); + s = std::unique_ptr(new internal::BranchMapReaderStrategyV8(file, fileVersion)); } else if(fileVersion >= 7) { - s = std::auto_ptr(new internal::BranchMapReaderStrategyV7(file, fileVersion)); + s = std::unique_ptr(new internal::BranchMapReaderStrategyV7(file, fileVersion)); } else { - s = std::auto_ptr(new internal::BranchMapReaderStrategyV1(file, fileVersion)); + s = std::unique_ptr(new internal::BranchMapReaderStrategyV1(file, fileVersion)); } return s; } diff --git a/FWCore/FWLite/src/FWLiteEnabler.cc b/FWCore/FWLite/src/FWLiteEnabler.cc index 5070bf5d3030b..5400e210035a3 100644 --- a/FWCore/FWLite/src/FWLiteEnabler.cc +++ b/FWCore/FWLite/src/FWLiteEnabler.cc @@ -60,7 +60,7 @@ //Make it easy to load our headers TInterpreter* intrp= gROOT->GetInterpreter(); char const* env = getenv("CMSSW_FWLITE_INCLUDE_PATH"); - if(0 != env) { + if(nullptr != env) { //this is a comma separated list char const* start = env; char const* end; @@ -75,7 +75,7 @@ bool foundCMSIncludes = false; env = getenv("CMSSW_BASE"); - if(0 != env) { + if(nullptr != env) { foundCMSIncludes = true; std::string dir(env); dir += "/src"; @@ -83,7 +83,7 @@ } env = getenv("CMSSW_RELEASE_BASE"); - if(0 != env) { + if(nullptr != env) { foundCMSIncludes = true; std::string dir(env); dir += "/src"; @@ -95,7 +95,7 @@ <<" CMSSW_RELEASE_BASE\n" <<" therefore attempting to '#include' any CMS headers will not work"<InitializeGraphics(); } } diff --git a/FWCore/FWLite/src/RefStreamer.cc b/FWCore/FWLite/src/RefStreamer.cc index 8ea639fe89562..e0b6f6bd16518 100644 --- a/FWCore/FWLite/src/RefStreamer.cc +++ b/FWCore/FWLite/src/RefStreamer.cc @@ -11,14 +11,14 @@ namespace fwlite { { TClass* cl = TClass::GetClass("edm::RefCore"); TClassStreamer* st = cl->GetStreamer(); - if (st == 0) { + if (st == nullptr) { cl->AdoptStreamer(new edm::RefCoreStreamer()); } } { TClass* cl = TClass::GetClass("edm::RefCoreWithIndex"); TClassStreamer* st = cl->GetStreamer(); - if (st == 0) { + if (st == nullptr) { cl->AdoptStreamer(new edm::RefCoreWithIndexStreamer()); } } diff --git a/FWCore/FWLite/src/branchToClass.cc b/FWCore/FWLite/src/branchToClass.cc index ec35938a9a117..a89ba3b0797d6 100644 --- a/FWCore/FWLite/src/branchToClass.cc +++ b/FWCore/FWLite/src/branchToClass.cc @@ -33,9 +33,9 @@ class BranchToClass : private TVirtualBranchBrowsable TClass* BranchToClass::doit( const TBranch* iBranch ) { - TClass* contained = 0; + TClass* contained = nullptr; TClass* type = TVirtualBranchBrowsable::GetCollectionContainedType(iBranch,0,contained); - if( type == 0) { + if( type == nullptr) { type = contained; } return type; diff --git a/FWCore/FWLite/test/ref_t.cppunit.cpp b/FWCore/FWLite/test/ref_t.cppunit.cpp index 8d45dd137cc88..c765864c41b44 100644 --- a/FWCore/FWLite/test/ref_t.cppunit.cpp +++ b/FWCore/FWLite/test/ref_t.cppunit.cpp @@ -64,7 +64,7 @@ using ROOT's "Draw" interface. #include "DataFormats/Provenance/interface/BranchType.h" #include "FWCore/Utilities/interface/TestHelper.h" -static char* gArgV = 0; +static char* gArgV = nullptr; extern "C" char** environ; @@ -131,8 +131,8 @@ CPPUNIT_TEST_SUITE_REGISTRATION(testRefInROOT); static void checkMatch(const edmtest::OtherThingCollection* pOthers, const edmtest::ThingCollection* pThings) { - CPPUNIT_ASSERT(pOthers != 0); - CPPUNIT_ASSERT(pThings != 0); + CPPUNIT_ASSERT(pOthers != nullptr); + CPPUNIT_ASSERT(pThings != nullptr); CPPUNIT_ASSERT(pOthers->size() == pThings->size()); //This test requires at least one entry @@ -178,20 +178,20 @@ static void testTree(TTree* events) { CPPUNIT_ASSERT(events !=0); /* - edmtest::OtherThingCollection* pOthers = 0; + edmtest::OtherThingCollection* pOthers = nullptr; TBranch* otherBranch = events->GetBranch("edmtestOtherThings_OtherThing_testUserTag_TEST.obj"); this does NOT work, must get the wrapper */ - edm::Wrapper *pOthers = 0; + edm::Wrapper *pOthers = nullptr; TBranch* otherBranch = events->GetBranch("edmtestOtherThings_OtherThing_testUserTag_TEST."); - CPPUNIT_ASSERT( otherBranch != 0); + CPPUNIT_ASSERT(otherBranch != nullptr); //edmtest::ThingCollection things; - edm::Wrapper* pThings = 0; + edm::Wrapper* pThings = nullptr; //NOTE: the period at the end is needed TBranch* thingBranch = events->GetBranch("edmtestThings_Thing__TEST."); - CPPUNIT_ASSERT( thingBranch != 0); + CPPUNIT_ASSERT( thingBranch != nullptr); int nev = events->GetEntries(); for( int ev=0; ev *pOthers =0; - TBranch* othersBranch = 0; + edm::Wrapper *pOthers = nullptr; + TBranch* othersBranch = nullptr; eventChain.SetBranchAddress("edmtestOtherThings_OtherThing_testUserTag_TEST.",&pOthers,&othersBranch); - edm::Wrapper* pThings = 0; - TBranch* thingsBranch = 0; + edm::Wrapper* pThings = nullptr; + TBranch* thingsBranch = nullptr; eventChain.SetBranchAddress("edmtestThings_Thing__TEST.",&pThings,&thingsBranch); int nev = eventChain.GetEntries(); @@ -260,8 +260,8 @@ void testRefInROOT::testGoodChain() othersBranch->GetEntry(ev); thingsBranch->GetEntry(ev); eventChain.GetEntry(ev,0); - CPPUNIT_ASSERT(pOthers != 0); - CPPUNIT_ASSERT(pThings != 0); + CPPUNIT_ASSERT(pOthers != nullptr); + CPPUNIT_ASSERT(pThings != nullptr); checkMatch(pOthers->product(),pThings->product()); } @@ -271,13 +271,13 @@ void testRefInROOT::testMissingRef() { TFile file("other_only.root"); TTree* events = dynamic_cast(file.Get(edm::poolNames::eventTreeName().c_str())); - CPPUNIT_ASSERT( events != 0); - if(events==0) return; // To silence Coverity + CPPUNIT_ASSERT(events != nullptr); + if(events == nullptr) return; // To silence Coverity - edm::Wrapper *pOthers = 0; + edm::Wrapper *pOthers = nullptr; TBranch* otherBranch = events->GetBranch("edmtestOtherThings_OtherThing_testUserTag_TEST."); - CPPUNIT_ASSERT( otherBranch != 0); + CPPUNIT_ASSERT(otherBranch != nullptr); int nev = events->GetEntries(); for( int ev=0; evSetAddress(&pOthers); otherBranch->GetEntry(ev); - for(edmtest::OtherThingCollection::const_iterator itOther = pOthers->product()->begin(), - itEnd=pOthers->product()->end(); - itOther != itEnd; ++itOther) { - CPPUNIT_ASSERT(not itOther->ref.isAvailable()); - CPPUNIT_ASSERT_THROW(itOther->ref.get(), cms::Exception); + for(auto const& prod : *pOthers->product()) { + CPPUNIT_ASSERT(not prod.ref.isAvailable()); + CPPUNIT_ASSERT_THROW(prod.ref.get(), cms::Exception); } } @@ -303,18 +301,18 @@ void testRefInROOT::failChainWithMissingFile() eventChain.Add("good.root"); eventChain.Add("thisFileDoesNotExist.root"); - edm::Wrapper *pOthers =0; + edm::Wrapper *pOthers = nullptr; eventChain.SetBranchAddress("edmtestOtherThings_OtherThing_testUserTag_TEST.",&pOthers); - edm::Wrapper* pThings = 0; + edm::Wrapper* pThings = nullptr; eventChain.SetBranchAddress("edmtestThings_Thing__TEST.",&pThings); int nev = eventChain.GetEntries(); for( int ev=0; evproduct(),pThings->product()); } @@ -324,23 +322,23 @@ void testRefInROOT::failDidNotCallGetEntryForEvents() { TFile file("good.root"); TTree* events = dynamic_cast(file.Get(edm::poolNames::eventTreeName().c_str())); - CPPUNIT_ASSERT(events !=0); - if(events==0) return; // To silence Coverity + CPPUNIT_ASSERT(events != nullptr); + if(events == nullptr) return; // To silence Coverity /* - edmtest::OtherThingCollection* pOthers = 0; + edmtest::OtherThingCollection* pOthers = nullptr; TBranch* otherBranch = events->GetBranch("edmtestOtherThings_OtherThing_testUserTag_TEST.obj"); this does NOT work, must get the wrapper */ - edm::Wrapper *pOthers =0; + edm::Wrapper *pOthers = nullptr; TBranch* otherBranch = events->GetBranch("edmtestOtherThings_OtherThing_testUserTag_TEST."); - CPPUNIT_ASSERT( otherBranch != 0); + CPPUNIT_ASSERT( otherBranch != nullptr); otherBranch->SetAddress(&pOthers); otherBranch->GetEntry(0); - CPPUNIT_ASSERT(pOthers->product() != 0); + CPPUNIT_ASSERT(pOthers->product() != nullptr); pOthers->product()->at(0).ref.get(); } @@ -348,15 +346,15 @@ void testRefInROOT::failDidNotCallGetEntryForEvents() void testRefInROOT::testThinning() { TFile file("good.root"); TTree* events = dynamic_cast(file.Get(edm::poolNames::eventTreeName().c_str())); - CPPUNIT_ASSERT(events !=0); - if(events==0) return; // To silence Coverity - edm::Wrapper > *pTracks =0; + CPPUNIT_ASSERT(events != nullptr); + if(events == nullptr) return; // To silence Coverity + edm::Wrapper > *pTracks = nullptr; TBranch* tracksBranchD = events->GetBranch("edmtestTrackOfThingss_trackOfThingsProducerDPlus__TEST."); TBranch* tracksBranchG = events->GetBranch("edmtestTrackOfThingss_trackOfThingsProducerG__TEST."); TBranch* tracksBranchM = events->GetBranch("edmtestTrackOfThingss_trackOfThingsProducerM__TEST."); - CPPUNIT_ASSERT( tracksBranchD!= 0 && - tracksBranchG!= 0 && - tracksBranchM!= 0); + CPPUNIT_ASSERT( tracksBranchD != nullptr && + tracksBranchG != nullptr && + tracksBranchM != nullptr); std::vector const* vTracks = nullptr; @@ -377,7 +375,7 @@ void testRefInROOT::testThinning() { tracksBranchD->SetAddress(&pTracks); tracksBranchD->GetEntry(ev); vTracks = pTracks->product(); - CPPUNIT_ASSERT(vTracks != 0); + CPPUNIT_ASSERT(vTracks != nullptr); edmtest::TrackOfThings const& trackD = vTracks->at(0); CPPUNIT_ASSERT(trackD.ref1.isAvailable()); CPPUNIT_ASSERT(trackD.ref1->a == 10 + offset); @@ -419,7 +417,7 @@ void testRefInROOT::testThinning() { tracksBranchG->SetAddress(&pTracks); tracksBranchG->GetEntry(ev); vTracks = pTracks->product(); - CPPUNIT_ASSERT(vTracks != 0); + CPPUNIT_ASSERT(vTracks != nullptr); edmtest::TrackOfThings const& trackG = vTracks->at(0); CPPUNIT_ASSERT(trackG.ref1.isAvailable()); CPPUNIT_ASSERT(trackG.ref1->a == 20 + offset); @@ -458,7 +456,7 @@ void testRefInROOT::testThinning() { tracksBranchM->SetAddress(&pTracks); tracksBranchM->GetEntry(ev); vTracks = pTracks->product(); - CPPUNIT_ASSERT(vTracks != 0); + CPPUNIT_ASSERT(vTracks != nullptr); edmtest::TrackOfThings const& trackM0 = vTracks->at(0); CPPUNIT_ASSERT(!trackM0.ref1.isAvailable()); diff --git a/FWCore/TFWLiteSelector/interface/TFWLiteSelector.h b/FWCore/TFWLiteSelector/interface/TFWLiteSelector.h index ca2686fd67823..55e4f7a56b712 100644 --- a/FWCore/TFWLiteSelector/interface/TFWLiteSelector.h +++ b/FWCore/TFWLiteSelector/interface/TFWLiteSelector.h @@ -32,7 +32,7 @@ your workers, you can create a new TList and assign it to 'itemsForProcessing' and then add the objects you want passed into that list. NOTE: you are responsible for deleting the created TList and for deleting all items held by the TList. The easiest - way to do this is to add a 'std::auto_ptr' member data to your Selector and then call 'SetOwner()' on the TList. + way to do this is to add a 'std::unique_ptr' member data to your Selector and then call 'SetOwner()' on the TList. 2) 'terminate(TList&)' this is called after all processing has finished. The TList& contains all the accumulated information from all the workers. diff --git a/FWCore/TFWLiteSelector/src/TFWLiteSelectorBasic.cc b/FWCore/TFWLiteSelector/src/TFWLiteSelectorBasic.cc index 7babc3bd7288e..7db6fa3f70b9b 100644 --- a/FWCore/TFWLiteSelector/src/TFWLiteSelectorBasic.cc +++ b/FWCore/TFWLiteSelector/src/TFWLiteSelectorBasic.cc @@ -68,8 +68,8 @@ namespace edm { private: std::unique_ptr getTheProduct(BranchKey const& k) const; virtual std::unique_ptr getProduct_(BranchKey const& k, EDProductGetter const* ep) override; - virtual std::auto_ptr getProvenance_(BranchKey const&) const { - return std::auto_ptr(); + virtual std::unique_ptr getProvenance_(BranchKey const&) const { + return std::unique_ptr(); } virtual void mergeReaders_(DelayedReader*) override {} virtual void reset_() override {} @@ -270,7 +270,7 @@ Bool_t TFWLiteSelectorBasic::Process(Long64_t iEntry) { //std::cout << "Process start" << std::endl; if(everythingOK_) { - std::auto_ptr eaux(new edm::EventAuxiliary()); + std::unique_ptr eaux = std::make_unique(); edm::EventAuxiliary& aux = *eaux; edm::EventAuxiliary* pAux= eaux.get(); TBranch* branch = m_->tree_->GetBranch(edm::BranchTypeToAuxiliaryBranchName(edm::InEvent).c_str()); @@ -429,7 +429,7 @@ TFWLiteSelectorBasic::setupNewFile(TFile& iFile) { m_->pointerToBranchBuffer_.erase(m_->pointerToBranchBuffer_.begin(), m_->pointerToBranchBuffer_.end()); - std::auto_ptr newReg(new edm::ProductRegistry()); + std::unique_ptr newReg = std::make_unique(); edm::ProductRegistry::ProductList& prodList = m_->reg_->productListUpdator(); { diff --git a/FWCore/TFWLiteSelectorTest/src/ThingsTSelector.cc b/FWCore/TFWLiteSelectorTest/src/ThingsTSelector.cc index 171a9f3708506..b2b0fc7aea61b 100644 --- a/FWCore/TFWLiteSelectorTest/src/ThingsTSelector.cc +++ b/FWCore/TFWLiteSelectorTest/src/ThingsTSelector.cc @@ -16,18 +16,18 @@ void ThingsTSelector::begin(TList*&) } void ThingsTSelector::preProcessing(const TList*, TList& out ) { - if(0!=h_a) { + if(nullptr != h_a) { out.Remove(h_a); delete h_a; - h_a=0; + h_a = nullptr; } h_a = new TH1F( kA , "a" , 100, 0, 20 ); out.Add(h_a); - if(0!=h_refA) { + if(nullptr != h_refA) { out.Remove(h_refA); delete h_refA; - h_refA=0; + h_refA = nullptr; } h_refA = new TH1F( kRefA , "refA" , 100, 0, 20 ); out.Add(h_refA); @@ -82,7 +82,7 @@ void ThingsTSelector::terminate(TList& out) { TCanvas * canvas = new TCanvas( ); { TObject* hist = out.FindObject(kA); - if(0 != hist) { + if(nullptr != hist) { hist->Draw(); canvas->SaveAs( "a.jpg" ); } else { @@ -91,7 +91,7 @@ void ThingsTSelector::terminate(TList& out) { } { TObject* hist = out.FindObject(kRefA); - if(0 != hist) { + if(nullptr != hist) { hist->Draw(); canvas->SaveAs( "refA.jpg" ); } else { diff --git a/FWCore/TFWLiteSelectorTest/src/ThingsTSelector.h b/FWCore/TFWLiteSelectorTest/src/ThingsTSelector.h index 360e61abd4c2e..3d9f59246873f 100644 --- a/FWCore/TFWLiteSelectorTest/src/ThingsTSelector.h +++ b/FWCore/TFWLiteSelectorTest/src/ThingsTSelector.h @@ -14,7 +14,7 @@ namespace tfwliteselectortest { class ThingsTSelector : public TFWLiteSelectorBasic { public : - ThingsTSelector() : h_a(0), h_refA(0) {} + ThingsTSelector() : h_a(nullptr), h_refA(nullptr) {} void begin(TList*&); void preProcessing(const TList*, TList&); void process(const edm::Event&); diff --git a/FWCore/TFWLiteSelectorTest/src/ThingsTSelector2.cc b/FWCore/TFWLiteSelectorTest/src/ThingsTSelector2.cc index fb2bca5568f0f..0c6fe2e46ea4b 100644 --- a/FWCore/TFWLiteSelectorTest/src/ThingsTSelector2.cc +++ b/FWCore/TFWLiteSelectorTest/src/ThingsTSelector2.cc @@ -81,7 +81,7 @@ void ThingsTSelector2::terminate(TList& out) { TCanvas * canvas = new TCanvas( ); { TObject* hist = out.FindObject(kA); - if(0!=hist) { + if(nullptr != hist) { hist->Draw(); canvas->SaveAs( "a.jpg" ); } else { @@ -91,7 +91,7 @@ void ThingsTSelector2::terminate(TList& out) { std::cout <<"refA"<< std::endl; { TObject* hist = out.FindObject(kRefA); - if( 0 != hist ) { + if(nullptr != hist) { hist->Draw(); canvas->SaveAs( "refA.jpg" ); } else { From 95b1ba30f730c63ab761559ac7f9d9cbcf0438ae Mon Sep 17 00:00:00 2001 From: Suchandra Date: Sat, 30 Jan 2016 13:49:08 +0100 Subject: [PATCH 206/250] adding LogDebug --- Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc b/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc index 1a44d5b476688..e0cbfd5552145 100644 --- a/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc +++ b/Geometry/TrackerGeometryBuilder/src/TrackerGeometry.cc @@ -106,7 +106,7 @@ TrackerGeometry::TrackerGeometry(GeometricDet const* gd) : theTrackerDet(gd) sort(deepcomp.begin(), deepcomp.end(), DetIdComparator()); - std::cout << " Total Number of Detectors " << deepcomp.size() << std::endl; + LogDebug("ThicknessAndType") << " Total Number of Detectors " << deepcomp.size() ; LogDebug("ThicknessAndType") << "Dump of sensors names and bounds"; for(auto det : deepcomp) { fillTestMap(det); From ac044b6b8182c911aa054c9a9fb9d19f3ab3fcb4 Mon Sep 17 00:00:00 2001 From: Junghwan John Goh Date: Sat, 30 Jan 2016 14:37:19 +0100 Subject: [PATCH 207/250] use barePhi() --- .../src/MuonShowerInformationFiller.cc | 106 +++++++++--------- 1 file changed, 53 insertions(+), 53 deletions(-) diff --git a/RecoMuon/MuonIdentification/src/MuonShowerInformationFiller.cc b/RecoMuon/MuonIdentification/src/MuonShowerInformationFiller.cc index 310be33f041f2..818b94d844c91 100644 --- a/RecoMuon/MuonIdentification/src/MuonShowerInformationFiller.cc +++ b/RecoMuon/MuonIdentification/src/MuonShowerInformationFiller.cc @@ -3,7 +3,7 @@ * \class: MuonShowerInformationFiller * Description: class for muon shower identification * - + * * \author: A. Svyatkovskiy, Purdue University * @@ -112,7 +112,7 @@ MuonShowerInformationFiller::~MuonShowerInformationFiller() { reco::MuonShower MuonShowerInformationFiller::fillShowerInformation( const reco::Muon& muon, const edm::Event& iEvent, const edm::EventSetup& iSetup) { reco::MuonShower returnShower; - + // Update the services theService->update(iSetup); setEvent(iEvent); @@ -123,11 +123,11 @@ reco::MuonShower MuonShowerInformationFiller::fillShowerInformation( const reco: std::vector nStationCorrelatedHits = theCorrelatedStationHits; std::vector stationShowerSizeT = theStationShowerTSize; std::vector stationShowerDeltaR = theStationShowerDeltaR; - - returnShower.nStationHits = nStationHits; + + returnShower.nStationHits = nStationHits; returnShower.nStationCorrelatedHits = nStationCorrelatedHits; returnShower.stationShowerSizeT = stationShowerSizeT; - returnShower.stationShowerDeltaR = stationShowerDeltaR; + returnShower.stationShowerDeltaR = stationShowerDeltaR; return returnShower; @@ -178,8 +178,8 @@ void MuonShowerInformationFiller::setServices(const EventSetup& setup) { // Get hits owned by segments // TransientTrackingRecHit::ConstRecHitContainer -MuonShowerInformationFiller::hitsFromSegments(const GeomDet* geomDet, - edm::Handle dtSegments, +MuonShowerInformationFiller::hitsFromSegments(const GeomDet* geomDet, + edm::Handle dtSegments, edm::Handle cscSegments) const { MuonTransientTrackingRecHit::MuonRecHitContainer segments; @@ -190,7 +190,7 @@ MuonShowerInformationFiller::hitsFromSegments(const GeomDet* geomDet, DTChamberId chamberId(geoId.rawId()); - // loop on segments 4D + // loop on segments 4D DTRecSegment4DCollection::id_iterator chamberIdIt; for (chamberIdIt = dtSegments->id_begin(); chamberIdIt != dtSegments->id_end(); @@ -198,15 +198,15 @@ MuonShowerInformationFiller::hitsFromSegments(const GeomDet* geomDet, if (*chamberIdIt != chamberId) continue; - // Get the range for the corresponding ChamberId + // Get the range for the corresponding ChamberId DTRecSegment4DCollection::range range = dtSegments->get((*chamberIdIt)); - + for (DTRecSegment4DCollection::const_iterator iseg = range.first; iseg!=range.second;++iseg) { if (iseg->dimension() != 4) continue; segments.push_back(MuonTransientTrackingRecHit::specificBuild(geomDet,&*iseg)); } - } + } } else if (geoId.subdetId() == MuonSubdetId::CSC) { @@ -217,7 +217,7 @@ MuonShowerInformationFiller::hitsFromSegments(const GeomDet* geomDet, if ((*chamberId).chamber() != did.chamber()) continue; - // Get the range for the corresponding ChamberId + // Get the range for the corresponding ChamberId CSCSegmentCollection::range range = cscSegments->get((*chamberId)); for (CSCSegmentCollection::const_iterator iseg = range.first; @@ -233,7 +233,7 @@ MuonShowerInformationFiller::hitsFromSegments(const GeomDet* geomDet, TransientTrackingRecHit::ConstRecHitContainer allhitscorrelated; - if (segments.empty()) return allhitscorrelated; + if (segments.empty()) return allhitscorrelated; TransientTrackingRecHit::ConstRecHitPointer muonRecHit(segments.front()); allhitscorrelated = MuonTransientTrackingRecHitBreaker::breakInSubRecHits(muonRecHit,2); @@ -249,7 +249,7 @@ MuonShowerInformationFiller::hitsFromSegments(const GeomDet* geomDet, for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator ihit1 = hits1.begin(); ihit1 != hits1.end(); ++ihit1 ) { - bool usedbefore = false; + bool usedbefore = false; //unused DetId thisID = (*ihit1)->geographicalId(); //LocalPoint lp1dinsegHit = (*ihit1)->localPosition(); GlobalPoint gp1dinsegHit = (*ihit1)->globalPosition(); @@ -341,7 +341,7 @@ vector MuonShowerInformationFiller::getCompatibleDets(const reco LogTrace(category_) << "Consider a track " << track.p() << " eta: " << track.eta() << " phi " << track.phi() << endl; - + TrajectoryStateOnSurface innerTsos = trajectoryStateTransform::innerStateOnSurface(track, *theService->trackingGeometry(), &*theService->magneticField()); TrajectoryStateOnSurface outerTsos = trajectoryStateTransform::outerStateOnSurface(track, *theService->trackingGeometry(), &*theService->magneticField()); @@ -356,9 +356,9 @@ vector MuonShowerInformationFiller::getCompatibleDets(const reco // crossing points of track with cylinder GlobalPoint xPoint = crossingPoint(innerPos, outerPos, dynamic_cast(*iLayer)); - + // check if point is inside the detector - if ((fabs(xPoint.y()) < 1000.0) && (fabs(xPoint.z()) < 1500 ) && + if ((fabs(xPoint.y()) < 1000.0) && (fabs(xPoint.z()) < 1500 ) && (!(xPoint.y() == 0 && xPoint.x() == 0 && xPoint.z() == 0))) allCrossingPoints.push_back(xPoint); } @@ -371,10 +371,10 @@ vector MuonShowerInformationFiller::getCompatibleDets(const reco tempDT = dtPositionToDets(*ipos); vector::const_iterator begin = tempDT.begin(); vector::const_iterator end = tempDT.end(); - + for (; begin!=end;++begin) { total.push_back(*begin); - } + } } allCrossingPoints.clear(); @@ -385,7 +385,7 @@ vector MuonShowerInformationFiller::getCompatibleDets(const reco GlobalPoint xPoint = crossingPoint(innerPos, outerPos, dynamic_cast(*iLayer)); // check if point is inside the detector - if ((fabs(xPoint.y()) < 1000.0) && (fabs(xPoint.z()) < 1500.0) + if ((fabs(xPoint.y()) < 1000.0) && (fabs(xPoint.z()) < 1500.0) && (!(xPoint.y() == 0 && xPoint.x() == 0 && xPoint.z() == 0))) allCrossingPoints.push_back(xPoint); } stable_sort(allCrossingPoints.begin(), allCrossingPoints.end(), LessMag(innerPos) ); @@ -411,7 +411,7 @@ vector MuonShowerInformationFiller::getCompatibleDets(const reco // // Intersection point of track with barrel layer // -GlobalPoint MuonShowerInformationFiller::crossingPoint(const GlobalPoint& p1, +GlobalPoint MuonShowerInformationFiller::crossingPoint(const GlobalPoint& p1, const GlobalPoint& p2, const BarrelDetLayer* dl) const { @@ -421,7 +421,7 @@ GlobalPoint MuonShowerInformationFiller::crossingPoint(const GlobalPoint& p1, } GlobalPoint MuonShowerInformationFiller::crossingPoint(const GlobalPoint& p1, - const GlobalPoint& p2, + const GlobalPoint& p2, const Cylinder& cyl) const { float radius = cyl.radius(); @@ -451,8 +451,8 @@ GlobalPoint MuonShowerInformationFiller::crossingPoint(const GlobalPoint& p1, // there are two crossing points, return the one that is in the same quadrant as point of extrapolation if ((p2.x()*x1 > 0) && (y1*p2.y() > 0) && (z1*p2.z() > 0)) { - return GlobalPoint(x1, y1, z1); - } else { + return GlobalPoint(x1, y1, z1); + } else { return GlobalPoint(x2, y2, z2); } @@ -462,17 +462,17 @@ GlobalPoint MuonShowerInformationFiller::crossingPoint(const GlobalPoint& p1, // // Intersection point of track with a forward layer // -GlobalPoint MuonShowerInformationFiller::crossingPoint(const GlobalPoint& p1, - const GlobalPoint& p2, +GlobalPoint MuonShowerInformationFiller::crossingPoint(const GlobalPoint& p1, + const GlobalPoint& p2, const ForwardDetLayer* dl) const { const BoundDisk& bc = dl->specificSurface(); return crossingPoint(p1, p2, bc); - -} -GlobalPoint MuonShowerInformationFiller::crossingPoint(const GlobalPoint& p1, - const GlobalPoint& p2, +} + +GlobalPoint MuonShowerInformationFiller::crossingPoint(const GlobalPoint& p1, + const GlobalPoint& p2, const BoundDisk& disk) const { float diskZ = disk.position().z(); @@ -524,7 +524,7 @@ vector MuonShowerInformationFiller::dtPositionToDets(const Globa float phistep = M_PI/6; - float phigp = (float)gp.phi(); + float phigp = (float)gp.barePhi(); if ( fabs(deltaPhi(phigp, 0*phistep)) < phistep ) sectors.push_back(1); if ( fabs(deltaPhi(phigp, phistep)) < phistep ) sectors.push_back(2); @@ -546,7 +546,7 @@ vector MuonShowerInformationFiller::dtPositionToDets(const Globa if ( fabs(deltaPhi(phigp, 11*phistep)) < phistep ) sectors.push_back(12); LogTrace(category_) << "DT position to dets" << endl; - LogTrace(category_) << "number of sectors to consider: " << sectors.size() << endl; + LogTrace(category_) << "number of sectors to consider: " << sectors.size() << endl; LogTrace(category_) << "station: " << station << " wheels: " << minwheel << " " << maxwheel << endl; vector result; @@ -574,7 +574,7 @@ vector MuonShowerInformationFiller::cscPositionToDets(const Glob // determine the endcap side int endcap = 0; - if (gp.z() > 0) {endcap = 1;} else {endcap = 2;} + if (gp.z() > 0) {endcap = 1;} else {endcap = 2;} // determine the csc station and range of rings int station = 5; @@ -582,7 +582,7 @@ vector MuonShowerInformationFiller::cscPositionToDets(const Glob // check all rings in a station if ( fabs(gp.z()) > 1000. && fabs(gp.z()) < 1055.0 ) { station = 4; - } + } else if ( fabs(gp.z()) > 910.0 && fabs(gp.z()) < 965.0) { station = 3; } @@ -597,22 +597,22 @@ vector MuonShowerInformationFiller::cscPositionToDets(const Glob float phistep1 = M_PI/18.; //for all the rings except first rings for stations > 1 float phistep2 = M_PI/9.; - float phigp = (float)gp.phi(); + float phigp = (float)gp.barePhi(); int ring = -1; // determine the ring if (station == 1) { -//FIX ME!!! +//FIX ME!!! if (gp.perp() > 100 && gp.perp() < 270) ring = 1; else if (gp.perp() > 270 && gp.perp() < 450) ring = 2; else if (gp.perp() > 450 && gp.perp() < 695) ring = 3; else if (gp.perp() > 100 && gp.perp() < 270) ring = 4; - } + } else if (station == 2) { - + if (gp.perp() > 140 && gp.perp() < 350) ring = 1; else if (gp.perp() > 350 && gp.perp() < 700) ring = 2; @@ -630,10 +630,10 @@ vector MuonShowerInformationFiller::cscPositionToDets(const Glob } - if (station > 1 && ring == 1) { + if (station > 1 && ring == 1) { // we have 18 sectors in that case - for (int i = 0; i < 18; i++) { + for (int i = 0; i < 18; i++) { if ( fabs(deltaPhi(phigp, i*phistep2)) < phistep2 ) sectors.push_back(i+1); } @@ -686,7 +686,7 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { vector muonRecHits(4); // split rechits from segs by station - vector muonCorrelatedHits(4); + vector muonCorrelatedHits(4); // get vector of GeomDets compatible with a track vector compatibleLayers = getCompatibleDets(*track); @@ -704,7 +704,7 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { // skip tracker hits if (geoId.det()!= DetId::Muon) continue; - // DT + // DT if ( geoId.subdetId() == MuonSubdetId::DT ) { // get station @@ -713,7 +713,7 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { int wheel = detid.wheel(); // get rechits from segments per station - TransientTrackingRecHit::ConstRecHitContainer muonCorrelatedHitsTmp = hitsFromSegments(*igd, theDT4DRecSegments, theCSCSegments); + TransientTrackingRecHit::ConstRecHitContainer muonCorrelatedHitsTmp = hitsFromSegments(*igd, theDT4DRecSegments, theCSCSegments); TransientTrackingRecHit::ConstRecHitContainer::const_iterator hits_begin = muonCorrelatedHitsTmp.begin(); TransientTrackingRecHit::ConstRecHitContainer::const_iterator hits_end = muonCorrelatedHitsTmp.end(); @@ -746,7 +746,7 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { int station = did.station(); int ring = did.ring(); - //get rechits from segments by station + //get rechits from segments by station TransientTrackingRecHit::ConstRecHitContainer muonCorrelatedHitsTmp = hitsFromSegments(*igd, theDT4DRecSegments, theCSCSegments); TransientTrackingRecHit::ConstRecHitContainer::const_iterator hits_begin = muonCorrelatedHitsTmp.begin(); TransientTrackingRecHit::ConstRecHitContainer::const_iterator hits_end = muonCorrelatedHitsTmp.end(); @@ -777,7 +777,7 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { center = temp.front()->globalPosition().perp(); } temp.clear(); - + if (center > 550.) { muonRecHits.at(2).insert(muonRecHits.at(2).end(),tmpCSC1.begin(),tmpCSC1.end()); } else { @@ -791,9 +791,9 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { } }//loop over GeomDets compatible with a track - // calculate number of all and correlated hits + // calculate number of all and correlated hits for (int stat = 0; stat < 4; stat++) { - theCorrelatedStationHits[stat] = muonCorrelatedHits.at(stat).size(); + theCorrelatedStationHits[stat] = muonCorrelatedHits.at(stat).size(); theAllStationHits[stat] = muonRecHits[stat].size(); } LogTrace(category_) << "Hits used by the segments, by station " @@ -826,8 +826,8 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { std::vector clUppers; for ( size_t ihit = 0; ihit < nhit; ++ihit ) { const size_t jhit = (ihit+1)%nhit; - const double phi1 = muonRecHits[stat].at(ihit)->globalPosition().phi(); - const double phi2 = muonRecHits[stat].at(jhit)->globalPosition().phi(); + const double phi1 = muonRecHits[stat].at(ihit)->globalPosition().barePhi(); + const double phi2 = muonRecHits[stat].at(jhit)->globalPosition().barePhi(); const double dphi = std::abs(deltaPhi(phi1, phi2)); if ( dphi >= 0.05 ) clUppers.push_back(ihit); @@ -837,11 +837,11 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { double dphimax = 0; if ( clUppers.empty() ) { // No gaps - there is only one cluster. Take all of them - const double refPhi = muonRecHits[stat].at(0)->globalPosition().phi(); + const double refPhi = muonRecHits[stat].at(0)->globalPosition().barePhi(); double dphilo = 0, dphihi = 0; for ( auto& hit : muonRecHits[stat] ) { muonRecHitsPhiBest.push_back(hit); - const double phi = hit->globalPosition().phi(); + const double phi = hit->globalPosition().barePhi(); dphilo = std::min(dphilo, deltaPhi(refPhi, phi)); dphihi = std::max(dphihi, deltaPhi(refPhi, phi)); } @@ -860,8 +860,8 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) { // At least two hit for a cluster if ( upper == lower ) continue; - const double phi1 = muonRecHits[stat].at(upper)->globalPosition().phi(); - const double phi2 = muonRecHits[stat].at(lower)->globalPosition().phi(); + const double phi1 = muonRecHits[stat].at(upper)->globalPosition().barePhi(); + const double phi2 = muonRecHits[stat].at(lower)->globalPosition().barePhi(); const double dphi = std::abs(deltaPhi(phi1, phi2)); if ( dphimax < dphi ) { From c7ef891a2034b651ab1fd1b7a966664e28a07cbb Mon Sep 17 00:00:00 2001 From: Satoshi Hasegawa Date: Sat, 30 Jan 2016 12:19:00 -0600 Subject: [PATCH 208/250] Puppi tuning ; update of eta-extrapolation --- CommonTools/PileupAlgos/python/Puppi_cff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CommonTools/PileupAlgos/python/Puppi_cff.py b/CommonTools/PileupAlgos/python/Puppi_cff.py index 2c6a545d1b9a0..d99540b3b99bc 100644 --- a/CommonTools/PileupAlgos/python/Puppi_cff.py +++ b/CommonTools/PileupAlgos/python/Puppi_cff.py @@ -60,8 +60,8 @@ ptMin = cms.vdouble( 0.0, 0.0), MinNeutralPt = cms.vdouble( 1.7, 2.0), MinNeutralPtSlope = cms.vdouble(0.07, 0.07), - RMSEtaSF = cms.vdouble(1.30, 1.10), - MedEtaSF = cms.vdouble(1.05, 0.90), + RMSEtaSF = cms.vdouble(1.20, 0.95), + MedEtaSF = cms.vdouble(0.90, 0.75), EtaMaxExtrap = cms.double( 2.0), puppiAlgos = puppiForward ), From 83344caddf90c8775708becdadd62b5930a35888 Mon Sep 17 00:00:00 2001 From: Satoshi Hasegawa Date: Sat, 30 Jan 2016 12:19:34 -0600 Subject: [PATCH 209/250] Puppi tuning with QCD jets MC. Parameter for central region is updated. --- CommonTools/PileupAlgos/python/Puppi_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CommonTools/PileupAlgos/python/Puppi_cff.py b/CommonTools/PileupAlgos/python/Puppi_cff.py index d99540b3b99bc..445e70dd9a0a3 100644 --- a/CommonTools/PileupAlgos/python/Puppi_cff.py +++ b/CommonTools/PileupAlgos/python/Puppi_cff.py @@ -47,7 +47,7 @@ etaMin = cms.vdouble(0.), etaMax = cms.vdouble(2.5), ptMin = cms.vdouble(0.), - MinNeutralPt = cms.vdouble(0.1), + MinNeutralPt = cms.vdouble(0.2), MinNeutralPtSlope = cms.vdouble(0.015), RMSEtaSF = cms.vdouble(1.0), MedEtaSF = cms.vdouble(1.0), From 6b8c2abae1401eb06317db9ebb0f79e1ebc4e258 Mon Sep 17 00:00:00 2001 From: Salvatore Di Guida Date: Sat, 30 Jan 2016 20:20:14 +0100 Subject: [PATCH 210/250] Initialise a PoolDBESSource instance in RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py, not importing nor cloning from default definition, in order to avoid ESSource conflicts when defining PAT sequences. This is a workaround, not a fix. --- .../loadRecoTauTagMVAsFromPrepDB_cfi.py | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py index 3f0ae4553f066..cdfb54737da70 100644 --- a/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py +++ b/RecoTauTag/Configuration/python/loadRecoTauTagMVAsFromPrepDB_cfi.py @@ -1,13 +1,24 @@ import socket -import FWCore.ParameterSet.Config as cms +from CondCore.CondDB.CondDB_cfi import * '''Helper procedure that loads mva inputs from database''' -from CondCore.ESSources.CondDBESSource_cfi import GlobalTag +CondDBTauConnection = CondDB.clone( connect = cms.string( 'frontier://FrontierProd/CMS_CONDITIONS' ) ) +if socket.getfqdn().find( '.cms' ) != -1: + CondDBTauConnection.connect = cms.string( 'frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)(failovertoserver=no)/CMS_CONDITIONS' ) -loadRecoTauTagMVAsFromPrepDB = GlobalTag.clone() - -if socket.getfqdn().find('.cms') != -1: - loadRecoTauTagMVAsFromPrepDB.connect = cms.string('frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)(failovertoserver=no)/CMS_CONDITIONS') +loadRecoTauTagMVAsFromPrepDB = cms.ESSource( "PoolDBESSource", + CondDBTauConnection, + globaltag = cms.string( '' ), + snapshotTime = cms.string( '' ), + toGet = cms.VPSet(), # hook to override or add single payloads + DumpStat = cms.untracked.bool( False ), + ReconnectEachRun = cms.untracked.bool( False ), + RefreshAlways = cms.untracked.bool( False ), + RefreshEachRun = cms.untracked.bool( False ), + RefreshOpenIOVs = cms.untracked.bool( False ), + pfnPostfix = cms.untracked.string( '' ), + pfnPrefix = cms.untracked.string( '' ), + ) # register tau ID (= isolation) discriminator MVA tauIdDiscrMVA_trainings = { From 81f52ced6afd712bb60d3ecb56d9945c845409f4 Mon Sep 17 00:00:00 2001 From: Ta-Wei Date: Sun, 31 Jan 2016 06:28:57 +0100 Subject: [PATCH 211/250] fix PythiaMomDauFilter.C and Bu_D0Pi_KPiPi.dec --- GeneratorInterface/ExternalDecays/data/Bu_D0Pi_KPiPi.dec | 2 +- .../GenFilters/interface/PythiaMomDauFilter.h | 1 + GeneratorInterface/GenFilters/src/PythiaMomDauFilter.cc | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/GeneratorInterface/ExternalDecays/data/Bu_D0Pi_KPiPi.dec b/GeneratorInterface/ExternalDecays/data/Bu_D0Pi_KPiPi.dec index d242617aadfbe..292d2268036ec 100644 --- a/GeneratorInterface/ExternalDecays/data/Bu_D0Pi_KPiPi.dec +++ b/GeneratorInterface/ExternalDecays/data/Bu_D0Pi_KPiPi.dec @@ -9,7 +9,7 @@ Alias Myanti-D0 anti-D0 ChargeConj MyD0 Myanti-D0 # Decay MyB+ -1.000 anti-D0 pi+ PHSP; +1.000 Myanti-D0 pi+ PHSP; Enddecay CDecay MyB- # diff --git a/GeneratorInterface/GenFilters/interface/PythiaMomDauFilter.h b/GeneratorInterface/GenFilters/interface/PythiaMomDauFilter.h index b4ee5a2fbde20..c0645766e503e 100644 --- a/GeneratorInterface/GenFilters/interface/PythiaMomDauFilter.h +++ b/GeneratorInterface/GenFilters/interface/PythiaMomDauFilter.h @@ -15,6 +15,7 @@ // // Original Author: Daniele Pedrini // Created: Oct 27 2015 +// Fixed : Ta-Wei Wang, Dec 11 2015 // $Id: PythiaMomDauFilter.h,v 1.1 2015/10/27 pedrini Exp $ // // diff --git a/GeneratorInterface/GenFilters/src/PythiaMomDauFilter.cc b/GeneratorInterface/GenFilters/src/PythiaMomDauFilter.cc index a195e01b9910c..ad45315e3be2d 100644 --- a/GeneratorInterface/GenFilters/src/PythiaMomDauFilter.cc +++ b/GeneratorInterface/GenFilters/src/PythiaMomDauFilter.cc @@ -128,7 +128,11 @@ bool PythiaMomDauFilter::filter(edm::Event& iEvent, const edm::EventSetup& iSetu ++ndauac; break; } - if((*dau)->pdg_id() == -daughterID) { + int daughterIDanti = -daughterID; + int pythiaCode = PYCOMP(daughterID); + int has_antipart = pydat2.kchg[3-1][pythiaCode-1]; + if( has_antipart == 0 ) daughterIDanti = daughterID; + if((*dau)->pdg_id() == daughterIDanti) { for( HepMC::GenVertex::particle_iterator des = (*dau)->end_vertex()->particles_begin(HepMC::children); des != (*des)->end_vertex()->particles_end(HepMC::children); ++des ){ ++ndes; for( unsigned int i=0; i Date: Sun, 31 Jan 2016 09:16:44 -0600 Subject: [PATCH 212/250] Puppi tuning for the forward region. --- CommonTools/PileupAlgos/python/Puppi_cff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CommonTools/PileupAlgos/python/Puppi_cff.py b/CommonTools/PileupAlgos/python/Puppi_cff.py index 445e70dd9a0a3..bf3e6e2fbc098 100644 --- a/CommonTools/PileupAlgos/python/Puppi_cff.py +++ b/CommonTools/PileupAlgos/python/Puppi_cff.py @@ -58,8 +58,8 @@ etaMin = cms.vdouble( 2.5, 3.0), etaMax = cms.vdouble( 3.0, 10.0), ptMin = cms.vdouble( 0.0, 0.0), - MinNeutralPt = cms.vdouble( 1.7, 2.0), - MinNeutralPtSlope = cms.vdouble(0.07, 0.07), + MinNeutralPt = cms.vdouble( 0.2, 0.2), + MinNeutralPtSlope = cms.vdouble(0.08, 0.08), RMSEtaSF = cms.vdouble(1.20, 0.95), MedEtaSF = cms.vdouble(0.90, 0.75), EtaMaxExtrap = cms.double( 2.0), From 323eb20fcd06fc475b022d8c6770eafad79e4eca Mon Sep 17 00:00:00 2001 From: Ye Chen Date: Sun, 31 Jan 2016 17:58:44 +0100 Subject: [PATCH 213/250] add decay file for BPH --- .../data/Bs_Jpsipipi_mumupipi.dec | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 GeneratorInterface/ExternalDecays/data/Bs_Jpsipipi_mumupipi.dec diff --git a/GeneratorInterface/ExternalDecays/data/Bs_Jpsipipi_mumupipi.dec b/GeneratorInterface/ExternalDecays/data/Bs_Jpsipipi_mumupipi.dec new file mode 100644 index 0000000000000..fc2217ebca1f9 --- /dev/null +++ b/GeneratorInterface/ExternalDecays/data/Bs_Jpsipipi_mumupipi.dec @@ -0,0 +1,29 @@ +# This is the decay file for the decay BS0 -> PSI(-> MU+ MU-) pi+ pi- +# +# Descriptor: [B_s0 -> (J/psi(1S) -> mu+ mu-) ( pi+ pi-)] +# +# NickName: Bs_Jpsi2pi +# +# Physics: Currently using phase space for Bs decays +# +# Tested: +# By: Jhovanny Andres Mejia, Eduard de la Cruz Burelo +# Date: 21 january 2016 +# +Alias MyB_s0 B_s0 +Alias Myanti-B_s0 anti-B_s0 +ChargeConj Myanti-B_s0 MyB_s0 +Alias MyJ/psi J/psi +ChargeConj MyJ/psi MyJ/psi +# +Decay MyB_s0 + 1.000 MyJ/psi pi+ pi- PHSP; +Enddecay +# +CDecay Myanti-B_s0 +# +Decay MyJ/psi + 1.000 mu+ mu- PHOTOS VLL; +Enddecay +# +End From a468287f95d85211104435a4d853df290a50c1a6 Mon Sep 17 00:00:00 2001 From: Nick Date: Sun, 31 Jan 2016 20:33:00 +0100 Subject: [PATCH 214/250] move include statement --- DataFormats/METReco/interface/HcalHaloData.h | 1 - RecoMET/METAlgorithms/src/HcalHaloAlgo.cc | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/DataFormats/METReco/interface/HcalHaloData.h b/DataFormats/METReco/interface/HcalHaloData.h index fe7fc212ce97d..3cec018dd9d52 100644 --- a/DataFormats/METReco/interface/HcalHaloData.h +++ b/DataFormats/METReco/interface/HcalHaloData.h @@ -7,7 +7,6 @@ [date]: October 15, 2009 */ #include -#include #include "DataFormats/METReco/interface/PhiWedge.h" #include "DataFormats/DetId/interface/DetId.h" #include "DataFormats/CaloTowers/interface/CaloTowerDetId.h" diff --git a/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc b/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc index e10a39d38d7d8..efea2bd7ca639 100644 --- a/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc +++ b/RecoMET/METAlgorithms/src/HcalHaloAlgo.cc @@ -1,4 +1,5 @@ #include "RecoMET/METAlgorithms/interface/HcalHaloAlgo.h" +#include /* [class]: HcalHaloAlgo From 2fc6060e7d18fbd38dc37edee2ab602d8111fc7e Mon Sep 17 00:00:00 2001 From: Chiron Date: Mon, 1 Feb 2016 10:02:02 +0100 Subject: [PATCH 215/250] Update ElectronMcMiniAODSignalValidator.cc removing parenthesis on line 374 --- .../RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc index 3e630fd24ab94..738becda2f24a 100644 --- a/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc +++ b/Validation/RecoEgamma/plugins/ElectronMcMiniAODSignalValidator.cc @@ -371,7 +371,7 @@ void ElectronMcSignalValidatorMiniAOD::analyze(const edm::Event& iEvent, const e if (bestGsfElectron.isEE()) h1_ele_fbrem_mAOD_endcaps->Fill( bestGsfElectron.fbrem() ); // -- pflow over pT - double one_over_pt = 1. / bestGsfElectron.pt()); + double one_over_pt = 1. / bestGsfElectron.pt(); h1_ele_chargedHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumChargedHadronPt * one_over_pt ); h1_ele_neutralHadronRelativeIso_mAOD->Fill(bestGsfElectron.pfIsolationVariables().sumNeutralHadronEt * one_over_pt ); From b5c2dd18f24880d9420aa22a51ed761bedb98e94 Mon Sep 17 00:00:00 2001 From: Dinko Ferencek Date: Fri, 29 Jan 2016 18:56:59 +0100 Subject: [PATCH 216/250] switch to using std::unique_ptr --- .../AdaptiveVertexFinder/plugins/TemplatedVertexArbitrator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RecoVertex/AdaptiveVertexFinder/plugins/TemplatedVertexArbitrator.h b/RecoVertex/AdaptiveVertexFinder/plugins/TemplatedVertexArbitrator.h index cd7d7a11d74fc..32f36bedb153d 100644 --- a/RecoVertex/AdaptiveVertexFinder/plugins/TemplatedVertexArbitrator.h +++ b/RecoVertex/AdaptiveVertexFinder/plugins/TemplatedVertexArbitrator.h @@ -61,7 +61,7 @@ class TemplatedVertexArbitrator : public edm::stream::EDProducer<> { edm::EDGetTokenT token_secondaryVertex; edm::EDGetTokenT token_tracks; edm::EDGetTokenT token_beamSpot; - TrackVertexArbitration * theArbitrator; + std::unique_ptr > theArbitrator; }; @@ -73,7 +73,7 @@ TemplatedVertexArbitrator::TemplatedVertexArbitrator(const e token_beamSpot = consumes(params.getParameter("beamSpot")); token_tracks = consumes(params.getParameter("tracks")); produces(); - theArbitrator = new TrackVertexArbitration(params); + theArbitrator.reset( new TrackVertexArbitration(params) ); } template From d9a6d9b6e57e9a12850233d0d20d74901448f286 Mon Sep 17 00:00:00 2001 From: Dinko Ferencek Date: Mon, 1 Feb 2016 10:26:00 +0100 Subject: [PATCH 217/250] require at least two tracks with weight>0.5 --- .../AdaptiveVertexFinder/plugins/TemplatedVertexArbitrator.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RecoVertex/AdaptiveVertexFinder/plugins/TemplatedVertexArbitrator.h b/RecoVertex/AdaptiveVertexFinder/plugins/TemplatedVertexArbitrator.h index 32f36bedb153d..e17ac921e9b9b 100644 --- a/RecoVertex/AdaptiveVertexFinder/plugins/TemplatedVertexArbitrator.h +++ b/RecoVertex/AdaptiveVertexFinder/plugins/TemplatedVertexArbitrator.h @@ -45,6 +45,9 @@ //#define VTXDEBUG +const unsigned int nTracks(const reco::Vertex & sv) {return sv.nTracks();} +const unsigned int nTracks(const reco::VertexCompositePtrCandidate & sv) {return sv.numberOfSourceCandidatePtrs();} + template class TemplatedVertexArbitrator : public edm::stream::EDProducer<> { public: @@ -114,6 +117,7 @@ void TemplatedVertexArbitrator::produce(edm::Event &event, c theSecVertexColl); for(unsigned int ivtx=0; ivtx < theRecoVertices.size(); ivtx++){ + if ( !(nTracks(theRecoVertices[ivtx]) > 1) ) continue; recoVertices->push_back(theRecoVertices[ivtx]); } From 8c2964af7adad1816efc620ebbb6df239bf74012 Mon Sep 17 00:00:00 2001 From: Vincenzo Innocente Date: Mon, 1 Feb 2016 11:01:19 +0100 Subject: [PATCH 218/250] fast version with regression test --- CondFormats/EgammaObjects/interface/GBRTree.h | 56 ++++++++----------- 1 file changed, 24 insertions(+), 32 deletions(-) diff --git a/CondFormats/EgammaObjects/interface/GBRTree.h b/CondFormats/EgammaObjects/interface/GBRTree.h index 1841d14717880..74be9a656de48 100644 --- a/CondFormats/EgammaObjects/interface/GBRTree.h +++ b/CondFormats/EgammaObjects/interface/GBRTree.h @@ -79,42 +79,29 @@ //_______________________________________________________________________ inline double GBRTree::GetResponse(const float* vector) const { - - int index = 0; - - unsigned char cutindex = fCutIndices[0]; - float cutval = fCutVals[0]; - - while (true) { - - if (vector[cutindex] > cutval) { - index = fRightIndices[index]; - } - else { - index = fLeftIndices[index]; - } - - if (index>0) { - cutindex = fCutIndices[index]; - cutval = fCutVals[index]; - } - else { - return fResponses[-index]; - } - - } - - + return fResponses[TerminalIndex(vector)]; } +#include +#define VI_REGRESSION //_______________________________________________________________________ inline int GBRTree::TerminalIndex(const float* vector) const { - int index = 0; - + int index = 0; + do { + auto r = fRightIndices[index]; + auto l = fLeftIndices[index]; + index = vector[fCutIndices[index]] > fCutVals[index] ? r : l; + } while (index>0); + // return -index; + +#ifdef VI_REGRESSION +auto old = [&]()->int { + int index = 0; + unsigned char cutindex = fCutIndices[0]; float cutval = fCutVals[0]; - + while (true) { if (vector[cutindex] > cutval) { index = fRightIndices[index]; @@ -122,7 +109,7 @@ inline int GBRTree::TerminalIndex(const float* vector) const { else { index = fLeftIndices[index]; } - + if (index>0) { cutindex = fCutIndices[index]; cutval = fCutVals[index]; @@ -130,10 +117,15 @@ inline int GBRTree::TerminalIndex(const float* vector) const { else { return (-index); } - + } +}; +assert (old()==-index); +#endif + + return -index; } - + #endif From 5f9cf6a4e701f3e1553c76f60e52ba59c0fbaf1d Mon Sep 17 00:00:00 2001 From: mmusich Date: Mon, 1 Feb 2016 11:04:02 +0100 Subject: [PATCH 219/250] Updating e/gamma Mustache SuperCluster regressions for 80X --- Configuration/AlCa/python/autoCond.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Configuration/AlCa/python/autoCond.py b/Configuration/AlCa/python/autoCond.py index ced51c4675749..a0722c8d7c14b 100644 --- a/Configuration/AlCa/python/autoCond.py +++ b/Configuration/AlCa/python/autoCond.py @@ -10,19 +10,19 @@ # GlobalTag for MC production (p-Pb collisions) with realistic alignment and calibrations for Run1 'run1_mc_pa' : '80X_mcRun1_pA_v3', # GlobalTag for MC production with perfectly aligned and calibrated detector for Run2 - 'run2_design' : '80X_mcRun2_design_v2', + 'run2_design' : '80X_mcRun2_design_v4', # GlobalTag for MC production with pessimistic alignment and calibrations for Run2 - 'run2_mc_50ns' : '80X_mcRun2_startup_v2', + 'run2_mc_50ns' : '80X_mcRun2_startup_v4', #GlobalTag for MC production with optimistic alignment and calibrations for Run2 - 'run2_mc' : '80X_mcRun2_asymptotic_v2', + 'run2_mc' : '80X_mcRun2_asymptotic_v4', # GlobalTag for MC production (cosmics) with starup-like alignment and calibrations for Run2, Strip tracker in peak mode - 'run2_mc_cosmics' : '80X_mcRun2cosmics_startup_peak_v1', + 'run2_mc_cosmics' : '80X_mcRun2cosmics_startup_peak_v2', # GlobalTag for MC production (Heavy Ions collisions) with optimistic alignment and calibrations for Run2 - 'run2_mc_hi' : '80X_mcRun2_HeavyIon_v2', + 'run2_mc_hi' : '80X_mcRun2_HeavyIon_v3', # GlobalTag for Run1 data reprocessing - 'run1_data' : '80X_dataRun2_v3', + 'run1_data' : '80X_dataRun2_v4', # GlobalTag for Run2 data reprocessing - 'run2_data' : '80X_dataRun2_v3', + 'run2_data' : '80X_dataRun2_v4', # GlobalTag for Run1 HLT: it points to the online GT 'run1_hlt' : '80X_dataRun2_HLT_frozen_v2', # GlobalTag for Run2 HLT: it points to the online GT @@ -30,7 +30,7 @@ # GlobalTag for Run2 HLT for HI: it points to the online GT 'run2_hlt_hi' : '80X_dataRun2_HLTHI_frozen_v2', # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2017 - 'phase1_2017_design' : '80X_upgrade2017_design_v2', + 'phase1_2017_design' : '80X_upgrade2017_design_v3', # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase1 2019 'phase1_2019_design' : 'DES19_70_V2', # placeholder (GT not meant for standard RelVal) # GlobalTag for MC production with perfectly aligned and calibrated detector for Phase2 From 01cc6c30615932c621810167f55ace8f5bd06cfe Mon Sep 17 00:00:00 2001 From: Vincenzo Innocente Date: Mon, 1 Feb 2016 11:56:54 +0100 Subject: [PATCH 220/250] remove test code --- CondFormats/EgammaObjects/interface/GBRTree.h | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/CondFormats/EgammaObjects/interface/GBRTree.h b/CondFormats/EgammaObjects/interface/GBRTree.h index 74be9a656de48..b9dc7c7c1d2a7 100644 --- a/CondFormats/EgammaObjects/interface/GBRTree.h +++ b/CondFormats/EgammaObjects/interface/GBRTree.h @@ -82,50 +82,15 @@ inline double GBRTree::GetResponse(const float* vector) const { return fResponses[TerminalIndex(vector)]; } -#include -#define VI_REGRESSION //_______________________________________________________________________ inline int GBRTree::TerminalIndex(const float* vector) const { - - int index = 0; + int index = 0; do { auto r = fRightIndices[index]; auto l = fLeftIndices[index]; index = vector[fCutIndices[index]] > fCutVals[index] ? r : l; } while (index>0); - // return -index; - -#ifdef VI_REGRESSION -auto old = [&]()->int { - int index = 0; - - unsigned char cutindex = fCutIndices[0]; - float cutval = fCutVals[0]; - - while (true) { - if (vector[cutindex] > cutval) { - index = fRightIndices[index]; - } - else { - index = fLeftIndices[index]; - } - - if (index>0) { - cutindex = fCutIndices[index]; - cutval = fCutVals[index]; - } - else { - return (-index); - } - - } -}; - -assert (old()==-index); -#endif - return -index; - } #endif From 81c265d229151be4fbfeb299fa9562b0aea37f01 Mon Sep 17 00:00:00 2001 From: Mikhail Date: Mon, 1 Feb 2016 12:24:22 +0100 Subject: [PATCH 221/250] Clean LHEInterface 3 --- .../LHEInterface/interface/BranchingRatios.h | 32 -- .../LHEInterface/interface/Hadronisation.h | 89 ---- .../LHEInterface/interface/JetClustering.h | 75 ---- .../LHEInterface/interface/JetInput.h | 97 ----- .../LHEInterface/interface/JetMatching.h | 82 ---- .../LHEInterface/interface/JetMatchingMLM.h | 50 --- .../LHEInterface/plugins/LHEAnalyzer.cc | 275 ------------ .../LHEInterface/plugins/LHEProducer.cc | 306 ------------- .../LHEInterface/src/BranchingRatios.cc | 60 --- .../LHEInterface/src/Hadronisation.cc | 155 ------- .../LHEInterface/src/JetClustering.cc | 199 --------- .../LHEInterface/src/JetInput.cc | 411 ------------------ .../LHEInterface/src/JetMatching.cc | 66 --- .../LHEInterface/src/JetMatchingMLM.cc | 234 ---------- .../LHEInterface/src/Matching.h | 121 ------ .../LHEInterface/src/SimpleMatrix.h | 47 -- .../LHEInterface/test/analyze_cfg.py | 54 --- .../LHEInterface/test/plotMatchingAnalysis.C | 87 ---- 18 files changed, 2440 deletions(-) delete mode 100644 GeneratorInterface/LHEInterface/interface/BranchingRatios.h delete mode 100644 GeneratorInterface/LHEInterface/interface/Hadronisation.h delete mode 100644 GeneratorInterface/LHEInterface/interface/JetClustering.h delete mode 100644 GeneratorInterface/LHEInterface/interface/JetInput.h delete mode 100644 GeneratorInterface/LHEInterface/interface/JetMatching.h delete mode 100644 GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h delete mode 100644 GeneratorInterface/LHEInterface/plugins/LHEAnalyzer.cc delete mode 100644 GeneratorInterface/LHEInterface/plugins/LHEProducer.cc delete mode 100644 GeneratorInterface/LHEInterface/src/BranchingRatios.cc delete mode 100644 GeneratorInterface/LHEInterface/src/Hadronisation.cc delete mode 100644 GeneratorInterface/LHEInterface/src/JetClustering.cc delete mode 100644 GeneratorInterface/LHEInterface/src/JetInput.cc delete mode 100644 GeneratorInterface/LHEInterface/src/JetMatching.cc delete mode 100644 GeneratorInterface/LHEInterface/src/JetMatchingMLM.cc delete mode 100644 GeneratorInterface/LHEInterface/src/Matching.h delete mode 100644 GeneratorInterface/LHEInterface/src/SimpleMatrix.h delete mode 100755 GeneratorInterface/LHEInterface/test/analyze_cfg.py delete mode 100644 GeneratorInterface/LHEInterface/test/plotMatchingAnalysis.C diff --git a/GeneratorInterface/LHEInterface/interface/BranchingRatios.h b/GeneratorInterface/LHEInterface/interface/BranchingRatios.h deleted file mode 100644 index 04ce80758afca..0000000000000 --- a/GeneratorInterface/LHEInterface/interface/BranchingRatios.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef GeneratorInterface_LHEInterface_BranchingRatios_h -#define GeneratorInterface_LHEInterface_BranchingRatios_h - -#include - -#include - -namespace lhef { - -class LHEEvent; -class Hadronisation; - -class BranchingRatios { - public: - BranchingRatios() {} - ~BranchingRatios() {} - - void reset(); - - void set(int pdgId, bool both = true, double value = 1.0); - double getFactor(const Hadronisation *hadronisation, - const boost::shared_ptr &event) const; - - private: - double get(int pdgId, const Hadronisation *hadronisation) const; - - mutable std::map cache; -}; - -} // namespace lhef - -#endif // GeneratorCommon_LHEInterface_BranchingRatios_h diff --git a/GeneratorInterface/LHEInterface/interface/Hadronisation.h b/GeneratorInterface/LHEInterface/interface/Hadronisation.h deleted file mode 100644 index 351fc443af9af..0000000000000 --- a/GeneratorInterface/LHEInterface/interface/Hadronisation.h +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef GeneratorInterface_LHEInterface_Hadronisation_h -#define GeneratorInterface_LHEInterface_Hadronisation_h - -#include -#include -#include - -#include -#include - -#include "HepMC/GenEvent.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/PluginManager/interface/PluginFactory.h" - -namespace CLHEP { - class HepRandomEngine; -} - -namespace lhef { - -class LHEEvent; -class LHERunInfo; - -class Hadronisation { - public: - Hadronisation(const edm::ParameterSet ¶ms); - virtual ~Hadronisation(); - - void init(); - bool setEvent(const boost::shared_ptr &event); - void clear(); - - void setRandomEngine(CLHEP::HepRandomEngine* v) { doSetRandomEngine(v); } - - virtual void statistics() {} - virtual double totalBranchingRatio(int pdgId) const { return 1.0; } - - std::auto_ptr hadronize(); - - virtual std::set capabilities() const; - virtual void matchingCapabilities( - const std::set &capabilities); - - inline sigc::signal&>& - onShoweredEvent() { return sigShower; } - inline sigc::signal& onInit() { return sigInit; } - inline sigc::signal& onBeforeHadronisation() - { return sigBeforeHadronisation; } - - static std::auto_ptr create( - const edm::ParameterSet ¶ms); - - typedef edmplugin::PluginFactory Factory; - - protected: - inline bool wantsShoweredEvent() const - { return psRequested && !sigShower.empty(); } - inline bool wantsShoweredEventAsHepMC() const - { return psAsHepMC; } - - bool showeredEvent(const boost::shared_ptr &event); - - inline const boost::shared_ptr &getRawEvent() const - { return rawEvent; } - - virtual void doInit() = 0; - virtual std::auto_ptr doHadronisation() = 0; - virtual void newRunInfo(const boost::shared_ptr &runInfo); - - private: - - virtual void doSetRandomEngine(CLHEP::HepRandomEngine* v) { } - - sigc::signal&> sigShower; - sigc::signal sigInit; - sigc::signal sigBeforeHadronisation; - bool psRequested; - bool psAsHepMC; - boost::shared_ptr rawEvent; -}; - -} // namespace lhef - -#define DEFINE_LHE_HADRONISATION_PLUGIN(T) \ - DEFINE_EDM_PLUGIN(lhef::Hadronisation::Factory, T, #T) - -#endif // GeneratorRunInfo_LHEInterface_Hadronisation_h diff --git a/GeneratorInterface/LHEInterface/interface/JetClustering.h b/GeneratorInterface/LHEInterface/interface/JetClustering.h deleted file mode 100644 index ff87fac66aa2e..0000000000000 --- a/GeneratorInterface/LHEInterface/interface/JetClustering.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef GeneratorInterface_LHEInterface_JetClustering_h -#define GeneratorInterface_LHEInterface_JetClustering_h - -#include -#include - -#include "Math/GenVector/PxPyPzE4D.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -#include "GeneratorInterface/LHEInterface/interface/JetInput.h" - -namespace lhef { - -class JetClustering { - public: - typedef JetInput::ParticleVector ParticleVector; - typedef ROOT::Math::PxPyPzE4D FourVector; - - class Jet { - public: - Jet() {} - Jet(const FourVector &p4) : p4_(p4) {} - Jet(const FourVector &p4, const ParticleVector &constituents) : - p4_(p4), constituents_(constituents) {} - Jet(double px, double py, double pz, double e) : - p4_(px, py, pz, e) {} - Jet(double px, double py, double pz, double e, - const ParticleVector &constituents) : - p4_(px, py, pz, e), constituents_(constituents) {} - Jet(ParticleVector::value_type item) : - p4_(item->momentum().px(), item->momentum().py(), - item->momentum().pz(), item->momentum().e()), - constituents_(1) { constituents_[0] = item; } - - const FourVector &p4() const { return p4_; } - const ParticleVector &constituents() const { return constituents_; } - - double px() const { return p4_.Px(); } - double py() const { return p4_.Py(); } - double pz() const { return p4_.Pz(); } - double e() const { return p4_.E(); } - - double momentum() const { return p4_.P(); } - double pt() const { return p4_.Perp(); } - double et() const { return p4_.Et(); } - double theta() const { return p4_.Theta(); } - double eta() const { return p4_.Eta(); } - double phi() const { return p4_.Phi(); } - double m() const { return p4_.M(); } - - private: - FourVector p4_; - ParticleVector constituents_; - }; - - JetClustering(const edm::ParameterSet ¶ms); - JetClustering(const edm::ParameterSet ¶ms, double jetPtMin); - ~JetClustering(); - - std::vector operator () (const ParticleVector &input) const; - - double getJetPtMin() const; - - class Algorithm; - - private: - void init(const edm::ParameterSet ¶ms, double jetPtMin); - - std::auto_ptr jetAlgo; -}; - -} // namespace lhef - -#endif // GeneratorCommon_LHEInterface_JetClustering_h diff --git a/GeneratorInterface/LHEInterface/interface/JetInput.h b/GeneratorInterface/LHEInterface/interface/JetInput.h deleted file mode 100644 index 08042c16d2e40..0000000000000 --- a/GeneratorInterface/LHEInterface/interface/JetInput.h +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef GeneratorInterface_LHEInterface_JetInput_h -#define GeneratorInterface_LHEInterface_JetInput_h - -#include - -#include "HepMC/GenEvent.h" -#include "HepMC/GenParticle.h" -#include "HepMC/GenVertex.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -namespace lhef { - -class JetInput { - public: - typedef std::vector ParticleBitmap; - typedef std::vector ParticleVector; - typedef std::vector VertexVector; - - JetInput(); - JetInput(const edm::ParameterSet ¶ms); - ~JetInput(); - - ParticleVector operator () (const HepMC::GenEvent *event) const; - - bool getPartonicFinalState() const { return partonicFinalState; } - bool getHardProcessOnly() const { return onlyHardProcess; } - bool getTausAndJets() const { return tausAsJets; } - bool getExcludeResonances() const { return excludeResonances; } - double getPtMin() const { return ptMin; } - const std::vector &getIgnoredParticles() const - { return ignoreParticleIDs; } - const std::vector &getExcludedResonances() const - { return excludedResonances; } - const std::vector &getExcludedFromResonances() const - { return excludedFromResonances; } - - void setPartonicFinalState(bool flag = true) - { partonicFinalState = flag; } - void setHardProcessOnly(bool flag = true) - { onlyHardProcess = flag; } - void setTausAsJets(bool flag = true) { tausAsJets = flag; } - void setExcludeResonances(bool flag = true) { excludeResonances = flag; } - void setPtMin(double ptMin) { this->ptMin = ptMin; } - void setIgnoredParticles(const std::vector &particleIDs); - void setExcludedResonances(const std::vector &particleIds); - void setExcludedFromResonances(const std::vector &particleIds); - - bool isParton(int pdgId) const; - static bool isHadron(int pdgId); - bool isResonance(int pdgId) const; - bool isExcludedFromResonances(int pdgId) const; - bool isHardProcess(const HepMC::GenVertex *vertex, - const VertexVector &hardProcess) const; - bool isIgnored(int pdgId) const; - - enum ResonanceState { - kNo = 0, - kDirect, - kIndirect - }; - - bool hasPartonChildren(ParticleBitmap &invalid, - const ParticleVector &p, - const HepMC::GenParticle *particle) const; - bool fromHardProcess(ParticleBitmap &invalid, - const ParticleVector &p, - const HepMC::GenParticle *particle, - const VertexVector &hardProcess) const; - bool fromSignalVertex(ParticleBitmap &invalid, - const ParticleVector &p, - const HepMC::GenParticle *particle, - const HepMC::GenVertex *signalVertex) const; - ResonanceState fromResonance(ParticleBitmap &invalid, - const ParticleVector &p, - const HepMC::GenParticle *particle, - const HepMC::GenVertex *signalVertex, - const VertexVector &hardProcess) const; - - private: - int testPartonChildren(ParticleBitmap &invalid, - const ParticleVector &p, - const HepMC::GenVertex *v) const; - - std::vector ignoreParticleIDs; - std::vector excludedResonances; - std::vector excludedFromResonances; - bool partonicFinalState; - bool onlyHardProcess; - bool excludeResonances; - bool tausAsJets; - double ptMin; -}; - -} // namespace lhef - -#endif // GeneratorCommon_LHEInterface_JetInput_h diff --git a/GeneratorInterface/LHEInterface/interface/JetMatching.h b/GeneratorInterface/LHEInterface/interface/JetMatching.h deleted file mode 100644 index edc05fe2ab28e..0000000000000 --- a/GeneratorInterface/LHEInterface/interface/JetMatching.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef GeneratorInterface_LHEInterface_JetMatching_h -#define GeneratorInterface_LHEInterface_JetMatching_h - -#include -#include -#include -#include - -#include - -#include "HepMC/GenEvent.h" -#include "HepMC/SimpleVector.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/PluginManager/interface/PluginFactory.h" - -namespace lhef { - -class LHERunInfo; -class LHEEvent; -class JetInput; -class JetClustering; - -class JetMatching { - public: - JetMatching(const edm::ParameterSet ¶ms); - virtual ~JetMatching(); - - struct JetPartonMatch { - JetPartonMatch(const HepMC::FourVector &parton, - const HepMC::FourVector &jet, - double delta, - int pdgId) : - parton(parton), jet(jet), - delta(delta), pdgId(pdgId) {} - - JetPartonMatch(const HepMC::FourVector &parton, - int pdgId) : - parton(parton), delta(-1.0), pdgId(pdgId) {} - - JetPartonMatch(const HepMC::FourVector &jet) : - jet(jet), delta(-1.0), pdgId(0) {} - - inline bool isMatch() const { return delta >= 0 && pdgId; } - inline bool hasParton() const { return pdgId; } - inline bool hasJet() const { return delta >= 0 || !pdgId; } - - HepMC::FourVector parton; - HepMC::FourVector jet; - double delta; - int pdgId; - }; - - virtual void init(const boost::shared_ptr &runInfo); - virtual void beforeHadronisation( - const boost::shared_ptr &event); - - virtual double match(const HepMC::GenEvent *partonLevel, - const HepMC::GenEvent *finalState, - bool showeredFinalState = false) = 0; - - virtual std::set capabilities() const; - - const std::vector &getMatchSummary() const - { return matchSummary; } - - static std::auto_ptr create( - const edm::ParameterSet ¶ms); - - typedef edmplugin::PluginFactory Factory; - - protected: - std::vector matchSummary; -}; - -} // namespace lhef - -#define DEFINE_LHE_JETMATCHING_PLUGIN(T) \ - DEFINE_EDM_PLUGIN(lhef::JetMatching::Factory, T, #T) - -#endif // GeneratorCommon_LHEInterface_JetMatching_h diff --git a/GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h b/GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h deleted file mode 100644 index 5fbd6a096e3fa..0000000000000 --- a/GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef GeneratorInterface_LHEInterface_JetMatchingMLM_h -#define GeneratorInterface_LHEInterface_JetMatchingMLM_h - -#include -#include - -#include "HepMC/GenEvent.h" -#include "HepMC/SimpleVector.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" - -#include "GeneratorInterface/LHEInterface/interface/JetMatching.h" - -namespace lhef { - -class JetInput; -class JetClustering; - -class JetMatchingMLM : public JetMatching { - public: - JetMatchingMLM(const edm::ParameterSet ¶ms); - ~JetMatchingMLM(); - - private: - std::set capabilities() const; - - double match(const HepMC::GenEvent *partonLevel, - const HepMC::GenEvent *finalState, - bool showeredFinalState); - - enum MatchMode { - kExclusive = 0, - kInclusive - }; - - const double maxDeltaR; - const double minJetPt; - double maxEta; - double matchPtFraction; - bool useEt; - MatchMode matchMode; - - std::auto_ptr partonInput; - std::auto_ptr jetInput; - std::auto_ptr jetClustering; -}; - -} // namespace lhef - -#endif // GeneratorCommon_LHEInterface_JetMatchingMLM_h diff --git a/GeneratorInterface/LHEInterface/plugins/LHEAnalyzer.cc b/GeneratorInterface/LHEInterface/plugins/LHEAnalyzer.cc deleted file mode 100644 index 085466cdf9c19..0000000000000 --- a/GeneratorInterface/LHEInterface/plugins/LHEAnalyzer.cc +++ /dev/null @@ -1,275 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "TH1.h" - -#include "HepMC/GenEvent.h" -#include "HepMC/SimpleVector.h" - -#include "FWCore/Framework/interface/EDAnalyzer.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/InputTag.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/ServiceRegistry/interface/Service.h" - -#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" - -#include "CommonTools/UtilAlgos/interface/TFileService.h" - -#include "GeneratorInterface/LHEInterface/interface/JetInput.h" -#include "GeneratorInterface/LHEInterface/interface/JetClustering.h" -#include "GeneratorInterface/LHEInterface/interface/LHEEvent.h" - -using namespace lhef; - -class LHEAnalyzer : public edm::EDAnalyzer { - public: - explicit LHEAnalyzer(const edm::ParameterSet ¶ms); - virtual ~LHEAnalyzer(); - - protected: - virtual void analyze(const edm::Event &event, - const edm::EventSetup &es) override; - - - private: - void fillDJRSched(unsigned int min, unsigned int max); - - edm::InputTag sourceLabel; - JetInput jetInput; - - double defaultDeltaCut; - double defaultPtCut; - double maxEta; - bool useEt; - double ptFraction; - - unsigned int binsDelta; - double minDelta; - double maxDelta; - unsigned int binsPt; - double minPt; - double maxPt; - unsigned int minDJR; - unsigned int maxDJR; - - boost::ptr_vector deltaClustering; - std::auto_ptr ptClustering; - std::vector djrSched; - - std::vector histoDelta; - std::vector histoPt; -}; - -LHEAnalyzer::LHEAnalyzer(const edm::ParameterSet ¶ms) : - sourceLabel(params.getParameter("src")), - jetInput(params.getParameter("jetInput")), - defaultDeltaCut(params.getParameter("defaultDeltaCut")), - defaultPtCut(params.getParameter("defaultPtCut")), - maxEta(params.getParameter("maxEta")), - useEt(params.getParameter("useEt")), - ptFraction(params.getUntrackedParameter("ptFraction", 0.75)), - binsDelta(params.getParameter("binsDelta")), - minDelta(params.getParameter("minDelta")), - maxDelta(params.getParameter("maxDelta")), - binsPt(params.getParameter("binsPt")), - minPt(params.getParameter("minPt")), - maxPt(params.getParameter("maxPt")), - minDJR(params.getParameter("minDJR")), - maxDJR(params.getParameter("maxDJR")) -{ - edm::ParameterSet jetClusPSet = - params.getParameter("jetClustering"); - - for(unsigned int i = 0; i <= binsDelta; i++) { - double deltaCut = - minDelta + (maxDelta - minDelta) * i / binsDelta; - jetClusPSet.addParameter("coneRadius", deltaCut); - edm::ParameterSet tmp; - tmp.addParameter("algorithm", jetClusPSet); - deltaClustering.push_back( - new JetClustering(tmp, defaultPtCut * ptFraction)); - } - - jetClusPSet.addParameter("coneRadius", defaultDeltaCut); - edm::ParameterSet tmp; - tmp.addParameter("algorithm", jetClusPSet); - ptClustering.reset(new JetClustering(tmp, minPt * ptFraction)); - - fillDJRSched(minDJR <= 0 ? 1 : minDJR, maxDJR - 1); - - edm::Service fs; - for(unsigned int i = minDJR; i < maxDJR; i++) { - std::ostringstream ss, ss2; - ss << (i + 1) << "#rightarrow" << i << " jets"; - ss2 << i; - TH1 *h = fs->make(("delta" + ss2.str()).c_str(), - ("DJR " + ss.str()).c_str(), - binsDelta, minDelta, maxDelta); - h->SetXTitle("p_{T} [GeV/c^2]"); - h->SetYTitle("#delta#sigma [mb]"); - - if (i == 0) { - h->Delete(); - h = 0; - } - histoDelta.push_back(h); - - std::string what = useEt ? "E" : "p"; - h = fs->make(("pt" + ss2.str()).c_str(), - ("DJR " + ss.str()).c_str(), binsPt, - std::log10(minPt), std::log10(maxPt)); - h->SetXTitle(("log_{10}(" + what + - "_{T} [GeV/c^{2}])").c_str()); - h->SetYTitle("#delta#sigma [mb]"); - - histoPt.push_back(h); - } -} - -LHEAnalyzer::~LHEAnalyzer() -{ -} - -void LHEAnalyzer::fillDJRSched(unsigned int min, unsigned int max) -{ - unsigned int middle = (min + max) / 2; - - djrSched.push_back(middle); - - if (min < middle) - fillDJRSched(min, middle - 1); - if (middle < max) - fillDJRSched(middle + 1, max); -} - -void LHEAnalyzer::analyze(const edm::Event &event, const edm::EventSetup &es) -{ - using boost::bind; - typedef JetClustering::Jet Jet; - - edm::Handle hepmc; - event.getByLabel(sourceLabel, hepmc); - - std::auto_ptr clonedEvent; - const HepMC::GenEvent *genEvent = hepmc->GetEvent(); - if (!genEvent->signal_process_vertex()) { - clonedEvent.reset(new HepMC::GenEvent(*genEvent)); - const HepMC::GenVertex *signalVertex = - LHEEvent::findSignalVertex(clonedEvent.get()); - clonedEvent->set_signal_process_vertex( - const_cast(signalVertex)); - genEvent = clonedEvent.get(); - } - - JetInput::ParticleVector particles = jetInput(genEvent); - - std::vector ptJets = (*ptClustering)(particles); - std::sort(ptJets.begin(), ptJets.end(), - bind(std::greater(), - bind(useEt ? &Jet::et : &Jet::pt, _1), - bind(useEt ? &Jet::et : &Jet::pt, _2))); - - typedef std::pair Pair; - std::vector deltaJets(maxDJR - minDJR + 1, - Pair(-1, binsDelta + 1)); - - for(std::vector::const_iterator djr = djrSched.begin(); - djr != djrSched.end(); ++djr) { -//std::cout << "DJR schedule " << (*djr + 1) << " -> " << *djr << std::endl; - int result = -1; - for(;;) { -//for(int i = minDJR; i <= maxDJR; i++) -//std::cout << "+++ " << i << ": (" << deltaJets[i - minDJR].first << ", " << deltaJets[i - minDJR].second << ")" << std::endl; - int upper = binsDelta + 1; - for(int i = *djr; i >= (int)minDJR; i--) { - if (deltaJets[i - minDJR].second <= - (int)binsDelta) { - upper = deltaJets[i - minDJR].second; - break; - } - } - int lower = -1; - for(int i = *djr + 1; i <= (int)maxDJR; i++) { - if (deltaJets[i - minDJR].first >= 0) { - lower = deltaJets[i - minDJR].first; - break; - } - } -//std::cout << "\t" << lower << " < " << upper << std::endl; - - result = (lower + upper + 2) / 2 - 1; - if (result == lower) - break; - else if (result < lower) { - result = -1; - break; - } - - std::vector jets = - deltaClustering[result](particles); - unsigned int nJets = 0; - for(std::vector::const_iterator iter = - jets.begin(); iter != jets.end(); ++iter) - if ((useEt ? iter->et() : iter->pt()) - > defaultPtCut) - nJets++; - -//std::cout << "\t---(" << *djr << ")--> bin " << result << ": " << nJets << " jets" << std::endl; - - if (nJets < minDJR) - nJets = minDJR; - else if (nJets > maxDJR) - nJets = maxDJR; - - for(int j = nJets; j >= (int)minDJR; j--) { - if (deltaJets[j - minDJR].first < 0 || - result > deltaJets[j - minDJR].first) - deltaJets[j - minDJR].first = result; - } - for(int j = nJets; j <= (int)maxDJR; j++) { - if (deltaJets[j - minDJR].second < - (int)binsDelta || - result < deltaJets[j - minDJR].second) - deltaJets[j - minDJR].second = result; - } - } - -//std::cout << "final " << *djr << ": " << result << std::endl; - TH1 *h = histoDelta[*djr - minDJR]; - h->Fill(h->GetBinCenter(result + 1)); - - h = histoPt[*djr - minDJR]; - if (*djr >= ptJets.size()) - h->Fill(-999.0); - else if (useEt) - h->Fill(std::log10(ptJets[*djr].et())); - else - h->Fill(std::log10(ptJets[*djr].pt())); - } - - if (minDJR <= 0) { - TH1 *h = histoPt[0]; - if (minDJR >= ptJets.size()) - h->Fill(-999.0); - else if (useEt) - h->Fill(std::log10(ptJets[minDJR].et())); - else - h->Fill(std::log10(ptJets[minDJR].pt())); - } -} - -DEFINE_FWK_MODULE(LHEAnalyzer); diff --git a/GeneratorInterface/LHEInterface/plugins/LHEProducer.cc b/GeneratorInterface/LHEInterface/plugins/LHEProducer.cc deleted file mode 100644 index 922d3e29e7291..0000000000000 --- a/GeneratorInterface/LHEInterface/plugins/LHEProducer.cc +++ /dev/null @@ -1,306 +0,0 @@ -#include -#include - -#include -#include - -#include "HepMC/GenEvent.h" -#include "HepMC/SimpleVector.h" - -#include "FWCore/Framework/interface/one/EDFilter.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/Run.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/ServiceRegistry/interface/RandomEngineSentry.h" - -#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" -#include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" -#include "SimDataFormats/GeneratorProducts/interface/GenRunInfoProduct.h" - -#include "SimDataFormats/GeneratorProducts/interface/LHERunInfoProduct.h" -#include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h" - -#include "GeneratorInterface/LHEInterface/interface/LHERunInfo.h" -#include "GeneratorInterface/LHEInterface/interface/LHEEvent.h" -#include "GeneratorInterface/LHEInterface/interface/Hadronisation.h" -#include "GeneratorInterface/LHEInterface/interface/JetMatching.h" -#include "GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h" -#include "GeneratorInterface/LHEInterface/interface/BranchingRatios.h" - -using namespace lhef; - -class LHEProducer : public edm::one::EDFilter { - public: - explicit LHEProducer(const edm::ParameterSet ¶ms); - virtual ~LHEProducer(); - - protected: - virtual void beginJob() override; - virtual void endJob() override; - virtual void beginRun(edm::Run const& run, const edm::EventSetup &es) override; - virtual void endRun(edm::Run const&run, const edm::EventSetup &es) override; - virtual void endRunProduce(edm::Run &run, const edm::EventSetup &es) override; - virtual bool filter(edm::Event &event, const edm::EventSetup &es) override; - - private: - double matching(const HepMC::GenEvent *event, bool shower) const; - - bool showeredEvent(const boost::shared_ptr &event); - void onInit(); - void onBeforeHadronisation(); - - unsigned int eventsToPrint; - std::vector removeResonances; - std::auto_ptr hadronisation; - std::auto_ptr jetMatching; - - double extCrossSect; - double extFilterEff; - bool matchSummary; - - boost::shared_ptr partonLevel; - boost::shared_ptr runInfo; - unsigned int index; - bool matchingDone; - double weight; - BranchingRatios branchingRatios; -}; - -LHEProducer::LHEProducer(const edm::ParameterSet ¶ms) : - eventsToPrint(params.getUntrackedParameter("eventsToPrint", 0)), - extCrossSect(params.getUntrackedParameter("crossSection", -1.0)), - extFilterEff(params.getUntrackedParameter("filterEfficiency", -1.0)), - matchSummary(false) -{ - hadronisation = Hadronisation::create( - params.getParameter("hadronisation")); - - if (params.exists("removeResonances")) - removeResonances = - params.getParameter >( - "removeResonances"); - - std::set matchingCapabilities; - if (params.exists("jetMatching")) { - edm::ParameterSet jetParams = - params.getUntrackedParameter( - "jetMatching"); - jetMatching = JetMatching::create(jetParams); - - matchingCapabilities = jetMatching->capabilities(); - hadronisation->matchingCapabilities(matchingCapabilities); - } - - produces("unsmeared"); - produces(); - produces(); - - if (jetMatching.get()) { - if (params.getUntrackedParameter( - "preferShowerVetoCallback", true)) - hadronisation->onShoweredEvent().connect( - sigc::mem_fun(*this, - &LHEProducer::showeredEvent)); - hadronisation->onInit().connect( - sigc::mem_fun(*this, &LHEProducer::onInit)); - hadronisation->onBeforeHadronisation().connect( - sigc::mem_fun(*this, - &LHEProducer::onBeforeHadronisation)); - - matchSummary = matchingCapabilities.count("matchSummary"); - if (matchSummary) { - produces< std::vector >("matchDeltaR"); - produces< std::vector >("matchDeltaPRel"); - } - } - - // force total branching ratio for QCD/QED to 1 - for(int i = 0; i < 6; i++) - branchingRatios.set(i); - for(int i = 9; i < 23; i++) - branchingRatios.set(i); -} - -LHEProducer::~LHEProducer() -{ -} - -void LHEProducer::beginJob() -{ - hadronisation->init(); -} - -void LHEProducer::endJob() -{ - hadronisation.reset(); - jetMatching.reset(); -} - -void LHEProducer::beginRun(edm::Run const& run, const edm::EventSetup &es) -{ - edm::Handle product; - run.getByLabel("source", product); - - runInfo.reset(new LHERunInfo(*product)); - index = 0; -} -void LHEProducer::endRun(edm::Run const& run, const edm::EventSetup &es) -{ -} - -void LHEProducer::endRunProduce(edm::Run &run, const edm::EventSetup &es) -{ - hadronisation->statistics(); - - LHERunInfo::XSec crossSection; - if (runInfo) { - crossSection = runInfo->xsec(); - runInfo->statistics(); - } - - std::auto_ptr runInfo(new GenRunInfoProduct); - - runInfo->setInternalXSec( - GenRunInfoProduct::XSec(crossSection.value(), - crossSection.error())); - runInfo->setExternalXSecLO(extCrossSect); - runInfo->setFilterEfficiency(extFilterEff); - - run.put(runInfo); - - runInfo.reset(); -} - -bool LHEProducer::filter(edm::Event &event, const edm::EventSetup &es) -{ - edm::RandomEngineSentry randomEngineSentry(hadronisation.get(), event.streamID()); - - std::auto_ptr result(new edm::HepMCProduct); - - edm::Handle product; - event.getByLabel("source", product); - - partonLevel.reset(new LHEEvent(runInfo, *product)); - if (!removeResonances.empty()) - partonLevel->removeResonances(removeResonances); - - if (product->pdf()) - partonLevel->setPDF( - std::auto_ptr( - new LHEEvent::PDF(*product->pdf()))); - - hadronisation->setEvent(partonLevel); - - double br = branchingRatios.getFactor(hadronisation.get(), - partonLevel); - - matchingDone = false; - weight = 1.0; - std::auto_ptr hadronLevel(hadronisation->hadronize()); - - if (!hadronLevel.get()) { - if (matchingDone) { - if (weight == 0.0) - partonLevel->count(LHERunInfo::kSelected, br); - else - partonLevel->count(LHERunInfo::kKilled, - br, weight); - } else - partonLevel->count(LHERunInfo::kTried, br); - } - - if (!matchingDone && jetMatching.get() && hadronLevel.get()) - weight = matching(hadronLevel.get(), false); - - if (weight == 0.0) { - edm::LogInfo("Generator|LHEInterface") - << "Event got rejected by the " - "jet matching." << std::endl; - - if (hadronLevel.get()) { - partonLevel->count(LHERunInfo::kSelected); - hadronLevel.reset(); - } - } - - if (!hadronLevel.get()) { - event.put(result, "unsmeared"); - std::auto_ptr info( - new GenEventInfoProduct); - event.put(info); - return false; - } - - partonLevel->count(LHERunInfo::kAccepted, br, weight); - - hadronLevel->set_event_number(++index); - - if (eventsToPrint) { - eventsToPrint--; - hadronLevel->print(); - } - - std::auto_ptr info( - new GenEventInfoProduct(hadronLevel.get())); - result->addHepMCData(hadronLevel.release()); - event.put(result, "unsmeared"); - event.put(info); - - if (jetMatching.get() && matchSummary) { - std::auto_ptr< std::vector > matchDeltaR( - new std::vector); - std::auto_ptr< std::vector > matchDeltaPRel( - new std::vector); - - typedef std::vector Matches; - Matches matches = jetMatching->getMatchSummary(); - - for(Matches::const_iterator iter = matches.begin(); - iter != matches.end(); ++iter) { - if (!iter->isMatch()) - continue; - - matchDeltaR->push_back(iter->delta); - matchDeltaPRel->push_back(iter->jet.rho() / - iter->parton.rho() - 1.0); - } - - event.put(matchDeltaR, "matchDeltaR"); - event.put(matchDeltaPRel, "matchDeltaPRel"); - } - - return true; -} - -double LHEProducer::matching(const HepMC::GenEvent *event, bool shower) const -{ - if (!jetMatching.get()) - return 1.0; - - return jetMatching->match(partonLevel->asHepMCEvent().get(), - event, shower); -} - -bool LHEProducer::showeredEvent(const boost::shared_ptr &event) -{ - weight = matching(event.get(), true); - matchingDone = true; - return weight == 0.0; -} - -void LHEProducer::onInit() -{ - jetMatching->init(runInfo); -} - -void LHEProducer::onBeforeHadronisation() -{ - jetMatching->beforeHadronisation(partonLevel); -} - -DEFINE_FWK_MODULE(LHEProducer); - -DEFINE_LHE_JETMATCHING_PLUGIN(JetMatchingMLM); diff --git a/GeneratorInterface/LHEInterface/src/BranchingRatios.cc b/GeneratorInterface/LHEInterface/src/BranchingRatios.cc deleted file mode 100644 index 0544ed0ed9e49..0000000000000 --- a/GeneratorInterface/LHEInterface/src/BranchingRatios.cc +++ /dev/null @@ -1,60 +0,0 @@ -#include - -#include - -#include "FWCore/MessageLogger/interface/MessageLogger.h" - -#include "GeneratorInterface/LHEInterface/interface/LHEEvent.h" -#include "GeneratorInterface/LHEInterface/interface/Hadronisation.h" -#include "GeneratorInterface/LHEInterface/interface/BranchingRatios.h" - -namespace lhef { - -void BranchingRatios::reset() -{ - cache.clear(); -} - -void BranchingRatios::set(int pdgId, bool both, double value) -{ - cache[pdgId] = value; - if (both) - cache[-pdgId] = value; -} - -double BranchingRatios::getFactor( - const Hadronisation *hadronisation, - const boost::shared_ptr &event) const -{ - double factor = 1.0; - const HEPEUP *hepeup = event->getHEPEUP(); - for(int i = 0; i < hepeup->NUP; i++) { - if (hepeup->ISTUP[i] == 1) - factor *= get(hepeup->IDUP[i], hadronisation); - } - return factor; -} - -double BranchingRatios::get(int pdgId, - const Hadronisation *hadronisation) const -{ - std::map::const_iterator pos = cache.find(pdgId); - if (pos == cache.end()) { - double val = hadronisation->totalBranchingRatio(pdgId); - if (val <= 0.0) - val = 1.0; - if (val < 0.99) - edm::LogInfo("Generator|LHEInterface") - << "Particle with pdgId " << pdgId - << " only partly decayed in hadronizer, " - "reducing respective event cross-section " - "contribution with a factor of " - << val << "." << std::endl; - - cache.insert(std::make_pair(pdgId, val)); - return val; - } else - return pos->second; -} - -} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/Hadronisation.cc b/GeneratorInterface/LHEInterface/src/Hadronisation.cc deleted file mode 100644 index 89e1ba017c70d..0000000000000 --- a/GeneratorInterface/LHEInterface/src/Hadronisation.cc +++ /dev/null @@ -1,155 +0,0 @@ -#include -#include - -#include - -#include "HepMC/GenEvent.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/PluginFactory.h" - -#include "GeneratorInterface/LHEInterface/interface/LHEEvent.h" -#include "GeneratorInterface/LHEInterface/interface/LHERunInfo.h" -#include "GeneratorInterface/LHEInterface/interface/Hadronisation.h" - -EDM_REGISTER_PLUGINFACTORY(lhef::Hadronisation::Factory, - "GeneratorInterfaceLHEHadronisation"); - -namespace { - class NoHadronisation : public lhef::Hadronisation { - public: - NoHadronisation(const edm::ParameterSet ¶ms) : - Hadronisation(params) {} - ~NoHadronisation() {} - - private: - void doInit() override {} - std::auto_ptr doHadronisation() override - { return getRawEvent()->asHepMCEvent(); } -}; - -} // anonymous namespae - -namespace lhef { - -Hadronisation::Hadronisation(const edm::ParameterSet ¶ms) : - psRequested(false), - psAsHepMC(true) -{ -} - -Hadronisation::~Hadronisation() -{ -} - -void Hadronisation::init() -{ - doInit(); -} - -bool Hadronisation::setEvent(const boost::shared_ptr &event) -{ - bool newRunInfo = !rawEvent || - (rawEvent->getRunInfo() != event->getRunInfo() && - *rawEvent->getRunInfo() != *event->getRunInfo()); - rawEvent = event; - if (newRunInfo) { - this->newRunInfo(event->getRunInfo()); - return true; - } else - return false; -} - -void Hadronisation::clear() -{ -} - -std::set Hadronisation::capabilities() const -{ - return std::set(); -} - -void Hadronisation::matchingCapabilities( - const std::set &capabilities) -{ - psRequested = false; - psAsHepMC = false; - for(std::set::const_iterator iter = capabilities.begin(); - iter != capabilities.end(); ++iter) { - if (*iter == "hepmc") - psAsHepMC = true; - else if (*iter == "psFinalState") - psRequested = true; - else if (*iter == "matchSummary") - /* nothing */; - else if (!this->capabilities().count(*iter)) - throw cms::Exception("Generator|LHEInterface") - << "JetMatching expected capability \"" - << *iter << "\", but hadronizer does not " - "support it." << std::endl; - } -} - -std::auto_ptr Hadronisation::create( - const edm::ParameterSet ¶ms) -{ - std::string name = params.getParameter("generator"); - - if (name == "None") - return std::auto_ptr( - new NoHadronisation(params)); - - std::auto_ptr plugin( - Factory::get()->create(name + "Hadronisation", params)); - - if (!plugin.get()) - throw cms::Exception("InvalidGenerator") - << "Unknown MC generator \"" << name << "\"" - " specified for hadronisation in LHEProducer." - << std::endl; - - edm::LogInfo("Generator|LHEInterface") - << "Using " << name << " to hadronize LHE input." << std::endl; - - return plugin; -} - -std::auto_ptr Hadronisation::hadronize() -{ - std::auto_ptr event = this->doHadronisation(); - if (!event.get()) - return event; - - const HepMC::GenVertex *signalVertex = event->signal_process_vertex(); - if (!signalVertex) { - signalVertex = LHEEvent::findSignalVertex(event.get()); - event->set_signal_process_vertex( - const_cast(signalVertex)); - } - - return event; -} - -void Hadronisation::newRunInfo(const boost::shared_ptr &runInfo) -{ -} - -bool Hadronisation::showeredEvent( - const boost::shared_ptr &event) -{ - if (event.get()) { - const HepMC::GenVertex *signalVertex = - event->signal_process_vertex(); - if (!signalVertex) { - signalVertex = LHEEvent::findSignalVertex(event.get(), false); - event->set_signal_process_vertex( - const_cast(signalVertex)); - } - } - - return sigShower.emit(event); -} - -} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/JetClustering.cc b/GeneratorInterface/LHEInterface/src/JetClustering.cc deleted file mode 100644 index 3cc2dc50a068e..0000000000000 --- a/GeneratorInterface/LHEInterface/src/JetClustering.cc +++ /dev/null @@ -1,199 +0,0 @@ -#include -#include - -#include -#include -#include -#include - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/Exception.h" - -#include "GeneratorInterface/LHEInterface/interface/JetInput.h" -#include "GeneratorInterface/LHEInterface/interface/JetClustering.h" - -namespace lhef { - -class JetClustering::Algorithm { - public: - typedef JetClustering::Jet Jet; - typedef JetClustering::ParticleVector ParticleVector; - - Algorithm(const edm::ParameterSet ¶ms, double jetPtMin) : - jetPtMin(jetPtMin) {} - virtual ~Algorithm() {} - - virtual std::vector operator () ( - const ParticleVector &input) const = 0; - - double getJetPtMin() const { return jetPtMin; } - - private: - double jetPtMin; -}; - -namespace { - class FastJetAlgorithmWrapper : public JetClustering::Algorithm { - public: - FastJetAlgorithmWrapper(const edm::ParameterSet ¶ms, - double jetPtMin); - ~FastJetAlgorithmWrapper() {} - - protected: - std::vector operator () ( - const ParticleVector &input) const override; - - std::auto_ptr plugin; - std::auto_ptr jetDefinition; - }; - - class KtAlgorithm : public FastJetAlgorithmWrapper { - public: - KtAlgorithm(const edm::ParameterSet ¶ms, - double jetPtMin); - ~KtAlgorithm() {} - }; - - class SISConeAlgorithm : public FastJetAlgorithmWrapper { - public: - SISConeAlgorithm(const edm::ParameterSet ¶ms, - double jetPtMin); - ~SISConeAlgorithm() {} - - private: - static fastjet::SISConePlugin::SplitMergeScale - getScale(const std::string &name); - }; -} // anonymous namespace - -FastJetAlgorithmWrapper::FastJetAlgorithmWrapper( - const edm::ParameterSet ¶ms, double jetPtMin) : - JetClustering::Algorithm(params, jetPtMin) -{ -} - -std::vector FastJetAlgorithmWrapper::operator () ( - const ParticleVector &input) const -{ - if (input.empty()) - return std::vector(); - - std::vector jfInput; - jfInput.reserve(input.size()); - for(ParticleVector::const_iterator iter = input.begin(); - iter != input.end(); ++iter) { - jfInput.push_back(fastjet::PseudoJet( - (*iter)->momentum().px(), (*iter)->momentum().py(), - (*iter)->momentum().pz(), (*iter)->momentum().e())); - jfInput.back().set_user_index(iter - input.begin()); - } - - fastjet::ClusterSequence sequence(jfInput, *jetDefinition); - std::vector jets = - sequence.inclusive_jets(getJetPtMin()); - - std::vector result; - result.reserve(jets.size()); - ParticleVector constituents; - for(std::vector::const_iterator iter = jets.begin(); - iter != jets.end(); ++iter) { - std::vector fjConstituents = - sequence.constituents(*iter); - unsigned int size = fjConstituents.size(); - constituents.resize(size); - for(unsigned int i = 0; i < size; i++) - constituents[i] = - input[fjConstituents[i].user_index()]; - - result.push_back( - Jet(iter->px(), iter->py(), iter->pz(), iter->E(), - constituents)); - } - - return result; -} - -KtAlgorithm::KtAlgorithm(const edm::ParameterSet ¶ms, double jetPtMin) : - FastJetAlgorithmWrapper(params, jetPtMin) -{ - jetDefinition.reset(new fastjet::JetDefinition( - fastjet::kt_algorithm, - params.getParameter("ktRParam"), - fastjet::Best)); -} - -SISConeAlgorithm::SISConeAlgorithm( - const edm::ParameterSet ¶ms, double jetPtMin) : - FastJetAlgorithmWrapper(params, jetPtMin) -{ - std::string splitMergeScale = - params.getParameter("splitMergeScale"); - fastjet::SISConePlugin::SplitMergeScale scale; - - if (splitMergeScale == "pt") - scale = fastjet::SISConePlugin::SM_pt; - else if (splitMergeScale == "Et") - scale = fastjet::SISConePlugin::SM_Et; - else if (splitMergeScale == "mt") - scale = fastjet::SISConePlugin::SM_mt; - else if (splitMergeScale == "pttilde") - scale = fastjet::SISConePlugin::SM_pttilde; - else - throw cms::Exception("Configuration") - << "JetClustering SISCone scale '" << splitMergeScale - << "' unknown." << std::endl; - - plugin.reset(new fastjet::SISConePlugin( - params.getParameter("coneRadius"), - params.getParameter("coneOverlapThreshold"), - params.getParameter("maxPasses"), - params.getParameter("protojetPtMin"), - params.getParameter("caching"), - scale)); - jetDefinition.reset(new fastjet::JetDefinition(plugin.get())); -} - -JetClustering::JetClustering(const edm::ParameterSet ¶ms) -{ - double jetPtMin = params.getParameter("jetPtMin"); - init(params, jetPtMin); -} - -JetClustering::JetClustering(const edm::ParameterSet ¶ms, - double jetPtMin) -{ - init(params, jetPtMin); -} - -JetClustering::~JetClustering() -{ -} - -void JetClustering::init(const edm::ParameterSet ¶ms, double jetPtMin) -{ - edm::ParameterSet algoParams = - params.getParameter("algorithm"); - std::string algoName = algoParams.getParameter("name"); - - if (algoName == "KT") - jetAlgo.reset(new KtAlgorithm(algoParams, jetPtMin)); - else if (algoName == "SISCone") - jetAlgo.reset(new SISConeAlgorithm(algoParams, jetPtMin)); - else - throw cms::Exception("Configuration") - << "JetClustering algorithm \"" << algoName - << "\" unknown." << std::endl; -} - -double JetClustering::getJetPtMin() const -{ - return jetAlgo->getJetPtMin(); -} - -std::vector JetClustering::operator () ( - const ParticleVector &input) const -{ - return (*jetAlgo)(input); -} - -} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/JetInput.cc b/GeneratorInterface/LHEInterface/src/JetInput.cc deleted file mode 100644 index 3a9cf9df33a6e..0000000000000 --- a/GeneratorInterface/LHEInterface/src/JetInput.cc +++ /dev/null @@ -1,411 +0,0 @@ -#include -#include - -#include "Math/GenVector/PxPyPzE4D.h" - -#include "HepMC/GenEvent.h" -#include "HepMC/GenParticle.h" -#include "HepMC/GenVertex.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/Exception.h" - -#include "GeneratorInterface/LHEInterface/interface/JetInput.h" - -namespace lhef { - -JetInput::JetInput() : - partonicFinalState(false), - onlyHardProcess(false), - excludeResonances(false), - tausAsJets(false), - ptMin(0.0) -{ -} - -JetInput::JetInput(const edm::ParameterSet ¶ms) : - partonicFinalState(params.getParameter("partonicFinalState")), - onlyHardProcess(params.getParameter("onlyHardProcess")), - excludeResonances(false), - tausAsJets(params.getParameter("tausAsJets")), - ptMin(0.0) -{ - if (params.exists("ignoreParticleIDs")) - setIgnoredParticles( - params.getParameter >( - "ignoreParticleIDs")); - if (params.exists("excludedResonances")) - setExcludedResonances( - params.getParameter >( - "excludedResonances")); - if (params.exists("excludedFromResonances")) - setExcludedFromResonances( - params.getParameter >( - "excludedFromResonances")); -} - -JetInput::~JetInput() -{ -} - -void JetInput::setIgnoredParticles( - const std::vector &particleIDs) -{ - ignoreParticleIDs = particleIDs; - std::sort(ignoreParticleIDs.begin(), ignoreParticleIDs.end()); -} - -void JetInput::setExcludedResonances( - const std::vector &particleIDs) -{ - setExcludeResonances(true); - excludedResonances = particleIDs; - std::sort(excludedResonances.begin(), excludedResonances.end()); -} - -void JetInput::setExcludedFromResonances( - const std::vector &particleIDs) -{ - excludedFromResonances = particleIDs; - std::sort(excludedFromResonances.begin(), excludedFromResonances.end()); -} - -bool JetInput::isParton(int pdgId) const -{ - pdgId = (pdgId > 0 ? pdgId : -pdgId) % 10000; - return (pdgId > 0 && pdgId < 6) || pdgId == 7 || - pdgId == 9 || (tausAsJets && pdgId == 15) || pdgId == 21; - // tops are not considered "regular" partons - // but taus eventually are (since they may hadronize later) -} - -bool JetInput::isHadron(int pdgId) -{ - pdgId = (pdgId > 0 ? pdgId : -pdgId) % 10000; - return (pdgId > 100 && pdgId < 900) || - (pdgId > 1000 && pdgId < 9000); -} - -static inline bool isContained(const std::vector &list, int id) -{ - unsigned int absId = (unsigned int)(id > 0 ? id : -id); - std::vector::const_iterator pos = - std::lower_bound(list.begin(), list.end(), absId); - return pos != list.end() && *pos == absId; -} - -bool JetInput::isResonance(int pdgId) const -{ - if (excludedResonances.empty()) { - // gauge bosons and tops - pdgId = (pdgId > 0 ? pdgId : -pdgId) % 10000; - return (pdgId > 21 && pdgId <= 39) || pdgId == 6 || pdgId == 8; - } - - return isContained(excludedResonances, pdgId); -} - -bool JetInput::isIgnored(int pdgId) const -{ - return isContained(ignoreParticleIDs, pdgId); -} - -bool JetInput::isExcludedFromResonances(int pdgId) const -{ - if (excludedFromResonances.empty()) - return true; - - return isContained(excludedFromResonances, pdgId); -} - -bool JetInput::isHardProcess(const HepMC::GenVertex *vertex, - const VertexVector &hardProcess) const -{ - std::vector::const_iterator pos = - std::lower_bound(hardProcess.begin(), - hardProcess.end(), vertex); - return pos != hardProcess.end() && *pos == vertex; -} - -static unsigned int partIdx(const JetInput::ParticleVector &p, - const HepMC::GenParticle *particle) -{ - JetInput::ParticleVector::const_iterator pos = - std::lower_bound(p.begin(), p.end(), particle); - if (pos == p.end() || *pos != particle) - throw cms::Exception("CorruptedData") - << "HepMC::GenEvent corrupted: Unlisted particles" - " in decay tree." << std::endl; - - return pos - p.begin(); -} - -static void invalidateTree(JetInput::ParticleBitmap &invalid, - const JetInput::ParticleVector &p, - const HepMC::GenVertex *v) -{ - if (!v) - return; - - for(HepMC::GenVertex::particles_out_const_iterator iter = - v->particles_out_const_begin(); - iter != v->particles_out_const_end(); ++iter) { - unsigned int idx = partIdx(p, *iter); - - if (invalid[idx]) - continue; - - invalid[idx] = true; - - const HepMC::GenVertex *v = (*iter)->end_vertex(); - invalidateTree(invalid, p, v); - } -} - -int JetInput::testPartonChildren(JetInput::ParticleBitmap &invalid, - const JetInput::ParticleVector &p, - const HepMC::GenVertex *v) const -{ - if (!v) - return 0; - - for(HepMC::GenVertex::particles_out_const_iterator iter = - v->particles_out_const_begin(); - iter != v->particles_out_const_end(); ++iter) { - unsigned int idx = partIdx(p, *iter); - - if (invalid[idx]) - continue; - - if (isParton((*iter)->pdg_id())) - return 1; - if (isHadron((*iter)->pdg_id())) - return -1; - - const HepMC::GenVertex *v = (*iter)->end_vertex(); - int result = testPartonChildren(invalid, p, v); - if (result) - return result; - } - - return 0; -} - -bool JetInput::hasPartonChildren(ParticleBitmap &invalid, - const ParticleVector &p, - const HepMC::GenParticle *particle) const -{ - return testPartonChildren(invalid, p, particle->end_vertex()) > 0; -} - -bool JetInput::fromHardProcess(ParticleBitmap &invalid, - const ParticleVector &p, - const HepMC::GenParticle *particle, - const VertexVector &hardProcess) const -{ - unsigned int idx = partIdx(p, particle); - - if (invalid[idx]) - return false; - - const HepMC::GenVertex *v = particle->production_vertex(); - if (!v) - return false; - else if (isHardProcess(v, hardProcess)) - return true; - - for(HepMC::GenVertex::particles_in_const_iterator iter = - v->particles_in_const_begin(); - iter != v->particles_in_const_end(); ++iter) - if (fromHardProcess(invalid, p, *iter, hardProcess)) - return true; - - return false; -} - -bool JetInput::fromSignalVertex(ParticleBitmap &invalid, - const ParticleVector &p, - const HepMC::GenParticle *particle, - const HepMC::GenVertex *signalVertex) const -{ - unsigned int idx = partIdx(p, particle); - - if (invalid[idx]) - return false; - - const HepMC::GenVertex *v = particle->production_vertex(); - if (!v) - return false; - else if (v == signalVertex) - return true; - - for(HepMC::GenVertex::particles_in_const_iterator iter = - v->particles_in_const_begin(); - iter != v->particles_in_const_end(); ++iter) - if (fromSignalVertex(invalid, p, *iter, signalVertex)) - return true; - - return false; -} - -JetInput::ResonanceState -JetInput::fromResonance(ParticleBitmap &invalid, - const ParticleVector &p, - const HepMC::GenParticle *particle, - const HepMC::GenVertex *signalVertex, - const VertexVector &hardProcess) const -{ - unsigned int idx = partIdx(p, particle); - int id = particle->pdg_id(); - - if (invalid[idx]) - return kIndirect; - - if (particle->status() == 3 && isResonance(id)) - return kDirect; - - if (!isIgnored(id) && excludedFromResonances.empty() && isParton(id)) - return kNo; - - const HepMC::GenVertex *v = particle->production_vertex(); - if (!v) - return kNo; - else if (v == signalVertex && excludedResonances.empty()) - return kIndirect; - else if (v == signalVertex || isHardProcess(v, hardProcess)) - return kNo; - - for(HepMC::GenVertex::particles_in_const_iterator iter = - v->particles_in_const_begin(); - iter != v->particles_in_const_end(); ++iter) { - ResonanceState result = - fromResonance(invalid, p, *iter, - signalVertex, hardProcess); - switch(result) { - case kNo: - break; - case kDirect: - if ((*iter)->pdg_id() == id) - return kDirect; - if (!isExcludedFromResonances(id)) - break; - case kIndirect: - return kIndirect; - } - } - - return kNo; -} - -JetInput::ParticleVector JetInput::operator () ( - const HepMC::GenEvent *event) const -{ - if (!event->signal_process_vertex()) - throw cms::Exception("InvalidHepMCEvent") - << "HepMC event is lacking signal vertex." - << std::endl; - - VertexVector hardProcess, toLookAt; - std::pair beamParticles = - event->beam_particles(); - toLookAt.push_back(event->signal_process_vertex()); - while(!toLookAt.empty()) { - std::vector next; - for(std::vector::const_iterator v = - toLookAt.begin(); v != toLookAt.end(); ++v) { - if (!*v || isHardProcess(*v, hardProcess)) - continue; - - bool veto = false; - for(HepMC::GenVertex::particles_in_const_iterator iter = - (*v)->particles_in_const_begin(); - iter != (*v)->particles_in_const_end(); ++iter) { - if (*iter == beamParticles.first || - *iter == beamParticles.second) { - veto = true; - break; - } - } - if (veto) - continue; - - hardProcess.push_back(*v); - std::sort(hardProcess.begin(), hardProcess.end()); - - for(HepMC::GenVertex::particles_in_const_iterator iter = - (*v)->particles_in_const_begin(); - iter != (*v)->particles_in_const_end(); ++iter) { - const HepMC::GenVertex *pv = - (*iter)->production_vertex(); - if (pv) - next.push_back(pv); - } - } - - toLookAt = next; - std::sort(toLookAt.begin(), toLookAt.end()); - } - - ParticleVector particles; - for(HepMC::GenEvent::particle_const_iterator iter = event->particles_begin(); - iter != event->particles_end(); ++iter) - particles.push_back(*iter); - - std::sort(particles.begin(), particles.end()); - unsigned int size = particles.size(); - - ParticleBitmap selected(size, false); - ParticleBitmap invalid(size, false); - - for(unsigned int i = 0; i < size; i++) { - const HepMC::GenParticle *particle = particles[i]; - if (invalid[i]) - continue; - if (particle->status() == 1) - selected[i] = true; - - if (partonicFinalState && isParton(particle->pdg_id())) { - if (!particle->end_vertex() && - particle->status() != 1) - // some brokenness in event... - invalid[i] = true; - else if (!hasPartonChildren(invalid, particles, - particle)) { - selected[i] = true; - invalidateTree(invalid, particles, - particle->end_vertex()); - } - } - - if (onlyHardProcess && - !fromHardProcess(invalid, particles, - particle, hardProcess) && - !isHardProcess(particle->end_vertex(), hardProcess)) - invalid[i] = true; - } - - ParticleVector result; - for(unsigned int i = 0; i < size; i++) { - const HepMC::GenParticle *particle = particles[i]; - if (!selected[i] || invalid[i]) - continue; - - if (excludeResonances && - fromResonance(invalid, particles, particle, - event->signal_process_vertex(), - hardProcess)) { - invalid[i] = true; - continue; - } - - if (isIgnored(particle->pdg_id())) - continue; - - if (particle->momentum().perp() >= ptMin) - result.push_back(particle); - } - - return result; -} - -} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/JetMatching.cc b/GeneratorInterface/LHEInterface/src/JetMatching.cc deleted file mode 100644 index 1f39eb7dad11b..0000000000000 --- a/GeneratorInterface/LHEInterface/src/JetMatching.cc +++ /dev/null @@ -1,66 +0,0 @@ -#include -#include - -#include - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "FWCore/PluginManager/interface/PluginManager.h" -#include "FWCore/PluginManager/interface/PluginFactory.h" - -#include "GeneratorInterface/LHEInterface/interface/LHERunInfo.h" -#include "GeneratorInterface/LHEInterface/interface/LHEEvent.h" - -#include "GeneratorInterface/LHEInterface/interface/JetMatching.h" - -EDM_REGISTER_PLUGINFACTORY(lhef::JetMatching::Factory, - "GeneratorInterfaceLHEJetMatching"); - -namespace lhef { - -JetMatching::JetMatching(const edm::ParameterSet ¶ms) -{ -} - -JetMatching::~JetMatching() -{ -} - -void JetMatching::init(const boost::shared_ptr &runInfo) -{ -} - -void JetMatching::beforeHadronisation( - const boost::shared_ptr &event) -{ -} - -std::set JetMatching::capabilities() const -{ - std::set result; - result.insert("psFinalState"); - result.insert("hepmc"); - return result; -} - -std::auto_ptr JetMatching::create( - const edm::ParameterSet ¶ms) -{ - std::string name = params.getParameter("scheme"); - - std::auto_ptr plugin( - Factory::get()->create("JetMatching" + name, params)); - - if (!plugin.get()) - throw cms::Exception("InvalidJetMatching") - << "Unknown scheme \"" << name << "\"" - " specified for jet matching in LHEProducer." - << std::endl; - - edm::LogInfo("Generator|LHEInterface") - << "Using " << name << " for ME/PS jet matching." << std::endl; - - return plugin; -} - -} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/JetMatchingMLM.cc b/GeneratorInterface/LHEInterface/src/JetMatchingMLM.cc deleted file mode 100644 index 628e56141793a..0000000000000 --- a/GeneratorInterface/LHEInterface/src/JetMatchingMLM.cc +++ /dev/null @@ -1,234 +0,0 @@ -#include -#include -#include -#include -#include -#include - -#include - -#include "Math/GenVector/Cartesian3D.h" -#include "Math/GenVector/VectorUtil.h" - -#include "HepMC/GenEvent.h" -#include "HepMC/SimpleVector.h" - -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Utilities/interface/Exception.h" - -#include "GeneratorInterface/LHEInterface/interface/JetInput.h" -#include "GeneratorInterface/LHEInterface/interface/JetClustering.h" -#include "GeneratorInterface/LHEInterface/interface/JetMatchingMLM.h" - -#include "Matching.h" - -// #define DEBUG - -namespace lhef { - -namespace { - template - struct DeltaRSeparation : public std::binary_function { - double operator () (const T1 &v1_, const T2 &v2_) const - { - using namespace ROOT::Math; - Cartesian3D v1(v1_.px(), v1_.py(), v1_.pz()); - Cartesian3D v2(v2_.px(), v2_.py(), v2_.pz()); - return VectorUtil::DeltaR(v1, v2); - } - }; - - // stupid pointer indirection... ugly specialization - template - struct DeltaRSeparation { - double operator () (const HepMC::GenParticle *v1_, - const T2 &v2_) const - { - using namespace ROOT::Math; - Cartesian3D v1(v1_->momentum().px(), - v1_->momentum().py(), - v1_->momentum().pz()); - Cartesian3D v2(v2_.px(), v2_.py(), v2_.pz()); - return VectorUtil::DeltaR(v1, v2); - } - }; - - struct ParticlePtGreater { - double operator () (const HepMC::GenParticle *v1, - const HepMC::GenParticle *v2) - { return v1->momentum().perp() > v2->momentum().perp(); } - }; - - inline HepMC::FourVector convert(const JetClustering::Jet &jet) - { return HepMC::FourVector(jet.px(), jet.py(), jet.pz(), jet.e()); } -} // anonymous namespace - -JetMatchingMLM::JetMatchingMLM(const edm::ParameterSet ¶ms) : - JetMatching(params), - maxDeltaR(params.getParameter("maxDeltaR")), - minJetPt(params.getParameter("jetPtMin")), - maxEta(params.getParameter("maxEta")), - matchPtFraction(0.75), - useEt(params.getParameter("useEt")), - partonInput(new JetInput(params)), - jetInput(new JetInput(*partonInput)) -{ - partonInput->setPartonicFinalState(false); - partonInput->setHardProcessOnly(false); - - if (params.exists("matchPtFraction")) - matchPtFraction = - params.getParameter("matchPtFraction"); - - jetClustering.reset( - new JetClustering(params, minJetPt * matchPtFraction)); - - std::string matchMode = params.getParameter("matchMode"); - if (matchMode == "inclusive") - this->matchMode = kInclusive; - else if (matchMode == "exclusive") - this->matchMode = kExclusive; - else - throw cms::Exception("Configuration") - << "Invalid matching mode '" << matchMode - << "' specified." << std::endl; -} - -JetMatchingMLM::~JetMatchingMLM() -{ -} - -std::set JetMatchingMLM::capabilities() const -{ - std::set result = JetMatching::capabilities(); - result.insert("matchSummary"); - return result; -} - -// implements the MLM method - simply reject or accept -// use polymorphic JetMatching subclasses when modularizing - -double JetMatchingMLM::match(const HepMC::GenEvent *partonLevel, - const HepMC::GenEvent *finalState, - bool showeredFinalState) -{ - JetInput::ParticleVector partons = (*partonInput)(partonLevel); - std::sort(partons.begin(), partons.end(), ParticlePtGreater()); - - JetInput::ParticleVector jetInput = - showeredFinalState ? (*partonInput)(finalState) - : (*this->jetInput)(finalState); - std::sort(jetInput.begin(), jetInput.end(), ParticlePtGreater()); - - std::vector jets = (*jetClustering)(jetInput); - -#ifdef DEBUG - std::cout << "===== Partons:" << std::endl; - for(JetClustering::ParticleVector::const_iterator c = partons.begin(); - c != partons.end(); c++) - std::cout << "\tpid = " << (*c)->pdg_id() - << ", pt = " << (*c)->momentum().perp() - << ", eta = " << (*c)->momentum().eta() - << ", phi = " << (*c)->momentum().phi() - << std::endl; - std::cout << "===== JetInput:" << std::endl; - for(JetClustering::ParticleVector::const_iterator c = jetInput.begin(); - c != jetInput.end(); c++) - std::cout << "\tpid = " << (*c)->pdg_id() - << ", pt = " << (*c)->momentum().perp() - << ", eta = " << (*c)->momentum().eta() - << ", phi = " << (*c)->momentum().phi() - << std::endl; - std::cout << "----- " << jets.size() << " jets:" << std::endl; - for(std::vector::const_iterator iter = jets.begin(); - iter != jets.end(); ++iter) { - std::cout << "* pt = " << iter->pt() - << ", eta = " << iter->eta() - << ", phi = " << iter->phi() - << std::endl; - for(JetClustering::ParticleVector::const_iterator c = iter->constituents().begin(); - c != iter->constituents().end(); c++) - std::cout << "\tpid = " << (*c)->pdg_id() - << ", pt = " << (*c)->momentum().perp() - << ", eta = " << (*c)->momentum().eta() - << ", phi = " << (*c)->momentum().phi() - << std::endl; - } - - using boost::bind; - std::cout << partons.size() << " partons and " - << std::count_if(jets.begin(), jets.end(), - bind(std::greater(), - bind(&JetClustering::Jet::pt, _1), - minJetPt)) << " jets." << std::endl; -#endif - - Matching matching(partons, jets, - DeltaRSeparation()); - - typedef Matching::Match Match; - std::vector matches = - matching.match( - std::less(), - std::bind2nd(std::less(), maxDeltaR)); - -#ifdef DEBUG - for(std::vector::const_iterator iter = matches.begin(); - iter != matches.end(); ++iter) - std::cout << "\tParton " << iter->index1 << " matches jet " - << iter->index2 << " with a Delta_R of " - << matching.delta(*iter) << std::endl; -#endif - - unsigned int unmatchedPartons = 0; - unsigned int unmatchedJets = 0; - - matchSummary.clear(); - for(std::vector::const_iterator iter = matches.begin(); - iter != matches.end(); ++iter) { - if ((useEt ? jets[iter->index2].et() - : jets[iter->index2].pt()) < minJetPt || - std::abs(jets[iter->index2].eta()) > maxEta) - unmatchedPartons++; - matchSummary.push_back( - JetPartonMatch(partons[iter->index1]->momentum(), - convert(jets[iter->index2]), - matching.delta(*iter), - partons[iter->index1]->pdg_id())); - } - - for(Matching::index_type i = 0; i < partons.size(); i++) { - if (!matching.isMatched1st(i)) { - unmatchedPartons++; - matchSummary.push_back( - JetPartonMatch(partons[i]->momentum(), - partons[i]->pdg_id())); - } - } - - for(Matching::index_type i = 0; i < jets.size(); i++) { - if (!matching.isMatched2nd(i)) { - if ((useEt ? jets[i].et() - : jets[i].pt()) >= minJetPt && - std::abs(jets[i].eta()) <= maxEta) - unmatchedJets++; - matchSummary.push_back( - JetPartonMatch(convert(jets[i]))); - } - } - - switch(matchMode) { - case kExclusive: - if (!unmatchedJets && !unmatchedPartons) - return 1.0; - break; - case kInclusive: - if (!unmatchedPartons) - return 1.0; - } - - return 0.0; -} - -} // namespace lhef diff --git a/GeneratorInterface/LHEInterface/src/Matching.h b/GeneratorInterface/LHEInterface/src/Matching.h deleted file mode 100644 index 6438330257a67..0000000000000 --- a/GeneratorInterface/LHEInterface/src/Matching.h +++ /dev/null @@ -1,121 +0,0 @@ -#ifndef GeneratorInterface_LHEInterface_Matching_h -#define GeneratorInterface_LHEInterface_Matching_h - -#include -#include -#include -#include - -#include "SimpleMatrix.h" - -namespace lhef { - -template -class Matching { - public: - typedef typename SimpleMatrix::size_type index_type; - - template - Matching(const V1 &v1, const V2 &v2, Separation separation) : - matrix(v1.size(), v2.size()), - matched1(v1.size(), false), - matched2(v2.size(), false) - { - index_type i = 0; - for(typename V1::const_iterator iter1 = v1.begin(); - iter1 != v1.end(); ++iter1, i++) { - index_type j = 0; - for(typename V2::const_iterator iter2 = v2.begin(); - iter2 != v2.end(); ++iter2, j++) - matrix(i, j) = separation(*iter1, *iter2); - - } - } - - struct Match { - typedef typename Matching::index_type index_type; - - inline Match(index_type i1, index_type i2) : - index1(i1), index2(i2) {} - - index_type index1, index2; - }; - - inline Delta delta(index_type index1, index_type index2) const - { return matrix(index1, index2); } - - inline Delta delta(Match match) const - { return matrix(match.index1, match.index2); } - - private: - template - struct Comparator : public std::binary_function { - typedef typename Matching::index_type index_type; - - inline Comparator(const SimpleMatrix &matrix, - SortComparator &sort) : - matrix(matrix), sort(sort) {} - - inline bool operator () (index_type i1, index_type i2) const - { return sort(matrix[i1], matrix[i2]); } - - const SimpleMatrix &matrix; - SortComparator &sort; - }; - - struct AlwaysTrue : public std::unary_function { - inline bool operator () (Delta dummy) { return true; } - }; - - public: - template - std::vector match( - SortComparator sortComparator = SortComparator(), - CutCriterion cutCriterion = CutCriterion()) - { - std::vector matches(matrix.size()); - for(index_type i = 0; i != matrix.size(); i++) - matches[i] = i; - - std::sort(matches.begin(), matches.end(), - Comparator(matrix, sortComparator)); - - std::vector result; - result.reserve(std::min(matrix.rows(), matrix.cols())); - for(typename std::vector::const_iterator iter = - matches.begin(); iter != matches.end(); ++iter) { - - index_type row = matrix.row(*iter); - index_type col = matrix.col(*iter); - if (matched1[row] || matched2[col]) - continue; - - if (!cutCriterion(matrix[*iter])) - continue; - - matched1[row] = true; - matched2[col] = true; - result.push_back(Match(row, col)); - } - - return result; - } - - template - inline std::vector match() - { return match(); } - - inline std::vector match() - { return match, AlwaysTrue>(); } - - inline bool isMatched1st(index_type index) { return matched1[index]; } - inline bool isMatched2nd(index_type index) { return matched2[index]; } - - private: - SimpleMatrix matrix; - std::vector matched1, matched2; -}; - -} // namespace lhef - -#endif // GeneratorEvent_LHEInterface_Matching_h diff --git a/GeneratorInterface/LHEInterface/src/SimpleMatrix.h b/GeneratorInterface/LHEInterface/src/SimpleMatrix.h deleted file mode 100644 index 2ebec9403c462..0000000000000 --- a/GeneratorInterface/LHEInterface/src/SimpleMatrix.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef GeneratorInterface_LHEInterface_SimpleMatrix_h -#define GeneratorInterface_LHEInterface_SimpleMatrix_h - -#include - -namespace lhef { - -template -class SimpleMatrix { - public: - typedef T value_type; - typedef typename std::vector::size_type size_type; - - SimpleMatrix(size_type rows, size_type cols) : - width(cols), height(rows), container(rows * cols) {} - - ~SimpleMatrix() {} - - inline size_type rows() const { return height; } - inline size_type cols() const { return width; } - inline size_type size() const { return container.size(); } - - inline double &operator () (size_type row, size_type col) - { return container[index(row, col)]; } - inline double operator () (size_type row, size_type col) const - { return container[index(row, col)]; } - - inline double &operator [] (size_type index) - { return container[index]; } - inline double operator [] (size_type index) const - { return container[index]; } - - inline size_type row(size_type index) const { return index / width; } - inline size_type col(size_type index) const { return index % width; } - - protected: - size_type index(size_type row, size_type col) const - { return row * width + col; } - - private: - size_type width, height; - std::vector container; -}; - -} // namespace lhef - -#endif // GeneratorEvent_LHEInterface_SimpleMatrix_h diff --git a/GeneratorInterface/LHEInterface/test/analyze_cfg.py b/GeneratorInterface/LHEInterface/test/analyze_cfg.py deleted file mode 100755 index 43136942c23fe..0000000000000 --- a/GeneratorInterface/LHEInterface/test/analyze_cfg.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env cmsRun -import FWCore.ParameterSet.Config as cms - -process = cms.Process("MatchingAnalysis") - -process.maxEvents = cms.untracked.PSet(input = cms.untracked.int32(-1)) - -process.load("FWCore.MessageService.MessageLogger_cfi") -process.MessageLogger.cerr.threshold = 'INFO' - -process.source = cms.Source("PoolSource", - fileNames = cms.untracked.vstring('file:test.root'), - skipEvents = cms.untracked.uint32(0) -) - -process.TFileService = cms.Service("TFileService", - fileName = cms.string('lheAnalysis.root') -) - -process.lheAnalyzer = cms.EDAnalyzer("LHEAnalyzer", - src = cms.InputTag('VtxSmeared'), - - jetInput = cms.PSet( - partonicFinalState = cms.bool(True), - excludedResonances = cms.vuint32(6), - excludedFromResonances = cms.vuint32(1, 2, 3, 4, 5, 21, 24), - onlyHardProcess = cms.bool(True), - tausAsJets = cms.bool(False), - ), - - jetClustering = cms.PSet( - name = cms.string('SISCone'), - coneOverlapThreshold = cms.double(0.75), - splitMergeScale = cms.string('pttilde'), - maxPasses = cms.int32(0), - protojetPtMin = cms.double(0.0), - caching = cms.bool(False) - ), - - defaultDeltaCut = cms.double(0.7), - defaultPtCut = cms.double(70.0), - maxEta = cms.double(5.0), - useEt = cms.bool(True), - binsDelta = cms.uint32(50), - minDelta = cms.double(0.2), - maxDelta = cms.double(1.2), - binsPt = cms.uint32(100), - minPt = cms.double(10.0), - maxPt = cms.double(1000.0), - minDJR = cms.uint32(0), - maxDJR = cms.uint32(5), -) - -process.p = cms.Path(process.lheAnalyzer) diff --git a/GeneratorInterface/LHEInterface/test/plotMatchingAnalysis.C b/GeneratorInterface/LHEInterface/test/plotMatchingAnalysis.C deleted file mode 100644 index d8362e2d4cf75..0000000000000 --- a/GeneratorInterface/LHEInterface/test/plotMatchingAnalysis.C +++ /dev/null @@ -1,87 +0,0 @@ -static const char *names[] = { - "pt0", - "pt1", - "pt2", - "pt3", - "pt4", - "delta1", - "delta2", - "delta3", - "delta4" -}; - -static const char *xtitles[] = { - "log_{10}(E_{T} [GeV/c^{2}])", - "log_{10}(E_{T} [GeV/c^{2}])", - "log_{10}(E_{T} [GeV/c^{2}])", - "log_{10}(E_{T} [GeV/c^{2}])", - "log_{10}(E_{T} [GeV/c^{2}])", - "#DeltaR", - "#DeltaR", - "#DeltaR", - "#DeltaR" -}; -static int n = 9; - -void plotMatchingAnalysis() -{ - TFile *f0 = TFile::Open("ana_tt0j.root"); - TFile *f1 = TFile::Open("ana_tt1j.root"); - TFile *f2 = TFile::Open("ana_tt2j.root"); - TFile *f3 = TFile::Open("ana_tt3j.root"); - TFile *f4 = TFile::Open("ana_tt4j.root"); - - for(int i = 0; i < n; i++) { - TH1 *h0 = (TH1*)f0->Get(TString("lheAnalyzer/") + names[i]); - TH1 *h1 = (TH1*)f1->Get(TString("lheAnalyzer/") + names[i]); - TH1 *h2 = (TH1*)f2->Get(TString("lheAnalyzer/") + names[i]); - TH1 *h3 = (TH1*)f3->Get(TString("lheAnalyzer/") + names[i]); - TH1 *h4 = (TH1*)f4->Get(TString("lheAnalyzer/") + names[i]); - - h0->Sumw2(); - h1->Sumw2(); - h2->Sumw2(); - h3->Sumw2(); - h4->Sumw2(); - - // FIXME: add weights here (xsec / #events) - h0->Scale(3.1821e-07/165633); - h1->Scale(8.98764e-08/55910); - h2->Scale(1.72561e-08/7800); - h3->Scale(2.71928e-09/11747); - h4->Scale(7.20582e-10/11774); - - TH1 *sum = h0->Clone(TString("sum_") + names[i]); - sum->Add(h1); - sum->Add(h2); - sum->Add(h3); - sum->Add(h4); - - sum->SetMarkerColor(kBlack); - sum->SetLineColor(kBlack); - h0->SetMarkerColor(kRed); - h0->SetLineColor(kRed); - h1->SetMarkerColor(kBlue); - h1->SetLineColor(kBlue); - h2->SetMarkerColor(kGreen); - h2->SetLineColor(kGreen); - h3->SetMarkerColor(kCyan); - h3->SetLineColor(kCyan); - h4->SetMarkerColor(kMagenta); - h4->SetLineColor(kMagenta); - - TCanvas *c = new TCanvas(TString("c_") + names[i]); - c->SetLogy(); - - sum->SetXTitle(xtitles[i]); - sum->SetStats(0); - sum->Draw(); - h0->Draw("same"); - h1->Draw("same"); - h2->Draw("same"); - h3->Draw("same"); - h4->Draw("same"); - - c->Print(TString(names[i]) + ".png"); - } -} From ce125d66ca404a31e15385938ccdb24e48e1ceed Mon Sep 17 00:00:00 2001 From: Mikhail Date: Mon, 1 Feb 2016 12:27:08 +0100 Subject: [PATCH 222/250] Clean LHEInterface 3 --- .../LHEInterface/plugins/BuildFile.xml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/GeneratorInterface/LHEInterface/plugins/BuildFile.xml b/GeneratorInterface/LHEInterface/plugins/BuildFile.xml index 198afb0afd864..e585d6c7a8f48 100644 --- a/GeneratorInterface/LHEInterface/plugins/BuildFile.xml +++ b/GeneratorInterface/LHEInterface/plugins/BuildFile.xml @@ -5,10 +5,10 @@ - - + + - + @@ -17,13 +17,6 @@ - - - - - - - From f3d00ccdf11a65fc78c05cc462842d4691a2330b Mon Sep 17 00:00:00 2001 From: Martin Grunewald Date: Mon, 1 Feb 2016 13:55:39 +0100 Subject: [PATCH 223/250] GT --- HLTrigger/HLTcore/src/HLTConfigData.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/HLTrigger/HLTcore/src/HLTConfigData.cc b/HLTrigger/HLTcore/src/HLTConfigData.cc index 3c69ad79e9419..fb6f737da802d 100644 --- a/HLTrigger/HLTcore/src/HLTConfigData.cc +++ b/HLTrigger/HLTcore/src/HLTConfigData.cc @@ -341,6 +341,10 @@ const std::string& HLTConfigData::processName() const { return processName_; } +const std::string& HLTConfigData::globalTag() const { + return globalTag_; +} + unsigned int HLTConfigData::size() const { return triggerNames_.size(); } From 06aff5ea493f03f451d304618d5b3f51f9842d63 Mon Sep 17 00:00:00 2001 From: Johannes Lange Date: Fri, 29 Jan 2016 10:09:39 +0100 Subject: [PATCH 224/250] adding HLT DQM module for PhotonMET to SUSYBSM --- .../SUSYBSM/interface/SUSY_HLT_PhotonMET.h | 70 +++++++++ .../python/SUSYBSM_HLT_PhotonMET_cff.py | 23 +++ .../SUSYBSM/src/SUSY_HLT_PhotonMET.cc | 134 ++++++++++++++++++ 3 files changed, 227 insertions(+) create mode 100644 HLTriggerOffline/SUSYBSM/interface/SUSY_HLT_PhotonMET.h create mode 100644 HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_PhotonMET_cff.py create mode 100644 HLTriggerOffline/SUSYBSM/src/SUSY_HLT_PhotonMET.cc diff --git a/HLTriggerOffline/SUSYBSM/interface/SUSY_HLT_PhotonMET.h b/HLTriggerOffline/SUSYBSM/interface/SUSY_HLT_PhotonMET.h new file mode 100644 index 0000000000000..ab33096e628de --- /dev/null +++ b/HLTriggerOffline/SUSYBSM/interface/SUSY_HLT_PhotonMET.h @@ -0,0 +1,70 @@ +#ifndef SUSY_HLT_PhotonMET_H +#define SUSY_HLT_PhotonMET_H + +//event +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" + +//DQM +#include "DQMServices/Core/interface/DQMEDAnalyzer.h" +#include "DQMServices/Core/interface/DQMStore.h" +#include "DQMServices/Core/interface/MonitorElement.h" + +// MET +#include "DataFormats/METReco/interface/PFMET.h" +#include "DataFormats/METReco/interface/PFMETCollection.h" + +// Photon +#include "DataFormats/EgammaCandidates/interface/Photon.h" + +// Trigger +#include "DataFormats/Common/interface/TriggerResults.h" +#include "DataFormats/HLTReco/interface/TriggerObject.h" +#include "DataFormats/HLTReco/interface/TriggerEvent.h" +#include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h" + +namespace reco{ + typedef std::vector PhotonCollection; +} + +class SUSY_HLT_PhotonMET: public DQMEDAnalyzer +{ +public: + SUSY_HLT_PhotonMET(const edm::ParameterSet& ps); + virtual ~SUSY_HLT_PhotonMET(); + +protected: + void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override; + void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override; + void analyze(edm::Event const& e, edm::EventSetup const& eSetup); + void beginLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& eSetup) ; + void endLuminosityBlock(edm::LuminosityBlock const& lumi, edm::EventSetup const& eSetup); + void endRun(edm::Run const& run, edm::EventSetup const& eSetup); + +private: + //histos booking function + void bookHistos(DQMStore::IBooker &); + + //variables from config file + edm::EDGetTokenT thePfMETCollection_; + edm::EDGetTokenT thePhotonCollection_; + edm::EDGetTokenT triggerResults_; + + std::string triggerPath_; + std::string triggerPathBase_; + edm::InputTag triggerFilterPhoton_; + edm::InputTag triggerFilterMET_; + double ptThrOffline_; + double metThrOffline_; + + // Histograms + MonitorElement* h_recoPhotonPt; + MonitorElement* h_recoMet; + MonitorElement* h_metTurnOn_num; + MonitorElement* h_metTurnOn_den; + MonitorElement* h_photonTurnOn_num; + MonitorElement* h_photonTurnOn_den; + +}; + +#endif diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_PhotonMET_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_PhotonMET_cff.py new file mode 100644 index 0000000000000..8cc5aa5364564 --- /dev/null +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_PhotonMET_cff.py @@ -0,0 +1,23 @@ +import FWCore.ParameterSet.Config as cms + +SUSY_HLT_PhotonMET = cms.EDAnalyzer("SUSY_HLT_PhotonMET", + trigSummary = cms.InputTag("hltTriggerSummaryAOD",'', 'HLT'), + pfMETCollection = cms.InputTag("pfMet"), + photonCollection = cms.InputTag("gedPhotons"), + TriggerResults = cms.InputTag('TriggerResults','','HLT'), + HLTProcess = cms.string('HLT'), + TriggerPath = cms.string('HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_PFMET40_v'), + TriggerPathBase = cms.string('HLT_IsoMu27_v'), + ptThrOffline = cms.untracked.double(50), + metThrOffline = cms.untracked.double(100), +) + +SUSY_HLT_PhotonMET_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_PFMET40_v"), + verbose = cms.untracked.uint32(2), # Set to 2 for all messages + resolution = cms.vstring(""), + efficiency = cms.vstring( + "photonPtTurnOn_eff 'Turn-on vs photon; p_{T} (GeV); #epsilon' photonTurnOn_num photonTurnOn_den", + "metTurnOn_eff 'Turn-on vs E_{T}^{miss}; E_{T}^{miss} (GeV); #epsilon' pfMetTurnOn_num pfMetTurnOn_den", + ) +) diff --git a/HLTriggerOffline/SUSYBSM/src/SUSY_HLT_PhotonMET.cc b/HLTriggerOffline/SUSYBSM/src/SUSY_HLT_PhotonMET.cc new file mode 100644 index 0000000000000..aa816083f5414 --- /dev/null +++ b/HLTriggerOffline/SUSYBSM/src/SUSY_HLT_PhotonMET.cc @@ -0,0 +1,134 @@ +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Common/interface/TriggerNames.h" +#include "DataFormats/HLTReco/interface/TriggerObject.h" +#include "HLTriggerOffline/SUSYBSM/interface/SUSY_HLT_PhotonMET.h" + + +SUSY_HLT_PhotonMET::SUSY_HLT_PhotonMET(const edm::ParameterSet& ps) +{ + edm::LogInfo("SUSY_HLT_PhotonMET") << "Constructor SUSY_HLT_PhotonMET::SUSY_HLT_PhotonMET " << std::endl; + // Get parameters from configuration file + thePfMETCollection_ = consumes(ps.getParameter("pfMETCollection")); + thePhotonCollection_ = consumes(ps.getParameter("photonCollection")); + triggerResults_ = consumes(ps.getParameter("TriggerResults")); + triggerPath_ = ps.getParameter("TriggerPath"); + triggerPathBase_ = ps.getParameter("TriggerPathBase"); + ptThrOffline_ = ps.getUntrackedParameter("ptThrOffline"); + metThrOffline_ = ps.getUntrackedParameter("metThrOffline"); +} + +SUSY_HLT_PhotonMET::~SUSY_HLT_PhotonMET() +{ + edm::LogInfo("SUSY_HLT_PhotonMET") << "Destructor SUSY_HLT_PhotonMET::~SUSY_HLT_PhotonMET " << std::endl; +} + +void SUSY_HLT_PhotonMET::dqmBeginRun(edm::Run const &, edm::EventSetup const &) +{ + edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::beginRun" << std::endl; +} + +void SUSY_HLT_PhotonMET::bookHistograms(DQMStore::IBooker & ibooker_, edm::Run const &, edm::EventSetup const &) +{ + edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::bookHistograms" << std::endl; + //book at beginRun + bookHistos(ibooker_); +} + +void SUSY_HLT_PhotonMET::beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, + edm::EventSetup const& context) +{ + edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::beginLuminosityBlock" << std::endl; +} + +void SUSY_HLT_PhotonMET::analyze(edm::Event const& e, edm::EventSetup const& eSetup) +{ + edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::analyze" << std::endl; + + //------------------------------- + //--- MET + //------------------------------- + edm::Handle pfMETCollection; + e.getByToken(thePfMETCollection_, pfMETCollection); + if ( !pfMETCollection.isValid() ){ + edm::LogError ("SUSY_HLT_PhotonMET") << "invalid met collection" << "\n"; + return; + } + //------------------------------- + //--- Photon + //------------------------------- + edm::Handle photonCollection; + e.getByToken (thePhotonCollection_, photonCollection); + if ( !photonCollection.isValid() ){ + edm::LogError ("SUSY_HLT_PhotonMET") << "invalid egamma collection" << "\n"; + return; + } + + //check what is in the menu + edm::Handle hltresults; + e.getByToken(triggerResults_,hltresults); + if(!hltresults.isValid()){ + edm::LogError ("SUSY_HLT_PhotonMET") << "invalid collection: TriggerResults" << "\n"; + return; + } + + // use only events with leading photon in barrel + if (photonCollection->size()==0 || abs(photonCollection->begin()->superCluster()->eta()) > 1.4442) return; + + // get reco photon and met + float const recoPhotonPt = photonCollection->size() ? photonCollection->begin()->et() : 0; + float const recoMET = pfMETCollection->size() ? pfMETCollection->begin()->et() : 0; + h_recoPhotonPt->Fill(recoPhotonPt); + h_recoMet->Fill(recoMET); + + // the actual trigger efficiencies + bool hasFired = false, hasFiredBaseTrigger=false; + edm::TriggerNames const &trigNames = e.triggerNames(*hltresults); + unsigned int const numTriggers = trigNames.size(); + for( unsigned int hltIndex=0; hltIndexwasrun(hltIndex) && hltresults->accept(hltIndex)) hasFired = true; + if (trigNames.triggerName(hltIndex).find(triggerPathBase_) != std::string::npos && hltresults->wasrun(hltIndex) && hltresults->accept(hltIndex)) hasFiredBaseTrigger = true; + } + + if(hasFiredBaseTrigger || !e.isRealData()) { + // passed base trigger + if (recoPhotonPt>ptThrOffline_) h_metTurnOn_den->Fill(recoMET); + if (recoMET>metThrOffline_) h_photonTurnOn_den->Fill(recoPhotonPt); + if (hasFired){ + // passed base and signal trigger + if (recoPhotonPt>ptThrOffline_) h_metTurnOn_num->Fill(recoMET); + if (recoMET>metThrOffline_) h_photonTurnOn_num->Fill(recoPhotonPt); + } + } +} + +void SUSY_HLT_PhotonMET::endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& eSetup) +{ + edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::endLuminosityBlock" << std::endl; +} + + +void SUSY_HLT_PhotonMET::endRun(edm::Run const& run, edm::EventSetup const& eSetup) +{ + edm::LogInfo("SUSY_HLT_PhotonMET") << "SUSY_HLT_PhotonMET::endRun" << std::endl; +} + +void SUSY_HLT_PhotonMET::bookHistos(DQMStore::IBooker & ibooker_) +{ + ibooker_.cd(); + ibooker_.setCurrentFolder("HLT/SUSYBSM/" + triggerPath_); + + //offline quantities + h_recoPhotonPt = ibooker_.book1D("recoPhotonPt", "reco Photon transverse momentum; p_{T} (GeV)", 20, 0, 1000); + h_recoMet = ibooker_.book1D("recoMet", "reco Missing transverse energy;E_{T}^{miss} (GeV)", 20, 0, 1000); + h_metTurnOn_num = ibooker_.book1D("pfMetTurnOn_num", "PF MET Turn On Numerator", 20, 0, 500); + h_metTurnOn_den = ibooker_.book1D("pfMetTurnOn_den", "PF MET Turn On Denominator", 20, 0, 500); + h_photonTurnOn_num = ibooker_.book1D("photonTurnOn_num", "Photon Turn On Numerator", 20, 0, 1000); + h_photonTurnOn_den = ibooker_.book1D("photonTurnOn_den", "Photon Turn On Denominator", 20, 0, 1000); + + ibooker_.cd(); +} + +//define this as a plug-in +DEFINE_FWK_MODULE(SUSY_HLT_PhotonMET); From 26043f5bbabecca1540ae1c6c472b3d9d25440d9 Mon Sep 17 00:00:00 2001 From: Johannes Lange Date: Fri, 29 Jan 2016 10:11:52 +0100 Subject: [PATCH 225/250] adding PhotonMET trigger to validation and post-processing configs --- HLTriggerOffline/SUSYBSM/python/SUSYBSM_postProcessor_cff.py | 2 ++ HLTriggerOffline/SUSYBSM/python/SusyExoValidation_cff.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_postProcessor_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_postProcessor_cff.py index b531c3376c3dc..100d0ce7fa58e 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_postProcessor_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_postProcessor_cff.py @@ -26,6 +26,7 @@ from HLTriggerOffline.SUSYBSM.SUSYBSM_Razor_cff import * from HLTriggerOffline.SUSYBSM.SUSYBSM_caloHT_cff import * from HLTriggerOffline.SUSYBSM.SUSYBSM_PhotonHT_cff import * +from HLTriggerOffline.SUSYBSM.SUSYBSM_HLT_PhotonMET_cff import * from HLTriggerOffline.SUSYBSM.SUSYBSM_HLT_HT_DoubleMuon_cff import * from HLTriggerOffline.SUSYBSM.SUSYBSM_HLT_HT_DoubleElectron_cff import * from HLTriggerOffline.SUSYBSM.SUSYBSM_HLT_HT_MuEle_cff import * @@ -58,6 +59,7 @@ SUSY_HLT_Razor_PostVal_POSTPROCESSING + SUSY_HLT_CaloHT_POSTPROCESSING + SUSY_HLT_PhotonHT_POSTPROCESSING + + SUSY_HLT_PhotonMET_POSTPROCESSING + SUSY_HLT_HT_DoubleMuon_POSTPROCESSING + SUSY_HLT_HT_DoubleEle_POSTPROCESSING + SUSY_HLT_HT_MuEle_POSTPROCESSING + diff --git a/HLTriggerOffline/SUSYBSM/python/SusyExoValidation_cff.py b/HLTriggerOffline/SUSYBSM/python/SusyExoValidation_cff.py index 446abd21c2001..46a37fb217af0 100644 --- a/HLTriggerOffline/SUSYBSM/python/SusyExoValidation_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SusyExoValidation_cff.py @@ -26,6 +26,7 @@ from HLTriggerOffline.SUSYBSM.SUSYBSM_Razor_cff import * from HLTriggerOffline.SUSYBSM.SUSYBSM_caloHT_cff import * from HLTriggerOffline.SUSYBSM.SUSYBSM_PhotonHT_cff import * +from HLTriggerOffline.SUSYBSM.SUSYBSM_HLT_PhotonMET_cff import * from HLTriggerOffline.SUSYBSM.SUSYBSM_HLT_HT_DoubleMuon_cff import * from HLTriggerOffline.SUSYBSM.SUSYBSM_HLT_HT_DoubleElectron_cff import * from HLTriggerOffline.SUSYBSM.SUSYBSM_HLT_HT_MuEle_cff import * @@ -81,6 +82,7 @@ SUSY_HLT_CaloHT350 + SUSY_HLT_CaloHT400 + SUSY_HLT_PhotonHT + + SUSY_HLT_PhotonMET + SUSY_HLT_HT_DoubleMuon + SUSY_HLT_HT_DoubleEle + SUSY_HLT_HT_MuEle + From 368ff1e452fdc86fe2b6381d4dab9b4f64ddd1e1 Mon Sep 17 00:00:00 2001 From: Johannes Lange Date: Mon, 1 Feb 2016 12:31:36 +0100 Subject: [PATCH 226/250] adding different pt-versions of the PhotonMET trigger family --- .../python/SUSYBSM_HLT_PhotonMET_cff.py | 48 ++++++++++++++++++- .../python/SUSYBSM_postProcessor_cff.py | 4 +- .../SUSYBSM/python/SusyExoValidation_cff.py | 4 +- 3 files changed, 52 insertions(+), 4 deletions(-) diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_PhotonMET_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_PhotonMET_cff.py index 8cc5aa5364564..f458e492c0c4e 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_PhotonMET_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_PhotonMET_cff.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -SUSY_HLT_PhotonMET = cms.EDAnalyzer("SUSY_HLT_PhotonMET", +SUSY_HLT_PhotonMET_pt36 = cms.EDAnalyzer("SUSY_HLT_PhotonMET", trigSummary = cms.InputTag("hltTriggerSummaryAOD",'', 'HLT'), pfMETCollection = cms.InputTag("pfMet"), photonCollection = cms.InputTag("gedPhotons"), @@ -12,7 +12,31 @@ metThrOffline = cms.untracked.double(100), ) -SUSY_HLT_PhotonMET_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", +SUSY_HLT_PhotonMET_pt50 = cms.EDAnalyzer("SUSY_HLT_PhotonMET", + trigSummary = cms.InputTag("hltTriggerSummaryAOD",'', 'HLT'), + pfMETCollection = cms.InputTag("pfMet"), + photonCollection = cms.InputTag("gedPhotons"), + TriggerResults = cms.InputTag('TriggerResults','','HLT'), + HLTProcess = cms.string('HLT'), + TriggerPath = cms.string('HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_PFMET40_v'), + TriggerPathBase = cms.string('HLT_IsoMu27_v'), + ptThrOffline = cms.untracked.double(75), + metThrOffline = cms.untracked.double(100), +) + +SUSY_HLT_PhotonMET_pt75 = cms.EDAnalyzer("SUSY_HLT_PhotonMET", + trigSummary = cms.InputTag("hltTriggerSummaryAOD",'', 'HLT'), + pfMETCollection = cms.InputTag("pfMet"), + photonCollection = cms.InputTag("gedPhotons"), + TriggerResults = cms.InputTag('TriggerResults','','HLT'), + HLTProcess = cms.string('HLT'), + TriggerPath = cms.string('HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_PFMET40_v'), + TriggerPathBase = cms.string('HLT_IsoMu27_v'), + ptThrOffline = cms.untracked.double(100), + metThrOffline = cms.untracked.double(100), +) + +SUSY_HLT_PhotonMET_pt36_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Photon36_R9Id90_HE10_Iso40_EBOnly_PFMET40_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), @@ -21,3 +45,23 @@ "metTurnOn_eff 'Turn-on vs E_{T}^{miss}; E_{T}^{miss} (GeV); #epsilon' pfMetTurnOn_num pfMetTurnOn_den", ) ) + +SUSY_HLT_PhotonMET_pt50_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Photon50_R9Id90_HE10_Iso40_EBOnly_PFMET40_v"), + verbose = cms.untracked.uint32(2), # Set to 2 for all messages + resolution = cms.vstring(""), + efficiency = cms.vstring( + "photonPtTurnOn_eff 'Turn-on vs photon; p_{T} (GeV); #epsilon' photonTurnOn_num photonTurnOn_den", + "metTurnOn_eff 'Turn-on vs E_{T}^{miss}; E_{T}^{miss} (GeV); #epsilon' pfMetTurnOn_num pfMetTurnOn_den", + ) +) + +SUSY_HLT_PhotonMET_pt75_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Photon75_R9Id90_HE10_Iso40_EBOnly_PFMET40_v"), + verbose = cms.untracked.uint32(2), # Set to 2 for all messages + resolution = cms.vstring(""), + efficiency = cms.vstring( + "photonPtTurnOn_eff 'Turn-on vs photon; p_{T} (GeV); #epsilon' photonTurnOn_num photonTurnOn_den", + "metTurnOn_eff 'Turn-on vs E_{T}^{miss}; E_{T}^{miss} (GeV); #epsilon' pfMetTurnOn_num pfMetTurnOn_den", + ) +) diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_postProcessor_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_postProcessor_cff.py index 100d0ce7fa58e..5f9eb67ffdad2 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_postProcessor_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_postProcessor_cff.py @@ -59,7 +59,9 @@ SUSY_HLT_Razor_PostVal_POSTPROCESSING + SUSY_HLT_CaloHT_POSTPROCESSING + SUSY_HLT_PhotonHT_POSTPROCESSING + - SUSY_HLT_PhotonMET_POSTPROCESSING + + SUSY_HLT_PhotonMET_pt36_POSTPROCESSING + + SUSY_HLT_PhotonMET_pt50_POSTPROCESSING + + SUSY_HLT_PhotonMET_pt75_POSTPROCESSING + SUSY_HLT_HT_DoubleMuon_POSTPROCESSING + SUSY_HLT_HT_DoubleEle_POSTPROCESSING + SUSY_HLT_HT_MuEle_POSTPROCESSING + diff --git a/HLTriggerOffline/SUSYBSM/python/SusyExoValidation_cff.py b/HLTriggerOffline/SUSYBSM/python/SusyExoValidation_cff.py index 46a37fb217af0..5aad4e8821faf 100644 --- a/HLTriggerOffline/SUSYBSM/python/SusyExoValidation_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SusyExoValidation_cff.py @@ -82,7 +82,9 @@ SUSY_HLT_CaloHT350 + SUSY_HLT_CaloHT400 + SUSY_HLT_PhotonHT + - SUSY_HLT_PhotonMET + + SUSY_HLT_PhotonMET_pt36 + + SUSY_HLT_PhotonMET_pt50 + + SUSY_HLT_PhotonMET_pt75 + SUSY_HLT_HT_DoubleMuon + SUSY_HLT_HT_DoubleEle + SUSY_HLT_HT_MuEle + From 04e5ffc26a0bce25338f5335341de525b052ae85 Mon Sep 17 00:00:00 2001 From: Raphael Friese Date: Mon, 1 Feb 2016 16:19:57 +0100 Subject: [PATCH 227/250] adjust comment to use proper Tags --- RecoMET/METPUSubtraction/python/mvaPFMET_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py b/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py index e5057b1d5a620..807ab018eadb2 100644 --- a/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py +++ b/RecoMET/METPUSubtraction/python/mvaPFMET_cff.py @@ -11,7 +11,7 @@ calibratedAK4PFJetsForPFMVAMEt = cms.EDProducer('CorrectedPFJetProducer', src = cms.InputTag('ak4PFJets'), - correctors = cms.VInputTag("ak4PFL1FastL2L3Corrector") # NOTE: use "ak5PFL1FastL2L3" for MC / "ak5PFL1FastL2L3Residual" for Data + correctors = cms.VInputTag("ak4PFL1FastL2L3Corrector") # NOTE: use "ak4PFL1FastL2L3Corrector" for MC / "ak4PFL1FastL2L3ResidualCorrector" for Data ) from JetMETCorrections.Configuration.JetCorrectionServices_cff import ak4PFL1Fastjet from RecoJets.JetProducers.PileupJetID_cfi import pileupJetIdEvaluator From 720081afa19fbc52ba1fe9d980f2fb809391a6af Mon Sep 17 00:00:00 2001 From: Malik Shahzad Muzaffar Date: Mon, 1 Feb 2016 16:38:21 +0100 Subject: [PATCH 228/250] Ignore rootlogon to avoid conflicts Fix for edmCheckClassTransients (same fix as #13113) --- FWCore/Utilities/scripts/edmCheckClassTransients | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/FWCore/Utilities/scripts/edmCheckClassTransients b/FWCore/Utilities/scripts/edmCheckClassTransients index dee47f5e98c6b..745d5e09f7d1f 100755 --- a/FWCore/Utilities/scripts/edmCheckClassTransients +++ b/FWCore/Utilities/scripts/edmCheckClassTransients @@ -58,6 +58,11 @@ oparser.add_option("-f","--rootmap", dest="rmfiles", action="append", default=[] (options,args)=oparser.parse_args() +#Need to not have ROOT load .rootlogon.(C|py) since it can cause interference. +# The only way to do that is to pass -n from the command line +import sys +sys.argv.append("-n") + import ROOT #Keep ROOT from trying to use X11 ROOT.gROOT.SetBatch(True) From 26823e71ffc1212ea67a14c9eac49e0a089cb35f Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Mon, 1 Feb 2016 16:48:26 +0100 Subject: [PATCH 229/250] Use standard include for magnetic field --- Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py b/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py index 0b5898e416274..cc6827a0282d1 100644 --- a/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py +++ b/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py @@ -124,7 +124,7 @@ ) process.load("Configuration.StandardSequences.GeometryDB_cff") -process.load('Configuration.StandardSequences.MagneticField_38T_PostLS1_cff') +process.load('Configuration.StandardSequences.MagneticField_cff') if len(good_lumis)>0: process.source = cms.Source("PoolSource", From ddadb9237ac1530baf406dde1cb81b3406f1fba1 Mon Sep 17 00:00:00 2001 From: Aysen Tatarinov Date: Mon, 1 Feb 2016 16:51:34 +0100 Subject: [PATCH 230/250] Update include for frontier conditions --- Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py b/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py index cc6827a0282d1..09851681aa51a 100644 --- a/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py +++ b/Alignment/MuonAlignmentAlgorithms/python/gather_cfg.py @@ -230,7 +230,7 @@ process.looper.monitorConfig.AlignmentMonitorMuonVsCurvature.doDT = doDT process.looper.monitorConfig.AlignmentMonitorMuonVsCurvature.doCSC = doCSC -process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff") +process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") process.GlobalTag.globaltag = cms.string(globaltag) process.looper.applyDbAlignment = True process.load("RecoVertex.BeamSpotProducer.BeamSpot_cfi") From 43237a6be00b2eb3e89066db49517a9b2e59e68e Mon Sep 17 00:00:00 2001 From: Ianna Osborne Date: Mon, 1 Feb 2016 17:58:37 +0100 Subject: [PATCH 231/250] Fix missing HepMC Product error --- .../PrintGeomInfo/test/python/runSens_cfg.py | 18 +++++++++++++----- .../test/python/run_MaterialBudgeInfo_cfg.py | 12 +++++++++--- SimG4Core/PrintGeomInfo/test/python/run_cfg.py | 14 ++++++++++---- 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/SimG4Core/PrintGeomInfo/test/python/runSens_cfg.py b/SimG4Core/PrintGeomInfo/test/python/runSens_cfg.py index 6e73df0dfb6e0..020e57820119b 100644 --- a/SimG4Core/PrintGeomInfo/test/python/runSens_cfg.py +++ b/SimG4Core/PrintGeomInfo/test/python/runSens_cfg.py @@ -3,8 +3,10 @@ process = cms.Process("PrintGeom") process.load('FWCore.MessageService.MessageLogger_cfi') -process.load("Geometry.CMSCommonData.cmsIdealGeometryXML_cfi") -process.load("Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi") +process.load('Geometry.CMSCommonData.cmsIdealGeometryXML_cfi') +process.load('Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi') +process.load('Geometry.HcalCommonData.hcalParameters_cfi') +process.load('Geometry.HcalCommonData.hcalDDDSimConstants_cfi') process.MessageLogger.destinations = cms.untracked.vstring("SensDet.txt") @@ -12,7 +14,9 @@ input = cms.untracked.int32(1) ) -process.load("SimGeneral.HepPDTESSource.pdt_cfi") +process.load('SimGeneral.HepPDTESSource.pdt_cfi') +process.load('IOMC.EventVertexGenerators.VtxSmearedFlat_cfi') +process.load('GeneratorInterface.Core.generatorSmeared_cfi') process.source = cms.Source("EmptySource") @@ -38,15 +42,19 @@ initialSeed = cms.untracked.uint32(123456789), engineName = cms.untracked.string('HepJamesRandom') ), + VtxSmeared = cms.PSet( + engineName = cms.untracked.string('HepJamesRandom'), + initialSeed = cms.untracked.uint32(98765432) + ), g4SimHits = cms.PSet( initialSeed = cms.untracked.uint32(11), engineName = cms.untracked.string('HepJamesRandom') ) ) -process.load("SimG4Core.Application.g4SimHits_cfi") +process.load('SimG4Core.Application.g4SimHits_cfi') -process.p1 = cms.Path(process.generator*process.g4SimHits) +process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.g4SimHits) process.g4SimHits.UseMagneticField = False process.g4SimHits.Physics.DefaultCutValue = 10. diff --git a/SimG4Core/PrintGeomInfo/test/python/run_MaterialBudgeInfo_cfg.py b/SimG4Core/PrintGeomInfo/test/python/run_MaterialBudgeInfo_cfg.py index f93b518e0bc36..65a67b2f0fece 100644 --- a/SimG4Core/PrintGeomInfo/test/python/run_MaterialBudgeInfo_cfg.py +++ b/SimG4Core/PrintGeomInfo/test/python/run_MaterialBudgeInfo_cfg.py @@ -14,7 +14,9 @@ input = cms.untracked.int32(1) ) -process.load("SimGeneral.HepPDTESSource.pdt_cfi") +process.load('SimGeneral.HepPDTESSource.pdt_cfi') +process.load('IOMC.EventVertexGenerators.VtxSmearedFlat_cfi') +process.load('GeneratorInterface.Core.generatorSmeared_cfi') process.source = cms.Source("EmptySource") @@ -40,15 +42,19 @@ initialSeed = cms.untracked.uint32(123456789), engineName = cms.untracked.string('HepJamesRandom') ), + VtxSmeared = cms.PSet( + engineName = cms.untracked.string('HepJamesRandom'), + initialSeed = cms.untracked.uint32(98765432) + ), g4SimHits = cms.PSet( initialSeed = cms.untracked.uint32(11), engineName = cms.untracked.string('HepJamesRandom') ) ) -process.load("SimG4Core.Application.g4SimHits_cfi") +process.load('SimG4Core.Application.g4SimHits_cfi') -process.p1 = cms.Path(process.generator*process.g4SimHits) +process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.g4SimHits) process.g4SimHits.Physics.type = 'SimG4Core/Physics/DummyPhysics' process.g4SimHits.UseMagneticField = False diff --git a/SimG4Core/PrintGeomInfo/test/python/run_cfg.py b/SimG4Core/PrintGeomInfo/test/python/run_cfg.py index a9560eed4ba28..96ead2fe51ebe 100644 --- a/SimG4Core/PrintGeomInfo/test/python/run_cfg.py +++ b/SimG4Core/PrintGeomInfo/test/python/run_cfg.py @@ -3,7 +3,7 @@ process = cms.Process("PrintGeom") process.load('FWCore.MessageService.MessageLogger_cfi') -process.load("SimG4Core.PrintGeomInfo.testTotemGeometryXML_cfi") +process.load('SimG4Core.PrintGeomInfo.testTotemGeometryXML_cfi') process.MessageLogger.destinations = cms.untracked.vstring("Totem.txt") @@ -11,7 +11,9 @@ input = cms.untracked.int32(1) ) -process.load("SimGeneral.HepPDTESSource.pdt_cfi") +process.load('SimGeneral.HepPDTESSource.pdt_cfi') +process.load('IOMC.EventVertexGenerators.VtxSmearedFlat_cfi') +process.load('GeneratorInterface.Core.generatorSmeared_cfi') process.source = cms.Source("EmptySource") @@ -37,15 +39,19 @@ initialSeed = cms.untracked.uint32(123456789), engineName = cms.untracked.string('HepJamesRandom') ), + VtxSmeared = cms.PSet( + engineName = cms.untracked.string('HepJamesRandom'), + initialSeed = cms.untracked.uint32(98765432) + ), g4SimHits = cms.PSet( initialSeed = cms.untracked.uint32(11), engineName = cms.untracked.string('HepJamesRandom') ) ) -process.load("SimG4Core.Application.g4SimHits_cfi") +process.load('SimG4Core.Application.g4SimHits_cfi') -process.p1 = cms.Path(process.generator*process.g4SimHits) +process.p1 = cms.Path(process.generator*process.VtxSmeared*process.generatorSmeared*process.g4SimHits) process.g4SimHits.Physics.type = 'SimG4Core/Physics/DummyPhysics' process.g4SimHits.UseMagneticField = False From 54d9ed923e0db1bfdbc77615158853547a24cbb2 Mon Sep 17 00:00:00 2001 From: Slava Krutelyov Date: Mon, 1 Feb 2016 18:04:56 +0100 Subject: [PATCH 232/250] add extra initialization checks for short-cirquited cases with no inputs (effects not accounted in PR 11902) --- .../plugins/VirtualJetProducer.cc | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/RecoJets/JetProducers/plugins/VirtualJetProducer.cc b/RecoJets/JetProducers/plugins/VirtualJetProducer.cc index a0333bc0feb85..6bc39c0091e7c 100644 --- a/RecoJets/JetProducers/plugins/VirtualJetProducer.cc +++ b/RecoJets/JetProducers/plugins/VirtualJetProducer.cc @@ -618,16 +618,21 @@ void VirtualJetProducer::writeJets( edm::Event & iEvent, edm::EventSetup const& fastjet::ClusterSequenceAreaBase const* clusterSequenceWithArea = dynamic_cast ( &*fjClusterSeq_ ); - - for(int ie = 0; ie < nEta; ++ie){ - double eta = puCenters_[ie]; - double etamin=eta-puWidth_; - double etamax=eta+puWidth_; - fastjet::RangeDefinition range_rho(etamin,etamax); - fastjet::BackgroundEstimator bkgestim(*clusterSequenceWithArea,range_rho); - bkgestim.set_excluded_jets(fjexcluded_jets); - rhos->push_back(bkgestim.rho()); - sigmas->push_back(bkgestim.sigma()); + if (clusterSequenceWithArea ==nullptr ){ + if (fjJets_.size() > 0) { + throw cms::Exception("LogicError")<<"fjClusterSeq is not initialized while inputs are present\n "; + } + } else { + for(int ie = 0; ie < nEta; ++ie){ + double eta = puCenters_[ie]; + double etamin=eta-puWidth_; + double etamax=eta+puWidth_; + fastjet::RangeDefinition range_rho(etamin,etamax); + fastjet::BackgroundEstimator bkgestim(*clusterSequenceWithArea,range_rho); + bkgestim.set_excluded_jets(fjexcluded_jets); + rhos->push_back(bkgestim.rho()); + sigmas->push_back(bkgestim.sigma()); + } } iEvent.put(rhos,"rhos"); iEvent.put(sigmas,"sigmas"); @@ -644,11 +649,17 @@ void VirtualJetProducer::writeJets( edm::Event & iEvent, edm::EventSetup const& edm::LogWarning("StrangeNEmtpyJets") << "n_empty_jets is : " << clusterSequenceWithArea->n_empty_jets(*fjRangeDef_) << " with range " << fjRangeDef_->description() << "."; } */ - clusterSequenceWithArea->get_median_rho_and_sigma(*fjRangeDef_,false,*rho,*sigma,mean_area); - if((*rho < 0)|| (edm::isNotFinite(*rho))) { - edm::LogError("BadRho") << "rho value is " << *rho << " area:" << mean_area << " and n_empty_jets: " << clusterSequenceWithArea->n_empty_jets(*fjRangeDef_) << " with range " << fjRangeDef_->description() - <<". Setting rho to rezo."; - *rho = 0; + if (clusterSequenceWithArea ==nullptr ){ + if (fjJets_.size() > 0) { + throw cms::Exception("LogicError")<<"fjClusterSeq is not initialized while inputs are present\n "; + } + } else { + clusterSequenceWithArea->get_median_rho_and_sigma(*fjRangeDef_,false,*rho,*sigma,mean_area); + if((*rho < 0)|| (edm::isNotFinite(*rho))) { + edm::LogError("BadRho") << "rho value is " << *rho << " area:" << mean_area << " and n_empty_jets: " << clusterSequenceWithArea->n_empty_jets(*fjRangeDef_) << " with range " << fjRangeDef_->description() + <<". Setting rho to rezo."; + *rho = 0; + } } iEvent.put(rho,"rho"); iEvent.put(sigma,"sigma"); From 49ccf2fc887491624d09d44910e5d3a0abd467d1 Mon Sep 17 00:00:00 2001 From: Marco Musich Date: Mon, 1 Feb 2016 18:14:47 +0100 Subject: [PATCH 233/250] Update Mustache SuperCluster regressions for Run1 MC as well --- Configuration/AlCa/python/autoCond.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Configuration/AlCa/python/autoCond.py b/Configuration/AlCa/python/autoCond.py index a0722c8d7c14b..db96c591d5383 100644 --- a/Configuration/AlCa/python/autoCond.py +++ b/Configuration/AlCa/python/autoCond.py @@ -2,13 +2,13 @@ ### NEW KEYS ### # GlobalTag for MC production with perfectly aligned and calibrated detector for Run1 - 'run1_design' : '80X_mcRun1_design_v3', + 'run1_design' : '80X_mcRun1_design_v4', # GlobalTag for MC production (pp collisions) with realistic alignment and calibrations for Run1 - 'run1_mc' : '80X_mcRun1_realistic_v3', + 'run1_mc' : '80X_mcRun1_realistic_v4', # GlobalTag for MC production (Heavy Ions collisions) with realistic alignment and calibrations for Run1 - 'run1_mc_hi' : '80X_mcRun1_HeavyIon_v3', + 'run1_mc_hi' : '80X_mcRun1_HeavyIon_v4', # GlobalTag for MC production (p-Pb collisions) with realistic alignment and calibrations for Run1 - 'run1_mc_pa' : '80X_mcRun1_pA_v3', + 'run1_mc_pa' : '80X_mcRun1_pA_v4', # GlobalTag for MC production with perfectly aligned and calibrated detector for Run2 'run2_design' : '80X_mcRun2_design_v4', # GlobalTag for MC production with pessimistic alignment and calibrations for Run2 From 54411b2376ca47e64d52799b9d622c0ed7aa3650 Mon Sep 17 00:00:00 2001 From: Michael Mulhearn Date: Mon, 1 Feb 2016 22:39:32 +0100 Subject: [PATCH 234/250] setup muon cond format plugins, fetch, and import --- CondCore/L1TPlugins/src/plugin.cc | 9 +++++++++ CondCore/Utilities/src/CondDBFetch.cc | 3 +++ CondCore/Utilities/src/CondDBImport.cc | 3 +++ CondCore/Utilities/src/CondFormats.h | 3 +++ 4 files changed, 18 insertions(+) diff --git a/CondCore/L1TPlugins/src/plugin.cc b/CondCore/L1TPlugins/src/plugin.cc index 6dc25d58b92ca..ab294d419b49f 100644 --- a/CondCore/L1TPlugins/src/plugin.cc +++ b/CondCore/L1TPlugins/src/plugin.cc @@ -210,4 +210,13 @@ REGISTER_PLUGIN(L1TCaloConfigRcd, CaloConfig); #include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h" #include "CondFormats/DataRecord/interface/L1TMuonOverlapParamsRcd.h" + +#include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h" +#include "CondFormats/DataRecord/interface/L1TMuonBarrelParamsRcd.h" + +#include "CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h" +#include "CondFormats/DataRecord/interface/L1TMuonGlobalParamsRcd.h" + REGISTER_PLUGIN(L1TMuonOverlapParamsRcd, L1TMuonOverlapParams); +REGISTER_PLUGIN(L1TMuonBarrelParamsRcd, L1TMuonBarrelParams); +REGISTER_PLUGIN(L1TMuonGlobalParamsRcd, L1TMuonGlobalParams); diff --git a/CondCore/Utilities/src/CondDBFetch.cc b/CondCore/Utilities/src/CondDBFetch.cc index f28d758193fe7..5085a3683028b 100644 --- a/CondCore/Utilities/src/CondDBFetch.cc +++ b/CondCore/Utilities/src/CondDBFetch.cc @@ -202,6 +202,9 @@ namespace cond { FETCH_PAYLOAD_CASE( L1RPCHwConfig ) FETCH_PAYLOAD_CASE( l1t::CaloParams ) FETCH_PAYLOAD_CASE( l1t::CaloConfig ) + FETCH_PAYLOAD_CASE( L1TMuonBarrelParams ) + FETCH_PAYLOAD_CASE( L1TMuonGlobalParams ) + FETCH_PAYLOAD_CASE( L1TMuonOverlapParams ) FETCH_PAYLOAD_CASE( L1TriggerKey ) FETCH_PAYLOAD_CASE( L1TriggerKeyList ) FETCH_PAYLOAD_CASE( lumi::LumiSectionData ) diff --git a/CondCore/Utilities/src/CondDBImport.cc b/CondCore/Utilities/src/CondDBImport.cc index c77929e266898..a8e1cd62a9c1b 100644 --- a/CondCore/Utilities/src/CondDBImport.cc +++ b/CondCore/Utilities/src/CondDBImport.cc @@ -214,6 +214,9 @@ namespace cond { IMPORT_PAYLOAD_CASE( L1RPCHwConfig ) IMPORT_PAYLOAD_CASE( l1t::CaloParams ) IMPORT_PAYLOAD_CASE( l1t::CaloConfig ) + IMPORT_PAYLOAD_CASE( L1TMuonBarrelParams ) + IMPORT_PAYLOAD_CASE( L1TMuonGlobalParams ) + IMPORT_PAYLOAD_CASE( L1TMuonOverlapParams ) IMPORT_PAYLOAD_CASE( L1TriggerKey ) IMPORT_PAYLOAD_CASE( MagFieldConfig ) if( inputTypeName == "L1TriggerKeyList" ){ diff --git a/CondCore/Utilities/src/CondFormats.h b/CondCore/Utilities/src/CondFormats.h index b296ebfe3d8dd..8d3f6103210ef 100644 --- a/CondCore/Utilities/src/CondFormats.h +++ b/CondCore/Utilities/src/CondFormats.h @@ -214,6 +214,9 @@ #include "CondFormats/L1TObjects/interface/L1RPCHsbConfig.h" #include "CondFormats/L1TObjects/interface/CaloConfig.h" #include "CondFormats/L1TObjects/interface/CaloParams.h" +#include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h" +#include "CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h" +#include "CondFormats/L1TObjects/interface/L1TMuonOverlapParams.h" #include "CondFormats/L1TObjects/interface/L1TriggerKey.h" #include "CondFormats/L1TObjects/interface/L1TriggerKeyList.h" #include "CondFormats/PhysicsToolsObjects/interface/Histogram3D.h" From d23705e50acaabea8f289f900728f93a37609449 Mon Sep 17 00:00:00 2001 From: Michael Mulhearn Date: Mon, 1 Feb 2016 22:48:53 +0100 Subject: [PATCH 235/250] extend serialization tests to include remaining muon cond formats classes --- CondFormats/L1TObjects/test/testSerializationL1TObjects.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CondFormats/L1TObjects/test/testSerializationL1TObjects.cpp b/CondFormats/L1TObjects/test/testSerializationL1TObjects.cpp index 1557666c449b7..2680f29db25f7 100644 --- a/CondFormats/L1TObjects/test/testSerializationL1TObjects.cpp +++ b/CondFormats/L1TObjects/test/testSerializationL1TObjects.cpp @@ -6,6 +6,8 @@ int main() { testSerialization(); + testSerialization(); + testSerialization(); testSerialization(); testSerialization(); testSerialization(); From 125ca04e532e2621841bf10190702ffc703fdb66 Mon Sep 17 00:00:00 2001 From: Philip Date: Tue, 2 Feb 2016 02:31:06 +0100 Subject: [PATCH 236/250] Added code to set Photon weigh to 1 --- .../PileupAlgos/plugins/PuppiPhoton.cc | 224 ++++++++++++++++++ CommonTools/PileupAlgos/plugins/PuppiPhoton.h | 55 +++++ .../PileupAlgos/python/PhotonPuppi_cff.py | 26 ++ CommonTools/PileupAlgos/test/testPUMods.py | 16 +- 4 files changed, 317 insertions(+), 4 deletions(-) create mode 100644 CommonTools/PileupAlgos/plugins/PuppiPhoton.cc create mode 100644 CommonTools/PileupAlgos/plugins/PuppiPhoton.h create mode 100644 CommonTools/PileupAlgos/python/PhotonPuppi_cff.py diff --git a/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc b/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc new file mode 100644 index 0000000000000..5c2d5eaab7542 --- /dev/null +++ b/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc @@ -0,0 +1,224 @@ + +// 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 "DataFormats/Common/interface/ValueMap.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "DataFormats/Common/interface/View.h" +#include "DataFormats/Candidate/interface/CandidateFwd.h" +#include "DataFormats/PatCandidates/interface/PackedCandidate.h" +#include "DataFormats/PatCandidates/interface/Photon.h" +#include "DataFormats/PatCandidates/interface/Electron.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h" +#include "DataFormats/ParticleFlowCandidate/interface/PFCandidateFwd.h" +#include "DataFormats/VertexReco/interface/VertexFwd.h" +#include "DataFormats/VertexReco/interface/Vertex.h" +#include "DataFormats/GsfTrackReco/interface/GsfTrack.h" +#include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h" +#include "DataFormats/Common/interface/Association.h" +//Main File +#include "CommonTools/PileupAlgos/plugins/PuppiPhoton.h" + +// ------------------------------------------------------------------------------------------ +PuppiPhoton::PuppiPhoton(const edm::ParameterSet& iConfig) { + tokenPFCandidates_ = consumes(iConfig.getParameter("candName")); + tokenPuppiCandidates_ = consumes(iConfig.getParameter("puppiCandName")); + tokenPhotonCandidates_ = consumes(iConfig.getParameter("photonName")); + tokenPhotonId_ = consumes >(iConfig.getParameter("photonId")); + pt_ = iConfig.getUntrackedParameter("pt"); + dRMatch_ = iConfig.getUntrackedParameter > ("dRMatch"); + pdgIds_ = iConfig.getUntrackedParameter >("pdgids"); + usePFRef_ = iConfig.getUntrackedParameter("useRefs"); + weight_ = iConfig.getUntrackedParameter("weight"); + useValueMap_ = iConfig.getUntrackedParameter("useValueMap"); + tokenWeights_ = consumes >(iConfig.getParameter("weightsName")); + + usePhotonId_ = (iConfig.getParameter("photonId")).label().size() == 0; + produces(); + produces< edm::ValueMap >(); +} +// ------------------------------------------------------------------------------------------ +PuppiPhoton::~PuppiPhoton(){} +// ------------------------------------------------------------------------------------------ +void PuppiPhoton::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { + + edm::Handle hPhoProduct; + iEvent.getByToken(tokenPhotonCandidates_,hPhoProduct); + const CandidateView *phoCol = hPhoProduct.product(); + + edm::Handle > photonId; + if(usePhotonId_) iEvent.getByToken(tokenPhotonId_,photonId); + int iC = -1; + std::vector phoCands; + std::vector phoIndx; + + // Get PFCandidate Collection + edm::Handle hPFProduct; + iEvent.getByToken(tokenPFCandidates_,hPFProduct); + const CandidateView *pfCol = hPFProduct.product(); + + edm::Handle hPuppiProduct; + iEvent.getByToken(tokenPuppiCandidates_,hPuppiProduct); + const CandidateView *pupCol = hPuppiProduct.product(); + for(CandidateView::const_iterator itPho = phoCol->begin(); itPho!=phoCol->end(); itPho++) { + iC++; + bool passObject = false; + if(itPho->isPhoton() && usePhotonId_) passObject = (*photonId) [phoCol->ptrAt(iC)]; + if(itPho->pt() < pt_) continue; + if(!passObject && usePhotonId_) continue; + if(!usePFRef_) phoCands.push_back(&(*itPho)); + if(!usePFRef_) continue; + try{ + const pat::Photon *pPho = dynamic_cast(&(*itPho)); + if(pPho != 0) { + for( const edm::Ref & ref : pPho->associatedPackedPFCandidates() ) { + if(matchPFCandidate(&(*(pfCol->ptrAt(ref.key()))),&(*itPho))) { + phoIndx.push_back(ref.key()); + phoCands.push_back(&(*(pfCol->ptrAt(ref.key())))); + } + } + continue; + } + const pat::Electron *pElectron = dynamic_cast(&(*itPho)); + if(pElectron != 0) { + for( const edm::Ref & ref : pElectron->associatedPackedPFCandidates() ) + if(matchPFCandidate(&(*(pfCol->ptrAt(ref.key()))),&(*itPho))) { + phoIndx.push_back(ref.key()); + phoCands.push_back(&(*(pfCol->ptrAt(ref.key())))); + } + } + } catch(...) { + throw edm::Exception(edm::errors::LogicError,"PuppiPhoton: photon references not found"); + } + } + //Get Weights + edm::Handle > pupWeights; + iEvent.getByToken(tokenWeights_,pupWeights); + std::auto_ptr > p4PupOut(new edm::ValueMap()); + LorentzVectorCollection puppiP4s; + std::vector values(hPFProduct->size()); + int iPF = 0; + std::vector lWeights; + static const reco::PFCandidate dummySinceTranslateIsNotStatic; + corrCandidates_.reset( new PFOutputCollection ); + std::vector foundPhoIndex; + for(CandidateView::const_iterator itPF = pupCol->begin(); itPF!=pupCol->end(); itPF++) { + auto id = dummySinceTranslateIsNotStatic.translatePdgIdToType(itPF->pdgId()); + const reco::PFCandidate *pPF = dynamic_cast(&(*itPF)); + reco::PFCandidate pCand( pPF ? *pPF : reco::PFCandidate(itPF->charge(), itPF->p4(), id) ); + LorentzVector pVec = itPF->p4(); + float pWeight = 1.; + if(useValueMap_) pWeight = (*pupWeights)[pupCol->ptrAt(iPF)]; + if(!usePFRef_) { + for(std::vector::iterator itPho = phoCands.begin(); itPho!=phoCands.end(); itPho++) { + if(matchPFCandidate(&(*itPF),*itPho)) pWeight = weight_; + } + } else { + int iPho = -1; + for(std::vector::const_iterator itPho = phoIndx.begin(); itPho!=phoIndx.end(); itPho++) { + iPho++; + if(pupCol->refAt(iPF).key() != *itPho) continue; + pWeight = weight_; + if(!useValueMap_) { + double pCorr = phoCands[iPho]->pt()/itPF->pt(); + pWeight = pWeight*pCorr; + } + foundPhoIndex.push_back(iPho); + } + } + pVec.SetPxPyPzE(itPF->px()*pWeight,itPF->py()*pWeight,itPF->pz()*pWeight,itPF->energy()*pWeight); + lWeights.push_back(pWeight); + pCand.setP4(pVec); + puppiP4s.push_back( pVec ); + pCand.setSourceCandidatePtr( itPF->sourceCandidatePtr(0) ); + corrCandidates_->push_back(pCand); + iPF++; + } + //Add the missing pfcandidates + for(unsigned int iPho = 0; iPho < phoCands.size(); iPho++) { + bool pFound = false; + for(unsigned int jPho = 0; jPho < foundPhoIndex.size(); jPho++) { + if(foundPhoIndex[jPho] == int(iPho)) { + pFound = true; + break; + } + } + if(pFound) continue; + auto id = dummySinceTranslateIsNotStatic.translatePdgIdToType(phoCands[iPho]->pdgId()); + reco::PFCandidate pCand(reco::PFCandidate(phoCands[iPho]->charge(), phoCands[iPho]->p4(),id) ); + pCand.setSourceCandidatePtr( phoCands[iPho]->sourceCandidatePtr(0) ); + LorentzVector pVec = phoCands[iPho]->p4(); + pVec.SetPxPyPzE(phoCands[iPho]->px()*weight_,phoCands[iPho]->py()*weight_,phoCands[iPho]->pz()*weight_,phoCands[iPho]->energy()*weight_); + pCand.setP4(pVec); + lWeights.push_back(weight_); + puppiP4s.push_back( pVec ); + corrCandidates_->push_back(pCand); + } + //Fill it into the event + //std::auto_ptr > lPupOut(new edm::ValueMap()); + // edm::ValueMap::Filler lPupFiller(*lPupOut); + //lPupFiller.insert(hPFProduct,lWeights.begin(),lWeights.end()); + //lPupFiller.fill(); + //Compute the modified p4s + //edm::ValueMap::Filler p4PupFiller(*p4PupOut); + //p4PupFiller.insert(hPFProduct,puppiP4s.begin(), puppiP4s.end() ); + //p4PupFiller.fill(); + //iEvent.put(lPupOut); + //iEvent.put(p4PupOut); + edm::OrphanHandle oh = iEvent.put( corrCandidates_ ); + for(unsigned int ic=0, nc = pupCol->size(); ic < nc; ++ic) { + reco::CandidatePtr pkref( oh, ic ); + values[ic] = pkref; + } + std::auto_ptr > pfMap_p(new edm::ValueMap()); + edm::ValueMap::Filler filler(*pfMap_p); + filler.insert(hPFProduct, values.begin(), values.end()); + filler.fill(); + iEvent.put(pfMap_p); +} +// ------------------------------------------------------------------------------------------ +bool PuppiPhoton::matchPFCandidate(const reco::Candidate *iPF,const reco::Candidate *iPho) { + double pDEta = iPF->eta()-iPho->eta(); + double pDPhi = std::abs(iPF->phi()-iPho->phi()); + if(pDPhi > 2.*M_PI-pDPhi) pDPhi = 2.*M_PI-pDPhi; + double pDR2 = pDEta*pDEta+pDPhi*pDPhi; + for(unsigned int i0 = 0; i0 < pdgIds_.size(); i0++) { + if(std::abs(iPF->pdgId()) == pdgIds_[i0] && pDR2 < dRMatch_[i0]) return true; + } + return false; +} +// ------------------------------------------------------------------------------------------ +void PuppiPhoton::beginJob() { +} +// ------------------------------------------------------------------------------------------ +void PuppiPhoton::endJob() { +} +// ------------------------------------------------------------------------------------------ +void PuppiPhoton::beginRun(edm::Run&, edm::EventSetup const&) { +} +// ------------------------------------------------------------------------------------------ +void PuppiPhoton::endRun(edm::Run&, edm::EventSetup const&) { +} +// ------------------------------------------------------------------------------------------ +void PuppiPhoton::beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&) { +} +// ------------------------------------------------------------------------------------------ +void PuppiPhoton::endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&) { +} +// ------------------------------------------------------------------------------------------ +void PuppiPhoton::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + //The following says we do not know what parameters are allowed so do no validation + // Please change this to state exactly what you do use, even if it is no parameters + edm::ParameterSetDescription desc; + desc.setUnknown(); + descriptions.addDefault(desc); +} +//define this as a plug-in +DEFINE_FWK_MODULE(PuppiPhoton); diff --git a/CommonTools/PileupAlgos/plugins/PuppiPhoton.h b/CommonTools/PileupAlgos/plugins/PuppiPhoton.h new file mode 100644 index 0000000000000..011ca6cbfa699 --- /dev/null +++ b/CommonTools/PileupAlgos/plugins/PuppiPhoton.h @@ -0,0 +1,55 @@ +#ifndef CommonTools_Puppi_PuppiPhoton_h_ +#define CommonTools_Puppi_PuppiPhoton_h_ +// system include files +#include + +// user include files +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/stream/EDProducer.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/ParameterSet/interface/ParameterSet.h" +#include "DataFormats/Math/interface/PtEtaPhiMass.h" +#include "DataFormats/Candidate/interface/Candidate.h" + +// ------------------------------------------------------------------------------------------ +class PuppiPhoton : public edm::stream::EDProducer<> { + +public: + explicit PuppiPhoton(const edm::ParameterSet&); + ~PuppiPhoton(); + + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + typedef math::XYZTLorentzVector LorentzVector; + typedef std::vector LorentzVectorCollection; + typedef edm::View CandidateView; + typedef std::vector< reco::PFCandidate > PFOutputCollection; + typedef edm::View PFView; + +private: + virtual void beginJob() ; + virtual void produce(edm::Event&, const edm::EventSetup&); + virtual void endJob() ; + + virtual void beginRun(edm::Run&, edm::EventSetup const&); + virtual void endRun(edm::Run&, edm::EventSetup const&); + virtual void beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); + virtual void endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); + bool matchPFCandidate(const reco::Candidate *iPF,const reco::Candidate *iPho); + edm::EDGetTokenT< CandidateView > tokenPFCandidates_; + edm::EDGetTokenT< CandidateView > tokenPuppiCandidates_; + edm::EDGetTokenT< CandidateView > tokenPhotonCandidates_; + edm::EDGetTokenT< edm::ValueMap > tokenWeights_; + edm::EDGetTokenT< edm::ValueMap > tokenPhotonId_; + double pt_; + bool usePFRef_; + bool usePhotonId_; + std::vector dRMatch_; + std::vector pdgIds_; + std::auto_ptr< PFOutputCollection > corrCandidates_; + double weight_; + bool useValueMap_; +}; +#endif diff --git a/CommonTools/PileupAlgos/python/PhotonPuppi_cff.py b/CommonTools/PileupAlgos/python/PhotonPuppi_cff.py new file mode 100644 index 0000000000000..a57d864c69e48 --- /dev/null +++ b/CommonTools/PileupAlgos/python/PhotonPuppi_cff.py @@ -0,0 +1,26 @@ +import FWCore.ParameterSet.Config as cms +from PhysicsTools.SelectorUtils.tools.vid_id_tools import * + +puppiPhoton = cms.EDProducer("PuppiPhoton", + candName = cms.InputTag('packedPFCandidates'), + puppiCandName = cms.InputTag('puppi'), + photonName = cms.InputTag('slimmedPhotons'), + photonId = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-PHYS14-PU20bx25-V2-standalone-loose"), + pt = cms.untracked.double(10), + useRefs = cms.untracked.bool(True), + dRMatch = cms.untracked.vdouble(10,10,10,10), + pdgids = cms.untracked.vint32 (22,11,211,130), + weight = cms.untracked.double(1.), + useValueMap = cms.untracked.bool(False), + weightsName = cms.InputTag('puppi'), + ) + + +def setupPuppiPhoton(process): + my_id_modules = ['RecoEgamma.PhotonIdentification.Identification.cutBasedPhotonID_PHYS14_PU20bx25_V2_cff'] + switchOnVIDPhotonIdProducer(process, DataFormat.MiniAOD) + for idmod in my_id_modules: + setupAllVIDIdsInModule(process,idmod,setupVIDPhotonSelection) + + +#puppiPhotonSeq = cms.Sequence(egmPhotonIDSequence*puppiPhoton) diff --git a/CommonTools/PileupAlgos/test/testPUMods.py b/CommonTools/PileupAlgos/test/testPUMods.py index 3efd6e1254ff4..00e9f2658237a 100644 --- a/CommonTools/PileupAlgos/test/testPUMods.py +++ b/CommonTools/PileupAlgos/test/testPUMods.py @@ -1,20 +1,24 @@ import FWCore.ParameterSet.Config as cms - process = cms.Process('TestPUMods') + process.load('Configuration/StandardSequences/Services_cff') process.load('FWCore/MessageService/MessageLogger_cfi') process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff') +process.load("Configuration.StandardSequences.Geometry_cff") process.MessageLogger.cerr.FwkReport.reportEvery = 10 from Configuration.AlCa.GlobalTag import GlobalTag process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc', '') process.load('CommonTools/PileupAlgos/Puppi_cff') +process.load('CommonTools/PileupAlgos/PhotonPuppi_cff') +from CommonTools.PileupAlgos.PhotonPuppi_cff import setupPuppiPhoton + process.load('CommonTools/PileupAlgos/softKiller_cfi') -process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) ) +process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000) ) process.source = cms.Source("PoolSource", fileNames = cms.untracked.vstring( - '/store/mc/RunIISpring15DR74/QCD_Pt-15to7000_TuneCUETP8M1_Flat_13TeV_pythia8/GEN-SIM-RECO/AsymptFlat0to50bx25Reco_MCRUN2_74_V9-v3/10000/0009D30B-0207-E511-B581-0026182FD753.root' + '/store/mc/RunIISpring15MiniAODv2/GJets_HT-600ToInf_TuneCUETP8M1_13TeV-madgraphMLM-pythia8/MINIAODSIM/74X_mcRun2_asymptotic_v2-v1/60000/E2B9A332-966F-E511-9BAA-0026B927865E.root' ) ) process.source.inputCommands = cms.untracked.vstring("keep *", @@ -35,8 +39,12 @@ process.puppiNoLep.candName = cms.InputTag('packedPFCandidatesNoLep') process.puppiNoLep.vertexName = cms.InputTag('offlineSlimmedPrimaryVertices') +process.load('RecoMET.METProducers.PFMET_cfi') +process.pfMet.src = cms.InputTag('puppiPhoton') +setupPuppiPhoton(process) +process.puppiPhoton.puppiCandName = 'puppiNoLep' -process.puSequence = cms.Sequence(process.packedPFCandidatesNoLep+process.puppi+process.puppiNoLep) +process.puSequence = cms.Sequence(process.packedPFCandidatesNoLep*process.puppi*process.puppiNoLep*process.egmPhotonIDSequence*process.puppiPhoton*process.pfMet) process.p = cms.Path(process.puSequence) process.output = cms.OutputModule("PoolOutputModule", outputCommands = cms.untracked.vstring('keep *'), From 3748459afbbcac5f96b727c9cdf7ab42a71c059b Mon Sep 17 00:00:00 2001 From: Philip Date: Tue, 2 Feb 2016 02:39:10 +0100 Subject: [PATCH 237/250] small fix --- CommonTools/PileupAlgos/plugins/PuppiPhoton.cc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc b/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc index 5c2d5eaab7542..21cd5c10be9b7 100644 --- a/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc +++ b/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc @@ -162,16 +162,6 @@ void PuppiPhoton::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { corrCandidates_->push_back(pCand); } //Fill it into the event - //std::auto_ptr > lPupOut(new edm::ValueMap()); - // edm::ValueMap::Filler lPupFiller(*lPupOut); - //lPupFiller.insert(hPFProduct,lWeights.begin(),lWeights.end()); - //lPupFiller.fill(); - //Compute the modified p4s - //edm::ValueMap::Filler p4PupFiller(*p4PupOut); - //p4PupFiller.insert(hPFProduct,puppiP4s.begin(), puppiP4s.end() ); - //p4PupFiller.fill(); - //iEvent.put(lPupOut); - //iEvent.put(p4PupOut); edm::OrphanHandle oh = iEvent.put( corrCandidates_ ); for(unsigned int ic=0, nc = pupCol->size(); ic < nc; ++ic) { reco::CandidatePtr pkref( oh, ic ); From 54798a3160203937c6b5c981b2459b4cc32b38a9 Mon Sep 17 00:00:00 2001 From: wmtan Date: Sun, 31 Jan 2016 21:25:00 +0100 Subject: [PATCH 238/250] Replace boost::shared_ptr with std::shared_ptr --- CondCore/ESSources/interface/DataProxy.h | 16 ++-- CondCore/ESSources/plugins/CondDBESSource.cc | 1 - CondCore/ESSources/plugins/CondDBESSource.h | 3 +- DataFormats/FWLite/test/BuildFile.xml | 1 - DataFormats/Provenance/test/BuildFile.xml | 1 - FWCore/Concurrency/test/BuildFile.xml | 1 - .../test/serialtaskqueue_t.cppunit.cpp | 11 +-- .../test/waitingtasklist_t.cppunit.cpp | 13 ++- FWCore/FWLite/BuildFile.xml | 1 - FWCore/FWLite/test/BuildFile.xml | 1 - FWCore/Framework/interface/CallbackProxy.h | 6 +- FWCore/Framework/interface/ComponentFactory.h | 14 +-- FWCore/Framework/interface/ComponentMaker.h | 20 ++-- .../Framework/interface/DataProxyProvider.h | 6 +- .../interface/DependentRecordIntervalFinder.h | 10 +- FWCore/Framework/interface/ESProducer.h | 18 ++-- .../interface/ESProxyFactoryProducer.h | 5 +- FWCore/Framework/interface/EventProcessor.h | 9 +- .../Framework/interface/EventSetupProvider.h | 17 ++-- .../interface/EventSetupRecordProvider.h | 29 +++--- FWCore/Framework/interface/LooperFactory.h | 22 ++--- FWCore/Framework/interface/ModuleFactory.h | 10 +- FWCore/Framework/interface/Schedule.h | 2 - FWCore/Framework/interface/SourceFactory.h | 18 ++-- FWCore/Framework/interface/SubProcess.h | 4 +- FWCore/Framework/interface/es_Label.h | 8 +- FWCore/Framework/interface/produce_helpers.h | 6 ++ .../src/DependentRecordIntervalFinder.cc | 4 +- .../Framework/src/ESProxyFactoryProducer.cc | 5 +- FWCore/Framework/src/EventProcessor.cc | 4 +- FWCore/Framework/src/EventSetupProvider.cc | 44 ++++----- .../Framework/src/EventSetupRecordProvider.cc | 28 +++--- FWCore/Framework/src/EventSetupsController.cc | 22 ++--- FWCore/Framework/src/EventSetupsController.h | 29 +++--- .../IntersectingIOVRecordIntervalFinder.cc | 2 +- .../src/IntersectingIOVRecordIntervalFinder.h | 6 +- FWCore/Framework/src/LooperFactory.cc | 8 +- FWCore/Framework/src/ModuleFactory.cc | 8 +- FWCore/Framework/src/SourceFactory.cc | 6 +- FWCore/Framework/test/DummyProxyProvider.h | 2 +- FWCore/Framework/test/Event_t.cpp | 2 - FWCore/Framework/test/callback_t.cppunit.cc | 8 +- .../test/dependentrecord_t.cppunit.cc | 96 +++++++++---------- FWCore/Framework/test/esproducer_t.cppunit.cc | 54 +++++------ FWCore/Framework/test/eventsetup_t.cppunit.cc | 60 ++++++------ .../test/eventsetuprecord_t.cppunit.cc | 12 +-- .../test/eventsetupscontroller_t.cppunit.cc | 25 +++-- FWCore/Framework/test/fullchain_t.cppunit.cc | 6 +- ...ectingiovrecordintervalfinder_t.cppunit.cc | 12 +-- FWCore/Framework/test/stubs/DummyLooper.cc | 5 +- FWCore/Integration/test/BuildFile.xml | 1 - FWCore/Integration/test/ESTestProducers.cc | 80 ++++++++-------- .../MessageLogger/doc/MessageLoggerDesign.txt | 2 +- FWCore/ServiceRegistry/BuildFile.xml | 1 - .../interface/ActivityRegistry.h | 1 - FWCore/Skeletons/doc/man/skeletons.1 | 4 +- FWCore/Utilities/interface/value_ptr.h | 6 +- IOMC/RandomEngine/BuildFile.xml | 1 - IOPool/Output/BuildFile.xml | 1 - IOPool/SecondaryInput/test/BuildFile.xml | 1 - IOPool/Streamer/BuildFile.xml | 1 - IOPool/Streamer/test/BuildFile.xml | 1 - .../plugins/FWLiteESRecordWriterAnalyzer.cc | 6 +- .../CondLiteIO/plugins/FWLiteESSource.cc | 3 +- .../interface/MVATrainerContainer.h | 2 - .../MVATrainer/interface/MVATrainerLooper.h | 6 +- .../interface/MVATrainerLooperImpl.h | 6 +- .../MVATrainer/interface/TrainerMonitoring.h | 5 +- .../MVATrainer/src/MVATrainerLooper.cc | 2 - .../MVATrainer/src/TrainerMonitoring.cc | 10 +- .../StorageFactory/interface/StorageAccount.h | 2 +- .../StorageFactory/src/StorageAccount.cc | 1 + Utilities/StorageFactory/test/Test.h | 6 +- 73 files changed, 409 insertions(+), 441 deletions(-) diff --git a/CondCore/ESSources/interface/DataProxy.h b/CondCore/ESSources/interface/DataProxy.h index 44152d38ffbfa..67dd922b3ccb1 100644 --- a/CondCore/ESSources/interface/DataProxy.h +++ b/CondCore/ESSources/interface/DataProxy.h @@ -1,8 +1,8 @@ #ifndef CondCore_ESSources_DataProxy_H #define CondCore_ESSources_DataProxy_H //#include +#include #include -#include "boost/shared_ptr.hpp" // user include files #include "FWCore/Framework/interface/DataProxyTemplate.h" @@ -20,9 +20,9 @@ template< class RecordT, class DataT , typename Initializer=cond::DefaultInitial class DataProxy : public edm::eventsetup::DataProxyTemplate{ public: typedef DataProxy self; - typedef boost::shared_ptr > DataP; + typedef std::shared_ptr > DataP; - explicit DataProxy(boost::shared_ptr > pdata) : m_data(pdata) { + explicit DataProxy(std::shared_ptr > pdata) : m_data(pdata) { } //virtual ~DataProxy(); @@ -51,7 +51,7 @@ class DataProxy : public edm::eventsetup::DataProxyTemplate{ const DataProxy& operator=( const DataProxy& ); // stop default // ---------- member data -------------------------------- - boost::shared_ptr > m_data; + std::shared_ptr > m_data; Initializer m_initializer; }; @@ -62,8 +62,8 @@ namespace cond { */ class DataProxyWrapperBase { public: - typedef boost::shared_ptr ProxyP; - typedef boost::shared_ptr edmProxyP; + typedef std::shared_ptr ProxyP; + typedef std::shared_ptr edmProxyP; // limitation of plugin manager... typedef std::pair< std::string, std::string> Args; @@ -104,7 +104,7 @@ class DataProxyWrapper : public cond::DataProxyWrapperBase { public: typedef ::DataProxy DataProxy; typedef cond::persistency::PayloadProxy PayProxy; - typedef boost::shared_ptr DataP; + typedef std::shared_ptr DataP; DataProxyWrapper(cond::persistency::Session& session, @@ -143,7 +143,7 @@ class DataProxyWrapper : public cond::DataProxyWrapperBase { private: std::string m_source; edm::eventsetup::TypeTag m_type; - boost::shared_ptr > m_proxy; + std::shared_ptr > m_proxy; edmProxyP m_edmProxy; }; diff --git a/CondCore/ESSources/plugins/CondDBESSource.cc b/CondCore/ESSources/plugins/CondDBESSource.cc index 769b74ba34965..339fd4eb779d4 100644 --- a/CondCore/ESSources/plugins/CondDBESSource.cc +++ b/CondCore/ESSources/plugins/CondDBESSource.cc @@ -12,7 +12,6 @@ // #include "CondDBESSource.h" -#include "boost/shared_ptr.hpp" #include #include "CondCore/CondDB/interface/Exception.h" #include "CondCore/CondDB/interface/Time.h" diff --git a/CondCore/ESSources/plugins/CondDBESSource.h b/CondCore/ESSources/plugins/CondDBESSource.h index c7b6bf4e0a41a..e69bb876cb314 100644 --- a/CondCore/ESSources/plugins/CondDBESSource.h +++ b/CondCore/ESSources/plugins/CondDBESSource.h @@ -13,6 +13,7 @@ // system include files #include #include +#include #include // user include files #include "CondCore/CondDB/interface/ConnectionPool.h" @@ -32,7 +33,7 @@ namespace cond{ class CondDBESSource : public edm::eventsetup::DataProxyProvider, public edm::EventSetupRecordIntervalFinder{ public: - typedef boost::shared_ptr ProxyP; + typedef std::shared_ptr ProxyP; typedef std::multimap< std::string, ProxyP> ProxyMap; typedef enum { NOREFRESH, REFRESH_ALWAYS, REFRESH_OPEN_IOVS, REFRESH_EACH_RUN, RECONNECT_EACH_RUN } RefreshPolicy; diff --git a/DataFormats/FWLite/test/BuildFile.xml b/DataFormats/FWLite/test/BuildFile.xml index eb6bd9ed440cd..bcb59c4edbb3a 100644 --- a/DataFormats/FWLite/test/BuildFile.xml +++ b/DataFormats/FWLite/test/BuildFile.xml @@ -1,5 +1,4 @@ - diff --git a/DataFormats/Provenance/test/BuildFile.xml b/DataFormats/Provenance/test/BuildFile.xml index 3b2ea8821f37e..0b5f73b0ff810 100644 --- a/DataFormats/Provenance/test/BuildFile.xml +++ b/DataFormats/Provenance/test/BuildFile.xml @@ -1,4 +1,3 @@ - diff --git a/FWCore/Concurrency/test/BuildFile.xml b/FWCore/Concurrency/test/BuildFile.xml index da3dc73b17f49..5176e8f3b11f6 100644 --- a/FWCore/Concurrency/test/BuildFile.xml +++ b/FWCore/Concurrency/test/BuildFile.xml @@ -1,6 +1,5 @@ - diff --git a/FWCore/Concurrency/test/serialtaskqueue_t.cppunit.cpp b/FWCore/Concurrency/test/serialtaskqueue_t.cppunit.cpp index 38892501b8e38..040ea84901034 100644 --- a/FWCore/Concurrency/test/serialtaskqueue_t.cppunit.cpp +++ b/FWCore/Concurrency/test/serialtaskqueue_t.cppunit.cpp @@ -13,7 +13,6 @@ #include #include #include "tbb/task.h" -#include "boost/shared_ptr.hpp" #include "FWCore/Concurrency/interface/SerialTaskQueue.h" class SerialTaskQueue_test : public CppUnit::TestFixture { @@ -41,7 +40,7 @@ void SerialTaskQueue_test::testPush() edm::SerialTaskQueue queue; { - boost::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, + std::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, [](tbb::task* iTask){tbb::task::destroy(*iTask);} }; waitTask->set_ref_count(1+3); tbb::task* pWaitTask = waitTask.get(); @@ -103,7 +102,7 @@ void SerialTaskQueue_test::testPause() { queue.pause(); { - boost::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, + std::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, [](tbb::task* iTask){tbb::task::destroy(*iTask);} }; waitTask->set_ref_count(1+1); tbb::task* pWaitTask = waitTask.get(); @@ -120,7 +119,7 @@ void SerialTaskQueue_test::testPause() } { - boost::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, + std::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, [](tbb::task* iTask){tbb::task::destroy(*iTask);} }; waitTask->set_ref_count(1+3); tbb::task* pWaitTask = waitTask.get(); @@ -162,7 +161,7 @@ void SerialTaskQueue_test::stressTest() unsigned int index = 100; const unsigned int nTasks = 1000; while(0 != --index) { - boost::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, + std::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, [](tbb::task* iTask){tbb::task::destroy(*iTask);} }; waitTask->set_ref_count(3); tbb::task* pWaitTask=waitTask.get(); @@ -193,7 +192,7 @@ void SerialTaskQueue_test::stressTest() }); } pWaitTask->decrement_ref_count(); - boost::shared_ptr(&pushThread,join_thread); + std::shared_ptr(&pushThread,join_thread); } waitTask->wait_for_all(); diff --git a/FWCore/Concurrency/test/waitingtasklist_t.cppunit.cpp b/FWCore/Concurrency/test/waitingtasklist_t.cppunit.cpp index 588f1e5eaee02..4aecd6860906b 100644 --- a/FWCore/Concurrency/test/waitingtasklist_t.cppunit.cpp +++ b/FWCore/Concurrency/test/waitingtasklist_t.cppunit.cpp @@ -13,7 +13,6 @@ #include #include #include "tbb/task.h" -#include "boost/shared_ptr.hpp" #include "FWCore/Concurrency/interface/WaitingTaskList.h" #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) @@ -69,7 +68,7 @@ void WaitingTaskList_test::addThenDone() edm::WaitingTaskList waitList; { - boost::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, + std::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, [](tbb::task* iTask){tbb::task::destroy(*iTask);} }; waitTask->set_ref_count(2); //NOTE: allocate_child does NOT increment the ref_count of waitTask! @@ -91,7 +90,7 @@ void WaitingTaskList_test::addThenDone() called = false; { - boost::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, + std::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, [](tbb::task* iTask){tbb::task::destroy(*iTask);} }; waitTask->set_ref_count(2); @@ -113,7 +112,7 @@ void WaitingTaskList_test::doneThenAdd() std::atomic called{false}; edm::WaitingTaskList waitList; { - boost::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, + std::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, [](tbb::task* iTask){tbb::task::destroy(*iTask);} }; waitTask->set_ref_count(2); @@ -145,7 +144,7 @@ void WaitingTaskList_test::stressTest() const unsigned int nTasks = 10000; while(0 != --index) { called = false; - boost::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, + std::shared_ptr waitTask{new (tbb::task::allocate_root()) tbb::empty_task{}, [](tbb::task* iTask){tbb::task::destroy(*iTask);} }; waitTask->set_ref_count(3); tbb::task* pWaitTask=waitTask.get(); @@ -159,14 +158,14 @@ void WaitingTaskList_test::stressTest() pWaitTask->decrement_ref_count(); }); - boost::shared_ptr(&makeTasksThread,join_thread); + std::shared_ptr(&makeTasksThread,join_thread); std::thread doneWaitThread([&waitList,&called,pWaitTask]{ called=true; waitList.doneWaiting(); pWaitTask->decrement_ref_count(); }); - boost::shared_ptr(&doneWaitThread,join_thread); + std::shared_ptr(&doneWaitThread,join_thread); } waitTask->wait_for_all(); } diff --git a/FWCore/FWLite/BuildFile.xml b/FWCore/FWLite/BuildFile.xml index 26c9e943da7b1..0fdb99bdc4697 100644 --- a/FWCore/FWLite/BuildFile.xml +++ b/FWCore/FWLite/BuildFile.xml @@ -2,7 +2,6 @@ - diff --git a/FWCore/FWLite/test/BuildFile.xml b/FWCore/FWLite/test/BuildFile.xml index 1882b1147bd6a..f24f21f65780c 100644 --- a/FWCore/FWLite/test/BuildFile.xml +++ b/FWCore/FWLite/test/BuildFile.xml @@ -1,5 +1,4 @@ - diff --git a/FWCore/Framework/interface/CallbackProxy.h b/FWCore/Framework/interface/CallbackProxy.h index a201b59e2b61c..78d6fd2a65252 100644 --- a/FWCore/Framework/interface/CallbackProxy.h +++ b/FWCore/Framework/interface/CallbackProxy.h @@ -20,8 +20,8 @@ // // system include files -#include "boost/shared_ptr.hpp" #include +#include // user include files #include "FWCore/Framework/interface/DataProxy.h" @@ -41,7 +41,7 @@ namespace edm { typedef typename produce::smart_pointer_traits::type value_type; typedef RecordT record_type; - CallbackProxy(boost::shared_ptr& iCallback) : + CallbackProxy(std::shared_ptr& iCallback) : data_(), callback_(iCallback) { //The callback fills the data directly. This is done so that the callback does not have to @@ -74,7 +74,7 @@ namespace edm { // ---------- member data -------------------------------- DataT data_; - edm::propagate_const> callback_; + edm::propagate_const> callback_; }; } diff --git a/FWCore/Framework/interface/ComponentFactory.h b/FWCore/Framework/interface/ComponentFactory.h index f8b0efe39e06a..7c263261a8f55 100644 --- a/FWCore/Framework/interface/ComponentFactory.h +++ b/FWCore/Framework/interface/ComponentFactory.h @@ -21,8 +21,8 @@ // system include files #include #include +#include #include -#include "boost/shared_ptr.hpp" // user include files #include "FWCore/PluginManager/interface/PluginFactory.h" @@ -47,10 +47,10 @@ template //~ComponentFactory(); typedef ComponentMakerBase Maker; - typedef std::map > MakerMap; + typedef std::map > MakerMap; typedef typename T::base_type base_type; // ---------- const member functions --------------------- - boost::shared_ptr addTo(EventSetupsController& esController, + std::shared_ptr addTo(EventSetupsController& esController, EventSetupProvider& iProvider, edm::ParameterSet const& iConfiguration, bool replaceExisting = false) const @@ -61,7 +61,7 @@ template if(it == makers_.end()) { - boost::shared_ptr wm(edmplugin::PluginFactory* ()>::get()->create(modtype)); + std::shared_ptr wm(edmplugin::PluginFactory* ()>::get()->create(modtype)); if(wm.get() == 0) { Exception::throwThis(errors::Configuration, @@ -79,7 +79,7 @@ template //cerr << "Factory: created the worker" << endl; std::pair ret = - makers_.insert(std::pair >(modtype,wm)); + makers_.insert(std::pair >(modtype,wm)); if(ret.second == false) { Exception::throwThis(errors::Configuration,"Maker Factory map insert failed"); @@ -89,7 +89,7 @@ template } try { - return convertException::wrap([&]() -> boost::shared_ptr { + return convertException::wrap([&]() -> std::shared_ptr { return it->second->addTo(esController, iProvider, iConfiguration, replaceExisting); }); } @@ -101,7 +101,7 @@ template iException.addContext(ost.str()); throw; } - return boost::shared_ptr(); + return std::shared_ptr(); } // ---------- static member functions -------------------- diff --git a/FWCore/Framework/interface/ComponentMaker.h b/FWCore/Framework/interface/ComponentMaker.h index cfc486725feb1..f9f6ad4e2aebf 100644 --- a/FWCore/Framework/interface/ComponentMaker.h +++ b/FWCore/Framework/interface/ComponentMaker.h @@ -19,8 +19,8 @@ // // system include files +#include #include -#include "boost/shared_ptr.hpp" // user include files #include "FWCore/Framework/interface/ComponentDescription.h" @@ -47,10 +47,10 @@ namespace edm { class ComponentMakerBase : public ComponentMakerBaseHelper { public: typedef typename T::base_type base_type; - virtual boost::shared_ptr addTo(EventSetupsController& esController, - EventSetupProvider& iProvider, - ParameterSet const& iConfiguration, - bool replaceExisting) const = 0; + virtual std::shared_ptr addTo(EventSetupsController& esController, + EventSetupProvider& iProvider, + ParameterSet const& iConfiguration, + bool replaceExisting) const = 0; }; template @@ -63,7 +63,7 @@ namespace edm { typedef typename T::base_type base_type; // ---------- const member functions --------------------- - virtual boost::shared_ptr addTo(EventSetupsController& esController, + virtual std::shared_ptr addTo(EventSetupsController& esController, EventSetupProvider& iProvider, ParameterSet const& iConfiguration, bool replaceExisting) const; @@ -98,7 +98,7 @@ namespace edm { }; template< class T, class TComponent> -boost::shared_ptr::base_type> +std::shared_ptr::base_type> ComponentMaker::addTo(EventSetupsController& esController, EventSetupProvider& iProvider, ParameterSet const& iConfiguration, @@ -109,20 +109,20 @@ ComponentMaker::addTo(EventSetupsController& esController, // SubProcess or the top level process and add that. if (!replaceExisting) { - boost::shared_ptr alreadyMadeComponent = T::getComponentAndRegisterProcess(esController, iConfiguration); + std::shared_ptr alreadyMadeComponent = T::getComponentAndRegisterProcess(esController, iConfiguration); if (alreadyMadeComponent) { // This is for the case when a component is shared between // a SubProcess and a previous SubProcess or the top level process // because the component has an identical configuration to a component // from the top level process or earlier SubProcess. - boost::shared_ptr component(boost::static_pointer_cast(alreadyMadeComponent)); + std::shared_ptr component(std::static_pointer_cast(alreadyMadeComponent)); T::addTo(iProvider, component, iConfiguration, true); return component; } } - boost::shared_ptr component(new TComponent(iConfiguration)); + std::shared_ptr component(new TComponent(iConfiguration)); ComponentDescription description = this->createComponentDescription(iConfiguration); diff --git a/FWCore/Framework/interface/DataProxyProvider.h b/FWCore/Framework/interface/DataProxyProvider.h index 07e8d216c9554..3625b4155d059 100644 --- a/FWCore/Framework/interface/DataProxyProvider.h +++ b/FWCore/Framework/interface/DataProxyProvider.h @@ -20,10 +20,10 @@ // system include files #include +#include #include #include #include -#include "boost/shared_ptr.hpp" // user include files #include "FWCore/Framework/interface/EventSetupRecordKey.h" @@ -45,7 +45,7 @@ class DataProxyProvider public: typedef std::vector< EventSetupRecordKey> Keys; - typedef std::vector>>> KeyedProxies; + typedef std::vector>>> KeyedProxies; typedef std::map RecordProxies; DataProxyProvider(); @@ -111,7 +111,7 @@ class DataProxyProvider template inline void insertProxy(DataProxyProvider::KeyedProxies& iList, - boost::shared_ptr iProxy, + std::shared_ptr iProxy, const char* iName="") { iList.push_back(DataProxyProvider::KeyedProxies::value_type( DataKey(DataKey::makeTypeTag(), diff --git a/FWCore/Framework/interface/DependentRecordIntervalFinder.h b/FWCore/Framework/interface/DependentRecordIntervalFinder.h index 4832d81585ac1..a94341e40ca8a 100644 --- a/FWCore/Framework/interface/DependentRecordIntervalFinder.h +++ b/FWCore/Framework/interface/DependentRecordIntervalFinder.h @@ -21,8 +21,8 @@ // // system include files +#include #include -#include "boost/shared_ptr.hpp" // user include files #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h" @@ -48,9 +48,9 @@ class DependentRecordIntervalFinder : public EventSetupRecordIntervalFinder // ---------- static member functions -------------------- // ---------- member functions --------------------------- - void addProviderWeAreDependentOn(boost::shared_ptr); + void addProviderWeAreDependentOn(std::shared_ptr); - void setAlternateFinder(boost::shared_ptr); + void setAlternateFinder(std::shared_ptr); protected: virtual void setIntervalFor(const EventSetupRecordKey&, const IOVSyncValue& , @@ -62,10 +62,10 @@ class DependentRecordIntervalFinder : public EventSetupRecordIntervalFinder const DependentRecordIntervalFinder& operator=(const DependentRecordIntervalFinder&); // stop default // ---------- member data -------------------------------- - typedef std::vector>> Providers; + typedef std::vector>> Providers; Providers providers_; - edm::propagate_const> alternate_; + edm::propagate_const> alternate_; std::vector previousIOVs_; }; diff --git a/FWCore/Framework/interface/ESProducer.h b/FWCore/Framework/interface/ESProducer.h index 990314c1e7031..bae6ed774d11f 100644 --- a/FWCore/Framework/interface/ESProducer.h +++ b/FWCore/Framework/interface/ESProducer.h @@ -18,7 +18,7 @@ If only one algorithm is being encapsulated then the user needs to 1) add a method name 'produce' to the class. The 'produce' takes as its argument a const reference to the record that is to hold the data item being produced. If only one data item is being produced, - the 'produce' method must return either an 'std::auto_ptr' or 'boost::shared_ptr' to the object being + the 'produce' method must return either an 'std::auto_ptr' or 'std::shared_ptr' to the object being produced. (The choice depends on if the EventSetup or the ESProducer is managing the lifetime of the object). If multiple items are being Produced they the 'produce' method must return an ESProducts<> object which holds all of the items. @@ -155,7 +155,7 @@ class ESProducer : public ESProxyFactoryProducer TReturn (T ::* iMethod)(const TRecord&), const TArg& iDec, const es::Label& iLabel = es::Label()) { - boost::shared_ptr::Decorator_t > > + std::shared_ptr::Decorator_t > > callback(new eventsetup::Callback - void registerProducts(boost::shared_ptr iCallback, const TList*, const TRecord* iRecord, + void registerProducts(std::shared_ptr iCallback, const TList*, const TRecord* iRecord, const es::Label& iLabel) { registerProduct(iCallback, static_cast(nullptr), iRecord, iLabel); registerProducts(iCallback, static_cast(nullptr), iRecord, iLabel); } template - void registerProducts(boost::shared_ptr, const eventsetup::produce::Null*, const TRecord*,const es::Label&) { + void registerProducts(std::shared_ptr, const eventsetup::produce::Null*, const TRecord*,const es::Label&) { //do nothing } template - void registerProduct(boost::shared_ptr iCallback, const TProduct*, const TRecord*,const es::Label& iLabel) { + void registerProduct(std::shared_ptr iCallback, const TProduct*, const TRecord*,const es::Label& iLabel) { typedef eventsetup::CallbackProxy ProxyType; - typedef eventsetup::ProxyArgumentFactoryTemplate > FactoryType; + typedef eventsetup::ProxyArgumentFactoryTemplate > FactoryType; registerFactory(std::auto_ptr(new FactoryType(iCallback)), iLabel.default_); } template - void registerProduct(boost::shared_ptr iCallback, const es::L*, const TRecord*,const es::Label& iLabel) { + void registerProduct(std::shared_ptr iCallback, const es::L*, const TRecord*,const es::Label& iLabel) { if(iLabel.labels_.size() <= IIndex || iLabel.labels_[IIndex] == es::Label::def()) { Exception::throwThis(errors::Configuration, @@ -222,13 +222,13 @@ class ESProducer : public ESProxyFactoryProducer " was never assigned a name in the 'setWhatProduced' method"); } typedef eventsetup::CallbackProxy > ProxyType; - typedef eventsetup::ProxyArgumentFactoryTemplate > FactoryType; + typedef eventsetup::ProxyArgumentFactoryTemplate > FactoryType; registerFactory(std::auto_ptr(new FactoryType(iCallback)), iLabel.labels_[IIndex]); } // ---------- member data -------------------------------- // NOTE: the factories share ownership of the callback - //std::vector > callbacks_; + //std::vector > callbacks_; }; } diff --git a/FWCore/Framework/interface/ESProxyFactoryProducer.h b/FWCore/Framework/interface/ESProxyFactoryProducer.h index c262d8232ecff..96e3e0272ab8f 100644 --- a/FWCore/Framework/interface/ESProxyFactoryProducer.h +++ b/FWCore/Framework/interface/ESProxyFactoryProducer.h @@ -54,7 +54,6 @@ BarProd::BarProd(const edm::ParameterSet& iPS) { #include #include #include -#include "boost/shared_ptr.hpp" // user include files @@ -69,11 +68,11 @@ namespace edm { struct FactoryInfo { FactoryInfo() : key_(), factory_() {} FactoryInfo(const DataKey& iKey, - boost::shared_ptr iFactory) + std::shared_ptr iFactory) : key_(iKey), factory_(iFactory) {} DataKey key_; - edm::propagate_const> factory_; + edm::propagate_const> factory_; }; } diff --git a/FWCore/Framework/interface/EventProcessor.h b/FWCore/Framework/interface/EventProcessor.h index 54f5676de792a..a1e2386fe3990 100644 --- a/FWCore/Framework/interface/EventProcessor.h +++ b/FWCore/Framework/interface/EventProcessor.h @@ -29,7 +29,6 @@ configured in the user's main() function, and is set running. #include "FWCore/Utilities/interface/get_underlying_safe.h" -#include "boost/shared_ptr.hpp" #include "boost/thread/condition.hpp" #include @@ -258,8 +257,8 @@ namespace edm { std::shared_ptr& branchIDListHelper() {return get_underlying_safe(branchIDListHelper_);} std::shared_ptr thinnedAssociationsHelper() const {return get_underlying_safe(thinnedAssociationsHelper_);} std::shared_ptr& thinnedAssociationsHelper() {return get_underlying_safe(thinnedAssociationsHelper_);} - boost::shared_ptr looper() const {return get_underlying_safe(looper_);} - boost::shared_ptr& looper() {return get_underlying_safe(looper_);} + std::shared_ptr looper() const {return get_underlying_safe(looper_);} + std::shared_ptr& looper() {return get_underlying_safe(looper_);} //------------------------------------------------------------------ // // Data members below. @@ -274,7 +273,7 @@ namespace edm { ServiceToken serviceToken_; edm::propagate_const> input_; edm::propagate_const> espController_; - edm::propagate_const> esp_; + edm::propagate_const> esp_; std::unique_ptr act_table_; std::shared_ptr processConfiguration_; ProcessContext processContext_; @@ -284,7 +283,7 @@ namespace edm { edm::propagate_const> historyAppender_; edm::propagate_const> fb_; - edm::propagate_const> looper_; + edm::propagate_const> looper_; //The atomic protects concurrent access of deferredExceptionPtr_ std::atomic deferredExceptionPtrIsSet_; diff --git a/FWCore/Framework/interface/EventSetupProvider.h b/FWCore/Framework/interface/EventSetupProvider.h index 549d611ba0ea9..343aae49b2bbf 100644 --- a/FWCore/Framework/interface/EventSetupProvider.h +++ b/FWCore/Framework/interface/EventSetupProvider.h @@ -23,10 +23,9 @@ #include "FWCore/Framework/interface/EventSetupKnownRecordsSupplier.h" // system include files -#include "boost/shared_ptr.hpp" -#include #include +#include #include #include #include @@ -74,9 +73,9 @@ class EventSetupProvider { //called by specializations of EventSetupRecordProviders void addRecordToEventSetup(EventSetupRecord& iRecord); - void add(boost::shared_ptr); - void replaceExisting(boost::shared_ptr); - void add(boost::shared_ptr); + void add(std::shared_ptr); + void replaceExisting(std::shared_ptr); + void add(std::shared_ptr); void finishConfiguration(); @@ -126,7 +125,7 @@ class EventSetupProvider { // ---------- member data -------------------------------- EventSetup eventSetup_; - typedef std::map > Providers; + typedef std::map > Providers; Providers providers_; std::unique_ptr knownRecordsSupplier_; bool mustFinishConfiguration_; @@ -135,10 +134,10 @@ class EventSetupProvider { // The following are all used only during initialization and then cleared. std::unique_ptr preferredProviderInfo_; - std::unique_ptr > > finders_; - std::unique_ptr > > dataProviders_; + std::unique_ptr > > finders_; + std::unique_ptr > > dataProviders_; std::unique_ptr > > referencedDataKeys_; - std::unique_ptr > > > recordToFinders_; + std::unique_ptr > > > recordToFinders_; std::unique_ptr > > psetIDToRecordKey_; std::unique_ptr > > recordToPreferred_; std::unique_ptr > recordsWithALooperProxy_; diff --git a/FWCore/Framework/interface/EventSetupRecordProvider.h b/FWCore/Framework/interface/EventSetupRecordProvider.h index 82e9f4c8ddff0..0a0ca05e52e73 100644 --- a/FWCore/Framework/interface/EventSetupRecordProvider.h +++ b/FWCore/Framework/interface/EventSetupRecordProvider.h @@ -24,7 +24,6 @@ #include "FWCore/Utilities/interface/get_underlying_safe.h" // system include files -#include "boost/shared_ptr.hpp" #include #include @@ -65,31 +64,31 @@ class EventSetupRecordProvider { std::set proxyProviderDescriptions() const; ///returns the first matching DataProxyProvider or a 'null' if not found - boost::shared_ptr proxyProvider(ComponentDescription const&); + std::shared_ptr proxyProvider(ComponentDescription const&); ///returns the first matching DataProxyProvider or a 'null' if not found - boost::shared_ptr proxyProvider(ParameterSetIDHolder const&); + std::shared_ptr proxyProvider(ParameterSetIDHolder const&); // ---------- static member functions -------------------- // ---------- member functions --------------------------- - void resetProxyProvider(ParameterSetIDHolder const&, boost::shared_ptr const&); + void resetProxyProvider(ParameterSetIDHolder const&, std::shared_ptr const&); void addRecordTo(EventSetupProvider&); void addRecordToIfValid(EventSetupProvider&, IOVSyncValue const&) ; - void add(boost::shared_ptr); + void add(std::shared_ptr); ///For now, only use one finder - void addFinder(boost::shared_ptr); + void addFinder(std::shared_ptr); void setValidityInterval(ValidityInterval const&); ///sets interval to this time and returns true if have a valid interval for time bool setValidityIntervalFor(IOVSyncValue const&); ///If the provided Record depends on other Records, here are the dependent Providers - void setDependentProviders(std::vector >const&); + void setDependentProviders(std::vector >const&); /**In the case of a conflict, sets what Provider to call. This must be called after all providers have been added. An empty map is acceptable. */ @@ -98,8 +97,8 @@ class EventSetupRecordProvider { ///This will clear the cache's of all the Proxies so that next time they are called they will run void resetProxies(); - boost::shared_ptr finder() const {return get_underlying_safe(finder_);} - boost::shared_ptr& finder() {return get_underlying_safe(finder_);} + std::shared_ptr finder() const {return get_underlying_safe(finder_);} + std::shared_ptr& finder() {return get_underlying_safe(finder_);} void getReferencedESProducers(std::map >& referencedESProducers); @@ -108,15 +107,15 @@ class EventSetupRecordProvider { void resetRecordToProxyPointers(DataToPreferredProviderMap const& iMap); protected: - void addProxiesToRecordHelper(edm::propagate_const>& dpp, + void addProxiesToRecordHelper(edm::propagate_const>& dpp, DataToPreferredProviderMap const& mp) {addProxiesToRecord(get_underlying_safe(dpp), mp);} - void addProxiesToRecord(boost::shared_ptr, + void addProxiesToRecord(std::shared_ptr, DataToPreferredProviderMap const&); void cacheReset(); virtual EventSetupRecord& record() = 0; - boost::shared_ptr swapFinder(boost::shared_ptr iNew) { + std::shared_ptr swapFinder(std::shared_ptr iNew) { std::swap(iNew, finder()); return iNew; } @@ -131,9 +130,9 @@ class EventSetupRecordProvider { // ---------- member data -------------------------------- EventSetupRecordKey const key_; ValidityInterval validityInterval_; - edm::propagate_const> finder_; - std::vector>> providers_; - std::unique_ptr>>> multipleFinders_; + edm::propagate_const> finder_; + std::vector>> providers_; + std::unique_ptr>>> multipleFinders_; bool lastSyncWasBeginOfRun_; }; } diff --git a/FWCore/Framework/interface/LooperFactory.h b/FWCore/Framework/interface/LooperFactory.h index 699c54d2f7f12..fe196e837290a 100644 --- a/FWCore/Framework/interface/LooperFactory.h +++ b/FWCore/Framework/interface/LooperFactory.h @@ -19,8 +19,8 @@ // // system include files +#include #include -#include "boost/shared_ptr.hpp" // user include files #include "FWCore/Framework/interface/ComponentFactory.h" @@ -39,9 +39,9 @@ namespace edm { namespace looper { template - void addProviderTo(EventSetupProvider& iProvider, boost::shared_ptr iComponent, const DataProxyProvider*) + void addProviderTo(EventSetupProvider& iProvider, std::shared_ptr iComponent, const DataProxyProvider*) { - boost::shared_ptr pProvider(iComponent); + std::shared_ptr pProvider(iComponent); ComponentDescription description = pProvider->description(); description.isSource_=true; description.isLooper_=true; @@ -53,15 +53,15 @@ namespace edm { iProvider.add(pProvider); } template - void addProviderTo(EventSetupProvider& /* iProvider */, boost::shared_ptr /*iComponent*/, const void*) + void addProviderTo(EventSetupProvider& /* iProvider */, std::shared_ptr /*iComponent*/, const void*) { //do nothing } template - void addFinderTo(EventSetupProvider& iProvider, boost::shared_ptr iComponent, const EventSetupRecordIntervalFinder*) + void addFinderTo(EventSetupProvider& iProvider, std::shared_ptr iComponent, const EventSetupRecordIntervalFinder*) { - boost::shared_ptr pFinder(iComponent); + std::shared_ptr pFinder(iComponent); ComponentDescription description = pFinder->descriptionForFinder(); description.isSource_=true; @@ -75,7 +75,7 @@ namespace edm { iProvider.add(pFinder); } template - void addFinderTo(EventSetupProvider& /* iProvider */, boost::shared_ptr /*iComponent*/, const void*) + void addFinderTo(EventSetupProvider& /* iProvider */, std::shared_ptr /*iComponent*/, const void*) { //do nothing } @@ -85,7 +85,7 @@ namespace edm { static std::string name(); template static void addTo(EventSetupProvider& iProvider, - boost::shared_ptr iComponent, + std::shared_ptr iComponent, ParameterSet const&, bool) { @@ -94,13 +94,13 @@ namespace edm { looper::addFinderTo(iProvider, iComponent, static_cast(nullptr)); } - static void replaceExisting(EventSetupProvider& iProvider, boost::shared_ptr iComponent); + static void replaceExisting(EventSetupProvider& iProvider, std::shared_ptr iComponent); - static boost::shared_ptr getComponentAndRegisterProcess(EventSetupsController& esController, + static std::shared_ptr getComponentAndRegisterProcess(EventSetupsController& esController, ParameterSet const& iConfiguration); static void putComponent(EventSetupsController& esController, ParameterSet const& iConfiguration, - boost::shared_ptr const& component); + std::shared_ptr const& component); }; template< class TType> struct LooperMaker : public ComponentMaker {}; diff --git a/FWCore/Framework/interface/ModuleFactory.h b/FWCore/Framework/interface/ModuleFactory.h index 7f637c8804c83..1a4eb7706c0e7 100644 --- a/FWCore/Framework/interface/ModuleFactory.h +++ b/FWCore/Framework/interface/ModuleFactory.h @@ -19,8 +19,8 @@ // // system include files +#include #include -#include "boost/shared_ptr.hpp" // user include files #include "FWCore/Framework/interface/ComponentFactory.h" @@ -39,15 +39,15 @@ namespace edm { static std::string name(); static void addTo(EventSetupProvider& iProvider, - boost::shared_ptr iComponent, + std::shared_ptr iComponent, ParameterSet const&, bool); - static void replaceExisting(EventSetupProvider& iProvider, boost::shared_ptr iComponent); - static boost::shared_ptr getComponentAndRegisterProcess(EventSetupsController& esController, + static void replaceExisting(EventSetupProvider& iProvider, std::shared_ptr iComponent); + static std::shared_ptr getComponentAndRegisterProcess(EventSetupsController& esController, ParameterSet const& iConfiguration); static void putComponent(EventSetupsController& esController, ParameterSet const& iConfiguration, - boost::shared_ptr const& component); + std::shared_ptr const& component); }; template< class TType> struct ModuleMaker : public ComponentMaker {}; diff --git a/FWCore/Framework/interface/Schedule.h b/FWCore/Framework/interface/Schedule.h index ced39b54954ed..18643ece58ead 100644 --- a/FWCore/Framework/interface/Schedule.h +++ b/FWCore/Framework/interface/Schedule.h @@ -81,8 +81,6 @@ #include "FWCore/Utilities/interface/StreamID.h" #include "FWCore/Utilities/interface/get_underlying_safe.h" -#include "boost/shared_ptr.hpp" - #include #include #include diff --git a/FWCore/Framework/interface/SourceFactory.h b/FWCore/Framework/interface/SourceFactory.h index 0fb6caec61d40..a5bee9abb5cd0 100644 --- a/FWCore/Framework/interface/SourceFactory.h +++ b/FWCore/Framework/interface/SourceFactory.h @@ -19,8 +19,8 @@ // // system include files +#include #include -#include "boost/shared_ptr.hpp" // user include files #include "FWCore/Framework/interface/ComponentFactory.h" @@ -38,16 +38,16 @@ namespace edm { class EventSetupsController; template - void addProviderTo(EventSetupProvider& iProvider, boost::shared_ptr iComponent, const DataProxyProvider*) + void addProviderTo(EventSetupProvider& iProvider, std::shared_ptr iComponent, const DataProxyProvider*) { - boost::shared_ptr pProvider(iComponent); + std::shared_ptr pProvider(iComponent); ComponentDescription description = pProvider->description(); description.isSource_=true; pProvider->setDescription(description); iProvider.add(pProvider); } template - void addProviderTo(EventSetupProvider& /* iProvider */, boost::shared_ptr /*iComponent*/, const void*) + void addProviderTo(EventSetupProvider& /* iProvider */, std::shared_ptr /*iComponent*/, const void*) { //do nothing } @@ -57,7 +57,7 @@ namespace edm { static std::string name(); template static void addTo(EventSetupProvider& iProvider, - boost::shared_ptr iComponent, + std::shared_ptr iComponent, ParameterSet const& iConfiguration, bool matchesPreceding) { @@ -66,17 +66,17 @@ namespace edm { } //a source does not always have to be a provider addProviderTo(iProvider, iComponent, static_cast(nullptr)); - boost::shared_ptr pFinder(iComponent); + std::shared_ptr pFinder(iComponent); iProvider.add(pFinder); } - static void replaceExisting(EventSetupProvider& iProvider, boost::shared_ptr iComponent); + static void replaceExisting(EventSetupProvider& iProvider, std::shared_ptr iComponent); - static boost::shared_ptr getComponentAndRegisterProcess(EventSetupsController& esController, + static std::shared_ptr getComponentAndRegisterProcess(EventSetupsController& esController, ParameterSet const& iConfiguration); static void putComponent(EventSetupsController& esController, ParameterSet const& iConfiguration, - boost::shared_ptr const& component); + std::shared_ptr const& component); static void logInfoWhenSharing(ParameterSet const& iConfiguration); }; diff --git a/FWCore/Framework/interface/SubProcess.h b/FWCore/Framework/interface/SubProcess.h index 3a117e8071529..d29f6e4a8dd02 100644 --- a/FWCore/Framework/interface/SubProcess.h +++ b/FWCore/Framework/interface/SubProcess.h @@ -18,8 +18,6 @@ #include "DataFormats/Provenance/interface/SelectedProducts.h" -#include "boost/shared_ptr.hpp" - #include #include #include @@ -311,7 +309,7 @@ namespace edm { std::vector processHistoryRegistries_; std::vector historyAppenders_; PrincipalCache principalCache_; - edm::propagate_const> esp_; + edm::propagate_const> esp_; edm::propagate_const> schedule_; std::map parentToChildPhID_; edm::propagate_const>> subProcesses_; diff --git a/FWCore/Framework/interface/es_Label.h b/FWCore/Framework/interface/es_Label.h index 2861f1c25be59..30fbb08507548 100644 --- a/FWCore/Framework/interface/es_Label.h +++ b/FWCore/Framework/interface/es_Label.h @@ -19,7 +19,7 @@ // // system include files -#include "boost/shared_ptr.hpp" +#include #include #include @@ -36,15 +36,15 @@ namespace edm { typedef T element_type; L() : product_() {} - explicit L(boost::shared_ptr iP) : product_(iP) {} + explicit L(std::shared_ptr iP) : product_(iP) {} explicit L(T* iP) : product_(iP) {} T& operator*() { return *product_;} T* operator->() { return product_.get(); } - mutable boost::shared_ptr product_; + mutable std::shared_ptr product_; }; template - L l(boost::shared_ptr& iP) { + L l(std::shared_ptr& iP) { L temp(iP); return temp; } diff --git a/FWCore/Framework/interface/produce_helpers.h b/FWCore/Framework/interface/produce_helpers.h index ab357f08b8f33..861a76ccf740d 100644 --- a/FWCore/Framework/interface/produce_helpers.h +++ b/FWCore/Framework/interface/produce_helpers.h @@ -46,12 +46,18 @@ namespace edm { template< typename T> struct product_traits { typedef EndList type; }; + template< typename T> struct product_traits > { + typedef EndList > type; + }; template< typename T> struct product_traits > { typedef EndList > type; }; template< typename T> struct product_traits > { typedef EndList > type; }; + template< typename T> struct product_traits > { + typedef EndList > type; + }; template struct size { diff --git a/FWCore/Framework/src/DependentRecordIntervalFinder.cc b/FWCore/Framework/src/DependentRecordIntervalFinder.cc index da8ed65eb593e..f62951df808cc 100644 --- a/FWCore/Framework/src/DependentRecordIntervalFinder.cc +++ b/FWCore/Framework/src/DependentRecordIntervalFinder.cc @@ -60,13 +60,13 @@ DependentRecordIntervalFinder::~DependentRecordIntervalFinder() // member functions // void -DependentRecordIntervalFinder::addProviderWeAreDependentOn(boost::shared_ptr iProvider) +DependentRecordIntervalFinder::addProviderWeAreDependentOn(std::shared_ptr iProvider) { providers_.push_back(iProvider); } void -DependentRecordIntervalFinder::setAlternateFinder(boost::shared_ptr iOther) +DependentRecordIntervalFinder::setAlternateFinder(std::shared_ptr iOther) { alternate_ = iOther; } diff --git a/FWCore/Framework/src/ESProxyFactoryProducer.cc b/FWCore/Framework/src/ESProxyFactoryProducer.cc index b5f5ecb987b1c..5cce5f2f9d239 100644 --- a/FWCore/Framework/src/ESProxyFactoryProducer.cc +++ b/FWCore/Framework/src/ESProxyFactoryProducer.cc @@ -19,6 +19,7 @@ #include "FWCore/Framework/interface/DataProxy.h" #include "FWCore/Utilities/interface/Exception.h" +#include #include // // constants, enums and typedefs @@ -71,7 +72,7 @@ ESProxyFactoryProducer::registerProxies(const EventSetupRecordKey& iRecord, std::pair< Iterator, Iterator > range = record2Factories_.equal_range(iRecord); for(Iterator it = range.first; it != range.second; ++it) { - boost::shared_ptr proxy(it->second.factory_->makeProxy().release()); + std::shared_ptr proxy(it->second.factory_->makeProxy().release()); if(nullptr != proxy.get()) { iProxies.push_back(KeyedProxies::value_type((*it).second.key_, proxy)); @@ -91,7 +92,7 @@ ESProxyFactoryProducer::registerFactoryWithKey(const EventSetupRecordKey& iRecor usingRecordWithKey(iRecord); - boost::shared_ptr temp(iFactory.release()); + std::shared_ptr temp(iFactory.release()); FactoryInfo info(temp->makeKey(iLabel), temp); diff --git a/FWCore/Framework/src/EventProcessor.cc b/FWCore/Framework/src/EventProcessor.cc index dc61ea95b368c..c279ed6f7f205 100644 --- a/FWCore/Framework/src/EventProcessor.cc +++ b/FWCore/Framework/src/EventProcessor.cc @@ -186,11 +186,11 @@ namespace edm { } // --------------------------------------------------------------- - boost::shared_ptr + std::shared_ptr fillLooper(eventsetup::EventSetupsController& esController, eventsetup::EventSetupProvider& cp, ParameterSet& params) { - boost::shared_ptr vLooper; + std::shared_ptr vLooper; std::vector loopers = params.getParameter >("@all_loopers"); diff --git a/FWCore/Framework/src/EventSetupProvider.cc b/FWCore/Framework/src/EventSetupProvider.cc index 2c1d065f3b4c2..c7dfcf6aad7e0 100644 --- a/FWCore/Framework/src/EventSetupProvider.cc +++ b/FWCore/Framework/src/EventSetupProvider.cc @@ -38,7 +38,7 @@ namespace edm { namespace { class KnownRecordsSupplierImpl : public EventSetupKnownRecordsSupplier { public: - using Map = std::map >; + using Map = std::map >; explicit KnownRecordsSupplierImpl( Map const& iMap) : map_(iMap) {} @@ -69,10 +69,10 @@ knownRecordsSupplier_( std::make_unique(providers_)), mustFinishConfiguration_(true), subProcessIndex_(subProcessIndex), preferredProviderInfo_((0!=iInfo) ? (new PreferredProviderInfo(*iInfo)): 0), -finders_(new std::vector >() ), -dataProviders_(new std::vector >() ), +finders_(new std::vector >() ), +dataProviders_(new std::vector >() ), referencedDataKeys_(new std::map >), -recordToFinders_(new std::map > >), +recordToFinders_(new std::map > >), psetIDToRecordKey_(new std::map >), recordToPreferred_(new std::map >), recordsWithALooperProxy_(new std::set) @@ -107,37 +107,37 @@ EventSetupProvider::~EventSetupProvider() void EventSetupProvider::insert(const EventSetupRecordKey& iKey, std::auto_ptr iProvider) { - boost::shared_ptr temp(iProvider.release()); + std::shared_ptr temp(iProvider.release()); providers_[iKey] = temp; //temp->addRecordTo(*this); } void -EventSetupProvider::add(boost::shared_ptr iProvider) +EventSetupProvider::add(std::shared_ptr iProvider) { assert(iProvider.get() != 0); dataProviders_->push_back(iProvider); } void -EventSetupProvider::replaceExisting(boost::shared_ptr dataProxyProvider) +EventSetupProvider::replaceExisting(std::shared_ptr dataProxyProvider) { ParameterSetIDHolder psetID(dataProxyProvider->description().pid_); std::set const& keysForPSetID = (*psetIDToRecordKey_)[psetID]; for (auto const& key : keysForPSetID) { - boost::shared_ptr const& recordProvider = providers_[key]; + std::shared_ptr const& recordProvider = providers_[key]; recordProvider->resetProxyProvider(psetID, dataProxyProvider); } } void -EventSetupProvider::add(boost::shared_ptr iFinder) +EventSetupProvider::add(std::shared_ptr iFinder) { assert(iFinder.get() != 0); finders_->push_back(iFinder); } -typedef std::map > Providers; +typedef std::map > Providers; typedef std::map RecordToPreferred; ///find everything made by a DataProxyProvider and add it to the 'preferred' list static @@ -153,7 +153,7 @@ preferEverything(const ComponentDescription& iComponent, ++itProvider) { std::set components = itProvider->second->proxyProviderDescriptions(); if(components.find(iComponent)!= components.end()) { - boost::shared_ptr proxyProv = + std::shared_ptr proxyProv = itProvider->second->proxyProvider(*(components.find(iComponent))); assert(proxyProv.get()); @@ -245,7 +245,7 @@ RecordToPreferred determinePreferred(const EventSetupProvider::PreferredProvider eventsetup::DataKey datumKey(datumType, itRecData->second.second.c_str()); //Does the proxyprovider make this? - boost::shared_ptr proxyProv = + std::shared_ptr proxyProv = itRecordProvider->second->proxyProvider(*itProxyProv); const DataProxyProvider::KeyedProxies& keyedProxies = proxyProv->keyedProxies(recordKey); if(std::find_if(keyedProxies.begin(), keyedProxies.end(), @@ -283,7 +283,7 @@ EventSetupProvider::finishConfiguration() { //we delayed adding finders to the system till here so that everything would be loaded first recordToFinders_->clear(); - for(std::vector >::iterator itFinder=finders_->begin(), + for(std::vector >::iterator itFinder=finders_->begin(), itEnd = finders_->end(); itFinder != itEnd; ++itFinder) { @@ -310,7 +310,7 @@ EventSetupProvider::finishConfiguration() // their Records and therefore could delay setting up their Proxies psetIDToRecordKey_->clear(); typedef std::set Keys; - for(std::vector >::iterator itProvider=dataProviders_->begin(), + for(std::vector >::iterator itProvider=dataProviders_->begin(), itEnd = dataProviders_->end(); itProvider != itEnd; ++itProvider) { @@ -361,7 +361,7 @@ EventSetupProvider::finishConfiguration() std::set records = itProvider->second->dependentRecords(); if(records.size() != 0) { std::string missingRecords; - std::vector > depProviders; + std::vector > depProviders; depProviders.reserve(records.size()); bool foundAllProviders = true; for(std::set::iterator itRecord = records.begin(), @@ -398,14 +398,14 @@ EventSetupProvider::finishConfiguration() mustFinishConfiguration_ = false; } -typedef std::map > Providers; +typedef std::map > Providers; typedef Providers::iterator Itr; static void findDependents(const EventSetupRecordKey& iKey, Itr itBegin, Itr itEnd, - std::vector >& oDependents) + std::vector >& oDependents) { for(Itr it = itBegin; it != itEnd; ++it) { @@ -428,7 +428,7 @@ EventSetupProvider::resetRecordPlusDependentRecords(const EventSetupRecordKey& i } - std::vector > dependents; + std::vector > dependents; findDependents(iKey, providers_.begin(), providers_.end(), dependents); dependents.erase(std::unique(dependents.begin(),dependents.end()), dependents.end()); @@ -578,10 +578,10 @@ EventSetupProvider::checkESProducerSharing(EventSetupProvider& precedingESProvid // Need to reset the pointer from the EventSetupRecordProvider to the // the DataProxyProvider so these two processes share an ESProducer. - boost::shared_ptr dataProxyProvider; + std::shared_ptr dataProxyProvider; std::set const& keysForPSetID1 = (*precedingESProvider.psetIDToRecordKey_)[psetIDHolder]; for (auto const& key : keysForPSetID1) { - boost::shared_ptr const& recordProvider = precedingESProvider.providers_[key]; + std::shared_ptr const& recordProvider = precedingESProvider.providers_[key]; dataProxyProvider = recordProvider->proxyProvider(psetIDHolder); assert(dataProxyProvider); break; @@ -589,7 +589,7 @@ EventSetupProvider::checkESProducerSharing(EventSetupProvider& precedingESProvid std::set const& keysForPSetID2 = (*psetIDToRecordKey_)[psetIDHolder]; for (auto const& key : keysForPSetID2) { - boost::shared_ptr const& recordProvider = providers_[key]; + std::shared_ptr const& recordProvider = providers_[key]; recordProvider->resetProxyProvider(psetIDHolder, dataProxyProvider); } } else { @@ -786,7 +786,7 @@ EventSetupProvider::proxyProviderDescriptions() const bind(&EventSetupRecordProvider::proxyProviderDescriptions, bind(&Providers::value_type::second,_1)))); if(dataProviders_.get()) { - for(std::vector >::const_iterator it = dataProviders_->begin(), + for(std::vector >::const_iterator it = dataProviders_->begin(), itEnd = dataProviders_->end(); it != itEnd; ++it) { diff --git a/FWCore/Framework/src/EventSetupRecordProvider.cc b/FWCore/Framework/src/EventSetupRecordProvider.cc index 3f65fdd991060..5bbad57121f23 100644 --- a/FWCore/Framework/src/EventSetupRecordProvider.cc +++ b/FWCore/Framework/src/EventSetupRecordProvider.cc @@ -44,7 +44,7 @@ namespace edm { // EventSetupRecordProvider::EventSetupRecordProvider(const EventSetupRecordKey& iKey) : key_(iKey), validityInterval_(), finder_(), providers_(), - multipleFinders_(new std::vector>>()), + multipleFinders_(new std::vector>>()), lastSyncWasBeginOfRun_(true) { } @@ -74,16 +74,16 @@ EventSetupRecordProvider::~EventSetupRecordProvider() // member functions // void -EventSetupRecordProvider::add(boost::shared_ptr iProvider) +EventSetupRecordProvider::add(std::shared_ptr iProvider) { assert(iProvider->isUsingRecord(key_)); - edm::propagate_const> pProvider(iProvider); + edm::propagate_const> pProvider(iProvider); assert(!search_all(providers_, pProvider)); providers_.emplace_back(iProvider); } void -EventSetupRecordProvider::addFinder(boost::shared_ptr iFinder) +EventSetupRecordProvider::addFinder(std::shared_ptr iFinder) { auto oldFinder = finder(); finder_ = iFinder; @@ -106,13 +106,13 @@ EventSetupRecordProvider::setValidityInterval(const ValidityInterval& iInterval) } void -EventSetupRecordProvider::setDependentProviders(const std::vector< boost::shared_ptr >& iProviders) +EventSetupRecordProvider::setDependentProviders(const std::vector< std::shared_ptr >& iProviders) { using std::placeholders::_1; - boost::shared_ptr< DependentRecordIntervalFinder > newFinder( + std::shared_ptr< DependentRecordIntervalFinder > newFinder( new DependentRecordIntervalFinder(key())); - boost::shared_ptr old = swapFinder(newFinder); + std::shared_ptr old = swapFinder(newFinder); for_all(iProviders, std::bind(std::mem_fun(&DependentRecordIntervalFinder::addProviderWeAreDependentOn), &(*newFinder), _1)); //if a finder was already set, add it as a depedency. This is done to ensure that the IOVs properly change even if the // old finder does not update each time a dependent record does change @@ -127,7 +127,7 @@ EventSetupRecordProvider::usePreferred(const DataToPreferredProviderMap& iMap) for_all(providers_, std::bind(&EventSetupRecordProvider::addProxiesToRecordHelper,this,_1,iMap)); if (1 < multipleFinders_->size()) { - boost::shared_ptr intFinder(new IntersectingIOVRecordIntervalFinder(key_)); + std::shared_ptr intFinder(new IntersectingIOVRecordIntervalFinder(key_)); intFinder->swapFinders(*multipleFinders_); finder_ = intFinder; } @@ -136,7 +136,7 @@ EventSetupRecordProvider::usePreferred(const DataToPreferredProviderMap& iMap) } void -EventSetupRecordProvider::addProxiesToRecord(boost::shared_ptr iProvider, +EventSetupRecordProvider::addProxiesToRecord(std::shared_ptr iProvider, const EventSetupRecordProvider::DataToPreferredProviderMap& iMap) { typedef DataProxyProvider::KeyedProxies ProxyList ; typedef EventSetupRecordProvider::DataToPreferredProviderMap PreferredMap; @@ -285,7 +285,7 @@ EventSetupRecordProvider::proxyProviderDescriptions() const return descriptions; } -boost::shared_ptr +std::shared_ptr EventSetupRecordProvider::proxyProvider(ComponentDescription const& iDesc) { using std::placeholders::_1; auto itFound = std::find_if(providers_.begin(),providers_.end(), @@ -293,23 +293,23 @@ EventSetupRecordProvider::proxyProvider(ComponentDescription const& iDesc) { iDesc, std::bind(&DataProxyProvider::description,_1))); if(itFound == providers_.end()){ - return boost::shared_ptr(); + return std::shared_ptr(); } return get_underlying_safe(*itFound); } -boost::shared_ptr +std::shared_ptr EventSetupRecordProvider::proxyProvider(ParameterSetIDHolder const& psetID) { for (auto& dataProxyProvider : providers_) { if (dataProxyProvider->description().pid_ == psetID.psetID()) { return get_underlying_safe(dataProxyProvider); } } - return boost::shared_ptr(); + return std::shared_ptr(); } void -EventSetupRecordProvider::resetProxyProvider(ParameterSetIDHolder const& psetID, boost::shared_ptr const& sharedDataProxyProvider) { +EventSetupRecordProvider::resetProxyProvider(ParameterSetIDHolder const& psetID, std::shared_ptr const& sharedDataProxyProvider) { for (auto& dataProxyProvider : providers_) { if (dataProxyProvider->description().pid_ == psetID.psetID()) { dataProxyProvider = sharedDataProxyProvider; diff --git a/FWCore/Framework/src/EventSetupsController.cc b/FWCore/Framework/src/EventSetupsController.cc index acf969c48a2ad..902b67857e5c6 100644 --- a/FWCore/Framework/src/EventSetupsController.cc +++ b/FWCore/Framework/src/EventSetupsController.cc @@ -28,13 +28,13 @@ namespace edm { EventSetupsController::EventSetupsController() : mustFinishConfiguration_(true) { } - boost::shared_ptr + std::shared_ptr EventSetupsController::makeProvider(ParameterSet& iPSet) { // Makes an EventSetupProvider // Also parses the prefer information from ParameterSets and puts // it in a map that is stored in the EventSetupProvider - boost::shared_ptr returnValue(makeEventSetupProvider(iPSet, providers_.size()) ); + std::shared_ptr returnValue(makeEventSetupProvider(iPSet, providers_.size()) ); // Construct the ESProducers and ESSources // shared_ptrs to them are temporarily stored in this @@ -49,7 +49,7 @@ namespace edm { EventSetupsController::eventSetupForInstance(IOVSyncValue const& syncValue) { if (mustFinishConfiguration_) { - std::for_each(providers_.begin(), providers_.end(), [](boost::shared_ptr const& esp) { + std::for_each(providers_.begin(), providers_.end(), [](std::shared_ptr const& esp) { esp->finishConfiguration(); }); // When the ESSources and ESProducers were constructed a first pass was @@ -64,19 +64,19 @@ namespace edm { mustFinishConfiguration_ = false; } - std::for_each(providers_.begin(), providers_.end(), [&syncValue](boost::shared_ptr const& esp) { + std::for_each(providers_.begin(), providers_.end(), [&syncValue](std::shared_ptr const& esp) { esp->eventSetupForInstance(syncValue); }); } void EventSetupsController::forceCacheClear() const { - std::for_each(providers_.begin(), providers_.end(), [](boost::shared_ptr const& esp) { + std::for_each(providers_.begin(), providers_.end(), [](std::shared_ptr const& esp) { esp->forceCacheClear(); }); } - boost::shared_ptr + std::shared_ptr EventSetupsController::getESProducerAndRegisterProcess(ParameterSet const& pset, unsigned subProcessIndex) { // Try to find a DataProxyProvider with a matching ParameterSet auto elements = esproducers_.equal_range(pset.id()); @@ -90,18 +90,18 @@ namespace edm { } } // Could not find it - return boost::shared_ptr(); + return std::shared_ptr(); } void - EventSetupsController::putESProducer(ParameterSet const& pset, boost::shared_ptr const& component, unsigned subProcessIndex) { + EventSetupsController::putESProducer(ParameterSet const& pset, std::shared_ptr const& component, unsigned subProcessIndex) { auto newElement = esproducers_.insert(std::pair(pset.id(), ESProducerInfo(&pset, component))); // Register processes with an exact match newElement->second.subProcessIndexes().push_back(subProcessIndex); } - boost::shared_ptr + std::shared_ptr EventSetupsController::getESSourceAndRegisterProcess(ParameterSet const& pset, unsigned subProcessIndex) { // Try to find a EventSetupRecordIntervalFinder with a matching ParameterSet auto elements = essources_.equal_range(pset.id()); @@ -115,11 +115,11 @@ namespace edm { } } // Could not find it - return boost::shared_ptr(); + return std::shared_ptr(); } void - EventSetupsController::putESSource(ParameterSet const& pset, boost::shared_ptr const& component, unsigned subProcessIndex) { + EventSetupsController::putESSource(ParameterSet const& pset, std::shared_ptr const& component, unsigned subProcessIndex) { auto newElement = essources_.insert(std::pair(pset.id(), ESSourceInfo(&pset, component))); // Register processes with an exact match diff --git a/FWCore/Framework/src/EventSetupsController.h b/FWCore/Framework/src/EventSetupsController.h index b4ca8b823b274..82560636e1e96 100644 --- a/FWCore/Framework/src/EventSetupsController.h +++ b/FWCore/Framework/src/EventSetupsController.h @@ -20,9 +20,8 @@ #include "DataFormats/Provenance/interface/ParameterSetID.h" -#include - #include +#include #include namespace edm { @@ -39,34 +38,34 @@ namespace edm { class ESProducerInfo { public: ESProducerInfo(ParameterSet const* ps, - boost::shared_ptr const& pr) : + std::shared_ptr const& pr) : pset_(ps), provider_(pr), subProcessIndexes_() { } ParameterSet const* pset() const { return pset_; } - boost::shared_ptr const& provider() const { return provider_; } + std::shared_ptr const& provider() const { return provider_; } std::vector& subProcessIndexes() { return subProcessIndexes_; } std::vector const& subProcessIndexes() const { return subProcessIndexes_; } private: ParameterSet const* pset_; - boost::shared_ptr provider_; + std::shared_ptr provider_; std::vector subProcessIndexes_; }; class ESSourceInfo { public: ESSourceInfo(ParameterSet const* ps, - boost::shared_ptr const& fi) : + std::shared_ptr const& fi) : pset_(ps), finder_(fi), subProcessIndexes_() { } ParameterSet const* pset() const { return pset_; } - boost::shared_ptr const& finder() const { return finder_; } + std::shared_ptr const& finder() const { return finder_; } std::vector& subProcessIndexes() { return subProcessIndexes_; } std::vector const& subProcessIndexes() const { return subProcessIndexes_; } private: ParameterSet const* pset_; - boost::shared_ptr finder_; + std::shared_ptr finder_; std::vector subProcessIndexes_; }; @@ -75,17 +74,17 @@ namespace edm { public: EventSetupsController(); - boost::shared_ptr makeProvider(ParameterSet&); + std::shared_ptr makeProvider(ParameterSet&); void eventSetupForInstance(IOVSyncValue const& syncValue); void forceCacheClear() const; - boost::shared_ptr getESProducerAndRegisterProcess(ParameterSet const& pset, unsigned subProcessIndex); - void putESProducer(ParameterSet const& pset, boost::shared_ptr const& component, unsigned subProcessIndex); + std::shared_ptr getESProducerAndRegisterProcess(ParameterSet const& pset, unsigned subProcessIndex); + void putESProducer(ParameterSet const& pset, std::shared_ptr const& component, unsigned subProcessIndex); - boost::shared_ptr getESSourceAndRegisterProcess(ParameterSet const& pset, unsigned subProcessIndex); - void putESSource(ParameterSet const& pset, boost::shared_ptr const& component, unsigned subProcessIndex); + std::shared_ptr getESSourceAndRegisterProcess(ParameterSet const& pset, unsigned subProcessIndex); + void putESSource(ParameterSet const& pset, std::shared_ptr const& component, unsigned subProcessIndex); void clearComponents(); @@ -116,7 +115,7 @@ namespace edm { ParameterSet const* getESProducerPSet(ParameterSetID const& psetID, unsigned subProcessIndex) const; - std::vector > const& providers() const { return providers_; } + std::vector > const& providers() const { return providers_; } std::multimap const& esproducers() const { return esproducers_; } @@ -132,7 +131,7 @@ namespace edm { void checkESProducerSharing(); // ---------- member data -------------------------------- - std::vector > providers_; + std::vector > providers_; // The following two multimaps have one entry for each unique // ParameterSet. The ESProducerInfo or ESSourceInfo object diff --git a/FWCore/Framework/src/IntersectingIOVRecordIntervalFinder.cc b/FWCore/Framework/src/IntersectingIOVRecordIntervalFinder.cc index c05495a31425d..090ba2e4775a1 100644 --- a/FWCore/Framework/src/IntersectingIOVRecordIntervalFinder.cc +++ b/FWCore/Framework/src/IntersectingIOVRecordIntervalFinder.cc @@ -58,7 +58,7 @@ IntersectingIOVRecordIntervalFinder::~IntersectingIOVRecordIntervalFinder() // member functions // void -IntersectingIOVRecordIntervalFinder::swapFinders(std::vector>>& iFinders) +IntersectingIOVRecordIntervalFinder::swapFinders(std::vector>>& iFinders) { finders_.swap(iFinders); } diff --git a/FWCore/Framework/src/IntersectingIOVRecordIntervalFinder.h b/FWCore/Framework/src/IntersectingIOVRecordIntervalFinder.h index 1ad5e8156af67..4493c4b1f58dc 100644 --- a/FWCore/Framework/src/IntersectingIOVRecordIntervalFinder.h +++ b/FWCore/Framework/src/IntersectingIOVRecordIntervalFinder.h @@ -19,8 +19,8 @@ // // system include files +#include #include -#include "boost/shared_ptr.hpp" // user include files #include "FWCore/Framework/interface/EventSetupRecordIntervalFinder.h" @@ -41,7 +41,7 @@ namespace edm { // ---------- static member functions -------------------- // ---------- member functions --------------------------- - void swapFinders(std::vector>>&); + void swapFinders(std::vector>>&); protected: virtual void setIntervalFor(const EventSetupRecordKey&, const IOVSyncValue& , @@ -53,7 +53,7 @@ namespace edm { const IntersectingIOVRecordIntervalFinder& operator=(const IntersectingIOVRecordIntervalFinder&); // stop default // ---------- member data -------------------------------- - std::vector>> finders_; + std::vector>> finders_; }; } } diff --git a/FWCore/Framework/src/LooperFactory.cc b/FWCore/Framework/src/LooperFactory.cc index 74d44bff4de4e..10894931eabaf 100644 --- a/FWCore/Framework/src/LooperFactory.cc +++ b/FWCore/Framework/src/LooperFactory.cc @@ -23,22 +23,22 @@ namespace edm { std::string LooperMakerTraits::name() { return "CMS EDM Framework EDLooper"; } void - LooperMakerTraits::replaceExisting(EventSetupProvider&, boost::shared_ptr) { + LooperMakerTraits::replaceExisting(EventSetupProvider&, std::shared_ptr) { throw edm::Exception(edm::errors::LogicError) << "LooperMakerTraits::replaceExisting\n" << "This function is not implemented and should never be called.\n" << "Please report this to a Framework Developer\n"; } - boost::shared_ptr + std::shared_ptr LooperMakerTraits::getComponentAndRegisterProcess(EventSetupsController&, ParameterSet const&) { - return boost::shared_ptr(); + return std::shared_ptr(); } void LooperMakerTraits::putComponent(EventSetupsController&, ParameterSet const&, - boost::shared_ptr const&) { + std::shared_ptr const&) { } } } diff --git a/FWCore/Framework/src/ModuleFactory.cc b/FWCore/Framework/src/ModuleFactory.cc index ce47bcd3516f3..fe82b68d834c3 100644 --- a/FWCore/Framework/src/ModuleFactory.cc +++ b/FWCore/Framework/src/ModuleFactory.cc @@ -28,19 +28,19 @@ namespace edm { // std::string ModuleMakerTraits::name() { return "CMS EDM Framework ESModule"; } void ModuleMakerTraits::addTo(EventSetupProvider& iProvider, - boost::shared_ptr iComponent, + std::shared_ptr iComponent, ParameterSet const&, bool) { iProvider.add(iComponent); } - void ModuleMakerTraits::replaceExisting(EventSetupProvider& iProvider, boost::shared_ptr iComponent) + void ModuleMakerTraits::replaceExisting(EventSetupProvider& iProvider, std::shared_ptr iComponent) { iProvider.replaceExisting(iComponent); } - boost::shared_ptr + std::shared_ptr ModuleMakerTraits::getComponentAndRegisterProcess(EventSetupsController& esController, ParameterSet const& iConfiguration) { return esController.getESProducerAndRegisterProcess(iConfiguration, esController.indexOfNextProcess()); @@ -48,7 +48,7 @@ namespace edm { void ModuleMakerTraits::putComponent(EventSetupsController& esController, ParameterSet const& iConfiguration, - boost::shared_ptr const& component) { + std::shared_ptr const& component) { esController.putESProducer(iConfiguration, component, esController.indexOfNextProcess()); } } diff --git a/FWCore/Framework/src/SourceFactory.cc b/FWCore/Framework/src/SourceFactory.cc index c8511aa863841..12c2f10f07b5f 100644 --- a/FWCore/Framework/src/SourceFactory.cc +++ b/FWCore/Framework/src/SourceFactory.cc @@ -28,14 +28,14 @@ namespace edm { std::string SourceMakerTraits::name() { return "CMS EDM Framework ESSource"; } void - SourceMakerTraits::replaceExisting(EventSetupProvider&, boost::shared_ptr ) { + SourceMakerTraits::replaceExisting(EventSetupProvider&, std::shared_ptr ) { throw edm::Exception(edm::errors::LogicError) << "SourceMakerTraits::replaceExisting\n" << "This function is not implemented and should never be called.\n" << "Please report this to a Framework Developer\n"; } - boost::shared_ptr + std::shared_ptr SourceMakerTraits::getComponentAndRegisterProcess(EventSetupsController& esController, ParameterSet const& iConfiguration) { return esController.getESSourceAndRegisterProcess(iConfiguration, esController.indexOfNextProcess()); @@ -43,7 +43,7 @@ namespace edm { void SourceMakerTraits::putComponent(EventSetupsController& esController, ParameterSet const& iConfiguration, - boost::shared_ptr const& component) { + std::shared_ptr const& component) { esController.putESSource(iConfiguration, component, esController.indexOfNextProcess()); } diff --git a/FWCore/Framework/test/DummyProxyProvider.h b/FWCore/Framework/test/DummyProxyProvider.h index f998f86d58086..99bd5899237c3 100644 --- a/FWCore/Framework/test/DummyProxyProvider.h +++ b/FWCore/Framework/test/DummyProxyProvider.h @@ -61,7 +61,7 @@ class DummyProxyProvider : public edm::eventsetup::DataProxyProvider { void registerProxies(const eventsetup::EventSetupRecordKey&, KeyedProxies& iProxies) { //std::cout <<"registered proxy"< pProxy(new WorkingDummyProxy(&dummy_)); + std::shared_ptr pProxy(new WorkingDummyProxy(&dummy_)); insertProxy(iProxies, pProxy); } diff --git a/FWCore/Framework/test/Event_t.cpp b/FWCore/Framework/test/Event_t.cpp index c0f699587f1da..9182b6dc8ef3d 100644 --- a/FWCore/Framework/test/Event_t.cpp +++ b/FWCore/Framework/test/Event_t.cpp @@ -42,8 +42,6 @@ Test program for edm::Event. #include "cppunit/extensions/HelperMacros.h" -#include "boost/shared_ptr.hpp" - #include #include #include diff --git a/FWCore/Framework/test/callback_t.cppunit.cc b/FWCore/Framework/test/callback_t.cppunit.cc index ac85c14f5f3a1..32bd81c6ecc8c 100644 --- a/FWCore/Framework/test/callback_t.cppunit.cc +++ b/FWCore/Framework/test/callback_t.cppunit.cc @@ -50,11 +50,11 @@ namespace callbacktest { struct SharedPtrProd { SharedPtrProd() : ptr_(new Data()) {} - boost::shared_ptr method(const Record&) { + std::shared_ptr method(const Record&) { ++ptr_->value_; return ptr_; } - boost::shared_ptr ptr_; + std::shared_ptr ptr_; }; struct PtrProductsProd { @@ -165,14 +165,14 @@ void testCallback::autoPtrTest() } -typedef Callback, Record> SharedPtrCallback; +typedef Callback, Record> SharedPtrCallback; void testCallback::sharedPtrTest() { SharedPtrProd prod; SharedPtrCallback callback(&prod, &SharedPtrProd::method); - boost::shared_ptr handle; + std::shared_ptr handle; callback.holdOntoPointer(&handle); diff --git a/FWCore/Framework/test/dependentrecord_t.cppunit.cc b/FWCore/Framework/test/dependentrecord_t.cppunit.cc index 02ca23d82c025..ff05cc89771ba 100644 --- a/FWCore/Framework/test/dependentrecord_t.cppunit.cc +++ b/FWCore/Framework/test/dependentrecord_t.cppunit.cc @@ -197,7 +197,7 @@ void testdependentrecord::dependentConstructorTest() void testdependentrecord::dependentFinder1Test() { - boost::shared_ptr dummyProvider( + std::shared_ptr dummyProvider( EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); const edm::EventID eID_1(1, 1, 1); @@ -205,7 +205,7 @@ void testdependentrecord::dependentFinder1Test() const edm::EventID eID_3(1, 1, 3); const edm::ValidityInterval definedInterval(sync_1, edm::IOVSyncValue(eID_3)); - boost::shared_ptr dummyFinder(new DummyFinder); + std::shared_ptr dummyFinder(new DummyFinder); dummyFinder->setInterval(definedInterval); dummyProvider->addFinder(dummyFinder); @@ -231,7 +231,7 @@ void testdependentrecord::dependentFinder1Test() void testdependentrecord::dependentFinder2Test() { - boost::shared_ptr dummyProvider1(EventSetupRecordProviderFactoryManager::instance() + std::shared_ptr dummyProvider1(EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); const edm::EventID eID_1(1, 1, 1); @@ -240,7 +240,7 @@ void testdependentrecord::dependentFinder2Test() edm::IOVSyncValue(edm::EventID(1, 1, 5))); dummyProvider1->setValidityInterval(definedInterval1); - boost::shared_ptr dummyProvider2(EventSetupRecordProviderFactoryManager::instance() + std::shared_ptr dummyProvider2(EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); const edm::EventID eID_2(1, 1, 2); @@ -266,7 +266,7 @@ void testdependentrecord::dependentFinder2Test() void testdependentrecord::timeAndRunTest() { //test case where we have two providers, one synching on time the other on run/lumi/event - boost::shared_ptr dummyProvider1(EventSetupRecordProviderFactoryManager::instance() + std::shared_ptr dummyProvider1(EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); const edm::EventID eID_1(1, 1, 1); @@ -275,7 +275,7 @@ void testdependentrecord::timeAndRunTest() edm::IOVSyncValue(edm::EventID(1, 1, 5))); dummyProvider1->setValidityInterval(definedInterval1); - boost::shared_ptr dummyProvider2(EventSetupRecordProviderFactoryManager::instance() + std::shared_ptr dummyProvider2(EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); const edm::Timestamp time_1(1); @@ -423,7 +423,7 @@ void testdependentrecord::timeAndRunTest() { //check for bug which only happens the first time we synchronize // have the second one invalid - boost::shared_ptr dummyProvider1(EventSetupRecordProviderFactoryManager::instance() + std::shared_ptr dummyProvider1(EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); const edm::EventID eID_1(1, 1, 1); @@ -432,7 +432,7 @@ void testdependentrecord::timeAndRunTest() edm::IOVSyncValue(edm::EventID(1, 1, 6))); dummyProvider1->setValidityInterval(definedInterval1); - boost::shared_ptr dummyProvider2(EventSetupRecordProviderFactoryManager::instance() + std::shared_ptr dummyProvider2(EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); dummyProvider2->setValidityInterval(invalid); @@ -466,12 +466,12 @@ void testdependentrecord::timeAndRunTest() //check for bug which only happens the first time we synchronize // have the first one invalid - boost::shared_ptr dummyProvider1(EventSetupRecordProviderFactoryManager::instance() + std::shared_ptr dummyProvider1(EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); dummyProvider1->setValidityInterval(invalid); - boost::shared_ptr dummyProvider2(EventSetupRecordProviderFactoryManager::instance() + std::shared_ptr dummyProvider2(EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); const edm::Timestamp time_1(1); @@ -509,21 +509,21 @@ void testdependentrecord::timeAndRunTest() { //check that going all the way through EventSetup works properly edm::eventsetup::EventSetupProvider provider; - boost::shared_ptr dummyProv(new DummyProxyProvider()); + std::shared_ptr dummyProv(new DummyProxyProvider()); provider.add(dummyProv); - boost::shared_ptr dummyFinder(new DummyFinder); + std::shared_ptr dummyFinder(new DummyFinder); dummyFinder->setInterval(edm::ValidityInterval(edm::IOVSyncValue(edm::EventID(1, 1, 1)), edm::IOVSyncValue(edm::EventID(1, 1, 5)))); - provider.add(boost::shared_ptr(dummyFinder)); + provider.add(std::shared_ptr(dummyFinder)); - boost::shared_ptr depProv(new DepOn2RecordProxyProvider()); + std::shared_ptr depProv(new DepOn2RecordProxyProvider()); provider.add(depProv); - boost::shared_ptr dummy2Finder(new Dummy2RecordFinder); + std::shared_ptr dummy2Finder(new Dummy2RecordFinder); dummy2Finder->setInterval(edm::ValidityInterval(edm::IOVSyncValue(edm::Timestamp( 1)), edm::IOVSyncValue(edm::Timestamp( 5)))); - provider.add(boost::shared_ptr(dummy2Finder)); + provider.add(std::shared_ptr(dummy2Finder)); { const edm::EventSetup& eventSetup1 = provider.eventSetupForInstance(edm::IOVSyncValue(edm::EventID(1, 1, 1), edm::Timestamp(1))); long long id1 = eventSetup1.get().cacheIdentifier(); @@ -557,21 +557,21 @@ void testdependentrecord::timeAndRunTest() //check that going all the way through EventSetup works properly // using two records with open ended IOVs edm::eventsetup::EventSetupProvider provider; - boost::shared_ptr dummyProv(new DummyProxyProvider()); + std::shared_ptr dummyProv(new DummyProxyProvider()); provider.add(dummyProv); - boost::shared_ptr dummyFinder(new DummyFinder); + std::shared_ptr dummyFinder(new DummyFinder); dummyFinder->setInterval(edm::ValidityInterval(edm::IOVSyncValue(edm::EventID(1, 1, 1)), edm::IOVSyncValue::invalidIOVSyncValue())); - provider.add(boost::shared_ptr(dummyFinder)); + provider.add(std::shared_ptr(dummyFinder)); - boost::shared_ptr depProv(new DepOn2RecordProxyProvider()); + std::shared_ptr depProv(new DepOn2RecordProxyProvider()); provider.add(depProv); - boost::shared_ptr dummy2Finder(new Dummy2RecordFinder); + std::shared_ptr dummy2Finder(new Dummy2RecordFinder); dummy2Finder->setInterval(edm::ValidityInterval(edm::IOVSyncValue(edm::Timestamp( 1)), edm::IOVSyncValue::invalidIOVSyncValue())); - provider.add(boost::shared_ptr(dummy2Finder)); + provider.add(std::shared_ptr(dummy2Finder)); { const edm::EventSetup& eventSetup1 = provider.eventSetupForInstance(edm::IOVSyncValue(edm::EventID(1, 1, 1), edm::Timestamp(1))); long long id1 = eventSetup1.get().cacheIdentifier(); @@ -609,17 +609,17 @@ void testdependentrecord::dependentSetproviderTest() std::auto_ptr depProvider = EventSetupRecordProviderFactoryManager::instance().makeRecordProvider(DepRecord::keyForClass()); - boost::shared_ptr dummyProvider( + std::shared_ptr dummyProvider( EventSetupRecordProviderFactoryManager::instance().makeRecordProvider(DummyRecord::keyForClass()).release()); - boost::shared_ptr dummyFinder(new DummyFinder); + std::shared_ptr dummyFinder(new DummyFinder); dummyFinder->setInterval(edm::ValidityInterval(edm::IOVSyncValue(edm::EventID(1, 1, 1)), edm::IOVSyncValue(edm::EventID(1, 1, 3)))); dummyProvider->addFinder(dummyFinder); CPPUNIT_ASSERT(*(depProvider->dependentRecords().begin()) == dummyProvider->key()); - std::vector< boost::shared_ptr > providers; + std::vector< std::shared_ptr > providers; providers.push_back(dummyProvider); depProvider->setDependentProviders(providers); } @@ -627,15 +627,15 @@ void testdependentrecord::dependentSetproviderTest() void testdependentrecord::getTest() { edm::eventsetup::EventSetupProvider provider; - boost::shared_ptr dummyProv(new DummyProxyProvider()); + std::shared_ptr dummyProv(new DummyProxyProvider()); provider.add(dummyProv); - boost::shared_ptr dummyFinder(new DummyFinder); + std::shared_ptr dummyFinder(new DummyFinder); dummyFinder->setInterval(edm::ValidityInterval(edm::IOVSyncValue(edm::EventID(1, 1, 1)), edm::IOVSyncValue(edm::EventID(1, 1, 3)))); - provider.add(boost::shared_ptr(dummyFinder)); + provider.add(std::shared_ptr(dummyFinder)); - boost::shared_ptr depProv(new DepRecordProxyProvider()); + std::shared_ptr depProv(new DepRecordProxyProvider()); provider.add(depProv); { const edm::EventSetup& eventSetup = provider.eventSetupForInstance(edm::IOVSyncValue(edm::EventID(1, 1, 1))); @@ -653,15 +653,15 @@ void testdependentrecord::getTest() void testdependentrecord::oneOfTwoRecordTest() { edm::eventsetup::EventSetupProvider provider; - boost::shared_ptr dummyProv(new DummyProxyProvider()); + std::shared_ptr dummyProv(new DummyProxyProvider()); provider.add(dummyProv); - boost::shared_ptr dummyFinder(new DummyFinder); + std::shared_ptr dummyFinder(new DummyFinder); dummyFinder->setInterval(edm::ValidityInterval(edm::IOVSyncValue(edm::EventID(1, 1, 1)), edm::IOVSyncValue(edm::EventID(1, 1, 3)))); - provider.add(boost::shared_ptr(dummyFinder)); + provider.add(std::shared_ptr(dummyFinder)); - boost::shared_ptr depProv(new DepOn2RecordProxyProvider()); + std::shared_ptr depProv(new DepOn2RecordProxyProvider()); provider.add(depProv); { const edm::EventSetup& eventSetup = provider.eventSetupForInstance(edm::IOVSyncValue(edm::EventID(1, 1, 1))); @@ -683,15 +683,15 @@ void testdependentrecord::oneOfTwoRecordTest() void testdependentrecord::resetTest() { edm::eventsetup::EventSetupProvider provider; - boost::shared_ptr dummyProv(new DummyProxyProvider()); + std::shared_ptr dummyProv(new DummyProxyProvider()); provider.add(dummyProv); - boost::shared_ptr dummyFinder(new DummyFinder); + std::shared_ptr dummyFinder(new DummyFinder); dummyFinder->setInterval(edm::ValidityInterval(edm::IOVSyncValue(edm::EventID(1, 1, 1)), edm::IOVSyncValue(edm::EventID(1, 1, 3)))); - provider.add(boost::shared_ptr(dummyFinder)); + provider.add(std::shared_ptr(dummyFinder)); - boost::shared_ptr depProv(new DepRecordProxyProvider()); + std::shared_ptr depProv(new DepRecordProxyProvider()); provider.add(depProv); { const edm::EventSetup& eventSetup = provider.eventSetupForInstance(edm::IOVSyncValue(edm::EventID(1, 1, 1))); @@ -707,7 +707,7 @@ void testdependentrecord::resetTest() } void testdependentrecord::alternateFinderTest() { - boost::shared_ptr dummyProvider( + std::shared_ptr dummyProvider( EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); const edm::EventID eID_1(1, 1, 1); @@ -717,11 +717,11 @@ void testdependentrecord::alternateFinderTest() const edm::EventID eID_4(1, 1, 4); const edm::ValidityInterval definedInterval(sync_1, edm::IOVSyncValue(eID_4)); - boost::shared_ptr dummyFinder(new DummyFinder); + std::shared_ptr dummyFinder(new DummyFinder); dummyFinder->setInterval(definedInterval); dummyProvider->addFinder(dummyFinder); - boost::shared_ptr depFinder(new DepRecordFinder); + std::shared_ptr depFinder(new DepRecordFinder); const edm::EventID eID_2(1, 1, 2); const edm::IOVSyncValue sync_2(eID_2); const edm::ValidityInterval depInterval(sync_1, @@ -771,7 +771,7 @@ void testdependentrecord::alternateFinderTest() void testdependentrecord::invalidRecordTest() { - boost::shared_ptr dummyProvider1(EventSetupRecordProviderFactoryManager::instance() + std::shared_ptr dummyProvider1(EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); const edm::ValidityInterval invalid( edm::IOVSyncValue::invalidIOVSyncValue(), @@ -779,7 +779,7 @@ void testdependentrecord::invalidRecordTest() dummyProvider1->setValidityInterval(invalid); - boost::shared_ptr dummyProvider2(EventSetupRecordProviderFactoryManager::instance() + std::shared_ptr dummyProvider2(EventSetupRecordProviderFactoryManager::instance() .makeRecordProvider(DummyRecord::keyForClass()).release()); dummyProvider2->setValidityInterval(invalid); @@ -831,23 +831,23 @@ void testdependentrecord::invalidRecordTest() void testdependentrecord::extendIOVTest() { edm::eventsetup::EventSetupProvider provider; - boost::shared_ptr dummyProv{new DummyProxyProvider{}}; + std::shared_ptr dummyProv{new DummyProxyProvider{}}; provider.add(dummyProv); - boost::shared_ptr dummyFinder{new DummyFinder}; + std::shared_ptr dummyFinder{new DummyFinder}; edm::IOVSyncValue startSyncValue{edm::EventID{1, 1, 1}}; dummyFinder->setInterval(edm::ValidityInterval{startSyncValue, edm::IOVSyncValue{edm::EventID{1, 1, 5}}}); - provider.add(boost::shared_ptr{dummyFinder}); + provider.add(std::shared_ptr{dummyFinder}); - boost::shared_ptr depProv(new DepOn2RecordProxyProvider()); + std::shared_ptr depProv(new DepOn2RecordProxyProvider()); provider.add(depProv); - boost::shared_ptr dummy2Finder(new Dummy2RecordFinder); + std::shared_ptr dummy2Finder(new Dummy2RecordFinder); dummy2Finder->setInterval(edm::ValidityInterval{startSyncValue, edm::IOVSyncValue{edm::EventID{1, 1, 6}}}); - provider.add(boost::shared_ptr(dummy2Finder)); + provider.add(std::shared_ptr(dummy2Finder)); { const edm::EventSetup& eventSetup1 = provider.eventSetupForInstance(edm::IOVSyncValue(edm::EventID(1, 1, 1), edm::Timestamp(1))); unsigned long long id1 = eventSetup1.get().cacheIdentifier(); diff --git a/FWCore/Framework/test/esproducer_t.cppunit.cc b/FWCore/Framework/test/esproducer_t.cppunit.cc index 8fbe104fa4732..7b13c5442c349 100644 --- a/FWCore/Framework/test/esproducer_t.cppunit.cc +++ b/FWCore/Framework/test/esproducer_t.cppunit.cc @@ -85,13 +85,13 @@ class ShareProducer : public ESProducer { ptr_->value_ = 0; setWhatProduced(this); } - boost::shared_ptr produce(const DummyRecord& /*iRecord*/) { + std::shared_ptr produce(const DummyRecord& /*iRecord*/) { ++ptr_->value_; std::cout <<"produce called "<value_< ptr_; + std::shared_ptr ptr_; }; class LabelledProducer : public ESProducer { @@ -105,7 +105,7 @@ class LabelledProducer : public ESProducer { setWhatProduced(this, &LabelledProducer::produceMore, edm::es::label("fi",kFi)("fum",kFum)); } - boost::shared_ptr produce(const DummyRecord& /*iRecord*/) { + std::shared_ptr produce(const DummyRecord& /*iRecord*/) { ++ptr_->value_; std::cout <<"\"foo\" produce called "<value_<(fi_) ); } private: - boost::shared_ptr ptr_; - boost::shared_ptr fi_; + std::shared_ptr ptr_; + std::shared_ptr fi_; }; }; @@ -148,11 +148,11 @@ void testEsproducer::getFromTest() { EventSetupProvider provider; - boost::shared_ptr pProxyProv(new Test1Producer); + std::shared_ptr pProxyProv(new Test1Producer); provider.add(pProxyProv); - boost::shared_ptr pFinder(new DummyFinder); - provider.add(boost::shared_ptr(pFinder)); + std::shared_ptr pFinder(new DummyFinder); + provider.add(std::shared_ptr(pFinder)); for(int iTime=1; iTime != 6; ++iTime) { const edm::Timestamp time(iTime); @@ -170,11 +170,11 @@ void testEsproducer::getfromShareTest() { EventSetupProvider provider; - boost::shared_ptr pProxyProv(new ShareProducer); + std::shared_ptr pProxyProv(new ShareProducer); provider.add(pProxyProv); - boost::shared_ptr pFinder(new DummyFinder); - provider.add(boost::shared_ptr(pFinder)); + std::shared_ptr pFinder(new DummyFinder); + provider.add(std::shared_ptr(pFinder)); for(int iTime=1; iTime != 6; ++iTime) { const edm::Timestamp time(iTime); @@ -193,11 +193,11 @@ void testEsproducer::labelTest() try { EventSetupProvider provider; - boost::shared_ptr pProxyProv(new LabelledProducer); + std::shared_ptr pProxyProv(new LabelledProducer); provider.add(pProxyProv); - boost::shared_ptr pFinder(new DummyFinder); - provider.add(boost::shared_ptr(pFinder)); + std::shared_ptr pFinder(new DummyFinder); + provider.add(std::shared_ptr(pFinder)); for(int iTime=1; iTime != 6; ++iTime) { const edm::Timestamp time(iTime); @@ -247,24 +247,24 @@ class DecoratorProducer : public ESProducer { ptr_->value_ = 0; setWhatProduced(this, TestDecorator()); } - boost::shared_ptr produce(const DummyRecord& /*iRecord*/) { + std::shared_ptr produce(const DummyRecord& /*iRecord*/) { ++ptr_->value_; std::cout <<"produce called "<value_< ptr_; + std::shared_ptr ptr_; }; void testEsproducer::decoratorTest() { EventSetupProvider provider; - boost::shared_ptr pProxyProv(new DecoratorProducer); + std::shared_ptr pProxyProv(new DecoratorProducer); provider.add(pProxyProv); - boost::shared_ptr pFinder(new DummyFinder); - provider.add(boost::shared_ptr(pFinder)); + std::shared_ptr pFinder(new DummyFinder); + provider.add(std::shared_ptr(pFinder)); for(int iTime=1; iTime != 6; ++iTime) { const edm::Timestamp time(iTime); @@ -291,7 +291,7 @@ class DepProducer : public ESProducer { &DepProducer::callWhenDummyChanges2, &DepProducer::callWhenDummyChanges3)); } - boost::shared_ptr produce(const DepRecord& /*iRecord*/) { + std::shared_ptr produce(const DepRecord& /*iRecord*/) { return ptr_; } void callWhenDummyChanges(const DummyRecord&) { @@ -308,18 +308,18 @@ class DepProducer : public ESProducer { } private: - boost::shared_ptr ptr_; + std::shared_ptr ptr_; }; void testEsproducer::dependsOnTest() { EventSetupProvider provider; - boost::shared_ptr pProxyProv(new DepProducer); + std::shared_ptr pProxyProv(new DepProducer); provider.add(pProxyProv); - boost::shared_ptr pFinder(new DummyFinder); - provider.add(boost::shared_ptr(pFinder)); + std::shared_ptr pFinder(new DummyFinder); + provider.add(std::shared_ptr(pFinder)); for(int iTime=1; iTime != 6; ++iTime) { const edm::Timestamp time(iTime); @@ -342,11 +342,11 @@ void testEsproducer::forceCacheClearTest() { EventSetupProvider provider; - boost::shared_ptr pProxyProv(new Test1Producer); + std::shared_ptr pProxyProv(new Test1Producer); provider.add(pProxyProv); - boost::shared_ptr pFinder(new DummyFinder); - provider.add(boost::shared_ptr(pFinder)); + std::shared_ptr pFinder(new DummyFinder); + provider.add(std::shared_ptr(pFinder)); const edm::Timestamp time(1); pFinder->setInterval(edm::ValidityInterval(edm::IOVSyncValue(time) , edm::IOVSyncValue(time))); diff --git a/FWCore/Framework/test/eventsetup_t.cppunit.cc b/FWCore/Framework/test/eventsetup_t.cppunit.cc index b1e5ec521f6af..0b16722c4bc18 100644 --- a/FWCore/Framework/test/eventsetup_t.cppunit.cc +++ b/FWCore/Framework/test/eventsetup_t.cppunit.cc @@ -208,7 +208,7 @@ void testEventsetup::recordValidityTest() typedef eventsetup::EventSetupRecordProviderTemplate DummyRecordProvider; std::auto_ptr dummyRecordProvider(new DummyRecordProvider()); - boost::shared_ptr finder(new DummyFinder); + std::shared_ptr finder(new DummyFinder); dummyRecordProvider->addFinder(finder); provider.insert(dummyRecordProvider); @@ -245,7 +245,7 @@ void testEventsetup::recordValidityExcTest() typedef eventsetup::EventSetupRecordProviderTemplate DummyRecordProvider; std::auto_ptr dummyRecordProvider(new DummyRecordProvider()); - boost::shared_ptr finder(new DummyFinder); + std::shared_ptr finder(new DummyFinder); dummyRecordProvider->addFinder(finder); provider.insert(dummyRecordProvider); @@ -279,7 +279,7 @@ static eventsetup::EventSetupRecordProviderFactoryTemplate s_factor void testEventsetup::proxyProviderTest() { eventsetup::EventSetupProvider provider; - boost::shared_ptr dummyProv(new DummyProxyProvider()); + std::shared_ptr dummyProv(new DummyProxyProvider()); provider.add(dummyProv); EventSetup const& eventSetup = provider.eventSetupForInstance(IOVSyncValue::invalidIOVSyncValue()); @@ -293,12 +293,12 @@ void testEventsetup::producerConflictTest() using edm::eventsetup::test::DummyProxyProvider; eventsetup::EventSetupProvider provider; { - boost::shared_ptr dummyProv(new DummyProxyProvider()); + std::shared_ptr dummyProv(new DummyProxyProvider()); dummyProv->setDescription(description); provider.add(dummyProv); } { - boost::shared_ptr dummyProv(new DummyProxyProvider()); + std::shared_ptr dummyProv(new DummyProxyProvider()); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -312,12 +312,12 @@ void testEventsetup::sourceConflictTest() using edm::eventsetup::test::DummyProxyProvider; eventsetup::EventSetupProvider provider; { - boost::shared_ptr dummyProv(new DummyProxyProvider()); + std::shared_ptr dummyProv(new DummyProxyProvider()); dummyProv->setDescription(description); provider.add(dummyProv); } { - boost::shared_ptr dummyProv(new DummyProxyProvider()); + std::shared_ptr dummyProv(new DummyProxyProvider()); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -333,14 +333,14 @@ void testEventsetup::twoSourceTest() using edm::eventsetup::test::DummyProxyProvider; eventsetup::EventSetupProvider provider; { - boost::shared_ptr dummyProv(new DummyProxyProvider()); + std::shared_ptr dummyProv(new DummyProxyProvider()); dummyProv->setDescription(description); provider.add(dummyProv); } { - boost::shared_ptr dummyProv(new edm::DummyEventSetupRecordRetriever()); - boost::shared_ptr providerPtr(dummyProv); - boost::shared_ptr finderPtr(dummyProv); + std::shared_ptr dummyProv(new edm::DummyEventSetupRecordRetriever()); + std::shared_ptr providerPtr(dummyProv); + std::shared_ptr finderPtr(dummyProv); edm::eventsetup::ComponentDescription description2("DummyEventSetupRecordRetriever","",true); dummyProv->setDescription(description2); provider.add(providerPtr); @@ -365,7 +365,7 @@ void testEventsetup::provenanceTest() ps.addParameter("name", "test11"); ps.registerIt(); description.pid_ = ps.id(); - boost::shared_ptr dummyProv(new DummyProxyProvider(kBad)); + std::shared_ptr dummyProv(new DummyProxyProvider(kBad)); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -375,7 +375,7 @@ void testEventsetup::provenanceTest() ps.addParameter("name", "test22"); ps.registerIt(); description.pid_ = ps.id(); - boost::shared_ptr dummyProv(new DummyProxyProvider(kGood)); + std::shared_ptr dummyProv(new DummyProxyProvider(kGood)); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -406,7 +406,7 @@ void testEventsetup::getDataWithLabelTest() ps.addParameter("name", "test11"); ps.registerIt(); description.pid_ = ps.id(); - boost::shared_ptr dummyProv(new DummyProxyProvider(kBad)); + std::shared_ptr dummyProv(new DummyProxyProvider(kBad)); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -417,7 +417,7 @@ void testEventsetup::getDataWithLabelTest() ps.addParameter("appendToDataLabel","blah"); ps.registerIt(); description.pid_ = ps.id(); - boost::shared_ptr dummyProv(new DummyProxyProvider(kGood)); + std::shared_ptr dummyProv(new DummyProxyProvider(kGood)); dummyProv->setDescription(description); dummyProv->setAppendToDataLabel(ps); provider.add(dummyProv); @@ -449,7 +449,7 @@ void testEventsetup::getDataWithESInputTagTest() ps.addParameter("name", "test11"); ps.registerIt(); description.pid_ = ps.id(); - boost::shared_ptr dummyProv(new DummyProxyProvider(kBad)); + std::shared_ptr dummyProv(new DummyProxyProvider(kBad)); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -460,7 +460,7 @@ void testEventsetup::getDataWithESInputTagTest() ps.addParameter("appendToDataLabel","blah"); ps.registerIt(); description.pid_ = ps.id(); - boost::shared_ptr dummyProv(new DummyProxyProvider(kGood)); + std::shared_ptr dummyProv(new DummyProxyProvider(kGood)); dummyProv->setDescription(description); dummyProv->setAppendToDataLabel(ps); provider.add(dummyProv); @@ -519,13 +519,13 @@ void testEventsetup::sourceProducerResolutionTest() eventsetup::EventSetupProvider provider; { edm::eventsetup::ComponentDescription description("DummyProxyProvider","",true); - boost::shared_ptr dummyProv(new DummyProxyProvider(kBad)); + std::shared_ptr dummyProv(new DummyProxyProvider(kBad)); dummyProv->setDescription(description); provider.add(dummyProv); } { edm::eventsetup::ComponentDescription description("DummyProxyProvider","",false); - boost::shared_ptr dummyProv(new DummyProxyProvider(kGood)); + std::shared_ptr dummyProv(new DummyProxyProvider(kGood)); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -545,13 +545,13 @@ void testEventsetup::sourceProducerResolutionTest() eventsetup::EventSetupProvider provider; { edm::eventsetup::ComponentDescription description("DummyProxyProvider","",false); - boost::shared_ptr dummyProv(new DummyProxyProvider(kGood)); + std::shared_ptr dummyProv(new DummyProxyProvider(kGood)); dummyProv->setDescription(description); provider.add(dummyProv); } { edm::eventsetup::ComponentDescription description("DummyProxyProvider","",true); - boost::shared_ptr dummyProv(new DummyProxyProvider(kBad)); + std::shared_ptr dummyProv(new DummyProxyProvider(kBad)); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -587,13 +587,13 @@ void testEventsetup::preferTest() eventsetup::EventSetupProvider provider(0U, &preferInfo); { edm::eventsetup::ComponentDescription description("DummyProxyProvider","bad",false); - boost::shared_ptr dummyProv(new DummyProxyProvider(kBad)); + std::shared_ptr dummyProv(new DummyProxyProvider(kBad)); dummyProv->setDescription(description); provider.add(dummyProv); } { edm::eventsetup::ComponentDescription description("DummyProxyProvider","",false); - boost::shared_ptr dummyProv(new DummyProxyProvider(kGood)); + std::shared_ptr dummyProv(new DummyProxyProvider(kGood)); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -618,13 +618,13 @@ void testEventsetup::preferTest() eventsetup::EventSetupProvider provider(0U, &preferInfo); { edm::eventsetup::ComponentDescription description("DummyProxyProvider","",true); - boost::shared_ptr dummyProv(new DummyProxyProvider(kGood)); + std::shared_ptr dummyProv(new DummyProxyProvider(kGood)); dummyProv->setDescription(description); provider.add(dummyProv); } { edm::eventsetup::ComponentDescription description("DummyProxyProvider","bad",true); - boost::shared_ptr dummyProv(new DummyProxyProvider(kBad)); + std::shared_ptr dummyProv(new DummyProxyProvider(kBad)); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -650,13 +650,13 @@ void testEventsetup::preferTest() eventsetup::EventSetupProvider provider(0U, &preferInfo); { edm::eventsetup::ComponentDescription description("DummyProxyProvider","",true); - boost::shared_ptr dummyProv(new DummyProxyProvider(kGood)); + std::shared_ptr dummyProv(new DummyProxyProvider(kGood)); dummyProv->setDescription(description); provider.add(dummyProv); } { edm::eventsetup::ComponentDescription description("DummyProxyProvider","bad",true); - boost::shared_ptr dummyProv(new DummyProxyProvider(kBad)); + std::shared_ptr dummyProv(new DummyProxyProvider(kBad)); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -692,7 +692,7 @@ void testEventsetup::introspectionTest() ps.addParameter("name", "test11"); ps.registerIt(); description.pid_ = ps.id(); - boost::shared_ptr dummyProv(new DummyProxyProvider(kBad)); + std::shared_ptr dummyProv(new DummyProxyProvider(kBad)); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -702,7 +702,7 @@ void testEventsetup::introspectionTest() ps.addParameter("name", "test22"); ps.registerIt(); description.pid_ = ps.id(); - boost::shared_ptr dummyProv(new DummyProxyProvider(kGood)); + std::shared_ptr dummyProv(new DummyProxyProvider(kGood)); dummyProv->setDescription(description); provider.add(dummyProv); } @@ -726,7 +726,7 @@ void testEventsetup::iovExtentionTest() typedef eventsetup::EventSetupRecordProviderTemplate DummyRecordProvider; std::auto_ptr dummyRecordProvider(new DummyRecordProvider()); - boost::shared_ptr finder(new DummyFinder); + std::shared_ptr finder(new DummyFinder); dummyRecordProvider->addFinder(finder); provider.insert(dummyRecordProvider); diff --git a/FWCore/Framework/test/eventsetuprecord_t.cppunit.cc b/FWCore/Framework/test/eventsetuprecord_t.cppunit.cc index b5dbf87ac98f0..8eb94a6fa3aed 100644 --- a/FWCore/Framework/test/eventsetuprecord_t.cppunit.cc +++ b/FWCore/Framework/test/eventsetuprecord_t.cppunit.cc @@ -146,7 +146,7 @@ class WorkingDummyProxy : public eventsetup::DataProxyTemplate iProxy) : + WorkingDummyProvider( const edm::eventsetup::DataKey& iKey, std::shared_ptr iProxy) : m_key(iKey), m_proxy(iProxy) { usingRecord(); @@ -162,7 +162,7 @@ class WorkingDummyProvider : public edm::eventsetup::DataProxyProvider { } private: edm::eventsetup::DataKey m_key; - boost::shared_ptr m_proxy; + std::shared_ptr m_proxy; }; @@ -464,12 +464,12 @@ void testEventsetupRecord::proxyResetTest() unsigned long long cacheID = dummyRecord.cacheIdentifier(); Dummy myDummy; - boost::shared_ptr workingProxy( new WorkingDummyProxy(&myDummy) ); + std::shared_ptr workingProxy( new WorkingDummyProxy(&myDummy) ); const DataKey workingDataKey(DataKey::makeTypeTag(), ""); - boost::shared_ptr wdProv( new WorkingDummyProvider(workingDataKey, workingProxy) ); + std::shared_ptr wdProv( new WorkingDummyProvider(workingDataKey, workingProxy) ); CPPUNIT_ASSERT(0 != wdProv.get()); if(wdProv.get() == 0) return; // To silence Coverity prov->add( wdProv ); @@ -516,12 +516,12 @@ void testEventsetupRecord::transientTest() unsigned long long cacheID = dummyRecord.cacheIdentifier(); Dummy myDummy; - boost::shared_ptr workingProxy( new WorkingDummyProxy(&myDummy) ); + std::shared_ptr workingProxy( new WorkingDummyProxy(&myDummy) ); const DataKey workingDataKey(DataKey::makeTypeTag(), ""); - boost::shared_ptr wdProv( new WorkingDummyProvider(workingDataKey, workingProxy) ); + std::shared_ptr wdProv( new WorkingDummyProvider(workingDataKey, workingProxy) ); prov->add( wdProv ); //this causes the proxies to actually be placed in the Record diff --git a/FWCore/Framework/test/eventsetupscontroller_t.cppunit.cc b/FWCore/Framework/test/eventsetupscontroller_t.cppunit.cc index 8d2a299ecf014..6c73c082596fb 100644 --- a/FWCore/Framework/test/eventsetupscontroller_t.cppunit.cc +++ b/FWCore/Framework/test/eventsetupscontroller_t.cppunit.cc @@ -12,10 +12,9 @@ #include "FWCore/Framework/test/DummyProxyProvider.h" #include "FWCore/Utilities/interface/Exception.h" -#include "boost/shared_ptr.hpp" - -#include +#include #include +#include class TestEventSetupsController: public CppUnit::TestFixture { @@ -68,24 +67,24 @@ void TestEventSetupsController::esProducerGetAndPutTest() { edm::ParameterSet pset1; pset1.registerIt(); - boost::shared_ptr proxyProvider1(new edm::eventsetup::test::DummyProxyProvider()); + std::shared_ptr proxyProvider1(new edm::eventsetup::test::DummyProxyProvider()); edm::ParameterSet pset2; pset2.addUntrackedParameter("p1", 1); pset2.registerIt(); - boost::shared_ptr proxyProvider2(new edm::eventsetup::test::DummyProxyProvider()); + std::shared_ptr proxyProvider2(new edm::eventsetup::test::DummyProxyProvider()); CPPUNIT_ASSERT(pset2.id() == pset1.id()); edm::ParameterSet pset3; pset3.addUntrackedParameter("p1", 2); pset3.registerIt(); - boost::shared_ptr proxyProvider3(new edm::eventsetup::test::DummyProxyProvider()); + std::shared_ptr proxyProvider3(new edm::eventsetup::test::DummyProxyProvider()); CPPUNIT_ASSERT(pset3.id() == pset1.id()); edm::ParameterSet pset4; pset4.addParameter("p1", 1); pset4.registerIt(); - boost::shared_ptr proxyProvider4(new edm::eventsetup::test::DummyProxyProvider()); + std::shared_ptr proxyProvider4(new edm::eventsetup::test::DummyProxyProvider()); CPPUNIT_ASSERT(pset4.id() != pset1.id()); edm::eventsetup::ParameterSetIDHolder psetIDHolder1(pset1.id()); @@ -96,7 +95,7 @@ void TestEventSetupsController::esProducerGetAndPutTest() { CPPUNIT_ASSERT(!(psetIDHolder1 == psetIDHolder4)); CPPUNIT_ASSERT((pset1.id() < pset4.id()) == (psetIDHolder1 < psetIDHolder4)); - boost::shared_ptr ptrFromGet = esController.getESProducerAndRegisterProcess(pset1, 0); + std::shared_ptr ptrFromGet = esController.getESProducerAndRegisterProcess(pset1, 0); CPPUNIT_ASSERT(!ptrFromGet); esController.putESProducer(pset1, proxyProvider1, 0); @@ -256,28 +255,28 @@ void TestEventSetupsController::esSourceGetAndPutTest() { edm::ParameterSet pset1; pset1.registerIt(); - boost::shared_ptr finder1(new DummyFinder()); + std::shared_ptr finder1(new DummyFinder()); edm::ParameterSet pset2; pset2.addUntrackedParameter("p1", 1); pset2.registerIt(); - boost::shared_ptr finder2(new DummyFinder()); + std::shared_ptr finder2(new DummyFinder()); CPPUNIT_ASSERT(pset2.id() == pset1.id()); edm::ParameterSet pset3; pset3.addUntrackedParameter("p1", 2); pset3.registerIt(); - boost::shared_ptr finder3(new DummyFinder()); + std::shared_ptr finder3(new DummyFinder()); CPPUNIT_ASSERT(pset3.id() == pset1.id()); edm::ParameterSet pset4; pset4.addParameter("p1", 1); pset4.registerIt(); - boost::shared_ptr finder4(new DummyFinder()); + std::shared_ptr finder4(new DummyFinder()); CPPUNIT_ASSERT(pset4.id() != pset1.id()); - boost::shared_ptr ptrFromGet = esController.getESSourceAndRegisterProcess(pset1, 0); + std::shared_ptr ptrFromGet = esController.getESSourceAndRegisterProcess(pset1, 0); CPPUNIT_ASSERT(!ptrFromGet); esController.putESSource(pset1, finder1, 0); diff --git a/FWCore/Framework/test/fullchain_t.cppunit.cc b/FWCore/Framework/test/fullchain_t.cppunit.cc index 84f3ba0e1751f..e890f29f33c49 100644 --- a/FWCore/Framework/test/fullchain_t.cppunit.cc +++ b/FWCore/Framework/test/fullchain_t.cppunit.cc @@ -43,11 +43,11 @@ void testfullChain::getfromDataproxyproviderTest() { eventsetup::EventSetupProvider provider; - boost::shared_ptr pProxyProv(new DummyProxyProvider); + std::shared_ptr pProxyProv(new DummyProxyProvider); provider.add(pProxyProv); - boost::shared_ptr pFinder(new DummyFinder); - provider.add(boost::shared_ptr(pFinder)); + std::shared_ptr pFinder(new DummyFinder); + provider.add(std::shared_ptr(pFinder)); const Timestamp time_1(1); const IOVSyncValue sync_1(time_1); diff --git a/FWCore/Framework/test/intersectingiovrecordintervalfinder_t.cppunit.cc b/FWCore/Framework/test/intersectingiovrecordintervalfinder_t.cppunit.cc index 38d2a399e1403..ab34c684e8979 100644 --- a/FWCore/Framework/test/intersectingiovrecordintervalfinder_t.cppunit.cc +++ b/FWCore/Framework/test/intersectingiovrecordintervalfinder_t.cppunit.cc @@ -86,8 +86,8 @@ testintersectingiovrecordintervalfinder::intersectionTest() const EventSetupRecordKey dummyRecordKey = DummyRecord::keyForClass(); IntersectingIOVRecordIntervalFinder intFinder(dummyRecordKey); - std::vector>> finders; - boost::shared_ptr dummyFinder(new DummyFinder); + std::vector>> finders; + std::shared_ptr dummyFinder(new DummyFinder); { const edm::EventID eID_1(1, 1, 1); const edm::IOVSyncValue sync_1(eID_1); @@ -127,7 +127,7 @@ testintersectingiovrecordintervalfinder::intersectionTest() dummyFinder->setInterval(definedInterval); finders.push_back(dummyFinder); - boost::shared_ptr dummyFinder2(new DummyFinder); + std::shared_ptr dummyFinder2(new DummyFinder); dummyFinder2->setInterval(edm::ValidityInterval(sync_3, sync_5)); finders.push_back(dummyFinder2); IntersectingIOVRecordIntervalFinder intFinder(dummyRecordKey); @@ -152,7 +152,7 @@ testintersectingiovrecordintervalfinder::intersectionTest() dummyFinder->setInterval(definedInterval); finders.push_back(dummyFinder); - boost::shared_ptr dummyFinder2(new DummyFinder); + std::shared_ptr dummyFinder2(new DummyFinder); dummyFinder2->setInterval(edm::ValidityInterval::invalidInterval()); finders.push_back(dummyFinder2); IntersectingIOVRecordIntervalFinder intFinder(dummyRecordKey); @@ -178,7 +178,7 @@ testintersectingiovrecordintervalfinder::intersectionTest() dummyFinder->setInterval(definedInterval); finders.push_back(dummyFinder); - boost::shared_ptr dummyFinder2(new DummyFinder); + std::shared_ptr dummyFinder2(new DummyFinder); dummyFinder2->setInterval(edm::ValidityInterval(sync_3, edm::IOVSyncValue::invalidIOVSyncValue())); finders.push_back(dummyFinder2); IntersectingIOVRecordIntervalFinder intFinder(dummyRecordKey); @@ -203,7 +203,7 @@ testintersectingiovrecordintervalfinder::intersectionTest() const edm::ValidityInterval definedInterval(sync_1, sync_4); - boost::shared_ptr dummyFinder2(new DummyFinder); + std::shared_ptr dummyFinder2(new DummyFinder); dummyFinder2->setInterval(edm::ValidityInterval(sync_3, edm::IOVSyncValue::invalidIOVSyncValue())); finders.push_back(dummyFinder2); diff --git a/FWCore/Framework/test/stubs/DummyLooper.cc b/FWCore/Framework/test/stubs/DummyLooper.cc index 621f52787c2dd..fdba06d953563 100644 --- a/FWCore/Framework/test/stubs/DummyLooper.cc +++ b/FWCore/Framework/test/stubs/DummyLooper.cc @@ -19,7 +19,6 @@ // system include files #include -#include "boost/shared_ptr.hpp" // user include files #include "FWCore/Framework/interface/LooperFactory.h" @@ -39,8 +38,8 @@ class DummyLooper : public edm::ESProducerLooper { DummyLooper(const edm::ParameterSet&); ~DummyLooper(); - typedef boost::shared_ptr ReturnType; - typedef boost::shared_ptr ConstReturnType; + typedef std::shared_ptr ReturnType; + typedef std::shared_ptr ConstReturnType; ReturnType produce(const DummyRecord&); diff --git a/FWCore/Integration/test/BuildFile.xml b/FWCore/Integration/test/BuildFile.xml index 3d734118f17e7..560c289a7cdae 100644 --- a/FWCore/Integration/test/BuildFile.xml +++ b/FWCore/Integration/test/BuildFile.xml @@ -1,5 +1,4 @@ - diff --git a/FWCore/Integration/test/ESTestProducers.cc b/FWCore/Integration/test/ESTestProducers.cc index 010c7bc9ef562..d6126e1d4fe71 100644 --- a/FWCore/Integration/test/ESTestProducers.cc +++ b/FWCore/Integration/test/ESTestProducers.cc @@ -5,23 +5,23 @@ #include "FWCore/MessageLogger/interface/MessageLogger.h" #include "FWCore/Framework/interface/ModuleFactory.h" -#include "boost/shared_ptr.hpp" +#include namespace edmtest { class ESTestProducerA : public edm::ESProducer { public: ESTestProducerA(edm::ParameterSet const&); - boost::shared_ptr produce(ESTestRecordA const&); + std::shared_ptr produce(ESTestRecordA const&); private: - boost::shared_ptr data_; + std::shared_ptr data_; }; ESTestProducerA::ESTestProducerA(edm::ParameterSet const&) : data_(new ESTestDataA(0)) { setWhatProduced(this); } - boost::shared_ptr ESTestProducerA::produce(ESTestRecordA const& rec) { + std::shared_ptr ESTestProducerA::produce(ESTestRecordA const& rec) { ++data_->value(); return data_; } @@ -31,16 +31,16 @@ namespace edmtest { class ESTestProducerB : public edm::ESProducer { public: ESTestProducerB(edm::ParameterSet const&); - boost::shared_ptr produce(ESTestRecordB const&); + std::shared_ptr produce(ESTestRecordB const&); private: - boost::shared_ptr data_; + std::shared_ptr data_; }; ESTestProducerB::ESTestProducerB(edm::ParameterSet const&) : data_(new ESTestDataB(0)) { setWhatProduced(this); } - boost::shared_ptr ESTestProducerB::produce(ESTestRecordB const& rec) { + std::shared_ptr ESTestProducerB::produce(ESTestRecordB const& rec) { ++data_->value(); return data_; } @@ -50,16 +50,16 @@ namespace edmtest { class ESTestProducerC : public edm::ESProducer { public: ESTestProducerC(edm::ParameterSet const&); - boost::shared_ptr produce(ESTestRecordC const&); + std::shared_ptr produce(ESTestRecordC const&); private: - boost::shared_ptr data_; + std::shared_ptr data_; }; ESTestProducerC::ESTestProducerC(edm::ParameterSet const&) : data_(new ESTestDataC(0)) { setWhatProduced(this); } - boost::shared_ptr ESTestProducerC::produce(ESTestRecordC const& rec) { + std::shared_ptr ESTestProducerC::produce(ESTestRecordC const& rec) { ++data_->value(); return data_; } @@ -69,16 +69,16 @@ namespace edmtest { class ESTestProducerD : public edm::ESProducer { public: ESTestProducerD(edm::ParameterSet const&); - boost::shared_ptr produce(ESTestRecordD const&); + std::shared_ptr produce(ESTestRecordD const&); private: - boost::shared_ptr data_; + std::shared_ptr data_; }; ESTestProducerD::ESTestProducerD(edm::ParameterSet const&) : data_(new ESTestDataD(0)) { setWhatProduced(this); } - boost::shared_ptr ESTestProducerD::produce(ESTestRecordD const& rec) { + std::shared_ptr ESTestProducerD::produce(ESTestRecordD const& rec) { ++data_->value(); return data_; } @@ -88,16 +88,16 @@ namespace edmtest { class ESTestProducerE : public edm::ESProducer { public: ESTestProducerE(edm::ParameterSet const&); - boost::shared_ptr produce(ESTestRecordE const&); + std::shared_ptr produce(ESTestRecordE const&); private: - boost::shared_ptr data_; + std::shared_ptr data_; }; ESTestProducerE::ESTestProducerE(edm::ParameterSet const&) : data_(new ESTestDataE(0)) { setWhatProduced(this); } - boost::shared_ptr ESTestProducerE::produce(ESTestRecordE const& rec) { + std::shared_ptr ESTestProducerE::produce(ESTestRecordE const& rec) { ++data_->value(); return data_; } @@ -107,16 +107,16 @@ namespace edmtest { class ESTestProducerF : public edm::ESProducer { public: ESTestProducerF(edm::ParameterSet const&); - boost::shared_ptr produce(ESTestRecordF const&); + std::shared_ptr produce(ESTestRecordF const&); private: - boost::shared_ptr data_; + std::shared_ptr data_; }; ESTestProducerF::ESTestProducerF(edm::ParameterSet const&) : data_(new ESTestDataF(0)) { setWhatProduced(this); } - boost::shared_ptr ESTestProducerF::produce(ESTestRecordF const& rec) { + std::shared_ptr ESTestProducerF::produce(ESTestRecordF const& rec) { ++data_->value(); return data_; } @@ -126,16 +126,16 @@ namespace edmtest { class ESTestProducerG : public edm::ESProducer { public: ESTestProducerG(edm::ParameterSet const&); - boost::shared_ptr produce(ESTestRecordG const&); + std::shared_ptr produce(ESTestRecordG const&); private: - boost::shared_ptr data_; + std::shared_ptr data_; }; ESTestProducerG::ESTestProducerG(edm::ParameterSet const&) : data_(new ESTestDataG(0)) { setWhatProduced(this); } - boost::shared_ptr ESTestProducerG::produce(ESTestRecordG const& rec) { + std::shared_ptr ESTestProducerG::produce(ESTestRecordG const& rec) { ++data_->value(); return data_; } @@ -145,16 +145,16 @@ namespace edmtest { class ESTestProducerH : public edm::ESProducer { public: ESTestProducerH(edm::ParameterSet const&); - boost::shared_ptr produce(ESTestRecordH const&); + std::shared_ptr produce(ESTestRecordH const&); private: - boost::shared_ptr data_; + std::shared_ptr data_; }; ESTestProducerH::ESTestProducerH(edm::ParameterSet const&) : data_(new ESTestDataH(0)) { setWhatProduced(this); } - boost::shared_ptr ESTestProducerH::produce(ESTestRecordH const& rec) { + std::shared_ptr ESTestProducerH::produce(ESTestRecordH const& rec) { ++data_->value(); return data_; } @@ -164,16 +164,16 @@ namespace edmtest { class ESTestProducerI : public edm::ESProducer { public: ESTestProducerI(edm::ParameterSet const&); - boost::shared_ptr produce(ESTestRecordI const&); + std::shared_ptr produce(ESTestRecordI const&); private: - boost::shared_ptr data_; + std::shared_ptr data_; }; ESTestProducerI::ESTestProducerI(edm::ParameterSet const&) : data_(new ESTestDataI(0)) { setWhatProduced(this); } - boost::shared_ptr ESTestProducerI::produce(ESTestRecordI const& rec) { + std::shared_ptr ESTestProducerI::produce(ESTestRecordI const& rec) { ++data_->value(); return data_; } @@ -183,16 +183,16 @@ namespace edmtest { class ESTestProducerJ : public edm::ESProducer { public: ESTestProducerJ(edm::ParameterSet const&); - boost::shared_ptr produce(ESTestRecordJ const&); + std::shared_ptr produce(ESTestRecordJ const&); private: - boost::shared_ptr data_; + std::shared_ptr data_; }; ESTestProducerJ::ESTestProducerJ(edm::ParameterSet const&) : data_(new ESTestDataJ(0)) { setWhatProduced(this); } - boost::shared_ptr ESTestProducerJ::produce(ESTestRecordJ const& rec) { + std::shared_ptr ESTestProducerJ::produce(ESTestRecordJ const& rec) { ++data_->value(); return data_; } @@ -202,16 +202,16 @@ namespace edmtest { class ESTestProducerK : public edm::ESProducer { public: ESTestProducerK(edm::ParameterSet const&); - boost::shared_ptr produce(ESTestRecordK const&); + std::shared_ptr produce(ESTestRecordK const&); private: - boost::shared_ptr data_; + std::shared_ptr data_; }; ESTestProducerK::ESTestProducerK(edm::ParameterSet const&) : data_(new ESTestDataK(0)) { setWhatProduced(this); } - boost::shared_ptr ESTestProducerK::produce(ESTestRecordK const& rec) { + std::shared_ptr ESTestProducerK::produce(ESTestRecordK const& rec) { ++data_->value(); return data_; } @@ -221,11 +221,11 @@ namespace edmtest { class ESTestProducerAZ : public edm::ESProducer { public: ESTestProducerAZ(edm::ParameterSet const&); - boost::shared_ptr produceA(ESTestRecordA const&); - boost::shared_ptr produceZ(ESTestRecordZ const&); + std::shared_ptr produceA(ESTestRecordA const&); + std::shared_ptr produceZ(ESTestRecordZ const&); private: - boost::shared_ptr dataA_; - boost::shared_ptr dataZ_; + std::shared_ptr dataA_; + std::shared_ptr dataZ_; }; ESTestProducerAZ::ESTestProducerAZ(edm::ParameterSet const&) : @@ -235,12 +235,12 @@ namespace edmtest { setWhatProduced(this, &edmtest::ESTestProducerAZ::produceZ, edm::es::Label("foo")); } - boost::shared_ptr ESTestProducerAZ::produceA(ESTestRecordA const& rec) { + std::shared_ptr ESTestProducerAZ::produceA(ESTestRecordA const& rec) { ++dataA_->value(); return dataA_; } - boost::shared_ptr ESTestProducerAZ::produceZ(ESTestRecordZ const& rec) { + std::shared_ptr ESTestProducerAZ::produceZ(ESTestRecordZ const& rec) { ++dataZ_->value(); return dataZ_; } diff --git a/FWCore/MessageLogger/doc/MessageLoggerDesign.txt b/FWCore/MessageLogger/doc/MessageLoggerDesign.txt index fe736fcd55c1e..6eec602c762f0 100644 --- a/FWCore/MessageLogger/doc/MessageLoggerDesign.txt +++ b/FWCore/MessageLogger/doc/MessageLoggerDesign.txt @@ -158,7 +158,7 @@ struct MessageSender { m->Object = ep; s->commit(); } - boost::shared_ptr ep; + std::shared_ptr ep; }; MessageLogger::MessageLogger ( const edm::parameter_set & p, ... ) { diff --git a/FWCore/ServiceRegistry/BuildFile.xml b/FWCore/ServiceRegistry/BuildFile.xml index 479d37684c923..340c4316e5506 100644 --- a/FWCore/ServiceRegistry/BuildFile.xml +++ b/FWCore/ServiceRegistry/BuildFile.xml @@ -1,4 +1,3 @@ - diff --git a/FWCore/ServiceRegistry/interface/ActivityRegistry.h b/FWCore/ServiceRegistry/interface/ActivityRegistry.h index e930902a886c1..1d6680333d4b8 100644 --- a/FWCore/ServiceRegistry/interface/ActivityRegistry.h +++ b/FWCore/ServiceRegistry/interface/ActivityRegistry.h @@ -29,7 +29,6 @@ unscheduled execution. The tests are in FWCore/Integration/test: // // system include files -//#include "boost/signal.hpp" #include #include "FWCore/Utilities/interface/Signal.h" #include "FWCore/Utilities/interface/StreamID.h" diff --git a/FWCore/Skeletons/doc/man/skeletons.1 b/FWCore/Skeletons/doc/man/skeletons.1 index d33554fb63bf2..920359e8066ed 100644 --- a/FWCore/Skeletons/doc/man/skeletons.1 +++ b/FWCore/Skeletons/doc/man/skeletons.1 @@ -324,7 +324,7 @@ class __class__ : public edm::ESProducer { #python_begin datatypes = [] for dtype in __datatypes__: - datatypes.append("boost::shared_ptr<%s>" % dtype) + datatypes.append("std::shared_ptr<%s>" % dtype) print " typedef edm::ESProducts<%s> ReturnType;" % \(aq,\(aq.join(datatypes) #python_end @@ -383,7 +383,7 @@ __class__::produce(const __record__& iRecord) out1 = [] out2 = [] for dtype in __datatypes__: - out1.append(" boost::shared_ptr<%s> p%s;\en" % (dtype, dtype)) + out1.append(" std::shared_ptr<%s> p%s;\en" % (dtype, dtype)) out2.append("p%s" % dtype) output = \(aq\en\(aq.join(out1) output += " return products(%s);\en" % \(aq,\(aq.join(out2) diff --git a/FWCore/Utilities/interface/value_ptr.h b/FWCore/Utilities/interface/value_ptr.h index d406a0f3cac11..aec97ee41967c 100644 --- a/FWCore/Utilities/interface/value_ptr.h +++ b/FWCore/Utilities/interface/value_ptr.h @@ -13,9 +13,9 @@ // The value_ptr_traits template is provided to allow specialization // of the copying behavior. See the notes below. // -// Use value_ptr only when deep-copying of the pointed-to object is -// desireable. Use boost::shared_ptr or std::shared_ptr when sharing -// of the pointed-to object is desirable. Use std::unique_ptr +// Use value_ptr only when deep-copying of the pointed-to object +// is desireable. Use std::shared_ptr when sharing of the +// pointed-to object is desirable. Use std::unique_ptr // when no copying is desirable. // // The design of value_ptr is taken from Herb Sutter's More diff --git a/IOMC/RandomEngine/BuildFile.xml b/IOMC/RandomEngine/BuildFile.xml index 97a12b1525d75..4a092d4f9a29e 100644 --- a/IOMC/RandomEngine/BuildFile.xml +++ b/IOMC/RandomEngine/BuildFile.xml @@ -5,7 +5,6 @@ - diff --git a/IOPool/Output/BuildFile.xml b/IOPool/Output/BuildFile.xml index bb8e89f4af95a..a047823083b52 100644 --- a/IOPool/Output/BuildFile.xml +++ b/IOPool/Output/BuildFile.xml @@ -7,7 +7,6 @@ - diff --git a/IOPool/SecondaryInput/test/BuildFile.xml b/IOPool/SecondaryInput/test/BuildFile.xml index 355877c24ba5e..8430d52f5da45 100644 --- a/IOPool/SecondaryInput/test/BuildFile.xml +++ b/IOPool/SecondaryInput/test/BuildFile.xml @@ -1,5 +1,4 @@ - diff --git a/IOPool/Streamer/BuildFile.xml b/IOPool/Streamer/BuildFile.xml index 9b906e53849d3..1cf357f3073b2 100644 --- a/IOPool/Streamer/BuildFile.xml +++ b/IOPool/Streamer/BuildFile.xml @@ -10,7 +10,6 @@ - diff --git a/IOPool/Streamer/test/BuildFile.xml b/IOPool/Streamer/test/BuildFile.xml index 44b1e03ef8558..8ed4b56f2c388 100644 --- a/IOPool/Streamer/test/BuildFile.xml +++ b/IOPool/Streamer/test/BuildFile.xml @@ -1,5 +1,4 @@ - diff --git a/PhysicsTools/CondLiteIO/plugins/FWLiteESRecordWriterAnalyzer.cc b/PhysicsTools/CondLiteIO/plugins/FWLiteESRecordWriterAnalyzer.cc index c30856305effa..54ce55ba9c4fb 100644 --- a/PhysicsTools/CondLiteIO/plugins/FWLiteESRecordWriterAnalyzer.cc +++ b/PhysicsTools/CondLiteIO/plugins/FWLiteESRecordWriterAnalyzer.cc @@ -163,7 +163,7 @@ class FWLiteESRecordWriterAnalyzer : public edm::EDAnalyzer { void update(const edm::EventSetup&); // ----------member data --------------------------- - std::vector > m_handlers; + std::vector > m_handlers; std::map > > m_recordToDataNames; TFile* m_file; @@ -267,11 +267,11 @@ FWLiteESRecordWriterAnalyzer::update(const edm::EventSetup& iSetup) } dataInfos.push_back(DataInfo(tt,itData->second)); } - m_handlers.push_back( boost::shared_ptr( new RecordHandler(rKey,m_file,dataInfos) ) ); + m_handlers.push_back( std::shared_ptr( new RecordHandler(rKey,m_file,dataInfos) ) ); } } - for(std::vector >::iterator it = m_handlers.begin(),itEnd = m_handlers.end(); + for(std::vector >::iterator it = m_handlers.begin(),itEnd = m_handlers.end(); it != itEnd; ++it) { (*it)->update(iSetup); diff --git a/PhysicsTools/CondLiteIO/plugins/FWLiteESSource.cc b/PhysicsTools/CondLiteIO/plugins/FWLiteESSource.cc index 8f3e85f1567f4..ce22c1ff733fe 100644 --- a/PhysicsTools/CondLiteIO/plugins/FWLiteESSource.cc +++ b/PhysicsTools/CondLiteIO/plugins/FWLiteESSource.cc @@ -20,7 +20,6 @@ #include #include #include "TFile.h" -#include // user include files #include "FWCore/Framework/interface/DataProxyProvider.h" @@ -206,7 +205,7 @@ FWLiteESSource::registerProxies(const edm::eventsetup::EventSetupRecordKey& iRec if(tt != HCTypeTag() ) { edm::eventsetup::DataKey dk(tt,edm::eventsetup::IdTags(it->second.c_str())); aProxyList.push_back(std::make_pair(dk, - boost::shared_ptr(new FWLiteProxy(TypeID(tt.value()),&rec)))); + std::shared_ptr(new FWLiteProxy(TypeID(tt.value()),&rec)))); } else { LogDebug("UnknownESType")<<"The type '"<first<<"' is unknown in this job"; std::cout <<" *****FAILED*****"< #include -#include - #include "CondFormats/PhysicsToolsObjects/interface/MVAComputer.h" #include "PhysicsTools/MVATrainer/interface/MVATrainer.h" #include "PhysicsTools/MVATrainer/interface/MVATrainerLooper.h" diff --git a/PhysicsTools/MVATrainer/interface/MVATrainerLooper.h b/PhysicsTools/MVATrainer/interface/MVATrainerLooper.h index 4e738062a8152..d840d9033f969 100644 --- a/PhysicsTools/MVATrainer/interface/MVATrainerLooper.h +++ b/PhysicsTools/MVATrainer/interface/MVATrainerLooper.h @@ -5,8 +5,6 @@ #include #include -#include - #include "FWCore/Framework/interface/ESProducerLooper.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" @@ -26,8 +24,8 @@ class MVATrainerLooper : public edm::ESProducerLooper { virtual Status endOfLoop(const edm::EventSetup &es, unsigned int iteration); - typedef boost::shared_ptr TrainObject; - typedef boost::shared_ptr + typedef std::shared_ptr TrainObject; + typedef std::shared_ptr TrainContainer; template diff --git a/PhysicsTools/MVATrainer/interface/MVATrainerLooperImpl.h b/PhysicsTools/MVATrainer/interface/MVATrainerLooperImpl.h index cbdb5eae47fdb..815bb8523372d 100644 --- a/PhysicsTools/MVATrainer/interface/MVATrainerLooperImpl.h +++ b/PhysicsTools/MVATrainer/interface/MVATrainerLooperImpl.h @@ -4,8 +4,6 @@ #include #include -#include - #include "FWCore/Utilities/interface/Exception.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "FWCore/Framework/interface/ESProducts.h" @@ -27,7 +25,7 @@ class MVATrainerLooperImpl : public MVATrainerLooper { virtual ~MVATrainerLooperImpl() {} - boost::shared_ptr + std::shared_ptr produce(const Record_t &record) { return (*getTrainers().begin())->getCalibration(); } }; @@ -60,7 +58,7 @@ class MVATrainerContainerLooperImpl : public MVATrainerLooper { edm::es::L > produce(const Record_t &record) { - boost::shared_ptr trainerCalib( + std::shared_ptr trainerCalib( new MVATrainerContainer()); TrainContainer trainedCalib; diff --git a/PhysicsTools/MVATrainer/interface/TrainerMonitoring.h b/PhysicsTools/MVATrainer/interface/TrainerMonitoring.h index 3a50420f41de5..5add2f5e13852 100644 --- a/PhysicsTools/MVATrainer/interface/TrainerMonitoring.h +++ b/PhysicsTools/MVATrainer/interface/TrainerMonitoring.h @@ -6,7 +6,6 @@ #include #include -#include #include #include #include @@ -139,7 +138,7 @@ class TrainerMonitoring { inline void reg(const std::string &name, T *object); TDirectory *dir; - std::map > data; + std::map > data; }; Module *book(const std::string &name); @@ -178,7 +177,7 @@ class TrainerMonitoring { private: std::auto_ptr rootFile; - std::map > modules; + std::map > modules; }; namespace helper { diff --git a/PhysicsTools/MVATrainer/src/MVATrainerLooper.cc b/PhysicsTools/MVATrainer/src/MVATrainerLooper.cc index 89e430e7b8f7a..21e0493bcb1b0 100644 --- a/PhysicsTools/MVATrainer/src/MVATrainerLooper.cc +++ b/PhysicsTools/MVATrainer/src/MVATrainerLooper.cc @@ -3,8 +3,6 @@ #include #include -#include - #include "FWCore/Utilities/interface/Exception.h" #include "FWCore/Utilities/interface/EDMException.h" #include "FWCore/ParameterSet/interface/ParameterSet.h" diff --git a/PhysicsTools/MVATrainer/src/TrainerMonitoring.cc b/PhysicsTools/MVATrainer/src/TrainerMonitoring.cc index 63ea2aa6fc26f..9a731388e6d36 100644 --- a/PhysicsTools/MVATrainer/src/TrainerMonitoring.cc +++ b/PhysicsTools/MVATrainer/src/TrainerMonitoring.cc @@ -3,8 +3,6 @@ #include #include -#include - #include #include #include @@ -44,7 +42,7 @@ void TrainerMonitoring::write() { ROOTContextSentinel ctx; - typedef std::map > Map; + typedef std::map > Map; for(Map::const_iterator iter = modules.begin(); iter != modules.end(); ++iter) { rootFile->cd(); @@ -64,7 +62,7 @@ TrainerMonitoring::Module::~Module() void TrainerMonitoring::Module::write(TDirectory *dir) { - typedef std::map > Map; + typedef std::map > Map; for(Map::const_iterator iter = data.begin(); iter != data.end(); ++iter) iter->second->write(dir); @@ -72,7 +70,7 @@ void TrainerMonitoring::Module::write(TDirectory *dir) void TrainerMonitoring::Module::add(Object *object) { - boost::shared_ptr ptr(object); + std::shared_ptr ptr(object); if (!data.insert(std::make_pair(object->getName(), ptr)).second) throw cms::Exception("DuplicateNode") << "Node \"" << object->getName() << "\" already" @@ -81,7 +79,7 @@ void TrainerMonitoring::Module::add(Object *object) TrainerMonitoring::Module *TrainerMonitoring::book(const std::string &name) { - boost::shared_ptr module(new Module); + std::shared_ptr module(new Module); if (!modules.insert(std::make_pair(name, module)).second) throw cms::Exception("DuplicateModule") << "Module \"" << name << "\" already" diff --git a/Utilities/StorageFactory/interface/StorageAccount.h b/Utilities/StorageFactory/interface/StorageAccount.h index 86b086bed18ca..7bd299d9144e2 100644 --- a/Utilities/StorageFactory/interface/StorageAccount.h +++ b/Utilities/StorageFactory/interface/StorageAccount.h @@ -1,12 +1,12 @@ #ifndef STORAGE_FACTORY_STORAGE_ACCOUNT_H # define STORAGE_FACTORY_STORAGE_ACCOUNT_H -# include # include # include # include # include # include +# include # include "tbb/concurrent_unordered_map.h" class StorageAccount { diff --git a/Utilities/StorageFactory/src/StorageAccount.cc b/Utilities/StorageFactory/src/StorageAccount.cc index f11c735345dd7..5d57e268b6343 100644 --- a/Utilities/StorageFactory/src/StorageAccount.cc +++ b/Utilities/StorageFactory/src/StorageAccount.cc @@ -1,4 +1,5 @@ #include "Utilities/StorageFactory/interface/StorageAccount.h" +#include #include #include #include diff --git a/Utilities/StorageFactory/test/Test.h b/Utilities/StorageFactory/test/Test.h index aa175325ddf17..e387654351234 100644 --- a/Utilities/StorageFactory/test/Test.h +++ b/Utilities/StorageFactory/test/Test.h @@ -6,10 +6,10 @@ #include "FWCore/PluginManager/interface/PresenceFactory.h" #include "FWCore/PluginManager/interface/PluginManager.h" #include "FWCore/PluginManager/interface/standard.h" -#include "boost/shared_ptr.hpp" #include +#include -static boost::shared_ptr gobbleUpTheGoop; +static std::shared_ptr gobbleUpTheGoop; static void initTest(void) { // Initialise the plug-in manager. @@ -24,7 +24,7 @@ static void initTest(void) // logger. try { - gobbleUpTheGoop = boost::shared_ptr + gobbleUpTheGoop = std::shared_ptr (edm::PresenceFactory::get()->makePresence("SingleThreadMSPresence").release()); } catch (cms::Exception &e) From 44938a3a4ff41ea3e0b2320ade1bec75d4d39368 Mon Sep 17 00:00:00 2001 From: Michael Mulhearn Date: Tue, 2 Feb 2016 03:59:13 +0100 Subject: [PATCH 239/250] updates to Muon cond formats for BMTF and uGMT --- .../interface/L1TMuonBarrelParams.h | 38 ++++- .../interface/L1TMuonGlobalParams.h | 143 +++++++++++++----- .../L1TObjects/src/L1TMuonBarrelParams.cc | 23 --- .../L1TObjects/src/L1TMuonGlobalParams.cc | 22 +-- 4 files changed, 149 insertions(+), 77 deletions(-) diff --git a/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h b/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h index 31f97919cec51..f0ed5ed4c9fc1 100644 --- a/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h +++ b/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h @@ -16,7 +16,11 @@ #include "CondFormats/Serialization/interface/Serializable.h" #include "CondFormats/L1TObjects/interface/LUT.h" -//#include "L1Trigger/L1TMuonBarrel/interface/L1MuBMTrack.h" +#include "L1Trigger/L1TMuonBarrel/interface/L1MuBMTrack.h" +#include "CondFormats/L1TObjects/interface/L1MuDTTFParameters.h" +#include "CondFormats/L1TObjects/interface/L1MuDTTFMasks.h" +#include "CondFormats/L1TObjects/interface/L1MuDTEtaPattern.h" + class L1TMuonBarrelParams { @@ -41,20 +45,39 @@ class L1TMuonBarrelParams { NUM_BMTFPARAMNODES=1 }; + L1MuDTTFParameters l1mudttfparams; + L1MuDTTFMasks l1mudttfmasks; /// L1MuBMPtaLut typedef std::map > LUT; + ///Qual Pattern LUT + typedef std::pair< short, short > LUTID; + typedef std::pair< short, std::vector > LUTCONT; + typedef std::map< LUTID, LUTCONT > qpLUT; + ///Eta Pattern LUT + typedef std::map > etaLUT; class LUTParams{ public: std::vector pta_lut_; std::vector phi_lut_; std::vector pta_threshold_; + qpLUT qp_lut_; + etaLUT eta_lut_; + + /// helper class for extrapolation look-up tables + class extLUT { + public: + LUT low; + LUT high; + COND_SERIALIZABLE; + }; + std::vector ext_lut_; + - LUTParams() : pta_lut_(0), phi_lut_(0), pta_threshold_(6) - { pta_lut_.reserve(12); pta_threshold_.reserve(6); phi_lut_.reserve(2); } + LUTParams() : pta_lut_(0), phi_lut_(0), pta_threshold_(6), ext_lut_(0){ } COND_SERIALIZABLE; }; std::string AssLUTPath() const { return pnodes_[pta].sparams_.size() > 0 ? pnodes_[pta].sparams_[0] : ""; } @@ -68,6 +91,14 @@ class L1TMuonBarrelParams { void setphi_lut(std::vector philut) { lutparams_.phi_lut_ = philut; }; std::vector phi_lut() const {return lutparams_.phi_lut_; }; + void setext_lut(std::vector extlut) { lutparams_.ext_lut_ = extlut; }; + std::vector ext_lut() const {return lutparams_.ext_lut_; }; + + void setqp_lut(qpLUT qplut) { lutparams_.qp_lut_ = qplut; }; + qpLUT qp_lut() const {return lutparams_.qp_lut_; }; + + void seteta_lut(etaLUT eta_lut) { lutparams_.eta_lut_ = eta_lut; }; + etaLUT eta_lut() const {return lutparams_.eta_lut_; }; class ConfigParams{ public: @@ -125,6 +156,7 @@ class L1TMuonBarrelParams { bool get_Extrapolation_21() const {return conparams_.Extrapolation_21 ;} + L1TMuonBarrelParams() { version_=Version; pnodes_.resize(NUM_BMTFPARAMNODES); } ~L1TMuonBarrelParams() {} diff --git a/CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h b/CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h index 2cadde878423b..d26f21a88b21b 100644 --- a/CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h +++ b/CondFormats/L1TObjects/interface/L1TMuonGlobalParams.h @@ -40,38 +40,69 @@ class L1TMuonGlobalParams { relIsoCheckMem=1, idxSelMemPhi=2, idxSelMemEta=3, - brlSingleMatchQual=4, - fwdPosSingleMatchQual=5, - fwdNegSingleMatchQual=6, - ovlPosSingleMatchQual=7, - ovlNegSingleMatchQual=8, - bOPosMatchQual=9, - bONegMatchQual=10, - fOPosMatchQual=11, - fONegMatchQual=12, - bPhiExtrapolation=13, - oPhiExtrapolation=14, - fPhiExtrapolation=15, - bEtaExtrapolation=16, - oEtaExtrapolation=17, - fEtaExtrapolation=18, - sortRank=19, - NUM_CALOPARAMNODES=20 + fwdPosSingleMatchQual=4, + fwdNegSingleMatchQual=5, + ovlPosSingleMatchQual=6, + ovlNegSingleMatchQual=7, + bOPosMatchQual=8, + bONegMatchQual=9, + fOPosMatchQual=10, + fONegMatchQual=11, + bPhiExtrapolation=12, + oPhiExtrapolation=13, + fPhiExtrapolation=14, + bEtaExtrapolation=15, + oEtaExtrapolation=16, + fEtaExtrapolation=17, + sortRank=18, + NUM_GMTPARAMNODES=19 + //brlSingleMatchQual=4, + //fwdPosSingleMatchQual=5, + //fwdNegSingleMatchQual=6, + //ovlPosSingleMatchQual=7, + //ovlNegSingleMatchQual=8, + //bOPosMatchQual=9, + //bONegMatchQual=10, + //fOPosMatchQual=11, + //fONegMatchQual=12, + //bPhiExtrapolation=13, + //oPhiExtrapolation=14, + //fPhiExtrapolation=15, + //bEtaExtrapolation=16, + //oEtaExtrapolation=17, + //fEtaExtrapolation=18, + //sortRank=19, + //NUM_GMTPARAMNODES=20 }; - L1TMuonGlobalParams() { version_=Version; pnodes_.resize(NUM_CALOPARAMNODES); } + // string parameters indices + enum spIdx {fname=0}; + + // unsigned parameters indices + enum upIdx {ptFactor=0, qualFactor=1}; + + // double parameters indices + enum dpIdx {maxdr=0, maxdrEtaFine=1}; + + L1TMuonGlobalParams() { version_=Version; pnodes_.resize(NUM_GMTPARAMNODES); } ~L1TMuonGlobalParams() {} // FW version unsigned fwVersion() const { return fwVersion_; } void setFwVersion(unsigned fwVersion) { fwVersion_ = fwVersion; } + // BX range + int bxMin() const { return bxMin_; } + int bxMax() const { return bxMax_; } + void setBxMin(int bxMin) { bxMin_ = bxMin; } + void setBxMax(int bxMax) { bxMax_ = bxMax; } + // LUTs l1t::LUT* absIsoCheckMemLUT() { return &pnodes_[absIsoCheckMem].LUT_; } l1t::LUT* relIsoCheckMemLUT() { return &pnodes_[relIsoCheckMem].LUT_; } l1t::LUT* idxSelMemPhiLUT() { return &pnodes_[idxSelMemPhi].LUT_; } l1t::LUT* idxSelMemEtaLUT() { return &pnodes_[idxSelMemEta].LUT_; } - l1t::LUT* brlSingleMatchQualLUT() { return &pnodes_[brlSingleMatchQual].LUT_; } + //l1t::LUT* brlSingleMatchQualLUT() { return &pnodes_[brlSingleMatchQual].LUT_; } l1t::LUT* fwdPosSingleMatchQualLUT() { return &pnodes_[fwdPosSingleMatchQual].LUT_; } l1t::LUT* fwdNegSingleMatchQualLUT() { return &pnodes_[fwdNegSingleMatchQual].LUT_; } l1t::LUT* ovlPosSingleMatchQualLUT() { return &pnodes_[ovlPosSingleMatchQual].LUT_; } @@ -91,7 +122,7 @@ class L1TMuonGlobalParams { void setRelIsoCheckMemLUT (const l1t::LUT & lut) { pnodes_[relIsoCheckMem].type_ = "LUT"; pnodes_[relIsoCheckMem].LUT_ = lut; } void setIdxSelMemPhiLUT (const l1t::LUT & lut) { pnodes_[idxSelMemPhi].type_ = "LUT"; pnodes_[idxSelMemPhi].LUT_ = lut; } void setIdxSelMemEtaLUT (const l1t::LUT & lut) { pnodes_[idxSelMemEta].type_ = "LUT"; pnodes_[idxSelMemEta].LUT_ = lut; } - void setBrlSingleMatchQualLUT (const l1t::LUT & lut) { pnodes_[brlSingleMatchQual].type_ = "LUT"; pnodes_[brlSingleMatchQual].LUT_ = lut; } + //void setBrlSingleMatchQualLUT (const l1t::LUT & lut) { pnodes_[brlSingleMatchQual].type_ = "LUT"; pnodes_[brlSingleMatchQual].LUT_ = lut; } void setFwdPosSingleMatchQualLUT (const l1t::LUT & lut) { pnodes_[fwdPosSingleMatchQual].type_ = "LUT"; pnodes_[fwdPosSingleMatchQual].LUT_ = lut; } void setFwdNegSingleMatchQualLUT (const l1t::LUT & lut) { pnodes_[fwdNegSingleMatchQual].type_ = "LUT"; pnodes_[fwdNegSingleMatchQual].LUT_ = lut; } void setOvlPosSingleMatchQualLUT (const l1t::LUT & lut) { pnodes_[ovlPosSingleMatchQual].type_ = "LUT"; pnodes_[ovlPosSingleMatchQual].LUT_ = lut; } @@ -109,31 +140,31 @@ class L1TMuonGlobalParams { void setSortRankLUT (const l1t::LUT & lut) { pnodes_[sortRank].type_ = "LUT"; pnodes_[sortRank].LUT_ = lut; } // LUT paths - std::string absIsoCheckMemLUTPath() const { return pnodes_[absIsoCheckMem].sparams_.size() > 0 ? pnodes_[absIsoCheckMem].sparams_[0] : ""; } - std::string relIsoCheckMemLUTPath() const { return pnodes_[relIsoCheckMem].sparams_.size() > 0 ? pnodes_[relIsoCheckMem].sparams_[0] : ""; } - std::string idxSelMemPhiLUTPath() const { return pnodes_[idxSelMemPhi].sparams_.size() > 0 ? pnodes_[idxSelMemPhi].sparams_[0] : ""; } - std::string idxSelMemEtaLUTPath() const { return pnodes_[idxSelMemEta].sparams_.size() > 0 ? pnodes_[idxSelMemEta].sparams_[0] : ""; } - std::string brlSingleMatchQualLUTPath() const { return pnodes_[brlSingleMatchQual].sparams_.size() > 0 ? pnodes_[brlSingleMatchQual].sparams_[0] : ""; } - std::string fwdPosSingleMatchQualLUTPath() const { return pnodes_[fwdPosSingleMatchQual].sparams_.size() > 0 ? pnodes_[fwdPosSingleMatchQual].sparams_[0] : ""; } - std::string fwdNegSingleMatchQualLUTPath() const { return pnodes_[fwdNegSingleMatchQual].sparams_.size() > 0 ? pnodes_[fwdNegSingleMatchQual].sparams_[0] : ""; } - std::string ovlPosSingleMatchQualLUTPath() const { return pnodes_[ovlPosSingleMatchQual].sparams_.size() > 0 ? pnodes_[ovlPosSingleMatchQual].sparams_[0] : ""; } - std::string ovlNegSingleMatchQualLUTPath() const { return pnodes_[ovlNegSingleMatchQual].sparams_.size() > 0 ? pnodes_[ovlNegSingleMatchQual].sparams_[0] : ""; } - std::string bOPosMatchQualLUTPath() const { return pnodes_[bOPosMatchQual].sparams_.size() > 0 ? pnodes_[bOPosMatchQual].sparams_[0] : ""; } - std::string bONegMatchQualLUTPath() const { return pnodes_[bONegMatchQual].sparams_.size() > 0 ? pnodes_[bONegMatchQual].sparams_[0] : ""; } - std::string fOPosMatchQualLUTPath() const { return pnodes_[fOPosMatchQual].sparams_.size() > 0 ? pnodes_[fOPosMatchQual].sparams_[0] : ""; } - std::string fONegMatchQualLUTPath() const { return pnodes_[fONegMatchQual].sparams_.size() > 0 ? pnodes_[fONegMatchQual].sparams_[0] : ""; } - std::string bPhiExtrapolationLUTPath() const { return pnodes_[bPhiExtrapolation].sparams_.size() > 0 ? pnodes_[bPhiExtrapolation].sparams_[0] : ""; } - std::string oPhiExtrapolationLUTPath() const { return pnodes_[oPhiExtrapolation].sparams_.size() > 0 ? pnodes_[oPhiExtrapolation].sparams_[0] : ""; } - std::string fPhiExtrapolationLUTPath() const { return pnodes_[fPhiExtrapolation].sparams_.size() > 0 ? pnodes_[fPhiExtrapolation].sparams_[0] : ""; } - std::string bEtaExtrapolationLUTPath() const { return pnodes_[bEtaExtrapolation].sparams_.size() > 0 ? pnodes_[bEtaExtrapolation].sparams_[0] : ""; } - std::string oEtaExtrapolationLUTPath() const { return pnodes_[oEtaExtrapolation].sparams_.size() > 0 ? pnodes_[oEtaExtrapolation].sparams_[0] : ""; } - std::string fEtaExtrapolationLUTPath() const { return pnodes_[fEtaExtrapolation].sparams_.size() > 0 ? pnodes_[fEtaExtrapolation].sparams_[0] : ""; } - std::string sortRankLUTPath() const { return pnodes_[sortRank].sparams_.size() > 0 ? pnodes_[sortRank].sparams_[0] : ""; } + std::string absIsoCheckMemLUTPath() const { return pnodes_[absIsoCheckMem].sparams_.size() > spIdx::fname ? pnodes_[absIsoCheckMem].sparams_[spIdx::fname] : ""; } + std::string relIsoCheckMemLUTPath() const { return pnodes_[relIsoCheckMem].sparams_.size() > spIdx::fname ? pnodes_[relIsoCheckMem].sparams_[spIdx::fname] : ""; } + std::string idxSelMemPhiLUTPath() const { return pnodes_[idxSelMemPhi].sparams_.size() > spIdx::fname ? pnodes_[idxSelMemPhi].sparams_[spIdx::fname] : ""; } + std::string idxSelMemEtaLUTPath() const { return pnodes_[idxSelMemEta].sparams_.size() > spIdx::fname ? pnodes_[idxSelMemEta].sparams_[spIdx::fname] : ""; } + //std::string brlSingleMatchQualLUTPath() const { return pnodes_[brlSingleMatchQual].sparams_.size() > spIdx::fname ? pnodes_[brlSingleMatchQual].sparams_[spIdx::fname] : ""; } + std::string fwdPosSingleMatchQualLUTPath() const { return pnodes_[fwdPosSingleMatchQual].sparams_.size() > spIdx::fname ? pnodes_[fwdPosSingleMatchQual].sparams_[spIdx::fname] : ""; } + std::string fwdNegSingleMatchQualLUTPath() const { return pnodes_[fwdNegSingleMatchQual].sparams_.size() > spIdx::fname ? pnodes_[fwdNegSingleMatchQual].sparams_[spIdx::fname] : ""; } + std::string ovlPosSingleMatchQualLUTPath() const { return pnodes_[ovlPosSingleMatchQual].sparams_.size() > spIdx::fname ? pnodes_[ovlPosSingleMatchQual].sparams_[spIdx::fname] : ""; } + std::string ovlNegSingleMatchQualLUTPath() const { return pnodes_[ovlNegSingleMatchQual].sparams_.size() > spIdx::fname ? pnodes_[ovlNegSingleMatchQual].sparams_[spIdx::fname] : ""; } + std::string bOPosMatchQualLUTPath() const { return pnodes_[bOPosMatchQual].sparams_.size() > spIdx::fname ? pnodes_[bOPosMatchQual].sparams_[spIdx::fname] : ""; } + std::string bONegMatchQualLUTPath() const { return pnodes_[bONegMatchQual].sparams_.size() > spIdx::fname ? pnodes_[bONegMatchQual].sparams_[spIdx::fname] : ""; } + std::string fOPosMatchQualLUTPath() const { return pnodes_[fOPosMatchQual].sparams_.size() > spIdx::fname ? pnodes_[fOPosMatchQual].sparams_[spIdx::fname] : ""; } + std::string fONegMatchQualLUTPath() const { return pnodes_[fONegMatchQual].sparams_.size() > spIdx::fname ? pnodes_[fONegMatchQual].sparams_[spIdx::fname] : ""; } + std::string bPhiExtrapolationLUTPath() const { return pnodes_[bPhiExtrapolation].sparams_.size() > spIdx::fname ? pnodes_[bPhiExtrapolation].sparams_[spIdx::fname] : ""; } + std::string oPhiExtrapolationLUTPath() const { return pnodes_[oPhiExtrapolation].sparams_.size() > spIdx::fname ? pnodes_[oPhiExtrapolation].sparams_[spIdx::fname] : ""; } + std::string fPhiExtrapolationLUTPath() const { return pnodes_[fPhiExtrapolation].sparams_.size() > spIdx::fname ? pnodes_[fPhiExtrapolation].sparams_[spIdx::fname] : ""; } + std::string bEtaExtrapolationLUTPath() const { return pnodes_[bEtaExtrapolation].sparams_.size() > spIdx::fname ? pnodes_[bEtaExtrapolation].sparams_[spIdx::fname] : ""; } + std::string oEtaExtrapolationLUTPath() const { return pnodes_[oEtaExtrapolation].sparams_.size() > spIdx::fname ? pnodes_[oEtaExtrapolation].sparams_[spIdx::fname] : ""; } + std::string fEtaExtrapolationLUTPath() const { return pnodes_[fEtaExtrapolation].sparams_.size() > spIdx::fname ? pnodes_[fEtaExtrapolation].sparams_[spIdx::fname] : ""; } + std::string sortRankLUTPath() const { return pnodes_[sortRank].sparams_.size() > spIdx::fname ? pnodes_[sortRank].sparams_[spIdx::fname] : ""; } void setAbsIsoCheckMemLUTPath (std::string path) { pnodes_[absIsoCheckMem].sparams_.push_back(path); } void setRelIsoCheckMemLUTPath (std::string path) { pnodes_[relIsoCheckMem].sparams_.push_back(path); } void setIdxSelMemPhiLUTPath (std::string path) { pnodes_[idxSelMemPhi].sparams_.push_back(path); } void setIdxSelMemEtaLUTPath (std::string path) { pnodes_[idxSelMemEta].sparams_.push_back(path); } - void setBrlSingleMatchQualLUTPath (std::string path) { pnodes_[brlSingleMatchQual].sparams_.push_back(path); } + //void setBrlSingleMatchQualLUTPath (std::string path) { pnodes_[brlSingleMatchQual].sparams_.push_back(path); } void setFwdPosSingleMatchQualLUTPath (std::string path) { pnodes_[fwdPosSingleMatchQual].sparams_.push_back(path); } void setFwdNegSingleMatchQualLUTPath (std::string path) { pnodes_[fwdNegSingleMatchQual].sparams_.push_back(path); } void setOvlPosSingleMatchQualLUTPath (std::string path) { pnodes_[ovlPosSingleMatchQual].sparams_.push_back(path); } @@ -150,6 +181,33 @@ class L1TMuonGlobalParams { void setFEtaExtrapolationLUTPath (std::string path) { pnodes_[fEtaExtrapolation].sparams_.push_back(path); } void setSortRankLUTPath (std::string path) { pnodes_[sortRank].sparams_.push_back(path); } + // Cancel out LUT max dR + //double brlSingleMatchQualLUTMaxDR() const { return pnodes_[brlSingleMatchQual].dparams_.size() > dpIdx::maxdr ? pnodes_[brlSingleMatchQual].dparams_[dpIdx::maxdr] : 0.; } + double fwdPosSingleMatchQualLUTMaxDR() const { return pnodes_[fwdPosSingleMatchQual].dparams_.size() > dpIdx::maxdr ? pnodes_[fwdPosSingleMatchQual].dparams_[dpIdx::maxdr] : 0.; } + double fwdNegSingleMatchQualLUTMaxDR() const { return pnodes_[fwdNegSingleMatchQual].dparams_.size() > dpIdx::maxdr ? pnodes_[fwdNegSingleMatchQual].dparams_[dpIdx::maxdr] : 0.; } + double ovlPosSingleMatchQualLUTMaxDR() const { return pnodes_[ovlPosSingleMatchQual].dparams_.size() > dpIdx::maxdr ? pnodes_[ovlPosSingleMatchQual].dparams_[dpIdx::maxdr] : 0.; } + double ovlNegSingleMatchQualLUTMaxDR() const { return pnodes_[ovlNegSingleMatchQual].dparams_.size() > dpIdx::maxdr ? pnodes_[ovlNegSingleMatchQual].dparams_[dpIdx::maxdr] : 0.; } + double bOPosMatchQualLUTMaxDR() const { return pnodes_[bOPosMatchQual].dparams_.size() > dpIdx::maxdr ? pnodes_[bOPosMatchQual].dparams_[dpIdx::maxdr] : 0.; } + double bONegMatchQualLUTMaxDR() const { return pnodes_[bONegMatchQual].dparams_.size() > dpIdx::maxdr ? pnodes_[bONegMatchQual].dparams_[dpIdx::maxdr] : 0.; } + double bOPosMatchQualLUTMaxDREtaFine() const { return pnodes_[bOPosMatchQual].dparams_.size() > dpIdx::maxdrEtaFine ? pnodes_[bOPosMatchQual].dparams_[dpIdx::maxdrEtaFine] : 0.; } + double bONegMatchQualLUTMaxDREtaFine() const { return pnodes_[bONegMatchQual].dparams_.size() > dpIdx::maxdrEtaFine ? pnodes_[bONegMatchQual].dparams_[dpIdx::maxdrEtaFine] : 0.; } + double fOPosMatchQualLUTMaxDR() const { return pnodes_[fOPosMatchQual].dparams_.size() > dpIdx::maxdr ? pnodes_[fOPosMatchQual].dparams_[dpIdx::maxdr] : 0.; } + double fONegMatchQualLUTMaxDR() const { return pnodes_[fONegMatchQual].dparams_.size() > dpIdx::maxdr ? pnodes_[fONegMatchQual].dparams_[dpIdx::maxdr] : 0.; } + //void setBrlSingleMatchQualLUTMaxDR (double maxDR) { pnodes_[brlSingleMatchQual].dparams_.push_back(maxDR); } + void setFwdPosSingleMatchQualLUTMaxDR (double maxDR) { pnodes_[fwdPosSingleMatchQual].dparams_.push_back(maxDR); } + void setFwdNegSingleMatchQualLUTMaxDR (double maxDR) { pnodes_[fwdNegSingleMatchQual].dparams_.push_back(maxDR); } + void setOvlPosSingleMatchQualLUTMaxDR (double maxDR) { pnodes_[ovlPosSingleMatchQual].dparams_.push_back(maxDR); } + void setOvlNegSingleMatchQualLUTMaxDR (double maxDR) { pnodes_[ovlNegSingleMatchQual].dparams_.push_back(maxDR); } + void setBOPosMatchQualLUTMaxDR (double maxDR, double maxDREtaFine) { pnodes_[bOPosMatchQual].dparams_.push_back(maxDR); pnodes_[bOPosMatchQual].dparams_.push_back(maxDREtaFine); } + void setBONegMatchQualLUTMaxDR (double maxDR, double maxDREtaFine) { pnodes_[bONegMatchQual].dparams_.push_back(maxDR); pnodes_[bONegMatchQual].dparams_.push_back(maxDREtaFine); } + void setFOPosMatchQualLUTMaxDR (double maxDR) { pnodes_[fOPosMatchQual].dparams_.push_back(maxDR); } + void setFONegMatchQualLUTMaxDR (double maxDR) { pnodes_[fONegMatchQual].dparams_.push_back(maxDR); } + + // Sort rank LUT factors for pT and quality + unsigned sortRankLUTPtFactor() const { return pnodes_[sortRank].uparams_.size() > upIdx::ptFactor ? pnodes_[sortRank].uparams_[upIdx::ptFactor] : 0; } + unsigned sortRankLUTQualFactor() const { return pnodes_[sortRank].uparams_.size() > upIdx::qualFactor ? pnodes_[sortRank].uparams_[upIdx::qualFactor] : 0; } + void setSortRankLUTFactors(unsigned ptFactor, unsigned qualFactor) { pnodes_[sortRank].uparams_.push_back(ptFactor); pnodes_[sortRank].uparams_.push_back(qualFactor); } + // print parameters to stream: void print(std::ostream&) const; friend std::ostream& operator<<(std::ostream& o, const L1TMuonGlobalParams & p) { p.print(o); return o; } @@ -158,6 +216,9 @@ class L1TMuonGlobalParams { unsigned version_; unsigned fwVersion_; + int bxMin_; + int bxMax_; + std::vector pnodes_; COND_SERIALIZABLE; diff --git a/CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc b/CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc index 57b50bb810fc5..8b21868d948d8 100644 --- a/CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc +++ b/CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc @@ -5,27 +5,4 @@ void L1TMuonBarrelParams::print(std::ostream& out) const { out << "L1 BMTF Parameters" << std::endl; out << "Firmware version: " << fwVersion_ << std::endl; -/* - out << "LUT paths (LUTs are generated analytically if path is empty)" << std::endl; - out << " Abs isolation checkMem LUT path: " << this->absIsoCheckMemLUTPath() << std::endl; - out << " Rel isolation checkMem LUT path: " << this->relIsoCheckMemLUTPath() << std::endl; - out << " Index selMem phi LUT path: " << this->idxSelMemPhiLUTPath() << std::endl; - out << " Index selMem eta LUT path: " << this->idxSelMemEtaLUTPath() << std::endl; - out << " Barrel Single MatchQual LUT path: " << this->brlSingleMatchQualLUTPath() << std::endl; - out << " Forward pos MatchQual LUT path: " << this->fwdPosSingleMatchQualLUTPath() << std::endl; - out << " Forward neg MatchQual LUT path: " << this->fwdNegSingleMatchQualLUTPath() << std::endl; - out << " Overlap pos MatchQual LUT path: " << this->ovlPosSingleMatchQualLUTPath() << std::endl; - out << " Overlap neg MatchQual LUT path: " << this->ovlNegSingleMatchQualLUTPath() << std::endl; - out << " Barrel-Overlap pos MatchQual LUT path: " << this->bOPosMatchQualLUTPath() << std::endl; - out << " Barrel-Overlap neg MatchQual LUT path: " << this->bONegMatchQualLUTPath() << std::endl; - out << " Forward-Overlap pos MatchQual LUT path: " << this->fOPosMatchQualLUTPath() << std::endl; - out << " Forward-Overlap neg MatchQual LUT path: " << this->fONegMatchQualLUTPath() << std::endl; - out << " Barrel phi extrapolation LUT path: " << this->bPhiExtrapolationLUTPath() << std::endl; - out << " Overlap phi extrapolation LUT path: " << this->oPhiExtrapolationLUTPath() << std::endl; - out << " Forward phi extrapolation LUT path: " << this->fPhiExtrapolationLUTPath() << std::endl; - out << " Barrel eta extrapolation LUT path: " << this->bEtaExtrapolationLUTPath() << std::endl; - out << " Overlap eta extrapolation LUT path: " << this->oEtaExtrapolationLUTPath() << std::endl; - out << " Forward eta extrapolation LUT path: " << this->fEtaExtrapolationLUTPath() << std::endl; - out << " Sort rank LUT path: " << this->sortRankLUTPath() << std::endl; -*/ } diff --git a/CondFormats/L1TObjects/src/L1TMuonGlobalParams.cc b/CondFormats/L1TObjects/src/L1TMuonGlobalParams.cc index efdb860d2a20a..cb84c5166aa78 100644 --- a/CondFormats/L1TObjects/src/L1TMuonGlobalParams.cc +++ b/CondFormats/L1TObjects/src/L1TMuonGlobalParams.cc @@ -6,25 +6,27 @@ void L1TMuonGlobalParams::print(std::ostream& out) const { out << "Firmware version: " << fwVersion_ << std::endl; + out << "Output BX range from " << bxMin_ << " to " << bxMax_ << std::endl; + out << "LUT paths (LUTs are generated analytically if path is empty)" << std::endl; out << " Abs isolation checkMem LUT path: " << this->absIsoCheckMemLUTPath() << std::endl; out << " Rel isolation checkMem LUT path: " << this->relIsoCheckMemLUTPath() << std::endl; out << " Index selMem phi LUT path: " << this->idxSelMemPhiLUTPath() << std::endl; out << " Index selMem eta LUT path: " << this->idxSelMemEtaLUTPath() << std::endl; - out << " Barrel Single MatchQual LUT path: " << this->brlSingleMatchQualLUTPath() << std::endl; - out << " Forward pos MatchQual LUT path: " << this->fwdPosSingleMatchQualLUTPath() << std::endl; - out << " Forward neg MatchQual LUT path: " << this->fwdNegSingleMatchQualLUTPath() << std::endl; - out << " Overlap pos MatchQual LUT path: " << this->ovlPosSingleMatchQualLUTPath() << std::endl; - out << " Overlap neg MatchQual LUT path: " << this->ovlNegSingleMatchQualLUTPath() << std::endl; - out << " Barrel-Overlap pos MatchQual LUT path: " << this->bOPosMatchQualLUTPath() << std::endl; - out << " Barrel-Overlap neg MatchQual LUT path: " << this->bONegMatchQualLUTPath() << std::endl; - out << " Forward-Overlap pos MatchQual LUT path: " << this->fOPosMatchQualLUTPath() << std::endl; - out << " Forward-Overlap neg MatchQual LUT path: " << this->fONegMatchQualLUTPath() << std::endl; + //out << " Barrel Single MatchQual LUT path: " << this->brlSingleMatchQualLUTPath() << ", max dR (Used when LUT path empty): " << this->brlSingleMatchQualLUTMaxDR() << std::endl; + out << " Forward pos MatchQual LUT path: " << this->fwdPosSingleMatchQualLUTPath() << ", max dR (Used when LUT path empty): " << this->fwdPosSingleMatchQualLUTMaxDR() << std::endl; + out << " Forward neg MatchQual LUT path: " << this->fwdNegSingleMatchQualLUTPath() << ", max dR (Used when LUT path empty): " << this->fwdNegSingleMatchQualLUTMaxDR() << std::endl; + out << " Overlap pos MatchQual LUT path: " << this->ovlPosSingleMatchQualLUTPath() << ", max dR (Used when LUT path empty): " << this->ovlPosSingleMatchQualLUTMaxDR() << std::endl; + out << " Overlap neg MatchQual LUT path: " << this->ovlNegSingleMatchQualLUTPath() << ", max dR (Used when LUT path empty): " << this->ovlNegSingleMatchQualLUTMaxDR() << std::endl; + out << " Barrel-Overlap pos MatchQual LUT path: " << this->bOPosMatchQualLUTPath() << ", max dR (Used when LUT path empty): " << this->bOPosMatchQualLUTMaxDR() << ", max dR when eta-fine bit set: " << this->bOPosMatchQualLUTMaxDREtaFine() << std::endl; + out << " Barrel-Overlap neg MatchQual LUT path: " << this->bONegMatchQualLUTPath() << ", max dR (Used when LUT path empty): " << this->bONegMatchQualLUTMaxDR() << ", max dR when eta-fine bit set: " << this->bONegMatchQualLUTMaxDREtaFine() << std::endl; + out << " Forward-Overlap pos MatchQual LUT path: " << this->fOPosMatchQualLUTPath() << ", max dR (Used when LUT path empty): " << this->fOPosMatchQualLUTMaxDR() << std::endl; + out << " Forward-Overlap neg MatchQual LUT path: " << this->fONegMatchQualLUTPath() << ", max dR (Used when LUT path empty): " << this->fONegMatchQualLUTMaxDR() << std::endl; out << " Barrel phi extrapolation LUT path: " << this->bPhiExtrapolationLUTPath() << std::endl; out << " Overlap phi extrapolation LUT path: " << this->oPhiExtrapolationLUTPath() << std::endl; out << " Forward phi extrapolation LUT path: " << this->fPhiExtrapolationLUTPath() << std::endl; out << " Barrel eta extrapolation LUT path: " << this->bEtaExtrapolationLUTPath() << std::endl; out << " Overlap eta extrapolation LUT path: " << this->oEtaExtrapolationLUTPath() << std::endl; out << " Forward eta extrapolation LUT path: " << this->fEtaExtrapolationLUTPath() << std::endl; - out << " Sort rank LUT path: " << this->sortRankLUTPath() << std::endl; + out << " Sort rank LUT path: " << this->sortRankLUTPath() << ", pT and quality factors (Used when LUT path empty): pT factor: " << this->sortRankLUTPtFactor() << ", quality factor: " << this->sortRankLUTQualFactor() << std::endl; } From 14bb4717e901408de6590fd33fa5e3ffb4b982d7 Mon Sep 17 00:00:00 2001 From: Michael Mulhearn Date: Tue, 2 Feb 2016 06:07:40 +0100 Subject: [PATCH 240/250] remove unneeded header --- CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h | 1 - 1 file changed, 1 deletion(-) diff --git a/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h b/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h index f0ed5ed4c9fc1..cf760396ff5b6 100644 --- a/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h +++ b/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h @@ -16,7 +16,6 @@ #include "CondFormats/Serialization/interface/Serializable.h" #include "CondFormats/L1TObjects/interface/LUT.h" -#include "L1Trigger/L1TMuonBarrel/interface/L1MuBMTrack.h" #include "CondFormats/L1TObjects/interface/L1MuDTTFParameters.h" #include "CondFormats/L1TObjects/interface/L1MuDTTFMasks.h" #include "CondFormats/L1TObjects/interface/L1MuDTEtaPattern.h" From 49621ae77c67dd421a0ea3fcc5d228c2930454ed Mon Sep 17 00:00:00 2001 From: Johannes Lange Date: Mon, 1 Feb 2016 16:23:32 +0100 Subject: [PATCH 241/250] fixing path names in SUSY HLT DQM postprocessing missing `_v` in many cases: no efficiency plots were created --- .../SUSYBSM/python/SUSYBSM_DiJet_MET_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_HLT_Electron_BJet_cff.py | 2 +- .../python/SUSYBSM_HLT_HT_DoubleElectron_cff.py | 4 ++-- .../SUSYBSM/python/SUSYBSM_HLT_HT_DoubleMuon_cff.py | 4 ++-- .../SUSYBSM/python/SUSYBSM_HLT_HT_MuEle_cff.py | 4 ++-- .../SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_HLT_VBF_Mu_cff.py | 4 ++-- HLTriggerOffline/SUSYBSM/python/SUSYBSM_HT_MET_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_MET_HT_MUON_ER_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_MET_HT_MUON_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_MET_MUON_ER_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_MET_MUON_cff.py | 2 +- .../python/SUSYBSM_Mu_HT_Control_SingleLepton_cff.py | 2 +- .../python/SUSYBSM_Mu_HT_MET_SingleLepton_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_Mu_HT_SingleLepton_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_PhotonHT_cff.py | 2 +- HLTriggerOffline/SUSYBSM/python/SUSYBSM_Razor_cff.py | 2 +- HLTriggerOffline/SUSYBSM/python/SUSYBSM_caloHT_cff.py | 10 +++++----- .../SUSYBSM/python/SUSYBSM_inclusiveHT_aux200_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_inclusiveHT_aux250_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_inclusiveHT_aux300_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_inclusiveHT_aux350_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_inclusiveHT_aux400_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_inclusiveHT_aux475_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_inclusiveHT_aux600_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_inclusiveHT_aux800_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_inclusiveHT_cff.py | 2 +- .../SUSYBSM/python/SUSYBSM_inclusiveMET_cff.py | 8 ++++---- 28 files changed, 39 insertions(+), 39 deletions(-) diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_DiJet_MET_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_DiJet_MET_cff.py index 045e242592662..aebfac3fe7829 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_DiJet_MET_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_DiJet_MET_cff.py @@ -20,7 +20,7 @@ ) SUSY_HLT_DiJet_MET_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DiCentralPFJet55_PFMET110"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DiCentralPFJet55_PFMET110_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Electron_BJet_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Electron_BJet_cff.py index 30f16cfc9acdd..a78649e0da36f 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Electron_BJet_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Electron_BJet_cff.py @@ -15,7 +15,7 @@ ) SUSY_HLT_Electron_BJet_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleEle8_CaloId_TrkIdVL_Mass8_PFHTT300"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Ele10_CaloIdM_TrackIdM_CentralPFJet30_BTagCSV0p54PF_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_DoubleElectron_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_DoubleElectron_cff.py index 85040af27f9f8..8e9306646db27 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_DoubleElectron_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_DoubleElectron_cff.py @@ -35,7 +35,7 @@ ) SUSY_HLT_HT_DoubleEle_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT300"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT300_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( @@ -45,7 +45,7 @@ ) SUSY_HLT_HT250_DoubleEle_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT250"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleEle8_CaloIdM_TrackIdM_Mass8_PFHT250_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_DoubleMuon_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_DoubleMuon_cff.py index 88eacfb53487b..f94c383c50037 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_DoubleMuon_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_DoubleMuon_cff.py @@ -32,7 +32,7 @@ SUSY_HLT_HT_DoubleMuon_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleMu8_Mass8_PFHT300"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleMu8_Mass8_PFHT300_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( @@ -42,7 +42,7 @@ ) SUSY_HLT_HT250_DoubleMuon_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleMu8_Mass8_PFHT250"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleMu8_Mass8_PFHT250_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_MuEle_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_MuEle_cff.py index f1bb860a3b453..f174834d761f0 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_MuEle_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_HT_MuEle_cff.py @@ -38,7 +38,7 @@ SUSY_HLT_HT_MuEle_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT300"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT300_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( @@ -49,7 +49,7 @@ ) SUSY_HLT_HT250_MuEle_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT250"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Mu8_Ele8_CaloIdM_TrackIdM_Mass8_PFHT250_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py index 9da7872ec435d..6e11b40d66fb7 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py @@ -16,7 +16,7 @@ SUSY_HLT_Muon_BJet_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleMu8_Mass8_PFHTT300"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleMu8_Mass8_PFHTT300_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_VBF_Mu_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_VBF_Mu_cff.py index b2e352c73bcfc..03923cc67e236 100755 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_VBF_Mu_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_VBF_Mu_cff.py @@ -60,7 +60,7 @@ SUSY_HLT_Mu_VBF_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/SUSY_HLT_VBF_Mu"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/SUSY_HLT_VBF_Mu_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( @@ -73,7 +73,7 @@ SUSY_HLT_Mu_VBF_FASTSIM_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/SUSY_HLT_VBF_Mu"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/SUSY_HLT_VBF_Mu_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HT_MET_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HT_MET_cff.py index 23e476ba570be..ca779d16c6498 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HT_MET_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HT_MET_cff.py @@ -14,7 +14,7 @@ ) SUSY_HLT_HT_MET_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT350_PFMET100"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT350_PFMET100_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_HT_MUON_ER_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_HT_MUON_ER_cff.py index 300666f8d0ee9..d37bae371a7de 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_HT_MUON_ER_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_HT_MUON_ER_cff.py @@ -22,7 +22,7 @@ SUSY_HLT_MET_HT_MUON_ER_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Mu3er_PFHT140_PFMET125"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Mu3er_PFHT140_PFMET125_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_HT_MUON_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_HT_MUON_cff.py index cd9c4ff4f4392..90db408e15b2a 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_HT_MUON_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_HT_MUON_cff.py @@ -22,7 +22,7 @@ SUSY_HLT_MET_HT_MUON_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Mu6_PFHT200_PFMET100"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Mu6_PFHT200_PFMET100_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_MUON_ER_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_MUON_ER_cff.py index 900e70a02e1b6..e94ed11d47661 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_MUON_ER_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_MUON_ER_cff.py @@ -22,7 +22,7 @@ SUSY_HLT_MET_MUON_ER_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLTriggerOffline/SUSYBSM/HLT_Mu14er_PFMET100"), + subDirs = cms.untracked.vstring("HLTriggerOffline/SUSYBSM/HLT_Mu14er_PFMET100_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_MUON_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_MUON_cff.py index 79103bd955cb3..c5c2ad428dc1b 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_MUON_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_MET_MUON_cff.py @@ -22,7 +22,7 @@ SUSY_HLT_MET_MUON_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFMET120_Mu5"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFMET120_Mu5_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_Control_SingleLepton_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_Control_SingleLepton_cff.py index 9d41644119442..a8ed442a58582 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_Control_SingleLepton_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_Control_SingleLepton_cff.py @@ -43,7 +43,7 @@ ) SUSY_HLT_Mu_HT_Control_SingleLepton_POSTPROCESSING = cms.EDAnalyzer('DQMGenericClient', - subDirs = cms.untracked.vstring('HLT/SUSYBSM/HLT_Mu15_IsoVVL_PFHT350'), + subDirs = cms.untracked.vstring('HLT/SUSYBSM/HLT_Mu15_IsoVVL_PFHT350_v'), efficiency = cms.vstring( "leptonTurnOn_eff ';Offline Muon p_{T} [GeV];#epsilon' leptonTurnOn_num leptonTurnOn_den", "pfHTTurnOn_eff ';Offline PF H_{T} [GeV];#epsilon' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_MET_SingleLepton_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_MET_SingleLepton_cff.py index 22f776051f200..1e195f8834de3 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_MET_SingleLepton_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_MET_SingleLepton_cff.py @@ -44,7 +44,7 @@ SUSY_HLT_Mu_HT_MET_SingleLepton_POSTPROCESSING = cms.EDAnalyzer('DQMGenericClient', - subDirs = cms.untracked.vstring('HLT/SUSYBSM/HLT_Mu15_IsoVVVL_PFHT350_PFMET50'), + subDirs = cms.untracked.vstring('HLT/SUSYBSM/HLT_Mu15_IsoVVVL_PFHT350_PFMET50_v'), efficiency = cms.vstring( "leptonTurnOn_eff ';Offline Muon p_{T} [GeV];#epsilon' leptonTurnOn_num leptonTurnOn_den", "pfHTTurnOn_eff ';Offline PF H_{T} [GeV];#epsilon' pfHTTurnOn_num pfHTTurnOn_den", diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_SingleLepton_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_SingleLepton_cff.py index 95eb6432c84e4..162f4acd99fac 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_SingleLepton_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Mu_HT_SingleLepton_cff.py @@ -43,7 +43,7 @@ ) SUSY_HLT_Mu_HT_SingleLepton_POSTPROCESSING = cms.EDAnalyzer('DQMGenericClient', - subDirs = cms.untracked.vstring('HLT/SUSYBSM/HLT_Mu15_IsoVVVL_PFHT600'), + subDirs = cms.untracked.vstring('HLT/SUSYBSM/HLT_Mu15_IsoVVVL_PFHT600_v'), efficiency = cms.vstring( "leptonTurnOn_eff ';Offline Muon p_{T} [GeV];#epsilon' leptonTurnOn_num leptonTurnOn_den", "pfHTTurnOn_eff ';Offline PF H_{T} [GeV];#epsilon' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_PhotonHT_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_PhotonHT_cff.py index e65bb3bf97933..ce962794a2dab 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_PhotonHT_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_PhotonHT_cff.py @@ -15,7 +15,7 @@ ) SUSY_HLT_PhotonHT_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Photon90_CaloId_PFHT500"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Photon90_CaloId_PFHT500_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Razor_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Razor_cff.py index 9a57722d7a431..1a553715585f5 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Razor_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_Razor_cff.py @@ -177,7 +177,7 @@ ) SUSY_HLT_Razor_PostVal_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_RsqMR300_Rsq0p09_MR200", "HLT/SUSYBSM/HLT_RsqMR300_Rsq0p09_MR200_4jet", "HLT/SUSYBSM/HLT_Rsq0p36", "HLT/SUSYBSM/HLT_RsqMR270_Rsq0p09_MR200", "HLT/SUSYBSM/HLT_RsqMR270_Rsq0p09_MR200_4jet", "HLT/SUSYBSM/HLT_Rsq0p30", "HLT/SUSYBSM/HLT_RsqMR260_Rsq0p09_MR200", "HLT/SUSYBSM/HLT_RsqMR260_Rsq0p09_MR200_4jet", "HLT/SUSYBSM/HLT_RsqMR240_Rsq0p09_MR200", "HLT/SUSYBSM/HLT_RsqMR240_Rsq0p09_MR200_4jet", "HLT/SUSYBSM/HLT_Rsq0p25", "HLT/SUSYBSM/HLT_RsqMR240_Rsq0p09_MR200_Calo", "HLT/SUSYBSM/HLT_RsqMR240_Rsq0p09_MR200_4jet_Calo", "HLT/SUSYBSM/HLT_Rsq0p25_Calo", "HLT/SUSYBSM/HLT_Rsq0p02_MR300_TriPFJet80_60_40_BTagCSV_p063_p20_Mbb60_200", "HLT/SUSYBSM/HLT_Rsq0p02_MR300_TriPFJet80_60_40_DoubleBTagCSV_p063_Mbb60_200"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_RsqMR300_Rsq0p09_MR200_v", "HLT/SUSYBSM/HLT_RsqMR300_Rsq0p09_MR200_4jet_v", "HLT/SUSYBSM/HLT_Rsq0p36_v", "HLT/SUSYBSM/HLT_RsqMR270_Rsq0p09_MR200_v", "HLT/SUSYBSM/HLT_RsqMR270_Rsq0p09_MR200_4jet_v", "HLT/SUSYBSM/HLT_Rsq0p30_v", "HLT/SUSYBSM/HLT_RsqMR260_Rsq0p09_MR200_v", "HLT/SUSYBSM/HLT_RsqMR260_Rsq0p09_MR200_4jet_v", "HLT/SUSYBSM/HLT_RsqMR240_Rsq0p09_MR200_v", "HLT/SUSYBSM/HLT_RsqMR240_Rsq0p09_MR200_4jet_v", "HLT/SUSYBSM/HLT_Rsq0p25_v", "HLT/SUSYBSM/HLT_RsqMR240_Rsq0p09_MR200_Calo_v", "HLT/SUSYBSM/HLT_RsqMR240_Rsq0p09_MR200_4jet_Calo_v", "HLT/SUSYBSM/HLT_Rsq0p25_Calo_v", "HLT/SUSYBSM/HLT_Rsq0p02_MR300_TriPFJet80_60_40_BTagCSV_p063_p20_Mbb60_200_v", "HLT/SUSYBSM/HLT_Rsq0p02_MR300_TriPFJet80_60_40_DoubleBTagCSV_p063_Mbb60_200_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_caloHT_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_caloHT_cff.py index 1cc21599b881c..1c8f8a745581d 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_caloHT_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_caloHT_cff.py @@ -68,11 +68,11 @@ SUSY_HLT_CaloHT_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", subDirs = cms.untracked.vstring( - "HLT/SUSYBSM/HLT_HT200", - "HLT/SUSYBSM/HLT_HT250", - "HLT/SUSYBSM/HLT_HT300", - "HLT/SUSYBSM/HLT_HT350", - "HLT/SUSYBSM/HLT_HT400", + "HLT/SUSYBSM/HLT_HT200_v", + "HLT/SUSYBSM/HLT_HT250_v", + "HLT/SUSYBSM/HLT_HT300_v", + "HLT/SUSYBSM/HLT_HT350_v", + "HLT/SUSYBSM/HLT_HT400_v", ), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux200_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux200_cff.py index fb44213856eb6..86b9339d0acf3 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux200_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux200_cff.py @@ -14,7 +14,7 @@ ) SUSY_HLT_InclusiveHT_aux200_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT200"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT200_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux250_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux250_cff.py index 1a9cc25fca0f7..ad6d8db650bd0 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux250_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux250_cff.py @@ -15,7 +15,7 @@ SUSY_HLT_InclusiveHT_aux250_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT250"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT250_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux300_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux300_cff.py index b7d0a83888b6c..658eeb9e9795d 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux300_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux300_cff.py @@ -14,7 +14,7 @@ ) SUSY_HLT_InclusiveHT_aux300_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT300"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT300_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux350_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux350_cff.py index b1369d98e583c..4d11f6c549f60 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux350_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux350_cff.py @@ -14,7 +14,7 @@ ) SUSY_HLT_InclusiveHT_aux350_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT350"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT350_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux400_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux400_cff.py index 9c354b4296940..194fe0303cd1d 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux400_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux400_cff.py @@ -14,7 +14,7 @@ ) SUSY_HLT_InclusiveHT_aux400_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT400"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT400_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux475_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux475_cff.py index 889ceef7be6ca..a016f0b0f98e2 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux475_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux475_cff.py @@ -14,7 +14,7 @@ ) SUSY_HLT_InclusiveHT_aux475_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT475"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT475_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux600_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux600_cff.py index ecc5ed6241bf6..6381b7d86941a 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux600_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux600_cff.py @@ -14,7 +14,7 @@ ) SUSY_HLT_InclusiveHT_aux600_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT600"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT600_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux800_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux800_cff.py index 80d84fdb66df8..6784ac5ab5e11 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux800_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_aux800_cff.py @@ -14,7 +14,7 @@ ) SUSY_HLT_InclusiveHT_aux800_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT800"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT800_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_cff.py index abbce47fdf5b9..2d860e0ace7f9 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveHT_cff.py @@ -14,7 +14,7 @@ ) SUSY_HLT_InclusiveHT_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT900"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFHT900_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveMET_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveMET_cff.py index 1b4031ba138b1..c3fa369f60bbb 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveMET_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_inclusiveMET_cff.py @@ -56,7 +56,7 @@ SUSY_HLT_InclusiveMET_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFMET170_NoiseCleaned"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFMET170_NoiseCleaned_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" @@ -65,7 +65,7 @@ ) SUSY_HLT_InclusiveMET_NoNoiseCleaning_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFMET170"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFMET170_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" @@ -74,7 +74,7 @@ ) SUSY_HLT_InclusiveMET_HBHECleaned_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFMET170_HBHECleaned"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFMET170_HBHECleaned_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" @@ -83,7 +83,7 @@ ) SUSY_HLT_InclusiveMET_JetIdCleaned_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFMET170_JetIdCleaned"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_PFMET170_JetIdCleaned_v"), efficiency = cms.vstring( "pfMetTurnOn_eff 'Efficiency vs PFMET' pfMetTurnOn_num pfMetTurnOn_den", "pfHTTurnOn_eff 'Efficiency vs PFHT' pfHTTurnOn_num pfHTTurnOn_den" From a3857ac7fead3ea8d6d504f17519cf8b62defb4d Mon Sep 17 00:00:00 2001 From: Johannes Lange Date: Mon, 1 Feb 2016 17:21:37 +0100 Subject: [PATCH 242/250] fixing further path name (was completely different) --- HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py index 6e11b40d66fb7..69ef5b12c969a 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py @@ -16,7 +16,7 @@ SUSY_HLT_Muon_BJet_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_DoubleMu8_Mass8_PFHTT300_v"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Mu10_CentralPFJet30_BTagCSV0p54PF_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( From cb37fd792a370a3bfdf1d53e238d7c4fd7f6bd47 Mon Sep 17 00:00:00 2001 From: Johannes Lange Date: Tue, 2 Feb 2016 08:32:10 +0100 Subject: [PATCH 243/250] fixing leftovers from 0e79219 --- .../SUSYBSM/python/SUSYBSM_HLT_Electron_BJet_cff.py | 2 +- HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Electron_BJet_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Electron_BJet_cff.py index a78649e0da36f..fa305803144e7 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Electron_BJet_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Electron_BJet_cff.py @@ -15,7 +15,7 @@ ) SUSY_HLT_Electron_BJet_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Ele10_CaloIdM_TrackIdM_CentralPFJet30_BTagCSV0p54PF_v"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Ele10_CaloIdM_TrackIdM_CentralPFJet30_BTagCSV_p13_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( diff --git a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py index 69ef5b12c969a..2298958c4df71 100644 --- a/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py +++ b/HLTriggerOffline/SUSYBSM/python/SUSYBSM_HLT_Muon_BJet_cff.py @@ -16,7 +16,7 @@ SUSY_HLT_Muon_BJet_POSTPROCESSING = cms.EDAnalyzer("DQMGenericClient", - subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Mu10_CentralPFJet30_BTagCSV0p54PF_v"), + subDirs = cms.untracked.vstring("HLT/SUSYBSM/HLT_Mu10_CentralPFJet30_BTagCSV_p13_v"), verbose = cms.untracked.uint32(2), # Set to 2 for all messages resolution = cms.vstring(""), efficiency = cms.vstring( From 7a32558bf8f94e932767d635beff71d1700caaad Mon Sep 17 00:00:00 2001 From: David Abdurachmanov Date: Wed, 19 Aug 2015 12:54:31 +0200 Subject: [PATCH 244/250] Utilities/StaticAnalyzers: update for Clang 3.7.0 The changes are required for Clang 3.7.0 and are not backward compatible with other revisions. Signed-off-by: David Abdurachmanov (cherry picked from commit 047ffead345d2e0ed067a1d39dca0cdaeebf8d8c) --- .../StaticAnalyzers/src/ArgSizeChecker.cpp | 8 ++--- .../StaticAnalyzers/src/ClassChecker.cpp | 32 +++++++++---------- .../src/ConstCastAwayChecker.cpp | 4 +-- .../StaticAnalyzers/src/ConstCastChecker.cpp | 4 +-- .../StaticAnalyzers/src/FiniteMathChecker.cc | 5 +-- .../src/ThrUnsafeFCallChecker.cpp | 4 +-- .../StaticAnalyzers/src/getByChecker.cpp | 8 ++--- 7 files changed, 33 insertions(+), 32 deletions(-) diff --git a/Utilities/StaticAnalyzers/src/ArgSizeChecker.cpp b/Utilities/StaticAnalyzers/src/ArgSizeChecker.cpp index 9991e1db9a247..41ec0a6aaae8a 100644 --- a/Utilities/StaticAnalyzers/src/ArgSizeChecker.cpp +++ b/Utilities/StaticAnalyzers/src/ArgSizeChecker.cpp @@ -99,9 +99,9 @@ void ArgSizeChecker::checkPreStmt(const CXXConstructExpr *E, CheckerContext &ctx clang::ento::PathDiagnosticLocation::createBegin(PVD, ctx.getSourceManager()); BugType * BT = new BugType(this,"Function parameter copied by value with size > max","ArgSize"); - BugReport *report = new BugReport(*BT, os.str() , DLoc); + std::unique_ptr report = llvm::make_unique(*BT, os.str() , DLoc); report->addRange(PVD->getSourceRange()); - ctx.emitReport(report); + ctx.emitReport(std::move(report)); } } } @@ -164,8 +164,8 @@ void ArgSizeChecker::checkASTDecl(const CXXMethodDecl *MD, AnalysisManager& mgr, // if ( fname.substr(0,oname.length()) == oname ) continue; BugType * BT = new BugType(this,"Function parameter with size > max", "ArgSize"); - BugReport *report = new BugReport(*BT, os.str() , DLoc); - BR.emitReport(report); + std::unique_ptr report = llvm::make_unique(*BT, os.str() , DLoc); + BR.emitReport(std::move(report)); } } diff --git a/Utilities/StaticAnalyzers/src/ClassChecker.cpp b/Utilities/StaticAnalyzers/src/ClassChecker.cpp index aec185bb427f4..ea7cd30063013 100644 --- a/Utilities/StaticAnalyzers/src/ClassChecker.cpp +++ b/Utilities/StaticAnalyzers/src/ClassChecker.cpp @@ -307,8 +307,8 @@ void WalkAST::VisitCXXConstCastExpr(clang::CXXConstCastExpr *CCE) { std::string tolog = "data class '"+pname+"' const function '" + mname + "' Warning: "+os.str()+"."; writeLog(tolog); BugType * BT = new BugType(Checker,"const_cast used in const function ","Data Class Const Correctness"); - BugReport * R = new BugReport(*BT,tolog,CELoc); - BR.emitReport(R); + std::unique_ptr R = llvm::make_unique (*BT,tolog,CELoc); + BR.emitReport(std::move(R)); return; } @@ -348,8 +348,8 @@ void WalkAST::ReportDeclRef( const clang::DeclRefExpr * DRE) { std::string tolog = "data class '"+pname+"' const function '" + mname + "' Warning: "+os.str(); writeLog(tolog); BugType * BT = new BugType(Checker,"ClassChecker : non-const static local variable accessed","Data Class Const Correctness"); - BugReport * R = new BugReport(*BT,os.str(),CELoc); - BR.emitReport(R); + std::unique_ptr R = llvm::make_unique(*BT,os.str(),CELoc); + BR.emitReport(std::move(R)); return; } @@ -367,8 +367,8 @@ void WalkAST::ReportDeclRef( const clang::DeclRefExpr * DRE) { std::string tolog = "data class '"+pname+"' const function '" + mname + "' Warning: "+os.str(); writeLog(tolog); BugType * BT = new BugType(Checker,"Non-const static member variable accessed","Data Class Const Correctness"); - BugReport * R = new BugReport(*BT,os.str(),CELoc); - BR.emitReport(R); + std::unique_ptr R = llvm::make_unique(*BT,os.str(),CELoc); + BR.emitReport(std::move(R)); return; } @@ -391,8 +391,8 @@ void WalkAST::ReportDeclRef( const clang::DeclRefExpr * DRE) { std::string tolog = "data class '"+pname+"' const function '" + mname + "' Warning: "+os.str(); writeLog(tolog); BugType * BT = new BugType(Checker,"Non-const global static variable accessed","Data Class Const Correctness"); - BugReport * R = new BugReport(*BT,os.str(),CELoc); - BR.emitReport(R); + std::unique_ptr R = llvm::make_unique(*BT,os.str(),CELoc); + BR.emitReport(std::move(R)); return; } @@ -517,8 +517,8 @@ void WalkAST::ReportCall(const clang::CXXMemberCallExpr *CE) { if ( support::isSafeClassName(support::getQualifiedName(*MD)) ) return; writeLog(tolog); BugType * BT = new BugType(Checker,"Non-const member function could modify member data object","Data Class Const Correctness"); - BugReport * R = new BugReport(*BT,os.str(),CELoc); - BR.emitReport(R); + std::unique_ptr R = llvm::make_unique(*BT,os.str(),CELoc); + BR.emitReport(std::move(R)); } @@ -545,8 +545,8 @@ void WalkAST::ReportCast(const clang::ExplicitCastExpr *CE) { writeLog(tolog); BugType * BT = new BugType(Checker,"Const cast away from member data in const function","Data Class Const Correctness"); - BugReport * R = new BugReport(*BT,os.str(),CELoc); - BR.emitReport(R); + std::unique_ptr R = llvm::make_unique(*BT,os.str(),CELoc); + BR.emitReport(std::move(R)); } @@ -610,16 +610,16 @@ void WalkAST::ReportCallReturn(const clang::ReturnStmt * RS) { if ( (RTy->isPointerType() || RTy->isReferenceType() ) ) { if( !support::isConst(RTy) ) { BugType * BT = new BugType(Checker,"Const function returns pointer or reference to non-const member data object","Data Class Const Correctness"); - BugReport * R = new BugReport(*BT,os.str(),CELoc); - BR.emitReport(R); + std::unique_ptr R = llvm::make_unique(*BT,os.str(),CELoc); + BR.emitReport(std::move(R)); } } std::string svname = "const class std::vector<"; std::string rtname = RTy.getAsString(); if ( (RTy->isReferenceType() || RTy ->isRecordType() ) && support::isConst(RTy) && rtname.substr(0,svname.length()) == svname ) { BugType * BT = new BugType(Checker,"Const function returns member data object of type const std::vector<*> or const std::vector<*>&","Data Class Const Correctness"); - BugReport * R = new BugReport(*BT,os.str(),CELoc); - BR.emitReport(R); + std::unique_ptr R = llvm::make_unique(*BT,os.str(),CELoc); + BR.emitReport(std::move(R)); } diff --git a/Utilities/StaticAnalyzers/src/ConstCastAwayChecker.cpp b/Utilities/StaticAnalyzers/src/ConstCastAwayChecker.cpp index f94e970bd53a4..f4c5a5c84009e 100644 --- a/Utilities/StaticAnalyzers/src/ConstCastAwayChecker.cpp +++ b/Utilities/StaticAnalyzers/src/ConstCastAwayChecker.cpp @@ -40,12 +40,12 @@ void ConstCastAwayChecker::checkPreStmt(const clang::ExplicitCastExpr *CE, if ( clang::ento::ExplodedNode *errorNode = C.generateSink()) { if (!BT) BT.reset(new clang::ento::BugType(this,"const cast away","ThreadSafety")); - clang::ento::BugReport *R = new clang::ento::BugReport(*BT, + std::unique_ptr R = llvm::make_unique(*BT, "const qualifier was removed via a cast, this may result in thread-unsafe code.", errorNode); R->addRange(CE->getSourceRange()); if ( ! m_exception.reportConstCastAway( *R, C ) ) return; - C.emitReport(R); + C.emitReport(std::move(R)); } } } diff --git a/Utilities/StaticAnalyzers/src/ConstCastChecker.cpp b/Utilities/StaticAnalyzers/src/ConstCastChecker.cpp index 8655869d557b7..1390499fc83f0 100644 --- a/Utilities/StaticAnalyzers/src/ConstCastChecker.cpp +++ b/Utilities/StaticAnalyzers/src/ConstCastChecker.cpp @@ -29,12 +29,12 @@ void ConstCastChecker::checkPreStmt(const clang::CXXConstCastExpr *CE, } if (clang::ento::ExplodedNode *errorNode = C.generateSink()) { if (!BT) BT.reset(new clang::ento::BugType(this,"const_cast used on a pointer to a data class ", "ThreadSafety")); - clang::ento::BugReport *R = new clang::ento::BugReport(*BT, + std::unique_ptr R = llvm::make_unique(*BT, "const_cast was used on a pointer to a data class ", errorNode); R->addRange(CE->getSourceRange()); if ( ! m_exception.reportConstCast( *R, C ) ) return; - C.emitReport(R); + C.emitReport(std::move(R)); } } diff --git a/Utilities/StaticAnalyzers/src/FiniteMathChecker.cc b/Utilities/StaticAnalyzers/src/FiniteMathChecker.cc index 7663fdc8c1f37..664961640b220 100644 --- a/Utilities/StaticAnalyzers/src/FiniteMathChecker.cc +++ b/Utilities/StaticAnalyzers/src/FiniteMathChecker.cc @@ -8,6 +8,7 @@ #include "CmsSupport.h" #include +#include namespace clangcms { @@ -36,9 +37,9 @@ void FiniteMathChecker::checkPreStmt(const clang::CallExpr *CE, clang::ento::Che if (!BT) BT.reset(new clang::ento::BugType(this,"std::isnan / std::isinf does not work when fast-math is used. Please use edm::isNotFinite from 'FWCore/Utilities/interface/isNotFinite.h'", "fastmath plugin")); - clang::ento::BugReport *report = new clang::ento::BugReport(*BT, BT->getName(), N); + std::unique_ptr report = llvm::make_unique(*BT, BT->getName(), N); report->addRange(Callee->getSourceRange()); - ctx.emitReport(report); + ctx.emitReport(std::move(report)); } } diff --git a/Utilities/StaticAnalyzers/src/ThrUnsafeFCallChecker.cpp b/Utilities/StaticAnalyzers/src/ThrUnsafeFCallChecker.cpp index 3aa6181a0e41f..8c9b4237bca30 100644 --- a/Utilities/StaticAnalyzers/src/ThrUnsafeFCallChecker.cpp +++ b/Utilities/StaticAnalyzers/src/ThrUnsafeFCallChecker.cpp @@ -50,10 +50,10 @@ void TUFWalker::VisitCXXMemberCallExpr( CXXMemberCallExpr *CE ) { os << "Known thread unsafe function " << mname << " is called in function " << pname; PathDiagnosticLocation CELoc = PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(),AC); BugType * BT = new BugType(Checker, "known thread unsafe function called","ThreadSafety"); - BugReport * R = new BugReport(*BT,os.str(),CELoc); + std::unique_ptr R = llvm::make_unique(*BT,os.str(),CELoc); R->setDeclWithIssue(AC->getDecl()); R->addRange(CE->getSourceRange()); - BR.emitReport(R); + BR.emitReport(std::move(R)); std::string tname = "function-checker.txt.unsorted"; std::string ostring = "function '"+ pname + "' known thread unsafe function '" + mname + "'.\n"; support::writeLog(ostring,tname); diff --git a/Utilities/StaticAnalyzers/src/getByChecker.cpp b/Utilities/StaticAnalyzers/src/getByChecker.cpp index accd93dcfdc7a..d3ffce2e7374d 100644 --- a/Utilities/StaticAnalyzers/src/getByChecker.cpp +++ b/Utilities/StaticAnalyzers/src/getByChecker.cpp @@ -108,9 +108,9 @@ void Walker::VisitCXXMemberCallExpr( CXXMemberCallExpr *CE ) { PathDiagnosticLocation CELoc = PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(),AC); BugType * BT = new BugType(Checker,"edm::getByLabel or edm::getManyByType called","optional") ; - BugReport * R = new BugReport(*BT,os.str(),CELoc); + std::unique_ptr R = llvm::make_unique(*BT,os.str(),CELoc); R->addRange(CE->getSourceRange()); - BR.emitReport(R); + BR.emitReport(std::move(R)); } else { for (auto I=CE->arg_begin(), E=CE->arg_end(); I != E; ++I) { @@ -133,9 +133,9 @@ void Walker::VisitCXXMemberCallExpr( CXXMemberCallExpr *CE ) { PathDiagnosticLocation CELoc = PathDiagnosticLocation::createBegin(CE, BR.getSourceManager(),AC); BugType * BT = new BugType(Checker,"function call with argument of type edm::Event","optional"); - BugReport * R = new BugReport(*BT,os.str(),CELoc); + std::unique_ptr R = llvm::make_unique(*BT,os.str(),CELoc); R->addRange(CE->getSourceRange()); - BR.emitReport(R); + BR.emitReport(std::move(R)); } } } From d2af7e831477454de4d5798ddf8963ef62798835 Mon Sep 17 00:00:00 2001 From: Bugra Date: Tue, 2 Feb 2016 10:51:03 +0100 Subject: [PATCH 245/250] modified StringCutObjectSelector to be called per job --- DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc | 6 ++++-- DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc index 9d759962aeb29..a97406a671573 100644 --- a/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc +++ b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.cc @@ -33,6 +33,7 @@ MonitorEnsemble::MonitorEnsemble(const char* label, muonIso_(nullptr), muonSelect_(nullptr), jetIDSelect_(nullptr), + jetSelect(nullptr), includeBTag_(false), lowerEdge_(-1.), upperEdge_(-1.), @@ -139,6 +140,7 @@ MonitorEnsemble::MonitorEnsemble(const char* label, // CaloJets at the moment) if (jetExtras.existsAs("select")) { jetSelect_ = jetExtras.getParameter("select"); + jetSelect.reset(new StringCutObjectSelector (jetSelect_)); } } @@ -537,8 +539,8 @@ void MonitorEnsemble::fill(const edm::Event& event, pat::Jet sel = *jet; - StringCutObjectSelector jetSelect(jetSelect_); - if (!jetSelect(sel)) continue; + if(!(*jetSelect)(sel))continue; +// if (!jetSelect(sel)) continue; // prepare jet to fill monitor histograms pat::Jet monitorJet = *jet; diff --git a/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h index 40477d15c9ed0..330903a75045a 100644 --- a/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h +++ b/DQM/Physics/src/TopSingleLeptonDQM_miniAOD.h @@ -136,6 +136,7 @@ class MonitorEnsemble { /// extra selection on jets (here given as std::string as it depends /// on the the jet type, which selections are valid and which not) std::string jetSelect_; + std::unique_ptr > jetSelect; /// include btag information or not /// to be determined from the cfg bool includeBTag_; @@ -153,7 +154,6 @@ class MonitorEnsemble { /// histogram container std::map hists_; edm::EDConsumerBase tmpConsumerBase; - std::string directory_; }; From 6d68c4312180b9b49ad446a9735522f93477ffa4 Mon Sep 17 00:00:00 2001 From: Michael Mulhearn Date: Tue, 2 Feb 2016 11:01:29 +0100 Subject: [PATCH 246/250] fix serialization of L1TMuonBarrelParams --- .../interface/L1TMuonBarrelParams.h | 211 +++++++++--------- .../L1TObjects/src/L1TMuonBarrelParams.cc | 10 + CondFormats/L1TObjects/src/classes_def.xml | 14 +- 3 files changed, 126 insertions(+), 109 deletions(-) diff --git a/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h b/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h index cf760396ff5b6..7b01764ef20b7 100644 --- a/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h +++ b/CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h @@ -22,10 +22,10 @@ class L1TMuonBarrelParams { - public: + L1TMuonBarrelParams(); enum { Version = 1 }; - + class Node { public: std::string type_; @@ -38,143 +38,138 @@ class L1TMuonBarrelParams { Node(){ type_="unspecified"; version_=0; } COND_SERIALIZABLE; }; - enum { - pta = 0, - NUM_BMTFPARAMNODES=1 + CONFIG = 0, + NUM_BMTF_PARAM_NODES=2 }; - L1MuDTTFParameters l1mudttfparams; - L1MuDTTFMasks l1mudttfmasks; - - /// L1MuBMPtaLut - typedef std::map > LUT; - ///Qual Pattern LUT - typedef std::pair< short, short > LUTID; - typedef std::pair< short, std::vector > LUTCONT; - typedef std::map< LUTID, LUTCONT > qpLUT; - ///Eta Pattern LUT - typedef std::map > etaLUT; - - class LUTParams{ + enum { PT_Assignment_nbits_Phi, + PT_Assignment_nbits_PhiB, + PHI_Assignment_nbits_Phi, + PHI_Assignment_nbits_PhiB, + Extrapolation_nbits_Phi, + Extrapolation_nbits_PhiB, + BX_min, + BX_max, + Extrapolation_Filter, + OutOfTime_Filter_Window, + OutOfTime_Filter, + Open_LUTs, + EtaTrackFinder, + Extrapolation_21, + NUM_CONFIG_PARAMS}; + + // after initial integration with downstream code, a small update will change: + L1MuDTTFParameters l1mudttfparams; + L1MuDTTFMasks l1mudttfmasks; + // to this: + //L1MuDTTFParameters & l1mudttfparams(){return l1mudttfparams_[0]; } + //L1MuDTTFMasks & l1mudttfmasks(){return l1mudttfmasks_[0]; } + + /// L1MuBMPtaLut + typedef std::map > LUT; + ///Qual Pattern LUT + typedef std::pair< short, short > LUTID; + typedef std::pair< short, std::vector > LUTCONT; + typedef std::map< LUTID, LUTCONT > qpLUT; + ///Eta Pattern LUT + typedef std::map > etaLUT; + + class LUTParams{ + public: + std::vector pta_lut_; + std::vector phi_lut_; + std::vector pta_threshold_; + qpLUT qp_lut_; + etaLUT eta_lut_; + + // helper class for extrapolation look-up tables + class extLUT { public: - std::vector pta_lut_; - std::vector phi_lut_; - std::vector pta_threshold_; - qpLUT qp_lut_; - etaLUT eta_lut_; - - /// helper class for extrapolation look-up tables - class extLUT { - public: - LUT low; - LUT high; - COND_SERIALIZABLE; - }; - std::vector ext_lut_; - - - - - LUTParams() : pta_lut_(0), phi_lut_(0), pta_threshold_(6), ext_lut_(0){ } + LUT low; + LUT high; COND_SERIALIZABLE; }; - std::string AssLUTPath() const { return pnodes_[pta].sparams_.size() > 0 ? pnodes_[pta].sparams_[0] : ""; } - void setAssLUTPath (std::string path) { pnodes_[pta].sparams_.push_back(path); } + std::vector ext_lut_; + LUTParams() : pta_lut_(0), phi_lut_(0), pta_threshold_(6), ext_lut_(0){ } + COND_SERIALIZABLE; + }; + + + + std::string AssLUTPath() const { return pnodes_[CONFIG].sparams_.size() > 0 ? pnodes_[CONFIG].sparams_[0] : ""; } + void setAssLUTPath (std::string path) { pnodes_[CONFIG].sparams_.push_back(path); } + void setpta_lut(std::vector ptalut) { lutparams_.pta_lut_ = ptalut; }; std::vector pta_lut() const {return lutparams_.pta_lut_; }; void setpta_threshold(std::vector ptathresh) { lutparams_.pta_threshold_ = ptathresh; }; std::vector pta_threshold() const { return lutparams_.pta_threshold_; }; - + void setphi_lut(std::vector philut) { lutparams_.phi_lut_ = philut; }; std::vector phi_lut() const {return lutparams_.phi_lut_; }; - + void setext_lut(std::vector extlut) { lutparams_.ext_lut_ = extlut; }; std::vector ext_lut() const {return lutparams_.ext_lut_; }; - + void setqp_lut(qpLUT qplut) { lutparams_.qp_lut_ = qplut; }; qpLUT qp_lut() const {return lutparams_.qp_lut_; }; - + void seteta_lut(etaLUT eta_lut) { lutparams_.eta_lut_ = eta_lut; }; etaLUT eta_lut() const {return lutparams_.eta_lut_; }; - - class ConfigParams{ - public: - int PT_Assignment_nbits_Phi; - int PT_Assignment_nbits_PhiB; - int PHI_Assignment_nbits_Phi; - int PHI_Assignment_nbits_PhiB; - int Extrapolation_nbits_Phi; - int Extrapolation_nbits_PhiB; - int BX_min; - int BX_max; - int Extrapolation_Filter; - int OutOfTime_Filter_Window; - bool OutOfTime_Filter; - bool Open_LUTs; - bool EtaTrackFinder; - bool Extrapolation_21; - - - ConfigParams() { } - - COND_SERIALIZABLE; - }; - - void set_PT_Assignment_nbits_Phi(int par1) {conparams_.PT_Assignment_nbits_Phi = par1;} - void set_PT_Assignment_nbits_PhiB(int par1) {conparams_.PT_Assignment_nbits_PhiB = par1;} - void set_PHI_Assignment_nbits_Phi(int par1) {conparams_.PHI_Assignment_nbits_Phi = par1;} - void set_PHI_Assignment_nbits_PhiB(int par1) {conparams_.PHI_Assignment_nbits_PhiB = par1;} - void set_Extrapolation_nbits_Phi(int par1) {conparams_.Extrapolation_nbits_Phi = par1;} - void set_Extrapolation_nbits_PhiB(int par1) {conparams_.Extrapolation_nbits_PhiB = par1;} - void set_BX_min(int par1) {conparams_.BX_min = par1;} - void set_BX_max(int par1) {conparams_.BX_max = par1;} - void set_Extrapolation_Filter(int par1) {conparams_.Extrapolation_Filter = par1;} - void set_OutOfTime_Filter_Window(int par1) {conparams_.OutOfTime_Filter_Window = par1;} - void set_OutOfTime_Filter(bool par1) {conparams_.OutOfTime_Filter = par1;} - void set_Open_LUTs(bool par1) {conparams_.Open_LUTs = par1;} - void set_EtaTrackFinder(bool par1) {conparams_.EtaTrackFinder = par1;} - void set_Extrapolation_21(bool par1) {conparams_.Extrapolation_21 = par1;} - - - int get_PT_Assignment_nbits_Phi() const{return conparams_.PT_Assignment_nbits_Phi;} - int get_PT_Assignment_nbits_PhiB() const {return conparams_.PT_Assignment_nbits_PhiB;} - int get_PHI_Assignment_nbits_Phi() const {return conparams_.PHI_Assignment_nbits_Phi;} - int get_PHI_Assignment_nbits_PhiB() const {return conparams_.PHI_Assignment_nbits_PhiB;} - int get_Extrapolation_nbits_Phi() const {return conparams_.Extrapolation_nbits_Phi;} - int get_Extrapolation_nbits_PhiB() const {return conparams_.Extrapolation_nbits_PhiB;} - int get_BX_min() const {return conparams_.BX_min ;} - int get_BX_max() const {return conparams_.BX_max;} - int get_Extrapolation_Filter() const {return conparams_.Extrapolation_Filter;} - int get_OutOfTime_Filter_Window() const {return conparams_.OutOfTime_Filter_Window ;} - - bool get_OutOfTime_Filter() const {return conparams_.OutOfTime_Filter;} - bool get_Open_LUTs() const {return conparams_.Open_LUTs ;} - bool get_EtaTrackFinder() const {return conparams_.EtaTrackFinder ;} - bool get_Extrapolation_21() const {return conparams_.Extrapolation_21 ;} - - - - L1TMuonBarrelParams() { version_=Version; pnodes_.resize(NUM_BMTFPARAMNODES); } + + + void set_PT_Assignment_nbits_Phi(int par1) {pnodes_[CONFIG].iparams_[PT_Assignment_nbits_Phi] = par1;} + void set_PT_Assignment_nbits_PhiB(int par1) {pnodes_[CONFIG].iparams_[PT_Assignment_nbits_PhiB] = par1;} + void set_PHI_Assignment_nbits_Phi(int par1) {pnodes_[CONFIG].iparams_[PHI_Assignment_nbits_Phi] = par1;} + void set_PHI_Assignment_nbits_PhiB(int par1) {pnodes_[CONFIG].iparams_[PHI_Assignment_nbits_PhiB] = par1;} + void set_Extrapolation_nbits_Phi(int par1) {pnodes_[CONFIG].iparams_[Extrapolation_nbits_Phi] = par1;} + void set_Extrapolation_nbits_PhiB(int par1) {pnodes_[CONFIG].iparams_[Extrapolation_nbits_PhiB] = par1;} + void set_BX_min(int par1) {pnodes_[CONFIG].iparams_[BX_min] = par1;} + void set_BX_max(int par1) {pnodes_[CONFIG].iparams_[BX_max] = par1;} + void set_Extrapolation_Filter(int par1) {pnodes_[CONFIG].iparams_[Extrapolation_Filter] = par1;} + void set_OutOfTime_Filter_Window(int par1) {pnodes_[CONFIG].iparams_[OutOfTime_Filter_Window] = par1;} + void set_OutOfTime_Filter(bool par1) {pnodes_[CONFIG].iparams_[OutOfTime_Filter] = par1;} + void set_Open_LUTs(bool par1) {pnodes_[CONFIG].iparams_[Open_LUTs] = par1;} + void set_EtaTrackFinder(bool par1) {pnodes_[CONFIG].iparams_[EtaTrackFinder] = par1;} + void set_Extrapolation_21(bool par1) {pnodes_[CONFIG].iparams_[Extrapolation_21] = par1;} + + + int get_PT_Assignment_nbits_Phi() const{return pnodes_[CONFIG].iparams_[PT_Assignment_nbits_Phi];} + int get_PT_Assignment_nbits_PhiB() const {return pnodes_[CONFIG].iparams_[PT_Assignment_nbits_PhiB];} + int get_PHI_Assignment_nbits_Phi() const {return pnodes_[CONFIG].iparams_[PHI_Assignment_nbits_Phi];} + int get_PHI_Assignment_nbits_PhiB() const {return pnodes_[CONFIG].iparams_[PHI_Assignment_nbits_PhiB];} + int get_Extrapolation_nbits_Phi() const {return pnodes_[CONFIG].iparams_[Extrapolation_nbits_Phi];} + int get_Extrapolation_nbits_PhiB() const {return pnodes_[CONFIG].iparams_[Extrapolation_nbits_PhiB];} + int get_BX_min() const {return pnodes_[CONFIG].iparams_[BX_min] ;} + int get_BX_max() const {return pnodes_[CONFIG].iparams_[BX_max];} + int get_Extrapolation_Filter() const {return pnodes_[CONFIG].iparams_[Extrapolation_Filter];} + int get_OutOfTime_Filter_Window() const {return pnodes_[CONFIG].iparams_[OutOfTime_Filter_Window] ;} + + bool get_OutOfTime_Filter() const {return pnodes_[CONFIG].iparams_[OutOfTime_Filter];} + bool get_Open_LUTs() const {return pnodes_[CONFIG].iparams_[Open_LUTs] ;} + bool get_EtaTrackFinder() const {return pnodes_[CONFIG].iparams_[EtaTrackFinder] ;} + bool get_Extrapolation_21() const {return pnodes_[CONFIG].iparams_[Extrapolation_21] ;} + ~L1TMuonBarrelParams() {} // FW version unsigned fwVersion() const { return fwVersion_; } void setFwVersion(unsigned fwVersion) { fwVersion_ = fwVersion; } + // print parameters to stream: void print(std::ostream&) const; friend std::ostream& operator<<(std::ostream& o, const L1TMuonBarrelParams & p) { p.print(o); return o; } - -private: + private: unsigned version_; unsigned fwVersion_; - + std::vector pnodes_; - + // std::vector here is just so we can use "blob" in DB and evade max size limitations... + std::vector l1mudttfparams_; + std::vector l1mudttfmasks_; LUTParams lutparams_; - ConfigParams conparams_; - + COND_SERIALIZABLE; }; #endif diff --git a/CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc b/CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc index 8b21868d948d8..7edd586e58364 100644 --- a/CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc +++ b/CondFormats/L1TObjects/src/L1TMuonBarrelParams.cc @@ -1,5 +1,15 @@ #include "CondFormats/L1TObjects/interface/L1TMuonBarrelParams.h" +L1TMuonBarrelParams::L1TMuonBarrelParams() : + pnodes_(NUM_BMTF_PARAM_NODES), + l1mudttfparams_(1), + l1mudttfmasks_(1) +{ + pnodes_[CONFIG].sparams_.clear(); + pnodes_[CONFIG].iparams_.resize(NUM_CONFIG_PARAMS); + version_=Version; +} + void L1TMuonBarrelParams::print(std::ostream& out) const { out << "L1 BMTF Parameters" << std::endl; diff --git a/CondFormats/L1TObjects/src/classes_def.xml b/CondFormats/L1TObjects/src/classes_def.xml index e02c74a9df7de..29c7b56780d11 100644 --- a/CondFormats/L1TObjects/src/classes_def.xml +++ b/CondFormats/L1TObjects/src/classes_def.xml @@ -42,8 +42,9 @@ + - + @@ -51,6 +52,17 @@ + + + + + + + + + + + From 634da0be8e4b855fcf9eab0dc5dc15920763f7d2 Mon Sep 17 00:00:00 2001 From: mauro verzetti Date: Tue, 2 Feb 2016 11:31:44 +0100 Subject: [PATCH 247/250] Use token to access trigger, make it configurable --- .../SiStripCommon/interface/ShallowEventDataProducer.h | 3 ++- .../SiStripCommon/plugins/ShallowEventDataProducer.cc | 8 +++++--- .../SiStripCommon/python/ShallowEventDataProducer_cfi.py | 5 ++++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CalibTracker/SiStripCommon/interface/ShallowEventDataProducer.h b/CalibTracker/SiStripCommon/interface/ShallowEventDataProducer.h index 953fb2c37b20b..9ffb7ec119ac9 100644 --- a/CalibTracker/SiStripCommon/interface/ShallowEventDataProducer.h +++ b/CalibTracker/SiStripCommon/interface/ShallowEventDataProducer.h @@ -3,6 +3,7 @@ #include "FWCore/Framework/interface/EDProducer.h" #include "FWCore/Framework/interface/Frameworkfwd.h" +#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h" #include class ShallowEventDataProducer : public edm::EDProducer { @@ -10,7 +11,7 @@ class ShallowEventDataProducer : public edm::EDProducer { explicit ShallowEventDataProducer(const edm::ParameterSet&); private: void produce( edm::Event &, const edm::EventSetup & ); - std::string trig_label_="gtDigis"; + edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > trig_token_; }; #endif diff --git a/CalibTracker/SiStripCommon/plugins/ShallowEventDataProducer.cc b/CalibTracker/SiStripCommon/plugins/ShallowEventDataProducer.cc index d49e7170e2386..a31f7665e811f 100644 --- a/CalibTracker/SiStripCommon/plugins/ShallowEventDataProducer.cc +++ b/CalibTracker/SiStripCommon/plugins/ShallowEventDataProducer.cc @@ -1,6 +1,6 @@ #include "CalibTracker/SiStripCommon/interface/ShallowEventDataProducer.h" #include "FWCore/Framework/interface/Event.h" -#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" ShallowEventDataProducer::ShallowEventDataProducer(const edm::ParameterSet& iConfig) { produces ( "run" ); @@ -9,7 +9,9 @@ ShallowEventDataProducer::ShallowEventDataProducer(const edm::ParameterSet& iCon produces ( "lumi" ); produces > ( "TrigTech" ); produces > ( "TrigPh" ); - consumes(edm::InputTag(trig_label_)); + trig_token_ = consumes( + iConfig.getParameter("trigRecord") + ); } void ShallowEventDataProducer:: @@ -23,7 +25,7 @@ produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { edm::Handle< L1GlobalTriggerReadoutRecord > gtRecord; - iEvent.getByLabel( edm::InputTag(trig_label_), gtRecord); + iEvent.getByToken(trig_token_, gtRecord); std::vector TrigTech_(64,0); std::vector TrigPh_(128,0); diff --git a/CalibTracker/SiStripCommon/python/ShallowEventDataProducer_cfi.py b/CalibTracker/SiStripCommon/python/ShallowEventDataProducer_cfi.py index 32e76796cf7c3..a30c06a691ea4 100644 --- a/CalibTracker/SiStripCommon/python/ShallowEventDataProducer_cfi.py +++ b/CalibTracker/SiStripCommon/python/ShallowEventDataProducer_cfi.py @@ -1,3 +1,6 @@ import FWCore.ParameterSet.Config as cms -shallowEventRun = cms.EDProducer("ShallowEventDataProducer") +shallowEventRun = cms.EDProducer( + "ShallowEventDataProducer", + trigRecord = cms.InputTag('gtDigis') + ) From 10e9710e1145434208cb63dcc0223d3d1170d528 Mon Sep 17 00:00:00 2001 From: Philip Date: Tue, 2 Feb 2016 12:03:36 +0100 Subject: [PATCH 248/250] Fixed review comments --- .../PileupAlgos/plugins/PuppiPhoton.cc | 39 +++++-------------- CommonTools/PileupAlgos/plugins/PuppiPhoton.h | 7 ---- .../PileupAlgos/python/PhotonPuppi_cff.py | 12 +++--- 3 files changed, 15 insertions(+), 43 deletions(-) diff --git a/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc b/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc index 21cd5c10be9b7..2589f00eb4b71 100644 --- a/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc +++ b/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc @@ -1,4 +1,3 @@ - // system include files #include @@ -23,6 +22,7 @@ #include "DataFormats/GsfTrackReco/interface/GsfTrack.h" #include "DataFormats/GsfTrackReco/interface/GsfTrackFwd.h" #include "DataFormats/Common/interface/Association.h" +#include "DataFormats/Math/interface/deltaR.h" //Main File #include "CommonTools/PileupAlgos/plugins/PuppiPhoton.h" @@ -32,12 +32,12 @@ PuppiPhoton::PuppiPhoton(const edm::ParameterSet& iConfig) { tokenPuppiCandidates_ = consumes(iConfig.getParameter("puppiCandName")); tokenPhotonCandidates_ = consumes(iConfig.getParameter("photonName")); tokenPhotonId_ = consumes >(iConfig.getParameter("photonId")); - pt_ = iConfig.getUntrackedParameter("pt"); - dRMatch_ = iConfig.getUntrackedParameter > ("dRMatch"); - pdgIds_ = iConfig.getUntrackedParameter >("pdgids"); - usePFRef_ = iConfig.getUntrackedParameter("useRefs"); - weight_ = iConfig.getUntrackedParameter("weight"); - useValueMap_ = iConfig.getUntrackedParameter("useValueMap"); + pt_ = iConfig.getParameter("pt"); + dRMatch_ = iConfig.getParameter > ("dRMatch"); + pdgIds_ = iConfig.getParameter >("pdgids"); + usePFRef_ = iConfig.getParameter("useRefs"); + weight_ = iConfig.getParameter("weight"); + useValueMap_ = iConfig.getParameter("useValueMap"); tokenWeights_ = consumes >(iConfig.getParameter("weightsName")); usePhotonId_ = (iConfig.getParameter("photonId")).label().size() == 0; @@ -175,34 +175,13 @@ void PuppiPhoton::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { } // ------------------------------------------------------------------------------------------ bool PuppiPhoton::matchPFCandidate(const reco::Candidate *iPF,const reco::Candidate *iPho) { - double pDEta = iPF->eta()-iPho->eta(); - double pDPhi = std::abs(iPF->phi()-iPho->phi()); - if(pDPhi > 2.*M_PI-pDPhi) pDPhi = 2.*M_PI-pDPhi; - double pDR2 = pDEta*pDEta+pDPhi*pDPhi; + double lDR = deltaR(iPF->eta(),iPF->phi(),iPho->eta(),iPho->phi()); for(unsigned int i0 = 0; i0 < pdgIds_.size(); i0++) { - if(std::abs(iPF->pdgId()) == pdgIds_[i0] && pDR2 < dRMatch_[i0]) return true; + if(std::abs(iPF->pdgId()) == pdgIds_[i0] && lDR < dRMatch_[i0]) return true; } return false; } // ------------------------------------------------------------------------------------------ -void PuppiPhoton::beginJob() { -} -// ------------------------------------------------------------------------------------------ -void PuppiPhoton::endJob() { -} -// ------------------------------------------------------------------------------------------ -void PuppiPhoton::beginRun(edm::Run&, edm::EventSetup const&) { -} -// ------------------------------------------------------------------------------------------ -void PuppiPhoton::endRun(edm::Run&, edm::EventSetup const&) { -} -// ------------------------------------------------------------------------------------------ -void PuppiPhoton::beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&) { -} -// ------------------------------------------------------------------------------------------ -void PuppiPhoton::endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&) { -} -// ------------------------------------------------------------------------------------------ void PuppiPhoton::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { //The following says we do not know what parameters are allowed so do no validation // Please change this to state exactly what you do use, even if it is no parameters diff --git a/CommonTools/PileupAlgos/plugins/PuppiPhoton.h b/CommonTools/PileupAlgos/plugins/PuppiPhoton.h index 011ca6cbfa699..eb48ba774059f 100644 --- a/CommonTools/PileupAlgos/plugins/PuppiPhoton.h +++ b/CommonTools/PileupAlgos/plugins/PuppiPhoton.h @@ -29,14 +29,7 @@ class PuppiPhoton : public edm::stream::EDProducer<> { typedef edm::View PFView; private: - virtual void beginJob() ; virtual void produce(edm::Event&, const edm::EventSetup&); - virtual void endJob() ; - - virtual void beginRun(edm::Run&, edm::EventSetup const&); - virtual void endRun(edm::Run&, edm::EventSetup const&); - virtual void beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); - virtual void endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&); bool matchPFCandidate(const reco::Candidate *iPF,const reco::Candidate *iPho); edm::EDGetTokenT< CandidateView > tokenPFCandidates_; edm::EDGetTokenT< CandidateView > tokenPuppiCandidates_; diff --git a/CommonTools/PileupAlgos/python/PhotonPuppi_cff.py b/CommonTools/PileupAlgos/python/PhotonPuppi_cff.py index a57d864c69e48..a660b071fa2eb 100644 --- a/CommonTools/PileupAlgos/python/PhotonPuppi_cff.py +++ b/CommonTools/PileupAlgos/python/PhotonPuppi_cff.py @@ -6,12 +6,12 @@ puppiCandName = cms.InputTag('puppi'), photonName = cms.InputTag('slimmedPhotons'), photonId = cms.InputTag("egmPhotonIDs:cutBasedPhotonID-PHYS14-PU20bx25-V2-standalone-loose"), - pt = cms.untracked.double(10), - useRefs = cms.untracked.bool(True), - dRMatch = cms.untracked.vdouble(10,10,10,10), - pdgids = cms.untracked.vint32 (22,11,211,130), - weight = cms.untracked.double(1.), - useValueMap = cms.untracked.bool(False), + pt = cms.double(10), + useRefs = cms.bool(True), + dRMatch = cms.vdouble(10,10,10,10), + pdgids = cms.vint32 (22,11,211,130), + weight = cms.double(1.), + useValueMap = cms.bool(False), weightsName = cms.InputTag('puppi'), ) From 759396dff6a134fb586a10c77323810efe7eb905 Mon Sep 17 00:00:00 2001 From: Philip Date: Tue, 2 Feb 2016 18:03:50 +0100 Subject: [PATCH 249/250] removed the try brackets per Slava's request --- .../PileupAlgos/plugins/PuppiPhoton.cc | 34 ++++++++----------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc b/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc index 2589f00eb4b71..07ca011bd86ab 100644 --- a/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc +++ b/CommonTools/PileupAlgos/plugins/PuppiPhoton.cc @@ -75,27 +75,23 @@ void PuppiPhoton::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) { if(!passObject && usePhotonId_) continue; if(!usePFRef_) phoCands.push_back(&(*itPho)); if(!usePFRef_) continue; - try{ - const pat::Photon *pPho = dynamic_cast(&(*itPho)); - if(pPho != 0) { - for( const edm::Ref & ref : pPho->associatedPackedPFCandidates() ) { - if(matchPFCandidate(&(*(pfCol->ptrAt(ref.key()))),&(*itPho))) { - phoIndx.push_back(ref.key()); - phoCands.push_back(&(*(pfCol->ptrAt(ref.key())))); - } + const pat::Photon *pPho = dynamic_cast(&(*itPho)); + if(pPho != 0) { + for( const edm::Ref & ref : pPho->associatedPackedPFCandidates() ) { + if(matchPFCandidate(&(*(pfCol->ptrAt(ref.key()))),&(*itPho))) { + phoIndx.push_back(ref.key()); + phoCands.push_back(&(*(pfCol->ptrAt(ref.key())))); } - continue; } - const pat::Electron *pElectron = dynamic_cast(&(*itPho)); - if(pElectron != 0) { - for( const edm::Ref & ref : pElectron->associatedPackedPFCandidates() ) - if(matchPFCandidate(&(*(pfCol->ptrAt(ref.key()))),&(*itPho))) { - phoIndx.push_back(ref.key()); - phoCands.push_back(&(*(pfCol->ptrAt(ref.key())))); - } - } - } catch(...) { - throw edm::Exception(edm::errors::LogicError,"PuppiPhoton: photon references not found"); + continue; + } + const pat::Electron *pElectron = dynamic_cast(&(*itPho)); + if(pElectron != 0) { + for( const edm::Ref & ref : pElectron->associatedPackedPFCandidates() ) + if(matchPFCandidate(&(*(pfCol->ptrAt(ref.key()))),&(*itPho))) { + phoIndx.push_back(ref.key()); + phoCands.push_back(&(*(pfCol->ptrAt(ref.key())))); + } } } //Get Weights From 2dca225d59adf1eebf0e7b94c77e1df72075e63a Mon Sep 17 00:00:00 2001 From: Dan Riley Date: Tue, 2 Feb 2016 15:51:21 -0500 Subject: [PATCH 250/250] Fixes for misc. threading problems found by static analysis and helgrind --- SimCalorimetry/HcalSimAlgos/src/HPDIonFeedbackSim.cc | 2 +- .../plugins/DataMixingHcalDigiWorker.cc | 3 --- .../plugins/DataMixingSiPixelMCDigiWorker.cc | 8 ++++---- .../plugins/SiPixelDigitizerAlgorithm.cc | 8 ++++---- .../plugins/SiTrivialInduceChargeOnStrips.cc | 10 ++++++++-- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/SimCalorimetry/HcalSimAlgos/src/HPDIonFeedbackSim.cc b/SimCalorimetry/HcalSimAlgos/src/HPDIonFeedbackSim.cc index 5be67bff40055..c7092d9fdd58d 100644 --- a/SimCalorimetry/HcalSimAlgos/src/HPDIonFeedbackSim.cc +++ b/SimCalorimetry/HcalSimAlgos/src/HPDIonFeedbackSim.cc @@ -27,7 +27,7 @@ using namespace edm; using namespace std; // constants for simulation/parameterization -double pe2Charge = 0.333333; // fC/p.e. +const double pe2Charge = 0.333333; // fC/p.e. HPDIonFeedbackSim::HPDIonFeedbackSim(const edm::ParameterSet & iConfig, const CaloShapes * shapes) : theDbService(0), theShapes(shapes) diff --git a/SimGeneral/DataMixingModule/plugins/DataMixingHcalDigiWorker.cc b/SimGeneral/DataMixingModule/plugins/DataMixingHcalDigiWorker.cc index fe11595ca1c03..bbb7e41722d7b 100644 --- a/SimGeneral/DataMixingModule/plugins/DataMixingHcalDigiWorker.cc +++ b/SimGeneral/DataMixingModule/plugins/DataMixingHcalDigiWorker.cc @@ -24,8 +24,6 @@ // #include "DataMixingHcalDigiWorker.h" -std::vector ids; - using namespace std; namespace { @@ -191,7 +189,6 @@ namespace edm void DataMixingHcalDigiWorker::addHcalSignals(const edm::Event &e,const edm::EventSetup& ES) { // Calibration stuff will look like this: - ids.clear(); // get conditions edm::ESHandle conditions; ES.get().get(conditions); diff --git a/SimGeneral/DataMixingModule/plugins/DataMixingSiPixelMCDigiWorker.cc b/SimGeneral/DataMixingModule/plugins/DataMixingSiPixelMCDigiWorker.cc index 256c0126776cd..c7a065030b7b8 100644 --- a/SimGeneral/DataMixingModule/plugins/DataMixingSiPixelMCDigiWorker.cc +++ b/SimGeneral/DataMixingModule/plugins/DataMixingSiPixelMCDigiWorker.cc @@ -225,10 +225,10 @@ void DataMixingSiPixelMCDigiWorker::init_DynIneffDB(const edm::EventSetup& es, c void DataMixingSiPixelMCDigiWorker::PixelEfficiencies::init_from_db(const edm::ESHandle& geom, const edm::ESHandle& SiPixelDynamicInefficiency) { theInstLumiScaleFactor = SiPixelDynamicInefficiency->gettheInstLumiScaleFactor(); - std::map PixelGeomFactorsDB = SiPixelDynamicInefficiency->getPixelGeomFactors(); - std::map ColGeomFactorsDB = SiPixelDynamicInefficiency->getColGeomFactors(); - std::map ChipGeomFactorsDB = SiPixelDynamicInefficiency->getChipGeomFactors(); - std::map > PUFactors = SiPixelDynamicInefficiency->getPUFactors(); + const std::map& PixelGeomFactorsDB = SiPixelDynamicInefficiency->getPixelGeomFactors(); + const std::map& ColGeomFactorsDB = SiPixelDynamicInefficiency->getColGeomFactors(); + const std::map& ChipGeomFactorsDB = SiPixelDynamicInefficiency->getChipGeomFactors(); + const std::map >& PUFactors = SiPixelDynamicInefficiency->getPUFactors(); std::vector DetIdmasks = SiPixelDynamicInefficiency->getDetIdmasks(); // Loop on all modules, calculate geometrical scale factors and store in map for easy access diff --git a/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.cc b/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.cc index b19d093ff2564..b3580b2c64ea5 100644 --- a/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.cc +++ b/SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizerAlgorithm.cc @@ -491,10 +491,10 @@ void SiPixelDigitizerAlgorithm::init_DynIneffDB(const edm::EventSetup& es, const void SiPixelDigitizerAlgorithm::PixelEfficiencies::init_from_db(const edm::ESHandle& geom, const edm::ESHandle& SiPixelDynamicInefficiency) { theInstLumiScaleFactor = SiPixelDynamicInefficiency->gettheInstLumiScaleFactor(); - std::map PixelGeomFactorsDB = SiPixelDynamicInefficiency->getPixelGeomFactors(); - std::map ColGeomFactorsDB = SiPixelDynamicInefficiency->getColGeomFactors(); - std::map ChipGeomFactorsDB = SiPixelDynamicInefficiency->getChipGeomFactors(); - std::map > PUFactors = SiPixelDynamicInefficiency->getPUFactors(); + const std::map& PixelGeomFactorsDB = SiPixelDynamicInefficiency->getPixelGeomFactors(); + const std::map& ColGeomFactorsDB = SiPixelDynamicInefficiency->getColGeomFactors(); + const std::map& ChipGeomFactorsDB = SiPixelDynamicInefficiency->getChipGeomFactors(); + const std::map >& PUFactors = SiPixelDynamicInefficiency->getPUFactors(); std::vector DetIdmasks = SiPixelDynamicInefficiency->getDetIdmasks(); // Loop on all modules, calculate geometrical scale factors and store in map for easy access diff --git a/SimTracker/SiStripDigitizer/plugins/SiTrivialInduceChargeOnStrips.cc b/SimTracker/SiStripDigitizer/plugins/SiTrivialInduceChargeOnStrips.cc index 5af217722e4f9..2b9ac8069d89b 100644 --- a/SimTracker/SiStripDigitizer/plugins/SiTrivialInduceChargeOnStrips.cc +++ b/SimTracker/SiStripDigitizer/plugins/SiTrivialInduceChargeOnStrips.cc @@ -13,6 +13,8 @@ namespace { struct Count { +#ifdef SISTRIP_COUNT + // note: this code is not thread safe, counts will be inaccurate if run with multiple threads double ncall=0; double ndep=0, ndep2=0, maxdep=0; double nstr=0, nstr2=0; @@ -23,13 +25,17 @@ namespace { void val(double d) { ncv++; nval+=d; nval2+=d*d; maxv=std::max(d,maxv);} void zero() { dzero++;} ~Count() { -#ifdef SISTRIP_COUNT std::cout << "deposits " << ncall << " " << maxdep << " " << ndep/ncall << " " << std::sqrt(ndep2*ncall -ndep*ndep)/ncall << std::endl; std::cout << "zeros " << dzero << std::endl; std::cout << "strips " << nstr/ndep << " " << std::sqrt(nstr2*ndep -nstr*nstr)/ndep << std::endl; std::cout << "vaules " << ncv << " " << maxv << " " << nval/ncv << " " << std::sqrt(nval2*ncv -nval*nval)/ncv << std::endl; -#endif } +#else + void dep(double) {} + void str(double) {} + void val(double) {} + void zero() {} +#endif }; Count count;