Changeset 1361 in svn for trunk/modules/Hector.cc
- Timestamp:
- Apr 8, 2014, 6:43:52 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/modules/Hector.cc
r1360 r1361 63 63 fBeamLineLength = GetDouble("BeamLineLength", 430.0); 64 64 fDistance = GetDouble("Distance", 420.0); 65 fOffsetX = GetDouble("OffsetX", 0.0); 66 fOffsetS = GetDouble("OffsetS", 120.0); 65 67 fSigmaE = GetDouble("SigmaE", 0.0); 66 68 fSigmaX = GetDouble("SigmaX", 0.0); 67 69 fSigmaY = GetDouble("SigmaY", 0.0); 70 fSigmaT = GetDouble("SigmaT", 0.0); 68 71 fEtaMin = GetDouble("EtaMin", 5.0); 69 72 70 73 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")); 72 75 fBeamLine->offsetElements(120, -0.097*fDirection); 76 fBeamLine->offsetElements(fOffsetS, fOffsetX); 73 77 fBeamLine->calcMatrix(); 74 78 … … 80 84 // create output array 81 85 82 fOutputArray = ExportArray(GetString("OutputArray", " stableParticles"));86 fOutputArray = ExportArray(GetString("OutputArray", "hits")); 83 87 } 84 88 … … 97 101 Candidate *candidate, *mother; 98 102 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; 100 107 101 108 fItInputArray->Reset(); … … 118 125 ty = 0.0; 119 126 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 120 131 H_BeamParticle particle(candidate->Mass, candidate->Charge); 121 132 particle.set4Momentum(candidateMomentum); … … 133 144 mother = candidate; 134 145 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); 136 147 candidate->Momentum.SetPxPyPzE(particle.getTX(), particle.getTY(), 0.0, particle.getE()); 137 148 candidate->AddCandidate(mother);
Note:
See TracChangeset
for help on using the changeset viewer.