Skip to content

Commit

Permalink
Store length of threshold and LG result array in enums
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeuser committed Jun 14, 2022
1 parent c597a1d commit 6b7b2f6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
24 changes: 12 additions & 12 deletions Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ void MillePedeDQMModule ::fillStatusHisto(MonitorElement* statusHisto) {
}

void MillePedeDQMModule ::fillExpertHistos() {
std::array<double, 8> Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_;
std::array<double, 8> tXcut_, sigtXcut_, maxMovetXcut_, maxErrortXcut_;
std::array<double, SIZE_INDEX> Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_;
std::array<double, SIZE_INDEX> tXcut_, sigtXcut_, maxMovetXcut_, maxErrortXcut_;

std::array<double, 8> Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_;
std::array<double, 8> tYcut_, sigtYcut_, maxMovetYcut_, maxErrortYcut_;
std::array<double, SIZE_INDEX> Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_;
std::array<double, SIZE_INDEX> tYcut_, sigtYcut_, maxMovetYcut_, maxErrortYcut_;

std::array<double, 8> Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_;
std::array<double, 8> tZcut_, sigtZcut_, maxMovetZcut_, maxErrortZcut_;
std::array<double, SIZE_INDEX> Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_;
std::array<double, SIZE_INDEX> tZcut_, sigtZcut_, maxMovetZcut_, maxErrortZcut_;

auto myMap = mpReader_->getThresholdMap();

Expand Down Expand Up @@ -196,12 +196,12 @@ void MillePedeDQMModule ::fillExpertHistos() {
}

void MillePedeDQMModule ::fillExpertHisto(MonitorElement* histo,
const std::array<double, 8>& cut,
const std::array<double, 8>& sigCut,
const std::array<double, 8>& maxMoveCut,
const std::array<double, 8>& maxErrorCut,
const std::array<double, 6>& obs,
const std::array<double, 6>& obsErr) {
const std::array<double, SIZE_INDEX>& cut,
const std::array<double, SIZE_INDEX>& sigCut,
const std::array<double, SIZE_INDEX>& maxMoveCut,
const std::array<double, SIZE_INDEX>& maxErrorCut,
const std::array<double, SIZE_LG_STRUCTS>& obs,
const std::array<double, SIZE_LG_STRUCTS>& obsErr) {
TH1F* histo_0 = histo->getTH1F();

double max_ = *std::max_element(maxMoveCut.begin(), maxMoveCut.end());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class MillePedeDQMModule : public DQMEDHarvester {

void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override;

enum { SIZE_LG_STRUCTS = 6, SIZE_INDEX = 8 };

//========================= PRIVATE METHODS ==================================
private: //===================================================================
void beginRun(const edm::Run&, const edm::EventSetup&) override;
Expand All @@ -64,12 +66,12 @@ class MillePedeDQMModule : public DQMEDHarvester {
void fillExpertHistos();

void fillExpertHisto(MonitorElement* histo,
const std::array<double, 8>& cut,
const std::array<double, 8>& sigCut,
const std::array<double, 8>& maxMoveCut,
const std::array<double, 8>& maxErrorCut,
const std::array<double, 6>& obs,
const std::array<double, 6>& obsErr);
const std::array<double, SIZE_INDEX>& cut,
const std::array<double, SIZE_INDEX>& sigCut,
const std::array<double, SIZE_INDEX>& maxMoveCut,
const std::array<double, SIZE_INDEX>& maxErrorCut,
const std::array<double, SIZE_LG_STRUCTS>& obs,
const std::array<double, SIZE_LG_STRUCTS>& obsErr);

bool setupChanged(const edm::EventSetup&);
int getIndexFromString(const std::string& alignableId);
Expand Down

0 comments on commit 6b7b2f6

Please sign in to comment.