for(int ic=0; ic<AliTRDtrackerV1::GetNTimeBins(); ic++){
if(!(c = fClusters[ic]) && !(c = fClusters[ic+kNtb])) continue;
Float_t dx = TMath::Abs(fX0 - c->GetX());
-
+
// Filter clusters for dE/dx calculation
-
+
// 1.consider calibration effects for slice determination
Int_t slice;
- if(dx<kDriftLength){ // TODO should be replaced by c->IsInChamber()
+ if(dx<kDriftLength){ // TODO should be replaced by c->IsInChamber()
slice = Int_t(dx * nslices / kDriftLength);
} else slice = c->GetX() < fX0 ? nslices-1 : 0;
// 2. take sharing into account
Float_t w = /*c->IsShared() ? .5 :*/ 1.;
-
+
// 3. take into account large clusters TODO
//w *= c->GetNPads() > 3 ? .8 : 1.;
-
+
//CHECK !!!
fdEdx[slice] += w * GetdQdl(ic); //fdQdl[ic];
} // End of loop over clusters
}
+//____________________________________________________________________
+Float_t AliTRDseedV1::GetCharge(Bool_t useOutliers)
+{
+// Computes total charge attached to tracklet. If "useOutliers" is set clusters
+// which are not in chamber are also used (default false)
+
+ AliTRDcluster *c(NULL); Float_t qt(0.);
+ for(int ic=0; ic<kNclusters; ic++){
+ if(!(c=fClusters[ic])) continue;
+ if(c->IsInChamber() && !useOutliers) continue;
+ qt += TMath::Abs(c->GetQ());
+ }
+ return qt;
+}
+
//____________________________________________________________________
Float_t AliTRDseedV1::GetdQdl(Int_t ic, Float_t *dl) const
{
if(fClusters[ic] && fClusters[ic]->IsInChamber()){
hasClusterInChamber = kTRUE;
dq += TMath::Abs(fClusters[ic]->GetQ());
- }else if(fClusters[ic+kNtb] && fClusters[ic+kNtb]->IsInChamber()){
+ }
+ if(fClusters[ic+kNtb] && fClusters[ic+kNtb]->IsInChamber()){
hasClusterInChamber = kTRUE;
dq += TMath::Abs(fClusters[ic+kNtb]->GetQ());
}