1 | ///////////////////////////////////////////////////////////////////////
|
---|
2 | //
|
---|
3 | // MHHillas
|
---|
4 | //
|
---|
5 | // This class contains histograms for every Hillas parameter
|
---|
6 | //
|
---|
7 | ///////////////////////////////////////////////////////////////////////
|
---|
8 |
|
---|
9 | #include "MHHillas.h"
|
---|
10 |
|
---|
11 | #include <TH1.h>
|
---|
12 | #include <TPad.h>
|
---|
13 |
|
---|
14 | #include "MHillas.h"
|
---|
15 |
|
---|
16 | ClassImp(MHHillas)
|
---|
17 |
|
---|
18 | MHHillas::MHHillas (const char *name, const char *title)
|
---|
19 | {
|
---|
20 | //
|
---|
21 | // default constructor
|
---|
22 | // creates an a list of histograms for all pixels and both gain channels
|
---|
23 | //
|
---|
24 |
|
---|
25 | //
|
---|
26 | // set the name and title of this object
|
---|
27 | //
|
---|
28 |
|
---|
29 | *fName = name ? name : "MHHillas" ;
|
---|
30 | *fTitle = title ? title : "Container for Hillas histograms" ;
|
---|
31 |
|
---|
32 | //
|
---|
33 | // loop over all Pixels and create two histograms
|
---|
34 | // one for the Low and one for the High gain
|
---|
35 | // connect all the histogram with the container fHist
|
---|
36 | //
|
---|
37 | fAlpha = new TH1F("Alpha [deg]", "Alpha of Hillas", 90, 0, 90);
|
---|
38 | fWidth = new TH1F("Width [mm]", "Width of Hillas", 150, 0, 150);
|
---|
39 | fLength = new TH1F("Length [mm]", "Length of Hillas", 150, 0, 150);
|
---|
40 | fDist = new TH1F("Dist [mm]", "Dist of Hillas", 200, 0, 200);
|
---|
41 | }
|
---|
42 |
|
---|
43 | MHHillas::~MHHillas()
|
---|
44 | {
|
---|
45 | delete fAlpha;
|
---|
46 | delete fWidth;
|
---|
47 | delete fLength;
|
---|
48 | delete fDist;
|
---|
49 | }
|
---|
50 |
|
---|
51 | void MHHillas::Fill(MHillas *par)
|
---|
52 | {
|
---|
53 | fAlpha ->Fill(par->GetAlpha());
|
---|
54 | fWidth ->Fill(par->GetWidth());
|
---|
55 | fLength->Fill(par->GetLength());
|
---|
56 | fDist ->Fill(par->GetDist());
|
---|
57 | }
|
---|
58 |
|
---|
59 | #include <TCanvas.h>
|
---|
60 | void MHHillas::Draw(Option_t *)
|
---|
61 | {
|
---|
62 |
|
---|
63 | TCanvas *c = new TCanvas("Hillas", "Histograms of Hillas Parameters");
|
---|
64 | c->Divide(2,2);
|
---|
65 |
|
---|
66 | c->cd(1);
|
---|
67 | fAlpha->Draw();
|
---|
68 | c->cd(2);
|
---|
69 | fLength->Draw();
|
---|
70 | c->cd(3);
|
---|
71 | fDist->Draw();
|
---|
72 | c->cd(4);
|
---|
73 | fWidth->Draw();
|
---|
74 |
|
---|
75 | c->Modified();
|
---|
76 | c->Update();
|
---|
77 | }
|
---|