8 #include "TClonesArray.h"
10 #include "TLorentzVector.h"
11 #include "StJetEventTypes.h"
15 StUeEvent::StUeEvent()
18 , mVertices(new TClonesArray(
"StJetVertex",10))
19 , mTracks(new TClonesArray(
"StJetTrack",50))
20 , mTowers(new TClonesArray(
"StJetTower",50))
21 , mParticles(new TClonesArray(
"StJetParticle",50))
25 StUeEvent::~StUeEvent()
27 mVertices->Delete();
delete mVertices; mVertices = 0;
28 mTracks->Delete();
delete mTracks; mTracks = 0;
29 mTowers->Delete();
delete mTowers; mTowers = 0;
30 mParticles->Delete();
delete mParticles; mParticles = 0;
32 void StUeEvent::Clear(Option_t* option)
34 mVertices->Clear(option);
35 mTracks->Clear(option);
36 mTowers->Clear(option);
37 mParticles->Clear(option);
40 int StUeEvent::numberOfVertices ()
const {
return mVertices->GetEntriesFast(); }
41 int StUeEvent::numberOfTracks ()
const {
return mTracks->GetEntriesFast(); }
42 int StUeEvent::numberOfTowers ()
const {
return mTowers->GetEntriesFast(); }
43 int StUeEvent::numberOfParticles()
const {
return mParticles->GetEntriesFast(); }
50 StJetVertex* StUeEvent::newVertex() {
return new ((*mVertices)[mVertices->GetEntriesFast()])
StJetVertex; }
51 StJetTrack* StUeEvent::newTrack() {
return new ((*mTracks)[mTracks->GetEntriesFast()])
StJetTrack; }
52 StJetTower* StUeEvent::newTower() {
return new ((*mTowers)[mTowers->GetEntriesFast()])
StJetTower; }
55 float StUeEvent::sumTrackPt()
const
58 for (
int i = 0; i < numberOfTracks(); ++i) s +=
track(i)->pt();
62 float StUeEvent::sumTowerPt()
const
65 for (
int i = 0; i < numberOfTowers(); ++i) s += tower(i)->pt();
69 float StUeEvent::sumParticlePt()
const
72 for (
int i = 0; i < numberOfParticles(); ++i) s += particle(i)->pt();