CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
WenuPlots Class Reference

#include <WenuPlots.h>

Inheritance diagram for WenuPlots:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 WenuPlots (const edm::ParameterSet &)
 
 ~WenuPlots () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
Bool_t CheckCut (const pat::Electron *wenu, Int_t i)
 
Bool_t CheckCutInv (const pat::Electron *wenu, Int_t i)
 
Bool_t CheckCuts (const pat::Electron *ele)
 
Bool_t CheckCutsInverse (const pat::Electron *ele)
 
Bool_t CheckCutsNminusOne (const pat::Electron *ele, Int_t jj)
 
void endJob () override
 
Bool_t PassPreselectionCriteria (const pat::Electron *ele)
 
Double_t ReturnCandVar (const pat::Electron *ele, Int_t i)
 

Private Attributes

Float_t calojet_et [5]
 
Float_t calojet_eta [5]
 
Float_t calojet_phi [5]
 
edm::InputTag caloJetCollectionTag_
 
edm::EDGetTokenT< reco::CaloJetCollectioncaloJetCollectionToken_
 
Double_t cIso_EB_
 
Bool_t cIso_EB_inv
 
Double_t cIso_EE_
 
Bool_t cIso_EE_inv
 
std::vector< Double_t > CutVars_
 
Int_t DatasetTag_
 
Double_t deta_EB_
 
Bool_t deta_EB_inv
 
Double_t deta_EE_
 
Bool_t deta_EE_inv
 
Double_t dphi_EB_
 
Bool_t dphi_EB_inv
 
Double_t dphi_EE_
 
Bool_t dphi_EE_inv
 
Double_t DRJetFromElectron_
 
Double_t ecalIso_EB_
 
Bool_t ecalIso_EB_inv
 
Double_t ecalIso_EE_
 
Bool_t ecalIso_EE_inv
 
Double_t ecalIsoUser_EB_
 
Bool_t ecalIsoUser_EB_inv
 
Double_t ecalIsoUser_EE_
 
Bool_t ecalIsoUser_EE_inv
 
Float_t ele2nd_cand_et
 
Float_t ele2nd_cand_eta
 
Float_t ele2nd_cand_phi
 
Float_t ele2nd_cr_dcot
 
Float_t ele2nd_cr_dist
 
Int_t ele2nd_cr_mhitsinner
 
Int_t ele2nd_ctfCharge
 
Int_t ele2nd_ecalDriven
 
Float_t ele2nd_eop
 
Int_t ele2nd_gsfCharge
 
Float_t ele2nd_hltmatched_dr
 
Float_t ele2nd_id_deta
 
Float_t ele2nd_id_dphi
 
Float_t ele2nd_id_hoe
 
Float_t ele2nd_id_sihih
 
Float_t ele2nd_iso_ecal
 
Float_t ele2nd_iso_hcal
 
Float_t ele2nd_iso_track
 
Int_t ele2nd_passes_selection
 
Float_t ele2nd_pin
 
Float_t ele2nd_pout
 
Float_t ele2nd_sc_eta
 
Float_t ele2nd_sc_gsf_et
 
Float_t ele2nd_sc_phi
 
Float_t ele2nd_sc_rho
 
Int_t ele2nd_scPixCharge
 
Float_t ele2nd_tip_bs
 
Float_t ele2nd_tip_pv
 
Float_t ele2nd_tip_pvbs
 
Float_t ele2nd_vx
 
Float_t ele2nd_vy
 
Float_t ele2nd_vz
 
Float_t ele_cand_et
 
Float_t ele_cand_eta
 
Float_t ele_cand_phi
 
Float_t ele_cr_dcot
 
Float_t ele_cr_dist
 
Int_t ele_cr_mhitsinner
 
Int_t ele_ctfCharge
 
Float_t ele_eop
 
Int_t ele_gsfCharge
 
Float_t ele_hltmatched_dr
 
Float_t ele_id_deta
 
Float_t ele_id_dphi
 
Float_t ele_id_hoe
 
Float_t ele_id_sihih
 
Float_t ele_iso_ecal
 
Float_t ele_iso_hcal
 
Float_t ele_iso_track
 
Float_t ele_pin
 
Float_t ele_pout
 
Float_t ele_sc_energy
 
Float_t ele_sc_eta
 
Float_t ele_sc_gsf_et
 
Float_t ele_sc_phi
 
Float_t ele_sc_rho
 
Int_t ele_scPixCharge
 
Float_t ele_tip_bs
 
Float_t ele_tip_pv
 
Float_t ele_tip_pvbs
 
Float_t ele_vx
 
Float_t ele_vy
 
Float_t ele_vz
 
Double_t eop_EB_
 
Bool_t eop_EB_inv
 
Double_t eop_EE_
 
Bool_t eop_EE_inv
 
Float_t event_caloMET
 
Float_t event_caloMET_phi
 
Float_t event_caloMT
 
Float_t event_caloSumEt
 
Int_t event_datasetTag
 
Float_t event_pfMET
 
Float_t event_pfMET_phi
 
Float_t event_pfMT
 
Float_t event_pfSumEt
 
Float_t event_tcMET
 
Float_t event_tcMET_phi
 
Float_t event_tcMT
 
Float_t event_tcSumEt
 
Int_t event_triggerDecision
 
Long64_t eventNumber
 
TH1F * h_EB_deta
 
TH1F * h_EB_dphi
 
TH1F * h_EB_ecaliso
 
TH1F * h_EB_hcaliso
 
TH1F * h_EB_HoE
 
TH1F * h_EB_sIetaIeta
 
TH1F * h_EB_trkiso
 
TH1F * h_EE_deta
 
TH1F * h_EE_dphi
 
TH1F * h_EE_ecaliso
 
TH1F * h_EE_hcaliso
 
TH1F * h_EE_HoE
 
TH1F * h_EE_sIetaIeta
 
TH1F * h_EE_trkiso
 
TH1F * h_met
 
TH1F * h_met_EB
 
TH1F * h_met_EE
 
TH1F * h_met_inverse
 
TH1F * h_met_inverse_EB
 
TH1F * h_met_inverse_EE
 
TH1F * h_mt
 
TH1F * h_mt_EB
 
TH1F * h_mt_EE
 
TH1F * h_mt_inverse
 
TH1F * h_mt_inverse_EB
 
TH1F * h_mt_inverse_EE
 
TH1F * h_scEt
 
TH1F * h_scEta
 
TH1F * h_scPhi
 
TH1F * h_trackIso_eb_NmOne
 
TH1F * h_trackIso_ee_NmOne
 
Double_t hcalIso_EB_
 
Bool_t hcalIso_EB_inv
 
Double_t hcalIso_EE_
 
Bool_t hcalIso_EE_inv
 
Double_t hcalIsoUser_EB_
 
Bool_t hcalIsoUser_EB_inv
 
Double_t hcalIsoUser_EE_
 
Bool_t hcalIsoUser_EE_inv
 
TFile * histofile
 
Double_t hoe_EB_
 
Bool_t hoe_EB_inv
 
Double_t hoe_EE_
 
Bool_t hoe_EE_inv
 
Bool_t includeJetInformationInNtuples_
 
std::vector< Bool_t > InvVars_
 
Int_t lumiSection
 
Int_t maxNumberOfExpectedMissingHits_
 
Int_t nBarrelVars_
 
std::string outputFile_
 
Float_t pfjet_et [5]
 
Float_t pfjet_eta [5]
 
Float_t pfjet_phi [5]
 
edm::InputTag pfJetCollectionTag_
 
edm::EDGetTokenT< reco::PFJetCollectionpfJetCollectionToken_
 
edm::EDGetTokenT< std::vector< reco::Vertex > > PrimaryVerticesCollectionBSToken_
 
edm::EDGetTokenT< std::vector< reco::Vertex > > PrimaryVerticesCollectionToken_
 
Float_t pv_x
 
Float_t pv_y
 
Float_t pv_z
 
Float_t pvbs_x
 
Float_t pvbs_y
 
Float_t pvbs_z
 
Int_t runNumber
 
Double_t sihih_EB_
 
Bool_t sihih_EB_inv
 
Double_t sihih_EE_
 
Bool_t sihih_EE_inv
 
Bool_t storeAllSecondElectronVariables_
 
Bool_t storeExtraInformation_
 
Double_t tip_bspot_EB_
 
Bool_t tip_bspot_EB_inv
 
Double_t tip_bspot_EE_
 
Bool_t tip_bspot_EE_inv
 
Double_t trackIso_EB_
 
Bool_t trackIso_EB_inv
 
Double_t trackIso_EE_
 
Bool_t trackIso_EE_inv
 
Double_t trackIsoUser_EB_
 
Bool_t trackIsoUser_EB_inv
 
Double_t trackIsoUser_EE_
 
Bool_t trackIsoUser_EE_inv
 
Bool_t useConversionRejection_
 
Bool_t useExpectedMissingHits_
 
Bool_t usePrecalcID_
 
std::string usePrecalcIDSign_
 
std::string usePrecalcIDType_
 
Double_t usePrecalcIDValue_
 
Bool_t usePreselection_
 
Bool_t useValidFirstPXBHit_
 
TTree * vbtfPresele_tree
 
TTree * vbtfSele_tree
 
std::vector< Float_t > VtxNormalizedChi2
 
std::vector< Float_t > VtxNormalizedChi2BS
 
std::vector< Int_t > VtxTracksSize
 
std::vector< Int_t > VtxTracksSizeBS
 
TFile * WENU_VBTFpreseleFile_
 
std::string WENU_VBTFpreseleFileName_
 
TFile * WENU_VBTFselectionFile_
 
std::string WENU_VBTFselectionFileName_
 
edm::EDGetTokenT< pat::CompositeCandidateCollectionwenuCollectionToken_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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

Definition at line 38 of file WenuPlots.h.

Constructor & Destructor Documentation

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

Definition at line 55 of file WenuPlots.cc.

References caloJetCollectionTag_, caloJetCollectionToken_, cIso_EB_, cIso_EB_inv, cIso_EE_, cIso_EE_inv, gather_cfg::cout, DatasetTag_, deta_EB_, deta_EB_inv, deta_EE_, deta_EE_inv, dphi_EB_, dphi_EB_inv, dphi_EE_, dphi_EE_inv, DRJetFromElectron_, ecalIso_EB_, ecalIso_EB_inv, ecalIso_EE_, ecalIso_EE_inv, ecalIsoUser_EB_, ecalIsoUser_EB_inv, ecalIsoUser_EE_, ecalIsoUser_EE_inv, eop_EB_, eop_EB_inv, eop_EE_, eop_EE_inv, edm::ParameterSet::getUntrackedParameter(), hcalIso_EB_, hcalIso_EB_inv, hcalIso_EE_, hcalIso_EE_inv, hcalIsoUser_EB_, hcalIsoUser_EB_inv, hcalIsoUser_EE_, hcalIsoUser_EE_inv, hoe_EB_, hoe_EB_inv, hoe_EE_, hoe_EE_inv, includeJetInformationInNtuples_, HLT_2018_cff::InputTag, maxNumberOfExpectedMissingHits_, outputFile_, pfJetCollectionTag_, pfJetCollectionToken_, PrimaryVerticesCollectionBSToken_, PrimaryVerticesCollectionToken_, sihih_EB_, sihih_EB_inv, sihih_EE_, sihih_EE_inv, storeAllSecondElectronVariables_, storeExtraInformation_, AlCaHLTBitMon_QueryRunRegistry::string, tip_bspot_EB_, tip_bspot_EB_inv, tip_bspot_EE_, tip_bspot_EE_inv, trackIso_EB_, trackIso_EB_inv, trackIso_EE_, trackIso_EE_inv, trackIsoUser_EB_, trackIsoUser_EB_inv, trackIsoUser_EE_, trackIsoUser_EE_inv, useConversionRejection_, useExpectedMissingHits_, usePrecalcID_, usePrecalcIDSign_, usePrecalcIDType_, usePrecalcIDValue_, usePreselection_, useValidFirstPXBHit_, WENU_VBTFpreseleFileName_, WENU_VBTFselectionFileName_, and wenuCollectionToken_.

