00001
00002 #include "StjTrgMuDst.h"
00003
00004 #include "StjTrgSoft.h"
00005 #include "StjTrgPassCondition.h"
00006 #include "StjTrgBEMCJetPatchTowerIdMap.h"
00007
00008 #include <StMuDSTMaker/COMMON/StMuDstMaker.h>
00009 #include <StMuDSTMaker/COMMON/StMuDst.h>
00010 #include <StMuDSTMaker/COMMON/StMuEvent.h>
00011
00012 #include <StDetectorDbMaker/StDetectorDbTriggerID.h>
00013
00014 ClassImp(StjTrgMuDst)
00015
00016 using namespace std;
00017
00018 StjTrgMuDst::StjTrgMuDst(int trgId, StjTrgPassCondition* passCondition, StMuDstMaker* uDstMaker, StjTrgSoft* soft)
00019 : _trgId(trgId)
00020 , _passCondition(passCondition)
00021 , _soft(soft)
00022 , _uDstMaker(uDstMaker)
00023 {
00024 _soft->setTrg(this);
00025 }
00026
00027 int StjTrgMuDst::runNumber()
00028 {
00029 return _uDstMaker->muDst()->event()->runId();
00030 }
00031
00032 int StjTrgMuDst::eventId()
00033 {
00034 return _uDstMaker->muDst()->event()->eventId();
00035 }
00036
00037 bool StjTrgMuDst::hard() const
00038 {
00039 return _uDstMaker->muDst()->event()->triggerIdCollection().nominal().isTrigger(_trgId);
00040 }
00041
00042 bool StjTrgMuDst::soft() const
00043 {
00044 return _soft->soft();
00045 }
00046
00047 bool StjTrgMuDst::passed() const
00048 {
00049 return (*_passCondition)(this);
00050 }
00051
00052 double StjTrgMuDst::prescale()
00053 {
00054 return StDetectorDbTriggerID::instance()->getTotalPrescales()[_trgId];
00055 }
00056
00057 double StjTrgMuDst::vertexZ()
00058 {
00059 return _uDstMaker->muDst()->event()->primaryVertexPosition().z();
00060 }
00061
00062 vector<int> StjTrgMuDst::towers()
00063 {
00064 return _soft->towers();
00065 }
00066
00067 vector<int> StjTrgMuDst::towerDsmAdc()
00068 {
00069 return _soft->towerDsmAdc();
00070 }
00071
00072 vector<unsigned int> StjTrgMuDst::towerAdc()
00073 {
00074 return _soft->towerAdc();
00075 }
00076
00077 vector<double> StjTrgMuDst::towerEnergy()
00078 {
00079 return _soft->towerEnergy();
00080 }
00081
00082 vector<double> StjTrgMuDst::towerEt()
00083 {
00084 return _soft->towerEt();
00085 }
00086
00087 vector<int> StjTrgMuDst::jetPatches()
00088 {
00089 return _soft->jetPatches();
00090 }
00091
00092 vector<int> StjTrgMuDst::jetPatchDsmAdc()
00093 {
00094 return _soft->jetPatchDsmAdc();
00095 }
00096
00097 vector<unsigned int> StjTrgMuDst::jetPatchAdc()
00098 {
00099 return _soft->jetPatchAdc();
00100 }
00101
00102 vector<double> StjTrgMuDst::jetPatchEnergy()
00103 {
00104 return _soft->jetPatchEnergy();
00105 }
00106
00107 vector<double> StjTrgMuDst::jetPatchEt()
00108 {
00109 return _soft->jetPatchEt();
00110 }