6 #include "St2009WMaker.h"
7 #include "St2009ZMaker.h"
8 #include "St2009pubMcMaker.h"
9 #include "StEmcUtil/geometry/StEmcGeom.h"
13 #include "tables/St_g2t_tpc_hit_Table.h"
14 #include "StMcEventMaker/StMcEventMaker.h"
15 #include "StMcEvent/StMcEvent.hh"
16 #include "StMcEvent/StMcVertex.hh"
17 #include "StMcEvent/StMcTrack.hh"
20 #include <StMuDSTMaker/COMMON/StMuDstMaker.h>
21 #include <StMuDSTMaker/COMMON/StMuDst.h>
22 #include <StMuDSTMaker/COMMON/StMuEvent.h>
23 #include <StMuDSTMaker/COMMON/StMuMcTrack.h>
37 St2009pubMcMaker::~St2009pubMcMaker(){
44 Int_t St2009pubMcMaker::Init(){
48 return StMaker::Init();
76 St2009pubMcMaker::doWefficiency(){
81 const float PI=TMath::Pi();
82 float elePhi=mElectronP.Phi();
83 if(elePhi<0) elePhi+=2*PI;
86 float modulePair=12.0;
87 int resid = (int) (elePhi/modulePair);
88 float phiMod= elePhi - resid*modulePair;
91 float Rcylinder= wMK->mBtowGeom->Radius();
92 detEle.SetPtEtaPhi(Rcylinder,mElectronP.Eta(),mElectronP.Phi());
93 detEle.SetZ(detEle.Z()+mVertex.Z());
96 if(wMK->isMC ==350) w=wMK->hReweight->GetBinContent(wMK->hReweight->FindBin(mVertex.Z()));
97 float zdcRate=wMK->mMuDstMaker->
muDst()->
event()->runInfo().zdcCoincidenceRate();
100 if(fabs(mElectronP.Eta()) > 1.0)
return;
102 if(fabs(mElectronP.Perp()) < 25.)
return;
104 int bx7=wMK->wEve.bx7;
105 if( (bx7>30 && bx7<40) || (bx7>110) )
return;
108 hA[50]->Fill(mElectronP.Perp(),w);
109 hA[54]->Fill(mElectronP.Eta(),w);
110 hA[58]->Fill(mVertex.Z(),w);
111 hA[62]->Fill(mElectronP.Phi(),w);
112 hB[83]->Fill(mElectronP.Eta(),mElectronP.Perp(),w);
113 hA[89]->Fill(zdcRate,w);
115 hA[68]->Fill(mElectronP.Perp(),w);
116 hA[77]->Fill(phiMod,w);
117 hB[66]->Fill(detEle.Eta(),mElectronP.Perp(),w);
118 hA[79]->Fill(detEle.Eta(),w);
119 hA[122]->Fill(zdcRate,wMK->wEve.bx7);
122 for(
unsigned int iv=0;iv<wMK->wEve.vertex.size();iv++) {
124 for(
unsigned int it=0;it<V.eleTrack.size();it++) {
126 if(T.isMatch2Cl==
false)
continue;
127 assert(T.cluster.nTower>0);
128 assert(T.nearTotET>0);
130 hB[68]->Fill(mElectronP.Perp(),T.cluster.ET,w);
135 if(!wMK->wEve.l2bitET)
return;
137 hA[51]->Fill(mElectronP.Perp(),w);
138 hA[55]->Fill(mElectronP.Eta(),w);
139 hA[59]->Fill(mVertex.Z(),w);
140 hA[63]->Fill(mElectronP.Phi(),w);
141 hB[84]->Fill(mElectronP.Eta(),mElectronP.Perp(),w);
142 hA[90]->Fill(zdcRate,w);
144 hA[69]->Fill(mElectronP.Perp(),w);
145 hA[78]->Fill(phiMod,w);
146 hB[67]->Fill(detEle.Eta(),mElectronP.Perp(),w);
147 hA[80]->Fill(detEle.Eta(),w);
151 if(wMK->wEve.vertex.size()<=0)
return;
153 bool matchVert=
false;
154 for(
unsigned int iv=0;iv<wMK->wEve.vertex.size();iv++) {
157 if(fabs(V.z - mVertex.Z()) < 5.0) matchVert=
true;
159 if(!matchVert)
return;
161 hA[52]->Fill(mElectronP.Perp(),w);
162 hA[56]->Fill(mElectronP.Eta(),w);
163 hA[60]->Fill(mVertex.Z(),w);
164 hA[64]->Fill(mElectronP.Phi(),w);
165 hA[91]->Fill(zdcRate,w);
167 hA[70]->Fill(mElectronP.Perp(),w);
170 int eleTrId=999; TVector3 eleTrP;
171 int size=wMK->mMuDstMaker->
muDst()->mcArray(1)->GetEntries();
172 cout<<
"size="<<size<<endl;
173 for(
int i=0; i<size; i++){
175 int geantId=muMcTrack->GePid();
176 int id=muMcTrack->Id();
177 if(geantId==2 || geantId==3){
178 cout<<i<<
" id="<<
id<<
" geantId="<<geantId<<endl;
180 eleTrP=TVector3(muMcTrack->Pxyz().x(),muMcTrack->Pxyz().y(),muMcTrack->Pxyz().z());
181 cout<<
"phiDiff="<<eleTrP.Phi()-mElectronP.Phi()<<
" etaDiff="<<eleTrP.Eta()-mElectronP.Eta()<<endl;
186 int nTrackAssoc=0;
float recoPtAssoc=0;
188 int nHitAssoc=0;
float hitFracAssoc=0.;
189 float rInAssoc=0.;
float rOutAssoc=0.;
191 for(
unsigned int iv=0;iv<wMK->wEve.vertex.size(); iv++) {
192 unsigned int vertID=wMK->wEve.vertex[iv].id;
194 Int_t nPrimTrAll=wMK->mMuDstMaker->
muDst()->GetNPrimaryTrack();
195 for(
int itr=0;itr<nPrimTrAll;itr++) {
197 if(prTr->
flag()<=0)
continue;
199 if(glTr==0)
continue;
200 if(prTr->
flag()!=301)
continue;
201 if(prTr->
pt()<10.)
continue;
204 int secID=WtpcFilter::getTpcSec(ro.phi(),ro.pseudoRapidity());
205 if(secID==20)
continue;
214 float delPhi=prTr->
phi()-mElectronP.Phi();
215 float delEta=prTr->
eta()-mElectronP.Eta();
216 if( eleTrId==idTruth ) {
218 flagAssoc=prTr->
flag();
224 cout<<
"found electron, delR="<<sqrt(delPhi*delPhi+delEta*delEta)<<
" nHits="<<prTr->
nHitsFit()<<
" fitFrac="<<hitFracAssoc<<endl;
225 cout<<
"idTruth="<<idTruth<<
" qaTruth="<<qaTruth<<endl;
226 recoPtAssoc=prTr->
pt();
232 hA[120]->Fill(recoPtAssoc,recoPtAssoc-mElectronP.Perp());
233 hA[124]->Fill(recoPtAssoc,w);
234 hA[126]->Fill(1./recoPtAssoc,w);
235 hA[128]->Fill(recoPtAssoc,nHitAssoc);
236 hA[129]->Fill(recoPtAssoc,hitFracAssoc);
237 hA[130]->Fill(recoPtAssoc,rInAssoc);
238 hA[131]->Fill(recoPtAssoc,rOutAssoc);
239 hA[132]->Fill(1./recoPtAssoc,nHitAssoc);
240 hA[133]->Fill(1./recoPtAssoc,hitFracAssoc);
241 hA[134]->Fill(1./recoPtAssoc,rInAssoc);
242 hA[135]->Fill(1./recoPtAssoc,rOutAssoc);
243 hA[136]->Fill(flagAssoc);
245 cout<<
"number of associated tracks = "<<nTrackAssoc<<endl;
248 bool foundTrack=
false;
int nTrk=0;
float recoPt=0;
249 for(
unsigned int iv=0;iv<wMK->wEve.vertex.size();iv++) {
251 if(V.eleTrack.size()>0){
252 hA[85]->Fill(mElectronP.Perp(),w);
253 hA[86]->Fill(mElectronP.Eta(),w);
254 hA[87]->Fill(mVertex.Z(),w);
255 hA[88]->Fill(mElectronP.Phi(),w);
256 hA[92]->Fill(zdcRate,w);
260 for(
unsigned int it=0;it<V.eleTrack.size();it++) {
263 if( eleTrId==idTruth ) {
264 recoPt=T.primP.Perp();
271 if(!foundTrack)
return;
274 hA[125]->Fill(recoPtAssoc,w);
275 hA[127]->Fill(1./recoPtAssoc,w);
278 if(wMK->wEve.wTag) hA[140]->Fill(mElectronP.Perp(),w);
281 for(
unsigned int iv=0;iv<wMK->wEve.vertex.size();iv++) {
283 for(
unsigned int it=0;it<V.eleTrack.size();it++) {
285 if(T.isMatch2Cl==
false)
continue;
286 assert(T.cluster.nTower>0);
287 assert(T.nearTotET>0);
291 if(fabs(T.primP.Eta()) > wMK->par_leptonEta)
294 if(T.cluster.ET/T.nearTotET < wMK->par_nearTotEtFrac)
296 if(T.sPtBalance < wMK->par_ptBalance)
299 if(T.cluster.ET < 25.)
303 hA[53]->Fill(mElectronP.Perp(),w);
304 hA[57]->Fill(mElectronP.Eta(),w);
305 hA[61]->Fill(mVertex.Z(),w);
306 hA[65]->Fill(mElectronP.Phi(),w);
307 hA[93]->Fill(zdcRate,w);
309 hA[71]->Fill(mElectronP.Perp(),w);
310 hA[121]->Fill(T.primP.Phi()-mElectronP.Phi(),T.primP.Eta()-mElectronP.Eta());
311 hA[123]->Fill(zdcRate,wMK->wEve.bx7);
314 hA[111]->Fill(detEle.Eta(),mElectronP.Perp());
315 hA[113]->Fill(detEle.Eta(),mElectronSmearP.Perp());
316 hA[115]->Fill(T.cluster.ET/mElectronP.Perp());
317 hA[116]->Fill(T.cluster.energy/mElectronP.Mag());
320 for(
int ires=0; ires<10; ires++){
321 for(
int iscale=0; iscale<101; iscale++){
322 float scaleFact = iscale*0.004 + 0.8;
323 hB[120+ires]->Fill(iscale,mElectronSmearTempP[ires].Perp()*scaleFact,wRB);
324 hB[150+ires]->Fill(scaleFact,mElectronSmearTempP[ires].Perp()*scaleFact,wRB);
325 if(fabs(detEle.Eta()) < 0.5) hB[130+ires]->Fill(iscale,mElectronSmearTempP[ires].Perp()*scaleFact,wRB);
326 else if(fabs(detEle.Eta()) < 1.0) hB[140+ires]->Fill(iscale,mElectronSmearTempP[ires].Perp()*scaleFact,wRB);
340 St2009pubMcMaker::doZefficiency(){
344 if(fabs(mZelectronP.Eta()) > 1.)
return;
345 if(fabs(mZpositronP.Eta()) > 1.)
return;
347 if(mZelectronP.Perp() < 15.)
return;
348 if(mZpositronP.Perp() < 15.)
return;
350 TVector3 sumP=mZelectronP+mZpositronP;
351 float sumE=mZelectronP.Mag()+mZpositronP.Mag();
352 float geantZmass=sqrt(sumE*sumE-sumP.Dot(sumP));
353 cout<<
"geant mass"<<geantZmass<<endl;
354 float zdcRate=wMK->mMuDstMaker->
muDst()->
event()->runInfo().zdcCoincidenceRate();
357 if(wMK->isMC==352) w=wMK->hReweight->GetBinContent(wMK->hReweight->FindBin(mVertex.Z()));
360 hA[100]->Fill(geantZmass,w);
361 if(geantZmass>70. && geantZmass<110.) hA[105]->Fill(zdcRate,w);
364 if(!wMK->wEve.l2bitET)
return;
366 hA[101]->Fill(geantZmass,w);
367 if(geantZmass>70. && geantZmass<110.) hA[106]->Fill(zdcRate,w);
370 if(wMK->wEve.vertex.size()<=0)
return;
372 bool matchVert=
false;
373 for(
unsigned int iv=0;iv<wMK->wEve.vertex.size();iv++) {
376 if(fabs(V.z - mZvertex.Z()) < 5.0) matchVert=
true;
378 if(!matchVert)
return;
379 hA[102]->Fill(geantZmass,w);
380 if(geantZmass>70. && geantZmass<110.) hA[107]->Fill(zdcRate,w);
384 for(
unsigned int iv=0;iv<wMK->wEve.vertex.size();iv++) {
386 if(V.eleTrack.size()>1){
387 hA[103]->Fill(geantZmass,w);
388 if(geantZmass>70. && geantZmass<110.) hA[108]->Fill(zdcRate,w);
394 if(!gt1track)
return;
397 for(
unsigned int iv=0;iv<wMK->wEve.vertex.size();iv++) {
399 if(V.eleTrack.size()<2)
continue;
400 for(
unsigned int it=0;it<V.eleTrack.size()-1;it++) {
403 if(T1.isMatch2Cl==
false)
continue;
404 assert(T1.cluster.nTower>0);
405 assert(T1.nearTotET>0);
407 if(T1.cluster.ET<zMK->par_clusterEtZ)
continue;
408 float fracET1=T1.cluster.ET /T1.nearTotET;
409 if(fracET1<zMK->par_nearTotEtFracZ)
continue;
411 for (
unsigned int it2=it+1;it2<V.eleTrack.size();it2++) {
414 if(T2.isMatch2Cl==
false)
continue;
415 assert(T2.cluster.nTower>0);
416 assert(T2.nearTotET>0);
418 if(T2.cluster.ET<zMK->par_clusterEtZ)
continue;
419 float fracET2=T2.cluster.ET /T2.nearTotET;
420 if(fracET2<zMK->par_nearTotEtFracZ)
continue;
422 float e1=T1.cluster.energy;
423 float e2=T2.cluster.energy;
424 TVector3 p1=T1.primP; p1.SetMag(e1);
425 TVector3 p2=T2.primP; p2.SetMag(e2);
427 float del_phi=p1.DeltaPhi(p2);
428 if(fabs(del_phi)<zMK->par_delPhi12)
continue;
430 float mass2=(e1+e2)*(e1+e2)-(psum.Dot(psum));
431 if(mass2<1.)
continue;
435 if (Q1Q2==1)
continue;
438 hA[104]->Fill(geantZmass,w);
439 if(geantZmass>70. && geantZmass<110.) hA[109]->Fill(zdcRate,w);
452 St2009pubMcMaker::doWMCanalysis(){
454 mMcEvent = (
StMcEvent*) StMaker::GetChain()->GetDataSet(
"StMcEvent");
457 if(!mMcEvent)
return false;
465 mVertex=TVector3(V->position().x(),V->position().y(),V->position().z());
470 while(found<2 && i<mMcEvent->tracks().size()){
471 StMcTrack* mcTrack = mMcEvent->tracks()[i];
472 int pdgId=mcTrack->pdgId();
473 float pt=mcTrack->pt();
474 LOG_DEBUG<<
"pdgId "<<pdgId<<
" pt "<<pt<<
" pz "<<mcTrack->momentum().z()<<endm;
475 if(pdgId==11 || pdgId==-11){
476 if(abs(mcTrack->parent()->pdgId()) == 24 ){
477 pElectron=mcTrack->momentum();
481 LOG_DEBUG<<
"pdgId "<<pdgId<<
" pt "<<pt<<
" pz "<<mcTrack->momentum().z()<<endm;
482 pW=mcTrack->parent()->momentum();
483 eW=mcTrack->parent()->energy();
484 LOG_DEBUG<<
"pdgId "<<mcTrack->parent()->pdgId()<<
" pt "<<mcTrack->parent()->pt()<<
" pz "<<mcTrack->parent()->momentum().z()<<endm;
488 if(pdgId==12 || pdgId==-12){
489 if(abs(mcTrack->parent()->pdgId()) == 24 ){
490 pNeutrino=mcTrack->momentum();
491 LOG_DEBUG<<
"pdgId "<<pdgId<<
" pt "<<pt<<
" pz "<<mcTrack->momentum().z()<<endm;
492 pW=mcTrack->parent()->momentum();
493 eW=mcTrack->parent()->energy();
494 LOG_DEBUG<<
"pdgId "<<mcTrack->parent()->pdgId()<<
" pt "<<mcTrack->parent()->pt()<<
" pz "<<mcTrack->parent()->momentum().z()<<endm;
502 while(i<mMcEvent->tracks().size()){
503 StMcTrack* mcTrack = mMcEvent->tracks()[i];
504 int pdgId=mcTrack->pdgId();
505 float pt=mcTrack->pt();
507 if(abs(pdgId)==11 || abs(pdgId)==12 || abs(pdgId)==24 || abs(pdgId)==21 || abs(pdgId) < 10 || abs(pdgId)==92 || pt<10.0)
continue;
508 cout<<
"high pt MC track: pdgId="<<pdgId<<
" pt="<<pt<<endl;
512 if(found!=2)
return false;
514 mWP=TVector3(pW.x(),pW.y(),pW.z());
515 mNeutrinoP=TVector3(pNeutrino.x(),pNeutrino.y(),pNeutrino.z());
516 mElectronP=TVector3(pElectron.x(),pElectron.y(),pElectron.z());
517 TVector3 diff=mWP-mNeutrinoP-mElectronP;
518 if(diff.Mag() > 0.0001)
519 LOG_INFO<<
"\n \n W+e+nu vector sum ="<<diff.Mag()<<endm;
520 if(mElectronP.Mag() < 0.0001)
521 LOG_INFO<<
"\n \n no lepton track ="<<endm;
524 float rapW = 0.5*log((eW+mWP.Z())/(eW-mWP.Z()));
525 float mw2sqs=80.4/500.;
526 float x1=mw2sqs*exp(rapW);
527 float x2=mw2sqs*exp(-rapW);
530 if(fabs(mElectronP.Eta())<1){
538 if(fabs(mElectronP.Eta()) < 1.)
539 hA[117]->Fill(mElectronP.Pt());
543 float weight[120] = {0,0,0,0,0,0,0,0,0,0,0,0.0179866,0,0,0,1.02642,0.597259,3.00388,0.88189,1.68209,0.877086,0.787812,0.920501,0.737976,0.735082,0.977448,1.21798,0.745058,0.693323,1.02895,1.69843,1.17129,0.945612,0.917748,0.977399,0.87226,1.0391,0.86036,0.769629,1.03845,0.923467,1.06595,0.843156,1.05421,0.859137,0.896914,0.941134,0.826568,0.857237,0.915694,0.892815,0.901463,1.07729,1.00146,0.935025,1.01036,1.03116,0.873262,1.04329,0.914255,0.976182,0.88009,1.02751,1.12671,1.07694,1.10049,1.04973,1.11188,1.10395,0.914941,1.08072,1.11682,1.0614,1.11588,0.960717,0.992878,1.05434,1.0802,0.967019,1.02817,1.04221,1.01508,1.0033,1.2565,0.987695,1.17665,1.05089,1.00209,0.97153,1.07144,0.824123,1.62538,0.883172,0.860085,0.860167,1.26625,0.58652,0.925282,0.998732,1.06802,0.620375,0.686918,0.845012,0.863964,0.966573,0.52009,0.974503,0.603462,0.305834,0.220393,0.347469,0.849899,0.674756,0.630642,0.613394,0.173667,0.152909,0.325029,0.200083,0.316456};
545 float et = mElectronP.Pt();
546 for(
int j=0; j<120; j++){
547 if(et > j*0.5 && et < (j+1)*0.5 && fabs(mElectronP.Eta()) < 1.){
548 hA[118]->Fill(et,weight[j]);
557 float initE=mElectronP.Mag();
558 float width=sqrt(0.14*0.14/initE + 0.015*0.015);
559 float smear = gRandom->Gaus(0, width);
560 float finalE=mElectronP.Mag()+smear;
561 cout<<
"initE="<<initE<<
" width="<<width<<
" smear="<<smear<<
" finalE="<<finalE<<endl;
562 mElectronSmearP=mElectronP; mElectronSmearP.SetMag(finalE);
566 float Rcylinder= wMK->mBtowGeom->Radius();
567 detEle.SetPtEtaPhi(Rcylinder,mElectronP.Eta(),mElectronP.Phi());
568 detEle.SetZ(detEle.Z()+mVertex.Z());
571 hA[110]->Fill(detEle.Eta(),mElectronP.Perp());
573 hA[112]->Fill(detEle.Eta(),mElectronSmearP.Perp());
576 for(
int ires=0; ires<10; ires++){
577 float widthTemp = ires/100.;
578 float smearTemp = gRandom->Gaus(0, widthTemp);
579 float finalETemp = mElectronP.Mag()+smearTemp*mElectronP.Mag();
581 mElectronSmearTempP[ires]=mElectronP; mElectronSmearTempP[ires].SetMag(finalETemp);
582 for(
int iscale=0; iscale<101; iscale++){
583 float scaleFact = iscale*0.004 +0.9;
584 hB[110+ires]->Fill(iscale,mElectronSmearTempP[ires].Perp()*scaleFact);
597 St2009pubMcMaker::doZMCanalysis(){
599 mMcEvent = (
StMcEvent*) StMaker::GetChain()->GetDataSet(
"StMcEvent");
602 if(!mMcEvent)
return false;
610 mZvertex=TVector3(V->position().x(),V->position().y(),V->position().z());
615 while(found<2 && i<mMcEvent->tracks().size()){
616 StMcTrack* mcTrack = mMcEvent->tracks()[i];
617 int pdgId=mcTrack->pdgId();
618 float pt=mcTrack->pt();
619 LOG_DEBUG<<
"pdgId "<<pdgId<<
" pt "<<pt<<
" pz "<<mcTrack->momentum().z()<<endm;
621 if(abs(mcTrack->parent()->pdgId()) == 23 ){
622 pElectron=mcTrack->momentum();
623 LOG_DEBUG<<
"pdgId "<<pdgId<<
" pt "<<pt<<
" pz "<<mcTrack->momentum().z()<<endm;
624 pZ=mcTrack->parent()->momentum();
625 eZ=mcTrack->parent()->energy();
626 LOG_DEBUG<<
"pdgId "<<mcTrack->parent()->pdgId()<<
" pt "<<mcTrack->parent()->pt()<<
" pz "<<mcTrack->parent()->momentum().z()<<endm;
631 if(abs(mcTrack->parent()->pdgId()) == 23 ){
632 pPositron=mcTrack->momentum();
633 LOG_DEBUG<<
"pdgId "<<pdgId<<
" pt "<<pt<<
" pz "<<mcTrack->momentum().z()<<endm;
634 pZ=mcTrack->parent()->momentum();
635 eZ=mcTrack->parent()->energy();
636 LOG_DEBUG<<
"pdgId "<<mcTrack->parent()->pdgId()<<
" pt "<<mcTrack->parent()->pt()<<
" pz "<<mcTrack->parent()->momentum().z()<<endm;
643 if(found!=2)
return false;
645 mZP=TVector3(pZ.x(),pZ.y(),pZ.z());
646 mZpositronP=TVector3(pPositron.x(),pPositron.y(),pPositron.z());
647 mZelectronP=TVector3(pElectron.x(),pElectron.y(),pElectron.z());
648 TVector3 diff=mZP-mZpositronP-mZelectronP;
649 if(diff.Mag() > 0.0001)
650 LOG_INFO<<
"\n \n Z+e+e vector sum ="<<diff.Mag()<<endm;
651 if(mZelectronP.Mag() < 0.0001)
652 LOG_INFO<<
"\n \n no lepton track ="<<endm;
661 St2009pubMcMaker::doWanalysis(){
665 for(
unsigned int iv=0;iv<wMK->wEve.vertex.size();iv++) {
667 for(
unsigned int it=0;it<V.eleTrack.size();it++) {
669 if(T.isMatch2Cl==
false)
continue;
670 assert(T.cluster.nTower>0);
671 assert(T.nearTotET>0);
673 if(T.cluster.ET /T.nearTotET< wMK->par_nearTotEtFrac)
continue;
674 if(T.awayTotET> 30.)
continue;
678 hA[1]->Fill(mWP.Perp());
679 hA[2]->Fill(mWP.z());
681 hA[24]->Fill(mWP.Eta());
682 hA[25]->Fill(T.hadronicRecoil.Eta());
683 hA[26]->Fill(mWP.Perp(),T.hadronicRecoil.Eta());
685 hA[27]->Fill(T.hadronicRecoil.Eta());
688 hA[28]->Fill(T.hadronicRecoil.Eta());
692 TVector3 hadronicPt(T.hadronicRecoil.X(),T.hadronicRecoil.Y(),0);
693 hA[3]->Fill(mWP.Perp()-hadronicPt.Perp());
694 hA[4]->Fill(mWP.Perp(),hadronicPt.Perp());
695 hA[5]->Fill(hadronicPt.Perp());
697 float delPhi=mWP.DeltaPhi(-hadronicPt);
698 hA[6]->Fill(mWP.Perp(),delPhi);
699 hA[7]->Fill(mWP.Perp(),mWP.Perp()-hadronicPt.Perp());
700 hA[8]->Fill(T.hadronicRecoil.Perp(),delPhi);
703 hA[9]->Fill(mElectronP.Perp());
704 hA[10]->Fill(T.cluster.ET);
705 hA[11]->Fill(mElectronP.Perp(),T.cluster.ET);
706 hA[12]->Fill(mElectronP.Perp(),mElectronP.Perp()-T.cluster.ET);
708 TVector3 electronPt(T.cluster.position.X(),T.cluster.position.Y(),0);
709 electronPt.SetMag(T.cluster.ET);
712 TVector3 neutrinoPt=-1*(hadronicPt+electronPt);
713 hA[13]->Fill(neutrinoPt.Perp());
714 hA[14]->Fill(mNeutrinoP.Perp());
715 hA[15]->Fill(mNeutrinoP.Perp(),neutrinoPt.Perp());
716 hA[16]->Fill(mNeutrinoP.Perp()-neutrinoPt.Perp());
718 hA[17]->Fill(mNeutrinoP.Perp(),mElectronP.Perp());
720 float recoDeltaPhi=neutrinoPt.DeltaPhi(electronPt);
721 float geantDeltaPhi=mNeutrinoP.DeltaPhi(mElectronP);
722 hA[18]->Fill(geantDeltaPhi,recoDeltaPhi);
723 hA[19]->Fill(cos(geantDeltaPhi)-cos(recoDeltaPhi));
725 float Mt=sqrt(2*T.cluster.ET*neutrinoPt.Perp()*(1-cos(recoDeltaPhi)));
726 float gMt=sqrt(2*mElectronP.Perp()*mNeutrinoP.Perp()*(1-cos(geantDeltaPhi)));
731 hA[22]->Fill(Mt,T.cluster.ET);
732 hA[23]->Fill(gMt-Mt);
736 float trueWpL=mWP.z();
737 float eleTheta=T.primP.Theta();
738 float ratioE=T.cluster.energy/40.0;
739 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));
740 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));
741 hA[29]->Fill(pLRecoPlus);
742 hA[30]->Fill(trueWpL-pLRecoPlus);
743 hA[31]->Fill(trueWpL,pLRecoPlus);
745 hA[32]->Fill(pLRecoMinus);
746 hA[33]->Fill(trueWpL-pLRecoMinus);
747 hA[34]->Fill(trueWpL,pLRecoMinus);
749 const StMuTrack *prTr=T.prMuTrack; assert(prTr);
750 float p_chrg=prTr->
charge();
751 if(p_chrg > 0)
continue;
753 float eleEta=T.primP.Eta();
756 hA[35]->Fill(trueWpL,pLRecoMinus);
757 hA[37]->Fill(trueWpL,pLRecoPlus);
759 else if(eleEta>0.8) {
760 hA[36]->Fill(trueWpL,pLRecoMinus);
761 hA[38]->Fill(trueWpL,pLRecoPlus);
764 if(T.cluster.ET < 30)
continue;
767 hA[39]->Fill(mWP.z(),T.cluster.energy);
768 hA[42]->Fill(T.cluster.energy);
771 hA[40]->Fill(mWP.z(),T.cluster.energy);
772 hA[43]->Fill(T.cluster.energy);
774 if(eleEta > -0.1 && eleEta < 0.1) {
775 hA[41]->Fill(mWP.z(),T.cluster.energy);
776 hA[44]->Fill(T.cluster.energy);
maker to retrieve info from geant.root files for comparison with reco quantities from MC ...
Double_t pt() const
Returns pT at point of dca to primary vertex.
Monte Carlo Track class All information on a simulated track is stored in this class: kinematics...
UShort_t nHitsFit() const
Return total number of hits used in fit.
short flag() const
Returns flag, (see StEvent manual for type information)
Short_t charge() const
Returns charge.
Double_t eta() const
Returns pseudo rapidity at point of dca to primary vertex.
const StThreeVectorF & firstPoint() const
Returns positions of first measured point.
static TObjArray * primaryTracks()
returns pointer to a list of tracks belonging to the selected primary vertex
UShort_t nHitsPoss() const
Return number of possible hits on track.
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
const StThreeVectorF & lastPoint() const
Returns positions of last measured point.
Double_t phi() const
Returns phi at point of dca to primary vertex.
const StMuTrack * globalTrack() const
Returns pointer to associated global track. Null pointer if no global track available.
static void setVertexIndex(Int_t vtx_id)
Set the index number of the current primary vertex (used by both primaryTracks() functions and for St...
Event data structure to hold all information from a Monte Carlo simulation. This class is the interfa...