CMS 3D CMS Logo

CSCSkim.h
Go to the documentation of this file.
1 #ifndef DPGAnalysisSkims_CSCSkim_H
2 #define DPGAnalysisSkims_CSCSkim_H
3 
11 #include <memory>
12 #include <iostream>
13 #include <vector>
14 #include <map>
15 #include <string>
16 #include <iomanip>
17 #include <fstream>
18 
30 
39 
42 
49 
56 
62 
63 // #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
64 
65 #include "TVector3.h"
66 #include "TH1F.h"
67 #include "TH2F.h"
68 #include "TFile.h"
69 #include "TString.h"
70 #include "TTree.h"
71 
72 class CSCSkim : public edm::EDFilter {
73 public:
74  // Constructor
75  explicit CSCSkim(const edm::ParameterSet &pset);
76 
77  // Destructor
78  ~CSCSkim() override;
79 
80  // Analysis routines
81  void beginJob() override;
82  bool filter(edm::Event &event, const edm::EventSetup &eventSetup) override;
83  void endJob() override;
84 
85 protected:
86 private:
87  // main skimming routine
89 
90  // extra skimming routine for alignment studies
92 
93  // skimming routine for messy events
96 
97  // select events with DIGIs in a certain chamber
99 
100  // select events which might probe the DT-CSC overlap region
102 
103  // select muons which go through inner part of stations 1,2,3,4
105 
106  // select events with long stand-alone (cosmic) muons
108 
109  // select events suitable for magnetic field studies - they have a track in the tracker
113 
114  // some useful functions
115  int chamberSerial(int kE, int kS, int kR, int kCh);
116 
117  // counters
128 
129  // run and event number
130  int iRun;
131  int iEvent;
132 
133  // The root file for the histograms.
135 
136  // file names
139 
140  // token names
145 
151 
152  // parameters for the selection
165  // parameters for B-field study skim
166  float pMin;
167  float zLengthMin;
169  float zInnerMax;
172  float rExtMax;
173  float redChiSqMax;
175 
176  // histograms for skimming module
177  TH1F *hxnRecHits;
178  TH1F *hxnSegments;
187 
189 };
190 #endif
CSCSkim::mevnRecHits0
TH1F * mevnRecHits0
Definition: CSCSkim.h:181
CSCRecHit2DCollection.h
CSCSkim::beginJob
void beginJob() override
Definition: CSCSkim.cc:119
Handle.h
CSCSkim::zLengthMin
float zLengthMin
Definition: CSCSkim.h:167
CSCSkim::makeHistograms
bool makeHistograms
Definition: CSCSkim.h:159
CSCSkim::xxP
TH1F * xxP
Definition: CSCSkim.h:188
Muon.h
MessageLogger.h
CSCSkim::rh_token
edm::EDGetTokenT< CSCRecHit2DCollection > rh_token
Definition: CSCSkim.h:146
CSCSkim::hxnRecHitsSel
TH1F * hxnRecHitsSel
Definition: CSCSkim.h:180
CSCSkim::doMessyEventSkimming
bool doMessyEventSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:593
ESHandle.h
AlgebraicObjects.h
CSCSkim::doBFieldStudySelection
bool doBFieldStudySelection(edm::Handle< reco::TrackCollection > saTracks, edm::Handle< reco::TrackCollection > Tracks, edm::Handle< reco::MuonCollection > gMuons)
Definition: CSCSkim.cc:1110
edm::EDGetTokenT< CSCWireDigiCollection >
CSCStripDigi.h
CSCWireDigi.h
DigiDM_cff.wires
wires
Definition: DigiDM_cff.py:33
CSCSkim::nEventsSelected
int nEventsSelected
Definition: CSCSkim.h:119
CSCSkim::whichChamber
int whichChamber
Definition: CSCSkim.h:164
CSCSkim::hxnRecHits
TH1F * hxnRecHits
Definition: CSCSkim.h:177
CSCSkim::pMin
float pMin
Definition: CSCSkim.h:166
CSCSkim::histogramFileName
std::string histogramFileName
Definition: CSCSkim.h:138
EDFilter.h
CSCSkim::endJob
void endJob() override
Definition: CSCSkim.cc:167
dtChamberEfficiency_cfi.cscSegments
cscSegments
Definition: dtChamberEfficiency_cfi.py:15
EDAnalyzer.h
CSCSkim::nTrHitsMin
int nTrHitsMin
Definition: CSCSkim.h:170
edm::Handle< CSCRecHit2DCollection >
CSCSkim::demandChambersBothSides
bool demandChambersBothSides
Definition: CSCSkim.h:158
CSCSkim::nEventsMessy
int nEventsMessy
Definition: CSCSkim.h:122
CSCSkim::~CSCSkim
~CSCSkim() override
Definition: CSCSkim.cc:114
CSCDetId.h
CSCSkim::nEventsOverlappingChambers
int nEventsOverlappingChambers
Definition: CSCSkim.h:121
CSCSkim::whichRing
int whichRing
Definition: CSCSkim.h:163
CSCSkim::mevnSegments1
TH1F * mevnSegments1
Definition: CSCSkim.h:186
MakerMacros.h
CSCSkim::minimumSegments
int minimumSegments
Definition: CSCSkim.h:157
CSCSkim::nEventsDTOverlap
int nEventsDTOverlap
Definition: CSCSkim.h:124
Track.h
TrackFwd.h
CSCSkim::nCSCHitsMin
int nCSCHitsMin
Definition: CSCSkim.h:168
CSCSkim::nLayersWithHitsMinimum
int nLayersWithHitsMinimum
Definition: CSCSkim.h:155
CSCSkim::iEvent
int iEvent
Definition: CSCSkim.h:131
CSCSkim::filter
bool filter(edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: CSCSkim.cc:215
CSCSkim::glm_token
edm::EDGetTokenT< reco::MuonCollection > glm_token
Definition: CSCSkim.h:150
MuonFwd.h
CSCSkim::minimumHitChambers
int minimumHitChambers
Definition: CSCSkim.h:156
CSCSkim::mevnChambers1
TH1F * mevnChambers1
Definition: CSCSkim.h:185
CSCSkim::iRun
int iRun
Definition: CSCSkim.h:130
CSCSkim::sdr_token
edm::EDGetTokenT< CSCStripDigiCollection > sdr_token
Definition: CSCSkim.h:144
CSCSkim::whichStation
int whichStation
Definition: CSCSkim.h:162
CSCSkim::xxredChiSq
TH1F * xxredChiSq
Definition: CSCSkim.h:188
CSCLayerGeometry.h
CSCSkim::doDTOverlap
bool doDTOverlap(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:767
CSCSkim::nEventsLongSATrack
int nEventsLongSATrack
Definition: CSCSkim.h:126
CSCSkim::mevnSegments0
TH1F * mevnSegments0
Definition: CSCSkim.h:183
CSCSkim::mevnChambers0
TH1F * mevnChambers0
Definition: CSCSkim.h:182
CSCSkim::isSimulation
bool isSimulation
Definition: CSCSkim.h:153
CSCSkim::doHaloLike
bool doHaloLike(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:886
GlobalTrackingGeometryRecord.h
CSCSkim::seg_token
edm::EDGetTokenT< CSCSegmentCollection > seg_token
Definition: CSCSkim.h:147
CSCSkim::hxnHitChambers
TH1F * hxnHitChambers
Definition: CSCSkim.h:179
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DTGeometry.h
CSCSkim::trk_token
edm::EDGetTokenT< reco::TrackCollection > trk_token
Definition: CSCSkim.h:149
CSCSkim::wds_token
edm::EDGetTokenT< CSCWireDigiCollection > wds_token
Definition: CSCSkim.h:141
CSCSkim::nEventsAnalyzed
int nEventsAnalyzed
Definition: CSCSkim.h:118
CSCSkim::zInnerMax
float zInnerMax
Definition: CSCSkim.h:169
CSCSkim::outputFileName
std::string outputFileName
Definition: CSCSkim.h:137
edm::ParameterSet
Definition: ParameterSet.h:36
CSCSkim::rExtMax
float rExtMax
Definition: CSCSkim.h:172
CSCSkim::whichEndcap
int whichEndcap
Definition: CSCSkim.h:161
CSCSkim::nEventsForBFieldStudies
int nEventsForBFieldStudies
Definition: CSCSkim.h:127
Event.h
CSCSkim::CSCSkim
CSCSkim(const edm::ParameterSet &pset)
Definition: CSCSkim.cc:51
CSCSkim::zLengthTrMin
float zLengthTrMin
Definition: CSCSkim.h:171
CSCSkim::doOverlapSkimming
bool doOverlapSkimming(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:511
gather_cfg.Tracks
Tracks
Definition: gather_cfg.py:251
CSCSkim::theHistogramFile
TFile * theHistogramFile
Definition: CSCSkim.h:134
edm::EDFilter
Definition: EDFilter.h:39
CSCSkim::xxnValidHits
TH1F * xxnValidHits
Definition: CSCSkim.h:188
CSCStripDigiCollection.h
CSCSkim::nValidHitsMin
int nValidHitsMin
Definition: CSCSkim.h:174
edm::EventSetup
Definition: EventSetup.h:57
DTRecSegment4D.h
CSCSkim::doCSCSkimming
bool doCSCSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:376
CSCSkim::sam_token
edm::EDGetTokenT< reco::TrackCollection > sam_token
Definition: CSCSkim.h:148
CSCLayer.h
Frameworkfwd.h
LocalPoint.h
CSCSkim::hxnSegments
TH1F * hxnSegments
Definition: CSCSkim.h:178
CSCSkim::wdr_token
edm::EDGetTokenT< CSCWireDigiCollection > wdr_token
Definition: CSCSkim.h:143
CSCSkim::nEventsChambersBothSides
int nEventsChambersBothSides
Definition: CSCSkim.h:120
options_cfi.eventSetup
eventSetup
Definition: options_cfi.py:12
GlobalVector.h
CSCSkim::xxnTrackerHits
TH1F * xxnTrackerHits
Definition: CSCSkim.h:188
EventSetup.h
CSCSkim::mevnRecHits1
TH1F * mevnRecHits1
Definition: CSCSkim.h:184
CSCSkim::sds_token
edm::EDGetTokenT< CSCStripDigiCollection > sds_token
Definition: CSCSkim.h:142
CSCSkim::typeOfSkim
int typeOfSkim
Definition: CSCSkim.h:154
CSCWireDigiCollection.h
CSCRecHit2D.h
ConsumesCollector.h
CSCSkim::redChiSqMax
float redChiSqMax
Definition: CSCSkim.h:173
CSCSkim
Definition: CSCSkim.h:72
ParameterSet.h
CSCSkim::doCertainChamberSelection
bool doCertainChamberSelection(edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips)
Definition: CSCSkim.cc:729
MuonGeometryRecord.h
CSCChamber.h
event
Definition: event.py:1
CSCSkim::doLongSATrack
bool doLongSATrack(edm::Handle< reco::TrackCollection > saTracks)
Definition: CSCSkim.cc:1044
GlobalTrackingGeometry.h
edm::Event
Definition: Event.h:73
LocalVector.h
CSCSkim::xxnCSCHits
TH1F * xxnCSCHits
Definition: CSCSkim.h:188
CSCSkim::makeHistogramsForMessyEvents
bool makeHistogramsForMessyEvents
Definition: CSCSkim.h:160
GlobalPoint.h
DigiDM_cff.strips
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers....
Definition: DigiDM_cff.py:32
CSCSkim::nEventsCertainChamber
int nEventsCertainChamber
Definition: CSCSkim.h:123
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
CSCSkim::chamberSerial
int chamberSerial(int kE, int kS, int kR, int kCh)
Definition: CSCSkim.cc:1294
CSCGeometry.h
CSCSkim::nEventsHaloLike
int nEventsHaloLike
Definition: CSCSkim.h:125
DTRecSegment4DCollection.h
CSCSegmentCollection.h