CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
L1TauAnalyzer Class Reference

#include <UserCode/L1TauAnalyzer/src/L1TauAnalyzer.cc>

Inheritance diagram for L1TauAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1TauAnalyzer (const edm::ParameterSet &)
 
 ~L1TauAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
virtual void beginJob ()
 
void calcL1MCPFTauMatching ()
 
void calcL1MCTauMatching ()
 
void convertToIntegratedEff (TH1 *, double)
 
virtual void endJob ()
 
void evalL1Decisions (const edm::Event &iEvent)
 
void evalL1extraDecisions ()
 
void fillGenHistograms ()
 
void fillL1Histograms ()
 
void fillPFTauHistograms ()
 
void getGenObjects (const edm::Event &, const edm::EventSetup &)
 
void getL1extraObjects (const edm::Event &, const edm::EventSetup &)
 
void getPFTauObjects (const edm::Event &, const edm::EventSetup &)
 
void printTrigReport ()
 

Private Attributes

int _BosonPID
 
bool _DoMCMatching
 
bool _DoPFTauMatching
 
double _DoubleTauThreshold
 
edm::EDGetTokenT
< edm::HepMCProduct
_GenParticleSource
 
std::vector< TLorentzVector > _GenTauElecs
 
std::vector< TLorentzVector > _GenTauHads
 
std::vector< TLorentzVector > _GenTauMuons
 
std::vector< double > _IsoEgTauThresholds
 
std::vector< TLorentzVector > _L1CenJets
 
std::string _L1DoubleTauName
 
edm::EDGetTokenT
< l1extra::L1JetParticleCollection
_L1extraCenJetSource
 
edm::EDGetTokenT
< l1extra::L1JetParticleCollection
_L1extraForJetSource
 
edm::EDGetTokenT
< l1extra::L1EmParticleCollection
_L1extraIsoEgammaSource
 
edm::EDGetTokenT
< l1extra::L1EtMissParticleCollection
_L1extraMETSource
 
edm::EDGetTokenT
< l1extra::L1MuonParticleCollection
_L1extraMuonSource
 
edm::EDGetTokenT
< l1extra::L1EmParticleCollection
_L1extraNonIsoEgammaSource
 
edm::EDGetTokenT
< l1extra::L1JetParticleCollection
_L1extraTauJetSource
 
std::vector< TLorentzVector > _L1ForJets
 
edm::EDGetTokenT
< L1GlobalTriggerObjectMapRecord
_L1GtObjectMap
 
edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
_L1GtReadoutRecord
 
std::vector< TLorentzVector > _L1IsoEgammas
 
std::string _L1IsoEgTauName
 
double _L1MCTauMinDeltaR
 
std::vector< TLorentzVector > _L1METs
 
std::vector< TLorentzVector > _L1Muons
 
std::string _L1MuonTauName
 
std::vector< int > _L1MuQuals
 
std::vector< TLorentzVector > _L1NonIsoEgammas
 
std::string _L1SingleTauName
 
std::string _L1TauMETName
 
std::vector< TLorentzVector > _L1Taus
 
double _MCTauHadMaxAbsEta
 
double _MCTauHadMinEt
 
std::vector< double > _MuTauThresholds
 
int _nEvents
 
int _nEventsDoubleGenTauHads
 
int _nEventsGenTauElecTauHad
 
int _nEventsGenTauHad
 
int _nEventsGenTauMuonTauHad
 
int _nEventsL1DoubleTauPassed
 
int _nEventsL1DoubleTauPassedMCMatched
 
int _nEventsL1DoubleTauPassedPFMCMatched
 
int _nEventsL1GTDoubleTauPassed
 
int _nEventsL1GTIsoEgTauPassed
 
int _nEventsL1GTMuonTauPassed
 
int _nEventsL1GTSingleTauMETPassed
 
int _nEventsL1GTSingleTauPassed
 
int _nEventsL1IsoEgTauPassed
 
int _nEventsL1IsoEgTauPassedMCMatched
 
int _nEventsL1IsoEgTauPassedPFMCMatched
 
int _nEventsL1MuonTauPassed
 
int _nEventsL1MuonTauPassedMCMatched
 
int _nEventsL1MuonTauPassedPFMCMatched
 
int _nEventsL1SingleTauMETPassed
 
int _nEventsL1SingleTauMETPassedMCMatched
 
int _nEventsL1SingleTauMETPassedPFMCMatched
 
int _nEventsL1SingleTauPassed
 
int _nEventsL1SingleTauPassedMCMatched
 
int _nEventsL1SingleTauPassedPFMCMatched
 
int _nEventsPFMatchDoubleGenTauHads
 
int _nEventsPFMatchGenTauElecTauHad
 
int _nEventsPFMatchGenTauHad
 
int _nEventsPFMatchGenTauMuonTauHad
 
int _nfidEventsDoubleGenTauHads
 
int _nfidEventsGenTauElecTauHad
 
int _nfidEventsGenTauHad
 
int _nfidEventsGenTauMuonTauHad
 
double _PFMCTauMinDeltaR
 
edm::EDGetTokenT
< reco::PFTauDiscriminatorByIsolation
_PFTauDiscriminatorSource
 
double _PFTauMaxAbsEta
 
double _PFTauMinEt
 
std::vector< TLorentzVector > _PFTaus
 
edm::EDGetTokenT
< reco::PFTauCollection
_PFTauSource
 
std::vector< double > _SingleTauMETThresholds
 
double _SingleTauThreshold
 
TH1 * h_EffMCPFTauEt
 
TH1 * h_EffMCPFTauEta
 
TH1 * h_EffMCPFTauPhi
 
TH1 * h_EffMCTauEt
 
TH1 * h_EffMCTauEta
 
TH1 * h_EffMCTauPhi
 
TH1 * h_GenTauHadEt
 
TH1 * h_GenTauHadEta
 
TH1 * h_GenTauHadPhi
 
TH1 * h_L1DoubleTauEffEt
 
TH1 * h_L1DoubleTauEffMCMatchEt
 
TH1 * h_L1DoubleTauEffPFMCMatchEt
 
TH1 * h_L1MCMatchedTauEt
 
TH1 * h_L1MCMatchedTauEta
 
TH1 * h_L1MCMatchedTauPhi
 
TH1 * h_L1MCPFMatchedTauEt
 
TH1 * h_L1MCPFMatchedTauEta
 
TH1 * h_L1MCPFMatchedTauPhi
 
TH1 * h_L1MCTauDeltaR
 
TH1 * h_L1minusMCoverMCTauEt
 
TH1 * h_L1minusMCTauEt
 
TH1 * h_L1SingleTauEffEt
 
TH1 * h_L1SingleTauEffMCMatchEt
 
TH1 * h_L1SingleTauEffPFMCMatchEt
 
TH1 * h_L1Tau1Et
 
TH1 * h_L1Tau1Eta
 
TH1 * h_L1Tau1Phi
 
TH1 * h_L1Tau2Et
 
TH1 * h_L1Tau2Eta
 
TH1 * h_L1Tau2Phi
 
TH1 * h_L1TauEt
 
TH1 * h_L1TauEta
 
TH1 * h_L1TauPhi
 
TH1 * h_MCPFTauHadEt
 
TH1 * h_MCPFTauHadEta
 
TH1 * h_MCPFTauHadPhi
 
TH1 * h_MCTauHadEt
 
TH1 * h_MCTauHadEta
 
TH1 * h_MCTauHadPhi
 
TH1 * h_PFMCTauDeltaR
 
TH1 * h_PFTauEt
 
TH1 * h_PFTauEta
 
TH1 * h_PFTauPhi
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 68 of file L1TauAnalyzer.h.

Constructor & Destructor Documentation

L1TauAnalyzer::L1TauAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 25 of file L1TauAnalyzer.cc.

References _BosonPID, _DoMCMatching, _DoPFTauMatching, _DoubleTauThreshold, _GenParticleSource, _IsoEgTauThresholds, _L1DoubleTauName, _L1extraCenJetSource, _L1extraForJetSource, _L1extraIsoEgammaSource, _L1extraMETSource, _L1extraMuonSource, _L1extraNonIsoEgammaSource, _L1extraTauJetSource, _L1GtObjectMap, _L1GtReadoutRecord, _L1IsoEgTauName, _L1MCTauMinDeltaR, _L1MuonTauName, _L1SingleTauName, _L1TauMETName, _MCTauHadMaxAbsEta, _MCTauHadMinEt, _MuTauThresholds, _PFMCTauMinDeltaR, _PFTauDiscriminatorSource, _PFTauMaxAbsEta, _PFTauMinEt, _PFTauSource, _SingleTauMETThresholds, _SingleTauThreshold, edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

27 {
28  _GenParticleSource = consumes<edm::HepMCProduct>(iConfig.getParameter<edm::InputTag>("GenParticleSource"));
29  _PFTauSource = consumes<reco::PFTauCollection>(iConfig.getParameter<edm::InputTag>("PFTauSource"));
30  _PFTauDiscriminatorSource = consumes<reco::PFTauDiscriminatorByIsolation>(iConfig.getParameter<edm::InputTag>("PFTauDiscriminatorSource"));
31 
32  _L1extraTauJetSource = consumes<l1extra::L1JetParticleCollection>(iConfig.getParameter<edm::InputTag>("L1extraTauJetSource"));
33  _L1extraCenJetSource = consumes<l1extra::L1JetParticleCollection>(iConfig.getParameter<edm::InputTag>("L1extraCenJetSource"));
34  _L1extraForJetSource = consumes<l1extra::L1JetParticleCollection>(iConfig.getParameter<edm::InputTag>("L1extraForJetSource"));
35  _L1extraMuonSource = consumes<l1extra::L1MuonParticleCollection>(iConfig.getParameter<edm::InputTag>("L1extraMuonSource"));
36  _L1extraMETSource = consumes<l1extra::L1EtMissParticleCollection>(iConfig.getParameter<edm::InputTag>("L1extraMETSource"));
37  _L1extraNonIsoEgammaSource = consumes<l1extra::L1EmParticleCollection>(iConfig.getParameter<edm::InputTag>("L1extraNonIsoEgammaSource"));
38  _L1extraIsoEgammaSource = consumes<l1extra::L1EmParticleCollection>(iConfig.getParameter<edm::InputTag>("L1extraIsoEgammaSource"));
39 
40  _DoMCMatching = iConfig.getParameter<bool>("DoMCMatching");
41  _DoPFTauMatching = iConfig.getParameter<bool>("DoPFTauMatching");
42 
43  _L1MCTauMinDeltaR = iConfig.getParameter<double>("L1MCTauMinDeltaR");
44  _MCTauHadMinEt = iConfig.getParameter<double>("MCTauHadMinEt");
45  _MCTauHadMaxAbsEta = iConfig.getParameter<double>("MCTauHadMaxAbsEta");
46 
47  _PFMCTauMinDeltaR = iConfig.getParameter<double>("PFMCTauMinDeltaR");
48  _PFTauMinEt = iConfig.getParameter<double>("PFTauMinEt");
49  _PFTauMaxAbsEta = iConfig.getParameter<double>("PFTauMaxAbsEta");
50 
51  _SingleTauThreshold = iConfig.getParameter<double>("SingleTauThreshold");
52  _DoubleTauThreshold = iConfig.getParameter<double>("DoubleTauThreshold");
53  _SingleTauMETThresholds = iConfig.getParameter< std::vector<double> >("SingleTauMETThresholds");
54  _MuTauThresholds = iConfig.getParameter< std::vector<double> >("MuTauThresholds");
55  _IsoEgTauThresholds = iConfig.getParameter< std::vector<double> >("IsoEgTauThresholds");
56 
57  _L1GtReadoutRecord = consumes<L1GlobalTriggerReadoutRecord>(iConfig.getParameter<edm::InputTag>("L1GtReadoutRecord"));
58  _L1GtObjectMap = consumes<L1GlobalTriggerObjectMapRecord>(iConfig.getParameter<edm::InputTag>("L1GtObjectMap"));
59 
60  _L1SingleTauName = iConfig.getParameter<std::string>("L1SingleTauName");
61  _L1DoubleTauName = iConfig.getParameter<std::string>("L1DoubleTauName");
62  _L1TauMETName = iConfig.getParameter<std::string>("L1TauMETName");
63  _L1MuonTauName = iConfig.getParameter<std::string>("L1MuonTauName");
64  _L1IsoEgTauName = iConfig.getParameter<std::string>("L1IsoEGTauName");
65 
66  _BosonPID = iConfig.getParameter<int>("BosonPID");
67 }
double _PFMCTauMinDeltaR
T getParameter(std::string const &) const
double _L1MCTauMinDeltaR
edm::EDGetTokenT< l1extra::L1EmParticleCollection > _L1extraNonIsoEgammaSource
double _SingleTauThreshold
std::vector< double > _MuTauThresholds
std::string _L1SingleTauName
edm::EDGetTokenT< reco::PFTauCollection > _PFTauSource
Definition: L1TauAnalyzer.h:99
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1extraCenJetSource
double _PFTauMinEt
edm::EDGetTokenT< l1extra::L1EmParticleCollection > _L1extraIsoEgammaSource
double _MCTauHadMaxAbsEta
double _PFTauMaxAbsEta
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > _L1GtReadoutRecord
std::vector< double > _IsoEgTauThresholds
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1extraForJetSource
std::string _L1TauMETName
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > _L1GtObjectMap
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > _L1extraMuonSource
std::string _L1MuonTauName
std::string _L1IsoEgTauName
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1extraTauJetSource
edm::EDGetTokenT< edm::HepMCProduct > _GenParticleSource
double _MCTauHadMinEt
double _DoubleTauThreshold
std::string _L1DoubleTauName
std::vector< double > _SingleTauMETThresholds
edm::EDGetTokenT< reco::PFTauDiscriminatorByIsolation > _PFTauDiscriminatorSource
edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > _L1extraMETSource
L1TauAnalyzer::~L1TauAnalyzer ( )

Definition at line 70 of file L1TauAnalyzer.cc.

71 {
72 
73  // do anything here that needs to be done at desctruction time
74  // (e.g. close files, deallocate resources etc.)
75 
76 }

Member Function Documentation

void L1TauAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

