StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RunJetFinder2009fzd.C
1 //
2 // Pibero Djawotho <pibero@tamu.edu>
3 // Texas A&M
4 // 19 Jan 2012
5 //
6 // Run jet finder on Zebra file
7 //
8 
9 void RunJetFinder2009fzd(int nevents = 1000, const char* fzdfile = "../eliza14/SL10c_emb/10180030/pt2_3_10180030_1.fzd", const char* jetfile = "jets.root")
10 {
11  gROOT->Macro("loadMuDst.C");
12  gROOT->Macro("LoadLogger.C");
13  //gROOT->Macro("$STAR/StRoot/macros/loadMuDst.C");
14  //gROOT->Macro("$STAR/StRoot/macros/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("StPreEclMaker");
25  gSystem->Load("StEmcSimulatorMaker");
26  gSystem->Load("StDbBroker");
27  gSystem->Load("St_db_Maker");
28  gSystem->Load("StEEmcUtil");
29  gSystem->Load("StEEmcDbMaker");
30  gSystem->Load("StSpinDbMaker");
31  gSystem->Load("StEmcTriggerMaker");
32  gSystem->Load("StTriggerUtilities");
33  gSystem->Load("StMCAsymMaker");
34  gSystem->Load("StRandomSelector");
35  //gSystem->Load("libfastjet.so");
36  gSystem->Load("fastjet-install/lib/libfastjet.so");
37  gSystem->Load("StJetFinder");
38  gSystem->Load("StJetSkimEvent");
39  gSystem->Load("StJets");
40  gSystem->Load("StJetEvent");
41  gSystem->Load("StJetMaker");
42  gSystem->Load("StEEmcSimulatorMaker");
43 
44  gSystem->Load("St_g2t");
45  gSystem->Load("St_geant_Maker");
46 
47  StChain* chain = new StChain;
48 
49  St_geant_Maker* geant = new St_geant_Maker;
50  geant->SetInputFile(fzdfile);
51 
52  // StMcEvent maker
53  StMcEventMaker* mcEventMaker = new StMcEventMaker;
54  mcEventMaker->doPrintEventInfo = false;
55  mcEventMaker->doPrintMemoryInfo = false;
56 
57  // star database
58  St_db_Maker* starDb = new St_db_Maker("StarDb","MySQL:StarDb");
59  starDb->SetDateTime(20111231,0);
60 
61  // Endcap database
62  StEEmcDbMaker* eemcDb = new StEEmcDbMaker;
63 
64  // Jet maker
65  StJetMaker2009* jetmaker = new StJetMaker2009;
66  jetmaker->setJetFile(jetfile);
67 
68  // Set analysis cuts for particle jets branch
69  StAnaPars* anaparsParticle = new StAnaPars;
70  anaparsParticle->useMonteCarlo = true;
71 
72  // MC cuts
73  anaparsParticle->addMcCut(new StjMCParticleCutStatus(1)); // final state particles
74 
75  // Jet cuts
76  anaparsParticle->addJetCut(new StProtoJetCutPt(3,200));
77  anaparsParticle->addJetCut(new StProtoJetCutEta(-100,100));
78 
79  // Set analysis cuts for parton jets branch
80  StAnaPars* anaparsParton = new StAnaPars;
81  anaparsParton->useMonteCarlo = true;
82 
83  // MC cuts
84  anaparsParton->addMcCut(new StjMCParticleCutParton);
85 
86  // Jet cuts
87  anaparsParton->addJetCut(new StProtoJetCutPt(3,200));
88  anaparsParton->addJetCut(new StProtoJetCutEta(-100,100));
89 
90  for (float coneRadius = 0.4; coneRadius < 0.8; coneRadius += 0.1) {
91  // Set cone jet finder parameters
92  StConePars* conepars = new StConePars;
93  conepars->setGridSpacing(105,-3.0,3.0,120,-TMath::Pi(),TMath::Pi());
94  conepars->setConeRadius(coneRadius);
95  conepars->setSeedEtMin(0.5);
96  conepars->setAssocEtMin(0.1);
97  conepars->setSplitFraction(0.5);
98  conepars->setPerformMinimization(true);
99  conepars->setAddMidpoints(true);
100  conepars->setRequireStableMidpoints(true);
101  conepars->setDoSplitMerge(true);
102  conepars->setDebug(false);
103 
104  int iConeRadius = coneRadius*100;
105 
106  jetmaker->addBranch(Form("ParticleConeJets%03d",iConeRadius),anaparsParticle,conepars);
107  jetmaker->addBranch(Form("PartonConeJets%03d",iConeRadius),anaparsParton,conepars);
108  }
109 
110  chain->Init();
111  chain->EventLoop(nevents);
112 }
void setConeRadius(double v)
Set cone radius:
Definition: StConePars.h:65
void setAddMidpoints(bool v)
Add seeds at midpoints?
Definition: StConePars.h:56
void setSplitFraction(double v)
split jets if E_shared/E_neighbor&gt;splitFraction
Definition: StConePars.h:50
void setGridSpacing(int nEta, double etaMin, double etaMax, int nPhi, double phiMin, double phiMax)
Set the grid spacing:
Definition: StConePars.h:36
void setDoSplitMerge(bool v)
Do Split/Merge step?
Definition: StConePars.h:59
void setDebug(bool v)
Toggle debug streams on/off.
Definition: StConePars.h:68
Filling of all StMcEvent classes from g2t tables Transform all the data in the g2t tables into the co...
void setSeedEtMin(double v)
minimum et threshold to be considered a seed
Definition: StConePars.h:44
Bool_t doPrintMemoryInfo
lots of screen output
void setAssocEtMin(double v)
minimum et threshold to be considered for addition to the seed
Definition: StConePars.h:47
void setRequireStableMidpoints(bool v)
Require stable midpoints?
Definition: StConePars.h:62
void setPerformMinimization(bool v)
Let jet wander to minimum?
Definition: StConePars.h:53