///////////////////////////////////////////////////////////////////////////////
#include <cstdlib>
-//#include "TFile.h"
#include "TObjArray.h"
#include "TString.h"
#include "AliRawReader.h"
#include "AliTOFClusterFinder.h"
+#include "AliTOFClusterFinderV1.h"
#include "AliTOFcalib.h"
#include "AliTOFtrackerMI.h"
#include "AliTOFtracker.h"
#include "AliTOFReconstructor.h"
class TTree;
-//class TFile;
-//class TDirectory;
class AliESDEvent;
-//extern TDirectory *gDirectory;
-//extern TFile *gFile;
-
ClassImp(AliTOFReconstructor)
//____________________________________________________________________
void AliTOFReconstructor::Reconstruct(AliRawReader *rawReader,
TTree *clustersTree) const
{
-// reconstruct clusters from Raw Data
-
- static AliTOFClusterFinder tofClus(fTOFcalib);
- tofClus.Digits2RecPoints(rawReader, clustersTree);
+ //
+ // reconstruct clusters from Raw Data
+ //
+
+ TString selectedClusterFinder = GetOption();
+ // use V1 cluster finder if selected
+ if (selectedClusterFinder.Contains("NCF")) {
+ static AliTOFClusterFinderV1 tofClus(fTOFcalib);
+ tofClus.Digits2RecPoints(rawReader, clustersTree);
+ }
+ else {
+ static AliTOFClusterFinder tofClus(fTOFcalib);
+ tofClus.Digits2RecPoints(rawReader, clustersTree);
+ }
}
void AliTOFReconstructor::Reconstruct(TTree *digitsTree,
TTree *clustersTree) const
{
-// reconstruct clusters from Raw Data
+ //
+ // reconstruct clusters from digits
+ //
AliDebug(2,Form("Global Event loop mode: Creating Recpoints from Digits Tree"));
- static AliTOFClusterFinder tofClus(fTOFcalib);
- tofClus.Digits2RecPoints(digitsTree, clustersTree);
+
+ TString selectedClusterFinder = GetOption();
+ // use V1 cluster finder if selected
+ if (selectedClusterFinder.Contains("NCF")) {
+ static AliTOFClusterFinderV1 tofClus(fTOFcalib);
+ tofClus.Digits2RecPoints(digitsTree, clustersTree);
+ }
+ else {
+ static AliTOFClusterFinder tofClus(fTOFcalib);
+ tofClus.Digits2RecPoints(digitsTree, clustersTree);
+ }
}
//_____________________________________________________________________________
// reconstruct clusters from digits
AliDebug(2,Form("Global Event loop mode: Converting Raw Data to a Digits Tree"));
- AliTOFClusterFinder tofClus(fTOFcalib);
- tofClus.Raw2Digits(reader, digitsTree);
+
+ TString selectedClusterFinder = GetOption();
+ // use V1 cluster finder if selected
+ if (selectedClusterFinder.Contains("NCF")) {
+ static AliTOFClusterFinderV1 tofClus(fTOFcalib);
+ tofClus.Raw2Digits(reader, digitsTree);
+ }
+ else {
+ static AliTOFClusterFinder tofClus(fTOFcalib);
+ tofClus.Raw2Digits(reader, digitsTree);
+ }
}
//_____________________________________________________________________________
AliTracker* AliTOFReconstructor::CreateTracker() const
{
-// create a TOF tracker
+
+ //
+ // create a TOF tracker using
+ // TOF Reco Param collected by STEER
+ //
TString selectedTracker = GetOption();
+
+ AliTracker *tracker;
// use MI tracker if selected
- if (selectedTracker.Contains("MI")) return new AliTOFtrackerMI();
- if (selectedTracker.Contains("V1")) return new AliTOFtrackerV1();
- return new AliTOFtracker();
-}
+ if (selectedTracker.Contains("MI")) {
+ tracker = new AliTOFtrackerMI();
+ }
+ // use V1 tracker if selected
+ if (selectedTracker.Contains("V1")) {
+ tracker = new AliTOFtrackerV1();
+ }
+ else {
+ tracker = new AliTOFtracker();
+ }
+ return tracker;
+}