+ //Analyse drift velocity TODO
+
+}
+//_____________________________________________________________________
+TGraph* AliTPCCalibRaw::MakeGraphOccupancy(const Int_t type, const Int_t xType)
+{
+ //
+ // create occupancy graph (of samples abouve threshold)
+ // type=0: number of samples
+ // type=1: mean data volume (ADC counts/sample)
+ // type=2: data volume (ADC counts)
+ // type=3: samples per ADC count
+ // type=4: sample occupancy
+ //
+ // type=5: number of sample sensitive / number of samples
+ //
+ // same in sensitive regions:
+ // type=10: number of samples
+ // type=11: mean data volume (ADC counts/sample)
+ // type=12: data volume (ADC counts)
+ // type=13: samples per ADC count
+ // type=14: sample occupancy
+ //
+ // type=16: number of samples sensitive / number of pads sensitive
+ // type=17: pad occupancy in sensitive regions
+ // xType=0: vs. time stamp
+ // xType=1: vs. event counter
+ //
+
+ TString title("Event occupancy");
+ TString xTitle("Time");
+ TString yTitle("number of samples");
+ TGraph *gr=new TGraph(GetNevents());
+ if (fVSignalSumEvent.GetNrows()==0&&!(type==10||type==14)) return 0;
+ TVectorF *vOcc=&fVOccupancyEvent;
+ TVectorF *vSum=&fVSignalSumEvent;
+ TVectorF *vPads=&fVNfiredPadsSenEvent;
+ Double_t norm=557568.;
+ if (type!=14&&fVOccupancyEvent.GetNrows()==0){
+ AliWarning("In non debug mode only occupancy in sensitive regions vs. event awailable!!!");
+ return 0;
+ }
+ if (type>=10){
+ vOcc=&fVOccupancySenEvent;
+ vSum=&fVSignalSumSenEvent;
+ vPads=&fVNfiredPadsSenEvent;
+ norm=33012.;
+ }
+ for (Int_t i=0;i<GetNevents(); ++i){
+ Double_t nAboveThreshold=vOcc->GetMatrixArray()[i];
+
+ Double_t nSumADC =1;
+ Double_t timestamp =1;
+ Double_t nPads =1;
+
+ if (fVOccupancyEvent.GetNrows()>0){
+ nSumADC =vSum->GetMatrixArray()[i];
+ timestamp =fVTimeStampEvent.GetMatrixArray()[i]+fFirstTimeStamp;
+ nPads =vPads->GetMatrixArray()[i];
+ }
+ Double_t x=timestamp;
+ Double_t y=0;
+ //
+ if (xType==1) x=i;
+ //
+ if (type%10==0) y=nAboveThreshold;
+ if (type%10==1&&nAboveThreshold>0) y=nSumADC/nAboveThreshold;
+ if (type%10==2) y=nSumADC;
+ if (type%10==3&&nSumADC>0) y=nAboveThreshold/nSumADC;
+ if (type%10==4) y=nAboveThreshold/(norm*(fLastTimeBin-fFirstTimeBin));
+ if (type==5) y=fVOccupancySenEvent.GetMatrixArray()[i]/fVOccupancyEvent.GetMatrixArray()[i];
+ if (type==16&&nPads>0) y=nAboveThreshold/nPads;
+ if (type==17) y=nPads/norm;
+ //
+ gr->SetPoint(i,x,y);
+ }
+ if (xType==1) xTitle="Event";
+ if (type%10==1) yTitle="Mean ADC counts/sample";
+ else if (type%10==2) yTitle="Data volume [ADC counts]";
+ else if (type%10==3) yTitle="samples per ADC count";
+ else if (type%10==4) yTitle="sample occupancy";
+ if (type==5) yTitle="N samples (sensitive) / N samples";
+ if (type%10==6) yTitle="N samples / N pads";
+ if (type==17) yTitle="Pad Occupancy";
+ if (type>=10) yTitle+=" (sensitive)";
+ title=yTitle+":"+xTitle;
+ title+=";"+xTitle+";"+yTitle;
+ gr->SetTitle(title.Data());
+ gr->SetEditable(kFALSE);
+ return gr;
+}
+//_____________________________________________________________________
+// TGraph* AliTPCCalibRaw::MakeGraphNoiseEvents()
+// {
+ //
+ // Not implemented for the moment
+ //
+// return 0;
+// }
+//_____________________________________________________________________
+TCanvas* AliTPCCalibRaw::MakeCanvasOccupancy(const Int_t xType, Bool_t sen)
+{
+ //
+ // Create a canvas with occupancy information of all 'type's (see MakeGraphOccupancy)
+ // xType=0: vs. timestamp
+ // xType=1: vs. event number
+ //
+ // sen=kTRUE: for sensitive regions
+ //