//
// Destructor
//
-
+
if(fgRieman) delete fgRieman; fgRieman = NULL;
if(fgTiltedRieman) delete fgTiltedRieman; fgTiltedRieman = NULL;
if(fgTiltedRiemanConstrained) delete fgTiltedRiemanConstrained; fgTiltedRiemanConstrained = NULL;
if(fTracksESD){ fTracksESD->Delete(); delete fTracksESD; }
if(fTracks) {fTracks->Delete(); delete fTracks;}
if(fTracklets) {fTracklets->Delete(); delete fTracklets;}
- if(fClusters) {
+ if(IsClustersOwner() && fClusters) {
+ AliInfo(Form("tracker[%p] removing %d own clusters @ %p", (void*)this, fClusters->GetEntries(), (void*)fClusters));
fClusters->Delete(); delete fClusters;
}
if(fGeom) delete fGeom;
if (!fgNTimeBins) fgNTimeBins = fkReconstructor->GetNTimeBins();
// Define scalers
- const Int_t nSeeders(2);
- Int_t nFound[nSeeders] = {0}, // number of tracks found
- nBacked = 0, // number of tracks backed up for refit
- nSeeds = 0, // total number of ESD seeds
- nTRDseeds = 0, // number of seeds in the TRD acceptance
- nSeeder[nSeeders]= {0}, // number of ITS/TPC potential seeds
- nGoodSeeds[nSeeders]= {0}; // number of ITS/TPC found seeds
+ Int_t nFound = 0, // number of tracks found
+ nBacked = 0, // number of tracks backed up for refit
+ nSeeds = 0, // total number of ESD seeds
+ nTRDseeds= 0, // number of seeds in the TRD acceptance
+ nTPCseeds= 0; // number of TPC seeds
Float_t foundMin = 20.0;
- const Char_t *seeder[] = {"ITS", "TPC"};
- Float_t *quality[nSeeders] = {0};
- Int_t *index[nSeeders] = {0},
- *idxESD[nSeeders] = {0}; // esd index of track
+
+ Float_t *quality = NULL;
+ Int_t *index = NULL;
fEventInFile = event->GetEventNumberInFile();
nSeeds = event->GetNumberOfTracks();
// Sort tracks according to quality
// (covariance in the yz plane)
if(nSeeds){
- // first check TPC seeds
- quality[1] = new Float_t[nSeeds]; memset(quality[1], 0, nSeeds*sizeof(Float_t));
- idxESD[1] = new Int_t[nSeeds];
- for (Int_t iSeed(nSeeds); iSeed--;) {
- AliESDtrack *seed = event->GetTrack(iSeed);
- if(!(seed->GetStatus()&AliESDtrack::kTPCout)) continue;
- Double_t covariance[15];
- seed->GetExternalCovariance(covariance);
- idxESD[1][nSeeder[1]] = iSeed;
- quality[1][nSeeder[1]] = covariance[0] + covariance[2];
- nSeeder[1]++;
- }
- index[1] = new Int_t[4*nSeeder[1]];
- TMath::Sort(nSeeder[1], quality[1], index[1], kFALSE);
- // second check rest of tracks for ITS seeds
- quality[0] = new Float_t[nSeeds]; memset(quality[0], 0, nSeeds*sizeof(Float_t));
- idxESD[0] = new Int_t[nSeeds];
- for (Int_t iSeed(nSeeds); iSeed--;) {
+ quality = new Float_t[nSeeds];
+ index = new Int_t[4*nSeeds];
+ for (Int_t iSeed = nSeeds; iSeed--;) {
AliESDtrack *seed = event->GetTrack(iSeed);
- if((seed->GetStatus()&AliESDtrack::kTPCout)) continue;
Double_t covariance[15];
seed->GetExternalCovariance(covariance);
- idxESD[0][nSeeder[0]] = iSeed;
- quality[0][nSeeder[0]] = covariance[0] + covariance[2];
- nSeeder[0]++;
+ quality[iSeed] = covariance[0] + covariance[2];
}
- index[0] = new Int_t[4*nSeeder[0]];
- TMath::Sort(nSeeder[0], quality[0], index[0], kFALSE);
+ TMath::Sort(nSeeds, quality, index,kFALSE);
}
-
+
// Propagate all seeds
Int_t expectedClr;
AliTRDtrackV1 track;
- for(Int_t iSeeder(nSeeders); iSeeder--;){
- for (Int_t iSeed = 0; iSeed < nSeeder[iSeeder]; iSeed++) {
- Int_t currentIndexESD = idxESD[iSeeder][index[iSeeder][iSeed]];
- // Get the seeds in sorted sequence
- AliESDtrack *seed = event->GetTrack(currentIndexESD);
- Float_t p4 = seed->GetC(seed->GetBz());
-
- // Check the seed status
- ULong_t status(seed->GetStatus()); Bool_t kTPC(kTRUE);
- if ((status & AliESDtrack::kTRDout) != 0) continue;
- if (status & AliESDtrack::kTPCout){
- AliDebug(2, Form("Found TPC seed @ idx[%4d] Sxy=%f[cm].", currentIndexESD, TMath::Sqrt(quality[iSeeder][index[iSeeder][iSeed]])));
- // set steering parameters for TPC
- //fkRecoParam->SetTrackParam(kTPC);
- } else {
- if (status & AliESDtrack::kITSout){
- // rotate
- Float_t globalToTracking = AliTRDgeometry::GetAlpha()*(Int_t(seed->GetAlpha()/AliTRDgeometry::GetAlpha()) + (seed->GetAlpha()>0. ? 0.5 : -0.5));
- AliDebug(2, Form("Found ITS seed @ idx[%4d] Sxy=%f[cm] alpha=%7.2f[deg] g2T=%7.2f[deg]", currentIndexESD, TMath::Sqrt(quality[iSeeder][index[iSeeder][iSeed]]), seed->GetAlpha()*TMath::RadToDeg(), globalToTracking*TMath::RadToDeg()));
- if(!seed->Rotate(globalToTracking)){
- AliDebug(1, Form("ITS seed @ idx[%4d] failed rotation of alpha=%7.2f[deg] g2T=%7.2f[deg].", currentIndexESD, seed->GetAlpha()*TMath::RadToDeg(), globalToTracking*TMath::RadToDeg()));
- continue;
- }
- kTPC=kFALSE;
- // set steering parameters for ITS
- //fkRecoParam->SetTrackParam(kITS);
- } else {
- AliDebug(1, Form("Bad seed[%4d] ITSin[%c] ITSout[%c] TPCin[%c] TPCout[%c].", currentIndexESD,
- (status&AliESDtrack::kITSin)?'y':'n', (status&AliESDtrack::kITSout)?'y':'n', (status&AliESDtrack::kTPCin)?'y':'n', (status&AliESDtrack::kTPCout)?'y':'n'));
- continue;
- }
- }
-
- // Propagate to the entrance in the TRD mother volume
- track.~AliTRDtrackV1();
- new(&track) AliTRDtrackV1(*seed);
- if(AliTRDgeometry::GetXtrdBeg() > (AliTRDReconstructor::GetMaxStep() + track.GetX()) && !PropagateToX(track, AliTRDgeometry::GetXtrdBeg(), AliTRDReconstructor::GetMaxStep())){
- //seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
- continue;
- }
- if(!AdjustSector(&track)){
- //seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
- continue;
- }
- if(TMath::Abs(track.GetSnp()) > AliTRDReconstructor::GetMaxSnp()) {
- //seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
- continue;
- }
- AliDebug(2, Form("Propagate %s seed[%4d] ESDidx[%4d].", seeder[iSeeder], iSeed, currentIndexESD));
- nGoodSeeds[iSeeder]++;
- // store track status at TRD entrance
- seed->UpdateTrackParams(&track, AliESDtrack::kTRDbackup);
-
- // prepare track and do propagation in the TRD
- track.SetReconstructor(fkReconstructor);
- track.SetKink(Bool_t(seed->GetKinkIndex(0)));
- track.SetPrimary(status & AliESDtrack::kTPCin);
- track.SetNonTPCseeded(!kTPC);
- expectedClr = FollowBackProlongation(track);
+ for (Int_t iSeed = 0; iSeed < nSeeds; iSeed++) {
+
+ // Get the seeds in sorted sequence
+ AliESDtrack *seed = event->GetTrack(index[iSeed]);
+ Float_t p4 = seed->GetC(seed->GetBz());
+
+ // Check the seed status
+ ULong_t status = seed->GetStatus();
+ if ((status & AliESDtrack::kTRDout) != 0) continue;
+ if ((status & AliESDtrack::kTPCout)){
+ AliDebug(3, Form("Prolongate seed[%2d] which is TPC.", iSeed));
+ // set steering parameters for TPC
+ //fkRecoParam->SetTrackParam(kTPC);
+/* } else {
+ if ((status & AliESDtrack::kITSout)){
+ AliDebug(3, Form("Prolongate seed[%2d] which is ITS.", iSeed));
+ // set steering parameters for ITS
+ //fkRecoParam->SetTrackParam(kITS);
+ // rotate
+ Float_t globalToTracking = AliTRDgeometry::GetAlpha()*(Int_t(seed->GetAlpha()/AliTRDgeometry::GetAlpha()) + (seed->GetAlpha()>0. ? 0.5 : -0.5));
+ if(!seed->Rotate(globalToTracking)) continue;
+ } else continue;*/
+ } else continue;
+
+ // Propagate to the entrance in the TRD mother volume
+ track.~AliTRDtrackV1();
+ new(&track) AliTRDtrackV1(*seed);
+ if(AliTRDgeometry::GetXtrdBeg() > (AliTRDReconstructor::GetMaxStep() + track.GetX()) && !PropagateToX(track, AliTRDgeometry::GetXtrdBeg(), AliTRDReconstructor::GetMaxStep())){
+ seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
+ continue;
+ }
+ if(!AdjustSector(&track)){
+ seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
+ continue;
+ }
+ if(TMath::Abs(track.GetSnp()) > AliTRDReconstructor::GetMaxSnp()) {
+ seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
+ continue;
+ }
+ nTPCseeds++;
+ AliDebug(2, Form("TRD propagate TPC seed[%d] = %d.", iSeed, index[iSeed]));
+ // store track status at TRD entrance
+ seed->UpdateTrackParams(&track, AliESDtrack::kTRDbackup);
+
+ // prepare track and do propagation in the TRD
+ track.SetReconstructor(fkReconstructor);
+ track.SetKink(Bool_t(seed->GetKinkIndex(0)));
+ track.SetPrimary(status & AliESDtrack::kTPCin);
+ expectedClr = FollowBackProlongation(track);
+ // check if track entered the TRD fiducial volume
+ if(track.GetTrackIn()){
+ seed->UpdateTrackParams(&track, AliESDtrack::kTRDin);
+ nTRDseeds++;
+ }
+ // check if track was stopped in the TRD
+ if (expectedClr<0){
+ seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
+ continue;
+ } else {
+ nFound++;
+ // compute PID
+ track.CookPID();
+ //compute MC label
+ track.CookLabel(1. - AliTRDReconstructor::GetLabelFraction());
+ // update calibration references using this track
+ if(calibra->GetHisto2d()) calibra->UpdateHistogramsV1(&track);
// save calibration object
- if (fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 0) {
+ if (fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 0 || AliTRDReconstructor::GetStreamLevel()>0 ) {
AliTRDtrackV1 *calibTrack = new AliTRDtrackV1(track);
calibTrack->SetOwner();
seed->AddCalibObject(calibTrack);
}
- // printf("track idx[%4d] nCl[%3d] TrkIn[%p]\n", index[iSeed], expectedClr, (void*)track.GetTrackIn());
-
- // check if track entered the TRD fiducial volume
- if(!track.GetTrackIn()){
- AliDebug(2, Form("TRD missed by %s seed[%4d] ESDidx[%4d].", seeder[iSeeder], iSeed, currentIndexESD));
- continue;
- }
- seed->UpdateTrackParams(&track, AliESDtrack::kTRDin);
- nTRDseeds++;
-
- // check if track was stopped in the TRD
- if(expectedClr==-999){
- AliDebug(1, Form("Track @ idx[%4d] failed prolongation due to track error [%d]", currentIndexESD, track.GetStatusTRD()));
- continue;
- } else if(expectedClr==0){
- AliDebug(1, Form("Track @ idx[%4d] failed prolongation due to layer error [%d %d %d %d %d %d]", currentIndexESD,
- track.GetStatusTRD(0), track.GetStatusTRD(1), track.GetStatusTRD(2), track.GetStatusTRD(3), track.GetStatusTRD(4), track.GetStatusTRD(5)));
- continue;
- } else {
- AliDebug(2, Form("Track @ idx[%4d] #cl[%3d] expect[%+3d]", currentIndexESD, track.GetNumberOfClusters(), expectedClr));
- nFound[kTPC]++;
- // compute PID
- track.CookPID();
- //compute MC label
- track.CookLabel(1. - AliTRDReconstructor::GetLabelFraction());
- // update calibration references using this track
- if(calibra->GetHisto2d()) calibra->UpdateHistogramsV1(&track);
- //update ESD track
- seed->UpdateTrackParams(&track, expectedClr>0?AliESDtrack::kTRDout:AliESDtrack::kTRDStop);
- seed->SetTRDBudget(track.GetBudget(0));
- track.UpdateESDtrack(seed);
- if(expectedClr<0) continue;
- }
-
- // Make backup for back propagation
- if ((TMath::Abs(track.GetC(track.GetBz()) - p4) / TMath::Abs(p4) < 0.2) || (track.Pt() > 0.8)) {
- Int_t foundClr = track.GetNumberOfClusters();
- if (foundClr >= foundMin) {
- //if(track.GetBackupTrack()) UseClusters(track.GetBackupTrack());
-
- // Sign only gold tracks
- if (track.GetChi2() / track.GetNumberOfClusters() < 4) {
- //if ((seed->GetKinkIndex(0) == 0) && (track.Pt() < 1.5)) UseClusters(&track);
- }
- Bool_t isGold = kFALSE;
+ //update ESD track
+ seed->UpdateTrackParams(&track, AliESDtrack::kTRDout);
+ track.UpdateESDtrack(seed);
+ }
- // Full gold track
- if (track.GetChi2() / track.GetNumberOfClusters() < 5) {
- if (track.GetBackupTrack()) seed->UpdateTrackParams(track.GetBackupTrack(),AliESDtrack::kTRDbackup);
- nBacked++;
- isGold = kTRUE;
- }
+ // Make backup for back propagation
+ if ((TMath::Abs(track.GetC(track.GetBz()) - p4) / TMath::Abs(p4) < 0.2) || (track.Pt() > 0.8)) {
+ Int_t foundClr = track.GetNumberOfClusters();
+ if (foundClr >= foundMin) {
+ //if(track.GetBackupTrack()) UseClusters(track.GetBackupTrack());
- // Almost gold track
- if ((!isGold) && (track.GetNCross() == 0) && (track.GetChi2() / track.GetNumberOfClusters() < 7)) {
- //seed->UpdateTrackParams(track, AliESDtrack::kTRDbackup);
- if (track.GetBackupTrack()) seed->UpdateTrackParams(track.GetBackupTrack(),AliESDtrack::kTRDbackup);
+ // Sign only gold tracks
+ if (track.GetChi2() / track.GetNumberOfClusters() < 4) {
+ //if ((seed->GetKinkIndex(0) == 0) && (track.Pt() < 1.5)) UseClusters(&track);
+ }
+ Bool_t isGold = kFALSE;
+
+ // Full gold track
+ if (track.GetChi2() / track.GetNumberOfClusters() < 5) {
+ if (track.GetBackupTrack()) seed->UpdateTrackParams(track.GetBackupTrack(),AliESDtrack::kTRDbackup);
+ nBacked++;
+ isGold = kTRUE;
+ }
+
+ // Almost gold track
+ if ((!isGold) && (track.GetNCross() == 0) && (track.GetChi2() / track.GetNumberOfClusters() < 7)) {
+ //seed->UpdateTrackParams(track, AliESDtrack::kTRDbackup);
+ if (track.GetBackupTrack()) seed->UpdateTrackParams(track.GetBackupTrack(),AliESDtrack::kTRDbackup);
+ nBacked++;
+ isGold = kTRUE;
+ }
+
+ if ((!isGold) && (track.GetBackupTrack())) {
+ if ((track.GetBackupTrack()->GetNumberOfClusters() > foundMin) && ((track.GetBackupTrack()->GetChi2()/(track.GetBackupTrack()->GetNumberOfClusters()+1)) < 7)) {
+ seed->UpdateTrackParams(track.GetBackupTrack(),AliESDtrack::kTRDbackup);
nBacked++;
isGold = kTRUE;
}
-
- if ((!isGold) && (track.GetBackupTrack())) {
- if ((track.GetBackupTrack()->GetNumberOfClusters() > foundMin) && ((track.GetBackupTrack()->GetChi2()/(track.GetBackupTrack()->GetNumberOfClusters()+1)) < 7)) {
- seed->UpdateTrackParams(track.GetBackupTrack(),AliESDtrack::kTRDbackup);
- nBacked++;
- isGold = kTRUE;
- }
- }
}
}
-
- // Propagation to the TOF
- if(!(seed->GetStatus()&AliESDtrack::kTRDStop)) {
- Int_t sm = track.GetSector();
- // default value in case we have problems with the geometry.
- Double_t xtof = 371.;
- //Calculate radial position of the beginning of the TOF
- //mother volume. In order to avoid mixing of the TRD
- //and TOF modules some hard values are needed. This are:
- //1. The path to the TOF module.
- //2. The width of the TOF (29.05 cm)
- //(with the help of Annalisa de Caro Mar-17-2009)
- if(gGeoManager){
- gGeoManager->cd(Form("/ALIC_1/B077_1/BSEGMO%d_1/BTOF%d_1", sm, sm));
- TGeoHMatrix *m = NULL;
- Double_t loc[]={0., 0., -.5*29.05}, glob[3];
-
- if((m=gGeoManager->GetCurrentMatrix())){
- m->LocalToMaster(loc, glob);
- xtof = TMath::Sqrt(glob[0]*glob[0]+glob[1]*glob[1]);
- }
- }
- if(xtof > (AliTRDReconstructor::GetMaxStep() + track.GetX()) && !PropagateToX(track, xtof, AliTRDReconstructor::GetMaxStep())){
- seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
- continue;
- }
- if(!AdjustSector(&track)){
- seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
- continue;
- }
- if(TMath::Abs(track.GetSnp()) > AliTRDReconstructor::GetMaxSnp()){
- seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
- continue;
+ }
+
+ // Propagation to the TOF
+ if(!(seed->GetStatus()&AliESDtrack::kTRDStop)) {
+ Int_t sm = track.GetSector();
+ // default value in case we have problems with the geometry.
+ Double_t xtof = 371.;
+ //Calculate radial position of the beginning of the TOF
+ //mother volume. In order to avoid mixing of the TRD
+ //and TOF modules some hard values are needed. This are:
+ //1. The path to the TOF module.
+ //2. The width of the TOF (29.05 cm)
+ //(with the help of Annalisa de Caro Mar-17-2009)
+ if(gGeoManager){
+ gGeoManager->cd(Form("/ALIC_1/B077_1/BSEGMO%d_1/BTOF%d_1", sm, sm));
+ TGeoHMatrix *m = NULL;
+ Double_t loc[]={0., 0., -.5*29.05}, glob[3];
+
+ if((m=gGeoManager->GetCurrentMatrix())){
+ m->LocalToMaster(loc, glob);
+ xtof = TMath::Sqrt(glob[0]*glob[0]+glob[1]*glob[1]);
}
- //seed->UpdateTrackParams(&track, AliESDtrack::kTRDout);
- // TODO obsolete - delete
- seed->SetTRDQuality(track.StatusForTOF());
}
+ if(xtof > (AliTRDReconstructor::GetMaxStep() + track.GetX()) && !PropagateToX(track, xtof, AliTRDReconstructor::GetMaxStep())){
+ seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
+ continue;
+ }
+ if(!AdjustSector(&track)){
+ seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
+ continue;
+ }
+ if(TMath::Abs(track.GetSnp()) > AliTRDReconstructor::GetMaxSnp()){
+ seed->UpdateTrackParams(&track, AliESDtrack::kTRDStop);
+ continue;
+ }
+ //seed->UpdateTrackParams(&track, AliESDtrack::kTRDout);
+ // TODO obsolete - delete
+ seed->SetTRDQuality(track.StatusForTOF());
}
- if(index[iSeeder]) delete [] index[iSeeder];
- if(idxESD[iSeeder]) delete [] idxESD[iSeeder];
- if(quality[iSeeder]) delete [] quality[iSeeder];
+ seed->SetTRDBudget(track.GetBudget(0));
}
+ if(index) delete [] index;
+ if(quality) delete [] quality;
- AliInfo(Form("Number of seeds: ITSout[%4d] TPCout[%4d] TRDin[%4d]", nGoodSeeds[0], nGoodSeeds[1], nTRDseeds));
- AliInfo(Form("Number of tracks: TRDout[%4d = %4d + %4d] TRDbackup[%4d]", nFound[0]+nFound[1], nFound[0], nFound[1], nBacked));
+ AliInfo(Form("Number of seeds: TPCout[%d] TRDin[%d]", nTPCseeds, nTRDseeds));
+ AliInfo(Form("Number of tracks: TRDout[%d] TRDbackup[%d]", nFound, nBacked));
// run stand alone tracking
if (fkReconstructor->IsSeeding()) Clusters2Tracks(event);
for (Int_t itrack = 0; itrack < event->GetNumberOfTracks(); itrack++) {
AliESDtrack *seed = event->GetTrack(itrack);
ULong_t status = seed->GetStatus();
- // reject tracks which did not entered TRD from bellow (also produced by the TRD stand alone tracker)
- if(!(status & AliESDtrack::kTRDin)) continue;
- // reject TRD tracks with no clusters. This condition is softer than previously used
- // !(status & AliESDtrack::kTRDout)
- // since it allows also tracks stopped
- if(!seed->GetTRDncls()) continue;
- // check back-up quality
+
new(&track) AliTRDtrackV1(*seed);
if (track.GetX() < 270.0) {
seed->UpdateTrackParams(&track, AliESDtrack::kTRDbackup);
continue;
}
- nseed++;
+
+ // reject tracks which failed propagation in the TRD or
+ // are produced by the TRD stand alone tracker
+ if(!(status & AliESDtrack::kTRDout)) continue;
+ if(!(status & AliESDtrack::kTRDin)) continue;
+ nseed++;
track.ResetCovariance(50.0);
// do the propagation and processing
Bool_t kUPDATE = kFALSE;
- Double_t xToGo = 250.;//(status & AliESDtrack::kTPCout)?250.0:.1;
+ Double_t xTPC = 250.0;
if(FollowProlongation(track)){
// Update the friend track
- if (fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 0){
+ if (fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 0 || AliTRDReconstructor::GetStreamLevel()>0 ){
TObject *o = NULL; Int_t ic = 0;
AliTRDtrackV1 *calibTrack = NULL;
while((o = seed->GetCalibObject(ic++))){
}
// Prolongate to TPC
- if (PropagateToX(track, xToGo, AliTRDReconstructor::GetMaxStep())) { // -with update
+ if (PropagateToX(track, xTPC, AliTRDReconstructor::GetMaxStep())) { // -with update
seed->UpdateTrackParams(&track, AliESDtrack::kTRDrefit);
found++;
kUPDATE = kTRUE;
// Prolongate to TPC without update
if(!kUPDATE) {
AliTRDtrackV1 tt(*seed);
- if (PropagateToX(tt, xToGo, AliTRDReconstructor::GetMaxStep())) seed->UpdateTrackParams(&tt, AliESDtrack::kTRDbackup);
+ if (PropagateToX(tt, xTPC, AliTRDReconstructor::GetMaxStep())) seed->UpdateTrackParams(&tt, AliESDtrack::kTRDbackup);
}
}
AliInfo(Form("Number of seeds: TRDout[%d]", nseed));
}
Double_t x = tracklet->GetX();//GetX0();
// reject tracklets which are not considered for inward refit
- if(x > t.GetX()+AliTRDReconstructor::GetMaxStep()){
- AliDebug(2, Form("Reject x[%7.3f] > track[%7.3f]", x, t.GetX()+AliTRDReconstructor::GetMaxStep()));
- continue;
- }
+ if(x > t.GetX()+AliTRDReconstructor::GetMaxStep()) continue;
+
// append tracklet to track
t.SetTracklet(tracklet, index);
Double_t cov[3]; tracklet->GetCovAt(x, cov);
Double_t p[2] = { tracklet->GetY(), tracklet->GetZ()};
Double_t chi2 = ((AliExternalTrackParam)t).GetPredictedChi2(p, cov);
- if (chi2 < 1e+10 && ((AliExternalTrackParam&)t).Update(p, cov)){
+
+ if(fkReconstructor->IsDebugStreaming()){
+ Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
+ TTreeSRedirector &cstreamer = *fkReconstructor->GetDebugStream(AliTRDrecoParam::kTracker);
+ AliExternalTrackParam param0(t);
+ AliExternalTrackParam param1(t);
+ param1.Update(p, cov);
+ TVectorD vcov(3,cov);
+ TVectorD vpar(3,p);
+ cstreamer << "FollowProlongationInfo"
+ << "EventNumber=" << eventNumber
+ << "iplane="<<iplane
+ << "vcov.="<<&vcov
+ << "vpar.="<<&vpar
+ << "tracklet.=" << tracklet
+ << "chi2="<< chi2
+ << "param0.=" << ¶m0
+ << "param1.=" << ¶m1
+ << "\n";
+ }
+ /*
+ AliInfo(Form("Pl:%d X:%+e : %+e P: %+e %+e Cov:%+e %+e %+e -> dXY: %+e %+e | chi2:%.2f pT:%.2f alp:%.3f",
+ iplane,x,t.GetX(),p[0],p[1],cov[0],cov[1],cov[2],
+ p[0]-t.GetY(),p[1]-t.GetZ(),
+ chi2,t.Pt()*t.Charge(),t.GetAlpha()));
+ */
+ if (chi2 < fkRecoParam->GetChi2Cut() && ((AliExternalTrackParam&)t).Update(p, cov)){ // MI parameterizad chi2 cut 03.05.2014
+ // if (chi2 < 1e+10 && ((AliExternalTrackParam&)t).Update(p, cov)){
// Register info to track
t.SetNumberOfClusters();
t.UpdateChi2(chi2);
}
}
- if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 1){
+ if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 1 || AliTRDReconstructor::GetStreamLevel()>1){
Int_t index;
for(int iplane=0; iplane<AliTRDgeometry::kNlayer; iplane++){
AliTRDseedV1 *tracklet = GetTracklet(&t, iplane, index);
AliTRDtrackingChamber *chamber = NULL;
Int_t debugLevel = fkReconstructor->IsDebugStreaming() ? fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) : 0;
+ if ( AliTRDReconstructor::GetStreamLevel()>0) debugLevel= AliTRDReconstructor::GetStreamLevel();
TTreeSRedirector *cstreamer = fkReconstructor->IsDebugStreaming() ? fkReconstructor->GetDebugStream(AliTRDrecoParam::kTracker) : 0x0;
Bool_t kStoreIn(kTRUE), // toggel store track params. at TRD entry
// rough estimate of the entry point
if (!t.GetProlongation(fR[ily], y, z)){
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kProlongation);
AliDebug(4, Form("Failed Rough Prolongation to ly[%d] x[%7.2f] y[%7.2f] z[%7.2f]", ily, fR[ily], y, z));
break;
AliDebug(4, Form("Missing Geometry ly[%d]. Guess radial position", ily));
// propagate to the default radial position
if(fR[ily] > (AliTRDReconstructor::GetMaxStep() + t.GetX()) && !PropagateToX(t, fR[ily], AliTRDReconstructor::GetMaxStep())){
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kPropagation);
AliDebug(4, "Failed Propagation [Missing Geometry]");
break;
}
if(!AdjustSector(&t)){
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kAdjustSector);
AliDebug(4, "Failed Adjust Sector [Missing Geometry]");
break;
}
if(TMath::Abs(t.GetSnp()) > AliTRDReconstructor::GetMaxSnp()){
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kSnp);
AliDebug(4, "Failed Max Snp [Missing Geometry]");
break;
Double_t loc[] = {AliTRDgeometry::AnodePos()- driftLength, 0., 0.};
Double_t glb[] = {0., 0., 0.};
matrix->LocalToMaster(loc, glb);
- AliDebug(3, Form("Propagate to D%3d[%02d_%d_%d] x_anode[%7.2f] (%f %f)", det, sm, stk, ily, glb[0]+driftLength, glb[1], glb[2]));
+ AliDebug(3, Form("Propagate to det[%3d] x_anode[%7.2f] (%f %f)", det, glb[0]+driftLength, glb[1], glb[2]));
// Propagate to the radial distance of the current layer
x = glb[0] - AliTRDReconstructor::GetMaxStep();
if(x > (AliTRDReconstructor::GetMaxStep() + t.GetX()) && !PropagateToX(t, x, AliTRDReconstructor::GetMaxStep())){
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kPropagation);
- AliDebug(4, Form("Failed Propagation to x[%7.2f]", x));
+ AliDebug(4, Form("Failed Initial Propagation to x[%7.2f]", x));
break;
}
if(!AdjustSector(&t)){
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kAdjustSector);
AliDebug(4, "Failed Adjust Sector Start");
break;
}
if(TMath::Abs(t.GetSnp()) > AliTRDReconstructor::GetMaxSnp()) {
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kSnp);
AliDebug(4, Form("Failed Max Snp[%f] MaxSnp[%f]", t.GetSnp(), AliTRDReconstructor::GetMaxSnp()));
break;
}
Bool_t doRecalculate = kFALSE;
if(sm != t.GetSector()){
- AliDebug(3, Form("Track crossed sectors %2d -> %2d", sm, t.GetSector()));
sm = t.GetSector();
doRecalculate = kTRUE;
}
if(stk != fGeom->GetStack(z, ily)){
- AliDebug(3, Form("Track crossed stacks %d -> %d in sec[%02d]", stk, fGeom->GetStack(z, ily), sm));
stk = fGeom->GetStack(z, ily);
doRecalculate = kTRUE;
}
// check if track is well inside fiducial volume
if (!t.GetProlongation(x+AliTRDReconstructor::GetMaxStep(), y, z)) {
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kProlongation);
AliDebug(4, Form("Failed Prolongation to x[%7.2f] y[%7.2f] z[%7.2f]", x+AliTRDReconstructor::GetMaxStep(), y, z));
break;
AliDebug(4, "Failed Track on Boundary");
continue;
}
- // mark track as entering the FIDUCIAL volume of TRD
- if(kStoreIn){
- t.SetTrackIn();
- kStoreIn = kFALSE;
- }
+ Float_t prod(t.GetBz()*t.Charge());
ptrTracklet = tracklets[ily];
if(!ptrTracklet){ // BUILD TRACKLET
AliDebug(3, Form("Building tracklet det[%d]", det));
// check data in supermodule
if(!fTrSec[sm].GetNChambers()){
t.SetErrStat(AliTRDtrackV1::kNoClusters, ily);
- AliDebug(4, Form("Failed NoClusters in sec[%02d]", sm));
+ AliDebug(4, "Failed NoClusters");
continue;
}
if(fTrSec[sm].GetX(ily) < 1.){
t.SetErrStat(AliTRDtrackV1::kNoClusters, ily);
- AliDebug(4, Form("Failed NoX in sec[%02d]", sm));
+ AliDebug(4, "Failed NoX");
continue;
}
// check data in chamber
if(!(chamber = fTrSec[sm].GetChamber(stk, ily))){
t.SetErrStat(AliTRDtrackV1::kNoClusters, ily);
- AliDebug(4, Form("Failed No Data for D%03d[%02d_%d_%d]", AliTRDgeometry::GetDetector(ily, stk, sm), sm, stk, ily));
+ AliDebug(4, "Failed No Detector");
continue;
}
if(chamber->GetNClusters() < fgNTimeBins*fkRecoParam ->GetFindableClusters()){
t.SetErrStat(AliTRDtrackV1::kNoClusters, ily);
- AliDebug(4, Form("Failed Not Enough Clusters[%2d] for D%03d[%02d_%d_%d]", chamber->GetNClusters(), AliTRDgeometry::GetDetector(ily, stk, sm), sm, stk, ily));
+ AliDebug(4, "Failed Not Enough Clusters in Detector");
continue;
}
// build tracklet
ptrTracklet->SetKink(t.IsKink());
ptrTracklet->SetPrimary(t.IsPrimary());
ptrTracklet->SetPadPlane(fGeom->GetPadPlane(ily, stk));
+ //set first approximation of radial position of anode wire corresponding to middle chamber y=0, z=0
+ // the uncertainty is given by the actual position of the tracklet (y,z) and chamber inclination
ptrTracklet->SetX0(glb[0]+driftLength);
if(!ptrTracklet->Init(&t)){
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kTrackletInit);
AliDebug(4, "Failed Tracklet Init");
break;
// Select attachment base on track to B field sign not only track charge which is buggy
// mark kFALSE same sign tracks and kTRUE opposite sign tracks
// A.Bercuci 3.11.2011
- Float_t prod(t.GetBz()*t.Charge());
if(!ptrTracklet->AttachClusters(chamber, kTRUE, prod<0.?kTRUE:kFALSE, fEventInFile)){
t.SetErrStat(AliTRDtrackV1::kNoAttach, ily);
if(debugLevel>3){
AliDebug(4, "Failed Attach Clusters");
continue;
}
- Int_t nClTracklet(ptrTracklet->GetN());
- AliDebug(3, Form("Number of Clusters in Tracklet: %2d", nClTracklet));
- if(nClTracklet < Int_t(fgNTimeBins*fkRecoParam->GetFindableClusters())){
+ AliDebug(3, Form("Number of Clusters in Tracklet: %d", ptrTracklet->GetN()));
+ if(ptrTracklet->GetN() < fgNTimeBins*fkRecoParam->GetFindableClusters()){
t.SetErrStat(AliTRDtrackV1::kNoClustersTracklet, ily);
if(debugLevel>3){
AliTRDseedV1 trackletCp(*ptrTracklet);
<<"tracklet.=" << &trackletCp
<< "\n";
}
- AliDebug(4, Form("Attached clusters %2d<%2d (%4.1f%% of TB[%2d])", nClTracklet, Int_t(fgNTimeBins*fkRecoParam->GetFindableClusters()), 1.e2*fkRecoParam->GetFindableClusters(), fgNTimeBins));
+ AliDebug(4, "Failed N Clusters Attached");
continue;
}
ptrTracklet->UpdateUsed();
- // protect against reattaching clusters
- if(Float_t(ptrTracklet->GetNUsed())/nClTracklet > .5/*fkRecoParam->GetUsedClustersLimit()*/){
- t.SetErrStat(AliTRDtrackV1::kNoClustersTracklet, ily);
- AliDebug(4, Form("Used clusters %2d[%4.1f%%] exceed limit [%4.1f%%]", nClTracklet, Float_t(ptrTracklet->GetNUsed())/nClTracklet, 1.e2*.5/*fkRecoParam->GetUsedClustersLimit()*/));
- continue;
- }
} else AliDebug(2, Form("Use external tracklet ly[%d]", ily));
// propagate track to the radial position of the tracklet
- // fit tracklet
+ // fit tracklet in the local chamber coordinate system
// tilt correction options
// 0 : no correction
// 2 : pseudo tilt correction
- if(!ptrTracklet->FitRobust(t.Charge()>0?kTRUE:kFALSE)){
+ if(!ptrTracklet->FitRobust(fGeom->GetPadPlane(ily, stk), matrix, t.GetBz(), t.Charge())){
t.SetErrStat(AliTRDtrackV1::kNoFit, ily);
AliDebug(4, "Failed Tracklet Fit");
continue;
}
+ // Calculate tracklet position in tracking coordinates
+ // A.Bercuci 27.11.2013
+ ptrTracklet->SetXYZ(matrix);
+
x = ptrTracklet->GetX(); //GetX0();
if(x > (AliTRDReconstructor::GetMaxStep() + t.GetX()) && !PropagateToX(t, x, AliTRDReconstructor::GetMaxStep())) {
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kPropagation);
AliDebug(4, Form("Failed Propagation to Tracklet x[%7.2f]", x));
break;
}
if(!AdjustSector(&t)) {
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kAdjustSector);
AliDebug(4, "Failed Adjust Sector");
break;
}
if(TMath::Abs(t.GetSnp()) > AliTRDReconstructor::GetMaxSnp()) {
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kSnp);
AliDebug(4, Form("Failed Max Snp[%f] MaxSnp[%f]", t.GetSnp(), AliTRDReconstructor::GetMaxSnp()));
break;
}
- // update parameters of track in.
- if(!ily) t.SetTrackIn();
Double_t cov[3]; ptrTracklet->GetCovAt(x, cov);
Double_t p[2] = { ptrTracklet->GetY(), ptrTracklet->GetZ()};
Double_t chi2 = ((AliExternalTrackParam)t).GetPredictedChi2(p, cov);
- // update Kalman with the TRD measurement
- if(chi2>1e+10){ // TODO
+ /*
+ AliInfo(Form("Pl:%d X:%+e : %+e P: %+e %+e Cov:%+e %+e %+e -> dXY: %+e %+e | chi2:%.2f pT:%.2f alp:%.3f",
+ ily,x,t.GetX(),p[0],p[1],cov[0],cov[1],cov[2],
+ p[0]-t.GetY(),p[1]-t.GetZ(),
+ chi2,t.Pt()*t.Charge(),t.GetAlpha()));
+ */
+
+ if(fkReconstructor->IsDebugStreaming()){
+ Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
+ // TTreeSRedirector &cstreamer = *fkReconstructor->GetDebugStream(AliTRDrecoParam::kTracker);
+ AliExternalTrackParam param0(t);
+ AliExternalTrackParam param1(t);
+ param1.Update(p, cov);
+ TVectorD vcov(3,cov);
+ TVectorD vpar(3,p);
+ (*cstreamer) << "FollowBackProlongationInfo"
+ << "EventNumber=" << eventNumber
+ << "chi2="<<chi2
+ << "iplane="<<ily
+ << "vcov.="<<&vcov
+ << "vpar.="<<&vpar
+ << "tracklet.=" << ptrTracklet
+ << "param0.=" << ¶m0
+ << "param1.=" << ¶m1
+ << "\n";
+ }
+
+ // update Kalman with the TRD measurement
+ if (chi2> fkRecoParam->GetChi2Cut()){ // MI parameterizad chi2 cut 03.05.2014
t.SetErrStat(AliTRDtrackV1::kChi2, ily);
if(debugLevel > 2){
UChar_t status(t.GetStatusTRD());
AliDebug(4, Form("Failed Chi2[%f]", chi2));
continue;
}
+ // mark track as entering the FIDUCIAL volume of TRD
+ if(kStoreIn){
+ t.SetTrackIn();
+ kStoreIn = kFALSE;
+ }
if(kUseTRD){
if(!((AliExternalTrackParam&)t).Update(p, cov)) {
- n= n?-n:-999;
+ n=-1;
t.SetErrStat(AliTRDtrackV1::kUpdate);
if(debugLevel > 2){
UChar_t status(t.GetStatusTRD());
covarPolZ.Invert();
// Update the tracklets
- Double_t x1, dy, dz;
+ Double_t dy, dz;
Double_t cov[15];
memset(cov, 0, sizeof(Double_t) * 15);
for(Int_t iLayer = 0; iLayer < AliTRDtrackerV1::kNPlanes; iLayer++) {
x = tracklets[iLayer].GetX0();
- x1 = x - xref;
+// x1 = x - xref;
y = 0;
z = 0;
dy = 0;
{
//
// Starting from current X-position of track <t> this function
- // extrapolates the track up to radial position <xToGo>.
+ // extrapolates the track up to radial position <xToGo> in steps of <maxStep>.
// Returns 1 if track reaches the plane, and 0 otherwise
//
/* // Correct for mean material budget
Double_t dEdx(0.),
- bg(t.GetP()/mass);
+ bg(TMath::Abs(t.GetP()/mass));
if(AliLog::GetDebugLevel("TRD", "AliTRDtrackerV1")>=3){
const char *pn[] = {"rho", "x/X0", "<A>", "<Z>", "L", "<Z/A>", "Nb"};
printf("D-AliTRDtrackerV1::PropagateTo(): x[%6.2f] bg[%6.2f]\n", xpos, bg);
return kFALSE;
}
branch->SetAddress(&clusterArray);
-
+
if(!fClusters){
Float_t nclusters = fkRecoParam->GetNClusters();
if(fkReconstructor->IsHLT()) nclusters /= AliTRDgeometry::kNsector;
fClusters = new TClonesArray("AliTRDcluster", Int_t(nclusters));
fClusters->SetOwner(kTRUE);
+ SetClustersOwner();
+ AliInfo(Form("Tracker owning clusters @ %p", (void*)fClusters));
}
// Loop through all entries in the tree
fkRecoParam = fkReconstructor->GetRecoParam(); // load reco param for this event
- if(!fkReconstructor->IsWritingClusters()){
- fClusters = AliTRDReconstructor::GetClusters();
+// if(!fkReconstructor->IsWritingClusters()) AliInfo(Form("IsWritingClusters[%c]", fkReconstructor->IsWritingClusters()?'y':'n'));
+ if(!(fClusters = AliTRDReconstructor::GetClusters())){
+ AliWarning("Clusters unavailable from TRD reconstructor. Trying reading from tree ...");
} else {
if(!ReadClusters(cTree)) {
- AliError("Problem with reading the clusters !");
+ AliError("Reading clusters from tree failed.");
return 1;
}
}
- SetClustersOwner();
if(!fClusters || !fClusters->GetEntriesFast()){
AliInfo("No TRD clusters");
return 1;
- }
+ } else AliInfo(Form("Using :: clusters[%d] onl.tracklets[%d] onl.tracks[%d]",
+ fClusters?fClusters->GetEntriesFast():0,
+ AliTRDReconstructor::GetTracklets()?AliTRDReconstructor::GetTracklets()->GetEntriesFast():0,
+ AliTRDReconstructor::GetTracks()?AliTRDReconstructor::GetTracks()->GetEntriesFast():0));
- //Int_t nin =
BuildTrackingContainers();
- //Int_t ncl = fClusters->GetEntriesFast();
- //AliInfo(Form("Clusters %d [%6.2f %% in the active volume]", ncl, 100.*float(nin)/ncl));
-
return 0;
}
if(!clusters || !clusters->GetEntriesFast()){
AliInfo("No TRD clusters");
return 1;
- }
+ } else AliInfo(Form("Using :: external.clusters[%d]", clusters->GetEntriesFast()));
+
fClusters = clusters;
- SetClustersOwner();
fkRecoParam = fkReconstructor->GetRecoParam(); // load reco param for this event
BuildTrackingContainers();
- //Int_t ncl = fClusters->GetEntriesFast();
- //AliInfo(Form("Clusters %d [%6.2f %% in the active volume]", ncl, 100.*float(nin)/ncl));
-
return 0;
}
fTracklets->Delete();
if(HasRemoveContainers()){delete fTracklets; fTracklets = NULL;}
}
- if(fClusters){
- if(IsClustersOwner()) fClusters->Delete();
-
- // save clusters array in the reconstructor for further use.
- if(!fkReconstructor->IsWritingClusters()){
- AliTRDReconstructor::SetClusters(fClusters);
- SetClustersOwner(kFALSE);
- } else AliTRDReconstructor::SetClusters(NULL);
+ if(fClusters && IsClustersOwner()){
+ AliInfo(Form("tracker[%p] clearing %d own clusters @ %p", (void*)this, fClusters->GetEntries(), (void*)fClusters));
+ fClusters->Delete();
+//
+// // save clusters array in the reconstructor for further use.
+// if(!fkReconstructor->IsWritingClusters()){
+// AliTRDReconstructor::SetClusters(fClusters);
+// SetClustersOwner(kFALSE);
+// } else AliTRDReconstructor::SetClusters(NULL);
}
for (int i = 0; i < AliTRDgeometry::kNsector; i++) fTrSec[i].Clear();
Int_t id = esd->AddTrack(esdTrack);
// set ESD id to stand alone TRD tracks
- if (fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 0){
+ if (fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 0 || AliTRDReconstructor::GetStreamLevel()>0 ){
esdTrack=esd->GetTrack(id);
TObject *o(NULL); Int_t ic(0);
AliTRDtrackV1 *calibTrack(NULL);
// Build initial seeding configurations
Double_t quality = BuildSeedingConfigs(stack, configs);
- if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 10){
+ if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 10 || AliTRDReconstructor::GetStreamLevel()>10){
AliInfo(Form("Plane config %d %d %d Quality %f"
, configs[0], configs[1], configs[2], quality));
}
esdTrack->SetLabel(track->GetLabel());
track->UpdateESDtrack(esdTrack);
// write ESD-friends if neccessary
- if (fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 0){
+ if (fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 0 || AliTRDReconstructor::GetStreamLevel()>0 ){
AliTRDtrackV1 *calibTrack = new AliTRDtrackV1(*track);
calibTrack->SetOwner();
esdTrack->AddCalibObject(calibTrack);
chamber->Build(fGeom);//Indices(fSieveSeeding);
}
- if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 10){
+ if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 10 || AliTRDReconstructor::GetStreamLevel()>10){
AliInfo(Form("Sieve level %d Plane config %d %d %d Quality %f", fSieveSeeding, configs[0], configs[1], configs[2], quality));
}
} while(fSieveSeeding<10); // end stack clusters sieve
Double_t chi2[4];
// this should be data member of AliTRDtrack TODO
- Double_t seedQuality[kMaxTracksStack];
+// Double_t seedQuality[kMaxTracksStack];
// unpack control parameters
Int_t config = ipar[0];
}
Bool_t isFake = kFALSE;
- if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 2 && fkReconstructor->IsDebugStreaming()){
+ if((fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 2 && fkReconstructor->IsDebugStreaming())
+ ||AliTRDReconstructor::GetStreamLevel()>=2 ){
if (c[0]->GetLabel(0) != c[3]->GetLabel(0)) isFake = kTRUE;
if (c[1]->GetLabel(0) != c[3]->GetLabel(0)) isFake = kTRUE;
if (c[2]->GetLabel(0) != c[3]->GetLabel(0)) isFake = kTRUE;
}
//AliInfo(Form("Passed likelihood %f[%e].", TMath::Log(1.E-9 + like), like));
- // book preliminary results
- seedQuality[ntracks] = like;
+ // book preliminry results
+ //seedQuality[ntracks] = like;
fSeedLayer[ntracks] = config;/*sLayer;*/
// attach clusters to the extrapolation seeds
// AliInfo("Extrapolation done.");
// Debug Stream containing all the 6 tracklets
- if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 2 && fkReconstructor->IsDebugStreaming()){
+ if((fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 2 && fkReconstructor->IsDebugStreaming())
+ ||AliTRDReconstructor::GetStreamLevel()>=2){
TTreeSRedirector &cstreamer = *fkReconstructor->GetDebugStream(AliTRDrecoParam::kTracker);
TLinearFitter *tiltedRieman = GetTiltedRiemanFitter();
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
// calculate track quality
fTrackQuality[ntracks] = CalculateTrackLikelihood(&chi2Vals[0]);
- if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 2 && fkReconstructor->IsDebugStreaming()){
+ if((fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 2 && fkReconstructor->IsDebugStreaming())
+ ||AliTRDReconstructor::GetStreamLevel()>=2){
TTreeSRedirector &cstreamer = *fkReconstructor->GetDebugStream(AliTRDrecoParam::kTracker);
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
Int_t candidateNumber = AliTRDtrackerDebug::GetCandidateNumber();
track.ResetCovariance(1);
Int_t nc = TMath::Abs(FollowBackProlongation(track));
- if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 5 && fkReconstructor->IsDebugStreaming()){
+ if((fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) > 5 && fkReconstructor->IsDebugStreaming())
+ ||AliTRDReconstructor::GetStreamLevel()>5){
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
Int_t candidateNumber = AliTRDtrackerDebug::GetCandidateNumber();
Double_t p[5]; // Track Params for the Debug Stream
AliDebug(2, Form("Iter[%d] Q[%f] chi2[%f]", iter, quality, chi2));
- if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 7 && fkReconstructor->IsDebugStreaming()){
+ if((fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 7 && fkReconstructor->IsDebugStreaming())
+ ||AliTRDReconstructor::GetStreamLevel()>=7){
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
Int_t candidateNumber = AliTRDtrackerDebug::GetCandidateNumber();
TLinearFitter *tiltedRieman = GetTiltedRiemanFitter();
, chi2[3], likeChi2Phi
));
- if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 2 && fkReconstructor->IsDebugStreaming()){
+ if((fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 2 && fkReconstructor->IsDebugStreaming())
+ ||AliTRDReconstructor::GetStreamLevel()>=2){
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
Int_t candidateNumber = AliTRDtrackerDebug::GetCandidateNumber();
TTreeSRedirector &cstreamer = *fkReconstructor->GetDebugStream(AliTRDrecoParam::kTracker);
Double_t likeN = TMath::Exp(-(fkRecoParam->GetNMeanClusters() - nclusters) / fkRecoParam->GetNSigmaClusters());
Double_t like = likea * likechi2y * likechi2z * likeN;
- if(fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 2 && fkReconstructor->IsDebugStreaming()){
+ if((fkRecoParam->GetStreamLevel(AliTRDrecoParam::kTracker) >= 2 && fkReconstructor->IsDebugStreaming())
+ ||AliTRDReconstructor::GetStreamLevel()>=2){
Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
Int_t candidateNumber = AliTRDtrackerDebug::GetCandidateNumber();
Int_t nTracklets = 0; Float_t meanNcls = 0;