Skip to content

Commit

Permalink
Merge branch 'CMSSW_7_1_X' of github.com:cms-sw/cmssw into CMSSW_7_1_X
Browse files Browse the repository at this point in the history
  • Loading branch information
venturia committed Apr 9, 2014
2 parents 095717c + 7223007 commit 3564a91
Show file tree
Hide file tree
Showing 29 changed files with 1,963 additions and 120 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ SiStripBadStrip* SiStripQualityHotStripIdentifierRoot::getNewObject(){
}
else
{
edm::LogInfo("SiStripQualityHotStripIdentifierRoot") <<" [SiStripQualityHotStripIdentifierRoot::getNewObject] Total number of events is " << TotNumberOfEvents << ", wich is below the threshold (" << calibrationthreshold << "). Calibration will NOT be launched." <<std::endl;
edm::LogWarning("NotEnoughEvents") <<"Total number of events is " << TotNumberOfEvents << ", which is below the threshold (" << calibrationthreshold << "). Calibration will NOT be launched.";
setDoStore(false); // Don't put anything in the sqlite-file!
}

Expand Down Expand Up @@ -266,6 +266,7 @@ void SiStripQualityHotStripIdentifierRoot::bookHistos(){
ClusterPositionHistoMap[detid]=boost::shared_ptr<TH1F>(new TH1F(*(*iter)->getTH1F()));

}
if(!gotNentries) edm::LogWarning("MissingNumberOfEvents") <<"Missing histogram to get the number of events";

}

18 changes: 16 additions & 2 deletions DQMOffline/EGamma/plugins/PhotonAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ PhotonAnalyzer::PhotonAnalyzer( const edm::ParameterSet& pset )

triggerEvent_token_ = consumes<trigger::TriggerEvent>(pset.getParameter<edm::InputTag>("triggerEvent"));

offline_pvToken_ = consumes<reco::VertexCollection>(pset.getUntrackedParameter<edm::InputTag>("offlinePV", edm::InputTag("offlinePrimaryVertices")));


minPhoEtCut_ = pset.getParameter<double>("minPhoEtCut");
photonMaxEta_ = pset.getParameter<double>("maxPhoEta");
invMassEtCut_ = pset.getParameter<double>("invMassEtCut");
Expand Down Expand Up @@ -240,14 +243,17 @@ void PhotonAnalyzer::beginJob()
h_invMassZeroWithTracks_= bookHisto("invMassZeroWithTracks", "Two photon invariant mass: Neither has tracks;M (GeV)", etBin,etMin,etMax);
h_invMassOneWithTracks_ = bookHisto("invMassOneWithTracks", "Two photon invariant mass: Only one has tracks;M (GeV)", etBin,etMin,etMax);
h_invMassTwoWithTracks_ = bookHisto("invMassTwoWithTracks", "Two photon invariant mass: Both have tracks;M (GeV)", etBin,etMin,etMax);



h_nRecoVtx_ = bookHisto("nOfflineVtx","# of Offline Vertices",80, -0.5, 79.5);

////////////////START OF BOOKING FOR PHOTON-RELATED HISTOGRAMS////////////////

//ENERGY VARIABLES

book3DHistoVector(h_phoE_, "1D","phoE","Energy;E (GeV)",eBin,eMin,eMax);
book3DHistoVector(h_phoSigmaEoverE_, "1D","phoSigmaEoverE","#sigma_{E}/E; #sigma_{E}/E", 100,0.,0.06);
book3DHistoVector(h_phoSigmaEoverE_, "1D","phoSigmaEoverE","#sigma_{E}/E; #sigma_{E}/E", 100,0.,0.08);
book3DHistoVector(p_phoSigmaEoverEvsNVtx_, "Profile","phoSigmaEoverEvsNVtx","#sigma_{E}/E vs NVtx; N_{vtx}; #sigma_{E}/E",80, -0.5, 79.5, 100,0., 0.08);
book3DHistoVector(h_phoEt_, "1D","phoEt","E_{T};E_{T} (GeV)", etBin,etMin,etMax);


Expand Down Expand Up @@ -494,6 +500,11 @@ void PhotonAnalyzer::analyze( const edm::Event& e, const edm::EventSetup& esup )
if (validtightPhotonID) tightPhotonID = *(tightPhotonFlag.product());


edm::Handle<reco::VertexCollection> vtxH;
if ( !isHeavyIon_) {
e.getByToken(offline_pvToken_, vtxH);
h_nRecoVtx_ ->Fill (float(vtxH->size()));
}

// Create array to hold #photons/event information
int nPho[100][3][3];
Expand Down Expand Up @@ -760,6 +771,9 @@ void PhotonAnalyzer::analyze( const edm::Event& e, const edm::EventSetup& esup )

