1 |
lucieg |
1.1 |
#ifndef myTemplateAnalyzer_H
|
2 |
|
|
#define myTemplateAnalyzer_H
|
3 |
|
|
|
4 |
|
|
// -*- C++ -*-
|
5 |
|
|
//
|
6 |
|
|
//
|
7 |
|
|
// Original Author: Artur Kalinowski
|
8 |
|
|
// Created: Wed Jul 22 14:16:44 CEST 2009
|
9 |
|
|
// $Id: myTemplateAnalyzer.h,v 1.4 2010/04/21 15:28:23 cbern Exp $
|
10 |
|
|
//
|
11 |
|
|
//
|
12 |
|
|
|
13 |
|
|
#include "PFAnalyses/CommonTools/interface/FWLiteAnalyzer.h"
|
14 |
|
|
#include "PFAnalyses/CommonTools/interface/CandidateSelector.h"
|
15 |
|
|
#include "PFAnalyses/CommonTools/interface/PatJetSelector.h"
|
16 |
|
|
#include "PFAnalyses/CommonTools/interface/PatLeptonSelector.h"
|
17 |
|
|
#include "PFAnalyses/CommonTools/interface/PatElectronSelector.h"
|
18 |
|
|
|
19 |
|
|
#include "DataFormats/PatCandidates/interface/Jet.h"
|
20 |
|
|
#include "DataFormats/PatCandidates/interface/MET.h"
|
21 |
|
|
#include "DataFormats/PatCandidates/interface/Muon.h"
|
22 |
|
|
|
23 |
|
|
#include "DataFormats/Common/interface/Handle.h"
|
24 |
|
|
#include "FWCore/Utilities/interface/InputTag.h"
|
25 |
|
|
|
26 |
|
|
class myTemplateHistograms;
|
27 |
|
|
|
28 |
|
|
class myTemplateAnalyzer:public FWLiteAnalyzer{
|
29 |
|
|
|
30 |
|
|
public:
|
31 |
|
|
|
32 |
|
|
///Default contructor
|
33 |
|
|
myTemplateAnalyzer(const std::string & aName);
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
///Default destructor
|
37 |
|
|
virtual ~myTemplateAnalyzer();
|
38 |
|
|
|
39 |
|
|
///Method to initialise the object.
|
40 |
|
|
///It is called by the top level FWLiteTreeAnalyzer
|
41 |
|
|
///class.
|
42 |
|
|
virtual void initialize(const edm::ParameterSet&,
|
43 |
|
|
TFileDirectory&,
|
44 |
|
|
std::strbitset *aSelections);
|
45 |
|
|
|
46 |
|
|
///Method where the analysis is done.
|
47 |
|
|
virtual bool analyze(const edm::EventBase& iEvent);
|
48 |
|
|
|
49 |
|
|
///Method which defined the branches to be added
|
50 |
|
|
///to the analysis TTree
|
51 |
|
|
virtual void addBranch(TTree *tree);
|
52 |
|
|
|
53 |
|
|
///Here we define histogram to be filled after each cut.
|
54 |
|
|
///Notice: only 1D here.
|
55 |
|
|
///Notice: name of the histogram the same as the name of the TBranch registered
|
56 |
|
|
/// in the relevant Analyzer, EXCEPT "h" at the beggining
|
57 |
|
|
///Notice: PF suffix in the name is necessary
|
58 |
|
|
virtual void addCutHistos(TList *aList);
|
59 |
|
|
|
60 |
|
|
private:
|
61 |
|
|
|
62 |
|
|
///Method for registering the selections for this analyzer
|
63 |
|
|
void registerCuts();
|
64 |
|
|
|
65 |
|
|
///Method reseting the values of class data members
|
66 |
|
|
void clear();
|
67 |
|
|
|
68 |
|
|
/// W specific histograms
|
69 |
|
|
myTemplateHistograms *myTemplateHistos_;
|
70 |
|
|
|
71 |
|
|
///Name of the analyzed data sample, e.g. "ttbar"
|
72 |
|
|
///This name will be part of the output ROOT file
|
73 |
|
|
std::string sampleName_;
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
bool verbose_;
|
77 |
|
|
|
78 |
|
|
//selectors
|
79 |
|
|
|
80 |
|
|
///InputTags for physics objects
|
81 |
|
|
edm::InputTag jetLabel_;
|
82 |
|
|
double ht_;
|
83 |
|
|
/* tree branches */
|
84 |
|
|
|
85 |
|
|
};
|
86 |
|
|
|
87 |
|
|
#endif
|