57 {
59  // I N P U T P A R A M E T E R S
61  //
63  // WENU COLLECTION //////////////////////////////////////////////////////
64  //
65 
67  consumes<pat::CompositeCandidateCollection>(iConfig.getUntrackedParameter<edm::InputTag>("wenuCollectionTag"));
68  //
69  // code parameters
70  //
71  std::string outputFile_D = "histos.root";
72  outputFile_ = iConfig.getUntrackedParameter<std::string>("outputFile", outputFile_D);
73  WENU_VBTFselectionFileName_ = iConfig.getUntrackedParameter<std::string>("WENU_VBTFselectionFileName");
74  WENU_VBTFpreseleFileName_ = iConfig.getUntrackedParameter<std::string>("WENU_VBTFpreseleFileName");
75  DatasetTag_ = iConfig.getUntrackedParameter<Int_t>("DatasetTag");
76  //
77  // use of precalculatedID
78  // if you use it, then no other cuts are applied
79  usePrecalcID_ = iConfig.getUntrackedParameter<Bool_t>("usePrecalcID", false);
80  if (usePrecalcID_) {
81  usePrecalcIDType_ = iConfig.getUntrackedParameter<std::string>("usePrecalcIDType");
82  usePrecalcIDSign_ = iConfig.getUntrackedParameter<std::string>("usePrecalcIDSign", "=");
83  usePrecalcIDValue_ = iConfig.getUntrackedParameter<Double_t>("usePrecalcIDValue");
84  }
85  useValidFirstPXBHit_ = iConfig.getUntrackedParameter<Bool_t>("useValidFirstPXBHit", false);
86  useConversionRejection_ = iConfig.getUntrackedParameter<Bool_t>("useConversionRejection", false);
87  useExpectedMissingHits_ = iConfig.getUntrackedParameter<Bool_t>("useExpectedMissingHits", false);
88 
89  maxNumberOfExpectedMissingHits_ = iConfig.getUntrackedParameter<Int_t>("maxNumberOfExpectedMissingHits", 1);
90  if (not usePrecalcID_) {
91  if (useValidFirstPXBHit_)
92  std::cout << "WenuPlots: Warning: you have demanded a valid 1st layer PXB hit" << std::endl;
93  if (useConversionRejection_)
94  std::cout << "WenuPlots: Warning: you have demanded egamma conversion rejection criteria to be applied"
95  << std::endl;
96  if (useExpectedMissingHits_)
97  std::cout << "WenuPlots: Warning: you have demanded at most " << maxNumberOfExpectedMissingHits_
98  << " missing inner hits " << std::endl;
99  } else {
100  std::cout << "WenuPlots: Using Precalculated ID with type " << usePrecalcIDType_ << usePrecalcIDSign_
101  << usePrecalcIDValue_ << std::endl;
102  }
103  if ((useValidFirstPXBHit_ || useExpectedMissingHits_ || useConversionRejection_) && (not usePrecalcID_)) {
104  usePreselection_ = true;
105  } else {
106  usePreselection_ = false;
107  }
108  includeJetInformationInNtuples_ = iConfig.getUntrackedParameter<Bool_t>("includeJetInformationInNtuples", false);
110  caloJetCollectionTag_ = iConfig.getUntrackedParameter<edm::InputTag>("caloJetCollectionTag");
111  caloJetCollectionToken_ = consumes<reco::CaloJetCollection>(caloJetCollectionTag_);
112  pfJetCollectionTag_ = iConfig.getUntrackedParameter<edm::InputTag>("pfJetCollectionTag");
113  pfJetCollectionToken_ = consumes<reco::PFJetCollection>(pfJetCollectionTag_);
114  DRJetFromElectron_ = iConfig.getUntrackedParameter<Double_t>("DRJetFromElectron");
115  }
116  storeExtraInformation_ = iConfig.getUntrackedParameter<Bool_t>("storeExtraInformation");
117  storeAllSecondElectronVariables_ = iConfig.getUntrackedParameter<Bool_t>("storeAllSecondElectronVariables", false);
118  // primary vtx collections
119  PrimaryVerticesCollectionToken_ = consumes<std::vector<reco::Vertex> >(iConfig.getUntrackedParameter<edm::InputTag>(
120  "PrimaryVerticesCollection", edm::InputTag("offlinePrimaryVertices")));
121  PrimaryVerticesCollectionBSToken_ = consumes<std::vector<reco::Vertex> >(iConfig.getUntrackedParameter<edm::InputTag>(
122  "PrimaryVerticesCollectionBS", edm::InputTag("offlinePrimaryVerticesWithBS")));
123  //
124  // the selection cuts:
125  trackIso_EB_ = iConfig.getUntrackedParameter<Double_t>("trackIso_EB", 1000.);
126  ecalIso_EB_ = iConfig.getUntrackedParameter<Double_t>("ecalIso_EB", 1000.);
127  hcalIso_EB_ = iConfig.getUntrackedParameter<Double_t>("hcalIso_EB", 1000.);
128  //
129  trackIso_EE_ = iConfig.getUntrackedParameter<Double_t>("trackIso_EE", 1000.);
130  ecalIso_EE_ = iConfig.getUntrackedParameter<Double_t>("ecalIso_EE", 1000.);
131  hcalIso_EE_ = iConfig.getUntrackedParameter<Double_t>("hcalIso_EE", 1000.);
132  //
133  sihih_EB_ = iConfig.getUntrackedParameter<Double_t>("sihih_EB");
134  dphi_EB_ = iConfig.getUntrackedParameter<Double_t>("dphi_EB");
135  deta_EB_ = iConfig.getUntrackedParameter<Double_t>("deta_EB");
136  hoe_EB_ = iConfig.getUntrackedParameter<Double_t>("hoe_EB");
137  cIso_EB_ = iConfig.getUntrackedParameter<Double_t>("cIso_EB", 1000.);
138  tip_bspot_EB_ = iConfig.getUntrackedParameter<Double_t>("tip_bspot_EB", 1000.);
139  eop_EB_ = iConfig.getUntrackedParameter<Double_t>("eop_EB", 1000.);
140  //
141  sihih_EE_ = iConfig.getUntrackedParameter<Double_t>("sihih_EE");
142  dphi_EE_ = iConfig.getUntrackedParameter<Double_t>("dphi_EE");
143  deta_EE_ = iConfig.getUntrackedParameter<Double_t>("deta_EE");
144  hoe_EE_ = iConfig.getUntrackedParameter<Double_t>("hoe_EE");
145  cIso_EE_ = iConfig.getUntrackedParameter<Double_t>("cIso_EE", 1000.);
146  tip_bspot_EE_ = iConfig.getUntrackedParameter<Double_t>("tip_bspot_EE", 1000.);
147  eop_EE_ = iConfig.getUntrackedParameter<Double_t>("eop_EE", 1000.);
148  //
149  trackIsoUser_EB_ = iConfig.getUntrackedParameter<Double_t>("trackIsoUser_EB", 1000.);
150  ecalIsoUser_EB_ = iConfig.getUntrackedParameter<Double_t>("ecalIsoUser_EB", 1000.);
151  hcalIsoUser_EB_ = iConfig.getUntrackedParameter<Double_t>("hcalIsoUser_EB", 1000.);
152  trackIsoUser_EE_ = iConfig.getUntrackedParameter<Double_t>("trackIsoUser_EE", 1000.);
153  ecalIsoUser_EE_ = iConfig.getUntrackedParameter<Double_t>("ecalIsoUser_EE", 1000.);
154  hcalIsoUser_EE_ = iConfig.getUntrackedParameter<Double_t>("hcalIsoUser_EE", 1000.);
155  //
156  trackIso_EB_inv = iConfig.getUntrackedParameter<Bool_t>("trackIso_EB_inv", false);
157  ecalIso_EB_inv = iConfig.getUntrackedParameter<Bool_t>("ecalIso_EB_inv", false);
158  hcalIso_EB_inv = iConfig.getUntrackedParameter<Bool_t>("hcalIso_EB_inv", false);
159  //
160  trackIso_EE_inv = iConfig.getUntrackedParameter<Bool_t>("trackIso_EE_inv", false);
161  ecalIso_EE_inv = iConfig.getUntrackedParameter<Bool_t>("ecalIso_EE_inv", false);
162  hcalIso_EE_inv = iConfig.getUntrackedParameter<Bool_t>("hcalIso_EE_inv", false);
163  //
164  sihih_EB_inv = iConfig.getUntrackedParameter<Bool_t>("sihih_EB_inv", false);
165  dphi_EB_inv = iConfig.getUntrackedParameter<Bool_t>("dphi_EB_inv", false);
166  deta_EB_inv = iConfig.getUntrackedParameter<Bool_t>("deta_EB_inv", false);
167  hoe_EB_inv = iConfig.getUntrackedParameter<Bool_t>("hoe_EB_inv", false);
168  cIso_EB_inv = iConfig.getUntrackedParameter<Bool_t>("cIso_EB_inv", false);
169  tip_bspot_EB_inv = iConfig.getUntrackedParameter<Bool_t>("tip_bspot_EB_inv", false);
170  eop_EB_inv = iConfig.getUntrackedParameter<Bool_t>("eop_EB_inv", false);
171  //
172  sihih_EE_inv = iConfig.getUntrackedParameter<Bool_t>("sihih_EE_inv", false);
173  dphi_EE_inv = iConfig.getUntrackedParameter<Bool_t>("dphi_EE_inv", false);
174  deta_EE_inv = iConfig.getUntrackedParameter<Bool_t>("deta_EE_inv", false);
175  hoe_EE_inv = iConfig.getUntrackedParameter<Bool_t>("hoe_EE_inv", false);
176  cIso_EE_inv = iConfig.getUntrackedParameter<Bool_t>("cIso_EE_inv", false);
177  tip_bspot_EE_inv = iConfig.getUntrackedParameter<Bool_t>("tip_bspot_EE_inv", false);
178  eop_EE_inv = iConfig.getUntrackedParameter<Bool_t>("eop_EE_inv", false);
179  //
180  trackIsoUser_EB_inv = iConfig.getUntrackedParameter<Bool_t>("trackIsoUser_EB_inv", false);
181  ecalIsoUser_EB_inv = iConfig.getUntrackedParameter<Bool_t>("ecalIsoUser_EB_inv", false);
182  hcalIsoUser_EB_inv = iConfig.getUntrackedParameter<Bool_t>("hcalIsoUser_EB_inv", false);
183  trackIsoUser_EE_inv = iConfig.getUntrackedParameter<Bool_t>("trackIsoUser_EE_inv", false);
184  ecalIsoUser_EE_inv = iConfig.getUntrackedParameter<Bool_t>("ecalIsoUser_EE_inv", false);
185  hcalIsoUser_EE_inv = iConfig.getUntrackedParameter<Bool_t>("hcalIsoUser_EE_inv", false);
186 }
Double_t trackIsoUser_EB_
Definition: WenuPlots.h:146
T getUntrackedParameter(std::string const &, T const &) const
Int_t maxNumberOfExpectedMissingHits_
Definition: WenuPlots.h:65
Double_t cIso_EE_
Definition: WenuPlots.h:142
Double_t trackIso_EB_
Definition: WenuPlots.h:122
std::string WENU_VBTFselectionFileName_
Definition: WenuPlots.h:234
Bool_t hcalIso_EE_inv
Definition: WenuPlots.h:159
Bool_t deta_EE_inv
Definition: WenuPlots.h:170
Double_t eop_EE_
Definition: WenuPlots.h:144
Bool_t ecalIso_EB_inv
Definition: WenuPlots.h:154
Double_t trackIsoUser_EE_
Definition: WenuPlots.h:149
edm::EDGetTokenT< std::vector< reco::Vertex > > PrimaryVerticesCollectionBSToken_
Definition: WenuPlots.h:74
Double_t cIso_EB_
Definition: WenuPlots.h:134
Bool_t tip_bspot_EE_inv
Definition: WenuPlots.h:174
Bool_t tip_bspot_EB_inv
Definition: WenuPlots.h:166
std::string WENU_VBTFpreseleFileName_
Definition: WenuPlots.h:235
Double_t ecalIsoUser_EB_
Definition: WenuPlots.h:147
edm::EDGetTokenT< reco::CaloJetCollection > caloJetCollectionToken_
Definition: WenuPlots.h:70
Bool_t includeJetInformationInNtuples_
Definition: WenuPlots.h:236
Double_t dphi_EE_
Definition: WenuPlots.h:140
Bool_t sihih_EE_inv
Definition: WenuPlots.h:169
Bool_t dphi_EE_inv
Definition: WenuPlots.h:171
Bool_t hcalIsoUser_EE_inv
Definition: WenuPlots.h:182
Bool_t usePreselection_
Definition: WenuPlots.h:66
Double_t tip_bspot_EB_
Definition: WenuPlots.h:135
Bool_t ecalIso_EE_inv
Definition: WenuPlots.h:158
edm::EDGetTokenT< reco::PFJetCollection > pfJetCollectionToken_
Definition: WenuPlots.h:72
Double_t deta_EE_
Definition: WenuPlots.h:139
Bool_t useExpectedMissingHits_
Definition: WenuPlots.h:64
Int_t DatasetTag_
Definition: WenuPlots.h:239
Double_t hcalIso_EB_
Definition: WenuPlots.h:124
std::string usePrecalcIDSign_
Definition: WenuPlots.h:58
Double_t trackIso_EE_
Definition: WenuPlots.h:126
Double_t deta_EB_
Definition: WenuPlots.h:131
Double_t hcalIsoUser_EB_
Definition: WenuPlots.h:148
Double_t hcalIso_EE_
Definition: WenuPlots.h:128
Bool_t deta_EB_inv
Definition: WenuPlots.h:162
Bool_t hcalIsoUser_EB_inv
Definition: WenuPlots.h:179
Double_t sihih_EE_
Definition: WenuPlots.h:138
edm::EDGetTokenT< std::vector< reco::Vertex > > PrimaryVerticesCollectionToken_
Definition: WenuPlots.h:73
Bool_t ecalIsoUser_EE_inv
Definition: WenuPlots.h:181
Bool_t eop_EE_inv
Definition: WenuPlots.h:175
Double_t ecalIso_EB_
Definition: WenuPlots.h:123
Double_t eop_EB_
Definition: WenuPlots.h:136
Double_t usePrecalcIDValue_
Definition: WenuPlots.h:60
Double_t hcalIsoUser_EE_
Definition: WenuPlots.h:151
Bool_t trackIso_EE_inv
Definition: WenuPlots.h:157
edm::InputTag caloJetCollectionTag_
Definition: WenuPlots.h:69
Bool_t eop_EB_inv
Definition: WenuPlots.h:167
Bool_t storeAllSecondElectronVariables_
Definition: WenuPlots.h:241
Bool_t useConversionRejection_
Definition: WenuPlots.h:63
edm::EDGetTokenT< pat::CompositeCandidateCollection > wenuCollectionToken_
Definition: WenuPlots.h:68
Bool_t sihih_EB_inv
Definition: WenuPlots.h:161
Bool_t cIso_EB_inv
Definition: WenuPlots.h:165
Bool_t trackIsoUser_EE_inv
Definition: WenuPlots.h:180
Bool_t hcalIso_EB_inv
Definition: WenuPlots.h:155
Bool_t storeExtraInformation_
Definition: WenuPlots.h:237
Bool_t hoe_EE_inv
Definition: WenuPlots.h:172
Bool_t useValidFirstPXBHit_
Definition: WenuPlots.h:62
edm::InputTag pfJetCollectionTag_
Definition: WenuPlots.h:71
std::string usePrecalcIDType_
Definition: WenuPlots.h:59
Bool_t ecalIsoUser_EB_inv
Definition: WenuPlots.h:178
Double_t DRJetFromElectron_
Definition: WenuPlots.h:238
Bool_t cIso_EE_inv
Definition: WenuPlots.h:173
std::string outputFile_
Definition: WenuPlots.h:67
Bool_t dphi_EB_inv
Definition: WenuPlots.h:163
Double_t hoe_EB_
Definition: WenuPlots.h:133
Bool_t trackIsoUser_EB_inv
Definition: WenuPlots.h:177
Double_t tip_bspot_EE_
Definition: WenuPlots.h:143
Double_t dphi_EB_
Definition: WenuPlots.h:132
Double_t sihih_EB_
Definition: WenuPlots.h:130
Bool_t trackIso_EB_inv
Definition: WenuPlots.h:153
Double_t ecalIsoUser_EE_
Definition: WenuPlots.h:150
Double_t ecalIso_EE_
Definition: WenuPlots.h:127
Bool_t usePrecalcID_
Definition: WenuPlots.h:57
Bool_t hoe_EB_inv
Definition: WenuPlots.h:164
Double_t hoe_EE_
Definition: WenuPlots.h:141
WenuPlots::~WenuPlots ( )
override

Definition at line 188 of file WenuPlots.cc.

188  {
189  // do anything here that needs to be done at desctruction time
190  // (e.g. close files, deallocate resources etc.)
191 }

Member Function Documentation

void WenuPlots::analyze ( const edm::Event iEvent,
const edm::EventSetup es 
)
overrideprivate

Definition at line 198 of file WenuPlots.cc.

References Abs(), calojet_et, calojet_eta, calojet_phi, caloJetCollectionTag_, caloJetCollectionToken_, isolatedTracks_cfi::caloJets, reco::GsfElectron::chargeInfo(), CheckCuts(), CheckCutsInverse(), CheckCutsNminusOne(), pat::Electron::closestCtfTrackRef(), reco::GsfElectron::convDcot(), reco::GsfElectron::convDist(), counter, gather_cfg::cout, DatasetTag_, reco::CompositeCandidate::daughter(), pat::Electron::dB(), reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), reco::deltaR(), reco::GsfElectron::dr03IsolationVariables(), DRJetFromElectron_, reco::GsfElectron::ecalDrivenSeed(), pat::EcalIso, reco::GsfElectron::IsolationVariables::ecalRecHitSumEt, ele2nd_cand_et, ele2nd_cand_eta, ele2nd_cand_phi, ele2nd_cr_dcot, ele2nd_cr_dist, ele2nd_cr_mhitsinner, ele2nd_ctfCharge, ele2nd_ecalDriven, ele2nd_eop, ele2nd_gsfCharge, ele2nd_hltmatched_dr, ele2nd_id_deta, ele2nd_id_dphi, ele2nd_id_hoe, ele2nd_id_sihih, ele2nd_iso_ecal, ele2nd_iso_hcal, ele2nd_iso_track, ele2nd_passes_selection, ele2nd_pin, ele2nd_pout, ele2nd_sc_eta, ele2nd_sc_gsf_et, ele2nd_sc_phi, ele2nd_sc_rho, ele2nd_scPixCharge, ele2nd_tip_bs, ele2nd_tip_pv, ele2nd_tip_pvbs, ele2nd_vx, ele2nd_vy, ele2nd_vz, ele_cand_et, ele_cand_eta, ele_cand_phi, ele_cr_dcot, ele_cr_dist, ele_cr_mhitsinner, ele_ctfCharge, ele_eop, ele_gsfCharge, ele_hltmatched_dr, ele_id_deta, ele_id_dphi, ele_id_hoe, ele_id_sihih, ele_iso_ecal, ele_iso_hcal, ele_iso_track, ele_pin, ele_pout, ele_sc_energy, ele_sc_eta, ele_sc_gsf_et, ele_sc_phi, ele_sc_rho, ele_scPixCharge, ele_tip_bs, ele_tip_pv, ele_tip_pvbs, ele_vx, ele_vy, ele_vz, pat::Electron::electronID(), reco::GsfElectron::eSuperClusterOverP(), reco::LeafCandidate::et(), reco::LeafCandidate::eta(), edm::EventAuxiliary::event(), event_caloMET, event_caloMET_phi, event_caloMT, event_caloSumEt, event_datasetTag, event_pfMET, event_pfMET_phi, event_pfMT, event_pfSumEt, event_tcMET, event_tcMET_phi, event_tcMT, event_tcSumEt, event_triggerDecision, edm::Event::eventAuxiliary(), eventNumber, edm::Event::getByToken(), pat::Electron::gsfTrack(), h_EB_deta, h_EB_dphi, h_EB_ecaliso, h_EB_hcaliso, h_EB_HoE, h_EB_sIetaIeta, h_EB_trkiso, h_EE_deta, h_EE_dphi, h_EE_ecaliso, h_EE_hcaliso, h_EE_HoE, h_EE_sIetaIeta, h_EE_trkiso, h_met, h_met_EB, h_met_EE, h_met_inverse, h_met_inverse_EB, h_met_inverse_EE, h_mt, h_mt_EB, h_mt_EE, h_mt_inverse, h_mt_inverse_EB, h_mt_inverse_EE, h_scEt, h_scEta, h_scPhi, h_trackIso_eb_NmOne, h_trackIso_ee_NmOne, reco::GsfElectron::hadronicOverEm(), pat::PATObject< ObjectType >::hasUserFloat(), pat::PATObject< ObjectType >::hasUserInt(), reco::GsfElectron::IsolationVariables::hcalDepth1TowerSumEt, reco::GsfElectron::IsolationVariables::hcalDepth2TowerSumEt, pat::HcalIso, mps_fire::i, includeJetInformationInNtuples_, createfilelist::int, pat::Electron::isElectronIDAvailable(), edm::Ref< C, T, F >::isNonnull(), edm::HandleBase::isValid(), edm::EventBase::luminosityBlock(), lumiSection, BTaggingMonitor_cfi::met, reco::HitPattern::MISSING_INNER_HITS, TtSemiLepEvtBuilder_cfi::mt, objects.IsoTrackAnalyzer::myMet, TrackCollections2monitor_cff::normalizedChi2, PassPreselectionCriteria(), pfjet_et, pfjet_eta, pfjet_phi, pfJetCollectionTag_, pfJetCollectionToken_, pfJetBenchmark_cfi::pfJets, reco::LeafCandidate::phi(), position, PrimaryVerticesCollectionBSToken_, PrimaryVerticesCollectionToken_, edm::Handle< T >::product(), pv_x, pv_y, pv_z, pvbs_x, pvbs_y, pvbs_z, edm::Event::run(), runNumber, reco::GsfElectron::ChargeInfo::scPixCharge, reco::GsfElectron::scSigmaIEtaIEta(), reco::GsfElectron::sigmaIetaIeta(), mathSSE::sqrt(), storeAllSecondElectronVariables_, storeExtraInformation_, reco::MET::sumEt(), pat::Electron::superCluster(), reco::GsfElectron::IsolationVariables::tkSumPt, pat::TrackIso, reco::GsfElectron::trackMomentumAtVtx(), reco::GsfElectron::trackMomentumOut(), usePrecalcID_, usePreselection_, pat::PATObject< ObjectType >::userFloat(), pat::PATObject< ObjectType >::userInt(), pat::Lepton< LeptonType >::userIsolation(), vbtfPresele_tree, vbtfSele_tree, VtxNormalizedChi2, VtxNormalizedChi2BS, VtxTracksSize, VtxTracksSizeBS, reco::LeafCandidate::vx(), reco::LeafCandidate::vy(), reco::LeafCandidate::vz(), wenuCollectionToken_, x, y, and z.

