|
|
Go to the documentation of this file.
130 t =
id.iChamberType();
158 m_muonCollectionTag(
cfg.getParameter<
edm::
InputTag>(
"muonCollectionTag")),
159 m_minTrackPt(
cfg.getParameter<double>(
"minTrackPt")),
160 m_maxTrackPt(
cfg.getParameter<double>(
"maxTrackPt")),
161 m_minTrackP(
cfg.getParameter<double>(
"minTrackP")),
162 m_maxTrackP(
cfg.getParameter<double>(
"maxTrackP")),
163 m_maxDxy(
cfg.getParameter<double>(
"maxDxy")),
164 m_minTrackerHits(
cfg.getParameter<
int>(
"minTrackerHits")),
165 m_maxTrackerRedChi2(
cfg.getParameter<double>(
"maxTrackerRedChi2")),
166 m_allowTIDTEC(
cfg.getParameter<
bool>(
"allowTIDTEC")),
167 m_minNCrossedChambers(
cfg.getParameter<
int>(
"minNCrossedChambers")),
168 m_minDT13Hits(
cfg.getParameter<
int>(
"minDT13Hits")),
169 m_minDT2Hits(
cfg.getParameter<
int>(
"minDT2Hits")),
170 m_minCSCHits(
cfg.getParameter<
int>(
"minCSCHits")),
171 m_doDT(
cfg.getParameter<
bool>(
"doDT")),
172 m_doCSC(
cfg.getParameter<
bool>(
"doCSC")),
173 m_useStubPosition(
cfg.getParameter<
bool>(
"useStubPosition")),
174 m_createNtuple(
cfg.getParameter<
bool>(
"createNtuple")) {
177 m_cscnt = fs->
make<TTree>(
"mualNtuple",
"mualNtuple");
188 sprintf(
tmp,
"%02d",
num);
193 std::string wheel_label[5] = {
"A",
"B",
"C",
"D",
"E"};
204 for (
int sector = 1; sector <= 14; sector++) {
207 "DTvsz_st" + s_station +
"sec" +
num02d(sector),
this, 60, -660., 660., do_y,
false);
215 "DTvsphi_st" + s_station +
"wh" + wheel_label[
wheel + 2],
this, 180, -
M_PI,
M_PI, do_y,
false);
228 "CSCvsr_me" + s_endcap + s_station +
"ch" +
num02d(
chamber),
this, 60, 100., 700.,
false,
false);
241 M_PI * (2. - 5. / 180.),
277 for (ConstTrajTrackPairCollection::const_iterator trajtrack = trajtracks.begin(); trajtrack != trajtracks.end();
300 if (!(
muon->isTrackerMuon() &&
muon->innerTrack().isNonnull()))
329 std::vector<DetId> chamberIds = mrft.
chamberIds();
330 for (
unsigned ch = 0; ch < chamberIds.size(); ch++)
342 for (std::vector<DetId>::const_iterator chamberId = chamberIds.begin(); chamberId != chamberIds.end(); ++chamberId) {
367 double phi = atan2(gpos.
y(), gpos.
x());
370 assert(1 <=
id.sector() &&
id.sector() <= 14);
388 phi = atan2(gpos.
y(), gpos.
x());
391 assert(1 <=
id.sector() &&
id.sector() <= 14);
412 double phi = atan2(gpos.
y(), gpos.
x());
415 assert(1 <=
id.sector() &&
id.sector() <= 14);
428 int ring =
id.ring();
437 double residual =
csc->global_residual();
438 double resslope =
csc->global_resslope();
444 gpos =
csc->global_stubpos();
446 gpos =
csc->global_trackpos();
447 double phi = atan2(gpos.
y(), gpos.
x());
453 int chamber =
id.chamber() - 1;
489 std::cout <<
"AlignmentMonitorMuonSystemMap1D counters:" << std::endl;
504 : m_name(
name), m_bins(
bins), m_xy(
xy), m_1d(add_1d) {
506 std::stringstream name_x_2d, name_y_2d, name_dxdz_2d, name_dydz_2d;
507 name_x_2d <<
m_name <<
"_x_2d";
508 name_y_2d <<
m_name <<
"_y_2d";
509 name_dxdz_2d <<
m_name <<
"_dxdz_2d";
510 name_dydz_2d <<
m_name <<
"_dydz_2d";
512 const int nbins = 200;
513 const double window = 100.;
524 std::stringstream name_x_1d;
525 name_x_1d <<
m_name <<
"_x_1d";
531 if (m_1d &&
chi2 > 0.) {
533 double residual = residx * 1000.;
534 m_x_1d->Fill(residual);
539 char charge,
double abscissa,
double residx,
double chi2,
int dof) {
541 double residual = residx * 10.;
543 m_x_2d->Fill(abscissa, residual);
548 char charge,
double abscissa,
double residy,
double chi2,
int dof) {
549 if (m_xy &&
chi2 > 0.) {
550 double residual = residy * 10.;
552 m_y_2d->Fill(abscissa, residual);
557 char charge,
double abscissa,
double slopex,
double chi2,
int dof) {
559 double residual = slopex * 1000.;
561 m_dxdz_2d->Fill(abscissa, residual);
566 char charge,
double abscissa,
double slopey,
double chi2,
int dof) {
567 if (m_xy &&
chi2 > 0.) {
568 double residual = slopey * 1000.;
570 m_dydz_2d->Fill(abscissa, residual);
std::vector< MuonSystemMapPlot1D * > m_plots
int m_minNCrossedChambers
const edm::ESGetToken< Propagator, TrackingComponentsRecord > m_esTokenProp
MuonSystemMapPlot1D(std::string name, AlignmentMonitorMuonSystemMap1D *module, int bins, double low, double high, bool xy, bool add_1d)
long m_counter_cscnumhits
MuonChamberResidual * chamberResidual(DetId chamberId, int type)
void afterAlignment() override
int trackerNumHits() 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)
void processMuonResidualsFromTrack(MuonResidualsFromTrack &mrft, const edm::Event &iEvent)
std::string num02d(int num)
align::GlobalPoint global_stubpos()
AlignableNavigator * pNavigator()
MuonSystemMapPlot1D * m_CSCvsphi_me[2][4][3]
double global_residual() const
double pt() const
track transverse momentum
const reco::Track * getTrack()
void event(const edm::Event &iEvent, const edm::EventSetup &iSetup, const ConstTrajTrackPairCollection &iTrajTracks) override
Called for each event (by "run()"): may be reimplemented.
const std::vector< DetId > chamberIds() const
long m_counter_trackmoment
int charge() const
track electric charge
double normalizedChi2() const
#define DEFINE_EDM_PLUGIN(factory, type, name)
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > m_esTokenMF
AlignmentMonitorMuonSystemMap1D(const edm::ParameterSet &cfg, edm::ConsumesCollector iC)
void fill_x(char charge, double abscissa, double residx, double chi2, int dof)
edm::InputTag m_muonCollectionTag
MuonSystemMapPlot1D * m_CSCvsr_me[2][4][36]
void fill_dxdz(char charge, double abscissa, double slopex, double chi2, int dof)
bool contains_TIDTEC() const
const edm::InputTag m_beamSpotTag
T * make(const Args &...args) const
make new ROOT object
align::GlobalPoint global_trackpos()
bool getData(T &iHolder) const
const edm::ESGetToken< DetIdAssociator, DetIdAssociatorRecord > m_esTokenDetId
void fill_x_1d(double residx, double chi2, int dof)
double m_maxTrackerRedChi2
void fill_y(char charge, double abscissa, double residy, double chi2, int dof)
MuonSystemMapPlot1D * m_DTvsphi_station[4][5]
~AlignmentMonitorMuonSystemMap1D() override
void fill_dydz(char charge, double abscissa, double slopey, double chi2, int dof)
Power< A, B >::type pow(const A &a, const B &b)
double pz() const
z coordinate of momentum vector
std::vector< ConstTrajTrackPair > ConstTrajTrackPairCollection
MuonSystemMapPlot1D * m_DTvsz_station[4][14]
const edm::ESGetToken< GlobalTrackingGeometry, GlobalTrackingGeometryRecord > m_esTokenGBTGeom
double global_resslope() const
void book() override
Book or retrieve histograms; MUST be reimplemented.