test
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
38 //#include "RecoLocalTracker/SiPixelRecHits/interface/SiPixelTemplateReco.h"
41 
42 
43 #include <utility>
44 #include <vector>
45 
46 //#define NEW_CPEERROR // must be constistent with base.cc, generic cc/h and genericProducer.cc
47 
48 #if 0
49 
53 #endif
54 
55 class MagneticField;
57 {
58  public:
59  struct ClusterParamGeneric : ClusterParam
60  {
62  // The truncation value pix_maximum is an angle-dependent cutoff on the
63  // individual pixel signals. It should be applied to all pixels in the
64  // cluster [signal_i = fminf(signal_i, pixmax)] before the column and row
65  // sums are made. Morris
66  float pixmx;
67 
68  // These are errors predicted by PIXELAV
69  float sigmay; // CPE Generic y-error for multi-pixel cluster
70  float sigmax; // CPE Generic x-error for multi-pixel cluster
71  float sy1 ; // CPE Generic y-error for single single-pixel
72  float sy2 ; // CPE Generic y-error for single double-pixel cluster
73  float sx1 ; // CPE Generic x-error for single single-pixel cluster
74  float sx2 ; // CPE Generic x-error for single double-pixel cluster
75 
76  // These are irradiation bias corrections
77  float deltay; // CPE Generic y-bias for multi-pixel cluster
78  float deltax; // CPE Generic x-bias for multi-pixel cluster
79  float dy1 ; // CPE Generic y-bias for single single-pixel cluster
80  float dy2 ; // CPE Generic y-bias for single double-pixel cluster
81  float dx1 ; // CPE Generic x-bias for single single-pixel cluster
82  float dx2 ; // CPE Generic x-bias for single double-pixel cluster
83  };
84 
85 #ifdef NEW_CPEERROR
87  const TrackerGeometry&, const SiPixelLorentzAngle *,
89 #else
93 #endif
94 
96 
97 
98 
99 private:
100  ClusterParam * createClusterParam(const SiPixelCluster & cl) const;
101 
102  LocalPoint localPosition (DetParam const & theDetParam, ClusterParam & theClusterParam) const;
103  LocalError localError (DetParam const & theDetParam, ClusterParam & theClusterParam) const;
104 
105  //--------------------------------------------------------------------
106  // Methods.
107  //------------------------------------------------------------------
108  float
110  float Q_f,
111  float Q_l,
112  float upper_edge_first_pix,
113  float lower_edge_last_pix,
114  float lorentz_shift,
115  float theThickness, //detector thickness
116  float cot_angle,
117  float pitch,
118  bool first_is_big,
119  bool last_is_big,
120  float eff_charge_cut_low,
121  float eff_charge_cut_high,
122  float size_cut
123  ) const;
124 
125  void
126  collect_edge_charges(ClusterParam & theClusterParam,
127  float & Q_f_X,
128  float & Q_l_X,
129  float & Q_f_Y,
130  float & Q_l_Y
131  ) const;
132 
133 
134  //--- Errors squared in x and y. &&& Need to be revisited.
135  float err2X(bool&, int&) const;
136  float err2Y(bool&, int&) const;
137 
138  //--- Cuts made externally settable
145 
148 
151  //bool LoadTemplatesFromDB_;
155 
158 
163 
164  //--- DB Error Parametrization object, new light templates
165  std::vector< SiPixelGenErrorStore > thePixelGenError_;
166  //SiPixelCPEGenericDBErrorParametrization * genErrorsFromDB_;
167 
168 #ifndef NEW_CPEERROR
169  // For old template errors
170  std::vector< SiPixelTemplateStore > thePixelTemp_;
171 #endif
172 
173 };
174 
175 #endif
176 
177 
178 
179 
std::vector< float > xerr_barrel_l1_
float the_eff_charge_cut_highY
std::vector< float > xerr_barrel_ln_
ClusterParam(const SiPixelCluster &cl)
Definition: PixelCPEBase.h:86
std::vector< SiPixelGenErrorStore > thePixelGenError_
PixelCPEGeneric(edm::ParameterSet const &conf, const MagneticField *, const TrackerGeometry &, const SiPixelLorentzAngle *, const SiPixelGenErrorDBObject *, const SiPixelTemplateDBObject *, const SiPixelLorentzAngle *)
The constructor.
bool IrradiationBiasCorrection_
std::vector< float > yerr_endcap_
float the_eff_charge_cut_lowX
bool inflate_all_errors_no_trk_angle
void collect_edge_charges(ClusterParam &theClusterParam, float &Q_f_X, float &Q_l_X, float &Q_f_Y, float &Q_l_Y) const
float generic_position_formula(int size, float Q_f, float Q_l, float upper_edge_first_pix, float lower_edge_last_pix, float lorentz_shift, float theThickness, float cot_angle, float pitch, bool first_is_big, bool last_is_big, float eff_charge_cut_low, float eff_charge_cut_high, float size_cut) const
std::vector< float > xerr_endcap_
tuple conf
Definition: dbtoconf.py:185
float the_eff_charge_cut_lowY
std::vector< float > yerr_barrel_l1_
std::vector< float > yerr_barrel_ln_
Pixel cluster – collection of neighboring pixels above threshold.
LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const
std::vector< SiPixelTemplateStore > thePixelTemp_
float err2X(bool &, int &) const
LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const
ClusterParamGeneric(const SiPixelCluster &cl)
tuple size
Write out results.
float err2Y(bool &, int &) const
float the_eff_charge_cut_highX
ClusterParam * createClusterParam(const SiPixelCluster &cl) const