-/****************************************************************************
- * Very important, delicate and rather obscure macro. *
- * *
- * Creates list of "trackable" tracks, *
- * calculates efficiency, resolutions etc. *
- * There is a possibility to run this macro over several events. *
- * *
- * Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch *
- * with several nice improvements by: M.Ivanov, GSI, m.ivanov@gsi.de *
- ****************************************************************************/
+/// \file AliTPCComparison.C
+/// \brief Very important, delicate and rather obscure macro
+///
+/// Creates list of "trackable" tracks, calculates efficiency, resolutions etc.
+///
+/// There is a possibility to run this macro over several events.
+///
+/// \author I.Belikov, CERN, Jouri.Belikov@cern.ch, M.Ivanov, GSI, m.ivanov@gsi.de
#if !defined(__CINT__) || defined(__MAKECINT__)
#include <TMath.h>
#include "AliTPCClustersRow.h"
#include "AliTPCcluster.h"
#include "AliTPCLoader.h"
+
+ #include "AliCDBManager.h"
+ #include "AliTPCcalibDB.h"
#endif
Int_t GoodTracksTPC(const Char_t *dir=".");
-extern AliRun *gAlice;
extern TBenchmark *gBenchmark;
extern TROOT *gROOT;
event->ReadFromTree(esdTree);
- //******* Loop over events *********
+ // ******* Loop over events *********
+
Int_t e=0;
while (esdTree->GetEvent(e)) {
cout<<endl<<endl<<"********* Processing event number: "<<e<<"*******\n";
Int_t GoodTracksTPC(const Char_t *dir) {
- if (gAlice) {
- delete gAlice->GetRunLoader();
- delete gAlice;//if everything was OK here it is already NULL
- gAlice = 0x0;
- }
-
Char_t fname[100];
sprintf(fname,"%s/galice.root",dir);
return 3;
}
- rl->CdGAFile();
- AliTPCParamSR *digp=(AliTPCParamSR*)gDirectory->Get("75x40_100x60_150x60");
+
+ AliCDBManager *man=AliCDBManager::Instance();
+ man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+ man->SetRun(0);
+ AliTPCParamSR *digp=
+ (AliTPCParamSR*)(AliTPCcalibDB::Instance()->GetParameters());
if (!digp) {
- ::Error("AliTPCHits2Digits.C","TPC parameters have not been found !");
+ ::Error("AliTPCComparison.C","TPC parameters have not been found !");
delete rl;
return 4;
}
- TPC->SetParam(digp);
Int_t nrow_up=digp->GetNRowUp();
Int_t nrows=digp->GetNRowLow()+nrow_up;
if (p->Pt()<0.100) continue;
if (TMath::Abs(p->Pz()/p->Pt())>0.999) continue;
- Double_t vx=p->Vx(),vy=p->Vy();
+ Double_t vx=p->Vx(),vy=p->Vy(),vz=p->Vz();
if (TMath::Sqrt(vx*vx+vy*vy)>3.5) continue;
+ if (TMath::Abs(vz) > 50.) continue;
AliTrackReference *ref=new((*refs)[nt]) AliTrackReference();