CMS 3D CMS Logo

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

#include <DQMPFCandidateAnalyzer.h>

Inheritance diagram for DQMPFCandidateAnalyzer:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 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 &) override
 Initialize run-based parameters. More...
 
void dqmEndRun (const edm::Run &, const edm::EventSetup &) override
 Finish up a run. More...
 
 DQMPFCandidateAnalyzer (const edm::ParameterSet &)
 Constructor. More...
 
 ~DQMPFCandidateAnalyzer () override
 Destructor. More...
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Private Member Functions

static bool jetSortingRule (reco::Jet x, reco::Jet y)
 

Private Attributes

bool bypassAllDCSChecks_
 
bool bypassAllPVChecks_
 
std::string candidateType_
 
edm::ParameterSet cleaningParameters_
 
std::vector< int > countsPFCand_
 
std::vector< int > countsPFCandRECO_
 
JetMETDQMDCSFilterDCSFilter_
 
std::vector< edm::ParameterSetdiagnosticsParameters_
 
std::vector< double > etaMaxPFCand_
 
std::vector< double > etaMaxPFCandRECO_
 
std::vector< double > etaMinPFCand_
 
std::vector< double > etaMinPFCandRECO_
 
HLTConfigProvider FilterhltConfig_
 
bool hbhenoifilterdecision
 
edm::InputTag hbheNoiseFilterResultTag_
 
edm::EDGetTokenT< bool > hbheNoiseFilterResultToken_
 
std::string HBHENoiseStringMiniAOD
 
double hcalMin_
 
bool isMiniAO_
 
bool isMiniAOD_
 
int LSBegin_
 
int LSEnd_
 
MonitorElementm_HOverTrackP_Barrel_hPt_10_20
 
MonitorElementm_HOverTrackP_Barrel_hPt_1_10
 
MonitorElementm_HOverTrackP_Barrel_hPt_20_50
 
MonitorElementm_HOverTrackP_Barrel_hPt_50
 
MonitorElementm_HOverTrackP_EndCap_hPt_10_20
 
MonitorElementm_HOverTrackP_EndCap_hPt_1_10
 
MonitorElementm_HOverTrackP_EndCap_hPt_20_50
 
MonitorElementm_HOverTrackP_EndCap_hPt_50
 
MonitorElementm_HOverTrackP_trackPtVsEta
 
MonitorElementm_HOverTrackPVsEta_hPt_10_20
 
MonitorElementm_HOverTrackPVsEta_hPt_1_10
 
MonitorElementm_HOverTrackPVsEta_hPt_20_50
 
MonitorElementm_HOverTrackPVsEta_hPt_50
 
MonitorElementm_HOverTrackPVsTrackP_Barrel
 
MonitorElementm_HOverTrackPVsTrackP_EndCap
 
MonitorElementm_HOverTrackPVsTrackPt_Barrel
 
MonitorElementm_HOverTrackPVsTrackPt_EndCap
 
std::map< std::string, MonitorElement * > map_of_MEs
 
edm::InputTag METFilterMiniAODLabel2_
 
edm::InputTag METFilterMiniAODLabel_
 
edm::EDGetTokenT< edm::TriggerResultsMETFilterMiniAODToken2_
 
edm::EDGetTokenT< edm::TriggerResultsMETFilterMiniAODToken_
 
int miniaodfilterdec
 
int miniaodfilterindex
 
edm::InputTag mInputCollection_
 
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_
 
std::vector< std::string > multiplicityPFCand_nameRECO_
 
std::vector< MonitorElement * > multiplicityPFCandRECO_
 
int numPV_
 
std::vector< MonitorElement * > occupancyPFCand_
 
std::vector< std::string > occupancyPFCand_name_
 
std::vector< std::string > occupancyPFCand_name_puppiNolepWeight_
 
std::vector< std::string > occupancyPFCand_nameRECO_
 
std::vector< MonitorElement * > occupancyPFCand_puppiNolepWeight_
 
std::vector< MonitorElement * > occupancyPFCandRECO_
 
edm::EDGetTokenT< std::vector< pat::PackedCandidate > > pflowPackedToken_
 
edm::EDGetTokenT< std::vector< reco::PFCandidate > > pflowToken_
 
double ptMinCand_
 
std::vector< MonitorElement * > ptPFCand_
 
std::vector< std::string > ptPFCand_name_
 
std::vector< std::string > ptPFCand_name_puppiNolepWeight_
 
std::vector< std::string > ptPFCand_nameRECO_
 
std::vector< MonitorElement * > ptPFCand_puppiNolepWeight_
 
std::vector< MonitorElement * > ptPFCandRECO_
 
edm::InputTag theTriggerResultsLabel_
 
std::vector< int > typePFCand_
 
std::vector< int > typePFCandRECO_
 
int verbose_
 
edm::InputTag vertexTag_
 
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

DQM jetMET analysis monitoring for PFCandidates

    Jan. '16: by

    M. Artur Weber

Definition at line 63 of file DQMPFCandidateAnalyzer.h.

Constructor & Destructor Documentation

DQMPFCandidateAnalyzer::DQMPFCandidateAnalyzer ( const edm::ParameterSet pSet)

Constructor.

Definition at line 60 of file DQMPFCandidateAnalyzer.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

