ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Morgan/interface/TRootGenEvent.h
Revision: 1.2
Committed: Mon Mar 2 16:24:42 2009 UTC (16 years, 2 months ago) by lethuill
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
State: FILE REMOVED
Error occurred while calculating annotation data.
Log Message:
EricError

File Contents

# Content
1 #ifndef TRootGenEvent_h
2 #define TRootGenEvent_h
3
4 #include "../interface/TRootParticle.h"
5
6 #include "Rtypes.h"
7 #include "TObject.h"
8 #include "vector.h"
9
10 #include <iostream>
11 #include <iomanip>
12 using namespace std;
13
14 class TRootGenEvent : public TObject
15 {
16
17 public:
18 // semiletponic decay channel
19 enum LeptonType {kNone, kElec, kMuon, kTau};
20
21 public:
22 TRootGenEvent() :
23 semiLeptonicChannel_(kNone),
24 isTtBar_(false),
25 isFullHadronic_(false),
26 isSemiLeptonic_(false),
27 isFullLeptonic_(false)
28 {;}
29
30 ~TRootGenEvent(){;}
31
32 Bool_t isTtBar() const {return isTtBar_;};
33 Bool_t isFullHadronic() const {return isFullHadronic_;};
34 Bool_t isSemiLeptonic() const {return isSemiLeptonic_;};
35 Bool_t isFullLeptonic() const {return isFullLeptonic_;};
36 LeptonType semiLeptonicChannel() const { return semiLeptonicChannel_;};
37 bool isSemiLeptonic(LeptonType typeA) const
38 { return (semiLeptonicChannel()==typeA ? true : false); };
39
40 const TLorentzVector neutrino() const { return neutrino_;};
41 const TLorentzVector lepton() const { return lepton_;};
42 const TLorentzVector leptonicDecayW() const { return leptonicDecayW_;};
43 const TLorentzVector leptonicDecayB() const { return leptonicDecayB_;};
44 const TLorentzVector leptonicDecayTop() const { return leptonicDecayTop_;};
45 const TLorentzVector hadronicDecayW() const {return hadronicDecayW_;};
46 const TLorentzVector hadronicDecayB() const {return hadronicDecayB_;};
47 const TLorentzVector hadronicDecayTop() const {return hadronicDecayTop_;};
48 const TLorentzVector hadronicDecayQuark() const {return hadronicDecayQuark_;};
49 const TLorentzVector hadronicDecayQuarkBar() const {return hadronicDecayQuarkBar_;};
50 const std::vector<TLorentzVector> leptonicDecayTopRadiation() const { return leptonicDecayTopRadiation_;};
51 const std::vector<TLorentzVector> hadronicDecayTopRadiation() const { return leptonicDecayTopRadiation_;};
52 const std::vector<TLorentzVector> ISR()const { return ISR_;};
53
54
55 void SetBoolean(Bool_t isTtBar, Bool_t isFullHadronic, Bool_t isSemiLeptonic, Bool_t isFullLeptonic){
56 isTtBar_ = isTtBar;
57 isFullHadronic_ = isFullHadronic;
58 isSemiLeptonic_ = isSemiLeptonic;
59 isFullLeptonic_ = isFullLeptonic;
60 };
61 void SetSemiLeptonicChannel(LeptonType type){ semiLeptonicChannel_ = type;};
62 void SetTLorentzVector(TLorentzVector &lepton, TLorentzVector &neutrino, TLorentzVector &leptonicDecayW, TLorentzVector &leptonicDecayB, TLorentzVector &leptonicDecayTop, TLorentzVector &hadronicDecayW, TLorentzVector &hadronicDecayB, TLorentzVector &hadronicDecayTop, TLorentzVector &hadronicDecayQuark, TLorentzVector &hadronicDecayQuarkBar){
63 lepton_ = lepton;
64 neutrino_ = neutrino;
65 leptonicDecayW_ = leptonicDecayW;
66 leptonicDecayB_ = leptonicDecayB;
67 leptonicDecayTop_ = leptonicDecayTop;
68 hadronicDecayW_ = hadronicDecayW;
69 hadronicDecayB_ = hadronicDecayB;
70 hadronicDecayTop_ = hadronicDecayTop;
71 hadronicDecayQuark_ = hadronicDecayQuark;
72 hadronicDecayQuarkBar_ = hadronicDecayQuarkBar;
73 };
74 void SetRadiation(std::vector<TLorentzVector> leptonicDecayTopRadiation, std::vector<TLorentzVector> hadronicDecayTopRadiation, std::vector<TLorentzVector> ISR){
75 leptonicDecayTopRadiation_ = leptonicDecayTopRadiation;
76 hadronicDecayTopRadiation_ = hadronicDecayTopRadiation;
77 ISR_ = ISR;
78 };
79
80 virtual TString typeName() const { return "TRootGenEvent"; }
81
82
83 friend std::ostream& operator<< (std::ostream& stream, const TRootGenEvent& genEvt) {
84 stream << "TRootGenEvent - is ";
85 if(genEvt.isTtBar()) stream <<"not ";
86 stream <<"Ttbar event ";
87 if(genEvt.isFullHadronic()) stream <<" FullHadronic ";
88 if(genEvt.isFullLeptonic()) stream <<" FullLeptonic ";
89 if(genEvt.isSemiLeptonic()) stream <<" SemiLeptonic ";
90 if(genEvt.semiLeptonicChannel()==kMuon) stream <<" muonic";
91 if(genEvt.semiLeptonicChannel()==kElec) stream <<" electronic";
92 if(genEvt.semiLeptonicChannel()==kTau) stream <<" tauonic";
93 stream << std::endl;
94 stream << "Nof ISR: "<< genEvt.ISR().size();
95 stream << "Nof Top radiations: "<< genEvt.leptonicDecayTopRadiation().size() + genEvt.hadronicDecayTopRadiation().size();
96 //stream << "TRootGenEvent - Charge=" << setw(2) << jet.charge() << " (Et,eta,phi)=("<< setw(10) << jet.Et() <<","<< setw(10) << jet.Eta() <<","<< setw(10) << jet.Phi() << ")"
97 return stream;
98 };
99
100
101 private:
102
103 LeptonType semiLeptonicChannel_;
104 Bool_t isTtBar_;
105 Bool_t isFullHadronic_;
106 Bool_t isSemiLeptonic_;
107 Bool_t isFullLeptonic_;
108 TLorentzVector lepton_;
109 TLorentzVector neutrino_;
110 TLorentzVector leptonicDecayW_;
111 TLorentzVector leptonicDecayB_;
112 TLorentzVector leptonicDecayTop_;
113 TLorentzVector hadronicDecayW_;
114 TLorentzVector hadronicDecayB_;
115 TLorentzVector hadronicDecayTop_;
116 TLorentzVector hadronicDecayQuark_;
117 TLorentzVector hadronicDecayQuarkBar_;
118 std::vector<TLorentzVector> ISR_;
119 std::vector<TLorentzVector> leptonicDecayTopRadiation_;
120 std::vector<TLorentzVector> hadronicDecayTopRadiation_;
121
122
123 ClassDef (TRootGenEvent,1);
124 };
125
126 #endif