5 #include "StEventTypes.h"
8 #include "StMuDSTMaker/COMMON/StMuTypes.hh"
11 #include "StTriggerUtilities/Bbc/StBbcTriggerSimu.h"
23 StBbcTriggerSimu::~StBbcTriggerSimu(){
28 StBbcTriggerSimu::Init(){
30 LOG_INFO <<Form(
"Bbc::Init() MC_flag=%d, adcThres=%d",mMCflag,AdcTrigThresh)<<endm;
31 if(mMCflag) LOG_WARN <<
"Bbc:: TDC thresholds not implemented"<<endm;
36 void StBbcTriggerSimu::Clear(){
41 for (
int i=0;i<BBCadcNum;i++) {
49 void StBbcTriggerSimu::Make()
52 if (mSource ==
"MuDst") {
53 StMuDst* mudst = (
StMuDst*)StMaker::GetChain()->GetDataSet(
"MuDst");
54 if (mudst) Make(mudst);
56 else if (mSource ==
"StEvent") {
57 StEvent*
event = (
StEvent*)StMaker::GetChain()->GetDataSet(
"StEvent");
58 if (event) Make(event);
61 LOG_ERROR <<
"StBbcTriggerSimu - Unknown source \"" << mSource <<
"\"" << endm;
64 if ((Ebbc==1)&&(Wbbc==1)) bbcTrig=kYes;
66 LOG_DEBUG<<
" Wbbc ="<<Wbbc<<
" Ebbc="<<Ebbc<<
" bbcTrig="<<bbcTrig<<endm;
67 for (
int i=0;i<BBCadcNum;i++) {
68 LOG_DEBUG<<i<<
" adc="<<BBCadc[i]<<endm;
73 void StBbcTriggerSimu::Make(
StMuDst*)
79 void StBbcTriggerSimu::Make(
StEvent* event)
90 bbc.setYear(StMaker::GetChain()->GetDBTime().GetYear());
92 for (UInt_t pmt=0; pmt<bbc.numberOfPMTs(); pmt++) {
94 BBCadc[pmt]=bbc.adc(pmt);
96 int bbcadc=bbc.adc(pmt);
98 if (bbcadc>AdcTrigThresh) {
100 if (23<pmt && pmt<40) Wbbc=1;
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)