File indexing completed on 2024-04-06 12:25:59
0001
0002
0003
0004
0005
0006 #include <RecoLocalMuon/CSCRecHitD/src/CSCXonStrip_MatchGatti.h>
0007 #include <RecoLocalMuon/CSCRecHitD/src/CSCStripHit.h>
0008
0009 #include <Geometry/CSCGeometry/interface/CSCLayer.h>
0010 #include <Geometry/CSCGeometry/interface/CSCChamberSpecs.h>
0011
0012 #include <CondFormats/CSCObjects/interface/CSCDBGains.h>
0013 #include <CondFormats/DataRecord/interface/CSCDBGainsRcd.h>
0014 #include <CondFormats/CSCObjects/interface/CSCDBCrosstalk.h>
0015 #include <CondFormats/DataRecord/interface/CSCDBCrosstalkRcd.h>
0016 #include <CondFormats/CSCObjects/interface/CSCDBNoiseMatrix.h>
0017 #include <CondFormats/DataRecord/interface/CSCDBNoiseMatrixRcd.h>
0018
0019 #include <FWCore/MessageLogger/interface/MessageLogger.h>
0020 #include <FWCore/Utilities/interface/Exception.h>
0021
0022 #include "DataFormats/CLHEP/interface/AlgebraicObjects.h"
0023
0024 #include <vector>
0025 #include <cmath>
0026 #include <iostream>
0027 #include <fstream>
0028
0029
0030
0031 #ifndef M_PI_2
0032 #define M_PI_2 1.57079632679489661923
0033 #endif
0034
0035 CSCXonStrip_MatchGatti::CSCXonStrip_MatchGatti(const edm::ParameterSet& ps) : recoConditions_(nullptr) {
0036 useCalib = ps.getParameter<bool>("CSCUseCalibrations");
0037 xtalksOffset = ps.getParameter<double>("CSCStripxtalksOffset");
0038 noise_level_ME1a = ps.getParameter<double>("NoiseLevel_ME1a");
0039 xt_asymmetry_ME1a = ps.getParameter<double>("XTasymmetry_ME1a");
0040 const_syst_ME1a = ps.getParameter<double>("ConstSyst_ME1a");
0041 noise_level_ME1b = ps.getParameter<double>("NoiseLevel_ME1b");
0042 xt_asymmetry_ME1b = ps.getParameter<double>("XTasymmetry_ME1b");
0043 const_syst_ME1b = ps.getParameter<double>("ConstSyst_ME1b");
0044 noise_level_ME12 = ps.getParameter<double>("NoiseLevel_ME12");
0045 xt_asymmetry_ME12 = ps.getParameter<double>("XTasymmetry_ME12");
0046 const_syst_ME12 = ps.getParameter<double>("ConstSyst_ME12");
0047 noise_level_ME13 = ps.getParameter<double>("NoiseLevel_ME13");
0048 xt_asymmetry_ME13 = ps.getParameter<double>("XTasymmetry_ME13");
0049 const_syst_ME13 = ps.getParameter<double>("ConstSyst_ME13");
0050 noise_level_ME21 = ps.getParameter<double>("NoiseLevel_ME21");
0051 xt_asymmetry_ME21 = ps.getParameter<double>("XTasymmetry_ME21");
0052 const_syst_ME21 = ps.getParameter<double>("ConstSyst_ME21");
0053 noise_level_ME22 = ps.getParameter<double>("NoiseLevel_ME22");
0054 xt_asymmetry_ME22 = ps.getParameter<double>("XTasymmetry_ME22");
0055 const_syst_ME22 = ps.getParameter<double>("ConstSyst_ME22");
0056 noise_level_ME31 = ps.getParameter<double>("NoiseLevel_ME31");
0057 xt_asymmetry_ME31 = ps.getParameter<double>("XTasymmetry_ME31");
0058 const_syst_ME31 = ps.getParameter<double>("ConstSyst_ME31");
0059 noise_level_ME32 = ps.getParameter<double>("NoiseLevel_ME32");
0060 xt_asymmetry_ME32 = ps.getParameter<double>("XTasymmetry_ME32");
0061 const_syst_ME32 = ps.getParameter<double>("ConstSyst_ME32");
0062 noise_level_ME41 = ps.getParameter<double>("NoiseLevel_ME41");
0063 xt_asymmetry_ME41 = ps.getParameter<double>("XTasymmetry_ME41");
0064 const_syst_ME41 = ps.getParameter<double>("ConstSyst_ME41");
0065
0066 getCorrectionValues("StringCurrentlyNotUsed");
0067 }
0068
0069 CSCXonStrip_MatchGatti::~CSCXonStrip_MatchGatti() {}
0070
0071
0072
0073
0074 void CSCXonStrip_MatchGatti::findXOnStrip(const CSCDetId& id,
0075 const CSCLayer* layer,
0076 const CSCStripHit& stripHit,
0077 int centralStrip,
0078 float& xWithinChamber,
0079 float& sWidth,
0080 const float& tpeak,
0081 float& xWithinStrip,
0082 float& sigma,
0083 int& quality_flag) {
0084 quality_flag = 0;
0085
0086
0087 specs_ = layer->chamber()->specs();
0088 stripWidth = sWidth;
0089
0090
0091 xWithinStrip = xWithinChamber;
0092
0093 CSCStripHit::ChannelContainer const& strips = stripHit.strips();
0094 int nStrips = strips.size();
0095 int centStrip = nStrips / 2 + 1;
0096 std::vector<float> const& adcs = stripHit.s_adc();
0097 int tmax = stripHit.tmax();
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119
0120
0121
0122 float adc[4];
0123 int j = 0;
0124 for (int i = 1; i <= nStrips; ++i) {
0125 if (i > (centStrip - 2) && i < (centStrip + 2)) {
0126 std::vector<float> adcsFit;
0127 for (int t = 0; t < 4; ++t) {
0128 int k = t + 4 * (i - 1);
0129 adc[t] = adcs[k];
0130 if (t < 3)
0131 chargeSignal[j][t] = adc[t];
0132 }
0133 j++;
0134 }
0135 }
0136
0137
0138
0139 if (useCalib) {
0140 std::vector<float> xtalks;
0141 recoConditions_->crossTalk(id, centralStrip, xtalks);
0142 float dt = 50.f * tmax - tpeak;
0143
0144 for (int t = 0; t < 3; ++t) {
0145 xt_l[0][t] = xtalks[0] * (50.f * (t - 1) + dt) + xtalks[1] + xtalksOffset;
0146 xt_r[0][t] = xtalks[2] * (50.f * (t - 1) + dt) + xtalks[3] + xtalksOffset;
0147 xt_l[1][t] = xtalks[4] * (50.f * (t - 1) + dt) + xtalks[5] + xtalksOffset;
0148 xt_r[1][t] = xtalks[6] * (50.f * (t - 1) + dt) + xtalks[7] + xtalksOffset;
0149 xt_l[2][t] = xtalks[8] * (50.f * (t - 1) + dt) + xtalks[9] + xtalksOffset;
0150 xt_r[2][t] = xtalks[10] * (50.f * (t - 1) + dt) + xtalks[11] + xtalksOffset;
0151
0152 xt_lr0[t] = (1. - xt_l[0][t] - xt_r[0][t]);
0153 xt_lr1[t] = (1. - xt_l[1][t] - xt_r[1][t]);
0154 xt_lr2[t] = (1. - xt_l[2][t] - xt_r[2][t]);
0155 }
0156 } else {
0157 for (int t = 0; t < 3; ++t) {
0158 xt_l[0][t] = xtalksOffset;
0159 xt_r[0][t] = xtalksOffset;
0160 xt_l[1][t] = xtalksOffset;
0161 xt_r[1][t] = xtalksOffset;
0162 xt_l[2][t] = xtalksOffset;
0163 xt_r[2][t] = xtalksOffset;
0164
0165 xt_lr0[t] = (1. - xt_l[0][t] - xt_r[0][t]);
0166 xt_lr1[t] = (1. - xt_l[1][t] - xt_r[1][t]);
0167 xt_lr2[t] = (1. - xt_l[2][t] - xt_r[2][t]);
0168 }
0169 }
0170
0171
0172 int tbin = tmax - 4;
0173
0174
0175
0176
0177
0178
0179 if (tmax < 4)
0180 tbin = 0;
0181
0182
0183 if (useCalib) {
0184 std::vector<float> nmatrix;
0185 recoConditions_->noiseMatrix(id, centralStrip, nmatrix);
0186 for (int istrip = 0; istrip < 3; ++istrip) {
0187 a11[istrip] = nmatrix[0 + tbin * 3 + istrip * 15];
0188 a12[istrip] = nmatrix[1 + tbin * 3 + istrip * 15];
0189 a13[istrip] = nmatrix[2 + tbin * 3 + istrip * 15];
0190 a22[istrip] = nmatrix[3 + tbin * 3 + istrip * 15];
0191 a23[istrip] = nmatrix[4 + tbin * 3 + istrip * 15];
0192 a33[istrip] = nmatrix[6 + tbin * 3 + istrip * 15];
0193 }
0194 } else {
0195
0196 for (int istrip = 0; istrip < 3; ++istrip) {
0197 a11[istrip] = 10.0;
0198 a12[istrip] = 0.0;
0199 a13[istrip] = 0.0;
0200 a22[istrip] = 10.0;
0201 a23[istrip] = 0.0;
0202 a33[istrip] = 10.0;
0203 }
0204 }
0205
0206
0207 setupMatrix();
0208
0209
0210 static const std::string ME1a("ME1/a");
0211 static const std::string ME1b("ME1/b");
0212
0213 bool ME1_1 = (ME1a == specs_->chamberTypeName() || ME1b == specs_->chamberTypeName());
0214
0215
0216
0217
0218 bool peakMismatch = false;
0219 std::vector<float> charges(3);
0220 charges[0] = q_sumL;
0221 charges[1] = q_sumC;
0222 charges[2] = q_sumR;
0223 int min_index = min_element(charges.begin(), charges.end()) - charges.begin();
0224 int max_index = max_element(charges.begin(), charges.end()) - charges.begin();
0225 if (1 != max_index && (1 == min_index ||
0226
0227
0228
0229 (charges[max_index] - charges[min_index]) > 1.1 * (q_sumC - charges[min_index]))) {
0230 peakMismatch = true;
0231 switch (max_index) {
0232 case 0:
0233 xWithinStrip = -1;
0234 break;
0235 case 2:
0236 xWithinStrip = 1;
0237 break;
0238 default:
0239
0240 xWithinStrip = 0;
0241 break;
0242 }
0243 }
0244
0245
0246 else if (stripHit.deadStrip() > 0) {
0247 xWithinStrip = 0;
0248 } else {
0249
0250 xWithinStrip = float(calculateXonStripPosition(stripWidth, ME1_1));
0251 }
0252 xWithinChamber = xWithinChamber + (xWithinStrip * stripWidth);
0253 if (peakMismatch) {
0254 sigma = stripWidth / std::sqrt(12.f);
0255 } else {
0256
0257 int factorStripWidth = int(std::sqrt(stripWidth / 0.38f));
0258 int maxConsecutiveStrips = 8;
0259 if (factorStripWidth) {
0260 maxConsecutiveStrips /= factorStripWidth;
0261 }
0262 maxConsecutiveStrips++;
0263
0264 struct ChamberTypes {
0265 std::map<std::string, int> chamberTypes;
0266 int operator()(std::string const& s) const {
0267 auto p = chamberTypes.find(s);
0268 return p != chamberTypes.end() ? (*p).second : 0;
0269 }
0270 ChamberTypes() {
0271 chamberTypes["ME1/a"] = 1;
0272 chamberTypes["ME1/b"] = 2;
0273 chamberTypes["ME1/2"] = 3;
0274 chamberTypes["ME1/3"] = 4;
0275 chamberTypes["ME2/1"] = 5;
0276 chamberTypes["ME2/2"] = 6;
0277 chamberTypes["ME3/1"] = 7;
0278 chamberTypes["ME3/2"] = 8;
0279 chamberTypes["ME4/1"] = 9;
0280 chamberTypes["ME4/2"] = 8;
0281 }
0282 };
0283 static const ChamberTypes chamberTypes;
0284
0285 switch (chamberTypes(specs_->chamberTypeName())) {
0286 case 1:
0287 noise_level = noise_level_ME1a;
0288 xt_asymmetry = xt_asymmetry_ME1a;
0289 const_syst = const_syst_ME1a;
0290 break;
0291
0292 case 2:
0293 noise_level = noise_level_ME1b;
0294 xt_asymmetry = xt_asymmetry_ME1b;
0295 const_syst = const_syst_ME1b;
0296 break;
0297
0298 case 3:
0299 noise_level = noise_level_ME12;
0300 xt_asymmetry = xt_asymmetry_ME12;
0301 const_syst = const_syst_ME12;
0302 break;
0303
0304 case 4:
0305 noise_level = noise_level_ME13;
0306 xt_asymmetry = xt_asymmetry_ME13;
0307 const_syst = const_syst_ME13;
0308 break;
0309
0310 case 5:
0311 noise_level = noise_level_ME21;
0312 xt_asymmetry = xt_asymmetry_ME21;
0313 const_syst = const_syst_ME21;
0314 break;
0315
0316 case 6:
0317 noise_level = noise_level_ME22;
0318 xt_asymmetry = xt_asymmetry_ME22;
0319 const_syst = const_syst_ME22;
0320 break;
0321
0322 case 7:
0323 noise_level = noise_level_ME31;
0324 xt_asymmetry = xt_asymmetry_ME31;
0325 const_syst = const_syst_ME31;
0326 break;
0327
0328 case 8:
0329 noise_level = noise_level_ME32;
0330 xt_asymmetry = xt_asymmetry_ME32;
0331 const_syst = const_syst_ME32;
0332 break;
0333
0334 case 9:
0335 noise_level = noise_level_ME41;
0336 xt_asymmetry = xt_asymmetry_ME41;
0337 const_syst = const_syst_ME41;
0338 break;
0339
0340 default:
0341 noise_level = noise_level_ME22;
0342 xt_asymmetry = xt_asymmetry_ME22;
0343 const_syst = const_syst_ME22;
0344 }
0345 if (0 == stripHit.deadStrip() && stripHit.numberOfConsecutiveStrips() < maxConsecutiveStrips &&
0346 std::abs(stripHit.closestMaximum()) > maxConsecutiveStrips / 2) {
0347 sigma = float(calculateXonStripError(stripWidth, ME1_1));
0348 } else {
0349 sigma = stripWidth / std::sqrt(12.f);
0350 }
0351 }
0352 quality_flag = 1;
0353 }
0354
0355
0356
0357
0358 void CSCXonStrip_MatchGatti::setupMatrix() {
0359
0360
0361
0362
0363
0364
0365
0366
0367
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377
0378
0379
0380
0381
0382
0383
0384
0385
0386
0387
0388
0389
0390
0391
0392
0393
0394
0395
0396
0397
0398
0399
0400
0401
0402
0403
0404
0405
0406
0407
0408
0409
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421 CLHEP::HepMatrix cross_talks_inv(3, 3);
0422 int err = 0;
0423
0424 q_sum = q_sumL = q_sumC = q_sumR = 0.;
0425 double charge = 0.;
0426 for (int iTime = 0; iTime < 3; iTime++) {
0427 cross_talks_inv(1, 1) = xt_lr0[iTime];
0428 cross_talks_inv(1, 2) = xt_l[1][iTime];
0429 cross_talks_inv(1, 3) = 0.;
0430 cross_talks_inv(2, 1) = xt_r[0][iTime];
0431 cross_talks_inv(2, 2) = xt_lr1[iTime];
0432 cross_talks_inv(2, 3) = xt_l[2][iTime];
0433 cross_talks_inv(3, 1) = 0.;
0434 cross_talks_inv(3, 2) = xt_r[1][iTime];
0435 cross_talks_inv(3, 3) = xt_lr2[iTime];
0436 cross_talks_inv.invert(err);
0437 if (err != 0) {
0438 edm::LogWarning("FailedXTalkiInversionNoCrosstalkCorrection")
0439 << "Failed to invert XTalks matrix. No cross-talk correction for this rechit.";
0440
0441 return;
0442 }
0443
0444 charge = chargeSignal[0][iTime] * cross_talks_inv(1, 1) + chargeSignal[1][iTime] * cross_talks_inv(1, 2) +
0445 chargeSignal[2][iTime] * cross_talks_inv(1, 3);
0446
0447
0448
0449
0450
0451
0452 q_sum += charge;
0453 q_sumL += charge;
0454 charge = chargeSignal[0][iTime] * cross_talks_inv(2, 1) + chargeSignal[1][iTime] * cross_talks_inv(2, 2) +
0455 chargeSignal[2][iTime] * cross_talks_inv(2, 3);
0456
0457
0458
0459 q_sum += charge;
0460 q_sumC += charge;
0461 charge = chargeSignal[0][iTime] * cross_talks_inv(3, 1) + chargeSignal[1][iTime] * cross_talks_inv(3, 2) +
0462 chargeSignal[2][iTime] * cross_talks_inv(3, 3);
0463
0464
0465
0466 q_sum += charge;
0467 q_sumR += charge;
0468 }
0469 }
0470
0471
0472
0473
0474 void CSCXonStrip_MatchGatti::initChamberSpecs() {
0475
0476
0477
0478
0479 h = specs_->anodeCathodeSpacing();
0480 r = h / stripWidth;
0481
0482
0483 double wspace = specs_->wireSpacing();
0484
0485
0486 double wradius = specs_->wireRadius();
0487
0488
0489 const double parm[5] = {.1989337e-02, -.6901542e-04, .8665786, 154.6177, -.680163e-03};
0490
0491 k_3 = (parm[0] * wspace / h + parm[1]) *
0492 (parm[2] * wspace / wradius + parm[3] + parm[4] * (wspace / wradius) * (wspace / wradius));
0493
0494 sqrt_k_3 = std::sqrt(k_3);
0495 norm = r * (0.5 / std::atan(sqrt_k_3));
0496 k_2 = M_PI_2 * (1. - sqrt_k_3 / 2.);
0497 k_1 = 0.25 * k_2 * sqrt_k_3 / std::atan(sqrt_k_3);
0498 }
0499
0500 void CSCXonStrip_MatchGatti::getCorrectionValues(std::string estimator) { hardcodedCorrectionInitialization(); }
0501
0502 double CSCXonStrip_MatchGatti::estimated2GattiCorrection(double x_estimated, float stripWidth, bool ME1_1) {
0503
0504
0505 int n_SW;
0506 int min_SW;
0507 if (ME1_1) {
0508 n_SW = n_SW_ME1_1;
0509 min_SW = 3;
0510 } else {
0511 n_SW = n_SW_noME1_1;
0512 min_SW = 6;
0513 }
0514 int stripDown = int(10. * stripWidth) - min_SW;
0515 int stripUp = stripDown + 1;
0516 if (stripUp > n_SW - 1) {
0517
0518
0519
0520
0521 stripUp = n_SW - 1;
0522 }
0523
0524 double half_strip_width = 0.5;
0525
0526 const int n_bins = n_val;
0527 double corr_2_xestim = 999.;
0528 if (stripDown < 0) {
0529 corr_2_xestim = 1;
0530 } else {
0531
0532
0533 int xestim_bin = -999;
0534 double delta_strip_width = 999.;
0535 double delta_strip_widthUpDown = 999.;
0536 double diff_2_strip_width = 999.;
0537 delta_strip_width = stripWidth - int(stripWidth * 10) / 10.;
0538 delta_strip_widthUpDown = 0.1;
0539
0540 if (std::abs(x_estimated) > 0.5) {
0541 if (std::abs(x_estimated) > 1.) {
0542 corr_2_xestim = 1.;
0543 } else {
0544
0545
0546
0547
0548 xestim_bin = int((1. - std::abs(x_estimated)) / half_strip_width * n_bins);
0549 if (ME1_1) {
0550 diff_2_strip_width = x_correction_ME1_1[stripUp][xestim_bin] - x_correction_ME1_1[stripDown][xestim_bin];
0551 corr_2_xestim = x_correction_ME1_1[stripDown][xestim_bin] +
0552 (delta_strip_width / delta_strip_widthUpDown) * diff_2_strip_width;
0553 } else {
0554 diff_2_strip_width = x_correction_noME1_1[stripUp][xestim_bin] - x_correction_noME1_1[stripDown][xestim_bin];
0555 corr_2_xestim = x_correction_noME1_1[stripDown][xestim_bin] +
0556 (delta_strip_width / delta_strip_widthUpDown) * diff_2_strip_width;
0557 }
0558 corr_2_xestim = -corr_2_xestim;
0559 }
0560 } else {
0561 xestim_bin = int((std::abs(x_estimated) / half_strip_width) * n_bins);
0562 if (ME1_1) {
0563 diff_2_strip_width = x_correction_ME1_1[stripUp][xestim_bin] - x_correction_ME1_1[stripDown][xestim_bin];
0564 corr_2_xestim = x_correction_ME1_1[stripDown][xestim_bin] +
0565 (delta_strip_width / delta_strip_widthUpDown) * diff_2_strip_width;
0566 } else {
0567 diff_2_strip_width = x_correction_noME1_1[stripUp][xestim_bin] - x_correction_noME1_1[stripDown][xestim_bin];
0568 corr_2_xestim = x_correction_noME1_1[stripDown][xestim_bin] +
0569 (delta_strip_width / delta_strip_widthUpDown) * diff_2_strip_width;
0570 }
0571 }
0572 if (x_estimated < 0.) {
0573 corr_2_xestim = -corr_2_xestim;
0574 }
0575 }
0576
0577 return corr_2_xestim;
0578 }
0579
0580 double CSCXonStrip_MatchGatti::estimated2Gatti(double x_estimated, float stripWidth, bool ME1_1) {
0581 double x_corr = estimated2GattiCorrection(x_estimated, stripWidth, ME1_1);
0582 double x_gatti = x_estimated + x_corr;
0583
0584 return x_gatti;
0585 }
0586
0587 double CSCXonStrip_MatchGatti::xfError_Noise(double noise) {
0588 double min, max;
0589 if (q_sumR > q_sumL) {
0590 min = q_sumL;
0591 max = q_sumR;
0592 } else {
0593 min = q_sumR;
0594 max = q_sumL;
0595 }
0596
0597
0598 double dr_L2 = pow(q_sumR - q_sumL, 2);
0599 double dr_C2 = pow(q_sumC - min, 2);
0600 double dr_R2 = pow(q_sumC - max, 2);
0601 double error = std::sqrt(dr_L2 + dr_C2 + dr_R2) * noise / std::pow(q_sumC - min, 2) / 2;
0602
0603 return error;
0604 }
0605
0606 double CSCXonStrip_MatchGatti::xfError_XTasym(double xt_asym) {
0607 double min;
0608 if (q_sumR > q_sumL) {
0609 min = q_sumL;
0610 } else {
0611 min = q_sumR;
0612 }
0613
0614 double dXTL = (std::pow(q_sumC, 2) + std::pow(q_sumR, 2) - q_sumL * q_sumR - q_sumR * q_sumC);
0615 double dXTR = (std::pow(q_sumC, 2) + std::pow(q_sumL, 2) - q_sumL * q_sumR - q_sumL * q_sumC);
0616 double dXT = std::sqrt(std::pow(dXTL, 2) + std::pow(dXTR, 2)) / std::pow((q_sumC - min), 2) / 2;
0617 double error = dXT * xt_asym;
0618
0619 return error;
0620 }
0621
0622 double CSCXonStrip_MatchGatti::calculateXonStripError(float stripWidth, bool ME1_1) {
0623 double min;
0624 if (q_sumR > q_sumL) {
0625 min = q_sumL;
0626 } else {
0627 min = q_sumR;
0628 }
0629
0630 double xf = (q_sumR - q_sumL) / (q_sumC - min) / 2;
0631 double xf_ErrorNoise = xfError_Noise(noise_level);
0632 double xf_ErrorXTasym = xfError_XTasym(xt_asymmetry);
0633
0634
0635 double d_xf = std::sqrt(std::pow(xf_ErrorNoise, 2) + std::pow(xf_ErrorXTasym, 2));
0636 double d_corr =
0637 estimated2GattiCorrection(xf + d_xf, stripWidth, ME1_1) - estimated2GattiCorrection(xf, stripWidth, ME1_1);
0638 double x_shift = d_xf + d_corr;
0639
0640
0641
0642 double x_error = std::sqrt(std::pow(std::abs(x_shift) * stripWidth, 2) + std::pow(const_syst, 2));
0643 return x_error;
0644 }
0645
0646 double CSCXonStrip_MatchGatti::calculateXonStripPosition(float stripWidth, bool ME1_1) {
0647 double x_estimated = -99.;
0648 double min;
0649 if (q_sumR > q_sumL) {
0650 min = q_sumL;
0651 } else {
0652 min = q_sumR;
0653 }
0654
0655 x_estimated = (q_sumR - q_sumL) / (q_sumC - min) / 2;
0656 double x_gatti = estimated2Gatti(x_estimated, stripWidth, ME1_1);
0657 return x_gatti;
0658 }
0659
0660
0661 const int CSCXonStrip_MatchGatti::n_val;
0662 const int CSCXonStrip_MatchGatti::n_SW_noME1_1;
0663 const int CSCXonStrip_MatchGatti::n_SW_ME1_1;