- process TRD on-line tracklets and tracks in the same way as digits,
authorjklein <jklein@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 May 2013 10:59:28 +0000 (10:59 +0000)
committerjklein <jklein@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 14 May 2013 10:59:28 +0000 (10:59 +0000)
  i.e. write during digits conversion and read back (if digits conversion
  active)

TRD/AliTRDReconstructor.cxx
TRD/AliTRDReconstructor.h

index dc45ca9..9dd4b6f 100644 (file)
@@ -185,8 +185,6 @@ void AliTRDReconstructor::ConvertDigits(AliRawReader *rawReader
   ResetContainers();
 
   AliTRDrawData rawData;
-  rawData.SetTracklets(GetTracklets("AliTRDtrackletMCM")); // link allocated online tracklets
-  rawData.SetTracks(GetTracks());                          // link allocated online tracks
 
   AliTRDdigitsManager *manager = rawData.Raw2Digits(rawReader);
   manager->MakeBranch(digitsTree);
@@ -237,16 +235,15 @@ void AliTRDReconstructor::Reconstruct(TTree *digitsTree
     return;
   }
 
-  if(fgClusters){
-    AliDebug(1, Form("Removing %5d clusters @ %p", fgClusters->GetEntriesFast(), (void*)fgClusters));
-    fgClusters->Clear();
-  }
+  ResetContainers();
   AliTRDclusterizer clusterizer(fgTaskNames[AliTRDrecoParam::kClusterizer], fgTaskNames[AliTRDrecoParam::kClusterizer]);
   clusterizer.SetReconstructor(this);
   clusterizer.SetUseLabels(kTRUE);
   clusterizer.SetStoreRawSignals(kTRUE);
   clusterizer.OpenOutput(clusterTree);
   clusterizer.ReadDigits(digitsTree);
+  clusterizer.ReadTracklets();
+  clusterizer.ReadTracks();
   clusterizer.MakeClusters();
   fgNTimeBins = clusterizer.GetNTimeBins();
 }
@@ -389,7 +386,7 @@ TClonesArray* AliTRDReconstructor::GetTracklets(const char *trkltype)
 {
 // Build/ Retrieve online tracklets array
 
-  if (trkltype != 0) {
+  if (trkltype && strlen(trkltype) > 0) {
     if(fgTracklets && (TClass::GetClass(trkltype) != fgTracklets->GetClass())){
       fgTracklets->Delete();
       delete fgTracklets;
index a71d9b8..4504405 100644 (file)
@@ -50,7 +50,7 @@ public:
   virtual void        FillESD(AliRawReader *, TTree *clusterTree, AliESDEvent *esd) const { FillESD((TTree * )NULL, clusterTree, esd);                    }
   virtual void        FillESD(TTree *digitsTree, TTree *clusterTree, AliESDEvent *esd) const;
   static TClonesArray* GetClusters();
-  static TClonesArray* GetTracklets(const char *trkltype = "AliTRDtrackletMCM");
+  static TClonesArray* GetTracklets(const char *trkltype = "");
   static TClonesArray* GetTracks();
   static Int_t        GetNTimeBins()             { return fgNTimeBins;}
   Int_t               GetNdEdxSlices() const     { return (Int_t)AliTRDpidUtil::GetNdEdxSlices(GetPIDMethod());}