131 t =
id.iChamberType();
160 m_muonCollectionTag(
cfg.getParameter<
edm::
InputTag>(
"muonCollectionTag")),
161 m_minTrackPt(
cfg.getParameter<double>(
"minTrackPt")),
162 m_maxTrackPt(
cfg.getParameter<double>(
"maxTrackPt")),
163 m_minTrackP(
cfg.getParameter<double>(
"minTrackP")),
164 m_maxTrackP(
cfg.getParameter<double>(
"maxTrackP")),
165 m_maxDxy(
cfg.getParameter<double>(
"maxDxy")),
166 m_minTrackerHits(
cfg.getParameter<
int>(
"minTrackerHits")),
167 m_maxTrackerRedChi2(
cfg.getParameter<double>(
"maxTrackerRedChi2")),
168 m_allowTIDTEC(
cfg.getParameter<
bool>(
"allowTIDTEC")),
169 m_minNCrossedChambers(
cfg.getParameter<
int>(
"minNCrossedChambers")),
170 m_minDT13Hits(
cfg.getParameter<
int>(
"minDT13Hits")),
171 m_minDT2Hits(
cfg.getParameter<
int>(
"minDT2Hits")),
172 m_minCSCHits(
cfg.getParameter<
int>(
"minCSCHits")),
173 m_doDT(
cfg.getParameter<
bool>(
"doDT")),
174 m_doCSC(
cfg.getParameter<
bool>(
"doCSC")),
175 m_useStubPosition(
cfg.getParameter<
bool>(
"useStubPosition")),
176 m_createNtuple(
cfg.getParameter<
bool>(
"createNtuple")) {
179 m_cscnt =
fs->make<TTree>(
"mualNtuple",
"mualNtuple");
190 sprintf(
tmp,
"%02d",
num);
195 std::string wheel_label[5] = {
"A",
"B",
"C",
"D",
"E"};
206 for (
int sector = 1; sector <= 14; sector++) {
209 "DTvsz_st" + s_station +
"sec" +
num02d(sector),
this, 60, -660., 660., do_y,
false);
217 "DTvsphi_st" + s_station +
"wh" + wheel_label[
wheel + 2],
this, 180, -
M_PI,
M_PI, do_y,
false);
230 "CSCvsr_me" + s_endcap + s_station +
"ch" +
num02d(
chamber),
this, 60, 100., 700.,
false,
false);
243 M_PI * (2. - 5. / 180.),
280 for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end();
303 if (!(
muon->isTrackerMuon() &&
muon->innerTrack().isNonnull()))
332 std::vector<DetId> chamberIds = mrft.
chamberIds();
333 for (
unsigned ch = 0; ch < chamberIds.size(); ch++)
345 for (std::vector<DetId>::const_iterator chamberId = chamberIds.begin(); chamberId != chamberIds.end(); ++chamberId) {
370 double phi = atan2(gpos.
y(), gpos.
x());
373 assert(1 <=
id.sector() &&
id.sector() <= 14);
391 phi = atan2(gpos.
y(), gpos.
x());
394 assert(1 <=
id.sector() &&
id.sector() <= 14);
415 double phi = atan2(gpos.
y(), gpos.
x());
418 assert(1 <=
id.sector() &&
id.sector() <= 14);
431 int ring =
id.ring();
440 double residual =
csc->global_residual();
441 double resslope =
csc->global_resslope();
447 gpos =
csc->global_stubpos();
449 gpos =
csc->global_trackpos();
450 double phi = atan2(gpos.
y(), gpos.
x());
456 int chamber =
id.chamber() - 1;
492 std::cout <<
"AlignmentMonitorMuonSystemMap1D counters:" << std::endl;
507 : m_name(
name), m_bins(
bins), m_xy(
xy), m_1d(add_1d) {
509 std::stringstream name_x_2d, name_y_2d, name_dxdz_2d, name_dydz_2d;
510 name_x_2d <<
m_name <<
"_x_2d";
511 name_y_2d <<
m_name <<
"_y_2d";
512 name_dxdz_2d <<
m_name <<
"_dxdz_2d";
513 name_dydz_2d <<
m_name <<
"_dydz_2d";
515 const int nbins = 200;
516 const double window = 100.;
527 std::stringstream name_x_1d;
528 name_x_1d <<
m_name <<
"_x_1d";
534 if (m_1d &&
chi2 > 0.) {
536 double residual = residx * 1000.;
537 m_x_1d->Fill(residual);
542 char charge,
double abscissa,
double residx,
double chi2,
int dof) {
544 double residual = residx * 10.;
546 m_x_2d->Fill(abscissa, residual);
551 char charge,
double abscissa,
double residy,
double chi2,
int dof) {
552 if (m_xy &&
chi2 > 0.) {
553 double residual = residy * 10.;
555 m_y_2d->Fill(abscissa, residual);
560 char charge,
double abscissa,
double slopex,
double chi2,
int dof) {
562 double residual = slopex * 1000.;
564 m_dxdz_2d->Fill(abscissa, residual);
569 char charge,
double abscissa,
double slopey,
double chi2,
int dof) {
570 if (m_xy &&
chi2 > 0.) {
571 double residual = slopey * 1000.;
573 m_dydz_2d->Fill(abscissa, residual);
double m_maxTrackerRedChi2
AlignableNavigator * pNavigator()
void fill_x(char charge, double abscissa, double residx, double chi2, int dof)
int trackerNumHits() const
void fill_dydz(char charge, double abscissa, double slopey, double chi2, int dof)
void fill_y(char charge, double abscissa, double residy, double chi2, int dof)
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > m_esTokenGBTGeom
align::GlobalPoint global_trackpos()
std::string num02d(int num)
AlignmentMonitorMuonSystemMap1D(const edm::ParameterSet &cfg, edm::ConsumesCollector iC)
void fill_x_1d(double residx, double chi2, int dof)
std::string to_string(const V &value)
MuonSystemMapPlot1D * m_CSCvsr_me[2][4][36]
MuonSystemMapPlot1D * m_CSCvsphi_me[2][4][3]
const edm::ESGetToken< Propagator, TrackingComponentsRecord > m_esTokenProp
void book() override
Book or retrieve histograms; MUST be reimplemented.
double pt() const
track transverse momentum
void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks) override
Called for each event (by "run()"): may be reimplemented.
int charge() const
track electric charge
void afterAlignment() override
const reco::Track * getTrack()
long m_counter_trackmoment
double normalizedChi2() const
def window(xmin, xmax, ymin, ymax, x=0, y=0, width=100, height=100, xlogbase=None, ylogbase=None, minusInfinity=-1000, flipx=False, flipy=True)
bool getData(T &iHolder) const
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection
const edm::InputTag m_beamSpotTag
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
void fill_dxdz(char charge, double abscissa, double slopex, double chi2, int dof)
std::vector< MuonSystemMapPlot1D * > m_plots
double global_residual() const
const MuonResidualsFromTrack::BuilderToken m_esTokenBuilder
const std::vector< DetId > chamberIds() const
double pz() const
z coordinate of momentum vector
edm::InputTag m_muonCollectionTag
MuonSystemMapPlot1D * m_DTvsz_station[4][14]
align::GlobalPoint global_stubpos()
~AlignmentMonitorMuonSystemMap1D() override
MuonSystemMapPlot1D(std::string name, AlignmentMonitorMuonSystemMap1D *module, int bins, double low, double high, bool xy, bool add_1d)
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > m_esTokenMF
long m_counter_cscnumhits
#define DEFINE_EDM_PLUGIN(factory, type, name)
void processMuonResidualsFromTrack(MuonResidualsFromTrack &mrft, const edm::Event &iEvent)
bool contains_TIDTEC() const
int m_minNCrossedChambers
const edm::ESGetToken< DetIdAssociator, DetIdAssociatorRecord > m_esTokenDetId
Power< A, B >::type pow(const A &a, const B &b)
MuonSystemMapPlot1D * m_DTvsphi_station[4][5]
MuonChamberResidual * chamberResidual(DetId chamberId, int type)
double global_resslope() const