test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
73 class CSCSkim : public edm::EDFilter {
74  public:
75  // Constructor
76  explicit CSCSkim(const edm::ParameterSet& pset);
77 
78  // Destructor
79  ~CSCSkim();
80 
81  // Analysis routines
82  virtual void beginJob() ;
83  virtual bool filter(edm::Event& event, const edm::EventSetup& eventSetup) override;
84  virtual void endJob() ;
85 
86 protected:
87 
88 private:
89 
90  // main skimming routine
93 
94  // extra skimming routine for alignment studies
96 
97  // skimming routine for messy events
100 
101  // select events with DIGIs in a certain chamber
104 
105  // select events which might probe the DT-CSC overlap region
107 
108  // select muons which go through inner part of stations 1,2,3,4
110 
111  // select events with long stand-alone (cosmic) muons
113 
114  // select events suitable for magnetic field studies - they have a track in the tracker
116 
117  // some useful functions
118  int chamberSerial(int kE, int kS, int kR, int kCh);
119 
120  // counters
131 
132  // run and event number
133  int iRun;
134  int iEvent;
135 
136  // The root file for the histograms.
138 
139  // file names
142 
143  // token names
148 
154 
155  // parameters for the selection
168  // parameters for B-field study skim
169  float pMin;
170  float zLengthMin;
172  float zInnerMax;
175  float rExtMax;
176  float redChiSqMax;
178 
179 
180  // histograms for skimming module
181  TH1F *hxnRecHits;
182  TH1F *hxnSegments;
191 
193 
194 };
195 #endif
edm::EDGetTokenT< CSCSegmentCollection > seg_token
Definition: CSCSkim.h:150
TH1F * hxnRecHitsSel
Definition: CSCSkim.h:184
edm::EDGetTokenT< reco::TrackCollection > sam_token
Definition: CSCSkim.h:151
float zInnerMax
Definition: CSCSkim.h:172
float rExtMax
Definition: CSCSkim.h:175
bool makeHistogramsForMessyEvents
Definition: CSCSkim.h:163
int nEventsForBFieldStudies
Definition: CSCSkim.h:130
int whichEndcap
Definition: CSCSkim.h:164
int nCSCHitsMin
Definition: CSCSkim.h:171
int nLayersWithHitsMinimum
Definition: CSCSkim.h:158
virtual bool filter(edm::Event &event, const edm::EventSetup &eventSetup) override
Definition: CSCSkim.cc:230
float zLengthMin
Definition: CSCSkim.h:170
int nEventsChambersBothSides
Definition: CSCSkim.h:123
TH1F * mevnRecHits0
Definition: CSCSkim.h:185
TH1F * mevnRecHits1
Definition: CSCSkim.h:188
TH1F * mevnSegments0
Definition: CSCSkim.h:187
~CSCSkim()
Definition: CSCSkim.cc:118
edm::EDGetTokenT< CSCWireDigiCollection > wds_token
Definition: CSCSkim.h:144
bool doLongSATrack(edm::Handle< reco::TrackCollection > saTracks)
Definition: CSCSkim.cc:1005
TH1F * mevnSegments1
Definition: CSCSkim.h:190
std::string outputFileName
Definition: CSCSkim.h:140
TH1F * hxnRecHits
Definition: CSCSkim.h:181
float pMin
Definition: CSCSkim.h:169
TH1F * xxnCSCHits
Definition: CSCSkim.h:192
int minimumHitChambers
Definition: CSCSkim.h:159
bool doOverlapSkimming(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:493
int nEventsDTOverlap
Definition: CSCSkim.h:127
bool doDTOverlap(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:752
TH1F * xxnTrackerHits
Definition: CSCSkim.h:192
int nEventsOverlappingChambers
Definition: CSCSkim.h:124
int typeOfSkim
Definition: CSCSkim.h:157
edm::EDGetTokenT< reco::TrackCollection > trk_token
Definition: CSCSkim.h:152
int nEventsSelected
Definition: CSCSkim.h:122
float zLengthTrMin
Definition: CSCSkim.h:174
int whichChamber
Definition: CSCSkim.h:167
TH1F * hxnSegments
Definition: CSCSkim.h:182
int minimumSegments
Definition: CSCSkim.h:160
edm::EDGetTokenT< reco::MuonCollection > glm_token
Definition: CSCSkim.h:153
std::string histogramFileName
Definition: CSCSkim.h:141
edm::EDGetTokenT< CSCStripDigiCollection > sds_token
Definition: CSCSkim.h:145
int nValidHitsMin
Definition: CSCSkim.h:177
edm::EDGetTokenT< CSCRecHit2DCollection > rh_token
Definition: CSCSkim.h:149
bool makeHistograms
Definition: CSCSkim.h:162
int nEventsLongSATrack
Definition: CSCSkim.h:129
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
int nTrHitsMin
Definition: CSCSkim.h:173
bool doCSCSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:365
bool doCertainChamberSelection(edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips)
Definition: CSCSkim.cc:706
bool doBFieldStudySelection(edm::Handle< reco::TrackCollection > saTracks, edm::Handle< reco::TrackCollection > Tracks, edm::Handle< reco::MuonCollection > gMuons)
Definition: CSCSkim.cc:1081
int nEventsAnalyzed
Definition: CSCSkim.h:121
bool isSimulation
Definition: CSCSkim.h:156
int nEventsCertainChamber
Definition: CSCSkim.h:126
TH1F * mevnChambers1
Definition: CSCSkim.h:189
TFile * theHistogramFile
Definition: CSCSkim.h:137
int whichStation
Definition: CSCSkim.h:165
virtual void beginJob()
Definition: CSCSkim.cc:127
bool doMessyEventSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:575
int nEventsMessy
Definition: CSCSkim.h:125
int whichRing
Definition: CSCSkim.h:166
TH1F * hxnHitChambers
Definition: CSCSkim.h:183
virtual void endJob()
Definition: CSCSkim.cc:182
int chamberSerial(int kE, int kS, int kR, int kCh)
Definition: CSCSkim.cc:1272
int iEvent
Definition: CSCSkim.h:134
CSCSkim(const edm::ParameterSet &pset)
Definition: CSCSkim.cc:52
edm::EDGetTokenT< CSCWireDigiCollection > wdr_token
Definition: CSCSkim.h:146
int nEventsHaloLike
Definition: CSCSkim.h:128
edm::EDGetTokenT< CSCStripDigiCollection > sdr_token
Definition: CSCSkim.h:147
int iRun
Definition: CSCSkim.h:133
TH1F * xxnValidHits
Definition: CSCSkim.h:192
TH1F * mevnChambers0
Definition: CSCSkim.h:186
TH1F * xxredChiSq
Definition: CSCSkim.h:192
bool demandChambersBothSides
Definition: CSCSkim.h:161
TH1F * xxP
Definition: CSCSkim.h:192
bool doHaloLike(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:860
float redChiSqMax
Definition: CSCSkim.h:176