From bbf926473b6e3ee93c52904d962b06e6f428bc81 Mon Sep 17 00:00:00 2001 From: cblume Date: Fri, 8 Dec 2000 16:07:02 +0000 Subject: [PATCH] Update of the tracking by Sergei --- TRD/AliTRDcluster.cxx | 30 ++++- TRD/AliTRDcluster.h | 28 ++-- TRD/AliTRDfindTracks.C | 19 +-- TRD/AliTRDtimeBin.h | 2 +- TRD/AliTRDtrack.cxx | 27 +--- TRD/AliTRDtrack.h | 65 ++++----- TRD/AliTRDtracker.cxx | 254 ++++++++++++++++++----------------- TRD/AliTRDtracker.h | 47 +++++-- TRD/AliTRDtrackingSector.cxx | 35 +++-- TRD/AliTRDtrackingSector.h | 16 ++- TRD/TrackDisplay.C | 3 +- TRD/slowClusterCreate.C | 17 +-- 12 files changed, 288 insertions(+), 255 deletions(-) diff --git a/TRD/AliTRDcluster.cxx b/TRD/AliTRDcluster.cxx index bd1954abe37..25f0008c031 100644 --- a/TRD/AliTRDcluster.cxx +++ b/TRD/AliTRDcluster.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.2 2000/10/06 16:49:46 cblume +Made Getters const + Revision 1.1.2.1 2000/09/22 14:47:52 cblume Add the tracking code @@ -57,8 +60,31 @@ AliTRDcluster::AliTRDcluster(AliTRDrecPoint *rp) fSigmaY2 = rp->GetSigmaY2(); fSigmaZ2 = rp->GetSigmaZ2(); - fSigmaY2 = 1; - fSigmaZ2 = 5; + fSigmaY2 = 0.2; + fSigmaZ2 = 5.; + +} + +//_____________________________________________________________________________ +AliTRDcluster::AliTRDcluster(AliTRDcluster *cl) +{ + // + // Copy constructor + // + + fDetector = cl->GetDetector(); + fTimeBin = cl->GetLocalTimeBin(); + + fTracks[0] = cl->GetTrackIndex(0); + fTracks[1] = cl->GetTrackIndex(1); + fTracks[2] = cl->GetTrackIndex(2); + + fQ = cl->GetQ(); + + fY = cl->GetY(); + fZ = cl->GetZ(); + fSigmaY2 = cl->GetSigmaY2(); + fSigmaZ2 = cl->GetSigmaZ2(); } diff --git a/TRD/AliTRDcluster.h b/TRD/AliTRDcluster.h index 475614848e6..5951d52e0d7 100644 --- a/TRD/AliTRDcluster.h +++ b/TRD/AliTRDcluster.h @@ -15,19 +15,23 @@ class AliTRDcluster : public TObject { AliTRDcluster(); AliTRDcluster(AliTRDrecPoint *rp); + AliTRDcluster(AliTRDcluster *cl); - virtual Int_t GetDetector() const { return fDetector; }; - virtual Int_t GetLocalTimeBin() const { return fTimeBin; } - - virtual Float_t GetSigmaY2() const { return fSigmaY2; } - virtual Float_t GetSigmaZ2() const { return fSigmaZ2; } - virtual Float_t GetY() const { return fY; } - virtual Float_t GetZ() const { return fZ; } - virtual Float_t GetQ() const { return fQ; } - - Int_t IsUsed() const { return (fQ<0) ? 1 : 0; } - void Use() { fQ=-fQ; } - Int_t GetTrackIndex(Int_t i) const { return fTracks[i]; } + Int_t GetDetector() const { return fDetector; }; + Int_t GetLocalTimeBin() const { return fTimeBin; } + + Float_t GetSigmaY2() const { return fSigmaY2; } + Float_t GetSigmaZ2() const { return fSigmaZ2; } + Float_t GetY() const { return fY; } + Float_t GetZ() const { return fZ; } + Float_t GetQ() const { return fQ; } + + Int_t IsUsed() const { return (fQ<0) ? 1 : 0; } + void Use() { fQ=-fQ; } + Int_t GetTrackIndex(Int_t i) const { return fTracks[i]; } + + void SetSigmaY2(Float_t s) { fSigmaY2 = s; } + void SetSigmaZ2(Float_t s) { fSigmaZ2 = s; } protected: diff --git a/TRD/AliTRDfindTracks.C b/TRD/AliTRDfindTracks.C index 1153c024d0e..e9cb3772ef2 100644 --- a/TRD/AliTRDfindTracks.C +++ b/TRD/AliTRDfindTracks.C @@ -14,25 +14,18 @@ void AliTRDfindTracks() { cout << "Loaded shared libraries" << endl; } - Char_t *alifile = "AliTRDclusters.root"; - - cerr<<"got this far"<GetEvent(hitfile,clusterfile); - Tracker->GetEvent(alifile); - - Int_t inner, outer, delta=60; - for(Int_t i=0; i<1; i++) { - outer=179-i; inner=outer-delta; - Tracker->MakeSeeds(inner,outer); - } - - Tracker->FindTracks(); + Tracker->Clusters2Tracks(); - Tracker->WriteTracks(); + Tracker->WriteTracks(trackfile); } diff --git a/TRD/AliTRDtimeBin.h b/TRD/AliTRDtimeBin.h index a02c3d82b1d..f3fa41ea898 100644 --- a/TRD/AliTRDtimeBin.h +++ b/TRD/AliTRDtimeBin.h @@ -28,7 +28,7 @@ public: Int_t Find(Double_t y) const; - protected: +protected: unsigned fN; AliTRDcluster *fClusters[kMAX_CLUSTER_PER_TIME_BIN]; diff --git a/TRD/AliTRDtrack.cxx b/TRD/AliTRDtrack.cxx index f40105d8699..07dcc1d320a 100644 --- a/TRD/AliTRDtrack.cxx +++ b/TRD/AliTRDtrack.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.3 2000/10/15 23:40:01 cblume +Remove AliTRDconst + Revision 1.2 2000/10/06 16:49:46 cblume Made Getters const @@ -426,28 +429,4 @@ void AliTRDtrack::Streamer(TBuffer &R__b) } } -//_____________________________________________________________________________ -void AliTRDseed::CookdEdx(Double_t low, Double_t up) { - - // Calculates dE/dX within the "low" and "up" cuts. - - Int_t i; - Int_t nc=this->GetNclusters(); - - Int_t swap;//stupid sorting - do { - swap=0; - for (i=0; i #include @@ -43,7 +46,6 @@ Add the tracking code #include #include "AliRun.h" - #include "AliTRD.h" #include "AliTRDgeometry.h" #include "AliTRDrecPoint.h" @@ -56,6 +58,26 @@ Add the tracking code ClassImp(AliTRDtracker) + const Int_t AliTRDtracker::fSeedGap = 35; + const Int_t AliTRDtracker::fSeedStep = 5; + + + const Float_t AliTRDtracker::fMinClustersInTrack = 0.5; + const Float_t AliTRDtracker::fMinClustersInSeed = 0.5; + const Float_t AliTRDtracker::fSeedDepth = 0.5; + const Float_t AliTRDtracker::fSkipDepth = 0.2; + const Float_t AliTRDtracker::fMaxSeedDeltaZ = 30.; + const Float_t AliTRDtracker::fMaxSeedC = 0.01; + const Float_t AliTRDtracker::fMaxSeedTan = 1.2; + const Float_t AliTRDtracker::fMaxSeedVertexZ = 200.; + const Float_t AliTRDtracker::fLabelFraction = 0.5; + const Float_t AliTRDtracker::fWideRoad = 30.; + + const Double_t AliTRDtracker::fMaxChi2 = 12.; + const Double_t AliTRDtracker::fSeedErrorSY = 0.1; + const Double_t AliTRDtracker::fSeedErrorSY3 = 2.5; + const Double_t AliTRDtracker::fSeedErrorSZ = 0.1; + //____________________________________________________________________ AliTRDtracker::AliTRDtracker() { @@ -63,10 +85,9 @@ AliTRDtracker::AliTRDtracker() // Default constructor // - fInputFile = NULL; fEvent = 0; - fGeom = NULL; + fNclusters = 0; fClusters = NULL; fNseeds = 0; @@ -80,10 +101,9 @@ AliTRDtracker::AliTRDtracker() AliTRDtracker::AliTRDtracker(const Text_t* name, const Text_t* title) :TNamed(name, title) { - fInputFile = NULL; fEvent = 0; - fGeom = NULL; + fNclusters = 0; fClusters = new TObjArray(2000); fNseeds = 0; @@ -93,38 +113,44 @@ AliTRDtracker::AliTRDtracker(const Text_t* name, const Text_t* title) } - //___________________________________________________________________ AliTRDtracker::~AliTRDtracker() { - if (fInputFile) { - fInputFile->Close(); - delete fInputFile; - } delete fClusters; delete fTracks; delete fSeeds; delete fGeom; } +//___________________________________________________________________ +void AliTRDtracker::Clusters2Tracks() +{ + Int_t inner, outer; + Int_t fTotalNofTimeBins = fGeom->GetTimeMax() * AliTRDgeometry::Nplan(); + Int_t nSteps = (Int_t) (fTotalNofTimeBins * fSeedDepth)/fSeedStep; + + for(Int_t i=0; iGetDetector("TRD"); - AliTRDgeometry *fGeom; - fGeom = TRD->GetGeometry(); Double_t s, pad = fGeom->GetRowPadSize(); s = pad * pad /12.; return s; @@ -182,7 +208,7 @@ inline Double_t f3trd(Double_t x1,Double_t y1, //___________________________________________________________________ -static Int_t FindProlongation(AliTRDseed& t, AliTRDtrackingSector *sec, +Int_t AliTRDtracker::FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec, Int_t s, Int_t rf=0) { // Starting from current position on track=t this function tries @@ -190,8 +216,7 @@ static Int_t FindProlongation(AliTRDseed& t, AliTRDtrackingSector *sec, // if a close cluster is found. *sec is a pointer to allocated // array of sectors, in which the initial sector has index=s. - const Int_t TIME_BINS_TO_SKIP=Int_t(0.2*sec->GetNtimeBins()); - const Double_t MAX_CHI2=12.; + const Int_t TIME_BINS_TO_SKIP=Int_t(fSkipDepth*sec->GetNtimeBins()); Int_t try_again=TIME_BINS_TO_SKIP; Double_t alpha=AliTRDgeometry::GetAlpha(); @@ -208,14 +233,14 @@ static Int_t FindProlongation(AliTRDseed& t, AliTRDtrackingSector *sec, AliTRDcluster *cl=0; UInt_t index=0; - Double_t max_chi2=MAX_CHI2; - // const AliTRDtimeBin& time_bin=sec[s][nr]; + Double_t max_chi2=fMaxChi2; + AliTRDtimeBin& time_bin=sec[s][nr]; - Double_t sy2=SigmaY2trd(t.GetX(),t.GetTgl(),t.GetPt()); - Double_t sz2=SigmaZ2trd(t.GetX(),t.GetTgl()); + Double_t sy2=ExpectedSigmaY2(t.GetX(),t.GetTgl(),t.GetPt()); + Double_t sz2=ExpectedSigmaZ2(t.GetX(),t.GetTgl()); Double_t road=5.*sqrt(t.GetSigmaY2() + sy2), y=t.GetY(), z=t.GetZ(); - if (road>30) { + if (road>fWideRoad) { if (t.GetNclusters() > 4) { cerr<GetListOfFiles()->FindObject(name); + ReadClusters(fClusters, clusterfile); + + // get geometry from the file with hits + + TFile *fInputFile = (TFile*) gROOT->GetListOfFiles()->FindObject(hitfile); if (!fInputFile) { printf("AliTRDtracker::Open -- "); - printf("Open the ALIROOT-file %s.\n",name); - fInputFile = new TFile(name,"UPDATE"); + printf("Open the ALIROOT-file %s.\n",hitfile); + fInputFile = new TFile(hitfile); } else { printf("AliTRDtracker::Open -- "); - printf("%s is already open.\n",name); + printf("%s is already open.\n",hitfile); } // Get AliRun object from file or create it if not on file - //if (!gAlice) { - gAlice = (AliRun*) fInputFile->Get("gAlice"); - if (gAlice) { - printf("AliTRDtracker::GetEvent -- "); - printf("AliRun object found on file.\n"); - } - else { - printf("AliTRDtracker::GetEvent -- "); - printf("Could not find AliRun object.\n"); - } - //} - fEvent = nEvent; + gAlice = (AliRun*) fInputFile->Get("gAlice"); + if (gAlice) { + printf("AliTRDtracker::GetEvent -- "); + printf("AliRun object found on file.\n"); + } + else { + printf("AliTRDtracker::GetEvent -- "); + printf("Could not find AliRun object.\n"); + } // Import the Trees for the event nEvent in the file Int_t nparticles = gAlice->GetEvent(fEvent); @@ -317,27 +341,6 @@ void AliTRDtracker::GetEvent(const Char_t *name, Int_t nEvent) AliTRD *TRD = (AliTRD*) gAlice->GetDetector("TRD"); fGeom = TRD->GetGeometry(); - Char_t treeName[14]; - sprintf(treeName,"TRDrecPoints%d", nEvent); - - TTree *tree=(TTree*)fInputFile->Get(treeName); - TBranch *branch=tree->GetBranch("TRDrecPoints"); - Int_t nentr = (Int_t) tree->GetEntries(); - printf("found %d entries in %s tree.\n",nentr,treeName); - - for (Int_t i=0; iSetAddress(&ioArray); - tree->GetEvent(i); - Int_t npoints = ioArray->GetEntriesFast(); - printf("Read %d rec. points from entry %d \n", npoints, i); - for(Int_t j=0; jUncheckedAt(j); - AliTRDcluster *c = new AliTRDcluster(p); - fClusters->AddLast(c); - } - } - } @@ -348,7 +351,7 @@ void AliTRDtracker::SetUpSectors(AliTRDtrackingSector *sec) // Note that the numbering scheme for the TRD tracking_sectors // differs from that of TRD sectors - for (Int_t i=0; i30.) continue; + if (TMath::Abs(zz-z2)>fMaxSeedDeltaZ) continue; Double_t d=(x2-x1)*(0.-y2)-(0.-x2)*(y2-y1); if (d==0.) {cerr<<"TRD MakeSeeds: Straight seed !\n"; continue;} @@ -447,7 +450,7 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer) x[1]=z1; x[2]=f1trd(x1,y1,x2,y2,x3,y3); - if (TMath::Abs(x[2]) >= 0.01) continue; + if (TMath::Abs(x[2]) >= fMaxSeedC) continue; x[3]=f2trd(x1,y1,x2,y2,x3,y3); @@ -455,15 +458,15 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer) x[4]=f3trd(x1,y1,x2,y2,z1,z2); - if (TMath::Abs(x[4]) > 1.2) continue; + if (TMath::Abs(x[4]) > fMaxSeedTan) continue; Double_t a=asin(x[3]); Double_t zv=z1 - x[4]/x[2]*(a+asin(x[2]*x1-x[3])); - if (TMath::Abs(zv)>200.) continue; + if (TMath::Abs(zv)>fMaxSeedVertexZ) continue; - Double_t sy1=r1[is]->GetSigmaY2(), sz1=r1[is]->GetSigmaZ2()*12; - Double_t sy2=cl->GetSigmaY2(), sz2=cl->GetSigmaZ2()*12; - Double_t sy3=100*0.025, sy=0.1, sz=0.1; + Double_t sy1=r1[is]->GetSigmaY2(), sz1=r1[is]->GetSigmaZ2(); + Double_t sy2=cl->GetSigmaY2(), sz2=cl->GetSigmaZ2(); + Double_t sy3=fSeedErrorSY3, sy=fSeedErrorSY, sz=fSeedErrorSZ; Double_t f20=(f1trd(x1,y1+sy,x2,y2,x3,y3)-x[2])/sy; Double_t f22=(f1trd(x1,y1,x2,y2+sy,x3,y3)-x[2])/sy; @@ -486,14 +489,12 @@ void AliTRDtracker::MakeSeeds(Int_t inner, Int_t outer) c[14]=f40*sy1*f40+f41*sz1*f41+f42*sy2*f42+f43*sz2*f43; UInt_t index=r1.GetIndex(is); - AliTRDseed *track=new AliTRDseed(index, x, c, x1, ns*alpha+shift); - - // Float_t l=fTrSec->GetPitch(); - // track->SetSampledEdx(r1[is]->fQ/l,0); + AliTRDtrack *track=new AliTRDtrack(index, x, c, x1, ns*alpha+shift); Int_t rc=FindProlongation(*track,fTrSec,ns,i2); - if ((rc < 0) || (track->GetNclusters() < (i1-i2)/2) ) delete track; + if ((rc < 0) || + (track->GetNclusters() < (i1-i2)*fMinClustersInSeed)) delete track; else { fSeeds->AddLast(track); fNseeds++; cerr<<"found seed "<Sort(); } @@ -524,10 +523,10 @@ void AliTRDtracker::FindTracks() for (Int_t i=0; iUncheckedAt(i)); + AliTRDtrack& t=*((AliTRDtrack*)fSeeds->UncheckedAt(i)); nSeedClusters = t.GetNclusters(); - Double_t alpha=AliTRDgeometry::GetAlpha(); + Double_t alpha=t.GetAlpha(); if (alpha > 2.*TMath::Pi()) alpha -= 2.*TMath::Pi(); if (alpha < 0. ) alpha += 2.*TMath::Pi(); @@ -535,22 +534,23 @@ void AliTRDtracker::FindTracks() if (FindProlongation(t,fTrSec,ns)) { cerr<<"No of clusters in the track = "<= Int_t(0.3*num_of_time_bins)) && - ((t.GetNclusters()-nSeedClusters)>60)) { - t.CookdEdx(); + if (t.GetNclusters() >= Int_t(fMinClustersInTrack*num_of_time_bins)) { Int_t label = GetTrackLabel(t); t.SetLabel(label); - AliTRDtrack* pt=&t; - fTracks->AddLast(pt); fNtracks++; UseClusters(t); + + AliTRDtrack *pt = new AliTRDtrack(t); + fTracks->AddLast(pt); fNtracks++; + cerr<<"found track "<RemoveAt(i); } } //__________________________________________________________________ -void AliTRDtracker::UseClusters(AliTRDseed t) { +void AliTRDtracker::UseClusters(AliTRDtrack t) { Int_t ncl=t.GetNclusters(); for (Int_t i=0; iGetTimeMax(); Bool_t label_added; Int_t s[range][2]; @@ -601,7 +601,6 @@ Int_t AliTRDtracker::GetTrackLabel(AliTRDseed t) { } } - Int_t max=0; label = -123456789; @@ -610,17 +609,17 @@ Int_t AliTRDtracker::GetTrackLabel(AliTRDseed t) { max=s[i][1]; label=s[i][0]; } } - if(max > ncl/2) return label; + if(max > ncl*fLabelFraction) return label; else return -1; } //___________________________________________________________________ -Int_t AliTRDtracker::WriteTracks() { +Int_t AliTRDtracker::WriteTracks(const Char_t *filename) { TDirectory *savedir=gDirectory; - TFile *out=TFile::Open("AliTRDtracks.root","RECREATE"); + TFile *out=TFile::Open(filename,"RECREATE"); TTree tracktree("TreeT","Tree with TRD tracks"); @@ -645,11 +644,9 @@ Int_t AliTRDtracker::WriteTracks() { return 0; } - - //_____________________________________________________________________________ -void AliTRDtracker::ReadClusters(TObjArray *array, const Char_t *filename - , Int_t nEvent, Int_t option) +void AliTRDtracker::ReadClusters(TObjArray *array, const Char_t *filename, +Int_t option = 1) { // // Reads AliTRDclusters (option >= 0) or AliTRDrecPoints (option < 0) @@ -662,33 +659,48 @@ void AliTRDtracker::ReadClusters(TObjArray *array, const Char_t *filename TFile *file = TFile::Open(filename); if (!file->IsOpen()) {printf("Can't open file %s !\n",filename); return;} - Char_t treeName[14]; - sprintf(treeName,"TRDrecPoints%d", nEvent); - - TTree *tree=(TTree*)file->Get(treeName); - TBranch *branch=tree->GetBranch("TRDrecPoints"); + TTree *tree = (TTree*)file->Get("ClusterTree"); Int_t nentr = (Int_t) tree->GetEntries(); - printf("found %d entries in %s tree.\n",nentr,treeName); - - for (Int_t i=0; iSetAddress(&ioArray); - tree->GetEvent(i); - Int_t npoints = ioArray->GetEntriesFast(); - printf("Read %d rec. points from entry %d \n", npoints, i); - for(Int_t j=0; jUncheckedAt(j); - AliTRDcluster *c = new AliTRDcluster(p); - if( option >= 0) array->AddLast(c); - else array->AddLast(p); + printf("found %d entries in %s.\n",nentr,tree->GetName()); + + TBranch *branch; + TObjArray *ioArray = new TObjArray(400); + + if( option < 0 ) { + branch = tree->GetBranch("RecPoints"); + + for (Int_t i=0; iSetAddress(&ioArray); + tree->GetEvent(i); + Int_t npoints = ioArray->GetEntriesFast(); + printf("Read %d rec. points from entry %d \n", npoints, i); + + for(Int_t j=0; jUncheckedAt(j); + array->AddLast(p); + ioArray->RemoveAt(j); + } + } + } + else { + branch = tree->GetBranch("Clusters"); + + for (Int_t i=0; iSetAddress(&ioArray); + tree->GetEvent(i); + Int_t npoints = ioArray->GetEntriesFast(); + printf("Read %d clusters from entry %d \n", npoints, i); + + for(Int_t j=0; jUncheckedAt(j); + array->AddLast(c); + ioArray->RemoveAt(j); + } } } file->Close(); savedir->cd(); - + } - - - diff --git a/TRD/AliTRDtracker.h b/TRD/AliTRDtracker.h index 2d726aceae2..6caf38a6d40 100644 --- a/TRD/AliTRDtracker.h +++ b/TRD/AliTRDtracker.h @@ -7,12 +7,14 @@ #include class TFile; +class TParticle; +class TParticlePDG; class TObjArray; class AliTRDgeometry; // class AliTRDtrackingSector; class AliTRDtrack; -class AliTRDseed; +class AliTRDmcTrack; class AliTRDtracker : public TNamed { @@ -23,21 +25,27 @@ class AliTRDtracker : public TNamed { AliTRDtracker(const Text_t* name, const Text_t* title); ~AliTRDtracker(); - virtual void GetEvent(const Char_t *name, Int_t nEvent = 0); - virtual void SetUpSectors(AliTRDtrackingSector *sec); + virtual void Clusters2Tracks(); + Double_t ExpectedSigmaY2(Double_t r, Double_t tgl, Double_t pt); + Double_t ExpectedSigmaZ2(Double_t r, Double_t tgl); + Int_t FindProlongation(AliTRDtrack& t, AliTRDtrackingSector *sec, + Int_t s, Int_t rf=0); + void GetEvent(const Char_t *hitfile, const Char_t *clusterfile); + void SetUpSectors(AliTRDtrackingSector *sec); virtual void MakeSeeds(Int_t inner, Int_t outer); virtual void FindTracks(); - virtual void UseClusters(AliTRDseed t); - virtual Int_t GetTrackLabel(AliTRDseed t); - virtual Int_t WriteTracks(); - virtual void ReadClusters(TObjArray *array, const Char_t *filename, Int_t nEvent = 0, Int_t option = 1); + virtual void UseClusters(AliTRDtrack t); + virtual Int_t GetTrackLabel(AliTRDtrack t); + Int_t WriteTracks(const Char_t *filename); + void ReadClusters(TObjArray *array, const Char_t *filename, + Int_t option = 1); protected: - TFile *fInputFile; // AliROOT input file - AliTRDgeometry *fGeom; // Pointer to TRD geometry Int_t fEvent; // Event number + AliTRDgeometry *fGeom; // Pointer to TRD geometry + Int_t fNclusters; // Number of clusters in TRD TObjArray *fClusters; // List of clusters for all sectors @@ -47,6 +55,27 @@ class AliTRDtracker : public TNamed { Int_t fNtracks; // Number of reconstructed tracks TObjArray *fTracks; // List of reconstructed tracks + static const Int_t fSeedGap; // Distance between inner and outer + // time bin in seeding + + static const Int_t fSeedStep; // Step in iterations + static const Float_t fSeedDepth; // Fraction of TRD allocated for seeding + static const Float_t fSkipDepth; // Fraction of TRD which can be skipped + // in track prolongation + static const Double_t fMaxChi2; // max increment in track chi2 + + static const Float_t fMinClustersInTrack; // min fraction of clusters in track + static const Float_t fMinClustersInSeed; // min fraction of clusters in seed + static const Float_t fMaxSeedDeltaZ; // max dZ in MakeSeeds + static const Float_t fMaxSeedC; // max initial curvature in MakeSeeds + static const Float_t fMaxSeedTan; // max initial Tangens(lambda) in MakeSeeds + static const Float_t fMaxSeedVertexZ; // max vertex Z in MakeSeeds + static const Double_t fSeedErrorSY; // sy parameter in MakeSeeds + static const Double_t fSeedErrorSY3; // sy3 parameter in MakeSeeds + static const Double_t fSeedErrorSZ; // sz parameter in MakeSeeds + static const Float_t fLabelFraction; // min fraction of clusters in GetTrackLabel + static const Float_t fWideRoad; // max road width in FindProlongation + ClassDef(AliTRDtracker,1) // manager base class }; diff --git a/TRD/AliTRDtrackingSector.cxx b/TRD/AliTRDtrackingSector.cxx index a443a7ed008..157d00ac55a 100644 --- a/TRD/AliTRDtrackingSector.cxx +++ b/TRD/AliTRDtrackingSector.cxx @@ -15,6 +15,9 @@ /* $Log$ +Revision 1.4 2000/10/16 01:16:53 cblume +Changed timebin 0 to be the one closest to the readout + Revision 1.3 2000/10/15 23:40:01 cblume Remove AliTRDconst @@ -68,7 +71,6 @@ AliTRDtimeBin &AliTRDtrackingSector::operator[](Int_t i) void AliTRDtrackingSector::SetUp() { - AliTRD *TRD = (AliTRD*) gAlice->GetDetector("TRD"); fGeom = TRD->GetGeometry(); @@ -97,9 +99,7 @@ Double_t AliTRDtrackingSector::GetX(Int_t l) const /fTimeBinSize) + 1); Float_t t0 = fGeom->GetTime0(plane); - Double_t x = t0 + time_slice * fTimeBinSize; - - // cerr<<"plane, tb, x = "<GetTime0(AliTRDgeometry::Nplan()-1) - // + AliTRDgeometry::DrThick(); - // Changed to new time0 (CBL) Float_t r_out = fGeom->GetTime0(AliTRDgeometry::Nplan()-1); - Float_t r_in = fGeom->GetTime0(0); - // cerr<<"GetTimeBinNumber: r_in,r_out = "<GetTime0(0) - AliTRDgeometry::DrThick(); if(x >= r_out) return fN-1; if(x <= r_in) return 0; Float_t gap = fGeom->GetTime0(1) - fGeom->GetTime0(0); - // cerr<<"GetTimeBinNumber: gap = "<ReadClusters(RecPointsArray,alifile,nEvent,-1); + Tracker->ReadClusters(RecPointsArray,alifile,-1); Int_t nRecPoints = RecPointsArray->GetEntriesFast(); cerr<<"Found "<GetListOfFiles()->FindObject(alifile); if (!gafl) { cout << "Open the ALIROOT-file " << alifile << endl; diff --git a/TRD/slowClusterCreate.C b/TRD/slowClusterCreate.C index 2d7d937139f..4246ffcbabd 100644 --- a/TRD/slowClusterCreate.C +++ b/TRD/slowClusterCreate.C @@ -13,29 +13,30 @@ void slowClusterCreate() { cout << "Loaded shared libraries" << endl; } - // Input (and output) file name - Char_t *alifile = "galice.root"; + // Input and output file names + Char_t *infile = "galice.root"; + Char_t *outfile = "AliTRDclusters.root"; // Create the clusterizer AliTRDclusterizerV1 *Clusterizer = new AliTRDclusterizerV1("clusterizer","slow clusterizer class"); + // Define output file name + Clusterizer->Init(outfile); + // Open the AliRoot file - Clusterizer->Open(alifile); + Clusterizer->Open(infile); // Load the digits Clusterizer->ReadDigits(); - - // Clean output branch - Clusterizer->WriteClusters(-2); // Find the cluster Clusterizer->MakeClusters(); - // Write the cluster into the input file + // Write the cluster tree into file AliTRDclusters.root Clusterizer->WriteClusters(-1); // Save the clusterizer class in the AliROOT file - Clusterizer->Write(); + // Clusterizer->Write(); } -- 2.43.0