AliError("No hit tree defined");
return kFALSE;
}
+ if (!fArrayH) {
+ AliError("No hit array defined");
+ return kFALSE;
+ }
+
Int_t nTracks = fTreeH->GetEntries();
for (Int_t i = 0; i < nTracks; i++) {
Int_t hitRead = fTreeH->GetEntry(i);
if (hitRead <= 0) continue;
- if (!fArrayH) {
- AliError("No hit array defined");
- return kFALSE;
- }
+
Int_t nHit = fArrayH->GetEntries();
if (nHit <= 0) continue;
+
for (Int_t j = 0; j < nHit; j++) {
AliFMDHit* hit = static_cast<AliFMDHit*>(fArrayH->At(j));
if (!hit) continue;
+
TParticle* track = 0;
if (TESTBIT(fTreeMask, kKinematics) && fStack) {
Int_t trackno = hit->Track();
AliFMDInput::ProcessTracks()
{
// Read the hit tree, and pass each hit to the member function
- // ProcessHit.
+ // ProcessTrack.
if (!fStack) {
AliError("No track tree defined");
return kFALSE;
AliError("No hit tree defined");
return kFALSE;
}
+ if (!fArrayH) {
+ AliError("No hit array defined");
+ return kFALSE;
+ }
+
+ // Int_t nTracks = fStack->GetNtrack();
Int_t nTracks = fTreeH->GetEntries();
for (Int_t i = 0; i < nTracks; i++) {
- TParticle* track = fStack->Particle(i);
+ Int_t trackno = nTracks - i - 1;
+ TParticle* track = fStack->Particle(trackno);
if (!track) continue;
+
+ // Get the hits for this track.
Int_t hitRead = fTreeH->GetEntry(i);
- if (hitRead <= 0) continue;
- if (!fArrayH) {
- AliError("No hit array defined");
- return kFALSE;
+ Int_t nHit = fArrayH->GetEntries();
+ if (nHit == 0 || hitRead <= 0) {
+ // Let user code see the track, even if there's no hits.
+ if (!ProcessTrack(trackno, track, 0)) return kFALSE;
+ continue;
}
- Int_t nHit = fArrayH->GetEntries();
- if (nHit <= 0) continue;
+ // Loop over the hits corresponding to this track.
for (Int_t j = 0; j < nHit; j++) {
AliFMDHit* hit = static_cast<AliFMDHit*>(fArrayH->At(j));
- if (!hit) continue;
- if (!ProcessTrack(i, track, hit)) return kFALSE;
- }
- // if (!ProcessTrack(i, track, fArrayH)) return kFALSE;
+ if (!ProcessTrack(trackno, track, hit)) return kFALSE;
+ }
}
return kTRUE;
}
}
+//____________________________________________________________________
+void
+AliFMDReconstructor::Reconstruct(AliRawReader* /*reader*/, TTree*) const
+{
+ // Reconstruct directly from raw data (no intermediate output on
+ // digit tree or rec point tree).
+ // Parameters:
+ // reader Raw event reader
+ // ctree Not used.
+ AliError("Method is not used");
+#if 0
+ TClonesArray* array = new TClonesArray("AliFMDDigit");
+ AliFMDRawReader rawRead(reader, 0);
+ rawRead.ReadAdcs(array);
+ ProcessDigits(array);
+ array->Delete();
+ delete array;
+#endif
+}
+
//____________________________________________________________________
void
AliFMDReconstructor::Reconstruct(TTree* digitsTree,
if (fDiagAll) fDiagAll->Reset();
}
+//____________________________________________________________________
+void
+AliFMDReconstructor::FillESD(AliRawReader*, TTree* clusterTree,
+ AliESDEvent* esd) const
+{
+ TTree* dummy = 0;
+ FillESD(dummy, clusterTree, esd);
+}
+
//____________________________________________________________________
//
// EOF
@param digitsTree Tree holding the digits of this event
@param clusterTree Tree to store AliFMDRecPoint objects in. */
virtual void Reconstruct(TTree* digitsTree, TTree* clusterTree) const;
- virtual void Reconstruct(AliRawReader *, TTree*) const
- {AliError("Method is not used");}
+ /** Not used */
+ virtual void Reconstruct(AliRawReader *, TTree*) const;
/** Put in the ESD data, the FMD ESD data. The object created by
the Reconstruct member function is copied to the ESD object.
@param digitsTree Tree of digits for this event - not used
- not used.
@param esd ESD object to store data in.
*/
- virtual void FillESD(AliRawReader*, TTree*clusterTree, AliESDEvent*esd) const
- {FillESD((TTree*)NULL,clusterTree,esd);}
virtual void FillESD(TTree* digitsTree, TTree* clusterTree,
AliESDEvent* esd) const;
+ /** Forwards to above member function */
+ virtual void FillESD(AliRawReader*, TTree* clusterTree,
+ AliESDEvent* esd) const;
/** Not used */
virtual void SetESD(AliESDEvent* esd) { fESD = esd; }
/** Set the noise factor