1 #include "StRareEvent.h"
2 #include "StRareTrack.h"
3 #include "StL3RareTrack.h"
4 #include "StEventTypes.h"
5 #include "StThreeVectorF.hh"
6 #include "StEventUtilities/StuRefMult.hh"
14 if (!fgRareTracks) fgRareTracks =
new TClonesArray(
"StRareTrack",4000);
15 fRareTracks = fgRareTracks;
17 if (!fgL3RareTracks) fgL3RareTracks =
new TClonesArray(
"StL3RareTrack",4000);
18 fL3RareTracks = fgL3RareTracks;
23 StRareEvent::~StRareEvent() {
24 fgRareTracks->Delete();
25 fgL3RareTracks->Delete();
29 void StRareEvent::fillRareEvent(
StEvent* event){
30 fRunNumber =
event->runId();
31 fEventNumber =
event->id();
32 fmagneticField =
event->summary()->magneticField();
36 fnumberOfGoodPrimaryTracks = uncorrectedNumberOfNegativePrimaries(evt);
37 if (event->primaryVertex()) {
38 fVertexZ =
event->primaryVertex()->position().z();
48 else fTriggerWord = myL0Trigger->triggerWord();
52 void StRareEvent::fillL3Info(
StL3Trigger *l3trigger)
54 if (l3trigger->primaryVertex()) {
55 fL3VertexZ = l3trigger->primaryVertex()->position().z();
57 else fL3VertexZ = -999;
61 if (!l3EventSummary) {
62 cout <<
"No l3 event summary found." << endl;
66 fL3Unbiased = l3EventSummary->unbiasedTrigger();
71 const StPtrVecL3AlgorithmInfo& algInfo = l3EventSummary->algorithmsAcceptingEvent();
72 for (
unsigned int i=0; i<algInfo.size(); i++) {
73 if (algInfo[i]->
id() == 6) {
75 fNProcessed = algInfo[i]->numberOfProcessedEvents();
76 fNAccept = algInfo[i]->numberOfAcceptedEvents();
77 fNBuild = algInfo[i]->numberOfBuildEvents();
78 for (
int j=0; j<algInfo[i]->dataSize(); j++)
79 fTriggerData[j] = algInfo[i]->
data(j);
86 void StRareEvent::clear(Option_t *option) {
87 fgRareTracks->Clear(option);
89 fgL3RareTracks->Clear(option);
95 TClonesArray &trks = *fRareTracks;
101 TClonesArray &l3trks = *fgL3RareTracks;