Skip to content

Commit

Permalink
Remove an unneeded assignment for passcuts_hit
Browse files Browse the repository at this point in the history
  • Loading branch information
perrotta committed Aug 28, 2021
1 parent 310e644 commit 918dcd6
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions DQM/SiPixelPhase1Track/plugins/SiPixelPhase1TrackEfficiency.cc
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ namespace {
nFpixD2Hits = 0;
nFpixD3Hits = 0;
passcuts = true;
passcuts_hit = true;

// first, look at the full track to see whether it is good
// auto const & trajParams = track.extra()->trajParams();
Expand Down Expand Up @@ -377,7 +376,7 @@ namespace {
if (!((col < (centercol + 10)) && (col > (centercol - 10)) && (row < (centerrow + 10)) && (row > (centerrow -10 )))) passcuts_hit = false;
*/

if (passcuts_hit == true && passcuts) {
if (passcuts_hit && passcuts) {
if (!(subdetid == PixelSubdetector::PixelBarrel && trackerTopology_->pxbLayer(id) == 1)) {
if (isHitValid) {
histo[VALID].fill(id, &iEvent);
Expand Down Expand Up @@ -550,14 +549,14 @@ namespace {

//propagation B: filling inactive hits

for (uint p = 0; p < expTrajMeasurements.size(); p++) {
TrajectoryMeasurement pxb1TM(expTrajMeasurements[p]);
const auto& pxb1Hit = pxb1TM.recHit();
bool inactive = (pxb1Hit->getType() == TrackingRecHit::inactive);
int detid = pxb1Hit->geographicalId();
bool found_det = false;
if (passcuts && passcuts_hit) {
for (uint p = 0; p < expTrajMeasurements.size(); p++) {
TrajectoryMeasurement pxb1TM(expTrajMeasurements[p]);
const auto& pxb1Hit = pxb1TM.recHit();
bool inactive = (pxb1Hit->getType() == TrackingRecHit::inactive);
int detid = pxb1Hit->geographicalId();
bool found_det = false;

if (passcuts && passcuts_hit) {
for (unsigned int i_eff = 0; i_eff < eff_pxb1_vector.size(); i_eff++) {
//in case found hit in the same det, take only the valid hit
if (eff_pxb1_vector[i_eff].first == detid) {
Expand All @@ -567,16 +566,14 @@ namespace {
}
}
}

//if no other hit in det
if (!found_det) {
eff_map.first = detid;
eff_map.second[2] = inactive;
eff_pxb1_vector.push_back(eff_map);
}
}

} //traj loop
} //traj loop
}

if (eff_pxb1_vector.size() == 1) {
//eff map is filled -> decide what to do for double hits, ie eff_pxb1_vector.size>1 ... if 1 just use MISSING and VALID as usual
Expand Down

0 comments on commit 918dcd6

Please sign in to comment.