6 #include "St2011WMaker.h"
7 #include "St2011pubMcMaker.h"
8 #include "StEmcUtil/geometry/StEmcGeom.h"
11 #include "tables/St_g2t_tpc_hit_Table.h"
12 #include "StMcEventMaker/StMcEventMaker.h"
13 #include "StMcEvent/StMcEvent.hh"
14 #include "StMcEvent/StMcVertex.hh"
15 #include "StMcEvent/StMcTrack.hh"
29 St2011pubMcMaker::~St2011pubMcMaker(){
36 Int_t St2011pubMcMaker::Init(){
40 return StMaker::Init();
62 St2011pubMcMaker::doWanalysis(){
66 for(
unsigned int iv=0;iv<wMK->wEve->vertex.size();iv++) {
68 for(
unsigned int it=0;it<V.eleTrack.size();it++) {
70 if(T.isMatch2Cl==
false)
continue;
71 assert(T.cluster.nTower>0);
72 assert(T.nearTotET>0);
74 if(T.cluster.ET /T.nearTotET< wMK->par_nearTotEtFrac)
continue;
75 if(T.awayTotET> 30.)
continue;
79 hA[1]->Fill(mWP.Perp());
82 hA[24]->Fill(mWP.Eta());
83 hA[25]->Fill(T.hadronicRecoil.Eta());
84 hA[26]->Fill(mWP.Perp(),T.hadronicRecoil.Eta());
86 hA[27]->Fill(T.hadronicRecoil.Eta());
89 hA[28]->Fill(T.hadronicRecoil.Eta());
93 TVector3 hadronicPt(T.hadronicRecoil.X(),T.hadronicRecoil.Y(),0);
94 hA[3]->Fill(mWP.Perp()-hadronicPt.Perp());
95 hA[4]->Fill(mWP.Perp(),hadronicPt.Perp());
96 hA[5]->Fill(hadronicPt.Perp());
98 float delPhi=mWP.DeltaPhi(-hadronicPt);
99 hA[6]->Fill(mWP.Perp(),delPhi);
100 hA[7]->Fill(mWP.Perp(),mWP.Perp()-hadronicPt.Perp());
101 hA[8]->Fill(T.hadronicRecoil.Perp(),delPhi);
104 hA[9]->Fill(mElectronP.Perp());
105 hA[10]->Fill(T.cluster.ET);
106 hA[11]->Fill(mElectronP.Perp(),T.cluster.ET);
107 hA[12]->Fill(mElectronP.Perp(),mElectronP.Perp()-T.cluster.ET);
109 TVector3 electronPt(T.cluster.position.X(),T.cluster.position.Y(),0);
110 electronPt.SetMag(T.cluster.ET);
113 TVector3 neutrinoPt=-1*(hadronicPt+electronPt);
114 hA[13]->Fill(neutrinoPt.Perp());
115 hA[14]->Fill(mNeutrinoP.Perp());
116 hA[15]->Fill(mNeutrinoP.Perp(),neutrinoPt.Perp());
117 hA[16]->Fill(mNeutrinoP.Perp()-neutrinoPt.Perp());
119 hA[17]->Fill(mNeutrinoP.Perp(),mElectronP.Perp());
121 float recoDeltaPhi=neutrinoPt.DeltaPhi(electronPt);
122 float geantDeltaPhi=mNeutrinoP.DeltaPhi(mElectronP);
124 hA[18]->Fill(geantDeltaPhi,recoDeltaPhi);
125 hA[19]->Fill(cos(geantDeltaPhi)-cos(recoDeltaPhi));
127 float Mt=sqrt(2*T.cluster.ET*neutrinoPt.Perp()*(1-cos(recoDeltaPhi)));
128 float gMt=sqrt(2*mElectronP.Perp()*mNeutrinoP.Perp()*(1-cos(geantDeltaPhi)));
133 hA[22]->Fill(Mt,T.cluster.ET);
134 hA[23]->Fill(gMt-Mt);
138 float trueWpL=mWP.z();
139 float eleTheta=T.primP.Theta();
140 float ratioE=T.cluster.energy/40.0;
141 float pLRecoPlus=80.0*(ratioE)*((cos(eleTheta))+sqrt(cos(eleTheta)*cos(eleTheta)+sin(eleTheta)*sin(eleTheta)*(1-ratioE*ratioE)))/(ratioE*ratioE*sin(eleTheta)*sin(eleTheta));
142 float pLRecoMinus=80.0*(ratioE)*((cos(eleTheta))-sqrt(cos(eleTheta)*cos(eleTheta)+sin(eleTheta)*sin(eleTheta)*(1-ratioE*ratioE)))/(ratioE*ratioE*sin(eleTheta)*sin(eleTheta));
143 hA[29]->Fill(pLRecoPlus);
144 hA[30]->Fill(trueWpL-pLRecoPlus);
145 hA[31]->Fill(trueWpL,pLRecoPlus);
147 hA[32]->Fill(pLRecoMinus);
148 hA[33]->Fill(trueWpL-pLRecoMinus);
149 hA[34]->Fill(trueWpL,pLRecoMinus);
151 const StMuTrack *prTr=T.prMuTrack; assert(prTr);
152 float p_chrg=prTr->
charge();
153 if(p_chrg > 0)
continue;
155 float eleEta=T.primP.Eta();
158 hA[35]->Fill(trueWpL,pLRecoMinus);
159 hA[37]->Fill(trueWpL,pLRecoPlus);
161 else if(eleEta>0.8) {
162 hA[36]->Fill(trueWpL,pLRecoMinus);
163 hA[38]->Fill(trueWpL,pLRecoPlus);
166 if(T.cluster.ET < 30)
continue;
169 hA[39]->Fill(mWP.z(),T.cluster.energy);
170 hA[42]->Fill(T.cluster.energy);
173 hA[40]->Fill(mWP.z(),T.cluster.energy);
174 hA[43]->Fill(T.cluster.energy);
176 if(eleEta > -0.1 && eleEta < 0.1) {
177 hA[41]->Fill(mWP.z(),T.cluster.energy);
178 hA[44]->Fill(T.cluster.energy);
189 St2011pubMcMaker::doWefficiency(){
192 if(fabs(mElectronP.Eta()) > 1.)
return;
194 hA[50]->Fill(mElectronP.Perp());
195 hA[54]->Fill(mElectronP.Eta());
196 hA[58]->Fill(mVertex.Z());
197 hA[62]->Fill(mElectronP.Phi());
199 hA[68]->Fill(mElectronP.Perp());
203 float Rcylinder= wMK->mBtowGeom->Radius();
204 detEle.SetPtEtaPhi(Rcylinder,mElectronP.Eta(),mElectronP.Phi());
205 detEle.SetZ(detEle.Z()+mVertex.Z());
206 hA[66]->Fill(detEle.Eta(),mElectronP.Perp());
209 if(!wMK->wEve->l2bitET)
return;
211 hA[51]->Fill(mElectronP.Perp());
212 hA[55]->Fill(mElectronP.Eta());
213 hA[59]->Fill(mVertex.Z());
214 hA[63]->Fill(mElectronP.Phi());
215 hA[69]->Fill(mElectronP.Perp());
217 hA[67]->Fill(detEle.Eta(),mElectronP.Perp());
220 if(wMK->wEve->vertex.size()<=0)
return;
222 hA[52]->Fill(mElectronP.Perp());
223 hA[56]->Fill(mElectronP.Eta());
224 hA[60]->Fill(mVertex.Z());
225 hA[64]->Fill(mElectronP.Phi());
227 hA[70]->Fill(mElectronP.Perp());
233 for(
unsigned int iv=0;iv<wMK->wEve->vertex.size();iv++) {
235 for(
unsigned int it=0;it<V.eleTrack.size();it++) {
237 if(T.isMatch2Cl==
false)
continue;
238 assert(T.cluster.nTower>0);
239 assert(T.nearTotET>0);
241 if(T.cluster.ET/T.nearTotET< wMK->par_nearTotEtFrac)
243 if(T.ptBalance.Perp() < wMK->par_ptBalance || T.awayTotET > 30.)
247 hA[53]->Fill(mElectronP.Perp());
248 hA[57]->Fill(mElectronP.Eta());
249 hA[61]->Fill(mVertex.Z());
250 hA[65]->Fill(mElectronP.Phi());
252 hA[71]->Fill(mElectronP.Perp());
262 St2011pubMcMaker::doMCanalysis(){
264 mMcEvent = (
StMcEvent*) StMaker::GetChain()->GetDataSet(
"StMcEvent");
273 mVertex=TVector3(V->position().x(),V->position().y(),V->position().z());
277 while(found<2 && i<mMcEvent->tracks().size()){
278 StMcTrack* mcTrack = mMcEvent->tracks()[i];
279 int pdgId=mcTrack->pdgId();
282 if(pdgId==11 || pdgId==-11){
283 if(abs(mcTrack->parent()->pdgId()) == 24 ){
284 pElectron=mcTrack->momentum();
286 pW=mcTrack->parent()->momentum();
287 eW=mcTrack->parent()->energy();
292 if(pdgId==12 || pdgId==-12){
293 if(abs(mcTrack->parent()->pdgId()) == 24 ){
294 pNeutrino=mcTrack->momentum();
296 pW=mcTrack->parent()->momentum();
297 eW=mcTrack->parent()->energy();
305 if(found!=2)
return false;
307 mWP=TVector3(pW.x(),pW.y(),pW.z());
308 mNeutrinoP=TVector3(pNeutrino.x(),pNeutrino.y(),pNeutrino.z());
309 mElectronP=TVector3(pElectron.x(),pElectron.y(),pElectron.z());
310 TVector3 diff=mWP-mNeutrinoP-mElectronP;
311 if(diff.Mag() > 0.0001)
312 LOG_INFO<<
"\n \n W+e+nu vector sum ="<<diff.Mag()<<endm;
313 if(mElectronP.Mag() < 0.0001)
314 LOG_INFO<<
"\n \n no lepton track ="<<endm;
317 float rapW = 0.5*log((eW+mWP.Z())/(eW-mWP.Z()));
318 float mw2sqs=80.4/500.;
319 float x1=mw2sqs*exp(rapW);
320 float x2=mw2sqs*exp(-rapW);
323 if(fabs(mElectronP.Eta())<1){
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
Short_t charge() const
Returns charge.
maker to retrieve info from geant.root files for comparison with reco quantities from MC ...
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...