Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPS clean code for bad pot #38740

Merged
merged 4 commits into from
Jul 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @fabferro
To be fully compliant with the CMS style, since this is not a class member any more, you should remove the trailing underscore from the name.
Moreover, I'd move this definition right before when it is used, i.e before L103

(I know, this is not fundamental... But since tests weren't started yet, I think you can finish the cleaning before we launch them)


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