63 {
64  miniaodfilterdec = -1;
65 
67  //here only choice between miniaod or reco
68 
69  LSBegin_ = pSet.getParameter<int>("LSBegin");
70  LSEnd_ = pSet.getParameter<int>("LSEnd");
71 
72  isMiniAOD_ = (std::string("Packed") == candidateType_);
73 
74  mInputCollection_ = pSet.getParameter<edm::InputTag>("PFCandidateLabel");
75 
76  if (isMiniAOD_) {
77  pflowPackedToken_ = consumes<std::vector<pat::PackedCandidate> >(mInputCollection_);
78  } else {
79  pflowToken_ = consumes<std::vector<reco::PFCandidate> >(mInputCollection_);
80  }
81 
82  miniaodfilterdec = -1;
83 
84  // Smallest track pt
85  ptMinCand_ = pSet.getParameter<double>("ptMinCand");
86 
87  // Smallest raw HCAL energy linked to the track
88  hcalMin_ = pSet.getParameter<double>("hcalMin");
89 
90  diagnosticsParameters_ = pSet.getParameter<std::vector<edm::ParameterSet> >("METDiagonisticsParameters");
91 
93  //DCS
94  DCSFilter_ = new JetMETDQMDCSFilter(pSet.getParameter<ParameterSet>("DCSFilter"), iC);
95  if (isMiniAOD_) {
96  METFilterMiniAODLabel_ = pSet.getParameter<edm::InputTag>("FilterResultsLabelMiniAOD");
97  METFilterMiniAODToken_ = consumes<edm::TriggerResults>(METFilterMiniAODLabel_);
98 
99  METFilterMiniAODLabel2_ = pSet.getParameter<edm::InputTag>("FilterResultsLabelMiniAOD2");
100  METFilterMiniAODToken2_ = consumes<edm::TriggerResults>(METFilterMiniAODLabel2_);
101 
102  HBHENoiseStringMiniAOD = pSet.getParameter<std::string>("HBHENoiseLabelMiniAOD");
103  }
104 
105  if (!isMiniAOD_) {
106  hbheNoiseFilterResultTag_ = pSet.getParameter<edm::InputTag>("HBHENoiseFilterResultLabel");
108  }
109  //jet cleanup parameters
110  cleaningParameters_ = pSet.getParameter<ParameterSet>("CleaningParameters");
111 
112  //Vertex requirements
113  bypassAllPVChecks_ = cleaningParameters_.getParameter<bool>("bypassAllPVChecks");
114  bypassAllDCSChecks_ = cleaningParameters_.getParameter<bool>("bypassAllDCSChecks");
115  vertexTag_ = cleaningParameters_.getParameter<edm::InputTag>("vertexCollection");
116  vertexToken_ = consumes<std::vector<reco::Vertex> >(edm::InputTag(vertexTag_));
117 
118  verbose_ = pSet.getParameter<int>("verbose");
119 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
edm::ParameterSet cleaningParameters_
edm::EDGetTokenT< std::vector< pat::PackedCandidate > > pflowPackedToken_
edm::EDGetTokenT< bool > hbheNoiseFilterResultToken_
edm::EDGetTokenT< std::vector< reco::PFCandidate > > pflowToken_
edm::InputTag hbheNoiseFilterResultTag_
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
edm::EDGetTokenT< edm::TriggerResults > METFilterMiniAODToken2_
JetMETDQMDCSFilter * DCSFilter_
std::vector< edm::ParameterSet > diagnosticsParameters_
edm::EDGetTokenT< edm::TriggerResults > METFilterMiniAODToken_
DQMPFCandidateAnalyzer::~DQMPFCandidateAnalyzer ( )
override

Destructor.

Definition at line 122 of file DQMPFCandidateAnalyzer.cc.

References LogTrace.

122  {
123  delete DCSFilter_;
124  LogTrace("DQMPFCandidateAnalyzer") << "[DQMPFCandidateAnalyzer] Saving the histos";
125 }
#define LogTrace(id)
JetMETDQMDCSFilter * DCSFilter_

Member Function Documentation

void DQMPFCandidateAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Get the analysis.

Definition at line 669 of file DQMPFCandidateAnalyzer.cc.

References funct::abs(), edm::HLTGlobalStatus::accept(), HltBtagPostValidation_cff::c, reco::PFBlockElementCluster::clusterRef(), gather_cfg::cout, fed_dqm_sourceclient-live_cfg::DirName, ECAL, bookConverter::elements, reco::PFCandidate::elementsInBlocks(), EgHLTOffHistBins_cfi::et, reco::LeafCandidate::eta(), pat::PackedCandidate::eta(), HcalObjRepresent::Fill(), edm::Event::getByToken(), HCAL, reco::PFCandidate::hcalEnergy(), mps_fire::i, cuy::ii, edm::HandleBase::isValid(), dqmiolumiharvest::j, LogDebug, edm::EventBase::luminosityBlock(), nTracks(), pfLinker_cff::particleFlow, reco::PFCandidate::particleId(), pat::PackedCandidate::pdgId(), reco::LeafCandidate::phi(), pat::PackedCandidate::phi(), edm::Handle< T >::product(), reco::LeafCandidate::pt(), pat::PackedCandidate::pt(), pat::PackedCandidate::puppiWeight(), pat::PackedCandidate::puppiWeightNoLep(), reco::PFCandidate::rawEcalEnergy(), reco::PFCandidate::rawHcalEnergy(), edm::OwnVector< T, P >::size(), AlCaHLTBitMon_QueryRunRegistry::string, reco::PFBlockElementTrack::trackRef(), and spclusmultinvestigator_cfi::vertexCollection.

669  {
670  //Vertex information
671  Handle<VertexCollection> vertexHandle;
672  iEvent.getByToken(vertexToken_, vertexHandle);
673 
674  if (!vertexHandle.isValid()) {
675  LogDebug("") << "CaloMETAnalyzer: Could not find vertex collection" << std::endl;
676  if (verbose_)
677  std::cout << "CaloMETAnalyzer: Could not find vertex collection" << std::endl;
678  }
679  numPV_ = 0;
680  if (vertexHandle.isValid()) {
681  VertexCollection vertexCollection = *(vertexHandle.product());
682  numPV_ = vertexCollection.size();
683  }
684  bool bPrimaryVertex = (bypassAllPVChecks_ || (numPV_ > 0));
685 
686  int myLuminosityBlock;
687  myLuminosityBlock = iEvent.luminosityBlock();
688 
689  if (myLuminosityBlock < LSBegin_)
690  return;
691  if (myLuminosityBlock > LSEnd_ && LSEnd_ > 0)
692  return;
693 
694  if (verbose_)
695  std::cout << "METAnalyzer analyze" << std::endl;
696 
697  std::string DirName = "JetMET/PFCandidates/" + mInputCollection_.label();
698 
699  bool hbhenoifilterdecision = true;
700  if (!isMiniAOD_) { //not checked for MiniAOD -> for miniaod decision filled as "triggerResults" bool
701  edm::Handle<bool> HBHENoiseFilterResultHandle;
702  iEvent.getByToken(hbheNoiseFilterResultToken_, HBHENoiseFilterResultHandle);
703  if (!HBHENoiseFilterResultHandle.isValid()) {
704  LogDebug("") << "METAnalyzer: Could not find HBHENoiseFilterResult" << std::endl;
705  if (verbose_)
706  std::cout << "METAnalyzer: Could not find HBHENoiseFilterResult" << std::endl;
707  }
708  hbhenoifilterdecision = *HBHENoiseFilterResultHandle;
709  } else { //need to check if we go for version 1 or version 2
710  edm::Handle<edm::TriggerResults> metFilterResults;
711  iEvent.getByToken(METFilterMiniAODToken_, metFilterResults);
712  if (metFilterResults.isValid()) {
713  if (miniaodfilterindex != -1) {
714  hbhenoifilterdecision = metFilterResults->accept(miniaodfilterindex);
715  }
716  } else {
717  iEvent.getByToken(METFilterMiniAODToken2_, metFilterResults);
718  if (metFilterResults.isValid()) {
719  if (miniaodfilterindex != -1) {
720  hbhenoifilterdecision = metFilterResults->accept(miniaodfilterindex);
721  }
722  }
723  }
724  }
725 
726  //DCS Filter
727  bool bDCSFilter = (bypassAllDCSChecks_ || DCSFilter_->filter(iEvent, iSetup));
728 
729  for (unsigned int i = 0; i < countsPFCand_.size(); i++) {
730  countsPFCand_[i] = 0;
731  }
732  if (bDCSFilter && hbhenoifilterdecision && bPrimaryVertex) {
733  if (isMiniAOD_) {
735  iEvent.getByToken(pflowPackedToken_, packedParticleFlow);
736  //11, 13, 22 for el/mu/gamma, 211 chargedHadron, 130 neutralHadrons, 1 and 2 hadHF and EGammaHF
737  for (unsigned int i = 0; i < packedParticleFlow->size(); i++) {
738  const pat::PackedCandidate& c = packedParticleFlow->at(i);
739  for (unsigned int j = 0; j < typePFCand_.size(); j++) {
740  if (abs(c.pdgId()) == typePFCand_[j]) {
741  //second check for endcap, if inside barrel Max and Min symmetric around 0
742  if (((c.eta() > etaMinPFCand_[j]) && (c.eta() < etaMaxPFCand_[j])) ||
743  ((c.eta() > (-etaMaxPFCand_[j])) && (c.eta() < (-etaMinPFCand_[j])))) {
744  countsPFCand_[j] += 1;
745  ptPFCand_[j] = map_of_MEs[DirName + "/" + ptPFCand_name_[j]];
746  if (ptPFCand_[j] && ptPFCand_[j]->getRootObject())
747  ptPFCand_[j]->Fill(c.eta(), c.phi(), c.pt() * c.puppiWeight());
748  occupancyPFCand_[j] = map_of_MEs[DirName + "/" + occupancyPFCand_name_[j]];
749  if (occupancyPFCand_[j] && occupancyPFCand_[j]->getRootObject())
750  occupancyPFCand_[j]->Fill(c.eta(), c.phi(), c.puppiWeight());
752  if (ptPFCand_puppiNolepWeight_[j] && ptPFCand_puppiNolepWeight_[j]->getRootObject())
753  ptPFCand_puppiNolepWeight_[j]->Fill(c.eta(), c.phi(), c.pt() * c.puppiWeightNoLep());
758  }
759  }
760  }
761  }
762  }
763  for (unsigned int j = 0; j < countsPFCand_.size(); j++) {
765  if (multiplicityPFCand_[j] && multiplicityPFCand_[j]->getRootObject()) {
767  }
768  }
769  } else {
771  iEvent.getByToken(pflowToken_, particleFlow);
772  for (unsigned int i = 0; i < particleFlow->size(); i++) {
773  const reco::PFCandidate& c = particleFlow->at(i);
774  for (unsigned int j = 0; j < typePFCandRECO_.size(); j++) {
775  if (c.particleId() == typePFCandRECO_[j]) {
776  //second check for endcap, if inside barrel Max and Min symmetric around 0
777  if (((c.eta() > etaMinPFCandRECO_[j]) && (c.eta() < etaMaxPFCandRECO_[j])) ||
778  ((c.eta() > (-etaMaxPFCandRECO_[j])) && (c.eta() < (-etaMinPFCandRECO_[j])))) {
779  countsPFCandRECO_[j] += 1;
780  ptPFCandRECO_[j] = map_of_MEs[DirName + "/" + ptPFCand_nameRECO_[j]];
781  if (ptPFCandRECO_[j] && ptPFCandRECO_[j]->getRootObject())
782  ptPFCandRECO_[j]->Fill(c.eta(), c.phi(), c.pt());
784  if (occupancyPFCandRECO_[j] && occupancyPFCandRECO_[j]->getRootObject())
785  occupancyPFCandRECO_[j]->Fill(c.eta(), c.phi());
786  }
787  //fill quantities for isolated charged hadron quantities
788  //only for charged hadrons
789  if (c.particleId() == 1 && c.pt() > ptMinCand_) {
790  // At least 1 GeV in HCAL
791  double ecalRaw = c.rawEcalEnergy();
792  double hcalRaw = c.rawHcalEnergy();
793  if ((ecalRaw + hcalRaw) > hcalMin_) {
794  const PFCandidate::ElementsInBlocks& theElements = c.elementsInBlocks();
795  if (theElements.empty())
796  continue;
797  unsigned int iTrack = -999;
798  std::vector<unsigned int> iECAL; // =999;
799  std::vector<unsigned int> iHCAL; // =999;
800  const reco::PFBlockRef blockRef = theElements[0].first;
801  const edm::OwnVector<reco::PFBlockElement>& elements = blockRef->elements();
802  // Check that there is only one track in the block.
803  unsigned int nTracks = 0;
804  for (unsigned int iEle = 0; iEle < elements.size(); iEle++) {
805  // Find the tracks in the block
806  PFBlockElement::Type type = elements[iEle].type();
807  switch (type) {
808  case PFBlockElement::TRACK:
809  iTrack = iEle;
810  nTracks++;
811  break;
813  iECAL.push_back(iEle);
814  break;
816  iHCAL.push_back(iEle);
817  break;
818  default:
819  continue;
820  }
821  }
822  if (nTracks == 1) {
823  // Characteristics of the track
825  dynamic_cast<const reco::PFBlockElementTrack&>(elements[iTrack]);
826  mProfileIsoPFChHad_TrackOccupancy = map_of_MEs[DirName + "/" + "IsoPfChHad_Track_profile"];
828  mProfileIsoPFChHad_TrackOccupancy->Fill(et.trackRef()->eta(), et.trackRef()->phi());
829  mProfileIsoPFChHad_TrackPt = map_of_MEs[DirName + "/" + "IsoPfChHad_TrackPt"];
831  mProfileIsoPFChHad_TrackPt->Fill(et.trackRef()->eta(), et.trackRef()->phi(), et.trackRef()->pt());
832  if (c.rawEcalEnergy() == 0) { //isolated hadron, nothing in ECAL
833  //right now take corrected hcalEnergy, do we want the rawHcalEnergy instead
834  m_HOverTrackP_trackPtVsEta = map_of_MEs[DirName + "/" + "HOverTrackP_trackPtVsEta"];
836  m_HOverTrackP_trackPtVsEta->Fill(c.pt(), c.eta(), c.hcalEnergy() / et.trackRef()->p());
837  if (c.pt() > 1 && c.pt() < 10) {
838  m_HOverTrackPVsEta_hPt_1_10 = map_of_MEs[DirName + "/" + "HOverTrackPVsEta_hPt_1_10"];
840  m_HOverTrackPVsEta_hPt_1_10->Fill(c.eta(), c.hcalEnergy() / et.trackRef()->p());
841  } else if (c.pt() > 10 && c.pt() < 20) {
842  m_HOverTrackPVsEta_hPt_10_20 = map_of_MEs[DirName + "/" + "HOverTrackPVsEta_hPt_10_20"];
845  } else if (c.pt() > 20 && c.pt() < 50) {
846  m_HOverTrackPVsEta_hPt_20_50 = map_of_MEs[DirName + "/" + "HOverTrackPVsEta_hPt_20_50"];
849  } else if (c.pt() > 50) {
850  m_HOverTrackPVsEta_hPt_50 = map_of_MEs[DirName + "/" + "HOverTrackPVsEta_hPt_50"];
852  m_HOverTrackPVsEta_hPt_50->Fill(c.eta(), c.hcalEnergy() / et.trackRef()->p());
853  }
854  if (fabs(c.eta() < 1.392)) {
855  if (c.pt() > 1 && c.pt() < 10) {
856  m_HOverTrackP_Barrel_hPt_1_10 = map_of_MEs[DirName + "/" + "HOverTrackP_Barrel_hPt_1_10"];
859  } else if (c.pt() > 10 && c.pt() < 20) {
860  m_HOverTrackP_Barrel_hPt_10_20 = map_of_MEs[DirName + "/" + "HOverTrackP_Barrel_hPt_10_20"];
863  } else if (c.pt() > 20 && c.pt() < 50) {
864  m_HOverTrackP_Barrel_hPt_20_50 = map_of_MEs[DirName + "/" + "HOverTrackP_Barrel_hPt_20_50"];
867  } else if (c.pt() > 50) {
868  m_HOverTrackP_Barrel_hPt_50 = map_of_MEs[DirName + "/" + "HOverTrackP_Barrel_hPt_50"];
871  }
872  m_HOverTrackPVsTrackP_Barrel = map_of_MEs[DirName + "/" + "HOverTrackPVsTrackP_Barrel"];
874  m_HOverTrackPVsTrackP_Barrel->Fill(et.trackRef()->p(), c.hcalEnergy() / et.trackRef()->p());
875  m_HOverTrackPVsTrackPt_Barrel = map_of_MEs[DirName + "/" + "HOverTrackPVsTrackPt_Barrel"];
877  m_HOverTrackPVsTrackPt_Barrel->Fill(et.trackRef()->pt(), c.hcalEnergy() / et.trackRef()->p());
878  } else {
879  m_HOverTrackPVsTrackP_EndCap = map_of_MEs[DirName + "/" + "HOverTrackPVsTrackP_EndCap"];
881  m_HOverTrackPVsTrackP_EndCap->Fill(et.trackRef()->p(), c.hcalEnergy() / et.trackRef()->p());
882  m_HOverTrackPVsTrackPt_EndCap = map_of_MEs[DirName + "/" + "HOverTrackPVsTrackPt_EndCap"];
884  m_HOverTrackPVsTrackPt_EndCap->Fill(et.trackRef()->pt(), c.hcalEnergy() / et.trackRef()->p());
885  if (c.pt() > 1 && c.pt() < 10) {
886  m_HOverTrackP_EndCap_hPt_1_10 = map_of_MEs[DirName + "/" + "HOverTrackP_EndCap_hPt_1_10"];
889  } else if (c.pt() > 10 && c.pt() < 20) {
890  m_HOverTrackP_EndCap_hPt_10_20 = map_of_MEs[DirName + "/" + "HOverTrackP_EndCap_hPt_10_20"];
893  } else if (c.pt() > 20 && c.pt() < 50) {
894  m_HOverTrackP_EndCap_hPt_20_50 = map_of_MEs[DirName + "/" + "HOverTrackP_EndCap_hPt_20_50"];
897  } else if (c.pt() > 50) {
898  m_HOverTrackP_EndCap_hPt_50 = map_of_MEs[DirName + "/" + "HOverTrackP_EndCap_hPt_50"];
901  }
902  }
903  }
904  //ECAL element
905  for (unsigned int ii = 0; ii < iECAL.size(); ii++) {
906  const reco::PFBlockElementCluster& eecal =
907  dynamic_cast<const reco::PFBlockElementCluster&>(elements[iECAL[ii]]);
908  if (fabs(eecal.clusterRef()->eta()) < 1.479) {
910  map_of_MEs[DirName + "/" + "IsoPfChHad_ECAL_profile_central"];
914  eecal.clusterRef()->phi());
915  mProfileIsoPFChHad_EMPtCentral = map_of_MEs[DirName + "/" + "IsoPfChHad_EMPt_central"];
918  eecal.clusterRef()->eta(), eecal.clusterRef()->phi(), eecal.clusterRef()->pt());
919  } else {
921  map_of_MEs[DirName + "/" + "IsoPfChHad_ECAL_profile_endcap"];
925  eecal.clusterRef()->phi());
926  mProfileIsoPFChHad_EMPtEndcap = map_of_MEs[DirName + "/" + "IsoPfChHad_EMPt_endcap"];
929  eecal.clusterRef()->eta(), eecal.clusterRef()->phi(), eecal.clusterRef()->pt());
930  }
931  }
932  //HCAL element
933  for (unsigned int ii = 0; ii < iHCAL.size(); ii++) {
934  const reco::PFBlockElementCluster& ehcal =
935  dynamic_cast<const reco::PFBlockElementCluster&>(elements[iHCAL[ii]]);
936  if (fabs(ehcal.clusterRef()->eta()) < 1.740) {
938  map_of_MEs[DirName + "/" + "IsoPfChHad_HCAL_profile_central"];
942  ehcal.clusterRef()->phi());
943  mProfileIsoPFChHad_HadPtCentral = map_of_MEs[DirName + "/" + "IsoPfChHad_HadPt_central"];
946  ehcal.clusterRef()->eta(), ehcal.clusterRef()->phi(), ehcal.clusterRef()->pt());
947  } else {
949  map_of_MEs[DirName + "/" + "IsoPfChHad_HCAL_profile_endcap"];
953  ehcal.clusterRef()->phi());
954  mProfileIsoPFChHad_HadPtEndcap = map_of_MEs[DirName + "/" + "IsoPfChHad_HadPt_endcap"];
957  ehcal.clusterRef()->eta(), ehcal.clusterRef()->phi(), ehcal.clusterRef()->pt());
958  }
959  }
960  }
961  }
962  }
963  }
964  }
965  }
966  for (unsigned int j = 0; j < countsPFCandRECO_.size(); j++) {
968  if (multiplicityPFCandRECO_[j] && multiplicityPFCandRECO_[j]->getRootObject()) {
970  }
971  }
972  } //candidate loop for both miniaod and reco
973  }
974 }
MonitorElement * m_HOverTrackPVsTrackP_EndCap
#define LogDebug(id)
float puppiWeight() const
std::vector< int > typePFCand_
type
Definition: HCALResponse.h:21
MonitorElement * m_HOverTrackPVsTrackPt_Barrel
std::vector< double > etaMinPFCandRECO_
const unsigned int nTracks(const reco::Vertex &sv)
std::vector< std::string > ptPFCand_name_puppiNolepWeight_
double eta() const final
momentum pseudorapidity
double rawEcalEnergy() const
return corrected Ecal energy
Definition: PFCandidate.h:223
MonitorElement * m_HOverTrackP_Barrel_hPt_20_50
float puppiWeightNoLep() const
Weight from full PUPPI.
int pdgId() const override
PDG identifier.
MonitorElement * m_HOverTrackPVsEta_hPt_20_50
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
std::vector< std::string > multiplicityPFCand_nameRECO_
std::vector< MonitorElement * > ptPFCand_puppiNolepWeight_
MonitorElement * m_HOverTrackP_trackPtVsEta
const PFClusterRef & clusterRef() const override
const reco::TrackRef & trackRef() const override
MonitorElement * m_HOverTrackPVsEta_hPt_10_20
std::vector< MonitorElement * > multiplicityPFCand_
bool accept() const
Has at least one path accepted the event?
size_type size() const
Definition: OwnVector.h:300
MonitorElement * m_HOverTrackP_Barrel_hPt_1_10
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
edm::EDGetTokenT< std::vector< pat::PackedCandidate > > pflowPackedToken_
double pt() const final
transverse momentum
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
std::vector< std::string > occupancyPFCand_name_
MonitorElement * m_HOverTrackPVsTrackP_Barrel
std::vector< int > typePFCandRECO_
MonitorElement * m_HOverTrackP_EndCap_hPt_50
std::vector< int > countsPFCandRECO_
edm::EDGetTokenT< bool > hbheNoiseFilterResultToken_
edm::EDGetTokenT< std::vector< reco::PFCandidate > > pflowToken_
std::vector< ElementInBlock > ElementsInBlocks
Definition: PFCandidate.h:378
void Fill(long long x)
MonitorElement * m_HOverTrackPVsEta_hPt_1_10
MonitorElement * mProfileIsoPFChHad_HadPtEndcap
MonitorElement * mProfileIsoPFChHad_HcalOccupancyEndcap
MonitorElement * mProfileIsoPFChHad_EMPtCentral
std::vector< MonitorElement * > occupancyPFCand_
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::EDGetTokenT< std::vector< reco::Vertex > > vertexToken_
std::vector< MonitorElement * > ptPFCand_
std::vector< double > etaMaxPFCandRECO_
double pt() const override
transverse momentum
std::vector< std::string > multiplicityPFCand_name_
std::vector< std::string > occupancyPFCand_nameRECO_
std::map< std::string, MonitorElement * > map_of_MEs
bool isValid() const
Definition: HandleBase.h:70
std::vector< double > etaMinPFCand_
bool filter(const edm::Event &evt, const edm::EventSetup &es)
ii
Definition: cuy.py:590
MonitorElement * m_HOverTrackPVsTrackPt_EndCap
double eta() const override
momentum pseudorapidity
double phi() const override
momentum azimuthal angle
edm::EDGetTokenT< edm::TriggerResults > METFilterMiniAODToken2_
std::vector< MonitorElement * > occupancyPFCand_puppiNolepWeight_
MonitorElement * mProfileIsoPFChHad_EcalOccupancyEndcap
std::vector< std::string > occupancyPFCand_name_puppiNolepWeight_
MonitorElement * m_HOverTrackP_Barrel_hPt_10_20
T const * product() const
Definition: Handle.h:69
std::vector< int > countsPFCand_
MonitorElement * m_HOverTrackP_EndCap_hPt_1_10
MonitorElement * mProfileIsoPFChHad_TrackPt
std::vector< std::string > ptPFCand_nameRECO_
MonitorElement * mProfileIsoPFChHad_HcalOccupancyCentral
MonitorElement * mProfileIsoPFChHad_TrackOccupancy
MonitorElement * m_HOverTrackP_Barrel_hPt_50
std::string const & label() const
Definition: InputTag.h:36
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
std::vector< MonitorElement * > occupancyPFCandRECO_
std::vector< MonitorElement * > ptPFCandRECO_
std::vector< MonitorElement * > multiplicityPFCandRECO_
double hcalEnergy() const
return corrected Hcal energy
Definition: PFCandidate.h:232
MonitorElement * mProfileIsoPFChHad_EcalOccupancyCentral
JetMETDQMDCSFilter * DCSFilter_
virtual ParticleType particleId() const
Definition: PFCandidate.h:366
const ElementsInBlocks & elementsInBlocks() const
Definition: PFCandidate.cc:636
virtual TObject const * getRootObject() const
double phi() const final
momentum azimuthal angle
MonitorElement * mProfileIsoPFChHad_EMPtEndcap
MonitorElement * m_HOverTrackPVsEta_hPt_50
std::vector< double > etaMaxPFCand_
MonitorElement * m_HOverTrackP_EndCap_hPt_10_20
MonitorElement * m_HOverTrackP_EndCap_hPt_20_50
std::vector< std::string > ptPFCand_name_
double rawHcalEnergy() const
return raw Hcal energy
Definition: PFCandidate.h:235
edm::EDGetTokenT< edm::TriggerResults > METFilterMiniAODToken_
MonitorElement * mProfileIsoPFChHad_HadPtCentral
void DQMPFCandidateAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overridevirtual

