58 {
59
60 MsgStream log(
msgSvc(), name());
61 log << MSG::INFO << "TestHit initialize()" << endreq;
62
63
64 StatusCode sc;
65
66 sc = service("CgemGeomSvc", m_geoSvc);
67 if(sc != StatusCode::SUCCESS) {
68 log << MSG::ERROR << "can not use CgemGeomSvc" << endreq;
69 return StatusCode::FAILURE;
70 }
71
72 event = 0;
73
74 output = new TFile("hit.root", "RECREATE");
75 tree = new TTree("tree","hit info tree");
76 tree->Branch("event", &event, "event/I");
77 tree->Branch("nhit", &nhit, "nhit/I");
78 tree->Branch("nhit_L1_S1_x", &nhit_L1_S1_x,"nhit_L1_S1_x/I");
79 tree->Branch("nhit_L2_S1_x", &nhit_L2_S1_x,"nhit_L2_S1_x/I");
80 tree->Branch("nhit_L2_S2_x", &nhit_L2_S2_x,"nhit_L2_S2_x/I");
81 tree->Branch("nhit_L1_S1_v", &nhit_L1_S1_v,"nhit_L1_S1_v/I");
82 tree->Branch("nhit_L2_S1_v", &nhit_L2_S1_v,"nhit_L2_S1_v/I");
83 tree->Branch("nhit_L2_S2_v", &nhit_L2_S2_v,"nhit_L2_S2_v/I");
84
85 tree->Branch("ntwin_L1_S1_x", &ntwin_L1_S1_x,"ntwin_L1_S1_x/I");
86 tree->Branch("ntwin_L2_S1_x", &ntwin_L2_S1_x,"ntwin_L2_S1_x/I");
87 tree->Branch("ntwin_L2_S2_x", &ntwin_L2_S2_x,"ntwin_L2_S2_x/I");
88 tree->Branch("ntwin_L1_S1_v", &ntwin_L1_S1_v,"ntwin_L1_S1_v/I");
89 tree->Branch("ntwin_L2_S1_v", &ntwin_L2_S1_v,"ntwin_L2_S1_v/I");
90 tree->Branch("ntwin_L2_S2_v", &ntwin_L2_S2_v,"ntwin_L2_S2_v/I");
91
92 tree->Branch("hit_strip", &hit_strip, "hit_strip[nhit]/I");
93 tree->Branch("hit_view", &hit_view, "hit_view[nhit]/I");
94 tree->Branch("hit_layer", &hit_layer, "hit_layer[nhit]/I");
95 tree->Branch("hit_sheet", &hit_sheet, "hit_sheet[nhit]/I");
96 tree->Branch("hit_length", &hit_length, "hit_length[nhit]/D");
97
98 tree->Branch("hit_channel", &hit_channel,"hit_channel[nhit]/I");
99 tree->Branch("hit_roc", &hit_roc, "hit_roc[nhit]/I");
100 tree->Branch("hit_feb", &hit_feb, "hit_feb[nhit]/I");
101 tree->Branch("hit_tiger", &hit_tiger, "hit_tiger[nhit]/I");
102 tree->Branch("hit_chip", &hit_chip, "hit_chip[nhit]/I");
103
104 tree->Branch("hit_t", &hit_t, "hit_t[nhit]/D");
105 tree->Branch("hit_q", &hit_q, "hit_q[nhit]/D");
106 tree->Branch("hit_saturated", &hit_saturated, "hit_saturated[nhit]/I");
107 tree->Branch("hit_quality", &hit_quality, "hit_quality[nhit]/I");
108
109
112
113 return StatusCode::SUCCESS;
114}