Go to the documentation of this file.00001
00002
00003
00004
00005
00007
00008 #ifndef UEAnalysisSelectorRootple_h
00009 #define UEAnalysisSelectorRootple_h
00010
00011 #include <TROOT.h>
00012 #include <TChain.h>
00013 #include <TFile.h>
00014 #include <TSelector.h>
00015
00016
00017 #include "UEAnalysisUE.h"
00018 #include "UEAnalysisJets.h"
00019 #include "UEAnalysisMPI.h"
00020
00021
00022 #include <TClonesArray.h>
00023 #include <TObjString.h>
00024
00025
00026 class UEAnalysisSelectorRootple : public TSelector {
00027 public :
00028 TTree *fChain;
00029
00030
00031 Int_t EventKind;
00032 TClonesArray *MonteCarlo;
00033 TClonesArray *Track;
00034 TClonesArray *InclusiveJet;
00035 TClonesArray *ChargedJet;
00036 TClonesArray *TracksJet;
00037 TClonesArray *CalorimeterJet;
00038 TClonesArray *acceptedTriggers;
00039
00040
00041 TBranch *b_EventKind;
00042 TBranch *b_MonteCarlo;
00043 TBranch *b_Track;
00044 TBranch *b_InclusiveJet;
00045 TBranch *b_ChargedJet;
00046 TBranch *b_TracksJet;
00047 TBranch *b_CalorimeterJet;
00048 TBranch *b_acceptedTriggers;
00049
00050 UEAnalysisSelectorRootple(TTree * =0) { }
00051 virtual ~UEAnalysisSelectorRootple() { }
00052 virtual Int_t Version() const { return 2; }
00053 virtual void Begin(TTree *tree);
00054 virtual void SlaveBegin(TTree *tree);
00055 virtual void Init(TTree *tree);
00056 virtual Bool_t Notify();
00057 virtual Bool_t Process(Long64_t entry);
00058 virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; }
00059 virtual void SetOption(const char *option) { fOption = option; }
00060 virtual void SetObject(TObject *obj) { fObject = obj; }
00061 virtual void SetInputList(TList *input) { fInput = input; }
00062 virtual TList *GetOutputList() const { return fOutput; }
00063 virtual void SlaveTerminate();
00064 virtual void Terminate();
00065
00066 ClassDef(UEAnalysisSelectorRootple,0);
00067
00068 TFile* hFile;
00069
00070 float etaRegion;
00071 float ptThreshold;
00072
00073 UEAnalysisUE * ue;
00074 UEAnalysisJets* jets;
00075 UEAnalysisMPI* mpi;
00076
00077 };
00078
00079 #endif
00080
00081 #ifdef UEAnalysisSelectorRootple_cxx
00082 void UEAnalysisSelectorRootple::Init(TTree *tree)
00083 {
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093 MonteCarlo = 0;
00094 Track = 0;
00095 InclusiveJet = 0;
00096 ChargedJet = 0;
00097 TracksJet = 0;
00098 CalorimeterJet = 0;
00099 acceptedTriggers = 0;
00100
00101 if (!tree) return;
00102 fChain = tree;
00103 fChain->SetMakeClass(1);
00104
00105 fChain->SetBranchAddress("EventKind", &EventKind, &b_EventKind);
00106 fChain->SetBranchAddress("MonteCarlo", &MonteCarlo, &b_MonteCarlo);
00107 fChain->SetBranchAddress("Track", &Track, &b_Track);
00108 fChain->SetBranchAddress("InclusiveJet", &InclusiveJet, &b_InclusiveJet);
00109 fChain->SetBranchAddress("ChargedJet", &ChargedJet, &b_ChargedJet);
00110 fChain->SetBranchAddress("TracksJet", &TracksJet, &b_TracksJet);
00111 fChain->SetBranchAddress("CalorimeterJet", &CalorimeterJet, &b_CalorimeterJet);
00112 fChain->SetBranchAddress("acceptedTriggers", &acceptedTriggers, &b_acceptedTriggers);
00113
00114 }
00115
00116 Bool_t UEAnalysisSelectorRootple::Notify()
00117 {
00118
00119
00120
00121
00122
00123
00124 return kTRUE;
00125 }
00126
00127 #endif // #ifdef UEAnalysisSelectorRootple_cxx