198  {
199  using namespace std;
200  //
201  // Get the collections here
202  //
204  iEvent.getByToken(wenuCollectionToken_, WenuCands);
205 
206  if (not WenuCands.isValid()) {
207  cout << "Warning: no wenu candidates in this event..." << endl;
208  return;
209  }
210  const pat::CompositeCandidateCollection *wcands = WenuCands.product();
211  const pat::CompositeCandidateCollection::const_iterator wenuIter = wcands->begin();
212  const pat::CompositeCandidate wenu = *wenuIter;
213  //
214  // get the parts of the composite candidate:
215  const pat::Electron *myElec = dynamic_cast<const pat::Electron *>(wenu.daughter("electron"));
216  const pat::MET *myMet = dynamic_cast<const pat::MET *>(wenu.daughter("met"));
217  const pat::MET *myPfMet = dynamic_cast<const pat::MET *>(wenu.daughter("pfmet"));
218  const pat::MET *myTcMet = dynamic_cast<const pat::MET *>(wenu.daughter("tcmet"));
219  // _______________________________________________________________________
220  //
221  // VBTF Root tuple production --------------------------------------------
222  // _______________________________________________________________________
223  //
224  // .......................................................................
225  // vbtf produces 2 root tuples: one that contains the highest pT electron
226  // that passes a user defined selection and one other with only the
227  // preselection criteria applied
228  // .......................................................................
229  //
230  // fill the tree variables
231  runNumber = iEvent.run();
232  eventNumber = Long64_t(iEvent.eventAuxiliary().event());
233  lumiSection = (Int_t)iEvent.luminosityBlock();
234  //
235  ele_sc_eta = (Float_t)myElec->superCluster()->eta();
236  ele_sc_phi = (Float_t)myElec->superCluster()->phi();
237  double scx = myElec->superCluster()->x();
238  double scy = myElec->superCluster()->y();
239  double scz = myElec->superCluster()->z();
240  ele_sc_rho = (Float_t)sqrt(scx * scx + scy * scy + scz * scz);
241  ele_sc_energy = (Float_t)myElec->superCluster()->energy();
242  ele_sc_gsf_et = (Float_t)myElec->superCluster()->energy() / TMath::CosH(myElec->gsfTrack()->eta());
243  ele_cand_eta = (Float_t)myElec->eta();
244  ele_cand_phi = (Float_t)myElec->phi();
245  ele_cand_et = (Float_t)myElec->et();
246  //
251  ele_cand_et;
252  //
253  ele_id_sihih = (Float_t)myElec->sigmaIetaIeta();
254  ele_id_deta = (Float_t)myElec->deltaEtaSuperClusterTrackAtVtx();
255  ele_id_dphi = (Float_t)myElec->deltaPhiSuperClusterTrackAtVtx();
256  ele_id_hoe = (Float_t)myElec->hadronicOverEm();
257  //
258  ele_cr_mhitsinner = myElec->gsfTrack()->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
259  ele_cr_dcot = myElec->convDcot();
260  ele_cr_dist = myElec->convDist();
261  //
262  ele_vx = (Float_t)myElec->vx();
263  ele_vy = (Float_t)myElec->vy();
264  ele_vz = (Float_t)myElec->vz();
265  // get the primary vtx information
266  // no BS
269  const std::vector<reco::Vertex> Vtx = *(pVtx.product());
270  // with BS
273  const std::vector<reco::Vertex> VtxBS = *(pVtxBS.product());
274  if (!Vtx.empty()) {
275  pv_x = Float_t(Vtx[0].position().x());
276  pv_y = Float_t(Vtx[0].position().y());
277  pv_z = Float_t(Vtx[0].position().z());
278  ele_tip_pv = myElec->gsfTrack()->dxy(Vtx[0].position());
279  } else {
280  pv_x = -999999.;
281  pv_y = -999999.;
282  pv_z = -999999.;
283  ele_tip_pv = -999999.;
284  }
285  if (!VtxBS.empty()) {
286  pvbs_x = Float_t(VtxBS[0].position().x());
287  pvbs_y = Float_t(VtxBS[0].position().y());
288  pvbs_z = Float_t(VtxBS[0].position().z());
289  ele_tip_pvbs = myElec->gsfTrack()->dxy(VtxBS[0].position());
290  } else {
291  pvbs_x = -999999.;
292  pvbs_y = -999999.;
293  pvbs_z = -999999.;
294  ele_tip_pvbs = -999999.;
295  }
296 
297  //
298  ele_gsfCharge = (Int_t)myElec->gsfTrack()->charge();
299  // must keep the ctf track collection, i.e. general track collection
300  ele_ctfCharge = (Int_t)myElec->closestCtfTrackRef().isNonnull() ? myElec->closestCtfTrackRef()->charge() : -9999;
301  ele_scPixCharge = (Int_t)myElec->chargeInfo().scPixCharge;
302  ele_eop = (Float_t)myElec->eSuperClusterOverP();
303  ele_tip_bs = (Float_t)-myElec->dB();
304  //ele_tip_pv = myElec->userFloat("ele_tip_pv");
305  ele_pin = (Float_t)myElec->trackMomentumAtVtx().R();
306  ele_pout = (Float_t)myElec->trackMomentumOut().R();
307  //
308  event_caloMET = (Float_t)myMet->et();
309  event_pfMET = (Float_t)myPfMet->et();
310  event_tcMET = (Float_t)myTcMet->et();
311  event_caloMET_phi = (Float_t)myMet->phi();
312  event_pfMET_phi = (Float_t)myPfMet->phi();
313  event_tcMET_phi = (Float_t)myTcMet->phi();
314  event_caloSumEt = (Float_t)myMet->sumEt();
315  event_pfSumEt = (Float_t)myPfMet->sumEt();
316  event_tcSumEt = (Float_t)myTcMet->sumEt();
317  // transverse mass for the user's convenience
318  event_caloMT = (Float_t)TMath::Sqrt(
319  2. * (ele_sc_gsf_et * event_caloMET -
320  (ele_sc_gsf_et * TMath::Cos(ele_sc_phi) * event_caloMET * TMath::Cos(event_caloMET_phi) +
321  ele_sc_gsf_et * TMath::Sin(ele_sc_phi) * event_caloMET * TMath::Sin(event_caloMET_phi))));
322  event_pfMT =
323  (Float_t)TMath::Sqrt(2. * (ele_sc_gsf_et * event_pfMET -
324  (ele_sc_gsf_et * TMath::Cos(ele_sc_phi) * event_pfMET * TMath::Cos(event_pfMET_phi) +
325  ele_sc_gsf_et * TMath::Sin(ele_sc_phi) * event_pfMET * TMath::Sin(event_pfMET_phi))));
326  event_tcMT =
327  (Float_t)TMath::Sqrt(2. * (ele_sc_gsf_et * event_tcMET -
328  (ele_sc_gsf_et * TMath::Cos(ele_sc_phi) * event_tcMET * TMath::Cos(event_tcMET_phi) +
329  ele_sc_gsf_et * TMath::Sin(ele_sc_phi) * event_tcMET * TMath::Sin(event_tcMET_phi))));
331  // jet information - only if the user asks for it
332  // keep the 5 highest et jets of the event that are further than DR> DRJetFromElectron_
334  // initialize the array of the jet information
335  for (int i = 0; i < 5; ++i) {
336  calojet_et[i] = -999999;
337  calojet_eta[i] = -999999;
338  calojet_phi[i] = -999999;
339  pfjet_et[i] = -999999;
340  pfjet_eta[i] = -999999;
341  pfjet_phi[i] = -999999;
342  }
343  // get hold of the jet collections
346  iEvent.getByToken(caloJetCollectionToken_, pCaloJets);
347  iEvent.getByToken(pfJetCollectionToken_, pPfJets);
348  //
349  // calo jets now:
350  if (pCaloJets.isValid()) {
351  const reco::CaloJetCollection *caloJets = pCaloJets.product();
352  int nCaloJets = (int)caloJets->size();
353  if (nCaloJets > 0) {
354  float *nCaloET = new float[nCaloJets];
355  float *nCaloEta = new float[nCaloJets];
356  float *nCaloPhi = new float[nCaloJets];
357  reco::CaloJetCollection::const_iterator cjet = caloJets->begin();
358  int counter = 0;
359  for (; cjet != caloJets->end(); ++cjet) {
360  // store them only if they are far enough from the electron
361  Double_t DR = reco::deltaR(cjet->eta(), cjet->phi(), myElec->gsfTrack()->eta(), ele_sc_phi);
362  if (DR > DRJetFromElectron_) {
363  nCaloET[counter] = cjet->et();
364  nCaloEta[counter] = cjet->eta();
365  nCaloPhi[counter] = cjet->phi();
366  ++counter;
367  }
368  }
369  int *caloJetSorted = new int[nCaloJets];
370  TMath::Sort(nCaloJets, nCaloET, caloJetSorted, true);
371  for (int i = 0; i < nCaloJets; ++i) {
372  if (i >= 5)
373  break;
374  calojet_et[i] = nCaloET[caloJetSorted[i]];
375  calojet_eta[i] = nCaloEta[caloJetSorted[i]];
376  calojet_phi[i] = nCaloPhi[caloJetSorted[i]];
377  }
378  delete[] caloJetSorted;
379  delete[] nCaloET;
380  delete[] nCaloEta;
381  delete[] nCaloPhi;
382  }
383  } else {
384  std::cout << "WenuPlots: Could not get caloJet collection with name " << caloJetCollectionTag_ << std::endl;
385  }
386  //
387  // pf jets now:
388  if (pPfJets.isValid()) {
389  const reco::PFJetCollection *pfJets = pPfJets.product();
390  int nPfJets = (int)pfJets->size();
391  if (nPfJets > 0) {
392  float *nPfET = new float[nPfJets];
393  float *nPfEta = new float[nPfJets];
394  float *nPfPhi = new float[nPfJets];
395  reco::PFJetCollection::const_iterator pjet = pfJets->begin();
396  int counter = 0;
397  for (; pjet != pfJets->end(); ++pjet) {
398  // store them only if they are far enough from the electron
399  Double_t DR = reco::deltaR(pjet->eta(), pjet->phi(), myElec->gsfTrack()->eta(), ele_sc_phi);
400  if (DR > DRJetFromElectron_) {
401  nPfET[counter] = pjet->et();
402  nPfEta[counter] = pjet->eta();
403  nPfPhi[counter] = pjet->phi();
404  ++counter;
405  }
406  }
407  int *pfJetSorted = new int[nPfJets];
408  TMath::Sort(nPfJets, nPfET, pfJetSorted, true);
409  for (int i = 0; i < nPfJets; ++i) {
410  if (i >= 5)
411  break;
412  pfjet_et[i] = nPfET[pfJetSorted[i]];
413  pfjet_eta[i] = nPfEta[pfJetSorted[i]];
414  pfjet_phi[i] = nPfPhi[pfJetSorted[i]];
415  }
416  delete[] pfJetSorted;
417  delete[] nPfET;
418  delete[] nPfEta;
419  delete[] nPfPhi;
420  }
421  } else {
422  std::cout << "WenuPlots: Could not get pfJet collection with name " << pfJetCollectionTag_ << std::endl;
423  }
424  }
425  // second electron information - in preselected ntuple only
426  ele2nd_sc_gsf_et = -1; // also in sele tree
427  ele2nd_sc_eta = -1;
428  ele2nd_sc_phi = -1;
429  ele2nd_sc_rho = 0;
430  ele2nd_cand_eta = 0;
431  ele2nd_cand_phi = 0;
432  ele2nd_cand_et = 0;
433  ele2nd_pin = 0;
434  ele2nd_pout = 0;
435  ele2nd_passes_selection = -1; // also in sele tree
436  ele2nd_ecalDriven = 0;
437  //
438  // second electron selection variables: only if requested by the user
439  //
440  ele2nd_iso_track = 0;
441  ele2nd_iso_ecal = 0;
442  ele2nd_iso_hcal = 0;
443  //
444  ele2nd_id_sihih = 0;
445  ele2nd_id_deta = 0;
446  ele2nd_id_dphi = 0;
447  ele2nd_id_hoe = 0;
448  //
450  ele2nd_cr_dcot = 0;
451  ele2nd_cr_dist = 0;
452  //
453  ele2nd_vx = 0;
454  ele2nd_vy = 0;
455  ele2nd_vz = 0;
456  //
457  ele2nd_gsfCharge = 0;
458  // must keep the ctf track collection, i.e. general track collection
459  ele2nd_ctfCharge = 0;
460  ele2nd_scPixCharge = 0;
461  ele2nd_eop = 0;
462  ele2nd_tip_bs = 0;
463  ele2nd_tip_pv = 0;
465  //
466  // convention for ele2nd_passes_selection
467  // 0 passes no selection
468  // 1 passes WP95
469  // 2 passes WP90
470  // 3 passes WP85
471  // 4 passes WP80
472  // 5 passes WP70
473  // 6 passes WP60
474  if (myElec->userInt("hasSecondElectron") == 1 && storeExtraInformation_) {
475  const pat::Electron *mySecondElec = dynamic_cast<const pat::Electron *>(wenu.daughter("secondElec"));
476  ele2nd_sc_gsf_et = (Float_t)mySecondElec->superCluster()->energy() / TMath::CosH(mySecondElec->gsfTrack()->eta());
477 
478  ele2nd_sc_eta = (Float_t)mySecondElec->superCluster()->eta();
479  ele2nd_sc_phi = (Float_t)mySecondElec->superCluster()->phi();
480  double sc2x = mySecondElec->superCluster()->x();
481  double sc2y = mySecondElec->superCluster()->y();
482  double sc2z = mySecondElec->superCluster()->z();
483  ele2nd_sc_rho = (Float_t)sqrt(sc2x * sc2x + sc2y * sc2y + sc2z * sc2z);
484  ele2nd_cand_eta = (Float_t)mySecondElec->eta();
485  ele2nd_cand_phi = (Float_t)mySecondElec->phi();
486  ele2nd_cand_et = (Float_t)mySecondElec->et();
487  ele2nd_pin = (Float_t)mySecondElec->trackMomentumAtVtx().R();
488  ;
489  ele2nd_pout = (Float_t)mySecondElec->trackMomentumOut().R();
490  ele2nd_ecalDriven = (Int_t)mySecondElec->ecalDrivenSeed();
491  // check the selections
492  bool isIDCalc = mySecondElec->isElectronIDAvailable("simpleEleId95relIso") &&
493  mySecondElec->isElectronIDAvailable("simpleEleId90relIso") &&
494  mySecondElec->isElectronIDAvailable("simpleEleId85relIso") &&
495  mySecondElec->isElectronIDAvailable("simpleEleId80relIso") &&
496  mySecondElec->isElectronIDAvailable("simpleEleId70relIso") &&
497  mySecondElec->isElectronIDAvailable("simpleEleId60relIso");
498  if (isIDCalc) {
500  if (fabs(mySecondElec->electronID("simpleEleId60relIso") - 7) < 0.1)
502  else if (fabs(mySecondElec->electronID("simpleEleId70relIso") - 7) < 0.1)
504  else if (fabs(mySecondElec->electronID("simpleEleId80relIso") - 7) < 0.1)
506  else if (fabs(mySecondElec->electronID("simpleEleId85relIso") - 7) < 0.1)
508  else if (fabs(mySecondElec->electronID("simpleEleId90relIso") - 7) < 0.1)
510  else if (fabs(mySecondElec->electronID("simpleEleId95relIso") - 7) < 0.1)
512  }
514  ele2nd_iso_track = (Float_t)mySecondElec->dr03IsolationVariables().tkSumPt / ele2nd_cand_et;
516  ele2nd_iso_hcal = (Float_t)(mySecondElec->dr03IsolationVariables().hcalDepth1TowerSumEt +
519  ele2nd_id_sihih = (Float_t)mySecondElec->sigmaIetaIeta();
520  ele2nd_id_deta = (Float_t)mySecondElec->deltaEtaSuperClusterTrackAtVtx();
521  ele2nd_id_dphi = (Float_t)mySecondElec->deltaPhiSuperClusterTrackAtVtx();
522  ele2nd_id_hoe = (Float_t)mySecondElec->hadronicOverEm();
523 
525  mySecondElec->gsfTrack()->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS);
526  ele2nd_cr_dcot = mySecondElec->convDcot();
527  ele2nd_cr_dist = mySecondElec->convDist();
528 
529  ele2nd_vx = (Float_t)mySecondElec->vx();
530  ele2nd_vy = (Float_t)mySecondElec->vy();
531  ele2nd_vz = (Float_t)mySecondElec->vz();
532  ele2nd_gsfCharge = (Int_t)mySecondElec->gsfTrack()->charge();
533  // must keep the ctf track collection, i.e. general track collection
535  (Int_t)mySecondElec->closestCtfTrackRef().isNonnull() ? mySecondElec->closestCtfTrackRef()->charge() : -9999;
536  ele2nd_scPixCharge = (Int_t)mySecondElec->chargeInfo().scPixCharge;
537  ele2nd_eop = (Float_t)mySecondElec->eSuperClusterOverP();
538  ele2nd_tip_bs = (Float_t)-mySecondElec->dB();
539  if (!Vtx.empty()) {
540  ele2nd_tip_pv = mySecondElec->gsfTrack()->dxy(Vtx[0].position());
541  }
542  if (!VtxBS.empty()) {
543  ele2nd_tip_pvbs = mySecondElec->gsfTrack()->dxy(VtxBS[0].position());
544  }
545  ele2nd_hltmatched_dr = mySecondElec->userFloat("HLTMatchingDR");
546  }
547  }
548  // some extra information
550  ele_hltmatched_dr = -999.;
551  VtxTracksSize.clear();
552  VtxNormalizedChi2.clear();
553  VtxTracksSizeBS.clear();
554  VtxNormalizedChi2BS.clear();
556  if (myElec->hasUserFloat("HLTMatchingDR")) {
557  ele_hltmatched_dr = myElec->userFloat("HLTMatchingDR");
558  }
559  if (myElec->hasUserInt("triggerDecision")) {
560  event_triggerDecision = myElec->userInt("triggerDecision");
561  }
562  // extra information related to the primary vtx collection
563  for (Int_t i = 0; i < (Int_t)Vtx.size(); ++i) {
564  VtxTracksSize.push_back(Vtx[i].tracksSize());
565  VtxNormalizedChi2.push_back(Vtx[i].normalizedChi2());
566  }
567  for (Int_t i = 0; i < (Int_t)VtxBS.size(); ++i) {
568  VtxTracksSizeBS.push_back(VtxBS[i].tracksSize());
569  VtxNormalizedChi2BS.push_back(VtxBS[i].normalizedChi2());
570  }
571  }
572  // if the electron passes the selection
573  // it is meant to be a precalculated selection here, in order to include
574  // conversion rejection too
575  if (CheckCuts(myElec) && myElec->userInt("failsSecondElectronCut") == 0) {
576  vbtfSele_tree->Fill();
577  }
578  vbtfPresele_tree->Fill();
579 
580  //
581  // _______________________________________________________________________
582  //
583  // histogram production --------------------------------------------------
584  // _______________________________________________________________________
585  //
586  // if you want some preselection: Conv rejection, hit pattern
587  if (usePreselection_) {
588  if (not PassPreselectionCriteria(myElec))
589  return;
590  }
591  //
592  // some variables here
593  Double_t scEta = myElec->superCluster()->eta();
594  Double_t scPhi = myElec->superCluster()->phi();
595  Double_t scEt = myElec->superCluster()->energy() / TMath::CosH(scEta);
596  Double_t met = myMet->et();
597  Double_t metPhi = myMet->phi();
598  Double_t mt = TMath::Sqrt(2.0 * scEt * met *
599  (1.0 - (TMath::Cos(scPhi) * TMath::Cos(metPhi) + TMath::Sin(scPhi) * TMath::Sin(metPhi))));
600 
601  Double_t trackIso = myElec->userIsolation(pat::TrackIso);
602  Double_t ecalIso = myElec->userIsolation(pat::EcalIso);
603  Double_t hcalIso = myElec->userIsolation(pat::HcalIso);
604  Double_t sihih = myElec->scSigmaIEtaIEta();
605  Double_t dphi = myElec->deltaPhiSuperClusterTrackAtVtx();
606  Double_t deta = myElec->deltaEtaSuperClusterTrackAtVtx();
607  Double_t HoE = myElec->hadronicOverEm();
608  //
609  //
610  //
611  // the inverted selection plots:
612  // only if not using precalcID
613  if (not usePrecalcID_) {
614  if (CheckCutsInverse(myElec)) {
615  //std::cout << "-----------------INVERSION-----------passed" << std::endl;
616  h_met_inverse->Fill(met);
617  h_mt_inverse->Fill(mt);
618  if (TMath::Abs(scEta) < 1.479) {
619  h_met_inverse_EB->Fill(met);
620  h_mt_inverse_EB->Fill(mt);
621  }
622  if (TMath::Abs(scEta) > 1.479) {
623  h_met_inverse_EE->Fill(met);
624  h_mt_inverse_EE->Fill(mt);
625  }
626  }
627  }
628  //
630  //
631  // N-1 plots: plot some variable so that all the other cuts are satisfied
632  //
633  // make these plots only if you have the normal selection, not pre-calced
634  if (not usePrecalcID_) {
635  if (TMath::Abs(scEta) < 1.479) { // reminder: the precise fiducial cuts are in
636  // in the filter
637  if (CheckCutsNminusOne(myElec, 0))
638  h_trackIso_eb_NmOne->Fill(trackIso);
639  } else {
640  if (CheckCutsNminusOne(myElec, 0))
641  h_trackIso_ee_NmOne->Fill(trackIso);
642  }
643  }
644  //
645  // SELECTION APPLICATION
646  //
647  // from here on you have only events that pass the full selection
648  if (not CheckCuts(myElec))
649  return;
651 
652  h_met->Fill(met);
653  h_mt->Fill(mt);
654  if (TMath::Abs(scEta) < 1.479) {
655  h_met_EB->Fill(met);
656  h_mt_EB->Fill(mt);
657 
658  h_EB_trkiso->Fill(trackIso);
659  h_EB_ecaliso->Fill(ecalIso);
660  h_EB_hcaliso->Fill(hcalIso);
661  h_EB_sIetaIeta->Fill(sihih);
662  h_EB_dphi->Fill(dphi);
663  h_EB_deta->Fill(deta);
664  h_EB_HoE->Fill(HoE);
665  }
666  if (TMath::Abs(scEta) > 1.479) {
667  h_met_EE->Fill(met);
668  h_mt_EE->Fill(mt);
669 
670  h_EE_trkiso->Fill(trackIso);
671  h_EE_ecaliso->Fill(ecalIso);
672  h_EE_hcaliso->Fill(hcalIso);
673  h_EE_sIetaIeta->Fill(sihih);
674  h_EE_dphi->Fill(dphi);
675  h_EE_deta->Fill(deta);
676  h_EE_HoE->Fill(HoE);
677  }
678  // uncomment for debugging purposes
679  /*
680  std::cout << "tracIso: " << trackIso << ", " << myElec->trackIso() << ", ecaliso: " << ecalIso
681  << ", " << myElec->ecalIso() << ", hcaliso: " << hcalIso << ", " << myElec->hcalIso()
682  << ", mishits: "
683  << myElec->gsfTrack()->hitPattern().numberOfLostHits(reco::HitPattern::MISSING_INNER_HITS)
684  << std::endl;
685  std::cout << "Electron ID: 95relIso=" << myElec->electronID("simpleEleId95relIso")
686  << " 90relIso=" << myElec->electronID("simpleEleId90relIso")
687  << " 85relIso=" << myElec->electronID("simpleEleId85relIso")
688  << " 80relIso=" << myElec->electronID("simpleEleId80relIso")
689  << " 70relIso=" << myElec->electronID("simpleEleId70relIso")
690  << " 60relIso=" << myElec->electronID("simpleEleId60relIso")
691  << " 95cIso=" << myElec->electronID("simpleEleId95cIso")
692  << " 90cIso=" << myElec->electronID("simpleEleId90cIso")
693  << " 85cIso=" << myElec->electronID("simpleEleId85cIso")
694  << " 80cIso=" << myElec->electronID("simpleEleId80cIso")
695  << " 70cIso=" << myElec->electronID("simpleEleId70cIso")
696  << " 60cIso=" << myElec->electronID("simpleEleId60cIso")
697  << std::endl;
698  std::cout << "mySelection: " << (CheckCuts(myElec) && PassPreselectionCriteria(myElec)) << endl;
699  */
700  h_scEt->Fill(scEt);
701  h_scEta->Fill(scEta);
702  h_scPhi->Fill(scPhi);
703 }
Float_t ele_vy
Definition: WenuPlots.h:201
TH1F * h_mt_inverse_EE
Definition: WenuPlots.h:94
Analysis-level particle class.
Analysis-level MET class.
Definition: MET.h:40
Float_t ele2nd_cr_dcot
Definition: WenuPlots.h:245
Int_t ele2nd_ctfCharge
Definition: WenuPlots.h:247
Float_t ele2nd_id_deta
Definition: WenuPlots.h:244
Float_t ele2nd_sc_gsf_et
Definition: WenuPlots.h:216
bool isElectronIDAvailable(const std::string &name) const
Returns true if a specific ID is available in this pat::Electron.
Bool_t PassPreselectionCriteria(const pat::Electron *ele)
Definition: WenuPlots.cc:823
Float_t ele_iso_ecal
Definition: WenuPlots.h:197
EventAuxiliary const & eventAuxiliary() const override
Definition: Event.h:93
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
double eta() const final
momentum pseudorapidity
TH1F * h_met_inverse_EB
Definition: WenuPlots.h:87
float eSuperClusterOverP() const
Definition: GsfElectron.h:221
Float_t event_caloMET
Definition: WenuPlots.h:206
Float_t ele_iso_hcal
Definition: WenuPlots.h:197
Float_t ele2nd_tip_bs
Definition: WenuPlots.h:248
Float_t ele2nd_id_hoe
Definition: WenuPlots.h:244
Float_t ele_eop
Definition: WenuPlots.h:205
TH1F * h_EE_trkiso
Definition: WenuPlots.h:108
double vy() const override
y coordinate of vertex position
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
Float_t pfjet_eta[5]
Definition: WenuPlots.h:214
Float_t ele2nd_eop
Definition: WenuPlots.h:248
edm::EDGetTokenT< std::vector< reco::Vertex > > PrimaryVerticesCollectionBSToken_
Definition: WenuPlots.h:74
TH1F * h_EB_HoE
Definition: WenuPlots.h:106
TH1F * h_met_EB
Definition: WenuPlots.h:86
Float_t pvbs_z
Definition: WenuPlots.h:254
Int_t lumiSection
Definition: WenuPlots.h:192
Float_t event_tcMET_phi
Definition: WenuPlots.h:208
Int_t ele2nd_passes_selection
Definition: WenuPlots.h:224
TH1F * h_mt
Definition: WenuPlots.h:83
Float_t ele_vz
Definition: WenuPlots.h:201
Float_t ele_pout
Definition: WenuPlots.h:202
Float_t ele_sc_rho
Definition: WenuPlots.h:194
Int_t ele2nd_scPixCharge
Definition: WenuPlots.h:247
Float_t event_caloMET_phi
Definition: WenuPlots.h:208
Float_t ele_id_dphi
Definition: WenuPlots.h:198
TH1F * h_trackIso_ee_NmOne
Definition: WenuPlots.h:118
math::XYZVectorF trackMomentumAtVtx() const
Definition: GsfElectron.h:268
Float_t ele_cr_dist
Definition: WenuPlots.h:199
bool hasUserFloat(const std::string &key) const
Return true if there is a user-defined float with a given name.
Definition: PATObject.h:378
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
TH1F * h_scPhi
Definition: WenuPlots.h:98
Int_t ele2nd_ecalDriven
Definition: WenuPlots.h:225
Int_t ele_gsfCharge
Definition: WenuPlots.h:204
Float_t calojet_eta[5]
Definition: WenuPlots.h:211
edm::EDGetTokenT< reco::CaloJetCollection > caloJetCollectionToken_
Definition: WenuPlots.h:70
Bool_t includeJetInformationInNtuples_
Definition: WenuPlots.h:236
Int_t runNumber
Definition: WenuPlots.h:192
TTree * vbtfSele_tree
Definition: WenuPlots.h:232
TH1F * h_EB_trkiso
Definition: WenuPlots.h:100
Float_t ele2nd_pout
Definition: WenuPlots.h:223
Float_t pv_x
Definition: WenuPlots.h:203
Bool_t usePreselection_
Definition: WenuPlots.h:66
Float_t ele2nd_vy
Definition: WenuPlots.h:246
Float_t event_caloSumEt
Definition: WenuPlots.h:207
Float_t ele2nd_sc_eta
Definition: WenuPlots.h:217
Bool_t CheckCutsInverse(const pat::Electron *ele)
Definition: WenuPlots.cc:745
Float_t ele2nd_sc_phi
Definition: WenuPlots.h:218
float convDist() const
Definition: GsfElectron.h:582
Bool_t CheckCuts(const pat::Electron *ele)
Definition: WenuPlots.cc:720
Float_t ele_sc_eta
Definition: WenuPlots.h:194
edm::EDGetTokenT< reco::PFJetCollection > pfJetCollectionToken_
Definition: WenuPlots.h:72
TH1F * h_EE_sIetaIeta
Definition: WenuPlots.h:111
Float_t ele2nd_vx
Definition: WenuPlots.h:246
Float_t ele2nd_id_sihih
Definition: WenuPlots.h:244
Float_t event_pfMET
Definition: WenuPlots.h:206
float userFloat(const std::string &key) const
Definition: PATObject.h:876
TH1F * h_EB_sIetaIeta
Definition: WenuPlots.h:103
Int_t DatasetTag_
Definition: WenuPlots.h:239
Float_t ele2nd_cand_phi
Definition: WenuPlots.h:221
Float_t pv_y
Definition: WenuPlots.h:203
Float_t ele_sc_phi
Definition: WenuPlots.h:194
float convDcot() const
Definition: GsfElectron.h:583
TH1F * h_met_EE
Definition: WenuPlots.h:91
TH1F * h_met
Definition: WenuPlots.h:81
TH1F * h_EB_ecaliso
Definition: WenuPlots.h:101
bool hasUserInt(const std::string &key) const
Return true if there is a user-defined int with a given name.
Definition: PATObject.h:395
Float_t ele_id_deta
Definition: WenuPlots.h:198
TH1F * h_scEt
Definition: WenuPlots.h:96
Float_t ele2nd_cand_et
Definition: WenuPlots.h:242
Float_t ele_cand_et
Definition: WenuPlots.h:196
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:225
edm::EDGetTokenT< std::vector< reco::Vertex > > PrimaryVerticesCollectionToken_
Definition: WenuPlots.h:73
double sumEt() const
Definition: MET.h:52
TH1F * h_EE_ecaliso
Definition: WenuPlots.h:109
TH1F * h_EB_hcaliso
Definition: WenuPlots.h:102
float sigmaIetaIeta() const
Definition: GsfElectron.h:411
Float_t ele2nd_pin
Definition: WenuPlots.h:222
float hadronicOverEm() const
Definition: GsfElectron.h:468
TH1F * h_met_inverse
Definition: WenuPlots.h:82
Float_t ele2nd_tip_pvbs
Definition: WenuPlots.h:255
Int_t event_triggerDecision
Definition: WenuPlots.h:227
Float_t ele2nd_hltmatched_dr
Definition: WenuPlots.h:249
Float_t pvbs_x
Definition: WenuPlots.h:254
double et() const final
transverse energy
T sqrt(T t)
Definition: SSEVec.h:19
Float_t ele2nd_sc_rho
Definition: WenuPlots.h:219
Float_t ele2nd_cand_eta
Definition: WenuPlots.h:220
math::XYZVectorF trackMomentumOut() const
Definition: GsfElectron.h:270
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:228
Float_t ele_hltmatched_dr
Definition: WenuPlots.h:226
Float_t ele_vx
Definition: WenuPlots.h:201
TH1F * h_met_inverse_EE
Definition: WenuPlots.h:92
TH1F * h_mt_inverse
Definition: WenuPlots.h:84
TH1F * h_EE_dphi
Definition: WenuPlots.h:112
T Abs(T a)
Definition: MathUtil.h:49
float electronID(const std::string &name) const
Returns a specific electron ID associated to the pat::Electron given its name.
Float_t ele_tip_pvbs
Definition: WenuPlots.h:255
RunNumber_t run() const
Definition: Event.h:107
edm::InputTag caloJetCollectionTag_
Definition: WenuPlots.h:69
Float_t ele_id_hoe
Definition: WenuPlots.h:198
Int_t ele_scPixCharge
Definition: WenuPlots.h:204
std::vector< Int_t > VtxTracksSizeBS
Definition: WenuPlots.h:252
Bool_t storeAllSecondElectronVariables_
Definition: WenuPlots.h:241
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
Float_t calojet_phi[5]
Definition: WenuPlots.h:212
std::vector< Int_t > VtxTracksSize
Definition: WenuPlots.h:250
TH1F * h_EB_deta
Definition: WenuPlots.h:105
Float_t ele_tip_pv
Definition: WenuPlots.h:205
bool isValid() const
Definition: HandleBase.h:70
float scSigmaIEtaIEta() const
Definition: GsfElectron.h:464
TH1F * h_scEta
Definition: WenuPlots.h:97
Float_t ele2nd_iso_hcal
Definition: WenuPlots.h:243
Float_t pfjet_phi[5]
Definition: WenuPlots.h:215
Float_t ele_iso_track
Definition: WenuPlots.h:197
Int_t ele2nd_gsfCharge
Definition: WenuPlots.h:247
TTree * vbtfPresele_tree
Definition: WenuPlots.h:233
Int_t event_datasetTag
Definition: WenuPlots.h:228
Float_t ele_pin
Definition: WenuPlots.h:202
TH1F * h_EB_dphi
Definition: WenuPlots.h:104
double vz() const override
z coordinate of vertex position
myMet
store a preIso track event.preIsoTrack.append(track)
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
Definition: deltaR.h:30
edm::EDGetTokenT< pat::CompositeCandidateCollection > wenuCollectionToken_
Definition: WenuPlots.h:68
Float_t event_tcSumEt
Definition: WenuPlots.h:207
Int_t ele_cr_mhitsinner
Definition: WenuPlots.h:200
TH1F * h_trackIso_eb_NmOne
Definition: WenuPlots.h:117
Float_t pv_z
Definition: WenuPlots.h:203
const ChargeInfo & chargeInfo() const
Definition: GsfElectron.h:131
Float_t ele2nd_iso_track
Definition: WenuPlots.h:243
Bool_t CheckCutsNminusOne(const pat::Electron *ele, Int_t jj)
Definition: WenuPlots.cc:753
float userIsolation(IsolationKeys key) const
Definition: Lepton.h:48
std::vector< CompositeCandidate > CompositeCandidateCollection
T const * product() const
Definition: Handle.h:69
Float_t ele_cand_eta
Definition: WenuPlots.h:196
Float_t pfjet_et[5]
Definition: WenuPlots.h:213
int32_t userInt(const std::string &key) const
Definition: PATObject.h:913
Bool_t storeExtraInformation_
Definition: WenuPlots.h:237
Float_t ele2nd_vz
Definition: WenuPlots.h:246
Int_t ele_ctfCharge
Definition: WenuPlots.h:204
Analysis-level electron class.
Definition: Electron.h:51
reco::TrackRef closestCtfTrackRef() const override
override the reco::GsfElectron::closestCtfTrackRef method, to access the internal storage of the trac...
Float_t event_pfMT
Definition: WenuPlots.h:209
Float_t event_tcMT
Definition: WenuPlots.h:209
edm::InputTag pfJetCollectionTag_
Definition: WenuPlots.h:71
Float_t ele_cand_phi
Definition: WenuPlots.h:196
double dB(IPTYPE type) const
Impact parameter wrt primary vertex or beamspot.
std::vector< PFJet > PFJetCollection
collection of PFJet objects
TH1F * h_EE_deta
Definition: WenuPlots.h:113
TH1F * h_mt_inverse_EB
Definition: WenuPlots.h:89
Double_t DRJetFromElectron_
Definition: WenuPlots.h:238
const IsolationVariables & dr03IsolationVariables() const
Definition: GsfElectron.h:530
Float_t ele2nd_tip_pv
Definition: WenuPlots.h:248
Float_t ele2nd_cr_dist
Definition: WenuPlots.h:245
static std::atomic< unsigned int > counter
Float_t event_tcMET
Definition: WenuPlots.h:206
Float_t event_pfMET_phi
Definition: WenuPlots.h:208
static int position[264][3]
Definition: ReadPGInfo.cc:289
Float_t pvbs_y
Definition: WenuPlots.h:254
Float_t event_caloMT
Definition: WenuPlots.h:209
TH1F * h_mt_EB
Definition: WenuPlots.h:88
Float_t ele2nd_id_dphi
Definition: WenuPlots.h:244
Float_t calojet_et[5]
Definition: WenuPlots.h:210
Float_t ele_id_sihih
Definition: WenuPlots.h:198
reco::GsfTrackRef gsfTrack() const override
override the reco::GsfElectron::gsfTrack method, to access the internal storage of the supercluster ...
Float_t ele_tip_bs
Definition: WenuPlots.h:205
std::vector< Float_t > VtxNormalizedChi2BS
Definition: WenuPlots.h:253
TH1F * h_mt_EE
Definition: WenuPlots.h:93
Int_t ele2nd_cr_mhitsinner
Definition: WenuPlots.h:247
Float_t ele2nd_iso_ecal
Definition: WenuPlots.h:243
double phi() const final
momentum azimuthal angle
Float_t ele_cr_dcot
Definition: WenuPlots.h:199
Float_t ele_sc_energy
Definition: WenuPlots.h:194
reco::SuperClusterRef superCluster() const override
override the reco::GsfElectron::superCluster method, to access the internal storage of the superclust...
EventNumber_t event() const
TH1F * h_EE_HoE
Definition: WenuPlots.h:114
Float_t ele_sc_gsf_et
Definition: WenuPlots.h:195
Bool_t usePrecalcID_
Definition: WenuPlots.h:57
TH1F * h_EE_hcaliso
Definition: WenuPlots.h:110
Float_t event_pfSumEt
Definition: WenuPlots.h:207
double vx() const override
x coordinate of vertex position
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects
bool ecalDrivenSeed() const
Definition: GsfElectron.h:158
std::vector< Float_t > VtxNormalizedChi2
Definition: WenuPlots.h:251
Long64_t eventNumber
Definition: WenuPlots.h:193
void WenuPlots::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 863 of file WenuPlots.cc.

