/*
$Log$
+Revision 1.17 2002/05/24 13:29:58 hristov
+AliTrackReference added, AliDisplay modified
+
Revision 1.16 2001/10/04 15:30:56 hristov
Changes to accommodate the set of PHOS folders and tasks (Y.Schutz)
//
}
+
+
+void AliDetector::RemapTrackReferencesIDs(Int_t *map)
+{
+ //
+ //remaping track reference
+ //called at finish primary
+ if (!fTrackReferences) return;
+ for (Int_t i=0;i<fTrackReferences->GetEntries();i++){
+ AliTrackReference * ref = (AliTrackReference*) fTrackReferences->UncheckedAt(i);
+ if (ref) {
+ Int_t newID = map[ref->GetTrack()];
+ if (newID>=0) ref->SetTrack(newID);
+ else ref->SetTrack(-1);
+
+ }
+ }
+}
+
//_____________________________________________________________________________
AliHit* AliDetector::FirstHit(Int_t track)
{
branch = treeD->GetBranch(branchname);
if (branch) branch->SetAddress(&fDigits);
}
+
+ // Branch address for tr tree
+ TTree *treeTR = gAlice->TreeTR();
+ if (treeTR && fTrackReferences) {
+ branch = treeTR->GetBranch(branchname);
+ if (branch) branch->SetAddress(&fTrackReferences);
+ }
+
+
}
TClonesArray *Digits() const {return fDigits;}
TClonesArray *Hits() const {return fHits;}
TClonesArray *TrackReferences() const {return fTrackReferences;}
+ virtual void RemapTrackReferencesIDs(Int_t *map); //remaping track references MI
TObjArray *Points() const {return fPoints;}
Int_t GetIshunt() const {return fIshunt;}
TClonesArray *fDigits; //List of digits for this detector
char *fDigitsFile; //!File to store branches of digits tree for detector
TObjArray *fPoints; //!Array of points for each track (all tracks in memory)
- TClonesArray *fTrackReferences; //!list of track references - for one primary track only -MI
+ TClonesArray *fTrackReferences; //list of track references - for one primary track only -MI
Int_t fMaxIterTrackRef; //!for track refernce iterator routines
Int_t fCurrentIterTrackRef; //!for track refernce iterator routines
- ClassDef(AliDetector,1) //Base class for ALICE detectors
+ ClassDef(AliDetector,2) //Base class for ALICE detectors
};
#endif
virtual void FinishRun() {}
virtual void FinishPrimary() {}
virtual void RemapTrackHitIDs(Int_t *map) {}
+ virtual void RemapTrackReferencesIDs(Int_t *map) {} //remaping track references MI
//virtual void Hits2Digits() {}
virtual void Init() {}
/*
$Log$
+Revision 1.21 2002/05/28 14:24:57 hristov
+Correct warning messages
+
Revision 1.20 2002/04/30 11:47:30 morsch
KeepPhysics method called by PurifyKine added (N. Carrer, A.M.)
AliModule *detector;
while((detector = (AliModule*)nextmod())) {
detector->RemapTrackHitIDs(map.GetArray());
+ detector->RemapTrackReferencesIDs(map.GetArray());
}
// Now the output bit, from fHgwmk to nkeep we write everything and we erase