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
DataCertificationJetMET Class Reference

#include <DataCertificationJetMET.h>

Inheritance diagram for DataCertificationJetMET:
DQMEDHarvester edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 DataCertificationJetMET (const edm::ParameterSet &)
 
 ~DataCertificationJetMET ()
 
- Public Member Functions inherited from DQMEDHarvester
virtual void analyze (edm::Event const &, edm::EventSetup const &) final
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDHarvester (void)
 
virtual void dqmEndLuminosityBlock (DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endJob () final
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::one::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

virtual void dqmEndJob (DQMStore::IBooker &, DQMStore::IGetter &)
 

Private Attributes

bool caloJetKSTest
 
bool caloJetMeanTest
 
bool caloMETKSTest
 
bool caloMETMeanTest
 
MonitorElementCertificationSummary
 
MonitorElementCertificationSummaryMap
 
edm::ParameterSet conf_
 
int etaBin_
 
double etaMax_
 
double etaMin_
 
std::string folderName
 
edm::Service< TFileServicefs_
 
bool InMemory_
 
edm::InputTag inputJetLabelMiniAOD_
 
edm::InputTag inputJetLabelRECO_
 
edm::InputTag inputMETLabelMiniAOD_
 
edm::InputTag inputMETLabelRECO_
 
edm::InputTag inputMETLabelRECOUncleaned_
 
bool isData
 
std::string jetAlgo
 
bool jetTests [5][2]
 
bool jptJetKSTest
 
bool jptJetMeanTest
 
MonitorElementmChargedHadronEtFraction_MiniAOD_over_Reco
 
MonitorElementmChargedHadronEtFraction_nVtx_profile_MiniAOD_over_Reco
 
MonitorElementmChargedMultiplicity_MiniAOD_over_Reco
 
MonitorElementmCHFrac_MiniAOD_over_Reco
 
MonitorElementmCHFracVSpT_Barrel_MiniAOD_over_Reco
 
MonitorElementmDPhi_MiniAOD_over_Reco
 
MonitorElementmEta_MiniAOD_over_Reco
 
MonitorElementmEta_uncor_MiniAOD_over_Reco
 
std::string metFolder
 
bool metTests [5][2]
 
MonitorElementmHFEFracVSpT_Forward_MiniAOD_over_Reco
 
MonitorElementmHFEMEtFraction_MiniAOD_over_Reco
 
MonitorElementmHFHadronEtFraction_MiniAOD_over_Reco
 
MonitorElementmHFHFracVSpT_Forward_MiniAOD_over_Reco
 
MonitorElementmJetEnergyCorr_MiniAOD_over_Reco
 
MonitorElementmJetEnergyCorrVSeta_MiniAOD_over_Reco
 
MonitorElementmLooseJIDPassFractionVSeta_MiniAOD_over_Reco
 
MonitorElementmMET_EffCSCTightHalo2015Filter
 
MonitorElementmMET_EffCSCTightHaloFilter
 
MonitorElementmMET_EffEcalDeadCellBoundaryFilter
 
MonitorElementmMET_EffEcalDeadCellTriggerFilter
 
MonitorElementmMET_EffeeBadScFilter
 
MonitorElementmMET_EffHBHEIsoNoiseFilter
 
MonitorElementmMET_EffHBHENoiseFilter
 
MonitorElementmMET_EffHcalStripHaloFilter
 
MonitorElementmMET_logx_MiniAOD_over_Reco
 
MonitorElementmMET_MiniAOD_over_Reco
 
MonitorElementmMET_nVtx_profile_MiniAOD_over_Reco
 
MonitorElementmMETPhi_MiniAOD_over_Reco
 
MonitorElementmMEy_MiniAOD_over_Reco
 
MonitorElementmMuonMultiplicity_MiniAOD_over_Reco
 
MonitorElementmMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD_over_Reco
 
MonitorElementmMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD_over_Reco
 
MonitorElementmMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD_over_Reco
 
MonitorElementmMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD_over_Reco
 
MonitorElementmMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD_over_Reco
 
MonitorElementmNeutralFraction_MiniAOD_over_Reco
 
MonitorElementmNeutralHadronEtFraction_MiniAOD_over_Reco
 
MonitorElementmNeutralHadronEtFraction_nVtx_profile_MiniAOD_over_Reco
 
MonitorElementmNeutralMultiplicity_MiniAOD_over_Reco
 
MonitorElementmNHFrac_MiniAOD_over_Reco
 
MonitorElementmNHFracVSpT_EndCap_MiniAOD_over_Reco
 
MonitorElementmNjets_MiniAOD_over_Reco
 
MonitorElementmPhFrac_MiniAOD_over_Reco
 
MonitorElementmPhFracVSpT_Barrel_MiniAOD_over_Reco
 
MonitorElementmPhi_MiniAOD_over_Reco
 
MonitorElementmPhi_uncor_MiniAOD_over_Reco
 
MonitorElementmPhotonEtFraction_MiniAOD_over_Reco
 
MonitorElementmPhotonEtFraction_nVtx_profile_MiniAOD_over_Reco
 
MonitorElementmPt_Barrel_MiniAOD_over_Reco
 
MonitorElementmPt_EndCap_MiniAOD_over_Reco
 
MonitorElementmPt_Forward_MiniAOD_over_Reco
 
MonitorElementmPt_MiniAOD_over_Reco
 
MonitorElementmPt_uncor_MiniAOD_over_Reco
 
MonitorElementmSumET_logx_MiniAOD_over_Reco
 
MonitorElementmSumET_MiniAOD_over_Reco
 
MonitorElementmSumET_nVtx_profile_MiniAOD_over_Reco
 
int nbinsPV_
 
double nPVMax_
 
double nPVMin_
 
bool pfJetKSTest
 
bool pfJetMeanTest
 
bool pfMETKSTest
 
bool pfMETMeanTest
 
int ptBin_
 
double ptMax_
 
double ptMin_
 
MonitorElementreportSummary
 
MonitorElementreportSummaryMap
 
bool tcMETKSTest
 
bool tcMETMeanTest
 
int verbose_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::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

Definition at line 28 of file DataCertificationJetMET.h.

Constructor & Destructor Documentation

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

Definition at line 18 of file DataCertificationJetMET.cc.

References conf_, gather_cfg::cout, etaBin_, etaMax_, etaMin_, folderName, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), inputJetLabelMiniAOD_, inputJetLabelRECO_, inputMETLabelMiniAOD_, inputMETLabelRECO_, inputMETLabelRECOUncleaned_, jetAlgo, jetTests, metFolder, metTests, nbinsPV_, nPVMax_, nPVMin_, ptBin_, ptMax_, ptMin_, AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

18  :conf_(iConfig)
19 {
20  // now do what ever initialization is needed
21  inputMETLabelRECO_=iConfig.getParameter<edm::InputTag>("METTypeRECO");
22  inputMETLabelRECOUncleaned_=iConfig.getParameter<edm::InputTag>("METTypeRECOUncleaned");
23  inputMETLabelMiniAOD_=iConfig.getParameter<edm::InputTag>("METTypeMiniAOD");
24  inputJetLabelRECO_=iConfig.getParameter<edm::InputTag>("JetTypeRECO");
25  inputJetLabelMiniAOD_=iConfig.getParameter<edm::InputTag>("JetTypeMiniAOD");
26 
27  nbinsPV_ = iConfig.getParameter<int>("pVBin");
28  nPVMin_ = iConfig.getParameter<double>("pVMin");
29  nPVMax_ = iConfig.getParameter<double>("pVMax");
30 
31  etaBin_ = iConfig.getParameter<int>("etaBin");
32  etaMin_ = iConfig.getParameter<double>("etaMin");
33  etaMax_ = iConfig.getParameter<double>("etaMax");
34 
35  ptBin_ = iConfig.getParameter<int>("ptBin");
36  ptMin_ = iConfig.getParameter<double>("ptMin");
37  ptMax_ = iConfig.getParameter<double>("ptMax");
38 
39  // -----------------------------------------
40  // verbose_ 0: suppress printouts
41  // 1: show printouts
42  verbose_ = conf_.getUntrackedParameter<int>("Verbose",0);
46 
47  jetTests[0][0] = conf_.getUntrackedParameter<bool>("pfBarrelJetMeanTest",true);
48  jetTests[0][1] = conf_.getUntrackedParameter<bool>("pfBarrelJetKSTest",false);
49  jetTests[1][0] = conf_.getUntrackedParameter<bool>("pfEndcapJetMeanTest",true);
50  jetTests[1][1] = conf_.getUntrackedParameter<bool>("pfEndcapJetKSTest",false);
51  jetTests[2][0] = conf_.getUntrackedParameter<bool>("pfForwardJetMeanTest",true);
52  jetTests[2][1] = conf_.getUntrackedParameter<bool>("pfForwardJetKSTest",false);
53  jetTests[3][0] = conf_.getUntrackedParameter<bool>("caloJetMeanTest",true);
54  jetTests[3][1] = conf_.getUntrackedParameter<bool>("caloJetKSTest",false);
55  jetTests[4][0] = conf_.getUntrackedParameter<bool>("jptJetMeanTest",true);
56  jetTests[4][1] = conf_.getUntrackedParameter<bool>("jptJetKSTest",false);
57 
58  metTests[0][0] = conf_.getUntrackedParameter<bool>("caloMETMeanTest",true);
59  metTests[0][1] = conf_.getUntrackedParameter<bool>("caloMETKSTest",false);
60  metTests[1][0] = conf_.getUntrackedParameter<bool>("pfMETMeanTest",true);
61  metTests[1][1] = conf_.getUntrackedParameter<bool>("pfMETKSTest",false);
62  metTests[2][0] = conf_.getUntrackedParameter<bool>("tcMETMeanTest",true);
63  metTests[2][1] = conf_.getUntrackedParameter<bool>("tcMETKSTest",false);
64 
65  if (verbose_) std::cout << ">>> Constructor (DataCertificationJetMET) <<<" << std::endl;
66 
67  // -----------------------------------------
68  //
69 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
tuple cout
Definition: gather_cfg.py:145
DataCertificationJetMET::~DataCertificationJetMET ( )

Definition at line 72 of file DataCertificationJetMET.cc.

References gather_cfg::cout, and verbose_.

73 {
74  // do anything here that needs to be done at desctruction time
75  // (e.g. close files, deallocate resources etc.)
76  if (verbose_) std::cout << ">>> Deconstructor (DataCertificationJetMET) <<<" << std::endl;
77 }
tuple cout
Definition: gather_cfg.py:145

Member Function Documentation

void DataCertificationJetMET::dqmEndJob ( DQMStore::IBooker ibook_,
DQMStore::IGetter iget_ 
)
privatevirtual

Implements DQMEDHarvester.

Definition at line 82 of file DataCertificationJetMET.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), DQMStore::IBooker::bookFloat(), CertificationSummary, CertificationSummaryMap, gather_cfg::cout, etaBin_, etaMax_, etaMin_, MonitorElement::Fill(), folderName, DQMStore::IGetter::get(), MonitorElement::getBinContent(), MonitorElement::getNbinsX(), MonitorElement::getQReport(), MonitorElement::getRootObject(), DQMStore::IGetter::getSubdirs(), MonitorElement::getTH2F(), i, InMemory_, inputJetLabelMiniAOD_, inputJetLabelRECO_, inputMETLabelMiniAOD_, inputMETLabelRECO_, inputMETLabelRECOUncleaned_, j, jetAlgo, jetTests, edm::InputTag::label(), mChargedHadronEtFraction_MiniAOD_over_Reco, mChargedHadronEtFraction_nVtx_profile_MiniAOD_over_Reco, mChargedMultiplicity_MiniAOD_over_Reco, mCHFrac_MiniAOD_over_Reco, mCHFracVSpT_Barrel_MiniAOD_over_Reco, mDPhi_MiniAOD_over_Reco, mEta_MiniAOD_over_Reco, mEta_uncor_MiniAOD_over_Reco, metFolder, metTests, mHFEFracVSpT_Forward_MiniAOD_over_Reco, mHFEMEtFraction_MiniAOD_over_Reco, mHFHadronEtFraction_MiniAOD_over_Reco, mHFHFracVSpT_Forward_MiniAOD_over_Reco, mJetEnergyCorr_MiniAOD_over_Reco, mJetEnergyCorrVSeta_MiniAOD_over_Reco, mLooseJIDPassFractionVSeta_MiniAOD_over_Reco, mMET_EffCSCTightHalo2015Filter, mMET_EffCSCTightHaloFilter, mMET_EffEcalDeadCellBoundaryFilter, mMET_EffEcalDeadCellTriggerFilter, mMET_EffeeBadScFilter, mMET_EffHBHEIsoNoiseFilter, mMET_EffHBHENoiseFilter, mMET_EffHcalStripHaloFilter, mMET_logx_MiniAOD_over_Reco, mMET_MiniAOD_over_Reco, mMET_nVtx_profile_MiniAOD_over_Reco, mMETPhi_MiniAOD_over_Reco, mMEy_MiniAOD_over_Reco, mMuonMultiplicity_MiniAOD_over_Reco, mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD_over_Reco, mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD_over_Reco, mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD_over_Reco, mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD_over_Reco, mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD_over_Reco, mNeutralFraction_MiniAOD_over_Reco, mNeutralHadronEtFraction_MiniAOD_over_Reco, mNeutralHadronEtFraction_nVtx_profile_MiniAOD_over_Reco, mNeutralMultiplicity_MiniAOD_over_Reco, mNHFrac_MiniAOD_over_Reco, mNHFracVSpT_EndCap_MiniAOD_over_Reco, mNjets_MiniAOD_over_Reco, mPhFrac_MiniAOD_over_Reco, mPhFracVSpT_Barrel_MiniAOD_over_Reco, mPhi_MiniAOD_over_Reco, mPhi_uncor_MiniAOD_over_Reco, mPhotonEtFraction_MiniAOD_over_Reco, mPhotonEtFraction_nVtx_profile_MiniAOD_over_Reco, mPt_Barrel_MiniAOD_over_Reco, mPt_EndCap_MiniAOD_over_Reco, mPt_Forward_MiniAOD_over_Reco, mPt_MiniAOD_over_Reco, mPt_uncor_MiniAOD_over_Reco, mSumET_logx_MiniAOD_over_Reco, mSumET_MiniAOD_over_Reco, mSumET_nVtx_profile_MiniAOD_over_Reco, nbinsPV_, nPVMax_, nPVMin_, ptBin_, ptMax_, ptMin_, reportSummary, reportSummaryMap, MonitorElement::setBinContent(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), DQMStore::IGetter::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::tt, and verbose_.

