CMS 3D CMS Logo

SiStripElectronAnalyzer.h
Go to the documentation of this file.
1 #ifndef RecoEgamma_Examples_SiStripElectronAnalyzer_h
2 #define RecoEgamma_Examples_SiStripElectronAnalyzer_h
3 // -*- C++ -*-
4 //
5 // Package: RecoEgamma/Examples
6 // Class : SiStripElectronAnalyzer
7 //
16 //
17 // Original Author:
18 // Created: Fri May 26 16:52:45 EDT 2006
19 //
20 
21 // system include files
22 #include <memory>
23 #include <map>
24 #include <cmath>
25 
26 // user include files
27 
30 
31 #include "TFile.h"
32 #include "TH1F.h"
33 
34 #include "TNtuple.h"
35 #include "TTree.h"
36 #include "TBranch.h"
37 
38 // forward declarations
39 
40 #define myMaxHits 1000
41 
42 //
43 // class decleration
44 //
45 
47 public:
49  ~SiStripElectronAnalyzer() override;
50 
51  void analyze(const edm::Event&, const edm::EventSetup&) override;
52  void beginJob() override;
53  virtual void initNtuple(void);
54  void endJob(void) override;
55 
56 private:
57  double unwrapPhi(double phi) const {
58  while (phi > M_PI) {
59  phi -= 2. * M_PI;
60  }
61  while (phi < -M_PI) {
62  phi += 2. * M_PI;
63  }
64  return phi;
65  }
66 
67  // ----------member data ---------------------------
69 
70  TFile* file_;
71  TH1F* numCand_;
78 
83 
84  TH1F* ptDiff;
85  TH1F* pDiff;
94  TH1F* eOverPFailed;
95  TH1F* eOverPPassed;
96 
100 
101  TTree* myTree_;
102 
108 
113 
117 
118  // errors in local coords
122 
126 
129 
130  // mono corresponds to "rphi" only hits
135 
139 
140  // errors in local coords
144 
148 
151 
152  // matched hits
157 
161 
162  // errors in local coords
166 
170 
173 
190 };
191 
192 #endif
SiStripElectronAnalyzer::NShowers_
int NShowers_
Definition: SiStripElectronAnalyzer.h:103
SiStripElectronAnalyzer::MonoHitR_
float MonoHitR_[1000]
Definition: SiStripElectronAnalyzer.h:136
SiStripElectronAnalyzer::MonoHitTheta_
float MonoHitTheta_[1000]
Definition: SiStripElectronAnalyzer.h:138
EDAnalyzer.h
SiStripElectronAnalyzer::MonoLayer_
int MonoLayer_[1000]
Definition: SiStripElectronAnalyzer.h:150
SiStripElectronAnalyzer::sizeSuperClustersEl_
TH1F * sizeSuperClustersEl_
Definition: SiStripElectronAnalyzer.h:80
SiStripElectronAnalyzer::NMonoHits_
int NMonoHits_
Definition: SiStripElectronAnalyzer.h:131
SiStripElectronAnalyzer::~SiStripElectronAnalyzer
~SiStripElectronAnalyzer() override
Definition: SiStripElectronAnalyzer.cc:137
SiStripElectronAnalyzer::numSuperClusters_
TH1F * numSuperClusters_
Definition: SiStripElectronAnalyzer.h:73
SiStripElectronAnalyzer::MatchedHitSigY_
float MatchedHitSigY_[1000]
Definition: SiStripElectronAnalyzer.h:164
myMaxHits
#define myMaxHits
Definition: SiStripElectronAnalyzer.h:40
SiStripElectronAnalyzer::MatchedHitTheta_
float MatchedHitTheta_[1000]
Definition: SiStripElectronAnalyzer.h:160
SiStripElectronAnalyzer::MatchedHitPhi_
float MatchedHitPhi_[1000]
Definition: SiStripElectronAnalyzer.h:159
SiStripElectronAnalyzer::numCand_
TH1F * numCand_
Definition: SiStripElectronAnalyzer.h:71
SiStripElectronAnalyzer::StereoHitZ_
float StereoHitZ_[1000]
Definition: SiStripElectronAnalyzer.h:112
SiStripElectronAnalyzer::MonoHitY_
float MonoHitY_[1000]
Definition: SiStripElectronAnalyzer.h:133
SiStripElectronAnalyzer::superClusterCollection_
std::string superClusterCollection_
Definition: SiStripElectronAnalyzer.h:177
SiStripElectronAnalyzer::eOverPFailed
TH1F * eOverPFailed
Definition: SiStripElectronAnalyzer.h:94
SiStripElectronAnalyzer::siElectronCollection_
std::string siElectronCollection_
Definition: SiStripElectronAnalyzer.h:183
SiStripElectronAnalyzer::beginJob
void beginJob() override
Definition: SiStripElectronAnalyzer.cc:161
SiStripElectronAnalyzer::MatchedDetector_
int MatchedDetector_[1000]
Definition: SiStripElectronAnalyzer.h:171
edm::one::EDAnalyzer
Definition: EDAnalyzer.h:30
SiStripElectronAnalyzer::StereoHitSignal_
float StereoHitSignal_[1000]
Definition: SiStripElectronAnalyzer.h:123
SiStripElectronAnalyzer::myTree_
TTree * myTree_
Definition: SiStripElectronAnalyzer.h:101
SiStripElectronAnalyzer::MonoHitSigX_
float MonoHitSigX_[1000]
Definition: SiStripElectronAnalyzer.h:141
SiStripElectronAnalyzer::sizeSuperClustersPassed
TH1F * sizeSuperClustersPassed
Definition: SiStripElectronAnalyzer.h:90
SiStripElectronAnalyzer::initNtuple
virtual void initNtuple(void)
Definition: SiStripElectronAnalyzer.cc:237
SiStripElectronAnalyzer::NStereoHits_
int NStereoHits_
Definition: SiStripElectronAnalyzer.h:109
SiStripElectronAnalyzer::ptDiff
TH1F * ptDiff
Definition: SiStripElectronAnalyzer.h:84
SiStripElectronAnalyzer::ptElectronFailed
TH1F * ptElectronFailed
Definition: SiStripElectronAnalyzer.h:87
SiStripElectronAnalyzer::SiStripElectronAnalyzer
SiStripElectronAnalyzer(const edm::ParameterSet &)
Definition: SiStripElectronAnalyzer.cc:66
SiStripElectronAnalyzer::energySuperClusters_
TH1F * energySuperClusters_
Definition: SiStripElectronAnalyzer.h:74
SiStripElectronAnalyzer::numSiMonoHits_
TH1F * numSiMonoHits_
Definition: SiStripElectronAnalyzer.h:98
SiStripElectronAnalyzer::StereoDetector_
int StereoDetector_[1000]
Definition: SiStripElectronAnalyzer.h:127
SiStripElectronAnalyzer::MonoHitSignal_
float MonoHitSignal_[1000]
Definition: SiStripElectronAnalyzer.h:145
SiStripElectronAnalyzer::MonoHitPhi_
float MonoHitPhi_[1000]
Definition: SiStripElectronAnalyzer.h:137
SiStripElectronAnalyzer::ptElectronPassed
TH1F * ptElectronPassed
Definition: SiStripElectronAnalyzer.h:89
SiStripElectronAnalyzer::numElectrons_
TH1F * numElectrons_
Definition: SiStripElectronAnalyzer.h:72
SiStripElectronAnalyzer::mctruthCollection_
std::string mctruthCollection_
Definition: SiStripElectronAnalyzer.h:175
SiStripElectronAnalyzer::eBRecHitProducer_
std::string eBRecHitProducer_
Definition: SiStripElectronAnalyzer.h:180
SiStripElectronAnalyzer::MonoHitWidth_
int MonoHitWidth_[1000]
Definition: SiStripElectronAnalyzer.h:147
SiStripElectronAnalyzer::YShower_
float YShower_[1000]
Definition: SiStripElectronAnalyzer.h:106
SiStripElectronAnalyzer::energySuperClustersEl_
TH1F * energySuperClustersEl_
Definition: SiStripElectronAnalyzer.h:79
SiStripElectronAnalyzer::StereoHitR_
float StereoHitR_[1000]
Definition: SiStripElectronAnalyzer.h:114
SiStripElectronAnalyzer::pElectronPassed
TH1F * pElectronPassed
Definition: SiStripElectronAnalyzer.h:88
SiStripElectronAnalyzer::StereoLayer_
int StereoLayer_[1000]
Definition: SiStripElectronAnalyzer.h:128
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SiStripElectronAnalyzer::StereoHitX_
float StereoHitX_[1000]
Definition: SiStripElectronAnalyzer.h:110
SiStripElectronAnalyzer::MatchedHitZ_
float MatchedHitZ_[1000]
Definition: SiStripElectronAnalyzer.h:156
SiStripElectronAnalyzer::StereoHitSigY_
float StereoHitSigY_[1000]
Definition: SiStripElectronAnalyzer.h:120
SiStripElectronAnalyzer::superClusterProducer_
std::string superClusterProducer_
Definition: SiStripElectronAnalyzer.h:176
edm::ParameterSet
Definition: ParameterSet.h:47
SiStripElectronAnalyzer::StereoHitY_
float StereoHitY_[1000]
Definition: SiStripElectronAnalyzer.h:111
SiStripElectronAnalyzer::pDiff
TH1F * pDiff
Definition: SiStripElectronAnalyzer.h:85
SiStripElectronAnalyzer::StereoHitTheta_
float StereoHitTheta_[1000]
Definition: SiStripElectronAnalyzer.h:116
SiStripElectronAnalyzer::siStereoHitCollection_
std::string siStereoHitCollection_
Definition: SiStripElectronAnalyzer.h:188
SiStripElectronAnalyzer::MonoHitZ_
float MonoHitZ_[1000]
Definition: SiStripElectronAnalyzer.h:134
SiStripElectronAnalyzer::siRphiHitCollection_
std::string siRphiHitCollection_
Definition: SiStripElectronAnalyzer.h:187
SiStripElectronAnalyzer::eBRecHitCollection_
std::string eBRecHitCollection_
Definition: SiStripElectronAnalyzer.h:181
SiStripElectronAnalyzer::sizeSuperClustersFailed
TH1F * sizeSuperClustersFailed
Definition: SiStripElectronAnalyzer.h:91
SiStripElectronAnalyzer::basicClusterProducer_
std::string basicClusterProducer_
Definition: SiStripElectronAnalyzer.h:178
SiStripElectronAnalyzer::phiWidthSuperClusters_
TH1F * phiWidthSuperClusters_
Definition: SiStripElectronAnalyzer.h:77
M_PI
#define M_PI
Definition: BXVectorInputProducer.cc:49
SiStripElectronAnalyzer::StereoHitWidth_
int StereoHitWidth_[1000]
Definition: SiStripElectronAnalyzer.h:125
SiStripElectronAnalyzer::MatchedHitWidth_
int MatchedHitWidth_[1000]
Definition: SiStripElectronAnalyzer.h:169
SiStripElectronAnalyzer::ZShower_
float ZShower_[1000]
Definition: SiStripElectronAnalyzer.h:107
edm::EventSetup
Definition: EventSetup.h:57
SiStripElectronAnalyzer::energySuperClustersFailed
TH1F * energySuperClustersFailed
Definition: SiStripElectronAnalyzer.h:93
SiStripElectronAnalyzer::emaxSuperClustersEl_
TH1F * emaxSuperClustersEl_
Definition: SiStripElectronAnalyzer.h:81
SiStripElectronAnalyzer::numSiMatchedHits_
TH1F * numSiMatchedHits_
Definition: SiStripElectronAnalyzer.h:99
SiStripElectronAnalyzer::MonoHitNoise_
float MonoHitNoise_[1000]
Definition: SiStripElectronAnalyzer.h:146
SiStripElectronAnalyzer::MatchedHitCorr_
float MatchedHitCorr_[1000]
Definition: SiStripElectronAnalyzer.h:165
SiStripElectronAnalyzer::endJob
void endJob(void) override
Definition: SiStripElectronAnalyzer.cc:1153
SiStripElectronAnalyzer::XShower_
float XShower_[1000]
Definition: SiStripElectronAnalyzer.h:105
SiStripElectronAnalyzer::MonoHitSigY_
float MonoHitSigY_[1000]
Definition: SiStripElectronAnalyzer.h:142
SiStripElectronAnalyzer::MonoHitX_
float MonoHitX_[1000]
Definition: SiStripElectronAnalyzer.h:132
SiStripElectronAnalyzer::StereoHitNoise_
float StereoHitNoise_[1000]
Definition: SiStripElectronAnalyzer.h:124
DDAxes::phi
SiStripElectronAnalyzer::mctruthProducer_
std::string mctruthProducer_
Definition: SiStripElectronAnalyzer.h:174
SiStripElectronAnalyzer::siMatchedHitCollection_
std::string siMatchedHitCollection_
Definition: SiStripElectronAnalyzer.h:189
SiStripElectronAnalyzer
Definition: SiStripElectronAnalyzer.h:46
SiStripElectronAnalyzer::siHitProducer_
std::string siHitProducer_
Definition: SiStripElectronAnalyzer.h:186
SiStripElectronAnalyzer::StereoHitCorr_
float StereoHitCorr_[1000]
Definition: SiStripElectronAnalyzer.h:121
SiStripElectronAnalyzer::MatchedHitNoise_
float MatchedHitNoise_[1000]
Definition: SiStripElectronAnalyzer.h:168
Frameworkfwd.h
SiStripElectronAnalyzer::MatchedHitX_
float MatchedHitX_[1000]
Definition: SiStripElectronAnalyzer.h:154
SiStripElectronAnalyzer::numSiStereoHits_
TH1F * numSiStereoHits_
Definition: SiStripElectronAnalyzer.h:97
SiStripElectronAnalyzer::MatchedHitSigX_
float MatchedHitSigX_[1000]
Definition: SiStripElectronAnalyzer.h:163
SiStripElectronAnalyzer::MatchedHitSignal_
float MatchedHitSignal_[1000]
Definition: SiStripElectronAnalyzer.h:167
SiStripElectronAnalyzer::sizeSuperClusters_
TH1F * sizeSuperClusters_
Definition: SiStripElectronAnalyzer.h:75
SiStripElectronAnalyzer::electronCollection_
std::string electronCollection_
Definition: SiStripElectronAnalyzer.h:185
SiStripElectronAnalyzer::electronProducer_
std::string electronProducer_
Definition: SiStripElectronAnalyzer.h:184
SiStripElectronAnalyzer::phiWidthSuperClustersEl_
TH1F * phiWidthSuperClustersEl_
Definition: SiStripElectronAnalyzer.h:82
SiStripElectronAnalyzer::basicClusterCollection_
std::string basicClusterCollection_
Definition: SiStripElectronAnalyzer.h:179
SiStripElectronAnalyzer::NMatchedHits_
int NMatchedHits_
Definition: SiStripElectronAnalyzer.h:153
SiStripElectronAnalyzer::StereoHitPhi_
float StereoHitPhi_[1000]
Definition: SiStripElectronAnalyzer.h:115
SiStripElectronAnalyzer::file_
TFile * file_
Definition: SiStripElectronAnalyzer.h:70
SiStripElectronAnalyzer::eOverPPassed
TH1F * eOverPPassed
Definition: SiStripElectronAnalyzer.h:95
SiStripElectronAnalyzer::siElectronProducer_
std::string siElectronProducer_
Definition: SiStripElectronAnalyzer.h:182
SiStripElectronAnalyzer::EShower_
float EShower_[1000]
Definition: SiStripElectronAnalyzer.h:104
edm::Event
Definition: Event.h:73
SiStripElectronAnalyzer::MatchedHitR_
float MatchedHitR_[1000]
Definition: SiStripElectronAnalyzer.h:158
SiStripElectronAnalyzer::MonoHitCorr_
float MonoHitCorr_[1000]
Definition: SiStripElectronAnalyzer.h:143
SiStripElectronAnalyzer::MatchedHitY_
float MatchedHitY_[1000]
Definition: SiStripElectronAnalyzer.h:155
SiStripElectronAnalyzer::analyze
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: SiStripElectronAnalyzer.cc:295
SiStripElectronAnalyzer::unwrapPhi
double unwrapPhi(double phi) const
Definition: SiStripElectronAnalyzer.h:57
SiStripElectronAnalyzer::energySuperClustersPassed
TH1F * energySuperClustersPassed
Definition: SiStripElectronAnalyzer.h:92
SiStripElectronAnalyzer::MonoDetector_
int MonoDetector_[1000]
Definition: SiStripElectronAnalyzer.h:149
SiStripElectronAnalyzer::StereoHitSigX_
float StereoHitSigX_[1000]
Definition: SiStripElectronAnalyzer.h:119
SiStripElectronAnalyzer::fileName_
std::string fileName_
Definition: SiStripElectronAnalyzer.h:68
SiStripElectronAnalyzer::MatchedLayer_
int MatchedLayer_[1000]
Definition: SiStripElectronAnalyzer.h:172
SiStripElectronAnalyzer::pElectronFailed
TH1F * pElectronFailed
Definition: SiStripElectronAnalyzer.h:86
SiStripElectronAnalyzer::emaxSuperClusters_
TH1F * emaxSuperClusters_
Definition: SiStripElectronAnalyzer.h:76