diff --git a/DataFormats/TrackerRecHit2D/interface/GSSiTrackerRecHit2DLocalPos.h b/DataFormats/TrackerRecHit2D/interface/GSSiTrackerRecHit2DLocalPos.h index 6ca1f37360bf2..4603099b239fd 100644 --- a/DataFormats/TrackerRecHit2D/interface/GSSiTrackerRecHit2DLocalPos.h +++ b/DataFormats/TrackerRecHit2D/interface/GSSiTrackerRecHit2DLocalPos.h @@ -47,7 +47,7 @@ class GSSiTrackerRecHit2DLocalPos : public BaseTrackerRecHit { void setId(int32_t id) {id_ = id;} void setEeId(int32_t eeId) {eeId_ = eeId;} - void setHitCombinationId(int32_t hitCombinationId) {hitCombinationId_ = hitCombinationId;} + virtual void setHitCombinationId(int32_t hitCombinationId) {hitCombinationId_ = hitCombinationId;} void addSimTrackId(int32_t simTrackId) {simTrackIds_.push_back(simTrackId);} void addSimTrackIds(const std::vector & simTrackIds) {simTrackIds_.insert(simTrackIds_.end(),simTrackIds.begin(),simTrackIds.end());} diff --git a/DataFormats/TrackerRecHit2D/interface/SiTrackerGSMatchedRecHit2D.h b/DataFormats/TrackerRecHit2D/interface/SiTrackerGSMatchedRecHit2D.h index 690964b6ca403..d8b642ed245c9 100644 --- a/DataFormats/TrackerRecHit2D/interface/SiTrackerGSMatchedRecHit2D.h +++ b/DataFormats/TrackerRecHit2D/interface/SiTrackerGSMatchedRecHit2D.h @@ -54,6 +54,12 @@ class SiTrackerGSMatchedRecHit2D : public GSSiTrackerRecHit2DLocalPos{ const SiTrackerGSRecHit2D & secondHit() const { return stereoHitFirst_ ? componentMono_ : componentStereo_;} void setStereoLayerFirst(bool stereoHitFirst = true){stereoHitFirst_ = stereoHitFirst;} + void setHitCombinationId(int32_t hitCombinationId){ + GSSiTrackerRecHit2DLocalPos::setHitCombinationId(hitCombinationId); + componentMono_.setHitCombinationId(hitCombinationId); + componentStereo_.setHitCombinationId(hitCombinationId); + } + private: bool isMatched_; diff --git a/FastSimulation/Tracking/plugins/FastTrackingMaskProducer.cc b/FastSimulation/Tracking/plugins/FastTrackingMaskProducer.cc new file mode 100644 index 0000000000000..8d01acd086cd0 --- /dev/null +++ b/FastSimulation/Tracking/plugins/FastTrackingMaskProducer.cc @@ -0,0 +1,175 @@ +// -*- C++ -*- +// +// Package: FastSimulation/FastTrackingMaskProducer +// Class: FastTrackingMaskProducer +// +/**\class FastTrackingMaskProducer FastTrackingMaskProducer.cc FastSimulation/Tracking/plugins/FastTrackingMaskProducer.cc + Description: The class creates two vectors with booleans - hitMasks and hitCombinationMasks. Both of the vectors are filled + with 'false' values unless the id of a specific rechit has to be masked. The number of entry inside a vector represents the + id of a hit. + + TODO: Consider implementing Chi2 method ascit is done in the FullSim +*/ +// +// Original Author: Vilius Kripas +// Created: Mon, 22 Jun 2015 15:08:57 GMT +// +// +#include +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/Framework/interface/EventSetup.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/Framework/interface/ESHandle.h" +#include "DataFormats/Common/interface/Handle.h" +#include "DataFormats/Common/interface/OwnVector.h" +#include "DataFormats/TrackerRecHit2D/interface/SiTrackerGSRecHit2DCollection.h" +#include "DataFormats/TrackerRecHit2D/interface/SiTrackerGSMatchedRecHit2DCollection.h" +#include "DataFormats/TrackerRecHit2D/interface/SiTrackerGSRecHit2D.h" +#include "DataFormats/TrackerRecHit2D/interface/SiTrackerGSMatchedRecHit2D.h" +#include "DataFormats/TrackReco/interface/TrackFwd.h" +#include "FastSimulation/Tracking/plugins/FastTrackingMaskProducer.h" +#include +#include + +FastTrackingMaskProducer::FastTrackingMaskProducer(const edm::ParameterSet& conf) + : oldHitMasks_exists_(false) + , oldHitCombinationMasks_exists_(false) + , overRideTrkQuals_(false) + , filterTracks_(false) +{ + // Main products + produces >("hitMasks"); + produces >("hitCombinationMasks"); + + // Track collection + edm::InputTag trackCollectionTag = conf.getParameter("trackCollection"); + trackToken_ = consumes(trackCollectionTag); + + // old hit masks + oldHitMasks_exists_ = conf.exists("oldHitMasks"); + if (oldHitMasks_exists_){ + edm::InputTag hitMasksTag = conf.getParameter("oldHitMasks"); + hitMasksToken_ = consumes >(hitMasksTag); + } + + // old hit combination masks + oldHitCombinationMasks_exists_ = conf.exists("oldHitCombinationMasks"); + if ( oldHitCombinationMasks_exists_){ + edm::InputTag hitCombinationMasksTag = conf.getParameter("oldHitCombinationMasks"); + hitCombinationMasksToken_ = consumes >(hitCombinationMasksTag); + } + + // read track quality from value map rather than from track itself + overRideTrkQuals_ = conf.exists("overrideTrkQuals"); + if( overRideTrkQuals_ ){ + edm::InputTag trkQualsTag = conf.getParameter("overrideTrkQuals"); + if(trkQualsTag == edm::InputTag("")) + overRideTrkQuals_ = false; + else + trkQualsToken_ = consumes >(trkQualsTag); + } + + // required track quality + trackQuality_=reco::TrackBase::undefQuality; + if (conf.exists("TrackQuality")){ + filterTracks_=true; + std::string trackQualityStr = conf.getParameter("TrackQuality"); + if ( !trackQualityStr.empty() ) { + trackQuality_=reco::TrackBase::qualityByName(trackQualityStr); + } + } +} + +void +FastTrackingMaskProducer::produce(edm::Event& e, const edm::EventSetup& es) +{ + // the products + std::auto_ptr > hitMasks(new std::vector()); + std::auto_ptr > hitCombinationMasks(new std::vector()); + + // The input track collection handle + edm::Handle trackCollection; + e.getByToken(trackToken_,trackCollection); + + // the track quality collection + edm::Handle > quals; + if ( overRideTrkQuals_ ) { + e.getByToken(trkQualsToken_,quals); + } + + // The input hitMasks handle + if (oldHitMasks_exists_ == true){ + edm::Handle > oldHitMasks; + e.getByToken(hitMasksToken_,oldHitMasks); + hitMasks->insert(hitMasks->begin(),oldHitMasks->begin(),oldHitMasks->end()); + } + + // The input hitCombinationMasks handle + if (oldHitCombinationMasks_exists_ == true){ + edm::Handle > oldHitCombinationMasks; + e.getByToken(hitCombinationMasksToken_,oldHitCombinationMasks); + hitCombinationMasks->insert(hitCombinationMasks->begin(),oldHitCombinationMasks->begin(),oldHitCombinationMasks->end()); + } + + int ngood = 0; + for (size_t i = 0 ; i!=trackCollection->size();++i) + { + + + const reco::Track & track = trackCollection->at(i); + reco::TrackRef trackRef(trackCollection,i); + if (filterTracks_) { + bool goodTk = true; + + if ( overRideTrkQuals_ ) { + int qual= (*quals)[trackRef]; + if ( qual < 0 ){ + goodTk=false; + } + else + goodTk = ( qual & (1<>trackQuality_; + } + else { + goodTk=(track.quality(trackQuality_)); + } + if ( !goodTk) continue; + } + ngood++; + + + // Loop over the recHits + // todo: implement the minimum number of measurements criterium + // see http://cmslxr.fnal.gov/lxr/source/RecoLocalTracker/SubCollectionProducers/src/TrackClusterRemover.cc#0166 + for (auto hitIt = track.recHitsBegin() ; hitIt != track.recHitsEnd(); ++hitIt) { + + if(!(*hitIt)->isValid()) + continue; + + const GSSiTrackerRecHit2DLocalPos * hit = dynamic_cast(*hitIt); + if(hit){ + uint32_t hitCombination_id = hit->hitCombinationId(); + if (hitCombination_id >= hitCombinationMasks->size()) { + hitCombinationMasks->resize(hitCombination_id+1,false); + } + hitCombinationMasks->at(hitCombination_id) = true; + + /* TODO implement hit id properly + uint32_t hit_id = hit->id(); + if (hit_id >= hitMasks->size()) { + hitMasks->resize(hit_id+1,false); + } + hitMasks->at(hit_id) = true; + */ + } + + else{ + continue; + // TODO: find out why the cast doesn't work every so many hits + } + } + } + + e.put(hitMasks,"hitMasks"); + e.put(hitCombinationMasks,"hitCombinationMasks"); +} + diff --git a/FastSimulation/Tracking/plugins/FastTrackingMaskProducer.h b/FastSimulation/Tracking/plugins/FastTrackingMaskProducer.h new file mode 100644 index 0000000000000..dd5a344b8362e --- /dev/null +++ b/FastSimulation/Tracking/plugins/FastTrackingMaskProducer.h @@ -0,0 +1,54 @@ +#ifndef FastSimulation_Tracking_FastTrackingMaskProducer_h +#define FastSimulation_Tracking_FastTrackingMaskProducer_h + +#include "FWCore/Framework/interface/stream/EDProducer.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/Common/interface/ValueMap.h" +#include "DataFormats/TrackReco/interface/Track.h" + + +#include +#include + +namespace edm { + class ParameterSet; + class Event; + class EventSetup; +} + +class FastTrackingMaskProducer : public edm::stream::EDProducer <> +{ + public: + + explicit FastTrackingMaskProducer(const edm::ParameterSet& conf); + + virtual ~FastTrackingMaskProducer() {} + + virtual void produce(edm::Event& e, const edm::EventSetup& es) override; + + + private: + + + + // consumes + edm::EDGetTokenT trackToken_; + edm::EDGetTokenT > hitMasksToken_; + edm::EDGetTokenT > hitCombinationMasksToken_; + edm::EDGetTokenT > trkQualsToken_; + // set value in constructor + bool oldHitMasks_exists_; + bool oldHitCombinationMasks_exists_; + bool overRideTrkQuals_; + bool filterTracks_; + reco::TrackBase::TrackQuality trackQuality_; + +}; + +#endif + + + + + + diff --git a/FastSimulation/Tracking/plugins/SealModule.cc b/FastSimulation/Tracking/plugins/SealModule.cc index c72cf74ce991c..c3ffbdef7a63e 100644 --- a/FastSimulation/Tracking/plugins/SealModule.cc +++ b/FastSimulation/Tracking/plugins/SealModule.cc @@ -2,18 +2,17 @@ #include "FastSimulation/Tracking/plugins/TrajectorySeedProducer.h" #include "FastSimulation/Tracking/plugins/TrackCandidateProducer.h" #include "FastSimulation/Tracking/plugins/PixelTracksProducer.h" -#include "FastSimulation/Tracking/plugins/SimTrackIdProducer.h" +#include "FastSimulation/Tracking/plugins/FastTrackingMaskProducer.h" #include "FastSimulation/Tracking/plugins/ElectronSeedTrackRefFix.h" #include "FastSimulation/Tracking/plugins/ConversionTrackRefFix.h" // reco::Track accumulator: #include "SimGeneral/MixingModule/interface/DigiAccumulatorMixModFactory.h" #include "FastSimulation/Tracking/plugins/RecoTrackAccumulator.h" - +DEFINE_FWK_MODULE(FastTrackingMaskProducer); DEFINE_FWK_MODULE(TrajectorySeedProducer); DEFINE_FWK_MODULE(ElectronSeedTrackRefFix); DEFINE_FWK_MODULE(TrackCandidateProducer); DEFINE_FWK_MODULE(PixelTracksProducer); -DEFINE_FWK_MODULE(SimTrackIdProducer); DEFINE_FWK_MODULE(ConversionTrackRefFix); DEFINE_DIGI_ACCUMULATOR(RecoTrackAccumulator); diff --git a/FastSimulation/Tracking/plugins/SimTrackIdProducer.cc b/FastSimulation/Tracking/plugins/SimTrackIdProducer.cc deleted file mode 100644 index 9b960fc7b9e94..0000000000000 --- a/FastSimulation/Tracking/plugins/SimTrackIdProducer.cc +++ /dev/null @@ -1,109 +0,0 @@ -// -*- C++ -*- -// -// Package: FastSimulation/SimTrackIdProducer -// Class: SimTrackIdProducer -// -/**\class SimTrackIdProducer SimTrackIdProducer.cc FastSimulation/SimTrackIdProducer/plugins/SimTrackIdProducer.cc - - Description: the class finds Ids of SimTracks by looping over all reco tracks, looking for a recHit in it, reading out the Id of the track, and storing it in SimTrackIds vector. - -*/ -// -// Original Author: Vilius Kripas -// Created: Fri, 24 Oct 2014 09:47:25 GMT -// -// -#include -#include "FWCore/Framework/interface/Event.h" -#include "FWCore/Framework/interface/EventSetup.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -#include "FWCore/Framework/interface/ESHandle.h" -#include "DataFormats/Common/interface/Handle.h" -#include "DataFormats/Common/interface/OwnVector.h" -#include "DataFormats/TrackerRecHit2D/interface/SiTrackerGSRecHit2DCollection.h" -#include "DataFormats/TrackerRecHit2D/interface/SiTrackerGSMatchedRecHit2DCollection.h" -#include "DataFormats/TrackReco/interface/TrackFwd.h" -#include "FastSimulation/Tracking/plugins/SimTrackIdProducer.h" -#include -#include - -SimTrackIdProducer::SimTrackIdProducer(const edm::ParameterSet& conf) -{ - //Main products - produces >(); - - // Input Tag - edm::InputTag trackCollectionTag = conf.getParameter("trackCollection"); - - maxChi2_ = conf.getParameter("maxChi2"); - - - if (conf.exists("overrideTrkQuals")) { - edm::InputTag overrideTrkQuals = conf.getParameter("overrideTrkQuals"); - if ( !(overrideTrkQuals==edm::InputTag("")) ) - overrideTrkQuals_.push_back( consumes >(overrideTrkQuals) ); - } - trackQuality_=reco::TrackBase::undefQuality; - filterTracks_=false; - if (conf.exists("TrackQuality")){ - filterTracks_=true; - std::string trackQuality = conf.getParameter("TrackQuality"); - if ( !trackQuality.empty() ) { - trackQuality_=reco::TrackBase::qualityByName(trackQuality); - } - } - - // consumes - trackToken = consumes(trackCollectionTag); -} - -void -SimTrackIdProducer::produce(edm::Event& e, const edm::EventSetup& es) -{ - // The produced object - std::auto_ptr > SimTrackIds(new std::vector()); - - // The input track collection handle - edm::Handle trackCollection; - e.getByToken(trackToken,trackCollection); - - std::vector > > quals; - if ( overrideTrkQuals_.size() > 0) { - quals.resize(1); - e.getByToken(overrideTrkQuals_[0],quals[0]); - } - - for (size_t i = 0 ; i!=trackCollection->size();++i) - { - const reco::Track & track = trackCollection->at(i); - reco::TrackRef trackRef(trackCollection,i); - if (filterTracks_) { - bool goodTk = true; - - if ( quals.size()!=0) { - int qual=(*(quals[0]))[trackRef]; - //std::cout << qual << std::endl; - if ( qual < 0 ) {goodTk=false;} - //note that this does not work for some trackquals (goodIterative or undefQuality) - else - goodTk = ( qual & (1<>trackQuality_; - } - else - goodTk=(track.quality(trackQuality_)); - if ( !goodTk) continue; - } - if(track.chi2()>maxChi2_) continue ; - - const TrackingRecHit * hit = *(track.recHitsBegin()); - if (hit) - { - const SiTrackerGSMatchedRecHit2D* fsimhit = dynamic_cast(hit); - if (fsimhit) - { - SimTrackIds->push_back(fsimhit->simTrackId(0)); - } - } - - } - e.put(SimTrackIds); -} diff --git a/FastSimulation/Tracking/plugins/SimTrackIdProducer.h b/FastSimulation/Tracking/plugins/SimTrackIdProducer.h deleted file mode 100644 index f96e4d35d1d1f..0000000000000 --- a/FastSimulation/Tracking/plugins/SimTrackIdProducer.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef FastSimulation_Tracking_SimTrackIdProducer_h -#define FastSimulation_Tracking_SimTrackIdProducer_h - -#include "FWCore/Framework/interface/stream/EDProducer.h" -#include "FWCore/Utilities/interface/InputTag.h" -#include "DataFormats/Common/interface/ValueMap.h" -#include "DataFormats/TrackReco/interface/Track.h" - - -#include -#include - -namespace edm { - class ParameterSet; - class Event; - class EventSetup; -} - -class SimTrackIdProducer : public edm::stream::EDProducer <> - { - public: - - explicit SimTrackIdProducer(const edm::ParameterSet& conf); - - virtual ~SimTrackIdProducer() {} - - virtual void produce(edm::Event& e, const edm::EventSetup& es) override; - - -private: - - // consumes - edm::EDGetTokenT trackToken; - double maxChi2_; - std::vector< edm::EDGetTokenT > > overrideTrkQuals_; - bool filterTracks_ = false; - reco::TrackBase::TrackQuality trackQuality_; - -}; - -#endif diff --git a/FastSimulation/Tracking/plugins/TrackCandidateProducer.cc b/FastSimulation/Tracking/plugins/TrackCandidateProducer.cc index 6ed963d36fa4c..ea55d153d079f 100644 --- a/FastSimulation/Tracking/plugins/TrackCandidateProducer.cc +++ b/FastSimulation/Tracking/plugins/TrackCandidateProducer.cc @@ -51,6 +51,12 @@ TrackCandidateProducer::TrackCandidateProducer(const edm::ParameterSet& conf) splitHits = conf.getParameter("SplitHits"); // input tags, labels, tokens + hitMasks_exists = conf.exists("hitMasks"); + if (hitMasks_exists){ + edm::InputTag hitMasksTag = conf.getParameter("hitMasks"); + hitMasksToken = consumes >(hitMasksTag); + } + edm::InputTag simTrackLabel = conf.getParameter("simTracks"); simVertexToken = consumes(simTrackLabel); simTrackToken = consumes(simTrackLabel); @@ -92,6 +98,14 @@ TrackCandidateProducer::produce(edm::Event& e, const edm::EventSetup& es) { edm::Handle simTracks; e.getByToken(simTrackToken,simTracks); + + std::auto_ptr > hitMasks(new std::vector()); + + // the hits to be skipped + if (hitMasks_exists == true){ + edm::Handle > hitMasks; + e.getByToken(hitMasksToken,hitMasks); + } // output collection std::auto_ptr output(new TrackCandidateCollection); @@ -114,6 +128,13 @@ TrackCandidateProducer::produce(edm::Event& e, const edm::EventSetup& es) { TrajectorySeedHitCandidate recHitCandidate; unsigned numberOfCrossedLayers = 0; for (const auto & _hit : recHitCombination) { + + if(hitMasks_exists + && size_t(_hit.id()) < hitMasks->size() + && hitMasks->at(_hit.id())) + { + continue; + } recHitCandidate = TrajectorySeedHitCandidate(&_hit,trackerGeometry.product(),trackerTopology.product()); if ( recHitCandidates.size() == 0 || !recHitCandidate.isOnTheSameLayer(recHitCandidates.back()) ) { ++numberOfCrossedLayers; diff --git a/FastSimulation/Tracking/plugins/TrackCandidateProducer.h b/FastSimulation/Tracking/plugins/TrackCandidateProducer.h index 9604681d4f140..3c08c614d2197 100644 --- a/FastSimulation/Tracking/plugins/TrackCandidateProducer.h +++ b/FastSimulation/Tracking/plugins/TrackCandidateProducer.h @@ -50,6 +50,7 @@ class TrackCandidateProducer : public edm::stream::EDProducer <> bool rejectOverlaps; bool splitHits; + bool hitMasks_exists; edm::InputTag simTracks_; @@ -58,6 +59,7 @@ class TrackCandidateProducer : public edm::stream::EDProducer <> edm::EDGetTokenT recHitToken; edm::EDGetTokenT simVertexToken; edm::EDGetTokenT simTrackToken; + edm::EDGetTokenT > hitMasksToken; std::string propagatorLabel; }; diff --git a/FastSimulation/Tracking/plugins/TrajectorySeedProducer.cc b/FastSimulation/Tracking/plugins/TrajectorySeedProducer.cc index 0ce3c1f168839..f598a2f036c5d 100644 --- a/FastSimulation/Tracking/plugins/TrajectorySeedProducer.cc +++ b/FastSimulation/Tracking/plugins/TrajectorySeedProducer.cc @@ -31,8 +31,6 @@ //Propagator withMaterial #include "TrackingTools/MaterialEffects/interface/PropagatorWithMaterial.h" -#include "FastSimulation/Tracking/plugins/SimTrackIdProducer.h" - #include @@ -53,22 +51,25 @@ TrajectorySeedProducer::TrajectorySeedProducer(const edm::ParameterSet& conf): // The name of the TrajectorySeed Collection produces(); - - const edm::ParameterSet& simTrackSelectionConfig = conf.getParameter("simTrackSelection"); // The smallest pT,dxy,dz for a simtrack simTrack_pTMin = simTrackSelectionConfig.getParameter("pTMin"); simTrack_maxD0 = simTrackSelectionConfig.getParameter("maxD0"); simTrack_maxZ0 = simTrackSelectionConfig.getParameter("maxZ0"); - //simtracks to skip (were processed in previous iterations) - std::vector skipSimTrackTags = simTrackSelectionConfig.getParameter >("skipSimTrackIds"); + + + hitMasks_exists = conf.exists("hitMasks"); + if (hitMasks_exists){ + edm::InputTag hitMasksTag = conf.getParameter("hitMasks"); + hitMasksToken = consumes >(hitMasksTag); + } - for ( unsigned int k=0; k >(skipSimTrackTags[k])); + hitCombinationMasks_exists = conf.exists("hitCombinationMasks"); + if (hitCombinationMasks_exists){ + edm::InputTag hitCombinationMasksTag = conf.getParameter ("hitCombinationMasks"); + hitCombinationMasksToken = consumes >(hitCombinationMasksTag); } - // The smallest number of hits for a track candidate minLayersCrossed = conf.getParameter("minLayersCrossed"); @@ -93,7 +94,7 @@ TrajectorySeedProducer::TrajectorySeedProducer(const edm::ParameterSet& conf): // The name of the hit producer edm::InputTag recHitTag = conf.getParameter("recHits"); - recHitToken = consumes(recHitTag); + recHitTokens = consumes(recHitTag); // read Layers std::vector layerStringList = conf.getParameter>("layerList"); @@ -251,39 +252,39 @@ TrajectorySeedProducer::pass2HitsCuts(const TrajectorySeedHitCandidate& hit1, co } const SeedingNode* TrajectorySeedProducer::insertHit( - const std::vector& trackerRecHits, - std::vector& hitIndicesInTree, - const SeedingNode* node, unsigned int trackerHit -) const + const std::vector& trackerRecHits, + std::vector& hitIndicesInTree, + const SeedingNode* node, unsigned int trackerHit + ) const { - if (!node->getParent() || hitIndicesInTree[node->getParent()->getIndex()]>=0) + if (!node->getParent() || hitIndicesInTree[node->getParent()->getIndex()]>=0) { - if (hitIndicesInTree[node->getIndex()]<0) + if (hitIndicesInTree[node->getIndex()]<0) { - const TrajectorySeedHitCandidate& currentTrackerHit = trackerRecHits[trackerHit]; - if (!isHitOnLayer(currentTrackerHit,node->getData())) + const TrajectorySeedHitCandidate& currentTrackerHit = trackerRecHits[trackerHit]; + if (!isHitOnLayer(currentTrackerHit,node->getData())) { - return nullptr; + return nullptr; } - if (!passHitTuplesCuts(*node,trackerRecHits,hitIndicesInTree,currentTrackerHit)) + if (!passHitTuplesCuts(*node,trackerRecHits,hitIndicesInTree,currentTrackerHit)) { - return nullptr; + return nullptr; } - hitIndicesInTree[node->getIndex()]=trackerHit; - if (node->getChildrenSize()==0) + hitIndicesInTree[node->getIndex()]=trackerHit; + if (node->getChildrenSize()==0) { - return node; + return node; } - return nullptr; + return nullptr; } - else + else { - for (unsigned int ichild = 0; ichildgetChildrenSize(); ++ichild) + for (unsigned int ichild = 0; ichildgetChildrenSize(); ++ichild) { - const SeedingNode* seed = insertHit(trackerRecHits,hitIndicesInTree,node->getChild(ichild),trackerHit); - if (seed) + const SeedingNode* seed = insertHit(trackerRecHits,hitIndicesInTree,node->getChild(ichild),trackerHit); + if (seed) { - return seed; + return seed; } } } @@ -293,80 +294,83 @@ const SeedingNode* TrajectorySeedProducer::insertHit( std::vector TrajectorySeedProducer::iterateHits( - unsigned int start, - const std::vector& trackerRecHits, - std::vector hitIndicesInTree, - bool processSkippedHits - ) const + unsigned int start, + const std::vector& trackerRecHits, + std::vector hitIndicesInTree, + bool processSkippedHits + ) const { - for (unsigned int irecHit = start; irecHit follow all possibilities by recusion - if (trackerRecHits[currentHitIndex].getTrackingLayer()==trackerRecHits[inext].getTrackingLayer()) - { - if (processSkippedHits) - { - //recusively call the method again with hit 'inext' but skip all following on the same layer though 'processSkippedHits=false' - std::vector seedHits = iterateHits( - inext, - trackerRecHits, - hitIndicesInTree, - false - ); - if (seedHits.size()>0) - { - return seedHits; + //if multiple hits are on the same layer -> follow all possibilities by recusion + if (trackerRecHits[currentHitIndex].getTrackingLayer()==trackerRecHits[inext].getTrackingLayer()) + { + if (processSkippedHits) + { + //recusively call the method again with hit 'inext' but skip all following on the same layer though 'processSkippedHits=false' + std::vector seedHits = iterateHits( + inext, + trackerRecHits, + hitIndicesInTree, + false + ); + if (seedHits.size()>0) + { + return seedHits; } } - irecHit+=1; - } - else - { - break; + irecHit+=1; } + else + { + break; + } } - - processSkippedHits=true; - - const SeedingNode* seedNode = nullptr; - for (unsigned int iroot=0; seedNode==nullptr && iroot<_seedingTree.numberOfRoots(); ++iroot) - { - seedNode=insertHit(trackerRecHits,hitIndicesInTree,_seedingTree.getRoot(iroot), currentHitIndex); - } - if (seedNode) - { - std::vector seedIndices(seedNode->getDepth()+1); - while (seedNode) - { - seedIndices[seedNode->getDepth()]=hitIndicesInTree[seedNode->getIndex()]; - seedNode=seedNode->getParent(); - } - return seedIndices; - } - + + processSkippedHits=true; + + const SeedingNode* seedNode = nullptr; + for (unsigned int iroot=0; seedNode==nullptr && iroot<_seedingTree.numberOfRoots(); ++iroot) + { + seedNode=insertHit(trackerRecHits,hitIndicesInTree,_seedingTree.getRoot(iroot), currentHitIndex); + } + if (seedNode) + { + std::vector seedIndices(seedNode->getDepth()+1); + while (seedNode) + { + seedIndices[seedNode->getDepth()]=hitIndicesInTree[seedNode->getIndex()]; + seedNode=seedNode->getParent(); + } + return seedIndices; + } + } - - return std::vector(); - + + return std::vector(); + } void TrajectorySeedProducer::produce(edm::Event& e, const edm::EventSetup& es) { - PTrajectoryStateOnDet initialState; - // the tracks to be skipped - std::unordered_set skipSimTrackIds; - for ( unsigned int i=0; i > skipSimTrackIds_temp; - e.getByToken(skipSimTrackIdTokens[i],skipSimTrackIds_temp); - skipSimTrackIds.insert(skipSimTrackIds_temp->begin(),skipSimTrackIds_temp->end()); - } + // the tracks to be skipped + edm::Handle > hitMasks; + if (hitMasks_exists){ + e.getByToken(hitMasksToken,hitMasks); + } + + edm::Handle > hitCombinationMasks; + if (hitCombinationMasks_exists){ + e.getByToken(hitCombinationMasksToken,hitCombinationMasks); + } + + // Beam spot if (testBeamspotCompatibility) { @@ -391,130 +395,136 @@ TrajectorySeedProducer::produce(edm::Event& e, const edm::EventSetup& es) e.getByToken(simVertexToken,theSimVtx); edm::Handle recHitCombinations; - e.getByToken(recHitToken, recHitCombinations); + e.getByToken(recHitTokens, recHitCombinations); std::auto_ptr output{new TrajectorySeedCollection()}; - - for (const auto & recHitCombination : *recHitCombinations) - { - - uint32_t currentSimTrackId = recHitCombination.back().simTrackId(0); - - if(skipSimTrackIds.find(currentSimTrackId)!=skipSimTrackIds.end()) - { - continue; - } - - const SimTrack& theSimTrack = (*theSimTracks)[currentSimTrackId]; - - int vertexIndex = theSimTrack.vertIndex(); - if (vertexIndex<0) - { - //tracks are required to be associated to a vertex - continue; - } - const SimVertex& theSimVertex = (*theSimVtx)[vertexIndex]; - - if (!this->passSimTrackQualityCuts(theSimTrack,theSimVertex)) - { - continue; - } - - TrajectorySeedHitCandidate previousTrackerHit; - TrajectorySeedHitCandidate currentTrackerHit; - unsigned int layersCrossed=0; - - std::vector trackerRecHits; - for (const auto & _hit : recHitCombination ) - { - previousTrackerHit=currentTrackerHit; - - currentTrackerHit = TrajectorySeedHitCandidate(&_hit,trackerGeometry,trackerTopology); - - if (!currentTrackerHit.isOnTheSameLayer(previousTrackerHit)) - { - ++layersCrossed; - } - if (_seedingTree.getSingleSet().find(currentTrackerHit.getTrackingLayer())!=_seedingTree.getSingleSet().end()) - { - //add only the hits which are actually on the requested layers - trackerRecHits.push_back(std::move(currentTrackerHit)); - } - } - - if ( layersCrossed < minLayersCrossed) + + for ( unsigned icomb=0; icombsize(); ++icomb) + { + if(hitCombinationMasks_exists + && icomb < hitCombinationMasks->size() + && hitCombinationMasks->at(icomb)) { + continue; + } + + FastTMRecHitCombination recHitCombination = recHitCombinations->at(icomb); + + uint32_t simTrackId = recHitCombination.back().simTrackId(0); + const SimTrack& theSimTrack = (*theSimTracks)[simTrackId]; + int vertexIndex = theSimTrack.vertIndex(); + if (vertexIndex<0) + { + //tracks are required to be associated to a vertex + continue; + } + const SimVertex& theSimVertex = (*theSimVtx)[vertexIndex]; + + if (!this->passSimTrackQualityCuts(theSimTrack,theSimVertex)) + { + continue; + } + + TrajectorySeedHitCandidate previousTrackerHit; + TrajectorySeedHitCandidate currentTrackerHit; + unsigned int layersCrossed=0; + + + std::vector trackerRecHits; + for (const auto & _hit : recHitCombination ) + { + if(hitMasks_exists + && size_t(_hit.id()) < hitMasks->size() + && hitMasks->at(_hit.id())) + { + continue; + } + + previousTrackerHit=currentTrackerHit; + + currentTrackerHit = TrajectorySeedHitCandidate(&_hit,trackerGeometry,trackerTopology); + + if (!currentTrackerHit.isOnTheSameLayer(previousTrackerHit)) + { + ++layersCrossed; + } + if (_seedingTree.getSingleSet().find(currentTrackerHit.getTrackingLayer())!=_seedingTree.getSingleSet().end()) + { + //add only the hits which are actually on the requested layers + trackerRecHits.push_back(std::move(currentTrackerHit)); + } + } + + if ( layersCrossed < minLayersCrossed) { - continue; + continue; } - - std::vector hitIndicesInTree(_seedingTree.numberOfNodes(),-1); - //A SeedingNode is associated by its index to this list. The list stores the indices of the hits in 'trackerRecHits' - /* example - SeedingNode | hit index | hit - ------------------------------------------------------------------------------- - index= 0: [BPix1] | hitIndicesInTree[0] (=1) | trackerRecHits[1] - index= 1: -- [BPix2] | hitIndicesInTree[1] (=3) | trackerRecHits[3] - index= 2: -- -- [BPix3] | hitIndicesInTree[2] (=4) | trackerRecHits[4] - index= 3: -- -- [FPix1_pos] | hitIndicesInTree[3] (=6) | trackerRecHits[6] - index= 4: -- -- [FPix1_neg] | hitIndicesInTree[4] (=7) | trackerRecHits[7] - - The implementation has been chosen such that the tree only needs to be build once upon construction. - */ - - std::vector seedHitNumbers = iterateHits(0,trackerRecHits,hitIndicesInTree,true); - - if (seedHitNumbers.size()>0) + + std::vector hitIndicesInTree(_seedingTree.numberOfNodes(),-1); + //A SeedingNode is associated by its index to this list. The list stores the indices of the hits in 'trackerRecHits' + /* example + SeedingNode | hit index | hit + ------------------------------------------------------------------------------- + index= 0: [BPix1] | hitIndicesInTree[0] (=1) | trackerRecHits[1] + index= 1: -- [BPix2] | hitIndicesInTree[1] (=3) | trackerRecHits[3] + index= 2: -- -- [BPix3] | hitIndicesInTree[2] (=4) | trackerRecHits[4] + index= 3: -- -- [FPix1_pos] | hitIndicesInTree[3] (=6) | trackerRecHits[6] + index= 4: -- -- [FPix1_neg] | hitIndicesInTree[4] (=7) | trackerRecHits[7] + + The implementation has been chosen such that the tree only needs to be build once upon construction. + */ + + std::vector seedHitNumbers = iterateHits(0,trackerRecHits,hitIndicesInTree,true); + + if (seedHitNumbers.size()>0) { - edm::OwnVector recHits; - for ( unsigned ihit=0; ihit recHits; + for ( unsigned ihit=0; ihitclone(); - recHits.push_back(aTrackingRecHit); + TrackingRecHit* aTrackingRecHit = trackerRecHits[seedHitNumbers[ihit]].hit()->clone(); + recHits.push_back(aTrackingRecHit); } - GlobalPoint position((*theSimVtx)[vertexIndex].position().x(), - (*theSimVtx)[vertexIndex].position().y(), - (*theSimVtx)[vertexIndex].position().z()); - - GlobalVector momentum(theSimTrack.momentum().x(),theSimTrack.momentum().y(),theSimTrack.momentum().z()); - float charge = theSimTrack.charge(); - GlobalTrajectoryParameters initialParams(position,momentum,(int)charge,magneticField); - AlgebraicSymMatrix55 errorMatrix= AlgebraicMatrixID(); - //this line help the fit succeed in the case of pixelless tracks (4th and 5th iteration) - //for the future: probably the best thing is to use the mini-kalmanFilter - if(trackerRecHits[seedHitNumbers[0]].subDetId() !=1 ||trackerRecHits[seedHitNumbers[0]].subDetId() !=2) + GlobalPoint position((*theSimVtx)[vertexIndex].position().x(), + (*theSimVtx)[vertexIndex].position().y(), + (*theSimVtx)[vertexIndex].position().z()); + + GlobalVector momentum(theSimTrack.momentum().x(),theSimTrack.momentum().y(),theSimTrack.momentum().z()); + float charge = theSimTrack.charge(); + GlobalTrajectoryParameters initialParams(position,momentum,(int)charge,magneticField); + AlgebraicSymMatrix55 errorMatrix= AlgebraicMatrixID(); + //this line help the fit succeed in the case of pixelless tracks (4th and 5th iteration) + //for the future: probably the best thing is to use the mini-kalmanFilter + if(trackerRecHits[seedHitNumbers[0]].subDetId() !=1 ||trackerRecHits[seedHitNumbers[0]].subDetId() !=2) { - errorMatrix = errorMatrix * 0.0000001; + errorMatrix = errorMatrix * 0.0000001; } - CurvilinearTrajectoryError initialError(errorMatrix); - FreeTrajectoryState initialFTS(initialParams, initialError); - - const GeomDet* initialLayer = trackerGeometry->idToDet( recHits.back().geographicalId() ); - const TrajectoryStateOnSurface initialTSOS = thePropagator->propagate(initialFTS,initialLayer->surface()) ; - - if (!initialTSOS.isValid()) - { - continue; //continues with the next seeding algorithm - } - - const AlgebraicSymMatrix55& m = initialTSOS.localError().matrix(); - int dim = 5; /// should check if corresponds to m - float localErrors[15]; - int k = 0; - for (int i=0; iidToDet( recHits.back().geographicalId() ); + const TrajectoryStateOnSurface initialTSOS = thePropagator->propagate(initialFTS,initialLayer->surface()) ; + + if (!initialTSOS.isValid()) { - for (int j=0; j<=i; ++j) - { - localErrors[k++] = m(i,j); - } + break; } - int surfaceSide = static_cast(initialTSOS.surfaceSide()); - initialState = PTrajectoryStateOnDet( initialTSOS.localParameters(),initialTSOS.globalMomentum().perp(),localErrors, recHits.back().geographicalId().rawId(), surfaceSide); - output->push_back(TrajectorySeed(initialState, recHits, PropagationDirection::alongMomentum)); - - } - } //end loop over simtracks - - + + const AlgebraicSymMatrix55& m = initialTSOS.localError().matrix(); + int dim = 5; /// should check if corresponds to m + float localErrors[15]; + int k = 0; + for (int i=0; i(initialTSOS.surfaceSide()); + PTrajectoryStateOnDet initialState = PTrajectoryStateOnDet( initialTSOS.localParameters(),initialTSOS.globalMomentum().perp(),localErrors, recHits.back().geographicalId().rawId(), surfaceSide); + output->push_back(TrajectorySeed(initialState, recHits, PropagationDirection::alongMomentum)); + + } + } //end loop over recHitCombinations e.put(output); } @@ -561,9 +571,9 @@ TrajectorySeedProducer::compatibleWithBeamSpot( // Check if the constraints are satisfied // 1. pT at cylinder with radius originRadius if ((ptMin>0) && ( myPart.Pt() < ptMin )) - { + { return false; - } + } // 2. Z compatible with beam spot size // in constuctur only one of originHalfLength,nSigmaZ is allowed to be >= 0 double zConstraint = std::max(originHalfLength,beamSpot->sigmaZ()*nSigmaZ); diff --git a/FastSimulation/Tracking/plugins/TrajectorySeedProducer.h b/FastSimulation/Tracking/plugins/TrajectorySeedProducer.h index bf410b38a8aa0..a5e8a861fc48a 100644 --- a/FastSimulation/Tracking/plugins/TrajectorySeedProducer.h +++ b/FastSimulation/Tracking/plugins/TrajectorySeedProducer.h @@ -56,7 +56,9 @@ class TrajectorySeedProducer: double ptMin; double originHalfLength; double nSigmaZ; - + + bool hitMasks_exists; + bool hitCombinationMasks_exists; bool testBeamspotCompatibility; const reco::BeamSpot* beamSpot; bool testPrimaryVertexCompatibility; @@ -65,10 +67,11 @@ class TrajectorySeedProducer: edm::EDGetTokenT beamSpotToken; edm::EDGetTokenT simTrackToken; edm::EDGetTokenT simVertexToken; - edm::EDGetTokenT recHitToken; + edm::EDGetTokenT recHitTokens; + edm::EDGetTokenT recHitToken; edm::EDGetTokenT recoVertexToken; - std::vector > > skipSimTrackIdTokens; - + edm::EDGetTokenT > hitMasksToken; + edm::EDGetTokenT > hitCombinationMasksToken; public: TrajectorySeedProducer(const edm::ParameterSet& conf); diff --git a/FastSimulation/Tracking/python/DetachedTripletStep_cff.py b/FastSimulation/Tracking/python/DetachedTripletStep_cff.py index a489fc9bf7213..d61fd8da6bffe 100644 --- a/FastSimulation/Tracking/python/DetachedTripletStep_cff.py +++ b/FastSimulation/Tracking/python/DetachedTripletStep_cff.py @@ -1,30 +1,31 @@ import FWCore.ParameterSet.Config as cms # import the full tracking equivalent of this file -import RecoTracker.IterativeTracking.DetachedTripletStep_cff -# simtrack id producer -import FastSimulation.Tracking.SimTrackIdProducer_cfi -detachedTripletStepSimTrackIds = FastSimulation.Tracking.SimTrackIdProducer_cfi.simTrackIdProducer.clone( - #tracjectories = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepClusters.trajectories.value(), - trackCollection = cms.InputTag("initialStepTracks"), - TrackQuality = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepClusters.TrackQuality, - maxChi2 = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepClusters.maxChi2, - overrideTrkQuals = cms.InputTag('initialStep') - ) +import RecoTracker.IterativeTracking.DetachedTripletStep_cff as _detachedTripletStep + +# fast tracking mask producer +import FastSimulation.Tracking.FastTrackingMaskProducer_cfi +detachedTripletStepMasks = FastSimulation.Tracking.FastTrackingMaskProducer_cfi.fastTrackingMaskProducer.clone( + trackCollection = _detachedTripletStep.detachedTripletStepClusters.trajectories, + TrackQuality = _detachedTripletStep.detachedTripletStepClusters.TrackQuality, + overrideTrkQuals = _detachedTripletStep.detachedTripletStepClusters.overrideTrkQuals +) + # trajectory seeds import FastSimulation.Tracking.TrajectorySeedProducer_cfi detachedTripletStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone( simTrackSelection = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.simTrackSelection.clone( - skipSimTrackIds = [cms.InputTag("detachedTripletStepSimTrackIds")], pTMin = 0.02, maxD0 = 30.0, maxZ0 = 50 ), minLayersCrossed = 3, - ptMin = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.ptMin, - originHalfLength = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.originHalfLength, - originRadius = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.originRadius, - layerList = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepSeedLayers.layerList.value() + #hitMasks = cms.InputTag("detachedTripletStepMasks","hitMasks"), + hitCombinationMasks = cms.InputTag("detachedTripletStepMasks","hitCombinationMasks"), + ptMin = _detachedTripletStep.detachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.ptMin, + originHalfLength = _detachedTripletStep.detachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.originHalfLength, + originRadius = _detachedTripletStep.detachedTripletStepSeeds.RegionFactoryPSet.RegionPSet.originRadius, + layerList = _detachedTripletStep.detachedTripletStepSeedLayers.layerList.value() ) # track candidates @@ -32,10 +33,11 @@ detachedTripletStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone( src = cms.InputTag("detachedTripletStepSeeds"), MinNumberOfCrossedLayers = 3 + #hitMasks = cms.InputTag("detachedTripletStepMasks","hitMasks"), ) # tracks -detachedTripletStepTracks = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepTracks.clone( +detachedTripletStepTracks = _detachedTripletStep.detachedTripletStepTracks.clone( Fitter = 'KFFittingSmootherSecond', TTRHBuilder = 'WithoutRefit', Propagator = 'PropagatorWithMaterial' @@ -43,12 +45,12 @@ ) #final selection -detachedTripletStepSelector = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepSelector.clone() +detachedTripletStepSelector = _detachedTripletStep.detachedTripletStepSelector.clone() detachedTripletStepSelector.vertices = "firstStepPrimaryVerticesBeforeMixing" -detachedTripletStep = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStep.clone() +detachedTripletStep = _detachedTripletStep.detachedTripletStep.clone() # Final sequence -DetachedTripletStep = cms.Sequence(detachedTripletStepSimTrackIds +DetachedTripletStep = cms.Sequence(detachedTripletStepMasks +detachedTripletStepSeeds +detachedTripletStepTrackCandidates +detachedTripletStepTracks diff --git a/FastSimulation/Tracking/python/FastTrackingMaskProducer_cfi.py b/FastSimulation/Tracking/python/FastTrackingMaskProducer_cfi.py new file mode 100644 index 0000000000000..8f1a208fbee1d --- /dev/null +++ b/FastSimulation/Tracking/python/FastTrackingMaskProducer_cfi.py @@ -0,0 +1,11 @@ +import FWCore.ParameterSet.Config as cms + +# comment + +fastTrackingMaskProducer = cms.EDProducer("FastTrackingMaskProducer", + + + ) + + + diff --git a/FastSimulation/Tracking/python/GlobalPixelSeedProducerForElectrons_cff.py b/FastSimulation/Tracking/python/GlobalPixelSeedProducerForElectrons_cff.py index 778c8e6aa1a20..f5d7326fb58c7 100644 --- a/FastSimulation/Tracking/python/GlobalPixelSeedProducerForElectrons_cff.py +++ b/FastSimulation/Tracking/python/GlobalPixelSeedProducerForElectrons_cff.py @@ -19,7 +19,8 @@ 'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg', ) -globalPixelSeedsForElectrons.simTrackSelection.skipSimTrackIds = [cms.InputTag("globalPixelStepIds")] +#globalPixelSeedsForElectrons.simTrackSelection.skipSimTrackIds = [cms.InputTag("globalPixelStepIds")] + #globalPixelSeedsForElectrons.zVertexConstraint = cms.double(0.5) globalPixelSeedsForElectrons.originRadius = cms.double(0.02) globalPixelSeedsForElectrons.originpTMin = cms.double(1.5) @@ -43,7 +44,7 @@ 'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg', ) -globalPixelSeedsForPhotons.simTrackSelection.skipSimTrackIds = [cms.InputTag("globalPixelStepIds")] +#globalPixelSeedsForPhotons.simTrackSelection.skipSimTrackIds = [cms.InputTag("globalPixelStepIds")] globalPixelSeedsForPhotons.originRadius = cms.double(0.02) globalPixelSeedsForPhotons.originpTMin = cms.double(1.5) diff --git a/FastSimulation/Tracking/python/GlobalPixelTracking_cff.py b/FastSimulation/Tracking/python/GlobalPixelTracking_cff.py index cf63edcb63353..b8f1dfd69b1ba 100644 --- a/FastSimulation/Tracking/python/GlobalPixelTracking_cff.py +++ b/FastSimulation/Tracking/python/GlobalPixelTracking_cff.py @@ -21,9 +21,17 @@ globalPixelWithMaterialTracks.TrajectoryInEvent = cms.bool(True) # simtrack id producer -globalPixelStepIds = cms.EDProducer("SimTrackIdProducer", - trackCollection = cms.InputTag("globalPixelWithMaterialTracks"), - ) +#globalPixelStepIds = cms.EDProducer("SimTrackIdProducer", +# trackCollection = cms.InputTag("globalPixelWithMaterialTracks"), +# ) + +# fast tracking mask producer +from FastSimulation.Tracking.FastTrackingMaskProducer_cfi import fastTrackingMaskProducer as _fastTrackingMaskProducer +globalPixelStepFastTrackingMasks = _fastTrackingMaskProducer.clone( + trackCollection = cms.InputTag("globalPixelWithMaterialTracks"), + # TrackQuality = RecoTracker.IterativeTracking.LowPtTripletStep_cff.lowPtTripletStepClusters.TrackQuality, + # overrideTrkQuals = cms.InputTag('detachedTripletStep') +) ################### @@ -58,7 +66,8 @@ globalPixelTracking = cms.Sequence(globalPixelSeeds* globalPixelTrackCandidates* globalPixelWithMaterialTracks* - globalPixelStepIds* + #globalPixelStepIds* + globalPixelStepFastTrackingMasks* globalPixelSeedsForPhotons* globalPixelTrackCandidatesForPhotons* globalPixelWithMaterialTracksForPhotons* diff --git a/FastSimulation/Tracking/python/InitialStep_cff.py b/FastSimulation/Tracking/python/InitialStep_cff.py index 43bb0bef1cf7f..7ff50be9c7bd5 100644 --- a/FastSimulation/Tracking/python/InitialStep_cff.py +++ b/FastSimulation/Tracking/python/InitialStep_cff.py @@ -46,6 +46,5 @@ +firstStepPrimaryVerticesBeforeMixing +initialStepSelector +initialStep - # +initialStepSimTrackIds ) diff --git a/FastSimulation/Tracking/python/LowPtTripletStep_cff.py b/FastSimulation/Tracking/python/LowPtTripletStep_cff.py index e5aafe38c8785..df947a98943d1 100644 --- a/FastSimulation/Tracking/python/LowPtTripletStep_cff.py +++ b/FastSimulation/Tracking/python/LowPtTripletStep_cff.py @@ -1,29 +1,30 @@ + import FWCore.ParameterSet.Config as cms # import the full tracking equivalent of this file import RecoTracker.IterativeTracking.LowPtTripletStep_cff -# simtrack id producer -import FastSimulation.Tracking.SimTrackIdProducer_cfi -lowPtTripletStepSimTrackIds = FastSimulation.Tracking.SimTrackIdProducer_cfi.simTrackIdProducer.clone( +# fast tracking mask producer +from FastSimulation.Tracking.FastTrackingMaskProducer_cfi import fastTrackingMaskProducer as _fastTrackingMaskProducer +lowPtTripletStepMasks = _fastTrackingMaskProducer.clone( trackCollection = cms.InputTag("detachedTripletStepTracks"), TrackQuality = RecoTracker.IterativeTracking.LowPtTripletStep_cff.lowPtTripletStepClusters.TrackQuality, - maxChi2 = RecoTracker.IterativeTracking.LowPtTripletStep_cff.lowPtTripletStepClusters.maxChi2, - overrideTrkQuals = cms.InputTag('detachedTripletStep') -) + overrideTrkQuals = cms.InputTag('detachedTripletStep'), + oldHitCombinationMasks = cms.InputTag("detachedTripletStepMasks","hitCombinationMasks"), + oldHitMasks = cms.InputTag("detachedTripletStepMasks","hitMasks") + ) # trajectory seeds import FastSimulation.Tracking.TrajectorySeedProducer_cfi lowPtTripletStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone( simTrackSelection = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.simTrackSelection.clone( - skipSimTrackIds = [ - cms.InputTag("detachedTripletStepSimTrackIds"), - cms.InputTag("lowPtTripletStepSimTrackIds")], pTMin = 0.1, maxD0 = 5.0, maxZ0 = 50 ), minLayersCrossed = 3, + #hitMasks = cms.InputTag("lowPtTripletStepMasks","hitMasks"), + hitCombinationMasks = cms.InputTag("lowPtTripletStepMasks","hitCombinationMasks"), nSigmaZ = RecoTracker.IterativeTracking.LowPtTripletStep_cff.lowPtTripletStepSeeds.RegionFactoryPSet.RegionPSet.nSigmaZ, ptMin = RecoTracker.IterativeTracking.LowPtTripletStep_cff.lowPtTripletStepSeeds.RegionFactoryPSet.RegionPSet.ptMin, originRadius = RecoTracker.IterativeTracking.LowPtTripletStep_cff.lowPtTripletStepSeeds.RegionFactoryPSet.RegionPSet.originRadius, @@ -35,6 +36,7 @@ lowPtTripletStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone( src = cms.InputTag("lowPtTripletStepSeeds"), MinNumberOfCrossedLayers = 3 + #hitMasks = cms.InputTag("lowPtTripletStepMasks","hitMasks"), ) # tracks @@ -49,7 +51,7 @@ lowPtTripletStepSelector.vertices = "firstStepPrimaryVerticesBeforeMixing" # Final swquence -LowPtTripletStep = cms.Sequence(lowPtTripletStepSimTrackIds +LowPtTripletStep = cms.Sequence(lowPtTripletStepMasks +lowPtTripletStepSeeds +lowPtTripletStepTrackCandidates +lowPtTripletStepTracks diff --git a/FastSimulation/Tracking/python/MixedTripletStep_cff.py b/FastSimulation/Tracking/python/MixedTripletStep_cff.py index b5a3cc34fa3f2..8d45eb7a289af 100644 --- a/FastSimulation/Tracking/python/MixedTripletStep_cff.py +++ b/FastSimulation/Tracking/python/MixedTripletStep_cff.py @@ -3,29 +3,27 @@ # import the full tracking equivalent of this file import RecoTracker.IterativeTracking.MixedTripletStep_cff -# simtrack id producer -import FastSimulation.Tracking.SimTrackIdProducer_cfi -mixedTripletStepSimTrackIds=FastSimulation.Tracking.SimTrackIdProducer_cfi.simTrackIdProducer.clone( +# fast tracking mask producer +from FastSimulation.Tracking.FastTrackingMaskProducer_cfi import fastTrackingMaskProducer as _fastTrackingMaskProducer +mixedTripletStepMasks = _fastTrackingMaskProducer.clone( trackCollection = cms.InputTag("pixelPairStepTracks"), TrackQuality = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepClusters.TrackQuality, - maxChi2 = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepClusters.maxChi2, - overrideTrkQuals = cms.InputTag('pixelPairStepSelector','pixelPairStep') + overrideTrkQuals = cms.InputTag('pixelPairStepSelector','pixelPairStep'), + oldHitCombinationMasks = cms.InputTag("pixelPairStepMasks","hitCombinationMasks"), + oldHitMasks = cms.InputTag("pixelPairStepMasks","hitMasks") ) # trajectory seeds import FastSimulation.Tracking.TrajectorySeedProducer_cfi mixedTripletStepSeedsA = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone( simTrackSelection = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.simTrackSelection.clone( - skipSimTrackIds = [ - cms.InputTag("detachedTripletStepSimTrackIds"), - cms.InputTag("lowPtTripletStepSimTrackIds"), - cms.InputTag("pixelPairStepSimTrackIds"), - cms.InputTag("mixedTripletStepSimTrackIds")], pTMin = 0.15, maxD0 = 10.0, maxZ0 = 30 ), minLayersCrossed = 3, + #hitMasks = cms.InputTag("mixedTripletStepMasks","hitMasks"), + hitCombinationMasks = cms.InputTag("mixedTripletStepMasks","hitCombinationMasks"), ptMin = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.ptMin, originRadius = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.originRadius, originHalfLength = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.originHalfLength, @@ -36,16 +34,13 @@ import FastSimulation.Tracking.TrajectorySeedProducer_cfi mixedTripletStepSeedsB = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone( simTrackSelection = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.simTrackSelection.clone( - skipSimTrackIds = [ - cms.InputTag("detachedTripletStepSimTrackIds"), - cms.InputTag("lowPtTripletStepSimTrackIds"), - cms.InputTag("pixelPairStepSimTrackIds"), - cms.InputTag("mixedTripletStepSimTrackIds")], pTMin = 0.15, maxD0 = 10.0, maxZ0 = 30 ), minLayersCrossed = 3, + #hitMasks = cms.InputTag("mixedTripletStepMasks","hitMasks"), + hitCombinationMasks = cms.InputTag("mixedTripletStepMasks","hitCombinationMasks"), ptMin = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.ptMin, originRadius = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.originRadius, originHalfLength = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.originHalfLength, @@ -59,6 +54,7 @@ mixedTripletStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone( src = cms.InputTag("mixedTripletStepSeeds"), MinNumberOfCrossedLayers = 3 + #hitMasks = cms.InputTag("mixedTripletStepMasks","hitMasks"), ) # tracks @@ -74,7 +70,7 @@ mixedTripletStep = RecoTracker.IterativeTracking.MixedTripletStep_cff.mixedTripletStep.clone() # Final sequence -MixedTripletStep = cms.Sequence(mixedTripletStepSimTrackIds +MixedTripletStep = cms.Sequence(mixedTripletStepMasks +mixedTripletStepSeedsA +mixedTripletStepSeedsB +mixedTripletStepSeeds diff --git a/FastSimulation/Tracking/python/PixelLessStep_cff.py b/FastSimulation/Tracking/python/PixelLessStep_cff.py index a75d67dba7a9d..78fd4a5982255 100644 --- a/FastSimulation/Tracking/python/PixelLessStep_cff.py +++ b/FastSimulation/Tracking/python/PixelLessStep_cff.py @@ -3,30 +3,27 @@ # import the full tracking equivalent of this file import RecoTracker.IterativeTracking.PixelLessStep_cff -# simtrack id producer -import FastSimulation.Tracking.SimTrackIdProducer_cfi -pixelLessStepSimTrackIds=FastSimulation.Tracking.SimTrackIdProducer_cfi.simTrackIdProducer.clone( +# fast tracking mask producer +from FastSimulation.Tracking.FastTrackingMaskProducer_cfi import fastTrackingMaskProducer as _fastTrackingMaskProducer +pixelLessStepMasks = _fastTrackingMaskProducer.clone( trackCollection = cms.InputTag("mixedTripletStepTracks"), TrackQuality = RecoTracker.IterativeTracking.PixelLessStep_cff.pixelLessStepClusters.TrackQuality, - maxChi2 = RecoTracker.IterativeTracking.PixelLessStep_cff.pixelLessStepClusters.maxChi2, - overrideTrkQuals = cms.InputTag('mixedTripletStep') + overrideTrkQuals = cms.InputTag('mixedTripletStep'), + oldHitCombinationMasks = cms.InputTag("mixedTripletStepMasks","hitCombinationMasks"), + oldHitMasks = cms.InputTag("mixedTripletStepMasks","hitMasks") ) # trajectory seeds import FastSimulation.Tracking.TrajectorySeedProducer_cfi pixelLessStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone( simTrackSelection = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.simTrackSelection.clone( - skipSimTrackIds = [ - cms.InputTag("detachedTripletStepSimTrackIds"), - cms.InputTag("lowPtTripletStepSimTrackIds"), - cms.InputTag("pixelPairStepSimTrackIds"), - cms.InputTag("mixedTripletStepSimTrackIds"), - cms.InputTag("pixelLessStepSimTrackIds")], - pTMin = 0.3, + pTMin = 0.3, maxD0 = -1, maxZ0 = -1 ), minLayersCrossed = 3, + #hitMasks = cms.InputTag("pixelLessStepMasks","hitMasks"), + hitCombinationMasks = cms.InputTag("pixelLessStepMasks","hitCombinationMasks"), ptMin = RecoTracker.IterativeTracking.PixelLessStep_cff.pixelLessStepSeeds.RegionFactoryPSet.RegionPSet.ptMin, originHalfLength = RecoTracker.IterativeTracking.PixelLessStep_cff.pixelLessStepSeeds.RegionFactoryPSet.RegionPSet.originHalfLength, originRadius = RecoTracker.IterativeTracking.PixelLessStep_cff.pixelLessStepSeeds.RegionFactoryPSet.RegionPSet.originRadius, @@ -38,6 +35,7 @@ pixelLessStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone( src = cms.InputTag("pixelLessStepSeeds"), MinNumberOfCrossedLayers = 6 # ? + #hitMasks = cms.InputTag("pixelLessStepMasks","hitMasks"), ) # tracks @@ -52,7 +50,7 @@ pixelLessStep = RecoTracker.IterativeTracking.PixelLessStep_cff.pixelLessStep.clone() # Final sequence -PixelLessStep = cms.Sequence(pixelLessStepSimTrackIds +PixelLessStep = cms.Sequence(pixelLessStepMasks +pixelLessStepSeeds +pixelLessStepTrackCandidates +pixelLessStepTracks diff --git a/FastSimulation/Tracking/python/PixelPairStep_cff.py b/FastSimulation/Tracking/python/PixelPairStep_cff.py index 1e3a99de2e98b..333bf47f6fb18 100644 --- a/FastSimulation/Tracking/python/PixelPairStep_cff.py +++ b/FastSimulation/Tracking/python/PixelPairStep_cff.py @@ -3,28 +3,28 @@ # import the full tracking equivalent of this file import RecoTracker.IterativeTracking.PixelPairStep_cff -# simtrack id producer -import FastSimulation.Tracking.SimTrackIdProducer_cfi -pixelPairStepSimTrackIds=FastSimulation.Tracking.SimTrackIdProducer_cfi.simTrackIdProducer.clone( +# fast tracking mask producer +from FastSimulation.Tracking.FastTrackingMaskProducer_cfi import fastTrackingMaskProducer as _fastTrackingMaskProducer +pixelPairStepMasks = _fastTrackingMaskProducer.clone( trackCollection = cms.InputTag("lowPtTripletStepTracks"), TrackQuality = RecoTracker.IterativeTracking.PixelPairStep_cff.pixelPairStepClusters.TrackQuality, - maxChi2 = RecoTracker.IterativeTracking.PixelPairStep_cff.pixelPairStepClusters.maxChi2, - overrideTrkQuals = cms.InputTag('lowPtTripletStepSelector','lowPtTripletStep') + overrideTrkQuals = cms.InputTag('lowPtTripletStepSelector','lowPtTripletStep'), + oldHitCombinationMasks = cms.InputTag("lowPtTripletStepMasks","hitCombinationMasks"), + oldHitMasks = cms.InputTag("lowPtTripletStepMasks","hitMasks") ) + # trajectory seeds import FastSimulation.Tracking.TrajectorySeedProducer_cfi pixelPairStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone( simTrackSelection = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.simTrackSelection.clone( - skipSimTrackIds = [ - cms.InputTag("detachedTripletStepSimTrackIds"), - cms.InputTag("lowPtTripletStepSimTrackIds"), - cms.InputTag("pixelPairStepSimTrackIds")], pTMin = 0.3, maxD0 = 5.0, maxZ0 = 50 ), minLayersCrossed = 2, - nSigmaZ = 3, + nSigmaZ = 3, + #hitMasks = cms.InputTag("pixelPairStepMasks","hitMasks"), + hitCombinationMasks = cms.InputTag("pixelPairStepMasks","hitCombinationMasks"), ptMin = RecoTracker.IterativeTracking.PixelPairStep_cff.pixelPairStepSeeds.RegionFactoryPSet.RegionPSet.ptMin, originRadius = RecoTracker.IterativeTracking.PixelPairStep_cff.pixelPairStepSeeds.RegionFactoryPSet.RegionPSet.originRadius, layerList = RecoTracker.IterativeTracking.PixelPairStep_cff.pixelPairStepSeedLayers.layerList.value() @@ -35,6 +35,7 @@ pixelPairStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone( src = cms.InputTag("pixelPairStepSeeds"), MinNumberOfCrossedLayers = 2 # ? + #hitMasks = cms.InputTag("pixelPairStepMasks","hitMasks"), ) # tracks @@ -48,9 +49,9 @@ pixelPairStepSelector.vertices = "firstStepPrimaryVerticesBeforeMixing" # Final sequence -PixelPairStep = cms.Sequence(pixelPairStepSimTrackIds +PixelPairStep = cms.Sequence(pixelPairStepMasks +pixelPairStepSeeds +pixelPairStepTrackCandidates +pixelPairStepTracks +pixelPairStepSelector - ) + ) diff --git a/FastSimulation/Tracking/python/SimTrackIdProducer_cfi.py b/FastSimulation/Tracking/python/SimTrackIdProducer_cfi.py deleted file mode 100644 index 4b37b9b93fb2c..0000000000000 --- a/FastSimulation/Tracking/python/SimTrackIdProducer_cfi.py +++ /dev/null @@ -1,9 +0,0 @@ -import FWCore.ParameterSet.Config as cms - -# comment - -simTrackIdProducer = cms.EDProducer("SimTrackIdProducer", -# trajectories = RecoTracker.IterativeTracking.DetachedTripletStep_cff.detachedTripletStepClusters.trajectories, - # TrackQuality= cms.string('highPurity'), - # maxChi2=cms.double(9) - ) diff --git a/FastSimulation/Tracking/python/TobTecStep_cff.py b/FastSimulation/Tracking/python/TobTecStep_cff.py index 6308e4da40b45..6140ab02ea435 100644 --- a/FastSimulation/Tracking/python/TobTecStep_cff.py +++ b/FastSimulation/Tracking/python/TobTecStep_cff.py @@ -2,14 +2,15 @@ # import the full tracking equivalent of this file import RecoTracker.IterativeTracking.TobTecStep_cff - -# simtrack id producer -import FastSimulation.Tracking.SimTrackIdProducer_cfi -tobTecStepSimTrackIds = FastSimulation.Tracking.SimTrackIdProducer_cfi.simTrackIdProducer.clone( + +# fast tracking mask producer +from FastSimulation.Tracking.FastTrackingMaskProducer_cfi import fastTrackingMaskProducer as _fastTrackingMaskProducer +tobTecStepMasks = _fastTrackingMaskProducer.clone( trackCollection = cms.InputTag("pixelLessStepTracks"), TrackQuality = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepClusters.TrackQuality, - maxChi2 = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepClusters.maxChi2, - overrideTrkQuals = cms.InputTag('pixelLessStep'), + overrideTrkQuals = cms.InputTag('pixelLessStep'), + oldHitCombinationMasks = cms.InputTag("pixelLessStepMasks","hitCombinationMasks"), + oldHitMasks = cms.InputTag("pixelLessStepMasks","hitMasks") ) # trajectory seeds @@ -17,18 +18,13 @@ import FastSimulation.Tracking.TrajectorySeedProducer_cfi tobTecStepSeedsTripl = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone( simTrackSelection = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.simTrackSelection.clone( - skipSimTrackIds = [ - cms.InputTag("detachedTripletStepSimTrackIds"), - cms.InputTag("lowPtTripletStepSimTrackIds"), - cms.InputTag("pixelPairStepSimTrackIds"), - cms.InputTag("mixedTripletStepSimTrackIds"), - cms.InputTag("pixelLessStepSimTrackIds"), - cms.InputTag("tobTecStepSimTrackIds")], pTMin = 0.3, maxD0 = -1, maxZ0 = -1 ), minLayersCrossed = 4, + #hitMasks = cms.InputTag("tobTecStepMasks","hitMasks"), + hitCombinationMasks = cms.InputTag("tobTecStepMasks","hitCombinationMasks"), ptMin = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepSeedsTripl.RegionFactoryPSet.RegionPSet.ptMin, originHalfLength = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepSeedsTripl.RegionFactoryPSet.RegionPSet.originHalfLength, originRadius = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepSeedsTripl.RegionFactoryPSet.RegionPSet.originRadius, @@ -38,18 +34,13 @@ import FastSimulation.Tracking.TrajectorySeedProducer_cfi tobTecStepSeedsPair = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone( simTrackSelection = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.simTrackSelection.clone( - skipSimTrackIds = [ - cms.InputTag("detachedTripletStepSimTrackIds"), - cms.InputTag("lowPtTripletStepSimTrackIds"), - cms.InputTag("pixelPairStepSimTrackIds"), - cms.InputTag("mixedTripletStepSimTrackIds"), - cms.InputTag("pixelLessStepSimTrackIds"), - cms.InputTag("tobTecStepSimTrackIds")], pTMin = 0.3, maxD0 = 99.0, maxZ0 = 99 ), minLayersCrossed = 4, + #hitMasks = cms.InputTag("tobTecStepMasks","hitMasks"), + hitCombinationMasks = cms.InputTag("tobTecStepMasks","hitCombinationMasks"), ptMin = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepSeedsPair.RegionFactoryPSet.RegionPSet.ptMin, originHalfLength = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepSeedsPair.RegionFactoryPSet.RegionPSet.originHalfLength, originRadius = RecoTracker.IterativeTracking.TobTecStep_cff.tobTecStepSeedsPair.RegionFactoryPSet.RegionPSet.originRadius, @@ -63,6 +54,7 @@ tobTecStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone( src = cms.InputTag("tobTecStepSeeds"), MinNumberOfCrossedLayers = 3 + #hitMasks = cms.InputTag("tobTecStepMasks","hitMasks"), ) # tracks @@ -77,7 +69,7 @@ tobTecStepSelector.vertices = "firstStepPrimaryVerticesBeforeMixing" # Final sequence -TobTecStep = cms.Sequence(tobTecStepSimTrackIds +TobTecStep = cms.Sequence(tobTecStepMasks +tobTecStepSeedsTripl +tobTecStepSeedsPair +tobTecStepSeeds diff --git a/FastSimulation/Tracking/python/TrajectorySeedProducer_cfi.py b/FastSimulation/Tracking/python/TrajectorySeedProducer_cfi.py index 0694ed4dfff22..2db463c0cc2e9 100644 --- a/FastSimulation/Tracking/python/TrajectorySeedProducer_cfi.py +++ b/FastSimulation/Tracking/python/TrajectorySeedProducer_cfi.py @@ -6,7 +6,7 @@ # The smallest pT (in GeV) to create a track candidate pTMin = cms.double(-1), # skip SimTracks processed in previous iterations - skipSimTrackIds = cms.VInputTag(), + #skipSimTrackIds = cms.VInputTag(), maxZ0 = cms.double(-1), maxD0 = cms.double(-1), ), @@ -26,7 +26,9 @@ # Inputs: tracker rechits, beam spot position. recHits = cms.InputTag("siTrackerGaussianSmearingRecHits"), - + #hitMasks = cms.InputTag("hitMasks"), + #hitCombinationMasks = cms.InputTag("hitCombinationMasks"), + layerList = cms.vstring(), ) diff --git a/FastSimulation/TrackingRecHitProducer/plugins/SiTrackerGaussianSmearingRecHitConverter.cc b/FastSimulation/TrackingRecHitProducer/plugins/SiTrackerGaussianSmearingRecHitConverter.cc index 5681e4640cb3f..94dc79ba303aa 100644 --- a/FastSimulation/TrackingRecHitProducer/plugins/SiTrackerGaussianSmearingRecHitConverter.cc +++ b/FastSimulation/TrackingRecHitProducer/plugins/SiTrackerGaussianSmearingRecHitConverter.cc @@ -1118,14 +1118,11 @@ SiTrackerGaussianSmearingRecHitConverter::loadMatchedRecHits( lastRecHit = theRecHits.end(); int hitCombinationId = 0; - int hitId = 0; for( ; it != lastRecHit ; ++it ) { recHitCombinations.push_back(FastTMRecHitCombination()); for(auto hit = it->second.begin();hit!=it->second.end();++hit){ recHitCombinations.back().push_back(*hit); recHitCombinations.back().back().setHitCombinationId(hitCombinationId); - recHitCombinations.back().back().setId(hitId); - hitId++; } hitCombinationId++; }