Implements edm::EDAnalyzer.

Definition at line 85 of file L1TauAnalyzer.cc.

References _DoMCMatching, _DoPFTauMatching, _nEvents, calcL1MCPFTauMatching(), calcL1MCTauMatching(), evalL1Decisions(), evalL1extraDecisions(), fillGenHistograms(), fillL1Histograms(), fillPFTauHistograms(), getGenObjects(), getL1extraObjects(), and getPFTauObjects().

86 {
87  using namespace edm;
88 
89  _nEvents++;
90 
91  // get object
92  getL1extraObjects(iEvent,iSetup);
93  if (_DoMCMatching)
94  getGenObjects(iEvent,iSetup);
95  if (_DoPFTauMatching)
96  getPFTauObjects(iEvent,iSetup);
97 
98  evalL1Decisions(iEvent);
100 
101  // fill simple histograms
103  if (_DoMCMatching)
105  if (_DoPFTauMatching)
107 
108  if (_DoMCMatching)
112 
113 }
void evalL1Decisions(const edm::Event &iEvent)
void calcL1MCPFTauMatching()
void getL1extraObjects(const edm::Event &, const edm::EventSetup &)
void fillL1Histograms()
void fillPFTauHistograms()
void getPFTauObjects(const edm::Event &, const edm::EventSetup &)
void getGenObjects(const edm::Event &, const edm::EventSetup &)
void fillGenHistograms()
void calcL1MCTauMatching()
void evalL1extraDecisions()
void L1TauAnalyzer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 118 of file L1TauAnalyzer.cc.

References _nEvents, _nEventsDoubleGenTauHads, _nEventsGenTauElecTauHad, _nEventsGenTauHad, _nEventsGenTauMuonTauHad, _nEventsL1DoubleTauPassed, _nEventsL1DoubleTauPassedMCMatched, _nEventsL1DoubleTauPassedPFMCMatched, _nEventsL1GTDoubleTauPassed, _nEventsL1GTIsoEgTauPassed, _nEventsL1GTMuonTauPassed, _nEventsL1GTSingleTauMETPassed, _nEventsL1GTSingleTauPassed, _nEventsL1IsoEgTauPassed, _nEventsL1IsoEgTauPassedMCMatched, _nEventsL1IsoEgTauPassedPFMCMatched, _nEventsL1MuonTauPassed, _nEventsL1MuonTauPassedMCMatched, _nEventsL1MuonTauPassedPFMCMatched, _nEventsL1SingleTauMETPassed, _nEventsL1SingleTauMETPassedMCMatched, _nEventsL1SingleTauMETPassedPFMCMatched, _nEventsL1SingleTauPassed, _nEventsL1SingleTauPassedMCMatched, _nEventsL1SingleTauPassedPFMCMatched, _nEventsPFMatchDoubleGenTauHads, _nEventsPFMatchGenTauElecTauHad, _nEventsPFMatchGenTauHad, _nEventsPFMatchGenTauMuonTauHad, _nfidEventsDoubleGenTauHads, _nfidEventsGenTauElecTauHad, _nfidEventsGenTauHad, _nfidEventsGenTauMuonTauHad, dir, h_EffMCPFTauEt, h_EffMCPFTauEta, h_EffMCPFTauPhi, h_EffMCTauEt, h_EffMCTauEta, h_EffMCTauPhi, h_GenTauHadEt, h_GenTauHadEta, h_GenTauHadPhi, h_L1DoubleTauEffEt, h_L1DoubleTauEffMCMatchEt, h_L1DoubleTauEffPFMCMatchEt, h_L1MCMatchedTauEt, h_L1MCMatchedTauEta, h_L1MCMatchedTauPhi, h_L1MCPFMatchedTauEt, h_L1MCPFMatchedTauEta, h_L1MCPFMatchedTauPhi, h_L1MCTauDeltaR, h_L1minusMCoverMCTauEt, h_L1minusMCTauEt, h_L1SingleTauEffEt, h_L1SingleTauEffMCMatchEt, h_L1SingleTauEffPFMCMatchEt, h_L1Tau1Et, h_L1Tau1Eta, h_L1Tau1Phi, h_L1Tau2Et, h_L1Tau2Eta, h_L1Tau2Phi, h_L1TauEt, h_L1TauEta, h_L1TauPhi, h_MCPFTauHadEt, h_MCPFTauHadEta, h_MCPFTauHadPhi, h_MCTauHadEt, h_MCTauHadEta, h_MCTauHadPhi, h_PFMCTauDeltaR, h_PFTauEt, h_PFTauEta, h_PFTauPhi, TFileDirectory::make(), and TFileService::mkdir().

119 {
121  TFileDirectory dir = fs->mkdir("histos");
122 
123  //
124  h_L1TauEt = dir.make<TH1F>("L1TauEt","L1TauEt",50,0.,100.);
125  h_L1TauEt->Sumw2();
126  h_L1TauEta = dir.make<TH1F>("L1TauEta","L1TauEt",60,-4.,4.);
127  h_L1TauEta->Sumw2();
128  h_L1TauPhi = dir.make<TH1F>("L1TauPhi","L1TauPhi",50,-3.2,3.2);
129  h_L1TauPhi->Sumw2();
130 
131  h_L1Tau1Et = dir.make<TH1F>("L1Tau1Et","L1Tau1Et",50,0.,100.);
132  h_L1Tau1Et->Sumw2();
133  h_L1Tau1Eta = dir.make<TH1F>("L1Tau1Eta","L1Tau1Et",60,-4.,4.);
134  h_L1Tau1Eta->Sumw2();
135  h_L1Tau1Phi = dir.make<TH1F>("L1Tau1Phi","L1Tau1Phi",50,-3.2,3.2);
136  h_L1Tau1Phi->Sumw2();
137 
138  h_L1Tau2Et = dir.make<TH1F>("L1Tau2Et","L1Tau2Et",50,0.,100.);
139  h_L1Tau2Et->Sumw2();
140  h_L1Tau2Eta = dir.make<TH1F>("L1Tau2Eta","L1Tau2Et",60,-4.,4.);
141  h_L1Tau2Eta->Sumw2();
142  h_L1Tau2Phi = dir.make<TH1F>("L1Tau2Phi","L1Tau2Phi",50,-3.2,3.2);
143  h_L1Tau2Phi->Sumw2();
144 
145  //
146  h_GenTauHadEt = dir.make<TH1F>("GenTauHadEt","GenTauHadEt",50,0.,100.);
147  h_GenTauHadEt->Sumw2();
148  h_GenTauHadEta = dir.make<TH1F>("GenTauHadEta","GenTauHadEt",60,-4.,4.);
149  h_GenTauHadEta->Sumw2();
150  h_GenTauHadPhi = dir.make<TH1F>("GenTauHadPhi","GenTauHadPhi",50,-3.2,3.2);
151  h_GenTauHadPhi->Sumw2();
152 
153  //
154  h_PFTauEt = dir.make<TH1F>("PFTauEt","PFTauEt",50,0.,100.);
155  h_PFTauEt->Sumw2();
156  h_PFTauEta = dir.make<TH1F>("PFTauEta","PFTauEt",60,-4.,4.);
157  h_PFTauEta->Sumw2();
158  h_PFTauPhi = dir.make<TH1F>("PFTauPhi","PFTauPhi",50,-3.2,3.2);
159  h_PFTauPhi->Sumw2();
160 
161  // L1 response
162  h_L1MCTauDeltaR = dir.make<TH1F>("L1MCTauDeltaR","L1MCTauDeltaR",60,0.,6.);
163  h_L1MCTauDeltaR->Sumw2();
164  h_L1minusMCTauEt = dir.make<TH1F>("L1minusMCTauEt","L1minusMCTauEt",50,-50.,50.);
165  h_L1minusMCTauEt->Sumw2();
166  h_L1minusMCoverMCTauEt = dir.make<TH1F>("L1minusMCoverMCTauEt","L1minusMCoverMCTauEt",40,-1.2,1.2);
167  h_L1minusMCoverMCTauEt->Sumw2();
168 
169  // MC matching efficiencies
170  h_MCTauHadEt = dir.make<TH1F>("MCTauHadEt","MCTauHadEt",50,0.,100.);
171  h_MCTauHadEt->Sumw2();
172  h_MCTauHadEta = dir.make<TH1F>("MCTauHadEta","MCTauHadEt",60,-4.,4.);
173  h_MCTauHadEta->Sumw2();
174  h_MCTauHadPhi = dir.make<TH1F>("MCTauHadPhi","MCTauHadPhi",50,-3.2,3.2);
175  h_MCTauHadPhi->Sumw2();
176 
177  h_L1MCMatchedTauEt = dir.make<TH1F>("L1MCMatchedTauEt","L1MCMatchedTauEt",50,0.,100.);
178  h_L1MCMatchedTauEt->Sumw2();
179  h_L1MCMatchedTauEta = dir.make<TH1F>("L1MCMatchedTauEta","L1MCMatchedTauEt",60,-4.,4.);
180  h_L1MCMatchedTauEta->Sumw2();
181  h_L1MCMatchedTauPhi = dir.make<TH1F>("L1MCMatchedTauPhi","L1MCMatchedTauPhi",50,-3.2,3.2);
182  h_L1MCMatchedTauPhi->Sumw2();
183 
184  h_EffMCTauEt = dir.make<TH1F>("EffMCTauEt","EffMCTauEt",50,0.,100.);
185  h_EffMCTauEt->Sumw2();
186  h_EffMCTauEta = dir.make<TH1F>("EffMCTauEta","EffMCTauEt",60,-4.,4.);
187  h_EffMCTauEta->Sumw2();
188  h_EffMCTauPhi = dir.make<TH1F>("EffMCTauPhi","EffMCTauPhi",50,-3.2,3.2);
189  h_EffMCTauPhi->Sumw2();
190 
191  // PFTau-MC matching efficiencies
192  h_MCPFTauHadEt = dir.make<TH1F>("MCPFTauHadEt","MCPFTauHadEt",50,0.,100.);
193  h_MCPFTauHadEt->Sumw2();
194  h_MCPFTauHadEta = dir.make<TH1F>("MCPFTauHadEta","MCPFTauHadEt",60,-4.,4.);
195  h_MCPFTauHadEta->Sumw2();
196  h_MCPFTauHadPhi = dir.make<TH1F>("MCPFTauHadPhi","MCPFTauHadPhi",50,-3.2,3.2);
197  h_MCPFTauHadPhi->Sumw2();
198 
199  h_L1MCPFMatchedTauEt = dir.make<TH1F>("L1MCPFMatchedTauEt","L1MCPFMatchedTauEt",50,0.,100.);
200  h_L1MCPFMatchedTauEt->Sumw2();
201  h_L1MCPFMatchedTauEta = dir.make<TH1F>("L1MCPFMatchedTauEta","L1MCPFMatchedTauEt",60,-4.,4.);
202  h_L1MCPFMatchedTauEta->Sumw2();
203  h_L1MCPFMatchedTauPhi = dir.make<TH1F>("L1MCPFMatchedTauPhi","L1MCPFMatchedTauPhi",50,-3.2,3.2);
204  h_L1MCPFMatchedTauPhi->Sumw2();
205 
206  h_EffMCPFTauEt = dir.make<TH1F>("EffMCPFTauEt","EffMCPFTauEt",50,0.,100.);
207  h_EffMCPFTauEt->Sumw2();
208  h_EffMCPFTauEta = dir.make<TH1F>("EffMCPFTauEta","EffMCPFTauEt",60,-4.,4.);
209  h_EffMCPFTauEta->Sumw2();
210  h_EffMCPFTauPhi = dir.make<TH1F>("EffMCPFTauPhi","EffMCPFTauPhi",50,-3.2,3.2);
211  h_EffMCPFTauPhi->Sumw2();
212 
213  h_PFMCTauDeltaR = dir.make<TH1F>("PFMCTauDeltaR","PFMCTauDeltaR",60,0.,6.);
214  h_PFMCTauDeltaR->Sumw2();
215 
216 
217  h_L1SingleTauEffEt = dir.make<TH1F>("L1SingleTauEffEt","L1SingleTauEffEt",
218  50,0.,100.);
219  h_L1SingleTauEffEt->Sumw2();
220  h_L1DoubleTauEffEt = dir.make<TH1F>("L1DoubleTauEffEt","L1DoubleTauEffEt",
221  40,0.,80.);
222  h_L1DoubleTauEffEt->Sumw2();
223  h_L1SingleTauEffMCMatchEt = dir.make<TH1F>("L1SingleTauEffMCMatchEt","L1SingleTauEffMCMatchEt",
224  50,0.,100.);
225  h_L1SingleTauEffMCMatchEt->Sumw2();
226  h_L1DoubleTauEffMCMatchEt = dir.make<TH1F>("L1DoubleTauEffMCMatchEt","L1DoubleTauEffMCMatchEt",
227  40,0.,80.);
228  h_L1DoubleTauEffMCMatchEt->Sumw2();
229  h_L1SingleTauEffPFMCMatchEt = dir.make<TH1F>("L1SingleTauEffPFMCMatchEt","L1SingleTauEffPFMCMatchEt",
230  50,0.,100.);
232  h_L1DoubleTauEffPFMCMatchEt = dir.make<TH1F>("L1DoubleTauEffPFMCMatchEt","L1DoubleTauEffPFMCMatchEt",
233  40,0.,80.);
235 
236  // Init counters for event based efficiencies
237  _nEvents = 0; // all events processed
238 
239  _nEventsGenTauHad = 0;
243 
248 
253 
257 
261 
265 
269 
273 
274  // from GT bit info
280 
281 }
TH1 * h_MCPFTauHadEta
TH1 * h_L1MCMatchedTauEta
TH1 * h_L1DoubleTauEffPFMCMatchEt
int _nfidEventsDoubleGenTauHads
int _nEventsL1GTIsoEgTauPassed
TH1 * h_EffMCPFTauEt
int _nEventsPFMatchGenTauElecTauHad
int _nEventsL1IsoEgTauPassedMCMatched
TH1 * h_L1SingleTauEffEt
TH1 * h_L1MCPFMatchedTauEt
int _nEventsL1GTDoubleTauPassed
TH1 * h_L1DoubleTauEffMCMatchEt
TH1 * h_MCPFTauHadEt
TH1 * h_PFMCTauDeltaR
TH1 * h_L1MCPFMatchedTauPhi
int _nEventsL1SingleTauPassedPFMCMatched
int _nEventsPFMatchGenTauHad
int _nfidEventsGenTauHad
TH1 * h_L1MCPFMatchedTauEta
int _nEventsGenTauMuonTauHad
TH1 * h_L1MCMatchedTauPhi
int _nEventsL1SingleTauPassed
TH1 * h_MCPFTauHadPhi
int _nEventsL1GTSingleTauPassed
int _nEventsL1GTSingleTauMETPassed
TH1 * h_L1DoubleTauEffEt
TH1 * h_L1minusMCoverMCTauEt
int _nEventsL1IsoEgTauPassedPFMCMatched
int _nEventsL1SingleTauMETPassedPFMCMatched
int _nEventsL1IsoEgTauPassed
int _nEventsGenTauElecTauHad
TH1 * h_L1MCMatchedTauEt
TH1 * h_L1SingleTauEffPFMCMatchEt
int _nfidEventsGenTauElecTauHad
int _nEventsL1DoubleTauPassedMCMatched
int _nEventsL1DoubleTauPassed
T * make(const Args &...args) const
make new ROOT object
TH1 * h_L1minusMCTauEt
TH1 * h_EffMCPFTauPhi
int _nEventsL1MuonTauPassedPFMCMatched
int _nEventsL1SingleTauMETPassed
TH1 * h_L1MCTauDeltaR
int _nEventsPFMatchGenTauMuonTauHad
int _nEventsL1SingleTauMETPassedMCMatched
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
Definition: TFileService.h:69
int _nEventsL1DoubleTauPassedPFMCMatched
int _nEventsL1MuonTauPassedMCMatched
int _nfidEventsGenTauMuonTauHad
int _nEventsDoubleGenTauHads
TH1 * h_GenTauHadEta
int _nEventsL1MuonTauPassed
TH1 * h_GenTauHadPhi
dbl *** dir
Definition: mlp_gen.cc:35
int _nEventsPFMatchDoubleGenTauHads
int _nEventsL1SingleTauPassedMCMatched
TH1 * h_L1SingleTauEffMCMatchEt
TH1 * h_EffMCPFTauEta
int _nEventsL1GTMuonTauPassed
void L1TauAnalyzer::calcL1MCPFTauMatching ( )
private

