ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/CmsHi/JetAnalysis/interface/HiPFCandAnalyzer.h
Revision: 1.3
Committed: Tue Sep 20 22:24:42 2011 UTC (13 years, 7 months ago) by yilmaz
Content type: text/plain
Branch: MAIN
CVS Tags: HiForest_V02_21, HiForest_V02_20, HiForest_V02_19, HiForest_V02_18, HiForest_V02_17, HiForest_V02_16, HiForest_V02_15, HiForest_V02_14, HiForest_V02_13, HiForest_V02_12, HiForest_V02_11, HiForest_V02_10, HiForest_V02_09, HiForest_V02_08, HiForest_V02_07, HiForest_V02_06, HiForest_V02_05, HiForest_V02_04, HiForest_V02_03, HiForest_V02_02, HiForest_V02_01, HiForest_V02_00, hi44X_02, hi413_03, hi413_02, hi441_1, hi441_0, hi413_11, hi413_10, hi413_09
Changes since 1.2: +1 -1 lines
Log Message:
option for neutral components only

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 bool doJets;
33 bool doMC;
34
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 bool doJets_;
82 bool doMC_;
83 bool skipCharged_;
84 };
85
86