CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
TestTrack.cxx
Go to the documentation of this file.
1// **************************************************************************/
2// authors: L. Lavezzi (univ. of Torino & INFN, Italy)
3//
4
5//include system lib
6#include <iostream>
7#include <iomanip>
8#include <string>
9#include <cmath>
10
11// Include files
12#include "GaudiKernel/AlgFactory.h"
13#include "GaudiKernel/DataObject.h"
14#include "GaudiKernel/IEventProcessor.h"
15
16#include "GaudiKernel/Incident.h"
17#include "GaudiKernel/IIncidentSvc.h"
18#include "GaudiKernel/Memory.h"
19
20#include <csignal>
21
22//for save digit & cluster
23#include "GaudiKernel/ISvcLocator.h"
24#include "GaudiKernel/IDataProviderSvc.h"
25#include "GaudiKernel/Bootstrap.h"
26#include "GaudiKernel/RegistryEntry.h"
27#include "GaudiKernel/MsgStream.h"
28
32#include "Identifier/CgemID.h"
33
35#include "RawEvent/DigiEvent.h"
38#include "GaudiKernel/SmartDataPtr.h"
39
41
42#include "TMath.h"
43#include "TVector3.h"
44#include "TF1.h"
45//using namespace std;
46
47TestTrack::TestTrack(const std::string& name, ISvcLocator* pSvcLocator):
48 Algorithm(name,pSvcLocator){
49
50 declareProperty("selGoodDigi",m_selGoodDigi=1);
51 declareProperty("minDigiTime",m_minDigiTime=-8875);
52 declareProperty("maxDigiTime",m_maxDigiTime=-8562);
53 declareProperty("minQDigi",myQMin=0.0);
54 declareProperty("LUTfile", lutfile = "/bes3fs/cgemCosmic/data/CGEM_cosmic_look_up_table_from_17_to_17.root");
55 declareProperty("align_flag", align_flag = false);
56 declareProperty("OutputFileName", OutputFileName="track.root");
57
58}
59
61 // delete m_SvcCgem;
62 // delete f;
63 // delete Tdigi;
64 // delete anode;
65 // delete tree;
66 // delete output;
67 delete lutreader;
68}
69
70void TestTrack::DefineHitTree() {
71
72 tree->Branch("event", &event, "event/I");
73 tree->Branch("nhit", &nhit, "nhit/I");
74 // from geometry
75 tree->Branch("hit_strip", &hit_strip, "hit_strip[nhit]/I");
76 tree->Branch("hit_view", &hit_view, "hit_view[nhit]/I");
77 tree->Branch("hit_layer", &hit_layer, "hit_layer[nhit]/I");
78 tree->Branch("hit_sheet", &hit_sheet, "hit_sheet[nhit]/I");
79 tree->Branch("hit_length", &hit_length, "hit_length[nhit]/D");
80 // from LUT
81 tree->Branch("hit_channel", &hit_channel,"hit_channel[nhit]/I");
82 tree->Branch("hit_roc", &hit_roc, "hit_roc[nhit]/I");
83 tree->Branch("hit_feb", &hit_feb, "hit_feb[nhit]/I");
84 tree->Branch("hit_tiger", &hit_tiger, "hit_tiger[nhit]/I");
85 tree->Branch("hit_chip", &hit_chip, "hit_chip[nhit]/I");
86 // from signal
87 tree->Branch("hit_t", &hit_t, "hit_t[nhit]/D");
88 tree->Branch("hit_q", &hit_q, "hit_q[nhit]/D");
89 tree->Branch("hit_quality", &hit_quality, "hit_quality[nhit]/I");
90 tree->Branch("hit_selgooddigi", &hit_selgooddigi, "hit_selgooddigi[nhit]/I");
91 // µTPC debug
92 tree->Branch("hit_x_tpc", &hit_x_tpc, "hit_x_tpc[nhit]/D");
93 tree->Branch("hit_z_tpc", &hit_z_tpc, "hit_z_tpc[nhit]/D");
94 tree->Branch("hit_ex_tpc", &hit_ex_tpc, "hit_ex_tpc[nhit]/D");
95 tree->Branch("hit_ez_tpc", &hit_ez_tpc, "hit_ez_tpc[nhit]/D");
96 tree->Branch("hit_deltax_tpc", &hit_deltax_tpc, "hit_deltax_tpc[nhit]/D");
97 tree->Branch("hit_deltaz_tpc", &hit_deltaz_tpc, "hit_deltaz_tpc[nhit]/D");
98 tree->Branch("hit_order", &hit_order, "hit_order[nhit]/I");
99}
100
101void TestTrack::DefineClusterTree() {
102
103 tree->Branch("ncluster", &ncluster,"ncluster/I");
104 // 1d
105 tree->Branch("ncluster_1d", &ncluster_1d,"ncluster_1d/I");
106 tree->Branch("ncluster_1d_L1_S1_x", &ncluster_1d_L1_S1_x,"ncluster_1d_L1_S1_x/I");
107 tree->Branch("ncluster_1d_L2_S1_x", &ncluster_1d_L2_S1_x,"ncluster_1d_L2_S1_x/I");
108 tree->Branch("ncluster_1d_L2_S2_x", &ncluster_1d_L2_S2_x,"ncluster_1d_L2_S2_x/I");
109 tree->Branch("ncluster_1d_L3_S1_x", &ncluster_1d_L3_S1_x,"ncluster_1d_L3_S1_x/I");
110 tree->Branch("ncluster_1d_L3_S2_x", &ncluster_1d_L3_S2_x,"ncluster_1d_L3_S2_x/I");
111 tree->Branch("ncluster_1d_L1_S1_v", &ncluster_1d_L1_S1_v,"ncluster_1d_L1_S1_v/I");
112 tree->Branch("ncluster_1d_L2_S1_v", &ncluster_1d_L2_S1_v,"ncluster_1d_L2_S1_v/I");
113 tree->Branch("ncluster_1d_L2_S2_v", &ncluster_1d_L2_S2_v,"ncluster_1d_L2_S2_v/I");
114 tree->Branch("ncluster_1d_L3_S1_v", &ncluster_1d_L3_S1_v,"ncluster_1d_L3_S1_v/I");
115 tree->Branch("ncluster_1d_L3_S2_v", &ncluster_1d_L3_S2_v,"ncluster_1d_L3_S2_v/I");
116 tree->Branch("cluster_1d_ID", &cluster_1d_ID,"cluster_1d_ID[ncluster]/I");
117 tree->Branch("cluster_1d_t", &cluster_1d_t,"cluster_1d_t[ncluster]/D");
118 tree->Branch("cluster_1d_tmean", &cluster_1d_tmean,"cluster_1d_tmean[ncluster]/D");
119 tree->Branch("cluster_1d_tqmax", &cluster_1d_tqmax,"cluster_1d_tqmax[ncluster]/D");
120 tree->Branch("cluster_1d_q", &cluster_1d_q,"cluster_1d_q[ncluster]/D");
121 tree->Branch("cluster_1d_r", &cluster_1d_r,"cluster_1d_r[ncluster]/D");
122 tree->Branch("cluster_1d_v", &cluster_1d_v, "cluster_1d_v[ncluster]/D");
123 tree->Branch("cluster_1d_v_cc", &cluster_1d_v_cc, "cluster_1d_v_cc[ncluster]/D");
124 tree->Branch("cluster_1d_v_tpc", &cluster_1d_v_tpc, "cluster_1d_v_tpc[ncluster]/D");
125 tree->Branch("cluster_1d_phi", &cluster_1d_phi, "cluster_1d_phi[ncluster]/D");
126 tree->Branch("cluster_1d_phi_cc", &cluster_1d_phi_cc, "cluster_1d_phi_cc[ncluster]/D");
127 tree->Branch("cluster_1d_phi_tpc", &cluster_1d_phi_tpc, "cluster_1d_phi_tpc[ncluster]/D");
128 tree->Branch("cluster_1d_layerid", &cluster_1d_layerid,"cluster_1d_layerid[ncluster]/I");
129 tree->Branch("cluster_1d_sheetid", &cluster_1d_sheetid,"cluster_1d_sheetid[ncluster]/I");
130 tree->Branch("cluster_1d_view", &cluster_1d_view,"cluster_1d_view[ncluster]/I");
131 tree->Branch("cluster_1d_strip1", &cluster_1d_strip1, "cluster_1d_strip1[ncluster]/I");
132 tree->Branch("cluster_1d_strip2", &cluster_1d_strip2, "cluster_1d_strip2[ncluster]/I");
133 tree->Branch("cluster_1d_size", &cluster_1d_size,"cluster_1d_size[ncluster]/I");
134 tree->Branch("cluster_1d_slope_tpc", &cluster_1d_slope_tpc,"cluster_1d_slope_tpc[ncluster]/D");
135 tree->Branch("cluster_1d_inter_tpc", &cluster_1d_inter_tpc,"cluster_1d_inter_tpc[ncluster]/D");
136 tree->Branch("cluster_1d_hitindex", cluster_1d_hitindex,"cluster_1d_hitindex[ncluster][50]/I");
137
138 // 2d
139 tree->Branch("ncluster_2d", &ncluster_2d,"ncluster_2d/I");
140 tree->Branch("cluster_2d_ID", &cluster_2d_ID,"cluster_2d_ID[ncluster]/I");
141 tree->Branch("cluster_2d_t", &cluster_2d_t,"cluster_2d_t[ncluster]/D");
142 tree->Branch("cluster_2d_tmean", &cluster_2d_tmean,"cluster_2d_tmean[ncluster]/D");
143 tree->Branch("cluster_2d_tqmax", &cluster_2d_tqmax,"cluster_2d_tqmax[ncluster]/D");
144 tree->Branch("cluster_2d_q", &cluster_2d_q,"cluster_2d_q[ncluster]/D");
145 tree->Branch("cluster_2d_r", &cluster_2d_r,"cluster_2d_r[ncluster]/D");
146 tree->Branch("cluster_2d_z", &cluster_2d_z,"cluster_2d_z[ncluster]/D");
147 tree->Branch("cluster_2d_z_cc", &cluster_2d_z_cc, "cluster_2d_z_cc[ncluster]/D");
148 tree->Branch("cluster_2d_z_tpc", &cluster_2d_z_tpc, "cluster_2d_z_tpc[ncluster]/D");
149 tree->Branch("cluster_2d_phi", &cluster_2d_phi, "cluster_2d_phi[ncluster]/D");
150 tree->Branch("cluster_2d_phi_cc", &cluster_2d_phi_cc, "cluster_2d_phi_cc[ncluster]/D");
151 tree->Branch("cluster_2d_phi_tpc", &cluster_2d_phi_tpc, "cluster_2d_phi_tpc[ncluster]/D");
152 tree->Branch("cluster_2d_layerid", &cluster_2d_layerid,"cluster_2d_layerid[ncluster]/I");
153 tree->Branch("cluster_2d_sheetid", &cluster_2d_sheetid,"cluster_2d_sheetid[ncluster]/I");
154 tree->Branch("cluster_2d_view", &cluster_2d_view,"cluster_2d_view[ncluster]/I");
155 tree->Branch("cluster_2d_idx", &cluster_2d_idx, "cluster_2d_idx[ncluster]/I");
156 tree->Branch("cluster_2d_idv", &cluster_2d_idv, "cluster_2d_idv[ncluster]/I");
157 tree->Branch("cluster_2d_highest", &cluster_2d_highest,"cluster_2d_highest[ncluster]/I");
158
159}
160
161
162void TestTrack::DefineTrackTree() {
163
164 // parameters
165 tree->Branch("track_dr", &track_dr, "track_dr/D");
166 tree->Branch("track_phi0", &track_phi0, "track_phi0/D");
167 tree->Branch("track_dz", &track_dz, "track_dz/D");
168 tree->Branch("track_tanL", &track_tanL, "track_tanL/D");
169 tree->Branch("track_chi2", &track_chi2, "track_chi2/D");
170
171 // clusters
172 tree->Branch("track_nfitpoint", &track_nfitpoint, "track_nfitpoint/I");
173 tree->Branch("track_clusterid", &track_clusterid,"track_clusterid[track_nfitpoint]/I");
174 tree->Branch("track_layerid", &track_layerid,"track_layerid[track_nfitpoint]/I");
175 tree->Branch("track_sheetid", &track_sheetid,"track_sheetid[track_nfitpoint]/I");
176
177 // layer/sheet under test (if none these are -1)
178 tree->Branch("track_test_layerid", &track_test_layerid,"track_test_layerid/I");
179 tree->Branch("track_test_sheetid", &track_test_sheetid,"track_test_sheetid/I");
180
181 // poca
182 tree->Branch("track_xpoca_glo", &track_xpoca_glo, "track_xpoca_glo/D");
183 tree->Branch("track_ypoca_glo", &track_ypoca_glo, "track_ypoca_glo/D");
184 tree->Branch("track_zpoca_glo", &track_zpoca_glo, "track_zpoca_glo/D");
185
186 // intersections
187 // L1
188 tree->Branch("track_x1top_glo", &track_x1top_glo, "track_x1top_glo/D");
189 tree->Branch("track_y1top_glo", &track_y1top_glo, "track_y1top_glo/D");
190 tree->Branch("track_z1top_glo", &track_z1top_glo, "track_z1top_glo/D");
191 tree->Branch("track_phi1top_loc", &track_phi1top_loc, "track_phi1top_loc/D");
192 tree->Branch("track_v1top_loc", &track_v1top_loc, "track_v1top_loc/D");
193 tree->Branch("track_x1bot_glo", &track_x1bot_glo, "track_x1bot_glo/D");
194 tree->Branch("track_y1bot_glo", &track_y1bot_glo, "track_y1bot_glo/D");
195 tree->Branch("track_z1bot_glo", &track_z1bot_glo, "track_z1bot_glo/D");
196 tree->Branch("track_phi1bot_loc", &track_phi1bot_loc, "track_phi1bot_loc/D");
197 tree->Branch("track_v1bot_loc", &track_v1bot_loc, "track_v1bot_loc/D");
198 // L2
199 tree->Branch("track_x2top_glo", &track_x2top_glo, "track_x2top_glo/D");
200 tree->Branch("track_y2top_glo", &track_y2top_glo, "track_y2top_glo/D");
201 tree->Branch("track_z2top_glo", &track_z2top_glo, "track_z2top_glo/D");
202 tree->Branch("track_phi2top_loc", &track_phi2top_loc, "track_phi2top_loc/D");
203 tree->Branch("track_v2top_loc", &track_v2top_loc, "track_v2top_loc/D");
204 tree->Branch("track_x2bot_glo", &track_x2bot_glo, "track_x2bot_glo/D");
205 tree->Branch("track_y2bot_glo", &track_y2bot_glo, "track_y2bot_glo/D");
206 tree->Branch("track_z2bot_glo", &track_z2bot_glo, "track_z2bot_glo/D");
207 tree->Branch("track_phi2bot_loc", &track_phi2bot_loc, "track_phi2bot_loc/D");
208 tree->Branch("track_v2bot_loc", &track_v2bot_loc, "track_v2bot_loc/D");
209 // L3
210 tree->Branch("track_x3top_glo", &track_x3top_glo, "track_x3top_glo/D");
211 tree->Branch("track_y3top_glo", &track_y3top_glo, "track_y3top_glo/D");
212 tree->Branch("track_z3top_glo", &track_z3top_glo, "track_z3top_glo/D");
213 tree->Branch("track_phi3top_loc", &track_phi3top_loc, "track_phi3top_loc/D");
214 tree->Branch("track_v3top_loc", &track_v3top_loc, "track_v3top_loc/D");
215 tree->Branch("track_x3bot_glo", &track_x3bot_glo, "track_x3bot_glo/D");
216 tree->Branch("track_y3bot_glo", &track_y3bot_glo, "track_y3bot_glo/D");
217 tree->Branch("track_z3bot_glo", &track_z3bot_glo, "track_z3bot_glo/D");
218 tree->Branch("track_phi3bot_loc", &track_phi3bot_loc, "track_phi3bot_loc/D");
219 tree->Branch("track_v3bot_loc", &track_v3bot_loc, "track_v3bot_loc/D");
220
221
222 // Incident Angles
223 tree->Branch("ang_xy_L1", &ang_xy_L1, "ang_xy_L1/D");
224 tree->Branch("ang_yz_L1", &ang_yz_L1, "ang_yz_L1/D");
225 tree->Branch("ang_xy_L2", &ang_xy_L2, "ang_xy_L2/D");
226 tree->Branch("ang_yz_L2", &ang_yz_L2, "ang_yz_L2/D");
227 tree->Branch("ang_xy_L3", &ang_xy_L3, "ang_xy_L3/D");
228 tree->Branch("ang_yz_L3", &ang_yz_L3, "ang_yz_L3/D");
229
230}
231
232
233
235 reset_map();
238 reset_hit();
239 reset_track();
240}
241
243 // event = 0;
244 nhit = 0;
245
246 for(int ihit = 0; ihit < MAXNOFHITS; ihit++) {
247 hit_strip[ihit] = -1;
248 hit_view[ihit] = -1;
249 hit_layer[ihit] = -1;
250 hit_sheet[ihit] = -1;
251 hit_length[ihit] = -1;
252 hit_channel[ihit] = -1;
253 hit_roc[ihit] = -1;
254 hit_feb[ihit] = -1;
255 hit_tiger[ihit] = -1;
256 hit_chip[ihit] = -1;
257 hit_t[ihit] = 0;
258 hit_q[ihit] = 0;
259 hit_x_tpc[ihit] = 0;
260 hit_z_tpc[ihit] = 0;
261 hit_ex_tpc[ihit] = 0;
262 hit_ez_tpc[ihit] = 0;
263 hit_deltax_tpc[ihit] = 0;
264 hit_deltaz_tpc[ihit] = 0;
265 hit_order[ihit] = -1;
266 hit_quality[ihit] = 0;
267 hit_selgooddigi[ihit] = 0;
268 }
269}
270
272
273 ncluster_1d = 0;
274 ncluster_1d_L1_S1_x = 0;
275 ncluster_1d_L2_S1_x = 0;
276 ncluster_1d_L2_S2_x = 0;
277 ncluster_1d_L3_S1_x = 0;
278 ncluster_1d_L3_S2_x = 0;
279 ncluster_1d_L1_S1_v = 0;
280 ncluster_1d_L2_S1_v = 0;
281 ncluster_1d_L2_S2_v = 0;
282 ncluster_1d_L3_S1_v = 0;
283 ncluster_1d_L3_S2_v = 0;
284
285 for(int iclu = 0; iclu < MAXNOFCLUSTERS; iclu++)
286 {
287 cluster_1d_ID[iclu] = -1;
288 cluster_1d_t[iclu] = 0.;
289 cluster_1d_tmean[iclu] = 0.;
290 cluster_1d_tqmax[iclu] = 0.;
291 cluster_1d_q[iclu] = 0.;
292 cluster_1d_r[iclu] = 0.;
293 cluster_1d_v[iclu] = 0.;
294 cluster_1d_phi[iclu] = 0.;
295 cluster_1d_v_cc[iclu] = 0.;
296 cluster_1d_phi_cc[iclu] = 0.;
297 cluster_1d_v_tpc[iclu] = 0.;
298 cluster_1d_phi_tpc[iclu] = 0.;
299 cluster_1d_slope_tpc[iclu] = 0.;
300 cluster_1d_inter_tpc[iclu] = 0.;
301 cluster_1d_layerid[iclu] = -1;
302 cluster_1d_sheetid[iclu] = -1;
303 cluster_1d_view[iclu] = -1;
304 cluster_1d_size[iclu] = -1;
305 cluster_1d_strip1[iclu] = -1;
306 cluster_1d_strip2[iclu] = -1;
307 for(int ihit = 0; ihit < MAXNOFHITS; ihit++) cluster_1d_hitindex[iclu][ihit] = -1;
308 }
309}
310
312
313 ncluster_2d = 0;
314 ncluster_2d_L1_S1 = 0;
315 ncluster_2d_L2_S1 = 0;
316 ncluster_2d_L2_S2 = 0;
317 ncluster_2d_L3_S1 = 0;
318 ncluster_2d_L3_S2 = 0;
319
320 for(int iclu = 0; iclu < MAXNOFCLUSTERS; iclu++)
321 {
322 cluster_2d_ID[iclu] = -1;
323 cluster_2d_t[iclu] = 0.;
324 cluster_2d_tmean[iclu] = 0.;
325 cluster_2d_tqmax[iclu] = 0.;
326 cluster_2d_q[iclu] = 0.;
327 cluster_2d_r[iclu] = 0.;
328 cluster_2d_z[iclu] = 0.;
329 cluster_2d_phi[iclu] = 0.;
330 cluster_2d_z_cc[iclu] = 0.;
331 cluster_2d_phi_cc[iclu] = 0.;
332 cluster_2d_z_tpc[iclu] = 0.;
333 cluster_2d_phi_tpc[iclu] = 0.;
334 cluster_2d_layerid[iclu] = -1;
335 cluster_2d_sheetid[iclu] = -1;
336 cluster_2d_view[iclu] = -1;
337 cluster_2d_idx[iclu] = -1;
338 cluster_2d_idv[iclu] = -1;
339 cluster_2d_highest[iclu] = -1;
340 }
341}
342
344 map_L1_S1_stripx_to_hit.clear();
345 map_L2_S1_stripx_to_hit.clear();
346 map_L2_S2_stripx_to_hit.clear();
347 map_L3_S1_stripx_to_hit.clear();
348 map_L3_S2_stripx_to_hit.clear();
349 map_L1_S1_stripv_to_hit.clear();
350 map_L2_S1_stripv_to_hit.clear();
351 map_L2_S2_stripv_to_hit.clear();
352 map_L3_S1_stripv_to_hit.clear();
353 map_L3_S2_stripv_to_hit.clear();
354}
355
357
358 // parameters
359 track_dr = -9999;
360 track_phi0 = -9999;
361 track_dz = -9999;
362 track_tanL = -9999;
363 track_chi2 = 9999;
364
365 // clusters
366 track_nfitpoint = 0;
367 for(int iclus=0; iclus < MAXNOFFITPOINT; iclus++) {
368 track_clusterid[iclus] = -1;
369 track_layerid[iclus] = -1;
370 track_sheetid[iclus] = -1;
371 }
372
373 // planes under test
374 track_test_layerid = -1;
375 track_test_sheetid = -1;
376
377 // poca
378 track_xpoca_glo = -9999;
379 track_ypoca_glo = -9999;
380 track_zpoca_glo = -9999;
381
382 // intersections
383 // L1
384 track_x1top_glo = -9999;
385 track_y1top_glo = -9999;
386 track_z1top_glo = -9999;
387 track_x1bot_glo = -9999;
388 track_y1bot_glo = -9999;
389 track_z1bot_glo = -9999;
390 // L2
391 track_x2top_glo = -9999;
392 track_y2top_glo = -9999;
393 track_z2top_glo = -9999;
394 track_x2bot_glo = -9999;
395 track_y2bot_glo = -9999;
396 track_z2bot_glo = -9999;
397 // L3
398 track_x3top_glo = -9999;
399 track_y3top_glo = -9999;
400 track_z3top_glo = -9999;
401 track_x3bot_glo = -9999;
402 track_y3bot_glo = -9999;
403 track_z3bot_glo = -9999;
404
405}
406
407bool TestTrack::selDigi(CgemDigiCol::iterator iter, int sel)
408{
409 if(sel==0) return true;
410 else {
411 double time = (*iter)->getTime_ns();
412 bool timeIsGood=true;
413 if(time<m_minDigiTime||time>m_maxDigiTime) timeIsGood=false;
414
415 double Q = (*iter)->getCharge_fc();
416 bool chargeIsGood=true;
417 if(Q<myQMin) chargeIsGood=false;
418
419 const Identifier ident = (*iter)->identify();
420 int layer = CgemID::layer(ident);
421 int sheet = CgemID::sheet(ident);
422 int strip = CgemID::strip(ident);
423 int view = 1;
424 bool is_xstrip = CgemID::is_xstrip(ident);
425 if(is_xstrip == true) view = 0;
426 int quality = lutreader->GetQuality(layer, sheet, view, strip);
427 bool qualityIsGood=true;
428 if(quality!=0) qualityIsGood=false;
429
430 if(sel==1) return timeIsGood&&chargeIsGood;
431 else if(sel==-1) return !timeIsGood&&chargeIsGood;
432 else if(sel==2) return timeIsGood&&chargeIsGood&&qualityIsGood;
433 }
434 return false;
435
436}
437
438
439std::map<int, std::vector < int > > * TestTrack::GetStripToHitMap(int ilayer, int isheet, int iview) {
440
441 if(iview==0) {
442 if(ilayer == 0 && isheet == 0) return &map_L1_S1_stripx_to_hit;
443 else if(ilayer == 1 && isheet == 0) return &map_L2_S1_stripx_to_hit;
444 else if(ilayer == 1 && isheet == 1) return &map_L2_S2_stripx_to_hit;
445 else if(ilayer == 2 && isheet == 0) return &map_L3_S1_stripx_to_hit;
446 else if(ilayer == 2 && isheet == 1) return &map_L3_S2_stripx_to_hit;
447 }
448 else if(iview==1) {
449 if(ilayer == 0 && isheet == 0) return &map_L1_S1_stripv_to_hit;
450 else if(ilayer == 1 && isheet == 0) return &map_L2_S1_stripv_to_hit;
451 else if(ilayer == 1 && isheet == 1) return &map_L2_S2_stripv_to_hit;
452 else if(ilayer == 2 && isheet == 0) return &map_L3_S1_stripv_to_hit;
453 else if(ilayer == 2 && isheet == 1) return &map_L3_S2_stripv_to_hit;
454 }
455 return NULL;
456}
457
458
460 //cout<<"TestTrack INIT Begin"<<endl;
461 MsgStream log(msgSvc(), name());
462 log << MSG::INFO << "TestTrack initialize()" << endreq;
463
464
465 // CgemGeomSvc
466 StatusCode sc;
467 sc = service("CgemGeomSvc", m_SvcCgem);
468 if(sc != StatusCode::SUCCESS) {
469 log << MSG::ERROR << "can not use CgemGeomSvc" << endreq;
470 return StatusCode::FAILURE;
471 }
472
473 anode = m_SvcCgem->getReadoutPlane(0, 0);
474 anode_mid_gap_L1 = anode->getMidRAtGap();
475 anode = m_SvcCgem->getReadoutPlane(1, 0);
476 anode_mid_gap_L2 = anode->getMidRAtGap();
477 anode = m_SvcCgem->getReadoutPlane(2, 0);
478 anode_mid_gap_L3 = anode->getMidRAtGap();
479
480 midplane = m_SvcCgem->getMidDriftPtr();
481 alignment = m_SvcCgem->getAlignPtr() ;
482
483 // LUT
484 lutreader = new CgemLUTReader(lutfile);
485 lutreader->ReadLUT();
486
487 output = new TFile((TString)OutputFileName, "RECREATE");
488 tree = new TTree("tree","hit, cluster and track info tree");
489 DefineHitTree();
490 DefineClusterTree();
491 DefineTrackTree();
492
493 // --- get CgemCalibFunSvc ---
494 sc = service ("CgemCalibFunSvc", myCgemCalibSvc);
495 if ( sc.isFailure() ){
496 cout<< name() << "Could not load MdcCalibFunSvc!" << endl;
497 return sc;
498 }
499
500 event=0;
501 //cout<<"TestTrack INIT End"<<endl;
502 return StatusCode::SUCCESS;
503
504}
505
507 bool print_debug = false;
508
509 //cout<<"TestTrack EXE Begin"<<endl;
510 MsgStream log(msgSvc(), name());
511
512 // if(event%1000==0) cout << "--------->TestTrack::execute " << event << endl;
513 reset();
514 //cout<<"Reset done"<<endl;
515
516 //interface to event data service
517 ISvcLocator* svcLocator = Gaudi::svcLocator();
518 StatusCode sc=svcLocator->service("EventDataSvc", m_evtSvc);
519 if (sc.isFailure())
520 cout<<"Could not accesss EventDataSvc!"<<endl;
521 // -------------------------
522 //retrieve CGEM hits from TDS
523 SmartDataPtr<CgemDigiCol> aDigiCol(m_evtSvc,"/Event/Digi/CgemDigiCol");
524 if(!aDigiCol)
525 cout<<"Could not retrieve CGEM digi collection"<<endl;
526 nhit = aDigiCol->size();
527 // cout << "total hit " << nhit << endl;
528
529 // loop on hits
530 int ihit=0;
531 //cout<<"Pre loop"<<endl;
532
533 CgemDigiCol::iterator iDigiCol;
534 for(iDigiCol=aDigiCol->begin(); iDigiCol!=aDigiCol->end(); iDigiCol++)
535 {
536 //cout<<"Loop digi ihit: "<<ihit<<endl;
537 const Identifier ident = (*iDigiCol)->identify();
538 int strip = CgemID::strip(ident);
539 int layer = CgemID::layer(ident);
540 int sheet = CgemID::sheet(ident);
541 int view = 1;
542 bool is_xstrip = CgemID::is_xstrip(ident);
543 if(is_xstrip == true) view = 0;
544 double charge = (*iDigiCol)->getCharge_fc();
545 double time = (*iDigiCol)->getTime_ns();
546
547 hit_strip[ihit] = strip;
548 hit_layer[ihit] = layer;
549 hit_sheet[ihit] = sheet;
550 hit_view[ihit] = view;
551 hit_t[ihit] = time;
552 hit_q[ihit] = charge;
553
554 anode = m_SvcCgem->getReadoutPlane(layer, sheet);
555 if(view == 1) hit_length[ihit] = anode->getVStripLength(strip);
556 else hit_length[ihit] = anode->getLength();
557
558 int channel = lutreader->GetChannel(layer, sheet, view, strip);
559 int roc = lutreader->GetROC(layer, sheet, view, strip);
560 int feb = lutreader->GetFEB(layer, sheet, view, strip);
561 int tiger = lutreader->GetTIGER(layer, sheet, view, strip);
562 int chip = lutreader->GetChip(layer, sheet, view, strip);
563 int quality = lutreader->GetQuality(layer, sheet, view, strip);
564
565 hit_channel[ihit] = channel;
566 hit_roc[ihit] = roc;
567 hit_feb[ihit] = feb;
568 hit_tiger[ihit] = tiger;
569 hit_chip[ihit] = chip;
570 hit_quality[ihit] = quality;
571
572 //µTPC debug
573 if(print_debug) cout<<"Id: "<<ihit<<" layer: "<<layer<<" sheet: "<<sheet<<" view: "<<view<<" strip: "<<strip<<endl;
574 const double drift_gap = 5;
575 CgemGeoReadoutPlane* readoutPlane = m_SvcCgem->getReadoutPlane(layer,sheet);
576 double time_rising = myCgemCalibSvc->getTimeRising(layer, view, sheet, 0, 0, 0.);
577 double time_falling = myCgemCalibSvc->getTimeFalling(layer, view, sheet, 0, 0, 0.);
578 double time_gap = time_falling-time_rising;
579 double drift_velocity = drift_gap/time_gap;
580 double time_ns = get_Time(iDigiCol);
581 bool striptype = CgemID::is_xstrip((*iDigiCol)->identify());
582 int flagxv;
583 if(striptype == true) flagxv = 0;
584 else flagxv = 1;
585 double pos=9999.;
586 if(flagxv==0) pos=readoutPlane->getPhiFromXID(strip);
587 if(flagxv==1) pos=readoutPlane->getCentralVFromVID(strip);
588 hit_x_tpc[ihit] = pos;
589 hit_z_tpc[ihit] = time_ns*drift_velocity;
590 //
591
592 if(selDigi(iDigiCol, m_selGoodDigi)==true) {
593 hit_selgooddigi[ihit] = 1;
594
595 // cout << "HIT " << ihit << " strip " << strip << " layer " << layer << " sheet " << sheet << " view " << view << endl;
596 // map strips to hits (maybe more hits for the same strip)
597 std::map<int, std::vector < int > > *map_strip_to_hit = GetStripToHitMap(layer, sheet, view);
598 std::map<int, std::vector < int > >::iterator it1 = map_strip_to_hit->find(strip);
599 if (it1 != map_strip_to_hit->end()) {
600 it1->second.push_back(ihit);
601 }
602 else {
603 std::vector< int > hitlist;
604 hitlist.push_back(ihit);
605 std::pair<int, std::vector < int> > pair(strip, hitlist);
606 map_strip_to_hit->insert(pair);
607 }
608 }
609 // --------------------------------------------------------
610 ihit++;
611 }
612
613 //cout<<"End loop digi"<<endl;
614
615 // -------------------------------------------------------------------
616 //retrieve CGEM clusters from TDS
617 SmartDataPtr<RecCgemClusterCol> aClusterCol(m_evtSvc,"/Event/Recon/RecCgemClusterCol");
618 if(!aClusterCol)
619 cout<<"Could not retrieve CGEM cluster collection"<<endl;
620 int nclu = aClusterCol->size();
621 //cout << "total cluster " << nclu << endl;
622 if(nclu > MAXNOFCLUSTERS) {
623 std::cout << "nclu " << nclu << std::endl;
624 nclu = MAXNOFCLUSTERS; // CHECK HACK
625 }
626
627 int nclusterx = 0;
628 int nclusterv = 0;
629 int nclusterxv = 0;
630
631 int tmp_cluster_L1_S1 = -1;
632 int tmp_cluster_L2_S1 = -1;
633 int tmp_cluster_L2_S2 = -1;
634 int tmp_cluster_L3_S1 = -1;
635 int tmp_cluster_L3_S2 = -1;
636 double tmp_charge_L1_S1 = 0.;
637 double tmp_charge_L2_S1 = 0.;
638 double tmp_charge_L2_S2 = 0.;
639 double tmp_charge_L3_S1 = 0.;
640 double tmp_charge_L3_S2 = 0.;
641
642 ncluster = 0;
643
644 //cout<<"Pre loop cluster"<<endl;
645
646 RecCgemClusterCol::iterator iClusterCol;
647 for(iClusterCol=aClusterCol->begin(); iClusterCol!=aClusterCol->end(); iClusterCol++)
648 {
649
650 //cout<<"Loop Clus iclust: "<<ncluster<<endl;
651 if(ncluster==MAXNOFCLUSTERS) break;
652
653 int flag = (*iClusterCol)->getflag(); // 0=x 1=v 2=xv
654 int clusterid = (*iClusterCol)->getclusterid();
655 int trkid = (*iClusterCol)->getTrkId();
656 int layerid = (*iClusterCol)->getlayerid();
657 int sheetid = (*iClusterCol)->getsheetid();
658 double edep = (*iClusterCol)->getenergydeposit();
659 double phi = (*iClusterCol)->getrecphi();
660 double v = (*iClusterCol)->getrecv();
661 double z = (*iClusterCol)->getRecZ();
662 double phi_cc = (*iClusterCol)->getrecphi_CC();
663 double v_cc = (*iClusterCol)->getrecv_CC();
664 double z_cc = (*iClusterCol)->getRecZ_CC();
665 double phi_tpc = (*iClusterCol)->getrecphi_mTPC();
666 double v_tpc = (*iClusterCol)->getrecv_mTPC();
667 double z_tpc = (*iClusterCol)->getRecZ_mTPC();
668 double slope_tpc = (*iClusterCol)->getSlope_mTPC();
669 double inter_tpc = (*iClusterCol)->getInter_mTPC();
670
671 if(sheetid == -1) {
672 ncluster++;
673 continue; // CHECK HACK FOR NOW
674 }
675
676 // anode mid gap radius
677 anode = m_SvcCgem->getReadoutPlane(layerid, sheetid);
678 double anode_mid_gap = anode->getMidRAtGap();
679
680 // beginning and ending flags
681 // if 2D cluster --> they are the x & v 1D clusters
682 // if 1D cluster --> they are the first and last contigous strips
683 int flagB = (*iClusterCol)->getclusterflagb();
684 int flagE = (*iClusterCol)->getclusterflage();
685 int size_real = 0;
686 int min_strip = 9999;
687 int max_strip =-9999;
688 // ------------------------------------------------------------------- 1D cluster
689 // positions CC & uTPC
690 if(flag==0 || flag == 1) {
691 cluster_1d_ID[ncluster] = (int) clusterid;
692 // time & charge
693 cluster_1d_t[ncluster] = 0; // CHECK
694 cluster_1d_tmean[ncluster] = 0;
695 cluster_1d_tqmax[ncluster] = 0;
696 cluster_1d_q[ncluster] = edep;
697 // layer/sheet/view
698 cluster_1d_layerid[ncluster] = layerid;
699 cluster_1d_sheetid[ncluster] = sheetid;
700 cluster_1d_view[ncluster] = flag;
701 cluster_1d_r[ncluster] = anode_mid_gap;
702 cluster_1d_phi[ncluster] = phi;
703 cluster_1d_phi_cc[ncluster] = phi_cc;
704 cluster_1d_phi_tpc[ncluster] = phi_tpc;
705 cluster_1d_v[ncluster] = v;
706 cluster_1d_v_cc[ncluster] = v_cc;
707 cluster_1d_v_tpc[ncluster] = v_tpc;
708 cluster_1d_slope_tpc[ncluster] = slope_tpc;
709 cluster_1d_inter_tpc[ncluster] = inter_tpc;
710 // from strip1 to strip2
711 cluster_1d_strip1[ncluster] = flagB;
712 cluster_1d_strip2[ncluster] = flagE;
713 int size = flagE - flagB + 1;
714 cluster_1d_size[ncluster] = size;
715
716 //cout<<"\t pre hit"<<endl;
717
718 // get the hits
719 std::map<int, std::vector < int > > *read_map_strip_to_hit = GetStripToHitMap(layerid, sheetid, flag);
720 std::map<int, std::vector < int > >::iterator it2;
721 /**
722 cout << "1D_CLUSTER index " << clusterid << " or " << ncluster
723 << " layer " << layerid << " sheet " << sheetid
724 << " view " << cluster_1d_view[ncluster] << endl;
725 cout << " from " << flagB << " to " << flagE << endl;
726 cout << "hits: ";
727 **/
728
729 for(int istrip = 0; istrip < size; istrip++) {
730
731 //cout<<"\t istrip: "<<istrip<<endl;
732 //cout<<"\t stripid: "<<flagB + istrip<<endl;
733
734 int stripid = flagB + istrip;
735 //cout<<"\t it2 pre : "<<&it2<<endl;
736 it2 = read_map_strip_to_hit->find(stripid);
737 //cout<<"\t it2 post : "<<&it2<<endl;
738 //cout<<"\t it2 first: "<<it2->first<<endl;
739 if(it2->first!=stripid){
740 //cout<<"\t SKIP HIT"<<endl;
741 continue;
742 }
743 //cout<<"\t it2 second: "<<&it2->second<<endl;
744 //cout<<"\t it2 second size: "<<it2->second.size()<<endl;
745 if(it2->second.size()!=1){
746 //cout<<"\t WRONG SIZE"<<endl;
747 continue;
748 }
749 //cout<<"\t it2 second: "<<it2->second.at(0)<<endl;
750 std::vector< int > hitlist = it2->second;
751 //cout<<"\t empty: "<<hitlist.empty()<<endl;
752 if(hitlist.empty()){
753 //cout<<"\t EMPTY HIT"<<endl;
754 continue;
755 }
756 int size_hitlist = hitlist.size();
757 cluster_1d_hitindex[ncluster][istrip] = hitlist[size_hitlist-1]; // take only the first hit CHECK THIS HAS TO BE CHANGED!
758 }
759
760 if(print_debug) cout<<"N clus: "<<ncluster<<endl;
761 if(print_debug) cout<<"size: "<<size<<endl;
762
763 float min_hit_time = 999999;
764 float hit_mean_time = 0;
765 float hit_qmax_time = 0;
766 float hit_qmax = -99999;
767
768
769 CgemDigiCol::iterator iDigiCol;
770 for(iDigiCol=aDigiCol->begin(); iDigiCol!=aDigiCol->end(); iDigiCol++){
771 const Identifier ident = (*iDigiCol)->identify();
772 int strip = CgemID::strip(ident);
773 int layer = CgemID::layer(ident);
774 int sheet = CgemID::sheet(ident);
775 int view = 1;
776 bool is_xstrip = CgemID::is_xstrip(ident);
777 if(is_xstrip == true) view = 0;
778 if(layer==cluster_1d_layerid[ncluster] && sheet==cluster_1d_sheetid[ncluster] && view==cluster_1d_view[ncluster] && strip>=cluster_1d_strip1[ncluster] && strip<=cluster_1d_strip2[ncluster]){
779 if(strip<min_strip) min_strip = strip;
780 if(strip>max_strip) max_strip = strip;
781 size_real++;
782 }
783 }
784 cluster_1d_size_real[ncluster]=size_real;
785 cluster_1d_size_max[ncluster]=max_strip-min_strip+1;
786
787 for(int istrip = 0; istrip < size; istrip++) {
788 //Faster hit time
789 int idhit = cluster_1d_hitindex[ncluster][istrip];
790 if(hit_t[idhit]<min_hit_time) min_hit_time = hit_t[idhit];
791 //Mean hit time
792 hit_mean_time += hit_t[idhit];
793 //Qmax hit time
794 if(hit_qmax<hit_q[idhit]) {
795 hit_qmax=hit_q[idhit];
796 hit_qmax_time=hit_t[idhit];
797 }
798 }
799 hit_mean_time /= size;
800
801 cluster_1d_t[ncluster] = min_hit_time;
802 cluster_1d_tmean[ncluster] = hit_mean_time;
803 cluster_1d_tqmax[ncluster] = hit_qmax_time;
804
805 if(print_debug) cout<<"size real: "<<cluster_1d_size_real[ncluster]<<endl;
806 if(print_debug) cout<<"size max : "<<cluster_1d_size_max[ncluster]<<endl;
807
808 if(print_debug) {
809 cout<<"ID hit: ";
810 for(int istrip = 0; istrip < size; istrip++) {
811 int idhit = cluster_1d_hitindex[ncluster][istrip];
812 cout<<cluster_1d_hitindex[ncluster][istrip]<<" ";
813 }
814 cout<<endl;
815
816 cout<<"Strip in the cluster: ";
817 for(iDigiCol=aDigiCol->begin(); iDigiCol!=aDigiCol->end(); iDigiCol++){
818 const Identifier ident = (*iDigiCol)->identify();
819 int strip = CgemID::strip(ident);
820 int layer = CgemID::layer(ident);
821 int sheet = CgemID::sheet(ident);
822 int view = 1;
823 bool is_xstrip = CgemID::is_xstrip(ident);
824 if(is_xstrip == true) view = 0;
825 if(layer==cluster_1d_layerid[ncluster] && sheet==cluster_1d_sheetid[ncluster] && view==cluster_1d_view[ncluster] && strip>=cluster_1d_strip1[ncluster] && strip<=cluster_1d_strip2[ncluster]){
826 cout<<strip<<" ";
827 }
828 }
829
830 cout<<"Check STRIP hit-cluster: ";
831 for(int istrip = 0; istrip < size; istrip++) {
832 int idhit = cluster_1d_hitindex[ncluster][istrip];
833 cout<<hit_strip[idhit]<<" ";
834 }
835 cout<<endl;
836
837 cout<<"Check x_tpc: ";
838 for(int istrip = 0; istrip < size; istrip++) {
839 int idhit = cluster_1d_hitindex[ncluster][istrip];
840 cout<<hit_x_tpc[idhit]<<" ";
841 }
842 cout<<endl;
843
844 cout<<"Check z_tpc: ";
845 for(int istrip = 0; istrip < size; istrip++) {
846 int idhit = cluster_1d_hitindex[ncluster][istrip];
847 cout<<hit_z_tpc[idhit]<<" ";
848 }
849 cout<<endl;
850
851 TF1 *f_tpc_cluster1 = new TF1("f_tpc_cluster1","pol1");
852 f_tpc_cluster1->SetParameters(cluster_1d_inter_tpc[ncluster],cluster_1d_slope_tpc[ncluster]);
853 cout<<"Check deltaX_tpc: ";
854 for(int istrip = 0; istrip < size; istrip++) {
855 int idhit = cluster_1d_hitindex[ncluster][istrip];
856 float deltaX = hit_x_tpc[idhit]-f_tpc_cluster1->GetX(hit_z_tpc[idhit]);
857 cout<<deltaX<<" ";
858 }
859
860 cout<<"Check deltaZ_tpc: ";
861 for(int istrip = 0; istrip < size; istrip++) {
862 int idhit = cluster_1d_hitindex[ncluster][istrip];
863 float deltaZ = hit_z_tpc[idhit]-f_tpc_cluster1->Eval(hit_x_tpc[idhit]);
864 cout<<deltaZ<<" ";
865 }
866 delete f_tpc_cluster1;
867 }
868
869 //uTPC debug - calibration
870 double time_rising = myCgemCalibSvc->getTimeRising(cluster_1d_layerid[ncluster], cluster_1d_view[ncluster], cluster_1d_sheetid[ncluster], 0, 0, 0.);
871 double time_falling = myCgemCalibSvc->getTimeFalling(cluster_1d_layerid[ncluster], cluster_1d_view[ncluster], cluster_1d_sheetid[ncluster], 0, 0, 0.);
872 double time_gap = time_falling-time_rising;
873 double drift_velocity = 5/time_gap;
874
875 //first round
876 float p0_tpc_corr = 0.003206 + size * (-0.0006184);
877 float p1_tpc_corr = -0.000500 + size * ( 0.0001325);
878 float shift0_tpc_corr = 0.003489 + size * ( 0.0003489);
879 //second round
880 p0_tpc_corr += 0.001030 + size * (-0.0006295);
881 p1_tpc_corr += 0.000902;
882 shift0_tpc_corr += 0.001105 + size * (-0.0002084);
883 //first rotation
884 p1_tpc_corr += 0.0005;
885 //second rotation
886 p1_tpc_corr += 0.0005;
887 //third rotation
888 p1_tpc_corr += 0.0005;
889 //forth rotation
890 p1_tpc_corr += 0.0005;
891 //fifth rotation
892 p1_tpc_corr += 0.0005;
893 //sixth rotation
894 p1_tpc_corr += 0.0010;
895 //seventh rotation
896 p1_tpc_corr += 0.0010;
897
898
899 if(cluster_1d_view[ncluster]!=0 || cluster_1d_inter_tpc[ncluster]== -9999 || cluster_1d_slope_tpc[ncluster]==-9999){
900 for(int istrip = 0; istrip < size; istrip++) {
901 int idhit = cluster_1d_hitindex[ncluster][istrip];
902 if(idhit==-1) continue;
903 hit_deltax_tpc[idhit] = -9999;
904 hit_deltaz_tpc[idhit] = -9999;
905 hit_ex_tpc[idhit] = -9999;
906 hit_ez_tpc[idhit] = -9999;
907 hit_order[idhit] = -9999;
908 }
909 }
910 else{
911 //cout<<"-----------"<<endl;
912 //cout<<"size: "<<size<<" \t p0: "<<p0_tpc_corr<<" \t p1: "<<p1_tpc_corr<<" \t s0: "<<shift0_tpc_corr<<endl;
913
914 //cout<<"--------"<<endl;
915 //cout<<"param: "<<cluster_1d_inter_tpc[ncluster]<<" "<<cluster_1d_slope_tpc[ncluster]<<endl;
916 //cout<<"Size: "<<size<<endl;
917 for(int istrip = 0; istrip < size; istrip++) {
918 int idhit = cluster_1d_hitindex[ncluster][istrip];
919 if(idhit==-1) continue;
920 float pitch = 0.66;
921 float eX = sqrt(pow(pitch/sqrt(12.),2)+pow(pitch/sqrt(12.)*cluster_1d_q[ncluster]/cluster_1d_size[ncluster]/hit_q[idhit],2));
922 float eZ = 5*drift_velocity;
923 hit_ex_tpc[idhit] = eX;
924 hit_ez_tpc[idhit] = eZ;
925 hit_order[idhit]=istrip;
926 //correction
927 float deltaX_corr = 0;
928 // ↗
929 if(cluster_1d_slope_tpc[ncluster]>0){
930 //if(cluster_1d_slope_tpc[ncluster]<0){
931
932 if(istrip==0) deltaX_corr -= p0_tpc_corr - shift0_tpc_corr;
933 else{
934 //deltaX_corr -= p0_tpc_corr + istrip * p1_tpc_corr;
935 }
936 }
937 // ↖
938 else{
939 if(istrip==size-1) deltaX_corr += p0_tpc_corr - shift0_tpc_corr;
940 else{
941 //deltaX_corr += p0_tpc_corr + (size-1-istrip) * p1_tpc_corr;
942 }
943 }
944 //cout<<"slope: "<<cluster_1d_slope_tpc[ncluster]<<" cc: "<<cluster_1d_phi_cc[ncluster]<<" x: "<<hit_x_tpc[idhit]<<" z: "<<hit_z_tpc[idhit]<<" dX: "<<deltaX_corr<<endl;
945 hit_x_tpc[idhit] += deltaX_corr;
946 double x_expc = (hit_z_tpc[idhit]-cluster_1d_inter_tpc[ncluster])/cluster_1d_slope_tpc[ncluster];
947 double z_expc = cluster_1d_slope_tpc[ncluster]*hit_x_tpc[idhit]+cluster_1d_inter_tpc[ncluster];
948 float deltaX = hit_x_tpc[idhit]-x_expc;
949 float deltaZ = hit_z_tpc[idhit]-z_expc;
950 hit_deltax_tpc[idhit] = deltaX;
951 hit_deltaz_tpc[idhit] = deltaZ;
952 }
953 }
954
955
956
957 /*
958 for(int istrip = 0; istrip < size; istrip++) {
959 //Get the strip ID
960 int idhit = cluster_1d_hitindex[ncluster][istrip];
961 cout<<cluster_1d_hitindex[ncluster][istrip]<<" ";
962 if(idhit!=-1){
963 //Find the strip
964 CgemDigiCol::iterator iDigiCol;
965 for(iDigiCol=aDigiCol->begin(); iDigiCol!=aDigiCol->end(); iDigiCol++){
966 const Identifier ident = (*iDigiCol)->identify();
967 int strip = CgemID::strip(ident);
968 int layer = CgemID::layer(ident);
969 int sheet = CgemID::sheet(ident);
970 int view = 1;
971 bool is_xstrip = CgemID::is_xstrip(ident);
972 if(is_xstrip == true) view = 0;
973 if(layer==cluster_1d_layerid[ncluster] && sheet==cluster_1d_sheetid[ncluster] && view==cluster_1d_view[ncluster] && strip>=cluster_1d_strip1[ncluster] && strip<=cluster_1d_strip2[ncluster]){
974 //do something
975 cout<<"("<<layer<<", "<<sheet<<", "<<view<<", "<<strip<<")";
976 }
977 }
978 }
979 else{
980 //do something else
981 cout<<"()";
982 }
983 }
984 cout<<endl;
985 */
986
987
988
989 // -----------------
990 ncluster_1d++;
991 }
992 // ----------
993 else if(flag==2 || flag==3) { // ------------------------------------- 2D - xv view
994 cluster_2d_ID[ncluster] = clusterid;
995 // time & charge
996 cluster_2d_t[ncluster] = 0; // CHECK
997 cluster_2d_tmean[ncluster] = 0;
998 cluster_2d_tqmax[ncluster] = 0;
999 cluster_2d_q[ncluster] = edep;
1000 // layer/sheet/view
1001 cluster_2d_layerid[ncluster] = layerid;
1002 cluster_2d_sheetid[ncluster] = sheetid;
1003 if(layerid==0 && phi>0) cluster_2d_sheetid[ncluster] = 1;
1004 cluster_2d_view[ncluster] = flag;
1005 cluster_2d_r[ncluster] = anode_mid_gap;
1006 cluster_2d_z[ncluster] = z;
1007 cluster_2d_z_cc[ncluster] = z_cc;
1008 cluster_2d_z_tpc[ncluster] = z_tpc;
1009 cluster_2d_phi[ncluster] = phi;
1010 cluster_2d_phi_cc[ncluster] = phi_cc;
1011 cluster_2d_phi_tpc[ncluster] = phi_tpc;
1012 // composing 2D_clusters
1013 cluster_2d_idx[ncluster] = flagB;
1014 cluster_2d_idv[ncluster] = flagE;
1015
1016 //Faster cluster time
1017 if(cluster_1d_t[flagB]<cluster_1d_t[flagE]) cluster_2d_t[ncluster]=cluster_1d_t[flagB];
1018 else cluster_2d_t[ncluster]=cluster_1d_t[flagE];
1019 //Mean time
1020 cluster_2d_tmean[ncluster] = 0.5*cluster_1d_tmean[flagB]+0.5*cluster_1d_tmean[flagE];
1021 //Max Q time
1022 if(cluster_1d_q[flagB]>cluster_1d_q[flagE]) cluster_2d_tqmax[ncluster]=cluster_1d_tqmax[flagB];
1023 else cluster_2d_tqmax[ncluster]=cluster_1d_tqmax[flagE];
1024
1025 /** cout << "2D_CLUSTER index " << clusterid << " or " << ncluster
1026 << " layer " << layerid << " sheet " << sheetid
1027 << " view " << cluster_2d_view[ncluster] << endl;
1028 cout << " idx " << flagB << " idv " << flagE << endl;
1029 **/
1030
1031 if(flag==2) { // HACK THIS
1032 // find the highest charge cluster
1033 if(layerid==0) {
1034 if(edep > tmp_charge_L1_S1) {
1035 tmp_charge_L1_S1 = edep; tmp_cluster_L1_S1 = ncluster;
1036 }
1037 }
1038 else if(layerid==1 && sheetid==0) {
1039 if(edep > tmp_charge_L2_S1){
1040 tmp_charge_L2_S1 = edep; tmp_cluster_L2_S1 = ncluster;
1041 }
1042 }
1043 else if(layerid==1 && sheetid==1) {
1044 if(edep > tmp_charge_L2_S2){
1045 tmp_charge_L2_S2 = edep; tmp_cluster_L2_S2 = ncluster;
1046 }
1047 }
1048 else if(layerid==2 && sheetid==0) {
1049 if(edep > tmp_charge_L3_S1){
1050 tmp_charge_L3_S1 = edep; tmp_cluster_L3_S1 = ncluster;
1051 }
1052 }
1053 else if(layerid==2 && sheetid==1) {
1054 if(edep > tmp_charge_L3_S2){
1055 tmp_charge_L3_S2 = edep; tmp_cluster_L3_S2 = ncluster;
1056 }
1057 }
1058 }
1059 // -----------
1060 ncluster_2d++;
1061 }
1062 // cluster counters
1063 ncluster++;
1064 if(flag == 0) {
1065 nclusterx++;
1066 if(layerid == 0) ncluster_1d_L1_S1_x++;
1067 else if(layerid == 1) {
1068 if(sheetid == 0) ncluster_1d_L2_S1_x++;
1069 else ncluster_1d_L2_S2_x++;
1070 }
1071 else if(layerid == 2) {
1072 if(sheetid == 0) ncluster_1d_L3_S1_x++;
1073 else ncluster_1d_L3_S2_x++;
1074 }
1075 }
1076 else if(flag == 1) {
1077 nclusterv++;
1078 if(layerid == 0) ncluster_1d_L1_S1_v++;
1079 else if(layerid == 1) {
1080 if(sheetid == 0) ncluster_1d_L2_S1_v++;
1081 else ncluster_1d_L2_S2_v++;
1082 }
1083 else if(layerid == 2) {
1084 if(sheetid == 0) ncluster_1d_L3_S1_v++;
1085 else ncluster_1d_L3_S2_v++;
1086 }
1087 }
1088 else if(flag == 2) {
1089 nclusterxv++;
1090 if(layerid == 0) ncluster_2d_L1_S1++;
1091 else if(layerid == 1) {
1092 if(sheetid == 0) ncluster_2d_L2_S1++;
1093 else ncluster_2d_L2_S2++;
1094 }
1095 else if(layerid == 2) {
1096 if(sheetid == 0) ncluster_2d_L3_S1++;
1097 else ncluster_2d_L3_S2++;
1098 }
1099 }
1100 // --------
1101 }
1102
1103 //cout<<"End Loop Clus"<<endl;
1104
1105 // std::cout << "highest charge cluster " << tmp_cluster_L1_S1 << " " << tmp_cluster_L2_S1 << " " << tmp_cluster_L2_S2 << std::endl;
1106 // std::cout << "charge " << tmp_charge_L1_S1 << " " << tmp_charge_L2_S1 << " " << tmp_charge_L2_S2 << std::endl;
1107
1108 // set the highest charge 2D - cluster
1109 if(tmp_cluster_L1_S1!=-1) cluster_2d_highest[tmp_cluster_L1_S1]=1;
1110 if(tmp_cluster_L2_S1!=-1) cluster_2d_highest[tmp_cluster_L2_S1]=1;
1111 if(tmp_cluster_L2_S2!=-1) cluster_2d_highest[tmp_cluster_L2_S2]=1;
1112 if(tmp_cluster_L3_S1!=-1) cluster_2d_highest[tmp_cluster_L3_S1]=1;
1113 if(tmp_cluster_L3_S2!=-1) cluster_2d_highest[tmp_cluster_L3_S2]=1;
1114 // -------------------------------------------------------------------
1115 //retrieve CGEM tracks from TDS
1116 SmartDataPtr<RecMdcTrackCol> aTrackCol(m_evtSvc,"/Event/Recon/RecMdcTrackCol");
1117 if(!aTrackCol) {
1118 //cout<<"Could not retrieve CGEM track collection"<<endl;
1119 }
1120 else {
1121 //cout << "total track " << aTrackCol->size() << endl;
1122
1123 //cout<<"Pre Loop track"<<endl;
1124
1125 RecMdcTrackCol::iterator iTrackCol;
1126 for(iTrackCol=aTrackCol->begin(); iTrackCol!=aTrackCol->end(); iTrackCol++)
1127 {
1128 //cout<<"Loop track"<<endl;
1129
1130 RecMdcTrack *track = *iTrackCol;
1131 /*
1132 cout << "track id " << track->trackId() << endl;
1133 cout << "dr " << track->helix(0) << endl;
1134 cout << "phi0 " << track->helix(1) << endl;
1135 cout << "dz " << track->helix(3) << endl;
1136 cout << "tanL " << track->helix(4) << endl;
1137 */
1138 if(track->trackId() != 0) continue;
1139
1140 track_chi2 = track->chi2();
1141 //cout << "chi2 " << track_chi2 << endl;
1142 track_dr = track->helix(0);
1143 track_phi0 = track->helix(1);
1144 track_dz = track->helix(3);
1145 track_tanL = track->helix(4);
1146
1147 ClusterRefVec vecclusters = track->getVecClusters();
1148 track_nfitpoint = vecclusters.size(); // nof 2D clusters, NOTE! track->getNcluster() gives you the number of 1D clusters
1149
1150 // is the plane under test?
1151 bool istestplane[3][2];
1152 for(int ilay=0; ilay<MAXNOFLAYER; ilay++) for(int ishe=0; ishe<MAXNOFSHEET; ishe++) istestplane[ilay][ishe] = true;
1153
1154 for(int iclus=0; iclus < track_nfitpoint; iclus++) {
1155 RecCgemCluster *tcluster = vecclusters.at(iclus);
1156 double phi = tcluster->getrecphi();
1157 double z = tcluster->getRecZ();
1158 track_clusterid[iclus] = tcluster->getclusterid();
1159
1160 track_layerid[iclus] = tcluster->getlayerid();
1161 track_sheetid[iclus] = tcluster->getsheetid();
1162 if(phi > 0) track_sheetid[iclus] = 1;
1163
1164 /*
1165 cout << "iclus " << iclus << " track_clusterid " << track_clusterid[iclus] << " phi " << phi
1166 << " layer " << track_layerid[iclus] << " sheet " << track_sheetid[iclus] << endl;
1167 */
1168 istestplane[track_layerid[iclus]][track_sheetid[iclus]] = false;
1169 }
1170
1171 for(int ilay=0; ilay<MAXNOFLAYER; ilay++) {
1172 for(int ishe=0; ishe<MAXNOFSHEET; ishe++) {
1173 /*
1174 cout << "situazione ilay " << ilay << " ishe " << ishe << " istestplane " << istestplane[ilay][ishe] << endl;
1175 */
1176 if(istestplane[ilay][ishe] == true) {
1177 track_test_layerid = ilay;
1178 track_test_sheetid = ishe;
1179 }
1180 }
1181 }
1182
1183 //cout << "UNDER TEST layer " << track_test_layerid << " sheet " << track_test_sheetid << endl;
1184
1185 // intersections - poca and intersections are computed in the aligned frame
1186 double xP; double yP; double zP;
1187 ComputePOCA(xP, yP, zP);
1188
1189 // L1
1190 double xP1; double yP1; double zP1; double phiP1; double vP1;
1191 double xP2; double yP2; double zP2; double phiP2; double vP2;
1192
1193 double angCR_xy_L1, angCR_yz_L1;
1194
1195 bool gotit1 = ComputeIntersection(0, xP1, yP1, zP1, phiP1, vP1, xP2, yP2, zP2, phiP2, vP2, angCR_xy_L1, angCR_yz_L1); //1->up 2->down
1196
1197 ang_xy_L1 = angCR_xy_L1;
1198 ang_yz_L1 = angCR_yz_L1;
1199
1200 // L2
1201 double xP3; double yP3; double zP3; double phiP3; double vP3;
1202 double xP4; double yP4; double zP4; double phiP4; double vP4;
1203
1204 double angCR_xy_L2, angCR_yz_L2;
1205
1206 bool gotit2 = ComputeIntersection(1, xP3, yP3, zP3, phiP3, vP3, xP4, yP4, zP4, phiP4, vP4, angCR_xy_L2, angCR_yz_L2); //3->up 4->down
1207
1208 ang_xy_L2 = angCR_xy_L2;
1209 ang_yz_L2 = angCR_yz_L2;
1210
1211 //L3
1212 double xP5; double yP5; double zP5; double phiP5; double vP5;
1213 double xP6; double yP6; double zP6; double phiP6; double vP6;
1214
1215 double angCR_xy_L3, angCR_yz_L3;
1216
1217 bool gotit3 = ComputeIntersection(2, xP5, yP5, zP5, phiP5, vP5, xP6, yP6, zP6, phiP6, vP6, angCR_xy_L3, angCR_yz_L3); //5->up 6->down
1218
1219 ang_xy_L3 = angCR_xy_L3;
1220 ang_yz_L3 = angCR_yz_L3;
1221
1222 if(gotit1==false || gotit2==false || gotit3==false) cout << "TestTrack: error in intersection calculation. Intersection on L1 " << gotit1 << ", on L2 " << gotit2 << ", on L3 " << gotit3 << endl;
1223
1224 // output
1225 // poca
1226 track_xpoca_glo = xP; track_ypoca_glo = yP; track_zpoca_glo = zP;
1227 // intersections
1228 // L1
1229 track_x1top_glo = xP1; track_y1top_glo = yP1; track_z1top_glo = zP1; track_phi1top_loc = phiP1; track_v1top_loc = vP1;
1230 track_x1bot_glo = xP2; track_y1bot_glo = yP2; track_z1bot_glo = zP2; track_phi1bot_loc = phiP2; track_v1bot_loc = vP2;
1231 // L2
1232 track_x2top_glo = xP3; track_y2top_glo = yP3; track_z2top_glo = zP3; track_phi2top_loc = phiP3; track_v2top_loc = vP3;
1233 track_x2bot_glo = xP4; track_y2bot_glo = yP4; track_z2bot_glo = zP4; track_phi2bot_loc = phiP4; track_v2bot_loc = vP4;
1234 //L3
1235 track_x3top_glo = xP5; track_y3top_glo = yP5; track_z3top_glo = zP5; track_phi3top_loc = phiP5; track_v3top_loc = vP5;
1236 track_x3bot_glo = xP6; track_y3bot_glo = yP6; track_z3bot_glo = zP6; track_phi3bot_loc = phiP6; track_v3bot_loc = vP6;
1237 }
1238 }
1239
1240 //cout<<"Loop track End"<<endl;
1241
1242 tree->Fill();
1243
1244 event++;
1245 //cout<<"TestTrack EXE End"<<endl;
1246 return StatusCode::SUCCESS;
1247}
1248
1250 MsgStream log(msgSvc(),name());
1251 log << MSG::INFO << "TestTrack finalize()" << endreq;
1252 output->Write();
1253 output->Close();
1254 return StatusCode::SUCCESS;
1255}
1256
1257// computation of P.O.C.A. = Point Of Closest Approach of the found
1258// track to the origin (0, 0, 0,) in the global, aligned reference frame
1259// --> xP, yP, zP is in the aligned frame!
1260void TestTrack::ComputePOCA(double &xP, double &yP, double &zP)
1261{
1262 // poca
1263 xP = track_dr * cos(track_phi0);
1264 yP = track_dr * sin(track_phi0);
1265 zP = track_dz;
1266}
1267
1268// Compute the intersection of the fitted track on the layerid-ith layer
1269// * layerid = 0, 1, 2 means L1, L2, L3
1270// * if align flag is on --> the intersection x, y, z is in the alighed frame
1271// otherwise the intersection x, y, z are in the non aligned frame
1272// * phi1, v1 are always in the local frame of the layer
1273bool TestTrack::ComputeIntersection(int layerid,
1274 double &x1, double &y1, double &z1, double& phi1, double &v1,
1275 double &x2, double &y2, double &z2, double& phi2, double &v2,
1276 double &angCR_xy, double &angCR_yz)
1277{
1278 StraightLine linefit(track_dr, track_phi0, track_dz, track_tanL);
1279 HepPoint3D posup, posdown, posup_temp, posdown_temp;
1280 double phivup[2], phivdown[2], phivup_temp[2], phivdown_temp[2];
1281 bool gotit;
1282
1283 if(align_flag==true) {
1284 // sheet bottom
1285 gotit = midplane->getPointAligned(layerid, 0, linefit, posup_temp, posdown, phivup_temp, phivdown);
1286 // sheet top
1287 gotit = midplane->getPointAligned(layerid, 1, linefit, posup, posdown_temp, phivup, phivdown_temp);
1288 }
1289 else gotit = midplane->getPointIdealGeom((2*layerid+1), linefit, posup, posdown, phivup, phivdown);
1290
1291 x1 = posup.x();
1292 y1 = posup.y();
1293 z1 = posup.z();
1294 phi1 = phivup[0];
1295 v1 = phivup[1];
1296
1297 x2 = posdown.x();
1298 y2 = posdown.y();
1299 z2 = posdown.z();
1300 phi2 = phivdown[0];
1301 v2 = phivdown[1];
1302
1303 Hep3Vector CosmicRay_xy(x1-x2, y1-y2, 0);
1304 Hep3Vector CosmicRay_yz( 0, y1-y2, z1-z2);
1305
1306 Hep3Vector NormalToCRayInPoint(x1, y1, 0);
1307 Hep3Vector zAxis(0, 0, 1);
1308
1309 angCR_xy = CosmicRay_xy.angle(NormalToCRayInPoint);
1310 angCR_yz = CosmicRay_yz.angle(zAxis);
1311
1312 /**
1313 cout << "layerid " << layerid << endl;
1314 cout << "up phi "<< phivup[0] << " da y/x " << TMath::ATan2(posup.y(), posup.x()) << endl;
1315 cout << "down phi "<< phivdown[0] << " da y/x " << TMath::ATan2(posdown.y(), posdown.x()) << endl;
1316 **/
1317
1318 return gotit;
1319
1320}
1321
1322float TestTrack::get_Time(CgemDigiCol::iterator iDigiCol){
1323 //Get digi time
1324 float time = (*iDigiCol)->getTime_ns();
1325 //Get rising time from calibration
1326 float time_rising = get_TimeRising(iDigiCol);
1327 //Get time-walk
1328 float time_walk = get_TimeWalk(iDigiCol);
1329 //Get time-reference
1330 float time_reference = get_TimeReference(iDigiCol);
1331 //
1332 float time_shift_custom = -35;
1333 time-=(time_rising+time_walk+time_reference+time_shift_custom);
1334 return time;
1335}
1336
1337float TestTrack::get_TimeRising(CgemDigiCol::iterator iDigiCol){
1338 float time_rising=0;
1339 //Get the digi information
1340 const Identifier ident = (*iDigiCol)->identify();
1341 int layerid = CgemID::layer(ident);
1342 int sheetid = CgemID::sheet(ident);
1343 int stripid = CgemID::strip(ident);
1344 int view = 1;
1345 bool is_xstrip = CgemID::is_xstrip(ident);
1346 if(is_xstrip == true) view = 0;
1347 float charge = (*iDigiCol)->getCharge_fc();
1348 //Get rising time from calibration
1349 time_rising = myCgemCalibSvc->getTimeRising(layerid, view, sheetid, stripid, charge, 0.);
1350 return time_rising;
1351}
1352
1353float TestTrack::get_TimeWalk(CgemDigiCol::iterator iDigiCol){
1354 float time_walk=0;
1355 const Identifier ident = (*iDigiCol)->identify();
1356 int layerid = CgemID::layer(ident);
1357 int sheetid = CgemID::sheet(ident);
1358 int stripid = CgemID::strip(ident);
1359 int view = 1;
1360 bool is_xstrip = CgemID::is_xstrip(ident);
1361 if(is_xstrip == true) view = 0;
1362 float thr = lutreader->Get_thr_T_fC(layerid, sheetid, view, stripid);
1363 float charge = (*iDigiCol)->getChargeChannel();
1364 time_walk = myCgemCalibSvc->getTimeWalk(charge,thr);
1365 return time_walk;
1366}
1367
1368float TestTrack::get_TimeReference(CgemDigiCol::iterator iDigiCol){
1369 float time_reference=0;
1370 const Identifier ident = (*iDigiCol)->identify();
1371 int layerid = CgemID::layer(ident);
1372 int sheetid = CgemID::sheet(ident);
1373 int stripid = CgemID::strip(ident);
1374 int view = 1;
1375 bool is_xstrip = CgemID::is_xstrip(ident);
1376 if(is_xstrip == true) view = 0;
1377 time_reference += lutreader->GetSignal_FEBStartTime_ns(layerid, sheetid, view, stripid);
1378 time_reference += lutreader->GetSignal_StartTime_ns(layerid, sheetid, view, stripid);
1379 return time_reference;
1380}
1381
double sin(const BesAngle a)
Definition BesAngle.h:210
double cos(const BesAngle a)
Definition BesAngle.h:213
const double drift_gap
Double_t phi2
Double_t phi1
Double_t time
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
Definition KarLud.h:35
SmartRefVector< RecCgemCluster > ClusterRefVec
Definition RecMdcTrack.h:28
IMessageSvc * msgSvc()
#define MAXNOFSHEET
Definition TestTrack.h:28
#define MAXNOFFITPOINT
Definition TestTrack.h:26
#define MAXNOFCLUSTERS
Definition TestTrack.h:24
#define MAXNOFHITS
Definition TestTrack.h:25
#define MAXNOFLAYER
Definition TestTrack.h:27
double getVStripLength(int V_ID) const
double getCentralVFromVID(int V_ID) const
double getPhiFromXID(int X_ID) const
static int strip(const Identifier &id)
Definition CgemID.cxx:83
static int sheet(const Identifier &id)
Definition CgemID.cxx:77
static int layer(const Identifier &id)
Definition CgemID.cxx:71
static bool is_xstrip(const Identifier &id)
Definition CgemID.cxx:64
int GetChip(int ilayer, int isheet, int iview, int istrip)
float GetSignal_StartTime_ns(int ilayer, int isheet, int iview, int istrip)
int GetQuality(int ilayer, int isheet, int iview, int istrip)
int GetROC(int ilayer, int isheet, int iview, int istrip)
float Get_thr_T_fC(int ilayer, int isheet, int iview, int istrip)
float GetSignal_FEBStartTime_ns(int ilayer, int isheet, int iview, int istrip)
int GetChannel(int ilayer, int isheet, int iview, int istrip)
int GetTIGER(int ilayer, int isheet, int iview, int istrip)
int GetFEB(int ilayer, int isheet, int iview, int istrip)
bool getPointIdealGeom(int layer_vir, StraightLine pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
bool getPointAligned(int layer_vir, StraightLine pLine, HepPoint3D &posUp, HepPoint3D &posDown, double phiVUp[], double phiVDown[])
const double chi2() const
Definition DstMdcTrack.h:66
const int trackId() const
Definition DstMdcTrack.h:52
const HepVector helix() const
......
virtual double getTimeRising(int layer, int xvFlag, int sheet, int stripID, double Q=100., double z=0.) const =0
virtual double getTimeFalling(int layer, int xvFlag, int sheet, int stripID, double Q=100., double z=0.) const =0
virtual double getTimeWalk(int layer, int xvFlag, int sheet, int stripID, double Q) const =0
virtual CgemGeoReadoutPlane * getReadoutPlane(int iLayer, int iSheet) const =0
virtual CgemGeoAlign * getAlignPtr() const =0
virtual CgemMidDriftPlane * getMidDriftPtr() const =0
double getRecZ(void) const
int getclusterid(void) const
int getlayerid(void) const
double getrecphi(void) const
int getsheetid(void) const
const ClusterRefVec getVecClusters() const
Definition RecMdcTrack.h:70
void reset_cluster_2d()
void reset_cluster_1d()
StatusCode finalize()
void reset()
TestTrack(const std::string &name, ISvcLocator *pSvcLocator)
Definition TestTrack.cxx:47
void reset_map()
void reset_track()
StatusCode initialize()
StatusCode execute()
void reset_hit()