ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/plugins/HbbTreeMaker.hh
Revision: 1.3
Committed: Tue Feb 9 14:52:23 2010 UTC (15 years, 3 months ago) by amagnan
Content type: text/plain
Branch: MAIN
Changes since 1.2: +3 -0 lines
Log Message:
export code to CMSSW_3_4_X

File Contents

# User Rev Content
1 amagnan 1.1 #ifndef HbbAnalysis_HbbTreeMaker_hh
2     #define HbbAnalysis_HbbTreeMaker_hh
3    
4     #include <fstream>
5     #include <string>
6     #include <iostream>
7     #include <vector>
8    
9     #include "Math/VectorUtil.h"
10    
11     #include "FWCore/Framework/interface/EDAnalyzer.h"
12     #include "FWCore/Framework/interface/ESHandle.h"
13     #include "FWCore/Framework/interface/Event.h"
14     #include "FWCore/Framework/interface/EventSetup.h"
15     #include "FWCore/Framework/interface/TriggerNames.h"
16     #include "FWCore/ParameterSet/interface/ParameterSet.h"
17    
18     #include "DataFormats/Common/interface/Handle.h"
19     #include "DataFormats/PatCandidates/interface/Lepton.h"
20     #include "DataFormats/PatCandidates/interface/Jet.h"
21     #include "DataFormats/PatCandidates/interface/Muon.h"
22     #include "DataFormats/PatCandidates/interface/Electron.h"
23     #include "DataFormats/PatCandidates/interface/Tau.h"
24    
25     #include "UserCode/HbbAnalysis/interface/JetFlavour.hh"
26     #include "UserCode/HbbAnalysis/interface/HbbEvent.hh"
27    
28     #include "TTree.h"
29    
30     class HbbTreeMaker : public edm::EDAnalyzer {//class
31    
32     public:
33    
34     HbbTreeMaker(const edm::ParameterSet & pset);
35     ~HbbTreeMaker();
36    
37     void beginJob(const edm::EventSetup&);
38     void analyze(const edm::Event& ,
39     const edm::EventSetup&
40     );
41     void endJob();
42    
43     private:
44    
45     void HbbParticles(const edm::Handle<reco::GenParticleCollection> & aCol,
46     std::vector<HbbAnalysis::GenParticle> & aVec);
47    
48     void HbbElectrons(const edm::Handle<std::vector<pat::Electron> > & aCol,
49     std::vector<HbbAnalysis::Electron> & aVec);
50    
51     void HbbMuons(const edm::Handle<std::vector<pat::Muon> > & aCol,
52 amagnan 1.2 const edm::Handle<std::vector<reco::Vertex> > & aRecoVertices,
53 amagnan 1.1 std::vector<HbbAnalysis::Muon> & aVec);
54    
55     void HbbTaus(const edm::Handle<std::vector<pat::Tau> > & aCol,
56     const edm::Handle<std::vector<reco::Vertex> > & aRecoVertices,
57     std::vector<HbbAnalysis::Tau> & aVec);
58    
59     void HbbJets(const edm::Handle<std::vector<pat::Jet> > & aCol,
60     const HbbAnalysis::JetFlavour & aFlavour,
61     const edm::Handle<reco::GenParticleCollection> & aGenParticles,
62     std::vector<HbbAnalysis::Jet> & aVec);
63    
64     void HbbMet(const edm::Handle<std::vector<pat::MET> > & aCol,
65     HbbAnalysis::Met & aVec);
66    
67     void HbbTrigger(const edm::Handle<edm::TriggerResults> & aCol,
68     std::vector<HbbAnalysis::Trigger> & aVec);
69    
70    
71    
72     int debug_;
73    
74 amagnan 1.3 bool processData_;
75    
76    
77 amagnan 1.1 //flavour of jets required :
78     // 3 = u,d,s,g, 21 = g
79     // 4=c, 5=b, 45=b or c
80     unsigned int flavour_;
81    
82     bool doGen_;
83    
84     HbbAnalysis::JetFlavour jetFlav_;
85    
86     edm::InputTag genParticleSrc_;
87     edm::InputTag electronSrc_;
88     edm::InputTag muonSrc_;
89     edm::InputTag caloTauSrc_;
90     edm::InputTag pfTauSrc_;
91     edm::InputTag caloJetSrc_;
92     edm::InputTag jptJetSrc_;
93     edm::InputTag pfJetSrc_;
94     edm::InputTag caloMetSrc_;
95     edm::InputTag tcMetSrc_;
96     edm::InputTag pfMetSrc_;
97     //edm::InputTag pairSrc_;
98     //edm::InputTag mmPairSrc_;
99     //edm::InputTag etPairSrc_;
100     //edm::InputTag mtPairSrc_;
101     edm::InputTag vertexSrc_;
102     edm::InputTag triggerSrc_;
103     std::vector<std::string> hltPaths_;
104     //vector filled during processing with all existing collections
105     //std::vector<std::pair<std::string,std::string> > collections_;
106    
107     //list of processes to consider to find input collections
108     //std::vector<std::string> processVec_;
109    
110     HbbAnalysis::HbbEvent * event_;
111    
112     TTree *tree_;
113    
114     };//class
115    
116     #endif //HbbAnalysis_HbbTreeMaker_hh