#if !defined(__CINT__) || defined(__MAKECINT__)
#include <TFile.h>
+#include <TGeoManager.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TTree.h>
#include <AliRun.h>
#include <AliHeader.h>
#include <AliGenEventHeader.h>
-#include <AliITSVertexerPPZ.h>
+#include <AliGeomManager.h>
+#include <AliITSVertexerZ.h>
#include <AliRunLoader.h>
#include <AliITSLoader.h>
cerr<<"AliITSVertexerZTest.C : LoadKinematics returned error"<<endl;
return;
}
- AliITSLoader* ITSloader = (AliITSLoader*) rl->GetLoader("ITSLoader");
+
+ AliGeomManager::LoadGeometry("geometry.root");
- if(!ITSloader){
- cerr<<"AliITSVertexerZTest.C : ITS loader not found"<<endl;
- return;
- }
- // ITSloader->LoadRecPoints("read");
- // TFile *fo = new TFile("vertici.root","recreate");
- AliITSVertexerPPZ *dovert = new AliITSVertexerPPZ("default",initx,inity);
- dovert->SetDebug(0);
- dovert->SetDiffPhiMax(delphi);
- dovert->SetWindow(window);
+ AliITSVertexerZ *dovert = new AliITSVertexerZ("default",initx,inity);
+ //dovert->SetDebug(0);
+ // dovert->SetDiffPhiMax(delphi);
+ // dovert->SetWindow(window);
dovert->PrintStatus();
- Int_t meno100=0;
- Int_t meno200=0;
- Int_t meno110=0;
Int_t sigmazero=0;
AliESDVertex *vert = 0;
for(Int_t i=0; i<rl->TreeE()->GetEntries(); i++){
if(vert){
cout<<"FOUND: "<<vert->GetZv()<<"; ";
cout<<vert->GetZRes()<<"; "<<vert->GetNContributors()<<endl;
+ cout <<" True Z position "<<primaryVertex[2]<<", diff= ";
+ cout<<(primaryVertex[2]-vert->GetZv())*10000.<<endl;
+ } else {
+ cout<<"NOT FOUND"<<endl;
}
- else {
- cout<<"NOT FOUND - fZFound= "<<dovert->GetZFound();
- cout<<" fZsig= "<<dovert->GetZsig()<<endl;
- if(dovert->GetZFound() == -100) meno100++;
- if(dovert->GetZFound() == -200) meno200++;
- if(dovert->GetZFound() == -110) meno110++;
- }
- cout <<" True Z position "<<primaryVertex[2]<<", diff= ";
- cout<<(primaryVertex[2]-dovert->GetZFound())*10000.<<endl;
}
if(vert){
- Double_t pos[3];
- for(Int_t kk=0;kk<3;kk++)pos[kk]=(Double_t)primaryVertex[kk];
- vert->SetTruePos(pos);
Float_t found = vert->GetZv();
diff2->Fill(primaryVertex[2],found);
found = 10000.*(found-primaryVertex[2]);
if(vert->GetZRes()!=0){
diff1->Fill(found);
- }
- else {
+ } else {
sigmazero++;
}
dovert->WriteCurrentVertex();
}
}
if(kDebug>0){
- cout<<"Number of bad vertices with code -100: "<<meno100<<endl;
- cout<<"Number of bad vertices with code -110: "<<meno110<<endl;
- cout<<"Number of bad vertices with code -200: "<<meno200<<endl;
cout<<"Only one tracklet (sigma = 0) "<<sigmazero<<endl;
}
-
+
}