fill3DHistoVector(h_phoE_, aPho->energy(),cut,type,part);
fill3DHistoVector(h_phoSigmaEoverE_, aPho->getCorrectedEnergyError(aPho->getCandidateP4type())/aPho->energy(),cut,type,part);

if ( !isHeavyIon_) fill3DHistoVector(p_phoSigmaEoverEvsNVtx_, float(vtxH->size()), aPho->getCorrectedEnergyError(aPho->getCandidateP4type())/aPho->energy(),cut,type,part);

fill3DHistoVector(h_phoEt_,aPho->et(), cut,type,part);

//geometrical variables
Expand Down
6 changes: 5 additions & 1 deletion DQMOffline/EGamma/plugins/PhotonAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "DataFormats/EgammaCandidates/interface/ConversionFwd.h"
#include "DataFormats/EgammaCandidates/interface/Photon.h"
#include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"

#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "DataFormats/EgammaReco/interface/BasicCluster.h"
#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
#include "DataFormats/CaloRecHit/interface/CaloCluster.h"
Expand Down Expand Up @@ -162,6 +162,8 @@ class PhotonAnalyzer : public edm::EDAnalyzer
edm::EDGetTokenT<edm::SortedCollection<EcalRecHit,edm::StrictWeakOrdering<EcalRecHit> > > endcapRecHit_token_;

edm::EDGetTokenT<trigger::TriggerEvent> triggerEvent_token_;

edm::EDGetTokenT<reco::VertexCollection> offline_pvToken_;

double minPhoEtCut_;
double photonMaxEta_;
Expand Down Expand Up @@ -208,6 +210,7 @@ class PhotonAnalyzer : public edm::EDAnalyzer
MonitorElement* totalNumberOfHistos_photonsFolder;
MonitorElement* totalNumberOfHistos_conversionsFolder;

MonitorElement* h_nRecoVtx_;

MonitorElement* h_phoEta_Loose_;
MonitorElement* h_phoEta_Tight_;
Expand Down Expand Up @@ -367,6 +370,7 @@ class PhotonAnalyzer : public edm::EDAnalyzer

std::vector<std::vector<std::vector<MonitorElement*> > > h_phoE_;
std::vector<std::vector<std::vector<MonitorElement*> > > h_phoSigmaEoverE_;
std::vector<std::vector<std::vector<MonitorElement*> > > p_phoSigmaEoverEvsNVtx_;
std::vector<std::vector<std::vector<MonitorElement*> > > h_phoEt_;
std::vector<std::vector<std::vector<MonitorElement*> > > h_r9_;
std::vector<std::vector<std::vector<MonitorElement*> > > h_phoPhi_;
Expand Down
16 changes: 14 additions & 2 deletions DQMOffline/EGamma/plugins/ZToMuMuGammaAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ ZToMuMuGammaAnalyzer::ZToMuMuGammaAnalyzer( const edm::ParameterSet& pset )

// triggerEvent_ = pset.getParameter<edm::InputTag>("triggerEvent");
triggerEvent_token_ = consumes<trigger::TriggerEvent>(pset.getParameter<edm::InputTag>("triggerEvent"));

offline_pvToken_ = consumes<reco::VertexCollection>(pset.getUntrackedParameter<edm::InputTag>("offlinePV", edm::InputTag("offlinePrimaryVertices")));

useTriggerFiltering_ = pset.getParameter<bool>("useTriggerFiltering");
splitHistosEBEE_ = pset.getParameter<bool>("splitHistosEBEE");
Expand Down Expand Up @@ -179,7 +181,7 @@ void ZToMuMuGammaAnalyzer::beginJob()
////////////////START OF BOOKING FOR PHOTON-RELATED HISTOGRAMS////////////////

//// 1D Histograms ////

h_nRecoVtx_ = dbe_->book1D("nOfflineVtx","# of Offline Vertices",80, -0.5, 79.5);

//ENERGY
h_phoE_[0] = dbe_->book1D("phoE","Energy;E (GeV)",eBin,eMin,eMax);
Expand Down Expand Up @@ -447,7 +449,11 @@ void ZToMuMuGammaAnalyzer::beginJob()
p_hOverEVsEt_[1] = dbe_->bookProfile("p_hOverEVsEtBarrel","Avg H/E vs Et;E_{T} (GeV);H/E",etBin,etMin,etMax,hOverEBin,hOverEMin,hOverEMax);
p_hOverEVsEt_[2] = dbe_->bookProfile("p_hOverEVsEtEndcap","Avg H/E vs Et;E_{T} (GeV);H/E",etBin,etMin,etMax,hOverEBin,hOverEMin,hOverEMax);
p_hOverEVsEta_[0] = dbe_->bookProfile("p_hOverEVsEta","Avg H/E vs #eta;#eta;H/E",etaBin,etaMin,etaMax,hOverEBin,hOverEMin,hOverEMax);

