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 <AliFMDUShortMap.h>
19 #include <AliFMDFloatMap.h>
20 #include <AliFMDRecPoint.h>
21 #include <AliESDFMD.h>
28 /** @class DrawDigitsRecs
29 @brief Draw digit ADC versus Rec point mult
32 Root> Compile("DrawDigitsRecs.C")
33 Root> DrawDigitsRecs c
38 class DrawDigitsRecs : public AliFMDInput
41 TH2D* fAdcVsSingle; // Histogram
44 //__________________________________________________________________
45 DrawDigitsRecs(Int_t m=1100, Double_t amin=-0.5, Double_t amax=1099.5,
46 Int_t n=105, Double_t mmin=-0.5, Double_t mmax=20.5)
50 fAdcVsSingle = new TH2D("adcVsSingle", "ADC vs. Multiplicity (strip)",
51 m, amin, amax, n, mmin, mmax);
52 fAdcVsSingle->Sumw2();
53 fAdcVsSingle->SetXTitle("ADC value");
54 fAdcVsSingle->SetYTitle("Strip Multiplicity");
56 //__________________________________________________________________
58 @param ev Event number
59 @return @c false on error */
60 Bool_t Begin(Int_t ev)
63 return AliFMDInput::Begin(ev);
65 //__________________________________________________________________
66 Bool_t ProcessDigit(AliFMDDigit* digit)
68 // Cache the energy loss
69 if (!digit) return kFALSE;
70 UShort_t det = digit->Detector();
71 Char_t rng = digit->Ring();
72 UShort_t sec = digit->Sector();
73 UShort_t str = digit->Strip();
75 AliWarning(Form("Bad strip number %d in digit", str));
78 fMap(det, rng, sec, str) = digit->Counts();
81 //__________________________________________________________________
82 Bool_t ProcessRecPoint(AliFMDRecPoint* single)
84 if (!single) return kFALSE;
85 UShort_t det = single->Detector();
86 Char_t rng = single->Ring();
87 UShort_t sec = single->Sector();
88 UShort_t str = single->Strip();
90 AliWarning(Form("Bad strip number %d in single", str));
93 fAdcVsSingle->Fill(fMap(det, rng, sec, str), single->Particles());
96 //__________________________________________________________________
99 gStyle->SetPalette(1);
100 gStyle->SetOptTitle(0);
101 gStyle->SetCanvasColor(0);
102 gStyle->SetCanvasBorderSize(0);
103 gStyle->SetPadColor(0);
104 gStyle->SetPadBorderSize(0);
105 gStyle->SetOptLogz(kTRUE);
106 fAdcVsSingle->SetStats(0);
107 fAdcVsSingle->Draw("COLZ");
111 ClassDef(DrawDigitsRecs,0);
115 //____________________________________________________________________