Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMSSW 7 0 X switch to consumes API #808

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 23 additions & 13 deletions Validation/MuonRPCDigis/interface/RPCDigiValid.h
Expand Up @@ -25,6 +25,10 @@
#include "CommonTools/UtilAlgos/interface/TFileService.h"
#include "TH1F.h"

#include "FWCore/Utilities/interface/EDGetToken.h"
#include "DataFormats/RPCDigi/interface/RPCDigiCollection.h"
#include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"

class RPCDigiValid: public edm::EDAnalyzer
{

Expand All @@ -37,6 +41,8 @@ class RPCDigiValid: public edm::EDAnalyzer
void analyze(const edm::Event& e, const edm::EventSetup& c);
void beginJob();
void endJob(void);
void beginRun(edm::Run const&, edm::EventSetup const&);
void endRun(edm::Run const&, edm::EventSetup const&);

private:

Expand All @@ -51,13 +57,6 @@ class RPCDigiValid: public edm::EDAnalyzer
MonitorElement* BxDist;
MonitorElement* StripProf;

MonitorElement* BxDist_whMin2;
MonitorElement* BxDist_whMin1;
MonitorElement* BxDist_wh0;
MonitorElement* BxDist_wh0_st1;
MonitorElement* BxDist_whPlu1;
MonitorElement* BxDist_whPlu2;

//barrel layers residuals
MonitorElement* ResLayer1_barrel;
MonitorElement* ResLayer2_barrel;
Expand Down Expand Up @@ -89,14 +88,10 @@ class RPCDigiValid: public edm::EDAnalyzer

//new member for cls
MonitorElement* noiseCLS;
MonitorElement* noiseCLSBarrel;
MonitorElement* noiseCLSEndcaps;

MonitorElement* clsBarrel;
MonitorElement* clsLayer1;
MonitorElement* clsLayer2;
MonitorElement* clsLayer3;
MonitorElement* clsLayer4;
MonitorElement* clsLayer5;
MonitorElement* clsLayer6;

//CLS Validation
//ring2, disc +- 1
Expand All @@ -115,6 +110,16 @@ class RPCDigiValid: public edm::EDAnalyzer
MonitorElement* CLS_Endcap_123_Ring3_C;
//CLS Validation

//4 endcap

MonitorElement *ResDmin4;
MonitorElement *ResDplu4;
MonitorElement *BxDisc_4Plus;
MonitorElement *BxDisc_4Min;
MonitorElement *xyvDplu4;
MonitorElement *xyvDmin4;
MonitorElement *CLS_Endcap_4;

//new members for the noise
std::map<RPCDetId, double> mapRollCls;
std::map<RPCDetId, double> mapRollArea;
Expand All @@ -129,6 +134,11 @@ class RPCDigiValid: public edm::EDAnalyzer
DQMStore* dbe_;
std::string outputFile_;
std::string digiLabel;

//Tokens for accessing run data. Used for passing to edm::Event. - stanislav
edm::EDGetTokenT<edm::PSimHitContainer> simHitToken;
edm::EDGetTokenT<RPCDigiCollection> rpcDigiToken;
};

#endif

8 changes: 6 additions & 2 deletions Validation/MuonRPCDigis/python/validationMuonRPCDigis_cfi.py
@@ -1,8 +1,12 @@
import FWCore.ParameterSet.Config as cms

validationMuonRPCDigis = cms.EDAnalyzer("RPCDigiValid",
# Label to retrieve Digis from the event
digiLabel = cms.untracked.string('simMuonRPCDigis'),

# Tag for Digis event data retrieval
rpcDigiTag = cms.untracked.InputTag("simMuonRPCDigis"),
# Tag for simulated hits event data retrieval
simHitTag = cms.untracked.InputTag("g4SimHits", "MuonRPCHits"),

# Name of the root file which will contain the histos
outputFile = cms.untracked.string('')
)
Expand Down