00001
00002
00003
00004
00005
00006
00007
00008 #ifndef ST_JET_MAKER_2009_H
00009 #define ST_JET_MAKER_2009_H
00010
00011 class TTree;
00012 class StAnaPars;
00013 class StJetEvent;
00014 class StJetFinder;
00015 class StjPrimaryVertex;
00016 class StJetVertex;
00017 class StProtoJet;
00018 class StJetCandidate;
00019 class StMuTrackEmu;
00020 class StJetTrack;
00021 class StMuTowerEmu;
00022 class StJetTower;
00023 class StMcTrackEmu;
00024 class StJetParticle;
00025
00026 #include <vector>
00027 #include "StMaker.h"
00028 #include "StJetFinder/StJetPars.h"
00029 #include "StSpinPool/StJetEvent/StJetEvent.h"
00030
00031 class StJetMaker2009 : public StMaker {
00032 public:
00033 StJetMaker2009(const char* name = "StJetMaker2009")
00034 : StMaker(name)
00035 , mFile(0)
00036 , mTree(0)
00037 {
00038 }
00039
00040 void Clear(Option_t* option = "");
00041 int Init();
00042 int Make();
00043 int Finish();
00044
00045
00046 void addBranch(const char* name, StAnaPars* anapars, StJetPars* jetpars);
00047 void setJetFile(const char* filename);
00048
00049
00050 TTree* tree();
00051 StJetEvent* event(const char* branchname);
00052
00053 private:
00054 void addJet(const StProtoJet& protojet, StJetEvent* event, StJetVertex* vertex);
00055 void copyVertex(const StjPrimaryVertex& vertex, StJetVertex* jetvertex);
00056 void copyTrack(const StMuTrackEmu*, StJetTrack*);
00057 void copyTower(const StMuTowerEmu*, const StJetVertex*, StJetTower*);
00058 void copyParticle(const StMcTrackEmu*, StJetParticle*);
00059
00060 struct StJetBranch {
00061 StJetBranch(const char* name, StAnaPars* anapars, StJetPars* jetpars)
00062 : name(name)
00063 , anapars(anapars)
00064 , jetpars(jetpars)
00065 , jetfinder(jetpars->constructJetFinder())
00066 , event(new StJetEvent)
00067 {
00068 }
00069
00070 TString name;
00071 StAnaPars* anapars;
00072 StJetPars* jetpars;
00073 StJetFinder* jetfinder;
00074 StJetEvent* event;
00075 };
00076
00077 vector<StJetBranch*> mJetBranches;
00078 TString mFileName;
00079 TFile* mFile;
00080 TTree* mTree;
00081
00082 ClassDef(StJetMaker2009,0);
00083 };
00084
00085 #endif