Fork me on GitHub

Changeset 1361 in svn for trunk/modules/Hector.cc


Ignore:
Timestamp:
Apr 8, 2014, 6:43:52 PM (11 years ago)
Author:
Pavel Demin
Message:

add HectorHit class and corresponding ROOT tree branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/Hector.cc

    r1360 r1361  
    6363  fBeamLineLength = GetDouble("BeamLineLength", 430.0);
    6464  fDistance = GetDouble("Distance", 420.0);
     65  fOffsetX = GetDouble("OffsetX", 0.0);
     66  fOffsetS = GetDouble("OffsetS", 120.0);
    6567  fSigmaE = GetDouble("SigmaE", 0.0);
    6668  fSigmaX = GetDouble("SigmaX", 0.0);
    6769  fSigmaY = GetDouble("SigmaY", 0.0);
     70  fSigmaT = GetDouble("SigmaT", 0.0);
    6871  fEtaMin = GetDouble("EtaMin", 5.0);
    6972
    7073  fBeamLine = new H_BeamLine(fDirection, fBeamLineLength + 0.1);
    71   fBeamLine->fill(GetString("BeamLineFile", "examples/LHCB1IR5_5TeV.tfs"), fDirection, "IP5" );
     74  fBeamLine->fill(GetString("BeamLineFile", "examples/LHCB1IR5_5TeV.tfs"), fDirection, GetString("IPName", "IP5"));
    7275  fBeamLine->offsetElements(120, -0.097*fDirection);
     76  fBeamLine->offsetElements(fOffsetS, fOffsetX);
    7377  fBeamLine->calcMatrix();
    7478
     
    8084  // create output array
    8185
    82   fOutputArray = ExportArray(GetString("OutputArray", "stableParticles"));
     86  fOutputArray = ExportArray(GetString("OutputArray", "hits"));
    8387}
    8488
     
    97101  Candidate *candidate, *mother;
    98102  Double_t pz;
    99   Double_t x, y, z, tx, ty;
     103  Double_t x, y, z, tx, ty, theta;
     104  Double_t distance, time;
     105
     106  const Double_t c_light = 2.99792458E8;
    100107
    101108  fItInputArray->Reset();
     
    118125    ty = 0.0;
    119126
     127    theta = TMath::Hypot(TMath::ATan(candidateMomentum.Px()/pz), TMath::ATan(candidateMomentum.Py()/pz));
     128    distance = (fDistance - 1.0E-3 * candidatePosition.Z())/TMath::Cos(theta);
     129    time = gRandom->Gaus((distance + 1.0E-3 * candidatePosition.T())/c_light, fSigmaT);
     130
    120131    H_BeamParticle particle(candidate->Mass, candidate->Charge);
    121132    particle.set4Momentum(candidateMomentum);
     
    133144    mother = candidate;
    134145    candidate = static_cast<Candidate*>(candidate->Clone());
    135     candidate->Position.SetXYZT(particle.getX(), particle.getY(), fDistance, 0.0);
     146    candidate->Position.SetXYZT(particle.getX(), particle.getY(), particle.getS(), time);
    136147    candidate->Momentum.SetPxPyPzE(particle.getTX(), particle.getTY(), 0.0, particle.getE());
    137148    candidate->AddCandidate(mother);
Note: See TracChangeset for help on using the changeset viewer.