StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RunJetFinder2012pro.C
1 void RunJetFinder2012pro(int nevents = 1000000,
2 const char* indir = "~/2013-08-trgsimu/MuDst/",
3 const char* MuDst = "st_physics_13109014_raw_1020001.MuDst.root",
4 const char* Jetfile = "st_physics_13109014_raw_1020001.jets.root",
5 const char* Uefile = "st_physics_13109014_raw_1020001.ueoc.root",
6 const char* Skimfile = "st_physics_13109014_raw_1020001.skim.root"
7 )
8 {
9  cout<<"MuDst file is "<<MuDst<<endl;
10  cout<<"JetTree file is "<<Jetfile<<endl;
11  cout<<"SkimTree file is "<<Skimfile<<endl;
12 
13  gROOT->Macro("loadMuDst.C");
14  gROOT->Macro("LoadLogger.C");
15 
16  gSystem->Load("StDetectorDbMaker");
17  gSystem->Load("StTpcDb");
18  gSystem->Load("StDbUtilities");
19  gSystem->Load("StMcEvent");
20  gSystem->Load("StMcEventMaker");
21  gSystem->Load("StDaqLib");
22  gSystem->Load("StEmcRawMaker");
23  gSystem->Load("StEmcADCtoEMaker");
24  gSystem->Load("StEmcSimulatorMaker");
25  gSystem->Load("StDbBroker");
26  gSystem->Load("St_db_Maker");
27  gSystem->Load("StEEmcUtil");
28  gSystem->Load("StEEmcDbMaker");
29  gSystem->Load("StSpinDbMaker");
30  gSystem->Load("StEmcTriggerMaker");
31  gSystem->Load("StTriggerUtilities");
32  gSystem->Load("StMCAsymMaker");
33  gSystem->Load("StRandomSelector");
34  gSystem->Load("libfastjet.so");
35  gSystem->Load("libsiscone.so");
36  gSystem->Load("libsiscone_spherical.so");
37  gSystem->Load("libfastjetplugins.so");
38 
39  gSystem->Load("StJetFinder");
40  gSystem->Load("StJetSkimEvent");
41  gSystem->Load("StJets");
42  gSystem->Load("StJetEvent");
43  gSystem->Load("StUeEvent");
44  gSystem->Load("StJetMaker");
45  gSystem->Load("StTriggerFilterMaker");
46 
47  //
48  gSystem->Load("libMinuit.so");
49  gSystem->Load("StFmsUtil");
50  gSystem->Load("StFmsDbMaker");
51  gSystem->Load("StFmsHitMaker");
52  gSystem->Load("StFmsPointMaker");
53  gSystem->Load("StFmsQAHistoMaker");
54 
55  StChain *chain = new StChain;
56 
57  StMuDstMaker* muDstMaker = new StMuDstMaker(0,0,indir, MuDst,"",1000);
58 
59  StMuDbReader* muDstDb = StMuDbReader::instance();
60 
61  StTriggerFilterMaker* filterMaker = new StTriggerFilterMaker;
62  //JP0
63  filterMaker->addTrigger(380401);
64  //JP1
65  filterMaker->addTrigger(380402);
66  //JP2
67  filterMaker->addTrigger(380403);
68  //AJP
69  filterMaker->addTrigger(380404);
70 
71  St_db_Maker* starDb = new St_db_Maker("StarDb","MySQL:StarDb");
72 
73  StEEmcDbMaker* eemcDb = new StEEmcDbMaker;
74 
75  StSpinDbMaker* spinDb = new StSpinDbMaker;
76 
78  adc->saveAllStEvent(true);
79 
80  StFmsDbMaker* fmsDb = new StFmsDbMaker;
81  StFmsHitMaker* fmshitMk = new StFmsHitMaker();
82  StFmsPointMaker* fmsptMk = new StFmsPointMaker("StFmsPointMaker");
83 
84  StTriggerSimuMaker* simuTrig = new StTriggerSimuMaker;
85  simuTrig->useOnlineDB();
86  simuTrig->setMC(false);
87 
88  //simuTrig->useBbc();
89  simuTrig->useBemc();
90  simuTrig->useEemc();
91  simuTrig->bemc->setConfig(StBemcTriggerSimu::kOnline);
92 
93  StJetMaker2012* jetmaker = new StJetMaker2012;
94  jetmaker->setJetFile(Jetfile);
95  jetmaker->setJetFileUe(Uefile);
96 
97  StJetSkimEventMaker* skimEventMaker = new StJetSkimEventMaker("StJetSkimEventMaker", muDstMaker, Skimfile);
98 
99  StAnaPars* anapars12 = new StAnaPars;
100  anapars12->useTpc = true;
101  anapars12->useBemc = true;
102  anapars12->useEemc = true;
103  anapars12->useFms = false;
104 
105  // The classes available for correcting tower energy for tracks are:
106  // 1. StjTowerEnergyCorrectionForTracksMip
107  // 2. StjTowerEnergyCorrectionForTracksFraction
108  // 3. StjTowerEnergyCorrectionForTracksNull (default: no correction)
109  anapars12->setTowerEnergyCorrection(new StjTowerEnergyCorrectionForTracksFraction(1.00));
110  anapars12->addTpcCut(new StjTrackCutFlag(0));
111  anapars12->addTpcCut(new StjTrackCutNHits(12));
112  anapars12->addTpcCut(new StjTrackCutPossibleHitRatio(0.51));
113  anapars12->addTpcCut(new StjTrackCutDca(3));
114  //DcaD pT dependent cut for pp200 run9
115  // anapars12->addTpcCut(new StjTrackCutDcaPtDependent);
116  //DcaT pT dependent cut for pp500 run11, run12
117  anapars12->addTpcCut(new StjTrackCutTdcaPtDependent);
118  //Don't Need Chi2 cut for Run12 either
119  //anapars12->addTpcCut(new StjTrackCutChi2(0,4));
120  anapars12->addTpcCut(new StjTrackCutPt(0.2,200));
121  anapars12->addTpcCut(new StjTrackCutEta(-2.5,2.5));
122  anapars12->addTpcCut(new StjTrackCutLastPoint(125));
123 
124  // BEMC cuts
125  anapars12->addBemcCut(new StjTowerEnergyCutBemcStatus(1));
126  anapars12->addBemcCut(new StjTowerEnergyCutAdc(4,3)); // ADC-ped>4 AND ADC-ped>3*RMS
127  anapars12->addBemcCut(new StjTowerEnergyCutEt(0.2));
128 
129  // EEMC cuts
130  anapars12->addEemcCut(new StjTowerEnergyCutBemcStatus(1));
131  anapars12->addEemcCut(new StjTowerEnergyCutAdc(4,3)); // ADC-ped>4 AND ADC-ped>3*RMS
132  anapars12->addEemcCut(new StjTowerEnergyCutEt(0.2));
133 
134  // Jet cuts
135  anapars12->addJetCut(new StProtoJetCutPt(5,200));
136  anapars12->addJetCut(new StProtoJetCutEta(-100,100));
137  // Jet Area
138  StFastJetAreaPars *JetAreaPars = new StFastJetAreaPars;
139  //Anti-kT R=0.6 for run12 jet finding
140  // Set anti-kt R=0.6 parameters
141  StFastJetPars* AntiKtR060Pars = new StFastJetPars;
142 
143  AntiKtR060Pars->setJetAlgorithm(StFastJetPars::antikt_algorithm);
144  AntiKtR060Pars->setRparam(0.6);
145  AntiKtR060Pars->setRecombinationScheme(StFastJetPars::E_scheme);
146  AntiKtR060Pars->setStrategy(StFastJetPars::Best);
147  AntiKtR060Pars->setPtMin(5.0);
148  AntiKtR060Pars->setJetArea(JetAreaPars);
149  //Anti-kT R=0.5 for run12 jet finding
150  // Set anti-kt R=0.5 parameters
151  StFastJetPars* AntiKtR050Pars = new StFastJetPars;
152  AntiKtR050Pars->setJetAlgorithm(StFastJetPars::antikt_algorithm);
153  AntiKtR050Pars->setRparam(0.5);
154  AntiKtR050Pars->setRecombinationScheme(StFastJetPars::E_scheme);
155  AntiKtR050Pars->setStrategy(StFastJetPars::Best);
156  AntiKtR050Pars->setPtMin(5.0);
157  AntiKtR050Pars->setJetArea(JetAreaPars);
158 
159  jetmaker->addBranch("AntiKtR060NHits12",anapars12,AntiKtR060Pars);
160  jetmaker->addBranch("AntiKtR050NHits12",anapars12,AntiKtR050Pars);
161  StOffAxisConesPars *off050 = new StOffAxisConesPars(0.5);
162  StOffAxisConesPars *off060 = new StOffAxisConesPars(0.6);
163  jetmaker->addUeBranch("OffAxisConesR050", off050);
164  jetmaker->addUeBranch("OffAxisConesR060", off060);
165  // Run
166  chain->Init();
167  chain->EventLoop(nevents);
168 }
static const int Best
automatic selection of the best (based on N)
StFmsHitMaker.
Definition: StFmsHitMaker.h:27
void useOnlineDB()
Choose DB to access trigger definitions and thresholds.
static const int E_scheme
Definition: StFastJetPars.h:89
static const int antikt_algorithm
Definition: StFastJetPars.h:65
void saveAllStEvent(Bool_t a)
Set to kTRUE if all hits are to be saved on StEvent.