1 //____________________________________________________________________
5 // Script that contains a class to draw eloss from hits, versus ADC
6 // counts from digits, using the AliFMDInputHits class in the util library.
8 // It draws the energy loss versus the p/(mq^2). It can be overlayed
9 // with the Bethe-Bloc curve to show how the simulation behaves
10 // relative to the expected.
12 // Use the script `Compile.C' to compile this class using ACLic.
15 #include <AliFMDHit.h>
16 #include <AliFMDDigit.h>
17 #include <AliFMDInput.h>
18 #include <AliFMDEdepMap.h>
25 @brief Draw hit energy loss versus digit ADC
28 Root> Compile("DrawDigits.C")
34 class DrawDigits : public AliFMDInput
37 TH1D* fAdc; // Histogram
39 //__________________________________________________________________
40 DrawDigits(Int_t m=1100, Double_t amin=-0.5, Double_t amax=1023.5)
43 fAdc = new TH1D("adc", "ADC", m, amin, amax);
44 fAdc->SetXTitle("ADC value");
47 //__________________________________________________________________
48 Bool_t ProcessDigit(AliFMDDigit* digit)
50 if (!digit) return kTRUE;
51 fAdc->Fill(digit->Counts());
54 //__________________________________________________________________
57 gStyle->SetPalette(1);
58 gStyle->SetOptTitle(0);
59 gStyle->SetCanvasColor(0);
60 gStyle->SetCanvasBorderSize(0);
61 gStyle->SetPadColor(0);
62 gStyle->SetPadBorderSize(0);
63 fAdc->SetStats(kFALSE);
64 fAdc->Scale(1. / fAdc->GetEntries());
69 ClassDef(DrawDigits,0);
72 //____________________________________________________________________