1#ifndef BesGlobalTrigSvc_h
2#define BesGlobalTrigSvc_h 1
4#include "Trigger/IBesGlobalTrigSvc.h"
5#include "GaudiKernel/Service.h"
11#include "GaudiKernel/IIncidentListener.h"
12#include "RealizationSvc/RealizationSvc.h"
13#include "RealizationSvc/IRealizationSvc.h"
14#include "Trigger/TrigPara.h"
18class IDataProviderSvc;
26 virtual public IIncidentListener,
39 void handle(
const Incident&);
91 inline void setTrigChan(
int i,
int j) { m_trigChannel[i] = j; }
99 if(j) m_trigCondition[i] = 1;
100 else m_trigCondition[i] = 0;
157 inline void setTofHitPos(map<
int,vector<int>,greater<int> > i) { tofHitPos = i; }
172 inline map<int,vector<int>,greater<int> >
getTofHitPos() {
return tofHitPos; }
252 inline double getBTCEnergy(
int theta,
int phi) {
return emcBTCEnergy[theta][phi]; }
253 inline double getWETCEnergy(
int theta,
int phi) {
return emcWETCEnergy[theta][phi]; }
254 inline double getEETCEnergy(
int theta,
int phi) {
return emcEETCEnergy[theta][phi]; }
255 inline map<int,vector<complex<int> >,greater<int> >
getEmcClusId() {
return emcClusId; }
322 std::vector<int> trigOut;
324 std::vector<std::string> trigChannel;
325 std::vector<std::string> trigCondName;
326 std::vector<std::string> trigTable;
327 std::vector<int> channelNo;
335 bool mdc_STrk_BB,mdc_NStrkN,mdc_NStrk2,mdc_NStrk1;
336 bool mdc_LTrk_BB,mdc_NLtrkN,mdc_NLtrk2,mdc_NLtrk1;
337 bool mdc_NItrk1,mdc_NItrk2;
340 std::vector<int> mdcStrkId;
341 std::vector<int> mdcLtrkId;
345 bool tof_NBTof1,tof_NBTof2,tof_NETof1,tof_NETof2,tof_NTof1;
346 bool tof_BTofBB,tof_ETofBB;
348 map<int,vector<int>,greater<int> > tofHitPos;
349 std::vector<int> btofHitMap;
350 std::vector<int> etofHitMap;
354 bool emc_NClus1, emc_NClus2, emc_NBClus1, emc_NEClus1, emc_BClusBB,emc_EClusBB,emc_Clus_Z,emc_BClus_PHI;
355 bool emc_EClus_PHI,emc_BEtot_H,emc_EEtot_H,emc_Etot_L,emc_Etot_M,emc_BL_Z;
356 bool emc_Diff_B,emc_Diff_E,emc_BL_BBLK,emc_BL_EBLK;
359 double emcBarrelGate, emcEndGate;
360 double emcTotE,emcLTotE,emcRTotE,emcBTotE,emcETotE,emcLBTotE,emcRBTotE,emcWETotE,emcEETotE;
361 int emcNbCluster,emcNweCluster,emcNeeCluster;
362 std::vector<double> emcBlockE;
363 std::vector<double> emcClusE;
364 map<int,vector<complex<int> >, greater<int> > emcClusId;
365 double emcBTCEnergy[TrigConf::TCTHETANO_B][TrigConf::TCPHINO_B];
366 double emcWETCEnergy[TrigConf::TCTHETANO_E][TrigConf::TCPHINO_E];
367 double emcEETCEnergy[TrigConf::TCTHETANO_E][TrigConf::TCPHINO_E];
371 bool muc_BB3478, muc_BB37;
374 int muc_nhitEE, muc_nhitBR, muc_nhitWE, muc_nhitTotal;
375 int muc_nlayerBR, muc_nlayerWE, muc_nlayerEE;
376 int muc_ntrackBR, muc_ntrackEC;
377 int muc_n3ltracktotal;
378 std::vector<int> muc_vlayerSeg;
379 std::vector<int> muc_vhitLayer;
380 std::vector<int> muc_vhitSeg;
381 std::vector<int> muc_index;
385 bool tm_NATrk1, tm_NATrk2, tm_ATrk_BB, tm_NBTrk1, tm_NBTrk2, tm_BTrk_BB, tm_NCTrk1, tm_NCTrk2, tm_CTrk_BB;
388 std::vector<std::string> vTrigLine;
391 std::vector<int> vTrigCond;
397 int m_trigCondition[48];
398 int m_trigChannel[16];
406 std::string trigTableFile;
439 static const std::string COND_NAME[48];
************Class m_ypar INTEGER m_KeyWgt INTEGER m_nphot INTEGER m_KeyGPS INTEGER m_IsBeamPolarized INTEGER m_EvtGenInterface DOUBLE PRECISION m_Emin DOUBLE PRECISION m_sphot DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_q2 DOUBLE PRECISION m_PolBeam2 DOUBLE PRECISION m_xErrPb *COMMON c_KK2f $ !CMS energy average $ !Spin Polarization vector first beam $ !Spin Polarization vector second beam $ !Beam energy spread[GeV] $ !minimum hadronization energy[GeV] $ !input READ never touch them !$ !debug facility $ !maximum weight $ !inverse alfaQED $ !minimum real photon energy
void setEmcNbCluster(int i)
void setEvtTime(double i)
void setBTCEnergy(int theta, int phi, double energy)
std::vector< int > getMucIndex()
void setEmcBTotE(double i)
void setEmcClusE(std::vector< double > i)
void setEmcClusId(map< int, vector< complex< int > >, greater< int > > i)
virtual ~BesGlobalTrigSvc()
void setTrigCond(int i, bool j)
void setEmcETotE(double i)
virtual StatusCode initialize()
Initialise the service (Inherited Service overrides)
void setEmcTotE(double i)
void setEmcRBTotE(double i)
void setETofHitMap(vector< int > i)
map< int, vector< complex< int > >, greater< int > > getEmcClusId()
void setEmcEETotE(double i)
std::vector< int > getMdcLtrkId()
const int getTrigCond(int i)
void setMucNtrackBR(int i)
double getEETCEnergy(int theta, int phi)
void setMucBB3478(bool i)
std::vector< double > getEmcClusE()
void setEmcNweCluster(int i)
void setEmcRTotE(double i)
void setEClus_PHI(bool i)
std::vector< int > getMdcStrkId()
double getBTCEnergy(int theta, int phi)
std::vector< int > getMuchitLayer()
std::vector< double > & getEmcBlockE()
void setEmcLTotE(double i)
void setMucNtrackEC(int i)
void setEmcNeeCluster(int i)
void setBClus_PHI(bool i)
vector< int > getBTofHitMap()
vector< int > getETofHitMap()
std::vector< int > getMuchitSeg()
void setTrigChan(int i, int j)
void setBTofHitMap(vector< int > i)
virtual StatusCode finalize()
Finalise the service.
void handle(const Incident &)
void setEETCEnergy(int theta, int phi, double energy)
const int getTrigChan(int i)
void setMucIndex(std::vector< int > i)
void setWETCEnergy(int theta, int phi, double energy)
map< int, vector< int >, greater< int > > getTofHitPos()
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
double getWETCEnergy(int theta, int phi)
StatusCode setTrigCondition()
void setMdcStrkId(std::vector< int > i)
void setMucN3ltrackTotal(int i)
void setMdcLtrkId(std::vector< int > i)
void setEmcBlockE(std::vector< double > i)
void setEmcLBTotE(double i)
int getMucN3ltrackTotal()
std::vector< int > getMuclayerSeg()
const int * getTrigChan() const
const int * getTrigCond() const
void setTofHitPos(map< int, vector< int >, greater< int > > i)
void setGoodEvent(bool i)
void setRunMode(int mode)
void setEmcWETotE(double i)