1 #if !defined(__CINT__) || defined(__MAKECINT__)
2 #include <TRD/AliTRDcluster.h>
3 #include <TRD/AliTRDseedV1.h>
4 #include <TRD/AliTRDtrackV1.h>
7 void chargeDistr(const AliTRDtrackV1* track, Double_t* results, Int_t& nResults)
10 Error("chargeDistr()", "Missing track.");
13 Int_t Nt = track->GetNumberOfTracklets();
14 AliTRDcluster* cls(NULL);
15 AliTRDseedV1 *tracklet(NULL);
19 for (Int_t ily = 0; ily < 6; ily++) {
20 if(!(tracklet = track->GetTracklet(ily))){
21 //Warning("chargeDistr()", "Missing tracklet in ly[%d]", ily);
24 if(!tracklet->IsOK()){
25 //Warning("chargeDistr()", "Bad tracklet in ly[%d]", ily);
28 for (Int_t icl = 0; icl < AliTRDseedV1::kNclusters; icl++) {
29 if(!(cls = tracklet->GetClusters(icl))){
30 //Warning("chargeDistr()", "Missing cls[%2d] tracklet in ly[%d]", icl, ily);
39 Warning("chargeDistr()", "Missing clusters.");
42 //Info("chargeDistr()", "Found %3d clusters.", nCls);
44 // Allocate memory for the results (AliEveTRDAnalyseObjectList will clean this memory automatically)
45 //results = new Double_t[nResults];
47 for (Int_t i = 0; i < nResults; i++) results[i] = 0.;
48 Int_t currentIndex = 0;
50 for (Int_t trackletInd = 0; trackletInd < Nt && currentIndex < nResults; trackletInd++){
51 if(!(tracklet = track->GetTracklet(trackletInd))) continue;
52 if(!tracklet->IsOK()) continue;
53 for (Int_t clusterInd = 0; clusterInd < AliTRDseedV1::kNclusters; clusterInd++){
54 if(!(cls = tracklet->GetClusters(clusterInd))) continue;
55 results[1] += cls->GetQ();