References calojet_et, calojet_eta, calojet_phi, cIso_EB_, cIso_EB_inv, cIso_EE_, cIso_EE_inv, CutVars_, deta_EB_, deta_EB_inv, deta_EE_, deta_EE_inv, dphi_EB_, dphi_EB_inv, dphi_EE_, dphi_EE_inv, ecalIso_EB_, ecalIso_EB_inv, ecalIso_EE_, ecalIso_EE_inv, ecalIsoUser_EB_, ecalIsoUser_EB_inv, ecalIsoUser_EE_, ecalIsoUser_EE_inv, ele2nd_cand_et, ele2nd_cand_eta, ele2nd_cand_phi, ele2nd_cr_dcot, ele2nd_cr_dist, ele2nd_cr_mhitsinner, ele2nd_ctfCharge, ele2nd_ecalDriven, ele2nd_eop, ele2nd_gsfCharge, ele2nd_hltmatched_dr, ele2nd_id_deta, ele2nd_id_dphi, ele2nd_id_hoe, ele2nd_id_sihih, ele2nd_iso_ecal, ele2nd_iso_hcal, ele2nd_iso_track, ele2nd_passes_selection, ele2nd_pin, ele2nd_pout, ele2nd_sc_eta, ele2nd_sc_gsf_et, ele2nd_sc_phi, ele2nd_sc_rho, ele2nd_scPixCharge, ele2nd_tip_bs, ele2nd_tip_pv, ele2nd_vx, ele2nd_vy, ele2nd_vz, ele_cand_et, ele_cand_eta, ele_cand_phi, ele_cr_dcot, ele_cr_dist, ele_cr_mhitsinner, ele_ctfCharge, ele_eop, ele_gsfCharge, ele_hltmatched_dr, ele_id_deta, ele_id_dphi, ele_id_hoe, ele_id_sihih, ele_iso_ecal, ele_iso_hcal, ele_iso_track, ele_pin, ele_pout, ele_sc_energy, ele_sc_eta, ele_sc_gsf_et, ele_sc_phi, ele_sc_rho, ele_scPixCharge, ele_tip_bs, ele_tip_pv, ele_vx, ele_vy, ele_vz, eop_EB_, eop_EB_inv, eop_EE_, eop_EE_inv, event_caloMET, event_caloMET_phi, event_caloMT, event_caloSumEt, event_datasetTag, event_pfMET, event_pfMET_phi, event_pfMT, event_pfSumEt, event_tcMET, event_tcMET_phi, event_tcMT, event_tcSumEt, event_triggerDecision, eventNumber, h_EB_deta, h_EB_dphi, h_EB_ecaliso, h_EB_hcaliso, h_EB_HoE, h_EB_sIetaIeta, h_EB_trkiso, h_EE_deta, h_EE_dphi, h_EE_ecaliso, h_EE_hcaliso, h_EE_HoE, h_EE_sIetaIeta, h_EE_trkiso, h_met, h_met_EB, h_met_EE, h_met_inverse, h_met_inverse_EB, h_met_inverse_EE, h_mt, h_mt_EB, h_mt_EE, h_mt_inverse, h_mt_inverse_EB, h_mt_inverse_EE, h_scEt, h_scEta, h_scPhi, h_trackIso_eb_NmOne, h_trackIso_ee_NmOne, hcalIso_EB_, hcalIso_EB_inv, hcalIso_EE_, hcalIso_EE_inv, hcalIsoUser_EB_, hcalIsoUser_EB_inv, hcalIsoUser_EE_, hcalIsoUser_EE_inv, hoe_EB_, hoe_EB_inv, hoe_EE_, hoe_EE_inv, includeJetInformationInNtuples_, InvVars_, lumiSection, nBarrelVars_, pfjet_et, pfjet_eta, pfjet_phi, pv_x, pv_y, pv_z, runNumber, sihih_EB_, sihih_EB_inv, sihih_EE_, sihih_EE_inv, storeAllSecondElectronVariables_, storeExtraInformation_, tip_bspot_EB_, tip_bspot_EB_inv, tip_bspot_EE_, tip_bspot_EE_inv, trackIso_EB_, trackIso_EB_inv, trackIso_EE_, trackIso_EE_inv, trackIsoUser_EB_, trackIsoUser_EB_inv, trackIsoUser_EE_, trackIsoUser_EE_inv, vbtfPresele_tree, vbtfSele_tree, VtxNormalizedChi2, VtxNormalizedChi2BS, VtxTracksSize, VtxTracksSizeBS, WENU_VBTFpreseleFile_, WENU_VBTFpreseleFileName_, WENU_VBTFselectionFile_, and WENU_VBTFselectionFileName_.

