Beispiel #1
0
  public void doCorrection(Track trkcand, Geometry geo) {

    double B = bstSwim.Bfield(Points[0][0] / 10, Points[0][0] / 10, Points[0][0] / 10).z();
    double ELossMax = 600; // 600Mev
    double stepSize = 0.001; // 1 MeV
    int nbins = (int) ELossMax;

    double pt0 = trkcand.get_Pt() + ELossMax * stepSize; // Assumes the max ELoss is 600 MeV

    double pt = pt0;
    double curv =
        (Constants.LIGHTVEL * Math.abs(B)) * Math.signum(this.OrigTrack.get_curvature()) / pt;

    for (int j = 0; j < nbins; j++) {
      if (Math.abs(this.OrigTrack.get_curvature()) < Math.abs(curv)) {
        double correctedCurv =
            (Constants.LIGHTVEL * Math.abs(B))
                * Math.signum(this.OrigTrack.get_curvature())
                / (pt + stepSize);
        trkcand.get_Helix().set_curvature(correctedCurv);
        trkcand.set_HelicalTrack(trkcand.get_Helix());
        return;
      }
      pt = pt0 - j * stepSize;

      double aveCurv = 0;
      for (int k = 0; k < trkcand.size(); k++) {
        aveCurv += doEnergyLossCorrection(k, pt);
      }
      aveCurv /= trkcand.size();
      curv = aveCurv;
    }
  }
Beispiel #2
0
  private double doEnergyLossCorrection(int m, double pt) {

    double B =
        bstSwim
            .Bfield(Points[m][0] / 10, Points[m][0] / 10, Points[m][0] / 10)
            .z(); // Bfield takes units of cm

    double tanL = this.OrigTrack.get_tandip();

    // pz = pt*tanL
    double pz = pt * tanL;
    double p = Math.sqrt(pt * pt + pz * pz);

    double mass = MassHypothesis(massHypo); // assume given mass hypothesis

    double beta = p / Math.sqrt(p * p + mass * mass); // use particle momentum
    double gamma = 1. / Math.sqrt(1 - beta * beta);

    double cosEntranceAngle = cosEntAnglesPlanes[m];

    double s = eMass / mass;
    // double Wmax = 2.*mass*beta*beta*gamma*gamma/(1.+2.*s*Math.sqrt(1+beta*gamma*beta*gamma)+s*s);
    double Wmax = 2. * mass * beta * beta * gamma * gamma / (1. + 2. * s * gamma + s * s);
    double I = 0.000000172;

    double logterm = 2. * mass * beta * beta * gamma * gamma * Wmax / (I * I);

    double delta = 0.;

    // double dEdx =
    // 0.0001535*(Constants.detMatZ/Constants.detMatA)*(Math.log(logterm)-2*beta*beta-delta)/(beta*beta);
    double dEdx =
        0.00001535
            * Constants.detMatZ_ov_A_timesThickn
            * (Math.log(logterm) - 2 * beta * beta - delta)
            / (beta * beta);

    double tmpPtot = p;

    double tmpEtot =
        Math.sqrt(MassHypothesis(massHypo) * MassHypothesis(massHypo) + tmpPtot * tmpPtot);
    // double tmpEtotCorrected = tmpEtot-dEdx*Constants.LAYRGAP/cosEntranceAngle;
    double tmpEtotCorrected = tmpEtot - dEdx / cosEntranceAngle;

    double tmpPtotCorrSq =
        tmpEtotCorrected * tmpEtotCorrected - MassHypothesis(massHypo) * MassHypothesis(massHypo);

    double newPt = Math.sqrt(tmpPtotCorrSq / (1 + tanL * tanL));

    double newCurv =
        (Constants.LIGHTVEL * Math.abs(B)) * Math.signum(this.OrigTrack.get_curvature()) / newPt;

    return newCurv;
  }