diff --git a/RecoPPS/Local/interface/RPixRoadFinder.h b/RecoPPS/Local/interface/RPixRoadFinder.h index 271af7982b83c..6303ea2f90bb3 100644 --- a/RecoPPS/Local/interface/RPixRoadFinder.h +++ b/RecoPPS/Local/interface/RPixRoadFinder.h @@ -43,7 +43,6 @@ class RPixRoadFinder : public RPixDetPatternFinder { unsigned int minRoadSize_; unsigned int maxRoadSize_; double roadRadiusBadPot_; - // bool isBadPot_; void run(const edm::DetSetVector &input, const CTPPSGeometry &geometry, std::vector &roads); }; diff --git a/RecoPPS/Local/plugins/CTPPSPixelLocalTrackProducer.cc b/RecoPPS/Local/plugins/CTPPSPixelLocalTrackProducer.cc index b0241e126bb56..f7d44c9417703 100644 --- a/RecoPPS/Local/plugins/CTPPSPixelLocalTrackProducer.cc +++ b/RecoPPS/Local/plugins/CTPPSPixelLocalTrackProducer.cc @@ -57,39 +57,37 @@ class CTPPSPixelLocalTrackProducer : public edm::stream::EDProducer<> { static void fillDescriptions(edm::ConfigurationDescriptions &descriptions); private: - int verbosity_; - int maxHitPerPlane_; - int maxHitPerRomanPot_; - int maxTrackPerRomanPot_; - int maxTrackPerPattern_; - - edm::InputTag inputTag_; - edm::EDGetTokenT> tokenCTPPSPixelRecHit_; - edm::ESGetToken tokenCTPPSGeometry_; + const int verbosity_; + const int maxHitPerPlane_; + const int maxHitPerRomanPot_; + const int maxTrackPerRomanPot_; + const int maxTrackPerPattern_; + + const edm::EDGetTokenT> tokenCTPPSPixelRecHit_; + const edm::ESGetToken tokenCTPPSGeometry_; edm::ESWatcher geometryWatcher_; - edm::ESGetToken tokenCTPPSPixelAnalysisMask_; + const edm::ESGetToken tokenCTPPSPixelAnalysisMask_; - uint32_t numberOfPlanesPerPot_; - std::vector listOfAllPlanes_; + const uint32_t numberOfPlanesPerPot_; std::unique_ptr patternFinder_; std::unique_ptr trackFinder_; - - // void run(const edm::DetSetVector &input, edm::DetSetVector &output); }; //------------------------------------------------------------------------------------------------// -CTPPSPixelLocalTrackProducer::CTPPSPixelLocalTrackProducer(const edm::ParameterSet ¶meterSet) { - inputTag_ = parameterSet.getParameter("tag"); - verbosity_ = parameterSet.getUntrackedParameter("verbosity"); - maxHitPerRomanPot_ = parameterSet.getParameter("maxHitPerRomanPot"); - maxHitPerPlane_ = parameterSet.getParameter("maxHitPerPlane"); - maxTrackPerRomanPot_ = parameterSet.getParameter("maxTrackPerRomanPot"); - maxTrackPerPattern_ = parameterSet.getParameter("maxTrackPerPattern"); - numberOfPlanesPerPot_ = parameterSet.getParameter("numberOfPlanesPerPot"); - +CTPPSPixelLocalTrackProducer::CTPPSPixelLocalTrackProducer(const edm::ParameterSet ¶meterSet) + : verbosity_(parameterSet.getUntrackedParameter("verbosity")), + maxHitPerPlane_(parameterSet.getParameter("maxHitPerPlane")), + maxHitPerRomanPot_(parameterSet.getParameter("maxHitPerRomanPot")), + maxTrackPerRomanPot_(parameterSet.getParameter("maxTrackPerRomanPot")), + maxTrackPerPattern_(parameterSet.getParameter("maxTrackPerPattern")), + tokenCTPPSPixelRecHit_( + consumes>(parameterSet.getParameter("tag"))), + tokenCTPPSGeometry_(esConsumes()), + tokenCTPPSPixelAnalysisMask_(esConsumes()), + numberOfPlanesPerPot_(parameterSet.getParameter("numberOfPlanesPerPot")) { std::string patternFinderAlgorithm = parameterSet.getParameter("patternFinderAlgorithm"); std::string trackFitterAlgorithm = parameterSet.getParameter("trackFinderAlgorithm"); @@ -101,9 +99,9 @@ CTPPSPixelLocalTrackProducer::CTPPSPixelLocalTrackProducer(const edm::ParameterS << "Pattern finder algorithm" << patternFinderAlgorithm << " does not exist"; } - listOfAllPlanes_.reserve(6); + std::vector listOfAllPlanes; for (uint32_t i = 0; i < numberOfPlanesPerPot_; ++i) { - listOfAllPlanes_.push_back(i); + listOfAllPlanes.push_back(i); } //tracking algorithm selector @@ -113,13 +111,8 @@ CTPPSPixelLocalTrackProducer::CTPPSPixelLocalTrackProducer(const edm::ParameterS throw cms::Exception("CTPPSPixelLocalTrackProducer") << "Tracking fitter algorithm" << trackFitterAlgorithm << " does not exist"; } - trackFinder_->setListOfPlanes(listOfAllPlanes_); + trackFinder_->setListOfPlanes(listOfAllPlanes); trackFinder_->initialize(); - - tokenCTPPSPixelRecHit_ = consumes>(inputTag_); - tokenCTPPSGeometry_ = esConsumes(); - tokenCTPPSPixelAnalysisMask_ = esConsumes(); - produces>(); } @@ -156,9 +149,8 @@ void CTPPSPixelLocalTrackProducer::fillDescriptions(edm::ConfigurationDescriptio desc.add("roadRadius", 1.0)->setComment("radius of pattern search window"); desc.add("minRoadSize", 3)->setComment("minimum number of points in a pattern"); desc.add("maxRoadSize", 20)->setComment("maximum number of points in a pattern"); - //parameters for bad pot reconstruction patch 45-220-fr 2022 + //parameter for bad pot reconstruction patch 45-220-fr 2022 desc.add("roadRadiusBadPot", 0.5)->setComment("radius of pattern search window for bad Pot"); - // desc.add("isBadPot", true)->setComment("flag to enable road search for bad pot"); descriptions.add("ctppsPixelLocalTracks", desc); } diff --git a/RecoPPS/Local/python/ctppsPixelLocalReconstruction_cff.py b/RecoPPS/Local/python/ctppsPixelLocalReconstruction_cff.py index 68c77670518cd..6a5ba6c057624 100644 --- a/RecoPPS/Local/python/ctppsPixelLocalReconstruction_cff.py +++ b/RecoPPS/Local/python/ctppsPixelLocalReconstruction_cff.py @@ -9,10 +9,7 @@ # local track producer from RecoPPS.Local.ctppsPixelLocalTracks_cfi import ctppsPixelLocalTracks -#from Configuration.Eras.Modifier_ctpps_2016_cff import ctpps_2016 -#from Configuration.Eras.Modifier_ctpps_2017_cff import ctpps_2017 -#from Configuration.Eras.Modifier_ctpps_2018_cff import ctpps_2018 -#(ctpps_2016 | ctpps_2017 | ctpps_2018).toModify(ctppsPixelLocalTracks, isBadPot = cms.bool(False)) + ctppsPixelLocalReconstructionTask = cms.Task( ctppsPixelClusters,ctppsPixelRecHits,ctppsPixelLocalTracks diff --git a/RecoPPS/Local/src/RPixRoadFinder.cc b/RecoPPS/Local/src/RPixRoadFinder.cc index 5463fe387340f..b6089244d80b2 100644 --- a/RecoPPS/Local/src/RPixRoadFinder.cc +++ b/RecoPPS/Local/src/RPixRoadFinder.cc @@ -21,7 +21,6 @@ RPixRoadFinder::RPixRoadFinder(edm::ParameterSet const& parameterSet) : RPixDetP minRoadSize_ = parameterSet.getParameter("minRoadSize"); maxRoadSize_ = parameterSet.getParameter("maxRoadSize"); roadRadiusBadPot_ = parameterSet.getParameter("roadRadiusBadPot"); - // isBadPot_ = parameterSet.getParameter("isBadPot"); } //------------------------------------------------------------------------------------------------//