00001
00002
00003 class StMuDstMaker;
00004
00005 StMuDstMaker* maker;
00006
00007 void exampleEmc(const char* list) {
00008 if (gClassTable->GetID("TTable") < 0) {
00009 gSystem->Load("libTable");
00010 gSystem->Load("libPhysics");
00011 }
00012 gSystem->Load("St_base");
00013 gSystem->Load("StChain");
00014 gSystem->Load("St_Tables");
00015 gSystem->Load("StMagF");
00016 gSystem->Load("StUtilities");
00017 gSystem->Load("StTreeMaker");
00018 gSystem->Load("StIOMaker");
00019 gSystem->Load("StarClassLibrary");
00020 gSystem->Load("StTpcDb");
00021 gSystem->Load("StDbUtilities");
00022 gSystem->Load("StEvent");
00023 gSystem->Load("StEventUtilities");
00024 gSystem->Load("StMcEvent");
00025 gSystem->Load("StMcEventMaker");
00026 gSystem->Load("StAssociationMaker");
00027 gSystem->Load("StMcAnalysisMaker");
00028 gSystem->Load("StStrangeMuDstMaker");
00029 gSystem->Load("StEmcUtil");
00030 gSystem->Load("StMuDSTMaker");
00031
00032 cout << " loading done " << endl;
00033
00034 StMuDebug::setLevel(0);
00035
00036 int iret=0;
00037 maker = new StMuDstMaker(0,0,"",list,"MuDst.root",20);
00038 StMuDbReader* db = StMuDbReader::instance();
00039
00040
00041
00042 int eventCounter=0;
00043 while ( !maker->Make() ) {
00044 cout << " event# " << eventCounter++ << endl;
00045 StMuEvent* e = maker->muDst()->event();
00046 StMuEmcCollection* emc = maker->muDst()->emcCollection();
00047 if (emc) {
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058 for (int n=1; n<=4; n++) {
00059 int nClusters = emc->getNClusters(n);
00060 cout << "Clusters: " << nClusters << endl;
00061 for (int i=0; i<nClusters; i++) {
00062 StMuEmcCluster* c = emc->getCluster(n,i);
00063 printf("Cluster(%02i,%02i): energy=%f phi=%f eta=%f nHits=%d \n",n,i,c->getEnergy(), c->getPhi(), c->getEta(), c->getNHits() );
00064 }
00065 }
00066 int nPoints = emc->getNPoints();
00067 for (int i=0; i<nPoints; i++) {
00068 StMuEmcPoint* p = emc->getPoint(i);
00069 printf("Point(%02i) : energy=%f phi=%f eta=%f \n",i,p->getEnergy(), p->getPhi(), p->getEta());
00070 }
00071 }
00072 }
00073
00074 }
00075
00076
00077