CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
MucTrigHit.cxx
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2//// BOOST --- BESIII Object_Oriented Simulation Tool /
3////
4////---------------------------------------------------------------------------/
5////
6////Description:
7////Author: Caogf
8////Created: March, 2007
9////Modified:
10////Comment:
11////
12//
13#include "Trigger/MucTrigHit.h"
14
16#include "Identifier/MucID.h"
18#include "RawEvent/DigiEvent.h"
19#include <math.h>
20using namespace std;
21
22MucTrigHit* MucTrigHit::muc_Pointer = 0;
23
25 if(!muc_Pointer) muc_Pointer = new MucTrigHit();
26 return muc_Pointer;
27}
28
30{
31}
32
34{
35}
36
38{
39 //reset values
40 for(int i =0; i<8; i++)
41 for(int j=0; j<4; j++)
42 for(int k=0; k<112; k++)
43 {
44 hitBR[i][j][k] = 0;
45 }
46 for(int i =0; i<2; i++)
47 for(int j=0; j<4; j++)
48 for(int k=0; k<4; k++)
49 for(int l=0; l<64; l++)
50 {
51 hitEC[i][j][k][l] = 0;
52 }
53
54 int partId, segId, gapId, stripId;
55 MucDigiCol::iterator iDigiCol;
56 for(iDigiCol=mucDigiCol->begin(); iDigiCol!=mucDigiCol->end(); iDigiCol++)
57 {
58 const Identifier ident = (*iDigiCol)->identify();
59 partId = MucID::part(ident);
60 segId = MucID::seg(ident);
61 gapId = MucID::gap(ident);
62 stripId = MucID::strip(ident);
63 if(partId == 1 && gapId < 4) {
64 hitBR[segId][gapId][stripId] = 1;
65 }
66 if(partId == 0 && gapId <4) hitEC[0][segId][gapId][stripId] = 1; //east endcap
67 if(partId == 2 && gapId <4) hitEC[1][segId][gapId][stripId] = 1; //west endcap
68 }
69}
70
72{
73 //reset values
74 for(int i =0; i<8; i++)
75 for(int j=0; j<4; j++)
76 for(int k=0; k<7; k++)
77 {
78 foBR[i][j][k] = 0;
79 }
80 for(int i =0; i<2; i++)
81 for(int j=0; j<4; j++)
82 for(int k=0; k<4; k++)
83 for(int l=0; l<4; l++)
84 {
85 foEC[i][j][k][l] = 0;
86 }
87 //get fastOr signal
88 for(int i =0; i<8; i++)
89 for(int j=0; j<4; j++)
90 for(int k=0; k<112; k++)
91 {
92 if(hitBR[i][j][k]==1) {
93 int nbox = (int) k/16;
94 foBR[i][j][nbox] = 1;
95 }
96 }
97 for(int i =0; i<2; i++)
98 for(int j=0; j<4; j++)
99 for(int k=0; k<4; k++)
100 for(int l=0; l<64; l++)
101 {
102 if(hitEC[i][j][k][l] == 1) {
103 int nbox = (int) l/16;
104 foEC[i][j][k][nbox] = 1;
105 }
106 }
107}
ObjectVector< MucDigi > MucDigiCol
Definition: MucDigi.h:29
static int part(const Identifier &id)
Definition: MucID.cxx:46
static int gap(const Identifier &id)
Definition: MucID.cxx:66
static int seg(const Identifier &id)
Definition: MucID.cxx:56
static int strip(const Identifier &id)
Definition: MucID.cxx:76
static MucTrigHit * get_Muc(void)
Definition: MucTrigHit.cxx:24
void getMucDigi(MucDigiCol *mucDigiCol)
Definition: MucTrigHit.cxx:37
void getFastOr()
Definition: MucTrigHit.cxx:71