iotrack=(AliITSIOTrack*)tarray.UncheckedAt(i);
if(!iotrack) continue;
Int_t labITS=iotrack->GetLabel();
- Int_t labTPC=iotrack->GetTPCLabel();
- //Int_t labTPC=labITS; //provvisoria
+ Int_t labTPC=iotrack->GetTPCLabel();
Double_t phistate=iotrack->GetStatePhi();
Double_t tgl=iotrack->GetStateTgl();
Double_t Zstate=iotrack->GetStateZ();
Int_t c = iotrack->GetCharge();
Double_t x=iotrack->GetX();
Double_t y=iotrack->GetY();
- Double_t z= iotrack->GetZ();
- // Double_t Dz=z; //non e' vero bisogna levare vertice
- // Double_t Dtot= TMath::Sqrt(Dr*Dr+Dz*Dz);
+ Double_t z= iotrack->GetZ();
+ Double_t Dz=iotrack->GetDz();
+
// cout<<" track label = "<<label<<"\n";
// cout<<" phi z D tanl C = "<<phistate<<" "<<Zstate<<" "<<Dr<<" "<<tgl<<" "<<C<<"\n";
if(phi<0.) phi+=duepi;
Double_t signC=0.;
if(c>0) signC=1.; else signC=-1.;
- Double_t Dz=z-zo; // vertex subtraction
Double_t Dtot= TMath::Sqrt(Dr*Dr+Dz*Dz);
Double_t difphi = (phi - phig)*1000.;
dataOut(kkk)=difphi; kkk++;
fTPCLab=-3;
fX=fZ=fY=0.;
fPx=fPy=fPz=0.;
+ fDz=0.;
for (Int_t i=0;i<6;i++) {fIdModules[i]=fIdPoints[i]=-1; fIdPoints[i]=-1;}
fStateVPhi=0.; fStateVZ=0.; fStateVD=0.; fStateVTgl=0.; fStateVC=0.;
fRadius=0.; fCharge=0;
Double_t GetStateTgl() const {return fStateVTgl;} // gets the dip angle tangent of the state vector
Double_t GetRadius() const {return fRadius;} // gets the radius corresponding to the state vector
Int_t GetCharge() const {return fCharge;} // gets the particle charge
- Float_t GetX() const {return fX;} // gets the x cohordinate of the found vertex
- Float_t GetZ() const {return fZ;} // gets the z cohordinate of the found vertex
- Float_t GetY() const {return fY;} // gets the y cohordinate of the found vertex
- Float_t GetPx() const {return fPx;} // gets the x momentum component at the found vertex
- Float_t GetPy() const {return fPy;} // gets the y momentum component at the found vertex
- Float_t GetPz() const {return fPz;} // gets the z momentum component at the found vertex
-
+ Float_t GetX() const {return fX;} // gets the x cohordinate of the track point nearest to primary vertex
+ Float_t GetZ() const {return fZ;} // gets the z cohordinate of the track point nearest to primary vertex
+ Float_t GetY() const {return fY;} // gets the y cohordinate of the track point nearest to primary vertex
+ Float_t GetPx() const {return fPx;} // gets the x momentum component at the fX,fY,fZ point
+ Float_t GetPy() const {return fPy;} // gets the y momentum component at the fX,fY,fZ point
+ Float_t GetPz() const {return fPz;} // gets the z momentum component at the fX,fY,fZ point
+ Double_t GetDz() const {return fDz;} // gets the longitudinal impact parameter
+
void SetCovMatrix(Double_t C00, Double_t C10, Double_t C11, Double_t C20, Double_t C21,
Double_t C22, Double_t C30, Double_t C31, Double_t C32, Double_t C33, Double_t C40,
Double_t C41, Double_t C42, Double_t C43, Double_t C44);
void SetRadius(Double_t r) {fRadius= r;} // sets the radius corresponding to the state vector
void SetCharge(Int_t charge) {fCharge=charge;} // sets the particle charge
- void SetX(Float_t x){fX=x;} // sets the x cohordinate of the found vertex
- void SetZ(Float_t z){fZ=z;} // sets the z cohordinate of the found vertex
- void SetY(Float_t y){fY=y;} // sets the y cohordinate of the found vertex
- void SetPx(Float_t px) {fPx=px;} // sets the x momentum component at the found vertex
- void SetPy(Float_t py) {fPy=py;} // sets the y momentum component at the found vertex
- void SetPz(Float_t pz) {fPz=pz;} // sets the z momentum component at the found vertex
+ void SetX(Float_t x){fX=x;} // sets the x position of the track point nearest to primary vertex
+ void SetZ(Float_t z){fZ=z;} // sets the z position of the track point nearest to primary vertex
+ void SetY(Float_t y){fY=y;} // sets the y position of the track point nearest to primary vertex
+ void SetPx(Float_t px) {fPx=px;} // sets the x momentum component at the fX,fY,fZ point
+ void SetPy(Float_t py) {fPy=py;} // sets the y momentum component at the fX,fY,fZ point
+ void SetPz(Float_t pz) {fPz=pz;} // sets the z momentum component at the fX,fY,fZ point
+ void SetDz(Double_t dz) {fDz=dz;} //sets the longitudinal impact parameter
private:
Int_t fLab; // label of reconstructed track
Int_t fTPCLab; // label of TPC track
- Float_t fX ; // x cohordinate of the found vertex
- Float_t fY ; // y cohordinate of the found vertex
- Float_t fZ ; // z cohordinate of the found vertex
- Float_t fPx; // x component of track momentum at the found vertex
- Float_t fPy; // y component of track momentum at the found vertex
- Float_t fPz; // z component of track momentum at the found vertex
+ Float_t fX ; // x cohordinate of the track point nearest to primary vertex
+ Float_t fY ; // y cohordinate of the track point nearest to primary vertex
+ Float_t fZ ; // z cohordinate of the track point nearest to primary vertex
+ Float_t fPx; // x component of track momentum at the fX,fY,fZ point
+ Float_t fPy; // y component of track momentum at the fX,fY,fZ point
+ Float_t fPz; // z component of track momentum at the fX,fY,fZ point
//
Int_t fIdPoints[6]; // points assigned to the track (entry # in fRecPoints is given by module #)
Int_t fIdModules[6]; // module # corresponding to each point belonging to the track
- Double_t fStateVPhi; // state vector component Phi
- Double_t fStateVZ; // state vector component Z
+ Double_t fStateVPhi; // state vector component Phi to beam pipe
+ Double_t fStateVZ; // state vector component Z to beam pipe
Double_t fStateVD; // state vector component D
Double_t fStateVTgl; // state vector component Tgl
Double_t fStateVC; // state vector component C
Double_t fRadius; // distance of the point from the origin
- Int_t fCharge; // particle charge
+ Int_t fCharge; // particle charge
+
+ Double_t fDz; //longitudinal impact parameter
// Covariance matrix
Double_t fC00; // first row elements of the covariance matrix
fLayer = -1;
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=4; j<9; j++) (*fClusterInTrack)(i,j)=-1.;
}
frtrack=0.;
fnoclust=0;
fd2.ResizeTo(6);
ftgl2.ResizeTo(6);
fdtgl.ResizeTo(6);
+ fMass=0.13956995; //a pion by default
//////////////////////////////////////// gets magnetic field factor ////////////////////////////////
*fClusterInTrack = *cobj.fClusterInTrack;
fFieldFactor=cobj.fFieldFactor;
-
+ fMass=cobj.fMass;
+
for(i=0; i<cobj.flistCluster->GetSize(); i++)
flistCluster->AddLast(cobj.flistCluster->At(i));
fVertex(2)=(Double_t)vzg;
fLayer = 7;
- //fmCovariance = new TMatrix(5,5);
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=4; j<9; j++) (*fClusterInTrack)(i,j)=-1.;
}
flistCluster = new TObjArray;
fNumClustInTrack = 0;
Double_t xo,yo, signy;
Double_t r = 1./cTPC;
xo = etaTPC / cTPC;
- //fxoTPC=xo;
Double_t yo1, yo2, diffsq1, diffsq2;
yo1 = yTPC + TMath::Sqrt(r*r - (xl-xo)*(xl-xo));
yo2 = yTPC - TMath::Sqrt(r*r - (xl-xo)*(xl-xo));
y0m = xo * sina + yo * cosa;
frtrack=TMath::Sqrt(xm*xm+ym*ym);
- /*
- Double_t pigre=TMath::Pi();
- Double_t phi=0.0;
- if(ym == 0. || xm == 0.) {
- if(ym == 0. && xm == 0.) {cout << " Error in AliITSTrackV1::LmTPC x=0 and y=0 \n"; getchar();}
- if(ym ==0. && xm>0.) phi=0.;
- if(ym==0. && xm<0.) phi=pigre;
- if(xm==0 && ym>0.) phi=pigre/2.;
- if(xm==0 && ym<0.) phi=1.5*pigre;
- }
- else {
- if (xm>0. && ym>0.) phi=TMath::ATan(ym/xm);
- if (xm<0. && ym>0.) phi=pigre+TMath::ATan(ym/xm);
- if (xm<0. && ym<0.) phi=pigre+TMath::ATan(ym/xm);
- if (xm>0. && ym<0.) phi=(2*pigre)+TMath::ATan(ym/xm);
- };
- if(phi<0. || phi>(2*pigre)) {cout<<"attention error on phi in AliITSTrackV1:LmTPC \n"; getchar();}
- */
- Double_t phi=TMath::ATan2(ym,xm); if(phi<0) phi=2.*TMath::Pi()+phi; //nuova def phi
+ Double_t phi=TMath::ATan2(ym,xm); if(phi<0) phi=2.*TMath::Pi()+phi;
fX0=phi;
fX1=zm;
fC43=cov[13];
fC44=cov[9];
- //cout<<" C32 e C44 = "<<fC32<<" "<<fC44<<"\n"; getchar();
}
fC00=obj.fC00; fC10=obj.fC10; fC11=obj.fC11; fC20=obj.fC20; fC21=obj.fC21;
fC22=obj.fC22; fC30=obj.fC30; fC31=obj.fC31; fC32=obj.fC32; fC33=obj.fC33;
- fC40=obj.fC40; fC41=obj.fC41; fC42=obj.fC42; fC43=obj.fC43; fC44=obj.fC44;
-
+ fC40=obj.fC40; fC41=obj.fC41; fC42=obj.fC42; fC43=obj.fC43; fC44=obj.fC44;
+
+ fMass=obj.fMass;
*fClusterInTrack = *obj.fClusterInTrack;
Int_t i;
//Origin A. Badala' and G.S. Pappalardo: e-mail Angela.Badala@ct.infn.it, Giuseppe.S.Pappalardo@ct.infn.it
// add energy loss
+ mass=fMass;
+
TVector s(6);
s(0)=0.0026+0.00283; s(1)=0.018; s(2)=0.0094; s(3)=0.0095; s(4)=0.0091; s(5)=0.0087;
//s(0)=0.0026+0.00283*2.; s(1)=0.018*2.; s(2)=0.0094; s(3)=0.0095; s(4)=0.0091; s(5)=0.0087;
//Origin A. Badala' and G.S. Pappalardo: e-mail Angela.Badala@ct.infn.it, Giuseppe.S.Pappalardo@ct.infn.it
////////// Modification of the covariance matrix to take into account multiple scattering ///////////
+ mass=fMass;
+
TVector s(6);
s(0)=0.0026+0.00283; s(1)=0.018; s(2)=0.0094; s(3)=0.0095; s(4)=0.0091; s(5)=0.0087;
Double_t p2=(GetPt()*GetPt())/(cosl*cosl);
Double_t beta2=p2/(p2+mass*mass);
- Double_t theta2=14.1*14.1/(beta2*p2*1.e6)*(s(layer-1)/cosl);
+ // Double_t theta2=14.1*14.1/(beta2*p2*1.e6)*(s(layer-1)/cosl);
+ Double_t theta2=14.1*14.1/(beta2*p2*1.e6)*(s(layer-1)/TMath::Abs(cosl));
fC22+=theta2*(q40*q40+q41*q41);
fC32+=theta2*q20*q40;
void GetXElements(Double_t &X0, Double_t &X1, Double_t &X2, Double_t &X3, Double_t &X4) const; // get elements
// of state vector
void PutXElements(Double_t X0, Double_t X1, Double_t X2, Double_t X3, Double_t X4); // put elements
- // of state vector
+
+ void PutMass(Double_t mass) {fMass=mass;} // put the particle mass // of state vector
void SetLayer(Int_t layer) { fLayer = layer;} // set current layer
AliTPCtrack *GetTPCtrack() const { return fTPCtrack;} // get hte TPC track
TVector ftgl2; // C(3,3) for primary track
TVector fdtgl; // C(2,3) for primary track
- // Double_t fxoTPC; // cohordinate xo of the helix center, got from the TPC track
+ Double_t fMass; // particle mass
- Int_t fnoclust; //nm of layers in which we don't add a cluster to the track
+ Int_t fnoclust; //nm of layers in which tracking doesn't add a cluster to the track
/*
$Log$
+Revision 1.10.2.1 2001/10/24 07:26:04 hristov
+All the changes from the head are merged with the release
+
Revision 1.14 2001/10/24 07:19:57 hristov
Some pointer correctly initialised in one of the constructors
}
//______________________________________________________________________
void AliITSTrackerV1::DoTracking(Int_t evNumber,Int_t minTr,Int_t maxTr,
- TFile *file) {
+ TFile *file, Bool_t realmass) {
// Origin A. Badala' and G.S. Pappalardo:
// e-mail Angela.Badala@ct.infn.it, Giuseppe.S.Pappalardo@ct.infn.it
// The method needs the event number, the minimum and maximum order
AliITSIOTrack *ioTrack=0;
tracktree1.Branch("ITStracks","AliITSIOTrack",&ioTrack,32000,0);
+ TDatabasePDG * db = new TDatabasePDG;
+
Int_t j;
for (j=minTr; j<=maxTr; j++) {
track=(AliTPCtrack*)tracks.UncheckedAt(j);
if (!track) continue;
+
+ /// mass definition ////////////////////////
+ Double_t mass=0.13956995;
+ Int_t pcode=211; // a pion by default
+ if(realmass) {
+ Int_t TPClabel=TMath::Abs( track->GetLabel() );
+ TParticle *p = (TParticle*)gAlice->Particle(TPClabel);
+ pcode=p->GetPdgCode();
+ // Int_t mothercode=p->GetFirstMother();
+ //if(mothercode>0 ) numofsecondaries++; else numofprimaries++;
+ }
+ //if(!pcode) pcode=211;
+ if(TMath::Abs(pcode)<20443) mass=db->GetParticle(pcode)->Mass();
+
+
+ ///////////////////////////////////////////////
////// propagation to the end of TPC //////////////
Double_t xk=77.415;
- track->PropagateTo(xk, 28.94, 1.204e-3); //Ne
+ track->PropagateTo(xk, 28.94, 1.204e-3,mass); //Ne
xk -=0.01;
- track->PropagateTo(xk, 44.77, 1.71); //Tedlar
+ track->PropagateTo(xk, 44.77, 1.71,mass); //Tedlar
xk -=0.04;
- track->PropagateTo(xk, 44.86, 1.45); //kevlar
+ track->PropagateTo(xk, 44.86, 1.45,mass); //kevlar
xk -=2.0;
- track->PropagateTo(xk, 41.28, 0.029); //Nomex
+ track->PropagateTo(xk, 41.28, 0.029,mass); //Nomex
xk-=16;
- track->PropagateTo(xk,36.2,1.98e-3); //C02
+ track->PropagateTo(xk,36.2,1.98e-3,mass); //C02
xk -=0.01;
- track->PropagateTo(xk, 24.01, 2.7); //Al
+ track->PropagateTo(xk, 24.01, 2.7,mass); //Al
xk -=0.01;
- track->PropagateTo(xk, 44.77, 1.71); //Tedlar
+ track->PropagateTo(xk, 44.77, 1.71,mass); //Tedlar
xk -=0.04;
- track->PropagateTo(xk, 44.86, 1.45); //kevlar
+ track->PropagateTo(xk, 44.86, 1.45,mass); //kevlar
xk -=0.5;
- track->PropagateTo(xk, 41.28, 0.029); //Nomex
+ track->PropagateTo(xk, 41.28, 0.029,mass); //Nomex
////////////////////////////////////////////////////////////////////
- AliITSTrackV1 trackITS(*track);
+ AliITSTrackV1 trackITS(*track);
+ trackITS.PutMass(mass); //new to add mass to track
if(fresult){ delete fresult; fresult=0;}
fresult = new AliITSTrackV1(trackITS);
//propagation to vertex
Double_t rbeam=3.;
+ if((*fresult).DoNotCross(rbeam)) continue; //no intersection with beampipe
(*fresult).Propagation(rbeam);
Double_t c00,c10,c11,c20,c21,c22,c30,c31,c32,c33,c40,c41,c42,c43,c44;
(*fresult).GetCElements(c00,
ioTrack->SetZ(ztrack);
ioTrack->SetLabel(labITS);
ioTrack->SetTPCLabel(lab);
+ ioTrack->SetDz(dz);
Int_t il;
for(il=0;il<6; il++){
ioTrack->SetIdPoint(il,(*fresult).GetIdPoint(il));
for (il=0;il<6;il++) {
idpoint=(*fresult).GetIdPoint(il);
idmodule=(*fresult).GetIdModule(il);
- //*(fvettid[idmodule]+idpoint)=1;
- if(idmodule>0.) *(fvettid[idmodule]+idpoint)=1;//modificata
- // angela
+ if(idmodule>0.) *(fvettid[idmodule]+idpoint)=1;
+
ioTrack->SetIdPoint(il,idpoint);
ioTrack->SetIdModule(il,idmodule);
} // end for il
} // end if on numOfCluster
//gObjectTable->Print(); // stampa memoria
} // end for (int j=minTr; j<=maxTr; j++)
+ delete db;
static Bool_t first=kTRUE;
static TFile *tfile;
if(first) {
AliITSTrackerV1(const AliITSTrackerV1 &cobj);
~AliITSTrackerV1();
AliITSTrackerV1 &operator=(AliITSTrackerV1 obj);
- void DoTracking(Int_t evNumber, Int_t minTr, Int_t maxTr, TFile *file);
+ 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,
Int_t &detector);
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; // cluster with chi2>chi2max are cut. It is
- // pt dependend. aggiunto il 31-7-2001
- Double_t fepsphi; //eps for definition window in phi aggiunto il 1-8-2001
- Double_t fepsz; //eps for definition window in z aggiunto il 1-8-2001
+ 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
Int_t **fvettid; // flag vector of used clusters
Bool_t fflagvert; // a flag to impose or not the vertex constraint
//TStopwatch *fTimerKalman; // timer for kalman filter
//TStopwatch *fTimerIntersection; // timer for Intersection
- ClassDef(AliITSTrackerV1,1) //????
+ ClassDef(AliITSTrackerV1,1)
};
#endif
#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) {
+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) {
const char *filename="galice.root";
TStopwatch timer;
timer.Start();
- ITStracker->DoTracking(nev,min_t,max_t,file); // nuova
+ ITStracker->DoTracking(nev,min_t,max_t,file,realmass); // nuova
timer.Stop(); timer.Print();
} // event loop
file->Close();
cerr<<"Select tracks which have nclust rec points in ITS...\n";
- GoodTrack gt[50000];
+ GoodTrack gt[30000];
Int_t ngood=0;
ifstream in("good_tracks_tpc");
ofstream out("itsgood_tracks");
>>gt[ngood].ptg >>gt[ngood].flag) {
ngood++;
cerr<<ngood<<'\r';
- if (ngood==50000) {
+ if (ngood==30000) {
cerr<<"Too many good tracks !\n";
break;
}