37{
38
39 EClus_Z = false;
40 WClus_Z = false;
41
42 for(int j=0;j<TrigConf::TCPHINO_B;j++)
43 {
44 BClusterPhi[j] = 0;
45 for(int i=0;i<TrigConf::TCTHETANO_B;i++)
46 {
47 BClusterId[i][j] = 0;
48 }
49 }
50
51 for(int j =0;j<TrigConf::TCPHINO_E/2;j++)
52 {
53 if(j < TrigConf::TCPHINO_E/2) {
54 WEClusterPhi[j] = 0;
55 EEClusterPhi[j] = 0;
56 }
57 for(int i =0;i<TrigConf::TCTHETANO_E;i++)
58 {
59 EEClusterId[i][j] = 0;
60 WEClusterId[i][j] = 0;
61 }
62 }
63
64 std::vector<double> emcClusE;
65 emcClusE.clear();
66
67 for(int i=0;i<TrigConf::TCTHETANO_B;i++)
68 for(int j=0;j<TrigConf::TCPHINO_B;j++)
69 {
70
72 {
73 BClusterId[i][j] = 1;
74
75 int block_phi = int (j/5);
76 if(((block_phi%2 == 0) && i > 5) || ((block_phi%2 == 1) && i > 4)) WClus_Z = true;
77 else EClus_Z = true;
79 }
80 }
81
82 for(int i =0;i<TrigConf::TCTHETANO_E;i++)
83 for(int j =0;j<TrigConf::TCPHINO_E/2;j++)
84 {
85 if(
findCluster(0,i,j)) { EEClusterId[i][j] = 1; EClus_Z =
true; emcClusE.push_back(m_EmcTCFinder->
getEETCEnergy(i,j)); }
86 if(
findCluster(2,i,j)) { WEClusterId[i][j] = 1; WClus_Z =
true; emcClusE.push_back(m_EmcTCFinder->
getWETCEnergy(i,j)); }
87 }
88
89 for(int j = 0;j<TrigConf::TCPHINO_B;j++)
90 for(int i =0;i<TrigConf::TCTHETANO_B;i++)
91 {
92 if(BClusterId[i][j]==1)
93 {
94 BClusterPhi[j] = 1;
95 break;
96 }
97 }
98
99 for(int j =0;j<TrigConf::TCPHINO_E/2;j++)
100 for(int i =0;i<TrigConf::TCTHETANO_E;i++)
101 {
102 if(WEClusterId[i][j] == 1)
103 {
104 WEClusterPhi[j] = 1;
105 }
106 }
107
108 for(int j =0;j<TrigConf::TCPHINO_E/2;j++)
109 for(int i =0;i<TrigConf::TCTHETANO_E;i++)
110 {
111 if(EEClusterId[i][j] == 1)
112 {
113 EEClusterPhi[j] = 1;
114 }
115 }
116
117
118
119 int nbCluster = 0, neeCluster = 0, nweCluster = 0;
120
121 map<int,vector<complex<int> >, greater<int> > mClusId;
122 std::vector<complex<int> > vClusIdBR;
123 std::vector<complex<int> > vClusIdEE;
124 std::vector<complex<int> > vClusIdWE;
125 typedef pair<int, vector<complex<int> > > vpair;
126 vClusIdBR.clear();
127 vClusIdEE.clear();
128 vClusIdWE.clear();
129 mClusId.clear();
130
131 for(int i=0;i<TrigConf::TCTHETANO_B;i++)
132 for(int j=0;j<TrigConf::TCPHINO_B;j++)
133 {
134 int BClusId = BClusterId[i][j];
135 if(BClusId == 1) {
136 nbCluster++;
138 vClusIdBR.push_back(clusId);
139 }
140 }
141 for(int i=0; i<TrigConf::TCTHETANO_E; i++)
142 for(int j=0; j<TrigConf::TCPHINO_E/2; j++)
143 {
144 if(EEClusterPhi[j]) {
145 neeCluster++;
147 vClusIdEE.push_back(clusId);
148 }
149 if(WEClusterPhi[j]) {
150 nweCluster++;
152 vClusIdWE.push_back(clusId);
153 }
154 }
155
156 mClusId.insert(vpair(1,vClusIdBR));
157 mClusId.insert(vpair(0,vClusIdEE));
158 mClusId.insert(vpair(2,vClusIdWE));
159
160 ISvcLocator* svcLocator = Gaudi::svcLocator();
161 StatusCode sc = svcLocator->service("BesGlobalTrigSvc", m_tmpSvc);
163
169}
void setEmcNbCluster(int i)
void setEmcClusE(std::vector< double > i)
void setEmcClusId(map< int, vector< complex< int > >, greater< int > > i)
void setEmcNweCluster(int i)
void setEmcNeeCluster(int i)
bool findCluster(int partId, int TCThetaNb, int TCPhiNb)
double & getBTCEnergy(int i, int j)
double & getEETCEnergy(int i, int j)
double & getWETCEnergy(int i, int j)