58 {
59 MsgStream log(
msgSvc(), name());
60 log << MSG::INFO << "TestInputOutput initialize()" << endreq;
61
62 output = new TFile("IOtest_histo.root", "RECREATE");
63
64
65
66 hnhit_L1_x =
new TH1F(
"hnhit_L1_x",
"number of hits on layer 1, x srtips",
MAXNOFHITS, 0,
MAXNOFHITS);
67 hnhit_L2_x =
new TH1F(
"hnhit_L2_x",
"number of hits on layer 2, x srtips",
MAXNOFHITS, 0,
MAXNOFHITS);
68 hcharge_L1_x = new TH1F("hcharge_L1_x", "hcharge on layer 1, x srtips", 50, 0, 50);
69 hcharge_L2_x = new TH1F("hcharge_L2_x", "hcharge on layer 2, x strips", 50, 0, 50);
70 htime_L1_x = new TH1F("htime_L1_x", "htime_L1, x strips", 500, -300, 300);
71 htime_L2_x = new TH1F("htime_L2_x", "htime_L2, x strips", 500, -300, 300);
74
75
76 hnhit_L1_v =
new TH1F(
"hnhit_L1_v",
"number of hits on layer 1, v srtips",
MAXNOFHITS, 0,
MAXNOFHITS);
77 hnhit_L2_v =
new TH1F(
"hnhit_L2_v",
"number of hits on layer 2, v srtips",
MAXNOFHITS, 0,
MAXNOFHITS);
78 hcharge_L1_v = new TH1F("hcharge_L1_v", "hcharge on layer 1, v srtips", 50, 0, 50);
79 hcharge_L2_v = new TH1F("hcharge_L2_v", "hcharge on layer 2, v strips", 50, 0, 50);
80 htime_L1_v = new TH1F("htime_L1_v", "htime_L1, v strips", 500, -300, 300);
81 htime_L2_v = new TH1F("htime_L2_v", "htime_L2, v strips", 500, -300, 300);
84
85
86
87 hnhit_L1_x_GRAAL =
new TH1F(
"hnhit_L1_x_GRAAL",
"GRAAL: number of hits on layer 1, x srtips",
MAXNOFHITS, 0,
MAXNOFHITS);
88 hnhit_L2_x_GRAAL =
new TH1F(
"hnhit_L2_x_GRAAL",
"GRAAL: number of hits on layer 2, x srtips",
MAXNOFHITS, 0,
MAXNOFHITS);
89 hcharge_L1_x_GRAAL = new TH1F("hcharge_L1_x_GRAAL", "GRAAL: hcharge on layer 1, x srtips", 50, 0, 50);
90 hcharge_L2_x_GRAAL = new TH1F("hcharge_L2_x_GRAAL", "GRAAL: hcharge on layer 2, x strips", 50, 0, 50);
91 htime_L1_x_GRAAL = new TH1F("htime_L1_x_GRAAL", "GRAAL: htime_L1, x strips", 500, -300, 300);
92 htime_L2_x_GRAAL = new TH1F("htime_L2_x_GRAAL", "GRAAL: htime_L2, x strips", 500, -300, 300);
93 hstripid_L1_x_GRAAL = new TH1F("hstripid_L1_x_GRAAL", "GRAAL: strip IDs of hits on layer 1, x srtips",
95 hstripid_L2_x_GRAAL = new TH1F("hstripid_L2_x_GRAAL", "GRAAL: strip IDs of hits on layer 2, x srtips",
97
98
99 hnhit_L1_v_GRAAL =
new TH1F(
"hnhit_L1_v_GRAAL",
"GRAAL: number of hits on layer 1, v srtips",
MAXNOFHITS, 0,
MAXNOFHITS);
100 hnhit_L2_v_GRAAL =
new TH1F(
"hnhit_L2_v_GRAAL",
"GRAAL: number of hits on layer 2, v srtips",
MAXNOFHITS, 0,
MAXNOFHITS);
101 hcharge_L1_v_GRAAL = new TH1F("hcharge_L1_v_GRAAL", "GRAAL: hcharge on layer 1, v srtips", 50, 0, 50);
102 hcharge_L2_v_GRAAL = new TH1F("hcharge_L2_v_GRAAL", "GRAAL: hcharge on layer 2, v strips", 50, 0, 50);
103 htime_L1_v_GRAAL = new TH1F("htime_L1_v_GRAAL", "GRAAL: htime_L1, v strips", 500, -300, 300);
104 htime_L2_v_GRAAL = new TH1F("htime_L2_v_GRAAL", "GRAAL: htime_L2, v strips", 500, -300, 300);
105 hstripid_L1_v_GRAAL = new TH1F("hstripid_L1_v_GRAAL", "GRAAL: strip IDs of hits on layer 1, v srtips",
107 hstripid_L2_v_GRAAL = new TH1F("hstripid_L2_v_GRAAL", "GRAAL: strip IDs of hits on layer 2, v srtips",
109
110
111 TString TDir_file(Dir_file);
112 f = new TFile(TDir_file);
113 TString TTreeDigi(TreeDigi);
114 Tdigi = (TTree*)f->Get(TTreeDigi);
115
116
117 Tdigi->SetBranchAddress("nGemHit", &m_nGemHit);
118
119 Tdigi->SetBranchAddress("GemHit_plane", m_plane);
120 Tdigi->SetBranchAddress("GemHit_view", m_view);
121 Tdigi->SetBranchAddress("GemHit_strip", m_strip);
122
123 Tdigi->SetBranchAddress("GemHit_q", m_charge);
124 Tdigi->SetBranchAddress("GemHit_time", m_time);
125
126 Ind_Entry_D = 0;
127
128 return StatusCode::SUCCESS;
129}
static value_type getXSTRIP_MAX(unsigned int f_layer)
static value_type getVSTRIP_MAX(unsigned int f_layer)