Skip to content

Commit

Permalink
Adjusting RecHit reco for edge wire groups
Browse files Browse the repository at this point in the history
Adjusting RecHit reco for edge wire groups. Best improvement is obtained for the first and last wire group of ME11 station. For details see https://indico.cern.ch/event/968978/contributions/4078288/attachments/2133771/3594383/20_10_30-Voytishin_Palichik-CSC_rh_builder_improvement_updates.pdf
  • Loading branch information
nvoytish authored Nov 6, 2020
1 parent 659f171 commit 7501f0c
Showing 1 changed file with 28 additions and 17 deletions.
45 changes: 28 additions & 17 deletions RecoLocalMuon/CSCRecHitD/src/CSCMake2DRecHit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -140,37 +140,48 @@ CSCRecHit2D CSCMake2DRecHit::hitFromStripAndWire(const CSCDetId& id,
float sigmaWithinTheStrip = -99.;
int quality = -1;
LocalPoint lp0(0., 0.);

int wglo = wg_left;
int wghi = wg_right;

float ymiddle;

// First wire of first wiregroup in cluster
wglo = layergeom_->middleWireOfGroup(wglo) + 0.5
- 0.5 * layergeom_->numberOfWiresPerGroup(wglo);

// Last wire in last wiregroup of cluster (OK if only 1 wiregroup too)
wghi = layergeom_->middleWireOfGroup(wghi) - 0.5
+ 0.5 * layergeom_->numberOfWiresPerGroup(wghi);

float stripWidth = -99.f;
// If at the edge, then used 1 strip cluster only
if (centerStrip == 1 || centerStrip == specs_->nStrips() || nStrip < 2) {
lp0 = layergeom_->stripWireIntersection(centerStrip, centerWire);
lp0 = (layergeom_->possibleRecHitPosition( float(centerStrip) - 0.5, wilo, wihi )).first;
ymiddle = lp0.y();
positionWithinTheStrip = 0.f;
stripWidth = layergeom_->stripPitch(lp0);
sigmaWithinTheStrip = stripWidth * inv_sqrt_12;
quality = 2;
} else {
// If not at the edge, used cluster of size ClusterSize:
LocalPoint lp11 = layergeom_->stripWireIntersection(centerStrip, centerWire);
LocalPoint lp11 = (layergeom_->possibleRecHitPosition( float(centerStrip) - 0.5, wglo, wghi )).first;
ymiddle = lp11.y();
stripWidth = layergeom_->stripPitch(lp11);

//---- Calculate local position within the strip
float xWithinChamber = lp11.x();
quality = 0;
if (layergeom_->inside(lp11)) { // save time; this hit is to be discarded anyway - see isHitInFiducial(...)

xMatchGatti_->findXOnStrip(id,
layer_,
sHit,
centerStrip,
xWithinChamber,
stripWidth,
tpeak,
positionWithinTheStrip,
sigmaWithinTheStrip,
quality);
}
lp0 = LocalPoint(xWithinChamber, layergeom_->yOfWire(centerWire, xWithinChamber));
xMatchGatti_->findXOnStrip(id,
layer_,
sHit,
centerStrip,
xWithinChamber,
stripWidth,
tpeak,
positionWithinTheStrip,
sigmaWithinTheStrip,
quality);
lp0 = LocalPoint( xWithinChamber, ymiddle );
}

// compute the errors in local x and y
Expand Down

0 comments on commit 7501f0c

Please sign in to comment.