CMS 3D CMS Logo

MuonAlignmentAnalyzer.h
Go to the documentation of this file.
1 #ifndef Alignment_OfflineValidation_MuonAlignmentAnalyzer_H
2 #define Alignment_OfflineValidation_MuonAlignmentAnalyzer_H
3 
15 // Base Class Headers
27 #include <vector>
28 
29 namespace edm {
30  class ParameterSet;
31  class EventSetup;
32 }
33 
34 class TH1F;
35 class TH2F;
36 
37 typedef std::vector< std::vector<int> > intDVector;
38 typedef std::vector<TrackingRecHit *> RecHitVector;
39 
41 public:
44 
46  ~MuonAlignmentAnalyzer() override;
47 
48  // Operations
49 
50  void analyze(const edm::Event & event, const edm::EventSetup& eventSetup) override;
51 
52  void beginJob() override ;
53  void endJob() override ;
54 protected:
55 
56 private:
57 
59 
61 
62 // InputTags
65 
66 // Collections needed
69 
70 // To switch between real data and MC
72 
73  bool doSAplots,doGBplots,doResplots;
74 
75  // Histograms
76 
77  //# muons per event
78  TH1F *hGBNmuons;
79  TH1F *hSANmuons;
80  TH1F *hSimNmuons;
87 
88  // # hits per track
89  TH1F *hGBNhits;
92  TH1F *hSANhits;
95 
96  // Chi2 of Track
97  TH1F *hGBChi2;
98  TH1F *hSAChi2;
103 
104  // Invariant mass for dimuons
105  TH1F *hGBInvM;
106  TH1F *hSAInvM;
107  TH1F *hSimInvM;
108  // Invariant Mass distributions in Barrel (eta<1.04) region
112  // Invariant Mass distributions in Endcap (eta>=1.04) region
116  // Invariant Mass distributions in Barrel-Endcap overlap region
117  // 1 muon barrel & 1 muon endcap
121 
122  // pT
123  TH1F *hSAPTRec;
124  TH1F *hGBPTRec;
125  TH1F *hSimPT;
132  TH2F *hGBPTvsEta;
133  TH2F *hGBPTvsPhi;
134  TH2F *hSAPTvsEta;
135  TH2F *hSAPTvsPhi;
136  TH2F *hSimPTvsEta;
137  TH2F *hSimPTvsPhi;
138 
139  // For reco efficiency calculations
141  TH2F *hSAPhivsEta;
142  TH2F *hGBPhivsEta;
143 
144  // pT resolution
145  TH1F *hSAPTres;
146  TH1F *hSAinvPTres;
147  TH1F *hGBPTres;
148  TH1F *hGBinvPTres;
153  //pT rec - pT gen
154  TH1F *hSAPTDiff;
155  TH1F *hGBPTDiff;
166 
167  // Vector of chambers Residuals
168  std::vector<TH1F *> unitsLocalX;
169  std::vector<TH1F *> unitsLocalPhi;
170  std::vector<TH1F *> unitsLocalTheta;
171  std::vector<TH1F *> unitsLocalY;
172  std::vector<TH1F *> unitsGlobalRPhi;
173  std::vector<TH1F *> unitsGlobalPhi;
174  std::vector<TH1F *> unitsGlobalTheta;
175  std::vector<TH1F *> unitsGlobalRZ;
176 
177  // DT & CSC Residuals
186  std::vector<TH1F*> hResidualLocalXDT_W;
187  std::vector<TH1F*> hResidualLocalPhiDT_W;
188  std::vector<TH1F*> hResidualLocalThetaDT_W;
189  std::vector<TH1F*> hResidualLocalYDT_W;
190  std::vector<TH1F*> hResidualLocalXCSC_ME;
191  std::vector<TH1F*> hResidualLocalPhiCSC_ME;
192  std::vector<TH1F*> hResidualLocalThetaCSC_ME;
193  std::vector<TH1F*> hResidualLocalYCSC_ME;
194  std::vector<TH1F*> hResidualLocalXDT_MB;
195  std::vector<TH1F*> hResidualLocalPhiDT_MB;
196  std::vector<TH1F*> hResidualLocalThetaDT_MB;
197  std::vector<TH1F*> hResidualLocalYDT_MB;
206  std::vector<TH1F*> hResidualGlobalRPhiDT_W;
207  std::vector<TH1F*> hResidualGlobalPhiDT_W;
208  std::vector<TH1F*> hResidualGlobalThetaDT_W;
209  std::vector<TH1F*> hResidualGlobalZDT_W;
210  std::vector<TH1F*> hResidualGlobalRPhiCSC_ME;
211  std::vector<TH1F*> hResidualGlobalPhiCSC_ME;
212  std::vector<TH1F*> hResidualGlobalThetaCSC_ME;
213  std::vector<TH1F*> hResidualGlobalRCSC_ME;
214  std::vector<TH1F*> hResidualGlobalRPhiDT_MB;
215  std::vector<TH1F*> hResidualGlobalPhiDT_MB;
216  std::vector<TH1F*> hResidualGlobalThetaDT_MB;
217  std::vector<TH1F*> hResidualGlobalZDT_MB;
218 
219  // Mean and RMS of residuals for DQM
236 
253 
254  std::vector<long> detectorCollection;
255 
256 // ESHandle<MagneticField> theMGField;
257 
259 
260  // Counters
265 
266  // hist kinematic range
267  double ptRangeMin,ptRangeMax,invMassRangeMin,invMassRangeMax;
268  // hist residual range
269  double resLocalXRangeStation1,resLocalXRangeStation2,resLocalXRangeStation3,resLocalXRangeStation4;
270  double resLocalYRangeStation1,resLocalYRangeStation2,resLocalYRangeStation3,resLocalYRangeStation4;
271  double resPhiRange,resThetaRange;
272  unsigned int nbins,min1DTrackRecHitSize,min4DTrackSegmentSize;
273 };
274 #endif
275 
std::vector< TH1F * > hResidualLocalXCSC_ME
std::vector< TH1F * > hResidualLocalThetaDT_W
std::vector< TH1F * > hResidualGlobalZDT_MB
std::vector< TH1F * > hResidualLocalYCSC_ME
std::vector< TH1F * > unitsGlobalPhi
std::vector< TH1F * > hResidualGlobalThetaCSC_ME
virtual example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
std::vector< TH1F * > hResidualGlobalPhiCSC_ME
std::vector< TH1F * > hResidualLocalYDT_W
std::vector< TH1F * > hResidualGlobalZDT_W
edm::Service< TFileService > fs
std::vector< TH1F * > unitsGlobalRPhi
std::vector< TH1F * > hResidualLocalXDT_W
std::vector< TH1F * > unitsLocalX
std::vector< TH1F * > hResidualLocalThetaCSC_ME
std::vector< TrackingRecHit * > RecHitVector
std::vector< TH1F * > hResidualLocalPhiDT_W
std::vector< TH1F * > hResidualGlobalRPhiCSC_ME
void beginJob()
Definition: Breakpoints.cc:15
std::vector< TH1F * > unitsLocalTheta
std::vector< TH1F * > hResidualGlobalThetaDT_W
std::vector< std::vector< int > > intDVector
std::vector< TH1F * > unitsGlobalRZ
std::vector< TH1F * > hResidualGlobalRCSC_ME
std::vector< TH1F * > hResidualLocalPhiCSC_ME
std::vector< TH1F * > hResidualGlobalPhiDT_MB
std::vector< TH1F * > unitsLocalPhi
std::vector< TH1F * > hResidualLocalPhiDT_MB
std::vector< TH1F * > hResidualLocalXDT_MB
std::vector< std::vector< int > > intDVector
std::vector< TH1F * > hResidualGlobalRPhiDT_W
std::vector< TH1F * > hResidualGlobalThetaDT_MB
std::vector< TH1F * > hResidualGlobalRPhiDT_MB
std::vector< TH1F * > hResidualLocalYDT_MB
std::vector< TH1F * > unitsLocalY
HLT enums.
std::vector< TH1F * > hResidualGlobalPhiDT_W
std::vector< TrackingRecHit * > RecHitVector
std::vector< long > detectorCollection
std::vector< TH1F * > unitsGlobalTheta
std::vector< TH1F * > hResidualLocalThetaDT_MB
Definition: event.py:1