1 #ifndef ALIFMDENCODEDEDX_H
2 #define ALIFMDENCODEDEDX_H
108 return off +
UInt_t(n*(v-low)/(high-low));
138 return off + w * (b+.5);
176 Printf(
"Spec: [%8.4f,%8.4f] in %3d bins, cuts %8.4f (%3d) %8.4f (%3d)",
178 if (opt[0] ==
'T' || opt[0] ==
't') {
183 Printf(
"%3d -> %8.4f (%7.4f) -> %3d", i, x, w, j);
222 static Spec* dEAxis = 0;
223 if (!dEAxis) dEAxis =
new Spec((1<<
kNEBits), 0 , 11);
234 static Spec* dLAxis = 0;
235 if (!dLAxis) dLAxis =
new Spec((1<<
kNLBits), 0 , 0.7);
297 for (
Int_t i = 0; i < aa.GetSize(); i++) aa[i] *= 100;
300 TH1* h =
new TH1D(name, title, aa.GetSize()-1, aa.GetArray());
301 h->SetXTitle(
mode == 0 ?
"d#Delta [MeV]" :
302 mode == 1 ?
"dx [cm]" :
303 mode == 2 ?
"d#Delta/dx [MeV/cm]" :
"?");
304 h->SetFillStyle(3001);
305 h->SetMarkerStyle(20);
328 aa1.GetSize()-1, aa1.GetArray(),
329 aa2.GetSize()-1, aa2.GetArray());
330 h->SetXTitle(xedep ?
"d#Delta [MeV]" :
"dx [cm]");
331 h->SetYTitle(xedep ?
"dx [cm]" :
"d#Delta [MeV]");
349 const UInt_t target = 60000;
350 return alirootRev >= target;
363 if (v < a.
min)
return 0;
static TH1 * Make1D(const char *name, const char *title, UShort_t mode=true)
static TH2 * Make2D(const char *name, const char *title, Bool_t xedep=true)
ClassDef(AliFMDEncodedEdx, 1)
static Double_t DecodeOne(UInt_t b, Double_t &w, const Spec &a)
static const Spec & GetdEAxis()
Double_t Decode(UInt_t b) const
static UInt_t EncodeOne(Double_t v, const Spec &a)
static Double_t DecodeOne(UInt_t b, const Spec &a)
static void Decode(UInt_t bits, Double_t &edep, Double_t &length)
void FillBinArray(TArrayD &a) const
static const Spec & GetdLAxis()
Spec(UShort_t nb, Double_t l, Double_t h)
Double_t Decode(UInt_t b, Double_t &w) const
static UInt_t Encode(Double_t edep, Double_t length)
virtual ~AliFMDEncodedEdx()
static Bool_t IsAvailable(UInt_t alirootRev)
static void Decode(UInt_t bits, Double_t &edep, Double_t &length, Double_t &wEdep, Double_t &wLength)
void Print(Option_t *opt="") const
UInt_t Encode(Double_t v) const