44 theSeedsCollectionLabel_ = consumes<TrajectorySeedCollection>(
parameters.getParameter<
InputTag>(
"SeedCollection"));
62 theDbe->setCurrentFolder(
"Muons/MuonSeedsAnalyzer");
64 seedHitBin =
parameters.getParameter<
int>(
"RecHitBin");
65 seedHitMin =
parameters.getParameter<
double>(
"RecHitMin");
66 seedHitMax =
parameters.getParameter<
double>(
"RecHitMax");
67 string histname =
"NumberOfRecHitsPerSeed_";
68 NumberOfRecHitsPerSeed = theDbe->book1D(histname,
"Number of seed recHits", seedHitBin, seedHitMin, seedHitMax);
70 PhiBin =
parameters.getParameter<
int>(
"PhiBin");
71 PhiMin =
parameters.getParameter<
double>(
"PhiMin");
72 PhiMax =
parameters.getParameter<
double>(
"PhiMax");
73 histname =
"seedPhi_";
74 seedPhi = theDbe->book1D(histname,
"Seed #phi", PhiBin, PhiMin, PhiMax);
75 seedPhi->setAxisTitle(
"rad");
77 EtaBin =
parameters.getParameter<
int>(
"EtaBin");
80 histname =
"seedEta_";
81 seedEta = theDbe->book1D(histname,
"Seed #eta", EtaBin, EtaMin, EtaMax);
83 ThetaBin =
parameters.getParameter<
int>(
"ThetaBin");
84 ThetaMin =
parameters.getParameter<
double>(
"ThetaMin");
85 ThetaMax =
parameters.getParameter<
double>(
"ThetaMax");
86 histname =
"seedTheta_";
87 seedTheta = theDbe->book1D(histname,
"Seed #theta", ThetaBin, ThetaMin, ThetaMax);
88 seedTheta->setAxisTitle(
"rad");
90 seedPtBin =
parameters.getParameter<
int>(
"seedPtBin");
91 seedPtMin =
parameters.getParameter<
double>(
"seedPtMin");
92 seedPtMax =
parameters.getParameter<
double>(
"seedPtMax");
94 seedPt = theDbe->book1D(histname,
"Seed p_{t}", seedPtBin, seedPtMin, seedPtMax);
95 seedPt->setAxisTitle(
"GeV");
97 seedPxyzBin =
parameters.getParameter<
int>(
"seedPxyzBin");
98 seedPxyzMin =
parameters.getParameter<
double>(
"seedPxyzMin");
99 seedPxyzMax =
parameters.getParameter<
double>(
"seedPxyzMax");
100 histname =
"seedPx_";
101 seedPx = theDbe->book1D(histname,
"Seed p_{x}", seedPxyzBin, seedPxyzMin, seedPxyzMax);
102 seedPx->setAxisTitle(
"GeV");
103 histname =
"seedPy_";
104 seedPy = theDbe->book1D(histname,
"Seed p_{y}", seedPxyzBin, seedPxyzMin, seedPxyzMax);
105 seedPy->setAxisTitle(
"GeV");
106 histname =
"seedPz_";
107 seedPz = theDbe->book1D(histname,
"Seed p_{z}", seedPxyzBin, seedPxyzMin, seedPxyzMax);
108 seedPz->setAxisTitle(
"GeV");
110 pErrBin =
parameters.getParameter<
int>(
"pErrBin");
111 pErrMin =
parameters.getParameter<
double>(
"pErrMin");
112 pErrMax =
parameters.getParameter<
double>(
"pErrMax");
113 histname =
"seedPtErrOverPt_";
114 seedPtErr = theDbe->book1D(histname,
"Seed p_{t}Err/p_{t}", pErrBin, pErrMin, pErrMax);
115 histname =
"seedPtErrOverPtVsPhi_";
116 seedPtErrVsPhi = theDbe->book2D(histname,
"Seed p_{t}Err/p_{t} vs #phi", PhiBin, PhiMin, PhiMax, pErrBin, pErrMin, pErrMax);
117 seedPtErrVsPhi->setAxisTitle(
"rad",2);
118 histname =
"seedPtErrOverPtVsEta_";
119 seedPtErrVsEta = theDbe->book2D(histname,
"Seed p_{t}Err/p_{t} vs #eta", EtaBin, EtaMin, EtaMax, pErrBin, pErrMin, pErrMax);
120 histname =
"seedPtErrOverPtVsPt_";
121 seedPtErrVsPt = theDbe->book2D(histname,
"Seed p_{t}Err/p_{t} vs p_{t}", seedPtBin/5, seedPtMin, seedPtMax, pErrBin, pErrMin, pErrMax);
122 seedPtErrVsPt->setAxisTitle(
"GeV",2);
123 histname =
"seedPErrOverP_";
124 seedPErr = theDbe->book1D(histname,
"Seed pErr/p", pErrBin, pErrMin, pErrMax);
125 histname =
"seedPErrOverPVsPhi_";
126 seedPErrVsPhi = theDbe->book2D(histname,
"Seed pErr/p vs #phi", PhiBin, PhiMin, PhiMax, pErrBin, pErrMin, pErrMax);
127 seedPErrVsPhi->setAxisTitle(
"rad",2);
128 histname =
"seedPErrOverPVsEta_";
129 seedPErrVsEta = theDbe->book2D(histname,
"Seed pErr/p vs #eta", EtaBin, EtaMin, EtaMax, pErrBin, pErrMin, pErrMax);
130 histname =
"seedPErrOverPVsPt_";
131 seedPErrVsPt = theDbe->book2D(histname,
"Seed pErr/p vs p_{t}", seedPtBin/5, seedPtMin, seedPtMax, pErrBin, pErrMin, pErrMax);
132 seedPErrVsPt->setAxisTitle(
"GeV",2);
134 pxyzErrBin =
parameters.getParameter<
int>(
"pxyzErrBin");
135 pxyzErrMin =
parameters.getParameter<
double>(
"pxyzErrMin");
136 pxyzErrMax =
parameters.getParameter<
double>(
"pxyzErrMax");
137 histname =
"seedPxErrOverPx_";
138 seedPxErr = theDbe->book1D(histname,
"Seed p_{x}Err/p_{x}", pxyzErrBin, pxyzErrMin, pxyzErrMax);
139 histname =
"seedPyErrOverPy_";
140 seedPyErr = theDbe->book1D(histname,
"Seed p_{y}Err/p_{y}", pxyzErrBin, pxyzErrMin, pxyzErrMax);
141 histname =
"seedPzErrOverPz_";
142 seedPzErr = theDbe->book1D(histname,
"Seed p_{z}Err/p_{z}", pxyzErrBin, pxyzErrMin, pxyzErrMax);
144 phiErrBin =
parameters.getParameter<
int>(
"phiErrBin");
145 phiErrMin =
parameters.getParameter<
double>(
"phiErrMin");
146 phiErrMax =
parameters.getParameter<
double>(
"phiErrMax");
147 histname =
"seedPhiErr_";
148 seedPhiErr = theDbe->book1D(histname,
"Seed #phi error", phiErrBin, phiErrMin, phiErrMax);
150 etaErrBin =
parameters.getParameter<
int>(
"etaErrBin");
151 etaErrMin =
parameters.getParameter<
double>(
"etaErrMin");
152 etaErrMax =
parameters.getParameter<
double>(
"etaErrMax");
153 histname =
"seedEtaErr_";
154 seedEtaErr = theDbe->book1D(histname,
"Seed #eta error", etaErrBin, etaErrMin, etaErrMax);
160 theService->update(iSetup);
164 iEvent.
getByToken(theSeedsCollectionLabel_, seeds);
169 for(TrajectorySeedCollection::const_iterator seed = seeds->begin(); seed != seeds->end(); ++seed){
177 const GeomDet* gdet = theService->trackingGeometry()->idToDet( seedDetId );
186 NumberOfRecHitsPerSeed->Fill(seed->nHits());
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const std::string metname
const CurvilinearTrajectoryError & curvilinearError() const
Sin< T >::type sin(const T &t)
ROOT::Math::SMatrix< double, 6, 6, ROOT::Math::MatRepSym< double, 6 > > AlgebraicSymMatrix66
Geom::Phi< T > phi() const
const CartesianTrajectoryError cartesianError() const
const double EtaMax[kNumberCalorimeter]
Geom::Theta< T > theta() const
void beginJob()
Inizialize parameters for histo binning.
Abs< T >::type abs(const T &t)
unsigned int detId() const
const double EtaMin[kNumberCalorimeter]
const AlgebraicSymMatrix66 & matrix() const
void beginRun(const edm::Run &iRun, const edm::EventSetup &iSetup)
virtual ~MuonSeedsAnalyzer()
Destructor.
void analyze(const edm::Event &, const edm::EventSetup &)
Get the analysis.
const AlgebraicSymMatrix55 & matrix() const
GlobalVector globalMomentum() const
Power< A, B >::type pow(const A &a, const B &b)
MuonSeedsAnalyzer(const edm::ParameterSet &)
Constructor.