Definition at line 771 of file L1TauAnalyzer.cc.

References _DoubleTauThreshold, _GenTauElecs, _GenTauHads, _GenTauMuons, _IsoEgTauThresholds, _L1IsoEgammas, _L1MCTauMinDeltaR, _L1METs, _L1Muons, _L1MuQuals, _L1Taus, _MCTauHadMaxAbsEta, _MCTauHadMinEt, _MuTauThresholds, _nEventsL1DoubleTauPassedPFMCMatched, _nEventsL1IsoEgTauPassedPFMCMatched, _nEventsL1MuonTauPassedPFMCMatched, _nEventsL1SingleTauMETPassedPFMCMatched, _nEventsL1SingleTauPassedPFMCMatched, _nEventsPFMatchDoubleGenTauHads, _nEventsPFMatchGenTauElecTauHad, _nEventsPFMatchGenTauHad, _nEventsPFMatchGenTauMuonTauHad, _PFMCTauMinDeltaR, _PFTauMaxAbsEta, _PFTauMinEt, _PFTaus, _SingleTauMETThresholds, _SingleTauThreshold, funct::abs(), HLTFastRecoForTau_cff::deltaEta, SiPixelRawToDigiRegional_cfi::deltaPhi, deltaR(), reco::tau::disc::Eta(), h_EffMCPFTauEt, h_EffMCPFTauEta, h_EffMCPFTauPhi, h_L1DoubleTauEffPFMCMatchEt, h_L1MCPFMatchedTauEt, h_L1MCPFMatchedTauEta, h_L1MCPFMatchedTauPhi, h_L1SingleTauEffPFMCMatchEt, h_MCPFTauHadEt, h_MCPFTauHadEta, h_MCPFTauHadPhi, h_PFMCTauDeltaR, i, j, gen::k, colinearityKinematic::Phi, and reco::tau::disc::Pt().

Referenced by analyze().

771  {
772  bool singleTauPassed = false;
773  bool doubleTauPassed = false;
774  bool muTauPassed = false;
775  bool isoEgTauPassed = false;
776  bool singleTauMETPassed = false;
777 
778  bool singleMatch = false; // for doubletau match
779  bool doubleMatch = false;
780  int iSingle = -1;
781  int iDouble = -1;
782 
783  unsigned int nPFMatchGenTauHad = 0;
784 
785  std::vector<TLorentzVector> PFMatchedGenTauHads;
786  PFMatchedGenTauHads.clear();// store PFTau matched gentaus
787  for (unsigned int j = 0; j<_GenTauHads.size();j++) {
788  for (unsigned int k = 0; k<_PFTaus.size();k++) {
789  double deltaR = ROOT::Math::VectorUtil::DeltaR(_PFTaus[k],_GenTauHads[j]);
790  h_PFMCTauDeltaR->Fill(deltaR);
791  if (_PFTaus[k].Et()>=_PFTauMinEt && _PFTaus[k].Eta()<=_PFTauMaxAbsEta) {
792  if (deltaR < _PFMCTauMinDeltaR) {
793  // Denominators for PF-MC matching efficiencies
795  h_MCPFTauHadEt->Fill(_GenTauHads[j].Et());
796  if (_GenTauHads[j].Et()>=_MCTauHadMinEt)
797  h_MCPFTauHadEta->Fill(_GenTauHads[j].Eta());
798  if (_GenTauHads[j].Et()>=_MCTauHadMinEt &&
800  h_MCPFTauHadPhi->Fill(_GenTauHads[j].Phi());
801  nPFMatchGenTauHad++; // For denominator
802  PFMatchedGenTauHads.push_back(_GenTauHads[j]);// store PFTau matched gentaus
803  }
804  break;
805  }
806  }
807  }
808  }
809  // now loop over only PFTau matched gentaus
810  for (unsigned int i = 0; i<_L1Taus.size();i++) {
811  for (unsigned int j = 0; j<PFMatchedGenTauHads.size();j++) {
812  double deltaR = ROOT::Math::VectorUtil::DeltaR(_L1Taus[i],PFMatchedGenTauHads[j]);
813  if (deltaR < _L1MCTauMinDeltaR) {
814  // For event efficiencies
815  if (singleMatch) {
816  doubleMatch = true;
817  iDouble = i;
818  }
819  singleMatch = true;
820  if (singleMatch && !doubleMatch)
821  iSingle = i;
822 
823  // Numerators for PF-MC matching efficiencies
824  h_L1MCPFMatchedTauEt->Fill(PFMatchedGenTauHads[j].Et());
825  h_EffMCPFTauEt->Fill(PFMatchedGenTauHads[j].Et());
826  h_L1MCPFMatchedTauEta->Fill(PFMatchedGenTauHads[j].Eta());
827  h_EffMCPFTauEta->Fill(PFMatchedGenTauHads[j].Eta());
828  h_L1MCPFMatchedTauPhi->Fill(PFMatchedGenTauHads[j].Phi());
829  h_EffMCPFTauPhi->Fill(PFMatchedGenTauHads[j].Phi());
830  }
831  //break;
832  }
833  }
834 
835  if (singleMatch && iSingle>=0) {
836  h_L1SingleTauEffPFMCMatchEt->Fill(_L1Taus[iSingle].Et());
837  if (_L1Taus[iSingle].Et()>=_SingleTauThreshold)
838  singleTauPassed = true;
839 
840  /*
841  // Ask for only one L1Tau to be matched with PFTau!!!
842  if (_L1Taus.size()>=2) {
843  h_L1DoubleTauEffPFMCMatchEt->Fill(_L1Taus[1].Et());
844  if (_L1Taus[1].Et()>=_DoubleTauThreshold)
845  doubleTauPassed = true;
846  }
847  */
848 
849  if (_L1Taus[iSingle].Et()>=_SingleTauMETThresholds[0] &&
850  _L1METs[0].Et()>=_SingleTauMETThresholds[1])
851  singleTauMETPassed = true;
852 
853  if (_L1Taus[iSingle].Et()>=_MuTauThresholds[1]) {
854  for (int i=0;i<(int)_L1Muons.size();i++) {
855  if (_L1Muons[i].Pt()>=_MuTauThresholds[0]) {
856  //if ( _L1MuQuals[0]==4 || _L1MuQuals[0]==5 || _L1MuQuals[0]==6 || _L1MuQuals[0]==7 ) {
857  //if ( _L1MuQuals[0]==3 || _L1MuQuals[0]==5 || _L1MuQuals[0]==6 || _L1MuQuals[0]==7 ) {
858  if ( _L1MuQuals[i]>=0) {
859  for (int j=0;j<(int)_GenTauMuons.size();j++) {
860  double deltaR = ROOT::Math::VectorUtil::DeltaR(_GenTauMuons[j],_L1Muons[i]);
861  if (deltaR<0.3) {
862  muTauPassed = true;
863  }
864  }
865  }
866  }
867  }
868  }
869  for (int j=0;j<(int)_L1IsoEgammas.size();j++) {
870  if (_L1Taus[iSingle].Et()>=_IsoEgTauThresholds[1] &&
871  _L1IsoEgammas[j].Et()>=_IsoEgTauThresholds[0]) {
872  double deltaPhi = ROOT::Math::VectorUtil::DeltaPhi(_L1Taus[iSingle],_L1IsoEgammas[j]);
873  double deltaEta = std::abs(_L1Taus[iSingle].Eta()-_L1IsoEgammas[j].Eta());
874  // Non-collinearity check
875  if (deltaPhi>0.348 && deltaEta>0.348) {
876  for (int k=0;k<(int)_GenTauElecs.size();k++) {
877  double deltaR = ROOT::Math::VectorUtil::DeltaR(_GenTauElecs[k],_L1IsoEgammas[j]);
878  if (deltaR<0.3) {
879  isoEgTauPassed = true;
880  break;
881  }
882  }
883  }
884  }
885  }
886  }
887  if (doubleMatch && iDouble>=0) {
888  h_L1DoubleTauEffPFMCMatchEt->Fill(_L1Taus[iDouble].Et());
889  if (_L1Taus[iDouble].Et()>=_DoubleTauThreshold)
890  doubleTauPassed = true;
891 
892  for (int j=0;j<(int)_L1IsoEgammas.size();j++) {
893  if (_L1Taus[iDouble].Et()>=_IsoEgTauThresholds[1] &&
894  _L1IsoEgammas[j].Et()>=_IsoEgTauThresholds[0]) {
895  double deltaPhi = ROOT::Math::VectorUtil::DeltaPhi(_L1Taus[iDouble],_L1IsoEgammas[j]);
896  double deltaEta = std::abs(_L1Taus[iDouble].Eta()-_L1IsoEgammas[j].Eta());
897  // Non-collinearity check
898  if (deltaPhi>0.348 && deltaEta>0.348) {
899  for (int k=0;k<(int)_GenTauElecs.size();k++) {
900  double deltaR = ROOT::Math::VectorUtil::DeltaR(_GenTauElecs[k],_L1IsoEgammas[j]);
901  if (deltaR<0.3) {
902  isoEgTauPassed = true;
903  break;
904  }
905  }
906  }
907  }
908  }
909  }
910 
911  unsigned int nfidMCGenTauMuon = 0;
912  unsigned int nfidMCGenTauElec = 0;
913  for (int i = 0; i<(int)_GenTauMuons.size();i++) {
915  nfidMCGenTauMuon++;
916  }
917  }
918  for (int i = 0; i<(int)_GenTauElecs.size();i++) {
920  nfidMCGenTauElec++;
921  }
922  }
923 
924  if (nPFMatchGenTauHad>=1) _nEventsPFMatchGenTauHad++;
925  if (nPFMatchGenTauHad>=2) _nEventsPFMatchDoubleGenTauHads++;
926 
927  if (nPFMatchGenTauHad>=1 && nfidMCGenTauMuon>=1) _nEventsPFMatchGenTauMuonTauHad++;
928  if (nPFMatchGenTauHad>=1 && nfidMCGenTauElec>=1) _nEventsPFMatchGenTauElecTauHad++;
929 
930  if (singleTauPassed) _nEventsL1SingleTauPassedPFMCMatched++;
931  if (doubleTauPassed) _nEventsL1DoubleTauPassedPFMCMatched++;
932  if (singleTauMETPassed) _nEventsL1SingleTauMETPassedPFMCMatched++;
933  if (muTauPassed) _nEventsL1MuonTauPassedPFMCMatched++;
934  if (isoEgTauPassed) _nEventsL1IsoEgTauPassedPFMCMatched++;
935 
936 }
double _PFMCTauMinDeltaR
TH1 * h_MCPFTauHadEta
TH1 * h_L1DoubleTauEffPFMCMatchEt
int i
Definition: DBlmapReader.cc:9
double _L1MCTauMinDeltaR
TH1 * h_EffMCPFTauEt
int _nEventsPFMatchGenTauElecTauHad
double _SingleTauThreshold
std::vector< double > _MuTauThresholds
TH1 * h_L1MCPFMatchedTauEt
std::vector< TLorentzVector > _GenTauElecs
TH1 * h_MCPFTauHadEt
TH1 * h_PFMCTauDeltaR
TH1 * h_L1MCPFMatchedTauPhi
int _nEventsL1SingleTauPassedPFMCMatched
std::vector< TLorentzVector > _GenTauMuons
int _nEventsPFMatchGenTauHad
std::vector< TLorentzVector > _PFTaus
TH1 * h_L1MCPFMatchedTauEta
double _PFTauMinEt
TH1 * h_MCPFTauHadPhi
std::vector< TLorentzVector > _L1IsoEgammas
std::vector< TLorentzVector > _GenTauHads
std::vector< int > _L1MuQuals
int _nEventsL1IsoEgTauPassedPFMCMatched
double _MCTauHadMaxAbsEta
int _nEventsL1SingleTauMETPassedPFMCMatched
std::vector< TLorentzVector > _L1METs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
TH1 * h_L1SingleTauEffPFMCMatchEt
double _PFTauMaxAbsEta
std::vector< TLorentzVector > _L1Muons
TH1 * h_EffMCPFTauPhi
int _nEventsL1MuonTauPassedPFMCMatched
int k[5][pyjets_maxn]
std::vector< double > _IsoEgTauThresholds
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
int _nEventsPFMatchGenTauMuonTauHad
std::vector< TLorentzVector > _L1Taus
int _nEventsL1DoubleTauPassedPFMCMatched
double _MCTauHadMinEt
double _DoubleTauThreshold
int _nEventsPFMatchDoubleGenTauHads
std::vector< double > _SingleTauMETThresholds
TH1 * h_EffMCPFTauEta
void L1TauAnalyzer::calcL1MCTauMatching ( )
private

