102 m_vertexConstraint(cfg.getParameter<bool>(
"vertexConstraint")),
103 m_beamSpot(cfg.getParameter<edm::
InputTag>(
"beamSpot")) {
118 m_diMuon_Z =
book1D(
"/iterN/",
"diMuon_Z",
"Di-muon mass (GeV)", 200, 90. - 50., 90. + 50.);
119 m_diMuon_Zforward =
book1D(
"/iterN/",
"diMuon_Zforward",
"Di-muon mass (GeV) eta > 1.4", 200, 90. - 50., 90. + 50.);
121 book1D(
"/iterN/",
"diMuon_Zbarrel",
"Di-muon mass (GeV) -1.4 < eta < 1.4", 200, 90. - 50., 90. + 50.);
123 book1D(
"/iterN/",
"diMuon_Zbackward",
"Di-muon mass (GeV) eta < -1.4", 200, 90. - 50., 90. + 50.);
124 m_diMuon_Ups =
book1D(
"/iterN/",
"diMuon_Ups",
"Di-muon mass (GeV)", 200, 9. - 3., 9. + 3.);
125 m_diMuon_Jpsi =
book1D(
"/iterN/",
"diMuon_Jpsi",
"Di-muon mass (GeV)", 200, 3. - 1., 3. + 1.);
130 m_chi2_log =
book1D(
"/iterN/",
"m_chi2_log",
"Log track chi^2", 100, -3, 7);
137 "/iterN/",
"m_chi2DOF_improvement",
"Track-by-track (chi^2/DOF)/(original chi^2/original DOF)", 100, 0., 10.);
138 for (
int i = 0;
i < 36;
i++) {
140 snprintf(name,
sizeof(name),
"m_pt_phi%d",
i);
141 snprintf(title,
sizeof(title),
"Track pt (GeV) in phi bin %d/36",
i);
142 m_pt[
i] =
book1D(
"/iterN/", name, title, 100, 0, 100);
162 for (ConstTrajTrackPairCollection::const_iterator it = tracks.begin(); it != tracks.end(); ++it) {
168 double closest = 10000.;
170 std::vector<TrajectoryMeasurement> measurements = traj->
measurements();
171 for (std::vector<TrajectoryMeasurement>::const_iterator im = measurements.begin(); im != measurements.end(); ++im) {
181 if (where.
mag() < closest) {
182 closest = where.
mag();
189 if (closest != 10000.) {
190 std::pair<bool, FreeTrajectoryState>
state;
201 double chi2DOF = chi2 / double(nDOF);
223 }
else if (energy > e2) {
228 double pt = momentum.
perp();
229 double phi = momentum.
phi();
235 double phibin = (phi +
M_PI) / (2. *
M_PI) * 36.;
237 for (
int i = 0;
i < 36;
i++) {
238 if (phibin <
i + 1) {
248 if (e1 > 0. && e2 > 0.) {
249 double energy_tot = e1 + e2;
251 double mass =
sqrt(energy_tot * energy_tot - momentum_tot.
mag2());
252 double eta = momentum_tot.
eta();
288 "AlignmentMonitorTracksFromTrajectories");
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
virtual int dimension() const =0
AlignmentMonitorTracksFromTrajectories(const edm::ParameterSet &cfg, edm::ConsumesCollector iC)
Point3DBase< Scalar, LocalTag > LocalPoint
ConstRecHitPointer const & recHit() const
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.
auto const & tracks
cannot be loose
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
T getParameter(std::string const &) const
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()
void update(const edm::EventSetup &setup, bool duringEvent=true)
update the services each event
#define DEFINE_EDM_PLUGIN(factory, type, name)
TrajectoryStateOnSurface const & backwardPredictedState() const
Access to backward predicted state (from smoother)