From 64ab0d554acd0c607cf09ea7ae439c3480184217 Mon Sep 17 00:00:00 2001 From: barbera Date: Tue, 20 Nov 2001 15:46:17 +0000 Subject: [PATCH] Point coordinated are calculated in cylindrical reference frame once and for all at the beginning of tracking V1 --- ITS/AliITSTrackV1.cxx | 30 +--- ITS/AliITSTrackV1.h | 4 +- ITS/AliITSTrackerV1.cxx | 303 +++++++++++++++++++++++++++------------- ITS/AliITSTrackerV1.h | 27 ++-- ITS/ITStracking.C | 16 ++- 5 files changed, 240 insertions(+), 140 deletions(-) diff --git a/ITS/AliITSTrackV1.cxx b/ITS/AliITSTrackV1.cxx index ebc1f86b1da..4445a3a566e 100644 --- a/ITS/AliITSTrackV1.cxx +++ b/ITS/AliITSTrackV1.cxx @@ -33,7 +33,7 @@ AliITSTrackV1::AliITSTrackV1() { fClusterInTrack = new TMatrix(6,9); Int_t i,j; for(i=0; i<6; i++){ - for(j=4; j<9; j++) (*fClusterInTrack)(i,j)=-1.; + for(j=0; j<9; j++) (*fClusterInTrack)(i,j)=-1.; } frtrack=0.; fnoclust=0; @@ -60,10 +60,8 @@ AliITSTrackV1::AliITSTrackV1(const AliITSTrackV1 &cobj) { fClusterInTrack = new TMatrix(6,9); Int_t i,j; - //for(i=0; i<6; i++) (*fClusterInTrack)(i,6)=(*fClusterInTrack)(i,7)= - // (*fClusterInTrack)(i,8)=-1.; for(i=0; i<6; i++){ - for(j=4; j<9; j++) (*fClusterInTrack)(i,j)=-1.; //modificata angela + for(j=0; j<9; j++) (*fClusterInTrack)(i,j)=-1.; } flistCluster = new TObjArray; fVertex.ResizeTo(3); @@ -138,7 +136,7 @@ AliITSTrackV1::AliITSTrackV1(AliTPCtrack &obj) Int_t i,j; for(i=0; i<6; i++){ - for(j=4; j<9; j++) (*fClusterInTrack)(i,j)=-1.; + for(j=0; j<9; j++) (*fClusterInTrack)(i,j)=-1.; } flistCluster = new TObjArray; fNumClustInTrack = 0; @@ -754,24 +752,7 @@ Double_t AliITSTrackV1::ArgC(Double_t rk) const { Double_t AliITSTrackV1::GetPredChi2(Double_t m[2], Double_t sigma[2] ) const { //Origin A. Badala' and G.S. Pappalardo: e-mail Angela.Badala@ct.infn.it, Giuseppe.S.Pappalardo@ct.infn.it // This function calculates a predicted chi2 increment. -/* - Double_t r00=c->GetSigmaY2(), r01=0., r11=c->GetSigmaZ2(); - r00+=fC00; r01+=fC10; r11+=fC11; - - Double_t det=r00*r11 - r01*r01; - if (TMath::Abs(det) < 1.e-10) { - Int_t n=GetNumberOfClusters(); - if (n>4) cerr<GetY() - fP0, dz=c->GetZ() - fP1; - - return (dy*r00*dy + 2*r01*dy*dz + dz*r11*dz)/det; - */ - - + Double_t r00=sigma[0], r01=0., r11=sigma[1]; r00+=fC00; r01+=fC10; r11+=fC11; Double_t det=r00*r11-r01*r01; @@ -783,7 +764,4 @@ Double_t AliITSTrackV1::GetPredChi2(Double_t m[2], Double_t sigma[2] ) const { Double_t chi2 = (dphi*r00*dphi +2.*r01*dphi*dz + dz*r11*dz)/det; return chi2; - - - } diff --git a/ITS/AliITSTrackV1.h b/ITS/AliITSTrackV1.h index 9dae1ce2350..81fc915d1fa 100644 --- a/ITS/AliITSTrackV1.h +++ b/ITS/AliITSTrackV1.h @@ -105,13 +105,13 @@ public: void Setdtgl(TVector &x) {for(Int_t i=0; i<6; i++){fdtgl(i)=x(i);}} // sets the vector fdtgl TVector Getd2() const { return fd2;} // gets the vector fd2 TVector Gettgl2() const { return ftgl2;} // gets the vector ftgl2 - TVector Getdtgl() const { return fdtgl;} // gets the vectoe dtgl + TVector Getdtgl() const { return fdtgl;} // gets the vector dtgl Double_t Getd2(Int_t i){return (Double_t)fd2(i);} // gets the i element of the vector fd2 Double_t Gettgl2(Int_t i){return (Double_t)ftgl2(i);} // gets the i element of the vector tgl2 Double_t Getdtgl(Int_t i){return (Double_t)fdtgl(i);} // gets the i element of the vector fdtgl //Double_t GetxoTPC() const {return fxoTPC;} // gets fxoTPC Int_t Getfnoclust() const {return fnoclust;} //gets fnoclust - Double_t GetPredChi2(Double_t m[2], Double_t sigma[2]) const; //aggiunto il 30-7-2001 + Double_t GetPredChi2(Double_t m[2], Double_t sigma[2]) const; //get predicted chi2 //////////////////////////////////////////////////////////////////////////////////////// diff --git a/ITS/AliITSTrackerV1.cxx b/ITS/AliITSTrackerV1.cxx index a4bf288de91..e4b4b627ea3 100644 --- a/ITS/AliITSTrackerV1.cxx +++ b/ITS/AliITSTrackerV1.cxx @@ -76,17 +76,35 @@ AliITSTrackerV1::AliITSTrackerV1() { //Default constructor fITS = 0; fresult = 0; + fPtref=0.; + fChi2max=0.; + //fepsphi=0.; + //fepsz=0.; frecPoints = 0; fvettid = 0; + fflagvert=0; frl = 0; + Int_t ia; + for(ia=0; ia<6; ia++) { + fNlad[ia]=0; + fNdet[ia]=0; + fAvrad[ia]=0.; + fDetx[ia]=0.; + fDetz[ia]=0.; + } // end for ia fzmin = 0; fzmax = 0; fphimin = 0; fphimax = 0; fphidet = 0; + fNRecPoints=0; + fRecCylR=0; + fRecCylPhi=0; + fRecCylZ=0; + fFieldFactor=0; } //______________________________________________________________________ -AliITSTrackerV1::AliITSTrackerV1(AliITS* IITTSS, Bool_t flag) { +AliITSTrackerV1::AliITSTrackerV1(AliITS* IITTSS, Int_t evnumber, Bool_t flag) { //Origin A. Badala' and G.S. Pappalardo: // e-mail Angela.Badala@ct.infn.it, Giuseppe.S.Pappalardo@ct.infn.it // Class constructor. It does some initializations. @@ -94,37 +112,34 @@ AliITSTrackerV1::AliITSTrackerV1(AliITS* IITTSS, Bool_t flag) { //PH Initialisation taken from the default constructor fITS = IITTSS; fresult = 0; - frecPoints = 0; + fPtref = 0.; + fChi2max =0.; + frecPoints = 0; fvettid = 0; + fflagvert = flag; frl = 0; fzmin = 0; fzmax = 0; fphimin = 0; fphimax = 0; fphidet = 0; - - fPtref = 0.; - fChi2max =0.; - fflagvert =flag; + Int_t imax = 200,jmax = 450; frl = new AliITSRad(imax,jmax); ////////// gets information on geometry ///////////////////////////// - AliITSgeom *g1 = ((AliITS*)gAlice->GetDetector("ITS"))->GetITSgeom(); - // Why not AliITS *g1 = fITS->GetITSgeom(); // ?? BSN + AliITSgeom *g1 = fITS->GetITSgeom(); Int_t ll=1, dd=1; TVector det(9); - //cout<<" nlad ed ndet \n"; Int_t ia; for(ia=0; ia<6; ia++) { fNlad[ia]=g1->GetNladders(ia+1); fNdet[ia]=g1->GetNdetectors(ia+1); //cout<GetEvent(evnumber); + Int_t NumOfModules = g1->GetIndexMax(); + //fRecCylR = new Float_t *[NumOfModules]; + fRecCylR = new Double_t *[NumOfModules]; + //fRecCylPhi = new Float_t *[NumOfModules]; + fRecCylPhi = new Double_t *[NumOfModules]; + //fRecCylZ = new Float_t *[NumOfModules]; + fRecCylZ = new Double_t *[NumOfModules]; + AliITSRecPoint *recp; + fNRecPoints = new Int_t[NumOfModules]; + + for(Int_t module=0; moduleResetRecPoints(); + gAlice->TreeR()->GetEvent(module); + frecPoints=fITS->RecPoints(); + Int_t nRecPoints=fNRecPoints[module]=frecPoints->GetEntries(); + /* + fRecCylR[module] = new Float_t[nRecPoints]; + fRecCylPhi[module] = new Float_t[nRecPoints]; + fRecCylZ[module] = new Float_t[nRecPoints]; + */ + fRecCylR[module] = new Double_t[nRecPoints]; + fRecCylPhi[module] = new Double_t[nRecPoints]; + fRecCylZ[module] = new Double_t[nRecPoints]; + Int_t ind; + for(ind=0; indUncheckedAt(ind); + // Float_t global[3], local[3]; + Double_t global[3], local[3]; + local[0]=recp->GetX(); + local[1]=0.; + local[2]= recp->GetZ(); + g1->LtoG(module,local,global); + /* + Float_t r = TMath::Sqrt(global[0]*global[0]+global[1]*global[1]); // r hit + Float_t phi = TMath::ATan2(global[1],global[0]); if(phi<0.) phi+=2.*TMath::Pi(); // phi hit + Float_t z = global[2]; // z hit + */ + + Double_t r = TMath::Sqrt(global[0]*global[0]+global[1]*global[1]); // r hit + Double_t phi = TMath::ATan2(global[1],global[0]); if(phi<0.) phi+=2.*TMath::Pi(); // phi hit + Double_t z = global[2]; // z hit + + fRecCylR[module][ind]=r; + fRecCylPhi[module][ind]=phi; + fRecCylZ[module][ind]=z; + } + } + //} + //} +//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + ////////// gets magnetic field factor ////////////////////////////// @@ -239,8 +310,8 @@ AliITSTrackerV1::AliITSTrackerV1(const AliITSTrackerV1 &cobj) { // Origin A. Badala' and G.S. Pappalardo: // e-mail Angela.Badala@ct.infn.it, Giuseppe.S.Pappalardo@ct.infn.it // copy constructor - - *fITS = *cobj.fITS; + + *fITS = *cobj.fITS; *fresult = *cobj.fresult; fPtref = cobj.fPtref; fChi2max = cobj.fChi2max; @@ -291,15 +362,69 @@ AliITSTrackerV1::AliITSTrackerV1(const AliITSTrackerV1 &cobj) { fphidet[im1][im2]=cobj.fphidet[im1][im2]; } // end for im2 } // end for im2 + + + AliITSgeom *g1 = fITS->GetITSgeom(); + Int_t NumOfModules = g1->GetIndexMax(); + /* + fRecCylR = new Float_t *[NumOfModules]; + fRecCylPhi = new Float_t *[NumOfModules]; + fRecCylZ = new Float_t *[NumOfModules]; + */ + fRecCylR = new Double_t *[NumOfModules]; + fRecCylPhi = new Double_t *[NumOfModules]; + fRecCylZ = new Double_t *[NumOfModules]; + fNRecPoints = new Int_t[NumOfModules]; + for(Int_t module=0; moduleGetITSgeom(); + Int_t NumOfModules = g1->GetIndexMax(); + /* + fRecCylR = new Float_t *[NumOfModules]; + fRecCylPhi = new Float_t *[NumOfModules]; + fRecCylZ = new Float_t *[NumOfModules]; + */ + fRecCylR = new Double_t *[NumOfModules]; + fRecCylPhi = new Double_t *[NumOfModules]; + fRecCylZ = new Double_t *[NumOfModules]; + fNRecPoints = new Int_t[NumOfModules]; + for(Int_t module=0; moduleLoadOuterSectors(); // Load tracks - TFile *tf=TFile::Open("AliTPCtracksSorted.root"); //modificato per hbt + TFile *tf=TFile::Open("AliTPCtracksSorted.root"); if (!tf->IsOpen()) { cerr<<"Can't open AliTPCtracksSorted.root !\n"; return ; @@ -478,7 +633,7 @@ void AliITSTrackerV1::DoTracking(Int_t evNumber,Int_t minTr,Int_t maxTr, /////////////////////////////////////////////// - /* + /* ////// propagation to the end of TPC ////////////// Double_t xk=77.415; track->PropagateTo(xk, 28.94, 1.204e-3,mass); //Ne @@ -499,11 +654,11 @@ void AliITSTrackerV1::DoTracking(Int_t evNumber,Int_t minTr,Int_t maxTr, xk -=0.5; track->PropagateTo(xk, 41.28, 0.029,mass); //Nomex //////////////////////////////////////////////////////////////////// - */ + */ // new propagation to the end of TPC - //Double_t xk=80.; - //track->PropagateTo(xk,0.,0.); //Ne if it's still there - Double_t xk=77.415; + Double_t xk=80.; + // track->PropagateTo(xk,0.,0.); //Ne if it's still there //attenzione funziona solo se modifica in TPC + // Double_t xk=77.415; track->PropagateTo(xk, 28.94, 1.204e-3); xk-=0.005; track->PropagateTo(xk, 44.77,1.71); //Tedlar @@ -517,8 +672,8 @@ void AliITSTrackerV1::DoTracking(Int_t evNumber,Int_t minTr,Int_t maxTr, track->PropagateTo(xk, 44.77, 1.71); //Tedlar xk=61.; - //track->PropagateTo(xk,0.,0.); //C02 - track->PropagateTo(xk,36.2,1.98e-3); //C02 + // track->PropagateTo(xk,0.,0.); //C02 + track->PropagateTo(xk,36.2,1.98e-3); //C02 //attenzione funziona solo se modifica in TPC xk -=0.005; track->PropagateTo(xk, 24.01, 2.7); //Al @@ -533,9 +688,8 @@ void AliITSTrackerV1::DoTracking(Int_t evNumber,Int_t minTr,Int_t maxTr, xk -=0.005; track->PropagateTo(xk, 44.77, 1.71); //Tedlar xk -=0.005; - track->PropagateTo(xk, 24.01, 2.7); //Al - - + track->PropagateTo(xk, 24.01, 2.7); //Al + //////////////////////////////////////////////////////////////////////////////////////////////////////// AliITSTrackV1 trackITS(*track); trackITS.PutMass(mass); //new to add mass to track if(fresult){ delete fresult; fresult=0;} @@ -594,7 +748,7 @@ void AliITSTrackerV1::DoTracking(Int_t evNumber,Int_t minTr,Int_t maxTr, // if(fPtref<0.2 ) fChi2max=20.; //if(fPtref<0.2 ) fChi2max=10.; //if(fPtref<0.1 ) fChi2max=5.; - //cout << "\n Pt = " << fPtref <<"\n"; //stampa + cout << "\n Pt = " << fPtref <<"\n"; //stampa RecursiveTracking(list); list->Delete(); delete list; @@ -614,7 +768,7 @@ void AliITSTrackerV1::DoTracking(Int_t evNumber,Int_t minTr,Int_t maxTr, if(pcode==11) vecLabRef(k)=p->GetFirstMother(); } // end if itot++; vecTotLabRef(itot)=vecLabRef(k); - if(vecLabRef(k)==0. && clustZ == 0.) vecTotLabRef(itot) =-3.; + if(vecLabRef(k)==0. && clustZ == -1.) vecTotLabRef(itot) =-3.; } // end for k } // end for lay Long_t labref; @@ -628,11 +782,11 @@ void AliITSTrackerV1::DoTracking(Int_t evNumber,Int_t minTr,Int_t maxTr, // cout<<" progressive track number = "<GetLabel(); - //cout << " TPC track label = " << lab <<"\n"; // stampa + cout << " TPC track label = " << lab <<"\n"; // stampa //propagation to vertex Double_t rbeam=3.; @@ -804,7 +958,7 @@ void AliITSTrackerV1::RecursiveTracking(TList *trackITSlist) { if(numClustNowfresult->GetChi2()) continue; //cout<<" chi2Now = "< 1.0 && chi2Now > 30.) continue; if((fPtref >= 0.6 && fPtref<=1.0) && chi2Now > 40.) continue; @@ -821,13 +975,7 @@ void AliITSTrackerV1::RecursiveTracking(TList *trackITSlist) { Int_t ladp, ladm, detp,detm,ladinters,detinters; Int_t layerfin=layerInit-1; // cout<<"Prima di intersection \n"; - //if(!fTimerIntersection) fTimerIntersection = new TStopwatch(); - // timer - //fTimerIntersection->Continue(); - // timer Int_t outinters=Intersection(*trackITS,layerfin,ladinters,detinters); - //fTimerIntersection->Stop(); - // timer // cout<<" outinters = "<GetModuleIndex(lycur,(Int_t)toucLad(iriv), - (Int_t)toucDet(iriv)); - //mod ott + (Int_t)toucDet(iriv)); fITS->ResetRecPoints(); gAlice->TreeR()->GetEvent(indexmod); Int_t npoints=frecPoints->GetEntries(); - /* mod ott - Int_t *indlist=new Int_t[npoints+1]; - Int_t counter=0; - Int_t ind; - for (ind=0; ind<=npoints; ind++) { - indlist[ind]=-1; - if (*(fvettid[index]+ind)==0) { - indlist[counter]=ind; - counter++; - } // end if - } // end for ind - ind=-1; - for(;;) { - ind++; - if(indlist[ind] < 0) recp=0; - else - recp = (AliITSRecPoint*)frecPoints-> - UncheckedAt(indlist[ind]); - if((!recp) ) break; - } // end for ;; - */ - ///////////////////////// new ////////////////////////// + Int_t indnew; for(indnew=0; indnewUncheckedAt(indnew); else continue; - //////////////////////////////////////////////////// TVector cluster(3),vecclust(9); - vecclust(6)=vecclust(7)=vecclust(8)=-1.; - Double_t sigma[2]; - // set veclust in global - Float_t global[3], local[3]; - local[0]=recp->GetX(); - local[1]=0.; - local[2]= recp->GetZ(); - Int_t play = lycur; - Int_t plad = TMath::Nint(toucLad(iriv)); - Int_t pdet = TMath::Nint(toucDet(iriv)); - g1->LtoG(play,plad,pdet,local,global); - vecclust(0)=global[0]; - vecclust(1)=global[1]; - vecclust(2)=global[2]; - + //vecclust(6)=vecclust(7)=vecclust(8)=-1.; + Double_t sigma[2]; + // now vecclust is with cylindrical cohordinates + vecclust(0)=(Float_t)fRecCylR[indexmod][indnew]; + vecclust(1)=(Float_t)fRecCylPhi[indexmod][indnew]; + vecclust(2)=(Float_t)fRecCylZ[indexmod][indnew]; vecclust(3) = (Float_t)recp->fTracks[0]; - //vecclust(4) = (Float_t)indlist[ind]; vecclust(4) = (Float_t)indnew; - vecclust(5) = (Float_t)indexmod; //mod ott + vecclust(5) = (Float_t)indexmod; vecclust(6) = (Float_t)recp->fTracks[0]; vecclust(7) = (Float_t)recp->fTracks[1]; vecclust(8) = (Float_t)recp->fTracks[2]; sigma[0] = (Double_t) recp->GetSigmaX2(); sigma[1] = (Double_t) recp->GetSigmaZ2(); - //now we are in r,phi,z in global - cluster(0) = TMath::Sqrt(vecclust(0)*vecclust(0)+ - vecclust(1)*vecclust(1));//r hit - cluster(1) = TMath::ATan2(vecclust(1),vecclust(0)); - if(cluster(1)<0.) cluster(1)+=2.*TMath::Pi(); - cluster(2) = vecclust(2); // z hit + + cluster(0)=fRecCylR[indexmod][indnew]; + cluster(1)=fRecCylPhi[indexmod][indnew]; + cluster(2)=fRecCylZ[indexmod][indnew]; + // cout<<" layer = "<Continue(); // timer if(fflagvert){ KalmanFilterVert(newTrack,cluster,sigmanew); //KalmanFilterVert(newTrack,cluster,sigmanew,chi2pred); }else{ KalmanFilter(newTrack,cluster,sigmanew); } // end if - //fTimerKalman->Stop(); // timer (*newTrack).PutCluster(layernew, vecclust); newTrack->AddClustInTrack(); listoftrack.AddLast(newTrack); } // end for indnew - // delete [] indlist; //mod ott } // end of for on detectors (iriv) }//end if(outinters==0) diff --git a/ITS/AliITSTrackerV1.h b/ITS/AliITSTrackerV1.h index b3453eab743..691e5a1a0d4 100644 --- a/ITS/AliITSTrackerV1.h +++ b/ITS/AliITSTrackerV1.h @@ -37,10 +37,11 @@ class TStopwatch; class AliITSTrackerV1 : public TObject { public: AliITSTrackerV1(); - AliITSTrackerV1(AliITS* IITTSS, Bool_t flag); + AliITSTrackerV1(AliITS* IITTSS, Int_t evnumber, Bool_t flag); AliITSTrackerV1(const AliITSTrackerV1 &cobj); ~AliITSTrackerV1(); AliITSTrackerV1 &operator=(AliITSTrackerV1 obj); + void DelMatrix(Int_t NumOfModules); void DoTracking(Int_t evNumber, Int_t minTr, Int_t maxTr, TFile *file, Bool_t realmass=0); void RecursiveTracking(TList *trackITSlist); Int_t Intersection(AliITSTrackV1 &track, Int_t layer,Int_t &ladder, @@ -51,18 +52,18 @@ class AliITSTrackerV1 : public TObject { Double_t sigma[2]); //void KalmanFilterVert(AliITSTrackV1 *newtrack, TVector &cluster, // Double_t sigma[2], Double_t chi2pred); - private: AliITS* fITS; //! pointer to AliITS AliITSTrackV1 *fresult; // result is a pointer to the final best track Double_t fPtref; // transvers momentum obtained from TPC tracking Double_t fChi2max; // chi2 cut - Double_t fepsphi; //eps for definition window in phi - Double_t fepsz; //eps for definition window in z - TObjArray *frecPoints; // pointer to RecPoints + //Double_t fepsphi; //eps for definition window in phi + // Double_t fepsz; //eps for definition window in z + TClonesArray *frecPoints; // pointer to RecPoints Int_t **fvettid; // flag vector of used clusters Bool_t fflagvert; // a flag to impose or not the vertex constraint AliITSRad *frl; // pointer to get the radiation lenght matrix +/// To be put in a specific geometric class Int_t fNlad[6]; // Number of ladders for a given layer Int_t fNdet[6]; // Number of detector for a given layer Double_t fAvrad[6]; // Average radius for a given layer @@ -73,10 +74,18 @@ class AliITSTrackerV1 : public TObject { Double_t **fphimin;// Matrix of phimin for a given layer and a given ladder Double_t **fphimax;// Matrix of phimax for a given layer and a given ladder Double_t **fphidet; // azimuthal angle for a given layer and a given ladder - Double_t fFieldFactor; // Magnetic filed factor - //TStopwatch *fTimerKalman; // timer for kalman filter - //TStopwatch *fTimerIntersection; // timer for Intersection - + Int_t *fNRecPoints; // pointer to the vector giving the number of recpoints for a given module + /* + Float_t **fRecCylR; // pointer to the matrix giving the R cylindric cohordinate of a recpoint + Float_t **fRecCylPhi; // pointer to the matrix giving the Phi cylindric cohordinate of a recpoint + Float_t **fRecCylZ; // pointer to the matrix giving the Z cylindric cohordinate of a recpoint + */ + Double_t **fRecCylR; // pointer to the matrix giving the R cylindric cohordinate of a recpoint + Double_t **fRecCylPhi; // pointer to the matrix giving the Phi cylindric cohordinate of a recpoint + Double_t **fRecCylZ; // pointer to the matrix giving the Z cylindric cohordinate of a recpoint +///////////////////////////////////////////////////////////////////////////////////////////////////////////////// + Double_t fFieldFactor; // Magnetic field factor + ClassDef(AliITSTrackerV1,1) }; diff --git a/ITS/ITStracking.C b/ITS/ITStracking.C index 2671053c1e5..b25f669aacc 100644 --- a/ITS/ITStracking.C +++ b/ITS/ITStracking.C @@ -2,7 +2,7 @@ #include "iostream.h" #endif -void ITStracking(Int_t evNumber1=0,Int_t evNumber2=0,int min_t=-1, int max_t=0,Bool_t flagvert=1, Bool_t realmass=0) { +void ITStracking(Int_t evNumber1=0,Int_t evNumber2=0, Int_t min_t=-1, Int_t max_t=0,Bool_t flagvert=1, Bool_t realmass=0) { const char *filename="galice.root"; @@ -29,15 +29,15 @@ void ITStracking(Int_t evNumber1=0,Int_t evNumber2=0,int min_t=-1, int max_t=0,B } AliITS* IITTSS =(AliITS *)gAlice->GetDetector("ITS"); - if (!IITTSS) return; - AliITSTrackerV1* ITStracker = new AliITSTrackerV1(IITTSS,flagvert); + if (!IITTSS) return; // // Loop over events // Int_t Nh=0; Int_t Nh1=0; - for (int nev=0; nev<= evNumber2; nev++) { + for (Int_t nev=0; nev<= evNumber2; nev++) { + AliITSTrackerV1 *ITStracker = new AliITSTrackerV1(IITTSS,nev,flagvert); Int_t nparticles = gAlice->GetEvent(nev); cout << "nev " << nev <DoTracking(nev,min_t,max_t,file,realmass); // nuova + ITStracker->DoTracking(nev,min_t,max_t,file,realmass); timer.Stop(); timer.Print(); - } // event loop + AliITSgeom *g1 = IITTSS->GetITSgeom(); + Int_t NumOfModules = g1->GetIndexMax(); + ITStracker->DelMatrix(NumOfModules); + delete ITStracker; + } // event loop file->Close(); } -- 2.43.0