/*
$Log$
+Revision 1.41 2003/04/23 15:19:48 cblume
+Fix bug in absorbtion length of photons
+
+Revision 1.40 2003/04/08 08:14:53 morsch
+AddTrackReference moved to AliModule.
+
+Revision 1.39 2003/02/11 16:54:07 hristov
+Updated AliTrackReference class (S.Radomski)
+
+Revision 1.38 2003/01/31 11:41:06 cblume
+Fix bug in StepManager in treating geometry with holes
+
+Revision 1.37 2003/01/28 14:38:18 cblume
+Add track length to track references
+
+Revision 1.36 2002/11/21 22:38:47 alibrary
+Removing AliMC and AliMCProcess
+
+Revision 1.35 2002/10/14 14:57:44 hristov
+Merging the VirtualMC branch to the main development branch (HEAD)
+
Revision 1.33.6.2 2002/07/24 10:09:31 alibrary
Updating VirtualMC
#include <TLorentzVector.h>
#include "AliRun.h"
-#include "AliMC.h"
#include "AliConst.h"
#include "AliTRDv1.h"
// Take the absorbtion in the entrance window into account
Double_t muMy = fTR->GetMuMy(energyMeV);
sigma = muMy * fFoilDensity;
- absLength = gRandom->Exp(sigma);
- if (absLength < AliTRDgeometry::MyThick()) continue;
+ if (sigma > 0.0) {
+ absLength = gRandom->Exp(1.0/sigma);
+ if (absLength < AliTRDgeometry::MyThick()) continue;
+ }
+ else {
+ continue;
+ }
// The absorbtion cross sections in the drift gas
if (fGasMix == 1) {
// Gas-mixture (Xe/CO2)
Double_t muXe = fTR->GetMuXe(energyMeV);
Double_t muCO = fTR->GetMuCO(energyMeV);
- sigma = (0.85 * muXe + 0.15 * muCO) * fGasDensity;
+ sigma = (0.85 * muXe + 0.15 * muCO) * fGasDensity * fTR->GetTemp();
}
else {
// Gas-mixture (Xe/Isobutane)
Double_t muXe = fTR->GetMuXe(energyMeV);
Double_t muBu = fTR->GetMuBu(energyMeV);
- sigma = (0.97 * muXe + 0.03 * muBu) * fGasDensity;
+ sigma = (0.97 * muXe + 0.03 * muBu) * fGasDensity * fTR->GetTemp();
}
// The distance after which the energy of the TR photon
// is deposited.
- absLength = gRandom->Exp(sigma);
- if (absLength > AliTRDgeometry::DrThick()) continue;
+ if (sigma > 0.0) {
+ absLength = gRandom->Exp(1.0/sigma);
+ if (absLength > AliTRDgeometry::DrThick()) continue;
+ }
+ else {
+ continue;
+ }
// The position of the absorbtion
Float_t posHit[3];
TLorentzVector pos, mom;
const Int_t kNplan = AliTRDgeometry::Nplan();
+ const Int_t kNcham = AliTRDgeometry::Ncham();
+ const Int_t kNdetsec = kNplan * kNcham;
+
const Double_t kBig = 1.0E+12;
// Ionization energy
// The plane and chamber number
cIdChamber[0] = cIdCurrent[2];
cIdChamber[1] = cIdCurrent[3];
- Int_t idChamber = atoi(cIdChamber);
+ Int_t idChamber = (atoi(cIdChamber) % kNdetsec);
cha = ((Int_t) idChamber / kNplan);
pla = ((Int_t) idChamber % kNplan);
// momentum components of the particle
if (gMC->IsTrackEntering() || gMC->IsTrackExiting()) {
gMC->TrackMomentum(mom);
- AddTrackReference(gAlice->CurrentTrack(),mom,pos);
+ AddTrackReference(gAlice->CurrentTrack());
}
// Create the hits from TR photons