Inizialize parameters for histo binning.

Implements DQMEDAnalyzer.

Definition at line 128 of file DQMPFCandidateAnalyzer.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), dqm::dqmstoreimpl::DQMStore::IBooker::bookProfile(), fed_dqm_sourceclient-live_cfg::DirName, JetChargeProducer_cfi::exp, dqmMemoryStats::float, mps_fire::i, dqm-mbProfile::log, M_PI, LepHTMonitor_cff::nbins_eta, dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and findQualityFiles::v.

128  {
129  ibooker.setCurrentFolder("JetMET/PFCandidates/" + mInputCollection_.label());
130  std::string DirName = "JetMET/PFCandidates/" + mInputCollection_.label();
131 
132  if (!isMiniAOD_) {
133  if (!occupancyPFCandRECO_.empty())
134  occupancyPFCandRECO_.clear();
135  if (!occupancyPFCand_nameRECO_.empty())
137  if (!etaMinPFCandRECO_.empty())
138  etaMinPFCandRECO_.clear();
139  if (!etaMaxPFCandRECO_.empty())
140  etaMaxPFCandRECO_.clear();
141  if (!typePFCandRECO_.empty())
142  typePFCandRECO_.clear();
143  if (!countsPFCandRECO_.empty())
144  countsPFCandRECO_.clear();
145  if (!ptPFCandRECO_.empty())
146  ptPFCandRECO_.clear();
147  if (!ptPFCand_nameRECO_.empty())
148  ptPFCand_nameRECO_.clear();
149  if (!multiplicityPFCandRECO_.empty())
150  multiplicityPFCandRECO_.clear();
151  if (!multiplicityPFCand_nameRECO_.empty())
153  for (std::vector<edm::ParameterSet>::const_iterator v = diagnosticsParameters_.begin();
154  v != diagnosticsParameters_.end();
155  v++) {
156  int etaNBinsPFCand = v->getParameter<int>("etaNBins");
157  double etaMinPFCand = v->getParameter<double>("etaMin");
158  double etaMaxPFCand = v->getParameter<double>("etaMax");
159  int phiNBinsPFCand = v->getParameter<int>("phiNBins");
160  double phiMinPFCand = v->getParameter<double>("phiMin");
161  double phiMaxPFCand = v->getParameter<double>("phiMax");
162  int nMinPFCand = v->getParameter<int>("nMin");
163  int nMaxPFCand = v->getParameter<int>("nMax");
164  int nbinsPFCand = v->getParameter<double>("nbins");
165  etaMinPFCandRECO_.push_back(etaMinPFCand);
166  etaMaxPFCandRECO_.push_back(etaMaxPFCand);
167  typePFCandRECO_.push_back(v->getParameter<int>("type"));
168  countsPFCandRECO_.push_back(0);
169  multiplicityPFCandRECO_.push_back(
170  ibooker.book1D(std::string(v->getParameter<std::string>("name")).append("_multiplicity_").c_str(),
171  std::string(v->getParameter<std::string>("name")) + "multiplicity",
172  nbinsPFCand,
173  nMinPFCand,
174  nMaxPFCand));
176  std::string(v->getParameter<std::string>("name")).append("_multiplicity_"));
177  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(
180 
181  //push back names first, we need to create histograms with the name and fill it for endcap plots later
182  occupancyPFCand_nameRECO_.push_back(std::string(v->getParameter<std::string>("name")).append("_occupancy_"));
183 
184  ptPFCand_nameRECO_.push_back(std::string(v->getParameter<std::string>("name")).append("_pt_"));
185  //special booking for endcap plots, merge plots for eminus and eplus into one plot, using variable binning
186  //barrel plots have eta-boundaries on minus and plus side
187  //parameters start on minus side
188  if (etaMinPFCand * etaMaxPFCand < 0) { //barrel plots, plot only in barrel region
189  occupancyPFCandRECO_.push_back(
190  ibooker.book2D(std::string(v->getParameter<std::string>("name")).append("_occupancy_").c_str(),
191  std::string(v->getParameter<std::string>("name")) + "occupancy",
192  etaNBinsPFCand,
193  etaMinPFCand,
194  etaMaxPFCand,
195  phiNBinsPFCand,
196  phiMinPFCand,
197  phiMaxPFCand));
198  ptPFCandRECO_.push_back(ibooker.book2D(std::string(v->getParameter<std::string>("name")).append("_pt_").c_str(),
199  std::string(v->getParameter<std::string>("name")) + "pt",
200  etaNBinsPFCand,
201  etaMinPFCand,
202  etaMaxPFCand,
203  phiNBinsPFCand,
204  phiMinPFCand,
205  phiMaxPFCand));
206  } else { //endcap or forward plots,
207  const int nbins_eta_endcap = 2 * (etaNBinsPFCand + 1);
208  double eta_limits_endcap[nbins_eta_endcap];
209  for (int i = 0; i < nbins_eta_endcap; i++) {
210  if (i < (etaNBinsPFCand + 1)) {
211  eta_limits_endcap[i] = etaMinPFCand + i * (etaMaxPFCand - etaMinPFCand) / (double)etaNBinsPFCand;
212  } else {
213  eta_limits_endcap[i] =
214  -etaMaxPFCand + (i - (etaNBinsPFCand + 1)) * (etaMaxPFCand - etaMinPFCand) / (double)etaNBinsPFCand;
215  }
216  }
217  TH2F* hist_temp_occup = new TH2F((occupancyPFCand_nameRECO_[occupancyPFCand_nameRECO_.size() - 1]).c_str(),
218  "occupancy",
219  nbins_eta_endcap - 1,
220  eta_limits_endcap,
221  phiNBinsPFCand,
222  phiMinPFCand,
223  phiMaxPFCand);
224  occupancyPFCandRECO_.push_back(
225  ibooker.book2D(occupancyPFCand_nameRECO_[occupancyPFCand_nameRECO_.size() - 1], hist_temp_occup));
226  TH2F* hist_temp_pt = new TH2F((ptPFCand_nameRECO_[ptPFCand_nameRECO_.size() - 1]).c_str(),
227  "pt",
228  nbins_eta_endcap - 1,
229  eta_limits_endcap,
230  phiNBinsPFCand,
231  phiMinPFCand,
232  phiMaxPFCand);
233  ptPFCandRECO_.push_back(ibooker.book2D(ptPFCand_nameRECO_[ptPFCand_nameRECO_.size() - 1], hist_temp_pt));
234  }
235 
236  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(
237  DirName + "/" + occupancyPFCand_nameRECO_[occupancyPFCand_nameRECO_.size() - 1],
239  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(
240  DirName + "/" + ptPFCand_nameRECO_[ptPFCand_nameRECO_.size() - 1], ptPFCandRECO_[ptPFCandRECO_.size() - 1]));
241  }
242 
243  mProfileIsoPFChHad_TrackOccupancy = ibooker.book2D(
244  "IsoPfChHad_Track_profile", "Isolated PFChHadron Tracker_occupancy", 108, -2.7, 2.7, 160, -M_PI, M_PI);
245  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "IsoPfChHad_Track_profile",
248  ibooker.book2D("IsoPfChHad_TrackPt", "Isolated PFChHadron TrackPt", 108, -2.7, 2.7, 160, -M_PI, M_PI);
249  map_of_MEs.insert(
250  std::pair<std::string, MonitorElement*>(DirName + "/" + "IsoPfChHad_TrackPt", mProfileIsoPFChHad_TrackPt));
251 
252  mProfileIsoPFChHad_EcalOccupancyCentral = ibooker.book2D("IsoPfChHad_ECAL_profile_central",
253  "IsolatedPFChHa ECAL occupancy (Barrel)",
254  180,
255  -1.479,
256  1.479,
257  125,
258  -M_PI,
259  M_PI);
260  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "IsoPfChHad_ECAL_profile_central",
262  mProfileIsoPFChHad_EMPtCentral = ibooker.book2D(
263  "IsoPfChHad_EMPt_central", "Isolated PFChHadron HadPt_central", 180, -1.479, 1.479, 360, -M_PI, M_PI);
264  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "IsoPfChHad_EMPt_central",
266 
268  "IsoPfChHad_ECAL_profile_endcap", "IsolatedPFChHa ECAL occupancy (Endcap)", 110, -2.75, 2.75, 125, -M_PI, M_PI);
269  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "IsoPfChHad_ECAL_profile_endcap",
272  ibooker.book2D("IsoPfChHad_EMPt_endcap", "Isolated PFChHadron EMPt_endcap", 110, -2.75, 2.75, 125, -M_PI, M_PI);
273  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "IsoPfChHad_EMPt_endcap",
275 
276  const int nbins_eta = 16;
277 
278  double eta_limits[nbins_eta] = {-2.650,
279  -2.500,
280  -2.322,
281  -2.172,
282  -2.043,
283  -1.930,
284  -1.830,
285  -1.740,
286  1.740,
287  1.830,
288  1.930,
289  2.043,
290  2.172,
291  2.3122,
292  2.500,
293  2.650};
294 
295  TH2F* hist_temp_HCAL = new TH2F("IsoPfChHad_HCAL_profile_endcap",
296  "IsolatedPFChHa HCAL occupancy (outer endcap)",
297  nbins_eta - 1,
298  eta_limits,
299  36,
300  -M_PI,
301  M_PI);
302  TH2F* hist_tempPt_HCAL = (TH2F*)hist_temp_HCAL->Clone("Isolated PFCHHadron HadPt (outer endcap)");
303 
304  mProfileIsoPFChHad_HcalOccupancyCentral = ibooker.book2D("IsoPfChHad_HCAL_profile_central",
305  "IsolatedPFChHa HCAL occupancy (Central Part)",
306  40,
307  -1.740,
308  1.740,
309  72,
310  -M_PI,
311  M_PI);
312  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "IsoPfChHad_HCAL_profile_central",
314  mProfileIsoPFChHad_HadPtCentral = ibooker.book2D(
315  "IsoPfChHad_HadPt_central", "Isolated PFChHadron HadPt_central", 40, -1.740, 1.740, 72, -M_PI, M_PI);
316  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "IsoPfChHad_HadPt_central",
318 
319  mProfileIsoPFChHad_HcalOccupancyEndcap = ibooker.book2D("IsoPfChHad_HCAL_profile_endcap", hist_temp_HCAL);
320  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "IsoPfChHad_HCAL_profile_endcap",
322  mProfileIsoPFChHad_HadPtEndcap = ibooker.book2D("IsoPfChHad_HadPt_endcap", hist_tempPt_HCAL);
323  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "IsoPfChHad_HadPt_endcap",
325 
326  //actual HCAL segmentation in pseudorapidity -> reduce by a factor of two
327  //const int nbins_eta_hcal_total=54;
328  //double eta_limits_hcal_total[nbins_eta_hcal_total]=
329  // {-2.650,-2.500,-2.322,-2.172,-2.043,-1.930,-1.830,-1.740,-1.653,-1.566,-1.479,-1.392,-1.305,
330  // -1.218,-1.131,-1.044,-0.957,-0.870,-0.783,-0.696,-0.609,-0.522,-0.435,-0.348,-0.261,-0.174,-0.087,0.0,
331  // 0.087, 0.174, 0.261, 0.348, 0.435, 0.522, 0.609, 0.783, 0.870, 0.957, 1.044, 1.131, 1.218
332  // 1.305, 1.392, 1.479, 1.566, 1.653, 1.740, 1.830, 1.930, 2.043, 2.172, 2.322, 2.500, 2.650}
333  //
334 
335  const int nbins_eta_hcal_total = 28;
336  double eta_limits_hcal_total[nbins_eta_hcal_total] = {
337  -2.650, -2.322, -2.043, -1.830, -1.653, -1.479, -1.305, -1.131, -0.957, -0.783, -0.609, -0.435, -0.261, -0.087,
338  0.087, 0.261, 0.435, 0.609, 0.783, 0.957, 1.131, 1.305, 1.479, 1.653, 1.830, 2.043, 2.322, 2.650};
339  float eta_limits_hcal_total_f[nbins_eta_hcal_total];
340  float log_bin_spacing = log(200.) / 40.;
341  const int nbins_pt_total_hcal = 41;
342  double pt_limits_hcal[nbins_pt_total_hcal];
343  float pt_limits_hcal_f[nbins_pt_total_hcal];
344  for (int i = 0; i < nbins_pt_total_hcal; i++) {
345  pt_limits_hcal[i] = exp(i * log_bin_spacing);
346  pt_limits_hcal_f[i] = exp(i * log_bin_spacing);
347  }
348  for (int i = 0; i < nbins_eta_hcal_total; i++) {
349  eta_limits_hcal_total_f[i] = (float)eta_limits_hcal_total[i];
350  }
351  m_HOverTrackP_trackPtVsEta = ibooker.book2D("HOverTrackP_trackPtVsEta",
352  "HOverTrackP_trackPtVsEta",
353  nbins_pt_total_hcal - 1,
354  pt_limits_hcal_f,
355  nbins_eta_hcal_total - 1,
356  eta_limits_hcal_total_f);
357  m_HOverTrackPVsTrackP_Barrel = ibooker.bookProfile(
358  "HOverTrackPVsTrackP_Barrel", "HOverTrackPVsTrackP_Barrel", nbins_pt_total_hcal - 1, pt_limits_hcal, 0, 4, " ");
359  m_HOverTrackPVsTrackP_EndCap = ibooker.bookProfile(
360  "HOverTrackPVsTrackP_EndCap", "HOverTrackPVsTrackP_EndCap", nbins_pt_total_hcal - 1, pt_limits_hcal, 0, 4, " ");
361  m_HOverTrackPVsTrackPt_Barrel = ibooker.bookProfile("HOverTrackPVsTrackPt_Barrel",
362  "HOverTrackPVsTrackPt_Barrel",
363  nbins_pt_total_hcal - 1,
364  pt_limits_hcal,
365  0,
366  4,
367  " ");
368  m_HOverTrackPVsTrackPt_EndCap = ibooker.bookProfile("HOverTrackPVsTrackPt_EndCap",
369  "HOverTrackPVsTrackPt_EndCap",
370  nbins_pt_total_hcal - 1,
371  pt_limits_hcal,
372  0,
373  4,
374  " ");
375 
376  m_HOverTrackPVsEta_hPt_1_10 = ibooker.bookProfile("HOverTrackPVsEta_hPt_1_10",
377  "HOverTrackPVsEta, 1<hPt<10 GeV",
378  nbins_eta_hcal_total - 1,
379  eta_limits_hcal_total,
380  0,
381  4,
382  " ");
383  m_HOverTrackPVsEta_hPt_10_20 = ibooker.bookProfile("HOverTrackPVsEta_hPt_10_20",
384  "HOverTrackPVsEta, 10<hPt<20 GeV",
385  nbins_eta_hcal_total - 1,
386  eta_limits_hcal_total,
387  0,
388  4,
389  " ");
390  m_HOverTrackPVsEta_hPt_20_50 = ibooker.bookProfile("HOverTrackPVsEta_hPt_20_50",
391  "HOverTrackPVsEta, 20<hPt<50 GeV",
392  nbins_eta_hcal_total - 1,
393  eta_limits_hcal_total,
394  0,
395  4,
396  " ");
397  m_HOverTrackPVsEta_hPt_50 = ibooker.bookProfile("HOverTrackPVsEta_hPt_50",
398  "HOverTrackPVsEta, hPt>50 GeV",
399  nbins_eta_hcal_total - 1,
400  eta_limits_hcal_total,
401  0,
402  4,
403  " ");
404 
406  ibooker.book1D("HOverTrackP_Barrel_hPt_1_10", "HOverTrackP_B, 1<hPt<10 GeV", 50, 0, 4);
408  ibooker.book1D("HOverTrackP_Barrel_hPt_10_20", "HOverTrackP_B, 10<hPt<20 GeV", 50, 0, 4);
410  ibooker.book1D("HOverTrackP_Barrel_hPt_20_50", "HOverTrackP_B, 20<hPt<50 GeV", 50, 0, 4);
411  m_HOverTrackP_Barrel_hPt_50 = ibooker.book1D("HOverTrackP_Barrel_hPt_50", "HOverTrackP_B, hPt>50 GeV", 50, 0, 4);
412 
414  ibooker.book1D("HOverTrackP_EndCap_hPt_1_10", "HOverTrackP_E, 1<hPt<10 GeV", 50, 0, 4);
416  ibooker.book1D("HOverTrackP_EndCap_hPt_10_20", "HOverTrackP_E, 10<hPt<20 GeV", 50, 0, 4);
418  ibooker.book1D("HOverTrackP_EndCap_hPt_20_50", "HOverTrackP_E, 20<hPt<50 GeV", 50, 0, 4);
419  m_HOverTrackP_EndCap_hPt_50 = ibooker.book1D("HOverTrackP_EndCap_hPt_50", "HOverTrackP_E, hPt>50 GeV", 50, 0, 4);
420 
421  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackP_trackPtVsEta",
423  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackPVsTrackP_Barrel",
425  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackPVsTrackP_EndCap",
427  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackPVsTrackPt_Barrel",
429  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackPVsTrackPt_EndCap",
431  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackPVsEta_hPt_1_10",
433  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackPVsEta_hPt_10_20",
435  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackPVsEta_hPt_20_50",
437  map_of_MEs.insert(
438  std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackPVsEta_hPt_50", m_HOverTrackPVsEta_hPt_50));
439  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackP_Barrel_hPt_1_10",
441  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackP_Barrel_hPt_10_20",
443  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackP_Barrel_hPt_20_50",
445  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackP_Barrel_hPt_50",
447  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackP_EndCap_hPt_1_10",
449  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackP_EndCap_hPt_10_20",
451  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackP_EndCap_hPt_20_50",
453  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(DirName + "/" + "HOverTrackP_EndCap_hPt_50",
455  } else { //MiniAOD workflow
456  if (!occupancyPFCand_.empty())
457  occupancyPFCand_.clear();
458  if (!occupancyPFCand_name_.empty())
459  occupancyPFCand_name_.clear();
464  if (!etaMinPFCand_.empty())
465  etaMinPFCand_.clear();
466  if (!etaMaxPFCand_.empty())
467  etaMaxPFCand_.clear();
468  if (!typePFCand_.empty())
469  typePFCand_.clear();
470  if (!countsPFCand_.empty())
471  countsPFCand_.clear();
472  if (!ptPFCand_.empty())
473  ptPFCand_.clear();
474  if (!ptPFCand_name_.empty())
475  ptPFCand_name_.clear();
476  if (!ptPFCand_puppiNolepWeight_.empty())
478  if (!ptPFCand_name_puppiNolepWeight_.empty())
480  if (!multiplicityPFCand_.empty())
481  multiplicityPFCand_.clear();
482  if (!multiplicityPFCand_name_.empty())
483  multiplicityPFCand_name_.clear();
484  for (std::vector<edm::ParameterSet>::const_iterator v = diagnosticsParameters_.begin();
485  v != diagnosticsParameters_.end();
486  v++) {
487  int etaNBinsPFCand = v->getParameter<int>("etaNBins");
488  double etaMinPFCand = v->getParameter<double>("etaMin");
489  double etaMaxPFCand = v->getParameter<double>("etaMax");
490  int phiNBinsPFCand = v->getParameter<int>("phiNBins");
491  double phiMinPFCand = v->getParameter<double>("phiMin");
492  double phiMaxPFCand = v->getParameter<double>("phiMax");
493  int nMinPFCand = v->getParameter<int>("nMin");
494  int nMaxPFCand = v->getParameter<int>("nMax");
495  int nbinsPFCand = v->getParameter<double>("nbins");
496 
497  // etaNBins_.push_back(etaNBins);
498  etaMinPFCand_.push_back(etaMinPFCand);
499  etaMaxPFCand_.push_back(etaMaxPFCand);
500  typePFCand_.push_back(v->getParameter<int>("type"));
501  countsPFCand_.push_back(0);
502 
503  multiplicityPFCand_.push_back(
504  ibooker.book1D(std::string(v->getParameter<std::string>("name")).append("_multiplicity_").c_str(),
505  std::string(v->getParameter<std::string>("name")) + "multiplicity",
506  nbinsPFCand,
507  nMinPFCand,
508  nMaxPFCand));
509  multiplicityPFCand_name_.push_back(std::string(v->getParameter<std::string>("name")).append("_multiplicity_"));
510  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(
511  DirName + "/" + multiplicityPFCand_name_[multiplicityPFCand_name_.size() - 1],
513  //push back names first, we need to create histograms with the name and fill it for endcap plots later
514  occupancyPFCand_name_.push_back(
515  std::string(v->getParameter<std::string>("name")).append("_occupancy_puppiWeight_"));
516  ptPFCand_name_.push_back(std::string(v->getParameter<std::string>("name")).append("_pt_puppiWeight_"));
517  //push back names first, we need to create histograms with the name and fill it for endcap plots later
519  std::string(v->getParameter<std::string>("name")).append("_occupancy_puppiNolepWeight_"));
521  std::string(v->getParameter<std::string>("name")).append("_pt_puppiNolepWeight_"));
522  //special booking for endcap plots, merge plots for eminus and eplus into one plot, using variable binning
523  //barrel plots have eta-boundaries on minus and plus side
524  //parameters start on minus side
525  if (etaMinPFCand * etaMaxPFCand < 0) { //barrel plots, plot only in barrel region
526  occupancyPFCand_.push_back(
527  ibooker.book2D(std::string(v->getParameter<std::string>("name")).append("_occupancy_puppiWeight_").c_str(),
528  std::string(v->getParameter<std::string>("name")) + "occupancy_puppiWeight_",
529  etaNBinsPFCand,
530  etaMinPFCand,
531  etaMaxPFCand,
532  phiNBinsPFCand,
533  phiMinPFCand,
534  phiMaxPFCand));
535  ptPFCand_.push_back(
536  ibooker.book2D(std::string(v->getParameter<std::string>("name")).append("_pt_puppiWeight_").c_str(),
537  std::string(v->getParameter<std::string>("name")) + "pt_puppiWeight_",
538  etaNBinsPFCand,
539  etaMinPFCand,
540  etaMaxPFCand,
541  phiNBinsPFCand,
542  phiMinPFCand,
543  phiMaxPFCand));
544  occupancyPFCand_puppiNolepWeight_.push_back(ibooker.book2D(
545  std::string(v->getParameter<std::string>("name")).append("_occupancy_puppiNolepWeight_").c_str(),
546  std::string(v->getParameter<std::string>("name")) + "occupancy_puppiNolepWeight",
547  etaNBinsPFCand,
548  etaMinPFCand,
549  etaMaxPFCand,
550  phiNBinsPFCand,
551  phiMinPFCand,
552  phiMaxPFCand));
553  ptPFCand_puppiNolepWeight_.push_back(
554  ibooker.book2D(std::string(v->getParameter<std::string>("name")).append("_pt_puppiNolepWeight_").c_str(),
555  std::string(v->getParameter<std::string>("name")) + "pt_puppiNolepWeight",
556  etaNBinsPFCand,
557  etaMinPFCand,
558  etaMaxPFCand,
559  phiNBinsPFCand,
560  phiMinPFCand,
561  phiMaxPFCand));
562  } else { //endcap or forward plots,
563  const int nbins_eta_endcap = 2 * (etaNBinsPFCand + 1);
564  double eta_limits_endcap[nbins_eta_endcap];
565  for (int i = 0; i < nbins_eta_endcap; i++) {
566  if (i < (etaNBinsPFCand + 1)) {
567  eta_limits_endcap[i] = etaMinPFCand + i * (etaMaxPFCand - etaMinPFCand) / (double)etaNBinsPFCand;
568  } else {
569  eta_limits_endcap[i] =
570  -etaMaxPFCand + (i - (etaNBinsPFCand + 1)) * (etaMaxPFCand - etaMinPFCand) / (double)etaNBinsPFCand;
571  }
572  }
573  TH2F* hist_temp_occup = new TH2F((occupancyPFCand_name_[occupancyPFCand_name_.size() - 1]).c_str(),
574  (occupancyPFCand_name_[occupancyPFCand_name_.size() - 1]).c_str(),
575  nbins_eta_endcap - 1,
576  eta_limits_endcap,
577  phiNBinsPFCand,
578  phiMinPFCand,
579  phiMaxPFCand);
580  occupancyPFCand_.push_back(
581  ibooker.book2D(occupancyPFCand_name_[occupancyPFCand_name_.size() - 1], hist_temp_occup));
582  TH2F* hist_temp_pt = new TH2F((ptPFCand_name_[ptPFCand_name_.size() - 1]).c_str(),
583  (ptPFCand_name_[ptPFCand_name_.size() - 1]).c_str(),
584  nbins_eta_endcap - 1,
585  eta_limits_endcap,
586  phiNBinsPFCand,
587  phiMinPFCand,
588  phiMaxPFCand);
589  ptPFCand_.push_back(ibooker.book2D(ptPFCand_name_[ptPFCand_name_.size() - 1], hist_temp_pt));
590  TH2F* hist_temp_occup_puppiNolepWeight = new TH2F(
593  nbins_eta_endcap - 1,
594  eta_limits_endcap,
595  phiNBinsPFCand,
596  phiMinPFCand,
597  phiMaxPFCand);
600  hist_temp_occup_puppiNolepWeight));
601  TH2F* hist_temp_pt_puppiNolepWeight =
604  nbins_eta_endcap - 1,
605  eta_limits_endcap,
606  phiNBinsPFCand,
607  phiMinPFCand,
608  phiMaxPFCand);
609  ptPFCand_puppiNolepWeight_.push_back(
611  hist_temp_pt_puppiNolepWeight));
612  }
613  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(
616  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(
619  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(
620  DirName + "/" + occupancyPFCand_name_[occupancyPFCand_name_.size() - 1],
621  occupancyPFCand_[occupancyPFCand_.size() - 1]));
622  map_of_MEs.insert(std::pair<std::string, MonitorElement*>(
623  DirName + "/" + ptPFCand_name_[ptPFCand_name_.size() - 1], ptPFCand_[ptPFCand_.size() - 1]));
624  }
625  }
626 }
MonitorElement * m_HOverTrackPVsTrackP_EndCap
std::vector< int > typePFCand_
MonitorElement * m_HOverTrackPVsTrackPt_Barrel
std::vector< double > etaMinPFCandRECO_
std::vector< std::string > ptPFCand_name_puppiNolepWeight_
MonitorElement * m_HOverTrackP_Barrel_hPt_20_50
MonitorElement * m_HOverTrackPVsEta_hPt_20_50
std::vector< std::string > multiplicityPFCand_nameRECO_
std::vector< MonitorElement * > ptPFCand_puppiNolepWeight_
MonitorElement * m_HOverTrackP_trackPtVsEta
MonitorElement * m_HOverTrackPVsEta_hPt_10_20
std::vector< MonitorElement * > multiplicityPFCand_
MonitorElement * m_HOverTrackP_Barrel_hPt_1_10
std::vector< std::string > occupancyPFCand_name_
MonitorElement * m_HOverTrackPVsTrackP_Barrel
std::vector< int > typePFCandRECO_
MonitorElement * m_HOverTrackP_EndCap_hPt_50
std::vector< int > countsPFCandRECO_
MonitorElement * m_HOverTrackPVsEta_hPt_1_10
MonitorElement * mProfileIsoPFChHad_HadPtEndcap
MonitorElement * mProfileIsoPFChHad_HcalOccupancyEndcap
MonitorElement * mProfileIsoPFChHad_EMPtCentral
std::vector< MonitorElement * > occupancyPFCand_
std::vector< MonitorElement * > ptPFCand_
std::vector< double > etaMaxPFCandRECO_
std::vector< std::string > multiplicityPFCand_name_
std::vector< std::string > occupancyPFCand_nameRECO_
std::map< std::string, MonitorElement * > map_of_MEs
std::vector< double > etaMinPFCand_
#define M_PI
MonitorElement * m_HOverTrackPVsTrackPt_EndCap
std::vector< MonitorElement * > occupancyPFCand_puppiNolepWeight_
MonitorElement * mProfileIsoPFChHad_EcalOccupancyEndcap
std::vector< std::string > occupancyPFCand_name_puppiNolepWeight_
MonitorElement * m_HOverTrackP_Barrel_hPt_10_20
std::vector< int > countsPFCand_
MonitorElement * m_HOverTrackP_EndCap_hPt_1_10
MonitorElement * mProfileIsoPFChHad_TrackPt
std::vector< std::string > ptPFCand_nameRECO_
MonitorElement * mProfileIsoPFChHad_HcalOccupancyCentral
MonitorElement * mProfileIsoPFChHad_TrackOccupancy
MonitorElement * m_HOverTrackP_Barrel_hPt_50
std::string const & label() const
Definition: InputTag.h:36
std::vector< MonitorElement * > occupancyPFCandRECO_
std::vector< MonitorElement * > ptPFCandRECO_
std::vector< MonitorElement * > multiplicityPFCandRECO_
MonitorElement * mProfileIsoPFChHad_EcalOccupancyCentral
MonitorElement * mProfileIsoPFChHad_EMPtEndcap
MonitorElement * m_HOverTrackPVsEta_hPt_50
std::vector< double > etaMaxPFCand_
MonitorElement * m_HOverTrackP_EndCap_hPt_10_20
MonitorElement * m_HOverTrackP_EndCap_hPt_20_50
std::vector< edm::ParameterSet > diagnosticsParameters_
std::vector< std::string > ptPFCand_name_
MonitorElement * mProfileIsoPFChHad_HadPtCentral
void DQMPFCandidateAnalyzer::dqmBeginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
override

