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 // system include files
12 #include <memory>
13 #include <iostream>
14 #include <vector>
15 #include <map>
16 #include <string>
17 #include <iomanip>
18 #include <fstream>
19 
20 // user include files
31 
40 
43 
50 
57 
63 
64 // #include "SimDataFormats/TrackingHit/interface/PSimHitContainer.h"
65 
66 #include "TVector3.h"
67 #include "TH1F.h"
68 #include "TH2F.h"
69 #include "TFile.h"
70 #include "TString.h"
71 #include "TTree.h"
72 
73 
74 class CSCSkim : public edm::EDFilter {
75  public:
76  // Constructor
77  explicit CSCSkim(const edm::ParameterSet& pset);
78 
79  // Destructor
80  ~CSCSkim();
81 
82  // Analysis routines
83  virtual void beginJob() ;
84  virtual bool filter(edm::Event& event, const edm::EventSetup& eventSetup);
85  virtual void endJob() ;
86 
87 protected:
88 
89 private:
90 
91  // main skimming routine
94 
95  // extra skimming routine for alignment studies
97 
98  // skimming routine for messy events
101 
102  // select events with DIGIs in a certain chamber
105 
106  // select events which might probe the DT-CSC overlap region
108 
109  // select muons which go through inner part of stations 1,2,3,4
111 
112  // select events with long stand-alone (cosmic) muons
114 
115  // select events suitable for magnetic field studies - they have a track in the tracker
117 
118  // some useful functions
119  int chamberSerial(int kE, int kS, int kR, int kCh);
120 
121  // counters
132 
133  // run and event number
134  int iRun;
135  int iEvent;
136 
137  // The root file for the histograms.
139 
140  // file names
141  std::string outputFileName;
142  std::string histogramFileName;
143 
144  // tag names
150 
151  // parameters for the selection
164  // parameters for B-field study skim
165  float pMin;
166  float zLengthMin;
168  float zInnerMax;
171  float rExtMax;
172  float redChiSqMax;
174 
175 
176  // histograms for skimming module
177  TH1F *hxnRecHits;
178  TH1F *hxnSegments;
187 
189 
190 };
191 #endif
TH1F * hxnRecHitsSel
Definition: CSCSkim.h:180
float zInnerMax
Definition: CSCSkim.h:168
float rExtMax
Definition: CSCSkim.h:171
edm::InputTag trackTag
Definition: CSCSkim.h:149
bool makeHistogramsForMessyEvents
Definition: CSCSkim.h:159
int nEventsForBFieldStudies
Definition: CSCSkim.h:131
int whichEndcap
Definition: CSCSkim.h:160
int nCSCHitsMin
Definition: CSCSkim.h:167
int nLayersWithHitsMinimum
Definition: CSCSkim.h:154
float zLengthMin
Definition: CSCSkim.h:166
edm::InputTag GLBMuonTag
Definition: CSCSkim.h:148
int nEventsChambersBothSides
Definition: CSCSkim.h:124
TH1F * mevnRecHits0
Definition: CSCSkim.h:181
TH1F * mevnRecHits1
Definition: CSCSkim.h:184
TH1F * mevnSegments0
Definition: CSCSkim.h:183
~CSCSkim()
Definition: CSCSkim.cc:107
bool doLongSATrack(edm::Handle< reco::TrackCollection > saTracks)
Definition: CSCSkim.cc:994
TH1F * mevnSegments1
Definition: CSCSkim.h:186
std::string outputFileName
Definition: CSCSkim.h:141
TH1F * hxnRecHits
Definition: CSCSkim.h:177
float pMin
Definition: CSCSkim.h:165
TH1F * xxnCSCHits
Definition: CSCSkim.h:188
int minimumHitChambers
Definition: CSCSkim.h:155
bool doOverlapSkimming(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:482
int nEventsDTOverlap
Definition: CSCSkim.h:128
bool doDTOverlap(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:741
TH1F * xxnTrackerHits
Definition: CSCSkim.h:188
edm::InputTag cscRecHitTag
Definition: CSCSkim.h:145
int nEventsOverlappingChambers
Definition: CSCSkim.h:125
int typeOfSkim
Definition: CSCSkim.h:153
virtual bool filter(edm::Event &event, const edm::EventSetup &eventSetup)
Definition: CSCSkim.cc:219
int nEventsSelected
Definition: CSCSkim.h:123
float zLengthTrMin
Definition: CSCSkim.h:170
int whichChamber
Definition: CSCSkim.h:163
TH1F * hxnSegments
Definition: CSCSkim.h:178
int minimumSegments
Definition: CSCSkim.h:156
std::string histogramFileName
Definition: CSCSkim.h:142
int nValidHitsMin
Definition: CSCSkim.h:173
bool makeHistograms
Definition: CSCSkim.h:158
int nEventsLongSATrack
Definition: CSCSkim.h:130
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:169
bool doCSCSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:354
bool doCertainChamberSelection(edm::Handle< CSCWireDigiCollection > wires, edm::Handle< CSCStripDigiCollection > strips)
Definition: CSCSkim.cc:695
bool doBFieldStudySelection(edm::Handle< reco::TrackCollection > saTracks, edm::Handle< reco::TrackCollection > Tracks, edm::Handle< reco::MuonCollection > gMuons)
Definition: CSCSkim.cc:1070
int nEventsAnalyzed
Definition: CSCSkim.h:122
bool isSimulation
Definition: CSCSkim.h:152
int nEventsCertainChamber
Definition: CSCSkim.h:127
TH1F * mevnChambers1
Definition: CSCSkim.h:185
TFile * theHistogramFile
Definition: CSCSkim.h:138
int whichStation
Definition: CSCSkim.h:161
virtual void beginJob()
Definition: CSCSkim.cc:116
bool doMessyEventSkimming(edm::Handle< CSCRecHit2DCollection > cscRecHits, edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:564
int nEventsMessy
Definition: CSCSkim.h:126
int whichRing
Definition: CSCSkim.h:162
TH1F * hxnHitChambers
Definition: CSCSkim.h:179
edm::InputTag SAMuonTag
Definition: CSCSkim.h:147
virtual void endJob()
Definition: CSCSkim.cc:171
int chamberSerial(int kE, int kS, int kR, int kCh)
Definition: CSCSkim.cc:1276
int iEvent
Definition: CSCSkim.h:135
CSCSkim(const edm::ParameterSet &pset)
Definition: CSCSkim.cc:53
int nEventsHaloLike
Definition: CSCSkim.h:129
edm::InputTag cscSegmentTag
Definition: CSCSkim.h:146
int iRun
Definition: CSCSkim.h:134
TH1F * xxnValidHits
Definition: CSCSkim.h:188
TH1F * mevnChambers0
Definition: CSCSkim.h:182
TH1F * xxredChiSq
Definition: CSCSkim.h:188
bool demandChambersBothSides
Definition: CSCSkim.h:157
TH1F * xxP
Definition: CSCSkim.h:188
bool doHaloLike(edm::Handle< CSCSegmentCollection > cscSegments)
Definition: CSCSkim.cc:849
float redChiSqMax
Definition: CSCSkim.h:172