Definition at line 638 of file L1TauAnalyzer.cc.

References _DoubleTauThreshold, _GenTauElecs, _GenTauHads, _GenTauMuons, _IsoEgTauThresholds, _L1IsoEgammas, _L1MCTauMinDeltaR, _L1METs, _L1Muons, _L1MuQuals, _L1Taus, _MCTauHadMaxAbsEta, _MCTauHadMinEt, _MuTauThresholds, _nEventsL1DoubleTauPassedMCMatched, _nEventsL1IsoEgTauPassedMCMatched, _nEventsL1MuonTauPassedMCMatched, _nEventsL1SingleTauMETPassedMCMatched, _nEventsL1SingleTauPassedMCMatched, _SingleTauMETThresholds, _SingleTauThreshold, funct::abs(), HLTFastRecoForTau_cff::deltaEta, SiPixelRawToDigiRegional_cfi::deltaPhi, deltaR(), reco::tau::disc::Eta(), h_EffMCTauEt, h_EffMCTauEta, h_EffMCTauPhi, h_L1DoubleTauEffMCMatchEt, h_L1MCMatchedTauEt, h_L1MCMatchedTauEta, h_L1MCMatchedTauPhi, h_L1MCTauDeltaR, h_L1minusMCoverMCTauEt, h_L1minusMCTauEt, h_L1SingleTauEffMCMatchEt, i, j, gen::k, colinearityKinematic::Phi, and reco::tau::disc::Pt().

Referenced by analyze().

638  {
639  bool singleTauPassed = false;
640  bool doubleTauPassed = false;
641  bool muTauPassed = false;
642  bool isoEgTauPassed = false;
643  bool singleTauMETPassed = false;
644 
645  bool singleMatch = false; // for doubletau match
646  bool doubleMatch = false;
647  int iSingle = -1;
648  int iDouble = -1;
649 
650  for (unsigned int i = 0; i<_L1Taus.size();i++) {
651  for (unsigned int j = 0; j<_GenTauHads.size();j++) {
652  double deltaR = ROOT::Math::VectorUtil::DeltaR(_L1Taus[i],_GenTauHads[j]);
653  h_L1MCTauDeltaR->Fill(deltaR);
654  if (deltaR < _L1MCTauMinDeltaR) {
655  if (_GenTauHads[j].Et()>=_MCTauHadMinEt) {
656  //if (std::abs(_GenTauHads[j].Eta())<=_MCTauHadMaxAbsEta) {
657  h_L1minusMCTauEt->Fill(_L1Taus[i].Et() - _GenTauHads[j].Et());
658  h_L1minusMCoverMCTauEt->Fill( (_L1Taus[i].Et() - _GenTauHads[j].Et()) / _GenTauHads[j].Et());
659  // For event efficiencies
660  if (singleMatch) {
661  doubleMatch = true;
662  iDouble = i;
663  }
664  singleMatch = true;
665  if (singleMatch && !doubleMatch)
666  iSingle = i;
667  }
668  // Numerators for MC matching efficiencies
670  h_L1MCMatchedTauEt->Fill(_GenTauHads[j].Et());
671  h_EffMCTauEt->Fill(_GenTauHads[j].Et());
672  }
673  if (_GenTauHads[j].Et()>=_MCTauHadMinEt) {
675  h_EffMCTauEta->Fill(_GenTauHads[j].Eta());
676  }
679  h_EffMCTauPhi->Fill(_GenTauHads[j].Phi());
680  }
681  //break;
682  }
683  }
684  }
685  if (singleMatch && iSingle>=0) {
686  h_L1SingleTauEffMCMatchEt->Fill(_L1Taus[iSingle].Et());
687  if (_L1Taus[iSingle].Et()>=_SingleTauThreshold)
688  singleTauPassed = true;
689 
690  /*
691  // Ask for only one L1Tau to be matched with PFTau!!!
692  if (_L1Taus.size()>=2) {
693  h_L1DoubleTauEffPFMCMatchEt->Fill(_L1Taus[1].Et());
694  if (_L1Taus[1].Et()>=_DoubleTauThreshold)
695  doubleTauPassed = true;
696  }
697  */
698 
699  if (_L1Taus[iSingle].Et()>=_SingleTauMETThresholds[0] &&
700  _L1METs[0].Et()>=_SingleTauMETThresholds[1])
701  singleTauMETPassed = true;
702 
703  if (_L1Taus[iSingle].Et()>=_MuTauThresholds[1]) {
704  for (int i=0;i<(int)_L1Muons.size();i++) {
705  if (_L1Muons[i].Pt()>=_MuTauThresholds[0]) {
706  //if ( _L1MuQuals[0]==4 || _L1MuQuals[0]==5 || _L1MuQuals[0]==6 || _L1MuQuals[0]==7 ) {
707  //if ( _L1MuQuals[0]==3 || _L1MuQuals[0]==5 || _L1MuQuals[0]==6 || _L1MuQuals[0]==7 ) {
708  if ( _L1MuQuals[i]>=0) {
709  for (int j=0;j<(int)_GenTauMuons.size();j++) {
710  double deltaR = ROOT::Math::VectorUtil::DeltaR(_GenTauMuons[j],_L1Muons[i]);
711  if (deltaR<0.3) {
712  muTauPassed = true;
713  }
714  }
715  }
716  }
717  }
718  }
719 
720  for (int j=0;j<(int)_L1IsoEgammas.size();j++) {
721  if (_L1Taus[iSingle].Et()>=_IsoEgTauThresholds[1] &&
722  _L1IsoEgammas[j].Et()>=_IsoEgTauThresholds[0]) {
723  double deltaPhi = ROOT::Math::VectorUtil::DeltaPhi(_L1Taus[iSingle],_L1IsoEgammas[j]);
724  double deltaEta = std::abs(_L1Taus[iSingle].Eta()-_L1IsoEgammas[j].Eta());
725  // Non-collinearity check
726  if (deltaPhi>0.348 && deltaEta>0.348) {
727  for (int k=0;k<(int)_GenTauElecs.size();k++) {
728  double deltaR = ROOT::Math::VectorUtil::DeltaR(_GenTauElecs[k],_L1IsoEgammas[j]);
729  if (deltaR<0.3) {
730  isoEgTauPassed = true;
731  break;
732  }
733  }
734  }
735  }
736  }
737  }
738 
739  if (doubleMatch && iDouble>=0) {
740  h_L1DoubleTauEffMCMatchEt->Fill(_L1Taus[iDouble].Et());
741  if (_L1Taus[iDouble].Et()>=_DoubleTauThreshold)
742  doubleTauPassed = true;
743  for (int j=0;j<(int)_L1IsoEgammas.size();j++) {
744  if (_L1Taus[iDouble].Et()>=_IsoEgTauThresholds[1] &&
745  _L1IsoEgammas[j].Et()>=_IsoEgTauThresholds[0]) {
746  double deltaPhi = ROOT::Math::VectorUtil::DeltaPhi(_L1Taus[iDouble],_L1IsoEgammas[j]);
747  double deltaEta = std::abs(_L1Taus[iDouble].Eta()-_L1IsoEgammas[j].Eta());
748  // Non-collinearity check
749  if (deltaPhi>0.348 && deltaEta>0.348) {
750  for (int k=0;k<(int)_GenTauElecs.size();k++) {
751  double deltaR = ROOT::Math::VectorUtil::DeltaR(_GenTauElecs[k],_L1IsoEgammas[j]);
752  if (deltaR<0.3) {
753  isoEgTauPassed = true;
754  break;
755  }
756  }
757  }
758  }
759  }
760  }
761 
762  if (singleTauPassed) _nEventsL1SingleTauPassedMCMatched++;
763  if (doubleTauPassed) _nEventsL1DoubleTauPassedMCMatched++;
764  if (singleTauMETPassed) _nEventsL1SingleTauMETPassedMCMatched++;
765  if (muTauPassed) _nEventsL1MuonTauPassedMCMatched++;
766  if (isoEgTauPassed) _nEventsL1IsoEgTauPassedMCMatched++;
767 
768 }
TH1 * h_L1MCMatchedTauEta
int i
Definition: DBlmapReader.cc:9
double _L1MCTauMinDeltaR
int _nEventsL1IsoEgTauPassedMCMatched
double _SingleTauThreshold
std::vector< double > _MuTauThresholds
std::vector< TLorentzVector > _GenTauElecs
TH1 * h_L1DoubleTauEffMCMatchEt
std::vector< TLorentzVector > _GenTauMuons
TH1 * h_L1MCMatchedTauPhi
std::vector< TLorentzVector > _L1IsoEgammas
std::vector< TLorentzVector > _GenTauHads
TH1 * h_L1minusMCoverMCTauEt
std::vector< int > _L1MuQuals
double _MCTauHadMaxAbsEta
std::vector< TLorentzVector > _L1METs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
TH1 * h_L1MCMatchedTauEt
std::vector< TLorentzVector > _L1Muons
int _nEventsL1DoubleTauPassedMCMatched
TH1 * h_L1minusMCTauEt
int k[5][pyjets_maxn]
std::vector< double > _IsoEgTauThresholds
double deltaR(double eta1, double eta2, double phi1, double phi2)
Definition: TreeUtility.cc:17
TH1 * h_L1MCTauDeltaR
std::vector< TLorentzVector > _L1Taus
int _nEventsL1SingleTauMETPassedMCMatched
int _nEventsL1MuonTauPassedMCMatched
double _MCTauHadMinEt
double _DoubleTauThreshold
int _nEventsL1SingleTauPassedMCMatched
std::vector< double > _SingleTauMETThresholds
TH1 * h_L1SingleTauEffMCMatchEt
void L1TauAnalyzer::convertToIntegratedEff ( TH1 *  histo,
double  nGenerated 
)
private

Definition at line 939 of file L1TauAnalyzer.cc.

References dtNoiseDBValidation_cfg::cerr, i, funct::integral(), pileupCalc::nbins, and mathSSE::sqrt().

Referenced by endJob().

940 {
941  // Convert the histogram to efficiency
942  // Assuming that the histogram is incremented with weight=1 for each event
943  // this function integrates the histogram contents above every bin and stores it
944  // in that bin. The result is plot of integral rate versus threshold plot.
945  int nbins = histo->GetNbinsX();
946  double integral = histo->GetBinContent(nbins+1); // Initialize to overflow
947  if (nGenerated<=0) {
948  std::cerr << "***** L1TauAnalyzer::convertToIntegratedEff() Error: nGenerated = " << nGenerated << std::endl;
949  nGenerated=1;
950  }
951  for(int i = nbins; i >= 1; i--)
952  {
953  double thisBin = histo->GetBinContent(i);
954  integral += thisBin;
955  double integralEff;
956  double integralError;
957  integralEff = (integral / nGenerated);
958  histo->SetBinContent(i, integralEff);
959  // error
960  integralError = (sqrt(integral) / nGenerated);
961  histo->SetBinError(i, integralError);
962  }
963 }
int i
Definition: DBlmapReader.cc:9
T sqrt(T t)
Definition: SSEVec.h:48
Integral< F, X >::type integral(const F &f)
Definition: Integral.h:69
void L1TauAnalyzer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 285 of file L1TauAnalyzer.cc.

References _nEvents, _nEventsPFMatchDoubleGenTauHads, _nEventsPFMatchGenTauHad, _nfidEventsDoubleGenTauHads, _nfidEventsGenTauHad, convertToIntegratedEff(), h_EffMCPFTauEt, h_EffMCPFTauEta, h_EffMCPFTauPhi, h_EffMCTauEt, h_EffMCTauEta, h_EffMCTauPhi, h_L1DoubleTauEffEt, h_L1DoubleTauEffMCMatchEt, h_L1DoubleTauEffPFMCMatchEt, h_L1SingleTauEffEt, h_L1SingleTauEffMCMatchEt, h_L1SingleTauEffPFMCMatchEt, h_MCPFTauHadEt, h_MCPFTauHadEta, h_MCPFTauHadPhi, h_MCTauHadEt, h_MCTauHadEta, and h_MCTauHadPhi.

285  {
286 
287  // MC matching efficiencies
288  h_EffMCTauEt->Divide(h_MCTauHadEt);
289  h_EffMCTauEta->Divide(h_MCTauHadEta);
290  h_EffMCTauPhi->Divide(h_MCTauHadPhi);
291 
292  // MC-PFTau matching efficiencies
296 
297  //
304 
305  //printTrigReport();
306 }
TH1 * h_MCPFTauHadEta
TH1 * h_L1DoubleTauEffPFMCMatchEt
int _nfidEventsDoubleGenTauHads
TH1 * h_EffMCPFTauEt
TH1 * h_L1SingleTauEffEt
TH1 * h_L1DoubleTauEffMCMatchEt
TH1 * h_MCPFTauHadEt
int _nEventsPFMatchGenTauHad
int _nfidEventsGenTauHad
TH1 * h_MCPFTauHadPhi
TH1 * h_L1DoubleTauEffEt
void convertToIntegratedEff(TH1 *, double)
TH1 * h_L1SingleTauEffPFMCMatchEt
TH1 * h_EffMCPFTauPhi
int _nEventsPFMatchDoubleGenTauHads
TH1 * h_L1SingleTauEffMCMatchEt
TH1 * h_EffMCPFTauEta
void L1TauAnalyzer::evalL1Decisions ( const edm::Event iEvent)
private

