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] Removed all 'get' prefixes from PPS DataFormat objects #28252

Merged
merged 21 commits into from Oct 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1f97b85
Removed all get from TotemRP objects
forthommel Oct 23, 2019
9571942
Removed all get from timing detectors objects
forthommel Oct 23, 2019
745fef0
Removed all get from local track lite object
forthommel Oct 23, 2019
882159b
Removed all get from pixel objects
forthommel Oct 23, 2019
5ea1f05
Updated the RecoCTPPS according to the new data formats accessors
forthommel Oct 23, 2019
4ee122b
Removed all get from PPS DetId objects
forthommel Oct 23, 2019
b6edb84
Updated the RecoCTPPS algorithms to reflect the PPS DetId accessors c…
forthommel Oct 23, 2019
6853620
Updated the DQM sources/harvesters
forthommel Oct 23, 2019
4750e1b
Removed all get from PPS digi objects
forthommel Oct 23, 2019
2ed3bc0
Necessary updates from changes on digi getters
forthommel Oct 23, 2019
74d9414
Dropped all get from CTPPSGeometry
forthommel Oct 23, 2019
ab29ae8
Necessary matches for new geometry getters
forthommel Oct 23, 2019
b1d7ecb
Imported data formats changes to SimPPS
forthommel Oct 23, 2019
df9fb89
Adapted the EventFilter part
forthommel Oct 23, 2019
7e23189
Uniformisation of timing local track hits/plane multiplicity getter
forthommel Oct 23, 2019
b05a4ef
Applied code-format
forthommel Oct 23, 2019
0ebcc27
Fixed a few copy/paste bugs in classes_def
forthommel Oct 24, 2019
761f06a
Matching in Validation and CondFormats packages
forthommel Oct 24, 2019
9c02087
Fixed copy-paste error
forthommel Oct 24, 2019
f0e29c1
Homogenised time retrieval methods
forthommel Oct 24, 2019
17eafe3
Fixed typo in CTPPSPixelLocalTrack attribute converter
forthommel Oct 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -50,7 +50,7 @@ CTPPSRPAlignmentCorrectionData CTPPSRPAlignmentCorrectionsData::getFullSensorCor
CTPPSRPAlignmentCorrectionData align_corr;

// try to get alignment correction of the full RP
auto rpIt = rps_.find(CTPPSDetId(id).getRPId());
auto rpIt = rps_.find(CTPPSDetId(id).rpId());
if (rpIt != rps_.end())
align_corr = rpIt->second;

Expand Down Expand Up @@ -132,4 +132,4 @@ std::ostream& operator<<(std::ostream& s, const CTPPSRPAlignmentCorrectionsData&
return s;
}

