Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ABlob.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file ABlob.h
1 #ifndef __ABLOB_H__
2 #define __ABLOB_H__
3 
4 #include <vector>
5 
6 //
7 // Hello ABlob Fans:
8 //
9 // The pattern recognition will create a vector of Blob objects.
10 // In the current implementation, each Blob object will be made
11 // as a collection of several zigzags where the charge on the "center"
12 // zigzag is greater than all the left zigzags and greater than or equal
13 // to all the right zigzag.
14 //
15 // The blob class contains POINTERS (not owned locally so they should
16 // not be deleted upon destruction) to the zigzags in question.
17 // It then implements methods to return the total blob charge, and the
18 // coordinate of the centroid.
19 //
20 // Since we know that there is always some level of differential non-linearity
21 // in segmented pad plane response, we expect that the simple centroid
22 // calculation will need some kind of correction. We opt to NOT put
23 // the correction function as a part of the Blob object, but expect the user
24 // to write external codes to manipulate and set the corrected charges and
25 // positions.
26 //
27 // Also worth noting is the intended use of the CorrectedQ (corrected charge).
28 // Charge is divided among X,Y, and U coordinates roughly equally (1/3 each).
29 // The corrected charge is intended to take away this factor so that each of
30 // of the blobs makes its own estimate of the TOTAL charge deposit of the
31 // ORIGINAL particle. This is the proper value for matching at the pattern
32 // recognition stage.
33 //
34 // TKH, Vlad, Niv
35 // 2018-10-09
36 //
37 
38 class AZigzag;
39 class TH1;
40 class TF1;
41 
42 class ABlob
43 {
44 public:
45  ABlob(std::vector<AZigzag*> MANYZIGZAGS);
46  virtual ~ABlob() {}
47 
48  // sets...
49  void SetCorrectedCentroid(double CC) {correctedcentroid = CC;}
50  void SetCorrectedQ (double CQ) {correctedq = CQ;}
51 
52  // gets...
53  double CentroidX();
54  double CentroidY();
55  double CentroidZ();
56  double CentroidR();
57  double CentroidP();
58  double Q (); //total charge in the blob
59  double maxT (); //time of zigzag with the max charge
60 
62  double CorrectedQ () {return correctedq; }
63 
64  void Draw();
65  void Report();
66 
67  int numZigs() {return manyZigs.size();}
68  std::vector<AZigzag*> manyZigs;
69 
70  static bool RecalibrateCharge;
71 
72  static bool GaussPosition;
73  static TH1* BlobPos;
74  static TH1* BlobSigma;
75  static TF1* BlobFit;
76 
77  double GetPHI();
78 
79 protected:
80  void FixTheCharges();
81 
83  double correctedq ;
84 
85  double Precalc_PHI;
86  double Precalc_R;
87 
88 };
89 
90 #endif /* __ABLOB_H__ */