Initialize run-based parameters.

Definition at line 629 of file DQMPFCandidateAnalyzer.cc.

References newFWLiteAna::found, mps_fire::i, cond::persistency::search(), electronDataDiscovery::search2(), and AlCaHLTBitMon_QueryRunRegistry::string.

629  {
630  miniaodfilterindex = -1;
631 
632  if (isMiniAOD_) {
633  bool changed_filter = true;
634  if (FilterhltConfig_.init(iRun, iSetup, METFilterMiniAODLabel_.process(), changed_filter)) {
635  miniaodfilterdec = 0;
636  for (unsigned int i = 0; i < FilterhltConfig_.size(); i++) {
638  5); //actual label of filter, the first 5 items are Flag_, so stripped off
640  HBHENoiseStringMiniAOD; //all filters end with DQM, which is not in the flag --> ONLY not for HBHEFilters
641  std::size_t found = search2.find(search);
642  if (found != std::string::npos) {
644  }
645  }
646  } else if (FilterhltConfig_.init(iRun, iSetup, METFilterMiniAODLabel2_.process(), changed_filter)) {
647  miniaodfilterdec = 1;
648  for (unsigned int i = 0; i < FilterhltConfig_.size(); i++) {
649  std::string search = FilterhltConfig_.triggerName(i).substr(
650  5); //actual label of filter, the first 5 items are Flag_, so stripped off
651  std::string search2 =
652  HBHENoiseStringMiniAOD; //all filters end with DQM, which is not in the flag --> ONLY not for HBHEFilters
653  std::size_t found = search2.find(search);
654  if (found != std::string::npos) {
656  }
657  }
658  } else {
659  edm::LogWarning("MiniAOD MET Filter HLT OBject version")
660  << "nothing found with both RECO and reRECO label" << std::endl;
661  }
662  }
663 }
unsigned int size() const
number of trigger paths in trigger table
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:315
HLTConfigProvider FilterhltConfig_
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
std::string const & process() const
Definition: InputTag.h:40
void DQMPFCandidateAnalyzer::dqmEndRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
override

