25 TPaveText *eventInfo = 0;
26 TPaveLabel *dateInfo = 0;
29 void printNodeTree(TObjArray *nodeList, Int_t level=0);
30 TGeoNode *findNode (TObjArray *nodeList,
const char *name);
37 char* inpFile =
"show.lis",
38 char* outFile =
"show.root",
48 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
49 loadSharedLibraries();
52 gSystem->Load(
"libmysqlclient");
53 gSystem->Load(
"libGeom");
54 gSystem->Load(
"StDbLib");
55 gSystem->Load(
"StDbBroker");
56 gSystem->Load(
"St_db_Maker");
59 gSystem->Load(
"StEEmcUtil");
60 gSystem->Load(
"StEEmcDbMaker");
61 gSystem->Load(
"StEEmcPoolTTM");
69 TCanvas *c1 =
new TCanvas(
"eemc",
"eemc",10,10,1000,1000);
70 TPaveLabel *tlab =
new TPaveLabel(-0.99,+0.99,+0.99,+0.90,
71 "EEMC TOWERS & TPC TRACKS Piotr A Zolnierczuk (IU)");
73 eventInfo =
new TPaveText (-0.99,-0.99,+0.0 ,-0.75);
74 dateInfo =
new TPaveLabel(+0.60,-0.99,+0.99,-0.95,now->AsString());
76 TGeoManager *gm =
new TGeoManager(
"eemc",
"eemc tower display");
77 TGeoVolume *top = gm->MakeBox(
"star",0, 200., 200., 350.);
78 TGeoVolume *smbox = gm->MakeBox(
"smbox1",0, 2., 2., 2.);
79 smbox->SetLineColor(kRed);
85 TGeoTranslation *etra =
new TGeoTranslation(0.0,0.0,0.5*(eemc->
getZ1()+eemc->
getZ2()));
86 top->AddNode(smbox, 1,NULL);
87 top->AddNode(eemc(),1,etra);
88 gm->SetTopVolume(top);
102 muDstMk =
new StMuDstMaker(0,0,inpDir,inpFile,
"",nFiles);
108 dbMk->setTimeStampDay(20040331);
121 eemcDb->setPreferedFlavor(
"onlped",
"eemcPMTped");
137 while(match<nMatch) {
139 if( stat==2 || stat==4)
break;
140 if( stat!=0 )
continue;
143 if(matchList->IsEmpty())
continue;
144 TIter nextMatch(matchList);
150 sprintf(buffer,
"Run #%d Event #%d\n",evinfo.runId(),evinfo.id());
152 eventInfo->SetTextAlign(12);
153 eventInfo->AddText(buffer);
157 cerr <<
"Run=\"" << evinfo.runId() <<
"\"\t";
158 cerr <<
"Event=\""<< evinfo.id() <<
"\">\n";
164 eemc->
Out(cerr,*tmatch);
165 eemc->
Out(outs,*tmatch);
166 eventInfo->AddText(outs);
168 cerr <<
"</Event>" << endl;
171 dateInfo->SetLabel(now->AsString());
188 void printNodeTree(TObjArray *nodeList, Int_t level)
190 TIter nextNode(nodeList);
192 while( (node=(TGeoNode *)nextNode())!=NULL ) {
193 for(
int k=0;k<level;k++) cerr <<
"\t";
194 cerr << node->GetVolume()->GetName() << endl;
195 printNodeTree(node->GetNodes(),level+1);
202 findNode(TObjArray *nodeList,
const char *name)
204 TIter nextNode(nodeList);
206 while( (node=(TGeoNode *)nextNode())!=NULL ) {
207 if(strcmp(node->GetVolume()->GetName(),name)==0)
return node;
208 if( (node=findNode(node->GetNodes(),name))!= NULL )
return node;
Bool_t AddMatch(EEmcTTMatch &tmatch)
Float_t getZ1() const
gets lower Z edge of EEMC (preshower)
Float_t getZ2() const
gets upper Z edge of EEMC (postshower)
static void setLevel(unsigned int level)
sets the debug level
void Out(ostream &out, EEmcTTMatch &tmatch)
EEmcTTMMaker(const char *self="ttmmk", class StMuDstMaker *mumaker=NULL)
ostream & Summary(ostream &out) const
prints matching cuts and statistics summary
void SetMagneticField(double B)
TList * GetMatchList()
returns a list of matches (EEmcTTMatch objects)
virtual void ls(Option_t *option="") const
void Draw(const Option_t *option="")
void Clear(const Option_t *option="")
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
void SetShowExtrapolatedTracks(bool f)
EEmc Tower and Track Display class.
EEmcTTMatch class contains results of TPC track to EEMC tower matching.
void setSectors(int, int)
limit the range of sectors for speed
EEmcTower holds information about an EEMC tower 'hit'.