863  {
864  //std::cout << "In beginJob()" << std::endl;
865  // Double_t Pi = TMath::Pi();
866  // TString histo_file = outputFile_;
867  // histofile = new TFile( histo_file,"RECREATE");
868 
869  h_met = new TH1F("h_met", "h_met", 200, 0, 200);
870  h_met_inverse = new TH1F("h_met_inverse", "h_met_inverse", 200, 0, 200);
871 
872  h_mt = new TH1F("h_mt", "h_mt", 200, 0, 200);
873  h_mt_inverse = new TH1F("h_mt_inverse", "h_mt_inverse", 200, 0, 200);
874 
875  h_met_EB = new TH1F("h_met_EB", "h_met_EB", 200, 0, 200);
876  h_met_inverse_EB = new TH1F("h_met_inverse_EB", "h_met_inverse_EB", 200, 0, 200);
877 
878  h_mt_EB = new TH1F("h_mt_EB", "h_mt_EB", 200, 0, 200);
879  h_mt_inverse_EB = new TH1F("h_mt_inverse_EB", "h_mt_inverse_EB", 200, 0, 200);
880 
881  h_met_EE = new TH1F("h_met_EE", "h_met_EE", 200, 0, 200);
882  h_met_inverse_EE = new TH1F("h_met_inverse_EE", "h_met_inverse_EE", 200, 0, 200);
883 
884  h_mt_EE = new TH1F("h_mt_EE", "h_mt_EE", 200, 0, 200);
885  h_mt_inverse_EE = new TH1F("h_mt_inverse_EE", "h_mt_inverse_EE", 200, 0, 200);
886 
887  h_scEt = new TH1F("h_scEt", "h_scEt", 200, 0, 100);
888  h_scEta = new TH1F("h_scEta", "h_scEta", 200, -3, 3);
889  h_scPhi = new TH1F("h_scPhi", "h_scPhi", 200, -4, 4);
890 
891  //VALIDATION PLOTS
892  //EB
893  h_EB_trkiso = new TH1F("h_EB_trkiso", "h_EB_trkiso", 200, 0.0, 9.0);
894  h_EB_ecaliso = new TH1F("h_EB_ecaliso", "h_EB_ecaliso", 200, 0.0, 9.0);
895  h_EB_hcaliso = new TH1F("h_EB_hcaliso", "h_EB_hcaliso", 200, 0.0, 9.0);
896  h_EB_sIetaIeta = new TH1F("h_EB_sIetaIeta", "h_EB_sIetaIeta", 200, 0.0, 0.02);
897  h_EB_dphi = new TH1F("h_EB_dphi", "h_EB_dphi", 200, -0.03, 0.03);
898  h_EB_deta = new TH1F("h_EB_deta", "h_EB_deta", 200, -0.01, 0.01);
899  h_EB_HoE = new TH1F("h_EB_HoE", "h_EB_HoE", 200, 0.0, 0.2);
900  //EE
901  h_EE_trkiso = new TH1F("h_EE_trkiso", "h_EE_trkiso", 200, 0.0, 9.0);
902  h_EE_ecaliso = new TH1F("h_EE_ecaliso", "h_EE_ecaliso", 200, 0.0, 9.0);
903  h_EE_hcaliso = new TH1F("h_EE_hcaliso", "h_EE_hcaliso", 200, 0.0, 9.0);
904  h_EE_sIetaIeta = new TH1F("h_EE_sIetaIeta", "h_EE_sIetaIeta", 200, 0.0, 0.1);
905  h_EE_dphi = new TH1F("h_EE_dphi", "h_EE_dphi", 200, -0.03, 0.03);
906  h_EE_deta = new TH1F("h_EE_deta", "h_EE_deta", 200, -0.01, 0.01);
907  h_EE_HoE = new TH1F("h_EE_HoE", "h_EE_HoE", 200, 0.0, 0.2);
908 
909  //
910  //
911  h_trackIso_eb_NmOne = new TH1F("h_trackIso_eb_NmOne", "trackIso EB N-1 plot", 80, 0, 8);
912  h_trackIso_ee_NmOne = new TH1F("h_trackIso_ee_NmOne", "trackIso EE N-1 plot", 80, 0, 8);
913 
914  // if you add some new variable change the nBarrelVars_ accordingly
915  // reminder: in the current implementation you must have the same number
916  // of vars in both barrel and endcaps
917  nBarrelVars_ = 13;
918  //
919  // Put EB variables together and EE variables together
920  // number of barrel variables = number of endcap variable
921  // if you don't want to use some variable put a very high cut
922  CutVars_.push_back(trackIso_EB_); //0
923  CutVars_.push_back(ecalIso_EB_); //1
924  CutVars_.push_back(hcalIso_EB_); //2
925  CutVars_.push_back(sihih_EB_); //3
926  CutVars_.push_back(dphi_EB_); //4
927  CutVars_.push_back(deta_EB_); //5
928  CutVars_.push_back(hoe_EB_); //6
929  CutVars_.push_back(cIso_EB_); //7
930  CutVars_.push_back(tip_bspot_EB_); //8
931  CutVars_.push_back(eop_EB_); //9
932  CutVars_.push_back(trackIsoUser_EB_); //10
933  CutVars_.push_back(ecalIsoUser_EB_); //11
934  CutVars_.push_back(hcalIsoUser_EB_); //12
935  //
936  CutVars_.push_back(trackIso_EE_); //0
937  CutVars_.push_back(ecalIso_EE_); //1
938  CutVars_.push_back(hcalIso_EE_); //2
939  CutVars_.push_back(sihih_EE_); //3
940  CutVars_.push_back(dphi_EE_); //4
941  CutVars_.push_back(deta_EE_); //5
942  CutVars_.push_back(hoe_EE_); //6
943  CutVars_.push_back(cIso_EE_); //7
944  CutVars_.push_back(tip_bspot_EE_); //8
945  CutVars_.push_back(eop_EE_); //9
946  CutVars_.push_back(trackIsoUser_EE_); //10
947  CutVars_.push_back(ecalIsoUser_EE_); //11
948  CutVars_.push_back(hcalIsoUser_EE_); //12
949  //
950  InvVars_.push_back(trackIso_EB_inv); //0
951  InvVars_.push_back(ecalIso_EB_inv); //1
952  InvVars_.push_back(hcalIso_EB_inv); //2
953  InvVars_.push_back(sihih_EB_inv); //3
954  InvVars_.push_back(dphi_EB_inv); //4
955  InvVars_.push_back(deta_EB_inv); //5
956  InvVars_.push_back(hoe_EB_inv); //6
957  InvVars_.push_back(cIso_EB_inv); //7
958  InvVars_.push_back(tip_bspot_EB_inv); //8
959  InvVars_.push_back(eop_EB_inv); //9
960  InvVars_.push_back(trackIsoUser_EB_inv); //10
961  InvVars_.push_back(ecalIsoUser_EB_inv); //11
962  InvVars_.push_back(hcalIsoUser_EB_inv); //12
963  //
964  InvVars_.push_back(trackIso_EE_inv); //0
965  InvVars_.push_back(ecalIso_EE_inv); //1
966  InvVars_.push_back(hcalIso_EE_inv); //2
967  InvVars_.push_back(sihih_EE_inv); //3
968  InvVars_.push_back(dphi_EE_inv); //4
969  InvVars_.push_back(deta_EE_inv); //5
970  InvVars_.push_back(hoe_EE_inv); //6
971  InvVars_.push_back(cIso_EE_inv); //7
972  InvVars_.push_back(tip_bspot_EE_inv); //8
973  InvVars_.push_back(eop_EE_inv); //9
974  InvVars_.push_back(trackIsoUser_EE_inv); //10
975  InvVars_.push_back(ecalIsoUser_EE_inv); //11
976  InvVars_.push_back(hcalIsoUser_EE_inv); //12
977  //
978  //
979  // ________________________________________________________________________
980  //
981  // The VBTF Root Tuples ---------------------------------------------------
982  // ________________________________________________________________________
983  //
984  WENU_VBTFselectionFile_ = new TFile(TString(WENU_VBTFselectionFileName_), "RECREATE");
985 
986  vbtfSele_tree = new TTree("vbtfSele_tree", "Tree to store the W Candidates that pass the VBTF selection");
987  vbtfSele_tree->Branch("runNumber", &runNumber, "runNumber/I");
988  vbtfSele_tree->Branch("eventNumber", &eventNumber, "eventNumber/L");
989  vbtfSele_tree->Branch("lumiSection", &lumiSection, "lumiSection/I");
990  //
991  vbtfSele_tree->Branch("ele_sc_gsf_et", &ele_sc_gsf_et, "ele_sc_gsf_et/F");
992  vbtfSele_tree->Branch("ele_sc_energy", &ele_sc_energy, "ele_sc_energy/F");
993  vbtfSele_tree->Branch("ele_sc_eta", &ele_sc_eta, "ele_sc_eta/F");
994  vbtfSele_tree->Branch("ele_sc_phi", &ele_sc_phi, "ele_sc_phi/F");
995  vbtfSele_tree->Branch("ele_sc_rho", &ele_sc_rho, "ele_sc_rho/F");
996  vbtfSele_tree->Branch("ele_cand_et", &ele_cand_et, "ele_cand_et/F");
997  vbtfSele_tree->Branch("ele_cand_eta", &ele_cand_eta, "ele_cand_eta/F");
998  vbtfSele_tree->Branch("ele_cand_phi", &ele_cand_phi, "ele_cand_phi/F");
999  vbtfSele_tree->Branch("ele_iso_track", &ele_iso_track, "ele_iso_track/F");
1000  vbtfSele_tree->Branch("ele_iso_ecal", &ele_iso_ecal, "ele_iso_ecal/F");
1001  vbtfSele_tree->Branch("ele_iso_hcal", &ele_iso_hcal, "ele_iso_hcal/F");
1002  vbtfSele_tree->Branch("ele_id_sihih", &ele_id_sihih, "ele_id_sihih/F");
1003  vbtfSele_tree->Branch("ele_id_deta", &ele_id_deta, "ele_id_deta/F");
1004  vbtfSele_tree->Branch("ele_id_dphi", &ele_id_dphi, "ele_id_dphi/F");
1005  vbtfSele_tree->Branch("ele_id_hoe", &ele_id_hoe, "ele_id_hoe/F");
1006  vbtfSele_tree->Branch("ele_cr_mhitsinner", &ele_cr_mhitsinner, "ele_cr_mhitsinner/I");
1007  vbtfSele_tree->Branch("ele_cr_dcot", &ele_cr_dcot, "ele_cr_dcot/F");
1008  vbtfSele_tree->Branch("ele_cr_dist", &ele_cr_dist, "ele_cr_dist/F");
1009  vbtfSele_tree->Branch("ele_vx", &ele_vx, "ele_vx/F");
1010  vbtfSele_tree->Branch("ele_vy", &ele_vy, "ele_vy/F");
1011  vbtfSele_tree->Branch("ele_vz", &ele_vz, "ele_vz/F");
1012  vbtfSele_tree->Branch("pv_x", &pv_x, "pv_x/F");
1013  vbtfSele_tree->Branch("pv_y", &pv_y, "pv_y/F");
1014  vbtfSele_tree->Branch("pv_z", &pv_z, "pv_z/F");
1015  vbtfSele_tree->Branch("ele_gsfCharge", &ele_gsfCharge, "ele_gsfCharge/I");
1016  vbtfSele_tree->Branch("ele_ctfCharge", &ele_ctfCharge, "ele_ctfCharge/I");
1017  vbtfSele_tree->Branch("ele_scPixCharge", &ele_scPixCharge, "ele_scPixCharge/I");
1018  vbtfSele_tree->Branch("ele_eop", &ele_eop, "ele_eop/F");
1019  vbtfSele_tree->Branch("ele_tip_bs", &ele_tip_bs, "ele_tip_bs/F");
1020  vbtfSele_tree->Branch("ele_tip_pv", &ele_tip_pv, "ele_tip_pv/F");
1021  vbtfSele_tree->Branch("ele_pin", &ele_pin, "ele_pin/F");
1022  vbtfSele_tree->Branch("ele_pout", &ele_pout, "ele_pout/F");
1023  vbtfSele_tree->Branch("event_caloMET", &event_caloMET, "event_caloMET/F");
1024  vbtfSele_tree->Branch("event_pfMET", &event_pfMET, "event_pfMET/F");
1025  vbtfSele_tree->Branch("event_tcMET", &event_tcMET, "event_tcMET/F");
1026  vbtfSele_tree->Branch("event_caloMT", &event_caloMT, "event_caloMT/F");
1027  vbtfSele_tree->Branch("event_pfMT", &event_pfMT, "event_pfMT/F");
1028  vbtfSele_tree->Branch("event_tcMT", &event_tcMT, "event_tcMT/F");
1029  vbtfSele_tree->Branch("event_caloMET_phi", &event_caloMET_phi, "event_caloMET_phi/F");
1030  vbtfSele_tree->Branch("event_pfMET_phi", &event_pfMET_phi, "event_pfMET_phi/F");
1031  vbtfSele_tree->Branch("event_tcMET_phi", &event_tcMET_phi, "event_tcMET_phi/F");
1032  //
1033  // the extra jet variables:
1035  vbtfSele_tree->Branch("calojet_et", calojet_et, "calojet_et[5]/F");
1036  vbtfSele_tree->Branch("calojet_eta", calojet_eta, "calojet_eta[5]/F");
1037  vbtfSele_tree->Branch("calojet_phi", calojet_phi, "calojet_phi[5]/F");
1038  vbtfSele_tree->Branch("pfjet_et", pfjet_et, "pfjet_et[5]/F");
1039  vbtfSele_tree->Branch("pfjet_eta", pfjet_eta, "pfjet_eta[5]/F");
1040  vbtfSele_tree->Branch("pfjet_phi", pfjet_phi, "pfjet_phi[5]/F");
1041  }
1042  if (storeExtraInformation_) {
1043  vbtfSele_tree->Branch("ele2nd_sc_gsf_et", &ele2nd_sc_gsf_et, "ele2nd_sc_gsf_et/F");
1044  vbtfSele_tree->Branch("ele2nd_passes_selection", &ele2nd_passes_selection, "ele2nd_passes_selection/I");
1045  vbtfSele_tree->Branch("ele2nd_ecalDriven", &ele2nd_ecalDriven, "ele2nd_ecalDriven/I");
1046  vbtfSele_tree->Branch("event_caloSumEt", &event_caloSumEt, "event_caloSumEt/F");
1047  vbtfSele_tree->Branch("event_pfSumEt", &event_pfSumEt, "event_pfSumEt/F");
1048  vbtfSele_tree->Branch("event_tcSumEt", &event_tcSumEt, "event_tcSumEt/F");
1049  }
1050  vbtfSele_tree->Branch("event_datasetTag", &event_datasetTag, "event_dataSetTag/I");
1051  //
1052  //
1053  // everything after preselection
1054  //
1055  WENU_VBTFpreseleFile_ = new TFile(TString(WENU_VBTFpreseleFileName_), "RECREATE");
1056 
1057  vbtfPresele_tree = new TTree("vbtfPresele_tree", "Tree to store the W Candidates that pass the VBTF preselection");
1058  vbtfPresele_tree->Branch("runNumber", &runNumber, "runNumber/I");
1059  vbtfPresele_tree->Branch("eventNumber", &eventNumber, "eventNumber/L");
1060  vbtfPresele_tree->Branch("lumiSection", &lumiSection, "lumiSection/I");
1061  //
1062  vbtfPresele_tree->Branch("ele_sc_gsf_et", &ele_sc_gsf_et, "ele_sc_gsf_et/F");
1063  vbtfPresele_tree->Branch("ele_sc_energy", &ele_sc_energy, "ele_sc_energy/F");
1064  vbtfPresele_tree->Branch("ele_sc_eta", &ele_sc_eta, "ele_sc_eta/F");
1065  vbtfPresele_tree->Branch("ele_sc_phi", &ele_sc_phi, "ele_sc_phi/F");
1066  vbtfPresele_tree->Branch("ele_sc_rho", &ele_sc_rho, "ele_sc_rho/F");
1067  vbtfPresele_tree->Branch("ele_cand_et", &ele_cand_et, "ele_cand_et/F");
1068  vbtfPresele_tree->Branch("ele_cand_eta", &ele_cand_eta, "ele_cand_eta/F");
1069  vbtfPresele_tree->Branch("ele_cand_phi", &ele_cand_phi, "ele_cand_phi/F");
1070  vbtfPresele_tree->Branch("ele_iso_track", &ele_iso_track, "ele_iso_track/F");
1071  vbtfPresele_tree->Branch("ele_iso_ecal", &ele_iso_ecal, "ele_iso_ecal/F");
1072  vbtfPresele_tree->Branch("ele_iso_hcal", &ele_iso_hcal, "ele_iso_hcal/F");
1073  vbtfPresele_tree->Branch("ele_id_sihih", &ele_id_sihih, "ele_id_sihih/F");
1074  vbtfPresele_tree->Branch("ele_id_deta", &ele_id_deta, "ele_id_deta/F");
1075  vbtfPresele_tree->Branch("ele_id_dphi", &ele_id_dphi, "ele_id_dphi/F");
1076  vbtfPresele_tree->Branch("ele_id_hoe", &ele_id_hoe, "ele_id_hoe/F");
1077  vbtfPresele_tree->Branch("ele_cr_mhitsinner", &ele_cr_mhitsinner, "ele_cr_mhitsinner/I");
1078  vbtfPresele_tree->Branch("ele_cr_dcot", &ele_cr_dcot, "ele_cr_dcot/F");
1079  vbtfPresele_tree->Branch("ele_cr_dist", &ele_cr_dist, "ele_cr_dist/F");
1080  vbtfPresele_tree->Branch("ele_vx", &ele_vx, "ele_vx/F");
1081  vbtfPresele_tree->Branch("ele_vy", &ele_vy, "ele_vy/F");
1082  vbtfPresele_tree->Branch("ele_vz", &ele_vz, "ele_vz/F");
1083  vbtfPresele_tree->Branch("pv_x", &pv_x, "pv_x/F");
1084  vbtfPresele_tree->Branch("pv_y", &pv_y, "pv_y/F");
1085  vbtfPresele_tree->Branch("pv_z", &pv_z, "pv_z/F");
1086  vbtfPresele_tree->Branch("ele_gsfCharge", &ele_gsfCharge, "ele_gsfCharge/I");
1087  vbtfPresele_tree->Branch("ele_ctfCharge", &ele_ctfCharge, "ele_ctfCharge/I");
1088  vbtfPresele_tree->Branch("ele_scPixCharge", &ele_scPixCharge, "ele_scPixCharge/I");
1089  vbtfPresele_tree->Branch("ele_eop", &ele_eop, "ele_eop/F");
1090  vbtfPresele_tree->Branch("ele_tip_bs", &ele_tip_bs, "ele_tip_bs/F");
1091  vbtfPresele_tree->Branch("ele_tip_pv", &ele_tip_pv, "ele_tip_pv/F");
1092  vbtfPresele_tree->Branch("ele_pin", &ele_pin, "ele_pin/F");
1093  vbtfPresele_tree->Branch("ele_pout", &ele_pout, "ele_pout/F");
1094  vbtfPresele_tree->Branch("event_caloMET", &event_caloMET, "event_caloMET/F");
1095  vbtfPresele_tree->Branch("event_pfMET", &event_pfMET, "event_pfMET/F");
1096  vbtfPresele_tree->Branch("event_tcMET", &event_tcMET, "event_tcMET/F");
1097  vbtfPresele_tree->Branch("event_caloMT", &event_caloMT, "event_caloMT/F");
1098  vbtfPresele_tree->Branch("event_pfMT", &event_pfMT, "event_pfMT/F");
1099  vbtfPresele_tree->Branch("event_tcMT", &event_tcMT, "event_tcMT/F");
1100  vbtfPresele_tree->Branch("event_caloMET_phi", &event_caloMET_phi, "event_caloMET_phi/F");
1101  vbtfPresele_tree->Branch("event_pfMET_phi", &event_pfMET_phi, "event_pfMET_phi/F");
1102  vbtfPresele_tree->Branch("event_tcMET_phi", &event_tcMET_phi, "event_tcMET_phi/F");
1103  vbtfPresele_tree->Branch("event_caloSumEt", &event_caloSumEt, "event_caloSumEt/F");
1104  vbtfPresele_tree->Branch("event_pfSumEt", &event_pfSumEt, "event_pfSumEt/F");
1105  vbtfPresele_tree->Branch("event_tcSumEt", &event_tcSumEt, "event_tcSumEt/F");
1106  // the extra jet variables:
1108  vbtfPresele_tree->Branch("calojet_et", calojet_et, "calojet_et[5]/F");
1109  vbtfPresele_tree->Branch("calojet_eta", calojet_eta, "calojet_eta[5]/F");
1110  vbtfPresele_tree->Branch("calojet_phi", calojet_phi, "calojet_phi[5]/F");
1111  vbtfPresele_tree->Branch("pfjet_et", pfjet_et, "pfjet_et[5]/F");
1112  vbtfPresele_tree->Branch("pfjet_eta", pfjet_eta, "pfjet_eta[5]/F");
1113  vbtfPresele_tree->Branch("pfjet_phi", pfjet_phi, "pfjet_phi[5]/F");
1114  }
1115  if (storeExtraInformation_) {
1116  vbtfPresele_tree->Branch("ele2nd_sc_gsf_et", &ele2nd_sc_gsf_et, "ele2nd_sc_gsf_et/F");
1117  vbtfPresele_tree->Branch("ele2nd_sc_eta", &ele2nd_sc_eta, "ele2nd_sc_eta/F");
1118  vbtfPresele_tree->Branch("ele2nd_sc_phi", &ele2nd_sc_phi, "ele2nd_sc_phi/F");
1119  vbtfPresele_tree->Branch("ele2nd_sc_rho", &ele2nd_sc_rho, "ele2nd_sc_rho/F");
1120  vbtfPresele_tree->Branch("ele2nd_cand_eta", &ele2nd_cand_eta, "ele2nd_cand_eta/F");
1121  vbtfPresele_tree->Branch("ele2nd_cand_phi", &ele2nd_cand_phi, "ele2nd_cand_phi/F");
1122  vbtfPresele_tree->Branch("ele2nd_pin", &ele2nd_pin, "ele2nd_pin/F");
1123  vbtfPresele_tree->Branch("ele2nd_pout", &ele2nd_pout, "ele2nd_pout/F");
1124  vbtfPresele_tree->Branch("ele2nd_ecalDriven", &ele2nd_ecalDriven, "ele2nd_ecalDriven/I");
1125  vbtfPresele_tree->Branch("ele2nd_passes_selection", &ele2nd_passes_selection, "ele2nd_passes_selection/I");
1126  vbtfPresele_tree->Branch("ele_hltmatched_dr", &ele_hltmatched_dr, "ele_hltmatched_dr/F");
1127  vbtfPresele_tree->Branch("event_triggerDecision", &event_triggerDecision, "event_triggerDecision/I");
1128  vbtfPresele_tree->Branch("VtxTracksSize", &VtxTracksSize);
1129  vbtfPresele_tree->Branch("VtxNormalizedChi2", &VtxNormalizedChi2);
1130  vbtfPresele_tree->Branch("VtxTracksSizeBS", &VtxTracksSizeBS);
1131  vbtfPresele_tree->Branch("VtxNormalizedChi2BS", &VtxNormalizedChi2BS);
1132  }
1134  vbtfPresele_tree->Branch("ele2nd_cand_et", &ele2nd_cand_et, "ele2nd_cand_et/F");
1135  vbtfPresele_tree->Branch("ele2nd_iso_track", &ele2nd_iso_track, "ele2nd_iso_track /F");
1136  vbtfPresele_tree->Branch("ele2nd_iso_ecal", &ele2nd_iso_ecal, "ele2nd_iso_ecal/F");
1137  vbtfPresele_tree->Branch("ele2nd_iso_hcal", &ele2nd_iso_hcal, "ele2nd_iso_hcal/F");
1138  vbtfPresele_tree->Branch("ele2nd_id_sihih", &ele2nd_id_sihih, "ele2nd_id_sihih/F");
1139  vbtfPresele_tree->Branch("ele2nd_id_deta", &ele2nd_id_deta, "ele2nd_id_deta/F");
1140  vbtfPresele_tree->Branch("ele2nd_id_dphi", &ele2nd_id_dphi, "ele2nd_id_dphi/F");
1141  vbtfPresele_tree->Branch("ele2nd_id_hoe", &ele2nd_id_hoe, "ele2nd_id_hoe/F");
1142  vbtfPresele_tree->Branch("ele2nd_cr_mhitsinner", &ele2nd_cr_mhitsinner, "ele2nd_cr_mhitsinner/I");
1143  vbtfPresele_tree->Branch("ele2nd_cr_dcot", &ele2nd_cr_dcot, "ele2nd_cr_dcot/F");
1144  vbtfPresele_tree->Branch("ele2nd_cr_dist", &ele2nd_cr_dist, "ele2nd_cr_dist/F");
1145  vbtfPresele_tree->Branch("ele2nd_vx", &ele2nd_vx, "ele2nd_vx/F");
1146  vbtfPresele_tree->Branch("ele2nd_vy", &ele2nd_vy, "ele2nd_vy/F");
1147  vbtfPresele_tree->Branch("ele2nd_vz", &ele2nd_vz, "ele2nd_vz/F");
1148 
1149  vbtfPresele_tree->Branch("ele2nd_gsfCharge", &ele2nd_gsfCharge, "ele2nd_gsfCharge/I");
1150  vbtfPresele_tree->Branch("ele2nd_ctfCharge", &ele2nd_ctfCharge, "ele2nd_ctfCharge/I");
1151  vbtfPresele_tree->Branch("ele2nd_scPixCharge", &ele2nd_scPixCharge, "ele2nd_scPixCharge/I");
1152  vbtfPresele_tree->Branch("ele2nd_eop", &ele2nd_eop, "ele2nd_eop/F");
1153  vbtfPresele_tree->Branch("ele2nd_tip_bs", &ele2nd_tip_bs, "ele2nd_tip_bs/F");
1154  vbtfPresele_tree->Branch("ele2nd_tip_pv", &ele2nd_tip_pv, "ele2nd_tip_pv/F");
1155  vbtfPresele_tree->Branch("ele2nd_hltmatched_dr", &ele2nd_hltmatched_dr, "ele2nd_hltmatched_dr/F");
1156  }
1157  vbtfPresele_tree->Branch("event_datasetTag", &event_datasetTag, "event_dataSetTag/I");
1158 
1159  //
1160  // _________________________________________________________________________
1161  //
1162  //
1163  //
1164 }
Float_t ele_vy
Definition: WenuPlots.h:201
TH1F * h_mt_inverse_EE
Definition: WenuPlots.h:94
Float_t ele2nd_cr_dcot
Definition: WenuPlots.h:245
Double_t trackIsoUser_EB_
Definition: WenuPlots.h:146
Int_t ele2nd_ctfCharge
Definition: WenuPlots.h:247
Float_t ele2nd_id_deta
Definition: WenuPlots.h:244
Float_t ele2nd_sc_gsf_et
Definition: WenuPlots.h:216
Double_t cIso_EE_
Definition: WenuPlots.h:142
Double_t trackIso_EB_
Definition: WenuPlots.h:122
Float_t ele_iso_ecal
Definition: WenuPlots.h:197
std::string WENU_VBTFselectionFileName_
Definition: WenuPlots.h:234
TH1F * h_met_inverse_EB
Definition: WenuPlots.h:87
Bool_t hcalIso_EE_inv
Definition: WenuPlots.h:159
Bool_t deta_EE_inv
Definition: WenuPlots.h:170
Float_t event_caloMET
Definition: WenuPlots.h:206
Float_t ele_iso_hcal
Definition: WenuPlots.h:197
Float_t ele2nd_tip_bs
Definition: WenuPlots.h:248
Float_t ele2nd_id_hoe
Definition: WenuPlots.h:244
Double_t eop_EE_
Definition: WenuPlots.h:144
Float_t ele_eop
Definition: WenuPlots.h:205
Bool_t ecalIso_EB_inv
Definition: WenuPlots.h:154
TH1F * h_EE_trkiso
Definition: WenuPlots.h:108
Double_t trackIsoUser_EE_
Definition: WenuPlots.h:149
Int_t nBarrelVars_
Definition: WenuPlots.h:185
Float_t pfjet_eta[5]
Definition: WenuPlots.h:214
Float_t ele2nd_eop
Definition: WenuPlots.h:248
TH1F * h_EB_HoE
Definition: WenuPlots.h:106
TH1F * h_met_EB
Definition: WenuPlots.h:86
Int_t lumiSection
Definition: WenuPlots.h:192
Float_t event_tcMET_phi
Definition: WenuPlots.h:208
Int_t ele2nd_passes_selection
Definition: WenuPlots.h:224
TH1F * h_mt
Definition: WenuPlots.h:83
Float_t ele_vz
Definition: WenuPlots.h:201
Double_t cIso_EB_
Definition: WenuPlots.h:134
Float_t ele_pout
Definition: WenuPlots.h:202
Float_t ele_sc_rho
Definition: WenuPlots.h:194
Int_t ele2nd_scPixCharge
Definition: WenuPlots.h:247
Bool_t tip_bspot_EE_inv
Definition: WenuPlots.h:174
Float_t event_caloMET_phi
Definition: WenuPlots.h:208
Float_t ele_id_dphi
Definition: WenuPlots.h:198
TH1F * h_trackIso_ee_NmOne
Definition: WenuPlots.h:118
Bool_t tip_bspot_EB_inv
Definition: WenuPlots.h:166
Float_t ele_cr_dist
Definition: WenuPlots.h:199
std::string WENU_VBTFpreseleFileName_
Definition: WenuPlots.h:235
TH1F * h_scPhi
Definition: WenuPlots.h:98
Int_t ele2nd_ecalDriven
Definition: WenuPlots.h:225
Double_t ecalIsoUser_EB_
Definition: WenuPlots.h:147
Int_t ele_gsfCharge
Definition: WenuPlots.h:204
Float_t calojet_eta[5]
Definition: WenuPlots.h:211
Bool_t includeJetInformationInNtuples_
Definition: WenuPlots.h:236
Int_t runNumber
Definition: WenuPlots.h:192
Double_t dphi_EE_
Definition: WenuPlots.h:140
Bool_t sihih_EE_inv
Definition: WenuPlots.h:169
TTree * vbtfSele_tree
Definition: WenuPlots.h:232
TH1F * h_EB_trkiso
Definition: WenuPlots.h:100
Float_t ele2nd_pout
Definition: WenuPlots.h:223
Bool_t dphi_EE_inv
Definition: WenuPlots.h:171
Bool_t hcalIsoUser_EE_inv
Definition: WenuPlots.h:182
Float_t pv_x
Definition: WenuPlots.h:203
Float_t ele2nd_vy
Definition: WenuPlots.h:246
Float_t event_caloSumEt
Definition: WenuPlots.h:207
Double_t tip_bspot_EB_
Definition: WenuPlots.h:135
Float_t ele2nd_sc_eta
Definition: WenuPlots.h:217
Float_t ele2nd_sc_phi
Definition: WenuPlots.h:218
Bool_t ecalIso_EE_inv
Definition: WenuPlots.h:158
std::vector< Double_t > CutVars_
Definition: WenuPlots.h:187
Float_t ele_sc_eta
Definition: WenuPlots.h:194
Double_t deta_EE_
Definition: WenuPlots.h:139
TH1F * h_EE_sIetaIeta
Definition: WenuPlots.h:111
Float_t ele2nd_vx
Definition: WenuPlots.h:246
Float_t ele2nd_id_sihih
Definition: WenuPlots.h:244
Float_t event_pfMET
Definition: WenuPlots.h:206
TH1F * h_EB_sIetaIeta
Definition: WenuPlots.h:103
Float_t ele2nd_cand_phi
Definition: WenuPlots.h:221
Double_t hcalIso_EB_
Definition: WenuPlots.h:124
Float_t pv_y
Definition: WenuPlots.h:203
Float_t ele_sc_phi
Definition: WenuPlots.h:194
Double_t trackIso_EE_
Definition: WenuPlots.h:126
TH1F * h_met_EE
Definition: WenuPlots.h:91
Double_t deta_EB_
Definition: WenuPlots.h:131
TH1F * h_met
Definition: WenuPlots.h:81
TH1F * h_EB_ecaliso
Definition: WenuPlots.h:101
Float_t ele_id_deta
Definition: WenuPlots.h:198
Double_t hcalIsoUser_EB_
Definition: WenuPlots.h:148
TH1F * h_scEt
Definition: WenuPlots.h:96
Double_t hcalIso_EE_
Definition: WenuPlots.h:128
Float_t ele2nd_cand_et
Definition: WenuPlots.h:242
Float_t ele_cand_et
Definition: WenuPlots.h:196
Bool_t deta_EB_inv
Definition: WenuPlots.h:162
TFile * WENU_VBTFselectionFile_
Definition: WenuPlots.h:231
Bool_t hcalIsoUser_EB_inv
Definition: WenuPlots.h:179
Double_t sihih_EE_
Definition: WenuPlots.h:138
TH1F * h_EE_ecaliso
Definition: WenuPlots.h:109
TH1F * h_EB_hcaliso
Definition: WenuPlots.h:102
Float_t ele2nd_pin
Definition: WenuPlots.h:222
TH1F * h_met_inverse
Definition: WenuPlots.h:82
Bool_t ecalIsoUser_EE_inv
Definition: WenuPlots.h:181
Int_t event_triggerDecision
Definition: WenuPlots.h:227
Float_t ele2nd_hltmatched_dr
Definition: WenuPlots.h:249
Bool_t eop_EE_inv
Definition: WenuPlots.h:175
Float_t ele2nd_sc_rho
Definition: WenuPlots.h:219
Double_t ecalIso_EB_
Definition: WenuPlots.h:123
Float_t ele2nd_cand_eta
Definition: WenuPlots.h:220
Float_t ele_hltmatched_dr
Definition: WenuPlots.h:226
Float_t ele_vx
Definition: WenuPlots.h:201
Double_t eop_EB_
Definition: WenuPlots.h:136
TH1F * h_met_inverse_EE
Definition: WenuPlots.h:92
TH1F * h_mt_inverse
Definition: WenuPlots.h:84
TH1F * h_EE_dphi
Definition: WenuPlots.h:112
Double_t hcalIsoUser_EE_
Definition: WenuPlots.h:151
Bool_t trackIso_EE_inv
Definition: WenuPlots.h:157
Float_t ele_id_hoe
Definition: WenuPlots.h:198
Int_t ele_scPixCharge
Definition: WenuPlots.h:204
std::vector< Int_t > VtxTracksSizeBS
Definition: WenuPlots.h:252
Bool_t eop_EB_inv
Definition: WenuPlots.h:167
Bool_t storeAllSecondElectronVariables_
Definition: WenuPlots.h:241
Float_t calojet_phi[5]
Definition: WenuPlots.h:212
std::vector< Int_t > VtxTracksSize
Definition: WenuPlots.h:250
TH1F * h_EB_deta
Definition: WenuPlots.h:105
Float_t ele_tip_pv
Definition: WenuPlots.h:205
TFile * WENU_VBTFpreseleFile_
Definition: WenuPlots.h:230
TH1F * h_scEta
Definition: WenuPlots.h:97
Float_t ele2nd_iso_hcal
Definition: WenuPlots.h:243
Float_t pfjet_phi[5]
Definition: WenuPlots.h:215
Float_t ele_iso_track
Definition: WenuPlots.h:197
Int_t ele2nd_gsfCharge
Definition: WenuPlots.h:247
TTree * vbtfPresele_tree
Definition: WenuPlots.h:233
Int_t event_datasetTag
Definition: WenuPlots.h:228
Float_t ele_pin
Definition: WenuPlots.h:202
TH1F * h_EB_dphi
Definition: WenuPlots.h:104
Float_t event_tcSumEt
Definition: WenuPlots.h:207
Int_t ele_cr_mhitsinner
Definition: WenuPlots.h:200
TH1F * h_trackIso_eb_NmOne
Definition: WenuPlots.h:117
Float_t pv_z
Definition: WenuPlots.h:203
Bool_t sihih_EB_inv
Definition: WenuPlots.h:161
Float_t ele2nd_iso_track
Definition: WenuPlots.h:243
Float_t ele_cand_eta
Definition: WenuPlots.h:196
Bool_t cIso_EB_inv
Definition: WenuPlots.h:165
Bool_t trackIsoUser_EE_inv
Definition: WenuPlots.h:180
Float_t pfjet_et[5]
Definition: WenuPlots.h:213
Bool_t hcalIso_EB_inv
Definition: WenuPlots.h:155
Bool_t storeExtraInformation_
Definition: WenuPlots.h:237
Bool_t hoe_EE_inv
Definition: WenuPlots.h:172
Float_t ele2nd_vz
Definition: WenuPlots.h:246
Int_t ele_ctfCharge
Definition: WenuPlots.h:204
Float_t event_pfMT
Definition: WenuPlots.h:209
Float_t event_tcMT
Definition: WenuPlots.h:209
Float_t ele_cand_phi
Definition: WenuPlots.h:196
Bool_t ecalIsoUser_EB_inv
Definition: WenuPlots.h:178
TH1F * h_EE_deta
Definition: WenuPlots.h:113
TH1F * h_mt_inverse_EB
Definition: WenuPlots.h:89
Float_t ele2nd_tip_pv
Definition: WenuPlots.h:248
Float_t ele2nd_cr_dist
Definition: WenuPlots.h:245
Float_t event_tcMET
Definition: WenuPlots.h:206
Float_t event_pfMET_phi
Definition: WenuPlots.h:208
Bool_t cIso_EE_inv
Definition: WenuPlots.h:173
Float_t event_caloMT
Definition: WenuPlots.h:209
TH1F * h_mt_EB
Definition: WenuPlots.h:88
Float_t ele2nd_id_dphi
Definition: WenuPlots.h:244
Bool_t dphi_EB_inv
Definition: WenuPlots.h:163
Float_t calojet_et[5]
Definition: WenuPlots.h:210
Double_t hoe_EB_
Definition: WenuPlots.h:133
Float_t ele_id_sihih
Definition: WenuPlots.h:198
Bool_t trackIsoUser_EB_inv
Definition: WenuPlots.h:177
Float_t ele_tip_bs
Definition: WenuPlots.h:205
std::vector< Float_t > VtxNormalizedChi2BS
Definition: WenuPlots.h:253
TH1F * h_mt_EE
Definition: WenuPlots.h:93
Int_t ele2nd_cr_mhitsinner
Definition: WenuPlots.h:247
Double_t tip_bspot_EE_
Definition: WenuPlots.h:143
Double_t dphi_EB_
Definition: WenuPlots.h:132
Double_t sihih_EB_
Definition: WenuPlots.h:130
Float_t ele2nd_iso_ecal
Definition: WenuPlots.h:243
std::vector< Bool_t > InvVars_
Definition: WenuPlots.h:188
Float_t ele_cr_dcot
Definition: WenuPlots.h:199
Bool_t trackIso_EB_inv
Definition: WenuPlots.h:153
Double_t ecalIsoUser_EE_
Definition: WenuPlots.h:150
Float_t ele_sc_energy
Definition: WenuPlots.h:194
Double_t ecalIso_EE_
Definition: WenuPlots.h:127
TH1F * h_EE_HoE
Definition: WenuPlots.h:114
Float_t ele_sc_gsf_et
Definition: WenuPlots.h:195
TH1F * h_EE_hcaliso
Definition: WenuPlots.h:110
Float_t event_pfSumEt
Definition: WenuPlots.h:207
Bool_t hoe_EB_inv
Definition: WenuPlots.h:164
Double_t hoe_EE_
Definition: WenuPlots.h:141
std::vector< Float_t > VtxNormalizedChi2
Definition: WenuPlots.h:251
Long64_t eventNumber
Definition: WenuPlots.h:193
Bool_t WenuPlots::CheckCut ( const pat::Electron wenu,
Int_t  i 
)
private