Finish up a run.

Definition at line 666 of file DQMPFCandidateAnalyzer.cc.

666 {}
static bool DQMPFCandidateAnalyzer::jetSortingRule ( reco::Jet  x,
reco::Jet  y 
)
inlinestaticprivate

Definition at line 85 of file DQMPFCandidateAnalyzer.h.

References reco::LeafCandidate::pt().

85 { return x.pt() > y.pt(); }
double pt() const final
transverse momentum

Member Data Documentation

bool DQMPFCandidateAnalyzer::bypassAllDCSChecks_
private

Definition at line 181 of file DQMPFCandidateAnalyzer.h.

bool DQMPFCandidateAnalyzer::bypassAllPVChecks_
private

Definition at line 180 of file DQMPFCandidateAnalyzer.h.

std::string DQMPFCandidateAnalyzer::candidateType_
private

Definition at line 112 of file DQMPFCandidateAnalyzer.h.

edm::ParameterSet DQMPFCandidateAnalyzer::cleaningParameters_
private

Definition at line 119 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 166 of file DQMPFCandidateAnalyzer.h.

std::vector<int> DQMPFCandidateAnalyzer::countsPFCandRECO_
private

Definition at line 172 of file DQMPFCandidateAnalyzer.h.

JetMETDQMDCSFilter* DQMPFCandidateAnalyzer::DCSFilter_
private

