38{
39 barrelHit1.clear();
40 barrelHit2.clear();
41 ecapHit.clear();
42 wcapHit.clear();
43
44 for(std::vector<int>::iterator
iter = vtofHit.begin();
iter != vtofHit.end();
iter++) {
45 int tofId = (*iter);
46 int part, layer, im;
47 part = int (tofId/10000.);
48 layer = int ((tofId - part*10000)/1000.);
49 im = int ((tofId - part*10000 - layer*1000)/10.);
50 if(part == 0) {
51
52 if(find(ecapHit.begin(),ecapHit.end(),im) == ecapHit.end()) {
53 ecapHit.push_back(im);
54 }
55 }
56 else if (part == 2) {
57
58 if(find(wcapHit.begin(),wcapHit.end(),im) == wcapHit.end()) {
59 wcapHit.push_back(im);
60 }
61 }
62 else {
63 if(layer == 0) {
64
65 if(find(barrelHit1.begin(),barrelHit1.end(),im) == barrelHit1.end()) {
66 barrelHit1.push_back(im);
67 }
68 }
69 if(layer == 1) {
70
71 if(find(barrelHit2.begin(),barrelHit2.end(),im) == barrelHit2.end()) {
72 barrelHit2.push_back(im);
73 }
74 }
75 }
76 }
77}