예제 #1
0
 def draw_v(self, cut=None, pl=None, **dkw):
     return self.Draw.distribution(
         self.dv(cut, pl) * 1e3,
         **prep_kw(dkw,
                   r=[-300, 300],
                   title='Y Residuals',
                   x_tit='Residual [#mum]'))
예제 #2
0
 def draw_vs_tp(self, **dkw):
     x, y = [
         f(cut=self.Cut.exclude('tp'))
         for f in [self.get_trigger_phase, self.get_values]
     ]  # noqa
     return self.Draw.efficiency(
         x, y / 100, bins.TP, 'Efficiency vs. Trigger Phase',
         **prep_kw(dkw, x_tit='Trigger Phase', **self.y_args))
예제 #3
0
 def draw_y_map(self, res=.3, cut=None, fid=False, pl=None, **dkw):
     (x, y), z_ = [
         f(cut=self.Cut.get_nofid(cut, fid), pl=pl)
         for f in [self.txy, self.dy]
     ]  # noqa
     self.Draw.prof2d(
         x, y, z_, bins.get_local(self.Plane, res), 'Residuals',
         **prep_kw(dkw, z_tit='Residuals [Row]', **self.ax_tits(True)))
예제 #4
0
 def draw_udv(self, cut=None, prof=True, pl=None, **dkw):
     return self._draw_angle(self.get_u(cut, pl),
                             self.dv(cut, pl),
                             prof,
                             pl=pl,
                             **prep_kw(dkw,
                                       title='X dY',
                                       x_tit='X [mm]',
                                       y_tit='dY [mm]'))
예제 #5
0
 def draw_xdy(self, cut=None, prof=True, pl=None, **dkw):
     self._draw_angle(self.tx(cut, pl),
                      self.dy(cut, pl),
                      prof,
                      pl=pl,
                      local=True,
                      **prep_kw(dkw,
                                title='X dY',
                                x_tit='X [Cols]',
                                y_tit='dY [Rows]'))
예제 #6
0
 def draw_vdu(self, cut=None, prof=True, pl=None, **dkw):
     return self._draw_angle(self.get_v(cut, pl),
                             self.du(cut, pl),
                             prof,
                             pl=pl,
                             xb=False,
                             **prep_kw(dkw,
                                       title='Y dX',
                                       x_tit='Y [mm]',
                                       y_tit='dX [mm]'))
예제 #7
0
 def draw_ydx(self, cut=None, prof=True, pl=None, **dkw):
     self._draw_angle(self.ty(cut, pl),
                      self.dx(cut, pl),
                      prof,
                      pl=pl,
                      xb=False,
                      local=True,
                      **prep_kw(dkw,
                                title='Y dX',
                                x_tit='Y [Rows]',
                                y_tit='dX [Cols]'))
예제 #8
0
 def draw_xy(self, bw=10, cut=None, pl=None, **dkw):
     x, y = array([
         f(cut=self.Cut.exclude('res', cut), pl=pl)
         for f in [self.du, self.dv]
     ]) * 1e3  # noqa
     self.Draw.histo_2d(
         x, y,
         bins.make(-1000, 1000, bw) * 2,
         **prep_kw(dkw,
                   title='XY Residual',
                   x_tit='dX [#mum]',
                   y_tit='dY [#mum]'))
예제 #9
0
 def draw_map(self,
              res=.3,
              local=True,
              cut=None,
              fid=False,
              pl=None,
              **dkw):
     (x, y), z_ = [
         f(cut=self.Cut.get_nofid(fid, cut), pl=pl)
         for f in [partial(self.get_txy, local=local), self]
     ]
     self.Draw.prof2d(
         x, y, z_ * 1e3, bins.get_xy(local, self.Plane, res), 'Residuals',
         **prep_kw(dkw, z_tit='Residuals [#mum]', **self.ax_tits(local)))
예제 #10
0
 def draw_segment_distribution(self,
                               nx=10,
                               ny=15,
                               cut=None,
                               segments=True,
                               **dkw):
     e = self.get_segment_values(
         nx, ny, cut).flatten() if segments else get_2d_hist_vec(
             self.draw_map(.5, show=False), err=False)
     self.Draw.distribution(
         e,
         **prep_kw(dkw,
                   title='Segment Efficiencies',
                   x_tit='Efficiency [%]'))
예제 #11
0
 def draw_map(self,
              res=.5,
              local=True,
              eff=True,
              both=False,
              fid=False,
              cut=None,
              **dkw):
     (x, y), e = [
         f(cut=self.Cut.get_nofid(cut, fid)) for f in
         [partial(self.Tracks.get_xy, local=local), self.get_values]
     ]
     p = self.Draw.prof2d(
         x, y, e,
         **prep_kw(dkw,
                   title='Efficiency Map',
                   binning=bins.get_xy(local, self.Plane, res),
                   **self.ax_tits(local)))
     self.draw_text(self.Surface, cut, eff)
     self.draw_text(not self.Surface, cut, eff and both)
     return p
예제 #12
0
 def draw(self, bw=10, pl=None, **dkw):
     self.Draw.distribution(
         self(cut=False, pl=pl) * 1e3, bins.make(0, 1000, bw),
         **prep_kw(dkw, title='Residuals', x_tit='Residual [#mum]'))
예제 #13
0
 def draw_y(self, cut=None, pl=None, **dkw):
     return self.Draw.distribution(
         self.dy(cut, pl),
         **prep_kw(dkw, title='Y Residuals', x_tit='Residual [Rows]'))
예제 #14
0
 def draw_x(self, cut=None, pl=None, **dkw):
     return self.Draw.distribution(
         self.dx(cut, pl),
         **prep_kw(dkw, title='X Residuals', x_tit='Residual [Columns]'))
예제 #15
0
 def draw(self, bw=None, **dkw):
     t, e = self.get_time(), self.get_values() / 100
     return self.Draw.efficiency(
         t, e,
         **prep_kw(dkw, w=bw, **self.t_args(), **self.y_args, stats=False))