"MarlinReco"  1.32.0
KITutil.h
1 #ifndef KITUTIL_h
2 #define KITUTIL_h 1
3 
4 #include "lcio.h"
5 #include "EVENT/LCIO.h"
6 #include <EVENT/SimCalorimeterHit.h>
7 #include <EVENT/CalorimeterHit.h>
8 #include <vector>
9 #include <list>
10 #include <stack>
11 #include <string>
12 #include <UTIL/CellIDDecoder.h>
13 #include "Phys_Geom_Database.h"
14 #include <gsl/gsl_vector.h>
15 #include <gsl/gsl_matrix.h>
16 #include <gsl/gsl_blas.h>
17 #include <gsl/gsl_linalg.h>
18 #include <gsl/gsl_eigen.h>
19 #include <gsl/gsl_multifit_nlin.h>
20 #include <gsl/gsl_rng.h>
21 #include <gsl/gsl_sf_gamma.h>
22 #include <gsl/gsl_integration.h>
23 #include <gsl/gsl_sf_pow_int.h>
24 #include <ANN/ANN.h>
25 
26 using namespace lcio;
27 using namespace std;
28 
29 class Tmpcl2;
35 class Superhit2
36 {
37  public:
38 
39  Superhit2(const Superhit2&) = delete;
40  Superhit2& operator=(const Superhit2&) = delete;
45  Superhit2(float E,CalorimeterHit* chitin);
49  ~Superhit2();
53  const float* getPosition(int i);
57  CalorimeterHit* chit{};
58 
59  bool connect{};
63  float point[3]{}; // transform position
67  float pointt[3]{}; // true position
71  float mip{};
75  float mipE{};
79  int top{}; // topological parameter
83  bool is_assigned{};
87  vector <Superhit2*> neighbours{};
91  Tmpcl2 * cl{};
95  int S{};
99  int K{};
103  int M{};
107  int tip{};
108 
109 };
114 class Tmpcl2{
115 
116  public :
120  Tmpcl2();
124  ~Tmpcl2();
128  void calcCenter();
132  double* getCenter();
136  double getEnergy();
140  void findInertia();
141 
142  // vector<Superhit2*> konektori;
146  vector<Superhit2*> hits{};
150  vector<Tmpcl2*> daughters{};
154  vector<Tmpcl2*> parents{};
158  double energy{};
162  double center[3]{};
166  double direction[3]{};
170  double inteigen[3]{};
174  double inteigenvec[9]{};
175 
179  int type{};
180 };
181 
182 class Photon2
183 {
184 
185  public:
189  Photon2(double Ein,double* pravac, double* pocetak);
193  ~Photon2();
194 
195  void Prob(CalorimeterHit* ch,double cut,double* out);
196 
197  // data- stvari koje se racunaju jednom i gotovo
198  double z1{};
199  double z2{};
200  double k1{};
201  double k2{};
202  double k3{};
203  double k4{};
204  double p1{};
205  double p2{};
206  double p3{};
207  double y{};
208  double eprime{};
209  double Z{};
210  double x0eff{};
211  double sampling{};
212  double Eceff{};
213  double Rm{};
214  double Fs{};
215  double Thom{};
216  double Tsam{};
217 
218  double alfahom{};
219  double alfasam{};
220  double betasam{};
221  //
222  double Ee{};
223  double dir[3]{};
224  double start[3]{};
225 };
226 typedef vector<Superhit2*> Shitvec2;
227 typedef vector<Tmpcl2*> Tmpclvec2;
228 
232 typedef struct{
236  int level;
240  double Enom;
244  double a;
248  double b;
252  double Emin;
256  double Emax;
257 } CoreCalib2;
258 
262 typedef struct{
270  int level;
274  double X[3];
278  bool active;
279 }PROTSEED2;
280 
284 typedef struct{
288  double Rcut;
292  double Distcut;
296  double Coscut;
300  unsigned int MinHit0;
304  unsigned int MinHitSplit;
305 }CoreCut2;
306 
307 
312 void CreateAllShits2(LCCollection* colt,CellIDDecoder<CalorimeterHit>& id,vector<Superhit2*>* calo);
313 
318 void TotalPrecalc2(vector<Superhit2*>* calo,CellIDDecoder<CalorimeterHit>& id,
319  unsigned int nelem, int Ncut);
323 void Precalc2(vector< Superhit2* >& shvec,double r, double z, double cell, double dist,bool tip,int stove,int module,CellIDDecoder<CalorimeterHit>& id);
324 
328 void GridTransform2( CalorimeterHit* clh,float& radius, float& halfz, float& cellsize,float*X,
329  bool tip,int stove,int module,CellIDDecoder<CalorimeterHit>& id);
330 
335 void FindCores2(Shitvec2* secal1, vector< Tmpclvec2>& bbb , vector <PROTSEED2> * prs2,
336  unsigned int N, vector<float> miipstep, CoreCut2 Ccut);
340 void cluster5( vector<Superhit2*>* shv, vector<Tmpcl2*>* clv);
345 double giveMeEEstimate2(int nivo,double Ecore, vector<CoreCalib2> cc);
349 void CreateCalibrationLDC00(vector<CoreCalib2>* cc);
350 
351 
352 void LineCaloIntersectD2( double* X1, double* dir,double&d,double&zmax, double*X);
353 void LineCaloIntersect2(double* X1, double* X2,double&d,double&zmax, double*X);
354 double LinePointDistance2( double* X1, double* X2, double* X0);
355 void PointOnLine3(const double* X1,const double* X2,const float* X0,double* Xline);
356 void PointOnLine22(const double* Xstart,const double* dir,const float* X0,double* Xline);
357 void ModuleNormal2(double* X1,double& zmax, double* X0);
358 void ClusterInCluster2(Tmpcl2* cl, vector<Tmpcl2*>& clv);
359 double D_cl_cl2(Tmpcl2* cl1,Tmpcl2* cl2) ;
360 inline double Dot2(double* X1,double* X2);
361 void ClusterInCluster2(Tmpcl2* cl, vector<Tmpcl2*>& clv,vector<Tmpcl2*>& clout);
362 
363 #endif
container for keeping the parameters of the core fineder together
Definition: KITutil.h:284
Definition: KITutil.h:182
unsigned int MinHitSplit
minimal number of hits in i-th level cluster to be accepted for splitting of the core ...
Definition: KITutil.h:304
double b
Eestimate = a+b*Ecore , b parameter of this funcition.
Definition: KITutil.h:248
unsigned int MinHit0
minimal number of hits needed for 0-th level cluster to be accepted as a core candidate ...
Definition: KITutil.h:300
double Distcut
distance cut for core merging
Definition: KITutil.h:292
Basic cluster class for reconstruction.
Definition: KITutil.h:114
int level
level of cluster
Definition: KITutil.h:236
double Emax
upper validity range of energy estimation funciton in GeV
Definition: KITutil.h:256
double Emin
lower validity range of energy estimation funciton in GeV
Definition: KITutil.h:252
double Coscut
angular cut for core merging (value of the cosine is stored not the angle!)
Definition: KITutil.h:296
container for storing the EM shower core candidates
Definition: KITutil.h:262
double Enom
nominal i.e.
Definition: KITutil.h:240
double a
Eestimate = a+b*Ecore , a parameter of this funcition.
Definition: KITutil.h:244
double Rcut
fluctuation suppresion cut
Definition: KITutil.h:288
int level
level of the cluster
Definition: KITutil.h:270
Tmpcl2 * cl
pointer to the cluster
Definition: KITutil.h:266
Basic hit class for reconstruction, contains the calorimeter hit plus additional parameters.
Definition: KITutil.h:35
container for holding the numbers needed for energy estimation
Definition: KITutil.h:232
bool active
flag to activate deactivate
Definition: KITutil.h:278