7 #include "StFcsPi0ReconstructionMaker.h"
11 #include "StMuDSTMaker/COMMON/StMuTypes.hh"
13 #include "StThreeVectorF.hh"
14 #include "StFcsDbMaker/StFcsDb.h"
15 #include "StRoot/StSpinPool/StFcsQaMaker/StFcsQaMaker.h"
16 #include "StRoot/StSpinPool/StFcsRawDaqReader/StFcsRawDaqReader.h"
17 #include "StRoot/StEvent/StTriggerData.h"
18 #include "StRoot/StEvent/StFcsCollection.h"
19 #include "StRoot/StEvent/StFcsHit.h"
20 #include "StRoot/StEvent/StFcsCluster.h"
21 #include "StRoot/StEvent/StFcsPoint.h"
22 #include "StRoot/StEvent/StEvent.h"
23 #include "StEventTypes.h"
40 StFcsPi0ReconstructionMaker::StFcsPi0ReconstructionMaker(
const Char_t* name):
43 StFcsPi0ReconstructionMaker::~StFcsPi0ReconstructionMaker(){}
46 Int_t StFcsPi0ReconstructionMaker::Init()
48 mFcsDb=
static_cast<StFcsDb*
>(GetDataSet(
"fcsDb"));
50 LOG_ERROR <<
"StFcsEventDisplay::InitRun Failed to get StFcsDbMaker" << endm;
54 h0=
new TH1F(
"h0",
"# of entries",10,0,10);
56 h2_EcalMult_vs_TOFMult=
new TH2F(
"h2_EcalMult_vs_TOFMult",
"Ecal Multiplicity vs TOF Multiplicity",200,-.5,199.5,71,-.5,70.5);
57 h2_EcalMult_vs_TOFMult->SetXTitle(
"tof Multiplicity");
58 h2_EcalMult_vs_TOFMult->SetYTitle(
"Ecal Multiplicity");
60 h2_EcalMult_vs_TOFMult_E_1=
new TH2F(
"h2_EcalMult_vs_TOFMult_E_1",
"Ecal Multiplicity vs TOF Multiplicity",200,-.5,199.5,70,-.5,69.5);
61 h2_EcalMult_vs_TOFMult_E_1->SetXTitle(
"TOF Multiplicity");
62 h2_EcalMult_vs_TOFMult_E_1->SetYTitle(
"Ecal Multiplicity(E>1)");
65 h1_inv_mass_cluster=
new TH1F(
"h1_inv_mass_cluster",
"invariant mass plot (for cluster finder analysis)",100,m_low,m_up);
66 h1_inv_mass_cluster->SetXTitle(
"invariant mass [GeV]");
68 h1_Zgg_cluster=
new TH1F(
"h1_Zgg_cluster",
"Zgg (cluster)",70,0,.7);
69 h1_Zgg_cluster->SetXTitle(
"Z_{gg}");
71 h1_opening_angle_cluster=
new TH1F(
"h1_opening_angle_cluster",
"opening angle plot (for cluster finder analysis)",bins,0,0.1);
72 h1_opening_angle_cluster->SetXTitle(
"opening angle [rad]");
74 h1_each_cluster_energy_nocut=
new TH1F(
"h1_each_cluster_energy_nocut",
"each cluster energy(without cut for cluster finder)",200,0,200);
75 h1_each_cluster_energy_nocut->SetXTitle(
"E_{1} [GeV]");
77 h1_each_cluster_energy_aftercut=
new TH1F(
"h1_each_cluster_energy_aftercut",
"each cluster energy(after cut for cluster finder)",200,0,200);
78 h1_each_cluster_energy_aftercut->SetXTitle(
"E_{1} [GeV]");
80 h1_two_cluster_energy_nocut=
new TH1F(
"h1_two_cluster_energy_nocut",
"E_{1} + E_{2} (without cut for cluster finder)",300,0,300);
81 h1_two_cluster_energy_nocut->SetXTitle(
"E_{1} + E_{2} [GeV]");
83 h1_two_cluster_energy_aftercut=
new TH1F(
"h1_two_cluster_energy_aftercut",
"E_{1} + E_{2} (all cuts for cluster finder)",300,2,300);
84 h1_two_cluster_energy_aftercut->SetXTitle(
"E_{1} + E_{2} [GeV]");
86 h1_dgg_cluster=
new TH1F(
"h1_dgg_cluster",
"d_{gg} (cluster)",80,0,60);
87 h1_dgg_cluster->SetXTitle(
"d_{gg} [cm]");
89 h2_EcalClustMult_vs_TOFMult=
new TH2F(
"h2_EcalClustMult_vs_TOFMult",
"Ecal cluster Multiplicity vs tof Multiplicity",200,-.5,199.5,40,-.5,39.5);
90 h2_EcalClustMult_vs_TOFMult->SetXTitle(
"tof Multiplicity");
91 h2_EcalClustMult_vs_TOFMult->SetYTitle(
"Ecal Cluster Multiplicity");
93 h2_EcalClustMult_vs_TOFMult_E_1=
new TH2F(
"h2_EcalClustMult_vs_TOFMult_E_1",
"Ecal cluster Multiplicity vs TOF Multiplicity",50,-.5,49.5,40,-.5,39.5);
94 h2_EcalClustMult_vs_TOFMult_E_1->SetXTitle(
"TOF Multiplicity");
95 h2_EcalClustMult_vs_TOFMult_E_1->SetYTitle(
"Ecal Cluster Multiplicity(E>1)");
97 h2_dgg_cluster_vs_E1pE2_cluster=
new TH2F(
"h2_dgg_cluster_vs_E1pE2_cluster",
"d_{gg} vs E_{1} + E_{2} for cluster finder",45,8,25,60,-.5,59.5);
98 h2_dgg_cluster_vs_E1pE2_cluster->SetYTitle(
"d_{gg}");
99 h2_dgg_cluster_vs_E1pE2_cluster->SetXTitle(
"E_{1} + E_{2} [GeV]");
101 h2_mass_cluster_vs_Zgg_cluster=
new TH2F(
"h2_mass_cluster_vs_Zgg_cluster",
"invariant mass vs Z_{gg} for cluster finder",70,0,.7,80,0,.8);
102 h2_mass_cluster_vs_Zgg_cluster->SetXTitle(
"Z_{gg}");
103 h2_mass_cluster_vs_Zgg_cluster->SetYTitle(
"invariant mass [GeV]");
105 h2_cluster_position=
new TH2F(
"h2_cluster_position",
"cluster position y vs x (cluster finder)", 80,55,135,80,-105,-25);
106 h2_cluster_position->SetXTitle(
"x [cm]");
107 h2_cluster_position->SetYTitle(
"y [cm]");
109 h2_mass_cluster_vs_dgg_cluster=
new TH2F(
"h2_mass_cluster_vs_dgg_cluster",
"invariant mass vs d_{gg} (cluster finder)",45,5,50,50,m_low,m_up);
110 h2_mass_cluster_vs_dgg_cluster->SetXTitle(
"d_{gg} [cm]");
111 h2_mass_cluster_vs_dgg_cluster->SetYTitle(
"invariant mass [GeV]");
114 h1_inv_mass_point=
new TH1F(
"h1_inv_mass_point",
"invariant mass plot for point maker",100,m_low,m_up);
115 h1_inv_mass_point->SetXTitle(
"invariant mass [GeV]");
117 h1_Zgg_point=
new TH1F(
"h1_Zgg_point",
"Zgg (point)",70,0,.7);
118 h1_Zgg_point->SetXTitle(
"Z_{gg}");
120 h1_opening_angle_point=
new TH1F(
"h1_opening_angle_point",
"opening angle plot (point)",bins,0,0.1);
121 h1_opening_angle_point->SetXTitle(
"opening angle [rad]");
123 h1_each_point_energy_nocut=
new TH1F(
"h1_each_point_energy_nocut",
"each point energy(no cut) (point)",200,0,200);
124 h1_each_point_energy_nocut->SetXTitle(
"E_{1} [GeV]");
126 h1_each_point_energy_aftercut=
new TH1F(
"h1_each_point_energy_aftercut",
"each point energy(after cut) (point)",200,0,200);
127 h1_each_point_energy_aftercut->SetXTitle(
"E_{1} [GeV]");
129 h1_two_point_energy_nocut=
new TH1F(
"h1_two_point_energy_nocut",
"E_{1} + E_{2} without cut for point maker",300,0,300);
130 h1_two_point_energy_nocut->SetXTitle(
"E_{1} + E_{2} [GeV]");
132 h1_two_point_energy_aftercut=
new TH1F(
"h1_two_point_energy_aftercut",
"E_{1} + E_{2} after cuts for point maker",300,2,300);
133 h1_two_point_energy_aftercut->SetXTitle(
"E_{1} + E_{2} [GeV]");
135 h1_dgg_point=
new TH1F(
"h1_dgg_point",
"d_{gg} (point)",80,0,60);
136 h1_dgg_point->SetXTitle(
"d_{gg} [cm]");
138 h1_x_rPosition_point=
new TH1F(
"h1_x_rPosition_point",
"point position(x) in cell",50,0.0,1.0);
139 h1_x_rPosition_point->SetXTitle(
"point position (x in rPosition) [cm]");
140 h1_y_rPosition_point=
new TH1F(
"h1_y_rPosition_point",
"point position(y) in cell",50,0.0,1.0);
141 h1_y_rPosition_point->SetXTitle(
"point position (y in rPosition) [cm]");
143 h2_EcalPointMult_vs_TOFMult=
new TH2F(
"h2_EcalPointMult_vs_TOFMult",
"Ecal point Multiplicity vs tof Multiplicity",200,-.5,199.5,40,-.5,39.5);
144 h2_EcalPointMult_vs_TOFMult->SetXTitle(
"tof Multiplicity");
145 h2_EcalPointMult_vs_TOFMult->SetYTitle(
"Ecal Pointer Multiplicity");
147 h2_EcalPointMult_vs_TOFMult_E_1=
new TH2F(
"h2_EcalPointMult_vs_TOFMult_E_1",
"Ecal point Multiplicity vs TOF Multiplicity",200,-.5,199.5,40,-.5,39.5);
148 h2_EcalPointMult_vs_TOFMult_E_1->SetXTitle(
"TOF Multiplicity");
149 h2_EcalPointMult_vs_TOFMult_E_1->SetYTitle(
"Ecal Pointer Multiplicity(E>1)");
151 h2_dgg_point_vs_E1pE2_point=
new TH2F(
"h2_dgg_point_vs_E1pE2_point",
"d_{gg} vs E_{1} + E_{2} for point maker",45,8,20,60,-.5,59.5);
152 h2_dgg_point_vs_E1pE2_point->SetYTitle(
"d_{gg}");
153 h2_dgg_point_vs_E1pE2_point->SetXTitle(
"E_{1} + E_{2} [GeV]");
154 h2_mass_point_vs_Zgg_point=
new TH2F(
"h2_mass_point_vs_Zgg_point",
"invariant mass vs Z_{gg} for point maker",70,0,.7,80,0,.8);
155 h2_mass_point_vs_Zgg_point->SetXTitle(
"Z_{gg}");
156 h2_mass_point_vs_Zgg_point->SetYTitle(
"invariant mass [GeV]");
157 h2_point_position=
new TH2F(
"h2_point_position",
"point position y vs x for point maker", 80,55,135,80,-105,-25);
158 h2_point_position->SetXTitle(
"x [cm]");
159 h2_point_position->SetYTitle(
"y [cm]");
161 h2_mass_point_vs_dgg_point=
new TH2F(
"h2_mass_point_vs_dgg_point",
"invariant mass vs d_{gg} for point maker",45,5,50,50,m_low,m_up);
162 h2_mass_point_vs_dgg_point->SetXTitle(
"d_{gg} [cm]");
163 h2_mass_point_vs_dgg_point->SetYTitle(
"invariant mass [GeV]");
166 for (
int i=0;i<64;i++)
169 char title_hist[100];
170 sprintf(name_hist,
"mass_cluster_by_tower_%i",i);
171 sprintf(title_hist,
"invariant mass sorted by %i tower for cluster finder",i);
172 h1list_mass_cluster_by_tower[i]=
new TH1F(name_hist,title_hist,40,m_low,m_up);
173 h1list_mass_cluster_by_tower[i]->SetXTitle(
"invariant mass [GeV]");
175 sprintf(name_hist,
"mass_point_by_tower_%i",i);
176 sprintf(title_hist,
"invariant mass sorted by %i tower (point)",i);
177 h1list_mass_point_by_tower[i]=
new TH1F(name_hist,title_hist,40,m_low,m_up);
178 h1list_mass_point_by_tower[i]->SetXTitle(
"invariant mass [GeV]");
180 sprintf(name_hist,
"Etower_%i",i);
181 sprintf(title_hist,
"%i tower energy spectrum",i);
182 h1list_Etower[i]=
new TH1F(name_hist, title_hist,200,0,200);
183 h1list_Etower[i]->SetXTitle(
"Energy [GeV]");
195 const char* fn=filename.c_str();
196 TFile* MyFile=
new TFile(fn,
"RECREATE");
198 h1_inv_mass_cluster->Write();
199 h1_Zgg_cluster->Write();
200 h1_opening_angle_cluster->Write();
201 h1_each_cluster_energy_nocut->Write();
202 h1_each_cluster_energy_aftercut->Write();
203 h1_two_cluster_energy_nocut->Write();
204 h1_two_cluster_energy_aftercut->Write();
205 h1_dgg_cluster->Write();
206 h2_EcalMult_vs_TOFMult->Write();
207 h2_EcalMult_vs_TOFMult_E_1->Write();
208 h2_EcalClustMult_vs_TOFMult->Write();
209 h2_EcalClustMult_vs_TOFMult_E_1->Write();
210 h2_dgg_cluster_vs_E1pE2_cluster->Write();
211 h2_mass_cluster_vs_Zgg_cluster->Write();
212 h2_cluster_position->Write();
213 h2_mass_cluster_vs_dgg_cluster->Write();
214 h1_inv_mass_point->Write();
215 h1_Zgg_point->Write();
216 h1_opening_angle_point->Write();
217 h1_each_point_energy_nocut->Write();
218 h1_each_point_energy_aftercut->Write();
219 h1_two_point_energy_nocut->Write();
220 h1_two_point_energy_aftercut->Write();
221 h1_dgg_point->Write();
222 h1_x_rPosition_point->Write();
223 h1_y_rPosition_point->Write();
224 h2_EcalPointMult_vs_TOFMult->Write();
225 h2_EcalPointMult_vs_TOFMult_E_1->Write();
226 h2_dgg_point_vs_E1pE2_point->Write();
227 h2_mass_point_vs_Zgg_point->Write();
228 h2_point_position->Write();
229 h2_mass_point_vs_dgg_point->Write();
230 for (
int i=0;i<64;i++)
232 h1list_mass_cluster_by_tower[i]->Write();
233 h1list_mass_point_by_tower[i]->Write();
234 h1list_Etower[i]->Write();
245 if(!event) {LOG_ERROR <<
"StFcsPi0ReconstructionMaker::Make did not find StEvent"<<endm;
return kStErr;}
246 mFcsColl =
event->fcsCollection();
247 if(!mFcsColl) {LOG_ERROR <<
"StFcsPi0ReconstructionMaker::Make did not find StEvent->StFcsCollection"<<endm;
return kStErr;}
251 if(mNAccepted < mMaxEvents){
252 if(mFilter==1 && mFcsColl->numberOfHits(0)+ mFcsColl->numberOfHits(1)+ mFcsColl->numberOfHits(2)+ mFcsColl->numberOfHits(3)==0)
return kStOK;
255 int n_EcalClustMult=0;
256 int n_EcalPointMult=0;
257 int n_EcalClust_cut=0;
258 int n_EcalPoint_cut=0;
261 for(
int det=0; det<kFcsNDet; det++)
264 if (check_ecal!=0)
continue;
267 StSPtrVecFcsHit& hits = mFcsColl->hits(det);
268 int nh=mFcsColl->numberOfHits(det);
269 StSPtrVecFcsCluster& clusters = mFcsColl->clusters(det);
270 int nc=mFcsColl->numberOfClusters(det);
271 StSPtrVecFcsPoint& points = mFcsColl->points(det);
272 int np=mFcsColl->numberOfPoints(det);
275 if ((det==0) || (det==1))
277 n_EcalMult=n_EcalMult + nh;
278 n_EcalClustMult=n_EcalClustMult + nc;
279 n_EcalPointMult=n_EcalPointMult + np;
282 for (
int i=0;i<nh;i++)
285 unsigned short hit_id=hit->id();
286 float hit_energy=hit->energy();
287 h1list_Etower[hit_id]->Fill(hit_energy);
288 if (hit_energy>1) n_Ecal_cut++;
290 for (
int i=0;i<nc;i++)
293 float clu_energy=clu->energy();
294 if (clu_energy>1) n_EcalClust_cut++;
297 for (
int i=0;i<np;i++)
300 float pnt_energy=pnt->energy();
301 if (pnt_energy>1) n_EcalPoint_cut++;
311 trg = fcsraw->trgdata();
313 LOG_INFO <<
"Canot find Trigger Data from StFcsRawDaqReader" << endm;
316 trg=
event->StEvent::triggerData();
318 LOG_INFO <<
"Canot find Trigger Data from StEvent" << endm;
323 int tofmult = trg->tofMultiplicity();
325 h2_EcalMult_vs_TOFMult->Fill(tofmult,n_EcalMult);
326 h2_EcalMult_vs_TOFMult_E_1->Fill(tofmult,n_Ecal_cut);
328 if ((tofmult>TofMult_cut)||(tofmult<=2))
return kStOK;
330 if (n_Ecal_cut>EcalMult_cut)
return kStOk;
332 float h1_inv_mass_cluster_best=-1;
333 float h1_Zgg_cluster_best=-1;
334 float h1_opening_angle_cluster_best=-1;
335 float h1_two_cluster_energy_aftercut_best=-1;
336 float h1_dgg_cluster_best=-1;
337 float e1_cluster_best=-1;
338 float e2_cluster_best=-1;
339 float energy_largest_cluster=-1;
344 unsigned short best_tower_id1_cluster=0;
345 unsigned short best_tower_id2_cluster=0;
347 float h1_inv_mass_point_best=-1;
348 float h1_Zgg_point_best=-1;
349 float h1_opening_angle_point_best=-1;
350 float h1_two_point_energy_aftercut_best=-1;
351 float h1_dgg_point_best=-1;
352 float e1_point_best=-1;
353 float e2_point_best=-1;
354 float energy_largest_point=-1;
359 float pntx1_rPosition_best=-1;
360 float pnty1_rPosition_best=-1;
361 float pntx2_rPosition_best=-1;
362 float pnty2_rPosition_best=-1;
363 unsigned short best_tower_id1_point=0;
364 unsigned short best_tower_id2_point=0;
366 for(
int det=0; det<kFcsNDet; det++)
369 if (check_ecal!=0)
continue;
370 StSPtrVecFcsCluster& clusters = mFcsColl->clusters(det);
371 int nc=mFcsColl->numberOfClusters(det);
372 StSPtrVecFcsPoint& points = mFcsColl->points(det);
373 int np=mFcsColl->numberOfPoints(det);
377 for (
int i=0;i<nc;i++)
380 float clu_energy=clu->energy();
381 h1_each_cluster_energy_nocut->Fill(clu_energy);
383 if (i==nc-1)
continue;
384 for (
int j=i+1;j<nc;j++)
387 float cluj_energy=cluj->energy();
388 h1_two_cluster_energy_nocut->Fill(clu_energy+cluj_energy);
393 for (
int i=0;i<np;i++)
396 float pnt_energy=pnt->energy();
397 h1_each_point_energy_nocut->Fill(pnt_energy);
399 if (i==np-1)
continue;
400 for (
int j=i+1;j<np;j++)
403 float pntj_energy=pntj->energy();
404 h1_two_point_energy_nocut->Fill(pnt_energy+pntj_energy);
409 for (
int i=0; i<(nc-1); i++)
413 float clu_x=clu->x();
414 float clu_y=clu->y();
415 float clu_energy=clu->energy();
416 if (clu_energy<1)
continue;
421 for (
int j=i+1;j<nc;j++)
425 float cluj_energy=cluj->energy();
427 if ((cluj->energy())<1)
continue;
428 float zgg=(fabs(clu_energy-cluj_energy))/(clu_energy+cluj_energy);
429 if (zgg>=0.7)
continue;
430 if (((clu_energy+cluj_energy)<8)||((clu_energy+cluj_energy)>20))
continue;
436 if ((clu_energy+cluj_energy)>energy_largest_cluster)
438 energy_largest_cluster=clu_energy+cluj_energy;
439 h1_Zgg_cluster_best=zgg;
440 h1_inv_mass_cluster_best=(p+pj).m();
441 h1_two_cluster_energy_aftercut_best=clu_energy+cluj_energy;
442 h1_opening_angle_cluster_best=(acos((xyz[0]*xyzj[0]+xyz[1]*xyzj[1]+xyz[2]*xyzj[2])/(sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]+xyz[2]*xyz[2])*sqrt(xyzj[0]*xyzj[0]+xyzj[1]*xyzj[1]+xyzj[2]*xyzj[2]))));
443 h1_dgg_cluster_best=(sqrt((xyz[0]-xyzj[0])*(xyz[0]-xyzj[0]) + (xyz[1]-xyzj[1])*(xyz[1]-xyzj[1])));
444 e1_cluster_best=clu_energy;
445 e2_cluster_best=cluj_energy;
448 clux2_best=cluj->x();
449 cluy2_best=cluj->y();
451 StPtrVecFcsHit& clui_hits= clu->hits();
452 StPtrVecFcsHit& cluj_hits= cluj->hits();
453 int clui_nTowers= clu->nTowers();
454 int cluj_nTowers= cluj->nTowers();
455 float max_energy_tower = -1;
456 unsigned short tower_id = 0;
457 for (
int k=0;k<clui_nTowers;k++)
459 if (clui_hits[k]->energy()>max_energy_tower)
460 { max_energy_tower=clui_hits[k]->energy();
461 tower_id = clui_hits[k]->id(); }
463 best_tower_id1_cluster=tower_id;
464 for (
int k=0;k<cluj_nTowers;k++)
466 if ((cluj_hits[k]->energy())>max_energy_tower)
467 { max_energy_tower=cluj_hits[k]->energy();
468 tower_id = cluj_hits[k]->id(); }
470 best_tower_id2_cluster=tower_id;
478 for (
int i=0; i<(np-1); i++)
482 float pnt_x=pnt->x();
483 float pnt_y=pnt->y();
484 float pnt_energy=pnt->energy();
485 if (pnt_energy<1)
continue;
489 for (
int j=i+1;j<np;j++)
493 float pntj_energy=pntj->energy();
495 if ((pntj->energy())<1)
continue;
496 float zgg=(fabs(pnt_energy-pntj_energy))/(pnt_energy+pntj_energy);
497 if (zgg>=0.7)
continue;
498 if (((pnt_energy+pntj_energy)<8)||((pnt_energy+pntj_energy)>20))
continue;
504 if ((pnt_energy+pntj_energy)>energy_largest_point)
506 energy_largest_point=pnt_energy+pntj_energy;
507 h1_Zgg_point_best=zgg;
508 h1_inv_mass_point_best=(p+pj).m();
509 h1_two_point_energy_aftercut_best=pnt_energy+pntj_energy;
510 h1_opening_angle_point_best=(acos((xyz[0]*xyzj[0]+xyz[1]*xyzj[1]+xyz[2]*xyzj[2])/(sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]+xyz[2]*xyz[2])*sqrt(xyzj[0]*xyzj[0]+xyzj[1]*xyzj[1]+xyzj[2]*xyzj[2]))));
511 h1_dgg_point_best=(sqrt((xyz[0]-xyzj[0])*(xyz[0]-xyzj[0]) + (xyz[1]-xyzj[1])*(xyz[1]-xyzj[1])));
512 e1_point_best=pnt_energy;
513 e2_point_best=pntj_energy;
516 pntx2_best=pntj->x();
517 pnty2_best=pntj->y();
518 pntx1_rPosition_best=pntx1_best-int(pntx1_best);
519 pnty1_rPosition_best=pnty1_best-int(pnty1_best);
520 pntx2_rPosition_best=pntx2_best-int(pntx2_best);
521 pnty2_rPosition_best=pnty2_best-int(pnty2_best);
526 StPtrVecFcsHit& pnti_hits= pnt_clu->hits(); StPtrVecFcsHit& pntj_hits= pntj_clu->hits();
527 int pnti_nTowers= pnt_clu->nTowers();
528 int pntj_nTowers= pntj_clu->nTowers();
529 float max_energy_tower = -1;
530 unsigned short tower_id = 0;
531 for (
int k=0;k<pnti_nTowers;k++)
533 if (pnti_hits[k]->energy()>max_energy_tower)
534 { max_energy_tower=pnti_hits[k]->energy();
535 tower_id = pnti_hits[k]->id(); }
537 best_tower_id1_point=tower_id;
538 for (
int k=0;k<pntj_nTowers;k++)
540 if ((pntj_hits[k]->energy())>max_energy_tower)
541 { max_energy_tower=pntj_hits[k]->energy();
542 tower_id = pntj_hits[k]->id(); }
544 best_tower_id2_point=tower_id;
555 if (h1_inv_mass_cluster_best>-1)
558 h1_inv_mass_cluster->Fill(h1_inv_mass_cluster_best);
559 h1_Zgg_cluster->Fill(h1_Zgg_cluster_best);
560 h1_opening_angle_cluster->Fill(h1_opening_angle_cluster_best);
561 h1_each_cluster_energy_aftercut->Fill(e1_cluster_best);
562 h1_each_cluster_energy_aftercut->Fill(e2_cluster_best);
563 h1_two_cluster_energy_aftercut->Fill(h1_two_cluster_energy_aftercut_best);
564 h1_dgg_cluster->Fill(h1_dgg_cluster_best);
565 h2_EcalClustMult_vs_TOFMult->Fill(tofmult,n_EcalClustMult);
566 h2_EcalClustMult_vs_TOFMult_E_1->Fill(tofmult,n_EcalClust_cut);
567 h2_dgg_cluster_vs_E1pE2_cluster->Fill(h1_two_cluster_energy_aftercut_best,h1_dgg_cluster_best);
568 h2_mass_cluster_vs_Zgg_cluster->Fill(h1_Zgg_cluster_best,h1_inv_mass_cluster_best);
569 h2_cluster_position->Fill(clux1_best,cluy1_best);
570 h2_cluster_position->Fill(clux2_best,cluy2_best);
571 h2_mass_cluster_vs_dgg_cluster->Fill(h1_dgg_cluster_best,h1_inv_mass_cluster_best);
572 h1list_mass_cluster_by_tower[best_tower_id1_cluster]->Fill(h1_inv_mass_cluster_best);
573 h1list_mass_cluster_by_tower[best_tower_id2_cluster]->Fill(h1_inv_mass_cluster_best);
578 if (h1_inv_mass_point_best>-1)
581 h1_inv_mass_point->Fill(h1_inv_mass_point_best);
582 h1_Zgg_point->Fill(h1_Zgg_point_best);
583 h1_opening_angle_point->Fill(h1_opening_angle_point_best);
584 h1_each_point_energy_aftercut->Fill(e1_point_best);
585 h1_each_point_energy_aftercut->Fill(e2_point_best);
586 h1_two_point_energy_aftercut->Fill(h1_two_point_energy_aftercut_best);
587 h1_dgg_point->Fill(h1_dgg_point_best);
588 h1_x_rPosition_point->Fill(pntx1_rPosition_best);
589 h1_y_rPosition_point->Fill(pnty1_rPosition_best);
590 h1_x_rPosition_point->Fill(pntx2_rPosition_best);
591 h1_y_rPosition_point->Fill(pnty2_rPosition_best);
593 h2_EcalPointMult_vs_TOFMult->Fill(tofmult,n_EcalPointMult);
594 h2_EcalPointMult_vs_TOFMult_E_1->Fill(tofmult,n_EcalPoint_cut);
595 h2_dgg_point_vs_E1pE2_point->Fill(h1_two_point_energy_aftercut_best,h1_dgg_point_best);
596 h2_mass_point_vs_Zgg_point->Fill(h1_Zgg_point_best,h1_inv_mass_point_best);
597 h2_point_position->Fill(pntx1_best,pnty1_best);
598 h2_point_position->Fill(pntx2_best,pnty2_best);
599 h2_mass_point_vs_dgg_point->Fill(h1_dgg_point_best,h1_inv_mass_point_best);
601 h1list_mass_point_by_tower[best_tower_id1_point]->Fill(h1_inv_mass_point_best);
602 h1list_mass_point_by_tower[best_tower_id2_point]->Fill(h1_inv_mass_point_best);
StLorentzVectorD getLorentzVector(const StThreeVectorD &xyz, float energy, float zVertex=0.0)
Get get 4 vector assuing m=0 and taking beamline from DB.
StThreeVectorD getStarXYZfromColumnRow(int det, float col, float row, float FcsZ=-1.0) const
get the STAR frame cooridnates from other way
int ecalHcalPres(int det) const
Ecal North=0, Ecal South=1, Hcal North=2, Hcal South=3, Pres=4/5.