ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/interface/HiPFCandAnalyzer.h
Revision: 1.2
Committed: Tue Sep 20 21:00:42 2011 UTC (13 years, 7 months ago) by yilmaz
Content type: text/plain
Branch: MAIN
Changes since 1.1: +5 -0 lines
Log Message:
PF candidate analyzer

File Contents

# User Rev Content
1 yilmaz 1.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 yilmaz 1.2 bool doJets;
33     bool doMC;
34 yilmaz 1.1
35     Float_t jdphi_;
36     // -- particle info --
37     Int_t nPFpart_, nGENpart_, njets_;
38     Int_t pfId_[MAXPARTICLE], genPDGId_[MAXPARTICLE];
39     Float_t pfPt_[MAXPARTICLE], genPt_[MAXPARTICLE], jetPt_[MAXPARTICLE];
40     Float_t pfEta_[MAXPARTICLE], genEta_[MAXPARTICLE], jetEta_[MAXPARTICLE];
41     Float_t pfPhi_[MAXPARTICLE], genPhi_[MAXPARTICLE], jetPhi_[MAXPARTICLE];
42    
43     private:
44     TTree* tree_;
45     };
46    
47     class HiPFCandAnalyzer : public edm::EDAnalyzer {
48     public:
49     explicit HiPFCandAnalyzer(const edm::ParameterSet&);
50     ~HiPFCandAnalyzer();
51    
52     // class methods
53    
54    
55     private:
56     virtual void beginJob() ;
57     virtual void analyze(const edm::Event&, const edm::EventSetup&);
58     virtual void endJob() ;
59    
60     // ----------member data ---------------------------
61     edm::Service<TFileService> fs;
62    
63     // === Ana setup ===
64    
65     // Event Info
66     edm::InputTag pfCandidateLabel_;
67     edm::InputTag genLabel_;
68     edm::InputTag jetLabel_;
69    
70     TTree *pfTree_;
71     TreePFCandEventData pfEvt_;
72    
73     // cuts
74     Double_t pfPtMin_;
75     Double_t jetPtMin_;
76     Double_t genPtMin_;
77    
78     // debug
79     Int_t verbosity_;
80    
81 yilmaz 1.2 bool doJets_;
82     bool doMC_;
83    
84 yilmaz 1.1 };
85    
86