Definition at line 763 of file WenuPlots.cc.

References Abs(), CutVars_, mps_fire::i, nBarrelVars_, ReturnCandVar(), and pat::Electron::superCluster().

Referenced by CheckCuts(), and CheckCutsNminusOne().

763  {
764  Double_t fabseta = TMath::Abs(ele->superCluster()->eta());
765  if (fabseta < 1.479) {
766  return TMath::Abs(ReturnCandVar(ele, i)) < CutVars_[i];
767  }
768  return TMath::Abs(ReturnCandVar(ele, i)) < CutVars_[i + nBarrelVars_];
769 }
Int_t nBarrelVars_
Definition: WenuPlots.h:185
std::vector< Double_t > CutVars_
Definition: WenuPlots.h:187
T Abs(T a)
Definition: MathUtil.h:49
Double_t ReturnCandVar(const pat::Electron *ele, Int_t i)
Definition: WenuPlots.cc:785
Bool_t WenuPlots::CheckCutInv ( const pat::Electron wenu,
Int_t  i 
)
private

Definition at line 771 of file WenuPlots.cc.

References Abs(), CutVars_, mps_fire::i, InvVars_, nBarrelVars_, ReturnCandVar(), and pat::Electron::superCluster().

Referenced by CheckCutsInverse().

