4 #include <StMuDSTMaker/COMMON/StMuDstMaker.h>
5 #include <StMuDSTMaker/COMMON/StMuDst.h>
6 #include <StMuDSTMaker/COMMON/StMuEvent.h>
8 #include <StTriggerUtilities/StTriggerSimuMaker.h>
9 #include <StTriggerUtilities/StTriggerSimuResult.h>
10 #include <StTriggerUtilities/Bemc/StBemcTriggerSimu.h>
12 #include <StSpinPool/StMCAsymMaker/StMCAsymMaker.h>
15 #include <TDirectory.h>
17 #include "StjMCMuDst.h"
18 #include "StjMCKinMuDst.h"
19 #include "StjMCParticleList.h"
20 #include "StjMCParticlePrint.h"
34 :
StMaker(name), _file(file), _uDstMaker(uDstMaker)
39 const char* GetCVS()
const
40 {
static const char cvs[]=
"Tag $Name: $ $Id: StjMCAsymMaker.C,v 1.3 2014/08/06 11:43:24 jeromel Exp $ built " __DATE__
" " __TIME__;
return cvs;}
75 Double_t _df1_gsa_nlo;
76 Double_t _df2_gsa_nlo;
77 Double_t _df1_gsb_nlo;
78 Double_t _df2_gsb_nlo;
79 Double_t _df1_gsc_nlo;
80 Double_t _df2_gsc_nlo;
82 Double_t _df1_grsv_lo;
83 Double_t _df2_grsv_lo;
84 Double_t _df1_grsv_nlo;
85 Double_t _df2_grsv_nlo;
86 Double_t _df1_grsv_g0;
87 Double_t _df2_grsv_g0;
88 Double_t _df1_grsv_gmax;
89 Double_t _df2_grsv_gmax;
90 Double_t _df1_grsv_gmin;
91 Double_t _df2_grsv_gmin;
93 Double_t _df1_grsv_m015;
94 Double_t _df2_grsv_m015;
95 Double_t _df1_grsv_m030;
96 Double_t _df2_grsv_m030;
97 Double_t _df1_grsv_m045;
98 Double_t _df2_grsv_m045;
99 Double_t _df1_grsv_m060;
100 Double_t _df2_grsv_m060;
101 Double_t _df1_grsv_m075;
102 Double_t _df2_grsv_m075;
103 Double_t _df1_grsv_m090;
104 Double_t _df2_grsv_m090;
105 Double_t _df1_grsv_m105;
106 Double_t _df2_grsv_m105;
107 Double_t _df1_grsv_p030;
108 Double_t _df2_grsv_p030;
109 Double_t _df1_grsv_p045;
110 Double_t _df2_grsv_p045;
111 Double_t _df1_grsv_p060;
112 Double_t _df2_grsv_p060;
113 Double_t _df1_grsv_p070;
114 Double_t _df2_grsv_p070;
116 Double_t _df1_dssv_nlo;
117 Double_t _df2_dssv_nlo;
119 StjMCParticle getMcParticleForId(
const StjMCParticleList& list,
int id)
121 for(StjMCParticleList::const_iterator it = list.begin(); it != list.end(); ++it)
123 if((*it).mcparticleId ==
id)
return (*it);
135 _tree =
new TTree(
"mcasym",
"mcasym");
136 _tree->Branch(
"runNumber" , &_runNumber ,
"runNumber/I" );
137 _tree->Branch(
"eventId" , &_eventId ,
"eventId/I" );
138 _tree->Branch(
"vertexZ" , &_vertexZ ,
"vertexZ/D" );
140 _tree->Branch(
"s" , &_s ,
"s/D");
141 _tree->Branch(
"t" , &_t ,
"t/D");
142 _tree->Branch(
"u" , &_u ,
"u/D");
143 _tree->Branch(
"pt" , &_pt ,
"pt/D");
144 _tree->Branch(
"costh" , &_costh ,
"costh/D");
145 _tree->Branch(
"x1" , &_x1 ,
"x1/D");
146 _tree->Branch(
"x2" , &_x2 ,
"x2/D");
147 _tree->Branch(
"pid" , &_pid ,
"pid/I");
148 _tree->Branch(
"pdg1" , &_pdg1 ,
"pdg1/I");
149 _tree->Branch(
"pdg2" , &_pdg2 ,
"pdg2/I");
150 _tree->Branch(
"pdg3" , &_pdg3 ,
"pdg3/I");
151 _tree->Branch(
"pdg4" , &_pdg4 ,
"pdg4/I");
152 _tree->Branch(
"a_ll" , &_a_ll ,
"a_ll/D");
153 _tree->Branch(
"f1_cteq5m1" , &_f1_cteq5m1 ,
"f1_cteq5m1/D");
154 _tree->Branch(
"f2_cteq5m1" , &_f2_cteq5m1 ,
"f2_cteq5m1/D");
155 _tree->Branch(
"f1_cteq5l" , &_f1_cteq5l ,
"f1_cteq5l/D");
156 _tree->Branch(
"f2_cteq5l" , &_f2_cteq5l ,
"f2_cteq5l/D");
157 _tree->Branch(
"df1_gsa_nlo" , &_df1_gsa_nlo ,
"df1_gsa_nlo/D");
158 _tree->Branch(
"df2_gsa_nlo" , &_df2_gsa_nlo ,
"df2_gsa_nlo/D");
159 _tree->Branch(
"df1_gsb_nlo" , &_df1_gsb_nlo ,
"df1_gsb_nlo/D");
160 _tree->Branch(
"df2_gsb_nlo" , &_df2_gsb_nlo ,
"df2_gsb_nlo/D");
161 _tree->Branch(
"df1_gsc_nlo" , &_df1_gsc_nlo ,
"df1_gsc_nlo/D");
162 _tree->Branch(
"df2_gsc_nlo" , &_df2_gsc_nlo ,
"df2_gsc_nlo/D");
163 _tree->Branch(
"df1_grsv_lo" , &_df1_grsv_lo ,
"df1_grsv_lo/D");
164 _tree->Branch(
"df2_grsv_lo" , &_df2_grsv_lo ,
"df2_grsv_lo/D");
165 _tree->Branch(
"df1_grsv_nlo" , &_df1_grsv_nlo ,
"df1_grsv_nlo/D");
166 _tree->Branch(
"df2_grsv_nlo" , &_df2_grsv_nlo ,
"df2_grsv_nlo/D");
167 _tree->Branch(
"df1_grsv_g0" , &_df1_grsv_g0 ,
"df1_grsv_g0/D");
168 _tree->Branch(
"df2_grsv_g0" , &_df2_grsv_g0 ,
"df2_grsv_g0/D");
169 _tree->Branch(
"df1_grsv_gmax" , &_df1_grsv_gmax ,
"df1_grsv_gmax/D");
170 _tree->Branch(
"df2_grsv_gmax" , &_df2_grsv_gmax ,
"df2_grsv_gmax/D");
171 _tree->Branch(
"df1_grsv_gmin" , &_df1_grsv_gmin ,
"df1_grsv_gmin/D");
172 _tree->Branch(
"df2_grsv_gmin" , &_df2_grsv_gmin ,
"df2_grsv_gmin/D");
173 _tree->Branch(
"df1_grsv_m015" , &_df1_grsv_m015 ,
"df1_grsv_m015/D");
174 _tree->Branch(
"df2_grsv_m015" , &_df2_grsv_m015 ,
"df2_grsv_m015/D");
175 _tree->Branch(
"df1_grsv_m030" , &_df1_grsv_m030 ,
"df1_grsv_m030/D");
176 _tree->Branch(
"df2_grsv_m030" , &_df2_grsv_m030 ,
"df2_grsv_m030/D");
177 _tree->Branch(
"df1_grsv_m045" , &_df1_grsv_m045 ,
"df1_grsv_m045/D");
178 _tree->Branch(
"df2_grsv_m045" , &_df2_grsv_m045 ,
"df2_grsv_m045/D");
179 _tree->Branch(
"df1_grsv_m060" , &_df1_grsv_m060 ,
"df1_grsv_m060/D");
180 _tree->Branch(
"df2_grsv_m060" , &_df2_grsv_m060 ,
"df2_grsv_m060/D");
181 _tree->Branch(
"df1_grsv_m075" , &_df1_grsv_m075 ,
"df1_grsv_m075/D");
182 _tree->Branch(
"df2_grsv_m075" , &_df2_grsv_m075 ,
"df2_grsv_m075/D");
183 _tree->Branch(
"df1_grsv_m090" , &_df1_grsv_m090 ,
"df1_grsv_m090/D");
184 _tree->Branch(
"df2_grsv_m090" , &_df2_grsv_m090 ,
"df2_grsv_m090/D");
185 _tree->Branch(
"df1_grsv_m105" , &_df1_grsv_m105 ,
"df1_grsv_m105/D");
186 _tree->Branch(
"df2_grsv_m105" , &_df2_grsv_m105 ,
"df2_grsv_m105/D");
187 _tree->Branch(
"df1_grsv_p030" , &_df1_grsv_p030 ,
"df1_grsv_p030/D");
188 _tree->Branch(
"df2_grsv_p030" , &_df2_grsv_p030 ,
"df2_grsv_p030/D");
189 _tree->Branch(
"df1_grsv_p045" , &_df1_grsv_p045 ,
"df1_grsv_p045/D");
190 _tree->Branch(
"df2_grsv_p045" , &_df2_grsv_p045 ,
"df2_grsv_p045/D");
191 _tree->Branch(
"df1_grsv_p060" , &_df1_grsv_p060 ,
"df1_grsv_p060/D");
192 _tree->Branch(
"df2_grsv_p060" , &_df2_grsv_p060 ,
"df2_grsv_p060/D");
193 _tree->Branch(
"df1_grsv_p070" , &_df1_grsv_p070 ,
"df1_grsv_p070/D");
194 _tree->Branch(
"df2_grsv_p070" , &_df2_grsv_p070 ,
"df2_grsv_p070/D");
195 _tree->Branch(
"df1_dssv_nlo" , &_df1_dssv_nlo ,
"df1_dssv_nlo/D");
196 _tree->Branch(
"df2_dssv_nlo" , &_df2_dssv_nlo ,
"df2_dssv_nlo/D");
203 _runNumber = _uDstMaker->muDst()->event()->runId();
204 _eventId = _uDstMaker->muDst()->event()->eventId();
205 _vertexZ = _uDstMaker->muDst()->event()->primaryVertexPosition().z();
217 _costh = mckin->costh();
223 StjMCParticleList list = _mc->getMCParticleList();
234 _a_ll = asym->getPartonicALL(_s, _t, _u, _pid, _pdg1, _pdg2, _pdg3, _pdg4);
236 Double_t Q2 = _pt*_pt;
238 _f1_cteq5m1 = asym->get_unpolPDF_NLO(_pdg1, _x1, Q2);
239 _f2_cteq5m1 = asym->get_unpolPDF_NLO(_pdg2, _x2, Q2);
240 _f1_cteq5l = asym->get_unpolPDF_LO(_pdg1, _x1, Q2);
241 _f2_cteq5l = asym->get_unpolPDF_LO(_pdg2, _x2, Q2);
243 _df1_gsa_nlo = asym->get_polPDF_NLO_GSA(_pdg1, _x1, Q2);
244 _df2_gsa_nlo = asym->get_polPDF_NLO_GSA(_pdg2, _x2, Q2);
245 _df1_gsb_nlo = asym->get_polPDF_NLO_GSB(_pdg1, _x1, Q2);
246 _df2_gsb_nlo = asym->get_polPDF_NLO_GSB(_pdg2, _x2, Q2);
247 _df1_gsc_nlo = asym->get_polPDF_NLO_GSC(_pdg1, _x1, Q2);
248 _df2_gsc_nlo = asym->get_polPDF_NLO_GSC(_pdg2, _x2, Q2);
250 _df1_grsv_lo = asym->get_polPDF_LO(_pdg1, _x1, Q2);
251 _df2_grsv_lo = asym->get_polPDF_LO(_pdg2, _x2, Q2);
252 _df1_grsv_nlo = asym->get_polPDF_NLO(_pdg1, _x1, Q2);
253 _df2_grsv_nlo = asym->get_polPDF_NLO(_pdg2, _x2, Q2);
254 _df1_grsv_g0 = asym->get_polPDF_NLO_g0(_pdg1, _x1, Q2);
255 _df2_grsv_g0 = asym->get_polPDF_NLO_g0(_pdg2, _x2, Q2);
256 _df1_grsv_gmax = asym->get_polPDF_NLO_gmax(_pdg1, _x1, Q2);
257 _df2_grsv_gmax = asym->get_polPDF_NLO_gmax(_pdg2, _x2, Q2);
258 _df1_grsv_gmin = asym->get_polPDF_NLO_gmin(_pdg1, _x1, Q2);
259 _df2_grsv_gmin = asym->get_polPDF_NLO_gmin(_pdg2, _x2, Q2);
261 _df1_grsv_m015 = asym->get_polPDF_NLO_m015(_pdg1, _x1, Q2);
262 _df2_grsv_m015 = asym->get_polPDF_NLO_m015(_pdg2, _x2, Q2);
263 _df1_grsv_m030 = asym->get_polPDF_NLO_m030(_pdg1, _x1, Q2);
264 _df2_grsv_m030 = asym->get_polPDF_NLO_m030(_pdg2, _x2, Q2);
265 _df1_grsv_m045 = asym->get_polPDF_NLO_m045(_pdg1, _x1, Q2);
266 _df2_grsv_m045 = asym->get_polPDF_NLO_m045(_pdg2, _x2, Q2);
267 _df1_grsv_m060 = asym->get_polPDF_NLO_m060(_pdg1, _x1, Q2);
268 _df2_grsv_m060 = asym->get_polPDF_NLO_m060(_pdg2, _x2, Q2);
269 _df1_grsv_m075 = asym->get_polPDF_NLO_m075(_pdg1, _x1, Q2);
270 _df2_grsv_m075 = asym->get_polPDF_NLO_m075(_pdg2, _x2, Q2);
271 _df1_grsv_m090 = asym->get_polPDF_NLO_m090(_pdg1, _x1, Q2);
272 _df2_grsv_m090 = asym->get_polPDF_NLO_m090(_pdg2, _x2, Q2);
273 _df1_grsv_m105 = asym->get_polPDF_NLO_m105(_pdg1, _x1, Q2);
274 _df2_grsv_m105 = asym->get_polPDF_NLO_m105(_pdg2, _x2, Q2);
275 _df1_grsv_p030 = asym->get_polPDF_NLO_p030(_pdg1, _x1, Q2);
276 _df2_grsv_p030 = asym->get_polPDF_NLO_p030(_pdg2, _x2, Q2);
277 _df1_grsv_p045 = asym->get_polPDF_NLO_p045(_pdg1, _x1, Q2);
278 _df2_grsv_p045 = asym->get_polPDF_NLO_p045(_pdg2, _x2, Q2);
279 _df1_grsv_p060 = asym->get_polPDF_NLO_p060(_pdg1, _x1, Q2);
280 _df2_grsv_p060 = asym->get_polPDF_NLO_p060(_pdg2, _x2, Q2);
281 _df1_grsv_p070 = asym->get_polPDF_NLO_p070(_pdg1, _x1, Q2);
282 _df2_grsv_p070 = asym->get_polPDF_NLO_p070(_pdg2, _x2, Q2);
284 _df1_dssv_nlo = asym->get_polPDF_NLO_DSSV(_pdg1, _x1, Q2);
285 _df2_dssv_nlo = asym->get_polPDF_NLO_DSSV(_pdg2, _x2, Q2);
293 _tree->BuildIndex(
"runNumber",
"eventId");
const StTriggerSimuResult & detailedResult(int trigId)
returns object containing detailed information about simulation of given trigger