ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/interface/HiPFCandAnalyzer.h
Revision: 1.1
Committed: Tue Sep 20 19:45:05 2011 UTC (13 years, 7 months ago) by yilmaz
Content type: text/plain
Branch: MAIN
Log Message:
combining all analyzers

File Contents

# Content
1 #include "FWCore/Framework/interface/Frameworkfwd.h"
2 #include "FWCore/Framework/interface/EDAnalyzer.h"
3 #include "FWCore/Utilities/interface/InputTag.h"
4 #include "FWCore/ServiceRegistry/interface/Service.h"
5 #include "CommonTools/UtilAlgos/interface/TFileService.h"
6
7 #include "TTree.h"
8 #include "TH1D.h"
9 #include "TH2D.h"
10 #include "TF1.h"
11 #include "DataFormats/HepMCCandidate/interface/GenParticle.h"
12 #include "DataFormats/TrackReco/interface/Track.h"
13 #include "DataFormats/HeavyIonEvent/interface/CentralityBins.h"
14 #include "DataFormats/PatCandidates/interface/Jet.h"
15 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
16 #include "DataFormats/Math/interface/LorentzVector.h"
17 #include <vector>
18
19 const Int_t MAXPARTICLE = 100000;
20 //
21 // DiJet ana Event Data Tree definition
22 //
23 class TreePFCandEventData
24 {
25 public:
26 // ===== Class Methods =====
27 void SetDefaults();
28 TreePFCandEventData();
29 void SetTree(TTree * t) { tree_=t; }
30 void SetBranches();
31 void Clear();
32
33 Float_t jdphi_;
34 // -- particle info --
35 Int_t nPFpart_, nGENpart_, njets_;
36 Int_t pfId_[MAXPARTICLE], genPDGId_[MAXPARTICLE];
37 Float_t pfPt_[MAXPARTICLE], genPt_[MAXPARTICLE], jetPt_[MAXPARTICLE];
38 Float_t pfEta_[MAXPARTICLE], genEta_[MAXPARTICLE], jetEta_[MAXPARTICLE];
39 Float_t pfPhi_[MAXPARTICLE], genPhi_[MAXPARTICLE], jetPhi_[MAXPARTICLE];
40
41 private:
42 TTree* tree_;
43 };
44
45 class HiPFCandAnalyzer : public edm::EDAnalyzer {
46 public:
47 explicit HiPFCandAnalyzer(const edm::ParameterSet&);
48 ~HiPFCandAnalyzer();
49
50 // class methods
51
52
53 private:
54 virtual void beginJob() ;
55 virtual void analyze(const edm::Event&, const edm::EventSetup&);
56 virtual void endJob() ;
57
58 // ----------member data ---------------------------
59 edm::Service<TFileService> fs;
60
61 // === Ana setup ===
62
63 // Event Info
64 edm::InputTag pfCandidateLabel_;
65 edm::InputTag genLabel_;
66 edm::InputTag jetLabel_;
67
68 TTree *pfTree_;
69 TreePFCandEventData pfEvt_;
70
71 // cuts
72 Double_t pfPtMin_;
73 Double_t jetPtMin_;
74 Double_t genPtMin_;
75
76 // debug
77 Int_t verbosity_;
78
79 };
80
81