StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtMCEvalMaker.cc
1 #include "StFgtMCEvalMaker.h"
3 #include <StMuDSTMaker/COMMON/StMuEvent.h>
4 #include <StMuDSTMaker/COMMON/StMuMcTrack.h>
5 #include "StMcEvent/StMcTrack.hh"
6 #include "StMcEvent/StMcEvent.hh"
7 #include "StMcEvent/StMcVertex.hh"
8 
10  Int_t ierr = kStOk;
11  StMcEvent* mMcEvent = 0;
12  mMcEvent = (StMcEvent*) StMaker::GetChain()->GetDataSet("StMcEvent");
13  //assert(mMcEvent);
14  cout <<" in eval maker" << endl;
15  if(!mMcEvent) return false;
16  cout <<"got mcevent!!!!" <<endl;
17  //initialize momentum vectors
18  StMcVertex *V=mMcEvent->primaryVertex();
19  // mVertex=TVector3(V->position().x(),V->position().y(),V->position().z());
20 
21  for(unsigned int i=0; i<mMcEvent->tracks().size();i++){//loop tracks
22  StMcTrack* mcTrack = mMcEvent->tracks()[i];
23  int pdgId=mcTrack->pdgId();
24  float pt=mcTrack->pt();
25  i++;
26  if(abs(pdgId)==11 || abs(pdgId)==12 || abs(pdgId)==24 || abs(pdgId)==21 || abs(pdgId) < 10 || abs(pdgId)==92 || pt<10.0) continue;
27  cout<<"high pt MC track: pdgId="<<pdgId<<" pt="<<pt<<endl;
28  }
29  return ierr;
30 };
31 
33  Int_t ierr = kStOk;
34  return ierr;
35 };
36 
37 Int_t StFgtMCEvalMaker::Init(){
38  Int_t ierr = kStOk;
39  return ierr;
40 };
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Definition: StMcTrack.hh:144
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...
Definition: StMcEvent.hh:169
Definition: Stypes.h:41