ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbbAnalysis/VHbbDataFormats/interface/VHbbCandidate.h
Revision: 1.6
Committed: Tue Aug 9 09:35:47 2011 UTC (13 years, 8 months ago) by arizzi
Content type: text/plain
Branch: MAIN
CVS Tags: AndreaAug10th
Changes since 1.5: +17 -1 lines
Log Message:
add methods for transverse mass computation

File Contents

# User Rev Content
1 tboccali 1.1 #ifndef VHbbCandidate__H
2     #define VHbbCandidate__H
3    
4     #include <TLorentzVector.h>
5     #include <TVector2.h>
6     #include <vector>
7    
8     #include "VHbbAnalysis/VHbbDataFormats/interface/VHbbEvent.h"
9    
10     class VHbbCandidate {
11     public:
12     enum CandidateType{Zmumu, Zee, Wen, Wmun, Znn, UNKNOWN};
13    
14     VHbbCandidate(){candidateType=UNKNOWN;}
15    
16     class VectorCandidate {
17     public:
18 arizzi 1.6 double Mt(CandidateType candidateType) {
19     if(candidateType==Wen)
20     {
21     float ptl=electrons[0].p4.Pt();
22     float met=mets[0].p4.Pt();
23     float et=ptl+met;
24     return sqrt(et*et - p4.Pt()*p4.Pt() );
25     }
26     if(candidateType==Wmun)
27     {
28     float ptl=muons[0].p4.Pt();
29     float met=mets[0].p4.Pt();
30     float et=ptl+met;
31     return sqrt(et*et - p4.Pt()*p4.Pt() );
32     }
33     return 0;
34     }
35 tboccali 1.4 TLorentzVector p4;
36 tboccali 1.1 std::vector<VHbbEvent::MuonInfo> muons;
37     std::vector<VHbbEvent::ElectronInfo> electrons;
38     std::vector<VHbbEvent::TauInfo> taus;
39     std::vector<VHbbEvent::METInfo> mets;
40    
41     };
42    
43     class HiggsCandidate {
44     public:
45 tboccali 1.4 TLorentzVector p4;
46 tboccali 1.1 std::vector<VHbbEvent::SimpleJet> jets;
47     float deltaTheta;
48 tboccali 1.2 std::vector <float> helicities;
49 tboccali 1.3 public:
50 tboccali 1.1 VHbbEvent::SimpleJet& firstJet(){return jets[0];}
51     VHbbEvent::SimpleJet& secondJet(){return jets[1];}
52     };
53    
54    
55     void setCandidateType (CandidateType c){candidateType = c;}
56    
57     public:
58 tboccali 1.4 TLorentzVector p4(){return V.p4+H.p4;}
59 tboccali 1.1 CandidateType candidateType;
60     HiggsCandidate H;
61     VectorCandidate V;
62     std::vector<VHbbEvent::SimpleJet> additionalJets;
63     };
64    
65    
66     #endif