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 
29 
38 
41 
48 
55 
61 
62 // #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
63 
64 #include "TVector3.h"
65 #include "TH1F.h"
66 #include "TH2F.h"
67 #include "TFile.h"
68 #include "TString.h"
69 #include "TTree.h"
70 
71 class CSCSkim : public edm::one::EDFilter<> {
72 public:
73  // Constructor
74  explicit CSCSkim(const edm::ParameterSet &pset);
75 
76  // Destructor
77  ~CSCSkim() override;
78 
79  // Analysis routines
80  void beginJob() override;
81  bool filter(edm::Event &event, const edm::EventSetup &eventSetup) override;
82  void endJob() override;
83 
84 protected:
85 private:
86  // main skimming routine
88 
89  // extra skimming routine for alignment studies
91 
92  // skimming routine for messy events
95 
96  // select events with DIGIs in a certain chamber
98 
99  // select events which might probe the DT-CSC overlap region
101 
102  // select muons which go through inner part of stations 1,2,3,4
104 
105  // select events with long stand-alone (cosmic) muons
107 
108  // select events suitable for magnetic field studies - they have a track in the tracker
112 
113  // some useful functions
114  int chamberSerial(int kE, int kS, int kR, int kCh);
115 
116  // counters
127 
128  // run and event number
129  int iRun;
130  int iEvent;
131 
132  // The root file for the histograms.
134 
135  // file names
138 
139  // es token names
141 
142  // token names
147 
153 
154  // parameters for the selection
167  // parameters for B-field study skim
168  float pMin;
169  float zLengthMin;
171  float zInnerMax;
174  float rExtMax;
175  float redChiSqMax;
177 
178  // histograms for skimming module
179  TH1F *hxnRecHits;
180  TH1F *hxnSegments;
189 
191 };
192 #endif
edm::EDGetTokenT< CSCSegmentCollection > seg_token
Definition: CSCSkim.h:149
TH1F * hxnRecHitsSel
Definition: CSCSkim.h:182
edm::EDGetTokenT< reco::TrackCollection > sam_token
Definition: CSCSkim.h:150
float zInnerMax
Definition: CSCSkim.h:171
float rExtMax
Definition: CSCSkim.h:174
bool makeHistogramsForMessyEvents
Definition: CSCSkim.h:162
int nEventsForBFieldStudies
Definition: CSCSkim.h:126
int whichEndcap
Definition: CSCSkim.h:163
int nCSCHitsMin
Definition: CSCSkim.h:170
int nLayersWithHitsMinimum
Definition: CSCSkim.h:157
bool filter(edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: CSCSkim.cc:215
float zLengthMin
Definition: CSCSkim.h:169
int nEventsChambersBothSides
Definition: CSCSkim.h:119
TH1F * mevnRecHits0
Definition: CSCSkim.h:183
TH1F * mevnRecHits1
Definition: CSCSkim.h:186
TH1F * mevnSegments0
Definition: CSCSkim.h:185
~CSCSkim() override
Definition: CSCSkim.cc:114
edm::EDGetTokenT< CSCWireDigiCollection > wds_token
Definition: CSCSkim.h:143
bool doLongSATrack(edm::Handle< reco::TrackCollection > saTracks)
Definition: CSCSkim.cc:1043
TH1F * mevnSegments1
Definition: CSCSkim.h:188
std::string outputFileName
Definition: CSCSkim.h:136
TH1F * hxnRecHits
Definition: CSCSkim.h:179
float pMin
Definition: CSCSkim.h:168
TH1F * xxnCSCHits
Definition: CSCSkim.h:190
int minimumHitChambers
Definition: CSCSkim.h:158
bool doOverlapSkimming(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:510
int nEventsDTOverlap
Definition: CSCSkim.h:123
bool doDTOverlap(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:766
TH1F * xxnTrackerHits
Definition: CSCSkim.h:190
int nEventsOverlappingChambers
Definition: CSCSkim.h:120
int typeOfSkim
Definition: CSCSkim.h:156
edm::EDGetTokenT< reco::TrackCollection > trk_token
Definition: CSCSkim.h:151
int nEventsSelected
Definition: CSCSkim.h:118
float zLengthTrMin
Definition: CSCSkim.h:173
int whichChamber
Definition: CSCSkim.h:166
TH1F * hxnSegments
Definition: CSCSkim.h:180
int minimumSegments
Definition: CSCSkim.h:159
edm::EDGetTokenT< reco::MuonCollection > glm_token
Definition: CSCSkim.h:152
std::string histogramFileName
Definition: CSCSkim.h:137
edm::EDGetTokenT< CSCStripDigiCollection > sds_token
Definition: CSCSkim.h:144
int nValidHitsMin
Definition: CSCSkim.h:176
edm::EDGetTokenT< CSCRecHit2DCollection > rh_token
Definition: CSCSkim.h:148
bool makeHistograms
Definition: CSCSkim.h:161
int nEventsLongSATrack
Definition: CSCSkim.h:125
int nTrHitsMin
Definition: CSCSkim.h:172
bool doCSCSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:375
bool doCertainChamberSelection(edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips)
Definition: CSCSkim.cc:728
bool doBFieldStudySelection(edm::Handle< reco::TrackCollection > saTracks, edm::Handle< reco::TrackCollection > Tracks, edm::Handle< reco::MuonCollection > gMuons)
Definition: CSCSkim.cc:1109
int nEventsAnalyzed
Definition: CSCSkim.h:117
bool isSimulation
Definition: CSCSkim.h:155
int nEventsCertainChamber
Definition: CSCSkim.h:122
void beginJob() override
Definition: CSCSkim.cc:119
TH1F * mevnChambers1
Definition: CSCSkim.h:187
TFile * theHistogramFile
Definition: CSCSkim.h:133
int whichStation
Definition: CSCSkim.h:164
bool doMessyEventSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:592
int nEventsMessy
Definition: CSCSkim.h:121
int whichRing
Definition: CSCSkim.h:165
const edm::ESGetToken< CSCGeometry, MuonGeometryRecord > m_CSCGeomToken
Definition: CSCSkim.h:140
TH1F * hxnHitChambers
Definition: CSCSkim.h:181
strips
#turn off noise in all subdetectors simHcalUnsuppressedDigis.doNoise = False mix.digitizers.hcal.doNoise = False simEcalUnsuppressedDigis.doNoise = False mix.digitizers.ecal.doNoise = False simEcalUnsuppressedDigis.doESNoise = False simSiPixelDigis.AddNoise = False mix.digitizers.pixel.AddNoise = False simSiStripDigis.Noise = False mix.digitizers.strip.AddNoise = False
Definition: DigiDM_cff.py:32
int chamberSerial(int kE, int kS, int kR, int kCh)
Definition: CSCSkim.cc:1293
int iEvent
Definition: CSCSkim.h:130
void endJob() override
Definition: CSCSkim.cc:167
CSCSkim(const edm::ParameterSet &pset)
Definition: CSCSkim.cc:51
edm::EDGetTokenT< CSCWireDigiCollection > wdr_token
Definition: CSCSkim.h:145
int nEventsHaloLike
Definition: CSCSkim.h:124
edm::EDGetTokenT< CSCStripDigiCollection > sdr_token
Definition: CSCSkim.h:146
int iRun
Definition: CSCSkim.h:129
TH1F * xxnValidHits
Definition: CSCSkim.h:190
TH1F * mevnChambers0
Definition: CSCSkim.h:184
TH1F * xxredChiSq
Definition: CSCSkim.h:190
Definition: event.py:1
bool demandChambersBothSides
Definition: CSCSkim.h:160
TH1F * xxP
Definition: CSCSkim.h:190
bool doHaloLike(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:885
float redChiSqMax
Definition: CSCSkim.h:175