#include <AliESDVertex.h>
-#include "AliITSgeom.h"
+#include "AliITSgeomTGeo.h"
#include "AliITSVertexer.h"
#include "AliRunLoader.h"
#include "AliITSLoader.h"
fLadOnLay2=ladwid;
AliRunLoader *rl =AliRunLoader::GetRunLoader();
AliITSLoader* itsLoader = (AliITSLoader*)rl->GetLoader("ITSLoader");
- AliITSgeom* geom = itsLoader->GetITSgeom();
- Int_t ladtot1=geom->GetNladders(1);
+ // AliITSgeom* geom = itsLoader->GetITSgeom();
+ Int_t ladtot1=AliITSgeomTGeo::GetNLadders(1);
if(fLadders) delete [] fLadders;
fLadders=new UShort_t[ladtot1];
Double_t pos1[3],pos2[3];
- Int_t mod1=geom->GetModuleIndex(2,1,1);
- geom->GetTrans(mod1,pos1); // position of the module in the MRS
+ Int_t mod1=AliITSgeomTGeo::GetModuleIndex(2,1,1);
+ AliITSgeomTGeo::GetTranslation(mod1,pos1); // position of the module in the MRS
Double_t phi0=TMath::ATan2(pos1[1],pos1[0]);
if(phi0<0) phi0+=2*TMath::Pi();
- Int_t mod2=geom->GetModuleIndex(2,2,1);
- geom->GetTrans(mod2,pos2);
+ Int_t mod2=AliITSgeomTGeo::GetModuleIndex(2,2,1);
+ AliITSgeomTGeo::GetTranslation(mod2,pos2);
Double_t phi2=TMath::ATan2(pos2[1],pos2[0]);
if(phi2<0) phi2+=2*TMath::Pi();
Double_t deltaPhi= phi0-phi2; // phi width of a layer2 module
for(Int_t i= 0; i<ladtot1;i++){
- Int_t modlad= geom->GetModuleIndex(1,i+1,1);
+ Int_t modlad= AliITSgeomTGeo::GetModuleIndex(1,i+1,1);
Double_t posmod[3];
- geom->GetTrans(modlad,posmod);
+ AliITSgeomTGeo::GetTranslation(modlad,posmod);
Double_t phimod=TMath::ATan2(posmod[1],posmod[0]);
if(phimod<0) phimod+=2*TMath::Pi();
Double_t phi1= phimod+deltaPhi*double(fLadOnLay2);
#include "AliITSLoader.h"
#include "AliITSDetTypeRec.h"
#include "AliITSRecPoint.h"
+#include "AliITSgeomTGeo.h"
/////////////////////////////////////////////////////////////////
// this class implements a method to determine
// the 3 coordinates of the primary vertex
// The tracklets are processed in Prepare3DVertex
AliRunLoader *rl =AliRunLoader::GetRunLoader();
AliITSLoader* itsLoader = (AliITSLoader*)rl->GetLoader("ITSLoader");
- AliITSgeom* geom = itsLoader->GetITSgeom();
+ // AliITSgeom* geom = itsLoader->GetITSgeom();
itsLoader->LoadRecPoints();
rl->GetEvent(evnumber);
Int_t nrpL2 = 0; // number of rec points on layer 2
// By default irstL1=0 and lastL1=79
- Int_t irstL1 = geom->GetStartDet(0);
- Int_t lastL1 = geom->GetModuleIndex(2,1,1)-1;
+ Int_t irstL1 = AliITSgeomTGeo::GetModuleIndex(1,1,1);
+ Int_t lastL1 = AliITSgeomTGeo::GetModuleIndex(2,1,1)-1;
for(Int_t module= irstL1; module<=lastL1;module++){ // count number of recopints on layer 1
branch->GetEvent(module);
nrpL1+= itsRec->GetEntries();
detTypeRec.ResetRecPoints();
}
//By default irstL2=80 and lastL2=239
- Int_t irstL2 = geom->GetModuleIndex(2,1,1);
- Int_t lastL2 = geom->GetLastDet(0);
+ Int_t irstL2 = AliITSgeomTGeo::GetModuleIndex(2,1,1);
+ Int_t lastL2 = AliITSgeomTGeo::GetModuleIndex(3,1,1)-1;
for(Int_t module= irstL2; module<=lastL2;module++){ // count number of recopints on layer 2
branch->GetEvent(module);
nrpL2+= itsRec->GetEntries();
for(Int_t j=0;j<nrecp1;j++){
AliITSRecPoint *recp = (AliITSRecPoint*)prpl1->At(j);
// Local coordinates of this recpoint
+ /*
lc[0]=recp->GetDetLocalX();
lc[2]=recp->GetDetLocalZ();
geom->LtoG(modul1,lc,gc); // global coordinates
+ */
+ recp->GetGlobalXYZ(gc);
Double_t phi1 = TMath::ATan2(gc[1]-ybeam,gc[0]-xbeam);
if(phi1<0)phi1=2*TMath::Pi()+phi1;
for(Int_t ladl2=0 ; ladl2<fLadOnLay2*2+1;ladl2++){
for(Int_t k=0;k<4;k++){
Int_t ladmod=fLadders[ladder-1]+ladl2;
- if(ladmod>geom->GetNladders(2)) ladmod=ladmod-geom->GetNladders(2);
- Int_t modul2=geom->GetModuleIndex(2,ladmod,k+1);
+ if(ladmod>AliITSgeomTGeo::GetNLadders(2)) ladmod=ladmod-AliITSgeomTGeo::GetNLadders(2);
+ Int_t modul2=AliITSgeomTGeo::GetModuleIndex(2,ladmod,k+1);
branch->GetEvent(modul2);
Int_t nrecp2 = itsRec->GetEntries();
for(Int_t j2=0;j2<nrecp2;j2++){
recp = (AliITSRecPoint*)itsRec->At(j2);
+ /*
lc2[0]=recp->GetDetLocalX();
lc2[2]=recp->GetDetLocalZ();
geom->LtoG(modul2,lc2,gc2);
+ */
+ recp->GetGlobalXYZ(gc2);
Double_t phi2 = TMath::ATan2(gc2[1]-ybeam,gc2[0]-xbeam);
if(phi2<0)phi2=2*TMath::Pi()+phi2;
Double_t diff = TMath::Abs(phi2-phi1);
#include "AliITSVertexerIons.h"
#include "AliITSVertexerZ.h"
#include "AliESDVertex.h"
-#include "AliITSgeom.h"
+#include "AliITSgeomTGeo.h"
#include "AliITSLoader.h"
#include "AliITSRecPoint.h"
#include "AliLog.h"
AliRunLoader *rl = AliRunLoader::GetRunLoader();
AliITSLoader* itsloader = (AliITSLoader*)rl->GetLoader("ITSLoader");
+ /*
TDirectory * olddir = gDirectory;
rl->CdGAFile();
AliITSgeom* g2 = (AliITSgeom*)gDirectory->Get("AliITSgeom");
olddir->cd();
+ */
TTree *tr = itsloader->TreeR();
AliITSDetTypeRec detTypeRec;
Int_t npoints=0;
Int_t nopoints1=40000;
Int_t nopoints2=40000;
- Float_t l[3], p[3];
+ Float_t p[3];
Double_t *z1, *z2, *y1, *y2, *x1, *x2, *phi1, *phi2, *r1, *r2;
z1=new Double_t[nopoints1];
Double_t r=0;
Int_t np1=0, np2=0;
- for(Int_t i=g2->GetStartSPD();i<=g2->GetLastSPD();i++) {
+ for(Int_t i=AliITSgeomTGeo::GetModuleIndex(1,1,1);i<=AliITSgeomTGeo::GetModuleIndex(2,1,1)-1;i++) {
detTypeRec.ResetRecPoints();
tr->GetEvent(i);
npoints = recpoints->GetEntries();
for (Int_t ipoint=0;ipoint<npoints;ipoint++) {
pnt = (AliITSRecPoint*)recpoints->UncheckedAt(ipoint);
+ /*
l[0]=pnt->GetDetLocalX();
l[1]=0;
l[2]=pnt->GetDetLocalZ();
g2->LtoG(i, l, p);
+ */
+ pnt->GetGlobalXYZ(p);
r=TMath::Sqrt(TMath::Power(p[0],2)+TMath::Power(p[1],2));
if(i<80 && TMath::Abs(p[2])<14.35) {
#include <TString.h>
#include<TTree.h>
#include "AliITSLoader.h"
-#include "AliITSgeom.h"
+#include "AliITSgeomTGeo.h"
#include "AliITSDetTypeRec.h"
#include "AliITSRecPoint.h"
#include "AliITSZPoint.h"
fCurrentVertex = 0;
AliRunLoader *rl =AliRunLoader::GetRunLoader();
AliITSLoader* itsLoader = (AliITSLoader*)rl->GetLoader("ITSLoader");
- AliITSgeom* geom = itsLoader->GetITSgeom();
+ // AliITSgeom* geom = itsLoader->GetITSgeom();
itsLoader->LoadRecPoints();
rl->GetEvent(evnumber);
detTypeRec.ResetRecPoints();
for(Int_t j1=0;j1<nrecp1;j1++){
AliITSRecPoint *recp = (AliITSRecPoint*)prpl1->At(j1);
+ /*
lc1[0]=recp->GetDetLocalX();
lc1[2]=recp->GetDetLocalZ();
geom->LtoG(modul1,lc1,gc1);
// Global coordinates of this recpoints
+ */
+ recp->GetGlobalXYZ(gc1);
gc1[0]-=fNominalPos[0]; // Possible beam offset in the bending plane
gc1[1]-=fNominalPos[1]; // " "
Float_t r1=TMath::Sqrt(gc1[0]*gc1[0]+gc1[1]*gc1[1]);
for(Int_t ladl2=0 ; ladl2<fLadOnLay2*2+1;ladl2++){
for(Int_t k=0;k<4;k++){
Int_t ladmod=fLadders[ladder-1]+ladl2;
- if(ladmod>geom->GetNladders(2)) ladmod=ladmod-geom->GetNladders(2);
- Int_t modul2=geom->GetModuleIndex(2,ladmod,k+1);
+ if(ladmod>AliITSgeomTGeo::GetNLadders(2)) ladmod=ladmod-AliITSgeomTGeo::GetNLadders(2);
+ Int_t modul2=AliITSgeomTGeo::GetModuleIndex(2,ladmod,k+1);
branch->GetEvent(modul2);
Int_t nrecp2 = itsRec->GetEntries();
for(Int_t j2=0;j2<nrecp2;j2++){
recp = (AliITSRecPoint*)itsRec->At(j2);
+ /*
lc2[0]=recp->GetDetLocalX();
lc2[2]=recp->GetDetLocalZ();
geom->LtoG(modul2,lc2,gc2);
+ */
+ recp->GetGlobalXYZ(gc2);
gc2[0]-=fNominalPos[0];
gc2[1]-=fNominalPos[1];
Float_t r2=TMath::Sqrt(gc2[0]*gc2[0]+gc2[1]*gc2[1]);