From f7fe247341ebbefc4cf788ce3e004a2914254142 Mon Sep 17 00:00:00 2001 From: erica brondolin Date: Fri, 10 Jun 2016 19:17:39 +0200 Subject: [PATCH 01/23] first draft --- .../interface/ClusterRemovalInfo.h | 26 +- .../TrackerRecHit2D/src/classes_def.xml | 4 +- .../python/SeedClusterRemoverPhase2_cfi.py | 12 + .../src/SeedClusterRemoverPhase2.cc | 455 ++++++++++++++++++ 4 files changed, 491 insertions(+), 6 deletions(-) create mode 100644 RecoLocalTracker/SubCollectionProducers/python/SeedClusterRemoverPhase2_cfi.py create mode 100644 RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc diff --git a/DataFormats/TrackerRecHit2D/interface/ClusterRemovalInfo.h b/DataFormats/TrackerRecHit2D/interface/ClusterRemovalInfo.h index 79b939a2e217d..07c4a231009d2 100644 --- a/DataFormats/TrackerRecHit2D/interface/ClusterRemovalInfo.h +++ b/DataFormats/TrackerRecHit2D/interface/ClusterRemovalInfo.h @@ -6,6 +6,7 @@ #include "DataFormats/Common/interface/OrphanHandle.h" #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h" #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h" +#include "DataFormats/TrackerRecHit2D/interface/Phase2TrackerRecHit1D.h" namespace reco { @@ -13,8 +14,10 @@ namespace reco { public: typedef SiStripRecHit2D::ClusterRef::product_type SiStripClusters; typedef SiPixelRecHit::ClusterRef::product_type SiPixelClusters; + typedef Phase2TrackerRecHit1D::CluRef::product_type Phase2TrackerCluster1Ds; typedef edm::RefProd SiStripClusterRefProd; typedef edm::RefProd SiPixelClusterRefProd; + typedef edm::RefProd Phase2TrackerCluster1DRefProd; typedef std::vector Indices; @@ -22,44 +25,59 @@ namespace reco { ClusterRemovalInfo(const edm::Handle &pixelClusters, const edm::Handle &stripClusters) : - pixelProd_(pixelClusters), stripProd_(stripClusters) { } + pixelProd_(pixelClusters), stripProd_(stripClusters), phase2OTProd_() { } + + ClusterRemovalInfo(const edm::Handle &pixelClusters, + const edm::Handle &phase2OTClusters) : + pixelProd_(pixelClusters), stripProd_(), phase2OTProd_(phase2OTClusters) { } ClusterRemovalInfo(const edm::Handle &pixelClusters) : - pixelProd_(pixelClusters), stripProd_() { } + pixelProd_(pixelClusters), stripProd_(), phase2OTProd_() { } ClusterRemovalInfo(const edm::Handle &stripClusters) : - pixelProd_(), stripProd_(stripClusters) { } + pixelProd_(), stripProd_(stripClusters), phase2OTProd_() { } + ClusterRemovalInfo(const edm::Handle &phase2OTClusters) : + pixelProd_(), stripProd_(), phase2OTProd_(phase2OTClusters) { } void getOldClustersFrom(const ClusterRemovalInfo &other) { stripProd_ = other.stripProd_; pixelProd_ = other.pixelProd_; + phase2OTProd_ = other.phase2OTProd_; } Indices & pixelIndices() { return pixelIndices_; } Indices & stripIndices() { return stripIndices_; } + Indices & phase2OTIndices() { return phase2OTIndices_; } const Indices & pixelIndices() const { return pixelIndices_; } const Indices & stripIndices() const { return stripIndices_; } + const Indices & phase2OTIndices() const { return phase2OTIndices_; } const SiPixelClusterRefProd & pixelRefProd() const { return pixelProd_; } const SiStripClusterRefProd & stripRefProd() const { return stripProd_; } + const Phase2TrackerCluster1DRefProd & phase2OTRefProd() const { return phase2OTProd_; } const SiPixelClusterRefProd & pixelNewRefProd() const { return pixelNewProd_; } const SiStripClusterRefProd & stripNewRefProd() const { return stripNewProd_; } + const Phase2TrackerCluster1DRefProd & phase2OTNewRefProd() const { return phase2OTNewProd_; } void setNewPixelClusters(const edm::OrphanHandle &pixels) { pixelNewProd_ = SiPixelClusterRefProd(pixels); } void setNewStripClusters(const edm::OrphanHandle &strips) { stripNewProd_ = SiStripClusterRefProd(strips); } + void setNewPhase2OTClusters(const edm::OrphanHandle &phase2OTs) { phase2OTNewProd_ = Phase2TrackerCluster1DRefProd(phase2OTs); } bool hasPixel() const { return pixelProd_.isNonnull(); } bool hasStrip() const { return stripProd_.isNonnull(); } + bool hasPhase2OT() const { return phase2OTProd_.isNonnull(); } void swap(reco::ClusterRemovalInfo &other) ; private: SiPixelClusterRefProd pixelProd_; SiStripClusterRefProd stripProd_; + Phase2TrackerCluster1DRefProd phase2OTProd_; SiPixelClusterRefProd pixelNewProd_; SiStripClusterRefProd stripNewProd_; - Indices stripIndices_, pixelIndices_; + Phase2TrackerCluster1DRefProd phase2OTNewProd_; + Indices stripIndices_, pixelIndices_, phase2OTIndices_; }; void swap(reco::ClusterRemovalInfo &cri1, reco::ClusterRemovalInfo &cri2) ; diff --git a/DataFormats/TrackerRecHit2D/src/classes_def.xml b/DataFormats/TrackerRecHit2D/src/classes_def.xml index db4e5f29da492..e6e40fff6b666 100644 --- a/DataFormats/TrackerRecHit2D/src/classes_def.xml +++ b/DataFormats/TrackerRecHit2D/src/classes_def.xml @@ -117,8 +117,8 @@ - - + + diff --git a/RecoLocalTracker/SubCollectionProducers/python/SeedClusterRemoverPhase2_cfi.py b/RecoLocalTracker/SubCollectionProducers/python/SeedClusterRemoverPhase2_cfi.py new file mode 100644 index 0000000000000..eddc72a2ec9ad --- /dev/null +++ b/RecoLocalTracker/SubCollectionProducers/python/SeedClusterRemoverPhase2_cfi.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +seedClusterRemover = cms.EDProducer("SeedClusterRemoverPhase2", + trajectories = cms.InputTag("initialStepSeeds"), + phase2OTClusters = cms.InputTag("siPhase2Clusters"), + overrideTrkQuals = cms.InputTag(""), #dummy + pixelClusters = cms.InputTag("siPixelClusters"), + Common = cms.PSet( maxChi2 = cms.double(9.0) ), #dummy + TrackQuality = cms.string('highPurity'), #dummy + clusterLessSolution = cms.bool(True) + ) + diff --git a/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc b/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc new file mode 100644 index 0000000000000..aceb3823bfb22 --- /dev/null +++ b/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc @@ -0,0 +1,455 @@ +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/stream/EDProducer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Utilities/interface/InputTag.h" + +#include "DataFormats/Phase2TrackerCluster/interface/Phase2TrackerCluster1D.h" +#include "DataFormats/SiPixelCluster/interface/SiPixelCluster.h" + +#include "DataFormats/TrackerRecHit2D/interface/Phase2TrackerRecHit1D.h" +#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h" +#include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h" + +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/Common/interface/DetSetVector.h" +#include "DataFormats/Common/interface/ValueMap.h" +#include "DataFormats/Common/interface/DetSetVectorNew.h" +#include "DataFormats/Provenance/interface/ProductID.h" +#include "DataFormats/Common/interface/ContainerMask.h" + +#include "DataFormats/TrackReco/interface/Track.h" +#include "DataFormats/TrackerRecHit2D/interface/ClusterRemovalInfo.h" + +#include "TrackingTools/PatternTools/interface/Trajectory.h" +#include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h" +#include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h" +#include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h" + +#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" +#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" +#include "Geometry/CommonDetUnit/interface/GeomDetUnit.h" +#include "Geometry/CommonDetUnit/interface/GeomDetType.h" + +// +// class decleration +// + +class SeedClusterRemoverPhase2 : public edm::stream::EDProducer<> { + + public: + SeedClusterRemoverPhase2(const edm::ParameterSet& iConfig) ; + ~SeedClusterRemoverPhase2() ; + void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override ; + private: +/* struct ParamBlock { + ParamBlock() : isSet_(false), usesCharge_(false) {} + ParamBlock(const edm::ParameterSet& iConfig) : + isSet_(true), + usesCharge_(iConfig.exists("maxCharge")), + usesSize_(iConfig.exists("maxSize")), + maxChi2_(iConfig.getParameter("maxChi2")), + maxCharge_(usesCharge_ ? iConfig.getParameter("maxCharge") : 0), + maxSize_(usesSize_ ? iConfig.getParameter("maxSize") : 0) { } + bool isSet_, usesCharge_, usesSize_; + float maxChi2_, maxCharge_; + size_t maxSize_; + }; + static const unsigned int NumberOfParamBlocks = 6; +*/ + bool doOuterTracker_, doPixel_; + bool mergeOld_; + typedef edm::ContainerMask > PixelMaskContainer; + typedef edm::ContainerMask > Phase2OTMaskContainer; + edm::EDGetTokenT > pixelClusters_; + edm::EDGetTokenT > phase2OTClusters_; + edm::EDGetTokenT oldRemovalInfo_; + edm::EDGetTokenT oldPxlMaskToken_; + edm::EDGetTokenT oldStrMaskToken_; + edm::EDGetTokenT trajectories_; + + //std::vector< edm::EDGetTokenT > > overrideTrkQuals_; + +// ParamBlock pblocks_[NumberOfParamBlocks]; +// void readPSet(const edm::ParameterSet& iConfig, const std::string &name, +// int id1=-1, int id2=-1, int id3=-1, int id4=-1, int id5=-1, int id6=-1) ; + + std::vector pixels, OTs; // avoid unneed alloc/dealloc of this + edm::ProductID pixelSourceProdID, outerTrackerSourceProdID; // ProdIDs refs must point to (for consistency tests) + + inline void process(const TrackingRecHit *hit, float chi2, const TrackerGeometry* tg); + + template + std::auto_ptr > + cleanup(const edmNew::DetSetVector &oldClusters, const std::vector &isGood, + reco::ClusterRemovalInfo::Indices &refs, const reco::ClusterRemovalInfo::Indices *oldRefs) ; + + // Carries in full removal info about a given det from oldRefs + void mergeOld(reco::ClusterRemovalInfo::Indices &refs, const reco::ClusterRemovalInfo::Indices &oldRefs) ; + + bool clusterWasteSolution_; + bool filterTracks_; + reco::TrackBase::TrackQuality trackQuality_; + std::vector collectedOuterTrackers_; + std::vector collectedPixels_; +}; + + +using namespace std; +using namespace edm; +using namespace reco; +/* +void +SeedClusterRemoverPhase2::readPSet(const edm::ParameterSet& iConfig, const std::string &name, + int id1, int id2, int id3, int id4, int id5, int id6) +{ + if (iConfig.exists(name)) { + ParamBlock pblock(iConfig.getParameter(name)); + if (id1 == -1) { + fill(pblocks_, pblocks_+NumberOfParamBlocks, pblock); + } else { + pblocks_[id1] = pblock; + if (id2 != -1) pblocks_[id2] = pblock; + if (id3 != -1) pblocks_[id3] = pblock; + if (id4 != -1) pblocks_[id4] = pblock; + if (id5 != -1) pblocks_[id5] = pblock; + if (id6 != -1) pblocks_[id6] = pblock; + } + } +} +*/ +SeedClusterRemoverPhase2::SeedClusterRemoverPhase2(const ParameterSet& iConfig): + doOuterTracker_(iConfig.existsAs("doOuterTracker") ? iConfig.getParameter("doOuterTracker") : true), + doPixel_(iConfig.existsAs("doPixel") ? iConfig.getParameter("doPixel") : true), + mergeOld_(iConfig.exists("oldClusterRemovalInfo")), + clusterWasteSolution_(true) +{ +// if (iConfig.exists("overrideTrkQuals")) +// overrideTrkQuals_.push_back(iConfig.getParameter("overrideTrkQuals")); + if (iConfig.exists("clusterLessSolution")) + clusterWasteSolution_=!iConfig.getParameter("clusterLessSolution"); + if (doPixel_ && clusterWasteSolution_) produces< edmNew::DetSetVector >(); + if (doOuterTracker_ && clusterWasteSolution_) produces< edmNew::DetSetVector >(); + if (clusterWasteSolution_) produces< ClusterRemovalInfo >(); + +/* + fill(pblocks_, pblocks_+NumberOfParamBlocks, ParamBlock()); + readPSet(iConfig, "Common",-1); + if (doPixel_) { + readPSet(iConfig, "Pixel" ,0,1); + readPSet(iConfig, "PXB" ,0); + readPSet(iConfig, "PXE" ,1); + } + if (doOuterTracker_) { + readPSet(iConfig, "Strip" ,2,3,4,5); + readPSet(iConfig, "StripInner" ,2,3); + readPSet(iConfig, "StripOuter" ,4,5); + readPSet(iConfig, "TIB" ,2); + readPSet(iConfig, "TID" ,3); + readPSet(iConfig, "TOB" ,4); + readPSet(iConfig, "TEC" ,5); + } + bool usingCharge = false; + for (size_t i = 0; i < NumberOfParamBlocks; ++i) { + if (!pblocks_[i].isSet_) throw cms::Exception("Configuration Error") << "SeedClusterRemoverPhase2: Missing configuration for detector with subDetID = " << (i+1); + if (pblocks_[i].usesCharge_ && !usingCharge) { + throw cms::Exception("Configuration Error") << "SeedClusterRemoverPhase2: Configuration for subDetID = " << (i+1) << " uses cluster charge, which is not enabled."; + } + } +*/ + + if (!clusterWasteSolution_){ + produces > >(); + produces > >(); + } + trackQuality_=reco::TrackBase::undefQuality; + filterTracks_=false; + if (iConfig.exists("TrackQuality")){ + filterTracks_=true; + trackQuality_=reco::TrackBase::qualityByName(iConfig.getParameter("TrackQuality")); + } + + trajectories_ = consumes(iConfig.getParameter("trajectories")); + if (doPixel_) pixelClusters_ = consumes >(iConfig.getParameter("pixelClusters")); + if (doOuterTracker_) phase2OTClusters_ = consumes >(iConfig.getParameter("phase2OTClusters")); + if (mergeOld_) { + oldRemovalInfo_ = consumes(iConfig.getParameter("oldClusterRemovalInfo")); + oldPxlMaskToken_ = consumes(iConfig.getParameter("oldClusterRemovalInfo")); + oldStrMaskToken_ = consumes(iConfig.getParameter("oldClusterRemovalInfo")); + } +} + + +SeedClusterRemoverPhase2::~SeedClusterRemoverPhase2() +{ +} + +void SeedClusterRemoverPhase2::mergeOld(ClusterRemovalInfo::Indices &refs, + const ClusterRemovalInfo::Indices &oldRefs) +{ + for (size_t i = 0, n = refs.size(); i < n; ++i) { + refs[i] = oldRefs[refs[i]]; + } +} + + +template +auto_ptr > +SeedClusterRemoverPhase2::cleanup(const edmNew::DetSetVector &oldClusters, const std::vector &isGood, + reco::ClusterRemovalInfo::Indices &refs, const reco::ClusterRemovalInfo::Indices *oldRefs){ + typedef typename edmNew::DetSetVector DSV; + typedef typename edmNew::DetSetVector::FastFiller DSF; + typedef typename edmNew::DetSet DS; + auto_ptr output(new DSV()); + output->reserve(oldClusters.size(), oldClusters.dataSize()); + + unsigned int countOld=0; + unsigned int countNew=0; + + // cluster removal loop + const T * firstOffset = & oldClusters.data().front(); + for (typename DSV::const_iterator itdet = oldClusters.begin(), enddet = oldClusters.end(); itdet != enddet; ++itdet) { + DS oldDS = *itdet; + + if (oldDS.empty()) continue; // skip empty detsets + + uint32_t id = oldDS.detId(); + DSF outds(*output, id); + + for (typename DS::const_iterator it = oldDS.begin(), ed = oldDS.end(); it != ed; ++it) { + uint32_t index = ((&*it) - firstOffset); + countOld++; + if (isGood[index]) { + outds.push_back(*it); + countNew++; + refs.push_back(index); + //std::cout << "SeedClusterRemoverPhase2::cleanup " << typeid(T).name() << " reference " << index << " to " << (refs.size() - 1) << std::endl; + } + + } + if (outds.empty()) outds.abort(); // not write in an empty DSV + } + + if (oldRefs != 0) mergeOld(refs, *oldRefs); + return output; +} + + + + +void SeedClusterRemoverPhase2::process(const TrackingRecHit *hit, float chi2, const TrackerGeometry* tg) { + + DetId detid = hit->geographicalId(); + uint32_t subdet = detid.subdetId(); + +// assert ((subdet > 0) && (subdet <= NumberOfParamBlocks)); + + // chi2 cut +// if (chi2 > pblocks_[subdet-1].maxChi2_) return; + + //FIXME :: not supposed to work like this! + if(GeomDetEnumerators::isTrackerPixel(tg->geomDetSubDetector(subdet))) { + + if (!doPixel_) return; + + // this is a pixel, and i *know* it is + const SiPixelRecHit *pixelHit = static_cast(hit); + SiPixelRecHit::ClusterRef cluster = pixelHit->cluster(); + + if (cluster.id() != pixelSourceProdID) throw cms::Exception("Inconsistent Data") << + "SeedClusterRemoverPhase2: pixel cluster ref from Product ID = " << cluster.id() << + " does not match with source cluster collection (ID = " << pixelSourceProdID << ")\n."; + + assert(cluster.id() == pixelSourceProdID); + // cout << "HIT NEW PIXEL DETID = " << detid.rawId() << ", Cluster [ " << cluster.key().first << " / " << cluster.key().second << " ] " << endl; + + // if requested, cut on cluster size +// if (pblocks_[subdet-1].usesSize_ && (cluster->pixels().size() > pblocks_[subdet-1].maxSize_)) return; + + // mark as used + pixels[cluster.key()] = false; + + //if(!clusterWasteSolution_) collectedPixel[detid.rawId()].insert(cluster); + assert(collectedPixels_.size() > cluster.key()); + //assert(detid.rawId() == cluster->geographicalId()); //This condition fails + if(!clusterWasteSolution_) collectedPixels_[cluster.key()]=true; + + } else { // aka OT + + if (!doOuterTracker_) return; + + const type_info &hitType = typeid(*hit); + if (hitType == typeid(Phase2TrackerRecHit1D)) { + const Phase2TrackerRecHit1D *ph2OThit = static_cast(hit); + cout << "Plain RecHit 2D: " << endl; + + Phase2TrackerRecHit1D::CluRef cluster = ph2OThit->cluster(); + if (cluster.id() != outerTrackerSourceProdID) throw cms::Exception("Inconsistent Data") << + "SeedClusterRemoverPhase2: strip cluster ref from Product ID = " << cluster.id() << + " does not match with source cluster collection (ID = " << outerTrackerSourceProdID << ")\n."; + + assert(cluster.id() == outerTrackerSourceProdID); +// if (pblocks_[subdet-1].usesSize_ && (cluster->amplitudes().size() > pblocks_[subdet-1].maxSize_)) return; + + OTs[cluster.key()] = false; + //if (!clusterWasteSolution_) collectedStrip[hit->geographicalId()].insert(cluster); + assert(collectedOuterTrackers_.size() > cluster.key()); + //assert(hit->geographicalId() == cluster->geographicalId()); //This condition fails + if (!clusterWasteSolution_) collectedOuterTrackers_[cluster.key()]=true; + } else throw cms::Exception("NOT IMPLEMENTED") << "Don't know how to handle " << hitType.name() << " on detid " << detid.rawId() << "\n"; + } + +} + +/* Schematic picture of n-th step Iterative removal + * (that os removing clusters after n-th step tracking) + * clusters: [ C1 ] -> [ C2 ] -> ... -> [ Cn ] -> [ Cn + 1 ] + * ^ ^ ^--- OUTPUT "new" ID + * |-- before any removal |----- Source clusters + * |-- OUTPUT "old" ID |----- Hits in Traj. point here + * | \----- Old ClusterRemovalInfo "new" ID + * \-- Old ClusterRemovalInfo "old" ID + */ + + +void +SeedClusterRemoverPhase2::produce(Event& iEvent, const EventSetup& iSetup) +{ + ProductID pixelOldProdID, stripOldProdID; + + edm::ESHandle tgh; + iSetup.get().get("",tgh); //is it correct to use "" ? + + Handle > pixelClusters; + if (doPixel_) { + iEvent.getByToken(pixelClusters_, pixelClusters); + pixelSourceProdID = pixelClusters.id(); + } +//DBG// std::cout << "SeedClusterRemoverPhase2: Read pixel " << pixelClusters_.encode() << " = ID " << pixelSourceProdID << std::endl; + + Handle > phase2OTClusters; + if (doOuterTracker_) { + iEvent.getByToken(phase2OTClusters_, phase2OTClusters); + outerTrackerSourceProdID = phase2OTClusters.id(); + } +//DBG// std::cout << "SeedClusterRemoverPhase2: Read strip " << phase2OTClusters_.encode() << " = ID " << outerTrackerSourceProdID << std::endl; + + auto_ptr cri; + if (clusterWasteSolution_){ + if (doOuterTracker_ && doPixel_) cri.reset(new ClusterRemovalInfo(pixelClusters, phase2OTClusters)); + else if (doOuterTracker_) cri.reset(new ClusterRemovalInfo(phase2OTClusters)); + else if (doPixel_) cri.reset(new ClusterRemovalInfo(pixelClusters)); + } + + Handle oldRemovalInfo; + if (mergeOld_ && clusterWasteSolution_) { + iEvent.getByToken(oldRemovalInfo_, oldRemovalInfo); + // Check ProductIDs + if ( (oldRemovalInfo->stripNewRefProd().id() == phase2OTClusters.id()) && + (oldRemovalInfo->pixelNewRefProd().id() == pixelClusters.id()) ) { + + cri->getOldClustersFrom(*oldRemovalInfo); + + pixelOldProdID = oldRemovalInfo->pixelRefProd().id(); + stripOldProdID = oldRemovalInfo->stripRefProd().id(); + + } else { + edm::EDConsumerBase::Labels labels; + labelsForToken(oldRemovalInfo_,labels); + throw cms::Exception("Inconsistent Data") << "SeedClusterRemoverPhase2: " << + "Input collection product IDs are [pixel: " << pixelClusters.id() << ", strip: " << phase2OTClusters.id() << "] \n" << + "\t but the *old* ClusterRemovalInfo " << labels.productInstance << " refers as 'new product ids' to " << + "[pixel: " << oldRemovalInfo->pixelNewRefProd().id() << ", strip: " << oldRemovalInfo->stripNewRefProd().id() << "]\n" << + "NOTA BENE: when running SeedClusterRemoverPhase2 with an old ClusterRemovalInfo the hits in the trajectory MUST be already re-keyed.\n"; + } + } else { // then Old == Source + pixelOldProdID = pixelSourceProdID; + stripOldProdID = outerTrackerSourceProdID; + } + + if (doOuterTracker_) { + OTs.resize(phase2OTClusters->dataSize()); fill(OTs.begin(), OTs.end(), true); + } + if (doPixel_) { + pixels.resize(pixelClusters->dataSize()); fill(pixels.begin(), pixels.end(), true); + } + if(mergeOld_) { + edm::Handle oldPxlMask; + edm::Handle oldStrMask; + iEvent.getByToken(oldPxlMaskToken_ ,oldPxlMask); + iEvent.getByToken(oldStrMaskToken_ ,oldStrMask); + LogDebug("SeedClusterRemoverPhase2")<<"to merge in, "<size()<<" strp and "<size()<<" pxl"; + oldStrMask->copyMaskTo(collectedOuterTrackers_); + oldPxlMask->copyMaskTo(collectedPixels_); + assert(phase2OTClusters->dataSize()>=collectedOuterTrackers_.size()); + collectedOuterTrackers_.resize(phase2OTClusters->dataSize(),false); // for ondemand + }else { + collectedOuterTrackers_.resize(phase2OTClusters->dataSize(), false); + collectedPixels_.resize(pixelClusters->dataSize(), false); + } + + + edm::Handle seeds; + iEvent.getByToken(trajectories_,seeds); + + TrajectorySeedCollection::const_iterator seed=seeds->begin(); + + for (;seed!=seeds->end();++seed){ + TrajectorySeed::range hits=seed->recHits(); + TrajectorySeed::const_iterator hit=hits.first; + for (;hit!=hits.second;++hit){ + if (!hit->isValid()) continue; + process( &(*hit), 0. , tgh.product()); + } + } + + + if (doPixel_ && clusterWasteSolution_) { + auto_ptr > newPixelClusters = cleanup(*pixelClusters, pixels, + cri->pixelIndices(), mergeOld_ ? &oldRemovalInfo->pixelIndices() : 0); + OrphanHandle > newPixels = iEvent.put(newPixelClusters); +//DBG// std::cout << "SeedClusterRemoverPhase2: Wrote pixel " << newPixels.id() << " from " << pixelSourceProdID << std::endl; + cri->setNewPixelClusters(newPixels); + } + if (doOuterTracker_ && clusterWasteSolution_) { + auto_ptr > newOuterTrackerClusters = cleanup(*phase2OTClusters, OTs, + cri->stripIndices(), mergeOld_ ? &oldRemovalInfo->stripIndices() : 0); + OrphanHandle > newOuterTrackers = iEvent.put(newOuterTrackerClusters); +//DBG// std::cout << "SeedClusterRemoverPhase2: Wrote strip " << newOuterTrackers.id() << " from " << outerTrackerSourceProdID << std::endl; + cri->setNewPhase2OTClusters(newOuterTrackers); + } + + + if (clusterWasteSolution_) { + // double fraction_pxl= cri->pixelIndices().size() / (double) pixels.size(); + // double fraction_strp= cri->stripIndices().size() / (double) OTs.size(); + // edm::LogWarning("SeedClusterRemoverPhase2")<<" fraction: " << fraction_pxl <<" "< > removedPixelClsuterRefs(new edmNew::DetSetVector()); + //auto_ptr > removedStripClsuterRefs(new edmNew::DetSetVector()); + + std::auto_ptr removedOuterTrackerClusterMask( + new Phase2OTMaskContainer(edm::RefProd >(phase2OTClusters),collectedOuterTrackers_)); + LogDebug("SeedClusterRemoverPhase2")<<"total strip to skip: "< removedPixelClusterMask( + new PixelMaskContainer(edm::RefProd >(pixelClusters),collectedPixels_)); + LogDebug("SeedClusterRemoverPhase2")<<"total pxl to skip: "< Date: Sat, 11 Jun 2016 10:44:51 +0200 Subject: [PATCH 02/23] adding SeedClusterRemoverPhase2 to the sequence --- .../python/SeedClusterRemoverPhase2_cfi.py | 4 +- .../src/SeedClusterRemoverPhase2.cc | 3 +- .../python/RecoTrackerPhase2Tracker_cff.py | 2 +- .../python/Phase2PU140_ElectronSeeds_cff.py | 82 +++++++++++++++++++ .../Configuration/python/phase2TkFlat.py | 2 +- 5 files changed, 87 insertions(+), 6 deletions(-) create mode 100644 RecoTracker/IterativeTracking/python/Phase2PU140_ElectronSeeds_cff.py diff --git a/RecoLocalTracker/SubCollectionProducers/python/SeedClusterRemoverPhase2_cfi.py b/RecoLocalTracker/SubCollectionProducers/python/SeedClusterRemoverPhase2_cfi.py index eddc72a2ec9ad..fe389ce16b821 100644 --- a/RecoLocalTracker/SubCollectionProducers/python/SeedClusterRemoverPhase2_cfi.py +++ b/RecoLocalTracker/SubCollectionProducers/python/SeedClusterRemoverPhase2_cfi.py @@ -1,11 +1,9 @@ import FWCore.ParameterSet.Config as cms -seedClusterRemover = cms.EDProducer("SeedClusterRemoverPhase2", +seedClusterRemoverPhase2 = cms.EDProducer("SeedClusterRemoverPhase2", trajectories = cms.InputTag("initialStepSeeds"), phase2OTClusters = cms.InputTag("siPhase2Clusters"), - overrideTrkQuals = cms.InputTag(""), #dummy pixelClusters = cms.InputTag("siPixelClusters"), - Common = cms.PSet( maxChi2 = cms.double(9.0) ), #dummy TrackQuality = cms.string('highPurity'), #dummy clusterLessSolution = cms.bool(True) ) diff --git a/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc b/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc index aceb3823bfb22..4c20b9d42aa4e 100644 --- a/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc +++ b/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc @@ -256,13 +256,14 @@ void SeedClusterRemoverPhase2::process(const TrackingRecHit *hit, float chi2, co // this is a pixel, and i *know* it is const SiPixelRecHit *pixelHit = static_cast(hit); SiPixelRecHit::ClusterRef cluster = pixelHit->cluster(); + cout << "Plain Pixel RecHit " << endl; if (cluster.id() != pixelSourceProdID) throw cms::Exception("Inconsistent Data") << "SeedClusterRemoverPhase2: pixel cluster ref from Product ID = " << cluster.id() << " does not match with source cluster collection (ID = " << pixelSourceProdID << ")\n."; assert(cluster.id() == pixelSourceProdID); - // cout << "HIT NEW PIXEL DETID = " << detid.rawId() << ", Cluster [ " << cluster.key().first << " / " << cluster.key().second << " ] " << endl; + //cout << "HIT NEW PIXEL DETID = " << detid.rawId() << ", Cluster [ " << cluster.key().first << " / " << cluster.key().second << " ] " << endl; // if requested, cut on cluster size // if (pblocks_[subdet-1].usesSize_ && (cluster->pixels().size() > pblocks_[subdet-1].maxSize_)) return; diff --git a/RecoTracker/Configuration/python/RecoTrackerPhase2Tracker_cff.py b/RecoTracker/Configuration/python/RecoTrackerPhase2Tracker_cff.py index d35c9f00dc69d..adab8f5b57735 100644 --- a/RecoTracker/Configuration/python/RecoTrackerPhase2Tracker_cff.py +++ b/RecoTracker/Configuration/python/RecoTrackerPhase2Tracker_cff.py @@ -3,7 +3,7 @@ # Iterative steps #from RecoTracker.IterativeTracking.iterativeTk_cff import * from RecoTracker.IterativeTracking.Phase2PU140_iterativeTk_cff import * -from RecoTracker.IterativeTracking.Phase1PU140_ElectronSeeds_cff import * +from RecoTracker.IterativeTracking.Phase2PU140_ElectronSeeds_cff import * import copy diff --git a/RecoTracker/IterativeTracking/python/Phase2PU140_ElectronSeeds_cff.py b/RecoTracker/IterativeTracking/python/Phase2PU140_ElectronSeeds_cff.py new file mode 100644 index 0000000000000..c1d220c518020 --- /dev/null +++ b/RecoTracker/IterativeTracking/python/Phase2PU140_ElectronSeeds_cff.py @@ -0,0 +1,82 @@ +import FWCore.ParameterSet.Config as cms + +from RecoLocalTracker.SubCollectionProducers.SeedClusterRemoverPhase2_cfi import seedClusterRemoverPhase2 +initialStepSeedClusterMask = seedClusterRemoverPhase2.clone( + trajectories = cms.InputTag("initialStepSeeds"), + oldClusterRemovalInfo = cms.InputTag("highPtTripletStepClusters") +) +highPtTripletStepSeedClusterMask = seedClusterRemoverPhase2.clone( + trajectories = cms.InputTag("highPtTripletStepSeeds"), + oldClusterRemovalInfo = cms.InputTag("initialStepSeedClusterMask") +) +pixelPairStepSeedClusterMask = seedClusterRemoverPhase2.clone( + trajectories = cms.InputTag("pixelPairStepSeeds"), + oldClusterRemovalInfo = cms.InputTag("highPtTripletStepSeedClusterMask") +) + +tripletElectronSeedLayers = cms.EDProducer("SeedingLayersEDProducer", + layerList = cms.vstring('BPix1+BPix2+BPix3', 'BPix2+BPix3+BPix4', + 'BPix1+BPix3+BPix4', 'BPix1+BPix2+BPix4', + 'BPix2+BPix3+FPix1_pos', 'BPix2+BPix3+FPix1_neg', + 'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg', + 'BPix1+BPix3+FPix1_pos', 'BPix1+BPix3+FPix1_neg', + 'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg', + 'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg', + 'BPix1+BPix2+FPix2_pos', 'BPix1+BPix2+FPix2_neg', + 'FPix1_pos+FPix2_pos+FPix3_pos', 'FPix1_neg+FPix2_neg+FPix3_neg', + 'BPix1+FPix2_pos+FPix3_pos', 'BPix1+FPix2_neg+FPix3_neg', + 'BPix1+FPix1_pos+FPix3_pos', 'BPix1+FPix1_neg+FPix3_neg'), + BPix = cms.PSet( + TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelTriplets'), + HitProducer = cms.string('siPixelRecHits'), + skipClusters = cms.InputTag('pixelPairStepSeedClusterMask') + ), + FPix = cms.PSet( + TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelTriplets'), + HitProducer = cms.string('siPixelRecHits'), + skipClusters = cms.InputTag('pixelPairStepSeedClusterMask') + ) +) + +import RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff +from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock +tripletElectronSeeds = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone( + RegionFactoryPSet = RegionPsetFomBeamSpotBlock.clone( + ComponentName = cms.string('GlobalRegionProducerFromBeamSpot'), + RegionPSet = RegionPsetFomBeamSpotBlock.RegionPSet.clone( + ptMin = 1.0, + originRadius = 0.02, + nSigmaZ = 4.0 + ) + ) +) +tripletElectronSeeds.OrderedHitsFactoryPSet.SeedingLayers = cms.InputTag('tripletElectronSeedLayers') +tripletElectronSeeds.ClusterCheckPSet.doClusterCheck = cms.bool(False) +tripletElectronSeeds.OrderedHitsFactoryPSet.maxElement = cms.uint32(0) +tripletElectronSeeds.SeedCreatorPSet.magneticField = '' +tripletElectronSeeds.SeedCreatorPSet.propagator = 'PropagatorWithMaterial' + +from RecoLocalTracker.SubCollectionProducers.SeedClusterRemoverPhase2_cfi import seedClusterRemoverPhase2 +tripletElectronClusterMask = seedClusterRemoverPhase2.clone( + trajectories = cms.InputTag("tripletElectronSeeds"), + oldClusterRemovalInfo = cms.InputTag("pixelLessStepSeedClusterMask") +) + + +###This seed collection is produced for electron reconstruction +import RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi +newCombinedSeeds = RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi.globalCombinedSeeds.clone( + seedCollections = cms.VInputTag( + cms.InputTag('initialStepSeeds'), + cms.InputTag('highPtTripletStepSeeds'), + cms.InputTag('pixelPairStepSeeds'), + cms.InputTag('tripletElectronSeeds') + ) +) + +electronSeedsSeq = cms.Sequence(initialStepSeedClusterMask* + highPtTripletStepSeedClusterMask* + pixelPairStepSeedClusterMask* + tripletElectronSeedLayers* + tripletElectronSeeds* + newCombinedSeeds) diff --git a/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py b/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py index 2d08d064ba4e1..b3f61fbdf4725 100644 --- a/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py +++ b/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py @@ -326,7 +326,7 @@ def customise_Reco(process,pileup): process.MeasurementTrackerEvent.Phase2TrackerCluster1DProducer = cms.string('siPhase2Clusters') process.MeasurementTrackerEvent.stripClusterProducer = cms.string('') # FIXME::process.electronSeedsSeq broken - process.ckftracks.remove(process.electronSeedsSeq) +# process.ckftracks.remove(process.electronSeedsSeq) return process From 463cdf282fc767b75bb145a97c784b697b1887c4 Mon Sep 17 00:00:00 2001 From: erica brondolin Date: Sat, 11 Jun 2016 11:02:49 +0200 Subject: [PATCH 03/23] fix OT/pixel --- .../src/SeedClusterRemoverPhase2.cc | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc b/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc index 4c20b9d42aa4e..bfccb7fea8e4c 100644 --- a/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc +++ b/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc @@ -243,17 +243,20 @@ void SeedClusterRemoverPhase2::process(const TrackingRecHit *hit, float chi2, co DetId detid = hit->geographicalId(); uint32_t subdet = detid.subdetId(); + assert(subdet > 0); // assert ((subdet > 0) && (subdet <= NumberOfParamBlocks)); // chi2 cut // if (chi2 > pblocks_[subdet-1].maxChi2_) return; //FIXME :: not supposed to work like this! - if(GeomDetEnumerators::isTrackerPixel(tg->geomDetSubDetector(subdet))) { +// if(GeomDetEnumerators::isTrackerPixel(tg->geomDetSubDetector(subdet))) { - if (!doPixel_) return; + const type_info &hitType = typeid(*hit); + if (hitType == typeid(SiPixelRecHit)) { + + if(!doPixel_) return; - // this is a pixel, and i *know* it is const SiPixelRecHit *pixelHit = static_cast(hit); SiPixelRecHit::ClusterRef cluster = pixelHit->cluster(); cout << "Plain Pixel RecHit " << endl; @@ -276,30 +279,29 @@ void SeedClusterRemoverPhase2::process(const TrackingRecHit *hit, float chi2, co //assert(detid.rawId() == cluster->geographicalId()); //This condition fails if(!clusterWasteSolution_) collectedPixels_[cluster.key()]=true; - } else { // aka OT + } else if (hitType == typeid(Phase2TrackerRecHit1D)) { - if (!doOuterTracker_) return; + if(!doOuterTracker_) return; - const type_info &hitType = typeid(*hit); - if (hitType == typeid(Phase2TrackerRecHit1D)) { - const Phase2TrackerRecHit1D *ph2OThit = static_cast(hit); - cout << "Plain RecHit 2D: " << endl; + const Phase2TrackerRecHit1D *ph2OThit = static_cast(hit); + cout << "Plain RecHit 2D: " << endl; - Phase2TrackerRecHit1D::CluRef cluster = ph2OThit->cluster(); - if (cluster.id() != outerTrackerSourceProdID) throw cms::Exception("Inconsistent Data") << - "SeedClusterRemoverPhase2: strip cluster ref from Product ID = " << cluster.id() << - " does not match with source cluster collection (ID = " << outerTrackerSourceProdID << ")\n."; + Phase2TrackerRecHit1D::CluRef cluster = ph2OThit->cluster(); + if (cluster.id() != outerTrackerSourceProdID) throw cms::Exception("Inconsistent Data") << + "SeedClusterRemoverPhase2: strip cluster ref from Product ID = " << cluster.id() << + " does not match with source cluster collection (ID = " << outerTrackerSourceProdID << ")\n."; - assert(cluster.id() == outerTrackerSourceProdID); -// if (pblocks_[subdet-1].usesSize_ && (cluster->amplitudes().size() > pblocks_[subdet-1].maxSize_)) return; - - OTs[cluster.key()] = false; - //if (!clusterWasteSolution_) collectedStrip[hit->geographicalId()].insert(cluster); - assert(collectedOuterTrackers_.size() > cluster.key()); - //assert(hit->geographicalId() == cluster->geographicalId()); //This condition fails - if (!clusterWasteSolution_) collectedOuterTrackers_[cluster.key()]=true; - } else throw cms::Exception("NOT IMPLEMENTED") << "Don't know how to handle " << hitType.name() << " on detid " << detid.rawId() << "\n"; - } + assert(cluster.id() == outerTrackerSourceProdID); +// if (pblocks_[subdet-1].usesSize_ && (cluster->amplitudes().size() > pblocks_[subdet-1].maxSize_)) return; + + OTs[cluster.key()] = false; + //if (!clusterWasteSolution_) collectedStrip[hit->geographicalId()].insert(cluster); + assert(collectedOuterTrackers_.size() > cluster.key()); + //assert(hit->geographicalId() == cluster->geographicalId()); //This condition fails + if (!clusterWasteSolution_) collectedOuterTrackers_[cluster.key()]=true; + + } else throw cms::Exception("NOT IMPLEMENTED") << "I received a hit that was neither SiPixelRecHit nor Phase2TrackerRecHit1D but " << hitType.name() << " on detid " << detid.rawId() << "\n"; + } From 78e80239011ca5ff6943cf24a8a0c21c262d2e88 Mon Sep 17 00:00:00 2001 From: erica brondolin Date: Sat, 11 Jun 2016 11:49:30 +0200 Subject: [PATCH 04/23] cleaning and debug --- .../src/SeedClusterRemoverPhase2.cc | 128 ++---------------- .../Configuration/python/phase2TkFlat.py | 2 - .../Configuration/python/phase2TkTilted.py | 2 - 3 files changed, 14 insertions(+), 118 deletions(-) diff --git a/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc b/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc index bfccb7fea8e4c..7dab99ed9d603 100644 --- a/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc +++ b/RecoLocalTracker/SubCollectionProducers/src/SeedClusterRemoverPhase2.cc @@ -43,21 +43,6 @@ class SeedClusterRemoverPhase2 : public edm::stream::EDProducer<> { ~SeedClusterRemoverPhase2() ; void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override ; private: -/* struct ParamBlock { - ParamBlock() : isSet_(false), usesCharge_(false) {} - ParamBlock(const edm::ParameterSet& iConfig) : - isSet_(true), - usesCharge_(iConfig.exists("maxCharge")), - usesSize_(iConfig.exists("maxSize")), - maxChi2_(iConfig.getParameter("maxChi2")), - maxCharge_(usesCharge_ ? iConfig.getParameter("maxCharge") : 0), - maxSize_(usesSize_ ? iConfig.getParameter("maxSize") : 0) { } - bool isSet_, usesCharge_, usesSize_; - float maxChi2_, maxCharge_; - size_t maxSize_; - }; - static const unsigned int NumberOfParamBlocks = 6; -*/ bool doOuterTracker_, doPixel_; bool mergeOld_; typedef edm::ContainerMask > PixelMaskContainer; @@ -66,15 +51,9 @@ class SeedClusterRemoverPhase2 : public edm::stream::EDProducer<> { edm::EDGetTokenT > phase2OTClusters_; edm::EDGetTokenT oldRemovalInfo_; edm::EDGetTokenT oldPxlMaskToken_; - edm::EDGetTokenT oldStrMaskToken_; + edm::EDGetTokenT oldPh2OTMaskToken_; edm::EDGetTokenT trajectories_; - //std::vector< edm::EDGetTokenT > > overrideTrkQuals_; - -// ParamBlock pblocks_[NumberOfParamBlocks]; -// void readPSet(const edm::ParameterSet& iConfig, const std::string &name, -// int id1=-1, int id2=-1, int id3=-1, int id4=-1, int id5=-1, int id6=-1) ; - std::vector pixels, OTs; // avoid unneed alloc/dealloc of this edm::ProductID pixelSourceProdID, outerTrackerSourceProdID; // ProdIDs refs must point to (for consistency tests) @@ -99,66 +78,19 @@ class SeedClusterRemoverPhase2 : public edm::stream::EDProducer<> { using namespace std; using namespace edm; using namespace reco; -/* -void -SeedClusterRemoverPhase2::readPSet(const edm::ParameterSet& iConfig, const std::string &name, - int id1, int id2, int id3, int id4, int id5, int id6) -{ - if (iConfig.exists(name)) { - ParamBlock pblock(iConfig.getParameter(name)); - if (id1 == -1) { - fill(pblocks_, pblocks_+NumberOfParamBlocks, pblock); - } else { - pblocks_[id1] = pblock; - if (id2 != -1) pblocks_[id2] = pblock; - if (id3 != -1) pblocks_[id3] = pblock; - if (id4 != -1) pblocks_[id4] = pblock; - if (id5 != -1) pblocks_[id5] = pblock; - if (id6 != -1) pblocks_[id6] = pblock; - } - } -} -*/ + SeedClusterRemoverPhase2::SeedClusterRemoverPhase2(const ParameterSet& iConfig): doOuterTracker_(iConfig.existsAs("doOuterTracker") ? iConfig.getParameter("doOuterTracker") : true), doPixel_(iConfig.existsAs("doPixel") ? iConfig.getParameter("doPixel") : true), mergeOld_(iConfig.exists("oldClusterRemovalInfo")), clusterWasteSolution_(true) { -// if (iConfig.exists("overrideTrkQuals")) -// overrideTrkQuals_.push_back(iConfig.getParameter("overrideTrkQuals")); if (iConfig.exists("clusterLessSolution")) clusterWasteSolution_=!iConfig.getParameter("clusterLessSolution"); if (doPixel_ && clusterWasteSolution_) produces< edmNew::DetSetVector >(); if (doOuterTracker_ && clusterWasteSolution_) produces< edmNew::DetSetVector >(); if (clusterWasteSolution_) produces< ClusterRemovalInfo >(); -/* - fill(pblocks_, pblocks_+NumberOfParamBlocks, ParamBlock()); - readPSet(iConfig, "Common",-1); - if (doPixel_) { - readPSet(iConfig, "Pixel" ,0,1); - readPSet(iConfig, "PXB" ,0); - readPSet(iConfig, "PXE" ,1); - } - if (doOuterTracker_) { - readPSet(iConfig, "Strip" ,2,3,4,5); - readPSet(iConfig, "StripInner" ,2,3); - readPSet(iConfig, "StripOuter" ,4,5); - readPSet(iConfig, "TIB" ,2); - readPSet(iConfig, "TID" ,3); - readPSet(iConfig, "TOB" ,4); - readPSet(iConfig, "TEC" ,5); - } - bool usingCharge = false; - for (size_t i = 0; i < NumberOfParamBlocks; ++i) { - if (!pblocks_[i].isSet_) throw cms::Exception("Configuration Error") << "SeedClusterRemoverPhase2: Missing configuration for detector with subDetID = " << (i+1); - if (pblocks_[i].usesCharge_ && !usingCharge) { - throw cms::Exception("Configuration Error") << "SeedClusterRemoverPhase2: Configuration for subDetID = " << (i+1) << " uses cluster charge, which is not enabled."; - } - } -*/ - if (!clusterWasteSolution_){ produces > >(); produces > >(); @@ -176,7 +108,7 @@ SeedClusterRemoverPhase2::SeedClusterRemoverPhase2(const ParameterSet& iConfig): if (mergeOld_) { oldRemovalInfo_ = consumes(iConfig.getParameter("oldClusterRemovalInfo")); oldPxlMaskToken_ = consumes(iConfig.getParameter("oldClusterRemovalInfo")); - oldStrMaskToken_ = consumes(iConfig.getParameter("oldClusterRemovalInfo")); + oldPh2OTMaskToken_ = consumes(iConfig.getParameter("oldClusterRemovalInfo")); } } @@ -224,7 +156,7 @@ SeedClusterRemoverPhase2::cleanup(const edmNew::DetSetVector &oldClusters, co outds.push_back(*it); countNew++; refs.push_back(index); - //std::cout << "SeedClusterRemoverPhase2::cleanup " << typeid(T).name() << " reference " << index << " to " << (refs.size() - 1) << std::endl; + LogDebug("SeedClusterRemoverPhase2") << "SeedClusterRemoverPhase2::cleanup " << typeid(T).name() << " reference " << index << " to " << (refs.size() - 1); } } @@ -244,13 +176,6 @@ void SeedClusterRemoverPhase2::process(const TrackingRecHit *hit, float chi2, co uint32_t subdet = detid.subdetId(); assert(subdet > 0); -// assert ((subdet > 0) && (subdet <= NumberOfParamBlocks)); - - // chi2 cut -// if (chi2 > pblocks_[subdet-1].maxChi2_) return; - - //FIXME :: not supposed to work like this! -// if(GeomDetEnumerators::isTrackerPixel(tg->geomDetSubDetector(subdet))) { const type_info &hitType = typeid(*hit); if (hitType == typeid(SiPixelRecHit)) { @@ -259,24 +184,18 @@ void SeedClusterRemoverPhase2::process(const TrackingRecHit *hit, float chi2, co const SiPixelRecHit *pixelHit = static_cast(hit); SiPixelRecHit::ClusterRef cluster = pixelHit->cluster(); - cout << "Plain Pixel RecHit " << endl; + LogDebug("SeedClusterRemoverPhase2") << "Plain Pixel RecHit in det " << detid.rawId(); if (cluster.id() != pixelSourceProdID) throw cms::Exception("Inconsistent Data") << "SeedClusterRemoverPhase2: pixel cluster ref from Product ID = " << cluster.id() << " does not match with source cluster collection (ID = " << pixelSourceProdID << ")\n."; assert(cluster.id() == pixelSourceProdID); - //cout << "HIT NEW PIXEL DETID = " << detid.rawId() << ", Cluster [ " << cluster.key().first << " / " << cluster.key().second << " ] " << endl; - - // if requested, cut on cluster size -// if (pblocks_[subdet-1].usesSize_ && (cluster->pixels().size() > pblocks_[subdet-1].maxSize_)) return; // mark as used pixels[cluster.key()] = false; - //if(!clusterWasteSolution_) collectedPixel[detid.rawId()].insert(cluster); assert(collectedPixels_.size() > cluster.key()); - //assert(detid.rawId() == cluster->geographicalId()); //This condition fails if(!clusterWasteSolution_) collectedPixels_[cluster.key()]=true; } else if (hitType == typeid(Phase2TrackerRecHit1D)) { @@ -284,7 +203,7 @@ void SeedClusterRemoverPhase2::process(const TrackingRecHit *hit, float chi2, co if(!doOuterTracker_) return; const Phase2TrackerRecHit1D *ph2OThit = static_cast(hit); - cout << "Plain RecHit 2D: " << endl; + LogDebug("SeedClusterRemoverPhase2") << "Plain Phase2TrackerRecHit1D in det " << detid.rawId(); Phase2TrackerRecHit1D::CluRef cluster = ph2OThit->cluster(); if (cluster.id() != outerTrackerSourceProdID) throw cms::Exception("Inconsistent Data") << @@ -292,12 +211,9 @@ void SeedClusterRemoverPhase2::process(const TrackingRecHit *hit, float chi2, co " does not match with source cluster collection (ID = " << outerTrackerSourceProdID << ")\n."; assert(cluster.id() == outerTrackerSourceProdID); -// if (pblocks_[subdet-1].usesSize_ && (cluster->amplitudes().size() > pblocks_[subdet-1].maxSize_)) return; OTs[cluster.key()] = false; - //if (!clusterWasteSolution_) collectedStrip[hit->geographicalId()].insert(cluster); assert(collectedOuterTrackers_.size() > cluster.key()); - //assert(hit->geographicalId() == cluster->geographicalId()); //This condition fails if (!clusterWasteSolution_) collectedOuterTrackers_[cluster.key()]=true; } else throw cms::Exception("NOT IMPLEMENTED") << "I received a hit that was neither SiPixelRecHit nor Phase2TrackerRecHit1D but " << hitType.name() << " on detid " << detid.rawId() << "\n"; @@ -305,17 +221,6 @@ void SeedClusterRemoverPhase2::process(const TrackingRecHit *hit, float chi2, co } -/* Schematic picture of n-th step Iterative removal - * (that os removing clusters after n-th step tracking) - * clusters: [ C1 ] -> [ C2 ] -> ... -> [ Cn ] -> [ Cn + 1 ] - * ^ ^ ^--- OUTPUT "new" ID - * |-- before any removal |----- Source clusters - * |-- OUTPUT "old" ID |----- Hits in Traj. point here - * | \----- Old ClusterRemovalInfo "new" ID - * \-- Old ClusterRemovalInfo "old" ID - */ - - void SeedClusterRemoverPhase2::produce(Event& iEvent, const EventSetup& iSetup) { @@ -329,14 +234,14 @@ SeedClusterRemoverPhase2::produce(Event& iEvent, const EventSetup& iSetup) iEvent.getByToken(pixelClusters_, pixelClusters); pixelSourceProdID = pixelClusters.id(); } -//DBG// std::cout << "SeedClusterRemoverPhase2: Read pixel " << pixelClusters_.encode() << " = ID " << pixelSourceProdID << std::endl; + LogDebug("SeedClusterRemoverPhase2") << "Read pixel with id " << pixelSourceProdID << std::endl; Handle > phase2OTClusters; if (doOuterTracker_) { iEvent.getByToken(phase2OTClusters_, phase2OTClusters); outerTrackerSourceProdID = phase2OTClusters.id(); } -//DBG// std::cout << "SeedClusterRemoverPhase2: Read strip " << phase2OTClusters_.encode() << " = ID " << outerTrackerSourceProdID << std::endl; + LogDebug("SeedClusterRemoverPhase2") << "Read OT cluster with id " << outerTrackerSourceProdID << std::endl; auto_ptr cri; if (clusterWasteSolution_){ @@ -379,11 +284,11 @@ SeedClusterRemoverPhase2::produce(Event& iEvent, const EventSetup& iSetup) } if(mergeOld_) { edm::Handle oldPxlMask; - edm::Handle oldStrMask; + edm::Handle oldPh2OTMask; iEvent.getByToken(oldPxlMaskToken_ ,oldPxlMask); - iEvent.getByToken(oldStrMaskToken_ ,oldStrMask); - LogDebug("SeedClusterRemoverPhase2")<<"to merge in, "<size()<<" strp and "<size()<<" pxl"; - oldStrMask->copyMaskTo(collectedOuterTrackers_); + iEvent.getByToken(oldPh2OTMaskToken_ ,oldPh2OTMask); + LogDebug("SeedClusterRemoverPhase2") << "to merge in, "<size()<<" strp and "<size()<<" pxl"; + oldPh2OTMask->copyMaskTo(collectedOuterTrackers_); oldPxlMask->copyMaskTo(collectedPixels_); assert(phase2OTClusters->dataSize()>=collectedOuterTrackers_.size()); collectedOuterTrackers_.resize(phase2OTClusters->dataSize(),false); // for ondemand @@ -412,30 +317,25 @@ SeedClusterRemoverPhase2::produce(Event& iEvent, const EventSetup& iSetup) auto_ptr > newPixelClusters = cleanup(*pixelClusters, pixels, cri->pixelIndices(), mergeOld_ ? &oldRemovalInfo->pixelIndices() : 0); OrphanHandle > newPixels = iEvent.put(newPixelClusters); -//DBG// std::cout << "SeedClusterRemoverPhase2: Wrote pixel " << newPixels.id() << " from " << pixelSourceProdID << std::endl; + LogDebug("SeedClusterRemoverPhase2") << "SeedClusterRemoverPhase2: Wrote pixel " << newPixels.id() << " from " << pixelSourceProdID ; cri->setNewPixelClusters(newPixels); } if (doOuterTracker_ && clusterWasteSolution_) { auto_ptr > newOuterTrackerClusters = cleanup(*phase2OTClusters, OTs, cri->stripIndices(), mergeOld_ ? &oldRemovalInfo->stripIndices() : 0); OrphanHandle > newOuterTrackers = iEvent.put(newOuterTrackerClusters); -//DBG// std::cout << "SeedClusterRemoverPhase2: Wrote strip " << newOuterTrackers.id() << " from " << outerTrackerSourceProdID << std::endl; + LogDebug("SeedClusterRemoverPhase2") << "SeedClusterRemoverPhase2: Wrote strip " << newOuterTrackers.id() << " from " << outerTrackerSourceProdID; cri->setNewPhase2OTClusters(newOuterTrackers); } if (clusterWasteSolution_) { - // double fraction_pxl= cri->pixelIndices().size() / (double) pixels.size(); - // double fraction_strp= cri->stripIndices().size() / (double) OTs.size(); - // edm::LogWarning("SeedClusterRemoverPhase2")<<" fraction: " << fraction_pxl <<" "< > removedPixelClsuterRefs(new edmNew::DetSetVector()); - //auto_ptr > removedStripClsuterRefs(new edmNew::DetSetVector()); std::auto_ptr removedOuterTrackerClusterMask( new Phase2OTMaskContainer(edm::RefProd >(phase2OTClusters),collectedOuterTrackers_)); diff --git a/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py b/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py index b3f61fbdf4725..292270856b0c3 100644 --- a/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py +++ b/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py @@ -325,8 +325,6 @@ def customise_Reco(process,pileup): process.MeasurementTrackerEvent.Phase2TrackerCluster1DProducer = cms.string('siPhase2Clusters') process.MeasurementTrackerEvent.stripClusterProducer = cms.string('') - # FIXME::process.electronSeedsSeq broken -# process.ckftracks.remove(process.electronSeedsSeq) return process diff --git a/SLHCUpgradeSimulations/Configuration/python/phase2TkTilted.py b/SLHCUpgradeSimulations/Configuration/python/phase2TkTilted.py index c125442923a25..3b8f156baedcc 100644 --- a/SLHCUpgradeSimulations/Configuration/python/phase2TkTilted.py +++ b/SLHCUpgradeSimulations/Configuration/python/phase2TkTilted.py @@ -325,8 +325,6 @@ def customise_Reco(process,pileup): process.MeasurementTrackerEvent.Phase2TrackerCluster1DProducer = cms.string('siPhase2Clusters') process.MeasurementTrackerEvent.stripClusterProducer = cms.string('') - # FIXME::process.electronSeedsSeq broken - process.ckftracks.remove(process.electronSeedsSeq) return process From 968695207c251441635565f1b3b4b59475e4ec52 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Tue, 7 Jun 2016 18:00:28 -0500 Subject: [PATCH 05/23] 2023 GReco geometry, workflow, Era w/ Run2 calorimeters --- .../GeometryExtended2023GRecoReco_cff.py | 50 ++++++ .../python/GeometryExtended2023GReco_cff.py | 10 ++ .../GeometryExtended2023tiltedReco_cff.py | 8 +- .../python/GeometryExtended2023tilted_cff.py | 2 - .../python/upgradeWorkflowComponents.py | 16 +- .../StandardSequences/python/Eras.py | 13 +- .../StandardSequences/python/GeometryConf.py | 2 +- .../cmsExtendedGeometry2023GRecoXML_cfi.py | 160 ++++++++++++++++++ .../cmsExtendedGeometry2023tiltedXML_cfi.py | 32 ++-- 9 files changed, 251 insertions(+), 42 deletions(-) create mode 100644 Configuration/Geometry/python/GeometryExtended2023GRecoReco_cff.py create mode 100644 Configuration/Geometry/python/GeometryExtended2023GReco_cff.py create mode 100644 Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py diff --git a/Configuration/Geometry/python/GeometryExtended2023GRecoReco_cff.py b/Configuration/Geometry/python/GeometryExtended2023GRecoReco_cff.py new file mode 100644 index 0000000000000..15b2924ec7408 --- /dev/null +++ b/Configuration/Geometry/python/GeometryExtended2023GRecoReco_cff.py @@ -0,0 +1,50 @@ +import FWCore.ParameterSet.Config as cms + +# Ideal geometry, needed for transient ECAL alignement +from Configuration.Geometry.GeometryExtended2023GReco_cff import * +# Reconstruction geometry services +# Tracking Geometry +from Geometry.CommonDetUnit.globalTrackingGeometry_cfi import * + +#Tracker +from RecoTracker.GeometryESProducer.TrackerRecoGeometryESProducer_cfi import * +from Geometry.TrackerGeometryBuilder.trackerParameters_cfi import * +from Geometry.TrackerNumberingBuilder.trackerTopology_cfi import * + +#Muon +from Geometry.MuonNumbering.muonNumberingInitialization_cfi import * +from RecoMuon.DetLayers.muonDetLayerGeometry_cfi import * +from Geometry.GEMGeometryBuilder.gemGeometry_cfi import * +from Geometry.GEMGeometryBuilder.me0Geometry_cfi import * + +# Alignment +from Geometry.TrackerGeometryBuilder.idealForDigiTrackerGeometry_cff import * +from Geometry.CSCGeometryBuilder.idealForDigiCscGeometry_cff import * +from Geometry.DTGeometryBuilder.idealForDigiDtGeometry_cff import * +trackerGeometry.applyAlignment = cms.bool(False) + +# Calorimeters +from Geometry.CaloEventSetup.CaloTopology_cfi import * +from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import * + +CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder", + SelectedCalos = cms.vstring('HCAL' , + 'ZDC' , + 'CASTOR' , + 'EcalBarrel' , + 'EcalEndcap' , + 'TOWER' ) +) + +from Geometry.EcalAlgo.EcalBarrelGeometry_cfi import * +from Geometry.EcalAlgo.EcalEndcapGeometry_cfi import * +from Geometry.HcalEventSetup.HcalGeometry_cfi import * +from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import * +from Geometry.HcalEventSetup.CaloTowerTopology_cfi import * +from Geometry.HcalCommonData.hcalDDDRecConstants_cfi import * +from Geometry.HcalEventSetup.hcalTopologyIdeal_cfi import * +from Geometry.ForwardGeometry.ForwardGeometry_cfi import * + +from Geometry.CaloEventSetup.EcalTrigTowerConstituents_cfi import * +from Geometry.EcalMapping.EcalMapping_cfi import * +from Geometry.EcalMapping.EcalMappingRecord_cfi import * diff --git a/Configuration/Geometry/python/GeometryExtended2023GReco_cff.py b/Configuration/Geometry/python/GeometryExtended2023GReco_cff.py new file mode 100644 index 0000000000000..59a3394959fba --- /dev/null +++ b/Configuration/Geometry/python/GeometryExtended2023GReco_cff.py @@ -0,0 +1,10 @@ +import FWCore.ParameterSet.Config as cms + +# +# Geometry master configuration +# +# Ideal geometry, needed for simulation +from Geometry.CMSCommonData.cmsExtendedGeometry2023GRecoXML_cfi import * +from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import * +from Geometry.HcalCommonData.hcalParameters_cfi import * +from Geometry.HcalCommonData.hcalDDDSimConstants_cfi import * diff --git a/Configuration/Geometry/python/GeometryExtended2023tiltedReco_cff.py b/Configuration/Geometry/python/GeometryExtended2023tiltedReco_cff.py index 4ba9c2348fed9..9ffd7657230ca 100644 --- a/Configuration/Geometry/python/GeometryExtended2023tiltedReco_cff.py +++ b/Configuration/Geometry/python/GeometryExtended2023tiltedReco_cff.py @@ -24,20 +24,20 @@ trackerGeometry.applyAlignment = cms.bool(False) # Calorimeters -from Geometry.CaloEventSetup.HGCalV6Topology_cfi import * -from Geometry.HGCalGeometry.HGCalV6GeometryESProducer_cfi import * from Geometry.CaloEventSetup.CaloTopology_cfi import * from Geometry.CaloEventSetup.CaloGeometryBuilder_cfi import * CaloGeometryBuilder = cms.ESProducer("CaloGeometryBuilder", - SelectedCalos = cms.vstring('HCAL' , + SelectedCalos = cms.vstring('HCAL' , 'ZDC' , 'CASTOR' , - 'EcalBarrel' , + 'EcalBarrel' , + 'EcalEndcap' , 'TOWER' ) ) from Geometry.EcalAlgo.EcalBarrelGeometry_cfi import * +from Geometry.EcalAlgo.EcalEndcapGeometry_cfi import * from Geometry.HcalEventSetup.HcalGeometry_cfi import * from Geometry.HcalEventSetup.CaloTowerGeometry_cfi import * from Geometry.HcalEventSetup.CaloTowerTopology_cfi import * diff --git a/Configuration/Geometry/python/GeometryExtended2023tilted_cff.py b/Configuration/Geometry/python/GeometryExtended2023tilted_cff.py index 60c30f0b8393d..5281fd7f734e3 100644 --- a/Configuration/Geometry/python/GeometryExtended2023tilted_cff.py +++ b/Configuration/Geometry/python/GeometryExtended2023tilted_cff.py @@ -8,5 +8,3 @@ from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import * from Geometry.HcalCommonData.hcalParameters_cfi import * from Geometry.HcalCommonData.hcalDDDSimConstants_cfi import * -from Geometry.HGCalCommonData.hgcalV6ParametersInitialization_cfi import * -from Geometry.HGCalCommonData.hgcalV6NumberingInitialization_cfi import * diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index 90a0851390dc1..d79ba520f035e 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -35,10 +35,10 @@ } upgradeEras={ '2017' : 'Run2_2017', - '2023sim' : 'Phase2', - '2023tilted' : 'Phase2', - '2023LReco' : 'Phase2', - '2023GReco' : 'Phase2' + '2023sim' : 'Phase2LReco', + '2023tilted' : 'Phase2GReco', + '2023LReco' : 'Phase2LReco', + '2023GReco' : 'Phase2GReco' } upgradeFragments=['FourMuPt_1_200_pythia8_cfi', @@ -108,12 +108,12 @@ #'2017':['GenSimFull'], '2017PU':['GenSimFull','DigiFullPU','RecoFullPU','HARVESTFullPU'],#full sequence '2023':['GenSimFull','DigiFull','RecoFull'],#full sequence - '2023tilted':['GenSimFull','DigiFull','RecoFull_trackingOnly','HARVESTFull_trackingOnly'],#full (or almost..) reco tilted scenario + tracking valdqm + '2023tilted':['GenSimFull','DigiFull','RecoFull','HARVESTFull_trackingOnly'],#full (or almost..) reco tilted scenario + tracking valdqm '2023sim':['GenSimFull'],#sim scenario '2023LReco':['GenSimFull','DigiFull','RecoFullLocal'],#local reco scenario - '2023GReco':['GenSimFull','DigiFull','RecoFull_trackingOnly', 'HARVESTFull_trackingOnly'],#full (or almost..) reco scenario - '2023GRecoPU':['GenSimFull','DigiFullPU','RecoFull_trackingOnlyPU', 'HARVESTFull_trackingOnlyPU'],#full (or almost..) reco scenario with PU - '2023tiltedPU':['GenSimFull','DigiFullPU','RecoFull_trackingOnlyPU', 'HARVESTFull_trackingOnlyPU']#full (or almost..) reco tilted scenario with PU + '2023GReco':['GenSimFull','DigiFull','RecoFull', 'HARVESTFull_trackingOnly'],#full (or almost..) reco scenario + '2023GRecoPU':['GenSimFull','DigiFullPU','RecoFullPU', 'HARVESTFull_trackingOnlyPU'],#full (or almost..) reco scenario with PU + '2023tiltedPU':['GenSimFull','DigiFullPU','RecoFullPU', 'HARVESTFull_trackingOnlyPU']#full (or almost..) reco tilted scenario with PU } from Configuration.PyReleaseValidation.relval_steps import Kby diff --git a/Configuration/StandardSequences/python/Eras.py b/Configuration/StandardSequences/python/Eras.py index 822bb2976abb7..167d003926769 100644 --- a/Configuration/StandardSequences/python/Eras.py +++ b/Configuration/StandardSequences/python/Eras.py @@ -28,11 +28,6 @@ def __init__(self): self.phase2_tracker = cms.Modifier() self.phase2_hgcal = cms.Modifier() self.phase2_muon = cms.Modifier() - # Phase 2 sub-eras for in-development features - self.phase2dev_common = cms.Modifier() - self.phase2dev_tracker = cms.Modifier() - self.phase2dev_hgcal = cms.Modifier() - self.phase2dev_muon = cms.Modifier() # These eras are used to specify the tracking configuration # when it should differ from the default (which is Run2). This @@ -65,10 +60,8 @@ def __init__(self): # Run3 includes the GE1/1 upgrade self.Run3 = cms.ModifierChain( self.Run2_2017,self.run3_GEM ) # Phase2 is everything for the 2023 (2026?) detector that works so far in this release. - # include phase 1 stuff until phase 2 tracking is fully defined.... - self.Phase2 = cms.ModifierChain( self.phase2_common, self.phase2_tracker, self.trackingPhase2PU140, self.phase2_hgcal, self.phase2_muon, self.run3_GEM ) - # Phase2dev is everything for the 2023 (2026?) detector that is still in development. - self.Phase2dev = cms.ModifierChain( self.Phase2, self.phase2dev_common, self.phase2dev_tracker, self.phase2dev_hgcal, self.phase2dev_muon ) + self.Phase2LReco = cms.ModifierChain( self.phase2_common, self.phase2_tracker, self.trackingPhase2PU140, self.phase2_hgcal, self.phase2_muon, self.run3_GEM ) + self.Phase2GReco = cms.ModifierChain( self.phase2_common, self.phase2_tracker, self.trackingPhase2PU140, self.phase2_muon, self.run3_GEM ) # run 2 calorimeters # Scenarios with low-PU tracking (for B=0T reconstruction) self.Run2_2016_trackingLowPU = cms.ModifierChain(self.Run2_2016, self.trackingLowPU) @@ -89,8 +82,6 @@ def __init__(self): self.phase1Pixel, self.run3_GEM, self.phase2_common, self.phase2_tracker, self.phase2_hgcal, self.phase2_muon, - self.phase2dev_common, self.phase2dev_tracker, - self.phase2dev_hgcal, self.phase2dev_muon, self.trackingLowPU, self.trackingPhase1, self.trackingPhase1PU70, ] diff --git a/Configuration/StandardSequences/python/GeometryConf.py b/Configuration/StandardSequences/python/GeometryConf.py index b668298a440cf..f454686b6758c 100644 --- a/Configuration/StandardSequences/python/GeometryConf.py +++ b/Configuration/StandardSequences/python/GeometryConf.py @@ -31,5 +31,5 @@ 'Extended2023sim' : 'Extended2023sim,Extended2023simReco', 'Extended2023tilted' : 'Extended2023tilted,Extended2023tiltedReco', 'Extended2023LReco' : 'Extended2023sim,Extended2023simReco', - 'Extended2023GReco' : 'Extended2023sim,Extended2023simReco' + 'Extended2023GReco' : 'Extended2023GReco,Extended2023GRecoReco' } diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py new file mode 100644 index 0000000000000..2b544fe8bead3 --- /dev/null +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py @@ -0,0 +1,160 @@ +import FWCore.ParameterSet.Config as cms + +## Everything that is currently in the PostLS1 geometry (rpc,csc,beampipe) + +XMLIdealGeometryESSource = cms.ESSource("XMLIdealGeometryESSource", + geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/PhaseII/materials.xml', + 'Geometry/CMSCommonData/data/rotations.xml', + 'Geometry/CMSCommonData/data/extend/cmsextent.xml', + 'Geometry/CMSCommonData/data/PhaseI/cms.xml', + 'Geometry/CMSCommonData/data/cmsMother.xml', + 'Geometry/CMSCommonData/data/cmsTracker.xml', + 'Geometry/CMSCommonData/data/eta3/etaMax.xml', + 'Geometry/CMSCommonData/data/PhaseII/caloBase.xml', + 'Geometry/CMSCommonData/data/cmsCalo.xml', + 'Geometry/CMSCommonData/data/PhaseII/muonBase.xml', + 'Geometry/CMSCommonData/data/cmsMuon.xml', + 'Geometry/CMSCommonData/data/mgnt.xml', + 'Geometry/CMSCommonData/data/PhaseII/beampipe.xml', + 'Geometry/CMSCommonData/data/cmsBeam.xml', + 'Geometry/CMSCommonData/data/muonMB.xml', + 'Geometry/CMSCommonData/data/muonMagnet.xml', + 'Geometry/CMSCommonData/data/cavern.xml', + 'Geometry/TrackerCommonData/data/PhaseII/trackerParameters.xml', + 'Geometry/TrackerCommonData/data/pixfwdCommon.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdMaterials.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdCylinder.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwd.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdDisks.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk1.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk2.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk3.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk4.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk5.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk6.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk7.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk1.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk2.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk3.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk4.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk5.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk6.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk7.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk8.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk9.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdOuterDisk10.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade1.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade2.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade3.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade4.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade5.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade6.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade7.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade8.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade9.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdblade10.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarmaterial.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladder.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull0.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull1.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull2.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarladderfull3.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer0.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer1.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer2.xml', + 'Geometry/TrackerCommonData/data/PhaseI/pixbarlayer3.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixbar.xml', + 'Geometry/TrackerCommonData/data/trackermaterial.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/tracker.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/trackerbar.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/trackerfwd.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/trackerStructureTopology.xml', + 'Geometry/TrackerSimData/data/PhaseII/FlatTracker/trackersens.xml', + 'Geometry/TrackerRecoData/data/PhaseII/FlatTracker/trackerRecoMaterial.xml', + 'Geometry/TrackerSimData/data/PhaseII/FlatTracker/trackerProdCuts.xml', + 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', + 'Geometry/EcalCommonData/data/ectkcable.xml', + 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eregalgo.xml', + 'Geometry/EcalCommonData/data/ebalgo.xml', + 'Geometry/EcalCommonData/data/ebcon.xml', + 'Geometry/EcalCommonData/data/ebrot.xml', + 'Geometry/EcalCommonData/data/eecon.xml', + 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eefixed.xml', + 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eehier.xml', + 'Geometry/EcalCommonData/data/eealgo.xml', + 'Geometry/EcalCommonData/data/eecon.xml', + 'Geometry/EcalCommonData/data/escon.xml', + 'Geometry/EcalCommonData/data/esalgo.xml', + 'Geometry/EcalCommonData/data/eeF.xml', + 'Geometry/EcalCommonData/data/eeB.xml', + 'Geometry/EcalCommonData/data/ectkcable.xml', + 'Geometry/HcalCommonData/data/hcalrotations.xml', + 'Geometry/HcalCommonData/data/hcalalgo.xml', + 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', + 'Geometry/HcalCommonData/data/hcalendcapalgo.xml', + 'Geometry/HcalCommonData/data/hcalouteralgo.xml', + 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', + 'Geometry/HcalCommonData/data/Run2/hcalSimNumbering16a.xml', + 'Geometry/HcalCommonData/data/Run2/hcalRecNumbering16a.xml', + 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', + 'Geometry/MuonCommonData/data/v1/mbCommon.xml', + 'Geometry/MuonCommonData/data/v1/mb1.xml', + 'Geometry/MuonCommonData/data/v1/mb2.xml', + 'Geometry/MuonCommonData/data/v1/mb3.xml', + 'Geometry/MuonCommonData/data/v1/mb4.xml', + 'Geometry/MuonCommonData/data/design/muonYoke.xml', + 'Geometry/MuonCommonData/data/PhaseII/mf.xml', + 'Geometry/MuonCommonData/data/PhaseII/rpcf.xml', + 'Geometry/MuonCommonData/data/PhaseII/gemf.xml', + 'Geometry/MuonCommonData/data/PhaseII/TDR_BaseLine/gem11.xml', + 'Geometry/MuonCommonData/data/PhaseII/TDR_BaseLine/gem21.xml', + 'Geometry/MuonCommonData/data/v2/csc.xml', + 'Geometry/MuonCommonData/data/PhaseII/mfshield.xml', + 'Geometry/MuonCommonData/data/PhaseII/TDR_BaseLine/me0.xml', + 'Geometry/ForwardCommonData/data/forward.xml', + 'Geometry/ForwardCommonData/data/v2/forwardshield.xml', + 'Geometry/ForwardCommonData/data/brmrotations.xml', + 'Geometry/ForwardCommonData/data/brm.xml', + 'Geometry/ForwardCommonData/data/totemMaterials.xml', + 'Geometry/ForwardCommonData/data/totemRotations.xml', + 'Geometry/ForwardCommonData/data/totemt1.xml', + 'Geometry/ForwardCommonData/data/totemt2.xml', + 'Geometry/ForwardCommonData/data/ionpump.xml', + 'Geometry/ForwardCommonData/data/castor.xml', + 'Geometry/ForwardCommonData/data/zdcmaterials.xml', + 'Geometry/ForwardCommonData/data/lumimaterials.xml', + 'Geometry/ForwardCommonData/data/zdcrotations.xml', + 'Geometry/ForwardCommonData/data/lumirotations.xml', + 'Geometry/ForwardCommonData/data/zdc.xml', + 'Geometry/ForwardCommonData/data/zdclumi.xml', + 'Geometry/ForwardCommonData/data/cmszdc.xml')+cms.vstring( + 'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml', + 'Geometry/EcalSimData/data/PhaseII/ecalsens.xml', + 'Geometry/HcalCommonData/data/Phase0/hcalsenspmf.xml', + 'Geometry/HcalSimData/data/hf.xml', + 'Geometry/HcalSimData/data/hfpmt.xml', + 'Geometry/HcalSimData/data/hffibrebundle.xml', + 'Geometry/HcalSimData/data/CaloUtil.xml', + 'Geometry/MuonSimData/data/PhaseII/muonSens.xml', + 'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml', + 'Geometry/CSCGeometryBuilder/data/cscSpecs.xml', + 'Geometry/RPCGeometryBuilder/data/PhaseII/RPCSpecs.xml', + 'Geometry/GEMGeometryBuilder/data/GEMSpecsFilter.xml', + 'Geometry/GEMGeometryBuilder/data/v5/GEMSpecs.xml', + 'Geometry/ForwardCommonData/data/brmsens.xml', + 'Geometry/ForwardSimData/data/castorsens.xml', + 'Geometry/ForwardSimData/data/zdcsens.xml', + 'Geometry/HcalSimData/data/HcalProdCuts.xml', + 'Geometry/EcalSimData/data/EcalProdCuts.xml', + 'Geometry/EcalSimData/data/ESProdCuts.xml', + 'Geometry/MuonSimData/data/PhaseII/muonProdCuts.xml', + 'Geometry/ForwardSimData/data/CastorProdCuts.xml', + 'Geometry/ForwardSimData/data/zdcProdCuts.xml', + 'Geometry/ForwardSimData/data/ForwardShieldProdCuts.xml', + 'Geometry/CMSCommonData/data/FieldParameters.xml'), + rootNodeName = cms.string('cms:OCMS') +) + + diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py index c48d149ecc456..1e5d79f970c49 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py @@ -75,27 +75,29 @@ 'Geometry/TrackerSimData/data/PhaseII/TiltedTracker/trackerProdCuts.xml', 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', 'Geometry/EcalCommonData/data/ectkcable.xml', - 'Geometry/EcalCommonData/data/PhaseII/eregalgo.xml', + 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eregalgo.xml', 'Geometry/EcalCommonData/data/ebalgo.xml', 'Geometry/EcalCommonData/data/ebcon.xml', 'Geometry/EcalCommonData/data/ebrot.xml', 'Geometry/EcalCommonData/data/eecon.xml', - 'Geometry/EcalCommonData/data/PhaseII/escon.xml', - 'Geometry/EcalCommonData/data/PhaseII/esalgo.xml', + 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eefixed.xml', + 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eehier.xml', + 'Geometry/EcalCommonData/data/eealgo.xml', + 'Geometry/EcalCommonData/data/eecon.xml', + 'Geometry/EcalCommonData/data/escon.xml', + 'Geometry/EcalCommonData/data/esalgo.xml', + 'Geometry/EcalCommonData/data/eeF.xml', + 'Geometry/EcalCommonData/data/eeB.xml', + 'Geometry/EcalCommonData/data/ectkcable.xml', 'Geometry/HcalCommonData/data/hcalrotations.xml', - 'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalalgo.xml', + 'Geometry/HcalCommonData/data/hcalalgo.xml', 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', - 'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalendcapalgo.xml', + 'Geometry/HcalCommonData/data/hcalendcapalgo.xml', 'Geometry/HcalCommonData/data/hcalouteralgo.xml', 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', - 'Geometry/HcalCommonData/data/PhaseII/hcalSimNumbering.xml', - 'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalRecNumberingRebuild.xml', + 'Geometry/HcalCommonData/data/Run2/hcalSimNumbering16a.xml', + 'Geometry/HcalCommonData/data/Run2/hcalRecNumbering16a.xml', 'Geometry/HcalCommonData/data/average/hcalforwardmaterial.xml', - 'Geometry/HGCalCommonData/data/v7/hgcal.xml', - 'Geometry/HGCalCommonData/data/v7/hgcalEE.xml', - 'Geometry/HGCalCommonData/data/v7/hgcalHEsil.xml', - 'Geometry/HGCalCommonData/data/v7/hgcalwafer.xml', - 'Geometry/HGCalCommonData/data/v7/hgcalCons.xml', 'Geometry/MuonCommonData/data/v1/mbCommon.xml', 'Geometry/MuonCommonData/data/v1/mb1.xml', 'Geometry/MuonCommonData/data/v1/mb2.xml', @@ -129,14 +131,11 @@ 'Geometry/ForwardCommonData/data/cmszdc.xml')+cms.vstring( 'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml', 'Geometry/EcalSimData/data/PhaseII/ecalsens.xml', - 'Geometry/HcalCommonData/data/PhaseII/HGCal/hcalsenspmf.xml', + 'Geometry/HcalCommonData/data/Phase0/hcalsenspmf.xml', 'Geometry/HcalSimData/data/hf.xml', 'Geometry/HcalSimData/data/hfpmt.xml', 'Geometry/HcalSimData/data/hffibrebundle.xml', 'Geometry/HcalSimData/data/CaloUtil.xml', - 'Geometry/HGCalSimData/data/hgcsensv6.xml', - 'Geometry/HGCalSimData/data/hgccons.xml', - 'Geometry/HGCalSimData/data/hgcProdCuts.xml', 'Geometry/MuonSimData/data/PhaseII/muonSens.xml', 'Geometry/DTGeometryBuilder/data/dtSpecsFilter.xml', 'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml', @@ -148,6 +147,7 @@ 'Geometry/ForwardSimData/data/zdcsens.xml', 'Geometry/HcalSimData/data/HcalProdCuts.xml', 'Geometry/EcalSimData/data/EcalProdCuts.xml', + 'Geometry/EcalSimData/data/ESProdCuts.xml', 'Geometry/MuonSimData/data/PhaseII/muonProdCuts.xml', 'Geometry/ForwardSimData/data/CastorProdCuts.xml', 'Geometry/ForwardSimData/data/zdcProdCuts.xml', From 40109b1905d51f14262cf9dcfe34957f8bd1c2f5 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Wed, 8 Jun 2016 11:04:18 -0500 Subject: [PATCH 06/23] refactor Phase2 Eras to split ECAL, HCAL customs --- .../python/Hcal_Conditions_forGlobalTag_cff.py | 2 +- .../StandardSequences/python/DigiToRaw_cff.py | 2 +- Configuration/StandardSequences/python/Eras.py | 3 ++- .../StandardSequences/python/RawToDigi_cff.py | 2 +- .../python/RecoLocalCalo_EventContent_cff.py | 2 +- .../Configuration/python/hcalGlobalReco_cff.py | 2 +- .../Configuration/python/hcalLocalReco_cff.py | 10 +++++----- .../Configuration/python/hcalDigiSequence_cff.py | 2 +- .../python/ecalTriggerPrimitiveDigis_cff.py | 2 +- .../python/ecalTriggerPrimitiveDigis_mc_cff.py | 2 +- .../ecalTriggerPrimitiveDigis_with_suppressed_cff.py | 2 +- .../python/hcalDigisRealistic_cfi.py | 2 +- SimG4Core/Configuration/python/SimG4Core_cff.py | 2 +- SimGeneral/MixingModule/python/ecalDigitizer_cfi.py | 3 ++- 14 files changed, 20 insertions(+), 18 deletions(-) diff --git a/CalibCalorimetry/HcalPlugins/python/Hcal_Conditions_forGlobalTag_cff.py b/CalibCalorimetry/HcalPlugins/python/Hcal_Conditions_forGlobalTag_cff.py index fdff3cbb01ee7..53810b62648c3 100644 --- a/CalibCalorimetry/HcalPlugins/python/Hcal_Conditions_forGlobalTag_cff.py +++ b/CalibCalorimetry/HcalPlugins/python/Hcal_Conditions_forGlobalTag_cff.py @@ -93,7 +93,7 @@ es_prefer_hcalHardcode = cms.ESPrefer("HcalHardcodeCalibrations", "es_hardcode") from Configuration.StandardSequences.Eras import eras -eras.phase2_common.toModify( es_hardcode, +eras.phase2_hcal.toModify( es_hardcode, toGet = cms.untracked.vstring( 'GainWidths', 'MCParams', diff --git a/Configuration/StandardSequences/python/DigiToRaw_cff.py b/Configuration/StandardSequences/python/DigiToRaw_cff.py index 4f72748ba8563..ca73f9875dcdf 100644 --- a/Configuration/StandardSequences/python/DigiToRaw_cff.py +++ b/Configuration/StandardSequences/python/DigiToRaw_cff.py @@ -27,7 +27,7 @@ #until we have hcal raw data for phase 2.... -eras.phase2_common.toReplaceWith(DigiToRaw, DigiToRaw.copyAndExclude([hcalRawData])) +eras.phase2_hcal.toReplaceWith(DigiToRaw, DigiToRaw.copyAndExclude([hcalRawData])) # Remove siPixelRawData until we have phase1 pixel digis eras.phase1Pixel.toReplaceWith(DigiToRaw, DigiToRaw.copyAndExclude([siPixelRawData])) # FIXME diff --git a/Configuration/StandardSequences/python/Eras.py b/Configuration/StandardSequences/python/Eras.py index 167d003926769..633c4eedab68a 100644 --- a/Configuration/StandardSequences/python/Eras.py +++ b/Configuration/StandardSequences/python/Eras.py @@ -25,6 +25,7 @@ def __init__(self): # Phase 2 sub-eras for stable features self.phase2_common = cms.Modifier() + self.phase2_hcal = cms.Modifier() self.phase2_tracker = cms.Modifier() self.phase2_hgcal = cms.Modifier() self.phase2_muon = cms.Modifier() @@ -60,7 +61,7 @@ def __init__(self): # Run3 includes the GE1/1 upgrade self.Run3 = cms.ModifierChain( self.Run2_2017,self.run3_GEM ) # Phase2 is everything for the 2023 (2026?) detector that works so far in this release. - self.Phase2LReco = cms.ModifierChain( self.phase2_common, self.phase2_tracker, self.trackingPhase2PU140, self.phase2_hgcal, self.phase2_muon, self.run3_GEM ) + self.Phase2LReco = cms.ModifierChain( self.phase2_common, self.phase2_hcal, self.phase2_tracker, self.trackingPhase2PU140, self.phase2_hgcal, self.phase2_muon, self.run3_GEM ) self.Phase2GReco = cms.ModifierChain( self.phase2_common, self.phase2_tracker, self.trackingPhase2PU140, self.phase2_muon, self.run3_GEM ) # run 2 calorimeters # Scenarios with low-PU tracking (for B=0T reconstruction) diff --git a/Configuration/StandardSequences/python/RawToDigi_cff.py b/Configuration/StandardSequences/python/RawToDigi_cff.py index c41beabc55169..9483979e12935 100644 --- a/Configuration/StandardSequences/python/RawToDigi_cff.py +++ b/Configuration/StandardSequences/python/RawToDigi_cff.py @@ -80,7 +80,7 @@ totemRPRawToDigi.rawDataTag = cms.InputTag("rawDataCollector") # until we have hcal raw data for phase 2... -eras.phase2_common.toReplaceWith(RawToDigi, RawToDigi.copyAndExclude([hcalDigis])) +eras.phase2_hcal.toReplaceWith(RawToDigi, RawToDigi.copyAndExclude([hcalDigis])) # Remove siPixelDigis until we have phase1 pixel digis diff --git a/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py b/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py index 3743f73ec6188..f05fd784c4d37 100644 --- a/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py +++ b/RecoLocalCalo/Configuration/python/RecoLocalCalo_EventContent_cff.py @@ -67,7 +67,7 @@ def _updateOutput( era, outputPSets, commands): from Configuration.StandardSequences.Eras import eras _outputs = [RecoLocalCaloFEVT, RecoLocalCaloRECO] -_updateOutput( eras.phase2_common, _outputs, [ 'keep *_hbheUpgradeReco_*_*', 'keep *_hfUpgradeReco_*_*' ] ) +_updateOutput( eras.phase2_hcal, _outputs, [ 'keep *_hbheUpgradeReco_*_*', 'keep *_hfUpgradeReco_*_*' ] ) # mods for HGCAL eras.phase2_hgcal.toModify( RecoLocalCaloFEVT, outputCommands = RecoLocalCaloFEVT.outputCommands + [ diff --git a/RecoLocalCalo/Configuration/python/hcalGlobalReco_cff.py b/RecoLocalCalo/Configuration/python/hcalGlobalReco_cff.py index 5872fff15699e..a282d615fa15c 100644 --- a/RecoLocalCalo/Configuration/python/hcalGlobalReco_cff.py +++ b/RecoLocalCalo/Configuration/python/hcalGlobalReco_cff.py @@ -4,4 +4,4 @@ hcalGlobalRecoSequence = cms.Sequence(hbhereco) from Configuration.StandardSequences.Eras import eras -eras.phase2_common.toReplaceWith( hcalGlobalRecoSequence, cms.Sequence() ) +eras.phase2_hcal.toReplaceWith( hcalGlobalRecoSequence, cms.Sequence() ) diff --git a/RecoLocalCalo/Configuration/python/hcalLocalReco_cff.py b/RecoLocalCalo/Configuration/python/hcalLocalReco_cff.py index 74ff33745186f..4ccfb27971efb 100644 --- a/RecoLocalCalo/Configuration/python/hcalLocalReco_cff.py +++ b/RecoLocalCalo/Configuration/python/hcalLocalReco_cff.py @@ -20,8 +20,8 @@ _phase2_hcalLocalRecoSequence.replace(hbheprereco,hbheUpgradeReco) from Configuration.StandardSequences.Eras import eras -eras.phase2_common.toModify( hbheUpgradeReco, digiLabel = cms.InputTag('simHcalDigis','HBHEUpgradeDigiCollection') ) -eras.phase2_common.toModify( horeco, digiLabel = cms.InputTag('simHcalDigis') ) -eras.phase2_common.toModify( hfUpgradeReco, digiLabel = cms.InputTag('simHcalDigis','HFUpgradeDigiCollection') ) -eras.phase2_common.toModify( zdcreco, digiLabel = cms.InputTag('simHcalUnsuppressedDigis'), digiLabelhcal = cms.InputTag('simHcalUnsuppressedDigis') ) -eras.phase2_common.toReplaceWith( hcalLocalRecoSequence, _phase2_hcalLocalRecoSequence ) +eras.phase2_hcal.toModify( hbheUpgradeReco, digiLabel = cms.InputTag('simHcalDigis','HBHEUpgradeDigiCollection') ) +eras.phase2_hcal.toModify( horeco, digiLabel = cms.InputTag('simHcalDigis') ) +eras.phase2_hcal.toModify( hfUpgradeReco, digiLabel = cms.InputTag('simHcalDigis','HFUpgradeDigiCollection') ) +eras.phase2_hcal.toModify( zdcreco, digiLabel = cms.InputTag('simHcalUnsuppressedDigis'), digiLabelhcal = cms.InputTag('simHcalUnsuppressedDigis') ) +eras.phase2_hcal.toReplaceWith( hcalLocalRecoSequence, _phase2_hcalLocalRecoSequence ) diff --git a/SimCalorimetry/Configuration/python/hcalDigiSequence_cff.py b/SimCalorimetry/Configuration/python/hcalDigiSequence_cff.py index e109275519beb..39795f91fc544 100644 --- a/SimCalorimetry/Configuration/python/hcalDigiSequence_cff.py +++ b/SimCalorimetry/Configuration/python/hcalDigiSequence_cff.py @@ -14,4 +14,4 @@ _phase2_hcalDigiSequence.remove(simHcalTTPDigis) from Configuration.StandardSequences.Eras import eras -eras.phase2_common.toReplaceWith( hcalDigiSequence, _phase2_hcalDigiSequence ) +eras.phase2_hcal.toReplaceWith( hcalDigiSequence, _phase2_hcalDigiSequence ) diff --git a/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_cff.py b/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_cff.py index 9d908bc30cf74..a72dac6f35d9c 100644 --- a/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_cff.py +++ b/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_cff.py @@ -11,4 +11,4 @@ #Common from Configuration.StandardSequences.Eras import eras -eras.phase2_common.toModify( simEcalTriggerPrimitiveDigis, BarrelOnly = cms.bool(True) ) +eras.phase2_hgcal.toModify( simEcalTriggerPrimitiveDigis, BarrelOnly = cms.bool(True) ) diff --git a/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_mc_cff.py b/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_mc_cff.py index 33416a0570d98..35f4055935708 100644 --- a/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_mc_cff.py +++ b/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_mc_cff.py @@ -7,4 +7,4 @@ #Common from Configuration.StandardSequences.Eras import eras -eras.phase2_common.toModify( simEcalTriggerPrimitiveDigis, BarrelOnly = cms.bool(True) ) +eras.phase2_hgcal.toModify( simEcalTriggerPrimitiveDigis, BarrelOnly = cms.bool(True) ) diff --git a/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_with_suppressed_cff.py b/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_with_suppressed_cff.py index 996ca737ce852..d065a907ec9cf 100644 --- a/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_with_suppressed_cff.py +++ b/SimCalorimetry/EcalTrigPrimProducers/python/ecalTriggerPrimitiveDigis_with_suppressed_cff.py @@ -9,4 +9,4 @@ #Common from Configuration.StandardSequences.Eras import eras -eras.phase2_common.toModify( simEcalTriggerPrimitiveDigis, BarrelOnly = cms.bool(True) ) +eras.phase2_hgcal.toModify( simEcalTriggerPrimitiveDigis, BarrelOnly = cms.bool(True) ) diff --git a/SimCalorimetry/HcalZeroSuppressionProducers/python/hcalDigisRealistic_cfi.py b/SimCalorimetry/HcalZeroSuppressionProducers/python/hcalDigisRealistic_cfi.py index 29b1011474676..8185b478d8ee4 100644 --- a/SimCalorimetry/HcalZeroSuppressionProducers/python/hcalDigisRealistic_cfi.py +++ b/SimCalorimetry/HcalZeroSuppressionProducers/python/hcalDigisRealistic_cfi.py @@ -22,7 +22,7 @@ ) from Configuration.StandardSequences.Eras import eras -eras.phase2_common.toModify( simHcalDigis, +eras.phase2_hcal.toModify( simHcalDigis, useConfigZSvalues = cms.int32(1), HBlevel = cms.int32(16), HElevel = cms.int32(16), diff --git a/SimG4Core/Configuration/python/SimG4Core_cff.py b/SimG4Core/Configuration/python/SimG4Core_cff.py index 1cb87a7a021e1..8dce116832452 100644 --- a/SimG4Core/Configuration/python/SimG4Core_cff.py +++ b/SimG4Core/Configuration/python/SimG4Core_cff.py @@ -7,4 +7,4 @@ from SimG4Core.Application.g4SimHits_cfi import * from Configuration.StandardSequences.Eras import eras -eras.phase2_common.toModify( g4SimHits, HCalSD = dict( TestNumberingScheme = True ) ) +eras.phase2_hcal.toModify( g4SimHits, HCalSD = dict( TestNumberingScheme = True ) ) diff --git a/SimGeneral/MixingModule/python/ecalDigitizer_cfi.py b/SimGeneral/MixingModule/python/ecalDigitizer_cfi.py index 060422bb643e3..827e0a7282697 100644 --- a/SimGeneral/MixingModule/python/ecalDigitizer_cfi.py +++ b/SimGeneral/MixingModule/python/ecalDigitizer_cfi.py @@ -30,4 +30,5 @@ ecalDigitizer.doES = cms.bool(True) from Configuration.StandardSequences.Eras import eras -eras.phase2_hgcal.toModify( ecalDigitizer, doEE = cms.bool(False), doES = cms.bool(False) ) +eras.phase2_common.toModify( ecalDigitizer, doES = cms.bool(False) ) +eras.phase2_hgcal.toModify( ecalDigitizer, doEE = cms.bool(False) ) From 00592dc5e4d9727ebe6c222984eb4fac848af441 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Thu, 9 Jun 2016 12:13:39 -0500 Subject: [PATCH 07/23] keep EE sensitive geometry in 2023GReco --- .../python/cmsExtendedGeometry2023GRecoXML_cfi.py | 4 +--- .../python/cmsExtendedGeometry2023tiltedXML_cfi.py | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py index 2b544fe8bead3..9ad1a223b614e 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py @@ -74,7 +74,6 @@ 'Geometry/TrackerRecoData/data/PhaseII/FlatTracker/trackerRecoMaterial.xml', 'Geometry/TrackerSimData/data/PhaseII/FlatTracker/trackerProdCuts.xml', 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', - 'Geometry/EcalCommonData/data/ectkcable.xml', 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eregalgo.xml', 'Geometry/EcalCommonData/data/ebalgo.xml', 'Geometry/EcalCommonData/data/ebcon.xml', @@ -83,7 +82,6 @@ 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eefixed.xml', 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eehier.xml', 'Geometry/EcalCommonData/data/eealgo.xml', - 'Geometry/EcalCommonData/data/eecon.xml', 'Geometry/EcalCommonData/data/escon.xml', 'Geometry/EcalCommonData/data/esalgo.xml', 'Geometry/EcalCommonData/data/eeF.xml', @@ -130,7 +128,7 @@ 'Geometry/ForwardCommonData/data/zdclumi.xml', 'Geometry/ForwardCommonData/data/cmszdc.xml')+cms.vstring( 'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml', - 'Geometry/EcalSimData/data/PhaseII/ecalsens.xml', + 'Geometry/EcalSimData/data/ecalsens.xml', 'Geometry/HcalCommonData/data/Phase0/hcalsenspmf.xml', 'Geometry/HcalSimData/data/hf.xml', 'Geometry/HcalSimData/data/hfpmt.xml', diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py index 1e5d79f970c49..f0cb70bd8205a 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py @@ -74,7 +74,6 @@ 'Geometry/TrackerRecoData/data/PhaseII/TiltedTracker/trackerRecoMaterial.xml', 'Geometry/TrackerSimData/data/PhaseII/TiltedTracker/trackerProdCuts.xml', 'Geometry/TrackerSimData/data/trackerProdCutsBEAM.xml', - 'Geometry/EcalCommonData/data/ectkcable.xml', 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eregalgo.xml', 'Geometry/EcalCommonData/data/ebalgo.xml', 'Geometry/EcalCommonData/data/ebcon.xml', @@ -83,7 +82,6 @@ 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eefixed.xml', 'Geometry/EcalCommonData/data/PhaseII/ShortEE/eehier.xml', 'Geometry/EcalCommonData/data/eealgo.xml', - 'Geometry/EcalCommonData/data/eecon.xml', 'Geometry/EcalCommonData/data/escon.xml', 'Geometry/EcalCommonData/data/esalgo.xml', 'Geometry/EcalCommonData/data/eeF.xml', @@ -130,7 +128,7 @@ 'Geometry/ForwardCommonData/data/zdclumi.xml', 'Geometry/ForwardCommonData/data/cmszdc.xml')+cms.vstring( 'Geometry/MuonCommonData/data/PhaseII/muonNumbering.xml', - 'Geometry/EcalSimData/data/PhaseII/ecalsens.xml', + 'Geometry/EcalSimData/data/ecalsens.xml', 'Geometry/HcalCommonData/data/Phase0/hcalsenspmf.xml', 'Geometry/HcalSimData/data/hf.xml', 'Geometry/HcalSimData/data/hfpmt.xml', From a5eaf4dce367ef91f6e7905eabdfc2c6385cf1bd Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Thu, 9 Jun 2016 13:41:40 -0500 Subject: [PATCH 08/23] remove ES for Phase2 in a few places --- .../python/reducedRecHitsSequence_cff.py | 7 +++++++ .../src/ECAL2DPositionCalcWithDepthCorr.cc | 19 ++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py b/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py index 75c19529d1583..cf306f39bba83 100644 --- a/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py +++ b/RecoEcal/EgammaClusterProducers/python/reducedRecHitsSequence_cff.py @@ -140,3 +140,10 @@ reducedEcalRecHitsEB* reducedEcalRecHitsEE* seldigis) + + +_phase2_reducedEcalRecHitsSequence = reducedEcalRecHitsSequence.copy() +_phase2_reducedEcalRecHitsSequence.remove(reducedEcalRecHitsES) + +from Configuration.StandardSequences.Eras import eras +eras.phase2_common.toReplaceWith( reducedEcalRecHitsSequence , _phase2_reducedEcalRecHitsSequence ) diff --git a/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.cc b/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.cc index 50fee4becd80c..e814357d1c2af 100644 --- a/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.cc +++ b/RecoParticleFlow/PFClusterProducer/src/ECAL2DPositionCalcWithDepthCorr.cc @@ -24,15 +24,16 @@ update(const edm::EventSetup& es) { _ebGeom = geohandle->getSubdetectorGeometry(DetId::Ecal,EcalBarrel); _eeGeom = geohandle->getSubdetectorGeometry(DetId::Ecal,EcalEndcap); _esGeom = geohandle->getSubdetectorGeometry(DetId::Ecal,EcalPreshower); - // ripped from RecoEcal/EgammaCoreTools - for( uint32_t ic = 0; - ic < _esGeom->getValidDetIds().size() && - ( !_esPlus || !_esMinus ); ++ic ) { - const double z = _esGeom->getGeometry( _esGeom->getValidDetIds()[ic] )->getPosition().z(); - _esPlus = _esPlus || ( 0 < z ) ; - _esMinus = _esMinus || ( 0 > z ) ; - } - + if(_esGeom){ + // ripped from RecoEcal/EgammaCoreTools + for( uint32_t ic = 0; + ic < _esGeom->getValidDetIds().size() && + ( !_esPlus || !_esMinus ); ++ic ) { + const double z = _esGeom->getGeometry( _esGeom->getValidDetIds()[ic] )->getPosition().z(); + _esPlus = _esPlus || ( 0 < z ) ; + _esMinus = _esMinus || ( 0 > z ) ; + } + } } void ECAL2DPositionCalcWithDepthCorr:: From af70fddf5c4304559b0fd1360a0543f6e596bde9 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Thu, 9 Jun 2016 13:42:35 -0500 Subject: [PATCH 09/23] fix phase2 hcal tracker customization --- RecoJets/JetProducers/python/caloJetsForTrk_cff.py | 2 ++ SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py | 3 --- SLHCUpgradeSimulations/Configuration/python/phase2TkTilted.py | 3 --- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/RecoJets/JetProducers/python/caloJetsForTrk_cff.py b/RecoJets/JetProducers/python/caloJetsForTrk_cff.py index 8dcef06e68c11..45cbdc4084058 100644 --- a/RecoJets/JetProducers/python/caloJetsForTrk_cff.py +++ b/RecoJets/JetProducers/python/caloJetsForTrk_cff.py @@ -14,3 +14,5 @@ caloJetsForTrk = cms.Sequence(caloTowerForTrk*ak4CaloJetsForTrk) +from Configuration.StandardSequences.Eras import eras +eras.phase2_hcal.toModify( caloTowerForTrk, hbheInput = cms.InputTag("hbheUpgradeReco"), hfInput = cms.InputTag("hfUpgradeReco") ) diff --git a/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py b/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py index 292270856b0c3..7f9787b19150f 100644 --- a/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py +++ b/SLHCUpgradeSimulations/Configuration/python/phase2TkFlat.py @@ -315,9 +315,6 @@ def customise_Reco(process,pileup): process.preDuplicateMergingDisplacedTracks.inputClassifiers.remove("muonSeededTracksInOutClassifier") process.preDuplicateMergingDisplacedTracks.trackProducers.remove("muonSeededTracksInOut") - process.caloTowerForTrk.hbheInput = cms.InputTag("hbheUpgradeReco") - process.caloTowerForTrk.hfInput = cms.InputTag("hfUpgradeReco") - # STILL TO DO (when the ph2 PF will be included): # Particle flow needs to know that the eta range has increased, for # when linking tracks to HF clusters diff --git a/SLHCUpgradeSimulations/Configuration/python/phase2TkTilted.py b/SLHCUpgradeSimulations/Configuration/python/phase2TkTilted.py index 3b8f156baedcc..c34c2b39a303a 100644 --- a/SLHCUpgradeSimulations/Configuration/python/phase2TkTilted.py +++ b/SLHCUpgradeSimulations/Configuration/python/phase2TkTilted.py @@ -315,9 +315,6 @@ def customise_Reco(process,pileup): process.preDuplicateMergingDisplacedTracks.inputClassifiers.remove("muonSeededTracksInOutClassifier") process.preDuplicateMergingDisplacedTracks.trackProducers.remove("muonSeededTracksInOut") - process.caloTowerForTrk.hbheInput = cms.InputTag("hbheUpgradeReco") - process.caloTowerForTrk.hfInput = cms.InputTag("hfUpgradeReco") - # STILL TO DO (when the ph2 PF will be included): # Particle flow needs to know that the eta range has increased, for # when linking tracks to HF clusters From 0df7910c03fe393a63615b6158babe651ae5424b Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Fri, 10 Jun 2016 08:25:37 -0500 Subject: [PATCH 10/23] add 2023 LReco PU workflow --- Configuration/PyReleaseValidation/python/relval_steps.py | 3 +++ .../PyReleaseValidation/python/upgradeWorkflowComponents.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 7427176fb0da5..72289588a3f70 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1577,6 +1577,7 @@ def lhegensim(fragment,howMuch): defaultDataSets={} defaultDataSets['2017']='CMSSW_8_1_0_pre5-80X_upgrade2017_realistic_v4_resubUPG17-v' defaultDataSets['2023GReco']='CMSSW_8_1_0_pre4-80X_mcRun2_asymptotic_v13_2023LReco-v' +defaultDataSets['2023LReco']='CMSSW_8_1_0_pre4-80X_mcRun2_asymptotic_v13_2023LReco-v' defaultDataSets['2023tilted']='CMSSW_8_1_0_pre4-80X_mcRun2_asymptotic_v13_2023tilted-v' keys=defaultDataSets.keys() @@ -1706,6 +1707,8 @@ def lhegensim(fragment,howMuch): if cust!=None : upgradeStepDict['RecoFullLocal'][k]['--customise']=cust if era is not None: upgradeStepDict['RecoFullLocal'][k]['--era']=era + if k2 in PUDataSets: + upgradeStepDict['RecoFullLocalPU'][k]=merge([PUDataSets[k2],upgradeStepDict['RecoFullLocal'][k]]) upgradeStepDict['RecoFullHGCAL'][k] = {'-s':'RAW2DIGI,L1Reco,RECO', '--conditions':gt, diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index d79ba520f035e..df33e34062623 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -8,7 +8,8 @@ '2023LReco', '2023GReco', '2023tiltedPU', - '2023GRecoPU' + '2023GRecoPU', + '2023LRecoPU' ] @@ -102,7 +103,7 @@ # step6 is fastsim # step7 is fastsim harvesting -upgradeSteps=['GenSimFull','GenSimHLBeamSpotFull','DigiFull','RecoFullLocal','RecoFull','RecoFullHGCAL','HARVESTFull','DigiTrkTrigFull','FastSim','HARVESTFast','DigiFullPU','RecoFullPU','RecoFullPUHGCAL','RecoFullPUTracking','HARVESTFullPU','DigiFullTrigger','RecoFull_trackingOnly','RecoFull_trackingOnlyPU','HARVESTFull_trackingOnly', 'HARVESTFull_trackingOnlyPU'] +upgradeSteps=['GenSimFull','GenSimHLBeamSpotFull','DigiFull','RecoFullLocal','RecoFullLocalPU','RecoFull','RecoFullHGCAL','HARVESTFull','DigiTrkTrigFull','FastSim','HARVESTFast','DigiFullPU','RecoFullPU','RecoFullPUHGCAL','RecoFullPUTracking','HARVESTFullPU','DigiFullTrigger','RecoFull_trackingOnly','RecoFull_trackingOnlyPU','HARVESTFull_trackingOnly', 'HARVESTFull_trackingOnlyPU'] upgradeScenToRun={ '2017':['GenSimFull','DigiFull','RecoFull','HARVESTFull'], #'2017':['GenSimFull'], @@ -114,6 +115,7 @@ '2023GReco':['GenSimFull','DigiFull','RecoFull', 'HARVESTFull_trackingOnly'],#full (or almost..) reco scenario '2023GRecoPU':['GenSimFull','DigiFullPU','RecoFullPU', 'HARVESTFull_trackingOnlyPU'],#full (or almost..) reco scenario with PU '2023tiltedPU':['GenSimFull','DigiFullPU','RecoFullPU', 'HARVESTFull_trackingOnlyPU']#full (or almost..) reco tilted scenario with PU + '2023LRecoPU':['GenSimFull','DigiFullPU','RecoFullLocalPU'],#local reco scenario with PU } from Configuration.PyReleaseValidation.relval_steps import Kby From d9cf186c8f47d907dc4d7518716a61652ca0ef7f Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Fri, 10 Jun 2016 13:08:52 -0500 Subject: [PATCH 11/23] more changes to get phase2 reco running --- .../python/relval_steps.py | 30 +++++++++++++++++++ .../python/upgradeWorkflowComponents.py | 8 ++--- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 72289588a3f70..80b17d47ed3ce 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1697,6 +1697,35 @@ def lhegensim(fragment,howMuch): if k2 in PUDataSets: upgradeStepDict['RecoFull_trackingOnlyPU'][k]=merge([PUDataSets[k2],upgradeStepDict['RecoFull_trackingOnly'][k]]) + upgradeStepDict['RecoFullGlobal'][k] = {'-s':'RAW2DIGI,L1Reco,RECO', + '--conditions':gt, + '--datatier':'GEN-SIM-RECO', + '-n':'10', + '--runUnscheduled':'', + '--eventcontent':'FEVTDEBUGHLT', + '--geometry' : geom + } + if cust!=None : upgradeStepDict['RecoFullGlobal'][k]['--customise']=cust + if era is not None: upgradeStepDict['RecoFullGlobal'][k]['--era']=era + + if k2 in PUDataSets: + upgradeStepDict['RecoFullGlobalPU'][k]=merge([PUDataSets[k2],upgradeStepDict['RecoFullGlobal'][k]]) + + upgradeStepDict['RecoFullGlobal_trackingOnlyVal'][k] = {'-s':'RAW2DIGI,L1Reco,RECO,VALIDATION:@trackingOnlyValidation,DQM:@trackingOnlyDQM', + '--conditions':gt, + '--datatier':'GEN-SIM-RECO,DQMIO', + '-n':'10', + '--runUnscheduled':'', + '--eventcontent':'FEVTDEBUGHLT,DQM', + '--geometry' : geom + } + if cust!=None : upgradeStepDict['RecoFullGlobal_trackingOnlyVal'][k]['--customise']=cust + if era is not None: upgradeStepDict['RecoFullGlobal_trackingOnlyVal'][k]['--era']=era + + if k2 in PUDataSets: + upgradeStepDict['RecoFullGlobal_trackingOnlyValPU'][k]=merge([PUDataSets[k2],upgradeStepDict['RecoFullGlobal_trackingOnlyVal'][k]]) + + upgradeStepDict['RecoFullLocal'][k] = {'-s':'RAW2DIGI,L1Reco,RECO:localreco', '--conditions':gt, '--datatier':'GEN-SIM-RECO', @@ -1710,6 +1739,7 @@ def lhegensim(fragment,howMuch): if k2 in PUDataSets: upgradeStepDict['RecoFullLocalPU'][k]=merge([PUDataSets[k2],upgradeStepDict['RecoFullLocal'][k]]) + upgradeStepDict['RecoFullHGCAL'][k] = {'-s':'RAW2DIGI,L1Reco,RECO', '--conditions':gt, '--datatier':'GEN-SIM-RECO', diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index df33e34062623..2c3aa8d46e78b 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -103,7 +103,7 @@ # step6 is fastsim # step7 is fastsim harvesting -upgradeSteps=['GenSimFull','GenSimHLBeamSpotFull','DigiFull','RecoFullLocal','RecoFullLocalPU','RecoFull','RecoFullHGCAL','HARVESTFull','DigiTrkTrigFull','FastSim','HARVESTFast','DigiFullPU','RecoFullPU','RecoFullPUHGCAL','RecoFullPUTracking','HARVESTFullPU','DigiFullTrigger','RecoFull_trackingOnly','RecoFull_trackingOnlyPU','HARVESTFull_trackingOnly', 'HARVESTFull_trackingOnlyPU'] +upgradeSteps=['GenSimFull','GenSimHLBeamSpotFull','DigiFull','RecoFullLocal','RecoFullLocalPU','RecoFull','RecoFullGlobal','RecoFullGlobalPU','RecoFullGlobal_trackingOnlyVal','RecoFullGlobal_trackingOnlyValPU','RecoFullHGCAL','HARVESTFull','DigiTrkTrigFull','FastSim','HARVESTFast','DigiFullPU','RecoFullPU','RecoFullPUHGCAL','RecoFullPUTracking','HARVESTFullPU','DigiFullTrigger','RecoFull_trackingOnly','RecoFull_trackingOnlyPU','HARVESTFull_trackingOnly', 'HARVESTFull_trackingOnlyPU'] upgradeScenToRun={ '2017':['GenSimFull','DigiFull','RecoFull','HARVESTFull'], #'2017':['GenSimFull'], @@ -112,9 +112,9 @@ '2023tilted':['GenSimFull','DigiFull','RecoFull','HARVESTFull_trackingOnly'],#full (or almost..) reco tilted scenario + tracking valdqm '2023sim':['GenSimFull'],#sim scenario '2023LReco':['GenSimFull','DigiFull','RecoFullLocal'],#local reco scenario - '2023GReco':['GenSimFull','DigiFull','RecoFull', 'HARVESTFull_trackingOnly'],#full (or almost..) reco scenario - '2023GRecoPU':['GenSimFull','DigiFullPU','RecoFullPU', 'HARVESTFull_trackingOnlyPU'],#full (or almost..) reco scenario with PU - '2023tiltedPU':['GenSimFull','DigiFullPU','RecoFullPU', 'HARVESTFull_trackingOnlyPU']#full (or almost..) reco tilted scenario with PU + '2023GReco':['GenSimFull','DigiFull','RecoFullGlobal_trackingOnlyVal','HARVESTFull_trackingOnly'],#full (or almost..) reco scenario + '2023GRecoPU':['GenSimFull','DigiFullPU','RecoFullGlobal_trackingOnlyValPU', 'HARVESTFull_trackingOnlyPU'],#full (or almost..) reco scenario with PU + '2023tiltedPU':['GenSimFull','DigiFullPU','RecoFullPU', 'HARVESTFull_trackingOnlyPU'],#full (or almost..) reco tilted scenario with PU '2023LRecoPU':['GenSimFull','DigiFullPU','RecoFullLocalPU'],#local reco scenario with PU } From 292f9444479680f574c38ca27e7d19e15ea67ec5 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Fri, 10 Jun 2016 13:52:56 -0500 Subject: [PATCH 12/23] some fixes for tilted tracker --- .../PyReleaseValidation/python/upgradeWorkflowComponents.py | 4 ++-- .../python/cmsExtendedGeometry2023tiltedXML_cfi.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index 2c3aa8d46e78b..0384012c16a94 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -109,12 +109,12 @@ #'2017':['GenSimFull'], '2017PU':['GenSimFull','DigiFullPU','RecoFullPU','HARVESTFullPU'],#full sequence '2023':['GenSimFull','DigiFull','RecoFull'],#full sequence - '2023tilted':['GenSimFull','DigiFull','RecoFull','HARVESTFull_trackingOnly'],#full (or almost..) reco tilted scenario + tracking valdqm + '2023tilted':['GenSimFull','DigiFull','RecoFullGlobal_trackingOnlyVal','HARVESTFull_trackingOnly'],#full (or almost..) reco tilted scenario '2023sim':['GenSimFull'],#sim scenario '2023LReco':['GenSimFull','DigiFull','RecoFullLocal'],#local reco scenario '2023GReco':['GenSimFull','DigiFull','RecoFullGlobal_trackingOnlyVal','HARVESTFull_trackingOnly'],#full (or almost..) reco scenario '2023GRecoPU':['GenSimFull','DigiFullPU','RecoFullGlobal_trackingOnlyValPU', 'HARVESTFull_trackingOnlyPU'],#full (or almost..) reco scenario with PU - '2023tiltedPU':['GenSimFull','DigiFullPU','RecoFullPU', 'HARVESTFull_trackingOnlyPU'],#full (or almost..) reco tilted scenario with PU + '2023tiltedPU':['GenSimFull','DigiFullPU','RecoFullGlobal_trackingOnlyValPU', 'HARVESTFull_trackingOnlyPU'],#full (or almost..) reco tilted scenario with PU '2023LRecoPU':['GenSimFull','DigiFullPU','RecoFullLocalPU'],#local reco scenario with PU } diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py index f0cb70bd8205a..53ce31fcd44a1 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py @@ -139,6 +139,7 @@ 'Geometry/CSCGeometryBuilder/data/cscSpecsFilter.xml', 'Geometry/CSCGeometryBuilder/data/cscSpecs.xml', 'Geometry/RPCGeometryBuilder/data/PhaseII/RPCSpecs.xml', + 'Geometry/GEMGeometryBuilder/data/GEMSpecsFilter.xml', 'Geometry/GEMGeometryBuilder/data/v5/GEMSpecs.xml', 'Geometry/ForwardCommonData/data/brmsens.xml', 'Geometry/ForwardSimData/data/castorsens.xml', From 9ce6220e9b1aeaf3dbdce93b57f2a0572ffd0f65 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Tue, 14 Jun 2016 12:02:21 -0500 Subject: [PATCH 13/23] propagate Phase2 Era refactoring --- Configuration/StandardSequences/python/Digi_cff.py | 4 ++-- Configuration/StandardSequences/python/Eras.py | 1 + .../HGCalRecProducers/test/testHGCalRecoLocal_cfg.py | 2 +- Validation/HGCalValidation/test/digiValidation_cfg.py | 2 +- Validation/HGCalValidation/test/rechitValidation_cfg.py | 2 +- Validation/HGCalValidation/test/simHitValidation_cfg.py | 2 +- Validation/HGCalValidation/test/testHGCalBHValid_cfg.py | 2 +- Validation/HGCalValidation/test/testHGCalSimWatcher_cfg.py | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Configuration/StandardSequences/python/Digi_cff.py b/Configuration/StandardSequences/python/Digi_cff.py index 1f445a4e2994c..56441b3093804 100644 --- a/Configuration/StandardSequences/python/Digi_cff.py +++ b/Configuration/StandardSequences/python/Digi_cff.py @@ -44,13 +44,13 @@ from FastSimulation.Configuration.DigiAliases_cff import generalTracks,ecalPreshowerDigis,ecalDigis,hcalDigis,muonDTDigis,muonCSCDigis,muonRPCDigis #phase 2 common mods -def _modifyDigitizerPhase2Common( theProcess ): +def _modifyDigitizerPhase2Hcal( theProcess ): from CalibCalorimetry.HcalPlugins.Hcal_Conditions_forGlobalTag_cff import hcal_db_producer as _hcal_db_producer, es_hardcode as _es_hardcode, es_prefer_hcalHardcode as _es_prefer_hcalHardcode theProcess.hcal_db_producer = _hcal_db_producer theProcess.es_hardcode = _es_hardcode theProcess.es_prefer_hcalHardcode = _es_prefer_hcalHardcode from Configuration.StandardSequences.Eras import eras -modifyDigitizerPhase2Common_ = eras.phase2_common.makeProcessModifier( _modifyDigitizerPhase2Common ) +modifyDigitizerPhase2Hcal_ = eras.phase2_hcal.makeProcessModifier( _modifyDigitizerPhase2Hcal ) diff --git a/Configuration/StandardSequences/python/Eras.py b/Configuration/StandardSequences/python/Eras.py index 633c4eedab68a..148092eaef199 100644 --- a/Configuration/StandardSequences/python/Eras.py +++ b/Configuration/StandardSequences/python/Eras.py @@ -83,6 +83,7 @@ def __init__(self): self.phase1Pixel, self.run3_GEM, self.phase2_common, self.phase2_tracker, self.phase2_hgcal, self.phase2_muon, + self.phase2_hcal, self.trackingLowPU, self.trackingPhase1, self.trackingPhase1PU70, ] diff --git a/RecoLocalCalo/HGCalRecProducers/test/testHGCalRecoLocal_cfg.py b/RecoLocalCalo/HGCalRecProducers/test/testHGCalRecoLocal_cfg.py index 51cc9a02e0f84..66677e24a1ac7 100644 --- a/RecoLocalCalo/HGCalRecProducers/test/testHGCalRecoLocal_cfg.py +++ b/RecoLocalCalo/HGCalRecProducers/test/testHGCalRecoLocal_cfg.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms from Configuration.StandardSequences.Eras import eras -process = cms.Process("testHGCalRecoLocal",eras.Phase2) +process = cms.Process("testHGCalRecoLocal",eras.Phase2LReco) # import of standard configurations process.load('Configuration.StandardSequences.Services_cff') diff --git a/Validation/HGCalValidation/test/digiValidation_cfg.py b/Validation/HGCalValidation/test/digiValidation_cfg.py index f54f533c49821..50e8179167ae6 100644 --- a/Validation/HGCalValidation/test/digiValidation_cfg.py +++ b/Validation/HGCalValidation/test/digiValidation_cfg.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms from Configuration.StandardSequences.Eras import eras -process = cms.Process('SIM',eras.Phase2) +process = cms.Process('SIM',eras.Phase2LReco) # import of standard configurations process.load('Configuration.StandardSequences.Services_cff') diff --git a/Validation/HGCalValidation/test/rechitValidation_cfg.py b/Validation/HGCalValidation/test/rechitValidation_cfg.py index 1ce8756200fe4..edee727eb95fa 100644 --- a/Validation/HGCalValidation/test/rechitValidation_cfg.py +++ b/Validation/HGCalValidation/test/rechitValidation_cfg.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms from Configuration.StandardSequences.Eras import eras -process = cms.Process('SIMDIGIRECO',eras.Phase2) +process = cms.Process('SIMDIGIRECO',eras.Phase2LReco) # import of standard configurations process.load('Configuration.StandardSequences.Services_cff') diff --git a/Validation/HGCalValidation/test/simHitValidation_cfg.py b/Validation/HGCalValidation/test/simHitValidation_cfg.py index 34758bf9a54f4..c7c6c0d0c7b94 100644 --- a/Validation/HGCalValidation/test/simHitValidation_cfg.py +++ b/Validation/HGCalValidation/test/simHitValidation_cfg.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms from Configuration.StandardSequences.Eras import eras -process = cms.Process("SIM",eras.Phase2) +process = cms.Process("SIM",eras.Phase2LReco) # import of standard configurations process.load('Configuration.StandardSequences.Services_cff') diff --git a/Validation/HGCalValidation/test/testHGCalBHValid_cfg.py b/Validation/HGCalValidation/test/testHGCalBHValid_cfg.py index 0351b7385296d..117c7ffbb59cb 100644 --- a/Validation/HGCalValidation/test/testHGCalBHValid_cfg.py +++ b/Validation/HGCalValidation/test/testHGCalBHValid_cfg.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms from Configuration.StandardSequences.Eras import eras -process = cms.Process("testHGCalRecoLocal",eras.Phase2) +process = cms.Process("testHGCalRecoLocal",eras.Phase2LReco) # import of standard configurations process.load('Configuration.StandardSequences.Services_cff') diff --git a/Validation/HGCalValidation/test/testHGCalSimWatcher_cfg.py b/Validation/HGCalValidation/test/testHGCalSimWatcher_cfg.py index da969bac127a0..5f247e1590e32 100644 --- a/Validation/HGCalValidation/test/testHGCalSimWatcher_cfg.py +++ b/Validation/HGCalValidation/test/testHGCalSimWatcher_cfg.py @@ -1,7 +1,7 @@ import FWCore.ParameterSet.Config as cms from Configuration.StandardSequences.Eras import eras -process = cms.Process("testHGCalRecoLocal",eras.Phase2) +process = cms.Process("testHGCalRecoLocal",eras.Phase2LReco) # import of standard configurations process.load('Configuration.StandardSequences.Services_cff') From 5f07ef017f1d67030c510fd09cdab4f3e98efd9f Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Wed, 15 Jun 2016 08:17:53 -0500 Subject: [PATCH 14/23] address some code review comments --- DataFormats/TrackerRecHit2D/src/classes_def.xml | 1 + ...terRemoverPhase2_cfi.py => seedClusterRemoverPhase2_cfi.py} | 0 .../IterativeTracking/python/Phase2PU140_ElectronSeeds_cff.py | 3 +-- 3 files changed, 2 insertions(+), 2 deletions(-) rename RecoLocalTracker/SubCollectionProducers/python/{SeedClusterRemoverPhase2_cfi.py => seedClusterRemoverPhase2_cfi.py} (100%) diff --git a/DataFormats/TrackerRecHit2D/src/classes_def.xml b/DataFormats/TrackerRecHit2D/src/classes_def.xml index e6e40fff6b666..6e9727f251c39 100644 --- a/DataFormats/TrackerRecHit2D/src/classes_def.xml +++ b/DataFormats/TrackerRecHit2D/src/classes_def.xml @@ -119,6 +119,7 @@ + diff --git a/RecoLocalTracker/SubCollectionProducers/python/SeedClusterRemoverPhase2_cfi.py b/RecoLocalTracker/SubCollectionProducers/python/seedClusterRemoverPhase2_cfi.py similarity index 100% rename from RecoLocalTracker/SubCollectionProducers/python/SeedClusterRemoverPhase2_cfi.py rename to RecoLocalTracker/SubCollectionProducers/python/seedClusterRemoverPhase2_cfi.py diff --git a/RecoTracker/IterativeTracking/python/Phase2PU140_ElectronSeeds_cff.py b/RecoTracker/IterativeTracking/python/Phase2PU140_ElectronSeeds_cff.py index c1d220c518020..64e46cf3dad50 100644 --- a/RecoTracker/IterativeTracking/python/Phase2PU140_ElectronSeeds_cff.py +++ b/RecoTracker/IterativeTracking/python/Phase2PU140_ElectronSeeds_cff.py @@ -1,6 +1,6 @@ import FWCore.ParameterSet.Config as cms -from RecoLocalTracker.SubCollectionProducers.SeedClusterRemoverPhase2_cfi import seedClusterRemoverPhase2 +from RecoLocalTracker.SubCollectionProducers.seedClusterRemoverPhase2_cfi import seedClusterRemoverPhase2 initialStepSeedClusterMask = seedClusterRemoverPhase2.clone( trajectories = cms.InputTag("initialStepSeeds"), oldClusterRemovalInfo = cms.InputTag("highPtTripletStepClusters") @@ -56,7 +56,6 @@ tripletElectronSeeds.SeedCreatorPSet.magneticField = '' tripletElectronSeeds.SeedCreatorPSet.propagator = 'PropagatorWithMaterial' -from RecoLocalTracker.SubCollectionProducers.SeedClusterRemoverPhase2_cfi import seedClusterRemoverPhase2 tripletElectronClusterMask = seedClusterRemoverPhase2.clone( trajectories = cms.InputTag("tripletElectronSeeds"), oldClusterRemovalInfo = cms.InputTag("pixelLessStepSeedClusterMask") From b7a250f46e2e3566680d1e62e1875927a53e5bd9 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Wed, 15 Jun 2016 11:58:14 -0500 Subject: [PATCH 15/23] simplify upgrade WF naming scheme --- .../python/relval_steps.py | 27 +++++-------------- .../python/upgradeWorkflowComponents.py | 10 +++---- 2 files changed, 12 insertions(+), 25 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 80b17d47ed3ce..1c955045e8d9c 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1692,26 +1692,14 @@ def lhegensim(fragment,howMuch): if k2 in PUDataSets: upgradeStepDict['RecoFullPU'][k]=merge([PUDataSets[k2],upgradeStepDict['RecoFull'][k]]) + upgradeStepDict['RecoFull_trackingOnly'][k] = merge([step3_trackingOnly, upgradeStepDict['RecoFull'][k]]) if k2 in PUDataSets: upgradeStepDict['RecoFull_trackingOnlyPU'][k]=merge([PUDataSets[k2],upgradeStepDict['RecoFull_trackingOnly'][k]]) - upgradeStepDict['RecoFullGlobal'][k] = {'-s':'RAW2DIGI,L1Reco,RECO', - '--conditions':gt, - '--datatier':'GEN-SIM-RECO', - '-n':'10', - '--runUnscheduled':'', - '--eventcontent':'FEVTDEBUGHLT', - '--geometry' : geom - } - if cust!=None : upgradeStepDict['RecoFullGlobal'][k]['--customise']=cust - if era is not None: upgradeStepDict['RecoFullGlobal'][k]['--era']=era - - if k2 in PUDataSets: - upgradeStepDict['RecoFullGlobalPU'][k]=merge([PUDataSets[k2],upgradeStepDict['RecoFullGlobal'][k]]) - upgradeStepDict['RecoFullGlobal_trackingOnlyVal'][k] = {'-s':'RAW2DIGI,L1Reco,RECO,VALIDATION:@trackingOnlyValidation,DQM:@trackingOnlyDQM', + upgradeStepDict['RecoFullGlobal'][k] = {'-s':'RAW2DIGI,L1Reco,RECO,VALIDATION:@trackingOnlyValidation,DQM:@trackingOnlyDQM', '--conditions':gt, '--datatier':'GEN-SIM-RECO,DQMIO', '-n':'10', @@ -1719,12 +1707,11 @@ def lhegensim(fragment,howMuch): '--eventcontent':'FEVTDEBUGHLT,DQM', '--geometry' : geom } - if cust!=None : upgradeStepDict['RecoFullGlobal_trackingOnlyVal'][k]['--customise']=cust - if era is not None: upgradeStepDict['RecoFullGlobal_trackingOnlyVal'][k]['--era']=era + if cust!=None : upgradeStepDict['RecoFullGlobal'][k]['--customise']=cust + if era is not None: upgradeStepDict['RecoFullGlobal'][k]['--era']=era if k2 in PUDataSets: - upgradeStepDict['RecoFullGlobal_trackingOnlyValPU'][k]=merge([PUDataSets[k2],upgradeStepDict['RecoFullGlobal_trackingOnlyVal'][k]]) - + upgradeStepDict['RecoFullGlobalPU'][k]=merge([PUDataSets[k2],upgradeStepDict['RecoFullGlobal'][k]]) upgradeStepDict['RecoFullLocal'][k] = {'-s':'RAW2DIGI,L1Reco,RECO:localreco', '--conditions':gt, @@ -1767,10 +1754,10 @@ def lhegensim(fragment,howMuch): if k2 in PUDataSets: upgradeStepDict['HARVESTFullPU'][k]=merge([PUDataSets[k2],upgradeStepDict['HARVESTFull'][k]]) - upgradeStepDict['HARVESTFull_trackingOnly'][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, upgradeStepDict['HARVESTFull'][k]]) + upgradeStepDict['HARVESTFullGlobal'][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, upgradeStepDict['HARVESTFull'][k]]) if k2 in PUDataSets: - upgradeStepDict['HARVESTFull_trackingOnlyPU'][k]=merge([PUDataSets[k2],upgradeStepDict['HARVESTFull_trackingOnly'][k]]) + upgradeStepDict['HARVESTFullGlobalPU'][k]=merge([PUDataSets[k2],upgradeStepDict['HARVESTFullGlobal'][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 0384012c16a94..5cd31dd8efbf4 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -103,18 +103,18 @@ # step6 is fastsim # step7 is fastsim harvesting -upgradeSteps=['GenSimFull','GenSimHLBeamSpotFull','DigiFull','RecoFullLocal','RecoFullLocalPU','RecoFull','RecoFullGlobal','RecoFullGlobalPU','RecoFullGlobal_trackingOnlyVal','RecoFullGlobal_trackingOnlyValPU','RecoFullHGCAL','HARVESTFull','DigiTrkTrigFull','FastSim','HARVESTFast','DigiFullPU','RecoFullPU','RecoFullPUHGCAL','RecoFullPUTracking','HARVESTFullPU','DigiFullTrigger','RecoFull_trackingOnly','RecoFull_trackingOnlyPU','HARVESTFull_trackingOnly', 'HARVESTFull_trackingOnlyPU'] +upgradeSteps=['GenSimFull','GenSimHLBeamSpotFull','DigiFull','RecoFullLocal','RecoFullLocalPU','RecoFull','RecoFullGlobal','RecoFullGlobalPU','RecoFullHGCAL','HARVESTFull','DigiTrkTrigFull','FastSim','HARVESTFast','DigiFullPU','RecoFullPU','RecoFullPUHGCAL','RecoFullPUTracking','HARVESTFullPU','DigiFullTrigger','RecoFull_trackingOnly','RecoFull_trackingOnlyPU','HARVESTFullGlobal', 'HARVESTFullGlobalPU'] upgradeScenToRun={ '2017':['GenSimFull','DigiFull','RecoFull','HARVESTFull'], #'2017':['GenSimFull'], '2017PU':['GenSimFull','DigiFullPU','RecoFullPU','HARVESTFullPU'],#full sequence '2023':['GenSimFull','DigiFull','RecoFull'],#full sequence - '2023tilted':['GenSimFull','DigiFull','RecoFullGlobal_trackingOnlyVal','HARVESTFull_trackingOnly'],#full (or almost..) reco tilted scenario + '2023tilted':['GenSimFull','DigiFull','RecoFullGlobal','HARVESTFullGlobal'],#full (or almost..) reco tilted scenario '2023sim':['GenSimFull'],#sim scenario '2023LReco':['GenSimFull','DigiFull','RecoFullLocal'],#local reco scenario - '2023GReco':['GenSimFull','DigiFull','RecoFullGlobal_trackingOnlyVal','HARVESTFull_trackingOnly'],#full (or almost..) reco scenario - '2023GRecoPU':['GenSimFull','DigiFullPU','RecoFullGlobal_trackingOnlyValPU', 'HARVESTFull_trackingOnlyPU'],#full (or almost..) reco scenario with PU - '2023tiltedPU':['GenSimFull','DigiFullPU','RecoFullGlobal_trackingOnlyValPU', 'HARVESTFull_trackingOnlyPU'],#full (or almost..) reco tilted scenario with PU + '2023GReco':['GenSimFull','DigiFull','RecoFullGlobal','HARVESTFullGlobal'],#full (or almost..) reco scenario + '2023GRecoPU':['GenSimFull','DigiFullPU','RecoFullGlobalPU', 'HARVESTFullGlobalPU'],#full (or almost..) reco scenario with PU + '2023tiltedPU':['GenSimFull','DigiFullPU','RecoFullGlobalPU', 'HARVESTFullGlobalPU'],#full (or almost..) reco tilted scenario with PU '2023LRecoPU':['GenSimFull','DigiFullPU','RecoFullLocalPU'],#local reco scenario with PU } From 47282922e3b8f3c7d15140c7e5f68d0ff357b3b0 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Wed, 15 Jun 2016 17:19:35 -0500 Subject: [PATCH 16/23] restore HARVESTFull_trackingOnly --- Configuration/PyReleaseValidation/python/relval_steps.py | 2 ++ .../PyReleaseValidation/python/upgradeWorkflowComponents.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 1c955045e8d9c..4bef37c036b0f 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1754,9 +1754,11 @@ def lhegensim(fragment,howMuch): if k2 in PUDataSets: upgradeStepDict['HARVESTFullPU'][k]=merge([PUDataSets[k2],upgradeStepDict['HARVESTFull'][k]]) + upgradeStepDict['HARVESTFull_trackingOnly'][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, upgradeStepDict['HARVESTFull'][k]]) upgradeStepDict['HARVESTFullGlobal'][k] = merge([{'-s': 'HARVESTING:@trackingOnlyValidation+@trackingOnlyDQM'}, upgradeStepDict['HARVESTFull'][k]]) if k2 in PUDataSets: + upgradeStepDict['HARVESTFull_trackingOnlyPU'][k]=merge([PUDataSets[k2],upgradeStepDict['HARVESTFull_trackingOnly'][k]]) upgradeStepDict['HARVESTFullGlobalPU'][k]=merge([PUDataSets[k2],upgradeStepDict['HARVESTFullGlobal'][k]]) upgradeStepDict['FastSim'][k]={'-s':'GEN,SIM,RECO,VALIDATION', diff --git a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py index 5cd31dd8efbf4..16637b0fdc1ec 100644 --- a/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py +++ b/Configuration/PyReleaseValidation/python/upgradeWorkflowComponents.py @@ -103,7 +103,7 @@ # step6 is fastsim # step7 is fastsim harvesting -upgradeSteps=['GenSimFull','GenSimHLBeamSpotFull','DigiFull','RecoFullLocal','RecoFullLocalPU','RecoFull','RecoFullGlobal','RecoFullGlobalPU','RecoFullHGCAL','HARVESTFull','DigiTrkTrigFull','FastSim','HARVESTFast','DigiFullPU','RecoFullPU','RecoFullPUHGCAL','RecoFullPUTracking','HARVESTFullPU','DigiFullTrigger','RecoFull_trackingOnly','RecoFull_trackingOnlyPU','HARVESTFullGlobal', 'HARVESTFullGlobalPU'] +upgradeSteps=['GenSimFull','GenSimHLBeamSpotFull','DigiFull','RecoFullLocal','RecoFullLocalPU','RecoFull','RecoFullGlobal','RecoFullGlobalPU','RecoFullHGCAL','HARVESTFull','DigiTrkTrigFull','FastSim','HARVESTFast','DigiFullPU','RecoFullPU','RecoFullPUHGCAL','RecoFullPUTracking','HARVESTFullPU','DigiFullTrigger','RecoFull_trackingOnly','RecoFull_trackingOnlyPU','HARVESTFull_trackingOnly','HARVESTFull_trackingOnlyPU','HARVESTFullGlobal','HARVESTFullGlobalPU'] upgradeScenToRun={ '2017':['GenSimFull','DigiFull','RecoFull','HARVESTFull'], #'2017':['GenSimFull'], From 8ed90b9a33eeb427248bca36907a4d1967d69c3c Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Thu, 16 Jun 2016 10:31:32 -0500 Subject: [PATCH 17/23] add special upgrade workflows for tracker validation --- .../python/relval_upgrade.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Configuration/PyReleaseValidation/python/relval_upgrade.py b/Configuration/PyReleaseValidation/python/relval_upgrade.py index 9ea20b15c3994..954f8478c3594 100644 --- a/Configuration/PyReleaseValidation/python/relval_upgrade.py +++ b/Configuration/PyReleaseValidation/python/relval_upgrade.py @@ -27,4 +27,24 @@ else: stepList.append(step+'_'+key) workflows[numWF] = [ upgradeDatasetFromFragment[frag], stepList] + + # special workflows for tracker + if upgradeDatasetFromFragment[frag]=="TTbar_13" and not 'PU' in key: + stepListTk=[] + hasHarvest = False + for step in upgradeScenToRun[key]: + if 'Reco' in step: + step = 'RecoFull_trackingOnly' + if 'HARVEST' in step: + step = 'HARVESTFull_trackingOnly' + hasHarvest = True + + if 'Sim' in step: + stepListTk.append(k+'_'+step) + else: + stepListTk.append(step+'_'+key) + + if hasHarvest: + workflows[numWF+0.1] = [ upgradeDatasetFromFragment[frag], stepListTk] + numWF+=1 From bbc26dc46be56e54bb16c0fd37ff8f713ab82b69 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Thu, 16 Jun 2016 10:59:22 -0500 Subject: [PATCH 18/23] blank defaultDataSets for 2023 PU workflows (need to specify minbias to run them) --- Configuration/PyReleaseValidation/python/relval_steps.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 4bef37c036b0f..ac4954da14c94 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -1576,9 +1576,9 @@ def lhegensim(fragment,howMuch): defaultDataSets={} defaultDataSets['2017']='CMSSW_8_1_0_pre5-80X_upgrade2017_realistic_v4_resubUPG17-v' -defaultDataSets['2023GReco']='CMSSW_8_1_0_pre4-80X_mcRun2_asymptotic_v13_2023LReco-v' -defaultDataSets['2023LReco']='CMSSW_8_1_0_pre4-80X_mcRun2_asymptotic_v13_2023LReco-v' -defaultDataSets['2023tilted']='CMSSW_8_1_0_pre4-80X_mcRun2_asymptotic_v13_2023tilted-v' +defaultDataSets['2023GReco']='' +defaultDataSets['2023LReco']='' +defaultDataSets['2023tilted']='' keys=defaultDataSets.keys() for key in keys: From 9fd0e9f5f4e57e726c263caf4701457f76e3989a Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Tue, 21 Jun 2016 07:55:24 -0500 Subject: [PATCH 19/23] add 2023GReco to relval test --- DetectorDescription/RegressionTest/test/run_DOMCount.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/DetectorDescription/RegressionTest/test/run_DOMCount.sh b/DetectorDescription/RegressionTest/test/run_DOMCount.sh index dd6992198c958..b399ecc3f4f0e 100755 --- a/DetectorDescription/RegressionTest/test/run_DOMCount.sh +++ b/DetectorDescription/RegressionTest/test/run_DOMCount.sh @@ -35,6 +35,7 @@ cfiFiles="${cfiFiles} Geometry/CMSCommonData/cmsExtendedGeometry2017devXML_cfi" cfiFiles="${cfiFiles} Geometry/CMSCommonData/cmsExtendedGeometry2019XML_cfi" cfiFiles="${cfiFiles} Geometry/CMSCommonData/cmsExtendedGeometry2023simXML_cfi" cfiFiles="${cfiFiles} Geometry/CMSCommonData/cmsExtendedGeometry2023tiltedXML_cfi" +cfiFiles="${cfiFiles} Geometry/CMSCommonData/cmsExtendedGeometry2023GRecoXML_cfi" cfiFiles="${cfiFiles} Geometry/CMSCommonData/cmsExtendedGeometryGFlashXML_cfi" cfiFiles="${cfiFiles} Geometry/CMSCommonData/cmsExtendedGeometryHFLibraryNoCastorXML_cfi" cfiFiles="${cfiFiles} Geometry/CMSCommonData/cmsExtendedGeometryHFLibraryXML_cfi" From c4710902ec14bfe947882e4f4fcf686194baafa4 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Tue, 21 Jun 2016 07:55:47 -0500 Subject: [PATCH 20/23] remove SiPixelTemplateDBObject warnings for Phase2 --- .../python/MergeDisplacedTrackCollections_cff.py | 5 +++++ .../GlobalTrackingTools/python/GlobalMuonRefitter_cff.py | 6 ++++++ .../python/GlobalTrajectoryBuilderCommon_cff.py | 9 +++++++++ .../MuonIdentification/python/TrackerKinkFinder_cfi.py | 6 ++++++ RecoMuon/TrackingTools/python/MuonTrackLoader_cff.py | 6 ++++++ .../PFTracking/python/trackerDrivenElectronSeeds_cfi.py | 5 +++++ .../python/MergeTrackCollections_cff.py | 6 ++++-- .../python/inOutSeedsFromTrackerMuons_cfi.py | 6 ++++++ RecoTracker/TrackProducer/python/TrackProducer_cfi.py | 6 ++++++ 9 files changed, 53 insertions(+), 2 deletions(-) diff --git a/RecoMuon/Configuration/python/MergeDisplacedTrackCollections_cff.py b/RecoMuon/Configuration/python/MergeDisplacedTrackCollections_cff.py index 3ae1d962b3716..40bfcd1c66862 100644 --- a/RecoMuon/Configuration/python/MergeDisplacedTrackCollections_cff.py +++ b/RecoMuon/Configuration/python/MergeDisplacedTrackCollections_cff.py @@ -46,3 +46,8 @@ duplicateDisplacedTrackClassifier* displacedTracks ) + +# This customization will be removed once we get the templates for +# phase2 pixel +from Configuration.StandardSequences.Eras import eras +eras.phase2_tracker.toModify(duplicateDisplacedTrackCandidates, ttrhBuilderName = "WithTrackAngle") # FIXME diff --git a/RecoMuon/GlobalTrackingTools/python/GlobalMuonRefitter_cff.py b/RecoMuon/GlobalTrackingTools/python/GlobalMuonRefitter_cff.py index a76d98f77468e..ffe26bc276c66 100644 --- a/RecoMuon/GlobalTrackingTools/python/GlobalMuonRefitter_cff.py +++ b/RecoMuon/GlobalTrackingTools/python/GlobalMuonRefitter_cff.py @@ -44,3 +44,9 @@ RefitFlag = cms.bool( True ) ) + +# This customization will be removed once we get the templates for +# phase2 pixel +from Configuration.StandardSequences.Eras import eras +eras.phase2_tracker.toModify(GlobalMuonRefitter, TrackerRecHitBuilder = 'WithTrackAngle') # FIXME + diff --git a/RecoMuon/GlobalTrackingTools/python/GlobalTrajectoryBuilderCommon_cff.py b/RecoMuon/GlobalTrackingTools/python/GlobalTrajectoryBuilderCommon_cff.py index 81af474114715..e65faf8af4933 100644 --- a/RecoMuon/GlobalTrackingTools/python/GlobalTrajectoryBuilderCommon_cff.py +++ b/RecoMuon/GlobalTrackingTools/python/GlobalTrajectoryBuilderCommon_cff.py @@ -68,3 +68,12 @@ RefitFlag = cms.bool(True) ), ) + +# This customization will be removed once we get the templates for +# phase2 pixel +from Configuration.StandardSequences.Eras import eras +eras.phase2_tracker.toModify(GlobalTrajectoryBuilderCommon, # FIXME + TrackerRecHitBuilder = 'WithTrackAngle', + TrackTransformer = dict(TrackerRecHitBuilder = 'WithTrackAngle'), + GlbRefitterParameters = dict(TrackerRecHitBuilder = 'WithTrackAngle'), +) diff --git a/RecoMuon/MuonIdentification/python/TrackerKinkFinder_cfi.py b/RecoMuon/MuonIdentification/python/TrackerKinkFinder_cfi.py index c9cd38b37b330..7096f27d144b2 100644 --- a/RecoMuon/MuonIdentification/python/TrackerKinkFinder_cfi.py +++ b/RecoMuon/MuonIdentification/python/TrackerKinkFinder_cfi.py @@ -17,3 +17,9 @@ Propagator = cms.string('SmartPropagatorAnyRKOpposite'), ) ) + +# This customization will be removed once we get the templates for +# phase2 pixel +from Configuration.StandardSequences.Eras import eras +eras.phase2_tracker.toModify(TrackerKinkFinderParametersBlock, TrackerKinkFinderParameters = dict(TrackerRecHitBuilder = 'WithTrackAngle')) # FIXME + diff --git a/RecoMuon/TrackingTools/python/MuonTrackLoader_cff.py b/RecoMuon/TrackingTools/python/MuonTrackLoader_cff.py index 83445e5ba1413..ec58af2253955 100644 --- a/RecoMuon/TrackingTools/python/MuonTrackLoader_cff.py +++ b/RecoMuon/TrackingTools/python/MuonTrackLoader_cff.py @@ -83,3 +83,9 @@ TTRHBuilder = cms.string('WithAngleAndTemplate') ) ) + +# This customization will be removed once we get the templates for +# phase2 pixel +from Configuration.StandardSequences.Eras import eras +eras.phase2_tracker.toModify(MuonTrackLoaderForGLB, TrackLoaderParameters = dict(TTRHBuilder = 'WithTrackAngle')) # FIXME + diff --git a/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py b/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py index 3dace92e9a49f..d1f89fd29ca55 100644 --- a/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py +++ b/RecoParticleFlow/PFTracking/python/trackerDrivenElectronSeeds_cfi.py @@ -48,3 +48,8 @@ PtThresholdSavePreId = cms.untracked.double(1.0), Min_dr = cms.double(0.2) ) + +# This customization will be removed once we get the templates for +# phase2 pixel +from Configuration.StandardSequences.Eras import eras +eras.phase2_tracker.toModify(trackerDrivenElectronSeeds, TTRHBuilder = 'WithTrackAngle') # FIXME diff --git a/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py b/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py index 914ed5c7fffaf..0ff5daedf4e3f 100644 --- a/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py +++ b/RecoTracker/FinalTrackSelectors/python/MergeTrackCollections_cff.py @@ -22,8 +22,10 @@ duplicateTrackClassifier.mva.minLayers = [0,0,0] duplicateTrackClassifier.mva.min3DLayers = [0,0,0] duplicateTrackClassifier.mva.maxLostLayers = [99,99,99] - - +# This customization will be removed once we get the templates for +# phase2 pixel +from Configuration.StandardSequences.Eras import eras +eras.phase2_tracker.toModify(duplicateTrackCandidates, ttrhBuilderName = "WithTrackAngle") # FIXME generalTracks = DuplicateListMerger.clone() generalTracks.originalSource = cms.InputTag("preDuplicateMergingGeneralTracks") diff --git a/RecoTracker/SpecialSeedGenerators/python/inOutSeedsFromTrackerMuons_cfi.py b/RecoTracker/SpecialSeedGenerators/python/inOutSeedsFromTrackerMuons_cfi.py index 50d799a9aeb28..0d1d78ff6a305 100644 --- a/RecoTracker/SpecialSeedGenerators/python/inOutSeedsFromTrackerMuons_cfi.py +++ b/RecoTracker/SpecialSeedGenerators/python/inOutSeedsFromTrackerMuons_cfi.py @@ -20,3 +20,9 @@ RefitRPCHits = cms.bool(True), Propagator = cms.string('SmartPropagatorAnyRKOpposite'), ) + +# This customization will be removed once we get the templates for +# phase2 pixel +from Configuration.StandardSequences.Eras import eras +eras.phase2_tracker.toModify(inOutSeedsFromTrackerMuons, TrackerRecHitBuilder = 'WithTrackAngle') # FIXME + diff --git a/RecoTracker/TrackProducer/python/TrackProducer_cfi.py b/RecoTracker/TrackProducer/python/TrackProducer_cfi.py index 3cf87c8a6a7c7..678f67b8ce70c 100644 --- a/RecoTracker/TrackProducer/python/TrackProducer_cfi.py +++ b/RecoTracker/TrackProducer/python/TrackProducer_cfi.py @@ -26,3 +26,9 @@ MeasurementTracker = cms.string(''), MeasurementTrackerEvent = cms.InputTag('MeasurementTrackerEvent'), ) + +# This customization will be removed once we get the templates for +# phase2 pixel +from Configuration.StandardSequences.Eras import eras +eras.phase2_tracker.toModify(TrackProducer, TTRHBuilder = 'WithTrackAngle') # FIXME + From e4b55c506c670b1e184c65524f4f672d9ecba78d Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Wed, 22 Jun 2016 10:38:52 -0500 Subject: [PATCH 21/23] skip preshower geom in EcalClusterLazyTools unless ES hits provided --- .../interface/EcalClusterLazyTools.h | 2 +- .../src/EcalClusterLazyTools.cc | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h b/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h index da5c62e855689..ec7302d6521aa 100644 --- a/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h +++ b/RecoEcal/EgammaCoreTools/interface/EcalClusterLazyTools.h @@ -63,7 +63,7 @@ class EcalClusterLazyToolsBase { // const EcalSeverityLevelAlgo *sevLv; protected: - void getGeometry( const edm::EventSetup &es ); + void getGeometry( const edm::EventSetup &es, bool doES=true ); void getTopology( const edm::EventSetup &es ); void getEBRecHits( const edm::Event &ev ); void getEERecHits( const edm::Event &ev ); diff --git a/RecoEcal/EgammaCoreTools/src/EcalClusterLazyTools.cc b/RecoEcal/EgammaCoreTools/src/EcalClusterLazyTools.cc index d5a795ad4b1a8..4185a783831d4 100644 --- a/RecoEcal/EgammaCoreTools/src/EcalClusterLazyTools.cc +++ b/RecoEcal/EgammaCoreTools/src/EcalClusterLazyTools.cc @@ -27,7 +27,7 @@ EcalClusterLazyToolsBase::EcalClusterLazyToolsBase( const edm::Event &ev, const ebRHToken_ = token1; eeRHToken_ = token2; - getGeometry( es ); + getGeometry( es , false ); getTopology( es ); getEBRecHits( ev ); getEERecHits( ev ); @@ -55,17 +55,22 @@ EcalClusterLazyToolsBase::EcalClusterLazyToolsBase( const edm::Event &ev, const EcalClusterLazyToolsBase::~EcalClusterLazyToolsBase() {} -void EcalClusterLazyToolsBase::getGeometry( const edm::EventSetup &es ) { +void EcalClusterLazyToolsBase::getGeometry( const edm::EventSetup &es, bool doES ) { edm::ESHandle pGeometry; es.get().get(pGeometry); geometry_ = pGeometry.product(); - const CaloSubdetectorGeometry *geometryES = geometry_->getSubdetectorGeometry(DetId::Ecal, EcalPreshower); - if (geometryES) { - ecalPS_topology_.reset(new EcalPreshowerTopology(geometry_)); - } else { + if(doES){ + const CaloSubdetectorGeometry *geometryES = geometry_->getSubdetectorGeometry(DetId::Ecal, EcalPreshower); + if (geometryES) { + ecalPS_topology_.reset(new EcalPreshowerTopology(geometry_)); + } else { + ecalPS_topology_.reset(); + edm::LogWarning("subdetector geometry not available") << "EcalPreshower geometry is missing" << std::endl; + } + } + else { ecalPS_topology_.reset(); - edm::LogWarning("subdetector geometry not available") << "EcalPreshower geometry is missing" << std::endl; } } From 48bee3ccf584827c4a6c989ec34de4af78350e80 Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Wed, 22 Jun 2016 10:39:15 -0500 Subject: [PATCH 22/23] reduce HCAL ME0 overlaps in 2023 geom --- .../python/cmsExtendedGeometry2023GRecoXML_cfi.py | 9 +++++---- .../python/cmsExtendedGeometry2023tiltedXML_cfi.py | 5 +++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py index 9ad1a223b614e..1ce321c6a1ac4 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023GRecoXML_cfi.py @@ -6,7 +6,7 @@ geomXMLFiles = cms.vstring('Geometry/CMSCommonData/data/PhaseII/materials.xml', 'Geometry/CMSCommonData/data/rotations.xml', 'Geometry/CMSCommonData/data/extend/cmsextent.xml', - 'Geometry/CMSCommonData/data/PhaseI/cms.xml', + 'Geometry/CMSCommonData/data/PhaseI/cms.xml', 'Geometry/CMSCommonData/data/cmsMother.xml', 'Geometry/CMSCommonData/data/cmsTracker.xml', 'Geometry/CMSCommonData/data/eta3/etaMax.xml', @@ -23,7 +23,7 @@ 'Geometry/TrackerCommonData/data/PhaseII/trackerParameters.xml', 'Geometry/TrackerCommonData/data/pixfwdCommon.xml', 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdMaterials.xml', - 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdCylinder.xml', + 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdCylinder.xml', 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwd.xml', 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdDisks.xml', 'Geometry/TrackerCommonData/data/PhaseII/FlatTracker/pixfwdInnerDisk1.xml', @@ -88,9 +88,10 @@ 'Geometry/EcalCommonData/data/eeB.xml', 'Geometry/EcalCommonData/data/ectkcable.xml', 'Geometry/HcalCommonData/data/hcalrotations.xml', - 'Geometry/HcalCommonData/data/hcalalgo.xml', + 'Geometry/HcalCommonData/data/PhaseII/hcalalgo.xml', + 'Geometry/HcalCommonData/data/hcalcablealgo.xml', 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', - 'Geometry/HcalCommonData/data/hcalendcapalgo.xml', + 'Geometry/HcalCommonData/data/PhaseII/hcalendcapalgo.xml', 'Geometry/HcalCommonData/data/hcalouteralgo.xml', 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', 'Geometry/HcalCommonData/data/Run2/hcalSimNumbering16a.xml', diff --git a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py index 53ce31fcd44a1..7b1f0c6c04e67 100644 --- a/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py +++ b/Geometry/CMSCommonData/python/cmsExtendedGeometry2023tiltedXML_cfi.py @@ -88,9 +88,10 @@ 'Geometry/EcalCommonData/data/eeB.xml', 'Geometry/EcalCommonData/data/ectkcable.xml', 'Geometry/HcalCommonData/data/hcalrotations.xml', - 'Geometry/HcalCommonData/data/hcalalgo.xml', + 'Geometry/HcalCommonData/data/PhaseII/hcalalgo.xml', + 'Geometry/HcalCommonData/data/hcalcablealgo.xml', 'Geometry/HcalCommonData/data/hcalbarrelalgo.xml', - 'Geometry/HcalCommonData/data/hcalendcapalgo.xml', + 'Geometry/HcalCommonData/data/PhaseII/hcalendcapalgo.xml', 'Geometry/HcalCommonData/data/hcalouteralgo.xml', 'Geometry/HcalCommonData/data/hcalforwardalgo.xml', 'Geometry/HcalCommonData/data/Run2/hcalSimNumbering16a.xml', From c14db63608323ec8cce1552d06db857b3b7b925a Mon Sep 17 00:00:00 2001 From: Kevin Pedro Date: Wed, 22 Jun 2016 19:00:16 -0500 Subject: [PATCH 23/23] LogWarning -> LogInfo for missing preshower geometry --- RecoEcal/EgammaCoreTools/src/EcalClusterLazyTools.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RecoEcal/EgammaCoreTools/src/EcalClusterLazyTools.cc b/RecoEcal/EgammaCoreTools/src/EcalClusterLazyTools.cc index 4185a783831d4..b94269e28065a 100644 --- a/RecoEcal/EgammaCoreTools/src/EcalClusterLazyTools.cc +++ b/RecoEcal/EgammaCoreTools/src/EcalClusterLazyTools.cc @@ -66,7 +66,7 @@ void EcalClusterLazyToolsBase::getGeometry( const edm::EventSetup &es, bool doES ecalPS_topology_.reset(new EcalPreshowerTopology(geometry_)); } else { ecalPS_topology_.reset(); - edm::LogWarning("subdetector geometry not available") << "EcalPreshower geometry is missing" << std::endl; + edm::LogInfo("subdetector geometry not available") << "EcalPreshower geometry is missing" << std::endl; } } else {