11 #include "StFmsJetFilter.h"
12 #include "StGenParticle.h"
99 const static double etaGate[3]={2.4,4.4,30};
105 Float_t se[10] = {0};
106 Float_t seH[10] = {0};
107 Float_t seE[10] = {0};
109 Float_t se1[10] = {0};
110 Float_t seH1[10] = {0};
111 Float_t seE1[10] = {0};
113 Float_t se2[10] = {0};
114 Float_t seH2[10] = {0};
115 Float_t seE2[10] = {0};
123 Float_t en, phi, deltaphi, tot_e;
125 Float_t M_pi=TMath::Pi();
130 for (
int i=0;i<n;i++) {
131 tk = ptl(i);
if (!tk)
continue;
146 if (tk->Eta() < etaGate[0])
continue;
147 if (tk->Eta() > etaGate[1])
continue;
148 if (tk->GetStatusCode()!=1)
continue;
151 if(tk->GetPdgCode() ==111 || tk->GetPdgCode() ==221 || tk->GetPdgCode() ==22 || tk->GetPdgCode() ==11) isNeutral =1;
152 if(TMath::Abs(tk->GetPdgCode() ==13)|| TMath::Abs(tk->GetPdgCode() ==14))
continue;
161 if(phi<0) phi1 = phi+2*TMath::Pi();
163 for(
int ikk =0; ikk <8; ikk++){
166 if((phi1 > ik*(M_pi/4.)) && (phi1 < (ik+2.)*(M_pi/4.))) kk = 7-ikk;
167 if(ikk==7) {
if((phi1 > ik*(M_pi/4.)) && (phi1 < 1.*(M_pi/4))) kk = 7-ikk;}
169 se2[kk] = se2[kk] + en;
171 seE2[kk] = seE2[kk] + en;
174 seH2[kk] = seH2[kk] + en;
178 if(max_e <en)max_e = en;
181 if((phi< 1.0*(M_pi/4)) && (phi > -1.0*(M_pi/4))) kk = 0;
182 if((phi< 0*(M_pi/4)) && (phi > -2.0*(M_pi/4))) kk = 1;
183 if((phi< -1.0*(M_pi/4)) && (phi > -3.0*(M_pi/4))) kk = 2;
184 if((phi< -2.0*(M_pi/4)) && (phi > -4.0*(M_pi/4))) kk = 3;
186 if((phi < -3.0*(M_pi/4)) && (phi > 3.0*(M_pi/4))) kk = 4;
187 if((phi < 4.0*(M_pi/4)) && (phi > 2.0*(M_pi/4))) kk = 5;
188 if((phi < 3.0*(M_pi/4)) && (phi > 1.*(M_pi/4))) kk = 6;
189 if((phi < 2.0*(M_pi/4)) && (phi > 0*(M_pi/4))) kk = 7;
191 se1[kk] = se1[kk] + en;
193 seE1[kk] = seE1[kk] + en;
196 seH1[kk] = seH1[kk] + en;
199 for (
int k=0;k<5;k++) {
200 deltaphi = (k*(-M_pi/4.)) - phi ;
201 if(deltaphi > M_pi) {deltaphi -= 2.0 * M_pi;}
202 if(deltaphi < -1.*M_pi) {deltaphi += 2.0 * M_pi;}
203 if (deltaphi< -M_pi/2) deltaphi=deltaphi+2*M_pi;
204 deltaphi = TMath::Abs(deltaphi);
206 if(deltaphi < M_pi/4.){
209 seE[k] = seE[k] + en;
212 seH[k] = seH[k] + en;
218 for (
int k=5;k<8;k++) {
219 deltaphi = (8-k)*(M_pi/4.) - phi ;
220 if(deltaphi > M_pi) {deltaphi -= 2.0 * M_pi;}
221 if(deltaphi < -1.*M_pi) {deltaphi += 2.0 * M_pi;}
222 if (deltaphi< -M_pi/2) deltaphi=deltaphi+2*M_pi;
223 deltaphi = TMath::Abs(deltaphi);
224 if(deltaphi < M_pi/4.){
227 seE[k] = seE[k] + en;
230 seH[k] = seH[k] + en;
254 for (
int k=0;k<8;k++) {
260 se[k] = seE[k] + 0.75*seH[k];
261 se1[k] = seE1[k] + 0.75*seH1[k];
262 se2[k] = seE2[k] + 0.75*seH2[k];
265 for (
int k=0;k<8;k++) {
292 if(maxE>=30 ) trig =1;
305 printf(
"MAX : %4.2f %4.2f %4.2f %d %d %d\n ",maxE, maxE1, maxE2, max1, max2, max3);
312 Float_t StFmsJetFilter::DPhi(Float_t phim, Float_t phi){
314 Float_t dp = phim - phi ;
315 Float_t M_pi = TMath::Pi();
316 if(dp > M_pi) {dp -= 2.0 * M_pi;}
317 if(dp < -1.*M_pi) {dp += 2.0 * M_pi;}
319 if (dphi< -M_pi/2) dphi=dphi+2*M_pi;
320 dphi = TMath::Abs(dphi);
Abstract base class for particles related to common /HEPEVT/.
Int_t RejectGE(const StGenParticleMaster &ptl) const
Int_t RejectEG(const StGenParticleMaster &ptl) const
Int_t RejectGT(const StGenParticleMaster &ptl) const