00001 void runGammaTreeMaker
00002 (
00003 char *inputFile = "root://rcas6132.rcf.bnl.gov:1095//home/starreco/reco/ppProductionLong/FullField/P06ie/2006/131/7131043/st_physics_7131043_raw_1020001.MuDst.root",
00004 char *outputFile = "test.root"
00005 )
00006 {
00007
00008
00009 cout << "****************************************" << endl;
00010 cout << "Reading MuDst File : " << inputFile << endl;
00011 cout << "Writing Output File : " << outputFile << endl;
00012
00013
00014 cout << "Loading common libraries..." << endl;
00015
00016 gROOT->Macro("loadMuDst.C");
00017 gROOT->Macro("LoadLogger.C");
00018
00019 gSystem->Load("libMinuit");
00020 gSystem->Load("StDetectorDbMaker");
00021 gSystem->Load("StDbUtilities");
00022 gSystem->Load("StDbBroker");
00023 gSystem->Load("St_db_Maker");
00024 gSystem->Load("StSpinDbMaker");
00025
00026 gSystem->Load("libgeometry_Tables");
00027 gSystem->Load("StDaqLib");
00028 gSystem->Load("StEmcRawMaker");
00029 gSystem->Load("StEmcADCtoEMaker");
00030
00031 gSystem->Load("StEEmcDbMaker");
00032 gSystem->Load("StEEmcUtil");
00033 gSystem->Load("StEEmcA2EMaker");
00034 gSystem->Load("StEEmcClusterMaker");
00035
00036 gSystem->Load("StMCAsymMaker");
00037 gSystem->Load("StJetSkimEvent");
00038 gSystem->Load("StGammaMaker");
00039
00041
00043
00044 StChain *chain = new StChain("chain");
00045
00046 StMuDstMaker *muDstMaker = new StMuDstMaker(0, 0, "", inputFile, "", 1e6, "MuDst");
00047 muDstMaker->SetStatus("*", 0);
00048 muDstMaker->SetStatus("MuEvent", 1);
00049 muDstMaker->SetStatus("Event", 1);
00050 muDstMaker->SetStatus("PrimaryVertices", 1);
00051 muDstMaker->SetStatus("PrimaryTracks", 1);
00052 muDstMaker->SetStatus("GlobalTracks", 1);
00053 muDstMaker->SetStatus("EmcTow", 1);
00054 muDstMaker->SetStatus("EmcPrs", 1);
00055 muDstMaker->SetStatus("EmcSmde", 1);
00056 muDstMaker->SetStatus("EmcSmdp", 1);
00057 muDstMaker->SetStatus("EEmcPrs", 1);
00058 muDstMaker->SetStatus("EEmcSmdu", 1);
00059 muDstMaker->SetStatus("EEmcSmdv", 1);
00060
00061 St_db_Maker *StarDatabase = new St_db_Maker("StarDb", "MySQL:StarDb", "$STAR/StarDb");
00062
00063
00065
00067
00068
00069
00070
00071
00072
00073
00074
00075
00077
00079
00080
00081
00082 StEmcADCtoEMaker *bemcAdc2E = new StEmcADCtoEMaker();
00083 bemcAdc2E->setPrint(false);
00084
00086
00088
00090
00091
00092 StEEmcDbMaker *EEmcDatabase = new StEEmcDbMaker("eemcDb");
00093
00094
00095 StEEmcA2EMaker *EEanalysis = new StEEmcA2EMaker("mEEanalysis");
00096 EEanalysis->database("eemcDb");
00097 EEanalysis->source("MuDst", 1);
00098 EEanalysis->threshold(3.0, 0);
00099 EEanalysis->threshold(3.0, 1);
00100 EEanalysis->threshold(3.0, 2);
00101 EEanalysis->threshold(3.0, 3);
00102 EEanalysis->threshold(3.0, 4);
00103 EEanalysis->threshold(3.0, 5);
00104
00106
00108
00109
00110
00111
00112
00113
00114 StGammaMaker *gammaMaker = new StGammaMaker("gammaMaker", StGammaMaker::kBoth, StGammaMaker::kData);
00115 gammaMaker->setOutputFile(outputFile);
00116 gammaMaker->storeEmptyEvents();
00117
00118 gammaMaker->setClusterEtThreshold(5.1);
00119 gammaMaker->setConeRadius(0.4);
00120 gammaMaker->setBsmdRange(0.05237);
00121 gammaMaker->setEsmdRange(20.0);
00122
00123 gammaMaker->setSeedEnergyThreshold(3.6);
00124 gammaMaker->setClusterEnergyThreshold(5.1);
00125
00126 gammaMaker->setTrackEtRawThreshold(0.0);
00127 gammaMaker->setTowerEtRawThreshold(0.0);
00128
00129 gammaMaker->setEemcTowerClusterThreshold(0.1);
00130
00132
00134
00135 chain->Init();
00136 chain->ls(3);
00137
00138 int ntotal = 50;
00139
00140
00141 Int_t stat = 0;
00142 Int_t total = 0;
00143 for(int iev = 0; iev < ntotal; ++iev)
00144 {
00145
00146 cout << "********** Processing Event: " << iev << " **********" << endl;
00147
00148 chain->Clear();
00149 stat = chain->Make();
00150
00151 if(stat && stat != kStSKIP)
00152 {
00153 cout << "Bad return code!" << endl;
00154 break;
00155 }
00156
00157 ++total;
00158
00159 }
00160
00161 chain->Finish();
00162
00163 cout << "****************************************** " << endl;
00164 cout << total << " Total Events" << endl;
00165 cout << "****************************************** " << endl;
00166
00167 }
00168