+//_______________________________________________________
+TH1 *AliTRDcheckPID::PlotdQdl(const AliTRDtrackV1 *track){
+ //
+ // Plot the total charge for the 1D Likelihood method
+ //
+ if(track) fkTrack = track;
+ if(!fkTrack){
+ AliDebug(2, "No Track defined");
+ return NULL;
+ }
+ TH2 *hdQdl = dynamic_cast<TH2F *>(fContainer->At(kdQdl));
+ if(!hdQdl){
+ AliWarning("No Histogram defined");
+ return NULL;
+ }
+
+ if(!CheckTrackQuality(fkTrack)) return NULL;
+
+ Int_t pdg = 0;
+ Float_t momentum = 0.;
+ AliTRDtrackV1 cTrack(*fkTrack);
+ if(fkMC){
+ if(fkMC->GetTrackRef()) momentum = fkMC->GetTrackRef()->P();
+ pdg = fkMC->GetPDG();
+ } else {
+ //AliWarning("No MC info available!");
+ momentum = cTrack.GetMomentum(0);
+ pdg = CalcPDG(&cTrack);
+ }
+ if(!IsInRange(momentum)) return NULL;
+
+ // Init exchange container
+ Int_t s(AliTRDpidUtil::Pdg2Pid(pdg));
+ Int_t ibin = FindBin(s, momentum);
+
+ AliTRDseedV1 *tracklet = NULL;
+ for(Int_t iseed = 0; iseed < 6; iseed++){
+ if(!((tracklet = fkTrack->GetTracklet(iseed)) && tracklet->IsOK())) continue;
+ hdQdl->Fill(ibin, tracklet->GetdQdl());
+ }
+ return hdQdl;
+}
+