6 #include "StMuDst2StEventMaker.h"
8 #include "StMuDSTMaker/COMMON/StMuDstMaker.h"
9 #include "StMuDSTMaker/COMMON/StMuDst.h"
10 #include "StMuDSTMaker/COMMON/StMuDebug.h"
11 #include "StEvent/StEventTypes.h"
12 #include "StEvent/StTriggerIdCollection.h"
13 #include "StEvent/StTriggerId.h"
14 #include "StEvent/StTpcDedxPidAlgorithm.h"
25 StMuDst2StEventMaker::~StMuDst2StEventMaker() {
30 void StMuDst2StEventMaker::Clear(
const char*) {
31 if ( mStEvent )
delete mStEvent;
40 muDst=(
StMuDst*)GetInputDS(
"MuDst");
46 hd->SetGMTime(mStEvent->time());
47 if(mStEvent->runInfo()) hd->SetRunNumber(mStEvent->runInfo()->runId());
60 LOG_WARN <<
"StMuDst2StEventMaker::Make() : WARNING Did not get pointer to MuDst. " << endm;
61 LOG_WARN <<
" StEvent will NOT be filled (nothing we can do)" << endm;
68 void StMuDst2StEventMaker::printTriggerIds(
StEvent* ev) {
69 if ( ev->triggerIdCollection() ) {
70 if ( ev->triggerIdCollection()->l1() ) {
72 cout <<
"l1 triggers: ";
73 vector<unsigned int> v = ev->triggerIdCollection()->l1()->triggerIds();
74 for (
unsigned int i=0; i<v.size(); i++) cout << v[i] <<
" ";
78 if ( ev->triggerIdCollection()->l2() ) {
80 cout <<
"l2 triggers: ";
81 vector<unsigned int> v = ev->triggerIdCollection()->l2()->triggerIds();
82 for (
unsigned int i=0; i<v.size(); i++) cout << v[i] <<
" ";
86 if ( ev->triggerIdCollection()->l3() ) {
88 cout <<
"l3 triggers: ";
89 vector<unsigned int> v = ev->triggerIdCollection()->l3()->triggerIds();
90 for (
unsigned int i=0; i<v.size(); i++) cout << v[i] <<
" ";
94 if ( ev->triggerIdCollection()->nominal() ) {
96 cout <<
"nominal triggers: ";
97 vector<unsigned int> v = ev->triggerIdCollection()->nominal()->triggerIds();
98 for (
unsigned int i=0; i<v.size(); i++) cout << v[i] <<
" ";
105 void StMuDst2StEventMaker::loopOverTracks(
StEvent* ev) {
106 LOG_DEBUG <<
"StMuDst2StEventMaker::loopOverTracks(...)" << endm;
111 int numberOfNodes = ev->trackNodes().size();
112 for (
int i=0; i< numberOfNodes; i++) {
115 StTrack* t = node->track(primary);
120 if ( pidAlgorithm.traits() ) {
virtual void AddData(TDataSet *data, const char *dir=".data")
User methods.
static int level()
returns debug level
int Make()
create a StEvent from the muDst and put it into the .data tree structure. Also time stamp gets writte...
StMuDst2StEventMaker(const char *self="muDst2StEventMaker")
Default constructor; get pointer to StMuDstMaker.
StEvent * createStEvent()
creates a StEvent from the StMuDst (this) and returns a pointer to it. (This function is not yet fini...