StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJetMaker2012.h
1 //******************************
2 //This is the 2012 version of Jet
3 //Maker with off-axis cone under-
4 //-lying event study included.
5 //The unde-rlying event will be
6 //saved in the tree called "ue".
7 //The Maker is derivatived from
8 //the older 2009 version.
9 //
10 //Author: Zilong Chang
11 //User name: zchang
12 //Cyclotron Institute
13 //Texas A&M University
14 //******************************
15 #ifndef ST_JET_MAKER_2012_H
16 #define ST_JET_MAKER_2012_H
17 
18 #include "StJetMaker2009.h"
19 
20 #include "StSpinPool/StUeEvent/StUeOffAxisConesEvent.h"
21 
22 class StarGenEvent;
23 class StarGenEventReader;
24 
25 class StOffAxisConesPars : public TObject{
26  public:
27  StOffAxisConesPars() : mConeR(0.5){
28  }
29  StOffAxisConesPars(double R){
30  mConeR = R;
31  }
32  double coneRadius() const{ return mConeR;}
33  private:
34  double mConeR;
35  ClassDef(StOffAxisConesPars, 0);
36 };
37 
39 public:
40  StJetMaker2012(const char* name = "StJetMaker2012")
41  :StJetMaker2009(name)
42  , mFileUe(0)
43  , mTreeUe(0)
44  {
45  }
46 
47  void Clear(Option_t* option = "");
48  int Init();
49  int Make();
50  int Finish();
51 
52  // Setters
53  void addUeBranch(const char* name, StOffAxisConesPars* pars);
54  void setJetFileUe(const char* filename);
55 
56  // Getters
57 
58  TTree* treeUe();
59  StUeOffAxisConesEvent* eventUe(const char* branchname);
60 
61 protected:
62 
63  StarGenEventReader *eventreader;
64  StarGenEvent *sEvent;
65 
66  double DeltaR(double etaA, double phiA, double etaB, double phiB);
67  double addJetUe(StProtoJet::FourVecList particles, StUeOffAxisConesEvent *ueEvent, const StProtoJet &jet, double radius = 0.5);
68 
69  struct StJetUeBranch{
70  StJetUeBranch(const char* name, StOffAxisConesPars *pars)
71  : name(name)
72  , uePars(pars)
73  {
74  }
75  TString name;
76  StOffAxisConesPars *uePars;
77  vector<StUeOffAxisConesEvent*> eventUe;
78  };
79 
80  vector<StJetUeBranch*> mJetUeBranches;
81 
82  TString mFileNameUe;
83  TFile* mFileUe;
84  TTree* mTreeUe;
85 
86  ClassDef(StJetMaker2012,0);
87 };
88 #endif
void Clear(Option_t *option="")
User defined functions.
Base class for event records.
Definition: StarGenEvent.h:81