ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FourHitSeedFinder_breakRecursion.cpp
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FourHitSeedFinder_breakRecursion.cpp
1 #include "FourHitSeedFinder.h"
2 #include <cmath>
3 #include <iostream>
4 #include <algorithm>
5 
6 
7 using namespace std;
8 
9 
10 bool FourHitSeedFinder::breakRecursion(const vector<SimpleHit3D>& hits, const HelixRange& range)
11 {
12 // if(0.003*Bfield/range.max_k > 1.0){return false;}
13 // else
14 // {
15 // if( ( (range.max_phi - range.min_phi)/0.025 + (range.max_d - range.min_d)/0.02 ) < 4. ){return true;}
16 // }
17  return false;
18 }
19 
20 
21 float FourHitSeedFinder::phiError(SimpleHit3D& hit, float min_k, float max_k, float min_dzdl, float max_dzdl)
22 {
23  if(3.33333333333333314e+02*max_k*Bfield_inv < 1.0){return 0.;}
24 
25  float p_inv = 3.33333333333333314e+02*max_k*Bfield_inv*sqrt(1. - max_dzdl*max_dzdl);
26  float scatter = 0.;
27  for(int l=0;l<hit.layer;++l)
28  {
29  scatter += detector_scatter[l]*detector_scatter[l];
30  }
31  scatter = p_inv*sqrt(scatter)*0.5;
32  return scatter;
33 }
34 
35 
36 float FourHitSeedFinder::dzdlError(SimpleHit3D& hit, float min_k, float max_k, float min_dzdl, float max_dzdl)
37 {
38  if(3.33333333333333314e+02*max_k*Bfield_inv < 1.0){return 0.;}
39 
40  float p_inv = 3.33333333333333314e+02*max_k*Bfield_inv*sqrt(1. - max_dzdl*max_dzdl);
41  float scatter = 0.;
42  for(int l=0;l<hit.layer;++l)
43  {
44  scatter += detector_scatter[l]*detector_scatter[l];
45  }
46  scatter = p_inv*sqrt(scatter)*0.5;
47  return scatter;
48 }