CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixelCPEGeneric.h
Go to the documentation of this file.
1 #ifndef RecoLocalTracker_SiPixelRecHits_PixelCPEGeneric_H
2 #define RecoLocalTracker_SiPixelRecHits_PixelCPEGeneric_H
3 
4 // \class PixelCPEGeneric -- a generalized CPE reco for the idealized detector
5 //
6 // The basic idea of this class is to use generic formulae in order
7 // to achieve clean and minimal code. It should work for
8 // - both normal and big pixels
9 // - both barrel and forward
10 // - both "FromDetPosition" and "FromTrackAngles" (i.e. by the track fit)
11 //
12 // This is possible since, in its nature, the original "ORCA" algorithm by
13 // Danek and Susana is the same in both X and Y directions, provided that
14 // one correctly computes angles alpha_ and beta_ up front. Thus, all
15 // geometrical and special corrections are dropped, since the presumption
16 // is that alpha_ and beta_ are determined as best as possible. That means
17 // that they either come from the track, or, if they come from the
18 // position of the DetUnit, they include all geometrical information
19 // possible for this DetUnit:
20 // - for both the barrel and the forward, we use the cluster position
21 // instead of the center of the module/plaquette
22 // - for the forward, the tilt of the blades is included too
23 //
24 // In addtion, anything which is special for the computation of the lorentz
25 // angle is done in setTheDet() method. So the algorithm per se does not
26 // need to worry about it. This includes extra E*B term (a.k.a. "alpha2Order")
27 // and extra tilt in the forward.
28 //
29 // Thus, the formula for the computation of the hit position is very
30 // simple, and is described in Morris's note (IN ???) on the generalizaton
31 // of the pixel algorithm.
32 
35 
36 
37 // The template header files
40 
41 
42 #include <utility>
43 #include <vector>
44 
45 
46 #if 0
47 
51 #endif
52 
53 class MagneticField;
55 {
56  public:
57  // PixelCPEGeneric( const DetUnit& det );
60 
61  LocalPoint localPosition (const SiPixelCluster& cluster, const GeomDetUnit & det) const;
62 
63  // However, we do need to implement localError().
64  LocalError localError (const SiPixelCluster& cl, const GeomDetUnit & det) const;
65 
66  private:
67  //--------------------------------------------------------------------
68  // Methods.
69  //------------------------------------------------------------------
70  double
72  double Q_f,
73  double Q_l,
74  double upper_edge_first_pix,
75  double lower_edge_last_pix,
76  double half_lorentz_shift,
77  double cot_angle,
78  double pitch,
79  bool first_is_big,
80  bool last_is_big,
81  double eff_charge_cut_low,
82  double eff_charge_cut_high,
83  double size_cut
84  ) const;
85 
86  void
87  collect_edge_charges(const SiPixelCluster& cluster,
88  float & Q_f_X,
89  float & Q_l_X,
90  float & Q_m_X,
91  float & Q_f_Y,
92  float & Q_l_Y,
93  float & Q_m_Y
94  ) const;
95 
96 
97  //--- Errors squared in x and y. &&& Need to be revisited.
98  float err2X(bool&, int&) const;
99  float err2Y(bool&, int&) const;
100 
101  //--- Cuts made externally settable
108 
111 
118 
121 
126 
127 
128  //--- DB Error Parametrization object
130 
132  mutable int templID_;
133 
134  // The truncation value pix_maximum is an angle-dependent cutoff on the
135  // individual pixel signals. It should be applied to all pixels in the
136  // cluster [signal_i = fminf(signal_i, pixmax)] before the column and row
137  // sums are made. Morris
138  mutable float pixmx;
139 
140  // These are errors predicted by PIXELAV
141  mutable float sigmay; // CPE Generic y-error for multi-pixel cluster
142  mutable float sigmax; // CPE Generic x-error for multi-pixel cluster
143  mutable float sy1 ; // CPE Generic y-error for single single-pixel
144  mutable float sy2 ; // CPE Generic y-error for single double-pixel cluster
145  mutable float sx1 ; // CPE Generic x-error for single single-pixel cluster
146  mutable float sx2 ; // CPE Generic x-error for single double-pixel cluster
147 
148  // These are irradiation bias corrections
149  mutable float deltay; // CPE Generic y-bias for multi-pixel cluster
150  mutable float deltax; // CPE Generic x-bias for multi-pixel cluster
151  mutable float dy1 ; // CPE Generic y-bias for single single-pixel cluster
152  mutable float dy2 ; // CPE Generic y-bias for single double-pixel cluster
153  mutable float dx1 ; // CPE Generic x-bias for single single-pixel cluster
154  mutable float dx2 ; // CPE Generic x-bias for single double-pixel cluster
155 
156 
157  protected:
158  //--- These functions are no longer needed, yet they are declared
159  //--- pure virtual in the base class.
160  float xpos( const SiPixelCluster& ) const { return -999000.0; } // &&& should abort
161  float ypos( const SiPixelCluster& ) const { return -999000.0; } // &&& should abort
162 
163 };
164 
165 #endif
166 
167 
168 
169 
std::vector< float > xerr_barrel_l1_
void collect_edge_charges(const SiPixelCluster &cluster, float &Q_f_X, float &Q_l_X, float &Q_m_X, float &Q_f_Y, float &Q_l_Y, float &Q_m_Y) const
double generic_position_formula(int size, double Q_f, double Q_l, double upper_edge_first_pix, double lower_edge_last_pix, double half_lorentz_shift, double cot_angle, double pitch, bool first_is_big, bool last_is_big, double eff_charge_cut_low, double eff_charge_cut_high, double size_cut) const
SiPixelCPEGenericDBErrorParametrization * genErrorsFromDB_
std::vector< float > xerr_barrel_ln_
float ypos(const SiPixelCluster &) const
bool IrradiationBiasCorrection_
std::vector< float > yerr_endcap_
double the_eff_charge_cut_highX
LocalPoint localPosition(const SiPixelCluster &cluster, const GeomDetUnit &det) const
double the_eff_charge_cut_lowY
PixelCPEGeneric(edm::ParameterSet const &conf, const MagneticField *, const SiPixelLorentzAngle *, const SiPixelCPEGenericErrorParm *, const SiPixelTemplateDBObject *)
The constructor.
bool inflate_all_errors_no_trk_angle
std::vector< float > xerr_endcap_
LocalError localError(const SiPixelCluster &cl, const GeomDetUnit &det) const
SiPixelTemplate templ_
tuple conf
Definition: dbtoconf.py:185
float xpos(const SiPixelCluster &) const
std::vector< float > yerr_barrel_l1_
std::vector< float > yerr_barrel_ln_
Pixel cluster – collection of neighboring pixels above threshold.
double the_eff_charge_cut_lowX
float err2X(bool &, int &) const
double the_eff_charge_cut_highY
tuple size
Write out results.
float err2Y(bool &, int &) const