//
// 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;
// Check the seed status
ULong_t status = seed->GetStatus();
- if ((status & AliESDtrack::kTPCout) == 0) continue;
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();
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;
/* // 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();
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];
}
//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