Definition at line 117 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 120 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 165 of file DQMPFCandidateAnalyzer.h.

std::vector<double> DQMPFCandidateAnalyzer::etaMaxPFCandRECO_
private

Definition at line 171 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 165 of file DQMPFCandidateAnalyzer.h.

std::vector<double> DQMPFCandidateAnalyzer::etaMinPFCandRECO_
private

Definition at line 171 of file DQMPFCandidateAnalyzer.h.

HLTConfigProvider DQMPFCandidateAnalyzer::FilterhltConfig_
private

Definition at line 98 of file DQMPFCandidateAnalyzer.h.

bool DQMPFCandidateAnalyzer::hbhenoifilterdecision
private

Definition at line 104 of file DQMPFCandidateAnalyzer.h.

edm::InputTag DQMPFCandidateAnalyzer::hbheNoiseFilterResultTag_
private

Definition at line 94 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 95 of file DQMPFCandidateAnalyzer.h.

std::string DQMPFCandidateAnalyzer::HBHENoiseStringMiniAOD
private

Definition at line 96 of file DQMPFCandidateAnalyzer.h.

double DQMPFCandidateAnalyzer::hcalMin_
private

Definition at line 124 of file DQMPFCandidateAnalyzer.h.

bool DQMPFCandidateAnalyzer::isMiniAO_
private