83 {
84 
85  //put RECO vs MiniAODDir first ->first MET
86  std::vector<std::string> subDirVecMET;
87  std::string RunDirMET="JetMET/MET/";
88  iget_.setCurrentFolder(RunDirMET);
89  subDirVecMET=iget_.getSubdirs();
90  bool found_METreco_dir=false;
91  bool found_METminiaod_dir=false;
92  //check if proper directories are inside the files
93  for (int i=0; i<int(subDirVecMET.size()); i++) {
94  ibook_.setCurrentFolder(subDirVecMET[i]);
95  if((subDirVecMET[i]+"/Cleaned")==(RunDirMET+inputMETLabelRECO_.label()+"/Cleaned")){
96  found_METreco_dir=true;
97  }
98  if( ((subDirVecMET[i]+"/Uncleaned")==(RunDirMET+inputMETLabelRECOUncleaned_.label()+"/Uncleaned")) || ((subDirVecMET[i]+"/Uncleaned")==(RunDirMET+inputMETLabelMiniAOD_.label()+"/Uncleaned"))){
99  //check filters in uncleaned directory
100  std::string rundirMET_reco="";
101  if((subDirVecMET[i]+"/Uncleaned")==(RunDirMET+inputMETLabelRECOUncleaned_.label()+"/Uncleaned")){
102  rundirMET_reco = RunDirMET+inputMETLabelRECOUncleaned_.label()+"/Uncleaned";
103  }else{
104  rundirMET_reco = RunDirMET+inputMETLabelMiniAOD_.label()+"/Uncleaned";
105  }
106  MonitorElement* mMET_Reco=iget_.get(rundirMET_reco+"/"+"MET");
107  MonitorElement* mMET_Reco_HBHENoiseFilter=iget_.get(rundirMET_reco+"/"+"MET_HBHENoiseFilter");
108  MonitorElement* mMET_Reco_CSCTightHaloFilter=iget_.get(rundirMET_reco+"/"+"MET_CSCTightHaloFilter");
109  MonitorElement* mMET_Reco_eeBadScFilter=iget_.get(rundirMET_reco+"/"+"MET_eeBadScFilter");
110  MonitorElement* mMET_Reco_HBHEIsoNoiseFilter=iget_.get(rundirMET_reco+"/"+"MET_HBHEIsoNoiseFilter");
111  MonitorElement* mMET_Reco_CSCTightHalo2015Filter=iget_.get(rundirMET_reco+"/"+"MET_CSCTightHalo2015Filter");
112  MonitorElement* mMET_Reco_EcalDeadCellTriggerFilter=iget_.get(rundirMET_reco+"/"+"MET_EcalDeadCellTriggerFilter");
113  MonitorElement* mMET_Reco_EcalDeadCellBoundaryFilter=iget_.get(rundirMET_reco+"/"+"MET_EcalDeadCellBoundaryFilter");
114  MonitorElement* mMET_Reco_HcalStripHaloFilter=iget_.get(rundirMET_reco+"/"+"MET_HcalStripHaloFilter");
115  ibook_.setCurrentFolder(rundirMET_reco);
116  mMET_EffHBHENoiseFilter=ibook_.book1D("MET_EffHBHENoiseFilter",(TH1F*)mMET_Reco_HBHENoiseFilter->getRootObject());
117  for(int i=0;i<=(mMET_Reco->getNbinsX()+1);i++){
118  if(mMET_Reco->getBinContent(i)!=0){
119  mMET_EffHBHENoiseFilter->setBinContent(i,mMET_Reco_HBHENoiseFilter->getBinContent(i)/mMET_Reco->getBinContent(i));
120  }else{
122  }
123  }
124  mMET_EffCSCTightHaloFilter=ibook_.book1D("MET_EffCSCTightHaloFilter",(TH1F*)mMET_Reco_CSCTightHaloFilter->getRootObject());
125  for(int i=0;i<=(mMET_Reco->getNbinsX()+1);i++){
126  if(mMET_Reco->getBinContent(i)!=0){
127  mMET_EffCSCTightHaloFilter->setBinContent(i,mMET_Reco_CSCTightHaloFilter->getBinContent(i)/mMET_Reco->getBinContent(i));
128  }else{
130  }
131  }
132  mMET_EffeeBadScFilter=ibook_.book1D("MET_EffeeBadScFilter",(TH1F*)mMET_Reco_eeBadScFilter->getRootObject());
133  for(int i=0;i<=(mMET_Reco->getNbinsX()+1);i++){
134  if(mMET_Reco->getBinContent(i)!=0){
135  mMET_EffeeBadScFilter->setBinContent(i,mMET_Reco_eeBadScFilter->getBinContent(i)/mMET_Reco->getBinContent(i));
136  }else{
138  }
139  }
140  mMET_EffHBHEIsoNoiseFilter=ibook_.book1D("MET_EffHBHEIsoNoiseFilter",(TH1F*)mMET_Reco_HBHEIsoNoiseFilter->getRootObject());
141  for(int i=0;i<=(mMET_Reco->getNbinsX()+1);i++){
142  if(mMET_Reco->getBinContent(i)!=0){
143  mMET_EffHBHEIsoNoiseFilter->setBinContent(i,mMET_Reco_HBHEIsoNoiseFilter->getBinContent(i)/mMET_Reco->getBinContent(i));
144  }else{
146  }
147  }
148  mMET_EffCSCTightHalo2015Filter=ibook_.book1D("MET_EffCSCTightHalo2015Filter",(TH1F*)mMET_Reco_CSCTightHalo2015Filter->getRootObject());
149  for(int i=0;i<=(mMET_Reco->getNbinsX()+1);i++){
150  if(mMET_Reco->getBinContent(i)!=0){
151  mMET_EffCSCTightHalo2015Filter->setBinContent(i,mMET_Reco_CSCTightHalo2015Filter->getBinContent(i)/mMET_Reco->getBinContent(i));
152  }else{
154  }
155  }
156  mMET_EffEcalDeadCellTriggerFilter=ibook_.book1D("MET_EffEcalDeadCellTriggerFilter",(TH1F*)mMET_Reco_EcalDeadCellTriggerFilter->getRootObject());
157  for(int i=0;i<=(mMET_Reco->getNbinsX()+1);i++){
158  if(mMET_Reco->getBinContent(i)!=0){
159  mMET_EffEcalDeadCellTriggerFilter->setBinContent(i,mMET_Reco_EcalDeadCellTriggerFilter->getBinContent(i)/mMET_Reco->getBinContent(i));
160  }else{
162  }
163  }
164  mMET_EffEcalDeadCellBoundaryFilter=ibook_.book1D("MET_EffEcalDeadCellBoundaryFilter",(TH1F*)mMET_Reco_EcalDeadCellBoundaryFilter->getRootObject());
165  for(int i=0;i<=(mMET_Reco->getNbinsX()+1);i++){
166  if(mMET_Reco->getBinContent(i)!=0){
167  mMET_EffEcalDeadCellBoundaryFilter->setBinContent(i,mMET_Reco_EcalDeadCellBoundaryFilter->getBinContent(i)/mMET_Reco->getBinContent(i));
168  }else{
170  }
171  }
172  mMET_EffHcalStripHaloFilter=ibook_.book1D("MET_EffHcalStripHaloFilter",(TH1F*)mMET_Reco_HcalStripHaloFilter->getRootObject());
173  for(int i=0;i<=(mMET_Reco->getNbinsX()+1);i++){
174  if(mMET_Reco->getBinContent(i)!=0){
175  mMET_EffHcalStripHaloFilter->setBinContent(i,mMET_Reco_HcalStripHaloFilter->getBinContent(i)/mMET_Reco->getBinContent(i));
176  }else{
178  }
179  }
180  }
181  if((subDirVecMET[i]+"/Cleaned")==(RunDirMET+inputMETLabelMiniAOD_.label()+"/Cleaned")){
182  found_METminiaod_dir=true;
183  }
184  }
185  if(found_METreco_dir && found_METminiaod_dir){
186  std::string rundirMET_reco=RunDirMET+inputMETLabelRECO_.label()+"/Cleaned";
187  std::string rundirMET_miniaod=RunDirMET+inputMETLabelMiniAOD_.label()+"/Cleaned";
188  MonitorElement* mMET_Reco=iget_.get(rundirMET_reco+"/"+"MET");
189  MonitorElement* mMEy_Reco=iget_.get(rundirMET_reco+"/"+"MEy");
190  MonitorElement* mSumET_Reco=iget_.get(rundirMET_reco+"/"+"SumET");
191  MonitorElement* mMETPhi_Reco=iget_.get(rundirMET_reco+"/"+"METPhi");
192  MonitorElement* mMET_logx_Reco=iget_.get(rundirMET_reco+"/"+"MET_logx");
193  MonitorElement* mSumET_logx_Reco=iget_.get(rundirMET_reco+"/"+"SumET_logx");
194  MonitorElement* mChargedHadronEtFraction_Reco=iget_.get(rundirMET_reco+"/"+"PfChargedHadronEtFraction");
195  MonitorElement* mNeutralHadronEtFraction_Reco=iget_.get(rundirMET_reco+"/"+"PfNeutralHadronEtFraction");
196  MonitorElement* mPhotonEtFraction_Reco=iget_.get(rundirMET_reco+"/"+"PfPhotonEtFraction");
197  MonitorElement* mHFHadronEtFraction_Reco=iget_.get(rundirMET_reco+"/"+"PfHFHadronEtFraction");
198  MonitorElement* mHFEMEtFraction_Reco=iget_.get(rundirMET_reco+"/"+"PfHFEMEtFraction");
199  MonitorElement* mMET_nVtx_profile_Reco=iget_.get(rundirMET_reco+"/"+"MET_profile");
200  MonitorElement* mSumET_nVtx_profile_Reco=iget_.get(rundirMET_reco+"/"+"SumET_profile");
201  MonitorElement* mChargedHadronEtFraction_nVtx_profile_Reco=iget_.get(rundirMET_reco+"/"+"PfChargedHadronEtFraction_profile");
202  MonitorElement* mNeutralHadronEtFraction_nVtx_profile_Reco=iget_.get(rundirMET_reco+"/"+"PfNeutralHadronEtFraction_profile");
203  MonitorElement* mPhotonEtFraction_nVtx_profile_Reco=iget_.get(rundirMET_reco+"/"+"PfPhotonEtFraction_profile");
204 
205  std::vector<MonitorElement*> me_MET_Reco;
206  me_MET_Reco.push_back(mMET_Reco);
207  me_MET_Reco.push_back(mMEy_Reco);
208  me_MET_Reco.push_back(mSumET_Reco);
209  me_MET_Reco.push_back(mMETPhi_Reco);
210  me_MET_Reco.push_back(mMET_logx_Reco);
211  me_MET_Reco.push_back(mSumET_logx_Reco);
212  me_MET_Reco.push_back(mChargedHadronEtFraction_Reco);
213  me_MET_Reco.push_back(mNeutralHadronEtFraction_Reco);
214  me_MET_Reco.push_back(mPhotonEtFraction_Reco);
215  me_MET_Reco.push_back(mHFHadronEtFraction_Reco);
216  me_MET_Reco.push_back(mHFEMEtFraction_Reco);
217  me_MET_Reco.push_back(mMET_nVtx_profile_Reco);
218  me_MET_Reco.push_back(mSumET_nVtx_profile_Reco);
219  me_MET_Reco.push_back(mChargedHadronEtFraction_nVtx_profile_Reco);
220  me_MET_Reco.push_back(mNeutralHadronEtFraction_nVtx_profile_Reco);
221  me_MET_Reco.push_back(mPhotonEtFraction_nVtx_profile_Reco);
222 
223  MonitorElement* mMET_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"MET");
224  MonitorElement* mMEy_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"MEy");
225  MonitorElement* mSumET_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"SumET");
226  MonitorElement* mMETPhi_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"METPhi");
227  MonitorElement* mMET_logx_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"MET_logx");
228  MonitorElement* mSumET_logx_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"SumET_logx");
229  MonitorElement* mChargedHadronEtFraction_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfChargedHadronEtFraction");
230  MonitorElement* mNeutralHadronEtFraction_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfNeutralHadronEtFraction");
231  MonitorElement* mPhotonEtFraction_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfPhotonEtFraction");
232  MonitorElement* mHFHadronEtFraction_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfHFHadronEtFraction");
233  MonitorElement* mHFEMEtFraction_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfHFEMEtFraction");
234  MonitorElement* mMET_nVtx_profile_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"MET_profile");
235  MonitorElement* mSumET_nVtx_profile_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"SumET_profile");
236  MonitorElement* mChargedHadronEtFraction_nVtx_profile_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfChargedHadronEtFraction_profile");
237  MonitorElement* mNeutralHadronEtFraction_nVtx_profile_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfNeutralHadronEtFraction_profile");
238  MonitorElement* mPhotonEtFraction_nVtx_profile_MiniAOD=iget_.get(rundirMET_miniaod+"/"+"PfPhotonEtFraction_profile");
239 
240  std::vector<MonitorElement*> me_MET_MiniAOD;
241  me_MET_MiniAOD.push_back(mMET_MiniAOD);
242  me_MET_MiniAOD.push_back(mMEy_MiniAOD);
243  me_MET_MiniAOD.push_back(mSumET_MiniAOD);
244  me_MET_MiniAOD.push_back(mMETPhi_MiniAOD);
245  me_MET_MiniAOD.push_back(mMET_logx_MiniAOD);
246  me_MET_MiniAOD.push_back(mSumET_logx_MiniAOD);
247  me_MET_MiniAOD.push_back(mChargedHadronEtFraction_MiniAOD);
248  me_MET_MiniAOD.push_back(mNeutralHadronEtFraction_MiniAOD);
249  me_MET_MiniAOD.push_back(mPhotonEtFraction_MiniAOD);
250  me_MET_MiniAOD.push_back(mHFHadronEtFraction_MiniAOD);
251  me_MET_MiniAOD.push_back(mHFEMEtFraction_MiniAOD);
252  me_MET_MiniAOD.push_back(mMET_nVtx_profile_MiniAOD);
253  me_MET_MiniAOD.push_back(mSumET_nVtx_profile_MiniAOD);
254  me_MET_MiniAOD.push_back(mChargedHadronEtFraction_nVtx_profile_MiniAOD);
255  me_MET_MiniAOD.push_back(mNeutralHadronEtFraction_nVtx_profile_MiniAOD);
256  me_MET_MiniAOD.push_back(mPhotonEtFraction_nVtx_profile_MiniAOD);
257 
258  ibook_.setCurrentFolder(RunDirMET+"MiniAOD_over_RECO");
259  mMET_MiniAOD_over_Reco=ibook_.book1D("MET_MiniAOD_over_RECO",(TH1F*)mMET_Reco->getRootObject());
260  mMEy_MiniAOD_over_Reco=ibook_.book1D("MEy_MiniAOD_over_RECO",(TH1F*)mMEy_Reco->getRootObject());
261  mSumET_MiniAOD_over_Reco=ibook_.book1D("SumET_MiniAOD_over_RECO",(TH1F*)mSumET_Reco->getRootObject());
262  mMETPhi_MiniAOD_over_Reco=ibook_.book1D("METPhi_MiniAOD_over_RECO",(TH1F*)mMETPhi_Reco->getRootObject());
263  mMET_logx_MiniAOD_over_Reco=ibook_.book1D("MET_logx_MiniAOD_over_RECO",(TH1F*)mMET_logx_Reco->getRootObject());
264  mSumET_logx_MiniAOD_over_Reco=ibook_.book1D("SumET_logx_MiniAOD_over_RECO",(TH1F*)mSumET_logx_Reco->getRootObject());
265  mChargedHadronEtFraction_MiniAOD_over_Reco=ibook_.book1D("PfChargedHadronEtFraction_MiniAOD_over_RECO",(TH1F*)mChargedHadronEtFraction_Reco->getRootObject());
266  mNeutralHadronEtFraction_MiniAOD_over_Reco=ibook_.book1D("PfNeutralHadronEtFraction_MiniAOD_over_RECO",(TH1F*)mNeutralHadronEtFraction_Reco->getRootObject());
267  mPhotonEtFraction_MiniAOD_over_Reco=ibook_.book1D("PfPhotonEtFraction_MiniAOD_over_RECO",(TH1F*)mPhotonEtFraction_Reco->getRootObject());
268  mHFHadronEtFraction_MiniAOD_over_Reco=ibook_.book1D("PfHFHadronEtFraction_MiniAOD_over_RECO",(TH1F*)mHFHadronEtFraction_Reco->getRootObject());
269  mHFEMEtFraction_MiniAOD_over_Reco=ibook_.book1D("PfHFEMEtFraction_MiniAOD_over_RECO",(TH1F*)mHFEMEtFraction_Reco->getRootObject());
270  //use same parameters defining X-Axis of the profiles
271  mMET_nVtx_profile_MiniAOD_over_Reco=ibook_.book1D("MET_profile_MiniAOD_over_RECO","MET_vs_nVtx",nbinsPV_, nPVMin_, nPVMax_);
272  mSumET_nVtx_profile_MiniAOD_over_Reco=ibook_.book1D("SumET_profile_MiniAOD_over_RECO","SumET_vs_nVtx",nbinsPV_, nPVMin_, nPVMax_);
273  mChargedHadronEtFraction_nVtx_profile_MiniAOD_over_Reco=ibook_.book1D("PfChargedHadronEtFraction_profile_MiniAOD_over_RECO","PfChargedHadronEtFraction_vs_nVtx",nbinsPV_, nPVMin_, nPVMax_);
274  mNeutralHadronEtFraction_nVtx_profile_MiniAOD_over_Reco=ibook_.book1D("PfNeutralHadronEtFraction_profile_MiniAOD_over_RECO","PfNeutralHadronEtFraction_vs_nVtx",nbinsPV_, nPVMin_, nPVMax_);
275  mPhotonEtFraction_nVtx_profile_MiniAOD_over_Reco=ibook_.book1D("PfPhotonEtFraction_profile_MiniAOD_over_RECO","PfPhotonEtFraction_vs_nVtx",nbinsPV_, nPVMin_, nPVMax_);
276 
277  std::vector<MonitorElement*> me_MET_MiniAOD_over_Reco;
278  me_MET_MiniAOD_over_Reco.push_back(mMET_MiniAOD_over_Reco);
279  me_MET_MiniAOD_over_Reco.push_back(mMEy_MiniAOD_over_Reco);
280  me_MET_MiniAOD_over_Reco.push_back(mSumET_MiniAOD_over_Reco);
281  me_MET_MiniAOD_over_Reco.push_back(mMETPhi_MiniAOD_over_Reco);
282  me_MET_MiniAOD_over_Reco.push_back(mMET_logx_MiniAOD_over_Reco);
283  me_MET_MiniAOD_over_Reco.push_back(mSumET_logx_MiniAOD_over_Reco);
284  me_MET_MiniAOD_over_Reco.push_back(mChargedHadronEtFraction_MiniAOD_over_Reco);
285  me_MET_MiniAOD_over_Reco.push_back(mNeutralHadronEtFraction_MiniAOD_over_Reco);
286  me_MET_MiniAOD_over_Reco.push_back(mPhotonEtFraction_MiniAOD_over_Reco);
287  me_MET_MiniAOD_over_Reco.push_back(mHFHadronEtFraction_MiniAOD_over_Reco);
288  me_MET_MiniAOD_over_Reco.push_back(mHFEMEtFraction_MiniAOD_over_Reco);
289  me_MET_MiniAOD_over_Reco.push_back(mMET_nVtx_profile_MiniAOD_over_Reco);
290  me_MET_MiniAOD_over_Reco.push_back(mSumET_nVtx_profile_MiniAOD_over_Reco);
291  me_MET_MiniAOD_over_Reco.push_back(mChargedHadronEtFraction_nVtx_profile_MiniAOD_over_Reco);
292  me_MET_MiniAOD_over_Reco.push_back(mNeutralHadronEtFraction_nVtx_profile_MiniAOD_over_Reco);
293  me_MET_MiniAOD_over_Reco.push_back(mPhotonEtFraction_nVtx_profile_MiniAOD_over_Reco);
294 
295  for(unsigned int j=0;j<me_MET_MiniAOD_over_Reco.size();j++){
296  MonitorElement* monMETReco=me_MET_Reco[j];if(monMETReco && monMETReco->getRootObject()){
297  MonitorElement* monMETMiniAOD=me_MET_MiniAOD[j];if(monMETMiniAOD && monMETMiniAOD->getRootObject()){
298  MonitorElement* monMETMiniAOD_over_RECO=me_MET_MiniAOD_over_Reco[j];if(monMETMiniAOD_over_RECO && monMETMiniAOD_over_RECO->getRootObject()){
299  for(int i=0;i<=(monMETMiniAOD_over_RECO->getNbinsX()+1);i++){
300  if(monMETReco->getBinContent(i)!=0){
301  monMETMiniAOD_over_RECO->setBinContent(i,monMETMiniAOD->getBinContent(i)/monMETReco->getBinContent(i));
302  }else if (monMETMiniAOD->getBinContent(i)!=0){
303  monMETMiniAOD_over_RECO->setBinContent(i,-0.5);
304  }
305  }
306  }
307  }
308  }
309  }
310  }//check for RECO and MiniAOD directories
311 
312  //put RECO vs MiniAODDir first ->second Jets
313  std::vector<std::string> subDirVecJet;
314  //go only for cleaned directory
315  std::string RunDirJet="JetMET/Jet/";
316  iget_.setCurrentFolder(RunDirJet);
317  subDirVecJet=iget_.getSubdirs();
318  bool found_Jetreco_dir=false;
319  bool found_Jetminiaod_dir=false;
320  for (int i=0; i<int(subDirVecJet.size()); i++) {
321  ibook_.setCurrentFolder(subDirVecJet[i]);
322  if(subDirVecJet[i]==(RunDirJet+"Cleaned"+inputJetLabelRECO_.label())){
323  found_Jetreco_dir=true;
324  }
325  if(subDirVecJet[i]==(RunDirJet+"Cleaned"+inputJetLabelMiniAOD_.label())){
326  found_Jetminiaod_dir=true;
327  }
328  }
329  if(found_Jetreco_dir && found_Jetminiaod_dir){
330  std::string rundirJet_reco=RunDirJet+"Cleaned"+inputJetLabelRECO_.label();
331  std::string rundirJet_miniaod=RunDirJet+"Cleaned"+inputJetLabelMiniAOD_.label();
332 
333  MonitorElement* mPt_Reco=iget_.get(rundirJet_reco+"/"+"Pt");
334  MonitorElement* mEta_Reco=iget_.get(rundirJet_reco+"/"+"Eta");
335  MonitorElement* mPhi_Reco=iget_.get(rundirJet_reco+"/"+"Phi");
336  MonitorElement* mNjets_Reco=iget_.get(rundirJet_reco+"/"+"NJets");
337  MonitorElement* mPt_uncor_Reco=iget_.get(rundirJet_reco+"/"+"Pt_uncor");
338  MonitorElement* mEta_uncor_Reco=iget_.get(rundirJet_reco+"/"+"Eta_uncor");
339  MonitorElement* mPhi_uncor_Reco=iget_.get(rundirJet_reco+"/"+"Phi_uncor");
340  MonitorElement* mJetEnergyCorr_Reco=iget_.get(rundirJet_reco+"/"+"JetEnergyCorr");
341  MonitorElement* mJetEnergyCorrVSeta_Reco=iget_.get(rundirJet_reco+"/"+"JetEnergyCorrVSEta");
342  MonitorElement* mDPhi_Reco=iget_.get(rundirJet_reco+"/"+"DPhi");
343  MonitorElement* mLooseJIDPassFractionVSeta_Reco=iget_.get(rundirJet_reco+"/"+"JetIDPassFractionVSeta");
344  MonitorElement* mPt_Barrel_Reco=iget_.get(rundirJet_reco+"/"+"Pt_Barrel");
345  MonitorElement* mPt_EndCap_Reco=iget_.get(rundirJet_reco+"/"+"Pt_EndCap");
346  MonitorElement* mPt_Forward_Reco=iget_.get(rundirJet_reco+"/"+"Pt_Forward");
347  MonitorElement* mMVAPUJIDDiscriminant_lowPt_Barrel_Reco=iget_.get(rundirJet_reco+"/"+"MVAPUJIDDiscriminant_lowPt_Barrel");
348  MonitorElement* mMVAPUJIDDiscriminant_lowPt_EndCap_Reco=iget_.get(rundirJet_reco+"/"+"MVAPUJIDDiscriminant_lowPt_EndCap");
349  MonitorElement* mMVAPUJIDDiscriminant_lowPt_Forward_Reco=iget_.get(rundirJet_reco+"/"+"MVAPUJIDDiscriminant_lowPt_Forward");
350  MonitorElement* mMVAPUJIDDiscriminant_mediumPt_EndCap_Reco=iget_.get(rundirJet_reco+"/"+"MVAPUJIDDiscriminant_mediumPt_EndCap");
351  MonitorElement* mMVAPUJIDDiscriminant_highPt_Barrel_Reco=iget_.get(rundirJet_reco+"/"+"MVAPUJIDDiscriminant_highPt_Barrel");
352  MonitorElement* mCHFracVSpT_Barrel_Reco=iget_.get(rundirJet_reco+"/"+"CHFracVSpT_Barrel");
353  MonitorElement* mNHFracVSpT_EndCap_Reco=iget_.get(rundirJet_reco+"/"+"NHFracVSpT_EndCap");
354  MonitorElement* mPhFracVSpT_Barrel_Reco=iget_.get(rundirJet_reco+"/"+"PhFracVSpT_Barrel");
355  MonitorElement* mHFHFracVSpT_Forward_Reco=iget_.get(rundirJet_reco+"/"+"HFHFracVSpT_Forward");
356  MonitorElement* mHFEFracVSpT_Forward_Reco=iget_.get(rundirJet_reco+"/"+"HFEFracVSpT_Forward");
357  MonitorElement* mCHFrac_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"CHFrac");
358  MonitorElement* mNHFrac_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"NHFrac");
359  MonitorElement* mPhFrac_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"PhFrac");
360  MonitorElement* mChargedMultiplicity_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"ChargedMultiplicity");
361  MonitorElement* mNeutralMultiplicity_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"NeutralMultiplicity");
362  MonitorElement* mMuonMultiplicity_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"MuonMultiplicity");
363  MonitorElement* mNeutralFraction_Reco=iget_.get(rundirJet_reco+"/DiJet/"+"NeutralConstituentsFraction");
364 
365  std::vector<MonitorElement*> me_Jet_Reco;
366  me_Jet_Reco.push_back(mPt_Reco);
367  me_Jet_Reco.push_back(mEta_Reco);
368  me_Jet_Reco.push_back(mPhi_Reco);
369  me_Jet_Reco.push_back(mNjets_Reco);
370  me_Jet_Reco.push_back(mPt_uncor_Reco);
371  me_Jet_Reco.push_back(mEta_uncor_Reco);
372  me_Jet_Reco.push_back(mPhi_uncor_Reco);
373  me_Jet_Reco.push_back(mJetEnergyCorr_Reco);
374  me_Jet_Reco.push_back(mJetEnergyCorrVSeta_Reco);
375  me_Jet_Reco.push_back(mDPhi_Reco);
376  me_Jet_Reco.push_back(mLooseJIDPassFractionVSeta_Reco);
377  me_Jet_Reco.push_back(mPt_Barrel_Reco);
378  me_Jet_Reco.push_back(mPt_EndCap_Reco);
379  me_Jet_Reco.push_back(mPt_Forward_Reco);
380  me_Jet_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_Barrel_Reco);
381  me_Jet_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_EndCap_Reco);
382  me_Jet_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_Forward_Reco);
383  me_Jet_Reco.push_back(mMVAPUJIDDiscriminant_mediumPt_EndCap_Reco);
384  me_Jet_Reco.push_back(mMVAPUJIDDiscriminant_highPt_Barrel_Reco);
385  me_Jet_Reco.push_back(mCHFracVSpT_Barrel_Reco);
386  me_Jet_Reco.push_back(mNHFracVSpT_EndCap_Reco);
387  me_Jet_Reco.push_back(mPhFracVSpT_Barrel_Reco);
388  me_Jet_Reco.push_back(mHFHFracVSpT_Forward_Reco);
389  me_Jet_Reco.push_back(mHFEFracVSpT_Forward_Reco);
390  me_Jet_Reco.push_back(mCHFrac_Reco);
391  me_Jet_Reco.push_back(mNHFrac_Reco);
392  me_Jet_Reco.push_back(mPhFrac_Reco);
393  me_Jet_Reco.push_back(mChargedMultiplicity_Reco);
394  me_Jet_Reco.push_back(mNeutralMultiplicity_Reco);
395  me_Jet_Reco.push_back(mMuonMultiplicity_Reco);
396  me_Jet_Reco.push_back(mNeutralFraction_Reco);
397 
398  MonitorElement* mPt_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Pt");
399  MonitorElement* mEta_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Eta");
400  MonitorElement* mPhi_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Phi");
401  MonitorElement* mNjets_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"NJets");
402  MonitorElement* mPt_uncor_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Pt_uncor");
403  MonitorElement* mEta_uncor_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Eta_uncor");
404  MonitorElement* mPhi_uncor_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Phi_uncor");
405  MonitorElement* mJetEnergyCorr_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"JetEnergyCorr");
406  MonitorElement* mJetEnergyCorrVSeta_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"JetEnergyCorrVSEta");
407  MonitorElement* mDPhi_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"DPhi");
408  MonitorElement* mLooseJIDPassFractionVSeta_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"JetIDPassFractionVSeta");
409  MonitorElement* mPt_Barrel_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Pt_Barrel");
410  MonitorElement* mPt_EndCap_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Pt_EndCap");
411  MonitorElement* mPt_Forward_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"Pt_Forward");
412  MonitorElement* mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"MVAPUJIDDiscriminant_lowPt_Barrel");
413  MonitorElement* mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"MVAPUJIDDiscriminant_lowPt_EndCap");
414  MonitorElement* mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"MVAPUJIDDiscriminant_lowPt_Forward");
415  MonitorElement* mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"MVAPUJIDDiscriminant_mediumPt_EndCap");
416  MonitorElement* mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"MVAPUJIDDiscriminant_highPt_Barrel");
417  MonitorElement* mCHFracVSpT_Barrel_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"CHFracVSpT_Barrel");
418  MonitorElement* mNHFracVSpT_EndCap_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"NHFracVSpT_EndCap");
419  MonitorElement* mPhFracVSpT_Barrel_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"PhFracVSpT_Barrel");
420  MonitorElement* mHFHFracVSpT_Forward_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"HFHFracVSpT_Forward");
421  MonitorElement* mHFEFracVSpT_Forward_MiniAOD=iget_.get(rundirJet_miniaod+"/"+"HFEFracVSpT_Forward");
422  MonitorElement* mCHFrac_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"CHFrac");
423  MonitorElement* mNHFrac_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"NHFrac");
424  MonitorElement* mPhFrac_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"PhFrac");
425  MonitorElement* mChargedMultiplicity_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"ChargedMultiplicity");
426  MonitorElement* mNeutralMultiplicity_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"NeutralMultiplicity");
427  MonitorElement* mMuonMultiplicity_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"MuonMultiplicity");
428  MonitorElement* mNeutralFraction_MiniAOD=iget_.get(rundirJet_miniaod+"/DiJet/"+"NeutralConstituentsFraction");
429 
430  std::vector<MonitorElement*> me_Jet_MiniAOD;
431  me_Jet_MiniAOD.push_back(mPt_MiniAOD);
432  me_Jet_MiniAOD.push_back(mEta_MiniAOD);
433  me_Jet_MiniAOD.push_back(mPhi_MiniAOD);
434  me_Jet_MiniAOD.push_back(mNjets_MiniAOD);
435  me_Jet_MiniAOD.push_back(mPt_uncor_MiniAOD);
436  me_Jet_MiniAOD.push_back(mEta_uncor_MiniAOD);
437  me_Jet_MiniAOD.push_back(mPhi_uncor_MiniAOD);
438  me_Jet_MiniAOD.push_back(mJetEnergyCorr_MiniAOD);
439  me_Jet_MiniAOD.push_back(mJetEnergyCorrVSeta_MiniAOD);
440  me_Jet_MiniAOD.push_back(mDPhi_MiniAOD);
441  me_Jet_MiniAOD.push_back(mLooseJIDPassFractionVSeta_MiniAOD);
442  me_Jet_MiniAOD.push_back(mPt_Barrel_MiniAOD);
443  me_Jet_MiniAOD.push_back(mPt_EndCap_MiniAOD);
444  me_Jet_MiniAOD.push_back(mPt_Forward_MiniAOD);
445  me_Jet_MiniAOD.push_back(mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD);
446  me_Jet_MiniAOD.push_back(mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD);
447  me_Jet_MiniAOD.push_back(mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD);
448  me_Jet_MiniAOD.push_back(mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD);
449  me_Jet_MiniAOD.push_back(mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD);
450  me_Jet_MiniAOD.push_back(mCHFracVSpT_Barrel_MiniAOD);
451  me_Jet_MiniAOD.push_back(mNHFracVSpT_EndCap_MiniAOD);
452  me_Jet_MiniAOD.push_back(mPhFracVSpT_Barrel_MiniAOD);
453  me_Jet_MiniAOD.push_back(mHFHFracVSpT_Forward_MiniAOD);
454  me_Jet_MiniAOD.push_back(mHFEFracVSpT_Forward_MiniAOD);
455  me_Jet_MiniAOD.push_back(mCHFrac_MiniAOD);
456  me_Jet_MiniAOD.push_back(mNHFrac_MiniAOD);
457  me_Jet_MiniAOD.push_back(mPhFrac_MiniAOD);
458  me_Jet_MiniAOD.push_back(mChargedMultiplicity_MiniAOD);
459  me_Jet_MiniAOD.push_back(mNeutralMultiplicity_MiniAOD);
460  me_Jet_MiniAOD.push_back(mMuonMultiplicity_MiniAOD);
461  me_Jet_MiniAOD.push_back(mNeutralFraction_MiniAOD);
462 
463  ibook_.setCurrentFolder(RunDirJet+"MiniAOD_over_RECO");
464  mPt_MiniAOD_over_Reco=ibook_.book1D("Pt_MiniAOD_over_RECO",(TH1F*)mPt_Reco->getRootObject());
465  mEta_MiniAOD_over_Reco=ibook_.book1D("Eta_MiniAOD_over_RECO",(TH1F*)mEta_Reco->getRootObject());
466  mPhi_MiniAOD_over_Reco=ibook_.book1D("Phi_MiniAOD_over_RECO",(TH1F*)mPhi_Reco->getRootObject());
467  mNjets_MiniAOD_over_Reco=ibook_.book1D("NJets_MiniAOD_over_RECO",(TH1F*)mNjets_Reco->getRootObject());
468  mPt_uncor_MiniAOD_over_Reco=ibook_.book1D("Pt_uncor_MiniAOD_over_RECO",(TH1F*)mPt_uncor_Reco->getRootObject());
469  mEta_uncor_MiniAOD_over_Reco=ibook_.book1D("Eta_uncor_MiniAOD_over_RECO",(TH1F*)mEta_uncor_Reco->getRootObject());
470  mPhi_uncor_MiniAOD_over_Reco=ibook_.book1D("Phi_uncor_MiniAOD_over_RECO",(TH1F*)mPhi_uncor_Reco->getRootObject());
471  mJetEnergyCorr_MiniAOD_over_Reco=ibook_.book1D("JetEnergyCorr_MiniAOD_over_RECO",(TH1F*)mJetEnergyCorr_Reco->getRootObject());
472  mJetEnergyCorrVSeta_MiniAOD_over_Reco=ibook_.book1D("JetEnergyCorrVSEta_MiniAOD_over_RECO", "jet energy correction factor VS eta", etaBin_, etaMin_,etaMax_);
473  mDPhi_MiniAOD_over_Reco=ibook_.book1D("DPhi_MiniAOD_over_RECO",(TH1F*)mDPhi_Reco->getRootObject());
474  mLooseJIDPassFractionVSeta_MiniAOD_over_Reco=ibook_.book1D("JetIDPassFractionVSeta_MiniAOD_over_RECO","JetIDPassFractionVSeta", etaBin_, etaMin_,etaMax_);
475  mPt_Barrel_MiniAOD_over_Reco=ibook_.book1D("Pt_Barrel_MiniAOD_over_RECO",(TH1F*)mPt_Barrel_Reco->getRootObject());
476  mPt_EndCap_MiniAOD_over_Reco=ibook_.book1D("Pt_EndCap_MiniAOD_over_RECO",(TH1F*)mPt_EndCap_Reco->getRootObject());
477  mPt_Forward_MiniAOD_over_Reco=ibook_.book1D("Pt_Forward_MiniAOD_over_RECO",(TH1F*)mPt_Forward_Reco->getRootObject());
478  mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD_over_Reco=ibook_.book1D("MVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD_over_RECO",(TH1F*)mMVAPUJIDDiscriminant_lowPt_Barrel_Reco->getRootObject());
479  mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD_over_Reco=ibook_.book1D("MVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD_over_RECO",(TH1F*)mMVAPUJIDDiscriminant_lowPt_EndCap_Reco->getRootObject());
480  mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD_over_Reco=ibook_.book1D("MVAPUJIDDiscriminant_lowPt_Forward_MiniAOD_over_RECO",(TH1F*)mMVAPUJIDDiscriminant_lowPt_Forward_Reco->getRootObject());
481  mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD_over_Reco=ibook_.book1D("MVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD_over_RECO",(TH1F*)mMVAPUJIDDiscriminant_mediumPt_EndCap_Reco->getRootObject());
482  mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD_over_Reco=ibook_.book1D("MVAPUJIDDiscriminant_highPt_Barrel_MiniAOD_over_RECO",(TH1F*)mMVAPUJIDDiscriminant_highPt_Barrel_Reco->getRootObject());
483  mCHFracVSpT_Barrel_MiniAOD_over_Reco=ibook_.book1D("CHFracVSpT_Barrel_MiniAOD_over_RECO","CHFracVSpT_Barrel", ptBin_, ptMin_,ptMax_);
484  mNHFracVSpT_EndCap_MiniAOD_over_Reco=ibook_.book1D("NHFracVSpT_EndCap_MiniAOD_over_RECO","NHFracVSpT_EndCap", ptBin_, ptMin_,ptMax_);
485  mPhFracVSpT_Barrel_MiniAOD_over_Reco=ibook_.book1D("PhFracVSpT_Barrel_MiniAOD_over_RECO","PhFracVSpT_Barrel", ptBin_, ptMin_,ptMax_);
486  mHFHFracVSpT_Forward_MiniAOD_over_Reco=ibook_.book1D("HFHFracVSpT_Forward_MiniAOD_over_RECO","HFHFracVSpT_Forward", ptBin_, ptMin_,ptMax_);
487  mHFEFracVSpT_Forward_MiniAOD_over_Reco=ibook_.book1D("HFEFracVSpT_Forward_MiniAOD_over_RECO","HFEFracVSpT_Forward", ptBin_, ptMin_,ptMax_);
488  ibook_.setCurrentFolder(RunDirJet+"MiniAOD_over_RECO"+"/"+"DiJet");
489  mCHFrac_MiniAOD_over_Reco=ibook_.book1D("CHFrac_MiniAOD_over_RECO",(TH1F*)mCHFrac_Reco->getRootObject());
490  mNHFrac_MiniAOD_over_Reco=ibook_.book1D("NHFrac_MiniAOD_over_RECO",(TH1F*)mNHFrac_Reco->getRootObject());
491  mPhFrac_MiniAOD_over_Reco=ibook_.book1D("PhFrac_MiniAOD_over_RECO",(TH1F*)mPhFrac_Reco->getRootObject());
492  mChargedMultiplicity_MiniAOD_over_Reco=ibook_.book1D("ChargedMultiplicity_MiniAOD_over_RECO",(TH1F*)mChargedMultiplicity_Reco->getRootObject());
493  mNeutralMultiplicity_MiniAOD_over_Reco=ibook_.book1D("NeutralMultiplicity_MiniAOD_over_RECO",(TH1F*)mNeutralMultiplicity_Reco->getRootObject());
494  mMuonMultiplicity_MiniAOD_over_Reco=ibook_.book1D("MuonMultiplicity_MiniAOD_over_RECO",(TH1F*)mMuonMultiplicity_Reco->getRootObject());
495  mNeutralFraction_MiniAOD_over_Reco=ibook_.book1D("NeutralConstituentsFraction_MiniAOD_over_RECO",(TH1F*)mNeutralFraction_Reco->getRootObject());
496 
497  std::vector<MonitorElement*> me_Jet_MiniAOD_over_Reco;
498  me_Jet_MiniAOD_over_Reco.push_back(mPt_MiniAOD_over_Reco);
499  me_Jet_MiniAOD_over_Reco.push_back(mEta_MiniAOD_over_Reco);
500  me_Jet_MiniAOD_over_Reco.push_back(mPhi_MiniAOD_over_Reco);
501  me_Jet_MiniAOD_over_Reco.push_back(mNjets_MiniAOD_over_Reco);
502  me_Jet_MiniAOD_over_Reco.push_back(mPt_uncor_MiniAOD_over_Reco);
503  me_Jet_MiniAOD_over_Reco.push_back(mEta_uncor_MiniAOD_over_Reco);
504  me_Jet_MiniAOD_over_Reco.push_back(mPhi_uncor_MiniAOD_over_Reco);
505  me_Jet_MiniAOD_over_Reco.push_back(mJetEnergyCorr_MiniAOD_over_Reco);
506  me_Jet_MiniAOD_over_Reco.push_back(mJetEnergyCorrVSeta_MiniAOD_over_Reco);
507  me_Jet_MiniAOD_over_Reco.push_back(mDPhi_MiniAOD_over_Reco);
508  me_Jet_MiniAOD_over_Reco.push_back(mLooseJIDPassFractionVSeta_MiniAOD_over_Reco);
509  me_Jet_MiniAOD_over_Reco.push_back(mPt_Barrel_MiniAOD_over_Reco);
510  me_Jet_MiniAOD_over_Reco.push_back(mPt_EndCap_MiniAOD_over_Reco);
511  me_Jet_MiniAOD_over_Reco.push_back(mPt_Forward_MiniAOD_over_Reco);
512  me_Jet_MiniAOD_over_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD_over_Reco);
513  me_Jet_MiniAOD_over_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD_over_Reco);
514  me_Jet_MiniAOD_over_Reco.push_back(mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD_over_Reco);
515  me_Jet_MiniAOD_over_Reco.push_back(mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD_over_Reco);
516  me_Jet_MiniAOD_over_Reco.push_back(mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD_over_Reco);
517  me_Jet_MiniAOD_over_Reco.push_back(mCHFracVSpT_Barrel_MiniAOD_over_Reco);
518  me_Jet_MiniAOD_over_Reco.push_back(mNHFracVSpT_EndCap_MiniAOD_over_Reco);
519  me_Jet_MiniAOD_over_Reco.push_back(mPhFracVSpT_Barrel_MiniAOD_over_Reco);
520  me_Jet_MiniAOD_over_Reco.push_back(mHFHFracVSpT_Forward_MiniAOD_over_Reco);
521  me_Jet_MiniAOD_over_Reco.push_back(mHFEFracVSpT_Forward_MiniAOD_over_Reco);
522  me_Jet_MiniAOD_over_Reco.push_back(mCHFrac_MiniAOD_over_Reco);
523  me_Jet_MiniAOD_over_Reco.push_back(mNHFrac_MiniAOD_over_Reco);
524  me_Jet_MiniAOD_over_Reco.push_back(mPhFrac_MiniAOD_over_Reco);
525  me_Jet_MiniAOD_over_Reco.push_back(mChargedMultiplicity_MiniAOD_over_Reco);
526  me_Jet_MiniAOD_over_Reco.push_back(mNeutralMultiplicity_MiniAOD_over_Reco);
527  me_Jet_MiniAOD_over_Reco.push_back(mMuonMultiplicity_MiniAOD_over_Reco);
528  me_Jet_MiniAOD_over_Reco.push_back(mNeutralFraction_MiniAOD_over_Reco);
529 
530  for(unsigned int j=0;j<me_Jet_MiniAOD_over_Reco.size();j++){
531  MonitorElement* monJetReco=me_Jet_Reco[j];if(monJetReco && monJetReco->getRootObject()){
532  MonitorElement* monJetMiniAOD=me_Jet_MiniAOD[j];if(monJetMiniAOD && monJetMiniAOD->getRootObject()){
533  MonitorElement* monJetMiniAOD_over_RECO=me_Jet_MiniAOD_over_Reco[j];if(monJetMiniAOD_over_RECO && monJetMiniAOD_over_RECO->getRootObject()){
534  for(int i=0;i<=(monJetMiniAOD_over_RECO->getNbinsX()+1);i++){
535  if(monJetReco->getBinContent(i)!=0){
536  monJetMiniAOD_over_RECO->setBinContent(i,monJetMiniAOD->getBinContent(i)/monJetReco->getBinContent(i));
537  }else if (monJetMiniAOD->getBinContent(i)!=0){
538  monJetMiniAOD_over_RECO->setBinContent(i,-0.5);
539  }
540  }
541  }
542  }
543  }
544  }
545  }//check for RECO and MiniAOD directories
546 
547  if (verbose_) std::cout << ">>> EndRun (DataCertificationJetMET) <<<" << std::endl;
548 
549  std::vector<std::string> subDirVec;
550  std::string RunDir;
551 
552 
553  if (verbose_) std::cout << "InMemory_ = " << InMemory_ << std::endl;
554 
555  ibook_.setCurrentFolder(folderName);
556  reportSummary = ibook_.bookFloat("reportSummary");
557  CertificationSummary = ibook_.bookFloat("CertificationSummary");
558 
559  reportSummaryMap = ibook_.book2D("reportSummaryMap","reportSummaryMap",3,0,3,5,0,5);
560  CertificationSummaryMap = ibook_.book2D("CertificationSummaryMap","CertificationSummaryMap",3,0,3,5,0,5);
561 
562 
563  reportSummary = iget_.get(folderName+"/"+"reportSummary");
564  CertificationSummary = iget_.get(folderName+"/"+"CertificationSummary");
565  reportSummaryMap = iget_.get(folderName+"/"+"reportSummaryMap");
566  CertificationSummaryMap = iget_.get(folderName+"/"+"CertificationSummaryMap");
567 
568 
569 
571  reportSummaryMap->getTH2F()->SetStats(kFALSE);
572  reportSummaryMap->getTH2F()->SetOption("colz");
573  reportSummaryMap->setBinLabel(1,"CaloTower");
574  reportSummaryMap->setBinLabel(2,"MET");
575  reportSummaryMap->setBinLabel(3,"Jet");
576  }
578  CertificationSummaryMap->getTH2F()->SetStats(kFALSE);
579  CertificationSummaryMap->getTH2F()->SetOption("colz");
580  CertificationSummaryMap->setBinLabel(1,"CaloTower");
583  }
584 
585  reportSummary->Fill(1.);
587 
588  if (RunDir=="Reference") RunDir="";
589  if (verbose_) std::cout << RunDir << std::endl;
590  ibook_.setCurrentFolder("JetMET/EventInfo/CertificationSummaryContents/");
591 
592 
593  std::string refHistoName;
594  std::string newHistoName;
595 
596  //-----------------------------
597  // Jet DQM Data Certification
598  //-----------------------------
599  //we have 4 types anymore: PF (barrel,endcap,forward) and calojets
600  MonitorElement *meJetPt[4];
601  MonitorElement *meJetEta[4];
602  MonitorElement *meJetPhi[4];
603  MonitorElement *meJetEMFrac[4];
604  MonitorElement *meJetConstituents[4];
605  RunDir = "";
606  if (RunDir == "") newHistoName = "JetMET/Jet/";
607  else newHistoName = RunDir+"/JetMET/Runsummary/Jet/";
608  std::string cleaningdir = "";
609  cleaningdir = "Cleaned";
610 
611  //Jet Phi histos
612  meJetPhi[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_Barrel");
613  meJetPhi[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_EndCap");
614  meJetPhi[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Phi_Forward");
615  meJetPhi[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Phi");
616  //meJetPhi[4] = iget_.get(newHistoName+cleaningdir+"JetPlusTrackZSPCorJetAntiKt5/Phi");
617 
618  //Jet Eta histos
619  meJetEta[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Eta");
620  meJetEta[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Eta");
621  meJetEta[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EtaFirst");
622  meJetEta[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Eta");
623  //meJetEta[4] = iget_.get(newHistoName+cleaningdir+"JetPlusTrackZSPCorJetAntiKt5/Eta");
624 
625  //Jet Pt histos
626  meJetPt[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_Barrel");
627  meJetPt[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_EndCap");
628  meJetPt[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Pt_Forward");
629  meJetPt[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Pt_2");
630 
632  meJetConstituents[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_Barrel");
633  meJetConstituents[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_EndCap");
634  meJetConstituents[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/Constituents_Forward");
635  meJetConstituents[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/Constituents");
636  //
638  meJetEMFrac[0] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_Barrel");
639  meJetEMFrac[1] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_EndCap");
640  meJetEMFrac[2] = iget_.get(newHistoName+cleaningdir+jetAlgo+"PFJets/EFrac_Forward");
641  meJetEMFrac[3] = iget_.get(newHistoName+cleaningdir+jetAlgo+"CaloJets/EFrac");
642 
643 
644  //------------------------------------------------------------------------------
645  //--- Extract quality test results and fill data certification results for Jets
646  //--- Tests for Calo Barrel, EndCap and Forward, as well as PF and JPT jets
647  //--- For Calo and PF jets:
648  //--- Look at mean of Constituents, EM Frac and Pt
649  //--- Look at Kolmogorov result for Eta, Phi, and Pt
650  //--- For JPT jets:
651  //--- Look at mean of Pt, AllPionsTrackNHits?, nTracks,
652  //--- Look at Kolmogorov result for Eta, Phi, and Pt
653  //------------------------------------------------------------------------------
654 
655 
656  // Four types of jets {AK5 Barrel, AK5 EndCap, AK5 Forward, PF}, removed JPT which is 5th type of jets
657  //----------------------------------------------------------------------------
658  // Kolmogorov (KS) tests
659  const QReport* QReport_JetEta[4] = {0};
660  const QReport* QReport_JetPhi[4] = {0};
661  // Mean and KS tests for Calo and PF jets
662  const QReport* QReport_JetConstituents[4][2] = {{0}};
663  const QReport* QReport_JetEFrac[4][2] = {{0}};
664  const QReport* QReport_JetPt[4][2] = {{0}};
665 
666  // Mean and KS tests for JPT jets
667  //const QReport* QReport_JetNTracks[2] = {0, 0};
668  float qr_Jet_Eta[4] = {-1};
669  float qr_Jet_Phi[4] = {-1};
670  float dc_Jet[4] = {-1};
671 
672  float qr_Jet_Constituents[4][2] = {{-1}};
673  float qr_Jet_EFrac[4][2] = {{-1}};
674  float qr_Jet_Pt[4][2] = {{-1}};
675 
676 
677  // Loop
678  //----------------------------------------------------------------------------
679  for (int jtyp=0; jtyp<4; ++jtyp) {
680  // Mean test results
681 
682  if (meJetConstituents[jtyp] && meJetConstituents[jtyp]->getRootObject() ) {
683  QReport_JetConstituents[jtyp][0] = meJetConstituents[jtyp]->getQReport("meanJetConstituentsTest");
684  QReport_JetConstituents[jtyp][1] = meJetConstituents[jtyp]->getQReport("KolmogorovTest");
685  }
686  if (meJetEMFrac[jtyp]&& meJetEMFrac[jtyp]->getRootObject() ) {
687  QReport_JetEFrac[jtyp][0] = meJetEMFrac[jtyp]->getQReport("meanEMFractionTest");
688  QReport_JetEFrac[jtyp][1] = meJetEMFrac[jtyp]->getQReport("KolmogorovTest");
689  }
690  if (meJetPt[jtyp] && meJetPt[jtyp]->getRootObject() ) {
691  QReport_JetPt[jtyp][0] = meJetPt[jtyp]->getQReport("meanJetPtTest");
692  QReport_JetPt[jtyp][1] = meJetPt[jtyp]->getQReport("KolmogorovTest");
693  }
694  if (meJetPhi[jtyp] && meJetPhi[jtyp]->getRootObject()){
695  QReport_JetPhi[jtyp] = meJetPhi[jtyp]->getQReport("KolmogorovTest");
696  }
697  if (meJetEta[jtyp] && meJetEta[jtyp]->getRootObject()){
698  QReport_JetEta[jtyp] = meJetEta[jtyp]->getQReport("KolmogorovTest");
699  }
700 
701  //Jet Pt test
702  if (QReport_JetPt[jtyp][0]){
703  //std::cout<<"jet type test pt "<<jtyp<<"/"<<QReport_JetPt[jtyp][0]->getStatus()<<std::endl;
704  if (QReport_JetPt[jtyp][0]->getStatus()==100 ||
705  QReport_JetPt[jtyp][0]->getStatus()==200)
706  qr_Jet_Pt[jtyp][0] = 1;
707  else if (QReport_JetPt[jtyp][0]->getStatus()==300)
708  qr_Jet_Pt[jtyp][0] = 0;
709  else
710  qr_Jet_Pt[jtyp][0] = -1;
711  }
712  else{ qr_Jet_Pt[jtyp][0] = -2;
713  //std::cout<<"qreport is REALLY NULL type test pt "<<jtyp<<" 0 "<<std::endl;
714  }
715  if (QReport_JetPt[jtyp][1]){
716  if (QReport_JetPt[jtyp][1]->getStatus()==100 ||
717  QReport_JetPt[jtyp][1]->getStatus()==200)
718  qr_Jet_Pt[jtyp][1] = 1;
719  else if (QReport_JetPt[jtyp][1]->getStatus()==300)
720  qr_Jet_Pt[jtyp][1] = 0;
721  else
722  qr_Jet_Pt[jtyp][1] = -1;
723  }
724  else{ qr_Jet_Pt[jtyp][1] = -2;
725  }
726 
727  //Jet Phi test
728  if (QReport_JetPhi[jtyp]){
729  if (QReport_JetPhi[jtyp]->getStatus()==100 ||
730  QReport_JetPhi[jtyp]->getStatus()==200)
731  qr_Jet_Phi[jtyp] = 1;
732  else if (QReport_JetPhi[jtyp]->getStatus()==300)
733  qr_Jet_Phi[jtyp] = 0;
734  else
735  qr_Jet_Phi[jtyp] = -1;
736  }
737  else{ qr_Jet_Phi[jtyp] = -2;
738  }
739  //Jet Eta test
740  if (QReport_JetEta[jtyp]){
741  if (QReport_JetEta[jtyp]->getStatus()==100 ||
742  QReport_JetEta[jtyp]->getStatus()==200)
743  qr_Jet_Eta[jtyp] = 1;
744  else if (QReport_JetEta[jtyp]->getStatus()==300)
745  qr_Jet_Eta[jtyp] = 0;
746  else
747  qr_Jet_Eta[jtyp] = -1;
748  }
749  else{
750  qr_Jet_Eta[jtyp] = -2;
751  }
752  //Jet Constituents test
753  if (QReport_JetConstituents[jtyp][0]){
754  if (QReport_JetConstituents[jtyp][0]->getStatus()==100 ||
755  QReport_JetConstituents[jtyp][0]->getStatus()==200)
756  qr_Jet_Constituents[jtyp][0] = 1;
757  else if (QReport_JetConstituents[jtyp][0]->getStatus()==300)
758  qr_Jet_Constituents[jtyp][0] = 0;
759  else
760  qr_Jet_Constituents[jtyp][0] = -1;
761  }
762  else{ qr_Jet_Constituents[jtyp][0] = -2;
763  }
764 
765  if (QReport_JetConstituents[jtyp][1]){
766  if (QReport_JetConstituents[jtyp][1]->getStatus()==100 ||
767  QReport_JetConstituents[jtyp][1]->getStatus()==200)
768  qr_Jet_Constituents[jtyp][1] = 1;
769  else if (QReport_JetConstituents[jtyp][1]->getStatus()==300)
770  qr_Jet_Constituents[jtyp][1] = 0;
771  else
772  qr_Jet_Constituents[jtyp][1] = -1;
773  }
774  else{ qr_Jet_Constituents[jtyp][1] = -2;
775  }
776  //Jet EMFrac test
777  if (QReport_JetEFrac[jtyp][0]){
778  if (QReport_JetEFrac[jtyp][0]->getStatus()==100 ||
779  QReport_JetEFrac[jtyp][0]->getStatus()==200)
780  qr_Jet_EFrac[jtyp][0] = 1;
781  else if (QReport_JetEFrac[jtyp][0]->getStatus()==300)
782  qr_Jet_EFrac[jtyp][0] = 0;
783  else
784  qr_Jet_EFrac[jtyp][0] = -1;
785  }
786  else{ qr_Jet_EFrac[jtyp][0] = -2;
787  }
788 
789  if (QReport_JetEFrac[jtyp][1]){
790  if (QReport_JetEFrac[jtyp][1]->getStatus()==100 ||
791  QReport_JetEFrac[jtyp][1]->getStatus()==200)
792  qr_Jet_EFrac[jtyp][1] = 1;
793  else if (QReport_JetEFrac[jtyp][1]->getStatus()==300)
794  qr_Jet_EFrac[jtyp][1] = 0;
795  else
796  qr_Jet_EFrac[jtyp][1] = -1;
797  }
798  else{ qr_Jet_EFrac[jtyp][1] = -2;
799  }
800 
801  if (verbose_) {
802  printf("====================Jet Type %d QTest Report Summary========================\n",jtyp);
803  printf("Eta: Phi: Pt 1: 2: Const/Ntracks 1: 2: EFrac/tracknhits 1: 2:\n");
804 
805  printf("%2.2f %2.2f %2.2f %2.2f %2.2f %2.2f %2.2f %2.2f\n", \
806  qr_Jet_Eta[jtyp], \
807  qr_Jet_Phi[jtyp], \
808  qr_Jet_Pt[jtyp][0], \
809  qr_Jet_Pt[jtyp][1], \
810  qr_Jet_Constituents[jtyp][0], \
811  qr_Jet_Constituents[jtyp][1], \
812  qr_Jet_EFrac[jtyp][0], \
813  qr_Jet_EFrac[jtyp][1]);
814 
815  }
816  //certification result for Jet
817 
818  //Only apply certain tests, as defined in the config
819  for (int ttyp = 0; ttyp < 2; ++ttyp) {
820  if (!jetTests[jtyp][ttyp]) {
821  qr_Jet_Pt[jtyp][ttyp] = 1;
822  if (ttyp ==1) {
823  qr_Jet_Eta[jtyp] = 1;
824  qr_Jet_Phi[jtyp] = 1;
825  }
826  qr_Jet_EFrac[jtyp][ttyp] = 1;
827  qr_Jet_Constituents[jtyp][ttyp] = 1;
828  }
829  }
830 
831 
832 
833  if ( (qr_Jet_EFrac[jtyp][0] == 0) ||
834  (qr_Jet_EFrac[jtyp][1] == 0) ||
835  (qr_Jet_Constituents[jtyp][1] == 0) ||
836  (qr_Jet_Constituents[jtyp][0] == 0) ||
837  (qr_Jet_Eta[jtyp] == 0) ||
838  (qr_Jet_Phi[jtyp] == 0) ||
839  (qr_Jet_Pt[jtyp][0] == 0) ||
840  (qr_Jet_Pt[jtyp][1] == 0)
841  )
842  dc_Jet[jtyp] = 0;
843  else if ( (qr_Jet_EFrac[jtyp][0] == -1) &&
844  (qr_Jet_EFrac[jtyp][1] == -1) &&
845  (qr_Jet_Constituents[jtyp][1] == -1) &&
846  (qr_Jet_Constituents[jtyp][0] == -1) &&
847  (qr_Jet_Eta[jtyp] == -1) &&
848  (qr_Jet_Phi[jtyp] == -1) &&
849  (qr_Jet_Pt[jtyp][0] == -1) &&
850  (qr_Jet_Pt[jtyp][1] == -1 )
851  )
852  dc_Jet[jtyp] = -1;
853  else if ( (qr_Jet_EFrac[jtyp][0] == -2) &&
854  (qr_Jet_EFrac[jtyp][1] == -2) &&
855  (qr_Jet_Constituents[jtyp][1] == -2) &&
856  (qr_Jet_Constituents[jtyp][0] == -2) &&
857  (qr_Jet_Eta[jtyp] == -2) &&
858  (qr_Jet_Phi[jtyp] == -2) &&
859  (qr_Jet_Pt[jtyp][0] == -2) &&
860  (qr_Jet_Pt[jtyp][1] == -2)
861  )
862  dc_Jet[jtyp] = -2;
863  else
864  dc_Jet[jtyp] = 1;
865 
866  if (verbose_) std::cout<<"Certifying Jet algo: "<<jtyp<<" with value: "<<dc_Jet[jtyp]<<std::endl;
867 
868 
869  CertificationSummaryMap->Fill(2, 4-jtyp, dc_Jet[jtyp]);
870  reportSummaryMap->Fill(2, 4-jtyp, dc_Jet[jtyp]);
871  }
872 
873  //-----------------------------
874  // MET DQM Data Certification
875  //-----------------------------
876  //
877  // Prepare test histograms
878  //
879  MonitorElement *meMExy[2][2];
880  MonitorElement *meMEt[2];
881  MonitorElement *meSumEt[2];
882  MonitorElement *meMETPhi[2];
883 
884  RunDir = "";
885  if (RunDir == "") newHistoName = "JetMET/MET/";
886  else newHistoName = RunDir+"/JetMET/Runsummary/MET/";
887 
888  metFolder = "Cleaned";
889 
890  //MEx/MEy monitor elements
891  meMExy[0][0] = iget_.get(newHistoName+"met/"+metFolder+"/MEx");
892  meMExy[0][1] = iget_.get(newHistoName+"met/"+metFolder+"/MEy");
893  meMExy[1][0] = iget_.get(newHistoName+"pfMet/"+metFolder+"/MEx");
894  meMExy[1][1] = iget_.get(newHistoName+"pfMet/"+metFolder+"/MEy");
895 
896  //MET Phi monitor elements
897  meMETPhi[0] = iget_.get(newHistoName+"met/"+metFolder+"/METPhi");
898  meMETPhi[1] = iget_.get(newHistoName+"pfMet/"+metFolder+"/METPhi");
899  //MET monitor elements
900  meMEt[0] = iget_.get(newHistoName+"met/"+metFolder+"/MET");
901  meMEt[1] = iget_.get(newHistoName+"pfMet/"+metFolder+"/MET");
902  //SumET monitor elements
903  meSumEt[0] = iget_.get(newHistoName+"met/"+metFolder+"/SumET");
904  meSumEt[1] = iget_.get(newHistoName+"pfMet/"+metFolder+"/SumET");
905 
906  //----------------------------------------------------------------------------
907  //--- Extract quality test results and fill data certification results for MET
908  //----------------------------------------------------------------------------
909 
910  // 2 types of MET {CaloMET, PfMET} // It is 5 if CaloMETNoHF is included, 4 for MuonCorMET
911  // removed 3rd type of TcMET
912  // 2 types of tests Mean test/Kolmogorov test
913  const QReport * QReport_MExy[2][2][2]={{{0}}};
914  const QReport * QReport_MEt[2][2]={{0}};
915  const QReport * QReport_SumEt[2][2]={{0}};
916  //2 types of tests phiQTest and Kolmogorov test
917  const QReport * QReport_METPhi[2][2]={{0}};
918 
919 
920  float qr_MET_MExy[2][2][2] = {{{-999.}}};
921  float qr_MET_MEt[2][2] = {{-999.}};
922  float qr_MET_SumEt[2][2] = {{-999.}};
923  float qr_MET_METPhi[2][2] = {{-999.}};
924  float dc_MET[2] = {-999.};
925 
926 
927  // J.Piedra, 27/02/212
928  // removed MuCorrMET & TcMET --> loop up to 2 instead of 4, remove already from definition
929  for (int mtyp = 0; mtyp < 2; ++mtyp){
930  //Mean test results
931  if (meMExy[mtyp][0] && meMExy[mtyp][0]->getRootObject()) {
932  QReport_MExy[mtyp][0][0] = meMExy[mtyp][0]->getQReport("meanMExyTest");
933  QReport_MExy[mtyp][1][0] = meMExy[mtyp][0]->getQReport("KolmogorovTest");
934  }
935  if (meMExy[mtyp][1]&& meMExy[mtyp][1]->getRootObject()) {
936  QReport_MExy[mtyp][0][1] = meMExy[mtyp][1]->getQReport("meanMExyTest");
937  QReport_MExy[mtyp][1][1] = meMExy[mtyp][1]->getQReport("KolmogorovTest");
938  }
939  if (meMEt[mtyp] && meMEt[mtyp]->getRootObject()) {
940  QReport_MEt[mtyp][0] = meMEt[mtyp]->getQReport("meanMETTest");
941  QReport_MEt[mtyp][1] = meMEt[mtyp]->getQReport("KolmogorovTest");
942  }
943 
944  if (meSumEt[mtyp] && meSumEt[mtyp]->getRootObject()) {
945  QReport_SumEt[mtyp][0] = meSumEt[mtyp]->getQReport("meanSumETTest");
946  QReport_SumEt[mtyp][1] = meSumEt[mtyp]->getQReport("KolmogorovTest");
947  }
948 
949  if (meMETPhi[mtyp] && meMETPhi[mtyp]->getRootObject()) {
950  QReport_METPhi[mtyp][0] = meMETPhi[mtyp]->getQReport("phiQTest");
951  QReport_METPhi[mtyp][1] = meMETPhi[mtyp]->getQReport("KolmogorovTest");
952  }
953  for (int testtyp = 0; testtyp < 2; ++testtyp) {
954  //MEx test
955  if (QReport_MExy[mtyp][testtyp][0]){
956  if (QReport_MExy[mtyp][testtyp][0]->getStatus()==100 ||
957  QReport_MExy[mtyp][testtyp][0]->getStatus()==200)
958  qr_MET_MExy[mtyp][testtyp][0] = 1;
959  else if (QReport_MExy[mtyp][testtyp][0]->getStatus()==300)
960  qr_MET_MExy[mtyp][testtyp][0] = 0;
961  else
962  qr_MET_MExy[mtyp][testtyp][0] = -1;
963  }
964  else qr_MET_MExy[mtyp][testtyp][0] = -2;
965  //MEy test
966  if (QReport_MExy[mtyp][testtyp][1]){
967  if (QReport_MExy[mtyp][testtyp][1]->getStatus()==100 ||
968  QReport_MExy[mtyp][testtyp][1]->getStatus()==200)
969  qr_MET_MExy[mtyp][testtyp][1] = 1;
970  else if (QReport_MExy[mtyp][testtyp][1]->getStatus()==300)
971  qr_MET_MExy[mtyp][testtyp][1] = 0;
972  else
973  qr_MET_MExy[mtyp][testtyp][1] = -1;
974  }
975  else qr_MET_MExy[mtyp][testtyp][1] = -2;
976 
977  //MEt test
978  if (QReport_MEt[mtyp][testtyp]){
979  if (QReport_MEt[mtyp][testtyp]->getStatus()==100 ||
980  QReport_MEt[mtyp][testtyp]->getStatus()==200)
981  qr_MET_MEt[mtyp][testtyp] = 1;
982  else if (QReport_MEt[mtyp][testtyp]->getStatus()==300)
983  qr_MET_MEt[mtyp][testtyp] = 0;
984  else
985  qr_MET_MEt[mtyp][testtyp] = -1;
986  }
987  else{
988  qr_MET_MEt[mtyp][testtyp] = -2;
989  }
990  //SumEt test
991  if (QReport_SumEt[mtyp][testtyp]){
992  if (QReport_SumEt[mtyp][testtyp]->getStatus()==100 ||
993  QReport_SumEt[mtyp][testtyp]->getStatus()==200)
994  qr_MET_SumEt[mtyp][testtyp] = 1;
995  else if (QReport_SumEt[mtyp][testtyp]->getStatus()==300)
996  qr_MET_SumEt[mtyp][testtyp] = 0;
997  else
998  qr_MET_SumEt[mtyp][testtyp] = -1;
999  }
1000  else{
1001  qr_MET_SumEt[mtyp][testtyp] = -2;
1002  }
1003  //METPhi test
1004  if (QReport_METPhi[mtyp][testtyp]){
1005  if (QReport_METPhi[mtyp][testtyp]->getStatus()==100 ||
1006  QReport_METPhi[mtyp][testtyp]->getStatus()==200)
1007  qr_MET_METPhi[mtyp][testtyp] = 1;
1008  else if (QReport_METPhi[mtyp][testtyp]->getStatus()==300)
1009  qr_MET_METPhi[mtyp][testtyp] = 0;
1010  else
1011  qr_MET_METPhi[mtyp][testtyp] = -1;
1012  }
1013  else{
1014  qr_MET_METPhi[mtyp][testtyp] = -2;
1015  }
1016  }
1017 
1018 
1019  if (verbose_) {
1020  //certification result for MET
1021  printf("====================MET Type %d QTest Report Summary========================\n",mtyp);
1022  printf("MEx test MEy test MEt test: SumEt test: METPhi test:\n");
1023  for (int tt = 0; tt < 2; ++tt) {
1024  printf("%2.2f %2.2f %2.2f %2.2f %2.2f\n",qr_MET_MExy[mtyp][tt][0], \
1025  qr_MET_MExy[mtyp][tt][1], \
1026  qr_MET_MEt[mtyp][tt], \
1027  qr_MET_SumEt[mtyp][tt], \
1028  qr_MET_METPhi[mtyp][tt]);
1029  }
1030  printf("===========================================================================\n");
1031  }
1032 
1033 
1034  //Only apply certain tests, as defined in the config
1035  for (int ttyp = 0; ttyp < 2; ++ttyp) {
1036  if (!metTests[mtyp][ttyp]) {
1037  qr_MET_MExy[mtyp][ttyp][0] = 1;
1038  qr_MET_MExy[mtyp][ttyp][1] = 1;
1039  qr_MET_MEt[mtyp][ttyp] = 1;
1040  qr_MET_SumEt[mtyp][ttyp] = 1;
1041  qr_MET_METPhi[mtyp][ttyp] = 1;
1042  }
1043  }
1044 
1045 
1046  if (
1047  (qr_MET_MExy[mtyp][0][0] == 0) ||
1048  (qr_MET_MExy[mtyp][0][1] == 0) ||
1049  (qr_MET_MEt[mtyp][0] == 0) ||
1050  (qr_MET_SumEt[mtyp][0] == 0) ||
1051  (qr_MET_METPhi[mtyp][0] == 0) ||
1052  (qr_MET_MExy[mtyp][1][0] == 0) ||
1053  (qr_MET_MExy[mtyp][1][1] == 0) ||
1054  (qr_MET_MEt[mtyp][1] == 0) ||
1055  (qr_MET_SumEt[mtyp][1] == 0) ||
1056  (qr_MET_METPhi[mtyp][1] == 0)
1057  )
1058  dc_MET[mtyp] = 0;
1059  else if (
1060  (qr_MET_MExy[mtyp][0][0] == -1) &&
1061  (qr_MET_MExy[mtyp][0][1] == -1) &&
1062  (qr_MET_MEt[mtyp][0] == -1) &&
1063  (qr_MET_SumEt[mtyp][0] == -1) &&
1064  (qr_MET_METPhi[mtyp][0] == -1) &&
1065  (qr_MET_MExy[mtyp][1][0] == -1) &&
1066  (qr_MET_MExy[mtyp][1][1] == -1) &&
1067  (qr_MET_MEt[mtyp][1] == -1) &&
1068  (qr_MET_SumEt[mtyp][1] == -1) &&
1069  (qr_MET_METPhi[mtyp][1] == -1)
1070  )
1071  dc_MET[mtyp] = -1;
1072  else if (
1073  (qr_MET_MExy[mtyp][0][0] == -2) &&
1074  (qr_MET_MExy[mtyp][0][1] == -2) &&
1075  (qr_MET_MEt[mtyp][0] == -2) &&
1076  (qr_MET_SumEt[mtyp][0] == -2) &&
1077  (qr_MET_METPhi[mtyp][0] == -2) &&
1078  (qr_MET_MExy[mtyp][1][0] == -2) &&
1079  (qr_MET_MExy[mtyp][1][1] == -2) &&
1080  (qr_MET_MEt[mtyp][1] == -2) &&
1081  (qr_MET_SumEt[mtyp][1] == -2) &&
1082  (qr_MET_METPhi[mtyp][1] == -2)
1083  )
1084  dc_MET[mtyp] = -2;
1085  else
1086  dc_MET[mtyp] = 1;
1087 
1088  if (verbose_) std::cout<<"Certifying MET algo: "<<mtyp<<" with value: "<<dc_MET[mtyp]<<std::endl;
1089  CertificationSummaryMap->Fill(1, 4-mtyp, dc_MET[mtyp]);
1090  reportSummaryMap->Fill(1, 4-mtyp, dc_MET[mtyp]);
1091  }
1092 
1093 
1094  //----------------------------------------------------------------------------
1095  //--- Extract quality test results and fill data certification results for MET
1096  //----------------------------------------------------------------------------
1097  // Commenting out unused but initialized variables. [Suchandra Dutta]
1098  float dc_CT[3] = {-2.};
1099  dc_CT[0] = -2.;
1100  dc_CT[1] = -2.;
1101  dc_CT[2] = -2.;
1102 
1103  for (int cttyp = 0; cttyp < 3; ++cttyp) {
1104 
1105  if (verbose_) std::cout<<"Certifying CaloTowers with value: "<<dc_CT[cttyp]<<std::endl;
1106  CertificationSummaryMap->Fill(0, 4-cttyp, dc_CT[cttyp]);
1107  reportSummaryMap->Fill(0, 4-cttyp, dc_CT[cttyp]);
1108  }
1109  ibook_.setCurrentFolder("");
1110 }
MonitorElement * mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD_over_Reco
MonitorElement * mMET_EffCSCTightHalo2015Filter
int i
Definition: DBlmapReader.cc:9
MonitorElement * mMET_nVtx_profile_MiniAOD_over_Reco
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to &lt;qtname&gt; (null pointer if QReport does not exist)
MonitorElement * mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD_over_Reco
void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * mMET_EffCSCTightHaloFilter
MonitorElement * mPt_MiniAOD_over_Reco
MonitorElement * mMuonMultiplicity_MiniAOD_over_Reco
MonitorElement * CertificationSummaryMap
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:301
MonitorElement * mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD_over_Reco
MonitorElement * mNeutralHadronEtFraction_MiniAOD_over_Reco
MonitorElement * mHFEFracVSpT_Forward_MiniAOD_over_Reco
MonitorElement * mMET_EffHcalStripHaloFilter
MonitorElement * mPt_Barrel_MiniAOD_over_Reco
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)
MonitorElement * mMET_MiniAOD_over_Reco
MonitorElement * mChargedHadronEtFraction_MiniAOD_over_Reco
MonitorElement * mSumET_logx_MiniAOD_over_Reco
MonitorElement * mDPhi_MiniAOD_over_Reco
MonitorElement * mHFHadronEtFraction_MiniAOD_over_Reco
MonitorElement * mLooseJIDPassFractionVSeta_MiniAOD_over_Reco
void Fill(long long x)
MonitorElement * mMET_EffEcalDeadCellTriggerFilter
MonitorElement * mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD_over_Reco
MonitorElement * mCHFrac_MiniAOD_over_Reco
MonitorElement * mPt_uncor_MiniAOD_over_Reco
MonitorElement * mNjets_MiniAOD_over_Reco
MonitorElement * mPt_EndCap_MiniAOD_over_Reco
MonitorElement * mPhotonEtFraction_MiniAOD_over_Reco
MonitorElement * mMETPhi_MiniAOD_over_Reco
MonitorElement * mNHFrac_MiniAOD_over_Reco
MonitorElement * mEta_MiniAOD_over_Reco
MonitorElement * mPhi_MiniAOD_over_Reco
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
int j
Definition: DBlmapReader.cc:9
MonitorElement * mNeutralFraction_MiniAOD_over_Reco
MonitorElement * mMET_EffEcalDeadCellBoundaryFilter
MonitorElement * mMET_EffHBHENoiseFilter
MonitorElement * mHFEMEtFraction_MiniAOD_over_Reco
MonitorElement * CertificationSummary
TObject * getRootObject(void) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:273
MonitorElement * mPhFracVSpT_Barrel_MiniAOD_over_Reco
MonitorElement * mSumET_MiniAOD_over_Reco
MonitorElement * mPt_Forward_MiniAOD_over_Reco
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
MonitorElement * mCHFracVSpT_Barrel_MiniAOD_over_Reco
MonitorElement * mJetEnergyCorrVSeta_MiniAOD_over_Reco
MonitorElement * mJetEnergyCorr_MiniAOD_over_Reco
MonitorElement * mPhi_uncor_MiniAOD_over_Reco
MonitorElement * mNeutralMultiplicity_MiniAOD_over_Reco
MonitorElement * mMET_EffeeBadScFilter
MonitorElement * mPhFrac_MiniAOD_over_Reco
std::string const & label() const
Definition: InputTag.h:36
std::vector< std::string > getSubdirs(void)
Definition: DQMStore.cc:305
MonitorElement * mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD_over_Reco
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:329
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * mMEy_MiniAOD_over_Reco
MonitorElement * mChargedMultiplicity_MiniAOD_over_Reco
int getNbinsX(void) const
get # of bins in X-axis
MonitorElement * mMET_EffHBHEIsoNoiseFilter
tuple cout
Definition: gather_cfg.py:145
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109
MonitorElement * mSumET_nVtx_profile_MiniAOD_over_Reco
TH2F * getTH2F(void) const
MonitorElement * mPhotonEtFraction_nVtx_profile_MiniAOD_over_Reco
MonitorElement * mNHFracVSpT_EndCap_MiniAOD_over_Reco
MonitorElement * mNeutralHadronEtFraction_nVtx_profile_MiniAOD_over_Reco
MonitorElement * mChargedHadronEtFraction_nVtx_profile_MiniAOD_over_Reco
MonitorElement * mEta_uncor_MiniAOD_over_Reco
MonitorElement * mHFHFracVSpT_Forward_MiniAOD_over_Reco
MonitorElement * mMET_logx_MiniAOD_over_Reco

Member Data Documentation

bool DataCertificationJetMET::caloJetKSTest
private

Definition at line 72 of file DataCertificationJetMET.h.

bool DataCertificationJetMET::caloJetMeanTest
private

Definition at line 71 of file DataCertificationJetMET.h.

bool DataCertificationJetMET::caloMETKSTest
private

Definition at line 78 of file DataCertificationJetMET.h.

bool DataCertificationJetMET::caloMETMeanTest
private

Definition at line 77 of file DataCertificationJetMET.h.

MonitorElement* DataCertificationJetMET::CertificationSummary
private

Definition at line 37 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::CertificationSummaryMap
private

Definition at line 39 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

edm::ParameterSet DataCertificationJetMET::conf_
private

Definition at line 43 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET().

int DataCertificationJetMET::etaBin_
private

Definition at line 61 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

double DataCertificationJetMET::etaMax_
private

Definition at line 63 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

double DataCertificationJetMET::etaMin_
private

Definition at line 62 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

std::string DataCertificationJetMET::folderName
private

Definition at line 69 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

edm::Service<TFileService> DataCertificationJetMET::fs_
private

Definition at line 44 of file DataCertificationJetMET.h.

bool DataCertificationJetMET::InMemory_
private

Definition at line 46 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

edm::InputTag DataCertificationJetMET::inputJetLabelMiniAOD_
private

Definition at line 55 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

edm::InputTag DataCertificationJetMET::inputJetLabelRECO_
private

Definition at line 54 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

edm::InputTag DataCertificationJetMET::inputMETLabelMiniAOD_
private

Definition at line 53 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

edm::InputTag DataCertificationJetMET::inputMETLabelRECO_
private

Definition at line 51 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

edm::InputTag DataCertificationJetMET::inputMETLabelRECOUncleaned_
private

Definition at line 52 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

bool DataCertificationJetMET::isData
private

Definition at line 47 of file DataCertificationJetMET.h.

std::string DataCertificationJetMET::jetAlgo
private

Definition at line 49 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

bool DataCertificationJetMET::jetTests[5][2]
private

Definition at line 84 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

bool DataCertificationJetMET::jptJetKSTest
private

Definition at line 76 of file DataCertificationJetMET.h.

bool DataCertificationJetMET::jptJetMeanTest
private

Definition at line 75 of file DataCertificationJetMET.h.

MonitorElement* DataCertificationJetMET::mChargedHadronEtFraction_MiniAOD_over_Reco
private

Definition at line 104 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mChargedHadronEtFraction_nVtx_profile_MiniAOD_over_Reco
private

Definition at line 111 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mChargedMultiplicity_MiniAOD_over_Reco
private

Definition at line 143 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mCHFrac_MiniAOD_over_Reco
private

Definition at line 140 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mCHFracVSpT_Barrel_MiniAOD_over_Reco
private

Definition at line 135 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mDPhi_MiniAOD_over_Reco
private

Definition at line 125 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mEta_MiniAOD_over_Reco
private

Definition at line 117 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mEta_uncor_MiniAOD_over_Reco
private

Definition at line 121 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

std::string DataCertificationJetMET::metFolder
private

Definition at line 48 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

bool DataCertificationJetMET::metTests[5][2]
private

Definition at line 85 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

MonitorElement* DataCertificationJetMET::mHFEFracVSpT_Forward_MiniAOD_over_Reco
private

Definition at line 139 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mHFEMEtFraction_MiniAOD_over_Reco
private

Definition at line 108 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mHFHadronEtFraction_MiniAOD_over_Reco
private

Definition at line 107 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mHFHFracVSpT_Forward_MiniAOD_over_Reco
private

Definition at line 138 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mJetEnergyCorr_MiniAOD_over_Reco
private

Definition at line 123 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mJetEnergyCorrVSeta_MiniAOD_over_Reco
private

Definition at line 124 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mLooseJIDPassFractionVSeta_MiniAOD_over_Reco
private

Definition at line 126 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMET_EffCSCTightHalo2015Filter
private

Definition at line 94 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMET_EffCSCTightHaloFilter
private

Definition at line 89 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMET_EffEcalDeadCellBoundaryFilter
private

Definition at line 92 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMET_EffEcalDeadCellTriggerFilter
private

Definition at line 91 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMET_EffeeBadScFilter
private

Definition at line 90 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMET_EffHBHEIsoNoiseFilter
private

Definition at line 93 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMET_EffHBHENoiseFilter
private

Definition at line 88 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMET_EffHcalStripHaloFilter
private

Definition at line 95 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMET_logx_MiniAOD_over_Reco
private

Definition at line 102 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMET_MiniAOD_over_Reco
private

Definition at line 98 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMET_nVtx_profile_MiniAOD_over_Reco
private

Definition at line 109 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMETPhi_MiniAOD_over_Reco
private

Definition at line 101 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMEy_MiniAOD_over_Reco
private

Definition at line 99 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMuonMultiplicity_MiniAOD_over_Reco
private

Definition at line 145 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMVAPUJIDDiscriminant_highPt_Barrel_MiniAOD_over_Reco
private

Definition at line 134 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMVAPUJIDDiscriminant_lowPt_Barrel_MiniAOD_over_Reco
private

Definition at line 130 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMVAPUJIDDiscriminant_lowPt_EndCap_MiniAOD_over_Reco
private

Definition at line 131 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMVAPUJIDDiscriminant_lowPt_Forward_MiniAOD_over_Reco
private

Definition at line 132 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mMVAPUJIDDiscriminant_mediumPt_EndCap_MiniAOD_over_Reco
private

Definition at line 133 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mNeutralFraction_MiniAOD_over_Reco
private

Definition at line 146 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mNeutralHadronEtFraction_MiniAOD_over_Reco
private

Definition at line 105 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mNeutralHadronEtFraction_nVtx_profile_MiniAOD_over_Reco
private

Definition at line 112 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mNeutralMultiplicity_MiniAOD_over_Reco
private

Definition at line 144 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mNHFrac_MiniAOD_over_Reco
private

Definition at line 141 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mNHFracVSpT_EndCap_MiniAOD_over_Reco
private

Definition at line 136 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mNjets_MiniAOD_over_Reco
private

Definition at line 119 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mPhFrac_MiniAOD_over_Reco
private

Definition at line 142 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mPhFracVSpT_Barrel_MiniAOD_over_Reco
private

Definition at line 137 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mPhi_MiniAOD_over_Reco
private

Definition at line 118 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mPhi_uncor_MiniAOD_over_Reco
private

Definition at line 122 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mPhotonEtFraction_MiniAOD_over_Reco
private

Definition at line 106 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mPhotonEtFraction_nVtx_profile_MiniAOD_over_Reco
private

Definition at line 113 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mPt_Barrel_MiniAOD_over_Reco
private

Definition at line 127 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mPt_EndCap_MiniAOD_over_Reco
private

Definition at line 128 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mPt_Forward_MiniAOD_over_Reco
private

Definition at line 129 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mPt_MiniAOD_over_Reco
private

Definition at line 116 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mPt_uncor_MiniAOD_over_Reco
private

Definition at line 120 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mSumET_logx_MiniAOD_over_Reco
private

Definition at line 103 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mSumET_MiniAOD_over_Reco
private

Definition at line 100 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::mSumET_nVtx_profile_MiniAOD_over_Reco
private

Definition at line 110 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

int DataCertificationJetMET::nbinsPV_
private

Definition at line 57 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

double DataCertificationJetMET::nPVMax_
private

Definition at line 59 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

double DataCertificationJetMET::nPVMin_
private

Definition at line 58 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

bool DataCertificationJetMET::pfJetKSTest
private

Definition at line 74 of file DataCertificationJetMET.h.

bool DataCertificationJetMET::pfJetMeanTest
private

Definition at line 73 of file DataCertificationJetMET.h.

bool DataCertificationJetMET::pfMETKSTest
private

Definition at line 80 of file DataCertificationJetMET.h.

bool DataCertificationJetMET::pfMETMeanTest
private

Definition at line 79 of file DataCertificationJetMET.h.

int DataCertificationJetMET::ptBin_
private

Definition at line 65 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

double DataCertificationJetMET::ptMax_
private

Definition at line 67 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

double DataCertificationJetMET::ptMin_
private

Definition at line 66 of file DataCertificationJetMET.h.

Referenced by DataCertificationJetMET(), and dqmEndJob().

MonitorElement* DataCertificationJetMET::reportSummary
private

Definition at line 36 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

MonitorElement* DataCertificationJetMET::reportSummaryMap
private

Definition at line 38 of file DataCertificationJetMET.h.

Referenced by dqmEndJob().

bool DataCertificationJetMET::tcMETKSTest
private

Definition at line 82 of file DataCertificationJetMET.h.

bool DataCertificationJetMET::tcMETMeanTest
private

Definition at line 81 of file DataCertificationJetMET.h.

int DataCertificationJetMET::verbose_
private