771  {
772  Double_t fabseta = TMath::Abs(ele->superCluster()->eta());
773  if (fabseta < 1.479) {
774  if (InvVars_[i])
775  return TMath::Abs(ReturnCandVar(ele, i)) > CutVars_[i];
776  return TMath::Abs(ReturnCandVar(ele, i)) < CutVars_[i];
777  }
778  if (InvVars_[i + nBarrelVars_]) {
779  if (InvVars_[i])
780  return TMath::Abs(ReturnCandVar(ele, i)) > CutVars_[i + nBarrelVars_];
781  }
782  return TMath::Abs(ReturnCandVar(ele, i)) < CutVars_[i + nBarrelVars_];
783 }
Int_t nBarrelVars_
Definition: WenuPlots.h:185
std::vector< Double_t > CutVars_
Definition: WenuPlots.h:187
T Abs(T a)
Definition: MathUtil.h:49
Double_t ReturnCandVar(const pat::Electron *ele, Int_t i)
Definition: WenuPlots.cc:785
std::vector< Bool_t > InvVars_
Definition: WenuPlots.h:188
Bool_t WenuPlots::CheckCuts ( const pat::Electron ele)
private

Definition at line 720 of file WenuPlots.cc.

References Abs(), CheckCut(), gather_cfg::cout, pat::Electron::electronID(), mps_fire::i, pat::Electron::isElectronIDAvailable(), nBarrelVars_, usePrecalcID_, usePrecalcIDSign_, usePrecalcIDType_, usePrecalcIDValue_, and heppy_batch::val.

Referenced by analyze().

720  {
721  if (usePrecalcID_) {
723  std::cout << "Error! not existing ID with name: " << usePrecalcIDType_ << " function will return true!"
724  << std::endl;
725  return true;
726  }
727  Double_t val = ele->electronID(usePrecalcIDType_);
728  if (usePrecalcIDSign_ == "<") {
729  return val < usePrecalcIDValue_;
730  } else if (usePrecalcIDSign_ == ">") {
731  return val > usePrecalcIDValue_;
732  } else { // equality: it returns 0,1,2,3 but as float
733  return TMath::Abs(val - usePrecalcIDValue_) < 0.1;
734  }
735  } else {
736  for (int i = 0; i < nBarrelVars_; ++i) {
737  if (not CheckCut(ele, i))
738  return false;
739  }
740  return true;
741  }
742 }
bool isElectronIDAvailable(const std::string &name) const
Returns true if a specific ID is available in this pat::Electron.
Int_t nBarrelVars_
Definition: WenuPlots.h:185
std::string usePrecalcIDSign_
Definition: WenuPlots.h:58
Double_t usePrecalcIDValue_
Definition: WenuPlots.h:60
T Abs(T a)
Definition: MathUtil.h:49
float electronID(const std::string &name) const
Returns a specific electron ID associated to the pat::Electron given its name.
std::string usePrecalcIDType_
Definition: WenuPlots.h:59
Bool_t usePrecalcID_
Definition: WenuPlots.h:57
Bool_t CheckCut(const pat::Electron *wenu, Int_t i)
Definition: WenuPlots.cc:763
Bool_t WenuPlots::CheckCutsInverse ( const pat::Electron ele)
private

Definition at line 745 of file WenuPlots.cc.

References CheckCutInv(), mps_fire::i, and nBarrelVars_.

Referenced by analyze().

745  {
746  for (int i = 0; i < nBarrelVars_; ++i) {
747  if (CheckCutInv(ele, i) == false)
748  return false;
749  }
750  return true;
751 }
Int_t nBarrelVars_
Definition: WenuPlots.h:185
Bool_t CheckCutInv(const pat::Electron *wenu, Int_t i)
Definition: WenuPlots.cc:771
Bool_t WenuPlots::CheckCutsNminusOne ( const pat::Electron ele,
Int_t  jj 
)
private

Definition at line 753 of file WenuPlots.cc.

References CheckCut(), mps_fire::i, and nBarrelVars_.

Referenced by analyze().

753  {
754  for (int i = 0; i < nBarrelVars_; ++i) {
755  if (i == jj)
756  continue;
757  if (CheckCut(ele, i) == false)
758  return false;
759  }
760  return true;
761 }
Int_t nBarrelVars_
Definition: WenuPlots.h:185
Bool_t CheckCut(const pat::Electron *wenu, Int_t i)
Definition: WenuPlots.cc:763
void WenuPlots::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 1167 of file WenuPlots.cc.

References DEFINE_FWK_MODULE, h_EB_deta, h_EB_dphi, h_EB_ecaliso, h_EB_hcaliso, h_EB_HoE, h_EB_sIetaIeta, h_EB_trkiso, h_EE_deta, h_EE_dphi, h_EE_ecaliso, h_EE_hcaliso, h_EE_HoE, h_EE_sIetaIeta, h_EE_trkiso, h_met, h_met_EB, h_met_EE, h_met_inverse, h_met_inverse_EB, h_met_inverse_EE, h_mt, h_mt_EB, h_mt_EE, h_mt_inverse, h_mt_inverse_EB, h_mt_inverse_EE, h_scEt, h_scEta, h_scPhi, h_trackIso_eb_NmOne, h_trackIso_ee_NmOne, runonSM::newfile, outputFile_, WENU_VBTFpreseleFile_, and WENU_VBTFselectionFile_.

1167  {
1168  TFile *newfile = new TFile(TString(outputFile_), "RECREATE");
1169  //
1170  // for consistency all the plots are in the root file
1171  // even though they may be empty (in the case when
1172  // usePrecalcID_== true inverted and N-1 are empty)
1173  h_met->Write();
1174  h_met_inverse->Write();
1175  h_mt->Write();
1176  h_mt_inverse->Write();
1177 
1178  h_met_EB->Write();
1179  h_met_inverse_EB->Write();
1180  h_mt_EB->Write();
1181  h_mt_inverse_EB->Write();
1182 
1183  h_met_EE->Write();
1184  h_met_inverse_EE->Write();
1185  h_mt_EE->Write();
1186  h_mt_inverse_EE->Write();
1187 
1188  h_scEt->Write();
1189  h_scEta->Write();
1190  h_scPhi->Write();
1191 
1192  h_EB_trkiso->Write();
1193  h_EB_ecaliso->Write();
1194  h_EB_hcaliso->Write();
1195  h_EB_sIetaIeta->Write();
1196  h_EB_dphi->Write();
1197  h_EB_deta->Write();
1198  h_EB_HoE->Write();
1199 
1200  h_EE_trkiso->Write();
1201  h_EE_ecaliso->Write();
1202  h_EE_hcaliso->Write();
1203  h_EE_sIetaIeta->Write();
1204  h_EE_dphi->Write();
1205  h_EE_deta->Write();
1206  h_EE_HoE->Write();
1207 
1208  //
1209  h_trackIso_eb_NmOne->Write();
1210  h_trackIso_ee_NmOne->Write();
1211  //
1212  newfile->Close();
1213  //
1214  // write the VBTF trees
1215  //
1216  WENU_VBTFpreseleFile_->Write();
1217  WENU_VBTFpreseleFile_->Close();
1218  WENU_VBTFselectionFile_->Write();
1219  WENU_VBTFselectionFile_->Close();
1220 }
TH1F * h_mt_inverse_EE
Definition: WenuPlots.h:94
newfile
Definition: runonSM.py:49
TH1F * h_met_inverse_EB
Definition: WenuPlots.h:87
TH1F * h_EE_trkiso
Definition: WenuPlots.h:108
TH1F * h_EB_HoE
Definition: WenuPlots.h:106
TH1F * h_met_EB
Definition: WenuPlots.h:86
TH1F * h_mt
Definition: WenuPlots.h:83
TH1F * h_trackIso_ee_NmOne
Definition: WenuPlots.h:118
TH1F * h_scPhi
Definition: WenuPlots.h:98
TH1F * h_EB_trkiso
Definition: WenuPlots.h:100
TH1F * h_EE_sIetaIeta
Definition: WenuPlots.h:111
TH1F * h_EB_sIetaIeta
Definition: WenuPlots.h:103
TH1F * h_met_EE
Definition: WenuPlots.h:91
TH1F * h_met
Definition: WenuPlots.h:81
TH1F * h_EB_ecaliso
Definition: WenuPlots.h:101
TH1F * h_scEt
Definition: WenuPlots.h:96
TFile * WENU_VBTFselectionFile_
Definition: WenuPlots.h:231
TH1F * h_EE_ecaliso
Definition: WenuPlots.h:109
TH1F * h_EB_hcaliso
Definition: WenuPlots.h:102
TH1F * h_met_inverse
Definition: WenuPlots.h:82
TH1F * h_met_inverse_EE
Definition: WenuPlots.h:92
TH1F * h_mt_inverse
Definition: WenuPlots.h:84
TH1F * h_EE_dphi
Definition: WenuPlots.h:112
TH1F * h_EB_deta
Definition: WenuPlots.h:105
TFile * WENU_VBTFpreseleFile_
Definition: WenuPlots.h:230
TH1F * h_scEta
Definition: WenuPlots.h:97
TH1F * h_EB_dphi
Definition: WenuPlots.h:104
TH1F * h_trackIso_eb_NmOne
Definition: WenuPlots.h:117
TH1F * h_EE_deta
Definition: WenuPlots.h:113
TH1F * h_mt_inverse_EB
Definition: WenuPlots.h:89
std::string outputFile_
Definition: WenuPlots.h:67
TH1F * h_mt_EB
Definition: WenuPlots.h:88
TH1F * h_mt_EE
Definition: WenuPlots.h:93
TH1F * h_EE_HoE
Definition: WenuPlots.h:114
TH1F * h_EE_hcaliso
Definition: WenuPlots.h:110
Bool_t WenuPlots::PassPreselectionCriteria ( const pat::Electron ele)
private

Definition at line 823 of file WenuPlots.cc.

References gather_cfg::cout, pat::PATObject< ObjectType >::hasUserInt(), maxNumberOfExpectedMissingHits_, useConversionRejection_, useExpectedMissingHits_, pat::PATObject< ObjectType >::userInt(), and useValidFirstPXBHit_.

Referenced by analyze().

823  {
824  Bool_t passConvRej = true;
825  Bool_t passPXB = true;
826  Bool_t passEMH = true;
828  if (ele->hasUserInt("PassConversionRejection")) {
829  //std::cout << "con rej: " << ele->userInt("PassConversionRejection") << std::endl;
830  if (not(ele->userInt("PassConversionRejection") == 1))
831  passConvRej = false;
832  } else {
833  std::cout << "WenuPlots: WARNING: Conversion Rejection Request Disregarded: "
834  << "you must calculate it before " << std::endl;
835  // return true;
836  }
837  }
838  if (useValidFirstPXBHit_) {
839  if (ele->hasUserInt("PassValidFirstPXBHit")) {
840  //std::cout << "valid1stPXB: " << ele->userInt("PassValidFirstPXBHit") << std::endl;
841  if (not(ele->userInt("PassValidFirstPXBHit") == 1))
842  passPXB = false;
843  } else {
844  std::cout << "WenuPlots: WARNING: Valid First PXB Hit Request Disregarded: "
845  << "you must calculate it before " << std::endl;
846  // return true;
847  }
848  }
850  if (ele->hasUserInt("NumberOfExpectedMissingHits")) {
851  //std::cout << "missing hits: " << ele->userInt("NumberOfExpectedMissingHits") << std::endl;
852  if (ele->userInt("NumberOfExpectedMissingHits") > maxNumberOfExpectedMissingHits_)
853  passEMH = false;
854  } else {
855  std::cout << "WenuPlots: WARNING: Number of Expected Missing Hits Request Disregarded: "
856  << "you must calculate it before " << std::endl;
857  // return true;
858  }
859  }
860  return passConvRej && passPXB && passEMH;
861 }
Int_t maxNumberOfExpectedMissingHits_
Definition: WenuPlots.h:65
Bool_t useExpectedMissingHits_
Definition: WenuPlots.h:64
bool hasUserInt(const std::string &key) const
Return true if there is a user-defined int with a given name.
Definition: PATObject.h:395
Bool_t useConversionRejection_
Definition: WenuPlots.h:63
int32_t userInt(const std::string &key) const
Definition: PATObject.h:913
Bool_t useValidFirstPXBHit_
Definition: WenuPlots.h:62
Double_t WenuPlots::ReturnCandVar ( const pat::Electron ele,
Int_t  i 
)
private

Definition at line 785 of file WenuPlots.cc.

References gather_cfg::cout, pat::Electron::dB(), reco::GsfElectron::deltaEtaSuperClusterTrackAtVtx(), reco::GsfElectron::deltaPhiSuperClusterTrackAtVtx(), reco::GsfElectron::dr03EcalRecHitSumEt(), reco::GsfElectron::dr03HcalTowerSumEt(), reco::GsfElectron::dr03TkSumPt(), pat::EcalIso, reco::GsfElectron::eSuperClusterOverP(), reco::GsfElectron::hadronicOverEm(), pat::HcalIso, reco::GsfElectron::isEB(), SiStripPI::max, reco::GsfElectron::p4(), reco::GsfElectron::scSigmaIEtaIEta(), pat::TrackIso, and pat::Lepton< LeptonType >::userIsolation().