Definition at line 114 of file DQMPFCandidateAnalyzer.h.

bool DQMPFCandidateAnalyzer::isMiniAOD_
private

Definition at line 185 of file DQMPFCandidateAnalyzer.h.

int DQMPFCandidateAnalyzer::LSBegin_
private

Definition at line 177 of file DQMPFCandidateAnalyzer.h.

int DQMPFCandidateAnalyzer::LSEnd_
private

Definition at line 178 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackP_Barrel_hPt_10_20
private

Definition at line 139 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackP_Barrel_hPt_1_10
private

Definition at line 138 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackP_Barrel_hPt_20_50
private

Definition at line 140 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackP_Barrel_hPt_50
private

Definition at line 141 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackP_EndCap_hPt_10_20
private

Definition at line 144 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackP_EndCap_hPt_1_10
private

Definition at line 143 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackP_EndCap_hPt_20_50
private

Definition at line 145 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackP_EndCap_hPt_50
private

Definition at line 146 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackP_trackPtVsEta
private

Definition at line 126 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackPVsEta_hPt_10_20
private

Definition at line 134 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackPVsEta_hPt_1_10
private

Definition at line 133 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackPVsEta_hPt_20_50
private

Definition at line 135 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackPVsEta_hPt_50
private