// sigmaE/E
histname = "sigmaEoverEVsNVtx";
p_phoSigmaEoverEVsNVtx_[1] = dbe_->bookProfile(histname+"Barrel","Photons #sigma_{E}/E vs N_{vtx}: Barrel; N_{vtx}; #sigma_{E}/E ",80, -0.5, 79.5, 100,0., 0.08, "");
p_phoSigmaEoverEVsNVtx_[2] = dbe_->bookProfile(histname+"Endcap","Photons #sigma_{E}/E vs N_{vtx}: Endcap; N_{vtx}; #sigma_{E}/E",80, -0.5, 79.5, 100,0., 0.08, "");



}
Expand Down Expand Up @@ -611,6 +617,11 @@ void ZToMuMuGammaAnalyzer::analyze( const edm::Event& e, const edm::EventSetup&
else ++i ;
}

edm::Handle<reco::VertexCollection> vtxH;
e.getByToken(offline_pvToken_, vtxH);
h_nRecoVtx_ ->Fill (float(vtxH->size()));


//photon counters
int nPho = 0;
int nPhoBarrel = 0;
Expand Down Expand Up @@ -686,6 +697,7 @@ void ZToMuMuGammaAnalyzer::analyze( const edm::Event& e, const edm::EventSetup&
h_phoEt_[0] ->Fill (aPho->et());
h_phoE_[iDet] ->Fill (aPho->energy());
h_phoSigmaEoverE_[iDet] ->Fill( aPho->getCorrectedEnergyError(aPho->getCandidateP4type())/aPho->energy() );
p_phoSigmaEoverEVsNVtx_[iDet] ->Fill( float(vtxH->size()), aPho->getCorrectedEnergyError(aPho->getCandidateP4type())/aPho->energy() );
h_phoEt_[iDet] ->Fill (aPho->et());
//GEOMETRICAL
h_phoEta_[0] ->Fill (aPho->eta());
Expand Down
5 changes: 4 additions & 1 deletion DQMOffline/EGamma/plugins/ZToMuMuGammaAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "DataFormats/EgammaCandidates/interface/PhotonFwd.h"
#include "DataFormats/MuonReco/interface/MuonFwd.h"
#include "DataFormats/MuonReco/interface/MuonSelectors.h"

#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "DataFormats/EgammaReco/interface/BasicCluster.h"
#include "DataFormats/EgammaReco/interface/BasicClusterFwd.h"
#include "DataFormats/CaloRecHit/interface/CaloCluster.h"
Expand Down Expand Up @@ -130,6 +130,7 @@ class ZToMuMuGammaAnalyzer : public edm::EDAnalyzer
edm::EDGetTokenT<trigger::TriggerEvent> triggerEvent_token_;
edm::EDGetTokenT<reco::BeamSpot> beamSpot_token_;
edm::EDGetTokenT<reco::PFCandidateCollection> pfCandidates_;
edm::EDGetTokenT<reco::VertexCollection> offline_pvToken_;
std::string valueMapPhoPFCandIso_ ;


Expand Down Expand Up @@ -185,12 +186,14 @@ class ZToMuMuGammaAnalyzer : public edm::EDAnalyzer
bool photonSelection ( const reco::PhotonRef & p );


MonitorElement* h_nRecoVtx_;
///photon histos
MonitorElement* h1_mumuInvMass_[3];
MonitorElement* h1_mumuGammaInvMass_[3];

MonitorElement* h_phoE_[3];
MonitorElement* h_phoSigmaEoverE_[3];
MonitorElement* p_phoSigmaEoverEVsNVtx_[3];
MonitorElement* h_phoEt_[3];

MonitorElement* h_nPho_[3];
Expand Down
1 change: 1 addition & 0 deletions DQMOffline/Trigger/interface/TopDiLeptonHLTOfflineDQM.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ namespace HLTOfflineDQMTopDiLepton {
std::map<std::string,MonitorElement*> hists_;

/// hlt objects
std::string processName_;
trigger::Vids electronIds_;
trigger::VRelectron electronRefs_;
trigger::Vids muonIds_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ namespace HLTOfflineDQMTopSingleLepton {
std::map<std::string,MonitorElement*> hists_;

/// hlt objects
std::string processName_;
trigger::Vids electronIds_;
trigger::VRelectron electronRefs_;
trigger::Vids muonIds_;
Expand Down
Loading

0 comments on commit 3564a91

Please sign in to comment.