CMS 3D CMS Logo

RntStructs.h
Go to the documentation of this file.
1 #ifndef RecoTracker_MkFitCore_standalone_RntDumper_RntStructs_h
2 #define RecoTracker_MkFitCore_standalone_RntDumper_RntStructs_h
3 
4 // Avoid MkFit includes for now to simpligy pure ROOT builds.
5 // #include "RecoTracker/MkFitCore/interface/
6 
7 #include "ROOT/REveVector.hxx"
8 #include "Math/Point3D.h"
9 #include "Math/Vector3D.h"
10 
11 // From CMSSW data formats
13 typedef ROOT::Math::PositionVector3D<ROOT::Math::Cartesian3D<float> > XYZPointF;
15 typedef ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<float> > XYZVectorF;
17 typedef ROOT::Math::DisplacementVector3D<ROOT::Math::CylindricalEta3D<float> > RhoEtaPhiVectorF;
20 // typedef ROOT::Math::DisplacementVector3D<ROOT::Math::Polar3D<float> > RThetaPhiVectorF;
21 
22 using RVec = ROOT::Experimental::REveVector;
23 
24 struct HeaderLayer {
26  float qb_min, qb_max; // qbar layer limits, r for barrel, z for endcap
28 
29  HeaderLayer() = default;
30  HeaderLayer& operator=(const HeaderLayer&) = default;
31 };
32 
33 struct State {
35 
36  State() = default;
37  State& operator=(const State&) = default;
38 };
39 
40 struct PropState : public State {
41  float dalpha; // helix angle during propagation
42  int fail_flag;
43 
44  PropState() = default;
45  PropState& operator=(const PropState&) = default;
46 };
47 
48 struct SimSeedInfo {
53  bool has_sim = false;
54 
55  float good_frac() const { return (float)n_match / n_hits; }
56 
57  SimSeedInfo() = default;
58  SimSeedInfo& operator=(const SimSeedInfo&) = default;
59 };
60 
61 struct BinSearch {
62  float phi, dphi, q, dq;
63  short unsigned int p1, p2, q1, q2;
64  short int wsr;
65  bool wsr_in_gap;
66  bool has_nans = false;
67 
68  bool nan_check();
69 
70  BinSearch() = default;
71  BinSearch& operator=(const BinSearch&) = default;
72 };
73 
74 struct CandInfo {
80  bool has_nans = false;
81 
82  CandInfo(const SimSeedInfo& s, const State& c) : ssi(s), s_ctr(c) {}
83 
84  void nan_check();
85 
86  CandInfo() = default;
87  CandInfo& operator=(const CandInfo&) = default;
88 };
89 
94  bool has_nans = false;
95 
96  FailedPropInfo(const SimSeedInfo& s, const State& p, const State& f) : ssi(s), s_prev(p), s_final(f) {}
97 
98  void nan_check();
99 
100  FailedPropInfo() = default;
101  FailedPropInfo& operator=(const FailedPropInfo&) = default;
102 };
103 
104 #endif
float good_frac() const
Definition: RntStructs.h:55
SimSeedInfo()=default
short unsigned int p2
Definition: RntStructs.h:63
float dq
Definition: RntStructs.h:62
bool is_pix
Definition: RntStructs.h:27
HeaderLayer()=default
PropState ps_min
Definition: RntStructs.h:77
float phi
Definition: RntStructs.h:62
bool has_nans
Definition: RntStructs.h:80
float q
Definition: RntStructs.h:62
ROOT::Experimental::REveVector RVec
Definition: RntStructs.h:22
float dalpha
Definition: RntStructs.h:41
short unsigned int p1
Definition: RntStructs.h:63
bool wsr_in_gap
Definition: RntStructs.h:65
State()=default
int iter_algo
Definition: RntStructs.h:25
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float > > XYZVectorF
spatial vector with cartesian internal representation
Definition: RntStructs.h:15
bool nan_check()
Definition: RntStructs.cc:35
void nan_check()
Definition: RntStructs.cc:50
int seed_lbl
Definition: RntStructs.h:51
SimSeedInfo ssi
Definition: RntStructs.h:91
bool has_nans
Definition: RntStructs.h:66
float qb_max
Definition: RntStructs.h:26
float qb_min
Definition: RntStructs.h:26
RVec pos
Definition: RntStructs.h:34
int fail_flag
Definition: RntStructs.h:42
int eta_region
Definition: RntStructs.h:25
PropState ps_max
Definition: RntStructs.h:77
bool has_sim
Definition: RntStructs.h:53
FailedPropInfo()=default
double f[11][100]
State s_sim
Definition: RntStructs.h:49
short unsigned int q1
Definition: RntStructs.h:63
BinSearch bso
Definition: RntStructs.h:78
bool is_barrel
Definition: RntStructs.h:27
short unsigned int q2
Definition: RntStructs.h:63
short int wsr
Definition: RntStructs.h:64
RVec mom
Definition: RntStructs.h:34
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float > > XYZPointF
point in space with cartesian internal representation
Definition: RntStructs.h:13
SimSeedInfo & operator=(const SimSeedInfo &)=default
int iter_idx
Definition: RntStructs.h:25
float dphi
Definition: RntStructs.h:62
HeaderLayer & operator=(const HeaderLayer &)=default
BinSearch()=default
PropState()=default
ROOT::Math::DisplacementVector3D< ROOT::Math::CylindricalEta3D< float > > RhoEtaPhiVectorF
spatial vector with cylindrical internal representation using pseudorapidity
Definition: RntStructs.h:17
BinSearch & operator=(const BinSearch &)=default
CandInfo & operator=(const CandInfo &)=default
PropState & operator=(const PropState &)=default
FailedPropInfo(const SimSeedInfo &s, const State &p, const State &f)
Definition: RntStructs.h:96
BinSearch bsn
Definition: RntStructs.h:79
CandInfo()=default
SimSeedInfo ssi
Definition: RntStructs.h:75
int seed_idx
Definition: RntStructs.h:51
FailedPropInfo & operator=(const FailedPropInfo &)=default
CandInfo(const SimSeedInfo &s, const State &c)
Definition: RntStructs.h:82
State s_ctr
Definition: RntStructs.h:76
State s_seed
Definition: RntStructs.h:50
State & operator=(const State &)=default
void nan_check()
Definition: RntStructs.cc:43
bool is_stereo
Definition: RntStructs.h:27