Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#ifndef __MUST2SPECTRA__
#define __MUST2SPECTRA__
/*****************************************************************************
* Copyright (C) 2009-2010 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: N. de Sereville contact address: deserevi@ipno.in2p3.fr *
* *
* Creation Date : march 2011 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class holds all the online spectra needed for Must2 *
* *
*---------------------------------------------------------------------------*
* Comment: *
* + first version (not complete yet) *
* *
* *
*****************************************************************************/
// C++ STL headers
#include <map>
#include <string>
// ROOT headers
#include "TObject.h"
#include <TH1.h>
#include <TH2.h>
// NPLib headers
#include "TMust2Data.h"
#include "TMust2Physics.h"
using namespace std;
#define NUMBERMUST2 8
#define NUMBERSTRIPS 128
#define NUMBERSILI 16
#define NUMBERCSI 16
class TMust2Spectra : public TObject {
public:
// constructor and destructor
TMust2Spectra();
virtual ~TMust2Spectra();
// Instantiate and register histo to maps
TH1* AddTH1(const char* name, const char* title, Int_t nbinsx, Double_t xlow, Double_t xup, const char* family = "MUST2");
TH1* AddTH2(const char* name, const char* title, Int_t nbinsx, Double_t xlow, Double_t xup, Int_t nbinsy, Double_t ylow, Double_t yup, const char* family = "MUST2");
// Initialization methods
void InitRawUserSpectra();
void InitUserSpectra();
// Filling methods
void FillRawUserSpectra();
void FillUserSpectra();
// getters and setters
// getters
TMust2Data* GetMust2Data() const {return fMust2Data;}
TMust2Data* GetMust2PreTreatedData() const {return fMust2PreTreatedData;}
TMust2Physics* GetMust2Physics() const {return fMust2Physics;}
// setters
void SetMust2Data(TMust2Data* must2Data) {fMust2Data = must2Data;}
void SetMust2PreTreatedData(TMust2Data* must2PreTreatedData) {fMust2PreTreatedData = must2PreTreatedData;}
void SetMust2Data(TMust2Physics* must2Physics) {fMust2Physics = must2Physics;}
// get map histo which will be used for GSpectra in GUser
map< string, vector<TH1*> > GetMapHisto() const {return fMapHisto;}
private:
// Data and physics class for Must2
TMust2Data *fMust2Data;
TMust2Data *fMust2PreTreatedData;
TMust2Physics *fMust2Physics;
private:
// map holding histo pointers and their family names
map< string, vector<TH1*> > fMapHisto;
private:
// monodim
TH1 *MM_STRX_MULT[NUMBERMUST2]; // dim = 128
TH1 *MM_STRY_MULT[NUMBERMUST2]; // dim = 128
TH1 *MM_SILI_MULT[NUMBERMUST2]; // dim = 16
TH1 *MM_CSI_MULT[NUMBERMUST2]; // dim = 16
// bidim
TH1 *MM_STRX_E_BRU[NUMBERMUST2]; // dim = 128 x 512
TH1 *MM_STRY_E_BRU[NUMBERMUST2];
TH1 *MM_STRX_T_BRU[NUMBERMUST2];
TH1 *MM_STRY_T_BRU[NUMBERMUST2];
// SiLi E
TH1 *MM_SILI_E_BRU[NUMBERMUST2]; // dim = 16 x 512
TH1 *MM_SILI_T_BRU[NUMBERMUST2]; // dim = 16 x 512
// CsI E
TH1 *MM_CSI_E_BRU[NUMBERMUST2]; // dim = 16 x 512
TH1 *MM_CSI_T_BRU[NUMBERMUST2]; // dim = 16 x 512
// Strips (X,Y) (E.T)
TH1 *MM_STRX_E_CAL[NUMBERMUST2]; // dim = 128 x 500 (50 MeV range)
TH1 *MM_STRY_E_CAL[NUMBERMUST2];
TH1 *MM_STRX_T_CAL[NUMBERMUST2]; // dim = 128 x 500 (500 ns range)
TH1 *MM_STRY_T_CAL[NUMBERMUST2];
// SiLi E
TH1 *MM_SILI_E_CAL[NUMBERMUST2]; // dim = 16 x 512
TH1 *MM_SILI_T_CAL[NUMBERMUST2]; // dim = 16 x 512
// CsI E
TH1 *MM_CSI_E_CAL[NUMBERMUST2]; // dim = 16 x 512
TH1 *MM_CSI_T_CAL[NUMBERMUST2]; // dim = 16 x 512
ClassDef(TMust2Spectra,1) // Must2Spectra structure
};
#endif