test
CMS 3D CMS Logo

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

#include <METAnalyzer.h>

Inheritance diagram for METAnalyzer:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &)
 Get the analysis. More...
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 Inizialize parameters for histo binning. More...
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &)
 Initialize run-based parameters. More...
 
void endRun (const edm::Run &iRun, const edm::EventSetup &iSetup)
 Finish up a run. More...
 
void fillMESet (const edm::Event &, std::string, const reco::MET &, const pat::MET &, const reco::PFMET &, const reco::CaloMET &, const reco::Candidate::PolarLorentzVector &, std::map< std::string, MonitorElement * > &, std::vector< bool >, std::vector< bool >)
 
void fillMonitorElement (const edm::Event &, std::string, std::string, const reco::MET &, const pat::MET &, const reco::PFMET &, const reco::CaloMET &, const reco::Candidate::PolarLorentzVector &, std::map< std::string, MonitorElement * > &, bool, bool, std::vector< bool >, std::vector< bool >)
 
void makeRatePlot (std::string, double)
 
 METAnalyzer (const edm::ParameterSet &)
 Constructor. More...
 
virtual ~METAnalyzer ()
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void bookMESet (std::string, DQMStore::IBooker &, std::map< std::string, MonitorElement * > &)
 
void bookMonitorElement (std::string, DQMStore::IBooker &, std::map< std::string, MonitorElement * > &, bool, bool, bool)
 

Private Attributes

std::vector< int > allTriggerDecisions_
 
std::vector< std::string > allTriggerNames_
 
math::XYZPoint beamSpot_
 
bool bypassAllDCSChecks_
 
bool bypassAllPVChecks_
 
edm::EDGetTokenT
< reco::CaloJetCollection
caloJetsToken_
 
edm::EDGetTokenT
< reco::CaloMETCollection
caloMetToken_
 
edm::ParameterSet cleaningParameters_
 
std::vector< int > countsPFCand_
 
edm::InputTag CSCHalo2015ResultTag_
 
edm::EDGetTokenT< bool > CSCHalo2015ResultToken_
 
edm::InputTag CSCHaloResultTag_
 
edm::EDGetTokenT< bool > CSCHaloResultToken_
 
JetMETDQMDCSFilterDCSFilter_
 
std::vector< edm::ParameterSetdiagnosticsParameters_
 
edm::InputTag EcalDeadCellBoundaryTag_
 
edm::EDGetTokenT< bool > EcalDeadCellBoundaryToken_
 
edm::InputTag EcalDeadCellTriggerTag_
 
edm::EDGetTokenT< bool > EcalDeadCellTriggerToken_
 
edm::InputTag eeBadScFilterTag_
 
edm::EDGetTokenT< bool > eeBadScFilterToken_
 
std::vector< double > etaMaxPFCand_
 
std::vector< double > etaMinPFCand_
 
std::vector< int > etaNBinsPFCand_
 
bool fill_met_high_level_histo
 
bool fillCandidateMap_histos
 
HLTConfigProvider FilterhltConfig_
 
std::string FolderName_
 
std::vector< std::string > folderNames_
 
edm::InputTag gtTag_
 
edm::EDGetTokenT
< L1GlobalTriggerReadoutRecord
gtToken_
 
edm::EDGetTokenT< bool > hbheIsoNoiseFilterResultToken_
 
std::string HBHEIsoNoiseStringMiniAOD
 
edm::InputTag hbheNoiseFilterResultTag_
 
edm::EDGetTokenT< bool > hbheNoiseFilterResultToken_
 
edm::InputTag hbheNoiseIsoFilterResultTag_
 
std::string HBHENoiseStringMiniAOD
 
double hcalMin_
 
edm::InputTag hcalNoiseRBXCollectionTag_
 
MonitorElementhCaloEmEtFraction
 
MonitorElementhCaloEmEtFraction020
 
MonitorElementhCaloEmEtInEB
 
MonitorElementhCaloEmEtInEE
 
MonitorElementhCaloEmEtInHF
 
MonitorElementhCaloEmMET
 
MonitorElementhCaloEmMETPhi
 
MonitorElementhCaloEmMEx
 
MonitorElementhCaloEmMEy
 
MonitorElementhCaloEtFractionHadronic
 
MonitorElementhCaloHadEtInHB
 
MonitorElementhCaloHadEtInHE
 
MonitorElementhCaloHadEtInHF
 
MonitorElementhCaloHadEtInHO
 
MonitorElementhCaloHaMET
 
MonitorElementhCaloHaMETPhi
 
MonitorElementhCaloHaMEx
 
MonitorElementhCaloHaMEy
 
MonitorElementhCaloMETPhi020
 
edm::InputTag HcalStripHaloTag_
 
edm::EDGetTokenT< bool > HcalStripHaloToken_
 
double hfCalibFactor_
 
HLTConfigProvider hltConfig_
 
std::string hltPhysDec_
 
MonitorElementhMET
 
MonitorElementhMET_2
 
MonitorElementhMET_CSCTightHalo2015Filter
 
MonitorElementhMET_CSCTightHaloFilter
 
MonitorElementhMET_EcalDeadCellBoundaryFilter
 
MonitorElementhMET_EcalDeadCellTriggerFilter
 
MonitorElementhMET_eeBadScFilter
 
MonitorElementhMET_HBHEIsoNoiseFilter
 
MonitorElementhMET_HBHENoiseFilter
 
MonitorElementhMET_HcalStripHaloFilter
 
MonitorElementhMET_logx
 
MonitorElementhMETPhi
 
MonitorElementhMETRate
 
MonitorElementhMETSig
 
MonitorElementhMEx
 
MonitorElementhMExLS
 
MonitorElementhMEy
 
MonitorElementhMEyLS
 
MonitorElementhSumET
 
MonitorElementhSumET_logx
 
MonitorElementhTrigger
 
bool hTriggerLabelsIsSet_
 
edm::InputTag inputJetIDValueMap
 
bool isCaloMet_
 
bool isMiniAODMet_
 
bool isPFMet_
 
edm::InputTag jetCollectionLabel_
 
edm::EDGetTokenT
< reco::JetCorrector
jetCorrectorToken_
 
edm::EDGetTokenT
< edm::ValueMap< reco::JetID > > 
jetID_ValueMapToken_
 
JetIDSelectionFunctor jetIDFunctorLoose
 
int LSBegin_
 
int LSEnd_
 
MonitorElementlumisecME
 
int m_bitAlgTechTrig_
 
std::string m_l1algoname_
 
std::map< std::string,
MonitorElement * > 
map_dijet_MEs
 
MonitorElementmeChargedHadronEt
 
MonitorElementmeChargedHadronEt_profile
 
MonitorElementmeChargedHadronEtFraction
 
MonitorElementmeChargedHadronEtFraction_BXm1Empty
 
MonitorElementmeChargedHadronEtFraction_BXm1Filled
 
MonitorElementmeChargedHadronEtFraction_profile
 
MonitorElementmeCHF_Barrel
 
MonitorElementmeCHF_Barrel_BXm1Empty
 
MonitorElementmeCHF_Barrel_BXm1Filled
 
MonitorElementmeCHF_EndcapMinus
 
MonitorElementmeCHF_EndcapMinus_BXm1Empty
 
MonitorElementmeCHF_EndcapMinus_BXm1Filled
 
MonitorElementmeCHF_EndcapPlus
 
MonitorElementmeCHF_EndcapPlus_BXm1Empty
 
MonitorElementmeCHF_EndcapPlus_BXm1Filled
 
MonitorElementmeElectronEt
 
MonitorElementmeHFEMEt
 
MonitorElementmeHFEMEt_profile
 
MonitorElementmeHFEMEtFraction
 
MonitorElementmeHFEMEtFraction_profile
 
MonitorElementmeHFEMF_Minus
 
MonitorElementmeHFEMF_Minus_BXm1Empty
 
MonitorElementmeHFEMF_Minus_BXm1Filled
 
MonitorElementmeHFEMF_Plus
 
MonitorElementmeHFEMF_Plus_BXm1Empty
 
MonitorElementmeHFEMF_Plus_BXm1Filled
 
MonitorElementmeHFHadF_Minus
 
MonitorElementmeHFHadF_Minus_BXm1Empty
 
MonitorElementmeHFHadF_Minus_BXm1Filled
 
MonitorElementmeHFHadF_Plus
 
MonitorElementmeHFHadF_Plus_BXm1Empty
 
MonitorElementmeHFHadF_Plus_BXm1Filled
 
MonitorElementmeHFHadronEt
 
MonitorElementmeHFHadronEt_profile
 
MonitorElementmeHFHadronEtFraction
 
MonitorElementmeHFHadronEtFraction_profile
 
MonitorElementmeMET_BXm1Empty
 
MonitorElementmeMET_BXm1Filled
 
MonitorElementmeMET_profile
 
MonitorElementmeMETPhiChargedHadronsBarrel
 
MonitorElementmeMETPhiChargedHadronsBarrel_BXm1Empty
 
MonitorElementmeMETPhiChargedHadronsBarrel_BXm1Filled
 
MonitorElementmeMETPhiChargedHadronsEndcapMinus
 
MonitorElementmeMETPhiChargedHadronsEndcapMinus_BXm1Empty
 
MonitorElementmeMETPhiChargedHadronsEndcapMinus_BXm1Filled
 
MonitorElementmeMETPhiChargedHadronsEndcapPlus
 
MonitorElementmeMETPhiChargedHadronsEndcapPlus_BXm1Empty
 
MonitorElementmeMETPhiChargedHadronsEndcapPlus_BXm1Filled
 
MonitorElementmeMETPhiHFEGammasMinus
 
MonitorElementmeMETPhiHFEGammasMinus_BXm1Empty
 
MonitorElementmeMETPhiHFEGammasMinus_BXm1Filled
 
MonitorElementmeMETPhiHFEGammasPlus
 
MonitorElementmeMETPhiHFEGammasPlus_BXm1Empty
 
MonitorElementmeMETPhiHFEGammasPlus_BXm1Filled
 
MonitorElementmeMETPhiHFHadronsMinus
 
MonitorElementmeMETPhiHFHadronsMinus_BXm1Empty
 
MonitorElementmeMETPhiHFHadronsMinus_BXm1Filled
 
MonitorElementmeMETPhiHFHadronsPlus
 
MonitorElementmeMETPhiHFHadronsPlus_BXm1Empty
 
MonitorElementmeMETPhiHFHadronsPlus_BXm1Filled
 
MonitorElementmeMETPhiNeutralHadronsBarrel
 
MonitorElementmeMETPhiNeutralHadronsBarrel_BXm1Empty
 
MonitorElementmeMETPhiNeutralHadronsBarrel_BXm1Filled
 
MonitorElementmeMETPhiNeutralHadronsEndcapMinus
 
MonitorElementmeMETPhiNeutralHadronsEndcapMinus_BXm1Empty
 
MonitorElementmeMETPhiNeutralHadronsEndcapMinus_BXm1Filled
 
MonitorElementmeMETPhiNeutralHadronsEndcapPlus
 
MonitorElementmeMETPhiNeutralHadronsEndcapPlus_BXm1Empty
 
MonitorElementmeMETPhiNeutralHadronsEndcapPlus_BXm1Filled
 
MonitorElementmeMETPhiPhotonsBarrel
 
MonitorElementmeMETPhiPhotonsBarrel_BXm1Empty
 
MonitorElementmeMETPhiPhotonsBarrel_BXm1Filled
 
MonitorElementmeMETPhiPhotonsEndcapMinus
 
MonitorElementmeMETPhiPhotonsEndcapMinus_BXm1Empty
 
MonitorElementmeMETPhiPhotonsEndcapMinus_BXm1Filled
 
MonitorElementmeMETPhiPhotonsEndcapPlus
 
MonitorElementmeMETPhiPhotonsEndcapPlus_BXm1Empty
 
MonitorElementmeMETPhiPhotonsEndcapPlus_BXm1Filled
 
MonitorElementmeMEx_profile
 
MonitorElementmeMEy_profile
 
MonitorElementmeMuonEt
 
MonitorElementmeNeutralHadronEt
 
MonitorElementmeNeutralHadronEt_profile
 
MonitorElementmeNeutralHadronEtFraction
 
MonitorElementmeNeutralHadronEtFraction_BXm1Empty
 
MonitorElementmeNeutralHadronEtFraction_BXm1Filled
 
MonitorElementmeNeutralHadronEtFraction_profile
 
MonitorElementmeNHF_Barrel
 
MonitorElementmeNHF_Barrel_BXm1Empty
 
MonitorElementmeNHF_Barrel_BXm1Filled
 
MonitorElementmeNHF_EndcapMinus
 
MonitorElementmeNHF_EndcapMinus_BXm1Empty
 
MonitorElementmeNHF_EndcapMinus_BXm1Filled
 
MonitorElementmeNHF_EndcapPlus
 
MonitorElementmeNHF_EndcapPlus_BXm1Empty
 
MonitorElementmeNHF_EndcapPlus_BXm1Filled
 
MonitorElementmePhF_Barrel
 
MonitorElementmePhF_Barrel_BXm1Empty
 
MonitorElementmePhF_Barrel_BXm1Filled
 
MonitorElementmePhF_EndcapMinus
 
MonitorElementmePhF_EndcapMinus_BXm1Empty
 
MonitorElementmePhF_EndcapMinus_BXm1Filled
 
MonitorElementmePhF_EndcapPlus
 
MonitorElementmePhF_EndcapPlus_BXm1Empty
 
MonitorElementmePhF_EndcapPlus_BXm1Filled
 
MonitorElementmePhotonEt
 
MonitorElementmePhotonEt_profile
 
MonitorElementmePhotonEtFraction
 
MonitorElementmePhotonEtFraction_BXm1Empty
 
MonitorElementmePhotonEtFraction_BXm1Filled
 
MonitorElementmePhotonEtFraction_profile
 
MonitorElementmeSumET_BXm1Empty
 
MonitorElementmeSumET_BXm1Filled
 
MonitorElementmeSumET_profile
 
edm::InputTag metCollectionLabel_
 
edm::InputTag METFilterMiniAODLabel2_
 
edm::InputTag METFilterMiniAODLabel_
 
edm::EDGetTokenT
< edm::TriggerResults
METFilterMiniAODToken2_
 
edm::EDGetTokenT
< edm::TriggerResults
METFilterMiniAODToken_
 
std::string MetType_
 
std::vector< double > MExPFCand_
 
std::vector< double > MEyPFCand_
 
MonitorElementmeZJets_u_par
 
MonitorElementmeZJets_u_par_ZPt_0_15
 
MonitorElementmeZJets_u_par_ZPt_150_290
 
MonitorElementmeZJets_u_par_ZPt_15_30
 
MonitorElementmeZJets_u_par_ZPt_290
 
MonitorElementmeZJets_u_par_ZPt_30_55
 
MonitorElementmeZJets_u_par_ZPt_55_75
 
MonitorElementmeZJets_u_par_ZPt_75_150
 
MonitorElementmeZJets_u_perp
 
MonitorElementmeZJets_u_perp_ZPt_0_15
 
MonitorElementmeZJets_u_perp_ZPt_150_290
 
MonitorElementmeZJets_u_perp_ZPt_15_30
 
MonitorElementmeZJets_u_perp_ZPt_290
 
MonitorElementmeZJets_u_perp_ZPt_30_55
 
MonitorElementmeZJets_u_perp_ZPt_55_75
 
MonitorElementmeZJets_u_perp_ZPt_75_150
 
int miniaodfilterdec
 
std::vector< int > miniaodFilterIndex_
 
MonitorElementmProfileIsoPFChHad_EcalOccupancyCentral
 
MonitorElementmProfileIsoPFChHad_EcalOccupancyEndcap
 
MonitorElementmProfileIsoPFChHad_EMPtCentral
 
MonitorElementmProfileIsoPFChHad_EMPtEndcap
 
MonitorElementmProfileIsoPFChHad_HadPtCentral
 
MonitorElementmProfileIsoPFChHad_HadPtEndcap
 
MonitorElementmProfileIsoPFChHad_HcalOccupancyCentral
 
MonitorElementmProfileIsoPFChHad_HcalOccupancyEndcap
 
MonitorElementmProfileIsoPFChHad_TrackOccupancy
 
MonitorElementmProfileIsoPFChHad_TrackPt
 
std::vector< MonitorElement * > multiplicityPFCand_
 
std::vector< std::string > multiplicityPFCand_name_
 
edm::EDGetTokenT
< reco::MuonCollection
MuonsToken_
 
std::vector< int > nbinsPFCand_
 
int nbinsPV_
 
std::vector< unsigned int > nCh
 
std::vector< unsigned int > nEv
 
double nPVMax_
 
double nPVMin_
 
int numPV_
 
std::vector< MonitorElement * > occupancyPFCand_
 
std::vector< std::string > occupancyPFCand_name_
 
std::vector< std::string > occupancyPFCand_name_puppiNolepWeight_
 
std::vector< MonitorElement * > occupancyPFCand_puppiNolepWeight_
 
bool onlyCleaned_
 
edm::ParameterSet parameters
 
edm::EDGetTokenT
< pat::JetCollection
patJetsToken_
 
edm::EDGetTokenT
< pat::METCollection
patMetToken_
 
PFJetIDSelectionFunctor pfjetIDFunctorLoose
 
edm::EDGetTokenT
< reco::PFJetCollection
pfJetsToken_
 
edm::EDGetTokenT< std::vector
< pat::PackedCandidate > > 
pflowPackedToken_
 
edm::EDGetTokenT< std::vector
< reco::PFCandidate > > 
pflowToken_
 
edm::EDGetTokenT
< reco::PFMETCollection
pfMetToken_
 
std::vector< MonitorElement * > profilePFCand_x_
 
std::vector< std::string > profilePFCand_x_name_
 
std::vector< MonitorElement * > profilePFCand_y_
 
std::vector< std::string > profilePFCand_y_name_
 
double ptMinCand_
 
std::vector< MonitorElement * > ptPFCand_
 
std::vector< std::string > ptPFCand_name_
 
std::vector< std::string > ptPFCand_name_puppiNolepWeight_
 
std::vector< MonitorElement * > ptPFCand_puppiNolepWeight_
 
double ptThreshold_
 
bool runcosmics_
 
std::vector< int > triggerFolderDecisions_
 
std::vector
< GenericTriggerEventFlag * > 
triggerFolderEventFlag_
 
std::vector< std::vector
< std::string > > 
triggerFolderExpr_
 
std::vector< std::string > triggerFolderLabels_
 
edm::InputTag triggerResultsLabel_
 
edm::EDGetTokenT
< edm::TriggerResults
triggerResultsToken_
 
edm::VParameterSet triggerSelectedSubFolders_
 
std::vector< int > typePFCand_
 
int verbose_
 
edm::InputTag vertexTag_
 
edm::EDGetTokenT< std::vector
< reco::Vertex > > 
vertexToken_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

DQM MET analysis monitoring

Author
F. Chlebana - Fermilab K. Hatakeyama - Rockefeller University

Jan. '14: modified by

M. Artur Weber R. Schoefbeck V. Sordini

Definition at line 93 of file METAnalyzer.h.

Constructor & Destructor Documentation

METAnalyzer::METAnalyzer ( const edm::ParameterSet pSet)

Constructor.

Definition at line 42 of file METAnalyzer.cc.

References edm::ParameterSet::getParameter(), HLT_25ns10e33_v2_cff::InputTag, PFJetIDSelectionFunctor::LOOSE, JetIDSelectionFunctor::LOOSE, HLT_25ns10e33_v2_cff::parameters, JetIDSelectionFunctor::PURE09, PFJetIDSelectionFunctor::RUNIISTARTUP, AlCaHLTBitMon_QueryRunRegistry::string, and triggerResultsToken_().

42  {
43  parameters = pSet;
44 
45  m_l1algoname_ = pSet.getParameter<std::string>("l1algoname");
47 
49 
50 
51  LSBegin_ = pSet.getParameter<int>("LSBegin");
52  LSEnd_ = pSet.getParameter<int>("LSEnd");
53  // Smallest track pt
54  ptMinCand_ = pSet.getParameter<double>("ptMinCand");
55 
56  // Smallest raw HCAL energy linked to the track
57  hcalMin_ = pSet.getParameter<double>("hcalMin");
58 
60 
62  triggerResultsToken_= consumes<edm::TriggerResults>(edm::InputTag(triggerResultsLabel_));
63 
64  isCaloMet_ = (std::string("calo")==MetType_);
65  //isTCMet_ = (std::string("tc") ==MetType_);
66  isPFMet_ = (std::string("pf") ==MetType_);
67  isMiniAODMet_ = (std::string("miniaod") ==MetType_);
68  if(!isMiniAODMet_){
69  jetCorrectorToken_ = consumes<reco::JetCorrector>(pSet.getParameter<edm::InputTag>("JetCorrections"));
70  }
71 
72  // MET information
74 
75  if(/*isTCMet_ || */isCaloMet_){
76  inputJetIDValueMap = pSet.getParameter<edm::InputTag>("InputJetIDValueMap");
77  jetID_ValueMapToken_= consumes< edm::ValueMap<reco::JetID> >(inputJetIDValueMap);
79  }
80 
81  if(isPFMet_){
82  pflowToken_ = consumes<std::vector<reco::PFCandidate> >(pSet.getParameter<edm::InputTag>("srcPFlow"));
84  }
85  if(isMiniAODMet_){
86  pflowPackedToken_ = consumes<std::vector<pat::PackedCandidate> >(pSet.getParameter<edm::InputTag>("srcPFlow"));
88  }
89  MuonsToken_ = consumes<reco::MuonCollection>(pSet.getParameter<edm::InputTag> ("muonsrc"));
90 
91  ptThreshold_ = parameters.getParameter<double>("ptThreshold");
92 
93 
94  if(isPFMet_){
95  pfMetToken_= consumes<reco::PFMETCollection>(edm::InputTag(metCollectionLabel_));
96  }
97  if(isCaloMet_){
98  caloMetToken_= consumes<reco::CaloMETCollection>(edm::InputTag(metCollectionLabel_));
99  }
100  if(isMiniAODMet_){
101  patMetToken_= consumes<pat::METCollection>(edm::InputTag(metCollectionLabel_));
102  }
103  //if(isTCMet_){
104  // tcMetToken_= consumes<reco::METCollection>(edm::InputTag(metCollectionLabel_));
105  //}
106 
107  fill_met_high_level_histo = parameters.getParameter<bool>("fillMetHighLevel");
108  fillCandidateMap_histos = parameters.getParameter<bool>("fillCandidateMaps");
109 
110  hTriggerLabelsIsSet_ = false;
111  //jet cleanup parameters
112  cleaningParameters_ = pSet.getParameter<ParameterSet>("CleaningParameters");
113 
114  diagnosticsParameters_ = pSet.getParameter<std::vector<edm::ParameterSet> >("METDiagonisticsParameters");
115 
117  //DCS
119 
120  //Vertex requirements
121  bypassAllPVChecks_ = cleaningParameters_.getParameter<bool>("bypassAllPVChecks");
122  bypassAllDCSChecks_ = cleaningParameters_.getParameter<bool>("bypassAllDCSChecks");
123  runcosmics_ = parameters.getUntrackedParameter<bool>("runcosmics");
124  onlyCleaned_ = parameters.getUntrackedParameter<bool>("onlyCleaned");
126  vertexToken_ = consumes<std::vector<reco::Vertex> >(edm::InputTag(vertexTag_));
127 
128  //Trigger parameters
130  gtToken_= consumes<L1GlobalTriggerReadoutRecord>(edm::InputTag(gtTag_));
131 
132  // Other data collections
133  jetCollectionLabel_ = parameters.getParameter<edm::InputTag>("JetCollectionLabel");
134  if (isCaloMet_) caloJetsToken_ = consumes<reco::CaloJetCollection>(jetCollectionLabel_);
135  //if (isTCMet_) jptJetsToken_ = consumes<reco::JPTJetCollection>(jetCollectionLabel_);
136  if (isPFMet_) pfJetsToken_ = consumes<reco::PFJetCollection>(jetCollectionLabel_);
137  if (isMiniAODMet_) patJetsToken_ = consumes<pat::JetCollection>(jetCollectionLabel_);
138 
139  HBHENoiseStringMiniAOD = parameters.getParameter<std::string>("HBHENoiseLabelMiniAOD");
140  HBHEIsoNoiseStringMiniAOD = parameters.getParameter<std::string>("HBHEIsoNoiseLabelMiniAOD");
141 
142  hbheNoiseFilterResultTag_ = parameters.getParameter<edm::InputTag>("HBHENoiseFilterResultLabel");
144  hbheNoiseIsoFilterResultTag_ = parameters.getParameter<edm::InputTag>("HBHENoiseIsoFilterResultLabel");
146  CSCHaloResultTag_= parameters.getParameter<edm::InputTag>("CSCHaloResultLabel");
147  CSCHaloResultToken_=consumes<bool>(CSCHaloResultTag_);
148  CSCHalo2015ResultTag_= parameters.getParameter<edm::InputTag>("CSCHalo2015ResultLabel");
150  EcalDeadCellTriggerTag_= parameters.getParameter<edm::InputTag>("EcalDeadCellTriggerPrimitiveFilterLabel");
152  EcalDeadCellBoundaryTag_= parameters.getParameter<edm::InputTag>("EcalDeadCellBoundaryEnergyFilterLabel");
154  eeBadScFilterTag_= parameters.getParameter<edm::InputTag>("eeBadScFilterLabel");
155  eeBadScFilterToken_=consumes<bool>(eeBadScFilterTag_);
156  HcalStripHaloTag_= parameters.getParameter<edm::InputTag>("HcalStripHaloFilterLabel");
157  HcalStripHaloToken_=consumes<bool>(HcalStripHaloTag_);
158 
159  METFilterMiniAODLabel_=parameters.getParameter<edm::InputTag>("FilterResultsLabelMiniAOD");
160  METFilterMiniAODToken_=consumes<edm::TriggerResults>(METFilterMiniAODLabel_);
161 
162  METFilterMiniAODLabel2_=parameters.getParameter<edm::InputTag>("FilterResultsLabelMiniAOD2");
163  METFilterMiniAODToken2_=consumes<edm::TriggerResults>(METFilterMiniAODLabel2_);
164 
165  //
166  nbinsPV_ = parameters.getParameter<int>("pVBin");
167  nPVMin_ = parameters.getParameter<double>("pVMin");
168  nPVMax_ = parameters.getParameter<double>("pVMax");
169 
171  for (edm::VParameterSet::const_iterator it = triggerSelectedSubFolders_.begin(); it!= triggerSelectedSubFolders_.end(); it++) {
172  triggerFolderEventFlag_.push_back(new GenericTriggerEventFlag( *it, consumesCollector(), *this ));
173  triggerFolderExpr_.push_back(it->getParameter<std::vector<std::string> >("hltPaths"));
174  triggerFolderLabels_.push_back(it->getParameter<std::string>("label"));
175  }
176 
177  cleaningParameters_ = parameters.getParameter<ParameterSet>("CleaningParameters");
178 
179  verbose_ = parameters.getParameter<int>("verbose");
180 
182 
183  nCh = std::vector<unsigned int>(10,static_cast<unsigned int>(0));
184  nEv = std::vector<unsigned int>(2,static_cast<unsigned int>(0));
185 
186 }
edm::EDGetTokenT< reco::CaloMETCollection > caloMetToken_
Definition: METAnalyzer.h:184
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag CSCHaloResultTag_
Definition: METAnalyzer.h:169
edm::InputTag gtTag_
Definition: METAnalyzer.h:148
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken_
Definition: METAnalyzer.h:152
bool bypassAllDCSChecks_
Definition: METAnalyzer.h:258
edm::EDGetTokenT< bool > CSCHalo2015ResultToken_
Definition: METAnalyzer.h:172
edm::EDGetTokenT< edm::TriggerResults > METFilterMiniAODToken2_
Definition: METAnalyzer.h:160
std::vector< edm::ParameterSet > diagnosticsParameters_
Definition: METAnalyzer.h:245
double ptThreshold_
Definition: METAnalyzer.h:196
bool runcosmics_
Definition: METAnalyzer.h:259
bool isCaloMet_
Definition: METAnalyzer.h:610
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
std::string MetType_
Definition: METAnalyzer.h:141
bool onlyCleaned_
Definition: METAnalyzer.h:260
edm::InputTag hbheNoiseFilterResultTag_
Definition: METAnalyzer.h:165
edm::EDGetTokenT< bool > EcalDeadCellTriggerToken_
Definition: METAnalyzer.h:174
edm::InputTag hbheNoiseIsoFilterResultTag_
Definition: METAnalyzer.h:167
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken_
Definition: METAnalyzer.h:183
std::vector< unsigned int > nEv
Definition: METAnalyzer.h:608
bool fillCandidateMap_histos
Definition: METAnalyzer.h:615
double nPVMin_
Definition: METAnalyzer.h:250
edm::EDGetTokenT< bool > eeBadScFilterToken_
Definition: METAnalyzer.h:176
edm::InputTag EcalDeadCellTriggerTag_
Definition: METAnalyzer.h:173
Provides a code based selection for trigger and DCS information in order to have no failing filters i...
std::string FolderName_
Definition: METAnalyzer.h:142
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:214
std::string HBHENoiseStringMiniAOD
Definition: METAnalyzer.h:208
edm::EDGetTokenT< reco::JetCorrector > jetCorrectorToken_
Definition: METAnalyzer.h:211
std::string HBHEIsoNoiseStringMiniAOD
Definition: METAnalyzer.h:209
std::vector< unsigned int > nCh
Definition: METAnalyzer.h:607
std::vector< std::vector< std::string > > triggerFolderExpr_
Definition: METAnalyzer.h:215
edm::InputTag vertexTag_
Definition: METAnalyzer.h:147
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
Definition: METAnalyzer.h:150
bool fill_met_high_level_histo
Definition: METAnalyzer.h:614
edm::EDGetTokenT< bool > hbheIsoNoiseFilterResultToken_
Definition: METAnalyzer.h:168
edm::InputTag metCollectionLabel_
Definition: METAnalyzer.h:144
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::InputTag CSCHalo2015ResultTag_
Definition: METAnalyzer.h:171
edm::ParameterSet cleaningParameters_
Definition: METAnalyzer.h:244
edm::EDGetTokenT< bool > hbheNoiseFilterResultToken_
Definition: METAnalyzer.h:166
edm::InputTag eeBadScFilterTag_
Definition: METAnalyzer.h:175
edm::InputTag HcalStripHaloTag_
Definition: METAnalyzer.h:179
std::string m_l1algoname_
Definition: METAnalyzer.h:193
edm::EDGetTokenT< edm::TriggerResults > METFilterMiniAODToken_
Definition: METAnalyzer.h:158
PF Jet selector for pat::Jets.
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: METAnalyzer.h:201
edm::EDGetTokenT< bool > HcalStripHaloToken_
Definition: METAnalyzer.h:180
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
Definition: METAnalyzer.h:153
edm::EDGetTokenT< bool > CSCHaloResultToken_
Definition: METAnalyzer.h:170
edm::EDGetTokenT< bool > EcalDeadCellBoundaryToken_
Definition: METAnalyzer.h:178
JetMETDQMDCSFilter * DCSFilter_
Definition: METAnalyzer.h:286
Jet selector for pat::Jets and for CaloJets.
PFJetIDSelectionFunctor pfjetIDFunctorLoose
Definition: METAnalyzer.h:190
edm::EDGetTokenT< std::vector< reco::PFCandidate > > pflowToken_
Definition: METAnalyzer.h:567
double nPVMax_
Definition: METAnalyzer.h:251
edm::EDGetTokenT< pat::METCollection > patMetToken_
Definition: METAnalyzer.h:182
edm::InputTag triggerResultsLabel_
Definition: METAnalyzer.h:200
edm::ParameterSet parameters
Definition: METAnalyzer.h:137
edm::InputTag EcalDeadCellBoundaryTag_
Definition: METAnalyzer.h:177
edm::EDGetTokenT< reco::MuonCollection > MuonsToken_
Definition: METAnalyzer.h:155
edm::InputTag METFilterMiniAODLabel2_
Definition: METAnalyzer.h:159
double ptMinCand_
Definition: METAnalyzer.h:529
edm::VParameterSet triggerSelectedSubFolders_
Definition: METAnalyzer.h:213
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtToken_
Definition: METAnalyzer.h:151
bool bypassAllPVChecks_
Definition: METAnalyzer.h:257
int miniaodfilterdec
Definition: METAnalyzer.h:163
edm::EDGetTokenT< edm::ValueMap< reco::JetID > > jetID_ValueMapToken_
Definition: METAnalyzer.h:187
edm::InputTag inputJetIDValueMap
Definition: METAnalyzer.h:186
edm::InputTag METFilterMiniAODLabel_
Definition: METAnalyzer.h:157
JetIDSelectionFunctor jetIDFunctorLoose
Definition: METAnalyzer.h:189
edm::InputTag jetCollectionLabel_
Definition: METAnalyzer.h:146
edm::EDGetTokenT< pat::JetCollection > patJetsToken_
Definition: METAnalyzer.h:154
bool hTriggerLabelsIsSet_
Definition: METAnalyzer.h:296
bool isMiniAODMet_
Definition: METAnalyzer.h:612
double hcalMin_
Definition: METAnalyzer.h:532
edm::EDGetTokenT< std::vector< pat::PackedCandidate > > pflowPackedToken_
Definition: METAnalyzer.h:568
int m_bitAlgTechTrig_
Definition: METAnalyzer.h:194
std::vector< std::string > triggerFolderLabels_
Definition: METAnalyzer.h:216
METAnalyzer::~METAnalyzer ( )
virtual

Destructor.

Definition at line 189 of file METAnalyzer.cc.

189  {
190  for (std::vector<GenericTriggerEventFlag *>::const_iterator it = triggerFolderEventFlag_.begin(); it!= triggerFolderEventFlag_.end(); it++) {
191  delete *it;
192  }
193  delete DCSFilter_;
194 }
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:214
JetMETDQMDCSFilter * DCSFilter_
Definition: METAnalyzer.h:286

Member Function Documentation

void METAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
virtual

Get the analysis.

  • if(isTCMet_){

Implements edm::stream::EDAnalyzerBase.

Definition at line 1280 of file METAnalyzer.cc.

References RecoTauCleanerPlugins::charge, gather_cfg::cout, cmsPerfPublish::DirName, eta, ztee::fd, edm::Event::getByToken(), i, susybsm::HSCParticleType::innerTrack, edm::HandleBase::isValid(), LogDebug, LogTrace, edm::EventBase::luminosityBlock(), bookConverter::max, objects.METAnalyzer::met, NULL, jetProducer_cfi::patJets, pfJets_cff::pfJets, phi(), position, edm::Handle< T >::product(), EnergyCorrector::pt, pileupReCalc_HLTpaths::scale, AlCaHLTBitMon_QueryRunRegistry::string, edm::triggerResults(), triggerResultsToken_(), and GoodVertex_cfg::vertexCollection.

1280  {
1281 
1282 
1283  // *** Fill lumisection ME
1284  int myLuminosityBlock;
1285  myLuminosityBlock = iEvent.luminosityBlock();
1287  lumisecME=map_dijet_MEs["JetMET/lumisec"]; if(lumisecME && lumisecME->getRootObject()) lumisecME->Fill(myLuminosityBlock);
1288  }
1289 
1290  if (myLuminosityBlock<LSBegin_) return;
1291  if (myLuminosityBlock>LSEnd_ && LSEnd_>0) return;
1292 
1293  if (verbose_) std::cout << "METAnalyzer analyze" << std::endl;
1294 
1296 
1297 
1298 
1299 
1300  // ==========================================================
1301  // Trigger information
1302  //
1303 // trigJetMB_=0;
1304 // trigHighPtJet_=0;
1305 // trigLowPtJet_=0;
1306 // trigMinBias_=0;
1307 // trigHighMET_=0;
1308 // // _trig_LowMET=0;
1309 // trigEle_=0;
1310 // trigMuon_=0;
1311 // trigPhysDec_=0;
1312  std::vector<int> triggerFolderDecisions;
1313  triggerFolderDecisions_ = std::vector<int> (triggerFolderEventFlag_.size(), 0);
1314  // **** Get the TriggerResults container
1316  iEvent.getByToken(triggerResultsToken_, triggerResults);
1317 
1318  if( triggerResults.isValid()) {
1320  // Check how many HLT triggers are in triggerResults
1321  int ntrigs = (*triggerResults).size();
1322  if (verbose_) std::cout << "ntrigs=" << ntrigs << std::endl;
1323  // If index=ntrigs, this HLT trigger doesn't exist in the HLT table for this data.
1324  for (std::vector<GenericTriggerEventFlag *>::const_iterator it = triggerFolderEventFlag_.begin(); it!=triggerFolderEventFlag_.end();it++) {
1325  unsigned int pos = it - triggerFolderEventFlag_.begin();
1326  bool fd = (*it)->accept(iEvent, iSetup);
1327  triggerFolderDecisions_[pos] = fd;
1328  }
1329  allTriggerDecisions_.clear();
1330  for (unsigned int i=0;i<allTriggerNames_.size();++i) {
1331  allTriggerDecisions_.push_back((*triggerResults).accept(i));
1332  //std::cout<<"TR "<<(*triggerResults).size()<<" "<<(*triggerResults).accept(i)<<" "<<allTriggerNames_[i]<<std::endl;
1333  }
1334  }
1335 
1336  // ==========================================================
1337  // MET information
1338 
1339  // **** Get the MET container
1344 
1345  //if(isTCMet_){
1346  //iEvent.getByToken(tcMetToken_, tcmetcoll);
1347  //if(!tcmetcoll.isValid()) return;
1348  //}
1349  if(isCaloMet_){
1350  iEvent.getByToken(caloMetToken_, calometcoll);
1351  if(!calometcoll.isValid()) return;
1352  }
1353  if(isPFMet_){
1354  iEvent.getByToken(pfMetToken_, pfmetcoll);
1355  if(!pfmetcoll.isValid()) return;
1356  }
1357  if(isMiniAODMet_){
1358  iEvent.getByToken(patMetToken_, patmetcoll);
1359  if(!patmetcoll.isValid()) return;
1360  }
1361 
1362  const MET *met=NULL;
1363  const pat::MET *patmet=NULL;
1364  const PFMET *pfmet=NULL;
1365  const CaloMET *calomet=NULL;
1366  //if(isTCMet_){
1367  //met=&(tcmetcoll->front());
1368  //}
1369  if(isPFMet_){
1370  met=&(pfmetcoll->front());
1371  pfmet=&(pfmetcoll->front());
1372  }
1373  if(isCaloMet_){
1374  met=&(calometcoll->front());
1375  calomet=&(calometcoll->front());
1376  }
1377  if(isMiniAODMet_){
1378  met=&(patmetcoll->front());
1379  patmet=&(patmetcoll->front());
1380  }
1381 
1382  LogTrace("METAnalyzer")<<"[METAnalyzer] Call to the MET analyzer";
1383 
1384  // ==========================================================
1385  // TCMET
1386 
1387  //if (/*isTCMet_ || */(isCaloMet_ && metCollectionLabel_.label() == "corMetGlobalMuons")) {
1388 
1389  //iEvent.getByToken(MuonToken_, muonHandle_);
1390  //iEvent.getByToken(TrackToken_, trackHandle_);
1391  //iEvent.getByToken(ElectronToken_, electronHandle_);
1392  //iEvent.getByToken(BeamspotToken_, beamSpotHandle_);
1393  //iEvent.getByToken(tcMETValueMapToken_,tcMetValueMapHandle_);
1394 
1395  //if(!muonHandle_.isValid()) edm::LogInfo("OutputInfo") << "falied to retrieve muon data require by MET Task";
1396  //if(!trackHandle_.isValid()) edm::LogInfo("OutputInfo") << "falied to retrieve track data require by MET Task";
1397  //if(!electronHandle_.isValid()) edm::LogInfo("OutputInfo") << "falied to retrieve electron data require by MET Task";
1398  //if(!beamSpotHandle_.isValid()) edm::LogInfo("OutputInfo") << "falied to retrieve beam spot data require by MET Task";
1399 
1400  //beamSpot_ = ( beamSpotHandle_.isValid() ) ? beamSpotHandle_->position() : math::XYZPoint(0, 0, 0);
1401  //}
1402 
1403  // ==========================================================
1404  bool bJetID = false;
1405  bool bDiJetID = false;
1406  // Jet ID -------------------------------------------------------
1407  //
1408 
1413 
1414  int collsize=-1;
1415 
1416  if (isCaloMet_){
1417  iEvent.getByToken(caloJetsToken_, caloJets);
1418  if (!caloJets.isValid()) {
1419  LogDebug("") << "METAnalyzer: Could not find calojet product" << std::endl;
1420  if (verbose_) std::cout << "METAnalyzer: Could not find calojet product" << std::endl;
1421  }
1422  collsize=caloJets->size();
1423  }
1425  //if (isTCMet_){
1426  //iEvent.getByToken(jptJetsToken_, jptJets);
1427  //if (!jptJets.isValid()) {
1428  // LogDebug("") << "METAnalyzer: Could not find jptjet product" << std::endl;
1429  // if (verbose_) std::cout << "METAnalyzer: Could not find jptjet product" << std::endl;
1430  //}
1431  //collsize=jptJets->size();
1432  //}*/
1433 
1434  edm::Handle< edm::ValueMap<reco::JetID> >jetID_ValueMap_Handle;
1435  if(/*isTCMet_ || */isCaloMet_){
1436  if(!runcosmics_){
1437  iEvent.getByToken(jetID_ValueMapToken_,jetID_ValueMap_Handle);
1438  }
1439  }
1440 
1441  if (isMiniAODMet_){ iEvent.getByToken(patJetsToken_, patJets);
1442  if (!patJets.isValid()) {
1443  LogDebug("") << "METAnalyzer: Could not find patjet product" << std::endl;
1444  if (verbose_) std::cout << "METAnalyzer: Could not find patjet product" << std::endl;
1445  }
1446  collsize=patJets->size();
1447  }
1448 
1449  if (isPFMet_){ iEvent.getByToken(pfJetsToken_, pfJets);
1450  if (!pfJets.isValid()) {
1451  LogDebug("") << "METAnalyzer: Could not find pfjet product" << std::endl;
1452  if (verbose_) std::cout << "METAnalyzer: Could not find pfjet product" << std::endl;
1453  }
1454  collsize=pfJets->size();
1455  }
1456 
1457  unsigned int ind1=-1;
1458  double pt1=-1;
1459  bool pass_jetID1=false;
1460  unsigned int ind2=-1;
1461  double pt2=-1;
1462  bool pass_jetID2=false;
1463 
1465  bool pass_correction_flag=false;
1466  if(!isMiniAODMet_){
1467  iEvent.getByToken(jetCorrectorToken_, jetCorr);
1468  if (jetCorr.isValid()){
1469  pass_correction_flag=true;
1470  }
1471  }else{
1472  pass_correction_flag=true;
1473  }
1474  //do loose jet ID-> check threshold on corrected jets
1475  for (int ijet=0; ijet<collsize; ijet++) {
1476  double pt_jet=-10;
1477  double scale=1.;
1478  bool iscleaned=false;
1479  if (pass_correction_flag) {
1480  if(isCaloMet_){
1481  scale = jetCorr->correction((*caloJets)[ijet]);
1482  }
1483  //if(isTCMet_){
1484  //scale = jetCorr->correction((*jptJets)[ijet]);
1485  //}
1486  if(isPFMet_){
1487  scale = jetCorr->correction((*pfJets)[ijet]);
1488  }
1489  }
1490  if(isCaloMet_){
1491  pt_jet=scale*(*caloJets)[ijet].pt();
1492  if(pt_jet> ptThreshold_){
1493  reco::CaloJetRef calojetref(caloJets, ijet);
1494  if(!runcosmics_){
1495  reco::JetID jetID = (*jetID_ValueMap_Handle)[calojetref];
1496  iscleaned = jetIDFunctorLoose((*caloJets)[ijet], jetID);
1497  }else{
1498  iscleaned=true;
1499  }
1500  }
1501  }
1503  //if(isTCMet_){
1504  //pt_jet=scale*(*jptJets)[ijet].pt();
1505  //if(pt_jet> ptThreshold_){
1506  // const edm::RefToBase<reco::Jet>& rawJet = (*jptJets)[ijet].getCaloJetRef();
1507  // const reco::CaloJet *rawCaloJet = dynamic_cast<const reco::CaloJet*>(&*rawJet);
1508  // reco::CaloJetRef const theCaloJetRef = (rawJet).castTo<reco::CaloJetRef>();
1509  // if(!runcosmics_){
1510  // reco::JetID jetID = (*jetID_ValueMap_Handle)[theCaloJetRef];
1511  // iscleaned = jetIDFunctorLoose(*rawCaloJet, jetID);
1512  // }else{
1513  // iscleaned=true;
1514  // }
1515  //}
1516  //}*/
1517  if(isPFMet_){
1518  pt_jet=scale*(*pfJets)[ijet].pt();
1519  if(pt_jet> ptThreshold_){
1520  iscleaned = pfjetIDFunctorLoose((*pfJets)[ijet]);
1521  }
1522  }
1523  if(isMiniAODMet_){
1524  pt_jet=(*patJets)[ijet].pt();
1525  if(pt_jet> ptThreshold_){
1527  iscleaned = pfjetIDFunctorLoose((*patJets)[ijet],stringbitset);
1528  }
1529  }
1530  if(iscleaned){
1531  bJetID=true;
1532  }
1533  if(pt_jet>pt1){
1534  pt2=pt1;
1535  ind2=ind1;
1536  pass_jetID2=pass_jetID1;
1537  pt1=pt_jet;
1538  ind1=ijet;
1539  pass_jetID1=iscleaned;
1540  }else if (pt_jet>pt2){
1541  pt2=pt_jet;
1542  ind2=ijet;
1543  pass_jetID2=iscleaned;
1544  }
1545  }
1546  if(pass_jetID1 && pass_jetID2){
1547  double dphi=-1.0;
1548  if(isCaloMet_){
1549  dphi=fabs((*caloJets)[ind1].phi()-(*caloJets)[ind2].phi());
1550  }
1552  //dphi=fabs((*jptJets)[ind1].phi()-(*jptJets)[ind2].phi());
1553  //}*/
1554  if(isPFMet_){
1555  dphi=fabs((*pfJets)[ind1].phi()-(*pfJets)[ind2].phi());
1556  }
1557  if(isMiniAODMet_){
1558  dphi=fabs((*patJets)[0].phi()-(*patJets)[1].phi());
1559  }
1560  if(dphi>acos(-1.)){
1561  dphi=2*acos(-1.)-dphi;
1562  }
1563  if(dphi>2.7){
1564  bDiJetID=true;
1565  }
1566  }
1567  // ==========================================================
1568  // ==========================================================
1569  //Vertex information
1570  Handle<VertexCollection> vertexHandle;
1571  iEvent.getByToken(vertexToken_, vertexHandle);
1572 
1573  if (!vertexHandle.isValid()) {
1574  LogDebug("") << "CaloMETAnalyzer: Could not find vertex collection" << std::endl;
1575  if (verbose_) std::cout << "CaloMETAnalyzer: Could not find vertex collection" << std::endl;
1576  }
1577  numPV_ = 0;
1578  if ( vertexHandle.isValid() ){
1579  VertexCollection vertexCollection = *(vertexHandle.product());
1580  numPV_ = vertexCollection.size();
1581  }
1582  bool bPrimaryVertex = (bypassAllPVChecks_ || (numPV_>0));
1583 
1584  bool bZJets = false;
1585 
1587  iEvent.getByToken(MuonsToken_, Muons);
1588 
1590 
1591  double pt_muon0=-1;
1592  double pt_muon1=-1;
1593  int mu_index0=-1;
1594  int mu_index1=-1;
1595  //fill it only for cleaned jets
1596  if(Muons.isValid() && Muons->size()>1){
1597  for (unsigned int i=0;i<Muons->size();i++){
1598  bool pass_muon_id=false;
1599  bool pass_muon_iso=false;
1600  double dxy=fabs((*Muons)[i].muonBestTrack()->dxy());
1601  double dz=fabs((*Muons)[i].muonBestTrack()->dz());
1602  if (numPV_>0){
1603  dxy=fabs((*Muons)[i].muonBestTrack()->dxy((*vertexHandle)[0].position()));
1604  dz=fabs((*Muons)[i].muonBestTrack()->dz((*vertexHandle)[0].position()));
1605  }
1606  if((*Muons)[i].pt()>20 && fabs((*Muons)[i].eta())<2.3){
1607  if((*Muons)[i].isGlobalMuon() && (*Muons)[i].isPFMuon() && (*Muons)[i].globalTrack()->hitPattern().numberOfValidMuonHits() > 0 && (*Muons)[i].numberOfMatchedStations() > 1 && dxy < 0.2 && (*Muons)[i].numberOfMatchedStations() > 1 && dz<0.5 && (*Muons)[i].innerTrack()->hitPattern().numberOfValidPixelHits() > 0 && (*Muons)[i].innerTrack()->hitPattern().trackerLayersWithMeasurement() > 5){
1608  pass_muon_id=true;
1609  }
1610  // Muon pf isolation DB corrected
1611  float muonIsoPFdb = ((*Muons)[i].pfIsolationR04().sumChargedHadronPt
1612  + std::max(0., (*Muons)[i].pfIsolationR04().sumNeutralHadronEt + (*Muons)[i].pfIsolationR04().sumPhotonEt - 0.5*(*Muons)[i].pfIsolationR04().sumPUPt))/(*Muons)[i].pt();
1613  if(muonIsoPFdb<0.12){
1614  pass_muon_iso=true;
1615  }
1616 
1617  if(pass_muon_id && pass_muon_iso){
1618  if((*Muons)[i].pt()>pt_muon0){
1619  mu_index1=mu_index0;
1620  pt_muon1=pt_muon0;
1621  mu_index0=i;
1622  pt_muon0=(*Muons)[i].pt();
1623  }else if ((*Muons)[i].pt()>pt_muon1){
1624  mu_index1=i;
1625  pt_muon1=(*Muons)[i].pt();
1626  }
1627  }
1628  }
1629  }
1630  if(mu_index0>=0 && mu_index1>=0){
1631  if((*Muons)[mu_index0].charge()*(*Muons)[mu_index1].charge()<0){
1632  zCand=(*Muons)[mu_index0].polarP4()+(*Muons)[mu_index1].polarP4();
1633  if(fabs(zCand.M()-91.)<20){
1634  bZJets=true;
1635  }
1636  }
1637  }
1638  }
1639 
1640  // ==========================================================
1641 
1643  iEvent.getByToken( gtToken_, gtReadoutRecord);
1644 
1645  bool techTriggerResultBxM2 = false;
1646  bool techTriggerResultBxM1 = false;
1647  bool techTriggerResultBx0 = false;
1648 
1649  if (!gtReadoutRecord.isValid()) {
1650  LogDebug("") << "METAnalyzer: Could not find GT readout record" << std::endl;
1651  if (verbose_) std::cout << "METAnalyzer: Could not find GT readout record product" << std::endl;
1652  }else{
1653  // trigger results before mask for BxInEvent -2 (E), -1 (F), 0 (L1A), 1, 2
1654  const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxM2 = gtReadoutRecord->technicalTriggerWord(-2);
1655  const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxM1 = gtReadoutRecord->technicalTriggerWord(-1);
1656  const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBx0 = gtReadoutRecord->technicalTriggerWord();
1657  //const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxG = gtReadoutRecord->technicalTriggerWord(1);
1658  //const TechnicalTriggerWord& technicalTriggerWordBeforeMaskBxH = gtReadoutRecord->technicalTriggerWord(2);
1659  if (m_bitAlgTechTrig_ > -1 && technicalTriggerWordBeforeMaskBx0.size() > 0) {
1660  techTriggerResultBx0 = technicalTriggerWordBeforeMaskBx0.at(m_bitAlgTechTrig_);
1661  if(techTriggerResultBx0!=0){
1662  techTriggerResultBxM2 = technicalTriggerWordBeforeMaskBxM2.at(m_bitAlgTechTrig_);
1663  techTriggerResultBxM1 = technicalTriggerWordBeforeMaskBxM1.at(m_bitAlgTechTrig_);
1664  }
1665  }
1666  }
1667 
1668  std::vector<bool>trigger_flag(4,false);
1669  if(techTriggerResultBx0 && techTriggerResultBxM2 && techTriggerResultBxM1){//current and previous two bunches filled
1670  trigger_flag[0]=true;
1671  }
1672  if(techTriggerResultBx0 && techTriggerResultBxM1){//current and previous bunch filled
1673  trigger_flag[1]=true; }
1674  if(techTriggerResultBx0 && !techTriggerResultBxM1){//current bunch filled, but previous bunch emtpy
1675  trigger_flag[2]=true;
1676  }
1677  if(techTriggerResultBx0 && !techTriggerResultBxM2 && !techTriggerResultBxM1){//current bunch filled, but previous two bunches emtpy
1678  trigger_flag[3]=true;
1679  }
1680  std::vector<bool>filter_decisions(8,false);//include all recommended filters, old filters in MiniAOD, and 2 new filters in testing phase
1681  if(!isMiniAODMet_ && !runcosmics_){//not checked for MiniAOD -> for miniaod decision filled as "triggerResults" bool
1682  edm::Handle<bool> HBHENoiseFilterResultHandle;
1683  iEvent.getByToken(hbheNoiseFilterResultToken_, HBHENoiseFilterResultHandle);
1684  if (!HBHENoiseFilterResultHandle.isValid()) {
1685  LogDebug("") << "METAnalyzer: Could not find HBHENoiseFilterResult" << std::endl;
1686  if (verbose_) std::cout << "METAnalyzer: Could not find HBHENoiseFilterResult" << std::endl;
1687  }
1688  filter_decisions[0]= *HBHENoiseFilterResultHandle;
1689  edm::Handle<bool> CSCTightHaloFilterResultHandle;
1690  iEvent.getByToken(CSCHaloResultToken_, CSCTightHaloFilterResultHandle);
1691  if (!CSCTightHaloFilterResultHandle.isValid()) {
1692  LogDebug("") << "METAnalyzer: Could not find CSCTightHaloFilterResultHandle" << std::endl;
1693  if (verbose_) std::cout << "METAnalyzer: CSCTightHaloFilterResultHandle" << std::endl;
1694  }
1695  filter_decisions[1]= *CSCTightHaloFilterResultHandle;
1696  edm::Handle<bool> eeBadScFilterResultHandle;
1697  iEvent.getByToken(eeBadScFilterToken_, eeBadScFilterResultHandle);
1698  if (!eeBadScFilterResultHandle.isValid()) {
1699  LogDebug("") << "METAnalyzer: Could not find eeBadScFilterResultHandle" << std::endl;
1700  if (verbose_) std::cout << "METAnalyzer: eeBadScFilterResultHandle" << std::endl;
1701  }
1702  filter_decisions[2]= *eeBadScFilterResultHandle;
1703  edm::Handle<bool> HBHENoiseIsoFilterResultHandle;
1704  iEvent.getByToken(hbheIsoNoiseFilterResultToken_, HBHENoiseIsoFilterResultHandle);
1705  if (!HBHENoiseIsoFilterResultHandle.isValid()) {
1706  LogDebug("") << "METAnalyzer: Could not find HBHENoiseIsoFilterResult" << std::endl;
1707  if (verbose_) std::cout << "METAnalyzer: Could not find HBHENoiseIsoFilterResult" << std::endl;
1708  }
1709  filter_decisions[3]= *HBHENoiseIsoFilterResultHandle;
1710  edm::Handle<bool> CSCTightHalo2015FilterResultHandle;
1711  iEvent.getByToken(CSCHalo2015ResultToken_, CSCTightHalo2015FilterResultHandle);
1712  if (!CSCTightHalo2015FilterResultHandle.isValid()) {
1713  LogDebug("") << "METAnalyzer: Could not find CSCTightHalo2015FilterResultHandle" << std::endl;
1714  if (verbose_) std::cout << "METAnalyzer: CSCTightHalo2015FilterResultHandle" << std::endl;
1715  }
1716  filter_decisions[4]= *CSCTightHalo2015FilterResultHandle;
1717  edm::Handle<bool> EcalDeadCellTriggerFilterResultHandle;
1718  iEvent.getByToken(EcalDeadCellTriggerToken_, EcalDeadCellTriggerFilterResultHandle);
1719  if (!EcalDeadCellTriggerFilterResultHandle.isValid()) {
1720  LogDebug("") << "METAnalyzer: Could not find EcalDeadCellTriggerFilterResultHandle" << std::endl;
1721  if (verbose_) std::cout << "METAnalyzer: EcalDeadCellTriggerFilterResultHandle" << std::endl;
1722  }
1723  filter_decisions[5]= *EcalDeadCellTriggerFilterResultHandle;
1724  edm::Handle<bool> EcalDeadCellBoundaryHandle;
1725  iEvent.getByToken(EcalDeadCellBoundaryToken_, EcalDeadCellBoundaryHandle);
1726  if (!EcalDeadCellBoundaryHandle.isValid()) {
1727  LogDebug("") << "METAnalyzer: Could not find EcalDeadCellBoundaryHandle" << std::endl;
1728  if (verbose_) std::cout << "METAnalyzer: EcalDeadCellBoundaryHandle" << std::endl;
1729  }
1730  filter_decisions[6]= *EcalDeadCellBoundaryHandle;
1731  edm::Handle<bool> HcalStripHaloFilterHandle;
1732  iEvent.getByToken(HcalStripHaloToken_, HcalStripHaloFilterHandle);
1733  if (!HcalStripHaloFilterHandle.isValid()) {
1734  LogDebug("") << "METAnalyzer: Could not find CSCTightHalo2015FilterResultHandle" << std::endl;
1735  if (verbose_) std::cout << "METAnalyzer: CSCTightHalo2015FilterResultHandle" << std::endl;
1736  }
1737  filter_decisions[7]= *HcalStripHaloFilterHandle;
1738  }else{
1739  edm::Handle<edm::TriggerResults> metFilterResults;
1740  iEvent.getByToken(METFilterMiniAODToken_, metFilterResults);
1741  if(metFilterResults.isValid()){
1742  if(miniaodFilterIndex_[0]!=-1){
1743  filter_decisions[0] = metFilterResults->accept(miniaodFilterIndex_[0]);
1744  }
1745  if(miniaodFilterIndex_[1]!=-1){
1746  filter_decisions[1] = metFilterResults->accept(miniaodFilterIndex_[1]);
1747  }
1748  if(miniaodFilterIndex_[2]!=-1){
1749  filter_decisions[2] = metFilterResults->accept(miniaodFilterIndex_[2]);
1750  }
1751  if(miniaodFilterIndex_[3]!=-1){
1752  filter_decisions[3] = metFilterResults->accept(miniaodFilterIndex_[3]);
1753  }
1754  if(miniaodFilterIndex_[4]!=-1){
1755  filter_decisions[4] = metFilterResults->accept(miniaodFilterIndex_[4]);
1756  }
1757  if(miniaodFilterIndex_[5]!=-1){
1758  filter_decisions[5] = metFilterResults->accept(miniaodFilterIndex_[5]);
1759  }
1760  if(miniaodFilterIndex_[6]!=-1){
1761  filter_decisions[6] = metFilterResults->accept(miniaodFilterIndex_[6]);
1762  }
1763  if(miniaodFilterIndex_[7]!=-1){
1764  filter_decisions[7] = metFilterResults->accept(miniaodFilterIndex_[7]);
1765  }
1766  }else{
1767  iEvent.getByToken(METFilterMiniAODToken2_, metFilterResults);
1768  if(metFilterResults.isValid()){
1769  if(miniaodFilterIndex_[0]!=-1){
1770  filter_decisions[0] = metFilterResults->accept(miniaodFilterIndex_[0]);
1771  }
1772  if(miniaodFilterIndex_[1]!=-1){
1773  filter_decisions[1] = metFilterResults->accept(miniaodFilterIndex_[1]);
1774  }
1775  if(miniaodFilterIndex_[2]!=-1){
1776  filter_decisions[2] = metFilterResults->accept(miniaodFilterIndex_[2]);
1777  }
1778  if(miniaodFilterIndex_[3]!=-1){
1779  filter_decisions[3] = metFilterResults->accept(miniaodFilterIndex_[3]);
1780  }
1781  if(miniaodFilterIndex_[4]!=-1){
1782  filter_decisions[4] = metFilterResults->accept(miniaodFilterIndex_[4]);
1783  }
1784  if(miniaodFilterIndex_[5]!=-1){
1785  filter_decisions[5] = metFilterResults->accept(miniaodFilterIndex_[5]);
1786  }
1787  if(miniaodFilterIndex_[6]!=-1){
1788  filter_decisions[6] = metFilterResults->accept(miniaodFilterIndex_[6]);
1789  }
1790  if(miniaodFilterIndex_[7]!=-1){
1791  filter_decisions[7] = metFilterResults->accept(miniaodFilterIndex_[7]);
1792  }
1793  }
1794  }
1795  }
1796  bool HBHENoiseFilterResultFlag=filter_decisions[0];//setup for RECO and MINIAOD
1797  // ==========================================================
1798  // HCAL Noise filter
1799  bool bHBHENoiseFilter = HBHENoiseFilterResultFlag;
1800 
1801  // DCS Filter
1802  bool bDCSFilter = (bypassAllDCSChecks_ || DCSFilter_->filter(iEvent, iSetup));
1803  // ==========================================================
1804  // Reconstructed MET Information - fill MonitorElements
1805  std::string DirName_old=DirName;
1806  for (std::vector<std::string>::const_iterator ic = folderNames_.begin();
1807  ic != folderNames_.end(); ic++){
1808  bool pass_selection = false;
1809  if ((*ic=="Uncleaned") &&(isCaloMet_ || bPrimaryVertex)){
1810  fillMESet(iEvent, DirName_old+"/"+*ic, *met,*patmet, *pfmet,*calomet,zCand, map_dijet_MEs,trigger_flag,filter_decisions);
1811  pass_selection =true;
1812  }
1813  //take two lines out for first check
1814  if ((*ic=="Cleaned") && bDCSFilter && bHBHENoiseFilter && bPrimaryVertex && bJetID){
1815  fillMESet(iEvent, DirName_old+"/"+*ic, *met,*patmet,*pfmet,*calomet,zCand,map_dijet_MEs,trigger_flag,filter_decisions);
1816  pass_selection=true;
1817  }
1818  if ((*ic=="DiJet" ) &&bDCSFilter&&bHBHENoiseFilter&& bPrimaryVertex&& bDiJetID){
1819  fillMESet(iEvent, DirName_old+"/"+*ic, *met,*patmet,*pfmet,*calomet,zCand,map_dijet_MEs,trigger_flag,filter_decisions);
1820  pass_selection=true;
1821  }
1822  if ((*ic=="ZJets" ) &&bDCSFilter&&bHBHENoiseFilter&& bPrimaryVertex&& bZJets){
1823  fillMESet(iEvent, DirName_old+"/"+*ic, *met,*patmet,*pfmet,*calomet,zCand,map_dijet_MEs,trigger_flag,filter_decisions);
1824  pass_selection=true;
1825  }
1826  if(pass_selection && isPFMet_){
1827  DirName=DirName_old+"/"+*ic;
1828  }
1829 
1830  }
1831 }
#define LogDebug(id)
edm::EDGetTokenT< reco::CaloMETCollection > caloMetToken_
Definition: METAnalyzer.h:184
Analysis-level MET class.
Definition: MET.h:43
std::map< std::string, MonitorElement * > map_dijet_MEs
Definition: METAnalyzer.h:606
int i
Definition: DBlmapReader.cc:9
edm::EDGetTokenT< reco::CaloJetCollection > caloJetsToken_
Definition: METAnalyzer.h:152
std::vector< int > allTriggerDecisions_
Definition: METAnalyzer.h:206
bool bypassAllDCSChecks_
Definition: METAnalyzer.h:258
edm::EDGetTokenT< bool > CSCHalo2015ResultToken_
Definition: METAnalyzer.h:172
edm::EDGetTokenT< edm::TriggerResults > METFilterMiniAODToken2_
Definition: METAnalyzer.h:160
std::vector< int > triggerFolderDecisions_
Definition: METAnalyzer.h:217
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
double ptThreshold_
Definition: METAnalyzer.h:196
bool runcosmics_
Definition: METAnalyzer.h:259
bool isCaloMet_
Definition: METAnalyzer.h:610
edm::EDGetTokenT< bool > EcalDeadCellTriggerToken_
Definition: METAnalyzer.h:174
edm::EDGetTokenT< reco::PFMETCollection > pfMetToken_
Definition: METAnalyzer.h:183
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:62
#define NULL
Definition: scimark2.h:8
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
edm::EDGetTokenT< bool > eeBadScFilterToken_
Definition: METAnalyzer.h:176
std::string FolderName_
Definition: METAnalyzer.h:142
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:214
Jet ID object.
Definition: JetID.h:16
tuple vertexCollection
edm::EDGetTokenT< reco::JetCorrector > jetCorrectorToken_
Definition: METAnalyzer.h:211
void Fill(long long x)
std::vector< int > miniaodFilterIndex_
Definition: METAnalyzer.h:162
MonitorElement * lumisecME
Definition: METAnalyzer.h:300
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
Definition: METAnalyzer.h:150
bool fill_met_high_level_histo
Definition: METAnalyzer.h:614
edm::EDGetTokenT< bool > hbheIsoNoiseFilterResultToken_
Definition: METAnalyzer.h:168
edm::InputTag metCollectionLabel_
Definition: METAnalyzer.h:144
Definition: MET.h:42
edm::EDGetTokenT< bool > hbheNoiseFilterResultToken_
Definition: METAnalyzer.h:166
std::vector< std::string > folderNames_
Definition: METAnalyzer.h:288
tuple fd
Definition: ztee.py:136
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
static std::string const triggerResults
Definition: EdmProvDump.cc:41
edm::EDGetTokenT< edm::TriggerResults > METFilterMiniAODToken_
Definition: METAnalyzer.h:158
bool isValid() const
Definition: HandleBase.h:75
std::vector< std::string > allTriggerNames_
Definition: METAnalyzer.h:205
bool filter(const edm::Event &evt, const edm::EventSetup &es)
#define LogTrace(id)
edm::EDGetTokenT< edm::TriggerResults > triggerResultsToken_
Definition: METAnalyzer.h:201
edm::EDGetTokenT< bool > HcalStripHaloToken_
Definition: METAnalyzer.h:180
edm::EDGetTokenT< reco::PFJetCollection > pfJetsToken_
Definition: METAnalyzer.h:153
edm::EDGetTokenT< bool > CSCHaloResultToken_
Definition: METAnalyzer.h:170
edm::EDGetTokenT< bool > EcalDeadCellBoundaryToken_
Definition: METAnalyzer.h:178
JetMETDQMDCSFilter * DCSFilter_
Definition: METAnalyzer.h:286
TObject * getRootObject(void) const
T const * product() const
Definition: Handle.h:81
PFJetIDSelectionFunctor pfjetIDFunctorLoose
Definition: METAnalyzer.h:190
void fillMESet(const edm::Event &, std::string, const reco::MET &, const pat::MET &, const reco::PFMET &, const reco::CaloMET &, const reco::Candidate::PolarLorentzVector &, std::map< std::string, MonitorElement * > &, std::vector< bool >, std::vector< bool >)
edm::EDGetTokenT< pat::METCollection > patMetToken_
Definition: METAnalyzer.h:182
std::string const & label() const
Definition: InputTag.h:36
pat::strbitset getBitTemplate() const
Get an empty bitset with the proper names.
Definition: Selector.h:212
edm::EDGetTokenT< reco::MuonCollection > MuonsToken_
Definition: METAnalyzer.h:155
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > gtToken_
Definition: METAnalyzer.h:151
static int position[264][3]
Definition: ReadPGInfo.cc:509
bool bypassAllPVChecks_
Definition: METAnalyzer.h:257
tuple cout
Definition: gather_cfg.py:145
edm::EDGetTokenT< edm::ValueMap< reco::JetID > > jetID_ValueMapToken_
Definition: METAnalyzer.h:187
JetIDSelectionFunctor jetIDFunctorLoose
Definition: METAnalyzer.h:189
edm::EDGetTokenT< pat::JetCollection > patJetsToken_
Definition: METAnalyzer.h:154
bool isMiniAODMet_
Definition: METAnalyzer.h:612
tuple pfJets
Definition: pfJets_cff.py:8
int m_bitAlgTechTrig_
Definition: METAnalyzer.h:194
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.
Definition: Candidate.h:39
void METAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overridevirtual

Inizialize parameters for histo binning.

Implements DQMEDAnalyzer.

Definition at line 197 of file METAnalyzer.cc.

References cmsPerfPublish::DirName, DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

199  {
201  ibooker.setCurrentFolder(DirName);
202 
203  if(!folderNames_.empty()){
204  folderNames_.clear();
205  }
206  if(runcosmics_){
207  folderNames_.push_back("Uncleaned");
208  }else{
209  if(!onlyCleaned_){
210  folderNames_.push_back("Uncleaned");
211  }
212  folderNames_.push_back("Cleaned");
213  folderNames_.push_back("DiJet");
214  if(!isMiniAODMet_){
215  folderNames_.push_back("ZJets");
216  }
217  }
218  for (std::vector<std::string>::const_iterator ic = folderNames_.begin();
219  ic != folderNames_.end(); ic++){
220  bookMESet(DirName+"/"+*ic, ibooker,map_dijet_MEs);
221  }
222 }
std::map< std::string, MonitorElement * > map_dijet_MEs
Definition: METAnalyzer.h:606
bool runcosmics_
Definition: METAnalyzer.h:259
bool onlyCleaned_
Definition: METAnalyzer.h:260
std::string FolderName_
Definition: METAnalyzer.h:142
edm::InputTag metCollectionLabel_
Definition: METAnalyzer.h:144
void bookMESet(std::string, DQMStore::IBooker &, std::map< std::string, MonitorElement * > &)
Definition: METAnalyzer.cc:226
std::vector< std::string > folderNames_
Definition: METAnalyzer.h:288
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
std::string const & label() const
Definition: InputTag.h:36
bool isMiniAODMet_
Definition: METAnalyzer.h:612
void METAnalyzer::bookMESet ( std::string  DirName,
DQMStore::IBooker ibooker,
std::map< std::string, MonitorElement * > &  map_of_MEs 
)
private

Definition at line 226 of file METAnalyzer.cc.

227 {
228  bool bLumiSecPlot=fill_met_high_level_histo;
229  //bool inTriggerPathPlots=false;
230  bool fillPFCandidatePlots=false;
231  bool fillZPlots=false;
232 
233  if (DirName.find("Cleaned")!=std::string::npos) {
234  fillPFCandidatePlots=true;
235  bookMonitorElement(DirName,ibooker,map_of_MEs,bLumiSecPlot,fillPFCandidatePlots,fillZPlots);
236  //for (unsigned int i = 0; i<triggerFolderEventFlag_.size(); i++) {
237  //fillPFCandidatePlots=false;
238  //if (triggerFolderEventFlag_[i]->on()) {
239  //bookMonitorElement(DirName+"/"+triggerFolderLabels_[i],ibooker,map_of_MEs,bLumiSecPlot,fillPFCandidatePlots,fillZPlots);
240  //}
241  //}
242  }else if (DirName.find("ZJets")!=std::string::npos) {
243  fillPFCandidatePlots=false;
244  fillZPlots=true;
245  bookMonitorElement(DirName,ibooker,map_of_MEs,bLumiSecPlot,fillPFCandidatePlots,fillZPlots);
246  }else{
247  bookMonitorElement(DirName,ibooker,map_of_MEs,bLumiSecPlot,fillPFCandidatePlots,fillZPlots);
248  }
249 }
bool fill_met_high_level_histo
Definition: METAnalyzer.h:614
void bookMonitorElement(std::string, DQMStore::IBooker &, std::map< std::string, MonitorElement * > &, bool, bool, bool)
Definition: METAnalyzer.cc:252
void METAnalyzer::bookMonitorElement ( std::string  DirName,
DQMStore::IBooker ibooker,
std::map< std::string, MonitorElement * > &  map_of_MEs,
bool  bLumiSecPlot = false,
bool  fillPFCandPlots = false,
bool  fillZPlots = false 
)
private

Definition at line 252 of file METAnalyzer.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookProfile(), gather_cfg::cout, i, M_PI, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and findQualityFiles::v.

253 {
254  if (verbose_) std::cout << "bookMonitorElement " << DirName << std::endl;
255 
256  ibooker.setCurrentFolder(DirName);
257  if(fillZPlots){
258  if(isCaloMet_){
259  meZJets_u_par = ibooker.book1D("u_parallel_Z_inc", "u_parallel_Z_inc", 50, -1000., 75);
260  }else{
261  meZJets_u_par = ibooker.book1D("u_parallel_Z_inc", "u_parallel_Z_inc", 50, -800., 75);
262  }
263  meZJets_u_par_ZPt_0_15 = ibooker.book1D("u_parallel_ZPt_0_15", "u_parallel_ZPt_0_15", 50, -100, 75);
264  meZJets_u_par_ZPt_15_30 = ibooker.book1D("u_parallel_ZPt_15_30", "u_parallel_ZPt_15_30", 50, -100, 50);
265  meZJets_u_par_ZPt_30_55 = ibooker.book1D("u_parallel_ZPt_30_55", "u_parallel_ZPt_30_55", 50, -175, 50);
266  meZJets_u_par_ZPt_55_75 = ibooker.book1D("u_parallel_ZPt_55_75", "u_parallel_ZPt_55_75", 50, -175, 0);
267  meZJets_u_par_ZPt_75_150 = ibooker.book1D("u_parallel_ZPt_75_150", "u_parallel_ZPt_75_150", 50, -300, 0);
268  if(isCaloMet_){
269  meZJets_u_par_ZPt_150_290 = ibooker.book1D("u_parallel_ZPt_150_290", "u_parallel_ZPt_150_290", 50, -750, -100);
270  }else{
271  meZJets_u_par_ZPt_150_290 = ibooker.book1D("u_parallel_ZPt_150_290", "u_parallel_ZPt_150_290", 50, -450, -50);
272  }
273  if(isCaloMet_){
274  meZJets_u_par_ZPt_290 = ibooker.book1D("u_parallel_ZPt_290", "u_parallel_ZPt_290", 50, -1000., -350.);
275  }else{
276  meZJets_u_par_ZPt_290 = ibooker.book1D("u_parallel_ZPt_290", "u_parallel_ZPt_290", 50, -750., -150.);
277  }
278  meZJets_u_perp = ibooker.book1D("u_perp_Z_inc", "u_perp_Z_inc", 50, -85., 85.);
279  meZJets_u_perp_ZPt_0_15 = ibooker.book1D("u_perp_ZPt_0_15", "u_perp_ZPt_0_15", 50, -85., 85.);
280  meZJets_u_perp_ZPt_15_30 = ibooker.book1D("u_perp_ZPt_15_30", "u_perp_ZPt_15_30", 50, -85., 85.);
281  meZJets_u_perp_ZPt_30_55 = ibooker.book1D("u_perp_ZPt_30_55", "u_perp_ZPt_30_55", 50, -85., 85.);
282  meZJets_u_perp_ZPt_55_75 = ibooker.book1D("u_perp_ZPt_55_75", "u_perp_ZPt_55_75", 50, -85., 85.);
283  meZJets_u_perp_ZPt_75_150 = ibooker.book1D("u_perp_ZPt_75_150", "u_perp_ZPt_75_150", 50, -85., 85.);
284  meZJets_u_perp_ZPt_150_290 = ibooker.book1D("u_perp_ZPt_150_290", "u_perp_ZPt_150_290", 50, -85., 85.);
285  meZJets_u_perp_ZPt_290 = ibooker.book1D("u_perp_ZPt_290", "u_perp_ZPt_290", 50, -85., 85.);
286 
287  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_parallel_Z_inc",meZJets_u_par));
288  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_parallel_ZPt_0_15",meZJets_u_par_ZPt_0_15));
289  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_parallel_ZPt_15_30",meZJets_u_par_ZPt_15_30));
290  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_parallel_ZPt_30_55",meZJets_u_par_ZPt_30_55));
291  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_parallel_ZPt_55_75",meZJets_u_par_ZPt_55_75));
292  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_parallel_ZPt_75_150",meZJets_u_par_ZPt_75_150));
293  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_parallel_ZPt_150_290",meZJets_u_par_ZPt_150_290));
294  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_parallel_ZPt_290",meZJets_u_par_ZPt_290));
295 
296  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_perp_Z_inc",meZJets_u_perp));
297  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_perp_ZPt_0_15",meZJets_u_perp_ZPt_0_15));
298  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_perp_ZPt_15_30",meZJets_u_perp_ZPt_15_30));
299  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_perp_ZPt_30_55",meZJets_u_perp_ZPt_30_55));
300  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_perp_ZPt_55_75",meZJets_u_perp_ZPt_55_75));
301  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_perp_ZPt_75_150",meZJets_u_perp_ZPt_75_150));
302  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_perp_ZPt_150_290",meZJets_u_perp_ZPt_150_290));
303  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"u_perp_ZPt_290",meZJets_u_perp_ZPt_290));
304  }
305 
306  if(!fillZPlots){
307  hTrigger = ibooker.book1D("triggerResults", "triggerResults", 500, 0, 500);
308  for (unsigned int i = 0; i<allTriggerNames_.size();i++){
309  if(i<(unsigned int)hTrigger->getNbinsX()){
310  if (!hTriggerLabelsIsSet_) {
312  }
313  }
314  }
315  if (!hTriggerLabelsIsSet_) for (int i = allTriggerNames_.size(); i<hTrigger->getNbinsX();i++){
316  hTrigger->setBinLabel(i+1, "");
317  }
318  hTriggerLabelsIsSet_ = true;
319 
320  hMEx = ibooker.book1D("MEx", "MEx", 200, -500, 500);
321  hMEy = ibooker.book1D("MEy", "MEy", 200, -500, 500);
322  hMET = ibooker.book1D("MET", "MET", 200, 0, 1000);
323  hMET_2 = ibooker.book1D("MET_2", "MET Range 2",200, 0, 2000);
324  hSumET = ibooker.book1D("SumET", "SumET", 400, 0, 4000);
325  hMETSig = ibooker.book1D("METSig", "METSig", 51, 0, 51);
326  hMETPhi = ibooker.book1D("METPhi", "METPhi", 60, -M_PI, M_PI);
327  hMET_logx = ibooker.book1D("MET_logx", "MET_logx", 40, -1, 9);
328  hSumET_logx = ibooker.book1D("SumET_logx", "SumET_logx", 40, -1, 9);
329 
330  hMEx ->setAxisTitle("MEx [GeV]", 1);
331  hMEy ->setAxisTitle("MEy [GeV]", 1);
332  hMET ->setAxisTitle("MET [GeV]", 1);
333  hMET_2 ->setAxisTitle("MET [GeV]", 1);
334  hSumET ->setAxisTitle("SumET [GeV]", 1);
335  hMETSig ->setAxisTitle("METSig", 1);
336  hMETPhi ->setAxisTitle("METPhi [rad]", 1);
337  hMET_logx ->setAxisTitle("log(MET) [GeV]", 1);
338  hSumET_logx->setAxisTitle("log(SumET) [GeV]", 1);
339 
340  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"triggerResults",hTrigger));
341  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MEx",hMEx));
342  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MEy",hMEy));
343  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET",hMET));
344  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_2",hMET_2));
345  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"SumET",hSumET));
346  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METSig",hMETSig));
347  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhi",hMETPhi));
348  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_logx",hMET_logx));
349  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"SumET_logx",hSumET_logx));
350 
351  hMET_HBHENoiseFilter = ibooker.book1D("MET_HBHENoiseFilter", "MET_HBHENoiseFiltered", 200, 0, 1000);
352  hMET_CSCTightHaloFilter = ibooker.book1D("MET_CSCTightHaloFilter", "MET_CSCTightHaloFiltered", 200, 0, 1000);
353  hMET_eeBadScFilter = ibooker.book1D("MET_eeBadScFilter", "MET_eeBadScFiltered", 200, 0, 1000);
354  hMET_HBHEIsoNoiseFilter = ibooker.book1D("MET_HBHEIsoNoiseFilter", "MET_HBHEIsoNoiseFiltered", 200, 0, 1000);
355  hMET_CSCTightHalo2015Filter = ibooker.book1D("MET_CSCTightHalo2015Filter", "MET_CSCTightHalo2015Filtered", 200, 0, 1000);
356  hMET_EcalDeadCellTriggerFilter = ibooker.book1D("MET_EcalDeadCellTriggerFilter", "MET_EcalDeadCellTriggerFiltered", 200, 0, 1000);
357  hMET_EcalDeadCellBoundaryFilter = ibooker.book1D("MET_EcalDeadCellBoundaryFilter", "MET_EcalDeadCellBoundaryFiltered", 200, 0, 1000);
358  hMET_HcalStripHaloFilter = ibooker.book1D("MET_HcalStripHaloFilter", "MET_HcalStripHaloFiltered", 200, 0, 1000);
359 
360  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_HBHENoiseFilter",hMET_HBHENoiseFilter));
361  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_CSCTightHaloFilter",hMET_CSCTightHaloFilter));
362  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_eeBadScFilter",hMET_eeBadScFilter));
363  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_HBHEIsoNoiseFilter",hMET_HBHEIsoNoiseFilter));
364  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_CSCTightHalo2015Filter",hMET_CSCTightHalo2015Filter));
365  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_EcalDeadCellTriggerFilter",hMET_EcalDeadCellTriggerFilter));
366  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_EcalDeadCellBoundaryFilter",hMET_EcalDeadCellBoundaryFilter));
367  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_HcalStripHaloFilter",hMET_HcalStripHaloFilter));
368 
369 
370  // Book NPV profiles --> would some of these profiles be interesting for other MET types too
371  //----------------------------------------------------------------------------
372  meMEx_profile = ibooker.bookProfile("MEx_profile", "met.px()", nbinsPV_, nPVMin_, nPVMax_, 200, -500, 500);
373  meMEy_profile = ibooker.bookProfile("MEy_profile", "met.py()", nbinsPV_, nPVMin_, nPVMax_, 200, -500, 500);
374  meMET_profile = ibooker.bookProfile("MET_profile", "met.pt()", nbinsPV_, nPVMin_, nPVMax_, 200, 0, 1000);
375  meSumET_profile = ibooker.bookProfile("SumET_profile", "met.sumEt()", nbinsPV_, nPVMin_, nPVMax_, 400, 0, 4000);
376  // Set NPV profiles x-axis title
377  //----------------------------------------------------------------------------
378  meMEx_profile ->setAxisTitle("nvtx", 1);
379  meMEy_profile ->setAxisTitle("nvtx", 1);
380  meMET_profile ->setAxisTitle("nvtx", 1);
381  meSumET_profile->setAxisTitle("nvtx", 1);
382 
383  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MEx_profile",meMEx_profile));
384  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MEy_profile",meMEy_profile));
385  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_profile",meMET_profile));
386  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"SumET_profile",meSumET_profile));
387 
388 
389  if(isCaloMet_){
390  hCaloHadEtInHB = ibooker.book1D("CaloHadEtInHB","CaloHadEtInHB",50,0,2000);
391  hCaloHadEtInHB->setAxisTitle("Had Et [GeV]",1);
392  hCaloHadEtInHO = ibooker.book1D("CaloHadEtInHO","CaloHadEtInHO",25,0,500);
393  hCaloHadEtInHO->setAxisTitle("Had Et [GeV]",1);
394  hCaloHadEtInHE = ibooker.book1D("CaloHadEtInHE","CaloHadEtInHE",50,0,2000);
395  hCaloHadEtInHE->setAxisTitle("Had Et [GeV]",1);
396  hCaloHadEtInHF = ibooker.book1D("CaloHadEtInHF","CaloHadEtInHF",50,0,1000);
397  hCaloHadEtInHF->setAxisTitle("Had Et [GeV]",1);
398  hCaloEmEtInHF = ibooker.book1D("CaloEmEtInHF" ,"CaloEmEtInHF" ,25,0,500);
399  hCaloEmEtInHF->setAxisTitle("EM Et [GeV]",1);
400  hCaloEmEtInEE = ibooker.book1D("CaloEmEtInEE" ,"CaloEmEtInEE" ,50,0,1000);
401  hCaloEmEtInEE->setAxisTitle("EM Et [GeV]",1);
402  hCaloEmEtInEB = ibooker.book1D("CaloEmEtInEB" ,"CaloEmEtInEB" ,50,0,2000);
403  hCaloEmEtInEB->setAxisTitle("EM Et [GeV]",1);
404 
405  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloHadEtInHO",hCaloHadEtInHO));
406  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloHadEtInHF",hCaloHadEtInHF));
407  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloHadEtInHE",hCaloHadEtInHE));
408  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloHadEtInHB",hCaloHadEtInHB));
409  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEmEtInHF",hCaloEmEtInHF));
410  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEmEtInEE",hCaloEmEtInEE));
411  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEmEtInEB",hCaloEmEtInEB));
412 
413  hCaloMETPhi020 = ibooker.book1D("CaloMETPhi020", "CaloMETPhi020", 60, -M_PI, M_PI);
414  hCaloMETPhi020 ->setAxisTitle("METPhi [rad] (MET>20 GeV)", 1);
415 
416  hCaloEtFractionHadronic = ibooker.book1D("CaloEtFractionHadronic","CaloEtFractionHadronic",50,0,1);
417  hCaloEtFractionHadronic->setAxisTitle("Hadronic Et Fraction",1);
418  hCaloEmEtFraction = ibooker.book1D("CaloEmEtFraction", "CaloEmEtFraction" ,50,0,1);
419  hCaloEmEtFraction->setAxisTitle("EM Et Fraction",1);
420 
421  hCaloEmEtFraction020 = ibooker.book1D("CaloEmEtFraction020", "CaloEmEtFraction020" ,50,0,1);
422  hCaloEmEtFraction020->setAxisTitle("EM Et Fraction (MET>20 GeV)",1);
423 
424 
425  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloMETPhi020",hCaloMETPhi020));
426  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEtFractionHadronic",hCaloEtFractionHadronic));
427  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEmEtFraction", hCaloEmEtFraction));
428  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"CaloEmEtFraction020",hCaloEmEtFraction020));
429 
430  }
431 
432  if(isPFMet_){
433  if(fillPFCandPlots && fillCandidateMap_histos){//first bool internal checks for subdirectory filling, second bool given in cfg file, checks that we fill maps only in one module in total
434  /*
435  //histos where two previous bunches were empty/filled
436  mePhotonEtFraction_BXm2BXm1Empty = ibooker.book1D("PfPhotonEtFraction_BXm2BXm1Empty", "pfmet.photonEtFraction() prev empty 2 bunches", 50, 0, 1);
437  mePhotonEtFraction_BXm2BXm1Filled = ibooker.book1D("PfPhotonEtFraction_BXm2BXm1Filled", "pfmet.photonEtFraction() prev filled 2 bunches", 50, 0, 1);
438  meNeutralHadronEtFraction_BXm2BXm1Empty = ibooker.book1D("PfNeutralHadronEtFraction_BXm2BXm1Empty", "pfmet.neutralHadronEtFraction() prev empty 2 bunches", 50, 0, 1);
439  meNeutralHadronEtFraction_BXm2BXm1Filled = ibooker.book1D("PfNeutralHadronEtFraction_BXm2BXm1Filled", "pfmet.neutralHadronEtFraction() prev filled 2 bunches", 50, 0, 1);
440  meChargedHadronEtFraction_BXm2BXm1Empty = ibooker.book1D("PfChargedHadronEtFraction_BXm2BXm1Empty", "pfmet.chargedHadronEtFraction() prev empty 2 bunches", 50, 0, 1);
441  meChargedHadronEtFraction_BXm2BXm1Filled = ibooker.book1D("PfChargedHadronEtFraction_BXm2BXm1Filled", "pfmet.chargedHadronEtFraction() prev filled 2 bunches", 50, 0, 1);
442  meMET_BXm2BXm1Empty = ibooker.book1D("MET_BXm2BXm1Empty", "MET prev empty 2 bunches", 200, 0, 1000);
443  meMET_BXm2BXm1Filled = ibooker.book1D("MET_BXm2BXm1Filled", "MET prev filled 2 bunches", 200, 0, 1000);
444  meSumET_BXm2BXm1Empty = ibooker.book1D("SumET_BXm2BXm1Empty", "SumET prev empty 2 bunches", 400, 0, 4000);
445  meSumET_BXm2BXm1Filled = ibooker.book1D("SumET_BXm2BXm1Filled", "SumET prev filled 2 bunches", 400, 0, 4000);
446 
447  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFraction_BXm2BXm1Empty" ,mePhotonEtFraction_BXm2BXm1Empty));
448  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFraction_BXm2BXm1Filled" ,mePhotonEtFraction_BXm2BXm1Filled));
449  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFraction_BXm2BXm1Empty" ,meNeutralHadronEtFraction_BXm2BXm1Empty));
450  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFraction_BXm2BXm1Filled" ,meNeutralHadronEtFraction_BXm2BXm1Filled));
451  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFraction_BXm2BXm1Empty" ,meChargedHadronEtFraction_BXm2BXm1Empty));
452  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFraction_BXm2BXm1Filled" ,meChargedHadronEtFraction_BXm2BXm1Filled));
453  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_BXm2BXm1Empty" ,meMET_BXm2BXm1Empty));
454  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_BXm2BXm1Filled" ,meMET_BXm2BXm1Filled));
455  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"SumET_BXm2BXm1Empty" ,meSumET_BXm2BXm1Empty));
456  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"SumET_BXm2BXm1Filled",meSumET_BXm2BXm1Filled));
457  */
458  meCHF_Barrel = ibooker.book1D("PfChargedHadronEtFractionBarrel", "chargedHadronEtFractionBarrel", 50, 0, 1);
459  meCHF_EndcapPlus = ibooker.book1D("PfChargedHadronEtFractionEndcapPlus", "chargedHadronEtFractionEndcapPlus", 50, 0, 1);
460  meCHF_EndcapMinus = ibooker.book1D("PfChargedHadronEtFractionEndcapMinus", "chargedHadronEtFractionEndcapMinus", 50, 0, 1);
461  meCHF_Barrel_BXm1Empty = ibooker.book1D("PfChargedHadronEtFractionBarrel_BXm1Empty", "chargedHadronEtFractionBarrel prev empty bunch", 50, 0, 1);
462  meCHF_EndcapPlus_BXm1Empty = ibooker.book1D("PfChargedHadronEtFractionEndcapPlus_BXm1Empty", "chargedHadronEtFractionEndcapPlus prev empty bunch", 50, 0, 1);
463  meCHF_EndcapMinus_BXm1Empty = ibooker.book1D("PfChargedHadronEtFractionEndcapMinus_BXm1Empty", "chargedHadronEtFractionEndcapMinus prev empty bunch", 50, 0, 1);
464  //meCHF_Barrel_BXm2BXm1Empty = ibooker.book1D("PfChargedHadronEtFractionBarrel_BXm2BXm1Empty", "chargedHadronEtFractionBarrel prev empty 2 bunches", 50, 0, 1);
465  //meCHF_EndcapPlus_BXm2BXm1Empty = ibooker.book1D("PfChargedHadronEtFractionEndcapPlus_BXm2BXm1Empty", "chargedHadronEtFractionEndcapPlus prev empty 2 bunches", 50, 0, 1);
466  //meCHF_EndcapMinus_BXm2BXm1Empty = ibooker.book1D("PfChargedHadronEtFractionEndcapMinus_BXm2BXm1Empty", "chargedHadronEtFractionEndcapMinus prev empty 2 bunches", 50, 0, 1);
467  meCHF_Barrel_BXm1Filled = ibooker.book1D("PfChargedHadronEtFractionBarrel_BXm1Filled", "chargedHadronEtFractionBarrel prev filled 2 bunches", 50, 0, 1);
468  meCHF_EndcapPlus_BXm1Filled = ibooker.book1D("PfChargedHadronEtFractionEndcapPlus_BXm1Filled", "chargedHadronEtFractionEndcapPlus prev filled bunch", 50, 0, 1);
469  meCHF_EndcapMinus_BXm1Filled = ibooker.book1D("PfChargedHadronEtFractionEndcapMinus_BXm1Filled", "chargedHadronEtFractionEndcapMinus prev filled bunch", 50, 0, 1);
470  //meCHF_Barrel_BXm2BXm1Filled = ibooker.book1D("PfChargedHadronEtFractionBarrel_BXm2BXm1Filled", "chargedHadronEtFractionBarrel prev filled 2 bunches", 50, 0, 1);
471  //meCHF_EndcapPlus_BXm2BXm1Filled = ibooker.book1D("PfChargedHadronEtFractionEndcapPlus_BXm2BXm1Filled", "chargedHadronEtFractionEndcapPlus prev filled 2 bunches", 50, 0, 1);
472  //meCHF_EndcapMinus_BXm2BXm1Filled = ibooker.book1D("PfChargedHadronEtFractionEndcapMinus_BXm2BXm1Filled", "chargedHadronEtFractionEndcapMinus prev filled 2 bunches", 50, 0, 1);
473 
474  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionBarrel", meCHF_Barrel));
475  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionEndcapPlus", meCHF_EndcapPlus));
476  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionEndcapMinus", meCHF_EndcapMinus));
477  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionBarrel_BXm1Empty", meCHF_Barrel_BXm1Empty));
478  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionEndcapPlus_BXm1Empty", meCHF_EndcapPlus_BXm1Empty));
479  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionEndcapMinus_BXm1Empty", meCHF_EndcapMinus_BXm1Empty));
480  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionBarrel_BXm2BXm1Empty", meCHF_Barrel_BXm2BXm1Empty));
481  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionEndcapPlus_BXm2BXm1Empty", meCHF_EndcapPlus_BXm2BXm1Empty));
482  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionEndcapMinus_BXm2BXm1Empty", meCHF_EndcapMinus_BXm2BXm1Empty));
483  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionBarrel_BXm1Filled", meCHF_Barrel_BXm1Filled));
484  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionEndcapPlus_BXm1Filled", meCHF_EndcapPlus_BXm1Filled));
485  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionEndcapMinus_BXm1Filled", meCHF_EndcapMinus_BXm1Filled));
486  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionBarrel_BXm2BXm1Filled", meCHF_Barrel_BXm2BXm1Filled));
487  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionEndcapPlus_BXm2BXm1Filled", meCHF_EndcapPlus_BXm2BXm1Filled));
488  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFractionEndcapMinus_BXm2BXm1Filled", meCHF_EndcapMinus_BXm2BXm1Filled));
489 
490  meNHF_Barrel = ibooker.book1D("PfNeutralHadronEtFractionBarrel", "neutralHadronEtFractionBarrel", 50, 0, 1);
491  meNHF_EndcapPlus = ibooker.book1D("PfNeutralHadronEtFractionEndcapPlus", "neutralHadronEtFractionEndcapPlus", 50, 0, 1);
492  meNHF_EndcapMinus = ibooker.book1D("PfNeutralHadronEtFractionEndcapMinus", "neutralHadronEtFractionEndcapMinus", 50, 0, 1);
493  meNHF_Barrel_BXm1Empty = ibooker.book1D("PfNeutralHadronEtFractionBarrel_BXm1Empty", "neutralHadronEtFractionBarrel prev empty bunch", 50, 0, 1);
494  meNHF_EndcapPlus_BXm1Empty = ibooker.book1D("PfNeutralHadronEtFractionEndcapPlus_BXm1Empty", "neutralHadronEtFractionEndcapPlus prev empty bunch", 50, 0, 1);
495  meNHF_EndcapMinus_BXm1Empty = ibooker.book1D("PfNeutralHadronEtFractionEndcapMinus_BXm1Empty", "neutralHadronEtFractionEndcapMinus prev empty bunch", 50, 0, 1);
496  //meNHF_Barrel_BXm2BXm1Empty = ibooker.book1D("PfNeutralHadronEtFractionBarrel_BXm2BXm1Empty", "neutralHadronEtFractionBarrel prev empty 2 bunches", 50, 0, 1);
497  //meNHF_EndcapPlus_BXm2BXm1Empty = ibooker.book1D("PfNeutralHadronEtFractionEndcapPlus_BXm2BXm1Empty", "neutralHadronEtFractionEndcapPlus prev empty 2 bunches", 50, 0, 1);
498  //meNHF_EndcapMinus_BXm2BXm1Empty = ibooker.book1D("PfNeutralHadronEtFractionEndcapMinus_BXm2BXm1Empty", "neutralHadronEtFractionEndcapMinus prev empty 2 bunches", 50, 0, 1);
499  meNHF_Barrel_BXm1Filled = ibooker.book1D("PfNeutralHadronEtFractionBarrel_BXm1Filled", "neutralHadronEtFractionBarrel prev filled 2 bunches", 50, 0, 1);
500  meNHF_EndcapPlus_BXm1Filled = ibooker.book1D("PfNeutralHadronEtFractionEndcapPlus_BXm1Filled", "neutralHadronEtFractionEndcapPlus prev filled bunch", 50, 0, 1);
501  meNHF_EndcapMinus_BXm1Filled = ibooker.book1D("PfNeutralHadronEtFractionEndcapMinus_BXm1Filled", "neutralHadronEtFractionEndcapMinus prev filled bunch", 50, 0, 1);
502  //meNHF_Barrel_BXm2BXm1Filled = ibooker.book1D("PfNeutralHadronEtFractionBarrel_BXm2BXm1Filled", "neutralHadronEtFractionBarrel prev filled 2 bunches", 50, 0, 1);
503  //meNHF_EndcapPlus_BXm2BXm1Filled = ibooker.book1D("PfNeutralHadronEtFractionEndcapPlus_BXm2BXm1Filled", "neutralHadronEtFractionEndcapPlus prev filled 2 bunches", 50, 0, 1);
504  //meNHF_EndcapMinus_BXm2BXm1Filled = ibooker.book1D("PfNeutralHadronEtFractionEndcapMinus_BXm2BXm1Filled", "neutralHadronEtFractionEndcapMinus prev filled 2 bunches", 50, 0, 1);
505 
506  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionBarrel", meNHF_Barrel));
507  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionEndcapPlus", meNHF_EndcapPlus));
508  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionEndcapMinus", meNHF_EndcapMinus));
509  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionBarrel_BXm1Empty", meNHF_Barrel_BXm1Empty));
510  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionEndcapPlus_BXm1Empty", meNHF_EndcapPlus_BXm1Empty));
511  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionEndcapMinus_BXm1Empty", meNHF_EndcapMinus_BXm1Empty));
512  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionBarrel_BXm2BXm1Empty", meNHF_Barrel_BXm2BXm1Empty));
513  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionEndcapPlus_BXm2BXm1Empty", meNHF_EndcapPlus_BXm2BXm1Empty));
514  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionEndcapMinus_BXm2BXm1Empty", meNHF_EndcapMinus_BXm2BXm1Empty));
515  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionBarrel_BXm1Filled", meNHF_Barrel_BXm1Filled));
516  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionEndcapPlus_BXm1Filled", meNHF_EndcapPlus_BXm1Filled));
517  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionEndcapMinus_BXm1Filled", meNHF_EndcapMinus_BXm1Filled));
518  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionBarrel_BXm2BXm1Filled", meNHF_Barrel_BXm2BXm1Filled));
519  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionEndcapPlus_BXm2BXm1Filled", meNHF_EndcapPlus_BXm2BXm1Filled));
520  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFractionEndcapMinus_BXm2BXm1Filled", meNHF_EndcapMinus_BXm2BXm1Filled));
521 
522  mePhF_Barrel = ibooker.book1D("PfPhotonEtFractionBarrel", "photonEtFractionBarrel", 50, 0, 1);
523  mePhF_EndcapPlus = ibooker.book1D("PfPhotonEtFractionEndcapPlus", "photonEtFractionEndcapPlus", 50, 0, 1);
524  mePhF_EndcapMinus = ibooker.book1D("PfPhotonEtFractionEndcapMinus", "photonEtFractionEndcapMinus", 50, 0, 1);
525  mePhF_Barrel_BXm1Empty = ibooker.book1D("PfPhotonEtFractionBarrel_BXm1Empty", "photonEtFractionBarrel prev empty bunch", 50, 0, 1);
526  mePhF_EndcapPlus_BXm1Empty = ibooker.book1D("PfPhotonEtFractionEndcapPlus_BXm1Empty", "photonEtFractionEndcapPlus prev empty bunch", 50, 0, 1);
527  mePhF_EndcapMinus_BXm1Empty = ibooker.book1D("PfPhotonEtFractionEndcapMinus_BXm1Empty", "photonEtFractionEndcapMinus prev empty bunch", 50, 0, 1);
528  //mePhF_Barrel_BXm2BXm1Empty = ibooker.book1D("PfPhotonEtFractionBarrel_BXm2BXm1Empty", "photonEtFractionBarrel prev empty 2 bunches", 50, 0, 1);
529  //mePhF_EndcapPlus_BXm2BXm1Empty = ibooker.book1D("PfPhotonEtFractionEndcapPlus_BXm2BXm1Empty", "photonEtFractionEndcapPlus prev empty 2 bunches", 50, 0, 1);
530  //mePhF_EndcapMinus_BXm2BXm1Empty = ibooker.book1D("PfPhotonEtFractionEndcapMinus_BXm2BXm1Empty", "photonEtFractionEndcapMinus prev empty 2 bunches", 50, 0, 1);
531  mePhF_Barrel_BXm1Filled = ibooker.book1D("PfPhotonEtFractionBarrel_BXm1Filled", "photonEtFractionBarrel prev filled 2 bunches", 50, 0, 1);
532  mePhF_EndcapPlus_BXm1Filled = ibooker.book1D("PfPhotonEtFractionEndcapPlus_BXm1Filled", "photonEtFractionEndcapPlus prev filled bunch", 50, 0, 1);
533  mePhF_EndcapMinus_BXm1Filled = ibooker.book1D("PfPhotonEtFractionEndcapMinus_BXm1Filled", "photonEtFractionEndcapMinus prev filled bunch", 50, 0, 1);
534  //mePhF_Barrel_BXm2BXm1Filled = ibooker.book1D("PfPhotonEtFractionBarrel_BXm2BXm1Filled", "photonEtFractionBarrel prev filled 2 bunches", 50, 0, 1);
535  //mePhF_EndcapPlus_BXm2BXm1Filled = ibooker.book1D("PfPhotonEtFractionEndcapPlus_BXm2BXm1Filled", "photonEtFractionEndcapPlus prev filled 2 bunches", 50, 0, 1);
536  //mePhF_EndcapMinus_BXm2BXm1Filled = ibooker.book1D("PfPhotonEtFractionEndcapMinus_BXm2BXm1Filled", "photonEtFractionEndcapMinus prev filled 2 bunches", 50, 0, 1);
537 
538  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionBarrel", mePhF_Barrel));
539  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionEndcapPlus", mePhF_EndcapPlus));
540  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionEndcapMinus", mePhF_EndcapMinus));
541  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionBarrel_BXm1Empty", mePhF_Barrel_BXm1Empty));
542  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionEndcapPlus_BXm1Empty", mePhF_EndcapPlus_BXm1Empty));
543  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionEndcapMinus_BXm1Empty", mePhF_EndcapMinus_BXm1Empty));
544  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionBarrel_BXm2BXm1Empty", mePhF_Barrel_BXm2BXm1Empty));
545  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionEndcapPlus_BXm2BXm1Empty", mePhF_EndcapPlus_BXm2BXm1Empty));
546  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionEndcapMinus_BXm2BXm1Empty", mePhF_EndcapMinus_BXm2BXm1Empty));
547  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionBarrel_BXm1Filled", mePhF_Barrel_BXm1Filled));
548  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionEndcapPlus_BXm1Filled", mePhF_EndcapPlus_BXm1Filled));
549  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionEndcapMinus_BXm1Filled", mePhF_EndcapMinus_BXm1Filled));
550  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionBarrel_BXm2BXm1Filled", mePhF_Barrel_BXm2BXm1Filled));
551  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionEndcapPlus_BXm2BXm1Filled", mePhF_EndcapPlus_BXm2BXm1Filled));
552  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFractionEndcapMinus_BXm2BXm1Filled", mePhF_EndcapMinus_BXm2BXm1Filled));
553 
554  meHFHadF_Plus = ibooker.book1D("PfHFHadronEtFractionPlus", "HFHadronEtFractionPlus", 50, 0, 1);
555  meHFHadF_Minus = ibooker.book1D("PfHFHadronEtFractionMinus", "HFHadronEtFractionMinus", 50, 0, 1);
556  meHFHadF_Plus_BXm1Empty = ibooker.book1D("PfHFHadronEtFractionPlus_BXm1Empty", "HFHadronEtFractionPlus prev empty bunch", 50, 0, 1);
557  meHFHadF_Minus_BXm1Empty = ibooker.book1D("PfHFHadronEtFractionMinus_BXm1Empty", "HFHadronEtFractionMinus prev empty bunch", 50, 0, 1);
558  //meHFHadF_Plus_BXm2BXm1Empty = ibooker.book1D("PfHFHadronEtFractionPlus_BXm2BXm1Empty", "HFHadronEtFractionPlus prev empty 2 bunches", 50, 0, 1);
559  //meHFHadF_Minus_BXm2BXm1Empty = ibooker.book1D("PfHFHadronEtFractionMinus_BXm2BXm1Empty", "HFHadronEtFractionMinus prev empty 2 bunches", 50, 0, 1);
560  meHFHadF_Plus_BXm1Filled = ibooker.book1D("PfHFHadronEtFractionPlus_BXm1Filled", "HFHadronEtFractionPlus prev filled bunch", 50, 0, 1);
561  meHFHadF_Minus_BXm1Filled = ibooker.book1D("PfHFHadronEtFractionMinus_BXm1Filled", "HFHadronEtFractionMinus prev filled bunch", 50, 0, 1);
562  //meHFHadF_Plus_BXm2BXm1Filled = ibooker.book1D("PfHFHadronEtFractionPlus_BXm2BXm1Filled", "HFHadronEtFractionPlus prev filled 2 bunches", 50, 0, 1);
563  //meHFHadF_Minus_BXm2BXm1Filled = ibooker.book1D("PfHFHadronEtFractionMinus_BXm2BXm1Filled", "HFHadronEtFractionMinus prev filled 2 bunches", 50, 0, 1);
564 
565  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFractionPlus", meHFHadF_Plus));
566  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFractionMinus", meHFHadF_Minus));
567  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFractionPlus_BXm1Empty", meHFHadF_Plus_BXm1Empty));
568  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFractionMinus_BXm1Empty", meHFHadF_Minus_BXm1Empty));
569  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFractionPlus_BXm2BXm1Empty", meHFHadF_Plus_BXm2BXm1Empty));
570  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFractionMinus_BXm2BXm1Empty", meHFHadF_Minus_BXm2BXm1Empty));
571  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFractionPlus_BXm1Filled", meHFHadF_Plus_BXm1Filled));
572  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFractionMinus_BXm1Filled", meHFHadF_Minus_BXm1Filled));
573  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFractionPlus_BXm2BXm1Filled", meHFHadF_Plus_BXm2BXm1Filled));
574  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFractionMinus_BXm2BXm1Filled", meHFHadF_Minus_BXm2BXm1Filled));
575 
576  meHFEMF_Plus = ibooker.book1D("PfHFEMEtFractionPlus", "HFEMEtFractionPlus", 50, 0, 1);
577  meHFEMF_Minus = ibooker.book1D("PfHFEMEtFractionMinus", "HFEMEtFractionMinus", 50, 0, 1);
578  meHFEMF_Plus_BXm1Empty = ibooker.book1D("PfHFEMEtFractionPlus_BXm1Empty", "HFEMEtFractionPlus prev empty bunch", 50, 0, 1);
579  meHFEMF_Minus_BXm1Empty = ibooker.book1D("PfHFEMEtFractionMinus_BXm1Empty", "HFEMEtFractionMinus prev empty bunch", 50, 0, 1);
580  //meHFEMF_Plus_BXm2BXm1Empty = ibooker.book1D("PfHFEMEtFractionPlus_BXm2BXm1Empty", "HFEMEtFractionPlus prev empty 2 bunches", 50, 0, 1);
581  //meHFEMF_Minus_BXm2BXm1Empty = ibooker.book1D("PfHFEMEtFractionMinus_BXm2BXm1Empty", "HFEMEtFractionMinus prev empty 2 bunches", 50, 0, 1);
582  meHFEMF_Plus_BXm1Filled = ibooker.book1D("PfHFEMEtFractionPlus_BXm1Filled", "HFEMEtFractionPlus prev filled bunch", 50, 0, 1);
583  meHFEMF_Minus_BXm1Filled = ibooker.book1D("PfHFEMEtFractionMinus_BXm1Filled", "HFEMEtFractionMinus prev filled bunch", 50, 0, 1);
584  //meHFEMF_Plus_BXm2BXm1Filled = ibooker.book1D("PfHFEMEtFractionPlus_BXm2BXm1Filled", "HFEMEtFractionPlus prev filled 2 bunches", 50, 0, 1);
585  //meHFEMF_Minus_BXm2BXm1Filled = ibooker.book1D("PfHFEMEtFractionMinus_BXm2BXm1Filled", "HFEMEtFractionMinus prev filled 2 bunches", 50, 0, 1);
586 
587  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFractionPlus", meHFEMF_Plus));
588  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFractionMinus", meHFEMF_Minus));
589  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFractionPlus_BXm1Empty", meHFEMF_Plus_BXm1Empty));
590  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFractionMinus_BXm1Empty", meHFEMF_Minus_BXm1Empty));
591  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFractionPlus_BXm2BXm1Empty", meHFEMF_Plus_BXm2BXm1Empty));
592  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFractionMinus_BXm2BXm1Empty", meHFEMF_Minus_BXm2BXm1Empty));
593  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFractionPlus_BXm1Filled", meHFEMF_Plus_BXm1Filled));
594  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFractionMinus_BXm1Filled", meHFEMF_Minus_BXm1Filled));
595  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFractionPlus_BXm2BXm1Filled", meHFEMF_Plus_BXm2BXm1Filled));
596  //map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFractionMinus_BXm2BXm1Filled", meHFEMF_Minus_BXm2BXm1Filled));
597  /*
598  meMETPhiChargedHadronsBarrel_BXm2BXm1Filled = ibooker.book1D("METPhiChargedHadronsBarrel_BXm2BXm1Filled", "METPhi_PFChargedHadronsBarrel prev two bunches filled", 50, -M_PI,M_PI);
599  meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Filled = ibooker.book1D("METPhiChargedHadronsEndcapPlus_BXm2BXm1Filled", "METPhi_PFChargedHadronsEndcapPlus prev two bunches filled", 50, -M_PI,M_PI);
600  meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Filled = ibooker.book1D("METPhiChargedHadronsEndcapMinus_BXm2BXm1Filled","METPhi_PFChargedHadronsEndcapMinus prev two bunches filled", 50, -M_PI,M_PI);
601  meMETPhiNeutralHadronsBarrel_BXm2BXm1Filled = ibooker.book1D("METPhiNeutralHadronsBarrel_BXm2BXm1Filled", "METPhi_PFNeutralHadronsBarrel prev two bunches filled", 50, -M_PI,M_PI);
602  meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Filled = ibooker.book1D("METPhiNeutralHadronsEndcapPlus_BXm2BXm1Filled", "METPhi_PFNeutralHadronsEndcapPlus prev two bunches filled", 50, -M_PI,M_PI);
603  meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Filled = ibooker.book1D("METPhiNeutralHadronsEndcapMinus_BXm2BXm1Filled","METPhi_PFNeutralHadronsEndcapMinus prev two bunches filled", 50, -M_PI,M_PI);
604  meMETPhiPhotonsBarrel_BXm2BXm1Filled = ibooker.book1D("METPhiPhotonsBarrel_BXm2BXm1Filled", "METPhi_PFPhotonsBarrel prev two bunches filled", 50, -M_PI,M_PI);
605  meMETPhiPhotonsEndcapPlus_BXm2BXm1Filled = ibooker.book1D("METPhiPhotonsEndcapPlus_BXm2BXm1Filled", "METPhi_PFPhotonsEndcapPlus prev two bunches filled", 50, -M_PI,M_PI);
606  meMETPhiPhotonsEndcapMinus_BXm2BXm1Filled = ibooker.book1D("METPhiPhotonsEndcapMinus_BXm2BXm1Filled", "METPhi_PFPhotonsEndcapMinus prev two bunches filled", 50, -M_PI,M_PI);
607  meMETPhiHFHadronsPlus_BXm2BXm1Filled = ibooker.book1D("METPhiHFHadronsPlus_BXm2BXm1Filled", "METPhi_PFHFHadronsPlus prev two bunches filled", 50, -M_PI,M_PI);
608  meMETPhiHFHadronsMinus_BXm2BXm1Filled = ibooker.book1D("METPhiHFHadronsMinus_BXm2BXm1Filled", "METPhi_PFHFHadronsMinus prev two bunches filled", 50, -M_PI,M_PI);
609  meMETPhiHFEGammasPlus_BXm2BXm1Filled = ibooker.book1D("METPhiHFEGammasPlus_BXm2BXm1Filled", "METPhi_PFHFEGammasPlus prev two bunches filled", 50, -M_PI,M_PI);
610  meMETPhiHFEGammasMinus_BXm2BXm1Filled = ibooker.book1D("METPhiHFEGammasMinus_BXm2BXm1Filled", "METPhi_PFHFEGammasMinus prev two bunches filled", 50, -M_PI,M_PI);
611 
612  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsBarrel_BXm2BXm1Filled" ,meMETPhiChargedHadronsBarrel_BXm2BXm1Filled));
613  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsEndcapPlus_BXm2BXm1Filled" ,meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Filled));
614  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsEndcapMinus_BXm2BXm1Filled" ,meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Filled));
615  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsBarrel_BXm2BXm1Filled" ,meMETPhiNeutralHadronsBarrel_BXm2BXm1Filled));
616  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsEndcapPlus_BXm2BXm1Filled" ,meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Filled));
617  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsEndcapMinus_BXm2BXm1Filled" ,meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Filled));
618  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsBarrel_BXm2BXm1Filled" ,meMETPhiPhotonsBarrel_BXm2BXm1Filled));
619  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsEndcapPlus_BXm2BXm1Filled" ,meMETPhiPhotonsEndcapPlus_BXm2BXm1Filled));
620  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsEndcapMinus_BXm2BXm1Filled" ,meMETPhiPhotonsEndcapMinus_BXm2BXm1Filled));
621  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFHadronsPlus_BXm2BXm1Filled" ,meMETPhiHFHadronsPlus_BXm2BXm1Filled));
622  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFHadronsMinus_BXm2BXm1Filled" ,meMETPhiHFHadronsMinus_BXm2BXm1Filled));
623  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFEGammasPlus_BXm2BXm1Filled" ,meMETPhiHFEGammasPlus_BXm2BXm1Filled));
624  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFEGammasMinus_BXm2BXm1Filled" ,meMETPhiHFEGammasMinus_BXm2BXm1Filled));
625 
626  meMETPhiChargedHadronsBarrel_BXm2BXm1Empty = ibooker.book1D("METPhiChargedHadronsBarrel_BXm2BXm1Empty", "METPhi_PFChargedHadronsBarrel prev two bunches empty", 50, -M_PI,M_PI);
627  meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Empty = ibooker.book1D("METPhiChargedHadronsEndcapPlus_BXm2BXm1Empty", "METPhi_PFChargedHadronsEndcapPlus prev two bunches empty", 50, -M_PI,M_PI);
628  meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Empty = ibooker.book1D("METPhiChargedHadronsEndcapMinus_BXm2BXm1Empty","METPhi_PFChargedHadronsEndcapMinus prev two bunches empty", 50, -M_PI,M_PI);
629  meMETPhiNeutralHadronsBarrel_BXm2BXm1Empty = ibooker.book1D("METPhiNeutralHadronsBarrel_BXm2BXm1Empty", "METPhi_PFNeutralHadronsBarrel prev two bunches empty", 50, -M_PI,M_PI);
630  meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Empty = ibooker.book1D("METPhiNeutralHadronsEndcapPlus_BXm2BXm1Empty", "METPhi_PFNeutralHadronsEndcapPlus prev two bunches empty", 50, -M_PI,M_PI);
631  meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Empty = ibooker.book1D("METPhiNeutralHadronsEndcapMinus_BXm2BXm1Empty","METPhi_PFNeutralHadronsEndcapMinus prev two bunches empty", 50, -M_PI,M_PI);
632  meMETPhiPhotonsBarrel_BXm2BXm1Empty = ibooker.book1D("METPhiPhotonsBarrel_BXm2BXm1Empty", "METPhi_PFPhotonsBarrel prev two bunches empty", 50, -M_PI,M_PI);
633  meMETPhiPhotonsEndcapPlus_BXm2BXm1Empty = ibooker.book1D("METPhiPhotonsEndcapPlus_BXm2BXm1Empty", "METPhi_PFPhotonsEndcapPlus prev two bunches empty", 50, -M_PI,M_PI);
634  meMETPhiPhotonsEndcapMinus_BXm2BXm1Empty = ibooker.book1D("METPhiPhotonsEndcapMinus_BXm2BXm1Empty", "METPhi_PFPhotonsEndcapMinus prev two bunches empty", 50, -M_PI,M_PI);
635  meMETPhiHFHadronsPlus_BXm2BXm1Empty = ibooker.book1D("METPhiHFHadronsPlus_BXm2BXm1Empty", "METPhi_PFHFHadronsPlus prev two bunches empty", 50, -M_PI,M_PI);
636  meMETPhiHFHadronsMinus_BXm2BXm1Empty = ibooker.book1D("METPhiHFHadronsMinus_BXm2BXm1Empty", "METPhi_PFHFHadronsMinus prev two bunches empty", 50, -M_PI,M_PI);
637  meMETPhiHFEGammasPlus_BXm2BXm1Empty = ibooker.book1D("METPhiHFEGammasPlus_BXm2BXm1Empty", "METPhi_PFHFEGammasPlus prev two bunches empty", 50, -M_PI,M_PI);
638  meMETPhiHFEGammasMinus_BXm2BXm1Empty = ibooker.book1D("METPhiHFEGammasMinus_BXm2BXm1Empty", "METPhi_PFHFEGammasMinus prev two bunches empty", 50, -M_PI,M_PI);
639 
640  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsBarrel_BXm2BXm1Empty" ,meMETPhiChargedHadronsBarrel_BXm2BXm1Empty));
641  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsEndcapPlus_BXm2BXm1Empty" ,meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Empty));
642  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsEndcapMinus_BXm2BXm1Empty" ,meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Empty));
643  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsBarrel_BXm2BXm1Empty" ,meMETPhiNeutralHadronsBarrel_BXm2BXm1Empty));
644  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsEndcapPlus_BXm2BXm1Empty" ,meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Empty));
645  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsEndcapMinus_BXm2BXm1Empty" ,meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Empty));
646  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsBarrel_BXm2BXm1Empty" ,meMETPhiPhotonsBarrel_BXm2BXm1Empty));
647  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsEndcapPlus_BXm2BXm1Empty" ,meMETPhiPhotonsEndcapPlus_BXm2BXm1Empty));
648  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsEndcapMinus_BXm2BXm1Empty" ,meMETPhiPhotonsEndcapMinus_BXm2BXm1Empty));
649  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFHadronsPlus_BXm2BXm1Empty" ,meMETPhiHFHadronsPlus_BXm2BXm1Empty));
650  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFHadronsMinus_BXm2BXm1Empty" ,meMETPhiHFHadronsMinus_BXm2BXm1Empty));
651  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFEGammasPlus_BXm2BXm1Empty" ,meMETPhiHFEGammasPlus_BXm2BXm1Empty));
652  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFEGammasMinus_BXm2BXm1Empty" ,meMETPhiHFEGammasMinus_BXm2BXm1Empty));
653  */
654  //histos where one previous bunch was empty/filled
655  mePhotonEtFraction_BXm1Empty = ibooker.book1D("PfPhotonEtFraction_BXm1Empty", "photonEtFraction() prev empty bunch", 50, 0, 1);
656  mePhotonEtFraction_BXm1Filled = ibooker.book1D("PfPhotonEtFraction_BXm1Filled", "photonEtFraction() prev filled bunch", 50, 0, 1);
657  meNeutralHadronEtFraction_BXm1Empty = ibooker.book1D("PfNeutralHadronEtFraction_BXm1Empty", "neutralHadronEtFraction() prev empty bunch", 50, 0, 1);
658  meNeutralHadronEtFraction_BXm1Filled = ibooker.book1D("PfNeutralHadronEtFraction_BXm1Filled", "neutralHadronEtFraction() prev filled bunch", 50, 0, 1);
659  meChargedHadronEtFraction_BXm1Empty = ibooker.book1D("PfChargedHadronEtFraction_BXm1Empty", "chargedHadronEtFraction() prev empty bunch", 50, 0, 1);
660  meChargedHadronEtFraction_BXm1Filled = ibooker.book1D("PfChargedHadronEtFraction_BXm1Filled", "chargedHadronEtFraction() prev filled bunch", 50, 0, 1);
661  meMET_BXm1Empty = ibooker.book1D("MET_BXm1Empty", "MET prev empty bunch", 200, 0, 1000);
662  meMET_BXm1Filled = ibooker.book1D("MET_BXm1Filled", "MET prev filled bunch", 200, 0, 1000);
663  meSumET_BXm1Empty = ibooker.book1D("SumET_BXm1Empty", "SumET prev empty bunch", 400, 0, 4000);
664  meSumET_BXm1Filled = ibooker.book1D("SumET_BXm1Filled", "SumET prev filled bunch", 400, 0, 4000);
665 
666  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFraction_BXm1Empty" ,mePhotonEtFraction_BXm1Empty));
667  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFraction_BXm1Filled" ,mePhotonEtFraction_BXm1Filled));
668  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFraction_BXm1Empty" ,meNeutralHadronEtFraction_BXm1Empty));
669  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralEtFraction_BXm1Filled" ,meNeutralHadronEtFraction_BXm1Filled));
670  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFraction_BXm1Empty" ,meChargedHadronEtFraction_BXm1Empty));
671  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedEtFraction_BXm1Filled" ,meChargedHadronEtFraction_BXm1Filled));
672  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_BXm1Empty" ,meMET_BXm1Empty));
673  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MET_BXm1Filled" ,meMET_BXm1Filled));
674  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"SumET_BXm1Empty" ,meSumET_BXm1Empty));
675  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"SumET_BXm1Filled",meSumET_BXm1Filled));
676 
677  meMETPhiChargedHadronsBarrel_BXm1Filled = ibooker.book1D("METPhiChargedHadronsBarrel_BXm1Filled", "METPhi_PFChargedHadronsBarrel prev bunch filled", 50, -M_PI,M_PI);
678  meMETPhiChargedHadronsEndcapPlus_BXm1Filled = ibooker.book1D("METPhiChargedHadronsEndcapPlus_BXm1Filled", "METPhi_PFChargedHadronsEndcapPlus prev bunch filled", 50, -M_PI,M_PI);
679  meMETPhiChargedHadronsEndcapMinus_BXm1Filled = ibooker.book1D("METPhiChargedHadronsEndcapMinus_BXm1Filled","METPhi_PFChargedHadronsEndcapMinus prev bunch filled", 50, -M_PI,M_PI);
680  meMETPhiNeutralHadronsBarrel_BXm1Filled = ibooker.book1D("METPhiNeutralHadronsBarrel_BXm1Filled", "METPhi_PFNeutralHadronsBarrel prev bunch filled", 50, -M_PI,M_PI);
681  meMETPhiNeutralHadronsEndcapPlus_BXm1Filled = ibooker.book1D("METPhiNeutralHadronsEndcapPlus_BXm1Filled", "METPhi_PFNeutralHadronsEndcapPlus prev bunch filled", 50, -M_PI,M_PI);
682  meMETPhiNeutralHadronsEndcapMinus_BXm1Filled = ibooker.book1D("METPhiNeutralHadronsEndcapMinus_BXm1Filled","METPhi_PFNeutralHadronsEndcapMinus prev bunch filled", 50, -M_PI,M_PI);
683  meMETPhiPhotonsBarrel_BXm1Filled = ibooker.book1D("METPhiPhotonsBarrel_BXm1Filled", "METPhi_PFPhotonsBarrel prev bunch filled", 50, -M_PI,M_PI);
684  meMETPhiPhotonsEndcapPlus_BXm1Filled = ibooker.book1D("METPhiPhotonsEndcapPlus_BXm1Filled", "METPhi_PFPhotonsEndcapPlus prev bunch filled", 50, -M_PI,M_PI);
685  meMETPhiPhotonsEndcapMinus_BXm1Filled = ibooker.book1D("METPhiPhotonsEndcapMinus_BXm1Filled", "METPhi_PFPhotonsEndcapMinus prev bunch filled", 50, -M_PI,M_PI);
686  meMETPhiHFHadronsPlus_BXm1Filled = ibooker.book1D("METPhiHFHadronsPlus_BXm1Filled", "METPhi_PFHFHadronsPlus prev bunch filled", 50, -M_PI,M_PI);
687  meMETPhiHFHadronsMinus_BXm1Filled = ibooker.book1D("METPhiHFHadronsMinus_BXm1Filled", "METPhi_PFHFHadronsMinus prev bunch filled", 50, -M_PI,M_PI);
688  meMETPhiHFEGammasPlus_BXm1Filled = ibooker.book1D("METPhiHFEGammasPlus_BXm1Filled", "METPhi_PFHFEGammasPlus prev bunch filled", 50, -M_PI,M_PI);
689  meMETPhiHFEGammasMinus_BXm1Filled = ibooker.book1D("METPhiHFEGammasMinus_BXm1Filled", "METPhi_PFHFEGammasMinus prev bunch filled", 50, -M_PI,M_PI);
690 
691  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsBarrel_BXm1Filled" ,meMETPhiChargedHadronsBarrel_BXm1Filled));
692  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsEndcapPlus_BXm1Filled" ,meMETPhiChargedHadronsEndcapPlus_BXm1Filled));
693  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsEndcapMinus_BXm1Filled" ,meMETPhiChargedHadronsEndcapMinus_BXm1Filled));
694  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsBarrel_BXm1Filled" ,meMETPhiNeutralHadronsBarrel_BXm1Filled));
695  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsEndcapPlus_BXm1Filled" ,meMETPhiNeutralHadronsEndcapPlus_BXm1Filled));
696  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsEndcapMinus_BXm1Filled" ,meMETPhiNeutralHadronsEndcapMinus_BXm1Filled));
697  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsBarrel_BXm1Filled" ,meMETPhiPhotonsBarrel_BXm1Filled));
698  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsEndcapPlus_BXm1Filled" ,meMETPhiPhotonsEndcapPlus_BXm1Filled));
699  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsEndcapMinus_BXm1Filled" ,meMETPhiPhotonsEndcapMinus_BXm1Filled));
700  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFHadronsPlus_BXm1Filled" ,meMETPhiHFHadronsPlus_BXm1Filled));
701  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFHadronsMinus_BXm1Filled" ,meMETPhiHFHadronsMinus_BXm1Filled));
702  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFEGammasPlus_BXm1Filled" ,meMETPhiHFEGammasPlus_BXm1Filled));
703  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFEGammasMinus_BXm1Filled" ,meMETPhiHFEGammasMinus_BXm1Filled));
704 
705  meMETPhiChargedHadronsBarrel_BXm1Empty = ibooker.book1D("METPhiChargedHadronsBarrel_BXm1Empty", "METPhi_PFChargedHadronsBarrel prev bunch empty", 50, -M_PI,M_PI);
706  meMETPhiChargedHadronsEndcapPlus_BXm1Empty = ibooker.book1D("METPhiChargedHadronsEndcapPlus_BXm1Empty", "METPhi_PFChargedHadronsEndcapPlus prev bunch empty", 50, -M_PI,M_PI);
707  meMETPhiChargedHadronsEndcapMinus_BXm1Empty = ibooker.book1D("METPhiChargedHadronsEndcapMinus_BXm1Empty","METPhi_PFChargedHadronsEndcapMinus prev bunch empty", 50, -M_PI,M_PI);
708  meMETPhiNeutralHadronsBarrel_BXm1Empty = ibooker.book1D("METPhiNeutralHadronsBarrel_BXm1Empty", "METPhi_PFNeutralHadronsBarrel prev bunch empty", 50, -M_PI,M_PI);
709  meMETPhiNeutralHadronsEndcapPlus_BXm1Empty = ibooker.book1D("METPhiNeutralHadronsEndcapPlus_BXm1Empty", "METPhi_PFNeutralHadronsEndcapPlus prev bunch empty", 50, -M_PI,M_PI);
710  meMETPhiNeutralHadronsEndcapMinus_BXm1Empty = ibooker.book1D("METPhiNeutralHadronsEndcapMinus_BXm1Empty","METPhi_PFNeutralHadronsEndcapMinus prev bunch empty", 50, -M_PI,M_PI);
711  meMETPhiPhotonsBarrel_BXm1Empty = ibooker.book1D("METPhiPhotonsBarrel_BXm1Empty", "METPhi_PFPhotonsBarrel prev bunch empty", 50, -M_PI,M_PI);
712  meMETPhiPhotonsEndcapPlus_BXm1Empty = ibooker.book1D("METPhiPhotonsEndcapPlus_BXm1Empty", "METPhi_PFPhotonsEndcapPlus prev bunch empty", 50, -M_PI,M_PI);
713  meMETPhiPhotonsEndcapMinus_BXm1Empty = ibooker.book1D("METPhiPhotonsEndcapMinus_BXm1Empty", "METPhi_PFPhotonsEndcapMinus prev bunch empty", 50, -M_PI,M_PI);
714  meMETPhiHFHadronsPlus_BXm1Empty = ibooker.book1D("METPhiHFHadronsPlus_BXm1Empty", "METPhi_PFHFHadronsPlus prev bunch empty", 50, -M_PI,M_PI);
715  meMETPhiHFHadronsMinus_BXm1Empty = ibooker.book1D("METPhiHFHadronsMinus_BXm1Empty", "METPhi_PFHFHadronsMinus prev bunch empty", 50, -M_PI,M_PI);
716  meMETPhiHFEGammasPlus_BXm1Empty = ibooker.book1D("METPhiHFEGammasPlus_BXm1Empty", "METPhi_PFHFEGammasPlus prev bunch empty", 50, -M_PI,M_PI);
717  meMETPhiHFEGammasMinus_BXm1Empty = ibooker.book1D("METPhiHFEGammasMinus_BXm1Empty", "METPhi_PFHFEGammasMinus prev bunch empty", 50, -M_PI,M_PI);
718 
719  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsBarrel_BXm1Empty" ,meMETPhiChargedHadronsBarrel_BXm1Empty));
720  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsEndcapPlus_BXm1Empty" ,meMETPhiChargedHadronsEndcapPlus_BXm1Empty));
721  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsEndcapMinus_BXm1Empty" ,meMETPhiChargedHadronsEndcapMinus_BXm1Empty));
722  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsBarrel_BXm1Empty" ,meMETPhiNeutralHadronsBarrel_BXm1Empty));
723  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsEndcapPlus_BXm1Empty" ,meMETPhiNeutralHadronsEndcapPlus_BXm1Empty));
724  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsEndcapMinus_BXm1Empty" ,meMETPhiNeutralHadronsEndcapMinus_BXm1Empty));
725  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsBarrel_BXm1Empty" ,meMETPhiPhotonsBarrel_BXm1Empty));
726  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsEndcapPlus_BXm1Empty" ,meMETPhiPhotonsEndcapPlus_BXm1Empty));
727  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsEndcapMinus_BXm1Empty" ,meMETPhiPhotonsEndcapMinus_BXm1Empty));
728  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFHadronsPlus_BXm1Empty" ,meMETPhiHFHadronsPlus_BXm1Empty));
729  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFHadronsMinus_BXm1Empty" ,meMETPhiHFHadronsMinus_BXm1Empty));
730  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFEGammasPlus_BXm1Empty" ,meMETPhiHFEGammasPlus_BXm1Empty));
731  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFEGammasMinus_BXm1Empty" ,meMETPhiHFEGammasMinus_BXm1Empty));
732 
733  meMETPhiChargedHadronsBarrel = ibooker.book1D("METPhiChargedHadronsBarrel", "METPhi_PFChargedHadronsBarrel", 50, -M_PI,M_PI);
734  meMETPhiChargedHadronsEndcapPlus = ibooker.book1D("METPhiChargedHadronsEndcapPlus", "METPhi_PFChargedHadronsEndcapPlus", 50, -M_PI,M_PI);
735  meMETPhiChargedHadronsEndcapMinus = ibooker.book1D("METPhiChargedHadronsEndcapMinus","METPhi_PFChargedHadronsEndcapMinus", 50, -M_PI,M_PI);
736  meMETPhiNeutralHadronsBarrel = ibooker.book1D("METPhiNeutralHadronsBarrel", "METPhi_PFNeutralHadronsBarrel", 50, -M_PI,M_PI);
737  meMETPhiNeutralHadronsEndcapPlus = ibooker.book1D("METPhiNeutralHadronsEndcapPlus", "METPhi_PFNeutralHadronsEndcapPlus", 50, -M_PI,M_PI);
738  meMETPhiNeutralHadronsEndcapMinus = ibooker.book1D("METPhiNeutralHadronsEndcapMinus","METPhi_PFNeutralHadronsEndcapMinus", 50, -M_PI,M_PI);
739  meMETPhiPhotonsBarrel = ibooker.book1D("METPhiPhotonsBarrel", "METPhi_PFPhotonsBarrel", 50, -M_PI,M_PI);
740  meMETPhiPhotonsEndcapPlus = ibooker.book1D("METPhiPhotonsEndcapPlus", "METPhi_PFPhotonsEndcapPlus", 50, -M_PI,M_PI);
741  meMETPhiPhotonsEndcapMinus = ibooker.book1D("METPhiPhotonsEndcapMinus", "METPhi_PFPhotonsEndcapMinus", 50, -M_PI,M_PI);
742  meMETPhiHFHadronsPlus = ibooker.book1D("METPhiHFHadronsPlus", "METPhi_PFHFHadronsPlus", 50, -M_PI,M_PI);
743  meMETPhiHFHadronsMinus = ibooker.book1D("METPhiHFHadronsMinus", "METPhi_PFHFHadronsMinus", 50, -M_PI,M_PI);
744  meMETPhiHFEGammasPlus = ibooker.book1D("METPhiHFEGammasPlus", "METPhi_PFHFEGammasPlus", 50, -M_PI,M_PI);
745  meMETPhiHFEGammasMinus = ibooker.book1D("METPhiHFEGammasMinus", "METPhi_PFHFEGammasMinus", 50, -M_PI,M_PI);
746 
747  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsBarrel" ,meMETPhiChargedHadronsBarrel));
748  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsEndcapPlus" ,meMETPhiChargedHadronsEndcapPlus));
749  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiChargedHadronsEndcapMinus" ,meMETPhiChargedHadronsEndcapMinus));
750  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsBarrel" ,meMETPhiNeutralHadronsBarrel));
751  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsEndcapPlus" ,meMETPhiNeutralHadronsEndcapPlus));
752  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiNeutralHadronsEndcapMinus" ,meMETPhiNeutralHadronsEndcapMinus));
753  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsBarrel" ,meMETPhiPhotonsBarrel));
754  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsEndcapPlus" ,meMETPhiPhotonsEndcapPlus));
755  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiPhotonsEndcapMinus" ,meMETPhiPhotonsEndcapMinus));
756  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFHadronsPlus" ,meMETPhiHFHadronsPlus));
757  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFHadronsMinus" ,meMETPhiHFHadronsMinus));
758  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFEGammasPlus" ,meMETPhiHFEGammasPlus));
759  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METPhiHFEGammasMinus" ,meMETPhiHFEGammasMinus));
760  }
761 
762  if(fillPFCandPlots && fillCandidateMap_histos){
763  if(!etaMinPFCand_.empty()){
764  etaMinPFCand_.clear();
765  etaMaxPFCand_.clear();
766  typePFCand_.clear();
767  nbinsPFCand_.clear();
768  countsPFCand_.clear();
769  MExPFCand_.clear();
770  MEyPFCand_.clear();
771  profilePFCand_x_.clear();
772  profilePFCand_y_.clear();
773  occupancyPFCand_.clear();
774  ptPFCand_.clear();
775  multiplicityPFCand_.clear();
776  profilePFCand_x_name_.clear();
777  profilePFCand_y_name_.clear();
778  occupancyPFCand_name_.clear();
779  ptPFCand_name_.clear();
780  multiplicityPFCand_name_.clear();
781  }
782  for (std::vector<edm::ParameterSet>::const_iterator v = diagnosticsParameters_.begin(); v!=diagnosticsParameters_.end(); v++) {
783  int etaNBinsPFCand = v->getParameter<int>("etaNBins");
784  double etaMinPFCand = v->getParameter<double>("etaMin");
785  double etaMaxPFCand = v->getParameter<double>("etaMax");
786  int phiNBinsPFCand = v->getParameter<int>("phiNBins");
787  double phiMinPFCand = v->getParameter<double>("phiMin");
788  double phiMaxPFCand = v->getParameter<double>("phiMax");
789  int nMinPFCand = v->getParameter<int>("nMin");
790  int nMaxPFCand = v->getParameter<int>("nMax");
791  int nbinsPFCand = v->getParameter<double>("nbins");
792 
793  // etaNBins_.push_back(etaNBins);
794  etaMinPFCand_.push_back(etaMinPFCand);
795  etaMaxPFCand_.push_back(etaMaxPFCand);
796  nbinsPFCand_.push_back(nbinsPFCand);
797  typePFCand_.push_back(v->getParameter<int>("type"));
798  countsPFCand_.push_back(0);
799  MExPFCand_.push_back(0.);
800  MEyPFCand_.push_back(0.);
801 
802  profilePFCand_x_.push_back(ibooker.bookProfile(std::string(v->getParameter<std::string>("name")).append("_Px_").c_str(), std::string(v->getParameter<std::string>("name"))+"Px", nbinsPFCand, nMinPFCand, nMaxPFCand, -300,300));
803  profilePFCand_x_name_.push_back(std::string(v->getParameter<std::string>("name")).append("_Px_").c_str());
804  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+profilePFCand_x_name_[profilePFCand_x_name_.size()-1], profilePFCand_x_[profilePFCand_x_.size()-1]));
805  profilePFCand_y_.push_back(ibooker.bookProfile(std::string(v->getParameter<std::string>("name")).append("_Py_").c_str(), std::string(v->getParameter<std::string>("name"))+"Py", nbinsPFCand, nMinPFCand, nMaxPFCand, -300,300));
806  profilePFCand_y_name_.push_back(std::string(v->getParameter<std::string>("name")).append("_Py_").c_str());
807  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+profilePFCand_y_name_[profilePFCand_y_name_.size()-1], profilePFCand_y_[profilePFCand_y_.size()-1]));
808  multiplicityPFCand_.push_back(ibooker.book1D(std::string(v->getParameter<std::string>("name")).append("_multiplicity_").c_str(),std::string(v->getParameter<std::string>("name"))+"multiplicity", nbinsPFCand, nMinPFCand, nMaxPFCand));
809  multiplicityPFCand_name_.push_back(std::string(v->getParameter<std::string>("name")).append("_multiplicity_").c_str());
810  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+ multiplicityPFCand_name_[multiplicityPFCand_name_.size()-1], multiplicityPFCand_[multiplicityPFCand_.size()-1]));
811 
812  //push back names first, we need to create histograms with the name and fill it for endcap plots later
813  occupancyPFCand_name_.push_back(std::string(v->getParameter<std::string>("name")).append("_occupancy_").c_str());
814 
815  ptPFCand_name_.push_back(std::string(v->getParameter<std::string>("name")).append("_pt_").c_str());
816  //special booking for endcap plots, merge plots for eminus and eplus into one plot, using variable binning
817  //barrel plots have eta-boundaries on minus and plus side
818  //parameters start on minus side
819  if(etaMinPFCand*etaMaxPFCand<0){//barrel plots, plot only in barrel region
820  occupancyPFCand_.push_back(ibooker.book2D(std::string(v->getParameter<std::string>("name")).append("_occupancy_").c_str(),std::string(v->getParameter<std::string>("name"))+"occupancy", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
821  ptPFCand_.push_back(ibooker.book2D(std::string(v->getParameter<std::string>("name")).append("_pt_").c_str(),std::string(v->getParameter<std::string>("name"))+"pt", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
822  }else{//endcap or forward plots,
823  const int nbins_eta_endcap=2*(etaNBinsPFCand+1);
824  double eta_limits_endcap[nbins_eta_endcap];
825  for(int i=0;i<nbins_eta_endcap;i++){
826  if(i<(etaNBinsPFCand+1)){
827  eta_limits_endcap[i]=etaMinPFCand+i*(etaMaxPFCand-etaMinPFCand)/(double)etaNBinsPFCand;
828  }else{
829  eta_limits_endcap[i]= -etaMaxPFCand +(i- (etaNBinsPFCand+1) )*(etaMaxPFCand-etaMinPFCand)/(double)etaNBinsPFCand;
830  }
831  }
832  TH2F* hist_temp_occup = new TH2F((occupancyPFCand_name_[occupancyPFCand_name_.size()-1]).c_str(),"occupancy",nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
833  occupancyPFCand_.push_back(ibooker.book2D(occupancyPFCand_name_[occupancyPFCand_name_.size()-1],hist_temp_occup));
834  TH2F* hist_temp_pt = new TH2F((ptPFCand_name_[ptPFCand_name_.size()-1]).c_str(),"pt",nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
835  ptPFCand_.push_back(ibooker.book2D(ptPFCand_name_[ptPFCand_name_.size()-1], hist_temp_pt));
836  }
837 
838  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+ occupancyPFCand_name_[occupancyPFCand_name_.size()-1], occupancyPFCand_[occupancyPFCand_.size()-1]));
839  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+ ptPFCand_name_[ptPFCand_name_.size()-1], ptPFCand_[ptPFCand_.size()-1]));
840  }
841 
842  mProfileIsoPFChHad_TrackOccupancy=ibooker.book2D("IsoPfChHad_Track_profile","Isolated PFChHadron Tracker_occupancy", 108, -2.7, 2.7, 160, -M_PI,M_PI);
843  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"IsoPfChHad_Track_profile" ,mProfileIsoPFChHad_TrackOccupancy));
844  mProfileIsoPFChHad_TrackPt=ibooker.book2D("IsoPfChHad_TrackPt","Isolated PFChHadron TrackPt", 108, -2.7, 2.7, 160, -M_PI,M_PI);
845  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"IsoPfChHad_TrackPt" ,mProfileIsoPFChHad_TrackPt));
846 
847 
848  mProfileIsoPFChHad_EcalOccupancyCentral = ibooker.book2D("IsoPfChHad_ECAL_profile_central","IsolatedPFChHa ECAL occupancy (Barrel)", 180, -1.479, 1.479, 125, -M_PI,M_PI);
849  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"IsoPfChHad_ECAL_profile_central" ,mProfileIsoPFChHad_EcalOccupancyCentral));
850  mProfileIsoPFChHad_EMPtCentral=ibooker.book2D("IsoPfChHad_EMPt_central","Isolated PFChHadron HadPt_central", 180, -1.479, 1.479, 360, -M_PI,M_PI);
851  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"IsoPfChHad_EMPt_central" ,mProfileIsoPFChHad_EMPtCentral));
852 
853  mProfileIsoPFChHad_EcalOccupancyEndcap = ibooker.book2D("IsoPfChHad_ECAL_profile_endcap","IsolatedPFChHa ECAL occupancy (Endcap)", 110, -2.75, 2.75, 125, -M_PI,M_PI);
854  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"IsoPfChHad_ECAL_profile_endcap" ,mProfileIsoPFChHad_EcalOccupancyEndcap));
855  mProfileIsoPFChHad_EMPtEndcap=ibooker.book2D("IsoPfChHad_EMPt_endcap","Isolated PFChHadron EMPt_endcap", 110, -2.75, 2.75, 125, -M_PI,M_PI);
856  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"IsoPfChHad_EMPt_endcap" ,mProfileIsoPFChHad_EMPtEndcap));
857 
858  const int nbins_eta=16;
859 
860  double eta_limits[nbins_eta]={-2.650,-2.500,-2.322,-2.172,-2.043,-1.930,-1.830,-1.740,1.740,1.830,1.930,2.043,2.172,2.3122,2.500,2.650};
861 
862  TH2F* hist_temp_HCAL =new TH2F("IsoPfChHad_HCAL_profile_endcap","IsolatedPFChHa HCAL occupancy (outer endcap)",nbins_eta-1,eta_limits, 36, -M_PI,M_PI);
863  TH2F* hist_tempPt_HCAL=(TH2F*)hist_temp_HCAL->Clone("Isolated PFCHHadron HadPt (outer endcap)");
864 
865  mProfileIsoPFChHad_HcalOccupancyCentral = ibooker.book2D("IsoPfChHad_HCAL_profile_central","IsolatedPFChHa HCAL occupancy (Central Part)", 40, -1.740, 1.740, 72, -M_PI,M_PI);
866  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"IsoPfChHad_HCAL_profile_central" ,mProfileIsoPFChHad_HcalOccupancyCentral));
867  mProfileIsoPFChHad_HadPtCentral=ibooker.book2D("IsoPfChHad_HadPt_central","Isolated PFChHadron HadPt_central", 40, -1.740, 1.740, 72, -M_PI,M_PI);
868  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"IsoPfChHad_HadPt_central" ,mProfileIsoPFChHad_HadPtCentral));
869 
870  mProfileIsoPFChHad_HcalOccupancyEndcap = ibooker.book2D("IsoPfChHad_HCAL_profile_endcap",hist_temp_HCAL);
871  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"IsoPfChHad_HCAL_profile_endcap" ,mProfileIsoPFChHad_HcalOccupancyEndcap));
872  mProfileIsoPFChHad_HadPtEndcap=ibooker.book2D("IsoPfChHad_HadPt_endcap",hist_tempPt_HCAL);
873  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"IsoPfChHad_HadPt_endcap" ,mProfileIsoPFChHad_HadPtEndcap));
874  }
875  }
876  if(isMiniAODMet_){
877  if(fillPFCandPlots && fillCandidateMap_histos){//first bool internal checks for subdirectory filling, second bool given in cfg file, checks that we fill maps only in one module in total
878  if(!etaMinPFCand_.empty()){
879  etaMinPFCand_.clear();
880  etaMaxPFCand_.clear();
881  typePFCand_.clear();
882  nbinsPFCand_.clear();
883  countsPFCand_.clear();
884  profilePFCand_x_.clear();
885  profilePFCand_y_.clear();
886  occupancyPFCand_.clear();
887  ptPFCand_.clear();
888  occupancyPFCand_.clear();
889  ptPFCand_.clear();
894  multiplicityPFCand_name_.clear();
895  }
896  for (std::vector<edm::ParameterSet>::const_iterator v = diagnosticsParameters_.begin(); v!=diagnosticsParameters_.end(); v++) {
897  int etaNBinsPFCand = v->getParameter<int>("etaNBins");
898  double etaMinPFCand = v->getParameter<double>("etaMin");
899  double etaMaxPFCand = v->getParameter<double>("etaMax");
900  int phiNBinsPFCand = v->getParameter<int>("phiNBins");
901  double phiMinPFCand = v->getParameter<double>("phiMin");
902  double phiMaxPFCand = v->getParameter<double>("phiMax");
903  int nbinsPFCand = v->getParameter<double>("nbins");
904 
905  // etaNBins_.push_back(etaNBins);
906  etaMinPFCand_.push_back(etaMinPFCand);
907  etaMaxPFCand_.push_back(etaMaxPFCand);
908  nbinsPFCand_.push_back(nbinsPFCand);
909  typePFCand_.push_back(v->getParameter<int>("type"));
910  countsPFCand_.push_back(0);
911  MExPFCand_.push_back(0.);
912  MEyPFCand_.push_back(0.);
913 
914  //push back names first, we need to create histograms with the name and fill it for endcap plots later
915  occupancyPFCand_name_.push_back(std::string(v->getParameter<std::string>("name")).append("_occupancy_").c_str());
916  ptPFCand_name_.push_back(std::string(v->getParameter<std::string>("name")).append("_pt_").c_str());
917  //push back names first, we need to create histograms with the name and fill it for endcap plots later
918  occupancyPFCand_name_puppiNolepWeight_.push_back(std::string(v->getParameter<std::string>("name")).append("_occupancy_puppiNolepWeight_").c_str());
919  ptPFCand_name_puppiNolepWeight_.push_back(std::string(v->getParameter<std::string>("name")).append("_pt_puppiNolepWeight_").c_str());
920  //special booking for endcap plots, merge plots for eminus and eplus into one plot, using variable binning
921  //barrel plots have eta-boundaries on minus and plus side
922  //parameters start on minus side
923  if(etaMinPFCand*etaMaxPFCand<0){//barrel plots, plot only in barrel region
924  occupancyPFCand_.push_back(ibooker.book2D(std::string(v->getParameter<std::string>("name")).append("_occupancy_").c_str(),std::string(v->getParameter<std::string>("name"))+"occupancy", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
925  ptPFCand_.push_back(ibooker.book2D(std::string(v->getParameter<std::string>("name")).append("_pt_").c_str(),std::string(v->getParameter<std::string>("name"))+"pt", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
926  occupancyPFCand_puppiNolepWeight_.push_back(ibooker.book2D(std::string(v->getParameter<std::string>("name")).append("_occupancy_puppiNolepWeight_").c_str(),std::string(v->getParameter<std::string>("name"))+"occupancy_puppiNolepWeight", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
927  ptPFCand_puppiNolepWeight_.push_back(ibooker.book2D(std::string(v->getParameter<std::string>("name")).append("_pt_puppiNolepWeight_").c_str(),std::string(v->getParameter<std::string>("name"))+"pt_puppiNolepWeight", etaNBinsPFCand, etaMinPFCand, etaMaxPFCand, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand));
928  }else{//endcap or forward plots,
929  const int nbins_eta_endcap=2*(etaNBinsPFCand+1);
930  double eta_limits_endcap[nbins_eta_endcap];
931  for(int i=0;i<nbins_eta_endcap;i++){
932  if(i<(etaNBinsPFCand+1)){
933  eta_limits_endcap[i]=etaMinPFCand+i*(etaMaxPFCand-etaMinPFCand)/(double)etaNBinsPFCand;
934  }else{
935  eta_limits_endcap[i]= -etaMaxPFCand +(i- (etaNBinsPFCand+1) )*(etaMaxPFCand-etaMinPFCand)/(double)etaNBinsPFCand;
936  }
937  }
938  TH2F* hist_temp_occup = new TH2F((occupancyPFCand_name_[occupancyPFCand_name_.size()-1]).c_str(),"occupancy",nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
939  occupancyPFCand_.push_back(ibooker.book2D(occupancyPFCand_name_[occupancyPFCand_name_.size()-1],hist_temp_occup));
940  TH2F* hist_temp_pt = new TH2F((ptPFCand_name_[ptPFCand_name_.size()-1]).c_str(),"pt",nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
941  ptPFCand_.push_back(ibooker.book2D(ptPFCand_name_[ptPFCand_name_.size()-1], hist_temp_pt));
942  TH2F* hist_temp_occup_puppiNolepWeight = new TH2F((occupancyPFCand_name_puppiNolepWeight_[occupancyPFCand_name_puppiNolepWeight_.size()-1]).c_str(),"occupancy_puppiNolepWeight",nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
944  TH2F* hist_temp_pt_puppiNolepWeight = new TH2F((ptPFCand_name_puppiNolepWeight_[ptPFCand_name_puppiNolepWeight_.size()-1]).c_str(),"pt_puppiNolepWeight",nbins_eta_endcap-1, eta_limits_endcap, phiNBinsPFCand, phiMinPFCand, phiMaxPFCand);
945  ptPFCand_puppiNolepWeight_.push_back(ibooker.book2D(ptPFCand_name_puppiNolepWeight_[ptPFCand_name_puppiNolepWeight_.size()-1], hist_temp_pt_puppiNolepWeight));
946  }
948  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+ ptPFCand_name_puppiNolepWeight_[ptPFCand_name_puppiNolepWeight_.size()-1], ptPFCand_puppiNolepWeight_[ptPFCand_puppiNolepWeight_.size()-1]));
949  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+ occupancyPFCand_name_[occupancyPFCand_name_.size()-1], occupancyPFCand_[occupancyPFCand_.size()-1]));
950  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+ ptPFCand_name_[ptPFCand_name_.size()-1], ptPFCand_[ptPFCand_.size()-1]));
951  }
952  }
953  }
954 
955  if(isPFMet_ || isMiniAODMet_){
956  mePhotonEtFraction = ibooker.book1D("PfPhotonEtFraction", "photonEtFraction()", 50, 0, 1);
957  meNeutralHadronEtFraction = ibooker.book1D("PfNeutralHadronEtFraction", "neutralHadronEtFraction()", 50, 0, 1);
958  meChargedHadronEtFraction = ibooker.book1D("PfChargedHadronEtFraction", "chargedHadronEtFraction()", 50, 0, 1);
959  meHFHadronEtFraction = ibooker.book1D("PfHFHadronEtFraction", "HFHadronEtFraction()", 50, 0, 1);
960  meHFEMEtFraction = ibooker.book1D("PfHFEMEtFraction", "HFEMEtFraction()", 50, 0, 1);
961 
962  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFraction" ,mePhotonEtFraction));
963  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFraction",meNeutralHadronEtFraction));
964  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFraction",meChargedHadronEtFraction));
965  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFraction" ,meHFHadronEtFraction));
966  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFraction" ,meHFEMEtFraction));
967 
968  mePhotonEtFraction_profile = ibooker.bookProfile("PfPhotonEtFraction_profile", "photonEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
969  meNeutralHadronEtFraction_profile = ibooker.bookProfile("PfNeutralHadronEtFraction_profile", "neutralHadronEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
970  meChargedHadronEtFraction_profile = ibooker.bookProfile("PfChargedHadronEtFraction_profile", "chargedHadronEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
971  meHFHadronEtFraction_profile = ibooker.bookProfile("PfHFHadronEtFraction_profile", "HFHadronEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
972  meHFEMEtFraction_profile = ibooker.bookProfile("PfHFEMEtFraction_profile", "HFEMEtFraction()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1);
978 
979  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEtFraction_profile" ,mePhotonEtFraction_profile));
980  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEtFraction_profile" ,meNeutralHadronEtFraction_profile));
981  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEtFraction_profile" ,meChargedHadronEtFraction_profile));
982  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEtFraction_profile" ,meHFHadronEtFraction_profile));
983  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEtFraction_profile" ,meHFEMEtFraction_profile));
984 
985  mePhotonEt = ibooker.book1D("PfPhotonEt", "photonEt()", 50, 0, 1000);
986  meNeutralHadronEt = ibooker.book1D("PfNeutralHadronEt", "neutralHadronEt()", 50, 0, 1000);
987  meElectronEt = ibooker.book1D("PfElectronEt", "electronEt()", 50, 0, 100);
988  meChargedHadronEt = ibooker.book1D("PfChargedHadronEt", "chargedHadronEt()", 50, 0, 2000);
989  meMuonEt = ibooker.book1D("PfMuonEt", "muonEt()", 50, 0, 100);
990  meHFHadronEt = ibooker.book1D("PfHFHadronEt", "HFHadronEt()", 50, 0, 2000);
991  meHFEMEt = ibooker.book1D("PfHFEMEt", "HFEMEt()", 50, 0, 1000);
992 
993  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEt" ,mePhotonEt));
994  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEt" ,meNeutralHadronEt));
995  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfElectronEt" ,meElectronEt));
996  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEt" ,meChargedHadronEt));
997  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfMuonEt" ,meMuonEt));
998  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEt" ,meHFHadronEt));
999  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEt" ,meHFEMEt));
1000 
1001  mePhotonEt_profile = ibooker.bookProfile("PfPhotonEt_profile", "photonEt()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1000);
1002  meNeutralHadronEt_profile = ibooker.bookProfile("PfNeutralHadronEt_profile", "neutralHadronEt()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1000);
1003  meChargedHadronEt_profile = ibooker.bookProfile("PfChargedHadronEt_profile", "chargedHadronEt()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1000);
1004  meHFHadronEt_profile = ibooker.bookProfile("PfHFHadronEt_profile", "HFHadronEt()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1000);
1005  meHFEMEt_profile = ibooker.bookProfile("PfHFEMEt_profile", "HFEMEt()", nbinsPV_, nPVMin_, nPVMax_, 50, 0, 1000);
1006 
1007  mePhotonEt_profile ->setAxisTitle("nvtx", 1);
1010  meHFHadronEt_profile ->setAxisTitle("nvtx", 1);
1011  meHFEMEt_profile ->setAxisTitle("nvtx", 1);
1012 
1013  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfPhotonEt_profile" ,mePhotonEt_profile));
1014  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfNeutralHadronEt_profile" ,meNeutralHadronEt_profile));
1015  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfChargedHadronEt_profile" ,meChargedHadronEt_profile));
1016  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFHadronEt_profile" ,meHFHadronEt_profile));
1017  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"PfHFEMEt_profile" ,meHFEMEt_profile));
1018  }
1019 
1020  if (isCaloMet_){
1021  if (fill_met_high_level_histo){//now configurable in python file
1022  hMExLS = ibooker.book2D("MExLS","MEx_LS",200,-200,200,250,0.,2500.);
1023  hMExLS->setAxisTitle("MEx [GeV]",1);
1024  hMExLS->setAxisTitle("Lumi Section",2);
1025  hMExLS->getTH2F()->SetOption("colz");
1026  hMEyLS = ibooker.book2D("MEyLS","MEy_LS",200,-200,200,250,0.,2500.);
1027  hMEyLS->setAxisTitle("MEy [GeV]",1);
1028  hMEyLS->setAxisTitle("Lumi Section",2);
1029  hMEyLS->getTH2F()->SetOption("colz");
1030  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MExLS",hMExLS));
1031  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"MEyLS",hMEyLS));
1032  }
1033  }
1034 
1035  hMETRate = ibooker.book1D("METRate", "METRate", 200, 0, 1000);
1036  map_of_MEs.insert(std::pair<std::string,MonitorElement*>(DirName+"/"+"METRate",hMETRate));
1037 
1038 
1039  ibooker.setCurrentFolder("JetMET");
1040  lumisecME = ibooker.book1D("lumisec", "lumisec", 2501, -1., 2500.);
1041  map_of_MEs.insert(std::pair<std::string,MonitorElement*>("JetMET/lumisec",lumisecME));
1042  }//all non Z plots (restrict Z Plots only for resolution study)
1043 }
MonitorElement * meCHF_EndcapMinus_BXm1Filled
Definition: METAnalyzer.h:456
MonitorElement * meMETPhiNeutralHadronsEndcapMinus_BXm1Empty
Definition: METAnalyzer.h:407
MonitorElement * hMExLS
Definition: METAnalyzer.h:322
MonitorElement * meMETPhiNeutralHadronsEndcapMinus
Definition: METAnalyzer.h:558
int i
Definition: DBlmapReader.cc:9
MonitorElement * mePhF_EndcapMinus_BXm1Empty
Definition: METAnalyzer.h:482
MonitorElement * hSumET
Definition: METAnalyzer.h:320
MonitorElement * meMETPhiChargedHadronsEndcapPlus_BXm1Filled
Definition: METAnalyzer.h:424
MonitorElement * mProfileIsoPFChHad_EcalOccupancyCentral
Definition: METAnalyzer.h:541
MonitorElement * meNeutralHadronEtFraction
Definition: METAnalyzer.h:363
MonitorElement * meMETPhiHFHadronsPlus_BXm1Filled
Definition: METAnalyzer.h:432
MonitorElement * meNeutralHadronEtFraction_profile
Definition: METAnalyzer.h:579
MonitorElement * mePhF_EndcapMinus_BXm1Filled
Definition: METAnalyzer.h:488
MonitorElement * meMETPhiChargedHadronsEndcapPlus
Definition: METAnalyzer.h:554
MonitorElement * meHFHadF_Plus_BXm1Filled
Definition: METAnalyzer.h:499
MonitorElement * meNHF_EndcapPlus_BXm1Empty
Definition: METAnalyzer.h:465
MonitorElement * hMEy
Definition: METAnalyzer.h:304
MonitorElement * meMETPhiHFEGammasPlus
Definition: METAnalyzer.h:564
MonitorElement * hCaloMETPhi020
Definition: METAnalyzer.h:329
MonitorElement * mePhotonEt
Definition: METAnalyzer.h:362
std::vector< std::string > occupancyPFCand_name_
Definition: METAnalyzer.h:547
std::vector< edm::ParameterSet > diagnosticsParameters_
Definition: METAnalyzer.h:245
MonitorElement * meChargedHadronEtFraction_profile
Definition: METAnalyzer.h:581
MonitorElement * meMETPhiPhotonsEndcapPlus_BXm1Empty
Definition: METAnalyzer.h:409
MonitorElement * mProfileIsoPFChHad_HcalOccupancyCentral
Definition: METAnalyzer.h:539
std::vector< int > typePFCand_
Definition: METAnalyzer.h:551
MonitorElement * meZJets_u_perp_ZPt_150_290
Definition: METAnalyzer.h:603
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
MonitorElement * meMETPhiHFHadronsMinus_BXm1Empty
Definition: METAnalyzer.h:412
MonitorElement * meMET_BXm1Filled
Definition: METAnalyzer.h:420
MonitorElement * meZJets_u_perp_ZPt_75_150
Definition: METAnalyzer.h:602
MonitorElement * hCaloHadEtInHF
Definition: METAnalyzer.h:340
MonitorElement * mProfileIsoPFChHad_EMPtEndcap
Definition: METAnalyzer.h:536
std::vector< double > MExPFCand_
Definition: METAnalyzer.h:550
MonitorElement * meHFHadF_Minus_BXm1Empty
Definition: METAnalyzer.h:496
MonitorElement * meZJets_u_perp_ZPt_0_15
Definition: METAnalyzer.h:598
bool isCaloMet_
Definition: METAnalyzer.h:610
MonitorElement * meSumET_BXm1Empty
Definition: METAnalyzer.h:400
std::vector< MonitorElement * > ptPFCand_
Definition: METAnalyzer.h:546
MonitorElement * meZJets_u_par_ZPt_15_30
Definition: METAnalyzer.h:590
MonitorElement * meChargedHadronEtFraction_BXm1Empty
Definition: METAnalyzer.h:398
MonitorElement * hMEx
Definition: METAnalyzer.h:303
std::vector< std::string > profilePFCand_y_name_
Definition: METAnalyzer.h:547
MonitorElement * meZJets_u_par
Definition: METAnalyzer.h:588
MonitorElement * hCaloHadEtInHE
Definition: METAnalyzer.h:339
MonitorElement * hMET_eeBadScFilter
Definition: METAnalyzer.h:312
MonitorElement * meMETPhiPhotonsEndcapPlus
Definition: METAnalyzer.h:560
MonitorElement * meZJets_u_par_ZPt_75_150
Definition: METAnalyzer.h:593
MonitorElement * meNeutralHadronEtFraction_BXm1Empty
Definition: METAnalyzer.h:397
MonitorElement * meMETPhiChargedHadronsBarrel_BXm1Empty
Definition: METAnalyzer.h:402
bool fillCandidateMap_histos
Definition: METAnalyzer.h:615
MonitorElement * meHFEMF_Minus_BXm1Empty
Definition: METAnalyzer.h:507
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::vector< double > etaMaxPFCand_
Definition: METAnalyzer.h:550
MonitorElement * meZJets_u_perp_ZPt_30_55
Definition: METAnalyzer.h:600
MonitorElement * hCaloEtFractionHadronic
Definition: METAnalyzer.h:330
MonitorElement * hMEyLS
Definition: METAnalyzer.h:323
MonitorElement * meHFHadF_Minus
Definition: METAnalyzer.h:494
MonitorElement * meMETPhiHFEGammasPlus_BXm1Filled
Definition: METAnalyzer.h:434
MonitorElement * mePhotonEtFraction_BXm1Empty
Definition: METAnalyzer.h:396
double nPVMin_
Definition: METAnalyzer.h:250
MonitorElement * meHFHadronEtFraction
Definition: METAnalyzer.h:369
MonitorElement * meMET_BXm1Empty
Definition: METAnalyzer.h:399
MonitorElement * meCHF_EndcapMinus_BXm1Empty
Definition: METAnalyzer.h:450
MonitorElement * meNHF_EndcapPlus
Definition: METAnalyzer.h:462
MonitorElement * meMETPhiPhotonsEndcapMinus_BXm1Empty
Definition: METAnalyzer.h:410
MonitorElement * hMET_logx
Definition: METAnalyzer.h:325
MonitorElement * hCaloEmEtInHF
Definition: METAnalyzer.h:341
MonitorElement * meHFEMEtFraction_profile
Definition: METAnalyzer.h:585
MonitorElement * mePhF_EndcapPlus
Definition: METAnalyzer.h:478
std::vector< MonitorElement * > occupancyPFCand_
Definition: METAnalyzer.h:546
MonitorElement * hCaloHadEtInHO
Definition: METAnalyzer.h:338
MonitorElement * meHFEMF_Plus_BXm1Filled
Definition: METAnalyzer.h:510
MonitorElement * meChargedHadronEtFraction
Definition: METAnalyzer.h:366
MonitorElement * meMETPhiPhotonsBarrel_BXm1Empty
Definition: METAnalyzer.h:408
MonitorElement * mePhF_Barrel_BXm1Empty
Definition: METAnalyzer.h:480
MonitorElement * meMEx_profile
Definition: METAnalyzer.h:572
MonitorElement * meNHF_Barrel
Definition: METAnalyzer.h:461
MonitorElement * hMET
Definition: METAnalyzer.h:307
MonitorElement * meZJets_u_par_ZPt_290
Definition: METAnalyzer.h:595
MonitorElement * hMET_2
Definition: METAnalyzer.h:308
MonitorElement * hMET_HcalStripHaloFilter
Definition: METAnalyzer.h:317
MonitorElement * meCHF_EndcapMinus
Definition: METAnalyzer.h:447
std::vector< MonitorElement * > ptPFCand_puppiNolepWeight_
Definition: METAnalyzer.h:548
MonitorElement * meMETPhiHFHadronsPlus_BXm1Empty
Definition: METAnalyzer.h:411
MonitorElement * hTrigger
Definition: METAnalyzer.h:301
MonitorElement * mePhF_Barrel_BXm1Filled
Definition: METAnalyzer.h:486
else
Definition: XrdSource.cc:215
MonitorElement * meCHF_EndcapPlus_BXm1Filled
Definition: METAnalyzer.h:455
MonitorElement * meZJets_u_par_ZPt_55_75
Definition: METAnalyzer.h:592
MonitorElement * meMETPhiNeutralHadronsEndcapMinus_BXm1Filled
Definition: METAnalyzer.h:428
MonitorElement * mePhF_EndcapPlus_BXm1Filled
Definition: METAnalyzer.h:487
MonitorElement * meZJets_u_perp
Definition: METAnalyzer.h:597
MonitorElement * meZJets_u_par_ZPt_0_15
Definition: METAnalyzer.h:589
MonitorElement * meMETPhiNeutralHadronsBarrel_BXm1Empty
Definition: METAnalyzer.h:405
MonitorElement * lumisecME
Definition: METAnalyzer.h:300
MonitorElement * meNeutralHadronEtFraction_BXm1Filled
Definition: METAnalyzer.h:418
MonitorElement * meNHF_Barrel_BXm1Filled
Definition: METAnalyzer.h:470
MonitorElement * meMETPhiNeutralHadronsEndcapPlus_BXm1Empty
Definition: METAnalyzer.h:406
bool fill_met_high_level_histo
Definition: METAnalyzer.h:614
MonitorElement * hMETPhi
Definition: METAnalyzer.h:319
MonitorElement * hCaloEmEtInEE
Definition: METAnalyzer.h:342
MonitorElement * hMET_HBHEIsoNoiseFilter
Definition: METAnalyzer.h:315
MonitorElement * mePhF_EndcapMinus
Definition: METAnalyzer.h:479
MonitorElement * meZJets_u_perp_ZPt_55_75
Definition: METAnalyzer.h:601
MonitorElement * meMETPhiHFEGammasMinus
Definition: METAnalyzer.h:565
MonitorElement * meMuonEt
Definition: METAnalyzer.h:368
MonitorElement * meHFEMEt_profile
Definition: METAnalyzer.h:586
MonitorElement * mePhotonEtFraction_BXm1Filled
Definition: METAnalyzer.h:417
MonitorElement * hSumET_logx
Definition: METAnalyzer.h:326
MonitorElement * meNHF_EndcapPlus_BXm1Filled
Definition: METAnalyzer.h:471
MonitorElement * hMET_HBHENoiseFilter
Definition: METAnalyzer.h:310
MonitorElement * meMETPhiPhotonsEndcapMinus_BXm1Filled
Definition: METAnalyzer.h:431
MonitorElement * meZJets_u_par_ZPt_150_290
Definition: METAnalyzer.h:594
MonitorElement * meCHF_Barrel_BXm1Filled
Definition: METAnalyzer.h:454
MonitorElement * meMETPhiHFHadronsMinus_BXm1Filled
Definition: METAnalyzer.h:433
MonitorElement * meZJets_u_perp_ZPt_290
Definition: METAnalyzer.h:604
MonitorElement * meHFEMF_Minus
Definition: METAnalyzer.h:505
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
std::vector< std::string > occupancyPFCand_name_puppiNolepWeight_
Definition: METAnalyzer.h:549
std::vector< MonitorElement * > profilePFCand_x_
Definition: METAnalyzer.h:546
MonitorElement * hCaloEmEtFraction
Definition: METAnalyzer.h:331
MonitorElement * mProfileIsoPFChHad_HadPtCentral
Definition: METAnalyzer.h:533
MonitorElement * meMETPhiChargedHadronsBarrel
Definition: METAnalyzer.h:553
MonitorElement * meNHF_Barrel_BXm1Empty
Definition: METAnalyzer.h:464
std::vector< MonitorElement * > profilePFCand_y_
Definition: METAnalyzer.h:546
MonitorElement * meChargedHadronEt
Definition: METAnalyzer.h:367
MonitorElement * meMETPhiChargedHadronsEndcapMinus_BXm1Filled
Definition: METAnalyzer.h:425
MonitorElement * hMETSig
Definition: METAnalyzer.h:306
MonitorElement * meChargedHadronEt_profile
Definition: METAnalyzer.h:582
MonitorElement * meCHF_Barrel_BXm1Empty
Definition: METAnalyzer.h:448
MonitorElement * mProfileIsoPFChHad_TrackPt
Definition: METAnalyzer.h:537
MonitorElement * meMETPhiNeutralHadronsEndcapPlus_BXm1Filled
Definition: METAnalyzer.h:427
std::vector< std::string > allTriggerNames_
Definition: METAnalyzer.h:205
std::vector< double > MEyPFCand_
Definition: METAnalyzer.h:550
MonitorElement * mePhotonEtFraction
Definition: METAnalyzer.h:361
#define M_PI
MonitorElement * hMET_EcalDeadCellBoundaryFilter
Definition: METAnalyzer.h:314
MonitorElement * mePhotonEt_profile
Definition: METAnalyzer.h:578
MonitorElement * meCHF_EndcapPlus
Definition: METAnalyzer.h:446
MonitorElement * meZJets_u_perp_ZPt_15_30
Definition: METAnalyzer.h:599
MonitorElement * meZJets_u_par_ZPt_30_55
Definition: METAnalyzer.h:591
MonitorElement * meMETPhiHFEGammasMinus_BXm1Empty
Definition: METAnalyzer.h:414
std::vector< MonitorElement * > occupancyPFCand_puppiNolepWeight_
Definition: METAnalyzer.h:548
MonitorElement * meElectronEt
Definition: METAnalyzer.h:365
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * meMET_profile
Definition: METAnalyzer.h:574
MonitorElement * meMETPhiChargedHadronsEndcapMinus
Definition: METAnalyzer.h:555
MonitorElement * meHFHadronEt
Definition: METAnalyzer.h:370
MonitorElement * hCaloEmEtInEB
Definition: METAnalyzer.h:343
MonitorElement * meMETPhiPhotonsBarrel
Definition: METAnalyzer.h:559
MonitorElement * hCaloHadEtInHB
Definition: METAnalyzer.h:337
MonitorElement * meHFHadF_Plus_BXm1Empty
Definition: METAnalyzer.h:495
MonitorElement * meMETPhiPhotonsBarrel_BXm1Filled
Definition: METAnalyzer.h:429
double nPVMax_
Definition: METAnalyzer.h:251
MonitorElement * meHFHadF_Minus_BXm1Filled
Definition: METAnalyzer.h:500
MonitorElement * meHFHadronEtFraction_profile
Definition: METAnalyzer.h:583
MonitorElement * meNHF_EndcapMinus_BXm1Empty
Definition: METAnalyzer.h:466
MonitorElement * hMET_CSCTightHalo2015Filter
Definition: METAnalyzer.h:316
std::vector< int > nbinsPFCand_
Definition: METAnalyzer.h:551
MonitorElement * meHFEMEtFraction
Definition: METAnalyzer.h:371
MonitorElement * hMET_CSCTightHaloFilter
Definition: METAnalyzer.h:311
MonitorElement * meHFEMF_Minus_BXm1Filled
Definition: METAnalyzer.h:511
MonitorElement * meMETPhiChargedHadronsEndcapMinus_BXm1Empty
Definition: METAnalyzer.h:404
MonitorElement * hCaloEmEtFraction020
Definition: METAnalyzer.h:335
MonitorElement * meHFEMF_Plus_BXm1Empty
Definition: METAnalyzer.h:506
MonitorElement * mProfileIsoPFChHad_EMPtCentral
Definition: METAnalyzer.h:535
MonitorElement * mePhF_EndcapPlus_BXm1Empty
Definition: METAnalyzer.h:481
std::vector< int > countsPFCand_
Definition: METAnalyzer.h:551
MonitorElement * meMETPhiHFHadronsPlus
Definition: METAnalyzer.h:562
MonitorElement * mProfileIsoPFChHad_HcalOccupancyEndcap
Definition: METAnalyzer.h:540
std::vector< MonitorElement * > multiplicityPFCand_
Definition: METAnalyzer.h:546
MonitorElement * hMET_EcalDeadCellTriggerFilter
Definition: METAnalyzer.h:313
int getNbinsX(void) const
get # of bins in X-axis
std::vector< std::string > multiplicityPFCand_name_
Definition: METAnalyzer.h:547
MonitorElement * meHFEMEt
Definition: METAnalyzer.h:372
std::vector< double > etaMinPFCand_
Definition: METAnalyzer.h:550
MonitorElement * meChargedHadronEtFraction_BXm1Filled
Definition: METAnalyzer.h:419
MonitorElement * meMETPhiHFEGammasMinus_BXm1Filled
Definition: METAnalyzer.h:435
MonitorElement * meMEy_profile
Definition: METAnalyzer.h:573
tuple cout
Definition: gather_cfg.py:145
MonitorElement * meMETPhiPhotonsEndcapPlus_BXm1Filled
Definition: METAnalyzer.h:430
MonitorElement * meHFEMF_Plus
Definition: METAnalyzer.h:504
std::vector< std::string > profilePFCand_x_name_
Definition: METAnalyzer.h:547
MonitorElement * meSumET_profile
Definition: METAnalyzer.h:575
MonitorElement * mProfileIsoPFChHad_TrackOccupancy
Definition: METAnalyzer.h:543
MonitorElement * meMETPhiHFEGammasPlus_BXm1Empty
Definition: METAnalyzer.h:413
MonitorElement * meMETPhiNeutralHadronsBarrel
Definition: METAnalyzer.h:556
bool hTriggerLabelsIsSet_
Definition: METAnalyzer.h:296
MonitorElement * meCHF_Barrel
Definition: METAnalyzer.h:445
TH2F * getTH2F(void) const
bool isMiniAODMet_
Definition: METAnalyzer.h:612
MonitorElement * meHFHadronEt_profile
Definition: METAnalyzer.h:584
MonitorElement * meMETPhiPhotonsEndcapMinus
Definition: METAnalyzer.h:561
MonitorElement * hMETRate
Definition: METAnalyzer.h:242
MonitorElement * meNeutralHadronEt_profile
Definition: METAnalyzer.h:580
std::vector< std::string > ptPFCand_name_
Definition: METAnalyzer.h:547
MonitorElement * meHFHadF_Plus
Definition: METAnalyzer.h:493
MonitorElement * meCHF_EndcapPlus_BXm1Empty
Definition: METAnalyzer.h:449
MonitorElement * mePhF_Barrel
Definition: METAnalyzer.h:477
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MonitorElement * mePhotonEtFraction_profile
Definition: METAnalyzer.h:577
MonitorElement * meMETPhiChargedHadronsEndcapPlus_BXm1Empty
Definition: METAnalyzer.h:403
MonitorElement * mProfileIsoPFChHad_HadPtEndcap
Definition: METAnalyzer.h:534
MonitorElement * mProfileIsoPFChHad_EcalOccupancyEndcap
Definition: METAnalyzer.h:542
MonitorElement * meMETPhiNeutralHadronsBarrel_BXm1Filled
Definition: METAnalyzer.h:426
MonitorElement * meMETPhiHFHadronsMinus
Definition: METAnalyzer.h:563
MonitorElement * meMETPhiChargedHadronsBarrel_BXm1Filled
Definition: METAnalyzer.h:423
MonitorElement * meNHF_EndcapMinus
Definition: METAnalyzer.h:463
MonitorElement * meSumET_BXm1Filled
Definition: METAnalyzer.h:421
MonitorElement * meNHF_EndcapMinus_BXm1Filled
Definition: METAnalyzer.h:472
std::vector< std::string > ptPFCand_name_puppiNolepWeight_
Definition: METAnalyzer.h:549
MonitorElement * meMETPhiNeutralHadronsEndcapPlus
Definition: METAnalyzer.h:557
MonitorElement * meNeutralHadronEt
Definition: METAnalyzer.h:364
void METAnalyzer::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
virtual

Initialize run-based parameters.

Reimplemented from DQMEDAnalyzer.

Definition at line 1046 of file METAnalyzer.cc.

References gather_cfg::cout, newFWLiteAna::found, edm::EventSetup::get(), L1GtTriggerMenu::gtTechnicalTriggerMap(), i, relval_steps::menu, HLT_25ns10e33_v2_cff::parameters, edm::ESHandle< class >::product(), cond::persistency::search(), electronDataDiscovery::search2(), and AlCaHLTBitMon_QueryRunRegistry::string.

1047 {
1049  iSetup.get<L1GtTriggerMenuRcd>().get(menuRcd) ;
1050  const L1GtTriggerMenu* menu = menuRcd.product();
1051  for (CItAlgo techTrig = menu->gtTechnicalTriggerMap().begin(); techTrig != menu->gtTechnicalTriggerMap().end(); ++techTrig) {
1052  if ((techTrig->second).algoName() == m_l1algoname_) {
1053  m_bitAlgTechTrig_=(techTrig->second).algoBitNumber();
1054  break;
1055  }
1056  }
1057 
1058 // std::cout << "Run " << iRun.run() << " hltconfig.init "
1059 // << hltConfig_.init(iRun,iSetup,triggerResultsLabel_.process(),changed_) << " length: "<<hltConfig_.triggerNames().size()<<" changed "<<changed_<<std::endl;
1060  bool changed(true);
1061  if (hltConfig_.init(iRun,iSetup,triggerResultsLabel_.process(),changed)) {
1062  if (changed) {
1063  //hltConfig_.dump("ProcessName");
1064  //hltConfig_.dump("GlobalTag");
1065  //hltConfig_.dump("TableName");
1066 // hltConfig_.dump("Streams");
1067 // hltConfig_.dump("Datasets");
1068 // hltConfig_.dump("PrescaleTable");
1069 // hltConfig_.dump("ProcessPSet");
1070  }
1071  } else {
1072  if (verbose_) std::cout << "HLTEventAnalyzerAOD::analyze:"
1073  << " config extraction failure with process name "
1074  << triggerResultsLabel_.process() << std::endl;
1075  }
1076 
1077  allTriggerNames_.clear();
1078  for (unsigned int i = 0; i<hltConfig_.size();i++) {
1080  }
1081 // std::cout<<"Length: "<<allTriggerNames_.size()<<std::endl;
1082 
1083  triggerSelectedSubFolders_ = parameters.getParameter<edm::VParameterSet>("triggerSelectedSubFolders");
1084  for ( std::vector<GenericTriggerEventFlag *>::const_iterator it = triggerFolderEventFlag_.begin(); it!= triggerFolderEventFlag_.end(); it++) {
1085  int pos = it - triggerFolderEventFlag_.begin();
1086  if ((*it)->on()) {
1087  (*it)->initRun( iRun, iSetup );
1088  if (triggerSelectedSubFolders_[pos].exists(std::string("hltDBKey"))) {
1089  if ((*it)->expressionsFromDB((*it)->hltDBKey(), iSetup)[0] != "CONFIG_ERROR")
1090  triggerFolderExpr_[pos] = (*it)->expressionsFromDB((*it)->hltDBKey(), iSetup);
1091  }
1092  }
1093  }
1094  if(isMiniAODMet_){
1095  bool changed_filter=true;
1096  std::vector<int>initializeFilter(8,-1);//we have 8 filters at the moment
1097  miniaodFilterIndex_=initializeFilter;
1098  if (FilterhltConfig_.init(iRun,iSetup,METFilterMiniAODLabel_.process(),changed_filter)){
1099  miniaodfilterdec=0;
1100  for(unsigned int i=0;i<FilterhltConfig_.size();i++){
1101  std::string search=FilterhltConfig_.triggerName(i).substr(5);//actual label of filter, the first 5 items are Flag_, so stripped off
1102  std::string search2=HBHENoiseStringMiniAOD;//all filters end with DQM, which is not in the flag --> ONLY not for HBHEFilters
1103  std::size_t found=search2.find(search);
1104  if(found!=std::string::npos){
1106  }
1107  search2=CSCHaloResultTag_.label().substr(0,CSCHaloResultTag_.label().size()-3);
1108  found=search2.find(search);
1109  if(found!=std::string::npos){
1111  }
1112  search2=eeBadScFilterTag_.label().substr(0,eeBadScFilterTag_.label().size()-3);
1113  found=search2.find(search);
1114  if(found!=std::string::npos){
1116  }
1117  search2=HBHEIsoNoiseStringMiniAOD;
1118  found=search2.find(search);
1119  if(found!=std::string::npos){
1121  }
1122  search2=CSCHalo2015ResultTag_.label().substr(0,CSCHalo2015ResultTag_.label().size()-3);
1123  found=search2.find(search);
1124  if(found!=std::string::npos){
1126  }
1127  search2=EcalDeadCellTriggerTag_.label().substr(0,EcalDeadCellTriggerTag_.label().size()-3);
1128  found=search2.find(search);
1129  if(found!=std::string::npos){
1131  }
1132  search2=EcalDeadCellBoundaryTag_.label().substr(0,EcalDeadCellBoundaryTag_.label().size()-3);
1133  found=search2.find(search);
1134  if(found!=std::string::npos){
1136  }
1137  search2=HcalStripHaloTag_.label().substr(0,HcalStripHaloTag_.label().size()-3);
1138  found=search2.find(search);
1139  if(found!=std::string::npos){
1141  }
1142  }
1143  }else if(FilterhltConfig_.init(iRun,iSetup,METFilterMiniAODLabel2_.process(),changed_filter)){
1144  miniaodfilterdec=1;
1145  for(unsigned int i=0;i<FilterhltConfig_.size();i++){
1146  std::string search=FilterhltConfig_.triggerName(i).substr(5);//actual label of filter, the first 5 items are Flag_, so stripped off
1147  std::string search2=HBHENoiseStringMiniAOD;//all filters end with DQM, which is not in the flag --> ONLY not for HBHEFilters
1148  std::size_t found=search2.find(search);
1149  if(found!=std::string::npos){
1151  }
1152  search2=CSCHaloResultTag_.label().substr(0,CSCHaloResultTag_.label().size()-3);
1153  found=search2.find(search);
1154  if(found!=std::string::npos){
1156  }
1157  search2=eeBadScFilterTag_.label().substr(0,eeBadScFilterTag_.label().size()-3);
1158  found=search2.find(search);
1159  if(found!=std::string::npos){
1161  }
1162  search2=HBHEIsoNoiseStringMiniAOD;
1163  found=search2.find(search);
1164  if(found!=std::string::npos){
1166  }
1167  search2=CSCHalo2015ResultTag_.label().substr(0,CSCHalo2015ResultTag_.label().size()-3);
1168  found=search2.find(search);
1169  if(found!=std::string::npos){
1171  }
1172  search2=EcalDeadCellTriggerTag_.label().substr(0,EcalDeadCellTriggerTag_.label().size()-3);
1173  found=search2.find(search);
1174  if(found!=std::string::npos){
1176  }
1177  search2=EcalDeadCellBoundaryTag_.label().substr(0,EcalDeadCellBoundaryTag_.label().size()-3);
1178  found=search2.find(search);
1179  if(found!=std::string::npos){
1181  }
1182  search2=HcalStripHaloTag_.label().substr(0,HcalStripHaloTag_.label().size()-3);
1183  found=search2.find(search);
1184  if(found!=std::string::npos){
1186  }
1187  }
1188  }else{
1189  std::cout<<"nothing found with both RECO and reRECO label"<<std::endl;
1190  }
1191  }
1192 }
unsigned int size() const
number of trigger paths in trigger table
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
edm::InputTag CSCHaloResultTag_
Definition: METAnalyzer.h:169
HLTConfigProvider hltConfig_
Definition: METAnalyzer.h:198
const std::string & triggerName(unsigned int triggerIndex) const
std::vector< T >::const_iterator search(const cond::Time_t &val, const std::vector< T > &container)
Definition: IOVProxy.cc:282
std::vector< ParameterSet > VParameterSet
Definition: ParameterSet.h:33
HLTConfigProvider FilterhltConfig_
Definition: METAnalyzer.h:199
edm::InputTag EcalDeadCellTriggerTag_
Definition: METAnalyzer.h:173
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:214
std::string HBHENoiseStringMiniAOD
Definition: METAnalyzer.h:208
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
std::string HBHEIsoNoiseStringMiniAOD
Definition: METAnalyzer.h:209
std::vector< int > miniaodFilterIndex_
Definition: METAnalyzer.h:162
std::vector< std::vector< std::string > > triggerFolderExpr_
Definition: METAnalyzer.h:215
edm::InputTag CSCHalo2015ResultTag_
Definition: METAnalyzer.h:171
edm::InputTag eeBadScFilterTag_
Definition: METAnalyzer.h:175
edm::InputTag HcalStripHaloTag_
Definition: METAnalyzer.h:179
std::string m_l1algoname_
Definition: METAnalyzer.h:193
std::vector< std::string > allTriggerNames_
Definition: METAnalyzer.h:205
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
const T & get() const
Definition: EventSetup.h:56
T const * product() const
Definition: ESHandle.h:86
edm::InputTag triggerResultsLabel_
Definition: METAnalyzer.h:200
edm::ParameterSet parameters
Definition: METAnalyzer.h:137
edm::InputTag EcalDeadCellBoundaryTag_
Definition: METAnalyzer.h:177
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
edm::InputTag METFilterMiniAODLabel2_
Definition: METAnalyzer.h:159
edm::VParameterSet triggerSelectedSubFolders_
Definition: METAnalyzer.h:213
int miniaodfilterdec
Definition: METAnalyzer.h:163
tuple cout
Definition: gather_cfg.py:145
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
edm::InputTag METFilterMiniAODLabel_
Definition: METAnalyzer.h:157
bool isMiniAODMet_
Definition: METAnalyzer.h:612
int m_bitAlgTechTrig_
Definition: METAnalyzer.h:194
void METAnalyzer::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
virtual

Finish up a run.

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 1195 of file METAnalyzer.cc.

References cmsPerfPublish::DirName, TrackerOfflineValidation_Dqm_cff::dirName, MonitorElement::getRootObject(), MonitorElement::getTH1F(), i, and AlCaHLTBitMon_QueryRunRegistry::string.

1196 {
1197 
1198  //
1199  //--- Check the time length of the Run from the lumi section plots
1200 
1201 
1202  TH1F* tlumisec;
1203 
1204  MonitorElement *meLumiSec = map_dijet_MEs["aaa"];
1205  meLumiSec = map_dijet_MEs["JetMET/lumisec"];
1206 
1207  int totlsec=0;
1208  int totlssecsum=0;
1209  double totltime=0.;
1210  if (meLumiSec && meLumiSec->getRootObject() ) {
1211  tlumisec = meLumiSec->getTH1F();
1212  //check overflow bin (if we have more than 2500 LS in a run)
1213  //lumisec is filled every time the analyze section is processed
1214  //we know an LS is present only once in a run: normalize how many events we had on average
1215  //if lumi fluctuates strongly might be unreliable for overflow bin though
1216  for (int i=0; i< (tlumisec->GetNbinsX()); i++){
1217  if (tlumisec->GetBinContent(i)!=0){
1218  totlsec+=1;
1219  totlssecsum+=tlumisec->GetBinContent(i);
1220  }
1221  }
1222  int num_per_ls=(double)totlssecsum/(double)totlsec;
1223  totlsec=totlsec+tlumisec->GetBinContent(tlumisec->GetNbinsX()+1)/(double)num_per_ls;
1224  totltime = double(totlsec*90); // one lumi sec ~ 90 (sec)
1225  }
1226 
1227  if (totltime==0.) totltime=1.;
1228 
1230  //dbe_->setCurrentFolder(dirName);
1231 
1232 
1233 
1234  //below is the original METAnalyzer formulation
1235 
1236  for (std::vector<std::string>::const_iterator ic = folderNames_.begin(); ic != folderNames_.end(); ic++) {
1238  DirName = dirName+*ic;
1239  makeRatePlot(DirName,totltime);
1240  for ( std::vector<GenericTriggerEventFlag *>::const_iterator it = triggerFolderEventFlag_.begin(); it!= triggerFolderEventFlag_.end(); it++) {
1241  int pos = it - triggerFolderEventFlag_.begin();
1242  if ((*it)->on()) {
1243  makeRatePlot(DirName+"/"+triggerFolderLabels_[pos],totltime);
1244  }
1245  }
1246  }
1247 
1248 }
std::map< std::string, MonitorElement * > map_dijet_MEs
Definition: METAnalyzer.h:606
int i
Definition: DBlmapReader.cc:9
std::string FolderName_
Definition: METAnalyzer.h:142
std::vector< GenericTriggerEventFlag * > triggerFolderEventFlag_
Definition: METAnalyzer.h:214
void makeRatePlot(std::string, double)
edm::InputTag metCollectionLabel_
Definition: METAnalyzer.h:144
std::vector< std::string > folderNames_
Definition: METAnalyzer.h:288
TObject * getRootObject(void) const
TH1F * getTH1F(void) const
std::string const & label() const
Definition: InputTag.h:36
std::vector< std::string > triggerFolderLabels_
Definition: METAnalyzer.h:216
void METAnalyzer::fillMESet ( const edm::Event ,
std::string  ,
const reco::MET ,
const pat::MET ,
const reco::PFMET ,
const reco::CaloMET ,
const reco::Candidate::PolarLorentzVector ,
std::map< std::string, MonitorElement * > &  ,
std::vector< bool >  ,
std::vector< bool >   
)

Definition at line 1835 of file METAnalyzer.cc.

References i, and AlCaHLTBitMon_QueryRunRegistry::string.

1837 {
1838  bool bLumiSecPlot=fill_met_high_level_histo;
1839  bool fillPFCandidatePlots=false;
1840  if (DirName.find("Cleaned")!=std::string::npos) {
1841  fillPFCandidatePlots=true;
1842  fillMonitorElement(iEvent, DirName, std::string(""), met, patmet, pfmet, calomet, zCand, map_of_MEs,bLumiSecPlot,fillPFCandidatePlots,techTriggerCase,METFilterDecision);
1843  for (unsigned int i = 0; i<triggerFolderLabels_.size(); i++) {
1844  fillPFCandidatePlots=false;
1845  if (triggerFolderDecisions_[i]){
1846  fillMonitorElement(iEvent, DirName, triggerFolderLabels_[i], met, patmet, pfmet, calomet, zCand, map_of_MEs,bLumiSecPlot,fillPFCandidatePlots,techTriggerCase,METFilterDecision);
1847  }
1848  }
1849  }else if (DirName.find("DiJet")!=std::string::npos) {
1850  fillMonitorElement(iEvent, DirName, std::string(""), met, patmet, pfmet, calomet, zCand, map_of_MEs,bLumiSecPlot,fillPFCandidatePlots,techTriggerCase,METFilterDecision);
1851  for (unsigned int i = 0; i<triggerFolderLabels_.size(); i++) {
1852  if (triggerFolderDecisions_[i]) fillMonitorElement(iEvent, DirName, triggerFolderLabels_[i], met, patmet, pfmet, calomet, zCand, map_of_MEs,bLumiSecPlot,fillPFCandidatePlots,techTriggerCase,METFilterDecision);
1853  }
1854  }else if (DirName.find("ZJets")!=std::string::npos) {
1855  fillMonitorElement(iEvent, DirName, std::string(""), met, patmet, pfmet, calomet, zCand, map_of_MEs,bLumiSecPlot,fillPFCandidatePlots,techTriggerCase,METFilterDecision);
1856  }else{
1857  fillMonitorElement(iEvent, DirName, std::string(""), met, patmet, pfmet, calomet, zCand, map_of_MEs,bLumiSecPlot,fillPFCandidatePlots,techTriggerCase,METFilterDecision);
1858  }
1859 
1860 
1861 }
int i
Definition: DBlmapReader.cc:9
std::vector< int > triggerFolderDecisions_
Definition: METAnalyzer.h:217
int iEvent
Definition: GenABIO.cc:230
bool fill_met_high_level_histo
Definition: METAnalyzer.h:614
void fillMonitorElement(const edm::Event &, std::string, std::string, const reco::MET &, const pat::MET &, const reco::PFMET &, const reco::CaloMET &, const reco::Candidate::PolarLorentzVector &, std::map< std::string, MonitorElement * > &, bool, bool, std::vector< bool >, std::vector< bool >)
std::vector< std::string > triggerFolderLabels_
Definition: METAnalyzer.h:216
void METAnalyzer::fillMonitorElement ( const edm::Event ,
std::string  ,
std::string  ,
const reco::MET ,
const pat::MET ,
const reco::PFMET ,
const reco::CaloMET ,
const reco::Candidate::PolarLorentzVector ,
std::map< std::string, MonitorElement * > &  ,
bool  ,
bool  ,
std::vector< bool >  ,
std::vector< bool >   
)

Definition at line 1864 of file METAnalyzer.cc.

References EnergyCorrector::c, pat::MET::ChargedEMEtFraction(), pat::MET::ChargedHadEtFraction(), reco::PFMET::chargedHadronEt(), reco::PFMET::chargedHadronEtFraction(), reco::PFBlockElementCluster::clusterRef(), ECAL, reco::PFMET::electronEt(), bookConverter::elements, reco::PFCandidate::elementsInBlocks(), reco::CaloMET::emEtFraction(), reco::CaloMET::emEtInEB(), reco::CaloMET::emEtInEE(), reco::CaloMET::emEtInHF(), reco::LeafCandidate::et(), reco::LeafCandidate::eta(), pat::PackedCandidate::eta(), reco::CaloMET::etFractionHadronic(), HcalObjRepresent::Fill(), edm::Event::getByToken(), reco::CaloMET::hadEtInHB(), reco::CaloMET::hadEtInHE(), reco::CaloMET::hadEtInHF(), reco::CaloMET::hadEtInHO(), HCAL, reco::PFMET::HFEMEt(), reco::PFMET::HFEMEtFraction(), reco::PFMET::HFHadronEt(), reco::PFMET::HFHadronEtFraction(), i, cuy::ii, j, edm::EventBase::luminosityBlock(), reco::MET::mEtSig(), reco::PFMET::muonEt(), pat::MET::MuonEtFraction(), pat::MET::NeutralEMFraction(), pat::MET::NeutralHadEtFraction(), reco::PFMET::neutralHadronEt(), reco::PFMET::neutralHadronEtFraction(), nTracks(), pfLinker_cff::particleFlow, reco::PFCandidate::particleId(), pat::PackedCandidate::pdgId(), reco::LeafCandidate::phi(), pat::PackedCandidate::phi(), reco::PFMET::photonEt(), reco::PFMET::photonEtFraction(), reco::LeafCandidate::pt(), pat::PackedCandidate::pt(), pat::PackedCandidate::puppiWeight(), pat::PackedCandidate::puppiWeightNoLep(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), reco::PFCandidate::rawEcalEnergy(), reco::PFCandidate::rawHcalEnergy(), edm::OwnVector< T, P >::size(), mathSSE::sqrt(), reco::MET::sumEt(), reco::PFBlockElementTrack::trackRef(), pat::MET::Type6EtFraction(), and pat::MET::Type7EtFraction().

1867 {
1868  bool do_only_Z_histograms=false;
1869  if(DirName.find("ZJets")!=std::string::npos) {//do Z plots only
1870  do_only_Z_histograms=true;
1871  //\vec{p}_{T}^{Z}+vec{u}_{T}+\vec{MET}=0
1872 
1873  double u_x=-met.px()-zCand.Px();
1874  double u_y=-met.py()-zCand.Py();
1875 
1876  //protection for VERY special case where Z-Pt==0
1877  double u_par=0;
1878  double u_perp=sqrt(u_x*u_x + u_y*u_y);
1879  double e_Z_x=0;
1880  double e_Z_y=0;
1881  if(zCand.Pt()!=0){
1882  e_Z_x = zCand.Px()/zCand.Pt();
1883  e_Z_y = zCand.Py()/zCand.Pt();
1884  }
1885  u_par=u_x*e_Z_x+u_y*e_Z_y;
1886  u_perp= -e_Z_y * u_x + e_Z_x*u_y;
1887 
1888  meZJets_u_par = map_of_MEs[DirName+"/"+"u_parallel_Z_inc"]; if ( meZJets_u_par && meZJets_u_par->getRootObject()) meZJets_u_par ->Fill(u_par);
1889  if(zCand.Pt()<15){
1890  meZJets_u_par_ZPt_0_15 = map_of_MEs[DirName+"/"+"u_parallel_ZPt_0_15"]; if ( meZJets_u_par_ZPt_0_15 && meZJets_u_par_ZPt_0_15->getRootObject()) meZJets_u_par_ZPt_0_15 ->Fill(u_par);
1891  }else if(zCand.Pt()<30){
1892  meZJets_u_par_ZPt_15_30 = map_of_MEs[DirName+"/"+"u_parallel_ZPt_15_30"]; if ( meZJets_u_par_ZPt_15_30 && meZJets_u_par_ZPt_15_30->getRootObject()) meZJets_u_par_ZPt_15_30 ->Fill(u_par);
1893  }else if(zCand.Pt()<55){
1894  meZJets_u_par_ZPt_30_55 = map_of_MEs[DirName+"/"+"u_parallel_ZPt_30_55"]; if ( meZJets_u_par_ZPt_30_55 && meZJets_u_par_ZPt_30_55->getRootObject()) meZJets_u_par_ZPt_30_55 ->Fill(u_par);
1895  }else if(zCand.Pt()<75){
1896  meZJets_u_par_ZPt_55_75 = map_of_MEs[DirName+"/"+"u_parallel_ZPt_55_75"]; if ( meZJets_u_par_ZPt_55_75 && meZJets_u_par_ZPt_55_75->getRootObject()) meZJets_u_par_ZPt_55_75 ->Fill(u_par);
1897  }else if(zCand.Pt()<150){
1899  }else if(zCand.Pt()<290){
1901  }else{
1902  meZJets_u_par_ZPt_290 = map_of_MEs[DirName+"/"+"u_parallel_ZPt_290"]; if ( meZJets_u_par_ZPt_290 && meZJets_u_par_ZPt_290->getRootObject()) meZJets_u_par_ZPt_290 ->Fill(u_par);
1903  }
1904 
1905  meZJets_u_perp = map_of_MEs[DirName+"/"+"u_perp_Z_inc"]; if ( meZJets_u_perp && meZJets_u_perp->getRootObject()) meZJets_u_perp ->Fill(u_perp);
1906  if(zCand.Pt()<15){
1908  }else if(zCand.Pt()<30){
1910  }else if(zCand.Pt()<55){
1912  }else if(zCand.Pt()<75){
1914  }else if(zCand.Pt()<150){
1916  }else if(zCand.Pt()<290){
1918  }else{
1920  }
1921 
1922 
1923  }
1924  if(!do_only_Z_histograms){
1925  // Reconstructed MET Information
1926  double SumET = met.sumEt();
1927  double METSig = met.mEtSig();
1928  //double Ez = met.e_longitudinal();
1929  double MET = met.pt();
1930  double MEx = met.px();
1931  double MEy = met.py();
1932  double METPhi = met.phi();
1933  //
1934  int myLuminosityBlock;
1935  myLuminosityBlock = iEvent.luminosityBlock();
1936  //
1937 
1938  if (subFolderName!=""){
1939  DirName = DirName +"/"+subFolderName;
1940  }
1941 
1942  hTrigger = map_of_MEs[DirName+"/triggerResults"];
1943  if (hTrigger && hTrigger->getRootObject()) {
1944  for (unsigned int i = 0; i<allTriggerDecisions_.size();i++){
1945  if(i<(unsigned int)hTrigger->getNbinsX()){
1947  }
1948  }
1949  }
1950 
1951 
1952  hMEx = map_of_MEs[DirName+"/"+"MEx"]; if (hMEx && hMEx->getRootObject()) hMEx ->Fill(MEx);
1953  hMEy = map_of_MEs[DirName+"/"+"MEy"]; if (hMEy && hMEy->getRootObject()) hMEy ->Fill(MEy);
1954  hMET = map_of_MEs[DirName+"/"+"MET"]; if (hMET && hMET->getRootObject()) hMET ->Fill(MET);
1955  hMET_2 = map_of_MEs[DirName+"/"+"MET_2"]; if (hMET_2 && hMET_2->getRootObject()) hMET_2 ->Fill(MET);
1956 
1957  //hMET_HBHENoiseFilter = ibooker.book1D("MET_HBHENoiseFilter", "MET_HBHENoiseFiltered", 200, 0, 1000);
1958  //hMET_CSCTightHaloFilter = ibooker.book1D("MET_CSCTightHaloFilter", "MET_CSCTightHaloFiltered", 200, 0, 1000);
1959  //hMET_eeBadScFilter = ibooker.book1D("MET_eeBadScFilter", "MET_eeBadScFiltered", 200, 0, 1000);
1960  //hMET_HBHEIsoNoiseFilter = ibooker.book1D("MET_HBHEIsoNoiseFilter", "MET_HBHEIsoNoiseFiltered", 200, 0, 1000);
1961  //hMET_CSCTightHalo2015Filter = ibooker.book1D("MET_CSCTightHalo2015Filter", "MET_CSCTightHalo2015Filtered", 200, 0, 1000);
1962  //hMET_EcalDeadCellTriggerFilter = ibooker.book1D("MET_EcalDeadCellTriggerFilter", "MET_EcalDeadCellTriggerFiltered", 200, 0, 1000);
1963  //hMET_EcalDeadCellBoundaryFilter = ibooker.book1D("MET_EcalDeadCellBoundaryFilter", "MET_EcalDeadCellBoundaryFiltered", 200, 0, 1000);
1964  //hMET_HcalStripHaloFilter = ibooker.book1D("MET_HcalStripHaloFilter", "MET_HcalStripHaloFiltered", 200, 0, 1000);
1965 
1966 
1967  bool HBHENoiseFilterResult=false;
1968  bool CSCTightHaloFilterResult=false;
1969  bool eeBadScFilterResult=false;
1970  bool HBHEIsoNoiseFilterResult=false;
1971  bool CSCTightHalo2015FilterResult=false;
1972  bool EcalDeadCellTriggerFilterResult=false;
1973  bool EcalDeadCellBoundaryFilterResult=false;
1974  bool HcalStripHaloFilterResult=false;
1975  HBHENoiseFilterResult = METFilterDecision[0];
1976  if(HBHENoiseFilterResult){
1977  hMET_HBHENoiseFilter = map_of_MEs[DirName+"/"+"MET_HBHENoiseFilter"]; if (hMET_HBHENoiseFilter && hMET_HBHENoiseFilter->getRootObject()) hMET_HBHENoiseFilter ->Fill(MET);
1978  }
1979  CSCTightHaloFilterResult = METFilterDecision[1];
1980  if(CSCTightHaloFilterResult){
1982  }
1983  eeBadScFilterResult = METFilterDecision[2];
1984  if(eeBadScFilterResult){
1985  hMET_eeBadScFilter = map_of_MEs[DirName+"/"+"MET_eeBadScFilter"]; if (hMET_eeBadScFilter && hMET_eeBadScFilter->getRootObject()) hMET_eeBadScFilter ->Fill(MET);
1986  }
1987  HBHEIsoNoiseFilterResult = METFilterDecision[3];
1988  if(HBHEIsoNoiseFilterResult){
1990  }
1991  CSCTightHalo2015FilterResult = METFilterDecision[4];
1992  if(CSCTightHalo2015FilterResult){
1994  }
1995  EcalDeadCellTriggerFilterResult = METFilterDecision[5];
1996  if(EcalDeadCellTriggerFilterResult){
1998  }
1999  EcalDeadCellBoundaryFilterResult = METFilterDecision[6];
2000  if(EcalDeadCellBoundaryFilterResult){
2002  }
2003  HcalStripHaloFilterResult = METFilterDecision[7];
2004  if(HcalStripHaloFilterResult){
2006  }
2007  hMETPhi = map_of_MEs[DirName+"/"+"METPhi"]; if (hMETPhi && hMETPhi->getRootObject()) hMETPhi ->Fill(METPhi);
2008  hSumET = map_of_MEs[DirName+"/"+"SumET"]; if (hSumET && hSumET->getRootObject()) hSumET ->Fill(SumET);
2009  hMETSig = map_of_MEs[DirName+"/"+"METSig"]; if (hMETSig && hMETSig->getRootObject()) hMETSig ->Fill(METSig);
2010  hMET_logx = map_of_MEs[DirName+"/"+"MET_logx"]; if (hMET_logx && hMET_logx->getRootObject()) hMET_logx->Fill(log10(MET));
2011  hSumET_logx = map_of_MEs[DirName+"/"+"SumET_logx"]; if (hSumET_logx && hSumET_logx->getRootObject()) hSumET_logx->Fill(log10(SumET));
2012 
2013  // Fill NPV profiles
2014  //--------------------------------------------------------------------------
2015  meMEx_profile = map_of_MEs[DirName + "/MEx_profile"];
2016  meMEy_profile = map_of_MEs[DirName + "/MEy_profile"];
2017  meMET_profile = map_of_MEs[DirName + "/MET_profile"];
2018  meSumET_profile = map_of_MEs[DirName + "/SumET_profile"];
2019 
2020  if (meMEx_profile && meMEx_profile ->getRootObject()) meMEx_profile ->Fill(numPV_, MEx);
2021  if (meMEy_profile && meMEy_profile ->getRootObject()) meMEy_profile ->Fill(numPV_, MEy);
2022  if (meMET_profile && meMET_profile ->getRootObject()) meMET_profile ->Fill(numPV_, MET);
2024 
2025  if(isCaloMet_){
2026  //const reco::CaloMETCollection *calometcol = calometcoll.product();
2027  //const reco::CaloMET *calomet;
2028  //calomet = &(calometcol->front());
2029 
2030  double caloEtFractionHadronic = calomet.etFractionHadronic();
2031  double caloEmEtFraction = calomet.emEtFraction();
2032 
2033  double caloHadEtInHB = calomet.hadEtInHB();
2034  double caloHadEtInHO = calomet.hadEtInHO();
2035  double caloHadEtInHE = calomet.hadEtInHE();
2036  double caloHadEtInHF = calomet.hadEtInHF();
2037  double caloEmEtInEB = calomet.emEtInEB();
2038  double caloEmEtInEE = calomet.emEtInEE();
2039  double caloEmEtInHF = calomet.emEtInHF();
2040 
2041  hCaloHadEtInHB = map_of_MEs[DirName+"/"+"CaloHadEtInHB"]; if (hCaloHadEtInHB && hCaloHadEtInHB->getRootObject()) hCaloHadEtInHB->Fill(caloHadEtInHB);
2042  hCaloHadEtInHO = map_of_MEs[DirName+"/"+"CaloHadEtInHO"]; if (hCaloHadEtInHO && hCaloHadEtInHO->getRootObject()) hCaloHadEtInHO->Fill(caloHadEtInHO);
2043  hCaloHadEtInHE = map_of_MEs[DirName+"/"+"CaloHadEtInHE"]; if (hCaloHadEtInHE && hCaloHadEtInHE->getRootObject()) hCaloHadEtInHE->Fill(caloHadEtInHE);
2044  hCaloHadEtInHF = map_of_MEs[DirName+"/"+"CaloHadEtInHF"]; if (hCaloHadEtInHF && hCaloHadEtInHF->getRootObject()) hCaloHadEtInHF->Fill(caloHadEtInHF);
2045  hCaloEmEtInEB = map_of_MEs[DirName+"/"+"CaloEmEtInEB"]; if (hCaloEmEtInEB && hCaloEmEtInEB->getRootObject()) hCaloEmEtInEB->Fill(caloEmEtInEB);
2046  hCaloEmEtInEE = map_of_MEs[DirName+"/"+"CaloEmEtInEE"]; if (hCaloEmEtInEE && hCaloEmEtInEE->getRootObject()) hCaloEmEtInEE->Fill(caloEmEtInEE);
2047  hCaloEmEtInHF = map_of_MEs[DirName+"/"+"CaloEmEtInHF"]; if (hCaloEmEtInHF && hCaloEmEtInHF->getRootObject()) hCaloEmEtInHF->Fill(caloEmEtInHF);
2048 
2049  hCaloMETPhi020 = map_of_MEs[DirName+"/"+"CaloMETPhi020"]; if (MET> 20. && hCaloMETPhi020 && hCaloMETPhi020->getRootObject()) { hCaloMETPhi020->Fill(METPhi);}
2050 
2051 
2052  hCaloEtFractionHadronic = map_of_MEs[DirName+"/"+"CaloEtFractionHadronic"]; if (hCaloEtFractionHadronic && hCaloEtFractionHadronic->getRootObject()) hCaloEtFractionHadronic->Fill(caloEtFractionHadronic);
2053  hCaloEmEtFraction = map_of_MEs[DirName+"/"+"CaloEmEtFraction"]; if (hCaloEmEtFraction && hCaloEmEtFraction->getRootObject()) hCaloEmEtFraction->Fill(caloEmEtFraction);
2054  hCaloEmEtFraction020 = map_of_MEs[DirName+"/"+"CaloEmEtFraction020"]; if (MET> 20. && hCaloEmEtFraction020 && hCaloEmEtFraction020->getRootObject()) hCaloEmEtFraction020->Fill(caloEmEtFraction);
2055  //if (metCollectionLabel_.label() == "corMetGlobalMuons" ) {
2056 
2057  //for( reco::MuonCollection::const_iterator muonit = muonHandle_->begin(); muonit != muonHandle_->end(); muonit++ ) {
2058  // const reco::TrackRef siTrack = muonit->innerTrack();
2059  // hCalomuPt = map_of_MEs[DirName+"/"+"CalomuonPt"];
2060  // if (hCalomuPt && hCalomuPt->getRootObject()) hCalomuPt->Fill( muonit->p4().pt() );
2061  // hCalomuEta = map_of_MEs[DirName+"/"+"CalomuonEta"]; if (hCalomuEta && hCalomuEta->getRootObject()) hCalomuEta->Fill( muonit->p4().eta() );
2062  // hCalomuNhits = map_of_MEs[DirName+"/"+"CalomuonNhits"]; if (hCalomuNhits && hCalomuNhits->getRootObject()) hCalomuNhits->Fill( siTrack.isNonnull() ? siTrack->numberOfValidHits() : -999 );
2063  // hCalomuChi2 = map_of_MEs[DirName+"/"+"CalomuonNormalizedChi2"]; if (hCalomuChi2 && hCalomuChi2->getRootObject()) hCalomuChi2->Fill( siTrack.isNonnull() ? siTrack->chi2()/siTrack->ndof() : -999 );
2064  // double d0 = siTrack.isNonnull() ? -1 * siTrack->dxy( beamSpot_) : -999;
2065  // hCalomuD0 = map_of_MEs[DirName+"/"+"CalomuonD0"]; if (hCalomuD0 && hCalomuD0->getRootObject()) hCalomuD0->Fill( d0 );
2066  //}
2067 
2068  //const unsigned int nMuons = muonHandle_->size();
2069  //for( unsigned int mus = 0; mus < nMuons; mus++ ) {
2070  // reco::MuonRef muref( muonHandle_, mus);
2071  // reco::MuonMETCorrectionData muCorrData = (*tcMetValueMapHandle_)[muref];
2072  // hCaloMExCorrection = map_of_MEs[DirName+"/"+"CaloMExCorrection"]; if (hCaloMExCorrection && hCaloMExCorrection->getRootObject()) hCaloMExCorrection-> Fill(muCorrData.corrY());
2073  // hCaloMEyCorrection = map_of_MEs[DirName+"/"+"CaloMEyCorrection"]; if (hCaloMEyCorrection && hCaloMEyCorrection->getRootObject()) hCaloMEyCorrection-> Fill(muCorrData.corrX());
2074  // hCaloMuonCorrectionFlag = map_of_MEs[DirName+"/"+"CaloMuonCorrectionFlag"]; if (hCaloMuonCorrectionFlag && hCaloMuonCorrectionFlag->getRootObject()) hCaloMuonCorrectionFlag-> Fill(muCorrData.type());
2075  //}
2076  //}
2077  }
2078 
2079  if(isMiniAODMet_){
2080  if(fillPFCandidatePlots && fillCandidateMap_histos){
2081  // typedef std::vector<reco::PFCandidate> pfCand;
2082  edm::Handle<std::vector<pat::PackedCandidate> > packedParticleFlow;
2083  iEvent.getByToken(pflowPackedToken_, packedParticleFlow);
2084  //11, 13, 22 for el/mu/gamma, 211 chargedHadron, 130 neutralHadrons, 1 and 2 hadHF and EGammaHF
2085  for (unsigned int i = 0; i < packedParticleFlow->size(); i++) {
2086  const pat::PackedCandidate& c = packedParticleFlow->at(i);
2087  for (unsigned int j=0; j<typePFCand_.size(); j++) {
2088  if (fabs(c.pdgId())==typePFCand_[j]) {
2089  //second check for endcap, if inside barrel Max and Min symmetric around 0
2090  if ( ((c.eta()>etaMinPFCand_[j]) && (c.eta()<etaMaxPFCand_[j])) || ((c.eta()> (-etaMaxPFCand_[j])) && (c.eta()< (-etaMinPFCand_[j]))) ){
2091  ptPFCand_[j] = map_of_MEs[DirName + "/"+ptPFCand_name_[j]];
2092  if ( ptPFCand_[j] && ptPFCand_[j]->getRootObject()) ptPFCand_[j]->Fill(c.eta(), c.phi(), c.pt()*c.puppiWeight());
2093  occupancyPFCand_[j] = map_of_MEs[DirName + "/"+occupancyPFCand_name_[j]];
2094  if ( occupancyPFCand_[j] && occupancyPFCand_[j]->getRootObject()) occupancyPFCand_[j]->Fill(c.eta(), c.phi()),c.puppiWeight();
2096  if ( ptPFCand_puppiNolepWeight_[j] && ptPFCand_puppiNolepWeight_[j]->getRootObject()) ptPFCand_puppiNolepWeight_[j]->Fill(c.eta(), c.phi(), c.pt()*c.puppiWeightNoLep());
2099  }
2100  }
2101  }
2102  }
2103  }
2104  }
2105  if(isPFMet_){
2106 
2107  if(fillPFCandidatePlots && fillCandidateMap_histos){
2108  for (unsigned int i=0;i<countsPFCand_.size();i++) {
2109  countsPFCand_[i]=0;
2110  MExPFCand_[i]=0.;
2111  MEyPFCand_[i]=0.;
2112  }
2113 
2114  // typedef std::vector<reco::PFCandidate> pfCand;
2116  iEvent.getByToken(pflowToken_, particleFlow);
2117 
2118  float pt_sum_CHF_Barrel=0;
2119  float pt_sum_CHF_Endcap_plus=0;
2120  float pt_sum_CHF_Endcap_minus=0;
2121  float pt_sum_NHF_Barrel=0;
2122  float pt_sum_NHF_Endcap_plus=0;
2123  float pt_sum_NHF_Endcap_minus=0;
2124  float pt_sum_PhF_Barrel=0;
2125  float pt_sum_PhF_Endcap_plus=0;
2126  float pt_sum_PhF_Endcap_minus=0;
2127  float pt_sum_HFH_plus=0;
2128  float pt_sum_HFH_minus=0;
2129  float pt_sum_HFE_plus=0;
2130  float pt_sum_HFE_minus=0;
2131 
2132  float px_chargedHadronsBarrel=0;
2133  float py_chargedHadronsBarrel=0;
2134  float px_chargedHadronsEndcapPlus=0;
2135  float py_chargedHadronsEndcapPlus=0;
2136  float px_chargedHadronsEndcapMinus=0;
2137  float py_chargedHadronsEndcapMinus=0;
2138  float px_neutralHadronsBarrel=0;
2139  float py_neutralHadronsBarrel=0;
2140  float px_neutralHadronsEndcapPlus=0;
2141  float py_neutralHadronsEndcapPlus=0;
2142  float px_neutralHadronsEndcapMinus=0;
2143  float py_neutralHadronsEndcapMinus=0;
2144  float px_PhotonsBarrel=0;
2145  float py_PhotonsBarrel=0;
2146  float px_PhotonsEndcapPlus=0;
2147  float py_PhotonsEndcapPlus=0;
2148  float px_PhotonsEndcapMinus=0;
2149  float py_PhotonsEndcapMinus=0;
2150  float px_HFHadronsPlus=0;
2151  float py_HFHadronsPlus=0;
2152  float px_HFHadronsMinus=0;
2153  float py_HFHadronsMinus=0;
2154  float px_HFEGammasPlus=0;
2155  float py_HFEGammasPlus=0;
2156  float px_HFEGammasMinus=0;
2157  float py_HFEGammasMinus=0;
2158  for (unsigned int i = 0; i < particleFlow->size(); i++) {
2159  const reco::PFCandidate& c = particleFlow->at(i);
2160  if(c.particleId()==1){//charged hadrons
2161  //endcap minus
2162  if(c.eta()>(-3.0)&& c.eta()<(-1.392)){
2163  px_chargedHadronsEndcapMinus-=c.px();
2164  py_chargedHadronsEndcapMinus-=c.py();
2165  pt_sum_CHF_Endcap_minus+=c.et();
2166  }else if(c.eta()>=(-1.392)&& c.eta()<=1.392){//barrel
2167  px_chargedHadronsBarrel-=c.px();
2168  py_chargedHadronsBarrel-=c.py();
2169  pt_sum_CHF_Barrel+=c.et();
2170  }else if(c.eta()>1.392 && c.eta()<3.0){//endcap plus
2171  px_chargedHadronsEndcapPlus-=c.px();
2172  py_chargedHadronsEndcapPlus-=c.py();
2173  pt_sum_CHF_Endcap_plus+=c.et();
2174  }
2175  }
2176  if(c.particleId()==5){//neutral hadrons
2177  //endcap minus
2178  if(c.eta()>(-3.0)&& c.eta()<(-1.392)){
2179  px_neutralHadronsEndcapMinus-=c.px();
2180  py_neutralHadronsEndcapMinus-=c.py();
2181  pt_sum_NHF_Endcap_minus+=c.et();
2182  }else if(c.eta()>=(-1.392)&& c.eta()<=1.392){
2183  px_neutralHadronsBarrel-=c.px();
2184  py_neutralHadronsBarrel-=c.py();
2185  pt_sum_NHF_Barrel+=c.et();
2186  }else if(c.eta()>1.392 && c.eta()<3.0){
2187  px_neutralHadronsEndcapPlus-=c.px();
2188  py_neutralHadronsEndcapPlus-=c.py();
2189  pt_sum_NHF_Endcap_plus+=c.et();
2190  }
2191  }
2192  if(c.particleId()==4){//photons
2193  //endcap minus
2194  if(c.eta()>(-3.0)&& c.eta()<(-1.479)){
2195  px_PhotonsEndcapMinus-=c.px();
2196  py_PhotonsEndcapMinus-=c.py();
2197  pt_sum_PhF_Endcap_minus+=c.et();
2198  }else if(c.eta()>=(-1.479)&& c.eta()<=1.479){
2199  px_PhotonsBarrel-=c.px();
2200  py_PhotonsBarrel-=c.py();
2201  pt_sum_PhF_Barrel+=c.et();
2202  }else if(c.eta()>1.479 && c.eta()<3.0){
2203  px_PhotonsEndcapPlus-=c.px();
2204  py_PhotonsEndcapPlus-=c.py();
2205  pt_sum_PhF_Endcap_plus+=c.et();
2206  }
2207  }
2208  if(c.particleId()==6){//HFHadrons
2209  //forward minus
2210  if(c.eta()>(-5.20)&& c.eta()<-2.901376){
2211  pt_sum_HFH_minus+=c.et();
2212  px_HFHadronsMinus-=c.px();
2213  py_HFHadronsMinus-=c.py();
2214  }else if(c.eta()>2.901376 && c.eta()<5.20){//forward plus
2215  px_HFHadronsPlus-=c.px();
2216  py_HFHadronsPlus-=c.py();
2217  pt_sum_HFH_plus+=c.et();
2218  }
2219  }
2220  if(c.particleId()==7){//HFEGammas
2221  //forward minus
2222  if(c.eta()>(-5.20)&& c.eta()<-2.901376){
2223  pt_sum_HFE_minus+=c.et();
2224  px_HFEGammasMinus-=c.px();
2225  py_HFEGammasMinus-=c.py();
2226  }else if(c.eta()>2.901376 && c.eta()<5.20){//forward plus
2227  px_HFEGammasPlus-=c.px();
2228  py_HFEGammasPlus-=c.py();
2229  pt_sum_HFE_plus+=c.et();
2230  }
2231  }
2232  for (unsigned int j=0; j<typePFCand_.size(); j++) {
2233  if (c.particleId()==typePFCand_[j]) {
2234  //second check for endcap, if inside barrel Max and Min symmetric around 0
2235  if ( ((c.eta()>etaMinPFCand_[j]) && (c.eta()<etaMaxPFCand_[j])) || ((c.eta()> (-etaMaxPFCand_[j])) && (c.eta()< (-etaMinPFCand_[j]))) ){
2236  countsPFCand_[j]+=1;
2237  MExPFCand_[j]-=c.px();
2238  MEyPFCand_[j]-=c.py();
2239  ptPFCand_[j] = map_of_MEs[DirName + "/"+ptPFCand_name_[j]];
2240  if ( ptPFCand_[j] && ptPFCand_[j]->getRootObject()) ptPFCand_[j]->Fill(c.eta(), c.phi(), c.pt());
2241  occupancyPFCand_[j] = map_of_MEs[DirName + "/"+occupancyPFCand_name_[j]];
2242  if ( occupancyPFCand_[j] && occupancyPFCand_[j]->getRootObject()) occupancyPFCand_[j]->Fill(c.eta(), c.phi());
2243  }
2244  }
2245  }
2246  //fill quantities for isolated charged hadron quantities
2247  //only for charged hadrons
2248  if ( c.particleId() == 1 && c.pt() > ptMinCand_ ){
2249  // At least 1 GeV in HCAL
2250  double ecalRaw = c.rawEcalEnergy();
2251  double hcalRaw = c.rawHcalEnergy();
2252  if ( (ecalRaw + hcalRaw) > hcalMin_ ){
2253  const PFCandidate::ElementsInBlocks& theElements = c.elementsInBlocks();
2254  if( theElements.empty() ) continue;
2255  unsigned int iTrack=-999;
2256  std::vector<unsigned int> iECAL;// =999;
2257  std::vector<unsigned int> iHCAL;// =999;
2258  const reco::PFBlockRef blockRef = theElements[0].first;
2259  const edm::OwnVector<reco::PFBlockElement>& elements = blockRef->elements();
2260  // Check that there is only one track in the block.
2261  unsigned int nTracks = 0;
2262  for(unsigned int iEle=0; iEle<elements.size(); iEle++) {
2263  // Find the tracks in the block
2264  PFBlockElement::Type type = elements[iEle].type();
2265  switch( type ) {
2266  case PFBlockElement::TRACK:
2267  iTrack = iEle;
2268  nTracks++;
2269  break;
2270  case PFBlockElement::ECAL:
2271  iECAL.push_back( iEle );
2272  break;
2273  case PFBlockElement::HCAL:
2274  iHCAL.push_back( iEle );
2275  break;
2276  default:
2277  continue;
2278  }
2279  }
2280  if ( nTracks == 1 ){
2281  // Characteristics of the track
2282  const reco::PFBlockElementTrack& et = dynamic_cast<const reco::PFBlockElementTrack &>( elements[iTrack] );
2283  mProfileIsoPFChHad_TrackOccupancy=map_of_MEs[DirName+"/"+"IsoPfChHad_Track_profile"];
2285  mProfileIsoPFChHad_TrackPt=map_of_MEs[DirName+"/"+"IsoPfChHad_TrackPt"];
2287  //ECAL element
2288  for(unsigned int ii=0;ii<iECAL.size();ii++) {
2289  const reco::PFBlockElementCluster& eecal = dynamic_cast<const reco::PFBlockElementCluster &>( elements[ iECAL[ii] ] );
2290  if(fabs(eecal.clusterRef()->eta())<1.479){
2291  mProfileIsoPFChHad_EcalOccupancyCentral=map_of_MEs[DirName+"/"+"IsoPfChHad_ECAL_profile_central"];
2293  mProfileIsoPFChHad_EMPtCentral=map_of_MEs[DirName+"/"+"IsoPfChHad_EMPt_central"];
2295  }else{
2296  mProfileIsoPFChHad_EcalOccupancyEndcap=map_of_MEs[DirName+"/"+"IsoPfChHad_ECAL_profile_endcap"];
2298  mProfileIsoPFChHad_EMPtEndcap=map_of_MEs[DirName+"/"+"IsoPfChHad_EMPt_endcap"];
2300  }
2301  }
2302 
2303  //HCAL element
2304  for(unsigned int ii=0;ii<iHCAL.size();ii++) {
2305  const reco::PFBlockElementCluster& ehcal = dynamic_cast<const reco::PFBlockElementCluster &>( elements[ iHCAL[ii] ] );
2306  if(fabs(ehcal.clusterRef()->eta())<1.740){
2307  mProfileIsoPFChHad_HcalOccupancyCentral=map_of_MEs[DirName+"/"+"IsoPfChHad_HCAL_profile_central"];
2309  mProfileIsoPFChHad_HadPtCentral=map_of_MEs[DirName+"/"+"IsoPfChHad_HadPt_central"];
2311  }else{
2312  mProfileIsoPFChHad_HcalOccupancyEndcap=map_of_MEs[DirName+"/"+"IsoPfChHad_HCAL_profile_endcap"];
2314  mProfileIsoPFChHad_HadPtEndcap=map_of_MEs[DirName+"/"+"IsoPfChHad_HadPt_endcap"];
2316  }
2317  }
2318  }
2319  }
2320  }
2321  }
2322 
2323  for (unsigned int j=0; j<countsPFCand_.size(); j++) {
2324  profilePFCand_x_[j] = map_of_MEs[DirName + "/"+profilePFCand_x_name_[j]];
2325  if(profilePFCand_x_[j] && profilePFCand_x_[j]->getRootObject()) profilePFCand_x_[j]->Fill(countsPFCand_[j], MExPFCand_[j]);
2326  profilePFCand_y_[j] = map_of_MEs[DirName + "/"+profilePFCand_y_name_[j]];
2327  if(profilePFCand_y_[j] && profilePFCand_y_[j]->getRootObject()) profilePFCand_y_[j]->Fill(countsPFCand_[j], MEyPFCand_[j]);
2328  multiplicityPFCand_[j] = map_of_MEs[DirName + "/"+multiplicityPFCand_name_[j]];
2329  if(multiplicityPFCand_[j] && multiplicityPFCand_[j]->getRootObject()) multiplicityPFCand_[j]->Fill(countsPFCand_[j]);
2330  }
2331  meCHF_Barrel=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionBarrel"]; if(meCHF_Barrel && meCHF_Barrel->getRootObject()) meCHF_Barrel->Fill(pt_sum_CHF_Barrel/pfmet.sumEt());
2332  meCHF_EndcapPlus=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionEndcapPlus"]; if(meCHF_EndcapPlus && meCHF_EndcapPlus->getRootObject()) meCHF_EndcapPlus->Fill(pt_sum_CHF_Endcap_plus/pfmet.sumEt());
2333  meCHF_EndcapMinus=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionEndcapMinus"]; if(meCHF_EndcapMinus && meCHF_EndcapMinus->getRootObject()) meCHF_EndcapMinus->Fill(pt_sum_CHF_Endcap_minus/pfmet.sumEt());
2334  meNHF_Barrel=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionBarrel"]; if(meNHF_Barrel && meNHF_Barrel->getRootObject()) meNHF_Barrel->Fill(pt_sum_NHF_Barrel/pfmet.sumEt());
2335  meNHF_EndcapPlus=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionEndcapPlus"]; if(meNHF_EndcapPlus && meNHF_EndcapPlus->getRootObject()) meNHF_EndcapPlus->Fill(pt_sum_NHF_Endcap_plus/pfmet.sumEt());
2336  meNHF_EndcapMinus=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionEndcapMinus"]; if(meNHF_EndcapMinus && meNHF_EndcapMinus->getRootObject()) meNHF_EndcapMinus->Fill(pt_sum_NHF_Endcap_minus/pfmet.sumEt());
2337  mePhF_Barrel=map_of_MEs[DirName+"/"+"PfPhotonEtFractionBarrel"]; if(mePhF_Barrel && mePhF_Barrel->getRootObject()) mePhF_Barrel->Fill(pt_sum_PhF_Barrel/pfmet.sumEt());
2338  mePhF_EndcapPlus=map_of_MEs[DirName+"/"+"PfPhotonEtFractionEndcapPlus"]; if(mePhF_EndcapPlus && mePhF_EndcapPlus->getRootObject()) mePhF_EndcapPlus->Fill(pt_sum_PhF_Endcap_plus/pfmet.sumEt());
2339  mePhF_EndcapMinus=map_of_MEs[DirName+"/"+"PfPhotonEtFractionEndcapMinus"]; if(mePhF_EndcapMinus && mePhF_EndcapMinus->getRootObject()) mePhF_EndcapMinus->Fill(pt_sum_PhF_Endcap_minus/pfmet.sumEt());
2340  meHFHadF_Plus=map_of_MEs[DirName+"/"+"PfHFHadronEtFractionPlus"]; if(meHFHadF_Plus && meHFHadF_Plus->getRootObject()) meHFHadF_Plus->Fill(pt_sum_HFH_plus/pfmet.sumEt());
2341  meHFHadF_Minus=map_of_MEs[DirName+"/"+"PfHFHadronEtFractionMinus"]; if(meHFHadF_Minus && meHFHadF_Minus->getRootObject()) meHFHadF_Minus->Fill(pt_sum_HFH_minus/pfmet.sumEt());
2342  meHFEMF_Plus=map_of_MEs[DirName+"/"+"PfHFEMEtFractionPlus"]; if(meHFEMF_Plus && meHFEMF_Plus->getRootObject()) meHFEMF_Plus->Fill(pt_sum_HFE_plus/pfmet.sumEt());
2343  meHFEMF_Minus=map_of_MEs[DirName+"/"+"PfHFEMEtFractionMinus"]; if(meHFEMF_Minus && meHFEMF_Minus->getRootObject()) meHFEMF_Minus->Fill(pt_sum_HFE_minus/pfmet.sumEt());
2344  //sanity check if we have any type of the respective species in the events
2345  //else don't fill phi, as else we have a results of a biased peak at 0
2346  //if pt_sum of species part is 0, obviously that would be the case
2347  if(pt_sum_CHF_Barrel){
2348  meMETPhiChargedHadronsBarrel = map_of_MEs[DirName+"/"+"METPhiChargedHadronsBarrel"];if(meMETPhiChargedHadronsBarrel && meMETPhiChargedHadronsBarrel ->getRootObject())meMETPhiChargedHadronsBarrel->Fill(atan2(py_chargedHadronsBarrel,px_chargedHadronsBarrel));
2349  }
2350  if(pt_sum_CHF_Endcap_plus){
2351  meMETPhiChargedHadronsEndcapPlus = map_of_MEs[DirName+"/"+"METPhiChargedHadronsEndcapPlus"];if(meMETPhiChargedHadronsEndcapPlus && meMETPhiChargedHadronsEndcapPlus ->getRootObject())meMETPhiChargedHadronsEndcapPlus->Fill(atan2(py_chargedHadronsEndcapPlus,px_chargedHadronsEndcapPlus));
2352  }
2353  if(pt_sum_CHF_Endcap_minus){
2354  meMETPhiChargedHadronsEndcapMinus = map_of_MEs[DirName+"/"+"METPhiChargedHadronsEndcapMinus"];if(meMETPhiChargedHadronsEndcapMinus && meMETPhiChargedHadronsEndcapMinus ->getRootObject())meMETPhiChargedHadronsEndcapMinus->Fill(atan2(py_chargedHadronsEndcapMinus,px_chargedHadronsEndcapMinus));
2355  }
2356  if(pt_sum_NHF_Barrel){
2357  meMETPhiNeutralHadronsBarrel = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsBarrel"];if(meMETPhiNeutralHadronsBarrel && meMETPhiNeutralHadronsBarrel ->getRootObject())meMETPhiNeutralHadronsBarrel->Fill(atan2(py_neutralHadronsBarrel,px_neutralHadronsBarrel));
2358  }
2359  if(pt_sum_NHF_Endcap_plus){
2360  meMETPhiNeutralHadronsEndcapPlus = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsEndcapPlus"];if(meMETPhiNeutralHadronsEndcapPlus && meMETPhiNeutralHadronsEndcapPlus ->getRootObject())meMETPhiNeutralHadronsEndcapPlus->Fill(atan2(py_neutralHadronsEndcapPlus,px_neutralHadronsEndcapPlus));
2361  }
2362  if(pt_sum_NHF_Endcap_minus){
2363  meMETPhiNeutralHadronsEndcapMinus = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsEndcapMinus"];if(meMETPhiNeutralHadronsEndcapMinus && meMETPhiNeutralHadronsEndcapMinus ->getRootObject())meMETPhiNeutralHadronsEndcapMinus->Fill(atan2(py_neutralHadronsEndcapMinus,px_neutralHadronsEndcapMinus));
2364  }
2365  if(pt_sum_PhF_Barrel){
2366  meMETPhiPhotonsBarrel = map_of_MEs[DirName+"/"+"METPhiPhotonsBarrel"];if(meMETPhiPhotonsBarrel && meMETPhiPhotonsBarrel ->getRootObject())meMETPhiPhotonsBarrel->Fill(atan2(py_PhotonsBarrel,px_PhotonsBarrel));
2367  }
2368  if(pt_sum_PhF_Endcap_plus){
2369  meMETPhiPhotonsEndcapPlus = map_of_MEs[DirName+"/"+"METPhiPhotonsEndcapPlus"];if(meMETPhiPhotonsEndcapPlus && meMETPhiPhotonsEndcapPlus ->getRootObject())meMETPhiPhotonsEndcapPlus->Fill(atan2(py_PhotonsEndcapPlus,px_PhotonsEndcapPlus));
2370  }
2371  if(pt_sum_PhF_Endcap_minus){
2372  meMETPhiPhotonsEndcapMinus = map_of_MEs[DirName+"/"+"METPhiPhotonsEndcapMinus"];if(meMETPhiPhotonsEndcapMinus && meMETPhiPhotonsEndcapMinus ->getRootObject())meMETPhiPhotonsEndcapMinus->Fill(atan2(py_PhotonsEndcapMinus,px_PhotonsEndcapMinus));
2373  }
2374  if(pt_sum_HFH_plus){
2375  meMETPhiHFHadronsPlus = map_of_MEs[DirName+"/"+"METPhiHFHadronsPlus"];if(meMETPhiHFHadronsPlus && meMETPhiHFHadronsPlus ->getRootObject())meMETPhiHFHadronsPlus->Fill(atan2(py_HFHadronsPlus,px_HFHadronsPlus));
2376  }
2377  if(pt_sum_HFH_minus){
2378  meMETPhiHFHadronsMinus = map_of_MEs[DirName+"/"+"METPhiHFHadronsMinus"];if(meMETPhiHFHadronsMinus && meMETPhiHFHadronsMinus ->getRootObject())meMETPhiHFHadronsMinus->Fill(atan2(py_HFHadronsMinus,px_HFHadronsMinus));
2379  }
2380  if(pt_sum_HFE_plus){
2381  meMETPhiHFEGammasPlus = map_of_MEs[DirName+"/"+"METPhiHFEGammasPlus"];if(meMETPhiHFEGammasPlus && meMETPhiHFEGammasPlus ->getRootObject())meMETPhiHFEGammasPlus->Fill(atan2(py_HFEGammasPlus,px_HFEGammasPlus));
2382  }
2383  if(pt_sum_HFE_minus){
2384  meMETPhiHFEGammasMinus = map_of_MEs[DirName+"/"+"METPhiHFEGammasMinus"];if(meMETPhiHFEGammasMinus && meMETPhiHFEGammasMinus ->getRootObject())meMETPhiHFEGammasMinus->Fill(atan2(py_HFEGammasMinus,px_HFEGammasMinus));
2385  }
2386  //fill other diagnostic plots based on trigger decision
2387  /*if(techTriggerCase[0]){//techTriggerResultBx0 && techTriggerResultBxM2 && techTriggerResultBxM1 -> both previous bunches filled
2388  meCHF_Barrel_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionBarrel_BXm2BXm1Filled"]; if(meCHF_Barrel_BXm2BXm1Filled && meCHF_Barrel_BXm2BXm1Filled->getRootObject()) meCHF_Barrel_BXm2BXm1Filled->Fill(pt_sum_CHF_Barrel/pfmet.sumEt());
2389  meCHF_EndcapPlus_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionEndcapPlus_BXm2BXm1Filled"]; if(meCHF_EndcapPlus_BXm2BXm1Filled && meCHF_EndcapPlus_BXm2BXm1Filled->getRootObject()) meCHF_EndcapPlus_BXm2BXm1Filled->Fill(pt_sum_CHF_Endcap_plus/pfmet.sumEt());
2390  meCHF_EndcapMinus_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionEndcapMinus_BXm2BXm1Filled"]; if(meCHF_EndcapMinus_BXm2BXm1Filled && meCHF_EndcapMinus_BXm2BXm1Filled->getRootObject()) meCHF_EndcapMinus_BXm2BXm1Filled->Fill(pt_sum_CHF_Endcap_minus/pfmet.sumEt());
2391  meNHF_Barrel_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionBarrel_BXm2BXm1Filled"]; if(meNHF_Barrel_BXm2BXm1Filled && meNHF_Barrel_BXm2BXm1Filled->getRootObject()) meNHF_Barrel_BXm2BXm1Filled->Fill(pt_sum_NHF_Barrel/pfmet.sumEt());
2392  meNHF_EndcapPlus_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionEndcapPlus_BXm2BXm1Filled"]; if(meNHF_EndcapPlus_BXm2BXm1Filled && meNHF_EndcapPlus_BXm2BXm1Filled->getRootObject()) meNHF_EndcapPlus_BXm2BXm1Filled->Fill(pt_sum_NHF_Endcap_plus/pfmet.sumEt());
2393  meNHF_EndcapMinus_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionEndcapMinus_BXm2BXm1Filled"]; if(meNHF_EndcapMinus_BXm2BXm1Filled && meNHF_EndcapMinus_BXm2BXm1Filled->getRootObject()) meNHF_EndcapMinus_BXm2BXm1Filled->Fill(pt_sum_NHF_Endcap_minus/pfmet.sumEt());
2394  mePhF_Barrel_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfPhotonEtFractionBarrel_BXm2BXm1Filled"]; if(mePhF_Barrel_BXm2BXm1Filled && mePhF_Barrel_BXm2BXm1Filled->getRootObject()) mePhF_Barrel_BXm2BXm1Filled->Fill(pt_sum_PhF_Barrel/pfmet.sumEt());
2395  mePhF_EndcapPlus_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfPhotonEtFractionEndcapPlus_BXm2BXm1Filled"]; if(mePhF_EndcapPlus_BXm2BXm1Filled && mePhF_EndcapPlus_BXm2BXm1Filled->getRootObject()) mePhF_EndcapPlus_BXm2BXm1Filled->Fill(pt_sum_PhF_Endcap_plus/pfmet.sumEt());
2396  mePhF_EndcapMinus_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfPhotonEtFractionEndcapMinus_BXm2BXm1Filled"]; if(mePhF_EndcapMinus_BXm2BXm1Filled && mePhF_EndcapMinus_BXm2BXm1Filled->getRootObject()) mePhF_EndcapMinus_BXm2BXm1Filled->Fill(pt_sum_PhF_Endcap_minus/pfmet.sumEt());
2397  meHFHadF_Plus_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfHFHadronEtFractionPlus_BXm2BXm1Filled"]; if(meHFHadF_Plus_BXm2BXm1Filled && meHFHadF_Plus_BXm2BXm1Filled->getRootObject()) meHFHadF_Plus_BXm2BXm1Filled->Fill(pt_sum_HFH_plus/pfmet.sumEt());
2398  meHFHadF_Minus_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfHFHadronEtFractionMinus_BXm2BXm1Filled"]; if(meHFHadF_Minus_BXm2BXm1Filled && meHFHadF_Minus_BXm2BXm1Filled->getRootObject()) meHFHadF_Minus_BXm2BXm1Filled->Fill(pt_sum_HFH_minus/pfmet.sumEt());
2399  meHFEMF_Plus_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfHFEMEtFractionPlus_BXm2BXm1Filled"]; if(meHFEMF_Plus_BXm2BXm1Filled && meHFEMF_Plus_BXm2BXm1Filled->getRootObject()) meHFEMF_Plus_BXm2BXm1Filled->Fill(pt_sum_HFE_plus/pfmet.sumEt());
2400  meHFEMF_Minus_BXm2BXm1Filled=map_of_MEs[DirName+"/"+"PfHFEMEtFractionMinus_BXm2BXm1Filled"]; if(meHFEMF_Minus_BXm2BXm1Filled && meHFEMF_Minus_BXm2BXm1Filled->getRootObject()) meHFEMF_Minus_BXm2BXm1Filled->Fill(pt_sum_HFE_minus/pfmet.sumEt());
2401  mePhotonEtFraction_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PfPhotonEtFraction_BXm2BXm1Filled"]; if ( mePhotonEtFraction_BXm2BXm1Filled && mePhotonEtFraction_BXm2BXm1Filled ->getRootObject()) mePhotonEtFraction_BXm2BXm1Filled ->Fill(pfmet.photonEtFraction());
2402  meNeutralHadronEtFraction_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PfNeutralHadronEtFraction_BXm2BXm1Filled"]; if ( meNeutralHadronEtFraction_BXm2BXm1Filled && meNeutralHadronEtFraction_BXm2BXm1Filled ->getRootObject()) meNeutralHadronEtFraction_BXm2BXm1Filled ->Fill(pfmet.neutralHadronEtFraction());
2403  meChargedHadronEtFraction_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"PfChargedHadronEtFraction_BXm2BXm1Filled"]; if ( meChargedHadronEtFraction_BXm2BXm1Filled && meChargedHadronEtFraction_BXm2BXm1Filled ->getRootObject()) meChargedHadronEtFraction_BXm2BXm1Filled ->Fill(pfmet.chargedHadronEtFraction());
2404  meMET_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"MET_BXm2BXm1Filled"]; if ( meMET_BXm2BXm1Filled && meMET_BXm2BXm1Filled ->getRootObject()) meMET_BXm2BXm1Filled ->Fill(pfmet.pt());
2405  meSumET_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"SumET_BXm2BXm1Filled"]; if ( meSumET_BXm2BXm1Filled && meSumET_BXm2BXm1Filled ->getRootObject()) meSumET_BXm2BXm1Filled ->Fill(pfmet.sumEt());
2406  if(pt_sum_CHF_Barrel){
2407  meMETPhiChargedHadronsBarrel_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiChargedHadronsBarrel_BXm2BXm1Filled"];if(meMETPhiChargedHadronsBarrel_BXm2BXm1Filled && meMETPhiChargedHadronsBarrel_BXm2BXm1Filled ->getRootObject())meMETPhiChargedHadronsBarrel_BXm2BXm1Filled->Fill(atan2(py_chargedHadronsBarrel,px_chargedHadronsBarrel));
2408  }
2409  if(pt_sum_CHF_Endcap_plus){
2410  meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiChargedHadronsEndcapPlus_BXm2BXm1Filled"];if(meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Filled && meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Filled ->getRootObject())meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Filled->Fill(atan2(py_chargedHadronsEndcapPlus,px_chargedHadronsEndcapPlus));
2411  }
2412  if(pt_sum_CHF_Endcap_minus){
2413  meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiChargedHadronsEndcapMinus_BXm2BXm1Filled"];if(meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Filled && meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Filled ->getRootObject())meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Filled->Fill(atan2(py_chargedHadronsEndcapMinus,px_chargedHadronsEndcapMinus));
2414  }
2415  if(pt_sum_NHF_Barrel){
2416  meMETPhiNeutralHadronsBarrel_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsBarrel_BXm2BXm1Filled"];if(meMETPhiNeutralHadronsBarrel_BXm2BXm1Filled && meMETPhiNeutralHadronsBarrel_BXm2BXm1Filled ->getRootObject())meMETPhiNeutralHadronsBarrel_BXm2BXm1Filled->Fill(atan2(py_neutralHadronsBarrel,px_neutralHadronsBarrel));
2417  }
2418  if(pt_sum_NHF_Endcap_plus){
2419  meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsEndcapPlus_BXm2BXm1Filled"];if(meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Filled && meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Filled ->getRootObject())meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Filled->Fill(atan2(py_neutralHadronsEndcapPlus,px_neutralHadronsEndcapPlus));
2420  }
2421  if(pt_sum_NHF_Endcap_minus){
2422  meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsEndcapMinus_BXm2BXm1Filled"];if(meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Filled && meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Filled ->getRootObject())meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Filled->Fill(atan2(py_neutralHadronsEndcapMinus,px_neutralHadronsEndcapMinus));
2423  }
2424  if(pt_sum_PhF_Barrel){
2425  meMETPhiPhotonsBarrel_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiPhotonsBarrel_BXm2BXm1Filled"];if(meMETPhiPhotonsBarrel_BXm2BXm1Filled && meMETPhiPhotonsBarrel_BXm2BXm1Filled ->getRootObject())meMETPhiPhotonsBarrel_BXm2BXm1Filled->Fill(atan2(py_PhotonsBarrel,px_PhotonsBarrel));
2426  }
2427  if(pt_sum_PhF_Endcap_plus){
2428  meMETPhiPhotonsEndcapPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiPhotonsEndcapPlus_BXm2BXm1Filled"];if(meMETPhiPhotonsEndcapPlus_BXm2BXm1Filled && meMETPhiPhotonsEndcapPlus_BXm2BXm1Filled ->getRootObject())meMETPhiPhotonsEndcapPlus_BXm2BXm1Filled->Fill(atan2(py_PhotonsEndcapPlus,px_PhotonsEndcapPlus));
2429  }
2430  if(pt_sum_PhF_Endcap_minus){
2431  meMETPhiPhotonsEndcapMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiPhotonsEndcapMinus_BXm2BXm1Filled"];if(meMETPhiPhotonsEndcapMinus_BXm2BXm1Filled && meMETPhiPhotonsEndcapMinus_BXm2BXm1Filled ->getRootObject())meMETPhiPhotonsEndcapMinus_BXm2BXm1Filled->Fill(atan2(py_PhotonsEndcapMinus,px_PhotonsEndcapMinus));
2432  }
2433  if(pt_sum_HFH_plus){
2434  meMETPhiHFHadronsPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiHFHadronsPlus_BXm2BXm1Filled"];if(meMETPhiHFHadronsPlus_BXm2BXm1Filled && meMETPhiHFHadronsPlus_BXm2BXm1Filled ->getRootObject())meMETPhiHFHadronsPlus_BXm2BXm1Filled->Fill(atan2(py_HFHadronsPlus,px_HFHadronsPlus));
2435  }
2436  if(pt_sum_HFH_minus){
2437  meMETPhiHFHadronsMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiHFHadronsMinus_BXm2BXm1Filled"];if(meMETPhiHFHadronsMinus_BXm2BXm1Filled && meMETPhiHFHadronsMinus_BXm2BXm1Filled ->getRootObject())meMETPhiHFHadronsMinus_BXm2BXm1Filled->Fill(atan2(py_HFHadronsMinus,px_HFHadronsMinus));
2438  }
2439  if(pt_sum_HFE_plus){
2440  meMETPhiHFEGammasPlus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiHFEGammasPlus_BXm2BXm1Filled"];if(meMETPhiHFEGammasPlus_BXm2BXm1Filled && meMETPhiHFEGammasPlus_BXm2BXm1Filled ->getRootObject())meMETPhiHFEGammasPlus_BXm2BXm1Filled->Fill(atan2(py_HFEGammasPlus,px_HFEGammasPlus));
2441  }
2442  if(pt_sum_HFE_minus){
2443  meMETPhiHFEGammasMinus_BXm2BXm1Filled = map_of_MEs[DirName+"/"+"METPhiHFEGammasMinus_BXm2BXm1Filled"];if(meMETPhiHFEGammasMinus_BXm2BXm1Filled && meMETPhiHFEGammasMinus_BXm2BXm1Filled ->getRootObject())meMETPhiHFEGammasMinus_BXm2BXm1Filled->Fill(atan2(py_HFEGammasMinus,px_HFEGammasMinus));
2444  }
2445  }*/
2446  if(techTriggerCase[1]){//techTriggerResultBx0 && techTriggerResultBxM1 -> previous bunch filled
2447  meCHF_Barrel_BXm1Filled=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionBarrel_BXm1Filled"]; if(meCHF_Barrel_BXm1Filled && meCHF_Barrel_BXm1Filled->getRootObject()) meCHF_Barrel_BXm1Filled->Fill(pt_sum_CHF_Barrel/pfmet.sumEt());
2448  meCHF_EndcapPlus_BXm1Filled=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionEndcapPlus_BXm1Filled"]; if(meCHF_EndcapPlus_BXm1Filled && meCHF_EndcapPlus_BXm1Filled->getRootObject()) meCHF_EndcapPlus_BXm1Filled->Fill(pt_sum_CHF_Endcap_plus/pfmet.sumEt());
2449  meCHF_EndcapMinus_BXm1Filled=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionEndcapMinus_BXm1Filled"]; if(meCHF_EndcapMinus_BXm1Filled && meCHF_EndcapMinus_BXm1Filled->getRootObject()) meCHF_EndcapMinus_BXm1Filled->Fill(pt_sum_CHF_Endcap_minus/pfmet.sumEt());
2450  meNHF_Barrel_BXm1Filled=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionBarrel_BXm1Filled"]; if(meNHF_Barrel_BXm1Filled && meNHF_Barrel_BXm1Filled->getRootObject()) meNHF_Barrel_BXm1Filled->Fill(pt_sum_NHF_Barrel/pfmet.sumEt());
2451  meNHF_EndcapPlus_BXm1Filled=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionEndcapPlus_BXm1Filled"]; if(meNHF_EndcapPlus_BXm1Filled && meNHF_EndcapPlus_BXm1Filled->getRootObject()) meNHF_EndcapPlus_BXm1Filled->Fill(pt_sum_NHF_Endcap_plus/pfmet.sumEt());
2452  meNHF_EndcapMinus_BXm1Filled=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionEndcapMinus_BXm1Filled"]; if(meNHF_EndcapMinus_BXm1Filled && meNHF_EndcapMinus_BXm1Filled->getRootObject()) meNHF_EndcapMinus_BXm1Filled->Fill(pt_sum_NHF_Endcap_minus/pfmet.sumEt());
2453  mePhF_Barrel_BXm1Filled=map_of_MEs[DirName+"/"+"PfPhotonEtFractionBarrel_BXm1Filled"]; if(mePhF_Barrel_BXm1Filled && mePhF_Barrel_BXm1Filled->getRootObject()) mePhF_Barrel_BXm1Filled->Fill(pt_sum_PhF_Barrel/pfmet.sumEt());
2454  mePhF_EndcapPlus_BXm1Filled=map_of_MEs[DirName+"/"+"PfPhotonEtFractionEndcapPlus_BXm1Filled"]; if(mePhF_EndcapPlus_BXm1Filled && mePhF_EndcapPlus_BXm1Filled->getRootObject()) mePhF_EndcapPlus_BXm1Filled->Fill(pt_sum_PhF_Endcap_plus/pfmet.sumEt());
2455  mePhF_EndcapMinus_BXm1Filled=map_of_MEs[DirName+"/"+"PfPhotonEtFractionEndcapMinus_BXm1Filled"]; if(mePhF_EndcapMinus_BXm1Filled && mePhF_EndcapMinus_BXm1Filled->getRootObject()) mePhF_EndcapMinus_BXm1Filled->Fill(pt_sum_PhF_Endcap_minus/pfmet.sumEt());
2456  meHFHadF_Plus_BXm1Filled=map_of_MEs[DirName+"/"+"PfHFHadronEtFractionPlus_BXm1Filled"]; if(meHFHadF_Plus_BXm1Filled && meHFHadF_Plus_BXm1Filled->getRootObject()) meHFHadF_Plus_BXm1Filled->Fill(pt_sum_HFH_plus/pfmet.sumEt());
2457  meHFHadF_Minus_BXm1Filled=map_of_MEs[DirName+"/"+"PfHFHadronEtFractionMinus_BXm1Filled"]; if(meHFHadF_Minus_BXm1Filled && meHFHadF_Minus_BXm1Filled->getRootObject()) meHFHadF_Minus_BXm1Filled->Fill(pt_sum_HFH_minus/pfmet.sumEt());
2458  meHFEMF_Plus_BXm1Filled=map_of_MEs[DirName+"/"+"PfHFEMEtFractionPlus_BXm1Filled"]; if(meHFEMF_Plus_BXm1Filled && meHFEMF_Plus_BXm1Filled->getRootObject()) meHFEMF_Plus_BXm1Filled->Fill(pt_sum_HFE_plus/pfmet.sumEt());
2459  meHFEMF_Minus_BXm1Filled=map_of_MEs[DirName+"/"+"PfHFEMEtFractionMinus_BXm1Filled"]; if(meHFEMF_Minus_BXm1Filled && meHFEMF_Minus_BXm1Filled->getRootObject()) meHFEMF_Minus_BXm1Filled->Fill(pt_sum_HFE_minus/pfmet.sumEt());
2460  mePhotonEtFraction_BXm1Filled = map_of_MEs[DirName+"/"+"PfPhotonEtFraction_BXm1Filled"]; if ( mePhotonEtFraction_BXm1Filled && mePhotonEtFraction_BXm1Filled ->getRootObject()) mePhotonEtFraction_BXm1Filled ->Fill(pfmet.photonEtFraction());
2461  meNeutralHadronEtFraction_BXm1Filled = map_of_MEs[DirName+"/"+"PfNeutralHadronEtFraction_BXm1Filled"]; if ( meNeutralHadronEtFraction_BXm1Filled && meNeutralHadronEtFraction_BXm1Filled ->getRootObject()) meNeutralHadronEtFraction_BXm1Filled ->Fill(pfmet.neutralHadronEtFraction());
2462  meChargedHadronEtFraction_BXm1Filled = map_of_MEs[DirName+"/"+"PfChargedHadronEtFraction_BXm1Filled"]; if ( meChargedHadronEtFraction_BXm1Filled && meChargedHadronEtFraction_BXm1Filled ->getRootObject()) meChargedHadronEtFraction_BXm1Filled ->Fill(pfmet.chargedHadronEtFraction());
2463  meMET_BXm1Filled = map_of_MEs[DirName+"/"+"MET_BXm1Filled"]; if ( meMET_BXm1Filled && meMET_BXm1Filled ->getRootObject()) meMET_BXm1Filled ->Fill(pfmet.pt());
2464  meSumET_BXm1Filled = map_of_MEs[DirName+"/"+"SumET_BXm1Filled"]; if ( meSumET_BXm1Filled && meSumET_BXm1Filled ->getRootObject()) meSumET_BXm1Filled ->Fill(pfmet.sumEt());
2465  if(pt_sum_CHF_Barrel){
2466  meMETPhiChargedHadronsBarrel_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiChargedHadronsBarrel_BXm1Filled"];if(meMETPhiChargedHadronsBarrel_BXm1Filled && meMETPhiChargedHadronsBarrel_BXm1Filled ->getRootObject())meMETPhiChargedHadronsBarrel_BXm1Filled->Fill(atan2(py_chargedHadronsBarrel,px_chargedHadronsBarrel));
2467  }
2468  if(pt_sum_CHF_Endcap_plus){
2469  meMETPhiChargedHadronsEndcapPlus_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiChargedHadronsEndcapPlus_BXm1Filled"];if(meMETPhiChargedHadronsEndcapPlus_BXm1Filled && meMETPhiChargedHadronsEndcapPlus_BXm1Filled ->getRootObject())meMETPhiChargedHadronsEndcapPlus_BXm1Filled->Fill(atan2(py_chargedHadronsEndcapPlus,px_chargedHadronsEndcapPlus));
2470  }
2471  if(pt_sum_CHF_Endcap_minus){
2472  meMETPhiChargedHadronsEndcapMinus_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiChargedHadronsEndcapMinus_BXm1Filled"];if(meMETPhiChargedHadronsEndcapMinus_BXm1Filled && meMETPhiChargedHadronsEndcapMinus_BXm1Filled ->getRootObject())meMETPhiChargedHadronsEndcapMinus_BXm1Filled->Fill(atan2(py_chargedHadronsEndcapMinus,px_chargedHadronsEndcapMinus));
2473  }
2474  if(pt_sum_NHF_Barrel){
2475  meMETPhiNeutralHadronsBarrel_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsBarrel_BXm1Filled"];if(meMETPhiNeutralHadronsBarrel_BXm1Filled && meMETPhiNeutralHadronsBarrel_BXm1Filled ->getRootObject())meMETPhiNeutralHadronsBarrel_BXm1Filled->Fill(atan2(py_neutralHadronsBarrel,px_neutralHadronsBarrel));
2476  }
2477  if(pt_sum_NHF_Endcap_plus){
2478  meMETPhiNeutralHadronsEndcapPlus_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsEndcapPlus_BXm1Filled"];if(meMETPhiNeutralHadronsEndcapPlus_BXm1Filled && meMETPhiNeutralHadronsEndcapPlus_BXm1Filled ->getRootObject())meMETPhiNeutralHadronsEndcapPlus_BXm1Filled->Fill(atan2(py_neutralHadronsEndcapPlus,px_neutralHadronsEndcapPlus));
2479  }
2480  if(pt_sum_NHF_Endcap_minus){
2481  meMETPhiNeutralHadronsEndcapMinus_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsEndcapMinus_BXm1Filled"];if(meMETPhiNeutralHadronsEndcapMinus_BXm1Filled && meMETPhiNeutralHadronsEndcapMinus_BXm1Filled ->getRootObject())meMETPhiNeutralHadronsEndcapMinus_BXm1Filled->Fill(atan2(py_neutralHadronsEndcapMinus,px_neutralHadronsEndcapMinus));
2482  }
2483  if(pt_sum_PhF_Barrel){
2484  meMETPhiPhotonsBarrel_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiPhotonsBarrel_BXm1Filled"];if(meMETPhiPhotonsBarrel_BXm1Filled && meMETPhiPhotonsBarrel_BXm1Filled ->getRootObject())meMETPhiPhotonsBarrel_BXm1Filled->Fill(atan2(py_PhotonsBarrel,px_PhotonsBarrel));
2485  }
2486  if(pt_sum_PhF_Endcap_plus){
2487  meMETPhiPhotonsEndcapPlus_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiPhotonsEndcapPlus_BXm1Filled"];if(meMETPhiPhotonsEndcapPlus_BXm1Filled && meMETPhiPhotonsEndcapPlus_BXm1Filled ->getRootObject())meMETPhiPhotonsEndcapPlus_BXm1Filled->Fill(atan2(py_PhotonsEndcapPlus,px_PhotonsEndcapPlus));
2488  }
2489  if(pt_sum_PhF_Endcap_minus){
2490  meMETPhiPhotonsEndcapMinus_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiPhotonsEndcapMinus_BXm1Filled"];if(meMETPhiPhotonsEndcapMinus_BXm1Filled && meMETPhiPhotonsEndcapMinus_BXm1Filled ->getRootObject())meMETPhiPhotonsEndcapMinus_BXm1Filled->Fill(atan2(py_PhotonsEndcapMinus,px_PhotonsEndcapMinus));
2491  }
2492  if(pt_sum_HFH_plus){
2493  meMETPhiHFHadronsPlus_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiHFHadronsPlus_BXm1Filled"];if(meMETPhiHFHadronsPlus_BXm1Filled && meMETPhiHFHadronsPlus_BXm1Filled ->getRootObject())meMETPhiHFHadronsPlus_BXm1Filled->Fill(atan2(py_HFHadronsPlus,px_HFHadronsPlus));
2494  }
2495  if(pt_sum_HFH_minus){
2496  meMETPhiHFHadronsMinus_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiHFHadronsMinus_BXm1Filled"];if(meMETPhiHFHadronsMinus_BXm1Filled && meMETPhiHFHadronsMinus_BXm1Filled ->getRootObject())meMETPhiHFHadronsMinus_BXm1Filled->Fill(atan2(py_HFHadronsMinus,px_HFHadronsMinus));
2497  }
2498  if(pt_sum_HFE_plus){
2499  meMETPhiHFEGammasPlus_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiHFEGammasPlus_BXm1Filled"];if(meMETPhiHFEGammasPlus_BXm1Filled && meMETPhiHFEGammasPlus_BXm1Filled ->getRootObject())meMETPhiHFEGammasPlus_BXm1Filled->Fill(atan2(py_HFEGammasPlus,px_HFEGammasPlus));
2500  }
2501  if(pt_sum_HFE_minus){
2502  meMETPhiHFEGammasMinus_BXm1Filled = map_of_MEs[DirName+"/"+"METPhiHFEGammasMinus_BXm1Filled"];if(meMETPhiHFEGammasMinus_BXm1Filled && meMETPhiHFEGammasMinus_BXm1Filled ->getRootObject())meMETPhiHFEGammasMinus_BXm1Filled->Fill(atan2(py_HFEGammasMinus,px_HFEGammasMinus));
2503  }
2504  }
2505  /*if(techTriggerCase[3]){//techTriggerResultBx0 && !techTriggerResultBxM2 && !techTriggerResultBxM1 ->previous two bunches empty
2506  meCHF_Barrel_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionBarrel_BXm2BXm1Empty"]; if(meCHF_Barrel_BXm2BXm1Empty && meCHF_Barrel_BXm2BXm1Empty->getRootObject()) meCHF_Barrel_BXm2BXm1Empty->Fill(pt_sum_CHF_Barrel/pfmet.sumEt());
2507  meCHF_EndcapPlus_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionEndcapPlus_BXm2BXm1Empty"]; if(meCHF_EndcapPlus_BXm2BXm1Empty && meCHF_EndcapPlus_BXm2BXm1Empty->getRootObject()) meCHF_EndcapPlus_BXm2BXm1Empty->Fill(pt_sum_CHF_Endcap_plus/pfmet.sumEt());
2508  meCHF_EndcapMinus_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionEndcapMinus_BXm2BXm1Empty"]; if(meCHF_EndcapMinus_BXm2BXm1Empty && meCHF_EndcapMinus_BXm2BXm1Empty->getRootObject()) meCHF_EndcapMinus_BXm2BXm1Empty->Fill(pt_sum_CHF_Endcap_minus/pfmet.sumEt());
2509  meNHF_Barrel_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionBarrel_BXm2BXm1Empty"]; if(meNHF_Barrel_BXm2BXm1Empty && meNHF_Barrel_BXm2BXm1Empty->getRootObject()) meNHF_Barrel_BXm2BXm1Empty->Fill(pt_sum_NHF_Barrel/pfmet.sumEt());
2510  meNHF_EndcapPlus_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionEndcapPlus_BXm2BXm1Empty"]; if(meNHF_EndcapPlus_BXm2BXm1Empty && meNHF_EndcapPlus_BXm2BXm1Empty->getRootObject()) meNHF_EndcapPlus_BXm2BXm1Empty->Fill(pt_sum_NHF_Endcap_plus/pfmet.sumEt());
2511  meNHF_EndcapMinus_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionEndcapMinus_BXm2BXm1Empty"]; if(meNHF_EndcapMinus_BXm2BXm1Empty && meNHF_EndcapMinus_BXm2BXm1Empty->getRootObject()) meNHF_EndcapMinus_BXm2BXm1Empty->Fill(pt_sum_NHF_Endcap_minus/pfmet.sumEt());
2512  mePhF_Barrel_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfPhotonEtFractionBarrel_BXm2BXm1Empty"]; if(mePhF_Barrel_BXm2BXm1Empty && mePhF_Barrel_BXm2BXm1Empty->getRootObject()) mePhF_Barrel_BXm2BXm1Empty->Fill(pt_sum_PhF_Barrel/pfmet.sumEt());
2513  mePhF_EndcapPlus_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfPhotonEtFractionEndcapPlus_BXm2BXm1Empty"]; if(mePhF_EndcapPlus_BXm2BXm1Empty && mePhF_EndcapPlus_BXm2BXm1Empty->getRootObject()) mePhF_EndcapPlus_BXm2BXm1Empty->Fill(pt_sum_PhF_Endcap_plus/pfmet.sumEt());
2514  mePhF_EndcapMinus_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfPhotonEtFractionEndcapMinus_BXm2BXm1Empty"]; if(mePhF_EndcapMinus_BXm2BXm1Empty && mePhF_EndcapMinus_BXm2BXm1Empty->getRootObject()) mePhF_EndcapMinus_BXm2BXm1Empty->Fill(pt_sum_PhF_Endcap_minus/pfmet.sumEt());
2515  meHFHadF_Plus_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfHFHadronEtFractionPlus_BXm2BXm1Empty"]; if(meHFHadF_Plus_BXm2BXm1Empty && meHFHadF_Plus_BXm2BXm1Empty->getRootObject()) meHFHadF_Plus_BXm2BXm1Empty->Fill(pt_sum_HFH_plus/pfmet.sumEt());
2516  meHFHadF_Minus_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfHFHadronEtFractionMinus_BXm2BXm1Empty"]; if(meHFHadF_Minus_BXm2BXm1Empty && meHFHadF_Minus_BXm2BXm1Empty->getRootObject()) meHFHadF_Minus_BXm2BXm1Empty->Fill(pt_sum_HFH_minus/pfmet.sumEt());
2517  meHFEMF_Plus_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfHFEMEtFractionPlus_BXm2BXm1Empty"]; if(meHFEMF_Plus_BXm2BXm1Empty && meHFEMF_Plus_BXm2BXm1Empty->getRootObject()) meHFEMF_Plus_BXm2BXm1Empty->Fill(pt_sum_HFE_plus/pfmet.sumEt());
2518  meHFEMF_Minus_BXm2BXm1Empty=map_of_MEs[DirName+"/"+"PfHFEMEtFractionMinus_BXm2BXm1Empty"]; if(meHFEMF_Minus_BXm2BXm1Empty && meHFEMF_Minus_BXm2BXm1Empty->getRootObject()) meHFEMF_Minus_BXm2BXm1Empty->Fill(pt_sum_HFE_minus/pfmet.sumEt());
2519  mePhotonEtFraction_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PfPhotonEtFraction_BXm2BXm1Empty"]; if ( mePhotonEtFraction_BXm2BXm1Empty && mePhotonEtFraction_BXm2BXm1Empty ->getRootObject()) mePhotonEtFraction_BXm2BXm1Empty ->Fill(pfmet.photonEtFraction());
2520  meNeutralHadronEtFraction_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PfNeutralHadronEtFraction_BXm2BXm1Empty"]; if ( meNeutralHadronEtFraction_BXm2BXm1Empty && meNeutralHadronEtFraction_BXm2BXm1Empty ->getRootObject()) meNeutralHadronEtFraction_BXm2BXm1Empty ->Fill(pfmet.neutralHadronEtFraction());
2521  meChargedHadronEtFraction_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"PfChargedHadronEtFraction_BXm2BXm1Empty"]; if ( meChargedHadronEtFraction_BXm2BXm1Empty && meChargedHadronEtFraction_BXm2BXm1Empty ->getRootObject()) meChargedHadronEtFraction_BXm2BXm1Empty ->Fill(pfmet.chargedHadronEtFraction());
2522  meMET_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"MET_BXm2BXm1Empty"]; if ( meMET_BXm2BXm1Empty && meMET_BXm2BXm1Empty ->getRootObject()) meMET_BXm2BXm1Empty ->Fill(pfmet.pt());
2523  meSumET_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"SumET_BXm2BXm1Empty"]; if ( meSumET_BXm2BXm1Empty && meSumET_BXm2BXm1Empty ->getRootObject()) meSumET_BXm2BXm1Empty ->Fill(pfmet.sumEt());
2524  if(pt_sum_CHF_Barrel){
2525  meMETPhiChargedHadronsBarrel_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiChargedHadronsBarrel_BXm2BXm1Empty"];if(meMETPhiChargedHadronsBarrel_BXm2BXm1Empty && meMETPhiChargedHadronsBarrel_BXm2BXm1Empty ->getRootObject())meMETPhiChargedHadronsBarrel_BXm2BXm1Empty->Fill(atan2(py_chargedHadronsBarrel,px_chargedHadronsBarrel));
2526  }
2527  if(pt_sum_CHF_Endcap_plus){
2528  meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiChargedHadronsEndcapPlus_BXm2BXm1Empty"];if(meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Empty && meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Empty ->getRootObject())meMETPhiChargedHadronsEndcapPlus_BXm2BXm1Empty->Fill(atan2(py_chargedHadronsEndcapPlus,px_chargedHadronsEndcapPlus));
2529  }
2530  if(pt_sum_CHF_Endcap_minus){
2531  meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiChargedHadronsEndcapMinus_BXm2BXm1Empty"];if(meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Empty && meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Empty ->getRootObject())meMETPhiChargedHadronsEndcapMinus_BXm2BXm1Empty->Fill(atan2(py_chargedHadronsEndcapMinus,px_chargedHadronsEndcapMinus));
2532  }
2533  if(pt_sum_NHF_Barrel){
2534  meMETPhiNeutralHadronsBarrel_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsBarrel_BXm2BXm1Empty"];if(meMETPhiNeutralHadronsBarrel_BXm2BXm1Empty && meMETPhiNeutralHadronsBarrel_BXm2BXm1Empty ->getRootObject())meMETPhiNeutralHadronsBarrel_BXm2BXm1Empty->Fill(atan2(py_neutralHadronsBarrel,px_neutralHadronsBarrel));
2535  }
2536  if(pt_sum_NHF_Endcap_plus){
2537  meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsEndcapPlus_BXm2BXm1Empty"];if(meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Empty && meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Empty ->getRootObject())meMETPhiNeutralHadronsEndcapPlus_BXm2BXm1Empty->Fill(atan2(py_neutralHadronsEndcapPlus,px_neutralHadronsEndcapPlus));
2538  }
2539  if(pt_sum_NHF_Endcap_minus){
2540  meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsEndcapMinus_BXm2BXm1Empty"];if(meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Empty && meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Empty ->getRootObject())meMETPhiNeutralHadronsEndcapMinus_BXm2BXm1Empty->Fill(atan2(py_neutralHadronsEndcapMinus,px_neutralHadronsEndcapMinus));
2541  }
2542  if(pt_sum_PhF_Barrel){
2543  meMETPhiPhotonsBarrel_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiPhotonsBarrel_BXm2BXm1Empty"];if(meMETPhiPhotonsBarrel_BXm2BXm1Empty && meMETPhiPhotonsBarrel_BXm2BXm1Empty ->getRootObject())meMETPhiPhotonsBarrel_BXm2BXm1Empty->Fill(atan2(py_PhotonsBarrel,px_PhotonsBarrel));
2544  }
2545  if(pt_sum_PhF_Endcap_plus){
2546  meMETPhiPhotonsEndcapPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiPhotonsEndcapPlus_BXm2BXm1Empty"];if(meMETPhiPhotonsEndcapPlus_BXm2BXm1Empty && meMETPhiPhotonsEndcapPlus_BXm2BXm1Empty ->getRootObject())meMETPhiPhotonsEndcapPlus_BXm2BXm1Empty->Fill(atan2(py_PhotonsEndcapPlus,px_PhotonsEndcapPlus));
2547  }
2548  if(pt_sum_PhF_Endcap_minus){
2549  meMETPhiPhotonsEndcapMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiPhotonsEndcapMinus_BXm2BXm1Empty"];if(meMETPhiPhotonsEndcapMinus_BXm2BXm1Empty && meMETPhiPhotonsEndcapMinus_BXm2BXm1Empty ->getRootObject())meMETPhiPhotonsEndcapMinus_BXm2BXm1Empty->Fill(atan2(py_PhotonsEndcapMinus,px_PhotonsEndcapMinus));
2550  }
2551  if(pt_sum_HFH_plus){
2552  meMETPhiHFHadronsPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiHFHadronsPlus_BXm2BXm1Empty"];if(meMETPhiHFHadronsPlus_BXm2BXm1Empty && meMETPhiHFHadronsPlus_BXm2BXm1Empty ->getRootObject())meMETPhiHFHadronsPlus_BXm2BXm1Empty->Fill(atan2(py_HFHadronsPlus,px_HFHadronsPlus));
2553  }
2554  if(pt_sum_HFH_minus){
2555  meMETPhiHFHadronsMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiHFHadronsMinus_BXm2BXm1Empty"];if(meMETPhiHFHadronsMinus_BXm2BXm1Empty && meMETPhiHFHadronsMinus_BXm2BXm1Empty ->getRootObject())meMETPhiHFHadronsMinus_BXm2BXm1Empty->Fill(atan2(py_HFHadronsMinus,px_HFHadronsMinus));
2556  }
2557  if(pt_sum_HFE_plus){
2558  meMETPhiHFEGammasPlus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiHFEGammasPlus_BXm2BXm1Empty"];if(meMETPhiHFEGammasPlus_BXm2BXm1Empty && meMETPhiHFEGammasPlus_BXm2BXm1Empty ->getRootObject())meMETPhiHFEGammasPlus_BXm2BXm1Empty->Fill(atan2(py_HFEGammasPlus,px_HFEGammasPlus));
2559  }
2560  if(pt_sum_HFE_minus){
2561  meMETPhiHFEGammasMinus_BXm2BXm1Empty = map_of_MEs[DirName+"/"+"METPhiHFEGammasMinus_BXm2BXm1Empty"];if(meMETPhiHFEGammasMinus_BXm2BXm1Empty && meMETPhiHFEGammasMinus_BXm2BXm1Empty ->getRootObject())meMETPhiHFEGammasMinus_BXm2BXm1Empty->Fill(atan2(py_HFEGammasMinus,px_HFEGammasMinus));
2562  }
2563  }*/
2564  if(techTriggerCase[2]){//techTriggerResultBx0 && !techTriggerResultBxM1 --> previous bunch empty
2565  meCHF_Barrel_BXm1Empty=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionBarrel_BXm1Empty"]; if(meCHF_Barrel_BXm1Empty && meCHF_Barrel_BXm1Empty->getRootObject()) meCHF_Barrel_BXm1Empty->Fill(pt_sum_CHF_Barrel/pfmet.sumEt());
2566  meCHF_EndcapPlus_BXm1Empty=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionEndcapPlus_BXm1Empty"]; if(meCHF_EndcapPlus_BXm1Empty && meCHF_EndcapPlus_BXm1Empty->getRootObject()) meCHF_EndcapPlus_BXm1Empty->Fill(pt_sum_CHF_Endcap_plus/pfmet.sumEt());
2567  meCHF_EndcapMinus_BXm1Empty=map_of_MEs[DirName+"/"+"PfChargedHadronEtFractionEndcapMinus_BXm1Empty"]; if(meCHF_EndcapMinus_BXm1Empty && meCHF_EndcapMinus_BXm1Empty->getRootObject()) meCHF_EndcapMinus_BXm1Empty->Fill(pt_sum_CHF_Endcap_minus/pfmet.sumEt());
2568  meNHF_Barrel_BXm1Empty=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionBarrel_BXm1Empty"]; if(meNHF_Barrel_BXm1Empty && meNHF_Barrel_BXm1Empty->getRootObject()) meNHF_Barrel_BXm1Empty->Fill(pt_sum_NHF_Barrel/pfmet.sumEt());
2569  meNHF_EndcapPlus_BXm1Empty=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionEndcapPlus_BXm1Empty"]; if(meNHF_EndcapPlus_BXm1Empty && meNHF_EndcapPlus_BXm1Empty->getRootObject()) meNHF_EndcapPlus_BXm1Empty->Fill(pt_sum_NHF_Endcap_plus/pfmet.sumEt());
2570  meNHF_EndcapMinus_BXm1Empty=map_of_MEs[DirName+"/"+"PfNeutralHadronEtFractionEndcapMinus_BXm1Empty"]; if(meNHF_EndcapMinus_BXm1Empty && meNHF_EndcapMinus_BXm1Empty->getRootObject()) meNHF_EndcapMinus_BXm1Empty->Fill(pt_sum_NHF_Endcap_minus/pfmet.sumEt());
2571  mePhF_Barrel_BXm1Empty=map_of_MEs[DirName+"/"+"PfPhotonEtFractionBarrel_BXm1Empty"]; if(mePhF_Barrel_BXm1Empty && mePhF_Barrel_BXm1Empty->getRootObject()) mePhF_Barrel_BXm1Empty->Fill(pt_sum_PhF_Barrel/pfmet.sumEt());
2572  mePhF_EndcapPlus_BXm1Empty=map_of_MEs[DirName+"/"+"PfPhotonEtFractionEndcapPlus_BXm1Empty"]; if(mePhF_EndcapPlus_BXm1Empty && mePhF_EndcapPlus_BXm1Empty->getRootObject()) mePhF_EndcapPlus_BXm1Empty->Fill(pt_sum_PhF_Endcap_plus/pfmet.sumEt());
2573  mePhF_EndcapMinus_BXm1Empty=map_of_MEs[DirName+"/"+"PfPhotonEtFractionEndcapMinus_BXm1Empty"]; if(mePhF_EndcapMinus_BXm1Empty && mePhF_EndcapMinus_BXm1Empty->getRootObject()) mePhF_EndcapMinus_BXm1Empty->Fill(pt_sum_PhF_Endcap_minus/pfmet.sumEt());
2574  meHFHadF_Plus_BXm1Empty=map_of_MEs[DirName+"/"+"PfHFHadronEtFractionPlus_BXm1Empty"]; if(meHFHadF_Plus_BXm1Empty && meHFHadF_Plus_BXm1Empty->getRootObject()) meHFHadF_Plus_BXm1Empty->Fill(pt_sum_HFH_plus/pfmet.sumEt());
2575  meHFHadF_Minus_BXm1Empty=map_of_MEs[DirName+"/"+"PfHFHadronEtFractionMinus_BXm1Empty"]; if(meHFHadF_Minus_BXm1Empty && meHFHadF_Minus_BXm1Empty->getRootObject()) meHFHadF_Minus_BXm1Empty->Fill(pt_sum_HFH_minus/pfmet.sumEt());
2576  meHFEMF_Plus_BXm1Empty=map_of_MEs[DirName+"/"+"PfHFEMEtFractionPlus_BXm1Empty"]; if(meHFEMF_Plus_BXm1Empty && meHFEMF_Plus_BXm1Empty->getRootObject()) meHFEMF_Plus_BXm1Empty->Fill(pt_sum_HFE_plus/pfmet.sumEt());
2577  meHFEMF_Minus_BXm1Empty=map_of_MEs[DirName+"/"+"PfHFEMEtFractionMinus_BXm1Empty"]; if(meHFEMF_Minus_BXm1Empty && meHFEMF_Minus_BXm1Empty->getRootObject()) meHFEMF_Minus_BXm1Empty->Fill(pt_sum_HFE_minus/pfmet.sumEt());
2578  mePhotonEtFraction_BXm1Empty = map_of_MEs[DirName+"/"+"PfPhotonEtFraction_BXm1Empty"]; if ( mePhotonEtFraction_BXm1Empty && mePhotonEtFraction_BXm1Empty ->getRootObject()) mePhotonEtFraction_BXm1Empty ->Fill(pfmet.photonEtFraction());
2579  meNeutralHadronEtFraction_BXm1Empty = map_of_MEs[DirName+"/"+"PfNeutralHadronEtFraction_BXm1Empty"]; if ( meNeutralHadronEtFraction_BXm1Empty && meNeutralHadronEtFraction_BXm1Empty ->getRootObject()) meNeutralHadronEtFraction_BXm1Empty ->Fill(pfmet.neutralHadronEtFraction());
2580  meChargedHadronEtFraction_BXm1Empty = map_of_MEs[DirName+"/"+"PfChargedHadronEtFraction_BXm1Empty"]; if ( meChargedHadronEtFraction_BXm1Empty && meChargedHadronEtFraction_BXm1Empty ->getRootObject()) meChargedHadronEtFraction_BXm1Empty ->Fill(pfmet.chargedHadronEtFraction());
2581  meMET_BXm1Empty = map_of_MEs[DirName+"/"+"MET_BXm1Empty"]; if ( meMET_BXm1Empty && meMET_BXm1Empty ->getRootObject()) meMET_BXm1Empty ->Fill(pfmet.pt());
2582  meSumET_BXm1Empty = map_of_MEs[DirName+"/"+"SumET_BXm1Empty"]; if ( meSumET_BXm1Empty && meSumET_BXm1Empty ->getRootObject()) meSumET_BXm1Empty ->Fill(pfmet.sumEt());
2583  if(pt_sum_CHF_Barrel){
2584  meMETPhiChargedHadronsBarrel_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiChargedHadronsBarrel_BXm1Empty"];if(meMETPhiChargedHadronsBarrel_BXm1Empty && meMETPhiChargedHadronsBarrel_BXm1Empty ->getRootObject())meMETPhiChargedHadronsBarrel_BXm1Empty->Fill(atan2(py_chargedHadronsBarrel,px_chargedHadronsBarrel));
2585  }
2586  if(pt_sum_CHF_Endcap_plus){
2587  meMETPhiChargedHadronsEndcapPlus_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiChargedHadronsEndcapPlus_BXm1Empty"];if(meMETPhiChargedHadronsEndcapPlus_BXm1Empty && meMETPhiChargedHadronsEndcapPlus_BXm1Empty ->getRootObject())meMETPhiChargedHadronsEndcapPlus_BXm1Empty->Fill(atan2(py_chargedHadronsEndcapPlus,px_chargedHadronsEndcapPlus));
2588  }
2589  if(pt_sum_CHF_Endcap_minus){
2590  meMETPhiChargedHadronsEndcapMinus_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiChargedHadronsEndcapMinus_BXm1Empty"];if(meMETPhiChargedHadronsEndcapMinus_BXm1Empty && meMETPhiChargedHadronsEndcapMinus_BXm1Empty ->getRootObject())meMETPhiChargedHadronsEndcapMinus_BXm1Empty->Fill(atan2(py_chargedHadronsEndcapMinus,px_chargedHadronsEndcapMinus));
2591  }
2592  if(pt_sum_NHF_Barrel){
2593  meMETPhiNeutralHadronsBarrel_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsBarrel_BXm1Empty"];if(meMETPhiNeutralHadronsBarrel_BXm1Empty && meMETPhiNeutralHadronsBarrel_BXm1Empty ->getRootObject())meMETPhiNeutralHadronsBarrel_BXm1Empty->Fill(atan2(py_neutralHadronsBarrel,px_neutralHadronsBarrel));
2594  }
2595  if(pt_sum_NHF_Endcap_plus){
2596  meMETPhiNeutralHadronsEndcapPlus_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsEndcapPlus_BXm1Empty"];if(meMETPhiNeutralHadronsEndcapPlus_BXm1Empty && meMETPhiNeutralHadronsEndcapPlus_BXm1Empty ->getRootObject())meMETPhiNeutralHadronsEndcapPlus_BXm1Empty->Fill(atan2(py_neutralHadronsEndcapPlus,px_neutralHadronsEndcapPlus));
2597  }
2598  if(pt_sum_NHF_Endcap_minus){
2599  meMETPhiNeutralHadronsEndcapMinus_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiNeutralHadronsEndcapMinus_BXm1Empty"];if(meMETPhiNeutralHadronsEndcapMinus_BXm1Empty && meMETPhiNeutralHadronsEndcapMinus_BXm1Empty ->getRootObject())meMETPhiNeutralHadronsEndcapMinus_BXm1Empty->Fill(atan2(py_neutralHadronsEndcapMinus,px_neutralHadronsEndcapMinus));
2600  }
2601  if(pt_sum_PhF_Barrel){
2602  meMETPhiPhotonsBarrel_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiPhotonsBarrel_BXm1Empty"];if(meMETPhiPhotonsBarrel_BXm1Empty && meMETPhiPhotonsBarrel_BXm1Empty ->getRootObject())meMETPhiPhotonsBarrel_BXm1Empty->Fill(atan2(py_PhotonsBarrel,px_PhotonsBarrel));
2603  }
2604  if(pt_sum_PhF_Endcap_plus){
2605  meMETPhiPhotonsEndcapPlus_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiPhotonsEndcapPlus_BXm1Empty"];if(meMETPhiPhotonsEndcapPlus_BXm1Empty && meMETPhiPhotonsEndcapPlus_BXm1Empty ->getRootObject())meMETPhiPhotonsEndcapPlus_BXm1Empty->Fill(atan2(py_PhotonsEndcapPlus,px_PhotonsEndcapPlus));
2606  }
2607  if(pt_sum_PhF_Endcap_minus){
2608  meMETPhiPhotonsEndcapMinus_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiPhotonsEndcapMinus_BXm1Empty"];if(meMETPhiPhotonsEndcapMinus_BXm1Empty && meMETPhiPhotonsEndcapMinus_BXm1Empty ->getRootObject())meMETPhiPhotonsEndcapMinus_BXm1Empty->Fill(atan2(py_PhotonsEndcapMinus,px_PhotonsEndcapMinus));
2609  }
2610  if(pt_sum_HFH_plus){
2611  meMETPhiHFHadronsPlus_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiHFHadronsPlus_BXm1Empty"];if(meMETPhiHFHadronsPlus_BXm1Empty && meMETPhiHFHadronsPlus_BXm1Empty ->getRootObject())meMETPhiHFHadronsPlus_BXm1Empty->Fill(atan2(py_HFHadronsPlus,px_HFHadronsPlus));
2612  }
2613  if(pt_sum_HFH_minus){
2614  meMETPhiHFHadronsMinus_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiHFHadronsMinus_BXm1Empty"];if(meMETPhiHFHadronsMinus_BXm1Empty && meMETPhiHFHadronsMinus_BXm1Empty ->getRootObject())meMETPhiHFHadronsMinus_BXm1Empty->Fill(atan2(py_HFHadronsMinus,px_HFHadronsMinus));
2615  }
2616  if(pt_sum_HFE_plus){
2617  meMETPhiHFEGammasPlus_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiHFEGammasPlus_BXm1Empty"];if(meMETPhiHFEGammasPlus_BXm1Empty && meMETPhiHFEGammasPlus_BXm1Empty ->getRootObject())meMETPhiHFEGammasPlus_BXm1Empty->Fill(atan2(py_HFEGammasPlus,px_HFEGammasPlus)); \
2618  }
2619  if(pt_sum_HFE_minus){
2620  meMETPhiHFEGammasMinus_BXm1Empty = map_of_MEs[DirName+"/"+"METPhiHFEGammasMinus_BXm1Empty"];if(meMETPhiHFEGammasMinus_BXm1Empty && meMETPhiHFEGammasMinus_BXm1Empty ->getRootObject())meMETPhiHFEGammasMinus_BXm1Empty->Fill(atan2(py_HFEGammasMinus,px_HFEGammasMinus));
2621  }
2622  }
2623 
2624  }//fill candidate plots only then
2625 
2626  // PFMET getters
2627  //----------------------------------------------------------------------------
2628  double pfPhotonEtFraction = pfmet.photonEtFraction();
2629  double pfPhotonEt = pfmet.photonEt();
2630  double pfNeutralHadronEtFraction = pfmet.neutralHadronEtFraction();
2631  double pfNeutralHadronEt = pfmet.neutralHadronEt();
2632  double pfElectronEt = pfmet.electronEt();
2633  double pfChargedHadronEtFraction = pfmet.chargedHadronEtFraction();
2634  double pfChargedHadronEt = pfmet.chargedHadronEt();
2635  double pfMuonEt = pfmet.muonEt();
2636  double pfHFHadronEtFraction = pfmet.HFHadronEtFraction();
2637  double pfHFHadronEt = pfmet.HFHadronEt();
2638  double pfHFEMEtFraction = pfmet.HFEMEtFraction();
2639  double pfHFEMEt = pfmet.HFEMEt();
2640  mePhotonEtFraction = map_of_MEs[DirName + "/PfPhotonEtFraction"];
2641  mePhotonEt = map_of_MEs[DirName + "/PfPhotonEt"];
2642  meNeutralHadronEtFraction = map_of_MEs[DirName + "/PfNeutralHadronEtFraction"];
2643  meNeutralHadronEt = map_of_MEs[DirName + "/PfNeutralHadronEt"];
2644  meElectronEt = map_of_MEs[DirName + "/PfElectronEt"];
2645  meChargedHadronEtFraction = map_of_MEs[DirName + "/PfChargedHadronEtFraction"];
2646  meChargedHadronEt = map_of_MEs[DirName + "/PfChargedHadronEt"];
2647  meMuonEt = map_of_MEs[DirName + "/PfMuonEt"];
2648  meHFHadronEtFraction = map_of_MEs[DirName + "/PfHFHadronEtFraction"];
2649  meHFHadronEt = map_of_MEs[DirName + "/PfHFHadronEt"];
2650  meHFEMEtFraction = map_of_MEs[DirName + "/PfHFEMEtFraction"];
2651  meHFEMEt = map_of_MEs[DirName + "/PfHFEMEt"];
2652 
2653  if (mePhotonEtFraction && mePhotonEtFraction ->getRootObject()) mePhotonEtFraction ->Fill(pfPhotonEtFraction);
2654  if (mePhotonEt && mePhotonEt ->getRootObject()) mePhotonEt ->Fill(pfPhotonEt);
2656  if (meNeutralHadronEt && meNeutralHadronEt ->getRootObject()) meNeutralHadronEt ->Fill(pfNeutralHadronEt);
2657  if (meElectronEt && meElectronEt ->getRootObject()) meElectronEt ->Fill(pfElectronEt);
2659  if (meChargedHadronEt && meChargedHadronEt ->getRootObject()) meChargedHadronEt ->Fill(pfChargedHadronEt);
2660  if (meMuonEt && meMuonEt ->getRootObject()) meMuonEt ->Fill(pfMuonEt);
2661  if (meHFHadronEtFraction && meHFHadronEtFraction ->getRootObject()) meHFHadronEtFraction ->Fill(pfHFHadronEtFraction);
2662  if (meHFHadronEt && meHFHadronEt ->getRootObject()) meHFHadronEt ->Fill(pfHFHadronEt);
2663  if (meHFEMEtFraction && meHFEMEtFraction ->getRootObject()) meHFEMEtFraction ->Fill(pfHFEMEtFraction);
2664  if (meHFEMEt && meHFEMEt ->getRootObject()) meHFEMEt ->Fill(pfHFEMEt);
2665 
2666  //NPV profiles
2667 
2668  mePhotonEtFraction_profile = map_of_MEs[DirName + "/PfPhotonEtFraction_profile"];
2669  mePhotonEt_profile = map_of_MEs[DirName + "/PfPhotonEt_profile"];
2670  meNeutralHadronEtFraction_profile = map_of_MEs[DirName + "/PfNeutralHadronEtFraction_profile"];
2671  meNeutralHadronEt_profile = map_of_MEs[DirName + "/PfNeutralHadronEt_profile"];
2672  meChargedHadronEtFraction_profile = map_of_MEs[DirName + "/PfChargedHadronEtFraction_profile"];
2673  meChargedHadronEt_profile = map_of_MEs[DirName + "/PfChargedHadronEt_profile"];
2674  meHFHadronEtFraction_profile = map_of_MEs[DirName + "/PfHFHadronEtFraction_profile"];
2675  meHFHadronEt_profile = map_of_MEs[DirName + "/PfHFHadronEt_profile"];
2676  meHFEMEtFraction_profile = map_of_MEs[DirName + "/PfHFEMEtFraction_profile"];
2677  meHFEMEt_profile = map_of_MEs[DirName + "/PfHFEMEt_profile"];
2678 
2679  if (mePhotonEtFraction_profile && mePhotonEtFraction_profile ->getRootObject()) mePhotonEtFraction_profile ->Fill(numPV_, pfPhotonEtFraction);
2680  if (mePhotonEt_profile && mePhotonEt_profile ->getRootObject()) mePhotonEt_profile ->Fill(numPV_, pfPhotonEt);
2682  if (meNeutralHadronEt_profile && meNeutralHadronEt_profile ->getRootObject()) meNeutralHadronEt_profile ->Fill(numPV_, pfNeutralHadronEt);
2684  if (meChargedHadronEt_profile && meChargedHadronEt_profile ->getRootObject()) meChargedHadronEt_profile ->Fill(numPV_, pfChargedHadronEt);
2685  if (meHFHadronEtFraction_profile && meHFHadronEtFraction_profile ->getRootObject()) meHFHadronEtFraction_profile ->Fill(numPV_, pfHFHadronEtFraction);
2686  if (meHFHadronEt_profile && meHFHadronEt_profile ->getRootObject()) meHFHadronEt_profile ->Fill(numPV_, pfHFHadronEt);
2687  if (meHFEMEtFraction_profile && meHFEMEtFraction_profile ->getRootObject()) meHFEMEtFraction_profile ->Fill(numPV_, pfHFEMEtFraction);
2688  if (meHFEMEt_profile && meHFEMEt_profile ->getRootObject()) meHFEMEt_profile ->Fill(numPV_, pfHFEMEt);
2689  }
2690 
2691  if(isMiniAODMet_){
2692  mePhotonEtFraction = map_of_MEs[DirName + "/PfPhotonEtFraction"];
2693  meNeutralHadronEtFraction = map_of_MEs[DirName + "/PfNeutralHadronEtFraction"];
2694  meChargedHadronEtFraction = map_of_MEs[DirName + "/PfChargedHadronEtFraction"];
2695  meHFHadronEtFraction = map_of_MEs[DirName + "/PfHFHadronEtFraction"];
2696  meHFEMEtFraction = map_of_MEs[DirName + "/PfHFEMEtFraction"];
2697 
2698  if (mePhotonEtFraction && mePhotonEtFraction ->getRootObject()) mePhotonEtFraction ->Fill(patmet.NeutralEMFraction());
2701  if (meHFHadronEtFraction && meHFHadronEtFraction ->getRootObject()) meHFHadronEtFraction ->Fill(patmet.Type6EtFraction());//HFHadrons
2702  if (meHFEMEtFraction && meHFEMEtFraction ->getRootObject()) meHFEMEtFraction ->Fill(patmet.Type7EtFraction());
2703 
2704  //NPV profiles
2705  mePhotonEtFraction_profile = map_of_MEs[DirName + "/PfPhotonEtFraction_profile"];
2706  meNeutralHadronEtFraction_profile = map_of_MEs[DirName + "/PfNeutralHadronEtFraction_profile"];
2707  meChargedHadronEtFraction_profile = map_of_MEs[DirName + "/PfChargedHadronEtFraction_profile"];
2708  meHFHadronEtFraction_profile = map_of_MEs[DirName + "/PfHFHadronEtFraction_profile"];
2709  meHFEMEtFraction_profile = map_of_MEs[DirName + "/PfHFEMEtFraction_profile"];
2710 
2711  if (mePhotonEtFraction_profile && mePhotonEtFraction_profile ->getRootObject()) mePhotonEtFraction_profile ->Fill(numPV_, patmet.NeutralEMFraction());
2714  if (meHFHadronEtFraction_profile && meHFHadronEtFraction_profile ->getRootObject()) meHFHadronEtFraction_profile ->Fill(numPV_, patmet.Type6EtFraction());
2715  if (meHFEMEtFraction_profile && meHFEMEtFraction_profile ->getRootObject()) meHFEMEtFraction_profile ->Fill(numPV_, patmet.Type7EtFraction());
2716 
2717  mePhotonEt = map_of_MEs[DirName + "/PfPhotonEt"];
2718  meNeutralHadronEt = map_of_MEs[DirName + "/PfNeutralHadronEt"];
2719  meChargedHadronEt = map_of_MEs[DirName + "/PfChargedHadronEt"];
2720  meHFHadronEt = map_of_MEs[DirName + "/PfHFHadronEt"];
2721  meHFEMEt = map_of_MEs[DirName + "/PfHFEMEt"];
2722  meMuonEt = map_of_MEs[DirName + "/PfMuonEt"];
2723  meElectronEt = map_of_MEs[DirName + "/PfElectronEt"];
2724 
2725  if (mePhotonEt && mePhotonEt ->getRootObject()) mePhotonEt ->Fill(patmet.NeutralEMFraction()*patmet.sumEt());
2726  if (meNeutralHadronEt && meNeutralHadronEt->getRootObject()) meNeutralHadronEt->Fill(patmet.NeutralHadEtFraction()*patmet.sumEt());
2727  if (meChargedHadronEt && meChargedHadronEt->getRootObject()) meChargedHadronEt->Fill(patmet.ChargedHadEtFraction()*patmet.sumEt());
2728  if (meHFHadronEt && meHFHadronEt ->getRootObject()) meHFHadronEt ->Fill(patmet.Type6EtFraction()*patmet.sumEt());//HFHadrons
2729  if (meHFEMEt && meHFEMEt ->getRootObject()) meHFEMEt ->Fill(patmet.Type7EtFraction()*patmet.sumEt());
2730  if (meMuonEt && meMuonEt ->getRootObject()) meMuonEt ->Fill(patmet.MuonEtFraction()*patmet.sumEt());
2731  if (meElectronEt && meElectronEt ->getRootObject()) meElectronEt ->Fill(patmet.ChargedEMEtFraction()*patmet.sumEt());
2732 
2733  //NPV profiles
2734  mePhotonEt_profile = map_of_MEs[DirName + "/PfPhotonEt_profile"];
2735  meNeutralHadronEt_profile = map_of_MEs[DirName + "/PfNeutralHadronEt_profile"];
2736  meChargedHadronEt_profile = map_of_MEs[DirName + "/PfChargedHadronEt_profile"];
2737  meHFHadronEt_profile = map_of_MEs[DirName + "/PfHFHadronEt_profile"];
2738  meHFEMEt_profile = map_of_MEs[DirName + "/PfHFEMEt_profile"];
2739 
2740  if (mePhotonEt_profile && mePhotonEt_profile ->getRootObject()) mePhotonEt_profile ->Fill(numPV_, patmet.NeutralEMFraction()*patmet.sumEt());
2741  if (meNeutralHadronEt_profile && meNeutralHadronEt_profile->getRootObject()) meNeutralHadronEt_profile->Fill(numPV_, patmet.NeutralHadEtFraction()*patmet.sumEt());
2742  if (meChargedHadronEt_profile && meChargedHadronEt_profile->getRootObject()) meChargedHadronEt_profile->Fill(numPV_, patmet.ChargedHadEtFraction()*patmet.sumEt());
2743  if (meHFHadronEt_profile && meHFHadronEt_profile ->getRootObject()) meHFHadronEt_profile ->Fill(numPV_, patmet.Type6EtFraction()*patmet.sumEt());
2744  if (meHFEMEt_profile && meHFEMEt_profile ->getRootObject()) meHFEMEt_profile ->Fill(numPV_, patmet.Type7EtFraction()*patmet.sumEt());
2745  }
2746 
2747  if (isCaloMet_){
2748  //if (bLumiSecPlot){//get from config level
2750  hMExLS = map_of_MEs[DirName+"/"+"MExLS"]; if (hMExLS && hMExLS->getRootObject()) hMExLS->Fill(MEx,myLuminosityBlock);
2751  hMEyLS = map_of_MEs[DirName+"/"+"MEyLS"]; if (hMEyLS && hMEyLS->getRootObject()) hMEyLS->Fill(MEy,myLuminosityBlock);
2752  }
2753  }
2754  }//check if we only wanna do Z plots
2755 }
float puppiWeight() const
Set both weights at once (with option for only full PUPPI)
MonitorElement * meCHF_EndcapMinus_BXm1Filled
Definition: METAnalyzer.h:456
type
Definition: HCALResponse.h:21
MonitorElement * meMETPhiNeutralHadronsEndcapMinus_BXm1Empty
Definition: METAnalyzer.h:407
MonitorElement * hMExLS
Definition: METAnalyzer.h:322
MonitorElement * meMETPhiNeutralHadronsEndcapMinus
Definition: METAnalyzer.h:558
int i
Definition: DBlmapReader.cc:9
const reco::TrackRef & trackRef() const
MonitorElement * mePhF_EndcapMinus_BXm1Empty
Definition: METAnalyzer.h:482
const unsigned int nTracks(const reco::Vertex &sv)
MonitorElement * hSumET
Definition: METAnalyzer.h:320
MonitorElement * meMETPhiChargedHadronsEndcapPlus_BXm1Filled
Definition: METAnalyzer.h:424
MonitorElement * mProfileIsoPFChHad_EcalOccupancyCentral
Definition: METAnalyzer.h:541
MonitorElement * meNeutralHadronEtFraction
Definition: METAnalyzer.h:363
MonitorElement * meMETPhiHFHadronsPlus_BXm1Filled
Definition: METAnalyzer.h:432
MonitorElement * meNeutralHadronEtFraction_profile
Definition: METAnalyzer.h:579
MonitorElement * mePhF_EndcapMinus_BXm1Filled
Definition: METAnalyzer.h:488
MonitorElement * meMETPhiChargedHadronsEndcapPlus
Definition: METAnalyzer.h:554
std::vector< int > allTriggerDecisions_
Definition: METAnalyzer.h:206
double rawEcalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:224
MonitorElement * meHFHadF_Plus_BXm1Filled
Definition: METAnalyzer.h:499
MonitorElement * meNHF_EndcapPlus_BXm1Empty
Definition: METAnalyzer.h:465
MonitorElement * hMEy
Definition: METAnalyzer.h:304
MonitorElement * meMETPhiHFEGammasPlus
Definition: METAnalyzer.h:564
MonitorElement * hCaloMETPhi020
Definition: METAnalyzer.h:329
float puppiWeightNoLep() const
Weight from full PUPPI.
MonitorElement * mePhotonEt
Definition: METAnalyzer.h:362
std::vector< std::string > occupancyPFCand_name_
Definition: METAnalyzer.h:547
MonitorElement * meChargedHadronEtFraction_profile
Definition: METAnalyzer.h:581
MonitorElement * meMETPhiPhotonsEndcapPlus_BXm1Empty
Definition: METAnalyzer.h:409
MonitorElement * mProfileIsoPFChHad_HcalOccupancyCentral
Definition: METAnalyzer.h:539
std::vector< int > typePFCand_
Definition: METAnalyzer.h:551
MonitorElement * meZJets_u_perp_ZPt_150_290
Definition: METAnalyzer.h:603
MonitorElement * meMETPhiHFHadronsMinus_BXm1Empty
Definition: METAnalyzer.h:412
MonitorElement * meMET_BXm1Filled
Definition: METAnalyzer.h:420
MonitorElement * meZJets_u_perp_ZPt_75_150
Definition: METAnalyzer.h:602
MonitorElement * hCaloHadEtInHF
Definition: METAnalyzer.h:340
MonitorElement * mProfileIsoPFChHad_EMPtEndcap
Definition: METAnalyzer.h:536
std::vector< double > MExPFCand_
Definition: METAnalyzer.h:550
MonitorElement * meHFHadF_Minus_BXm1Empty
Definition: METAnalyzer.h:496
MonitorElement * meZJets_u_perp_ZPt_0_15
Definition: METAnalyzer.h:598
bool isCaloMet_
Definition: METAnalyzer.h:610
MonitorElement * meSumET_BXm1Empty
Definition: METAnalyzer.h:400
std::vector< MonitorElement * > ptPFCand_
Definition: METAnalyzer.h:546
MonitorElement * meZJets_u_par_ZPt_15_30
Definition: METAnalyzer.h:590
MonitorElement * meChargedHadronEtFraction_BXm1Empty
Definition: METAnalyzer.h:398
size_type size() const
Definition: OwnVector.h:264
MonitorElement * hMEx
Definition: METAnalyzer.h:303
std::vector< std::string > profilePFCand_y_name_
Definition: METAnalyzer.h:547
MonitorElement * meZJets_u_par
Definition: METAnalyzer.h:588
MonitorElement * hCaloHadEtInHE
Definition: METAnalyzer.h:339
MonitorElement * hMET_eeBadScFilter
Definition: METAnalyzer.h:312
MonitorElement * meMETPhiPhotonsEndcapPlus
Definition: METAnalyzer.h:560
MonitorElement * meZJets_u_par_ZPt_75_150
Definition: METAnalyzer.h:593
MonitorElement * meNeutralHadronEtFraction_BXm1Empty
Definition: METAnalyzer.h:397
MonitorElement * meMETPhiChargedHadronsBarrel_BXm1Empty
Definition: METAnalyzer.h:402
bool fillCandidateMap_histos
Definition: METAnalyzer.h:615
MonitorElement * meHFEMF_Minus_BXm1Empty
Definition: METAnalyzer.h:507
virtual double phi() const final
momentum azimuthal angle
std::vector< double > etaMaxPFCand_
Definition: METAnalyzer.h:550
MonitorElement * meZJets_u_perp_ZPt_30_55
Definition: METAnalyzer.h:600
MonitorElement * hCaloEtFractionHadronic
Definition: METAnalyzer.h:330
MonitorElement * hMEyLS
Definition: METAnalyzer.h:323
MonitorElement * meHFHadF_Minus
Definition: METAnalyzer.h:494
const PFClusterRef & clusterRef() const
MonitorElement * meMETPhiHFEGammasPlus_BXm1Filled
Definition: METAnalyzer.h:434
MonitorElement * mePhotonEtFraction_BXm1Empty
Definition: METAnalyzer.h:396
MonitorElement * meHFHadronEtFraction
Definition: METAnalyzer.h:369
MonitorElement * meMET_BXm1Empty
Definition: METAnalyzer.h:399
MonitorElement * meCHF_EndcapMinus_BXm1Empty
Definition: METAnalyzer.h:450
MonitorElement * meNHF_EndcapPlus
Definition: METAnalyzer.h:462
MonitorElement * meMETPhiPhotonsEndcapMinus_BXm1Empty
Definition: METAnalyzer.h:410
virtual double pt() const
transverse momentum
MonitorElement * hMET_logx
Definition: METAnalyzer.h:325
MonitorElement * hCaloEmEtInHF
Definition: METAnalyzer.h:341
MonitorElement * meHFEMEtFraction_profile
Definition: METAnalyzer.h:585
MonitorElement * mePhF_EndcapPlus
Definition: METAnalyzer.h:478
std::vector< MonitorElement * > occupancyPFCand_
Definition: METAnalyzer.h:546
int ii
Definition: cuy.py:588
virtual double eta() const
momentum pseudorapidity
tuple particleFlow
Definition: pfLinker_cff.py:5
MonitorElement * hCaloHadEtInHO
Definition: METAnalyzer.h:338
MonitorElement * meHFEMF_Plus_BXm1Filled
Definition: METAnalyzer.h:510
MonitorElement * meChargedHadronEtFraction
Definition: METAnalyzer.h:366
MonitorElement * meMETPhiPhotonsBarrel_BXm1Empty
Definition: METAnalyzer.h:408
MonitorElement * mePhF_Barrel_BXm1Empty
Definition: METAnalyzer.h:480
MonitorElement * meMEx_profile
Definition: METAnalyzer.h:572
std::vector< ElementInBlock > ElementsInBlocks
Definition: PFCandidate.h:386
MonitorElement * meNHF_Barrel
Definition: METAnalyzer.h:461
MonitorElement * hMET
Definition: METAnalyzer.h:307
MonitorElement * meZJets_u_par_ZPt_290
Definition: METAnalyzer.h:595
MonitorElement * hMET_2
Definition: METAnalyzer.h:308
MonitorElement * hMET_HcalStripHaloFilter
Definition: METAnalyzer.h:317
MonitorElement * meCHF_EndcapMinus
Definition: METAnalyzer.h:447
std::vector< MonitorElement * > ptPFCand_puppiNolepWeight_
Definition: METAnalyzer.h:548
MonitorElement * meMETPhiHFHadronsPlus_BXm1Empty
Definition: METAnalyzer.h:411
MonitorElement * hTrigger
Definition: METAnalyzer.h:301
void Fill(long long x)
MonitorElement * mePhF_Barrel_BXm1Filled
Definition: METAnalyzer.h:486
MonitorElement * meCHF_EndcapPlus_BXm1Filled
Definition: METAnalyzer.h:455
dictionary elements
MonitorElement * meZJets_u_par_ZPt_55_75
Definition: METAnalyzer.h:592
MonitorElement * meMETPhiNeutralHadronsEndcapMinus_BXm1Filled
Definition: METAnalyzer.h:428
MonitorElement * mePhF_EndcapPlus_BXm1Filled
Definition: METAnalyzer.h:487
MonitorElement * meZJets_u_perp
Definition: METAnalyzer.h:597
MonitorElement * meZJets_u_par_ZPt_0_15
Definition: METAnalyzer.h:589
virtual double phi() const
momentum azimuthal angle
MonitorElement * meMETPhiNeutralHadronsBarrel_BXm1Empty
Definition: METAnalyzer.h:405
int iEvent
Definition: GenABIO.cc:230
MonitorElement * meNeutralHadronEtFraction_BXm1Filled
Definition: METAnalyzer.h:418
MonitorElement * meNHF_Barrel_BXm1Filled
Definition: METAnalyzer.h:470
MonitorElement * meMETPhiNeutralHadronsEndcapPlus_BXm1Empty
Definition: METAnalyzer.h:406
bool fill_met_high_level_histo
Definition: METAnalyzer.h:614
MonitorElement * hMETPhi
Definition: METAnalyzer.h:319
MonitorElement * hCaloEmEtInEE
Definition: METAnalyzer.h:342
MonitorElement * hMET_HBHEIsoNoiseFilter
Definition: METAnalyzer.h:315
MonitorElement * mePhF_EndcapMinus
Definition: METAnalyzer.h:479
MonitorElement * meZJets_u_perp_ZPt_55_75
Definition: METAnalyzer.h:601
MonitorElement * meMETPhiHFEGammasMinus
Definition: METAnalyzer.h:565
MonitorElement * meMuonEt
Definition: METAnalyzer.h:368
MonitorElement * meHFEMEt_profile
Definition: METAnalyzer.h:586
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Definition: MET.h:42
MonitorElement * mePhotonEtFraction_BXm1Filled
Definition: METAnalyzer.h:417
MonitorElement * hSumET_logx
Definition: METAnalyzer.h:326
T sqrt(T t)
Definition: SSEVec.h:18
MonitorElement * meNHF_EndcapPlus_BXm1Filled
Definition: METAnalyzer.h:471
MonitorElement * hMET_HBHENoiseFilter
Definition: METAnalyzer.h:310
MonitorElement * meMETPhiPhotonsEndcapMinus_BXm1Filled
Definition: METAnalyzer.h:431
MonitorElement * meZJets_u_par_ZPt_150_290
Definition: METAnalyzer.h:594
MonitorElement * meCHF_Barrel_BXm1Filled
Definition: METAnalyzer.h:454
MonitorElement * meMETPhiHFHadronsMinus_BXm1Filled
Definition: METAnalyzer.h:433
MonitorElement * meZJets_u_perp_ZPt_290
Definition: METAnalyzer.h:604
MonitorElement * meHFEMF_Minus
Definition: METAnalyzer.h:505
int j
Definition: DBlmapReader.cc:9
std::vector< std::string > occupancyPFCand_name_puppiNolepWeight_
Definition: METAnalyzer.h:549
std::vector< MonitorElement * > profilePFCand_x_
Definition: METAnalyzer.h:546
MonitorElement * hCaloEmEtFraction
Definition: METAnalyzer.h:331
virtual double py() const final
y coordinate of momentum vector
MonitorElement * mProfileIsoPFChHad_HadPtCentral
Definition: METAnalyzer.h:533
MonitorElement * meMETPhiChargedHadronsBarrel
Definition: METAnalyzer.h:553
MonitorElement * meNHF_Barrel_BXm1Empty
Definition: METAnalyzer.h:464
std::vector< MonitorElement * > profilePFCand_y_
Definition: METAnalyzer.h:546
MonitorElement * meChargedHadronEt
Definition: METAnalyzer.h:367
MonitorElement * meMETPhiChargedHadronsEndcapMinus_BXm1Filled
Definition: METAnalyzer.h:425
MonitorElement * hMETSig
Definition: METAnalyzer.h:306
MonitorElement * meChargedHadronEt_profile
Definition: METAnalyzer.h:582
MonitorElement * meCHF_Barrel_BXm1Empty
Definition: METAnalyzer.h:448
MonitorElement * mProfileIsoPFChHad_TrackPt
Definition: METAnalyzer.h:537
MonitorElement * meMETPhiNeutralHadronsEndcapPlus_BXm1Filled
Definition: METAnalyzer.h:427
std::vector< double > MEyPFCand_
Definition: METAnalyzer.h:550
MonitorElement * mePhotonEtFraction
Definition: METAnalyzer.h:361
MonitorElement * hMET_EcalDeadCellBoundaryFilter
Definition: METAnalyzer.h:314
MonitorElement * mePhotonEt_profile
Definition: METAnalyzer.h:578
MonitorElement * meCHF_EndcapPlus
Definition: METAnalyzer.h:446
MonitorElement * meZJets_u_perp_ZPt_15_30
Definition: METAnalyzer.h:599
MonitorElement * meZJets_u_par_ZPt_30_55
Definition: METAnalyzer.h:591
MonitorElement * meMETPhiHFEGammasMinus_BXm1Empty
Definition: METAnalyzer.h:414
std::vector< MonitorElement * > occupancyPFCand_puppiNolepWeight_
Definition: METAnalyzer.h:548
TObject * getRootObject(void) const
MonitorElement * meElectronEt
Definition: METAnalyzer.h:365
MonitorElement * meMET_profile
Definition: METAnalyzer.h:574
MonitorElement * meMETPhiChargedHadronsEndcapMinus
Definition: METAnalyzer.h:555
MonitorElement * meHFHadronEt
Definition: METAnalyzer.h:370
MonitorElement * hCaloEmEtInEB
Definition: METAnalyzer.h:343
MonitorElement * meMETPhiPhotonsBarrel
Definition: METAnalyzer.h:559
MonitorElement * hCaloHadEtInHB
Definition: METAnalyzer.h:337
MonitorElement * meHFHadF_Plus_BXm1Empty
Definition: METAnalyzer.h:495
MonitorElement * meMETPhiPhotonsBarrel_BXm1Filled
Definition: METAnalyzer.h:429
edm::EDGetTokenT< std::vector< reco::PFCandidate > > pflowToken_
Definition: METAnalyzer.h:567
MonitorElement * meHFHadF_Minus_BXm1Filled
Definition: METAnalyzer.h:500
MonitorElement * meHFHadronEtFraction_profile
Definition: METAnalyzer.h:583
MonitorElement * meNHF_EndcapMinus_BXm1Empty
Definition: METAnalyzer.h:466
MonitorElement * hMET_CSCTightHalo2015Filter
Definition: METAnalyzer.h:316
MonitorElement * meHFEMEtFraction
Definition: METAnalyzer.h:371
MonitorElement * hMET_CSCTightHaloFilter
Definition: METAnalyzer.h:311
MonitorElement * meHFEMF_Minus_BXm1Filled
Definition: METAnalyzer.h:511
MonitorElement * meMETPhiChargedHadronsEndcapMinus_BXm1Empty
Definition: METAnalyzer.h:404
MonitorElement * hCaloEmEtFraction020
Definition: METAnalyzer.h:335
MonitorElement * meHFEMF_Plus_BXm1Empty
Definition: METAnalyzer.h:506
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:39
MonitorElement * mProfileIsoPFChHad_EMPtCentral
Definition: METAnalyzer.h:535
double ptMinCand_
Definition: METAnalyzer.h:529
MonitorElement * mePhF_EndcapPlus_BXm1Empty
Definition: METAnalyzer.h:481
std::vector< int > countsPFCand_
Definition: METAnalyzer.h:551
MonitorElement * meMETPhiHFHadronsPlus
Definition: METAnalyzer.h:562
MonitorElement * mProfileIsoPFChHad_HcalOccupancyEndcap
Definition: METAnalyzer.h:540
std::vector< MonitorElement * > multiplicityPFCand_
Definition: METAnalyzer.h:546
MonitorElement * hMET_EcalDeadCellTriggerFilter
Definition: METAnalyzer.h:313
int getNbinsX(void) const
get # of bins in X-axis
std::vector< std::string > multiplicityPFCand_name_
Definition: METAnalyzer.h:547
virtual double px() const final
x coordinate of momentum vector
virtual double et() const final
transverse energy
MonitorElement * meHFEMEt
Definition: METAnalyzer.h:372
std::vector< double > etaMinPFCand_
Definition: METAnalyzer.h:550
MonitorElement * meChargedHadronEtFraction_BXm1Filled
Definition: METAnalyzer.h:419
MonitorElement * meMETPhiHFEGammasMinus_BXm1Filled
Definition: METAnalyzer.h:435
MonitorElement * meMEy_profile
Definition: METAnalyzer.h:573
MonitorElement * meMETPhiPhotonsEndcapPlus_BXm1Filled
Definition: METAnalyzer.h:430
MonitorElement * meHFEMF_Plus
Definition: METAnalyzer.h:504
std::vector< std::string > profilePFCand_x_name_
Definition: METAnalyzer.h:547
MonitorElement * meSumET_profile
Definition: METAnalyzer.h:575
virtual double eta() const final
momentum pseudorapidity
MonitorElement * mProfileIsoPFChHad_TrackOccupancy
Definition: METAnalyzer.h:543
MonitorElement * meMETPhiHFEGammasPlus_BXm1Empty
Definition: METAnalyzer.h:413
MonitorElement * meMETPhiNeutralHadronsBarrel
Definition: METAnalyzer.h:556
MonitorElement * meCHF_Barrel
Definition: METAnalyzer.h:445
virtual ParticleType particleId() const
Definition: PFCandidate.h:373
bool isMiniAODMet_
Definition: METAnalyzer.h:612
MonitorElement * meHFHadronEt_profile
Definition: METAnalyzer.h:584
MonitorElement * meMETPhiPhotonsEndcapMinus
Definition: METAnalyzer.h:561
virtual int pdgId() const
PDG identifier.
MonitorElement * meNeutralHadronEt_profile
Definition: METAnalyzer.h:580
std::vector< std::string > ptPFCand_name_
Definition: METAnalyzer.h:547
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:682
MonitorElement * meHFHadF_Plus
Definition: METAnalyzer.h:493
MonitorElement * meCHF_EndcapPlus_BXm1Empty
Definition: METAnalyzer.h:449
MonitorElement * mePhF_Barrel
Definition: METAnalyzer.h:477
MonitorElement * mePhotonEtFraction_profile
Definition: METAnalyzer.h:577
MonitorElement * meMETPhiChargedHadronsEndcapPlus_BXm1Empty
Definition: METAnalyzer.h:403
MonitorElement * mProfileIsoPFChHad_HadPtEndcap
Definition: METAnalyzer.h:534
MonitorElement * mProfileIsoPFChHad_EcalOccupancyEndcap
Definition: METAnalyzer.h:542
MonitorElement * meMETPhiNeutralHadronsBarrel_BXm1Filled
Definition: METAnalyzer.h:426
MonitorElement * meMETPhiHFHadronsMinus
Definition: METAnalyzer.h:563
double hcalMin_
Definition: METAnalyzer.h:532
MonitorElement * meMETPhiChargedHadronsBarrel_BXm1Filled
Definition: METAnalyzer.h:423
edm::EDGetTokenT< std::vector< pat::PackedCandidate > > pflowPackedToken_
Definition: METAnalyzer.h:568
MonitorElement * meNHF_EndcapMinus
Definition: METAnalyzer.h:463
MonitorElement * meSumET_BXm1Filled
Definition: METAnalyzer.h:421
double rawHcalEnergy() const
return raw Hcal energy
Definition: PFCandidate.h:234
MonitorElement * meNHF_EndcapMinus_BXm1Filled
Definition: METAnalyzer.h:472
virtual double pt() const final
transverse momentum
std::vector< std::string > ptPFCand_name_puppiNolepWeight_
Definition: METAnalyzer.h:549
MonitorElement * meMETPhiNeutralHadronsEndcapPlus
Definition: METAnalyzer.h:557
MonitorElement * meNeutralHadronEt
Definition: METAnalyzer.h:364
void METAnalyzer::makeRatePlot ( std::string  DirName,
double  totltime 
)

Definition at line 1252 of file METAnalyzer.cc.

References MonitorElement::getRootObject(), MonitorElement::getTH1F(), i, and MonitorElement::setBinContent().

1253 {
1254 
1255  //dbe_->setCurrentFolder(DirName);
1256  MonitorElement *meMET = map_dijet_MEs[DirName+"/"+"MET"];
1257  MonitorElement *mMETRate = map_dijet_MEs[DirName+"/"+"METRate"];
1258 
1259  TH1F* tMET;
1260  TH1F* tMETRate;
1261 
1262  if ( meMET && mMETRate){
1263  if ( meMET->getRootObject() && mMETRate->getRootObject()) {
1264  tMET = meMET->getTH1F();
1265 
1266  // Integral plot & convert number of events to rate (hz)
1267  tMETRate = (TH1F*) tMET->Clone("METRateHist");
1268  for (int i = tMETRate->GetNbinsX()-1; i>=0; i--){
1269  mMETRate->setBinContent(i+1,tMETRate->GetBinContent(i+2)+tMET->GetBinContent(i+1));
1270  }
1271  for (int i = 0; i<tMETRate->GetNbinsX(); i++){
1272  mMETRate->setBinContent(i+1,tMETRate->GetBinContent(i+1)/double(totltime));
1273  }
1274  }
1275  }
1276 
1277 }
std::map< std::string, MonitorElement * > map_dijet_MEs
Definition: METAnalyzer.h:606
int i
Definition: DBlmapReader.cc:9
void setBinContent(int binx, double content)
set content of bin (1-D)
TObject * getRootObject(void) const
TH1F * getTH1F(void) const

Member Data Documentation

std::vector< int > METAnalyzer::allTriggerDecisions_
private

Definition at line 206 of file METAnalyzer.h.

std::vector<std::string > METAnalyzer::allTriggerNames_
private

Definition at line 205 of file METAnalyzer.h.

math::XYZPoint METAnalyzer::beamSpot_
private

Definition at line 290 of file METAnalyzer.h.

bool METAnalyzer::bypassAllDCSChecks_
private

Definition at line 258 of file METAnalyzer.h.

bool METAnalyzer::bypassAllPVChecks_
private

Definition at line 257 of file METAnalyzer.h.

edm::EDGetTokenT<reco::CaloJetCollection> METAnalyzer::caloJetsToken_
private

Definition at line 152 of file METAnalyzer.h.

edm::EDGetTokenT<reco::CaloMETCollection> METAnalyzer::caloMetToken_
private

Definition at line 184 of file METAnalyzer.h.

edm::ParameterSet METAnalyzer::cleaningParameters_
private

Definition at line 244 of file METAnalyzer.h.

std::vector<int> METAnalyzer::countsPFCand_
private

Definition at line 551 of file METAnalyzer.h.

edm::InputTag METAnalyzer::CSCHalo2015ResultTag_
private

Definition at line 171 of file METAnalyzer.h.

edm::EDGetTokenT<bool> METAnalyzer::CSCHalo2015ResultToken_
private

Definition at line 172 of file METAnalyzer.h.

edm::InputTag METAnalyzer::CSCHaloResultTag_
private

Definition at line 169 of file METAnalyzer.h.

edm::EDGetTokenT<bool> METAnalyzer::CSCHaloResultToken_
private

Definition at line 170 of file METAnalyzer.h.

JetMETDQMDCSFilter* METAnalyzer::DCSFilter_
private

Definition at line 286 of file METAnalyzer.h.

std::vector<edm::ParameterSet> METAnalyzer::diagnosticsParameters_
private

Definition at line 245 of file METAnalyzer.h.

edm::InputTag METAnalyzer::EcalDeadCellBoundaryTag_
private

Definition at line 177 of file METAnalyzer.h.

edm::EDGetTokenT<bool> METAnalyzer::EcalDeadCellBoundaryToken_
private

Definition at line 178 of file METAnalyzer.h.

edm::InputTag METAnalyzer::EcalDeadCellTriggerTag_
private

Definition at line 173 of file METAnalyzer.h.

edm::EDGetTokenT<bool> METAnalyzer::EcalDeadCellTriggerToken_
private

Definition at line 174 of file METAnalyzer.h.

edm::InputTag METAnalyzer::eeBadScFilterTag_
private

Definition at line 175 of file METAnalyzer.h.

edm::EDGetTokenT<bool> METAnalyzer::eeBadScFilterToken_
private

Definition at line 176 of file METAnalyzer.h.

std::vector<double> METAnalyzer::etaMaxPFCand_
private

Definition at line 550 of file METAnalyzer.h.

std::vector<double> METAnalyzer::etaMinPFCand_
private

Definition at line 550 of file METAnalyzer.h.

std::vector<int> METAnalyzer::etaNBinsPFCand_
private

Definition at line 551 of file METAnalyzer.h.

bool METAnalyzer::fill_met_high_level_histo
private

Definition at line 614 of file METAnalyzer.h.

bool METAnalyzer::fillCandidateMap_histos
private

Definition at line 615 of file METAnalyzer.h.

HLTConfigProvider METAnalyzer::FilterhltConfig_
private

Definition at line 199 of file METAnalyzer.h.

std::string METAnalyzer::FolderName_
private

Definition at line 142 of file METAnalyzer.h.

std::vector<std::string> METAnalyzer::folderNames_
private

Definition at line 288 of file METAnalyzer.h.

edm::InputTag METAnalyzer::gtTag_
private

Definition at line 148 of file METAnalyzer.h.

edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> METAnalyzer::gtToken_
private

Definition at line 151 of file METAnalyzer.h.

edm::EDGetTokenT<bool> METAnalyzer::hbheIsoNoiseFilterResultToken_
private

Definition at line 168 of file METAnalyzer.h.

std::string METAnalyzer::HBHEIsoNoiseStringMiniAOD
private

Definition at line 209 of file METAnalyzer.h.

edm::InputTag METAnalyzer::hbheNoiseFilterResultTag_
private

Definition at line 165 of file METAnalyzer.h.

edm::EDGetTokenT<bool> METAnalyzer::hbheNoiseFilterResultToken_
private

Definition at line 166 of file METAnalyzer.h.

edm::InputTag METAnalyzer::hbheNoiseIsoFilterResultTag_
private

Definition at line 167 of file METAnalyzer.h.

std::string METAnalyzer::HBHENoiseStringMiniAOD
private

Definition at line 208 of file METAnalyzer.h.

double METAnalyzer::hcalMin_
private

Definition at line 532 of file METAnalyzer.h.

edm::InputTag METAnalyzer::hcalNoiseRBXCollectionTag_
private

Definition at line 145 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmEtFraction
private

Definition at line 331 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmEtFraction020
private

Definition at line 335 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmEtInEB
private

Definition at line 343 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmEtInEE
private

Definition at line 342 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmEtInHF
private

Definition at line 341 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmMET
private

Definition at line 348 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmMETPhi
private

Definition at line 349 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmMEx
private

Definition at line 345 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEmMEy
private

Definition at line 346 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloEtFractionHadronic
private

Definition at line 330 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHadEtInHB
private

Definition at line 337 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHadEtInHE
private

Definition at line 339 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHadEtInHF
private

Definition at line 340 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHadEtInHO
private

Definition at line 338 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHaMET
private

Definition at line 355 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHaMETPhi
private

Definition at line 356 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHaMEx
private

Definition at line 352 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloHaMEy
private

Definition at line 353 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hCaloMETPhi020
private

Definition at line 329 of file METAnalyzer.h.

edm::InputTag METAnalyzer::HcalStripHaloTag_
private

Definition at line 179 of file METAnalyzer.h.

edm::EDGetTokenT<bool> METAnalyzer::HcalStripHaloToken_
private

Definition at line 180 of file METAnalyzer.h.

double METAnalyzer::hfCalibFactor_
private

Definition at line 283 of file METAnalyzer.h.

HLTConfigProvider METAnalyzer::hltConfig_
private

Definition at line 198 of file METAnalyzer.h.

std::string METAnalyzer::hltPhysDec_
private

Definition at line 247 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET
private

Definition at line 307 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET_2
private

Definition at line 308 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET_CSCTightHalo2015Filter
private

Definition at line 316 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET_CSCTightHaloFilter
private

Definition at line 311 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET_EcalDeadCellBoundaryFilter
private

Definition at line 314 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET_EcalDeadCellTriggerFilter
private

Definition at line 313 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET_eeBadScFilter
private

Definition at line 312 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET_HBHEIsoNoiseFilter
private

Definition at line 315 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET_HBHENoiseFilter
private

Definition at line 310 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET_HcalStripHaloFilter
private

Definition at line 317 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMET_logx
private

Definition at line 325 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMETPhi
private

Definition at line 319 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMETRate
private

Definition at line 242 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMETSig
private

Definition at line 306 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMEx
private

Definition at line 303 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMExLS
private

Definition at line 322 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMEy
private

Definition at line 304 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hMEyLS
private

Definition at line 323 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hSumET
private

Definition at line 320 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hSumET_logx
private

Definition at line 326 of file METAnalyzer.h.

MonitorElement* METAnalyzer::hTrigger
private

Definition at line 301 of file METAnalyzer.h.

bool METAnalyzer::hTriggerLabelsIsSet_
private

Definition at line 296 of file METAnalyzer.h.

edm::InputTag METAnalyzer::inputJetIDValueMap
private

Definition at line 186 of file METAnalyzer.h.

bool METAnalyzer::isCaloMet_
private

Definition at line 610 of file METAnalyzer.h.

bool METAnalyzer::isMiniAODMet_
private

Definition at line 612 of file METAnalyzer.h.

bool METAnalyzer::isPFMet_
private

Definition at line 611 of file METAnalyzer.h.

edm::InputTag METAnalyzer::jetCollectionLabel_
private

Definition at line 146 of file METAnalyzer.h.

edm::EDGetTokenT<reco::JetCorrector> METAnalyzer::jetCorrectorToken_
private

Definition at line 211 of file METAnalyzer.h.

edm::EDGetTokenT<edm::ValueMap <reco::JetID> > METAnalyzer::jetID_ValueMapToken_
private

Definition at line 187 of file METAnalyzer.h.

JetIDSelectionFunctor METAnalyzer::jetIDFunctorLoose
private

Definition at line 189 of file METAnalyzer.h.

int METAnalyzer::LSBegin_
private

Definition at line 254 of file METAnalyzer.h.

int METAnalyzer::LSEnd_
private

Definition at line 255 of file METAnalyzer.h.

MonitorElement* METAnalyzer::lumisecME
private

Definition at line 300 of file METAnalyzer.h.

int METAnalyzer::m_bitAlgTechTrig_
private

Definition at line 194 of file METAnalyzer.h.

std::string METAnalyzer::m_l1algoname_
private

Definition at line 193 of file METAnalyzer.h.

std::map< std::string,MonitorElement* > METAnalyzer::map_dijet_MEs
private

Definition at line 606 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meChargedHadronEt
private

Definition at line 367 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meChargedHadronEt_profile
private

Definition at line 582 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meChargedHadronEtFraction
private

Definition at line 366 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meChargedHadronEtFraction_BXm1Empty
private

Definition at line 398 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meChargedHadronEtFraction_BXm1Filled
private

Definition at line 419 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meChargedHadronEtFraction_profile
private

Definition at line 581 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meCHF_Barrel
private

Definition at line 445 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meCHF_Barrel_BXm1Empty
private

Definition at line 448 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meCHF_Barrel_BXm1Filled
private

Definition at line 454 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meCHF_EndcapMinus
private

Definition at line 447 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meCHF_EndcapMinus_BXm1Empty
private

Definition at line 450 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meCHF_EndcapMinus_BXm1Filled
private

Definition at line 456 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meCHF_EndcapPlus
private

Definition at line 446 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meCHF_EndcapPlus_BXm1Empty
private

Definition at line 449 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meCHF_EndcapPlus_BXm1Filled
private

Definition at line 455 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meElectronEt
private

Definition at line 365 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMEt
private

Definition at line 372 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMEt_profile
private

Definition at line 586 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMEtFraction
private

Definition at line 371 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMEtFraction_profile
private

Definition at line 585 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMF_Minus
private

Definition at line 505 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMF_Minus_BXm1Empty
private

Definition at line 507 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMF_Minus_BXm1Filled
private

Definition at line 511 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMF_Plus
private

Definition at line 504 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMF_Plus_BXm1Empty
private

Definition at line 506 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFEMF_Plus_BXm1Filled
private

Definition at line 510 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadF_Minus
private

Definition at line 494 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadF_Minus_BXm1Empty
private

Definition at line 496 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadF_Minus_BXm1Filled
private

Definition at line 500 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadF_Plus
private

Definition at line 493 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadF_Plus_BXm1Empty
private

Definition at line 495 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadF_Plus_BXm1Filled
private

Definition at line 499 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadronEt
private

Definition at line 370 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadronEt_profile
private

Definition at line 584 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadronEtFraction
private

Definition at line 369 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meHFHadronEtFraction_profile
private

Definition at line 583 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMET_BXm1Empty
private

Definition at line 399 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMET_BXm1Filled
private

Definition at line 420 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMET_profile
private

Definition at line 574 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiChargedHadronsBarrel
private

Definition at line 553 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiChargedHadronsBarrel_BXm1Empty
private

Definition at line 402 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiChargedHadronsBarrel_BXm1Filled
private

Definition at line 423 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiChargedHadronsEndcapMinus
private

Definition at line 555 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiChargedHadronsEndcapMinus_BXm1Empty
private

Definition at line 404 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiChargedHadronsEndcapMinus_BXm1Filled
private

Definition at line 425 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiChargedHadronsEndcapPlus
private

Definition at line 554 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiChargedHadronsEndcapPlus_BXm1Empty
private

Definition at line 403 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiChargedHadronsEndcapPlus_BXm1Filled
private

Definition at line 424 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFEGammasMinus
private

Definition at line 565 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFEGammasMinus_BXm1Empty
private

Definition at line 414 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFEGammasMinus_BXm1Filled
private

Definition at line 435 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFEGammasPlus
private

Definition at line 564 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFEGammasPlus_BXm1Empty
private

Definition at line 413 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFEGammasPlus_BXm1Filled
private

Definition at line 434 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFHadronsMinus
private

Definition at line 563 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFHadronsMinus_BXm1Empty
private

Definition at line 412 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFHadronsMinus_BXm1Filled
private

Definition at line 433 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFHadronsPlus
private

Definition at line 562 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFHadronsPlus_BXm1Empty
private

Definition at line 411 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiHFHadronsPlus_BXm1Filled
private

Definition at line 432 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiNeutralHadronsBarrel
private

Definition at line 556 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiNeutralHadronsBarrel_BXm1Empty
private

Definition at line 405 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiNeutralHadronsBarrel_BXm1Filled
private

Definition at line 426 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiNeutralHadronsEndcapMinus
private

Definition at line 558 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiNeutralHadronsEndcapMinus_BXm1Empty
private

Definition at line 407 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiNeutralHadronsEndcapMinus_BXm1Filled
private

Definition at line 428 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiNeutralHadronsEndcapPlus
private

Definition at line 557 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiNeutralHadronsEndcapPlus_BXm1Empty
private

Definition at line 406 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiNeutralHadronsEndcapPlus_BXm1Filled
private

Definition at line 427 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiPhotonsBarrel
private

Definition at line 559 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiPhotonsBarrel_BXm1Empty
private

Definition at line 408 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiPhotonsBarrel_BXm1Filled
private

Definition at line 429 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiPhotonsEndcapMinus
private

Definition at line 561 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiPhotonsEndcapMinus_BXm1Empty
private

Definition at line 410 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiPhotonsEndcapMinus_BXm1Filled
private

Definition at line 431 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiPhotonsEndcapPlus
private

Definition at line 560 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiPhotonsEndcapPlus_BXm1Empty
private

Definition at line 409 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMETPhiPhotonsEndcapPlus_BXm1Filled
private

Definition at line 430 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMEx_profile
private

Definition at line 572 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMEy_profile
private

Definition at line 573 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meMuonEt
private

Definition at line 368 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNeutralHadronEt
private

Definition at line 364 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNeutralHadronEt_profile
private

Definition at line 580 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNeutralHadronEtFraction
private

Definition at line 363 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNeutralHadronEtFraction_BXm1Empty
private

Definition at line 397 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNeutralHadronEtFraction_BXm1Filled
private

Definition at line 418 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNeutralHadronEtFraction_profile
private

Definition at line 579 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNHF_Barrel
private

Definition at line 461 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNHF_Barrel_BXm1Empty
private

Definition at line 464 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNHF_Barrel_BXm1Filled
private

Definition at line 470 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNHF_EndcapMinus
private

Definition at line 463 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNHF_EndcapMinus_BXm1Empty
private

Definition at line 466 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNHF_EndcapMinus_BXm1Filled
private

Definition at line 472 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNHF_EndcapPlus
private

Definition at line 462 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNHF_EndcapPlus_BXm1Empty
private

Definition at line 465 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meNHF_EndcapPlus_BXm1Filled
private

Definition at line 471 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhF_Barrel
private

Definition at line 477 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhF_Barrel_BXm1Empty
private

Definition at line 480 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhF_Barrel_BXm1Filled
private

Definition at line 486 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhF_EndcapMinus
private

Definition at line 479 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhF_EndcapMinus_BXm1Empty
private

Definition at line 482 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhF_EndcapMinus_BXm1Filled
private

Definition at line 488 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhF_EndcapPlus
private

Definition at line 478 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhF_EndcapPlus_BXm1Empty
private

Definition at line 481 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhF_EndcapPlus_BXm1Filled
private

Definition at line 487 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhotonEt
private

Definition at line 362 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhotonEt_profile
private

Definition at line 578 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhotonEtFraction
private

Definition at line 361 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhotonEtFraction_BXm1Empty
private

Definition at line 396 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhotonEtFraction_BXm1Filled
private

Definition at line 417 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mePhotonEtFraction_profile
private

Definition at line 577 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meSumET_BXm1Empty
private

Definition at line 400 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meSumET_BXm1Filled
private

Definition at line 421 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meSumET_profile
private

Definition at line 575 of file METAnalyzer.h.

edm::InputTag METAnalyzer::metCollectionLabel_
private

Definition at line 144 of file METAnalyzer.h.

edm::InputTag METAnalyzer::METFilterMiniAODLabel2_
private

Definition at line 159 of file METAnalyzer.h.

edm::InputTag METAnalyzer::METFilterMiniAODLabel_
private

Definition at line 157 of file METAnalyzer.h.

edm::EDGetTokenT<edm::TriggerResults> METAnalyzer::METFilterMiniAODToken2_
private

Definition at line 160 of file METAnalyzer.h.

edm::EDGetTokenT<edm::TriggerResults> METAnalyzer::METFilterMiniAODToken_
private

Definition at line 158 of file METAnalyzer.h.

std::string METAnalyzer::MetType_
private

Definition at line 141 of file METAnalyzer.h.

std::vector<double> METAnalyzer::MExPFCand_
private

Definition at line 550 of file METAnalyzer.h.

std::vector<double> METAnalyzer::MEyPFCand_
private

Definition at line 550 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_par
private

Definition at line 588 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_par_ZPt_0_15
private

Definition at line 589 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_par_ZPt_150_290
private

Definition at line 594 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_par_ZPt_15_30
private

Definition at line 590 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_par_ZPt_290
private

Definition at line 595 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_par_ZPt_30_55
private

Definition at line 591 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_par_ZPt_55_75
private

Definition at line 592 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_par_ZPt_75_150
private

Definition at line 593 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_perp
private

Definition at line 597 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_perp_ZPt_0_15
private

Definition at line 598 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_perp_ZPt_150_290
private

Definition at line 603 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_perp_ZPt_15_30
private

Definition at line 599 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_perp_ZPt_290
private

Definition at line 604 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_perp_ZPt_30_55
private

Definition at line 600 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_perp_ZPt_55_75
private

Definition at line 601 of file METAnalyzer.h.

MonitorElement* METAnalyzer::meZJets_u_perp_ZPt_75_150
private

Definition at line 602 of file METAnalyzer.h.

int METAnalyzer::miniaodfilterdec
private

Definition at line 163 of file METAnalyzer.h.

std::vector<int> METAnalyzer::miniaodFilterIndex_
private

Definition at line 162 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mProfileIsoPFChHad_EcalOccupancyCentral
private

Definition at line 541 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mProfileIsoPFChHad_EcalOccupancyEndcap
private

Definition at line 542 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mProfileIsoPFChHad_EMPtCentral
private

Definition at line 535 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mProfileIsoPFChHad_EMPtEndcap
private

Definition at line 536 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mProfileIsoPFChHad_HadPtCentral
private

Definition at line 533 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mProfileIsoPFChHad_HadPtEndcap
private

Definition at line 534 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mProfileIsoPFChHad_HcalOccupancyCentral
private

Definition at line 539 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mProfileIsoPFChHad_HcalOccupancyEndcap
private

Definition at line 540 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mProfileIsoPFChHad_TrackOccupancy
private

Definition at line 543 of file METAnalyzer.h.

MonitorElement* METAnalyzer::mProfileIsoPFChHad_TrackPt
private

Definition at line 537 of file METAnalyzer.h.

std::vector<MonitorElement* > METAnalyzer::multiplicityPFCand_
private

Definition at line 546 of file METAnalyzer.h.

std::vector<std::string> METAnalyzer::multiplicityPFCand_name_
private

Definition at line 547 of file METAnalyzer.h.

edm::EDGetTokenT<reco::MuonCollection> METAnalyzer::MuonsToken_
private

Definition at line 155 of file METAnalyzer.h.

std::vector<int> METAnalyzer::nbinsPFCand_
private

Definition at line 551 of file METAnalyzer.h.

int METAnalyzer::nbinsPV_
private

Definition at line 249 of file METAnalyzer.h.

std::vector<unsigned int> METAnalyzer::nCh
private

Definition at line 607 of file METAnalyzer.h.

std::vector<unsigned int> METAnalyzer::nEv
private

Definition at line 608 of file METAnalyzer.h.

double METAnalyzer::nPVMax_
private

Definition at line 251 of file METAnalyzer.h.

double METAnalyzer::nPVMin_
private

Definition at line 250 of file METAnalyzer.h.

int METAnalyzer::numPV_
private

Definition at line 277 of file METAnalyzer.h.

std::vector<MonitorElement* > METAnalyzer::occupancyPFCand_
private

Definition at line 546 of file METAnalyzer.h.

std::vector<std::string> METAnalyzer::occupancyPFCand_name_
private

Definition at line 547 of file METAnalyzer.h.

std::vector<std::string> METAnalyzer::occupancyPFCand_name_puppiNolepWeight_
private

Definition at line 549 of file METAnalyzer.h.

std::vector<MonitorElement* > METAnalyzer::occupancyPFCand_puppiNolepWeight_
private

Definition at line 548 of file METAnalyzer.h.

bool METAnalyzer::onlyCleaned_
private

Definition at line 260 of file METAnalyzer.h.

edm::ParameterSet METAnalyzer::parameters
private
edm::EDGetTokenT<pat::JetCollection> METAnalyzer::patJetsToken_
private

Definition at line 154 of file METAnalyzer.h.

edm::EDGetTokenT<pat::METCollection> METAnalyzer::patMetToken_
private

Definition at line 182 of file METAnalyzer.h.

PFJetIDSelectionFunctor METAnalyzer::pfjetIDFunctorLoose
private

Definition at line 190 of file METAnalyzer.h.

edm::EDGetTokenT<reco::PFJetCollection> METAnalyzer::pfJetsToken_
private

Definition at line 153 of file METAnalyzer.h.

edm::EDGetTokenT<std::vector<pat::PackedCandidate> > METAnalyzer::pflowPackedToken_
private

Definition at line 568 of file METAnalyzer.h.

edm::EDGetTokenT<std::vector<reco::PFCandidate> > METAnalyzer::pflowToken_
private

Definition at line 567 of file METAnalyzer.h.

edm::EDGetTokenT<reco::PFMETCollection> METAnalyzer::pfMetToken_
private

Definition at line 183 of file METAnalyzer.h.

std::vector<MonitorElement* > METAnalyzer::profilePFCand_x_
private

Definition at line 546 of file METAnalyzer.h.

std::vector<std::string> METAnalyzer::profilePFCand_x_name_
private

Definition at line 547 of file METAnalyzer.h.

std::vector<MonitorElement* > METAnalyzer::profilePFCand_y_
private

Definition at line 546 of file METAnalyzer.h.

std::vector<std::string> METAnalyzer::profilePFCand_y_name_
private

Definition at line 547 of file METAnalyzer.h.

double METAnalyzer::ptMinCand_
private

Definition at line 529 of file METAnalyzer.h.

std::vector<MonitorElement* > METAnalyzer::ptPFCand_
private

Definition at line 546 of file METAnalyzer.h.

std::vector<std::string> METAnalyzer::ptPFCand_name_
private

Definition at line 547 of file METAnalyzer.h.

std::vector<std::string> METAnalyzer::ptPFCand_name_puppiNolepWeight_
private

Definition at line 549 of file METAnalyzer.h.

std::vector<MonitorElement* > METAnalyzer::ptPFCand_puppiNolepWeight_
private

Definition at line 548 of file METAnalyzer.h.

double METAnalyzer::ptThreshold_
private

Definition at line 196 of file METAnalyzer.h.

bool METAnalyzer::runcosmics_
private

Definition at line 259 of file METAnalyzer.h.

std::vector<int> METAnalyzer::triggerFolderDecisions_
private

Definition at line 217 of file METAnalyzer.h.

std::vector<GenericTriggerEventFlag *> METAnalyzer::triggerFolderEventFlag_
private

Definition at line 214 of file METAnalyzer.h.

std::vector<std::vector<std::string> > METAnalyzer::triggerFolderExpr_
private

Definition at line 215 of file METAnalyzer.h.

std::vector<std::string > METAnalyzer::triggerFolderLabels_
private

Definition at line 216 of file METAnalyzer.h.

edm::InputTag METAnalyzer::triggerResultsLabel_
private

Definition at line 200 of file METAnalyzer.h.

edm::EDGetTokenT<edm::TriggerResults> METAnalyzer::triggerResultsToken_
private

Definition at line 201 of file METAnalyzer.h.

edm::VParameterSet METAnalyzer::triggerSelectedSubFolders_
private

Definition at line 213 of file METAnalyzer.h.

std::vector<int> METAnalyzer::typePFCand_
private

Definition at line 551 of file METAnalyzer.h.

int METAnalyzer::verbose_
private

Definition at line 139 of file METAnalyzer.h.

edm::InputTag METAnalyzer::vertexTag_
private

Definition at line 147 of file METAnalyzer.h.

edm::EDGetTokenT<std::vector<reco::Vertex> > METAnalyzer::vertexToken_
private

Definition at line 150 of file METAnalyzer.h.