7 #include "TClonesArray.h"
9 #include "TLorentzVector.h"
10 #include "StJetEventTypes.h"
14 StJetEvent::StJetEvent()
17 , mVertices(new TClonesArray(
"StJetVertex",10))
18 , mJets(new TClonesArray(
"StJetCandidate",10))
19 , mTracks(new TClonesArray(
"StJetTrack",50))
20 , mTowers(new TClonesArray(
"StJetTower",50))
21 , mParticles(new TClonesArray(
"StJetParticle",50))
25 StJetEvent::~StJetEvent()
27 mVertices->Delete();
delete mVertices; mVertices = 0;
28 mJets->Delete();
delete mJets; mJets = 0;
29 mTracks->Delete();
delete mTracks; mTracks = 0;
30 mTowers->Delete();
delete mTowers; mTowers = 0;
31 mParticles->Delete();
delete mParticles; mParticles = 0;
34 void StJetEvent::Clear(Option_t* option)
36 mVertices->Clear(option);
38 mTracks->Clear(option);
39 mTowers->Clear(option);
40 mParticles->Clear(option);
43 int StJetEvent::numberOfVertices ()
const {
return mVertices->GetEntriesFast(); }
44 int StJetEvent::numberOfJets ()
const {
return mJets->GetEntriesFast(); }
45 int StJetEvent::numberOfTracks ()
const {
return mTracks->GetEntriesFast(); }
46 int StJetEvent::numberOfTowers ()
const {
return mTowers->GetEntriesFast(); }
47 int StJetEvent::numberOfParticles()
const {
return mParticles->GetEntriesFast(); }
55 StJetVertex* StJetEvent::newVertex() {
return new ((*mVertices)[mVertices->GetEntriesFast()])
StJetVertex; }
56 StJetCandidate* StJetEvent::newJet(
const TVector3&
vertex,
const TLorentzVector& fourMomentum,
float area,
float area_error) {
return new ((*mJets)[mJets->GetEntriesFast()])
StJetCandidate(vertex,fourMomentum, area, area_error); }
57 StJetTrack* StJetEvent::newTrack() {
return new ((*mTracks)[mTracks->GetEntriesFast()])
StJetTrack; }
58 StJetTower* StJetEvent::newTower() {
return new ((*mTowers)[mTowers->GetEntriesFast()])
StJetTower; }