//----------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------
Expand Up @@ -357,7 +357,7 @@ void CTPPSRPAlignmentCorrectionsMethods::writeXMLBlock(const CTPPSRPAlignmentCor

for (auto it = sensors.begin(); it != sensors.end(); ++it) {
CTPPSDetId sensorId(it->first);
unsigned int rpId = sensorId.getRPId();
unsigned int rpId = sensorId.rpId();
unsigned int decRPId = sensorId.arm() * 100 + sensorId.station() * 10 + sensorId.rp();

// start a RP block
Expand Down
12 changes: 6 additions & 6 deletions DQM/CTPPS/plugins/CTPPSCommonDQMSource.cc
Expand Up @@ -351,7 +351,7 @@ void CTPPSCommonDQMSource::analyzeTracks(edm::Event const &event, edm::EventSetu
map<unsigned int, set<signed int>> ms_rp_idx_arm;

for (auto &tr : *hTracks) {
const CTPPSDetId rpId(tr.getRPId());
const CTPPSDetId rpId(tr.rpId());
const unsigned int arm = rpId.arm();
const unsigned int stNum = rpId.station();
const unsigned int rpNum = rpId.rp();
Expand Down Expand Up @@ -429,7 +429,7 @@ void CTPPSCommonDQMSource::analyzeTracks(edm::Event const &event, edm::EventSetu
map<unsigned int, set<unsigned int>> mTop, mHor, mBot;

for (auto &tr : *hTracks) {
CTPPSDetId rpId(tr.getRPId());
CTPPSDetId rpId(tr.rpId());
const unsigned int rpNum = rpId.rp();
const unsigned int armIdx = rpId.arm();

Expand All @@ -447,17 +447,17 @@ void CTPPSCommonDQMSource::analyzeTracks(edm::Event const &event, edm::EventSetu
{
auto it = ap.trackingRPPlots.find(rpDecId);
if (it != ap.trackingRPPlots.end()) {
it->second.h_x->Fill(tr.getX());
it->second.h_y->Fill(tr.getY());
it->second.h_x->Fill(tr.x());
it->second.h_y->Fill(tr.y());
}
}

// fill in reference timing-RP plots
{
auto it = ap.timingRPPlots.find(rpDecId);
if (it != ap.timingRPPlots.end()) {
it->second.h_x->Fill(tr.getX());
it->second.h_time->Fill(tr.getTime());
it->second.h_x->Fill(tr.x());
it->second.h_time->Fill(tr.time());
}
}
}
Expand Down
238 changes: 116 additions & 122 deletions DQM/CTPPS/plugins/CTPPSDiamondDQMSource.cc

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions DQM/CTPPS/plugins/CTPPSPixelDQMSource.cc
Expand Up @@ -250,17 +250,17 @@ void CTPPSPixelDQMSource::bookHistograms(DQMStore::IBooker &ibooker, edm::Run co
ID.setStation(stn);
string stnd, stnTitle;

CTPPSDetId(ID.getStationId()).stationName(stnd, CTPPSDetId::nPath);
CTPPSDetId(ID.getStationId()).stationName(stnTitle, CTPPSDetId::nFull);
CTPPSDetId(ID.getStationId()).stationName(stnTitleShort, CTPPSDetId::nShort);
CTPPSDetId(ID.stationId()).stationName(stnd, CTPPSDetId::nPath);
CTPPSDetId(ID.stationId()).stationName(stnTitle, CTPPSDetId::nFull);
CTPPSDetId(ID.stationId()).stationName(stnTitleShort, CTPPSDetId::nShort);

ibooker.setCurrentFolder(stnd);
//--------- RPots ---
int pixBinW = 4;
for (int rp = RPn_first; rp < RPn_last; rp++) { // only installed pixel pots
ID.setRP(rp);
string rpd, rpTitle;
CTPPSDetId(ID.getRPId()).rpName(rpTitle, CTPPSDetId::nShort);
CTPPSDetId(ID.rpId()).rpName(rpTitle, CTPPSDetId::nShort);
string rpBinName = armTitleShort + "_" + stnTitleShort + "_" + rpTitle;
yah1st->SetBinLabel(getRPglobalBin(arm, stn), rpBinName.c_str());
xah1trk->SetBinLabel(getRPglobalBin(arm, stn), rpBinName.c_str());
Expand All @@ -271,8 +271,8 @@ void CTPPSPixelDQMSource::bookHistograms(DQMStore::IBooker &ibooker, edm::Run co
int indexP = getRPindex(arm, stn, rp);
RPindexValid[indexP] = 1;

CTPPSDetId(ID.getRPId()).rpName(rpTitle, CTPPSDetId::nFull);
CTPPSDetId(ID.getRPId()).rpName(rpd, CTPPSDetId::nPath);
CTPPSDetId(ID.rpId()).rpName(rpTitle, CTPPSDetId::nFull);
CTPPSDetId(ID.rpId()).rpName(rpd, CTPPSDetId::nPath);

ibooker.setCurrentFolder(rpd);

Expand Down Expand Up @@ -450,15 +450,15 @@ void CTPPSPixelDQMSource::analyze(edm::Event const &event, edm::EventSetup const

for (DetSet<CTPPSPixelLocalTrack>::const_iterator dit = ds_tr.begin(); dit != ds_tr.end(); ++dit) {
++pixRPTracks[rpInd];
int nh_tr = (dit->getNDF() + TrackFitDimension) / 2;
int nh_tr = (dit->ndf() + TrackFitDimension) / 2;
for (int i = 0; i <= NplaneMAX; i++) {
if (i == nh_tr)
htrackHits[rpInd]->Fill(nh_tr, 1.);
else
htrackHits[rpInd]->Fill(i, 0.);
}
float x0 = dit->getX0();
float y0 = dit->getY0();
float x0 = dit->x0();
float y0 = dit->y0();
h2trackXY0[rpInd]->Fill(x0, y0);
if (x0_MAX < x0)
x0_MAX = x0;
Expand Down
14 changes: 7 additions & 7 deletions DQM/CTPPS/plugins/ElasticPlotDQMSource.cc
Expand Up @@ -258,7 +258,7 @@ void ElasticPlotDQMSource::analyze(edm::Event const &event, edm::EventSetup cons

for (const auto &ds : *hits) {
TotemRPDetId detId(ds.detId());
CTPPSDetId rpId = detId.getRPId();
CTPPSDetId rpId = detId.rpId();

if (ds.size() > 5) {
if (detId.isStripsCoordinateUDirection())
Expand All @@ -274,12 +274,12 @@ void ElasticPlotDQMSource::analyze(edm::Event const &event, edm::EventSetup cons
// count U and V patterns
unsigned int n_pat_u = 0, n_pat_v = 0;
for (auto &p : ds) {
if (!p.getFittable())
if (!p.fittable())
continue;

if (p.getProjection() == TotemRPUVPattern::projU)
if (p.projection() == TotemRPUVPattern::projU)
n_pat_u++;
else if (p.getProjection() == TotemRPUVPattern::projV)
else if (p.projection() == TotemRPUVPattern::projV)
n_pat_v++;
}

Expand Down Expand Up @@ -330,18 +330,18 @@ void ElasticPlotDQMSource::analyze(edm::Event const &event, edm::EventSetup cons
continue;

if (cond_4rp)
dp.v_h2_y_vs_x_dgn_4rp[i]->Fill(tr_i->getX0(), tr_i->getY0());
dp.v_h2_y_vs_x_dgn_4rp[i]->Fill(tr_i->x0(), tr_i->y0());

if (cond_2rp)
dp.v_h2_y_vs_x_dgn_2rp[i]->Fill(tr_i->getX0(), tr_i->getY0());
dp.v_h2_y_vs_x_dgn_2rp[i]->Fill(tr_i->x0(), tr_i->y0());

for (unsigned int j = 0; j < 4; j++) {
if (rp_track[dp.rpIds[j]] == nullptr)
continue;

dp.h2_track_corr_vert->Fill(i, j);

dp.v_h_y[i][j]->Fill(tr_i->getY0());
dp.v_h_y[i][j]->Fill(tr_i->y0());
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions DQM/CTPPS/plugins/TotemDAQTriggerDQMSource.cc
Expand Up @@ -93,14 +93,14 @@ void TotemDAQTriggerDQMSource::analyze(edm::Event const &event, edm::EventSetup
// DAQ plots
if (daqValid) {
for (auto &it1 : *fedInfo) {
daq_event_bx_diff->Fill(it1.getBX() - event.bunchCrossing());
daq_event_bx_diff_vs_fed->Fill(it1.getFEDId(), it1.getBX() - event.bunchCrossing());
daq_event_bx_diff->Fill(it1.bx() - event.bunchCrossing());
daq_event_bx_diff_vs_fed->Fill(it1.fedId(), it1.bx() - event.bunchCrossing());

for (auto &it2 : *fedInfo) {
if (it2.getFEDId() <= it1.getFEDId())
if (it2.fedId() <= it1.fedId())
continue;

daq_bx_diff->Fill(it2.getBX() - it1.getBX());
daq_bx_diff->Fill(it2.bx() - it1.bx());
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion DQM/CTPPS/plugins/TotemRPDQMHarvester.cc
Expand Up @@ -132,7 +132,7 @@ void TotemRPDQMHarvester::MakePlaneEfficiencyHistograms(unsigned int id,
}

// book new RP histogram, if not yet done
CTPPSDetId rpId = detId.getRPId();
CTPPSDetId rpId = detId.rpId();
rpId.rpName(path, TotemRPDetId::nPath);
const string rp_efficiency_name = "plane efficiency";
MonitorElement *rp_efficiency = igetter.get(path + "/" + rp_efficiency_name);
Expand Down