CMS 3D CMS Logo

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 // The template header files
37 //#include "RecoLocalTracker/SiPixelRecHits/interface/SiPixelTemplateReco.h"
40 
41 #include <utility>
42 #include <vector>
43 
44 #if 0
45 
49 #endif
50 
51 class MagneticField;
52 class PixelCPEGeneric final : public PixelCPEBase {
53 public:
56  // The truncation value pix_maximum is an angle-dependent cutoff on the
57  // individual pixel signals. It should be applied to all pixels in the
58  // cluster [signal_i = fminf(signal_i, pixmax)] before the column and row
59  // sums are made. Morris
60  int pixmx;
61 
62  // These are errors predicted by PIXELAV
63  float sigmay; // CPE Generic y-error for multi-pixel cluster
64  float sigmax; // CPE Generic x-error for multi-pixel cluster
65  float sy1; // CPE Generic y-error for single single-pixel
66  float sy2; // CPE Generic y-error for single double-pixel cluster
67  float sx1; // CPE Generic x-error for single single-pixel cluster
68  float sx2; // CPE Generic x-error for single double-pixel cluster
69 
70  // These are irradiation bias corrections
71  float deltay; // CPE Generic y-bias for multi-pixel cluster
72  float deltax; // CPE Generic x-bias for multi-pixel cluster
73  float dy1; // CPE Generic y-bias for single single-pixel cluster
74  float dy2; // CPE Generic y-bias for single double-pixel cluster
75  float dx1; // CPE Generic x-bias for single single-pixel cluster
76  float dx2; // CPE Generic x-bias for single double-pixel cluster
77  };
78 
80  const MagneticField *,
81  const TrackerGeometry &,
82  const TrackerTopology &,
83  const SiPixelLorentzAngle *,
85  const SiPixelLorentzAngle *);
86 
87  ~PixelCPEGeneric() override { ; }
88 
90 
91 private:
92  ClusterParam *createClusterParam(const SiPixelCluster &cl) const override;
93 
94  LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override;
95  LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override;
96 
97  //--------------------------------------------------------------------
98  // Methods.
99  //------------------------------------------------------------------
100  float generic_position_formula(int size,
101  int Q_f,
102  int Q_l,
103  float upper_edge_first_pix,
104  float lower_edge_last_pix,
105  float lorentz_shift,
106  float theThickness, //detector thickness
107  float cot_angle,
108  float pitch,
109  bool first_is_big,
110  bool last_is_big,
111  float eff_charge_cut_low,
112  float eff_charge_cut_high,
113  float size_cut
114  ) const;
115 
116  void collect_edge_charges(ClusterParam &theClusterParam,
117  int &Q_f_X,
118  int &Q_l_X,
119  int &Q_f_Y,
120  int &Q_l_Y
121  ) const;
122 
123  //--- Errors squared in x and y. &&& Need to be revisited.
124  float err2X(bool &, int &) const;
125  float err2Y(bool &, int &) const;
126 
127  //--- Cuts made externally settable
134 
137 
140  //bool LoadTemplatesFromDB_;
144 
147 
152 
153  //--- DB Error Parametrization object, new light templates
154  std::vector<SiPixelGenErrorStore> thePixelGenError_;
155  //SiPixelCPEGenericDBErrorParametrization * genErrorsFromDB_;
156 };
157 
158 #endif
size
Write out results.
std::vector< float > xerr_barrel_l1_
float the_eff_charge_cut_highY
std::vector< float > xerr_barrel_ln_
std::vector< SiPixelGenErrorStore > thePixelGenError_
LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
bool IrradiationBiasCorrection_
std::vector< float > yerr_endcap_
PixelCPEGeneric(edm::ParameterSet const &conf, const MagneticField *, const TrackerGeometry &, const TrackerTopology &, const SiPixelLorentzAngle *, const SiPixelGenErrorDBObject *, const SiPixelLorentzAngle *)
The constructor.
~PixelCPEGeneric() override
float the_eff_charge_cut_lowX
bool inflate_all_errors_no_trk_angle
std::vector< float > xerr_endcap_
float the_eff_charge_cut_lowY
ClusterParam * createClusterParam(const SiPixelCluster &cl) const override
std::vector< float > yerr_barrel_l1_
std::vector< float > yerr_barrel_ln_
Pixel cluster – collection of neighboring pixels above threshold.
float generic_position_formula(int size, int Q_f, int 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
LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
float err2X(bool &, int &) const
static void fillPSetDescription(edm::ParameterSetDescription &desc)
ClusterParamGeneric(const SiPixelCluster &cl)
void collect_edge_charges(ClusterParam &theClusterParam, int &Q_f_X, int &Q_l_X, int &Q_f_Y, int &Q_l_Y) const
float err2Y(bool &, int &) const
float the_eff_charge_cut_highX