StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StJetMaker
StjMCParticleMaker.cxx
1
// $Id: StjMCParticleMaker.cxx,v 1.4 2008/08/22 17:32:52 tai Exp $
2
#include "StjMCParticleMaker.h"
3
4
5
#include "StjMCParticleCut.h"
6
#include "StjMCParticleCutEta.h"
7
#include "StjMCParticleCutEtaForStatus.h"
8
#include "StjMCParticleCutStatus.h"
9
10
#include "StjMCParticleListWriter.h"
11
12
#include "StjMCMuDst.h"
13
14
#include "StjMCParticleListCut.h"
15
16
#include <TDirectory.h>
17
18
#include <iostream>
19
20
using namespace
std;
21
22
ClassImp(
StjMCParticleMaker
)
23
24
25
StjMCParticleMaker
::
StjMCParticleMaker
(const Char_t *name, TDirectory* file,
StMaker
* uDstMaker)
26
:
StMaker
(name)
27
, _file(file)
28
, _uDstMaker(uDstMaker)
29
{ }
30
31
Int_t StjMCParticleMaker::Init()
32
{
33
_mc =
new
StjMCMuDst
(_uDstMaker);
34
35
_mcCut =
new
StjMCParticleListCut
();
36
37
int
goodStatus[] = {1, 3};
38
_mcCut->addCut(
new
StjMCParticleCutStatus
(2, goodStatus));
39
_mcCut->addCut(
new
StjMCParticleCutEtaForStatus
(-2.0, 2.0, 1));
40
41
_writer =
new
StjMCParticleListWriter
(
"mcParticles"
, _file);
42
43
return
kStOk
;
44
}
45
46
Int_t
StjMCParticleMaker::Make
()
47
{
48
StjMCParticleList theList = _mc->getMCParticleList();
49
50
theList = (*_mcCut)(theList);
51
52
_writer->Fill(theList);
53
54
return
kStOk
;
55
56
}
57
58
Int_t
StjMCParticleMaker::Finish
()
59
{
60
_writer->Finish();
61
62
return
kStOk
;
63
}
StjMCParticleMaker::Finish
Int_t Finish()
Definition:
StjMCParticleMaker.cxx:58
StjMCMuDst
Definition:
StjMCMuDst.h:14
StMaker
Definition:
StMaker.h:57
StjMCParticleListCut
Definition:
StjMCParticleListCut.h:13
StjMCParticleListWriter
Definition:
StjMCParticleListWriter.h:14
StjMCParticleMaker
Definition:
StjMCParticleMaker.h:19
StjMCParticleCutStatus
Definition:
StjMCParticleCutStatus.h:11
StjMCParticleCutEtaForStatus
Definition:
StjMCParticleCutEtaForStatus.h:9
kStOk
Definition:
Stypes.h:41
StjMCParticleMaker::Make
Int_t Make()
Definition:
StjMCParticleMaker.cxx:46
Generated by
1.8.5