#if !defined(__CINT__) || defined(__MAKECINT__) #include #include #include #include #include #include #include #include #include #endif void AliITSVertexerZTest(Float_t delphi=0.05,Float_t window=3.,Float_t initx=0., Float_t inity=0.,TString FileWithKine="galice.root", TString FileWithRecP="galice.root"){ // delphi ---> azimuthal range to accept tracklets // window ---> window in Z around the peak of tracklets proj. in mm Int_t kDebug = 0; TH2F *diff2 = new TH2F("diff2","Zfound vs Ztrue",100,-6,6,100,-6,6); TH1F *diff1 = new TH1F("diff1","Zfound - Ztrue(#mu m)",100,-500,500); delete gAlice; gAlice = 0; TFile *in = new TFile(FileWithKine.Data()); gAlice = (AliRun*)in->Get("gAlice"); if(FileWithKine != FileWithRecP)gAlice->SetTreeRFileName(FileWithRecP); TFile *fo = new TFile("vertici.root","recreate"); AliITSVertexerPPZ *dovert = new AliITSVertexerPPZ(in,fo,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; AliITSVertex *vert = 0; for(Int_t i=0; iTreeE()->GetEntries(); i++){ gAlice->GetEvent(i); // The true Z coord. is fetched for comparison AliHeader *header = gAlice->GetHeader(); AliGenEventHeader* genEventHeader = header->GenEventHeader(); TArrayF primaryVertex(3); genEventHeader->PrimaryVertex(primaryVertex); vert = dovert->FindVertexForCurrentEvent(i); if(kDebug>0){ // Prints the results cout <<"========================================================\n"; cout << "Event number: "<GetZv()<<"; "; cout<GetZRes()<<"; "<GetNContributors()<