Skip to content

Commit

Permalink
add const and remove reserve
Browse files Browse the repository at this point in the history
  • Loading branch information
fabferro committed Jul 20, 2022
1 parent 3b18960 commit d11f468
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions RecoPPS/Local/plugins/CTPPSPixelLocalTrackProducer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,19 @@ 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<edm::DetSetVector<CTPPSPixelRecHit>> tokenCTPPSPixelRecHit_;
const int verbosity_;
const int maxHitPerPlane_;
const int maxHitPerRomanPot_;
const int maxTrackPerRomanPot_;
const int maxTrackPerPattern_;

const edm::EDGetTokenT<edm::DetSetVector<CTPPSPixelRecHit>> tokenCTPPSPixelRecHit_;
const edm::ESGetToken<CTPPSGeometry, VeryForwardRealGeometryRecord> tokenCTPPSGeometry_;
edm::ESWatcher<VeryForwardRealGeometryRecord> geometryWatcher_;

const edm::ESGetToken<CTPPSPixelAnalysisMask, CTPPSPixelAnalysisMaskRcd> tokenCTPPSPixelAnalysisMask_;

uint32_t numberOfPlanesPerPot_;
std::vector<uint32_t> listOfAllPlanes_;
const uint32_t numberOfPlanesPerPot_;

std::unique_ptr<RPixDetPatternFinder> patternFinder_;
std::unique_ptr<RPixDetTrackFinder> trackFinder_;
Expand All @@ -92,6 +90,7 @@ CTPPSPixelLocalTrackProducer::CTPPSPixelLocalTrackProducer(const edm::ParameterS
numberOfPlanesPerPot_(parameterSet.getParameter<int>("numberOfPlanesPerPot")) {
std::string patternFinderAlgorithm = parameterSet.getParameter<std::string>("patternFinderAlgorithm");
std::string trackFitterAlgorithm = parameterSet.getParameter<std::string>("trackFinderAlgorithm");
std::vector<uint32_t> listOfAllPlanes_;

// pattern algorithm selector
if (patternFinderAlgorithm == "RPixRoadFinder") {
Expand All @@ -101,7 +100,6 @@ CTPPSPixelLocalTrackProducer::CTPPSPixelLocalTrackProducer(const edm::ParameterS
<< "Pattern finder algorithm" << patternFinderAlgorithm << " does not exist";
}

listOfAllPlanes_.reserve(6);
for (uint32_t i = 0; i < numberOfPlanesPerPot_; ++i) {
listOfAllPlanes_.push_back(i);
}
Expand Down

0 comments on commit d11f468

Please sign in to comment.