StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJetMakerB.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 #include <StjJetCutTrgBHT.h>
35 #include <StjJetCutTrgBJP.h>
36 #include <StjJetCutDetectorEta.h>
37 
38 #include <StjTrgBEMCJetPatchTowerIdMap2005.h>
39 
40 #include <StjJetListWriter.h>
41 #include <StjDijetListWriter.h>
42 
43 #include <StjTrackPrint.h>
44 #include <StjTowerEnergyPrint.h>
45 #include <StjFourVecPrint.h>
46 #include <StjJetPrint.h>
47 
48 
49 #include <StjDijetList.h>
50 #include <StjDijetPrint.h>
51 
52 #include <StjFormDijet.h>
53 
54 #include <StjTrg.h>
55 #include <StjVertex.h>
56 
57 #include <TDirectory.h>
58 
59 class StJetMakerB : public StMaker {
60 
61 public:
62 
63  StJetMakerB(const Char_t *name,
64  StjTPC* tpc, StjBEMC* bemc,
66  StjTrg* trgBJP1, StjTrg* trgBJP2, StjTrg* trgBHT1, StjTrg* trgBHT2,
67  TDirectory* file)
68  : StMaker(name), _file(file)
69  , _tpc(tpc), _bemc(bemc)
70  , _vertex(vertex)
71  , _trgBJP1(trgBJP1), _trgBJP2(trgBJP2), _trgBHT1(trgBHT1), _trgBHT2(trgBHT2)
72  { }
73  virtual ~StJetMakerB() { }
74 
75 private:
76 
77  TDirectory* _file;
78 
79  StjTPC* _tpc;
80  StjBEMC* _bemc;
81 
82  StjVertex* _vertex;
83 
84  StjTrackListCut _tpcCut1;
85  StjTrackListCut _tpcCut2;
86 
87  StjTowerEnergyListCut _bemcCut1;
88  StjTowerEnergyListCut _bemcCut2;
89 
90  StjTowerEnergyCorrectionForTracks _towerEnergyCorrectionForTracks;
91 
92  StjTowerEnergyListVariation _energyVariationNull;
93  StjTowerEnergyListVariation _energyVariationPlus5;
94  StjTowerEnergyListVariation _energyVariationMinus5;
95  StjTowerEnergyListVariation _energyVariationPlus10;
96  StjTowerEnergyListVariation _energyVariationMinus10;
97 
99 
100  StjFourVecListCut _fourCut;
101 
102  StjRunJetFinder _jetFinder;
103 
104  StjJetListCut _jetCut;
105  StjJetListCut _jetCutBHT2;
106  StjJetListCut _jetCutBJP2;
107  StjJetListCut _jetCut2;
108 
109  StjJetListWriter* _jetListWriter;
110 
111  StjFormDijet _formDijet;
112 
113  StjDijetListWriter* _dijetListWriter;
114 
115 
116  StjTrg* _trgBJP1;
117  StjTrg* _trgBJP2;
118  StjTrg* _trgBHT1;
119  StjTrg* _trgBHT2;
120 
121 
122  Int_t Init()
123  {
124  _tpcCut1.addCut(new StjTrackCutDca(3.0));
125  _tpcCut1.addCut(new StjTrackCutEta(-2.0, 2.0));
126  _tpcCut1.addCut(new StjTrackCutPossibleHitRatio(0.51));
127 
128  _bemcCut1.addCut(new StjTowerEnergyCutBemcWestOnly());
129  _bemcCut1.addCut(new StjTowerEnergyCutEnergy(0.0));
130  _bemcCut1.addCut(new StjTowerEnergyCutBemcStatus(1));
131  _bemcCut1.addCut(new StjTowerEnergyCutAdc(0, 2.0));
132 
133  _tpcCut2.addCut(new StjTrackCutFlag(0));
134  _tpcCut2.addCut(new StjTrackCutNHits(20));
135 
136  _bemcCut2.addCut(new StjTowerEnergyCutEnergy(0.0));
137 
138  _energyVariationNull.addVariation(new StjTowerEnergyVariationEnergy(0));
139  _energyVariationPlus5.addVariation(new StjTowerEnergyVariationEnergy(0.05));
140  _energyVariationMinus5.addVariation(new StjTowerEnergyVariationEnergy(-0.05));
141  _energyVariationPlus10.addVariation(new StjTowerEnergyVariationEnergy(0.1));
142  _energyVariationMinus10.addVariation(new StjTowerEnergyVariationEnergy(-0.1));
143 
144  _fourCut.addCut(new StjFourVecCutPt(0.2));
145 
146  StConePars* cpars = new StConePars();
147  cpars->setGridSpacing(56, -1.6, 1.6, 120, -3.141592613589793, 3.141592613589793);
148  cpars->setConeRadius(0.4);
149  cpars->setSeedEtMin(0.5);
150  cpars->setAssocEtMin(0.1);
151  cpars->setSplitFraction(0.5);
152  cpars->setPerformMinimization(true);
153  cpars->setAddMidpoints(true);
154  cpars->setRequireStableMidpoints(true);
155  cpars->setDoSplitMerge(true);
156  cpars->setDebug(false);
157  _jetFinder.Init(cpars);
158 
159  _jetCut.addCut(new StjJetCutPt(5.0));
160 
161  _jetCutBHT2.addCut(new StjJetCutTrgBHT(_trgBHT2));
162  _jetCutBJP2.addCut(new StjJetCutTrgBJP(_trgBJP2, new StjTrgBEMCJetPatchTowerIdMap2005));
163 
164  _jetListWriter = new StjJetListWriter("jets", "fours", _file);
165 
166  _jetCut2.addCut(new StjJetCutDetectorEta(0.2, 0.8));
167 
168  _dijetListWriter = new StjDijetListWriter("dijets", _file);
169 
170  return kStOk;
171  }
172 
173  Int_t Make()
174  {
175  StjTrackPrint trackprint;
176  StjTowerEnergyPrint towerprint;
177  StjFourVecPrint fourprint;
178  StjJetPrint jetprint;
179  StjDijetPrint dijetprint;
180 
181  StjTrackList trackList = _tpc->getTrackList();
182  StjTowerEnergyList energyList = _bemc->getEnergyList();
183 
184  // towerprint(energyList);
185 
186  trackList = _tpcCut1(trackList);
187  energyList = _bemcCut1(energyList);
188 
189  energyList = _towerEnergyCorrectionForTracks(energyList, trackList);
190 
191  trackList = _tpcCut2(trackList);
192 
193  energyList = _bemcCut2(energyList);
194 
195  StjFourVecList fourList = _toP4(trackList, energyList);
196 
197  fourList = _fourCut(fourList);
198 
199  vector<StjJet> jetList = _jetFinder(fourList);
200 
201  jetList = _jetCut(jetList);
202 
203  vector<StjJet> jetListBHT2 = _jetCutBHT2(jetList);
204  vector<StjJet> jetListBJP2 = _jetCutBJP2(jetList);
205 
206  _jetListWriter->Fill(jetList, fourList);
207 
208  jetList = _jetCut2(jetList);
209 
210  StjDijetList dijetList = _formDijet(jetList);
211 
212  dijetprint(dijetList);
213 
214  _dijetListWriter->Fill(dijetList);
215 
216  return kStOk;
217  }
218 
219  Int_t Finish()
220  {
221  _jetListWriter->Finish();
222 
223  _dijetListWriter->Finish();
224 
225  return kStOk;
226  }
227 
228  ClassDef(StJetMakerB, 1)
229 };
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
Definition: StjTrg.h:11
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
StMaker(const char *name="", const char *dummy=0)
Constructor &amp; Destructor.
Definition: StMaker.cxx:188
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