StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJetMakerA.C
1 #include <StMaker.h>
2 
3 #include <StjTPC.h>
4 #include <StjBEMC.h>
5 
6 #include <StjTrackListCut.h>
7 #include <StjTrackCutDca.h>
8 #include <StjTrackCutEta.h>
9 #include <StjTrackCutPossibleHitRatio.h>
10 #include <StjTrackCutFlag.h>
11 #include <StjTrackCutNHits.h>
12 
13 #include <StjTowerEnergyListCut.h>
14 #include <StjTowerEnergyCutBemcWestOnly.h>
15 #include <StjTowerEnergyCutEnergy.h>
16 #include <StjTowerEnergyCutBemcStatus.h>
17 #include <StjTowerEnergyCutAdc.h>
18 
19 #include <StjTowerEnergyCorrectionForTracks.h>
20 
21 #include <StjTowerEnergyListVariation.h>
22 #include <StjTowerEnergyVariationEnergy.h>
23 
24 #include <StjTrackTowerEnergyListToFourVecList.h>
25 
26 #include <StjFourVecListCut.h>
27 #include <StjFourVecCutPt.h>
28 
29 #include <StjRunJetFinder.h>
30 #include <StJetFinder/StConePars.h>
31 
32 #include <StjJetListCut.h>
33 #include <StjJetCutPt.h>
34 
35 #include <StjTrackPrint.h>
36 #include <StjTowerEnergyPrint.h>
37 #include <StjFourVecPrint.h>
38 #include <StjJetPrint.h>
39 
40 
41 class StJetMakerA : public StMaker {
42 
43 public:
44 
45  StJetMakerA(const Char_t *name, StjTPC* tpc, StjBEMC* bemc)
46  : _tpc(tpc), _bemc(bemc) { }
47  virtual ~StJetMakerA() { }
48 
49 private:
50 
51  StjTPC* _tpc;
52  StjBEMC* _bemc;
53 
54  StjTrackListCut _tpcCut1;
55  StjTrackListCut _tpcCut2;
56 
57  StjTowerEnergyListCut _bemcCut1;
58  StjTowerEnergyListCut _bemcCut2;
59 
60  StjTowerEnergyCorrectionForTracks _towerEnergyCorrectionForTracks;
61 
62  StjTowerEnergyListVariation _energyVariationNull;
63  StjTowerEnergyListVariation _energyVariationPlus5;
64  StjTowerEnergyListVariation _energyVariationMinus5;
65  StjTowerEnergyListVariation _energyVariationPlus10;
66  StjTowerEnergyListVariation _energyVariationMinus10;
67 
69 
70  StjFourVecListCut _fourCut;
71 
72  StjRunJetFinder _jetFinder;
73 
74  StjJetListCut _jetCut;
75 
76  Int_t Init()
77  {
78  _tpcCut1.addCut(new StjTrackCutDca(3.0));
79  _tpcCut1.addCut(new StjTrackCutEta(-2.0, 2.0));
80  _tpcCut1.addCut(new StjTrackCutPossibleHitRatio(0.51));
81 
82  _bemcCut1.addCut(new StjTowerEnergyCutBemcWestOnly());
83  _bemcCut1.addCut(new StjTowerEnergyCutEnergy(0.0));
84  _bemcCut1.addCut(new StjTowerEnergyCutBemcStatus(1));
85  _bemcCut1.addCut(new StjTowerEnergyCutAdc(0, 2.0));
86 
87  _tpcCut2.addCut(new StjTrackCutFlag(0));
88  _tpcCut2.addCut(new StjTrackCutNHits(20));
89 
90  _bemcCut2.addCut(new StjTowerEnergyCutEnergy(0.0));
91 
92  _energyVariationNull.addVariation(new StjTowerEnergyVariationEnergy(0));
93  _energyVariationPlus5.addVariation(new StjTowerEnergyVariationEnergy(0.05));
94  _energyVariationMinus5.addVariation(new StjTowerEnergyVariationEnergy(-0.05));
95  _energyVariationPlus10.addVariation(new StjTowerEnergyVariationEnergy(0.1));
96  _energyVariationMinus10.addVariation(new StjTowerEnergyVariationEnergy(-0.1));
97 
98  _fourCut.addCut(new StjFourVecCutPt(0.2));
99 
100  StConePars* cpars = new StConePars();
101  cpars->setGridSpacing(56, -1.6, 1.6, 120, -3.141592613589793, 3.141592613589793);
102  cpars->setConeRadius(0.4);
103  cpars->setSeedEtMin(0.5);
104  cpars->setAssocEtMin(0.1);
105  cpars->setSplitFraction(0.5);
106  cpars->setPerformMinimization(true);
107  cpars->setAddMidpoints(true);
108  cpars->setRequireStableMidpoints(true);
109  cpars->setDoSplitMerge(true);
110  cpars->setDebug(false);
111  _jetFinder.Init(cpars);
112 
113  _jetCut.addCut(new StjJetCutPt(5.0));
114 
115  return kStOk;
116  }
117 
118  Int_t Make()
119  {
120  StjTrackPrint trackprint;
121  StjTowerEnergyPrint towerprint;
122  StjFourVecPrint fourprint;
123  StjJetPrint jetprint;
124 
125  StjTrackList trackList = _tpc->getTrackList();
126  StjTowerEnergyList energyList = _bemc->getEnergyList();
127 
128  towerprint(energyList);
129 
130  trackList = _tpcCut1(trackList);
131  energyList = _bemcCut1(energyList);
132 
133  StjTowerEnergyList energyList0 = _energyVariationNull(energyList);
134  StjTowerEnergyList energyListP5 = _energyVariationPlus5(energyList);
135  StjTowerEnergyList energyListM5 = _energyVariationMinus5(energyList);
136  StjTowerEnergyList energyListP10 = _energyVariationPlus10(energyList);
137  StjTowerEnergyList energyListM10 = _energyVariationMinus10(energyList);
138 
139  energyList0 = _towerEnergyCorrectionForTracks(energyList0, trackList);
140  energyListP5 = _towerEnergyCorrectionForTracks(energyListP5, trackList);
141  energyListM5 = _towerEnergyCorrectionForTracks(energyListM5, trackList);
142  energyListP10 = _towerEnergyCorrectionForTracks(energyListP10, trackList);
143  energyListM10 = _towerEnergyCorrectionForTracks(energyListM10, trackList);
144 
145  trackList = _tpcCut2(trackList);
146 
147  energyList0 = _bemcCut2(energyList0);
148  energyListP5 = _bemcCut2(energyListP5);
149  energyListM5 = _bemcCut2(energyListM5);
150  energyListP10 = _bemcCut2(energyListP10);
151  energyListM10 = _bemcCut2(energyListM10);
152 
153  StjFourVecList fourList0 = _toP4(trackList, energyList0);
154  StjFourVecList fourListP5 = _toP4(trackList, energyListP5);
155  StjFourVecList fourListM5 = _toP4(trackList, energyListM5);
156  StjFourVecList fourListP10 = _toP4(trackList, energyListP10);
157  StjFourVecList fourListM10 = _toP4(trackList, energyListM10);
158 
159  fourList0 = _fourCut(fourList0);
160  fourListP5 = _fourCut(fourListP5);
161  fourListM5 = _fourCut(fourListM5);
162  fourListP10 = _fourCut(fourListP10);
163  fourListM10 = _fourCut(fourListM10);
164 
165  vector<StjJet> jetList0 = _jetFinder(fourList0);
166  vector<StjJet> jetListP5 = _jetFinder(fourListP5);
167  vector<StjJet> jetListM5 = _jetFinder(fourListM5);
168  vector<StjJet> jetListP10 = _jetFinder(fourListP10);
169  vector<StjJet> jetListM10 = _jetFinder(fourListM10);
170 
171  jetList0 = _jetCut(jetList0);
172  jetListP5 = _jetCut(jetListP5);
173  jetListM5 = _jetCut(jetListM5);
174  jetListP10 = _jetCut(jetListP10);
175  jetListM10 = _jetCut(jetListM10);
176 
177  jetprint(jetList0);
178  jetprint(jetListP5);
179  jetprint(jetListM5);
180  jetprint(jetListP10);
181  jetprint(jetListM10);
182 
183  return kStOk;
184  }
185 
186  Int_t Finish()
187  {
188  return kStOk;
189  }
190 
191  ClassDef(StJetMakerA, 1)
192 };
void setConeRadius(double v)
Set cone radius:
Definition: StConePars.h:65
void setAddMidpoints(bool v)
Add seeds at midpoints?
Definition: StConePars.h:56
void setSplitFraction(double v)
split jets if E_shared/E_neighbor&gt;splitFraction
Definition: StConePars.h:50
void setGridSpacing(int nEta, double etaMin, double etaMax, int nPhi, double phiMin, double phiMax)
Set the grid spacing:
Definition: StConePars.h:36
void setDoSplitMerge(bool v)
Do Split/Merge step?
Definition: StConePars.h:59
void setDebug(bool v)
Toggle debug streams on/off.
Definition: StConePars.h:68
void setSeedEtMin(double v)
minimum et threshold to be considered a seed
Definition: StConePars.h:44
void setAssocEtMin(double v)
minimum et threshold to be considered for addition to the seed
Definition: StConePars.h:47
Definition: StjTPC.h:12
void setRequireStableMidpoints(bool v)
Require stable midpoints?
Definition: StConePars.h:62
Definition: Stypes.h:41
void setPerformMinimization(bool v)
Let jet wander to minimum?
Definition: StConePars.h:53