Skip to content

Commit

Permalink
Merge pull request #28733 from AndreaBellora/CMSSW_11_1_X_2020-01-13-…
Browse files Browse the repository at this point in the history
…1100_PPS_DQM

Removing unused variables from "CTPPSPixelDQMSource.cc" - fix suggested in PR #28726
  • Loading branch information
cmsbuild committed Jan 16, 2020
2 parents 316be55 + b8d6745 commit 5804243
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions DQM/CTPPS/plugins/CTPPSPixelDQMSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ class CTPPSPixelDQMSource : public DQMEDAnalyzer {
MonitorElement *hRPotActivBXall[RPotsTotalNumber];
int HitsMultROC[RPotsTotalNumber * NplaneMAX][NROCsMAX];
int HitsMultPlane[RPotsTotalNumber][NplaneMAX];
int ClusMultPlane[RPotsTotalNumber][NplaneMAX];

// Flags for disabling set of plots
bool offlinePlots = true;
Expand Down Expand Up @@ -134,7 +133,7 @@ class CTPPSPixelDQMSource : public DQMEDAnalyzer {

int getRPInStationBin(int rp) { return (rp - RPn_first + 1); }

static constexpr int NRPglobalBins = 4; //2 arms w. 2 stations w. 1 RP
static constexpr int NRPglobalBins = 4; // 2 arms w. 2 stations w. 1 RP

int getRPglobalBin(int arm, int stn) {
static constexpr int stationBinOrder[NStationMAX] = {0, 4, 1};
Expand All @@ -150,7 +149,6 @@ class CTPPSPixelDQMSource : public DQMEDAnalyzer {
int getPixPlane(int id) { return ((id >> 16) & 0x7); }
// int getSubdet(int id) { return ((id>>kSubdetOffset)&0x7); }

int multHitsMax, cluSizeMax; // for tuning
float x0_MIN, x0_MAX, y0_MIN, y0_MAX;
};

Expand Down Expand Up @@ -240,7 +238,6 @@ void CTPPSPixelDQMSource::dqmBeginRun(edm::Run const &run, edm::EventSetup const
for (int ind = 0; ind < 2 * 3 * NRPotsMAX; ind++)
RPindexValid[ind] = 0;

multHitsMax = cluSizeMax = -1;
x0_MIN = y0_MIN = 1.0e06;
x0_MAX = y0_MAX = -1.0e06;
}
Expand Down Expand Up @@ -490,7 +487,6 @@ void CTPPSPixelDQMSource::analyze(edm::Event const &event, edm::EventSetup const
for (int ind = 0; ind < RPotsTotalNumber; ind++) {
for (int p = 0; p < NplaneMAX; p++) {
HitsMultPlane[ind][p] = 0;
ClusMultPlane[ind][p] = 0;
}
}
for (int ind = 0; ind < RPotsTotalNumber * NplaneMAX; ind++) {
Expand Down Expand Up @@ -662,46 +658,35 @@ void CTPPSPixelDQMSource::analyze(edm::Event const &event, edm::EventSetup const
}
} // end if(RPindexValid[index]) {
}
if (int(ds_digi.data.size()) > multHitsMax)
multHitsMax = ds_digi.data.size();
} // end if(StationStatus[station]) {
} // end for(const auto &ds_digi : *pixDigi)
} // if(pixDigi.isValid()) {

if (pixClus.isValid())
if (pixClus.isValid() && onlinePlots)
for (const auto &ds : *pixClus) {
int idet = getDet(ds.id);
if (idet != DetId::VeryForward) {
if (verbosity > 1)
LogPrint("CTPPSPixelDQMSource") << "not CTPPS: cluster.id" << ds.id;
if (idet != DetId::VeryForward && verbosity > 1) {
LogPrint("CTPPSPixelDQMSource") << "not CTPPS: cluster.id" << ds.id;
continue;
}
// int subdet = getSubdet(ds.id);

int plane = getPixPlane(ds.id);

CTPPSDetId theId(ds.id);
int plane = getPixPlane(ds.id);
int arm = theId.arm() & 0x1;
int station = theId.station() & 0x3;
int rpot = theId.rp() & 0x7;

if ((StationStatus[station] == 0) || (RPstatus[station][rpot] == 0))
continue;

int index = getRPindex(arm, station, rpot);
++ClusMultPlane[index][plane];

for (const auto &p : ds) {
int clusize = p.size();

if (onlinePlots)
h2CluSize[arm][station]->Fill(prIndex(rpot, plane), clusize);
if (cluSizeMax < clusize)
cluSizeMax = clusize;
if (clusize > ClusterSizeMax)
clusize = ClusterSizeMax;
}

h2CluSize[arm][station]->Fill(prIndex(rpot, plane), clusize);
}
} // end if(pixClus.isValid()) for(const auto &ds : *pixClus)

bool allRPactivity = false;
Expand Down

0 comments on commit 5804243

Please sign in to comment.