ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HbbAnalysis/plugins/HbbTreeMaker.hh
Revision: 1.1
Committed: Thu Sep 17 19:39:51 2009 UTC (15 years, 7 months ago) by amagnan
Content type: text/plain
Branch: MAIN
CVS Tags: v00-03-00
Log Message:
add Tree

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     std::vector<HbbAnalysis::Muon> & aVec);
53    
54     void HbbTaus(const edm::Handle<std::vector<pat::Tau> > & aCol,
55     const edm::Handle<std::vector<reco::Vertex> > & aRecoVertices,
56     std::vector<HbbAnalysis::Tau> & aVec);
57    
58     void HbbJets(const edm::Handle<std::vector<pat::Jet> > & aCol,
59     const HbbAnalysis::JetFlavour & aFlavour,
60     const edm::Handle<reco::GenParticleCollection> & aGenParticles,
61     std::vector<HbbAnalysis::Jet> & aVec);
62    
63     void HbbMet(const edm::Handle<std::vector<pat::MET> > & aCol,
64     HbbAnalysis::Met & aVec);
65    
66     void HbbTrigger(const edm::Handle<edm::TriggerResults> & aCol,
67     std::vector<HbbAnalysis::Trigger> & aVec);
68    
69    
70    
71     int debug_;
72    
73     //flavour of jets required :
74     // 3 = u,d,s,g, 21 = g
75     // 4=c, 5=b, 45=b or c
76     unsigned int flavour_;
77    
78     bool doGen_;
79    
80     HbbAnalysis::JetFlavour jetFlav_;
81    
82     edm::InputTag genParticleSrc_;
83     edm::InputTag electronSrc_;
84     edm::InputTag muonSrc_;
85     edm::InputTag caloTauSrc_;
86     edm::InputTag pfTauSrc_;
87     edm::InputTag caloJetSrc_;
88     edm::InputTag jptJetSrc_;
89     edm::InputTag pfJetSrc_;
90     edm::InputTag caloMetSrc_;
91     edm::InputTag tcMetSrc_;
92     edm::InputTag pfMetSrc_;
93     //edm::InputTag pairSrc_;
94     //edm::InputTag mmPairSrc_;
95     //edm::InputTag etPairSrc_;
96     //edm::InputTag mtPairSrc_;
97     edm::InputTag vertexSrc_;
98     edm::InputTag triggerSrc_;
99     std::vector<std::string> hltPaths_;
100     //vector filled during processing with all existing collections
101     //std::vector<std::pair<std::string,std::string> > collections_;
102    
103     //list of processes to consider to find input collections
104     //std::vector<std::string> processVec_;
105    
106     HbbAnalysis::HbbEvent * event_;
107    
108     TTree *tree_;
109    
110     };//class
111    
112     #endif //HbbAnalysis_HbbTreeMaker_hh