ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/System8/EDModule/Analyzer/interface/S8TreeMaker.h
Revision: 1.1
Committed: Fri May 6 13:51:08 2011 UTC (14 years ago) by samvel
Content type: text/plain
Branch: MAIN
CVS Tags: V00-00-04, V00-00-03, V00-00-02, V00-00-01, HEAD
Log Message:
Add Analyzer code

File Contents

# User Rev Content
1 samvel 1.1 /**
2     * S8TreeMaker
3     *
4     *
5     * Created by Samvel Khalatian on Sep 29, 2010
6     * Copyright 2010, All rights reserved
7     */
8    
9     #ifndef S8_TREEMAKER
10     #define S8_TREEMAKER
11    
12     #include <memory>
13     #include <string>
14    
15     #include "TFile.h"
16    
17     #include "Tree/System8/interface/S8Tools.h"
18     #include "Tree/System8/interface/S8Fwd.h"
19    
20     #include "FWCore/Framework/interface/Frameworkfwd.h"
21     #include "FWCore/Framework/interface/EDAnalyzer.h"
22     #include "HLTrigger/HLTcore/interface/HLTConfigProvider.h"
23     #include "PhysicsTools/SelectorUtils/interface/PFJetIDSelectionFunctor.h"
24    
25     class TTree;
26    
27     namespace reco
28     {
29     class Vertex;
30     }
31    
32     namespace s8
33     {
34     class TreeInfo;
35     class TriggerCenter;
36     }
37    
38     class S8TreeMaker : public edm::EDAnalyzer
39     {
40     /*
41     * Produce S8 ROOT Tree
42     */
43     public:
44     S8TreeMaker(const edm::ParameterSet &);
45     virtual ~S8TreeMaker();
46    
47     private:
48     virtual void beginJob();
49     virtual void beginRun(const edm::Run &, const edm::EventSetup &);
50     virtual void analyze(const edm::Event &, const edm::EventSetup &);
51     virtual void endJob();
52    
53     void processEventID(const edm::Event &);
54     void processGenEvent(const edm::Event &);
55     void processElectrons(const edm::Event &);
56     void processJets(const edm::Event &);
57     void processMuons(const edm::Event &);
58     void processPrimaryVertices(const edm::Event &);
59     void processTriggers(const edm::Event &, const edm::EventSetup &);
60    
61     bool isGoodPrimaryVertex(const reco::Vertex &, const bool & = false);
62    
63     std::auto_ptr<s8::EventID> _eventID;
64     std::auto_ptr<s8::GenEvent> _genEvent;
65     std::auto_ptr<s8::Jets> _s8Jets;
66     std::auto_ptr<s8::Leptons> _s8Electrons;
67     std::auto_ptr<s8::Leptons> _s8Muons;
68     std::auto_ptr<s8::PrimaryVertices> _s8PrimaryVertices;
69     std::auto_ptr<s8::Triggers> _s8Triggers;
70    
71     std::auto_ptr<s8::TreeInfo> _treeInfo;
72     std::auto_ptr<s8::TriggerCenter> _triggerCenter;
73    
74     TTree *_tree;
75     PFJetIDSelectionFunctor _jetSelector;
76     HLTConfigProvider _hltConfigProvider;
77    
78     struct HLT
79     {
80     s8::tools::Hash hash;
81     int id;
82     int version;
83     };
84    
85     typedef std::map<std::string, HLT> HLTs;
86    
87     HLTs _hlts;
88    
89     std::string _primaryVertices;
90     std::string _jets;
91     std::string _muons;
92     std::string _electrons;
93     std::string _triggers;
94     bool _isPythia;
95     bool _didInitializeHltConfigProvider;
96     bool _saveTriggers;
97     };
98    
99     #endif