Definition at line 136 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackPVsTrackP_Barrel
private

Definition at line 127 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackPVsTrackP_EndCap
private

Definition at line 128 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackPVsTrackPt_Barrel
private

Definition at line 130 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::m_HOverTrackPVsTrackPt_EndCap
private

Definition at line 131 of file DQMPFCandidateAnalyzer.h.

std::map<std::string, MonitorElement*> DQMPFCandidateAnalyzer::map_of_MEs
private

Definition at line 183 of file DQMPFCandidateAnalyzer.h.

edm::InputTag DQMPFCandidateAnalyzer::METFilterMiniAODLabel2_
private

Definition at line 101 of file DQMPFCandidateAnalyzer.h.

edm::InputTag DQMPFCandidateAnalyzer::METFilterMiniAODLabel_
private

Definition at line 99 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 102 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 100 of file DQMPFCandidateAnalyzer.h.

int DQMPFCandidateAnalyzer::miniaodfilterdec
private

Definition at line 107 of file DQMPFCandidateAnalyzer.h.

int DQMPFCandidateAnalyzer::miniaodfilterindex
private

Definition at line 105 of file DQMPFCandidateAnalyzer.h.

edm::InputTag DQMPFCandidateAnalyzer::mInputCollection_
private

Definition at line 92 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::mProfileIsoPFChHad_EcalOccupancyCentral
private

Definition at line 156 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::mProfileIsoPFChHad_EcalOccupancyEndcap
private

Definition at line 157 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::mProfileIsoPFChHad_EMPtCentral
private

Definition at line 150 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::mProfileIsoPFChHad_EMPtEndcap
private

Definition at line 151 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::mProfileIsoPFChHad_HadPtCentral
private

Definition at line 148 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::mProfileIsoPFChHad_HadPtEndcap
private

Definition at line 149 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::mProfileIsoPFChHad_HcalOccupancyCentral
private

Definition at line 154 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::mProfileIsoPFChHad_HcalOccupancyEndcap
private

Definition at line 155 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::mProfileIsoPFChHad_TrackOccupancy
private

Definition at line 158 of file DQMPFCandidateAnalyzer.h.

MonitorElement* DQMPFCandidateAnalyzer::mProfileIsoPFChHad_TrackPt
private

Definition at line 152 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 161 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 162 of file DQMPFCandidateAnalyzer.h.

std::vector<std::string> DQMPFCandidateAnalyzer::multiplicityPFCand_nameRECO_
private

Definition at line 170 of file DQMPFCandidateAnalyzer.h.

std::vector<MonitorElement*> DQMPFCandidateAnalyzer::multiplicityPFCandRECO_
private

Definition at line 169 of file DQMPFCandidateAnalyzer.h.

int DQMPFCandidateAnalyzer::numPV_
private

Definition at line 174 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 161 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 162 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 164 of file DQMPFCandidateAnalyzer.h.

std::vector<std::string> DQMPFCandidateAnalyzer::occupancyPFCand_nameRECO_
private

Definition at line 170 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 163 of file DQMPFCandidateAnalyzer.h.

std::vector<MonitorElement*> DQMPFCandidateAnalyzer::occupancyPFCandRECO_
private

Definition at line 169 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 110 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 109 of file DQMPFCandidateAnalyzer.h.

double DQMPFCandidateAnalyzer::ptMinCand_
private

Definition at line 122 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 161 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 162 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 164 of file DQMPFCandidateAnalyzer.h.

std::vector<std::string> DQMPFCandidateAnalyzer::ptPFCand_nameRECO_
private

Definition at line 170 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 163 of file DQMPFCandidateAnalyzer.h.

std::vector<MonitorElement*> DQMPFCandidateAnalyzer::ptPFCandRECO_
private

Definition at line 169 of file DQMPFCandidateAnalyzer.h.

edm::InputTag DQMPFCandidateAnalyzer::theTriggerResultsLabel_
private

Definition at line 93 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 166 of file DQMPFCandidateAnalyzer.h.

std::vector<int> DQMPFCandidateAnalyzer::typePFCandRECO_
private

Definition at line 172 of file DQMPFCandidateAnalyzer.h.

int DQMPFCandidateAnalyzer::verbose_
private

Definition at line 175 of file DQMPFCandidateAnalyzer.h.

edm::InputTag DQMPFCandidateAnalyzer::vertexTag_
private

Definition at line 89 of file DQMPFCandidateAnalyzer.h.

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

Definition at line 90 of file DQMPFCandidateAnalyzer.h.