/*
$Log$
+Revision 1.39 2002/06/12 09:54:35 cblume
+Update of tracking code provided by Sergei
+
Revision 1.38 2002/03/28 14:59:07 cblume
Coding conventions
#include <TFile.h>
#include <TROOT.h>
#include <TParticle.h>
+#include <TLorentzVector.h>
#include "AliRun.h"
#include "AliConst.h"
#include "AliDigit.h"
#include "AliMagF.h"
#include "AliMC.h"
+#include "AliTrackReference.h"
#include "AliTRD.h"
#include "AliTRDhit.h"
}
+//_____________________________________________________________________________
+void AliTRD::AddTrackReference(Int_t label, TLorentzVector p, TLorentzVector x)
+{
+ //
+ // Add a trackrefernce to the list
+ //
+
+ if (!fTrackReferences) {
+ Error("AddTrackReference","Container fTrackRefernce not active\n");
+ return;
+ }
+
+ Int_t nref = fTrackReferences->GetEntriesFast();
+ TClonesArray &lref = *fTrackReferences;
+ AliTrackReference * ref = new(lref[nref]) AliTrackReference();
+ ref->SetMomentum(p[0],p[1],p[2]);
+ ref->SetPosition(x[0],x[1],x[2]);
+ ref->SetTrack(label);
+
+}
+
//_____________________________________________________________________________
void AliTRD::Hits2Digits()
{
#include "AliDetector.h"
class TFile;
+class TLorentzVector;
class AliRun;
class AliDigit;
virtual void AddHit(Int_t track, Int_t det, Float_t *hits, Int_t q, Bool_t inDrift);
virtual void AddCluster(Float_t *pos, Int_t det, Float_t amp, Int_t *tracks
, Float_t *sig, Int_t iType);
+ virtual void AddTrackReference(Int_t label, TLorentzVector p, TLorentzVector x);
virtual void BuildGeometry();
virtual void Copy(TObject &trd);
virtual void CreateGeometry();
/*
$Log$
+Revision 1.33 2002/02/20 14:01:40 hristov
+Compare a TString with a string, otherwise the conversion cannot be done on Sun
+
Revision 1.32 2002/02/13 16:58:37 cblume
Bug fix reported by Jiri. Make atoi input zero terminated in StepManager()
Int_t qTot;
Float_t hits[3];
- Float_t moms[3];
Float_t random[1];
Float_t charge;
Float_t aMass;
// Special hits and TR photons only in the drift region
if (drRegion) {
- // Create some special hits with amplitude 0 at the entrance and
- // exit of each chamber that contain the momentum components of the particle
+ // Create a track reference at the entrance and
+ // exit of each chamber that contain the
+ // momentum components of the particle
if (gMC->IsTrackEntering() || gMC->IsTrackExiting()) {
gMC->TrackMomentum(mom);
- moms[0] = mom[0];
- moms[1] = mom[1];
- moms[2] = mom[2];
- AddHit(gAlice->CurrentTrack(),det,moms,0,kTRUE);
- AddHit(gAlice->CurrentTrack(),det,hits,0,kTRUE);
+ AddTrackReference(gAlice->CurrentTrack(),mom,pos);
}
// Create the hits from TR photons