00001
00002
00003 #include <iostream>
00004 #include <fstream>
00005 #include <set>
00006 #include <pair>
00007 #include <map>
00008
00009 using namespace std;
00010
00011 void electron_tree_maker(const char* file_list="ctest3.list",const char* skimfile="electronskimfile.root")
00012 {
00013 gROOT->Macro("LoadLogger.C");
00014 gROOT->Macro("loadMuDst.C");
00015 gSystem->Load("StTpcDb");
00016 gSystem->Load("StDaqLib");
00017 gSystem->Load("StDetectorDbMaker");
00018 gSystem->Load("St_db_Maker");
00019 gSystem->Load("StDbUtilities");
00020 gSystem->Load("StEmcRawMaker");
00021 gSystem->Load("StMcEvent");
00022 gSystem->Load("StMcEventMaker");
00023 gSystem->Load("StEmcSimulatorMaker");
00024 gSystem->Load("StEmcADCtoEMaker");
00025 gSystem->Load("StEpcMaker");
00026 gSystem->Load("StDbBroker");
00027 gSystem->Load("StEmcUtil");
00028 gSystem->Load("StAssociationMaker");
00029 gSystem->Load("StEmcTriggerMaker");
00030 gSystem->Load("StTriggerUtilities");
00031 gSystem->Load("StEmcOfflineCalibrationMaker");
00032
00033
00034 char file[300];
00035 TChain* calib_tree = new TChain("calibTree");
00036 ifstream filelist(file_list);
00037 while(1){
00038 filelist >> file;
00039 if(!filelist.good()) break;
00040 cout<<file<<endl;
00041 calib_tree->Add(file);
00042 }
00043
00044 char* dbtime = "2009-03-28 00:00:00";
00045 StEmcOfflineCalibrationElectronAnalyzer* ana = new StEmcOfflineCalibrationElectronAnalyzer;
00046
00047
00048 ana->HTtrigs.push_back(240530);
00049 ana->HTtrigs.push_back(240540);
00050 ana->HTtrigs.push_back(240550);
00051 ana->HTtrigs.push_back(240560);
00052 ana->HTtrigs.push_back(240570);
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 ana->analyzeTree(calib_tree,skimfile,dbtime);
00074
00075
00076 }