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  std::unique_ptr<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  void collect_edge_charges(ClusterParam &theClusterParam,
101  int &Q_f_X,
102  int &Q_l_X,
103  int &Q_f_Y,
104  int &Q_l_Y
105  ) const;
106 
107  //--- Errors squared in x and y. &&& Need to be revisited.
108  float err2X(bool &, int &) const;
109  float err2Y(bool &, int &) const;
110 
111  //--- Cuts made externally settable
118 
121 
128 
131 
136 
137  //--- DB Error Parametrization object, new light templates
138  std::vector<SiPixelGenErrorStore> thePixelGenError_;
139  //SiPixelCPEGenericDBErrorParametrization * genErrorsFromDB_;
140 };
141 
142 #endif
PixelCPEGeneric::localError
LocalError localError(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
Definition: PixelCPEGeneric.cc:449
PixelCPEBase::ClusterParam
Definition: PixelCPEBase.h:80
PixelCPEGeneric::yerr_barrel_ln_def_
float yerr_barrel_ln_def_
Definition: PixelCPEGeneric.h:135
PixelCPEGeneric::xerr_barrel_l1_def_
float xerr_barrel_l1_def_
Definition: PixelCPEGeneric.h:134
PixelCPEGeneric::ClusterParamGeneric::pixmx
int pixmx
Definition: PixelCPEGeneric.h:60
PixelCPEGeneric::collect_edge_charges
void collect_edge_charges(ClusterParam &theClusterParam, int &Q_f_X, int &Q_l_X, int &Q_f_Y, int &Q_l_Y) const
Definition: PixelCPEGeneric.cc:400
PixelCPEGeneric::ClusterParamGeneric::dy1
float dy1
Definition: PixelCPEGeneric.h:73
PixelCPEGeneric::ClusterParamGeneric::sy2
float sy2
Definition: PixelCPEGeneric.h:66
SiPixelGenError.h
PixelCPEGeneric::ClusterParamGeneric::ClusterParamGeneric
ClusterParamGeneric(const SiPixelCluster &cl)
Definition: PixelCPEGeneric.h:55
TrackerTopology
Definition: TrackerTopology.h:16
SiPixelCPEGenericDBErrorParametrization.h
PixelCPEGeneric::EdgeClusterErrorY_
float EdgeClusterErrorY_
Definition: PixelCPEGeneric.h:130
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PixelCPEBase.h
PixelCPEGeneric::ClusterParamGeneric::sx1
float sx1
Definition: PixelCPEGeneric.h:67
PixelCPEGeneric::DoCosmics_
bool DoCosmics_
Definition: PixelCPEGeneric.h:123
SiPixelCluster
Pixel cluster – collection of neighboring pixels above threshold.
Definition: SiPixelCluster.h:27
PixelCPEGeneric::createClusterParam
std::unique_ptr< ClusterParam > createClusterParam(const SiPixelCluster &cl) const override
Definition: PixelCPEGeneric.cc:146
PixelCPEGeneric::localPosition
LocalPoint localPosition(DetParam const &theDetParam, ClusterParam &theClusterParam) const override
Definition: PixelCPEGeneric.cc:155
PixelCPEGeneric::thePixelGenError_
std::vector< SiPixelGenErrorStore > thePixelGenError_
Definition: PixelCPEGeneric.h:138
GetRecoTauVFromDQM_MC_cff.cl
cl
Definition: GetRecoTauVFromDQM_MC_cff.py:38
PixelCPEGeneric::ClusterParamGeneric::dx1
float dx1
Definition: PixelCPEGeneric.h:75
PixelCPEGeneric::xerr_barrel_l1_
std::vector< float > xerr_barrel_l1_
Definition: PixelCPEGeneric.h:132
PixelCPEGeneric::the_size_cutX
float the_size_cutX
Definition: PixelCPEGeneric.h:116
SiPixelTemplate.h
PixelCPEGeneric::EdgeClusterErrorX_
float EdgeClusterErrorX_
Definition: PixelCPEGeneric.h:129
PixelCPEGeneric::ClusterParamGeneric
Definition: PixelCPEGeneric.h:54
PixelCPEGeneric::the_eff_charge_cut_lowX
float the_eff_charge_cut_lowX
Definition: PixelCPEGeneric.h:112
PixelCPEGeneric::IrradiationBiasCorrection_
bool IrradiationBiasCorrection_
Definition: PixelCPEGeneric.h:125
PixelCPEGeneric::the_size_cutY
float the_size_cutY
Definition: PixelCPEGeneric.h:117
PixelCPEGeneric::ClusterParamGeneric::sy1
float sy1
Definition: PixelCPEGeneric.h:65
PixelCPEGeneric::NoTemplateErrorsWhenNoTrkAngles_
bool NoTemplateErrorsWhenNoTrkAngles_
Definition: PixelCPEGeneric.h:127
PixelCPEGeneric
Definition: PixelCPEGeneric.h:52
PixelCPEGeneric::the_eff_charge_cut_lowY
float the_eff_charge_cut_lowY
Definition: PixelCPEGeneric.h:113
PixelCPEGeneric::err2Y
float err2Y(bool &, int &) const
SiPixelLorentzAngle
Definition: SiPixelLorentzAngle.h:11
PixelCPEGeneric::PixelCPEGeneric
PixelCPEGeneric(edm::ParameterSet const &conf, const MagneticField *, const TrackerGeometry &, const TrackerTopology &, const SiPixelLorentzAngle *, const SiPixelGenErrorDBObject *, const SiPixelLorentzAngle *)
The constructor.
Definition: PixelCPEGeneric.cc:30
Point3DBase< float, LocalTag >
PixelCPEGeneric::TruncatePixelCharge_
bool TruncatePixelCharge_
Definition: PixelCPEGeneric.h:124
PixelCPEGeneric::ClusterParamGeneric::sigmax
float sigmax
Definition: PixelCPEGeneric.h:64
PixelCPEGeneric::the_eff_charge_cut_highX
float the_eff_charge_cut_highX
Definition: PixelCPEGeneric.h:114
PixelCPEGeneric::xerr_barrel_ln_def_
float xerr_barrel_ln_def_
Definition: PixelCPEGeneric.h:134
edm::ParameterSet
Definition: ParameterSet.h:36
LocalError
Definition: LocalError.h:12
PixelCPEGeneric::ClusterParamGeneric::dy2
float dy2
Definition: PixelCPEGeneric.h:74
PixelCPEGeneric::ClusterParamGeneric::sigmay
float sigmay
Definition: PixelCPEGeneric.h:63
PixelCPEGeneric::yerr_barrel_l1_
std::vector< float > yerr_barrel_l1_
Definition: PixelCPEGeneric.h:132
PixelCPEGeneric::the_eff_charge_cut_highY
float the_eff_charge_cut_highY
Definition: PixelCPEGeneric.h:115
PixelCPEGeneric::ClusterParamGeneric::deltay
float deltay
Definition: PixelCPEGeneric.h:71
PixelCPEGeneric::yerr_endcap_
std::vector< float > yerr_endcap_
Definition: PixelCPEGeneric.h:133
PixelCPEGeneric::xerr_barrel_ln_
std::vector< float > xerr_barrel_ln_
Definition: PixelCPEGeneric.h:132
PixelCPEGeneric::xerr_endcap_
std::vector< float > xerr_endcap_
Definition: PixelCPEGeneric.h:133
PixelCPEGeneric::err2X
float err2X(bool &, int &) const
PixelCPEGeneric::yerr_barrel_l1_def_
float yerr_barrel_l1_def_
Definition: PixelCPEGeneric.h:134
PixelCPEGeneric::ClusterParamGeneric::dx2
float dx2
Definition: PixelCPEGeneric.h:76
PixelCPEGeneric::UseErrorsFromTemplates_
bool UseErrorsFromTemplates_
Definition: PixelCPEGeneric.h:122
PixelCPEGeneric::~PixelCPEGeneric
~PixelCPEGeneric() override
Definition: PixelCPEGeneric.h:87
PixelCPEGeneric::yerr_endcap_def_
float yerr_endcap_def_
Definition: PixelCPEGeneric.h:135
PixelCPEBase
Definition: PixelCPEBase.h:54
PixelCPEGeneric::fillPSetDescription
static void fillPSetDescription(edm::ParameterSetDescription &desc)
Definition: PixelCPEGeneric.cc:630
SiPixelGenErrorDBObject
Definition: SiPixelGenErrorDBObject.h:16
PixelCPEGeneric::ClusterParamGeneric::sx2
float sx2
Definition: PixelCPEGeneric.h:68
PixelCPEGeneric::yerr_barrel_ln_
std::vector< float > yerr_barrel_ln_
Definition: PixelCPEGeneric.h:133
MagneticField
Definition: MagneticField.h:19
PixelCPEGeneric::ClusterParamGeneric::deltax
float deltax
Definition: PixelCPEGeneric.h:72
PixelCPEGeneric::inflate_errors
bool inflate_errors
Definition: PixelCPEGeneric.h:119
PixelCPEGeneric::isUpgrade_
bool isUpgrade_
Definition: PixelCPEGeneric.h:126
PixelCPEGeneric::xerr_endcap_def_
float xerr_endcap_def_
Definition: PixelCPEGeneric.h:135
PixelCPEGeneric::inflate_all_errors_no_trk_angle
bool inflate_all_errors_no_trk_angle
Definition: PixelCPEGeneric.h:120
TrackerGeometry
Definition: TrackerGeometry.h:14