4 // Script that contains a class to draw hits, using the
5 // AliFMDInputHits class in the util library.
7 // It draws the energy loss versus the p/(mq^2). It can be overlayed
8 // with the Bethe-Bloc curve to show how the simulation behaves
9 // relative to the expected.
11 // Use the script `Compile.C' to compile this class using ACLic.
14 #include <AliFMDHit.h>
15 #include <AliFMDInput.h>
20 class DrawHits : public AliFMDInputHits
23 TH2D* fElossVsPMQ; // Histogram
31 Float_t dp = 1/TMath::Log10(emax/emin)/10;
32 Float_t pmin = TMath::Log10(emin);
34 for (Int_t i=1; i < tkine.fN; i++) {
35 Float_t el = pmin + i * dp;
36 tkine[i] = TMath::Power(10, el);
43 for (Int_t i = 1; i < eloss.fN; i++){
44 eloss[i] = dmin + i * (dmax-dmin)/(eloss.fN-1);
46 fElossVsPMQ = new TH2D("bad", "#Delta E vs. p/(mq^{2})",
47 tkine.fN-1, tkine.fArray, eloss.fN-1, eloss.fArray);
48 fElossVsPMQ->SetXTitle("p/(mq^{2})");
49 fElossVsPMQ->SetYTitle("#Delta E [MeV]");
51 Bool_t ProcessHit(AliFMDHit* hit, TParticle*)
54 std::cout << "No hit" << std::endl;
57 if (TMath::Abs(hit->Pdg()) != 211) return kTRUE;
59 // Float_t q = hit->Q() / 3.;
60 // if (hit->M() != 0 && hit->Q() != 0)
61 // pmq = hit->P() / (hit->M()*q*q);
62 Float_t pmq = hit->P();
63 fElossVsPMQ->Fill(pmq, hit->Edep());
68 gStyle->SetPalette(1);
69 gStyle->SetOptTitle(0);
70 fElossVsPMQ->SetStats(kFALSE);
71 fElossVsPMQ->Draw("COLZ");
76 //____________________________________________________________________