3 rdEEevent(
int neve=300, TString Tname0=
"/star/u/eemcdb/dataFeb11/run00006.eeTree",
int flag=0,
float Emax=40.){
4 TString Tname0=
"../sim2003/mc_eve2";
5 gSystem->Load(
"StRoot/StEEmcUtil/EEevent/libEEevent.so");
8 gStyle->SetOptStat(111111);
13 printf(
"read upto %d events from file=%s.root\n",neve,Tname.Data());
14 TFile *f =
new TFile(Tname+
".root");
16 TTree *t4 = (TTree*)f->Get(
"EEtree");
23 TBranch *br = t4->GetBranch(
"EEdst");
24 br->SetAddress(&event);
25 Int_t nevent = (Int_t)t4->GetEntries();
26 for (Int_t ie=0;ie<nevent;ie++) {
28 printf(
"\niEve=%d ---------- \n",ie);
35 int nSec=
event->Sec->GetEntries();
36 printf(
"%d sectors with data\n",nSec);
39 for(is=0;is<nSec;is++) {
42 TClonesArray *hitA=sec->getTwHits();
45 for(ih=0;ih<hitA->GetEntries();ih++) {
50 hit->get(sub,eta,ener);
51 if(ie<5) printf(
" ih=%d sec=%d sub=%c etaBin=%d ener=%f\n",ih, sec->getID(), sub, eta,ener);
63 TClonesArray *secA=
new TClonesArray(
"EEsectorDst",1000);
64 TBranch *BRsec = t4->GetBranch(
"Sec");
65 BRsec->SetAddress(&secA);
68 TBranch *BRid = t4->GetBranch(
"ID");
69 BRid->SetAddress(&eveID);
71 Int_t nevent = (Int_t)t4->GetEntries();
72 printf(
"Total events in TTree=%d\n",nevent);
77 for (Int_t ie=0;ie<nevent;ie++) {
85 if(ie%1==0) printf(
"\n\iEve=%d nSec=%d with data \n",ie,secA->GetEntries());
88 if(ie%1==0) printf(
"\n\iEve=%d eveID=%d, nSec=%d with data :\n",ie,eveID,secA->GetEntries());
92 for(is=0;is<secA->GetEntries();is++) {
94 if(ie<1) sec->print();
99 TClonesArray *hitAA[]={sec->getPre1Hits(),sec->getPre2Hits(),sec->getTwHits(),sec->getPostHits(),sec->getSmdUHits(),sec->getSmdVHits()};
101 for(iz=0;iz<4;iz++) {
103 if(ie<1) printf(
" sectorID=%d iz=%d nHit=%d :\n",sec->getID(),iz,hitA->GetEntries());
107 for(iz=4;iz<6;iz++) {
109 if(ie<1) printf(
" sectorID=%d iz=%d nHit=%d :\n",sec->getID(),iz,hitA->GetEntries());
110 for(ih=0;ih<hitA->GetEntries();ih++) {
114 hit2->get(strip,ener);
115 if(ie<1) printf(
" ih=%d strip=%d etaBin=%d ener=%f\n",ih, sec->getID(), strip,ener);
125 printf(
"\n\nTotal events in B TTree=%d\n",nevent);