StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjBEMCTowerEnergyListMaker.C
1  #include <StMaker.h>
2 
3 #include "StjBEMCMuDst.h"
4 
5 #include "StjTowerEnergyListCut.h"
6 #include "StjTowerEnergyCut2003BemcTower.h"
7 #include "StjTowerEnergyCutBemcWestOnly.h"
8 #include "StjTowerEnergyCutEnergy.h"
9 #include "StjTowerEnergyCutBemcStatus.h"
10 #include "StjTowerEnergyCutAdc.h"
11 #include "StjTowerEnergyCutTowerId.h"
12 
13 #include "StjTowerEnergyListWriter.h"
14 
15 #include <TDirectory.h>
16 
18 
19 public:
20 
21  StjBEMCTowerEnergyListMaker(const Char_t *name, TDirectory* file, StMuDstMaker* uDstMaker)
22  : StMaker(name), _file(file), _uDstMaker(uDstMaker) { }
23  virtual ~StjBEMCTowerEnergyListMaker() { }
24 
25  const char* GetCVS() const
26  {static const char cvs[]="Tag $Name: $ $Id: StjBEMCTowerEnergyListMaker.C,v 1.3 2014/08/06 11:43:24 jeromel Exp $ built " __DATE__ " " __TIME__; return cvs;}
27 
28 private:
29 
30  TDirectory* _file;
31 
32  StMuDstMaker* _uDstMaker;
33 
34  StjBEMC* _bemc;
35  StjTowerEnergyListCut _bemcCut;
36 
37  StjTowerEnergyListWriter* _writer;
38 
39 public:
40 
41  Int_t Init()
42  {
43  _bemc = new StjBEMCMuDst(_uDstMaker, true);
44 
45  _bemcCut.addCut(new StjTowerEnergyCutEnergy(0.0));
46  _bemcCut.addCut(new StjTowerEnergyCutBemcStatus(1));
47  _bemcCut.addCut(new StjTowerEnergyCutAdc(0, 2.0));
48 
49  _writer = new StjTowerEnergyListWriter("bemcTowers", _file);
50 
51  return kStOk;
52  }
53 
54  Int_t Make()
55  {
56  StjTowerEnergyList energyList = _bemc->getEnergyList();
57 
58  energyList = _bemcCut(energyList);
59 
60  _writer->Fill(energyList);
61 
62  return kStOk;
63  }
64 
65  Int_t Finish()
66  {
67  _writer->Finish();
68 
69  return kStOk;
70  }
71 
72  ClassDef(StjBEMCTowerEnergyListMaker, 1)
73 };
StMaker(const char *name="", const char *dummy=0)
Constructor &amp; Destructor.
Definition: StMaker.cxx:188
Definition: Stypes.h:41