#include "AliTrackPointArray.h"
#include "AliCDBManager.h"
-#include "AliTOFcalib.h"
#include "AliTOFpidESD.h"
#include "AliTOFRecoParam.h"
+#include "AliTOFReconstructor.h"
#include "AliTOFcluster.h"
#include "AliTOFGeometry.h"
#include "AliTOFtracker.h"
// Gettimg the geometry
fGeom= new AliTOFGeometry();
- // Read the reconstruction parameters from the OCDB
- AliTOFcalib* calib=new AliTOFcalib();
- fRecoParam = (AliTOFRecoParam*)calib->ReadRecParFromCDB("TOF/Calib",-1);
- if(fRecoParam->GetApplyPbPbCuts())fRecoParam=fRecoParam->GetPbPbparam();
- Double_t parPID[2];
- parPID[0]=fRecoParam->GetTimeResolution();
- parPID[1]=fRecoParam->GetTimeNSigma();
- fPid=new AliTOFpidESD(parPID);
+
InitCheckHists();
- delete calib;
+
}
//_____________________________________________________________________________
AliTOFtracker::AliTOFtracker(const AliTOFtracker &t):
// Gets seeds from ESD event and Match with TOF Clusters
//
+ // initialize RecoParam for current event
+
+ AliInfo("Initializing params for TOF... ");
+
+ fRecoParam = AliTOFReconstructor::GetRecoParam(); // instantiate reco param from STEER...
+
+ if (fRecoParam == 0x0) {
+ AliFatal("No Reco Param found for TOF!!!");
+ }
+ //fRecoParam->Dump();
+ if(fRecoParam->GetApplyPbPbCuts())fRecoParam=fRecoParam->GetPbPbparam();
+ //fRecoParam->PrintParameters();
+
+ Double_t parPID[2];
+ parPID[0]=fRecoParam->GetTimeResolution();
+ parPID[1]=fRecoParam->GetTimeNSigma();
+ fPid=new AliTOFpidESD(parPID);
//Initialise some counters
// now choose the cluster to be matched with the track.
- Int_t idclus=0;
+ Int_t idclus=-1;
Float_t recL = 0.;
Float_t xpos=0.;
Float_t mindist=1000.;
AliTOFcluster *c=fClusters[idclus];
+
+ AliDebug(2, Form("%7i %7i %10i %10i %10i %10i %7i",
+ iseed,
+ fnmatch-1,
+ TMath::Abs(trackTOFin->GetLabel()),
+ c->GetLabel(0), c->GetLabel(1), c->GetLabel(2),
+ idclus)); // AdC
+
c->Use();
// Track length correction for matching Step 2
//Init histos for Digits/Reco QA and Calibration
+ TDirectory *dir = gDirectory;
+ TFile *logFileTOF = 0;
+
+ TSeqCollection *list = gROOT->GetListOfFiles();
+ int n = list->GetEntries();
+ Bool_t isThere=kFALSE;
+ for(int i=0; i<n; i++) {
+ logFileTOF = (TFile*)list->At(i);
+ if (strstr(logFileTOF->GetName(), "TOFQA.root")){
+ isThere=kTRUE;
+ break;
+ }
+ }
+
+ if(!isThere)logFileTOF = new TFile( "TOFQA.root","RECREATE");
+ logFileTOF->cd();
+
fCalTree = new TTree("CalTree", "Tree for TOF calibration");
fCalTree->Branch("TOFchannelindex",&fIch,"iTOFch/I");
fCalTree->Branch("ToT",&fToT,"TOFToT/F");
fHRecSigZVsP=new TH2F("TOFDig_SigZVsP", "",40,0.,4.,100, 0.,5.);
fHRecSigYVsPWin=new TH2F("TOFDig_SigYVsPWin", "",40,0.,4.,100, 0.,50.);
fHRecSigZVsPWin=new TH2F("TOFDig_SigZVsPWin", "",40,0.,4.,100, 0.,50.);
+
+ dir->cd();
+
}
//_________________________________________________________________________
//write histos for Digits/Reco QA and Calibration
TDirectory *dir = gDirectory;
- TFile *logFile = 0;
TFile *logFileTOF = 0;
TSeqCollection *list = gROOT->GetListOfFiles();
int n = list->GetEntries();
- for(int i=0; i<n; i++) {
- logFile = (TFile*)list->At(i);
- if (strstr(logFile->GetName(), "AliESDs.root")) break;
- }
-
Bool_t isThere=kFALSE;
for(int i=0; i<n; i++) {
logFileTOF = (TFile*)list->At(i);
}
}
- logFile->cd();
- fHDigClusMap->Write(fHDigClusMap->GetName(), TObject::kOverwrite);
- fHDigNClus->Write(fHDigNClus->GetName(), TObject::kOverwrite);
- fHDigClusTime->Write(fHDigClusTime->GetName(), TObject::kOverwrite);
- fHDigClusToT->Write(fHDigClusToT->GetName(), TObject::kOverwrite);
- fHRecNClus->Write(fHRecNClus->GetName(), TObject::kOverwrite);
- fHRecDist->Write(fHRecDist->GetName(), TObject::kOverwrite);
- fHRecSigYVsP->Write(fHRecSigYVsP->GetName(), TObject::kOverwrite);
- fHRecSigZVsP->Write(fHRecSigZVsP->GetName(), TObject::kOverwrite);
- fHRecSigYVsPWin->Write(fHRecSigYVsPWin->GetName(), TObject::kOverwrite);
- fHRecSigZVsPWin->Write(fHRecSigZVsPWin->GetName(), TObject::kOverwrite);
- //fCalTree->Write(fCalTree->GetName(),TObject::kOverwrite);
- logFile->Flush();
-
- if(!isThere)logFileTOF = new TFile( "TOFQA.root","RECREATE");
+ if(!isThere) {
+ AliError(Form("File TOFQA.root not found!! not wring histograms...."));
+ return;
+ }
logFileTOF->cd();
fHDigClusMap->Write(fHDigClusMap->GetName(), TObject::kOverwrite);
fHDigNClus->Write(fHDigNClus->GetName(), TObject::kOverwrite);