Skip to content

Commit

Permalink
Merge pull request #32948 from nvoytish/patch-12
Browse files Browse the repository at this point in the history
CSC RU builder widened roads and narrower anode time window switched to default
  • Loading branch information
cmsbuild committed Feb 25, 2021
2 parents 8943836 + b31a3a3 commit 8614274
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 77 deletions.
6 changes: 3 additions & 3 deletions RecoLocalMuon/CSCRecHitD/python/cscRecHitD_cfi.py
Expand Up @@ -28,9 +28,9 @@
CSCWireClusterDeltaT = cms.int32(1),
#
# wire time window used for reconstruction
CSCUseReducedWireTimeWindow = cms.bool(False),
CSCWireTimeWindowLow = cms.int32(0),
CSCWireTimeWindowHigh = cms.int32(15),
CSCUseReducedWireTimeWindow = cms.bool(True),
CSCWireTimeWindowLow = cms.int32(5),
CSCWireTimeWindowHigh = cms.int32(11),
#
# Calibration info:
CSCUseCalibrations = cms.bool(True),
Expand Down
8 changes: 0 additions & 8 deletions RecoLocalMuon/CSCRecHitD/python/customRecHitBuilder.py

This file was deleted.

6 changes: 0 additions & 6 deletions RecoLocalMuon/CSCSegment/python/CSCSegmentAlgorithmRU_cfi.py
Expand Up @@ -2,7 +2,6 @@