Referenced by CheckCut(), and CheckCutInv().

785  {
786  if (i == 0)
787  return ele->dr03TkSumPt() / ele->p4().Pt();
788  else if (i == 1)
789  return ele->dr03EcalRecHitSumEt() / ele->p4().Pt();
790  else if (i == 2)
791  return ele->dr03HcalTowerSumEt() / ele->p4().Pt();
792  else if (i == 3)
793  return ele->scSigmaIEtaIEta();
794  else if (i == 4)
795  return ele->deltaPhiSuperClusterTrackAtVtx();
796  else if (i == 5)
797  return ele->deltaEtaSuperClusterTrackAtVtx();
798  else if (i == 6)
799  return ele->hadronicOverEm();
800  else if (i == 7) {
801  if (ele->isEB()) {
802  return (ele->dr03TkSumPt() + std::max(float(0.), ele->dr03EcalRecHitSumEt() - 1) + ele->dr03HcalTowerSumEt()) /
803  ele->p4().Pt();
804  } else { // pedestal subtraction is only in barrel
805  return (ele->dr03TkSumPt() + ele->dr03EcalRecHitSumEt() + ele->dr03HcalTowerSumEt()) / ele->p4().Pt();
806  }
807  }
808  // else if (i==8) return ele->gsfTrack()->dxy(bspotPosition_);
809  else if (i == 8)
810  return fabs(ele->dB());
811  else if (i == 9)
812  return ele->eSuperClusterOverP();
813  else if (i == 10)
814  return ele->userIsolation(pat::TrackIso);
815  else if (i == 11)
816  return ele->userIsolation(pat::EcalIso);
817  else if (i == 12)
818  return ele->userIsolation(pat::HcalIso);
819  std::cout << "Error in WenuPlots::ReturnCandVar" << std::endl;
820  return -1.;
821 }
const LorentzVector & p4(P4Kind kind) const
Definition: GsfElectron.cc:211
float eSuperClusterOverP() const
Definition: GsfElectron.h:221
bool isEB() const
Definition: GsfElectron.h:328
float deltaEtaSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:225
float hadronicOverEm() const
Definition: GsfElectron.h:468
float deltaPhiSuperClusterTrackAtVtx() const
Definition: GsfElectron.h:228
float dr03TkSumPt() const
Definition: GsfElectron.h:521
float scSigmaIEtaIEta() const
Definition: GsfElectron.h:464
float userIsolation(IsolationKeys key) const
Definition: Lepton.h:48
float dr03EcalRecHitSumEt() const
Definition: GsfElectron.h:523
double dB(IPTYPE type) const
Impact parameter wrt primary vertex or beamspot.
float dr03HcalTowerSumEt() const
Definition: GsfElectron.h:526

Member Data Documentation

Float_t WenuPlots::calojet_et[5]
private

Definition at line 210 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::calojet_eta[5]
private

Definition at line 211 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::calojet_phi[5]
private

Definition at line 212 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

edm::InputTag WenuPlots::caloJetCollectionTag_
private

Definition at line 69 of file WenuPlots.h.

Referenced by analyze(), and WenuPlots().

edm::EDGetTokenT<reco::CaloJetCollection> WenuPlots::caloJetCollectionToken_
private

Definition at line 70 of file WenuPlots.h.

Referenced by analyze(), and WenuPlots().

Double_t WenuPlots::cIso_EB_
private

Definition at line 134 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::cIso_EB_inv
private

Definition at line 165 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::cIso_EE_
private

Definition at line 142 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::cIso_EE_inv
private

Definition at line 173 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

std::vector<Double_t> WenuPlots::CutVars_
private

Definition at line 187 of file WenuPlots.h.

Referenced by beginJob(), CheckCut(), and CheckCutInv().

Int_t WenuPlots::DatasetTag_
private

Definition at line 239 of file WenuPlots.h.

Referenced by analyze(), and WenuPlots().

Double_t WenuPlots::deta_EB_
private

Definition at line 131 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::deta_EB_inv
private

Definition at line 162 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::deta_EE_
private

Definition at line 139 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::deta_EE_inv
private

Definition at line 170 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::dphi_EB_
private

Definition at line 132 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::dphi_EB_inv
private

Definition at line 163 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::dphi_EE_
private

Definition at line 140 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::dphi_EE_inv
private

Definition at line 171 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::DRJetFromElectron_
private

Definition at line 238 of file WenuPlots.h.

Referenced by analyze(), and WenuPlots().

Double_t WenuPlots::ecalIso_EB_
private

Definition at line 123 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::ecalIso_EB_inv
private

Definition at line 154 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::ecalIso_EE_
private

Definition at line 127 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::ecalIso_EE_inv
private

Definition at line 158 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::ecalIsoUser_EB_
private

Definition at line 147 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::ecalIsoUser_EB_inv
private

Definition at line 178 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::ecalIsoUser_EE_
private

Definition at line 150 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::ecalIsoUser_EE_inv
private

Definition at line 181 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Float_t WenuPlots::ele2nd_cand_et
private

Definition at line 242 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_cand_eta
private

Definition at line 220 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_cand_phi
private

Definition at line 221 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_cr_dcot
private

Definition at line 245 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_cr_dist
private

Definition at line 245 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::ele2nd_cr_mhitsinner
private

Definition at line 247 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::ele2nd_ctfCharge
private

Definition at line 247 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::ele2nd_ecalDriven
private

Definition at line 225 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_eop
private

Definition at line 248 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::ele2nd_gsfCharge
private

Definition at line 247 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_hltmatched_dr
private

Definition at line 249 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_id_deta
private

Definition at line 244 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_id_dphi
private

Definition at line 244 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_id_hoe
private

Definition at line 244 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_id_sihih
private

Definition at line 244 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_iso_ecal
private

Definition at line 243 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_iso_hcal
private

Definition at line 243 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_iso_track
private

Definition at line 243 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::ele2nd_passes_selection
private

Definition at line 224 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_pin
private

Definition at line 222 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_pout
private

Definition at line 223 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_sc_eta
private

Definition at line 217 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_sc_gsf_et
private

Definition at line 216 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_sc_phi
private

Definition at line 218 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_sc_rho
private

Definition at line 219 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::ele2nd_scPixCharge
private

Definition at line 247 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_tip_bs
private

Definition at line 248 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_tip_pv
private

Definition at line 248 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_tip_pvbs
private

Definition at line 255 of file WenuPlots.h.

Referenced by analyze().

Float_t WenuPlots::ele2nd_vx
private

Definition at line 246 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_vy
private

Definition at line 246 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele2nd_vz
private

Definition at line 246 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_cand_et
private

Definition at line 196 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_cand_eta
private

Definition at line 196 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_cand_phi
private

Definition at line 196 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_cr_dcot
private

Definition at line 199 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_cr_dist
private

Definition at line 199 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::ele_cr_mhitsinner
private

Definition at line 200 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::ele_ctfCharge
private

Definition at line 204 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_eop
private

Definition at line 205 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::ele_gsfCharge
private

Definition at line 204 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_hltmatched_dr
private

Definition at line 226 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_id_deta
private

Definition at line 198 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_id_dphi
private

Definition at line 198 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_id_hoe
private

Definition at line 198 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_id_sihih
private

Definition at line 198 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_iso_ecal
private

Definition at line 197 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_iso_hcal
private

Definition at line 197 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_iso_track
private

Definition at line 197 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_pin
private

Definition at line 202 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_pout
private

Definition at line 202 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_sc_energy
private

Definition at line 194 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_sc_eta
private

Definition at line 194 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_sc_gsf_et
private

Definition at line 195 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_sc_phi
private

Definition at line 194 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_sc_rho
private

Definition at line 194 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::ele_scPixCharge
private

Definition at line 204 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_tip_bs
private

Definition at line 205 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_tip_pv
private

Definition at line 205 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_tip_pvbs
private

Definition at line 255 of file WenuPlots.h.

Referenced by analyze().

Float_t WenuPlots::ele_vx
private

Definition at line 201 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_vy
private

Definition at line 201 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::ele_vz
private

Definition at line 201 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Double_t WenuPlots::eop_EB_
private

Definition at line 136 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::eop_EB_inv
private

Definition at line 167 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::eop_EE_
private

Definition at line 144 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::eop_EE_inv
private

Definition at line 175 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Float_t WenuPlots::event_caloMET
private

Definition at line 206 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::event_caloMET_phi
private

Definition at line 208 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::event_caloMT
private

Definition at line 209 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::event_caloSumEt
private

Definition at line 207 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::event_datasetTag
private

Definition at line 228 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::event_pfMET
private

Definition at line 206 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::event_pfMET_phi
private

Definition at line 208 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::event_pfMT
private

Definition at line 209 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::event_pfSumEt
private

Definition at line 207 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::event_tcMET
private

Definition at line 206 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::event_tcMET_phi
private

Definition at line 208 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::event_tcMT
private

Definition at line 209 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::event_tcSumEt
private

Definition at line 207 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::event_triggerDecision
private

Definition at line 227 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Long64_t WenuPlots::eventNumber
private
TH1F* WenuPlots::h_EB_deta
private

Definition at line 105 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EB_dphi
private

Definition at line 104 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EB_ecaliso
private

Definition at line 101 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EB_hcaliso
private

Definition at line 102 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EB_HoE
private

Definition at line 106 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EB_sIetaIeta
private

Definition at line 103 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EB_trkiso
private

Definition at line 100 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EE_deta
private

Definition at line 113 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EE_dphi
private

Definition at line 112 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EE_ecaliso
private

Definition at line 109 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EE_hcaliso
private

Definition at line 110 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EE_HoE
private

Definition at line 114 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EE_sIetaIeta
private

Definition at line 111 of file WenuPlots.h.

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

TH1F* WenuPlots::h_EE_trkiso
private

Definition at line 108 of file WenuPlots.h.

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

TH1F* WenuPlots::h_met
private

Definition at line 81 of file WenuPlots.h.

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

TH1F* WenuPlots::h_met_EB
private

Definition at line 86 of file WenuPlots.h.

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

TH1F* WenuPlots::h_met_EE
private

Definition at line 91 of file WenuPlots.h.

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

TH1F* WenuPlots::h_met_inverse
private

Definition at line 82 of file WenuPlots.h.

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

TH1F* WenuPlots::h_met_inverse_EB
private

Definition at line 87 of file WenuPlots.h.

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

TH1F* WenuPlots::h_met_inverse_EE
private

Definition at line 92 of file WenuPlots.h.

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

TH1F* WenuPlots::h_mt
private

Definition at line 83 of file WenuPlots.h.

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

TH1F* WenuPlots::h_mt_EB
private

Definition at line 88 of file WenuPlots.h.

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

TH1F* WenuPlots::h_mt_EE
private

Definition at line 93 of file WenuPlots.h.

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

TH1F* WenuPlots::h_mt_inverse
private

Definition at line 84 of file WenuPlots.h.

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

TH1F* WenuPlots::h_mt_inverse_EB
private

Definition at line 89 of file WenuPlots.h.

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

TH1F* WenuPlots::h_mt_inverse_EE
private

Definition at line 94 of file WenuPlots.h.

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

TH1F* WenuPlots::h_scEt
private

Definition at line 96 of file WenuPlots.h.

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

TH1F* WenuPlots::h_scEta
private

Definition at line 97 of file WenuPlots.h.

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

TH1F* WenuPlots::h_scPhi
private

Definition at line 98 of file WenuPlots.h.

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

TH1F* WenuPlots::h_trackIso_eb_NmOne
private

Definition at line 117 of file WenuPlots.h.

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

TH1F* WenuPlots::h_trackIso_ee_NmOne
private

Definition at line 118 of file WenuPlots.h.

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

Double_t WenuPlots::hcalIso_EB_
private

Definition at line 124 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::hcalIso_EB_inv
private

Definition at line 155 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::hcalIso_EE_
private

Definition at line 128 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::hcalIso_EE_inv
private

Definition at line 159 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::hcalIsoUser_EB_
private

Definition at line 148 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::hcalIsoUser_EB_inv
private

Definition at line 179 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::hcalIsoUser_EE_
private

Definition at line 151 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::hcalIsoUser_EE_inv
private

Definition at line 182 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

TFile* WenuPlots::histofile
private

Definition at line 75 of file WenuPlots.h.

Double_t WenuPlots::hoe_EB_
private

Definition at line 133 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::hoe_EB_inv
private

Definition at line 164 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::hoe_EE_
private

Definition at line 141 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::hoe_EE_inv
private

Definition at line 172 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::includeJetInformationInNtuples_
private

Definition at line 236 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and WenuPlots().

std::vector<Bool_t> WenuPlots::InvVars_
private

Definition at line 188 of file WenuPlots.h.

Referenced by beginJob(), and CheckCutInv().

Int_t WenuPlots::lumiSection
private

Definition at line 192 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Int_t WenuPlots::maxNumberOfExpectedMissingHits_
private

Definition at line 65 of file WenuPlots.h.

Referenced by PassPreselectionCriteria(), and WenuPlots().

Int_t WenuPlots::nBarrelVars_
private
std::string WenuPlots::outputFile_
private

Definition at line 67 of file WenuPlots.h.

Referenced by endJob(), and WenuPlots().

Float_t WenuPlots::pfjet_et[5]
private

Definition at line 213 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::pfjet_eta[5]
private

Definition at line 214 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::pfjet_phi[5]
private

Definition at line 215 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

edm::InputTag WenuPlots::pfJetCollectionTag_
private

Definition at line 71 of file WenuPlots.h.

Referenced by analyze(), and WenuPlots().

edm::EDGetTokenT<reco::PFJetCollection> WenuPlots::pfJetCollectionToken_
private

Definition at line 72 of file WenuPlots.h.

Referenced by analyze(), and WenuPlots().

edm::EDGetTokenT<std::vector<reco::Vertex> > WenuPlots::PrimaryVerticesCollectionBSToken_
private

Definition at line 74 of file WenuPlots.h.

Referenced by analyze(), and WenuPlots().

edm::EDGetTokenT<std::vector<reco::Vertex> > WenuPlots::PrimaryVerticesCollectionToken_
private

Definition at line 73 of file WenuPlots.h.

Referenced by analyze(), and WenuPlots().

Float_t WenuPlots::pv_x
private

Definition at line 203 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::pv_y
private

Definition at line 203 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::pv_z
private

Definition at line 203 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Float_t WenuPlots::pvbs_x
private

Definition at line 254 of file WenuPlots.h.

Referenced by analyze().

Float_t WenuPlots::pvbs_y
private

Definition at line 254 of file WenuPlots.h.

Referenced by analyze().

Float_t WenuPlots::pvbs_z
private

Definition at line 254 of file WenuPlots.h.

Referenced by analyze().

Int_t WenuPlots::runNumber
private

Definition at line 192 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

Double_t WenuPlots::sihih_EB_
private

Definition at line 130 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::sihih_EB_inv
private

Definition at line 161 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::sihih_EE_
private

Definition at line 138 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::sihih_EE_inv
private

Definition at line 169 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::storeAllSecondElectronVariables_
private

Definition at line 241 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and WenuPlots().

Bool_t WenuPlots::storeExtraInformation_
private

Definition at line 237 of file WenuPlots.h.

Referenced by analyze(), beginJob(), and WenuPlots().

Double_t WenuPlots::tip_bspot_EB_
private

Definition at line 135 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::tip_bspot_EB_inv
private

Definition at line 166 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::tip_bspot_EE_
private

Definition at line 143 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::tip_bspot_EE_inv
private

Definition at line 174 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::trackIso_EB_
private

Definition at line 122 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::trackIso_EB_inv
private

Definition at line 153 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::trackIso_EE_
private

Definition at line 126 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::trackIso_EE_inv
private

Definition at line 157 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::trackIsoUser_EB_
private

Definition at line 146 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::trackIsoUser_EB_inv
private

Definition at line 177 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Double_t WenuPlots::trackIsoUser_EE_
private

Definition at line 149 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::trackIsoUser_EE_inv
private

Definition at line 180 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

Bool_t WenuPlots::useConversionRejection_
private

Definition at line 63 of file WenuPlots.h.

Referenced by PassPreselectionCriteria(), and WenuPlots().

Bool_t WenuPlots::useExpectedMissingHits_
private

Definition at line 64 of file WenuPlots.h.

Referenced by PassPreselectionCriteria(), and WenuPlots().

Bool_t WenuPlots::usePrecalcID_
private

Definition at line 57 of file WenuPlots.h.

Referenced by analyze(), CheckCuts(), and WenuPlots().

std::string WenuPlots::usePrecalcIDSign_
private

Definition at line 58 of file WenuPlots.h.

Referenced by CheckCuts(), and WenuPlots().

std::string WenuPlots::usePrecalcIDType_
private

Definition at line 59 of file WenuPlots.h.

Referenced by CheckCuts(), and WenuPlots().

Double_t WenuPlots::usePrecalcIDValue_
private

Definition at line 60 of file WenuPlots.h.

Referenced by CheckCuts(), and WenuPlots().

Bool_t WenuPlots::usePreselection_
private

Definition at line 66 of file WenuPlots.h.

Referenced by analyze(), and WenuPlots().

Bool_t WenuPlots::useValidFirstPXBHit_
private

Definition at line 62 of file WenuPlots.h.

Referenced by PassPreselectionCriteria(), and WenuPlots().

TTree* WenuPlots::vbtfPresele_tree
private

Definition at line 233 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

TTree* WenuPlots::vbtfSele_tree
private

Definition at line 232 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

std::vector<Float_t> WenuPlots::VtxNormalizedChi2
private

Definition at line 251 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

std::vector<Float_t> WenuPlots::VtxNormalizedChi2BS
private

Definition at line 253 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

std::vector<Int_t> WenuPlots::VtxTracksSize
private

Definition at line 250 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

std::vector<Int_t> WenuPlots::VtxTracksSizeBS
private

Definition at line 252 of file WenuPlots.h.

Referenced by analyze(), and beginJob().

TFile* WenuPlots::WENU_VBTFpreseleFile_
private

Definition at line 230 of file WenuPlots.h.

Referenced by beginJob(), and endJob().

std::string WenuPlots::WENU_VBTFpreseleFileName_
private

Definition at line 235 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

TFile* WenuPlots::WENU_VBTFselectionFile_
private

Definition at line 231 of file WenuPlots.h.

Referenced by beginJob(), and endJob().

std::string WenuPlots::WENU_VBTFselectionFileName_
private

Definition at line 234 of file WenuPlots.h.

Referenced by beginJob(), and WenuPlots().

edm::EDGetTokenT<pat::CompositeCandidateCollection> WenuPlots::wenuCollectionToken_
private

Definition at line 68 of file WenuPlots.h.

Referenced by analyze(), and WenuPlots().