101 , m_vertexConstraint(cfg.getParameter<bool>(
"vertexConstraint"))
102 , m_beamSpot(cfg.getParameter<edm::
InputTag>(
"beamSpot"))
117 m_diMuon_Z =
book1D(
"/iterN/",
"diMuon_Z",
"Di-muon mass (GeV)", 200, 90. - 50., 90. + 50.);
118 m_diMuon_Zforward =
book1D(
"/iterN/",
"diMuon_Zforward",
"Di-muon mass (GeV) eta > 1.4", 200, 90. - 50., 90. + 50.);
119 m_diMuon_Zbarrel =
book1D(
"/iterN/",
"diMuon_Zbarrel",
"Di-muon mass (GeV) -1.4 < eta < 1.4", 200, 90. - 50., 90. + 50.);
120 m_diMuon_Zbackward =
book1D(
"/iterN/",
"diMuon_Zbackward",
"Di-muon mass (GeV) eta < -1.4", 200, 90. - 50., 90. + 50.);
121 m_diMuon_Ups =
book1D(
"/iterN/",
"diMuon_Ups",
"Di-muon mass (GeV)", 200, 9. - 3., 9. + 3.);
122 m_diMuon_Jpsi =
book1D(
"/iterN/",
"diMuon_Jpsi",
"Di-muon mass (GeV)", 200, 3. - 1., 3. + 1.);
127 m_chi2_log =
book1D(
"/iterN/",
"m_chi2_log",
"Log track chi^2", 100, -3, 7);
133 m_chi2DOF_improvement =
book1D(
"/iterN/",
"m_chi2DOF_improvement",
"Track-by-track (chi^2/DOF)/(original chi^2/original DOF)", 100, 0., 10.);
134 for (
int i = 0;
i < 36;
i++) {
136 snprintf(name,
sizeof(name),
"m_pt_phi%d",
i);
137 snprintf(title,
sizeof(title),
"Track pt (GeV) in phi bin %d/36",
i);
138 m_pt[
i] =
book1D(
"/iterN/", name, title, 100, 0, 100);
156 for (ConstTrajTrackPairCollection::const_iterator it = tracks.begin(); it != tracks.end(); ++it) {
162 double closest = 10000.;
164 std::vector<TrajectoryMeasurement> measurements = traj->
measurements();
165 for (std::vector<TrajectoryMeasurement>::const_iterator im = measurements.begin(); im != measurements.end(); ++im) {
175 if (where.
mag() < closest) {
176 closest = where.
mag();
183 if (closest != 10000.) {
184 std::pair<bool, FreeTrajectoryState> state;
196 double chi2DOF = chi2 / double(nDOF);
219 else if (energy > e2) {
224 double pt = momentum.
perp();
225 double phi = momentum.
phi();
226 while (phi < -
M_PI) phi += 2.*
M_PI;
229 double phibin = (phi +
M_PI) / (2. *
M_PI) * 36.;
231 for (
int i = 0;
i < 36;
i++) {
242 if (e1 > 0. && e2 > 0.) {
243 double energy_tot = e1 +
e2;
245 double mass =
sqrt(energy_tot*energy_tot - momentum_tot.
mag2());
246 double eta = momentum_tot.
eta();
void update(const edm::EventSetup &setup)
update the services each event
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
T getParameter(std::string const &) const
virtual int dimension() const =0
void afterAlignment(const edm::EventSetup &iSetup)
ConstRecHitPointer const & recHit() const
AlignmentMonitorTracksFromTrajectories(const edm::ParameterSet &cfg)
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
void book()
Book or retrieve histograms; MUST be reimplemented.
TH1F * m_diMuon_Zbackward
Geom::Phi< T > phi() const
std::pair< bool, FreeTrajectoryState > propagate(const TrajectoryStateOnSurface &tsos, const reco::BeamSpot &beamSpot) const
Propagate the state to the 2D-PCA.
void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks)
Called for each event (by "run()"): may be reimplemented.
DataContainer const & measurements() const
const SurfaceType & surface() const
double chi2() const
chi-squared of the fit
tuple MuonUpdatorAtVertex
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection
TH1F * book1D(std::string dir, std::string name, std::string title, int nchX, double lowX, double highX)
MuonServiceProxy * theMuonServiceProxy
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
TrajectoryStateOnSurface TSOS
TH1F * m_chi2DOF_improvement
MuonUpdatorAtVertex * theMuonUpdatorAtVertex
std::pair< bool, FreeTrajectoryState > propagateWithUpdate(const TrajectoryStateOnSurface &tsos, const reco::BeamSpot &beamSpot) const
Propagate to the 2D-PCA and apply the vertex constraint.
TH1F * m_chi2_improvement
~AlignmentMonitorTracksFromTrajectories()
#define DEFINE_EDM_PLUGIN(factory, type, name)
TrajectoryStateOnSurface const & backwardPredictedState() const
Access to backward predicted state (from smoother)