StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StjWestBEMCTowerEnergyListMaker.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  StjWestBEMCTowerEnergyListMaker(const Char_t *name, TDirectory* file, StMuDstMaker* uDstMaker)
22  : StMaker(name), _file(file), _uDstMaker(uDstMaker) { }
23  virtual ~StjWestBEMCTowerEnergyListMaker() { }
24 
25  const char* GetCVS() const
26  {static const char cvs[]="Tag $Name: $ $Id: StjWestBEMCTowerEnergyListMaker.C,v 1.4 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 StjTowerEnergyCutBemcWestOnly());
46  _bemcCut.addCut(new StjTowerEnergyCutEnergy(0.0));
47  _bemcCut.addCut(new StjTowerEnergyCutBemcStatus(1));
48  _bemcCut.addCut(new StjTowerEnergyCutAdc(0, 2.0));
49  _bemcCut.addCut(new StjTowerEnergyCutTowerId(1048));
50 
51  _writer = new StjTowerEnergyListWriter("bemcTowers", _file);
52 
53  return kStOk;
54  }
55 
56  Int_t Make()
57  {
58  StjTowerEnergyList energyList = _bemc->getEnergyList();
59 
60  energyList = _bemcCut(energyList);
61 
62  _writer->Fill(energyList);
63 
64  return kStOk;
65  }
66 
67  Int_t Finish()
68  {
69  _writer->Finish();
70 
71  return kStOk;
72  }
73 
75 };
StMaker(const char *name="", const char *dummy=0)
Constructor &amp; Destructor.
Definition: StMaker.cxx:188
Definition: Stypes.h:41