ClassImp(AliTRDtrackerV1::AliTRDLeastSquare)
ClassImp(AliTRDtrackerV1::AliTRDtrackFitterRieman)
+AliTRDtrackerV1::ETRDtrackerV1BetheBloch AliTRDtrackerV1::fgBB = AliTRDtrackerV1::kGeant;
Double_t AliTRDtrackerV1::fgTopologicQA[kNConfigs] = {
0.5112, 0.5112, 0.5112, 0.0786, 0.0786,
0.0786, 0.0786, 0.0579, 0.0579, 0.0474,
,fTracks(NULL)
,fTracksESD(NULL)
,fSieveSeeding(0)
+ ,fEventInFile(-1)
{
//
// Default constructor.
Float_t *quality = NULL;
Int_t *index = NULL;
+ fEventInFile = event->GetEventNumberInFile();
nSeeds = event->GetNumberOfTracks();
// Sort tracks according to quality
// (covariance in the yz plane)
// Loop through the TRD layers
TGeoHMatrix *matrix = NULL;
- Double_t x, y, z;
+ Double_t x(0.), y(0.), z(0.);
for (Int_t ily=startLayer, sm=-1, stk=-1, det=-1; ily < AliTRDgeometry::kNlayer; ily++) {
AliDebug(2, Form("Propagate to x[%d] = %7.2f", ily, fR[ily]));
stk = fGeom->GetStack(z, ily);
det = stk>=0 ? AliTRDgeometry::GetDetector(ily, stk, sm) : -1;
matrix = det>=0 ? fGeom->GetClusterMatrix(det) : NULL;
- AliDebug(3, Form("Propagate to det[%3d]", det));
// check if supermodule/chamber is installed
if( !fGeom->GetSMstatus(sm) ||
Double_t loc[] = {AliTRDgeometry::AnodePos()- driftLength, 0., 0.};
Double_t glb[] = {0., 0., 0.};
matrix->LocalToMaster(loc, glb);
+ 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();
AliDebug(4, "Failed Track on Boundary");
continue;
}
- // mark track as entering the FIDUCIAL volume of TRD
- if(kStoreIn){
- t.SetTrackIn();
- kStoreIn = kFALSE;
- }
ptrTracklet = tracklets[ily];
if(!ptrTracklet){ // BUILD TRACKLET
AliDebug(4, "Failed Tracklet Init");
break;
}
- if(!ptrTracklet->AttachClusters(chamber, kTRUE)){
+ if(!ptrTracklet->AttachClusters(chamber, kTRUE, t.Charge()>0?kTRUE:kFALSE, fEventInFile)){
t.SetStatus(AliTRDtrackV1::kNoAttach, ily);
if(debugLevel>3){
AliTRDseedV1 trackletCp(*ptrTracklet);
UChar_t status(t.GetStatusTRD(ily));
- (*cstreamer) << "FollowBackProlongation2"
+ (*cstreamer) << "FollowBackProlongation4"
<<"status=" << status
<<"tracklet.=" << &trackletCp
<< "\n";
if(debugLevel>3){
AliTRDseedV1 trackletCp(*ptrTracklet);
UChar_t status(t.GetStatusTRD(ily));
- (*cstreamer) << "FollowBackProlongation2"
+ (*cstreamer) << "FollowBackProlongation4"
<<"status=" << status
<<"tracklet.=" << &trackletCp
<< "\n";
// tilt correction options
// 0 : no correction
// 2 : pseudo tilt correction
- if(!ptrTracklet->Fit(2)){
+ if(!ptrTracklet->FitRobust(t.Charge()>0?kTRUE:kFALSE)){
t.SetStatus(AliTRDtrackV1::kNoFit, ily);
AliDebug(4, "Failed Tracklet Fit");
continue;
AliTRDseedV1 trackletCp(*ptrTracklet);
AliTRDtrackV1 trackCp(t);
trackCp.SetOwner();
- (*cstreamer) << "FollowBackProlongation1"
+ (*cstreamer) << "FollowBackProlongation3"
<< "status=" << status
<< "tracklet.=" << &trackletCp
<< "track.=" << &trackCp
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=-1;
AliTRDseedV1 trackletCp(*ptrTracklet);
AliTRDtrackV1 trackCp(t);
trackCp.SetOwner();
- (*cstreamer) << "FollowBackProlongation1"
+ (*cstreamer) << "FollowBackProlongation3"
<< "status=" << status
<< "tracklet.=" << &trackletCp
<< "track.=" << &trackCp
//printf("clusters[%d] chi2[%f] x[%f] status[%d ", n, t.GetChi2(), t.GetX(), t.GetStatusTRD());
//for(int i=0; i<6; i++) printf("%d ", t.GetStatusTRD(i)); printf("]\n");
- if(debugLevel > 1){
- Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
+ if(n && debugLevel > 1){
+ //Int_t eventNumber = AliTRDtrackerDebug::GetEventNumber();
AliTRDtrackV1 track(t);
track.SetOwner();
- (*cstreamer) << "FollowBackProlongation0"
- << "EventNumber=" << eventNumber
- << "ncl=" << n
+ (*cstreamer) << "FollowBackProlongation2"
+ << "EventNumber=" << fEventInFile
<< "track.=" << &track
<< "\n";
}
//
// Current track X-position
- Double_t xpos = t.GetX();
+ Double_t xpos = t.GetX()/*,
+ mass = t.GetMass()*/;
// Direction: inward or outward
Double_t dir = (xpos < xToGo) ? 1.0 : -1.0;
while (((xToGo - xpos) * dir) > AliTRDReconstructor::GetEpsilon()) {
-
+// printf("to go %f\n", (xToGo - xpos) * dir);
Double_t xyz0[3];
Double_t xyz1[3];
Double_t param[7];
// Calculate the mean material budget between start and
// end point of this prolongation step
if(AliTracker::MeanMaterialBudget(xyz0, xyz1, param)<=0.) return 0;
-
+
// Propagate the track to the X-position after the next step
if (!t.PropagateTo(x, param[1], param[0]*param[4])) return 0;
+/* // Correct for mean material budget
+ Double_t dEdx(0.),
+ bg(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);
+ printf(" param :: %s[%e] %s[%e] %s[%e] %s[%e] %s[%e] %s[%e] %s[%e]\n"
+ , pn[0], param[0]
+ , pn[1], param[1]
+ , pn[2], param[2]
+ , pn[3], param[3]
+ , pn[4], param[4]
+ , pn[5], param[5]
+ , pn[6], param[6]);
+ }
+ switch(fgBB){
+ case kSolid:
+ dEdx = AliExternalTrackParam::BetheBlochSolid(bg);
+ break;
+ case kGas:
+ dEdx = AliExternalTrackParam::BetheBlochGas(bg);
+ break;
+ case kGeant:
+ { // mean exitation energy (GeV)
+ Double_t mee = ((param[3] < 13.) ? (12. * param[3] + 7.) : (9.76 * param[3] + 58.8 * TMath::Power(param[3],-0.19))) * 1.e-9;
+ Double_t mZA = param[5]>1.e-5?param[5]:(param[3]/param[2]);
+ if(AliLog::GetDebugLevel("TRD", "AliTRDtrackerV1")>=3) printf("D-AliTRDtrackerV1::PropagateTo(): Mee[%e] <Z/A>[%e]\n", mee, mZA);
+ // protect against failed calculation of rho in MeanMaterialBudget()
+ dEdx = AliExternalTrackParam::BetheBlochGeant(bg, param[0]>1.e-6?param[0]:2.33, 0.2, 3., mee, mZA);
+ }
+ break;
+ }
+ if(AliLog::GetDebugLevel("TRD", "AliTRDtrackerV1")>=2) printf("D-AliTRDtrackerV1::PropagateTo(): dEdx(bg=%e, m=%e)= %e[GeV/cm]\n", bg, mass, dEdx);
+ if (!t.CorrectForMeanMaterialdEdx(param[1], dir*param[0]*param[4], mass, dEdx)) return 0;
+*/
// Rotate the track if necessary
if(!AdjustSector(&t)) return 0;
}
-
//_____________________________________________________________________________
Bool_t AliTRDtrackerV1::ReadClusters(TTree *clusterTree)
{