Definition at line 534 of file L1TauAnalyzer.cc.

References _L1DoubleTauName, _L1GtObjectMap, _L1GtReadoutRecord, _L1IsoEgTauName, _L1MuonTauName, _L1SingleTauName, _L1TauMETName, _nEventsL1GTDoubleTauPassed, _nEventsL1GTIsoEgTauPassed, _nEventsL1GTMuonTauPassed, _nEventsL1GTSingleTauMETPassed, _nEventsL1GTSingleTauPassed, edm::Event::getByToken(), L1GlobalTriggerObjectMapRecord::gtObjectMap(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by analyze().

534  {
535  using namespace edm;
536  using namespace std;
537 
539  iEvent.getByToken(_L1GtReadoutRecord,l1GtRR);
541  iEvent.getByToken(_L1GtObjectMap,l1GtOMRec);
542 
543  L1GlobalTriggerReadoutRecord L1GTRR = *l1GtRR.product();
544  L1GlobalTriggerObjectMapRecord L1GTOMRec = *l1GtOMRec.product();
545 
546  DecisionWord gtDecisionWord = L1GTRR.decisionWord();
547  string l1BitName;
548  int l1Accept;
549  // get ObjectMaps from ObjectMapRecord
550  const vector<L1GlobalTriggerObjectMap>& objMapVec = L1GTOMRec.gtObjectMap();
551  for (vector<L1GlobalTriggerObjectMap>::const_iterator itMap = objMapVec.begin();
552  itMap != objMapVec.end(); ++itMap) {
553  int iBit = (*itMap).algoBitNumber();
554  l1BitName = string( (*itMap).algoName() );
555  l1Accept = gtDecisionWord[iBit];
556  //cout<<l1BitName<<" "<<l1Accept<<endl;
557  if (l1BitName.compare(_L1SingleTauName)==0) {
558  //cout<<l1BitName<<" "<<l1Accept<<endl;
559  if (l1Accept) _nEventsL1GTSingleTauPassed++;
560  }
561  if (l1BitName.compare(_L1DoubleTauName)==0) {
562  if (l1Accept) _nEventsL1GTDoubleTauPassed++;
563  }
564  if (l1BitName.compare(_L1TauMETName)==0) {
565  if (l1Accept) _nEventsL1GTSingleTauMETPassed++;
566  }
567  if (l1BitName.compare(_L1MuonTauName)==0) {
568  if (l1Accept) _nEventsL1GTMuonTauPassed++;
569  }
570  if (l1BitName.compare(_L1IsoEgTauName)==0) {
571  if (l1Accept) _nEventsL1GTIsoEgTauPassed++;
572  }
573  }
574 }
int _nEventsL1GTIsoEgTauPassed
int _nEventsL1GTDoubleTauPassed
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::string _L1SingleTauName
const std::vector< L1GlobalTriggerObjectMap > & gtObjectMap() const
get / set the vector of object maps
int _nEventsL1GTSingleTauPassed
int _nEventsL1GTSingleTauMETPassed
std::vector< bool > DecisionWord
typedefs
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > _L1GtReadoutRecord
std::string _L1TauMETName
edm::EDGetTokenT< L1GlobalTriggerObjectMapRecord > _L1GtObjectMap
std::string _L1MuonTauName
std::string _L1IsoEgTauName
std::string _L1DoubleTauName
int _nEventsL1GTMuonTauPassed
void L1TauAnalyzer::evalL1extraDecisions ( )
private

Definition at line 577 of file L1TauAnalyzer.cc.

References _DoubleTauThreshold, _IsoEgTauThresholds, _L1IsoEgammas, _L1METs, _L1Muons, _L1MuQuals, _L1Taus, _MuTauThresholds, _nEventsL1DoubleTauPassed, _nEventsL1IsoEgTauPassed, _nEventsL1MuonTauPassed, _nEventsL1SingleTauMETPassed, _nEventsL1SingleTauPassed, _SingleTauMETThresholds, _SingleTauThreshold, funct::abs(), HLTFastRecoForTau_cff::deltaEta, SiPixelRawToDigiRegional_cfi::deltaPhi, reco::tau::disc::Eta(), h_L1DoubleTauEffEt, h_L1SingleTauEffEt, i, j, and reco::tau::disc::Pt().

Referenced by analyze().

577  {
578  bool singleTauPassed = false;
579  bool doubleTauPassed = false;
580  bool muTauPassed = false;
581  bool isoEgTauPassed = false;
582  bool singleTauMETPassed = false;
583 
584  int nL1Taus = _L1Taus.size();
585  int nL1Muons = _L1Muons.size();
586  int nL1IsoEgammas = _L1IsoEgammas.size();
587 
588 
589  if (nL1Taus>=1) {
590  h_L1SingleTauEffEt->Fill(_L1Taus[0].Et());
591  if (_L1Taus[0].Et()>=_SingleTauThreshold)
592  singleTauPassed = true;
593  }
594  if (nL1Taus>=2 ) {
595  h_L1DoubleTauEffEt->Fill(_L1Taus[1].Et());
596  if (_L1Taus[1].Et()>=_DoubleTauThreshold)
597  doubleTauPassed = true;
598  }
599 
600  if (nL1Taus>=1 && _L1Taus[0].Et()>=_SingleTauMETThresholds[0] &&
601  _L1METs[0].Et()>=_SingleTauMETThresholds[1])
602  singleTauMETPassed = true;
603 
604  if (nL1Taus>=1 && _L1Taus[0].Et()>=_MuTauThresholds[1] &&
605  nL1Muons>=1 && _L1Muons[0].Pt()>=_MuTauThresholds[0]) {
606  //if ( _L1MuQuals[0]==4 || _L1MuQuals[0]==5 || _L1MuQuals[0]==6 || _L1MuQuals[0]==7 ) {
607  //if ( _L1MuQuals[0]==3 || _L1MuQuals[0]==5 || _L1MuQuals[0]==6 || _L1MuQuals[0]==7 ) {
608  if ( _L1MuQuals[0]>=0) {
609  muTauPassed = true;
610  }
611  }
612 
613  for (int i=0;i<nL1Taus;i++) {
614  for (int j=0;j<nL1IsoEgammas;j++) {
615  if (_L1Taus[i].Et()>=_IsoEgTauThresholds[1] &&
616  _L1IsoEgammas[j].Et()>=_IsoEgTauThresholds[0]) {
617  //double deltaR = ROOT::Math::VectorUtil::DeltaR(_L1Taus[i],_GenTauHads[j]);
618  double deltaPhi = ROOT::Math::VectorUtil::DeltaPhi(_L1Taus[i],_L1IsoEgammas[j]);
619  double deltaEta = std::abs(_L1Taus[i].Eta()-_L1IsoEgammas[j].Eta());
620  // Non-collinearity check
621  if (deltaPhi>0.348 && deltaEta>0.348) {
622  isoEgTauPassed = true;
623  break;
624  }
625  }
626  }
627  }
628 
629  if (singleTauPassed) _nEventsL1SingleTauPassed++;
630  if (doubleTauPassed) _nEventsL1DoubleTauPassed++;
631  if (singleTauMETPassed) _nEventsL1SingleTauMETPassed++;
632  if (muTauPassed) _nEventsL1MuonTauPassed++;
633  if (isoEgTauPassed) _nEventsL1IsoEgTauPassed++;
634 }
int i
Definition: DBlmapReader.cc:9
double _SingleTauThreshold
TH1 * h_L1SingleTauEffEt
std::vector< double > _MuTauThresholds
int _nEventsL1SingleTauPassed
std::vector< TLorentzVector > _L1IsoEgammas
TH1 * h_L1DoubleTauEffEt
std::vector< int > _L1MuQuals
std::vector< TLorentzVector > _L1METs
int _nEventsL1IsoEgTauPassed
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
std::vector< TLorentzVector > _L1Muons
int _nEventsL1DoubleTauPassed
std::vector< double > _IsoEgTauThresholds
int _nEventsL1SingleTauMETPassed
std::vector< TLorentzVector > _L1Taus
double _DoubleTauThreshold
int _nEventsL1MuonTauPassed
std::vector< double > _SingleTauMETThresholds
void L1TauAnalyzer::fillGenHistograms ( )
private

Definition at line 505 of file L1TauAnalyzer.cc.

References _GenTauHads, _MCTauHadMaxAbsEta, _MCTauHadMinEt, funct::abs(), reco::tau::disc::Eta(), h_GenTauHadEt, h_GenTauHadEta, h_GenTauHadPhi, h_MCTauHadEt, h_MCTauHadEta, h_MCTauHadPhi, i, and colinearityKinematic::Phi.

Referenced by analyze().

505  {
506  for (int i=0; i<(int)_GenTauHads.size(); i++) {
507  h_GenTauHadEt->Fill(_GenTauHads[i].Et());
508  h_GenTauHadEta->Fill(_GenTauHads[i].Eta());
509  h_GenTauHadPhi->Fill(_GenTauHads[i].Phi());
510  }
511  // Denominators for MC matching efficiencies
512  for (int i=0; i<(int)_GenTauHads.size(); i++) {
514  h_MCTauHadEt->Fill(_GenTauHads[i].Et());
515  if (_GenTauHads[i].Et()>=_MCTauHadMinEt)
516  h_MCTauHadEta->Fill(_GenTauHads[i].Eta());
518  h_MCTauHadPhi->Fill(_GenTauHads[i].Phi());
519  }
520 }
int i
Definition: DBlmapReader.cc:9
std::vector< TLorentzVector > _GenTauHads
double _MCTauHadMaxAbsEta
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double _MCTauHadMinEt
TH1 * h_GenTauHadEta
TH1 * h_GenTauHadPhi
void L1TauAnalyzer::fillL1Histograms ( )
private

Definition at line 485 of file L1TauAnalyzer.cc.

References _L1Taus, reco::tau::disc::Eta(), h_L1Tau1Et, h_L1Tau1Eta, h_L1Tau1Phi, h_L1Tau2Et, h_L1Tau2Eta, h_L1Tau2Phi, h_L1TauEt, h_L1TauEta, h_L1TauPhi, i, and colinearityKinematic::Phi.

Referenced by analyze().

485  {
486  for (int i=0; i<(int)_L1Taus.size(); i++) {
487  h_L1TauEt->Fill(_L1Taus[i].Et());
488  h_L1TauEta->Fill(_L1Taus[i].Eta());
489  h_L1TauPhi->Fill(_L1Taus[i].Phi());
490  if (i==0) {
491  h_L1Tau1Et->Fill(_L1Taus[i].Et());
492  h_L1Tau1Eta->Fill(_L1Taus[i].Eta());
493  h_L1Tau1Phi->Fill(_L1Taus[i].Phi());
494  }
495  if (i==1) {
496  h_L1Tau2Et->Fill(_L1Taus[i].Et());
497  h_L1Tau2Eta->Fill(_L1Taus[i].Eta());
498  h_L1Tau2Phi->Fill(_L1Taus[i].Phi());
499  }
500  }
501 
502 }
int i
Definition: DBlmapReader.cc:9
std::vector< TLorentzVector > _L1Taus
void L1TauAnalyzer::fillPFTauHistograms ( )
private

Definition at line 523 of file L1TauAnalyzer.cc.

References _PFTaus, reco::tau::disc::Eta(), h_PFTauEt, h_PFTauEta, h_PFTauPhi, i, and colinearityKinematic::Phi.

Referenced by analyze().

523  {
524  for (int i=0; i<(int)_PFTaus.size(); i++) {
525  h_PFTauEt->Fill(_PFTaus[i].Et());
526  h_PFTauEta->Fill(_PFTaus[i].Eta());
527  h_PFTauPhi->Fill(_PFTaus[i].Phi());
528  }
529 }
int i
Definition: DBlmapReader.cc:9
std::vector< TLorentzVector > _PFTaus
void L1TauAnalyzer::getGenObjects ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 409 of file L1TauAnalyzer.cc.

References _BosonPID, _GenParticleSource, _GenTauElecs, _GenTauHads, _GenTauMuons, _MCTauHadMaxAbsEta, _MCTauHadMinEt, _nEventsDoubleGenTauHads, _nEventsGenTauElecTauHad, _nEventsGenTauHad, _nEventsGenTauMuonTauHad, _nfidEventsDoubleGenTauHads, _nfidEventsGenTauElecTauHad, _nfidEventsGenTauHad, _nfidEventsGenTauMuonTauHad, funct::abs(), edm::Event::getByToken(), AlCaHLTBitMon_ParallelJobs::p, lumiQTWidget::t, metsig::tau, and detailsBasic3DVector::z.

Referenced by analyze().

409  {
410  using namespace edm;
411  using namespace HepMC;
412 
414  // MC Truth based on RecoTauTag/HLTAnalyzers/src/TauJetMCFilter.cc
416  iEvent.getByToken(_GenParticleSource, evt);
417  GenEvent * generated_event = new GenEvent(*(evt->GetEvent()));
418 
419  //init
420  _GenTauHads.clear();
421  _GenTauMuons.clear();
422  _GenTauElecs.clear();
423 
424  unsigned int nTauHads = 0; int nTauMuons = 0;int nTauElecs = 0; //
425  unsigned int nfidTauHads = 0; int nfidTauMuons = 0;int nfidTauElecs = 0; // count in fiducial region
426  TLorentzVector taunu,tauelec,taumuon;
427  GenEvent::particle_iterator p;
428 
429  for (p = generated_event->particles_begin(); p != generated_event->particles_end(); ++p) {
430  if(abs((*p)->pdg_id()) == _BosonPID && (*p)->end_vertex()) {
431  HepMC::GenVertex::particle_iterator z = (*p)->end_vertex()->particles_begin(HepMC::descendants);
432  for(; z != (*p)->end_vertex()->particles_end(HepMC::descendants); z++) {
433  if(abs((*z)->pdg_id()) == 15 && (*z)->status()==2) {
434  bool lept_decay = false;
435  TLorentzVector tau((*z)->momentum().px(),(*z)->momentum().py(),(*z)->momentum().pz(),(*z)->momentum().e());
436  HepMC::GenVertex::particle_iterator t = (*z)->end_vertex()->particles_begin(HepMC::descendants);
437  for(; t != (*z)->end_vertex()->particles_end(HepMC::descendants); t++) {
438  if(abs((*t)->pdg_id()) == 11 || abs((*t)->pdg_id()) == 13) lept_decay=true;
439  if(abs((*t)->pdg_id()) == 11) {
440  tauelec.SetPxPyPzE((*t)->momentum().px(),(*t)->momentum().py(),(*t)->momentum().pz(),(*t)->momentum().e());
441  _GenTauElecs.push_back(tauelec);
442  nTauElecs++;
443  if (tauelec.Et()>=_MCTauHadMinEt && tauelec.Eta()<=_MCTauHadMaxAbsEta )
444  nfidTauElecs++;
445  }
446  if(abs((*t)->pdg_id()) == 13) {
447  taumuon.SetPxPyPzE((*t)->momentum().px(),(*t)->momentum().py(),(*t)->momentum().pz(),(*t)->momentum().e());
448  _GenTauMuons.push_back(taumuon);
449  nTauMuons++;
450  if (taumuon.Et()>=_MCTauHadMinEt && taumuon.Eta()<=_MCTauHadMaxAbsEta )
451  nfidTauMuons++;
452  }
453  if(abs((*t)->pdg_id()) == 16)
454  taunu.SetPxPyPzE((*t)->momentum().px(),(*t)->momentum().py(),(*t)->momentum().pz(),(*t)->momentum().e());
455  }
456  if(lept_decay==false) {
457  TLorentzVector jetMom=tau-taunu;
458  _GenTauHads.push_back(jetMom);
459  nTauHads++;
460  if (jetMom.Et()>=_MCTauHadMinEt && jetMom.Eta()<=_MCTauHadMaxAbsEta )
461  nfidTauHads++;
462  }
463  }
464  }
465  }
466  }
467  delete generated_event;
468 
469  // Counters
470  if (nTauHads >= 1) _nEventsGenTauHad++;
471  if (nTauHads >= 2) _nEventsDoubleGenTauHads++;
472  if (nTauHads >= 1 && nTauMuons >= 1) _nEventsGenTauMuonTauHad++;
473  if (nTauHads >= 1 && nTauElecs >= 1) _nEventsGenTauElecTauHad++;
474 
476  if (nfidTauHads >= 1) _nfidEventsGenTauHad++;
477  if (nfidTauHads >= 2) _nfidEventsDoubleGenTauHads++;
478  if (nfidTauHads >= 1 && nfidTauMuons >= 1) _nfidEventsGenTauMuonTauHad++;
479  if (nfidTauHads >= 1 && nfidTauElecs >= 1) _nfidEventsGenTauElecTauHad++;
480 
481 }
int _nfidEventsDoubleGenTauHads
std::vector< TLorentzVector > _GenTauElecs
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< TLorentzVector > _GenTauMuons
int _nfidEventsGenTauHad
float float float z
int _nEventsGenTauMuonTauHad
std::vector< TLorentzVector > _GenTauHads
double _MCTauHadMaxAbsEta
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int _nEventsGenTauElecTauHad
int _nfidEventsGenTauElecTauHad
edm::EDGetTokenT< edm::HepMCProduct > _GenParticleSource
int _nfidEventsGenTauMuonTauHad
double _MCTauHadMinEt
int _nEventsDoubleGenTauHads
void L1TauAnalyzer::getL1extraObjects ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 309 of file L1TauAnalyzer.cc.

References _L1CenJets, _L1extraCenJetSource, _L1extraForJetSource, _L1extraIsoEgammaSource, _L1extraMETSource, _L1extraMuonSource, _L1extraNonIsoEgammaSource, _L1extraTauJetSource, _L1ForJets, _L1IsoEgammas, _L1METs, _L1Muons, _L1MuQuals, _L1NonIsoEgammas, _L1Taus, edm::Event::getByToken(), AlCaHLTBitMon_ParallelJobs::p, and L1MuGMTCand::quality().

Referenced by analyze().

310 {
311  using namespace edm;
312  using namespace l1extra;
313 
314  //
315  _L1Taus.clear();
317  iEvent.getByToken(_L1extraTauJetSource,l1TauHandle);
318  for( L1JetParticleCollection::const_iterator itr = l1TauHandle->begin() ;
319  itr != l1TauHandle->end() ; ++itr ) {
320  TLorentzVector p(itr->px(),itr->py(),itr->pz(),itr->energy());
321  _L1Taus.push_back(p);
322  }
323 
324  //
325  _L1CenJets.clear();
326  Handle<L1JetParticleCollection> l1CenJetHandle;
327  iEvent.getByToken(_L1extraCenJetSource,l1CenJetHandle);
328  for( L1JetParticleCollection::const_iterator itr = l1CenJetHandle->begin() ;
329  itr != l1CenJetHandle->end() ; ++itr ) {
330  TLorentzVector p(itr->px(),itr->py(),itr->pz(),itr->energy());
331  _L1CenJets.push_back(p);
332  }
333 
334  //
335  _L1ForJets.clear();
336  Handle<L1JetParticleCollection> l1ForJetHandle;
337  iEvent.getByToken(_L1extraForJetSource,l1ForJetHandle);
338  for( L1JetParticleCollection::const_iterator itr = l1ForJetHandle->begin() ;
339  itr != l1ForJetHandle->end() ; ++itr ) {
340  TLorentzVector p(itr->px(),itr->py(),itr->pz(),itr->energy());
341  _L1ForJets.push_back(p);
342  }
343 
344  //
345  _L1IsoEgammas.clear();
346  Handle<L1EmParticleCollection> l1IsoEgammaHandle;
347  iEvent.getByToken(_L1extraIsoEgammaSource,l1IsoEgammaHandle);
348  for( L1EmParticleCollection::const_iterator itr = l1IsoEgammaHandle->begin() ;
349  itr != l1IsoEgammaHandle->end() ; ++itr ) {
350  TLorentzVector p(itr->px(),itr->py(),itr->pz(),itr->energy());
351  _L1IsoEgammas.push_back(p);
352  }
353 
354  //
355  _L1NonIsoEgammas.clear();
356  Handle<L1EmParticleCollection> l1NonIsoEgammaHandle;
357  iEvent.getByToken(_L1extraNonIsoEgammaSource,l1NonIsoEgammaHandle);
358  for( L1EmParticleCollection::const_iterator itr = l1NonIsoEgammaHandle->begin() ;
359  itr != l1NonIsoEgammaHandle->end() ; ++itr ) {
360  TLorentzVector p(itr->px(),itr->py(),itr->pz(),itr->energy());
361  _L1NonIsoEgammas.push_back(p);
362  }
363 
364  //
365  _L1Muons.clear();
366  _L1MuQuals.clear();
368  iEvent.getByToken(_L1extraMuonSource,l1MuonHandle);
369  for( L1MuonParticleCollection::const_iterator itr = l1MuonHandle->begin() ;
370  itr != l1MuonHandle->end() ; ++itr ) {
371  TLorentzVector p(itr->px(),itr->py(),itr->pz(),itr->energy());
372  _L1Muons.push_back(p);
373  L1MuGMTExtendedCand gmtCand = itr->gmtMuonCand();
374  _L1MuQuals.push_back(gmtCand.quality());// Muon quality as defined in the GT
375  }
376 
377  //
378  _L1METs.clear();
380  iEvent.getByToken(_L1extraMETSource,l1MetHandle);
381  for( L1EtMissParticleCollection::const_iterator itr = l1MetHandle->begin() ;
382  itr != l1MetHandle->end() ; ++itr ) {
383  TLorentzVector p(itr->px(),itr->py(),itr->pz(),itr->energy());
384  _L1METs.push_back(p);
385  }
386 
387 }
edm::EDGetTokenT< l1extra::L1EmParticleCollection > _L1extraNonIsoEgammaSource
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< TLorentzVector > _L1ForJets
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1extraCenJetSource
std::vector< TLorentzVector > _L1IsoEgammas
std::vector< TLorentzVector > _L1CenJets
edm::EDGetTokenT< l1extra::L1EmParticleCollection > _L1extraIsoEgammaSource
std::vector< int > _L1MuQuals
std::vector< TLorentzVector > _L1METs
std::vector< TLorentzVector > _L1Muons
std::vector< TLorentzVector > _L1NonIsoEgammas
unsigned int quality() const
get quality
Definition: L1MuGMTCand.h:93
std::vector< TLorentzVector > _L1Taus
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1extraForJetSource
edm::EDGetTokenT< l1extra::L1MuonParticleCollection > _L1extraMuonSource
edm::EDGetTokenT< l1extra::L1JetParticleCollection > _L1extraTauJetSource
edm::EDGetTokenT< l1extra::L1EtMissParticleCollection > _L1extraMETSource
void L1TauAnalyzer::getPFTauObjects ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
private

Definition at line 390 of file L1TauAnalyzer.cc.

References _PFTauDiscriminatorSource, _PFTaus, _PFTauSource, edm::Event::getByToken(), and dt_dqm_sourceclient_common_cff::reco.

Referenced by analyze().

390  {
391  using namespace edm;
392  using namespace reco;
393 
394  _PFTaus.clear();
395  Handle<PFTauCollection> thePFTauHandle;
396  iEvent.getByToken(_PFTauSource,thePFTauHandle);
397  Handle<PFTauDiscriminatorByIsolation> thePFTauDiscriminatorByIsolation;
398  iEvent.getByToken(_PFTauDiscriminatorSource,thePFTauDiscriminatorByIsolation);
399  for (PFTauCollection::size_type iPFTau=0;iPFTau<thePFTauHandle->size();iPFTau++) {
400  PFTauRef thePFTau(thePFTauHandle,iPFTau);
401  if ((*thePFTauDiscriminatorByIsolation)[thePFTau] == 1) {
402  TLorentzVector pftau((*thePFTau).px(),(*thePFTau).py(),(*thePFTau).pz(),(*thePFTau).energy());
403  _PFTaus.push_back(pftau);
404  }
405  }
406 }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
edm::EDGetTokenT< reco::PFTauCollection > _PFTauSource
Definition: L1TauAnalyzer.h:99
uint16_t size_type
std::vector< TLorentzVector > _PFTaus
edm::EDGetTokenT< reco::PFTauDiscriminatorByIsolation > _PFTauDiscriminatorSource
void L1TauAnalyzer::printTrigReport ( )
private

Definition at line 966 of file L1TauAnalyzer.cc.

References _DoubleTauThreshold, _IsoEgTauThresholds, _L1DoubleTauName, _L1IsoEgTauName, _L1MuonTauName, _L1SingleTauName, _L1TauMETName, _MuTauThresholds, _nEvents, _nEventsDoubleGenTauHads, _nEventsGenTauElecTauHad, _nEventsGenTauHad, _nEventsGenTauMuonTauHad, _nEventsL1DoubleTauPassed, _nEventsL1DoubleTauPassedMCMatched, _nEventsL1DoubleTauPassedPFMCMatched, _nEventsL1GTDoubleTauPassed, _nEventsL1GTIsoEgTauPassed, _nEventsL1GTMuonTauPassed, _nEventsL1GTSingleTauMETPassed, _nEventsL1GTSingleTauPassed, _nEventsL1IsoEgTauPassed, _nEventsL1IsoEgTauPassedMCMatched, _nEventsL1IsoEgTauPassedPFMCMatched, _nEventsL1MuonTauPassed, _nEventsL1MuonTauPassedMCMatched, _nEventsL1MuonTauPassedPFMCMatched, _nEventsL1SingleTauMETPassed, _nEventsL1SingleTauMETPassedMCMatched, _nEventsL1SingleTauMETPassedPFMCMatched, _nEventsL1SingleTauPassed, _nEventsL1SingleTauPassedMCMatched, _nEventsL1SingleTauPassedPFMCMatched, _nEventsPFMatchDoubleGenTauHads, _nEventsPFMatchGenTauElecTauHad, _nEventsPFMatchGenTauHad, _nEventsPFMatchGenTauMuonTauHad, _nfidEventsDoubleGenTauHads, _nfidEventsGenTauElecTauHad, _nfidEventsGenTauHad, _nfidEventsGenTauMuonTauHad, _SingleTauMETThresholds, _SingleTauThreshold, and gather_cfg::cout.

966  {
967  using namespace std;
968 
969  cout<<"****************************************"<<endl;
970  cout<<"* L1extra Efficiency Report"<<endl;
971  cout<<"****************************************"<<endl;
972  cout<<"Total number of Events: "<<_nEvents<<endl;
973  cout<<"---------------------------------------------------------------------------------------------"<<endl;
974  cout<<" #PassL1 GlobEff GlEff/BR(fid.) MCMatchEff PFMCMatchEff BR(fid.) BR"<<endl;
975  cout<<"---------------------------------------------------------------------------------------------"<<endl;
976  cout<<" SingleTau ("<<_SingleTauThreshold<<"): "
977  <<setw(6)<<_nEventsL1SingleTauPassed<<" "
978  <<setprecision(2)<<setw(7)<<(double)_nEventsL1SingleTauPassed/(double)_nEvents<<" "
979  <<setprecision(2)<<setw(13)<<(double)_nEventsL1SingleTauPassed/(double)_nfidEventsGenTauHad<<" "
980  <<setprecision(2)<<setw(10)<<(double)_nEventsL1SingleTauPassedMCMatched/(double)_nfidEventsGenTauHad<<" "
981  <<setprecision(2)<<setw(12)<<(double)_nEventsL1SingleTauPassedPFMCMatched/(double)_nEventsPFMatchGenTauHad<<" "
982  <<setprecision(2)<<setw(8)<<(double)_nfidEventsGenTauHad/(double)_nEvents<<" "
983  <<setprecision(2)<<setw(7)<<(double)_nEventsGenTauHad/(double)_nEvents<<" "
984  <<endl;
985  cout<<" DoubleTau ("<<_DoubleTauThreshold<<"): "
986  <<setw(6)<<_nEventsL1DoubleTauPassed<<" "
987  <<setprecision(2)<<setw(7)<<(double)_nEventsL1DoubleTauPassed/(double)_nEvents<<" "
988  <<setprecision(2)<<setw(13)<<(double)_nEventsL1DoubleTauPassed/(double)_nfidEventsDoubleGenTauHads<<" "
989  <<setprecision(2)<<setw(10)<<(double)_nEventsL1DoubleTauPassedMCMatched/(double)_nfidEventsDoubleGenTauHads<<" "
990  <<setprecision(2)<<setw(12)<<(double)_nEventsL1DoubleTauPassedPFMCMatched/(double)_nEventsPFMatchDoubleGenTauHads<<" "
991  <<setprecision(2)<<setw(8)<<(double)_nfidEventsDoubleGenTauHads/(double)_nEvents<<" "
992  <<setprecision(2)<<setw(7)<<(double)_nEventsDoubleGenTauHads/(double)_nEvents<<" "
993  <<endl;
994  cout<<" TauMET ("<<_SingleTauMETThresholds[0]<<","<<_SingleTauMETThresholds[1]<<"): "
995  <<setw(6)<<_nEventsL1SingleTauMETPassed<<" "
996  <<setprecision(2)<<setw(7)<<(double)_nEventsL1SingleTauMETPassed/(double)_nEvents<<" "
997  <<setprecision(2)<<setw(13)<<(double)_nEventsL1SingleTauMETPassed/(double)_nfidEventsGenTauHad<<" "
998  <<setprecision(2)<<setw(10)<<(double)_nEventsL1SingleTauMETPassedMCMatched/(double)_nfidEventsGenTauHad<<" "
999  <<setprecision(2)<<setw(12)<<(double)_nEventsL1SingleTauMETPassedPFMCMatched/(double)_nEventsPFMatchGenTauHad<<" "
1000  <<setprecision(2)<<setw(8)<<(double)_nfidEventsGenTauHad/(double)_nEvents<<" "
1001  <<setprecision(2)<<setw(7)<<(double)_nEventsGenTauHad/(double)_nEvents<<" "
1002  <<endl;
1003  cout<<" MuTau ("<<_MuTauThresholds[0]<<","<<_MuTauThresholds[1]<<"): "
1004  <<setw(6)<<_nEventsL1MuonTauPassed<<" "
1005  <<setprecision(2)<<setw(7)<<(double)_nEventsL1MuonTauPassed/(double)_nEvents<<" "
1006  <<setprecision(2)<<setw(13)<<(double)_nEventsL1MuonTauPassed/(double)_nfidEventsGenTauMuonTauHad<<" "
1007  <<setprecision(2)<<setw(10)<<(double)_nEventsL1MuonTauPassedMCMatched/(double)_nfidEventsGenTauMuonTauHad<<" "
1008  <<setprecision(2)<<setw(12)<<(double)_nEventsL1MuonTauPassedPFMCMatched/(double)_nEventsPFMatchGenTauMuonTauHad<<" "
1009  <<setprecision(2)<<setw(8)<<(double)_nfidEventsGenTauMuonTauHad/(double)_nEvents<<" "
1010  <<setprecision(2)<<setw(7)<<(double)_nEventsGenTauMuonTauHad/(double)_nEvents<<" "
1011  <<endl;
1012  cout<<"IsoEgTau ("<<_IsoEgTauThresholds[0]<<","<<_IsoEgTauThresholds[1]<<"): "
1013  <<setw(6)<<_nEventsL1IsoEgTauPassed<<" "
1014  <<setprecision(2)<<setw(7)<<(double)_nEventsL1IsoEgTauPassed/(double)_nEvents<<" "
1015  <<setprecision(2)<<setw(13)<<(double)_nEventsL1IsoEgTauPassed/(double)_nfidEventsGenTauElecTauHad<<" "
1016  <<setprecision(2)<<setw(10)<<(double)_nEventsL1IsoEgTauPassedMCMatched/(double)_nfidEventsGenTauElecTauHad<<" "
1017  <<setprecision(2)<<setw(12)<<(double)_nEventsL1IsoEgTauPassedPFMCMatched/(double)_nEventsPFMatchGenTauElecTauHad<<" "
1018  <<setprecision(2)<<setw(8)<<(double)_nfidEventsGenTauElecTauHad/(double)_nEvents<<" "
1019  <<setprecision(2)<<setw(7)<<(double)_nEventsGenTauElecTauHad/(double)_nEvents<<" "
1020  <<endl;
1021 
1022  cout<<endl;
1023 
1024  cout<<"****************************************"<<endl;
1025  cout<<"* L1 GT Efficiency Report"<<endl;
1026  cout<<"****************************************"<<endl;
1027  cout<<"Total number of Events: "<<_nEvents<<endl;
1028  cout<<"---------------------------------------------------------------------------------------"<<endl;
1029  cout<<" #PassL1 GlobEff GlobEff/BR(fid.) BR(fid.) BR"<<endl;
1030  cout<<"---------------------------------------------------------------------------------------"<<endl;
1031  cout<<setw(20)<<_L1SingleTauName<<": "
1032  <<setw(7)<<_nEventsL1GTSingleTauPassed<<" "
1033  <<setprecision(2)<<setw(7)<<setw(7)<<(double)_nEventsL1GTSingleTauPassed/(double)_nEvents<<" "
1034  <<setprecision(2)<<setw(16)<<(double)_nEventsL1GTSingleTauPassed/(double)_nfidEventsGenTauHad<<" "
1035  <<setprecision(2)<<setw(8)<<(double)_nfidEventsGenTauHad/(double)_nEvents<<" "
1036  <<setprecision(2)<<setw(7)<<(double)_nEventsGenTauHad/(double)_nEvents<<" "
1037  <<endl;
1038  cout<<setw(20)<<_L1DoubleTauName<<": "
1039  <<setw(7)<<_nEventsL1GTDoubleTauPassed<<" "
1040  <<setprecision(2)<<setw(7)<<(double)_nEventsL1GTDoubleTauPassed/(double)_nEvents<<" "
1041  <<setprecision(2)<<setw(16)<<(double)_nEventsL1GTDoubleTauPassed/(double)_nfidEventsDoubleGenTauHads<<" "
1042  <<setprecision(2)<<setw(8)<<(double)_nfidEventsDoubleGenTauHads/(double)_nEvents<<" "
1043  <<setprecision(2)<<setw(7)<<(double)_nEventsDoubleGenTauHads/(double)_nEvents<<" "
1044  <<endl;
1045  cout<<setw(20)<<_L1TauMETName<<": "
1046  <<setw(7)<<_nEventsL1GTSingleTauMETPassed<<" "
1047  <<setprecision(2)<<setw(7)<<(double)_nEventsL1GTSingleTauMETPassed/(double)_nEvents<<" "
1048  <<setprecision(2)<<setw(16)<<(double)_nEventsL1GTSingleTauMETPassed/(double)_nfidEventsGenTauHad<<" "
1049  <<setprecision(2)<<setw(8)<<(double)_nfidEventsGenTauHad/(double)_nEvents<<" "
1050  <<setprecision(2)<<setw(7)<<(double)_nEventsGenTauHad/(double)_nEvents<<" "
1051  <<endl;
1052  cout<<setw(20)<<_L1MuonTauName<<": "
1053  <<setw(7)<<_nEventsL1GTMuonTauPassed<<" "
1054  <<setprecision(2)<<setw(7)<<(double)_nEventsL1GTMuonTauPassed/(double)_nEvents<<" "
1055  <<setprecision(2)<<setw(16)<<(double)_nEventsL1GTMuonTauPassed/(double)_nfidEventsGenTauMuonTauHad<<" "
1056  <<setprecision(2)<<setw(8)<<(double)_nfidEventsGenTauMuonTauHad/(double)_nEvents<<" "
1057  <<setprecision(2)<<setw(7)<<(double)_nEventsGenTauMuonTauHad/(double)_nEvents<<" "
1058  <<endl;
1059  cout<<setw(20)<<_L1IsoEgTauName<<": "
1060  <<setw(7)<<_nEventsL1GTIsoEgTauPassed<<" "
1061  <<setprecision(2)<<setw(7)<<(double)_nEventsL1GTIsoEgTauPassed/(double)_nEvents<<" "
1062  <<setprecision(2)<<setw(16)<<(double)_nEventsL1GTIsoEgTauPassed/(double)_nfidEventsGenTauElecTauHad<<" "
1063  <<setprecision(2)<<setw(8)<<(double)_nfidEventsGenTauElecTauHad/(double)_nEvents<<" "
1064  <<setprecision(2)<<setw(7)<<(double)_nEventsGenTauElecTauHad/(double)_nEvents<<" "
1065  <<endl;
1066 
1067  cout<<endl;
1068 
1069 }
int _nfidEventsDoubleGenTauHads
int _nEventsL1GTIsoEgTauPassed
int _nEventsPFMatchGenTauElecTauHad
int _nEventsL1IsoEgTauPassedMCMatched
double _SingleTauThreshold
std::vector< double > _MuTauThresholds
int _nEventsL1GTDoubleTauPassed
std::string _L1SingleTauName
int _nEventsL1SingleTauPassedPFMCMatched
int _nEventsPFMatchGenTauHad
int _nfidEventsGenTauHad
int _nEventsGenTauMuonTauHad
int _nEventsL1SingleTauPassed
int _nEventsL1GTSingleTauPassed
int _nEventsL1GTSingleTauMETPassed
int _nEventsL1IsoEgTauPassedPFMCMatched
int _nEventsL1SingleTauMETPassedPFMCMatched
int _nEventsL1IsoEgTauPassed
int _nEventsGenTauElecTauHad
int _nfidEventsGenTauElecTauHad
int _nEventsL1DoubleTauPassedMCMatched
int _nEventsL1DoubleTauPassed
int _nEventsL1MuonTauPassedPFMCMatched
std::vector< double > _IsoEgTauThresholds
int _nEventsL1SingleTauMETPassed
int _nEventsPFMatchGenTauMuonTauHad
std::string _L1TauMETName
int _nEventsL1SingleTauMETPassedMCMatched
int _nEventsL1DoubleTauPassedPFMCMatched
std::string _L1MuonTauName
std::string _L1IsoEgTauName
int _nEventsL1MuonTauPassedMCMatched
int _nfidEventsGenTauMuonTauHad
int _nEventsDoubleGenTauHads
tuple cout
Definition: gather_cfg.py:121
double _DoubleTauThreshold
int _nEventsL1MuonTauPassed
int _nEventsPFMatchDoubleGenTauHads
int _nEventsL1SingleTauPassedMCMatched
std::string _L1DoubleTauName
std::vector< double > _SingleTauMETThresholds
int _nEventsL1GTMuonTauPassed

Member Data Documentation

int L1TauAnalyzer::_BosonPID
private

Definition at line 118 of file L1TauAnalyzer.h.

Referenced by getGenObjects(), and L1TauAnalyzer().

bool L1TauAnalyzer::_DoMCMatching
private

Definition at line 114 of file L1TauAnalyzer.h.

Referenced by analyze(), and L1TauAnalyzer().

bool L1TauAnalyzer::_DoPFTauMatching
private

Definition at line 115 of file L1TauAnalyzer.h.

Referenced by analyze(), and L1TauAnalyzer().

double L1TauAnalyzer::_DoubleTauThreshold
private
edm::EDGetTokenT<edm::HepMCProduct> L1TauAnalyzer::_GenParticleSource
private

Definition at line 101 of file L1TauAnalyzer.h.

Referenced by getGenObjects(), and L1TauAnalyzer().

std::vector<TLorentzVector> L1TauAnalyzer::_GenTauElecs
private

Definition at line 145 of file L1TauAnalyzer.h.

Referenced by calcL1MCPFTauMatching(), calcL1MCTauMatching(), and getGenObjects().

std::vector<TLorentzVector> L1TauAnalyzer::_GenTauHads
private
std::vector<TLorentzVector> L1TauAnalyzer::_GenTauMuons
private

Definition at line 144 of file L1TauAnalyzer.h.

Referenced by calcL1MCPFTauMatching(), calcL1MCTauMatching(), and getGenObjects().

std::vector<double> L1TauAnalyzer::_IsoEgTauThresholds
private
std::vector<TLorentzVector> L1TauAnalyzer::_L1CenJets
private

Definition at line 153 of file L1TauAnalyzer.h.

Referenced by getL1extraObjects().

std::string L1TauAnalyzer::_L1DoubleTauName
private

Definition at line 138 of file L1TauAnalyzer.h.

Referenced by evalL1Decisions(), L1TauAnalyzer(), and printTrigReport().

edm::EDGetTokenT<l1extra::L1JetParticleCollection> L1TauAnalyzer::_L1extraCenJetSource
private

Definition at line 104 of file L1TauAnalyzer.h.

Referenced by getL1extraObjects(), and L1TauAnalyzer().

edm::EDGetTokenT<l1extra::L1JetParticleCollection> L1TauAnalyzer::_L1extraForJetSource
private

Definition at line 105 of file L1TauAnalyzer.h.

Referenced by getL1extraObjects(), and L1TauAnalyzer().

edm::EDGetTokenT<l1extra::L1EmParticleCollection> L1TauAnalyzer::_L1extraIsoEgammaSource
private

Definition at line 107 of file L1TauAnalyzer.h.

Referenced by getL1extraObjects(), and L1TauAnalyzer().

edm::EDGetTokenT<l1extra::L1EtMissParticleCollection> L1TauAnalyzer::_L1extraMETSource
private

Definition at line 108 of file L1TauAnalyzer.h.

Referenced by getL1extraObjects(), and L1TauAnalyzer().

edm::EDGetTokenT<l1extra::L1MuonParticleCollection> L1TauAnalyzer::_L1extraMuonSource
private

Definition at line 109 of file L1TauAnalyzer.h.

Referenced by getL1extraObjects(), and L1TauAnalyzer().

edm::EDGetTokenT<l1extra::L1EmParticleCollection> L1TauAnalyzer::_L1extraNonIsoEgammaSource
private

Definition at line 106 of file L1TauAnalyzer.h.

Referenced by getL1extraObjects(), and L1TauAnalyzer().

edm::EDGetTokenT<l1extra::L1JetParticleCollection> L1TauAnalyzer::_L1extraTauJetSource
private

Definition at line 103 of file L1TauAnalyzer.h.

Referenced by getL1extraObjects(), and L1TauAnalyzer().

std::vector<TLorentzVector> L1TauAnalyzer::_L1ForJets
private

Definition at line 154 of file L1TauAnalyzer.h.

Referenced by getL1extraObjects().

edm::EDGetTokenT<L1GlobalTriggerObjectMapRecord> L1TauAnalyzer::_L1GtObjectMap
private

Definition at line 112 of file L1TauAnalyzer.h.

Referenced by evalL1Decisions(), and L1TauAnalyzer().

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> L1TauAnalyzer::_L1GtReadoutRecord
private

Definition at line 111 of file L1TauAnalyzer.h.

Referenced by evalL1Decisions(), and L1TauAnalyzer().

std::vector<TLorentzVector> L1TauAnalyzer::_L1IsoEgammas
private
std::string L1TauAnalyzer::_L1IsoEgTauName
private

Definition at line 141 of file L1TauAnalyzer.h.

Referenced by evalL1Decisions(), L1TauAnalyzer(), and printTrigReport().

double L1TauAnalyzer::_L1MCTauMinDeltaR
private

Definition at line 121 of file L1TauAnalyzer.h.

Referenced by calcL1MCPFTauMatching(), calcL1MCTauMatching(), and L1TauAnalyzer().

std::vector<TLorentzVector> L1TauAnalyzer::_L1METs
private
std::vector<TLorentzVector> L1TauAnalyzer::_L1Muons
private
std::string L1TauAnalyzer::_L1MuonTauName
private

Definition at line 140 of file L1TauAnalyzer.h.

Referenced by evalL1Decisions(), L1TauAnalyzer(), and printTrigReport().

std::vector<int> L1TauAnalyzer::_L1MuQuals
private
std::vector<TLorentzVector> L1TauAnalyzer::_L1NonIsoEgammas
private

Definition at line 155 of file L1TauAnalyzer.h.

Referenced by getL1extraObjects().

std::string L1TauAnalyzer::_L1SingleTauName
private

Definition at line 137 of file L1TauAnalyzer.h.

Referenced by evalL1Decisions(), L1TauAnalyzer(), and printTrigReport().

std::string L1TauAnalyzer::_L1TauMETName
private

Definition at line 139 of file L1TauAnalyzer.h.

Referenced by evalL1Decisions(), L1TauAnalyzer(), and printTrigReport().

std::vector<TLorentzVector> L1TauAnalyzer::_L1Taus
private
double L1TauAnalyzer::_MCTauHadMaxAbsEta
private
double L1TauAnalyzer::_MCTauHadMinEt
private
std::vector<double> L1TauAnalyzer::_MuTauThresholds
private
int L1TauAnalyzer::_nEvents
private

Definition at line 228 of file L1TauAnalyzer.h.

Referenced by analyze(), beginJob(), endJob(), and printTrigReport().

int L1TauAnalyzer::_nEventsDoubleGenTauHads
private

Definition at line 231 of file L1TauAnalyzer.h.

Referenced by beginJob(), getGenObjects(), and printTrigReport().

int L1TauAnalyzer::_nEventsGenTauElecTauHad
private

Definition at line 233 of file L1TauAnalyzer.h.

Referenced by beginJob(), getGenObjects(), and printTrigReport().

int L1TauAnalyzer::_nEventsGenTauHad
private

Definition at line 230 of file L1TauAnalyzer.h.

Referenced by beginJob(), getGenObjects(), and printTrigReport().

int L1TauAnalyzer::_nEventsGenTauMuonTauHad
private

Definition at line 232 of file L1TauAnalyzer.h.

Referenced by beginJob(), getGenObjects(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1DoubleTauPassed
private

Definition at line 249 of file L1TauAnalyzer.h.

Referenced by beginJob(), evalL1extraDecisions(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1DoubleTauPassedMCMatched
private

Definition at line 250 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1DoubleTauPassedPFMCMatched
private

Definition at line 251 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1GTDoubleTauPassed
private

Definition at line 267 of file L1TauAnalyzer.h.

Referenced by beginJob(), evalL1Decisions(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1GTIsoEgTauPassed
private

Definition at line 270 of file L1TauAnalyzer.h.

Referenced by beginJob(), evalL1Decisions(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1GTMuonTauPassed
private

Definition at line 269 of file L1TauAnalyzer.h.

Referenced by beginJob(), evalL1Decisions(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1GTSingleTauMETPassed
private

Definition at line 268 of file L1TauAnalyzer.h.

Referenced by beginJob(), evalL1Decisions(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1GTSingleTauPassed
private

Definition at line 266 of file L1TauAnalyzer.h.

Referenced by beginJob(), evalL1Decisions(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1IsoEgTauPassed
private

Definition at line 261 of file L1TauAnalyzer.h.

Referenced by beginJob(), evalL1extraDecisions(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1IsoEgTauPassedMCMatched
private

Definition at line 262 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1IsoEgTauPassedPFMCMatched
private

Definition at line 263 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1MuonTauPassed
private

Definition at line 257 of file L1TauAnalyzer.h.

Referenced by beginJob(), evalL1extraDecisions(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1MuonTauPassedMCMatched
private

Definition at line 258 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1MuonTauPassedPFMCMatched
private

Definition at line 259 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1SingleTauMETPassed
private

Definition at line 253 of file L1TauAnalyzer.h.

Referenced by beginJob(), evalL1extraDecisions(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1SingleTauMETPassedMCMatched
private

Definition at line 254 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1SingleTauMETPassedPFMCMatched
private

Definition at line 255 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1SingleTauPassed
private

Definition at line 245 of file L1TauAnalyzer.h.

Referenced by beginJob(), evalL1extraDecisions(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1SingleTauPassedMCMatched
private

Definition at line 246 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nEventsL1SingleTauPassedPFMCMatched
private

Definition at line 247 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nEventsPFMatchDoubleGenTauHads
private

Definition at line 241 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), endJob(), and printTrigReport().

int L1TauAnalyzer::_nEventsPFMatchGenTauElecTauHad
private

Definition at line 243 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nEventsPFMatchGenTauHad
private

Definition at line 240 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), endJob(), and printTrigReport().

int L1TauAnalyzer::_nEventsPFMatchGenTauMuonTauHad
private

Definition at line 242 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and printTrigReport().

int L1TauAnalyzer::_nfidEventsDoubleGenTauHads
private

Definition at line 236 of file L1TauAnalyzer.h.

Referenced by beginJob(), endJob(), getGenObjects(), and printTrigReport().

int L1TauAnalyzer::_nfidEventsGenTauElecTauHad
private

Definition at line 238 of file L1TauAnalyzer.h.

Referenced by beginJob(), getGenObjects(), and printTrigReport().

int L1TauAnalyzer::_nfidEventsGenTauHad
private

Definition at line 235 of file L1TauAnalyzer.h.

Referenced by beginJob(), endJob(), getGenObjects(), and printTrigReport().

int L1TauAnalyzer::_nfidEventsGenTauMuonTauHad
private

Definition at line 237 of file L1TauAnalyzer.h.

Referenced by beginJob(), getGenObjects(), and printTrigReport().

double L1TauAnalyzer::_PFMCTauMinDeltaR
private

Definition at line 125 of file L1TauAnalyzer.h.

Referenced by calcL1MCPFTauMatching(), and L1TauAnalyzer().

edm::EDGetTokenT<reco::PFTauDiscriminatorByIsolation> L1TauAnalyzer::_PFTauDiscriminatorSource
private

Definition at line 100 of file L1TauAnalyzer.h.

Referenced by getPFTauObjects(), and L1TauAnalyzer().

double L1TauAnalyzer::_PFTauMaxAbsEta
private

Definition at line 127 of file L1TauAnalyzer.h.

Referenced by calcL1MCPFTauMatching(), and L1TauAnalyzer().

double L1TauAnalyzer::_PFTauMinEt
private

Definition at line 126 of file L1TauAnalyzer.h.

Referenced by calcL1MCPFTauMatching(), and L1TauAnalyzer().

std::vector<TLorentzVector> L1TauAnalyzer::_PFTaus
private

Definition at line 149 of file L1TauAnalyzer.h.

Referenced by calcL1MCPFTauMatching(), fillPFTauHistograms(), and getPFTauObjects().

edm::EDGetTokenT<reco::PFTauCollection> L1TauAnalyzer::_PFTauSource
private

Definition at line 99 of file L1TauAnalyzer.h.

Referenced by getPFTauObjects(), and L1TauAnalyzer().

std::vector<double> L1TauAnalyzer::_SingleTauMETThresholds
private
double L1TauAnalyzer::_SingleTauThreshold
private
TH1* L1TauAnalyzer::h_EffMCPFTauEt
private

Definition at line 204 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_EffMCPFTauEta
private

Definition at line 205 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_EffMCPFTauPhi
private

Definition at line 206 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_EffMCTauEt
private

Definition at line 191 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_EffMCTauEta
private

Definition at line 192 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_EffMCTauPhi
private

Definition at line 193 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_GenTauHadEt
private

Definition at line 176 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillGenHistograms().

TH1* L1TauAnalyzer::h_GenTauHadEta
private

Definition at line 177 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillGenHistograms().

TH1* L1TauAnalyzer::h_GenTauHadPhi
private

Definition at line 178 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillGenHistograms().

TH1* L1TauAnalyzer::h_L1DoubleTauEffEt
private

Definition at line 221 of file L1TauAnalyzer.h.

Referenced by beginJob(), endJob(), and evalL1extraDecisions().

TH1* L1TauAnalyzer::h_L1DoubleTauEffMCMatchEt
private

Definition at line 223 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_L1DoubleTauEffPFMCMatchEt
private

Definition at line 225 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_L1MCMatchedTauEt
private

Definition at line 195 of file L1TauAnalyzer.h.

Referenced by beginJob(), and calcL1MCTauMatching().

TH1* L1TauAnalyzer::h_L1MCMatchedTauEta
private

Definition at line 196 of file L1TauAnalyzer.h.

Referenced by beginJob(), and calcL1MCTauMatching().

TH1* L1TauAnalyzer::h_L1MCMatchedTauPhi
private

Definition at line 197 of file L1TauAnalyzer.h.

Referenced by beginJob(), and calcL1MCTauMatching().

TH1* L1TauAnalyzer::h_L1MCPFMatchedTauEt
private

Definition at line 208 of file L1TauAnalyzer.h.

Referenced by beginJob(), and calcL1MCPFTauMatching().

TH1* L1TauAnalyzer::h_L1MCPFMatchedTauEta
private

Definition at line 209 of file L1TauAnalyzer.h.

Referenced by beginJob(), and calcL1MCPFTauMatching().

TH1* L1TauAnalyzer::h_L1MCPFMatchedTauPhi
private

Definition at line 210 of file L1TauAnalyzer.h.

Referenced by beginJob(), and calcL1MCPFTauMatching().

TH1* L1TauAnalyzer::h_L1MCTauDeltaR
private

Definition at line 186 of file L1TauAnalyzer.h.

Referenced by beginJob(), and calcL1MCTauMatching().

TH1* L1TauAnalyzer::h_L1minusMCoverMCTauEt
private

Definition at line 188 of file L1TauAnalyzer.h.

Referenced by beginJob(), and calcL1MCTauMatching().

TH1* L1TauAnalyzer::h_L1minusMCTauEt
private

Definition at line 187 of file L1TauAnalyzer.h.

Referenced by beginJob(), and calcL1MCTauMatching().

TH1* L1TauAnalyzer::h_L1SingleTauEffEt
private

Definition at line 220 of file L1TauAnalyzer.h.

Referenced by beginJob(), endJob(), and evalL1extraDecisions().

TH1* L1TauAnalyzer::h_L1SingleTauEffMCMatchEt
private

Definition at line 222 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_L1SingleTauEffPFMCMatchEt
private

Definition at line 224 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_L1Tau1Et
private

Definition at line 167 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillL1Histograms().

TH1* L1TauAnalyzer::h_L1Tau1Eta
private

Definition at line 168 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillL1Histograms().

TH1* L1TauAnalyzer::h_L1Tau1Phi
private

Definition at line 169 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillL1Histograms().

TH1* L1TauAnalyzer::h_L1Tau2Et
private

Definition at line 171 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillL1Histograms().

TH1* L1TauAnalyzer::h_L1Tau2Eta
private

Definition at line 172 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillL1Histograms().

TH1* L1TauAnalyzer::h_L1Tau2Phi
private

Definition at line 173 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillL1Histograms().

TH1* L1TauAnalyzer::h_L1TauEt
private

Definition at line 163 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillL1Histograms().

TH1* L1TauAnalyzer::h_L1TauEta
private

Definition at line 164 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillL1Histograms().

TH1* L1TauAnalyzer::h_L1TauPhi
private

Definition at line 165 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillL1Histograms().

TH1* L1TauAnalyzer::h_MCPFTauHadEt
private

Definition at line 212 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_MCPFTauHadEta
private

Definition at line 213 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_MCPFTauHadPhi
private

Definition at line 214 of file L1TauAnalyzer.h.

Referenced by beginJob(), calcL1MCPFTauMatching(), and endJob().

TH1* L1TauAnalyzer::h_MCTauHadEt
private

Definition at line 199 of file L1TauAnalyzer.h.

Referenced by beginJob(), endJob(), and fillGenHistograms().

TH1* L1TauAnalyzer::h_MCTauHadEta
private

Definition at line 200 of file L1TauAnalyzer.h.

Referenced by beginJob(), endJob(), and fillGenHistograms().

TH1* L1TauAnalyzer::h_MCTauHadPhi
private

Definition at line 201 of file L1TauAnalyzer.h.

Referenced by beginJob(), endJob(), and fillGenHistograms().

TH1* L1TauAnalyzer::h_PFMCTauDeltaR
private

Definition at line 216 of file L1TauAnalyzer.h.

Referenced by beginJob(), and calcL1MCPFTauMatching().

TH1* L1TauAnalyzer::h_PFTauEt
private

Definition at line 181 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillPFTauHistograms().

TH1* L1TauAnalyzer::h_PFTauEta
private

Definition at line 182 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillPFTauHistograms().

TH1* L1TauAnalyzer::h_PFTauPhi
private

Definition at line 183 of file L1TauAnalyzer.h.

Referenced by beginJob(), and fillPFTauHistograms().