#include <TMatrixD.h>
#include <TMath.h>
-#include <Riostream.h>
#include "AliCluster.h"
#include "AliTPCtrack.h"
ClassImp(AliITStrackV2)
const Int_t kWARN=5;
-Double_t AliITStrackV2::fSigmaYV = 0.005;
-Double_t AliITStrackV2::fSigmaZV = 0.01;
+
//____________________________________________________________________________
AliITStrackV2::AliITStrackV2():AliKalmanTrack(),
fX(0),
if (TMath::Abs(f2) >= 0.9999) {
Int_t n=GetNumberOfClusters();
if (n>kWARN)
- cerr<<n<<" AliITStrackV2::GetGlobalXYZat: Propagation failed !\n";
+ Warning("GetGlobalXYZat","Propagation failed (%d) !\n",n);
return 0;
}
if (TMath::Abs(det) < 1.e-30) {
Int_t n=GetNumberOfClusters();
if (n>kWARN)
- cerr<<n<<" AliKalmanTrack::GetPredictedChi2: Singular matrix !\n";
+ Warning("GetPredictedChi2","Singular matrix (%d) !\n",n);
return 1e10;
}
Double_t tmp=r00; r00=r11; r11=tmp; r01=-r01;
return (dy*r00*dy + 2*r01*dy*dz + dz*r11*dz)/det;
}
-//_____________________________________________________________________________
-Double_t AliITStrackV2::GetPredictedChi2(const AliCluster *c,Double_t *m,
-Double_t x0) const {
- //-----------------------------------------------------------------
- // This function calculates a chi2 increment with a vertex contraint
- //-----------------------------------------------------------------
- TVectorD x(5); x(0)=fP0; x(1)=fP1; x(2)=fP2; x(3)=fP3; x(4)=fP4;
- TMatrixD C(5,5);
- C(0,0)=fC00;
- C(1,0)=fC10; C(1,1)=fC11;
- C(2,0)=fC20; C(2,1)=fC21; C(2,2)=fC22;
- C(3,0)=fC30; C(3,1)=fC31; C(3,2)=fC32; C(3,3)=fC33;
- C(4,0)=fC40; C(4,1)=fC41; C(4,2)=fC42; C(4,3)=fC43; C(4,4)=fC44;
-
- C(0,1)=C(1,0);
- C(0,2)=C(2,0); C(1,2)=C(2,1);
- C(0,3)=C(3,0); C(1,3)=C(3,1); C(2,3)=C(3,2);
- C(0,4)=C(4,0); C(1,4)=C(4,1); C(2,4)=C(4,2); C(3,4)=C(4,3);
-
- TMatrixD H(4,5); H.UnitMatrix();
- Double_t dy=(c->GetY() - m[0]), dz=(c->GetZ() - m[1]);
-
- Double_t dr=TMath::Sqrt(fX*fX + dy*dy);
- Double_t r =TMath::Sqrt(4/dr/dr - fP4*fP4);
- Double_t sn=0.5*(fP4*fX + dy*r);
- Double_t tg=0.5*fP4*dz/TMath::ASin(0.5*fP4*dr);
- TVectorD mm(4);
- mm(0)=m[0]=c->GetY(); mm(1)=m[1]=c->GetZ(); mm(2)=m[2]=sn; mm(3)=m[3]=tg;
-
- Double_t v22=0.,v33=0.;
- //x0=0.;
- if (x0!=0.) {
- Double_t pp2=(1.+ GetTgl()*GetTgl())/(Get1Pt()*Get1Pt());
- Double_t beta2=pp2/(pp2 + GetMass()*GetMass());
- x0*=TMath::Sqrt((1.+ GetTgl()*GetTgl())/(1.- GetSnp()*GetSnp()));
- Double_t theta2=14.1*14.1/(beta2*pp2*1e6)*x0;
- v22 = theta2*(1.- GetSnp()*GetSnp())*(1. + GetTgl()*GetTgl());
- v33 = theta2*(1.+ GetTgl()*GetTgl())*(1. + GetTgl()*GetTgl());
- }
- Double_t sy2=c->GetSigmaY2(), sz2=c->GetSigmaZ2();
- v22+=fSigmaYV*fSigmaYV/dr/dr;
- v22+=sy2/dr/dr;
- Double_t v20=sy2/dr;
-
- v33+=fSigmaZV*fSigmaZV/dr/dr;
- v33+=sz2/dr/dr;
- Double_t v31=sz2/dr;
-
- TMatrixD V(4,4);
- V(0,0)=m[4 ]=sy2; V(0,1)=m[5 ]=0.; V(0,2)=m[6 ]=v20; V(0,3)=m[7 ]=0.;
- V(1,0)=m[8 ]=0.; V(1,1)=m[9 ]=sz2; V(1,2)=m[10]=0.; V(1,3)=m[11]=v31;
- V(2,0)=m[12]=v20; V(2,1)=m[13]=0.; V(2,2)=m[14]=v22; V(2,3)=m[15]=0.;
- V(3,0)=m[16]=0.; V(3,1)=m[17]=v31; V(3,2)=m[18]=0.; V(3,3)=m[19]=v33;
-
- TVectorD res=x; res*=H; res-=mm; //res*=-1;
- TMatrixD tmp(H,TMatrixD::kMult,C);
- TMatrixD R(tmp,TMatrixD::kMult,TMatrixD(TMatrixD::kTransposed,H)); R+=V;
-
- Double_t det=R.Determinant();
- if (TMath::Abs(det) < 1.e-30) {
- Int_t n=GetNumberOfClusters();
- if (n>kWARN)
- cerr<<n<<" AliITStrackV2::GetPredictedChi2: Singular matrix !\n";
- return 1e10;
- }
-
- R.Invert();
-
- TVectorD rs=res;
- res*=R;
- return rs*res;
-}
-
//____________________________________________________________________________
Int_t AliITStrackV2::CorrectForMaterial(Double_t d, Double_t x0) {
//------------------------------------------------------------------
if (TMath::Abs(f2) >= 0.9999) {
Int_t n=GetNumberOfClusters();
if (n>kWARN)
- cerr<<n<<" AliITStrackV2::PropagateTo: Propagation failed !\n";
+ Warning("PropagateTo","Propagation failed !\n",n);
return 0;
}
// Integrated Time [SR, GSI, 17.02.2003]
if (IsStartedTimeIntegral()) {
- Double_t l2 = (fX-oldX)*(fX-oldX)+(fP0-oldY)*(fP0-oldY)+(fP1-oldZ)*(fP1-oldZ);
+ Double_t l2 = (fX-oldX)*(fX-oldX)+(fP0-oldY)*(fP0-oldY)+
+ (fP1-oldZ)*(fP1-oldZ);
AddTimeStep(TMath::Sqrt(l2));
}
//
Int_t n=GetNumberOfClusters();
if (TMath::Abs(fP2)>=0.9999){
- if (n>kWARN) cout<<"AliITStrackV2::Invariant : fP2="<<fP2<<endl;
+ if (n>kWARN) Warning("Invariant","fP2=%f\n",fP2);
return 0;
}
if (fC00<=0 || fC00>9.) {
- if (n>kWARN) cout<<"AliITStrackV2::Invariant : fC00="<<fC00<<endl;
+ if (n>kWARN) Warning("Invariant","fC00=%f\n",fC00);
return 0;
}
if (fC11<=0 || fC11>9.) {
- if (n>kWARN) cout<<"AliITStrackV2::Invariant : fC11="<<fC11<<endl;
+ if (n>kWARN) Warning("Invariant","fC11=%f\n",fC11);
return 0;
}
if (fC22<=0 || fC22>1.) {
- if (n>kWARN) cout<<"AliITStrackV2::Invariant : fC22="<<fC22<<endl;
+ if (n>kWARN) Warning("Invariant","fC22=%f\n",fC22);
return 0;
}
if (fC33<=0 || fC33>1.) {
- if (n>kWARN) cout<<"AliITStrackV2::Invariant : fC33="<<fC33<<endl;
+ if (n>kWARN) Warning("Invariant","fC33=%f\n",fC33);
return 0;
}
if (fC44<=0 || fC44>6e-5) {
- if (n>kWARN) cout<<"AliITStrackV2::Invariant : fC44="<<fC44<<endl;
+ if (n>kWARN) Warning("Invariant","fC44=%f\n",fC44);
return 0;
}
return 1;
if (TMath::Abs(f2) >= 0.9999) {
Int_t n=GetNumberOfClusters();
if (n>kWARN)
- cerr<<n<<" AliITStrackV2::Propagate: Propagation failed !\n";
+ Warning("Propagate","Propagation failed (%d) !\n",n);
return 0;
}
Double_t r1=TMath::Sqrt(1.- f1*f1), r2=TMath::Sqrt(1.- f2*f2);
return a/(1 + TMath::Sqrt(sn*sn + cs*cs));
}
-Int_t AliITStrackV2::Improve(Double_t x0,Double_t yv,Double_t zv) {
+Int_t AliITStrackV2::Improve(Double_t x0,Double_t xyz[3],Double_t ers[3]) {
//------------------------------------------------------------------
//This function improves angular track parameters
//------------------------------------------------------------------
+ Double_t cs=TMath::Cos(fAlpha), sn=TMath::Sin(fAlpha);
+ //Double_t xv = xyz[0]*cs + xyz[1]*sn; // vertex
+ Double_t yv =-xyz[0]*sn + xyz[1]*cs; // in the
+ Double_t zv = xyz[2]; // local frame
Double_t dy=fP0-yv, dz=fP1-zv;
Double_t r2=fX*fX+dy*dy;
Double_t p2=(1.+ GetTgl()*GetTgl())/(Get1Pt()*Get1Pt());
Double_t beta2=p2/(p2 + GetMass()*GetMass());
x0*=TMath::Sqrt((1.+ GetTgl()*GetTgl())/(1.- GetSnp()*GetSnp()));
- //Double_t theta2=14.1*14.1/(beta2*p2*1e6)*x0;
- Double_t theta2=1.0259e-6*14*14/28/(beta2*p2)*x0*9.36*2.33;
+ Double_t theta2=14.1*14.1/(beta2*p2*1e6)*x0;
+ //Double_t theta2=1.0259e-6*14*14/28/(beta2*p2)*x0*9.36*2.33;
{
Double_t parp=0.5*(fP4*fX + dy*TMath::Sqrt(4/r2-fP4*fP4));
Double_t sigma2p = theta2*(1.- GetSnp()*GetSnp())*(1. + GetTgl()*GetTgl());
sigma2p += fC00/r2*(1.- dy*dy/r2)*(1.- dy*dy/r2);
- sigma2p += fSigmaYV*fSigmaYV/r2;
+ sigma2p += ers[1]*ers[1]/r2;
sigma2p += 0.25*fC44*fX*fX;
Double_t eps2p=sigma2p/(fC22+sigma2p);
fP0 += fC20/(fC22+sigma2p)*(parp-fP2);
Double_t parl=0.5*fP4*dz/TMath::ASin(0.5*fP4*TMath::Sqrt(r2));
Double_t sigma2l=theta2;
sigma2l += fC11/r2+fC00*dy*dy*dz*dz/(r2*r2*r2);
- sigma2l += fSigmaZV*fSigmaZV/r2;
+ sigma2l += ers[2]*ers[2]/r2;
Double_t eps2l=sigma2l/(fC33+sigma2l);
fP1 += fC31/(fC33+sigma2l)*(parl-fP3);
fP4 += fC43/(fC33+sigma2l)*(parl-fP3);
// dEdx analysis by: Boris Batyunya, JINR, Boris.Batiounia@cern.ch
//-------------------------------------------------------------------------
-#include <stdlib.h>
#include <TFile.h>
#include <TTree.h>
#include <TRandom.h>
-#include <Riostream.h>
#include "AliITSgeom.h"
#include "AliITSRecPoint.h"
#include "AliITSclusterV2.h"
#include "AliITStrackerV2.h"
-//#define DEBUG
-
-#ifdef DEBUG
-Int_t LAB=38;
-#endif
+ClassImp(AliITStrackerV2)
AliITStrackerV2::AliITSlayer AliITStrackerV2::fLayers[kMaxLayer]; // ITS layers
fPass=0;
fConstraint[0]=1; fConstraint[1]=0;
+
+ Double_t xyz[]={kXV,kYV,kZV}, ers[]={kSigmaXV,kSigmaYV,kSigmaZV};
+ SetVertex(xyz,ers);
}
-void AliITStrackerV2::LoadClusters() {
+Int_t AliITStrackerV2::LoadClusters() {
//--------------------------------------------------------------------
//This function loads ITS clusters
//--------------------------------------------------------------------
sprintf(cname,"TreeC_ITS_%d",GetEventNumber());
TTree *cTree=(TTree*)gDirectory->Get(cname);
if (!cTree) {
- cerr<<"AliITStrackerV2::LoadClusters can't get cTree !\n";
- exit(1);
+ Error("LoadClusters"," can't get cTree !\n");
+ return 1;
}
TBranch *branch=cTree->GetBranch("Clusters");
if (!branch) {
- cerr<<"AliITStrackerV2::LoadClusters can't get Clusters branch !\n";
- exit(1);
+ Error("LoadClusters"," can't get Clusters branch !\n");
+ return 1;
}
TClonesArray dummy("AliITSclusterV2",10000), *clusters=&dummy;
Int_t ncl=clusters->GetEntriesFast();
while (ncl--) {
AliITSclusterV2 *c=(AliITSclusterV2*)clusters->UncheckedAt(ncl);
-
-#ifdef DEBUG
-if (c->GetLabel(2)!=LAB)
-if (c->GetLabel(1)!=LAB)
-if (c->GetLabel(0)!=LAB) continue;
-Int_t idx=c->GetDetectorIndex();
-Int_t lay=i, lad=idx/ndet, det=idx-lad*ndet;
-cout<<lay<<' '<<lad<<' '<<det<<' '<<c->GetY()<<' '<<c->GetZ()<<endl;
-#endif
-
fLayers[i].InsertCluster(new AliITSclusterV2(*c));
}
clusters->Delete();
fLayers[i].ResetRoad(); //road defined by the cluster density
}
delete cTree; //Thanks to Mariana Bondila
+
+ return 0;
}
void AliITStrackerV2::UnloadClusters() {
for (Int_t i=0; i<kMaxLayer; i++) fLayers[i].ResetClusters();
}
-//#ifdef DEBUG
-static Int_t lbl;
-//#endif
-
Int_t AliITStrackerV2::Clusters2Tracks(const TFile *inp, TFile *out) {
//--------------------------------------------------------------------
//This functions reconstructs ITS tracks
TFile *in=(TFile*)inp;
TDirectory *savedir=gDirectory;
- LoadClusters();
+ if (LoadClusters()!=0) return 1;
if (!in->IsOpen()) {
- cerr<<"AliITStrackerV2::Clusters2Tracks(): ";
- cerr<<"file with TPC tracks is not open !\n";
- return 1;
+ Error("Clusters2Tracks","file with TPC tracks is not open !\n");
+ return 1;
}
if (!out->IsOpen()) {
- cerr<<"AliITStrackerV2::Clusters2Tracks(): ";
- cerr<<"file for ITS tracks is not open !\n";
- return 2;
+ Error("Clusters2Tracks","file for ITS tracks is not open !\n");
+ return 2;
}
in->cd();
sprintf(tname,"TreeT_TPC_%d",GetEventNumber());
TTree *tpcTree=(TTree*)in->Get(tname);
if (!tpcTree) {
- cerr<<"AliITStrackerV2::Clusters2Tracks(): "
- "can't get a tree with TPC tracks !\n";
- return 3;
+ Error("Clusters2Tracks","can't get a tree with TPC tracks !\n");
+ return 3;
}
AliTPCtrack *itrack=new AliTPCtrack;
tpcTree->SetBranchAddress("tracks",&itrack);
try {
t=new AliITStrackV2(*itrack);
} catch (const Char_t *msg) {
- cerr<<msg<<endl;
+ Warning("Clusters2Tracks",msg);
delete t;
continue;
}
for (fPass=0; fPass<2; fPass++) {
Int_t &constraint=fConstraint[fPass]; if (constraint<0) continue;
for (Int_t i=0; i<nentr; i++) {
- if (i%10==0) cerr<<nentr-i<<" \r";
AliITStrackV2 *t=(AliITStrackV2*)itsTracks.UncheckedAt(i);
if (t==0) continue; //this track has been already tracked
Int_t tpcLabel=t->GetLabel(); //save the TPC track label
-lbl=tpcLabel;
-#ifdef DEBUG
-lbl=tpcLabel;
-if (TMath::Abs(tpcLabel)!=LAB) continue;
-cout<<tpcLabel<<" *****************\n";
-#endif
-
ResetTrackToFollow(*t);
ResetBestTrack();
while (TakeNextProlongation()) FollowProlongation();
}
-#ifdef DEBUG
-cout<<fBestTrack.GetNumberOfClusters()<<" number of clusters\n\n";
-#endif
-
- if (fBestTrack.GetNumberOfClusters() < kMaxLayer-kLayersToSkip) continue;
-
- if (fConstraint[fPass]) {
- Int_t index[kMaxLayer];
- Int_t k;
- for (k=0; k<kMaxLayer; k++) index[k]=-1;
- Int_t nc=fBestTrack.GetNumberOfClusters();
- for (k=0; k<nc; k++) {
- Int_t idx=fBestTrack.GetClusterIndex(k),nl=(idx&0xf0000000)>>28;
- index[nl]=idx;
- }
- fBestTrack.~AliITStrackV2(); new(&fBestTrack) AliITStrackV2(*t);
- if (!RefitAt(3.7, &fBestTrack, index)) continue;
- }
+ if (fBestTrack.GetNumberOfClusters() < kMaxLayer-kLayersToSkip)continue;
+
+ if (fConstraint[fPass]) {
+ Int_t index[kMaxLayer];
+ Int_t k;
+ for (k=0; k<kMaxLayer; k++) index[k]=-1;
+ Int_t nc=fBestTrack.GetNumberOfClusters();
+ for (k=0; k<nc; k++) {
+ Int_t idx=fBestTrack.GetClusterIndex(k),nl=(idx&0xf0000000)>>28;
+ index[nl]=idx;
+ }
+ fBestTrack.~AliITStrackV2(); new(&fBestTrack) AliITStrackV2(*t);
+ if (!RefitAt(3.7, &fBestTrack, index)) continue;
+ }
- fBestTrack.SetLabel(tpcLabel);
- fBestTrack.CookdEdx();
- CookLabel(&fBestTrack,0.); //For comparison only
- itsTree.Fill();
- UseClusters(&fBestTrack);
- delete itsTracks.RemoveAt(i);
+ fBestTrack.SetLabel(tpcLabel);
+ fBestTrack.CookdEdx();
+ CookLabel(&fBestTrack,0.); //For comparison only
+ itsTree.Fill();
+ UseClusters(&fBestTrack);
+ delete itsTracks.RemoveAt(i);
}
}
+ Info("Clusters2Tracks","Number of TPC tracks: %d\n",nentr);
+ Info("Clusters2Tracks","Number of prolonged tracks: %d\n",
+ (Int_t)itsTree.GetEntries());
+
itsTree.Write();
itsTracks.Delete();
UnloadClusters();
savedir->cd();
- cerr<<"Number of TPC tracks: "<<nentr<<endl;
- cerr<<"Number of prolonged tracks: "<<itsTree.GetEntries()<<endl;
-
return 0;
}
TFile *in=(TFile*)inp;
TDirectory *savedir=gDirectory;
- LoadClusters();
+ if (LoadClusters()!=0) return 1;
if (!in->IsOpen()) {
- cerr<<"AliITStrackerV2::PropagateBack(): ";
- cerr<<"file with ITS tracks is not open !\n";
- return 1;
+ Error("PropagateBack","file with ITS tracks is not open !\n");
+ return 1;
}
if (!out->IsOpen()) {
- cerr<<"AliITStrackerV2::PropagateBack(): ";
- cerr<<"file for back propagated ITS tracks is not open !\n";
- return 2;
+ Error("PropagateBack","file for back propagated ITS tracks is not open !\n");
+ return 2;
}
in->cd();
sprintf(tname,"TreeT_ITS_%d",GetEventNumber());
TTree *itsTree=(TTree*)in->Get(tname);
if (!itsTree) {
- cerr<<"AliITStrackerV2::PropagateBack() ";
- cerr<<"can't get a tree with ITS tracks !\n";
- return 3;
+ Error("PropagateBack","can't get a tree with ITS tracks !\n");
+ return 3;
}
AliITStrackV2 *itrack=new AliITStrackV2;
itsTree->SetBranchAddress("tracks",&itrack);
Int_t itsLabel=fTrackToFollow.GetLabel(); //save the ITS track label
-#ifdef DEBUG
-if (TMath::Abs(itsLabel)!=LAB) continue;
-cout<<itsLabel<<" *****************\n";
-#endif
-
try {
Int_t nc=itrack->GetNumberOfClusters();
-#ifdef DEBUG
-for (Int_t k=0; k<nc; k++) {
- Int_t index=itrack->GetClusterIndex(k);
- AliITSclusterV2 *c=(AliITSclusterV2*)GetCluster(index);
- cout<<c->GetLabel(0)<<' '<<c->GetLabel(1)<<' '<<c->GetLabel(2)<<endl;
-}
-#endif
Int_t idx=0, l=0;
const AliITSclusterV2 *c=0;
if (nc--) {
if (cl) {
if (!fTrackToFollow.Update(cl,maxchi2,index))
- cerr<<"AliITStrackerV2::PropagateBack: filtering failed !\n";
+ Info("PropagateBack","filtering failed !\n");
}
{
Double_t x0;
// track time update [SR, GSI 17.02.2003]
Double_t newX, newY, newZ;
fTrackToFollow.GetGlobalXYZat(fTrackToFollow.GetX(),newX,newY,newZ);
- Double_t dL2 = (oldX-newX)*(oldX-newX)+(oldY-newY)*(oldY-newY)+(oldZ-newZ)*(oldZ-newZ);
+ Double_t dL2 = (oldX-newX)*(oldX-newX) + (oldY-newY)*(oldY-newY) +
+ (oldZ-newZ)*(oldZ-newZ);
fTrackToFollow.AddTimeStep(TMath::Sqrt(dL2));
//
otrack=new AliTPCtrack(fTrackToFollow,fTrackToFollow.GetAlpha());
backTree.Fill(); delete otrack;
UseClusters(&fTrackToFollow);
- cerr << ++ntrk << " \r";
+ ntrk++;
}
catch (const Char_t *msg) {
- cerr<<msg<<endl;
+ Warning("PropagateBack",msg);
}
}
backTree.Write();
- cerr<<"Number of ITS tracks: "<<nentr<<endl;
- cerr<<"Number of back propagated ITS tracks: "<<ntrk<<endl;
+ Info("PropagateBack","Number of ITS tracks: %d\n",nentr);
+ Info("PropagateBack","Number of back propagated ITS tracks: %d\n",ntrk);
delete itrack;
while (fI) {
Int_t i=fI-1;
-#ifdef DEBUG
-cout<<i<<' ';
-#endif
+
AliITSlayer &layer=fLayers[i];
AliITStrackV2 &track=fTracks[i];
Double_t d=0.0034, x0=38.6;
if (i==1) {rs=9.; d=0.0097; x0=42;}
if (!fTrackToFollow.PropagateTo(rs,d,x0)) {
- //cerr<<"AliITStrackerV2::FollowProlongation: "
- //"propagation failed !\n";
+ //Warning("FollowProlongation","propagation failed !\n");
break;
}
}
//find intersection
Double_t x,y,z;
if (!fTrackToFollow.GetGlobalXYZat(r,x,y,z)) {
- //cerr<<"AliITStrackerV2::FollowProlongation: "
- //"failed to estimate track !\n";
+ //Warning("FollowProlongation","failed to estimate track !\n");
break;
}
Double_t phi=TMath::ATan2(y,x);
Int_t idet=layer.FindDetectorIndex(phi,z);
if (idet<0) {
- //cerr<<"AliITStrackerV2::FollowProlongation: "
- //"failed to find a detector !\n";
+ //Warning("FollowProlongation","failed to find a detector !\n");
break;
}
const AliITSdetector &det=layer.GetDetector(idet);
phi=det.GetPhi();
if (!fTrackToFollow.Propagate(phi,det.GetR())) {
- //cerr<<"AliITStrackerV2::FollowProlongation: propagation failed !\n";
+ //Warning("FollowProlongation","propagation failed !\n");
break;
}
fTrackToFollow.SetDetectorIndex(idet);
//Select possible prolongations and store the current track estimation
track.~AliITStrackV2(); new(&track) AliITStrackV2(fTrackToFollow);
- Double_t dz=7*TMath::Sqrt(track.GetSigmaZ2() + kSigmaZ2[i]);
- Double_t dy=7*TMath::Sqrt(track.GetSigmaY2() + kSigmaY2[i]);
- Double_t road=layer.GetRoad();
- if (dz*dy>road*road) {
- Double_t dd=TMath::Sqrt(dz*dy), scz=dz/dd, scy=dy/dd;
- dz=road*scz; dy=road*scy;
- }
+ Double_t dz=7*TMath::Sqrt(track.GetSigmaZ2() + kSigmaZ2[i]);
+ Double_t dy=7*TMath::Sqrt(track.GetSigmaY2() + kSigmaY2[i]);
+ Double_t road=layer.GetRoad();
+ if (dz*dy>road*road) {
+ Double_t dd=TMath::Sqrt(dz*dy), scz=dz/dd, scy=dy/dd;
+ dz=road*scz; dy=road*scy;
+ }
//Double_t dz=4*TMath::Sqrt(track.GetSigmaZ2() + kSigmaZ2[i]);
if (dz < 0.5*TMath::Abs(track.GetTgl())) dz=0.5*TMath::Abs(track.GetTgl());
if (dz > kMaxRoad) {
- //cerr<<"AliITStrackerV2::FollowProlongation: too broad road in Z !\n";
+ //Warning("FollowProlongation","too broad road in Z !\n");
break;
}
//Double_t dy=4*TMath::Sqrt(track.GetSigmaY2() + kSigmaY2[i]);
if (dy < 0.5*TMath::Abs(track.GetSnp())) dy=0.5*TMath::Abs(track.GetSnp());
if (dy > kMaxRoad) {
- //cerr<<"AliITStrackerV2::FollowProlongation: too broad road in Y !\n";
+ //Warning("FollowProlongation","too broad road in Y !\n");
break;
}
Double_t dz=7*TMath::Sqrt(fTrackToFollow.GetSigmaZ2() + kSigmaZ2[fI]);
Double_t dy=7*TMath::Sqrt(fTrackToFollow.GetSigmaY2() + kSigmaY2[fI]);
-Double_t road=layer.GetRoad();
-if (dz*dy>road*road) {
- Double_t dd=TMath::Sqrt(dz*dy), scz=dz/dd, scy=dy/dd;
- dz=road*scz; dy=road*scy;
-}
+ Double_t road=layer.GetRoad();
+ if (dz*dy>road*road) {
+ Double_t dd=TMath::Sqrt(dz*dy), scz=dz/dd, scy=dy/dd;
+ dz=road*scz; dy=road*scy;
+ }
const AliITSclusterV2 *c=0; Int_t ci=-1;
Double_t chi2=12345.;
while ((c=layer.GetNextCluster(ci))!=0) {
- //if (c->GetLabel(0)!=TMath::Abs(lbl)) continue;
Int_t idet=c->GetDetectorIndex();
if (fTrackToFollow.GetDetectorIndex()!=idet) {
const AliITSdetector &det=layer.GetDetector(idet);
ResetTrackToFollow(fTracks[fI]);
if (!fTrackToFollow.Propagate(det.GetPhi(),det.GetR())) {
- //cerr<<"AliITStrackerV2::TakeNextProlongation: "
- //"propagation failed !\n";
+ //Warning("TakeNextProlongation","propagation failed !\n");
continue;
}
fTrackToFollow.SetDetectorIndex(idet);
if (TMath::Abs(fTrackToFollow.GetZ()-GetZ())>layer.GetR()+dz) continue;
-
-#ifdef DEBUG
-cout<<fI<<" change detector !\n";
-#endif
-
}
if (TMath::Abs(fTrackToFollow.GetZ() - c->GetZ()) > dz) continue;
chi2=fTrackToFollow.GetPredictedChi2(c); if (chi2<kMaxChi2) break;
}
-#ifdef DEBUG
-cout<<fI<<" chi2="<<chi2<<' '
- <<fTrackToFollow.GetY()<<' '<<fTrackToFollow.GetZ()<<' '
- <<dy<<' '<<dz<<endl;
-{
-Double_t phi=TMath::ATan(fTrackToFollow.GetY()/fTrackToFollow.GetX())
- +fTrackToFollow.GetAlpha(); phi=phi*180./3.141593;
-cout<<phi<<endl;
-}
-#endif
-
if (chi2>=kMaxChi2) return 0;
if (!c) return 0;
if (!fTrackToFollow.Update(c,chi2,(fI<<28)+ci)) {
- //cerr<<"AliITStrackerV2::TakeNextProlongation: filtering failed !\n";
+ //Warning("TakeNextProlongation","filtering failed !\n");
return 0;
}
if (fConstraint[fPass]) {
Double_t d=GetEffectiveThickness(0,0); //Think of this !!!!
- fTrackToFollow.Improve(d,GetY(),GetZ());
+ Double_t xyz[]={GetX(),GetY(),GetZ()};
+ Double_t ers[]={GetSigmaX(),GetSigmaY(),GetSigmaZ()};
+ fTrackToFollow.Improve(d,xyz,ers);
}
-#ifdef DEBUG
-cout<<"accepted lab="<<c->GetLabel(0)<<' '
- <<fTrackToFollow.GetNumberOfClusters()<<' '
- <<fTrackToFollow.GetY()<<' '<<fTrackToFollow.GetZ()<<' '
- <<fTrackToFollow.Get1Pt()<<endl<<endl;
-#endif
-
return 1;
}
//This function adds a cluster to this layer
//--------------------------------------------------------------------
if (fN==kMaxClusterPerLayer) {
- cerr<<"AliITStrackerV2::AliITSlayer::InsertCluster(): "
- "Too many clusters !\n";
- return 1;
+ ::Error("InsertCluster","Too many clusters !\n");
+ return 1;
}
if (fN==0) {fClusters[fN++]=c; return 0;}
if (nz>=fNdetectors) return -1;
if (nz<0) return -1;
-#ifdef DEBUG
-cout<<np<<' '<<nz<<endl;
-#endif
-
return np*fNdetectors + nz;
}
if (TMath::Abs(y+0.10)<0.10) {d+=0.014;}
}
-#ifdef DEBUG
- cout<<"d="<<d<<endl;
-#endif
-
return d;
}