source: trunk/Mars/msim/MHPhotonEvent.h@ 19547

Last change on this file since 19547 was 19534, checked in by tbretz, 5 years ago
Instead of a constant number for Type==1 use BinningImpact. Also, if available, allow to overwrite this number from the environment (fMaxImpact). Updated class version accordingly
File size: 1.5 KB
Line 
1#ifndef MARS_MHPhotonEvent
2#define MARS_MHPhotonEvent
3
4#ifndef MARS_MH
5#include "MH.h"
6#endif
7
8#ifndef ROOT_TH2
9#include <TH2.h>
10#endif
11
12#ifndef ROOT_TProfile2D
13#define err _err
14#include <TProfile2D.h>
15#undef err
16#endif
17
18class MPhotonEvent;
19
20class MHPhotonEvent : public MH
21{
22private:
23 TH2F fHistXY;
24 TH2F fHistUV;
25 TProfile2D fHistT;
26 TH1F fHistWL;
27 TH1F fHistH;
28
29 Int_t fType;
30 Bool_t fPermanentReset;
31 Float_t fMaxImpact;
32
33 // MHPhotonEvent
34 void Init(const char *name, const char *title);
35 void SetBinningXY(Int_t num, Double_t max);
36
37 // MParContainer
38 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
39
40 // MH
41 Bool_t SetupFill(const MParList *pList);
42 Bool_t ReInit(MParList *pList);
43 Int_t Fill(const MParContainer *par, const Stat_t weight=1);
44 //Bool_t Finalize();
45
46public:
47 MHPhotonEvent(Double_t max, const char *name=0, const char *title=0);
48 MHPhotonEvent(Int_t type=3, const char *name=0, const char *title=0);
49
50 void PermanentReset(Bool_t b=kTRUE) { fPermanentReset=b; }
51
52 // TObject
53 void Draw(Option_t *o="");
54 void Paint(Option_t *o="");
55
56 void Clear(Option_t *o="")
57 {
58 fHistXY.Reset();
59 fHistUV.Reset();
60 fHistT.Reset();
61 fHistWL.Reset();
62 fHistH.Reset();
63 }
64
65 const TH2F &GetHistXY() const { return fHistXY; }
66 const TProfile2D &GetHistT() const { return fHistT; }
67
68 ClassDef(MHPhotonEvent, 4) // Histogram to display the information of MPhotonEvents
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.