RU_ME1A = cms.PSet(
doCollisions = cms.bool(True),
enlarge = cms.bool(False),
chi2Norm_2D_ = cms.double(35),
chi2_str = cms.double(50.0),
chi2Max = cms.double(100.0),
Expand All @@ -15,7 +14,6 @@
)
RU_ME1B = cms.PSet(
doCollisions = cms.bool(True),
enlarge = cms.bool(False),
chi2Norm_2D_ = cms.double(35),
chi2_str = cms.double(50.0),
chi2Max = cms.double(100.0),
Expand All @@ -28,7 +26,6 @@
)
RU_ME12 = cms.PSet(
doCollisions = cms.bool(True),
enlarge = cms.bool(False),
chi2Norm_2D_ = cms.double(35),
chi2_str = cms.double(50.0),
chi2Max = cms.double(100.0),
Expand All @@ -41,7 +38,6 @@
)
RU_ME13 = cms.PSet(
doCollisions = cms.bool(True),
enlarge = cms.bool(False),
chi2Norm_2D_ = cms.double(20),
chi2_str = cms.double(30.0),
chi2Max = cms.double(60.0),
Expand All @@ -54,7 +50,6 @@
)
RU_MEX1 = cms.PSet(
doCollisions = cms.bool(True),
enlarge = cms.bool(False),
chi2Norm_2D_ = cms.double(60),
chi2_str = cms.double(80.0),
chi2Max = cms.double(180.0),
Expand All @@ -67,7 +62,6 @@
)
RU_MEX2 = cms.PSet(
doCollisions = cms.bool(True),
enlarge = cms.bool(False),
chi2Norm_2D_ = cms.double(35),
chi2_str = cms.double(50.0),
chi2Max = cms.double(100.0),
Expand Down
6 changes: 0 additions & 6 deletions RecoLocalMuon/CSCSegment/python/customSegmentBuilder.py

This file was deleted.

78 changes: 26 additions & 52 deletions RecoLocalMuon/CSCSegment/src/CSCSegAlgoRU.cc
Expand Up @@ -21,7 +21,6 @@

CSCSegAlgoRU::CSCSegAlgoRU(const edm::ParameterSet& ps) : CSCSegmentAlgorithm(ps), myName("CSCSegAlgoRU") {
doCollisions = ps.getParameter<bool>("doCollisions");
enlarge = ps.getParameter<bool>("enlarge");
chi2_str_ = ps.getParameter<double>("chi2_str");
chi2Norm_2D_ = ps.getParameter<double>("chi2Norm_2D_");
dRMax = ps.getParameter<double>("dRMax");
Expand Down Expand Up @@ -96,7 +95,6 @@ std::vector<CSCSegment> CSCSegAlgoRU::buildSegments(const CSCChamber* aChamber,
AlgoState aState;
aState.aChamber = aChamber;
aState.doCollisions = doCollisions;
aState.enlarge = enlarge;
aState.dRMax = dRMax;
aState.dPhiMax = dPhiMax;
aState.dRIntMax = dRIntMax;
Expand All @@ -105,10 +103,6 @@ std::vector<CSCSegment> CSCSegAlgoRU::buildSegments(const CSCChamber* aChamber,
aState.chi2_str_ = chi2_str_;
aState.chi2Max = chi2Max;

int scale_factor = 1;
if (aState.enlarge)
scale_factor = 2;

// Define buffer for segments we build
std::vector<CSCSegment> segments;
ChamberHitContainerCIt ib = rechits.begin();
Expand All @@ -122,13 +116,11 @@ std::vector<CSCSegment> CSCSegAlgoRU::buildSegments(const CSCChamber* aChamber,
for (int ipass = 0; ipass < npass; ++ipass) {
if (aState.windowScale > 1.) {
iadd = 1;
aState.strip_iadd = 2 * scale_factor;
aState.chi2D_iadd = 2 * scale_factor;
if (aState.enlarge) {
aState.chi2Max = 2 * chi2Max;
if (rechits.size() <= 12)
iadd = 0; //allow 3 hit segments for low hit multiplicity chambers
}
aState.strip_iadd = 4;
aState.chi2D_iadd = 4;
aState.chi2Max = 2 * chi2Max;
if (rechits.size() <= 12)
iadd = 0; //allow 3 hit segments for low hit multiplicity chambers
}

int used_rh = 0;
Expand All @@ -143,13 +135,13 @@ std::vector<CSCSegment> CSCSegAlgoRU::buildSegments(const CSCChamber* aChamber,
2) { //check if there are enough recHits left to build a segment from displaced vertices
aState.doCollisions = false;
aState.windowScale = 1.; // scale factor for cuts
aState.dRMax = scale_factor * 2.0;
aState.dPhiMax = scale_factor * 2 * aState.dPhiMax;
aState.dRIntMax = scale_factor * 2 * aState.dRIntMax;
aState.dPhiIntMax = scale_factor * 2 * aState.dPhiIntMax;
aState.chi2Norm_2D_ = scale_factor * 5 * aState.chi2Norm_2D_;
aState.chi2_str_ = scale_factor * 100;
aState.chi2Max = scale_factor * 2 * aState.chi2Max;
aState.dRMax = 4.0;
aState.dPhiMax = 4 * aState.dPhiMax;
aState.dRIntMax = 4 * aState.dRIntMax;
aState.dPhiIntMax = 4 * aState.dPhiIntMax;
aState.chi2Norm_2D_ = 10 * aState.chi2Norm_2D_;
aState.chi2_str_ = 200;
aState.chi2Max = 4 * aState.chi2Max;
} else {
search_disp = false; //make sure the flag is off
}
Expand Down Expand Up @@ -284,11 +276,11 @@ std::vector<CSCSegment> CSCSegAlgoRU::buildSegments(const CSCChamber* aChamber,
aState.doCollisions = true;
aState.dRMax = 2.0;
aState.chi2_str_ = 100;
aState.dPhiMax = 0.5 * aState.dPhiMax / scale_factor;
aState.dRIntMax = 0.5 * aState.dRIntMax / scale_factor;
aState.dPhiIntMax = 0.5 * aState.dPhiIntMax / scale_factor;
aState.chi2Norm_2D_ = 0.2 * aState.chi2Norm_2D_ / scale_factor;
aState.chi2Max = 0.5 * aState.chi2Max / scale_factor;
aState.dPhiMax = 0.25 * aState.dPhiMax;
aState.dRIntMax = 0.25 * aState.dRIntMax;
aState.dPhiIntMax = 0.25 * aState.dPhiIntMax;
aState.chi2Norm_2D_ = 0.1 * aState.chi2Norm_2D_;
aState.chi2Max = 0.25 * aState.chi2Max;
}

std::vector<CSCSegment>::iterator it = segments.begin();
Expand Down Expand Up @@ -426,19 +418,10 @@ bool CSCSegAlgoRU::areHitsCloseInR(const AlgoState& aState, const CSCRecHit2D* h
h1z = 1;
h2z = 1;
}

if (aState.enlarge) {
return (gp2.perp() > ((gp1.perp() - aState.dRMax * aState.strip_iadd * maxWG_width[iStn]) * h2z) / h1z &&
gp2.perp() < ((gp1.perp() + aState.dRMax * aState.strip_iadd * maxWG_width[iStn]) * h2z) / h1z)
? true
: false;

} else {
return (gp2.perp() > ((gp1.perp() - aState.dRMax * maxWG_width[iStn]) * h2z) / h1z &&
gp2.perp() < ((gp1.perp() + aState.dRMax * maxWG_width[iStn]) * h2z) / h1z)
? true
: false;
}
return (gp2.perp() > ((gp1.perp() - aState.dRMax * aState.strip_iadd * maxWG_width[iStn]) * h2z) / h1z &&
gp2.perp() < ((gp1.perp() + aState.dRMax * aState.strip_iadd * maxWG_width[iStn]) * h2z) / h1z)
? true
: false;
}

bool CSCSegAlgoRU::areHitsCloseInGlobalPhi(const AlgoState& aState,
Expand Down Expand Up @@ -544,19 +527,10 @@ bool CSCSegAlgoRU::isHitNearSegment(const AlgoState& aState, const CSCRecHit2D*
maxWG_width[1] = 10.75;
}
}

if (aState.enlarge) {
return (fabs(phidif) < aState.dPhiIntMax * aState.strip_iadd * pos_str + dphi_incr &&
fabs(dr) < aState.dRIntMax * aState.strip_iadd * maxWG_width[iStn])
? true
: false;

} else {
return (fabs(phidif) < aState.dPhiIntMax * aState.strip_iadd * pos_str + dphi_incr &&
fabs(dr) < aState.dRIntMax * maxWG_width[iStn])
? true
: false;
}
return (fabs(phidif) < aState.dPhiIntMax * aState.strip_iadd * pos_str + dphi_incr &&
fabs(dr) < aState.dRIntMax * aState.strip_iadd * maxWG_width[iStn])
? true
: false;
}

float CSCSegAlgoRU::phiAtZ(const AlgoState& aState, float z) const {
Expand All @@ -583,7 +557,7 @@ bool CSCSegAlgoRU::isSegmentGood(const AlgoState& aState, const ChamberHitContai
unsigned int iadd = (rechitsInChamber.size() > 20) ? 1 : 0;
if (aState.windowScale > 1.) {
iadd = 1;
if (rechitsInChamber.size() <= 12 && aState.enlarge)
if (rechitsInChamber.size() <= 12)
iadd = 0;
}
if (aState.proto_segment.size() >= 3 + iadd)
Expand Down
2 changes: 0 additions & 2 deletions RecoLocalMuon/CSCSegment/src/CSCSegAlgoRU.h
Expand Up @@ -89,7 +89,6 @@ class CSCSegAlgoRU : public CSCSegmentAlgorithm {

//adjustable configuration
bool doCollisions;
bool enlarge;
float dRMax;
float dPhiMax;
float dRIntMax;
Expand Down Expand Up @@ -162,7 +161,6 @@ class CSCSegAlgoRU : public CSCSegmentAlgorithm {
float wideSeg;
int minLayersApart;
bool debugInfo;
bool enlarge;
};

#endif

0 comments on commit 8614274

Please sign in to comment.