00001 #include "StMaker.h"
00002
00003 #include "StjMCParticleCut.h"
00004 #include "StjMCParticleCutEta.h"
00005 #include "StjMCParticleCutEtaForStatus.h"
00006 #include "StjMCParticleCutStatus.h"
00007
00008 #include "StjMCParticleListWriter.h"
00009
00010 #include "StjMCMuDst.h"
00011
00012 #include "StjMCParticleListCut.h"
00013
00014 #include <TDirectory.h>
00015
00016 class StjMCParticleListMaker : public StMaker {
00017
00018 public:
00019
00020 StjMCParticleListMaker(const Char_t *name, TDirectory* file, StMaker* uDstMaker)
00021 : StMaker(name), _file(file), _uDstMaker(uDstMaker) { }
00022 virtual ~StjMCParticleListMaker() { }
00023
00024 const char* GetCVS() const
00025 {static const char cvs[]="Tag $Name: $ $Id: StjMCParticleListMaker.C,v 1.3 2008/11/24 22:46:55 tai Exp $ built "__DATE__" "__TIME__; return cvs;}
00026
00027 private:
00028
00029 TDirectory* _file;
00030
00031 StMaker* _uDstMaker;
00032
00033 StjMC* _mc;
00034 StjMCParticleListCut _mcCut;
00035
00036 StjMCParticleListWriter* _writer;
00037
00038 public:
00039
00040 Int_t Init()
00041 {
00042 _mc = new StjMCMuDst(_uDstMaker);
00043
00044
00045
00046 _mcCut.addCut(new StjMCParticleCutEtaForStatus(-3.0, 3.0, 2));
00047 _mcCut.addCut(new StjMCParticleCutEtaForStatus(-3.0, 3.0, 1));
00048
00049 _writer = new StjMCParticleListWriter("mcParticles", _file);
00050
00051 return kStOk;
00052 }
00053
00054 Int_t Make()
00055 {
00056 StjMCParticleList theList = _mc->getMCParticleList();
00057
00058 theList = _mcCut(theList);
00059
00060 _writer->Fill(theList);
00061
00062 return kStOk;
00063 }
00064
00065 Int_t Finish()
00066 {
00067 _writer->Finish();
00068
00069 return kStOk;
00070 }
00071
00072 ClassDef(StjMCParticleListMaker, 0)
00073
00074 };