135 t =
id.iChamberType();
164 m_muonCollectionTag(
cfg.getParameter<
edm::
InputTag>(
"muonCollectionTag")),
165 m_minTrackPt(
cfg.getParameter<double>(
"minTrackPt")),
166 m_maxTrackPt(
cfg.getParameter<double>(
"maxTrackPt")),
167 m_minTrackP(
cfg.getParameter<double>(
"minTrackP")),
168 m_maxTrackP(
cfg.getParameter<double>(
"maxTrackP")),
169 m_maxDxy(
cfg.getParameter<double>(
"maxDxy")),
170 m_minTrackerHits(
cfg.getParameter<
int>(
"minTrackerHits")),
171 m_maxTrackerRedChi2(
cfg.getParameter<double>(
"maxTrackerRedChi2")),
172 m_allowTIDTEC(
cfg.getParameter<
bool>(
"allowTIDTEC")),
173 m_minNCrossedChambers(
cfg.getParameter<
int>(
"minNCrossedChambers")),
174 m_minDT13Hits(
cfg.getParameter<
int>(
"minDT13Hits")),
175 m_minDT2Hits(
cfg.getParameter<
int>(
"minDT2Hits")),
176 m_minCSCHits(
cfg.getParameter<
int>(
"minCSCHits")),
177 m_doDT(
cfg.getParameter<
bool>(
"doDT")),
178 m_doCSC(
cfg.getParameter<
bool>(
"doCSC")),
179 m_useStubPosition(
cfg.getParameter<
bool>(
"useStubPosition")),
180 m_createNtuple(
cfg.getParameter<
bool>(
"createNtuple")),
185 m_cscnt =
fs->make<TTree>(
"mualNtuple",
"mualNtuple");
197 desc.add<
double>(
"minTrackPt", 100.);
198 desc.add<
double>(
"maxTrackPt", 200.);
199 desc.add<
double>(
"minTrackP", 0.);
200 desc.add<
double>(
"maxTrackP", 99999.);
201 desc.add<
double>(
"maxDxy", 100.);
202 desc.add<
int>(
"minTrackerHits", 15);
203 desc.add<
double>(
"maxTrackerRedChi2", 10.);
204 desc.add<
bool>(
"allowTIDTEC",
true);
205 desc.add<
int>(
"minNCrossedChambers", 3);
206 desc.add<
int>(
"minDT13Hits", 8);
207 desc.add<
int>(
"minDT2Hits", 4);
208 desc.add<
int>(
"minCSCHits", 6);
209 desc.add<
bool>(
"doDT",
true);
210 desc.add<
bool>(
"doCSC",
true);
211 desc.add<
bool>(
"useStubPosition",
false);
212 desc.add<
bool>(
"createNtuple",
false);
213 descriptions.
add(
"alignmentMonitorMuonSystemMap1D",
desc);
219 sprintf(
tmp,
"%02d",
num);
224 std::string wheel_label[5] = {
"A",
"B",
"C",
"D",
"E"};
238 "DTvsz_st" + s_station +
"sec" +
num02d(
sector),
this, 60, -660., 660., do_y,
false);
246 "DTvsphi_st" + s_station +
"wh" + wheel_label[
wheel + 2],
this, 180, -
M_PI,
M_PI, do_y,
false);
259 "CSCvsr_me" + s_endcap + s_station +
"ch" +
num02d(
chamber),
this, 60, 100., 700.,
false,
false);
272 M_PI * (2. - 5. / 180.),
308 for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end();
330 if (!(
muon->isTrackerMuon() &&
muon->innerTrack().isNonnull()))
359 std::vector<DetId> chamberIds = mrft.
chamberIds();
360 for (
unsigned ch = 0; ch < chamberIds.size(); ch++)
372 for (std::vector<DetId>::const_iterator chamberId = chamberIds.begin(); chamberId != chamberIds.end(); ++chamberId) {
397 double phi = atan2(gpos.
y(), gpos.
x());
418 phi = atan2(gpos.
y(), gpos.
x());
442 double phi = atan2(gpos.
y(), gpos.
x());
458 int ring =
id.ring();
467 double residual =
csc->global_residual();
468 double resslope =
csc->global_resslope();
474 gpos =
csc->global_stubpos();
476 gpos =
csc->global_trackpos();
477 double phi = atan2(gpos.
y(), gpos.
x());
483 int chamber =
id.chamber() - 1;
518 edm::LogVerbatim(
"AlignmentMuonSystemMap") <<
"AlignmentMonitorMuonSystemMap1D counters:";
533 : m_name(
name), m_bins(
bins), m_xy(
xy), m_1d(add_1d) {
535 std::stringstream name_x_2d, name_y_2d, name_dxdz_2d, name_dydz_2d;
536 name_x_2d <<
m_name <<
"_x_2d";
537 name_y_2d <<
m_name <<
"_y_2d";
538 name_dxdz_2d <<
m_name <<
"_dxdz_2d";
539 name_dydz_2d <<
m_name <<
"_dydz_2d";
541 const int nbins = 200;
542 const double window = 100.;
553 std::stringstream name_x_1d;
554 name_x_1d <<
m_name <<
"_x_1d";
560 if (m_1d &&
chi2 > 0.) {
562 double residual = residx * 1000.;
563 m_x_1d->Fill(residual);
568 char charge,
double abscissa,
double residx,
double chi2,
int dof) {
570 double residual = residx * 10.;
572 m_x_2d->Fill(abscissa, residual);
577 char charge,
double abscissa,
double residy,
double chi2,
int dof) {
578 if (m_xy &&
chi2 > 0.) {
579 double residual = residy * 10.;
581 m_y_2d->Fill(abscissa, residual);
586 char charge,
double abscissa,
double slopex,
double chi2,
int dof) {
588 double residual = slopex * 1000.;
590 m_dxdz_2d->Fill(abscissa, residual);
595 char charge,
double abscissa,
double slopey,
double chi2,
int dof) {
596 if (m_xy &&
chi2 > 0.) {
597 double residual = slopey * 1000.;
599 m_dydz_2d->Fill(abscissa, residual);
Log< level::Info, true > LogVerbatim
AlignableNavigator * pNavigator()
const bool m_useStubPosition
void fill_x(char charge, double abscissa, double residx, double chi2, int dof)
int trackerNumHits() const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
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)
const double m_minTrackPt
void fill_x_1d(double residx, double chi2, int dof)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
MuonSystemMapPlot1D * m_CSCvsr_me[2][4][36]
MuonSystemMapPlot1D * m_CSCvsphi_me[2][4][3]
const edm::ESGetToken< Propagator, TrackingComponentsRecord > m_esTokenProp
muons
the two sets of parameters below are mutually exclusive, depending if RECO or ALCARECO is used the us...
~AlignmentMonitorMuonSystemMap1D() override=default
static std::string to_string(const XMLCh *ch)
std::vector< Muon > MuonCollection
collection of Muon objects
const int m_minNCrossedChambers
const edm::EDGetTokenT< reco::BeamSpot > bsToken_
void book() override
Book or retrieve histograms; MUST be reimplemented.
double pt() const
track transverse momentum
const bool m_createNtuple
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 double m_maxTrackerRedChi2
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)
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection
const int m_minTrackerHits
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
void add(std::string const &label, ParameterSetDescription const &psetDescription)
MuonSystemMapPlot1D * m_DTvsz_station[4][14]
align::GlobalPoint global_stubpos()
const edm::EDGetTokenT< reco::MuonCollection > muonToken_
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
const edm::InputTag m_muonCollectionTag
const edm::ESGetToken< DetIdAssociator, DetIdAssociatorRecord > m_esTokenDetId
Power< A, B >::type pow(const A &a, const B &b)
const double m_maxTrackPt
MuonSystemMapPlot1D * m_DTvsphi_station[4][5]
MuonChamberResidual * chamberResidual(DetId chamberId, int type)
double global_resslope() const