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 // Already defined in the base class
37 //#include "Geometry/CommonDetUnit/interface/GeomDetType.h"
38 //#include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h"
39 //#include "Geometry/TrackerGeometryBuilder/interface/RectangularPixelTopology.h"
40 //#include "Geometry/CommonDetAlgo/interface/MeasurementPoint.h"
41 //#include "Geometry/CommonDetAlgo/interface/MeasurementError.h"
42 //#include "Geometry/Surface/interface/GloballyPositioned.h"
43 //#include "FWCore/ParameterSet/interface/ParameterSet.h"
44 
45 // The template header files
48 
49 
50 #include <utility>
51 #include <vector>
52 
53 
54 #if 0
55 
59 #endif
60 
61 class MagneticField;
63 {
64  public:
65  // PixelCPEGeneric( const DetUnit& det );
68 
69  LocalPoint localPosition (const SiPixelCluster& cluster, const GeomDetUnit & det) const;
70 
71  // However, we do need to implement localError().
72  LocalError localError (const SiPixelCluster& cl, const GeomDetUnit & det) const;
73 
75  const GeomDetUnit & det) const;
76 /* MeasurementError measurementError ( const SiPixelCluster&, */
77 /* const GeomDetUnit & det) const; */
78 
79 
80  private:
81  //--------------------------------------------------------------------
82  // Methods.
83  //------------------------------------------------------------------
84  double
86  double Q_f,
87  double Q_l,
88  double upper_edge_first_pix,
89  double lower_edge_last_pix,
90  double half_lorentz_shift,
91  double cot_angle,
92  double pitch,
93  bool first_is_big,
94  bool last_is_big,
95  double eff_charge_cut_low,
96  double eff_charge_cut_high,
97  double size_cut
98  ) const;
99 
100  void
101  collect_edge_charges(const SiPixelCluster& cluster,
102  float & Q_f_X,
103  float & Q_l_X,
104  float & Q_m_X,
105  float & Q_f_Y,
106  float & Q_l_Y,
107  float & Q_m_Y
108  ) const;
109 
110 
111  //--- Errors squared in x and y. &&& Need to be revisited.
112  float err2X(bool&, int&) const;
113  float err2Y(bool&, int&) const;
114 
115  //--- Cuts made externally settable
122 
125 
131 
134 
135  //--- DB Error Parametrization object
137 
139  mutable int templID_;
140 
141  // The truncation value pix_maximum is an angle-dependent cutoff on the
142  // individual pixel signals. It should be applied to all pixels in the
143  // cluster [signal_i = fminf(signal_i, pixmax)] before the column and row
144  // sums are made. Morris
145  mutable float pixmx;
146 
147  // These are errors predicted by PIXELAV
148  mutable float sigmay; // CPE Generic y-error for multi-pixel cluster
149  mutable float sigmax; // CPE Generic x-error for multi-pixel cluster
150  mutable float sy1 ; // CPE Generic y-error for single single-pixel
151  mutable float sy2 ; // CPE Generic y-error for single double-pixel cluster
152  mutable float sx1 ; // CPE Generic x-error for single single-pixel cluster
153  mutable float sx2 ; // CPE Generic x-error for single double-pixel cluster
154 
155  // These are irradiation bias corrections
156  mutable float deltay; // CPE Generic y-bias for multi-pixel cluster
157  mutable float deltax; // CPE Generic x-bias for multi-pixel cluster
158  mutable float dy1 ; // CPE Generic y-bias for single single-pixel cluster
159  mutable float dy2 ; // CPE Generic y-bias for single double-pixel cluster
160  mutable float dx1 ; // CPE Generic x-bias for single single-pixel cluster
161  mutable float dx2 ; // CPE Generic x-bias for single double-pixel cluster
162 
163 
164  protected:
165  //--- These functions are no longer needed, yet they are declared
166  //--- pure virtual in the base class.
167  float xpos( const SiPixelCluster& ) const { return -999000.0; } // &&& should abort
168  float ypos( const SiPixelCluster& ) const { return -999000.0; } // &&& should abort
169 
170 };
171 
172 #endif
173 
174 
175 
176 
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_
float ypos(const SiPixelCluster &) const
bool IrradiationBiasCorrection_
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
LocalError localError(const SiPixelCluster &cl, const GeomDetUnit &det) const
MeasurementPoint measurementPosition(const SiPixelCluster &, const GeomDetUnit &det) const
SiPixelTemplate templ_
tuple conf
Definition: dbtoconf.py:185
float xpos(const SiPixelCluster &) const
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