Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:10

0001 #ifndef __ABLOB_H__
0002 #define __ABLOB_H__
0003 
0004 #include <vector>
0005 
0006 //

0007 //  Hello ABlob Fans:

0008 //

0009 //  The pattern recognition will create a vector of Blob objects.

0010 //  In the current implementation, each Blob object will be made

0011 //  as a collection of several zigzags where the charge on the "center"

0012 //  zigzag is greater than all the left zigzags and greater than or equal

0013 //  to all the right zigzag.

0014 //

0015 //  The blob class contains POINTERS (not owned locally so they should

0016 //  not be deleted upon destruction) to the zigzags in question.

0017 //  It then implements methods to return the total blob charge, and the

0018 //  coordinate of the centroid.

0019 //

0020 //  Since we know that there is always some level of differential non-linearity

0021 //  in  segmented pad plane response, we expect that the simple centroid

0022 //  calculation will need some kind of correction.  We opt to NOT put

0023 //  the correction function as a part of the Blob object, but expect the user

0024 //  to write external codes to manipulate and set the corrected charges and

0025 //  positions.

0026 //

0027 //  Also worth noting is the intended use of the CorrectedQ (corrected charge).

0028 //  Charge is divided among X,Y, and U coordinates roughly equally (1/3 each).

0029 //  The corrected charge is intended to take away this factor so that each of

0030 //  of the blobs makes its own estimate of the TOTAL charge deposit of the

0031 //  ORIGINAL particle. This is the proper value for matching at the pattern 

0032 //  recognition stage.

0033 //

0034 //                                                TKH, Vlad, Niv

0035 //                                                2018-10-09

0036 //

0037 
0038 class AZigzag;
0039 class TH1;
0040 class TF1;
0041 
0042 class ABlob
0043 {
0044 public:
0045   ABlob(std::vector<AZigzag*> MANYZIGZAGS);
0046   virtual ~ABlob() {}
0047 
0048   // sets...

0049   void SetCorrectedCentroid(double CC) {correctedcentroid = CC;}
0050   void SetCorrectedQ       (double CQ) {correctedq = CQ;}
0051 
0052   // gets...

0053   double CentroidX();
0054   double CentroidY();
0055   double CentroidZ();
0056   double CentroidR();
0057   double CentroidP();
0058   double Q        (); //total charge in the blob

0059   double maxT     (); //time of zigzag with the max charge

0060 
0061   double CorrectedCentroid() {return correctedcentroid;}
0062   double CorrectedQ       () {return correctedq; }
0063 
0064   void Draw();
0065   void Report();
0066 
0067   int numZigs() {return manyZigs.size();}
0068   std::vector<AZigzag*> manyZigs;
0069 
0070   static bool RecalibrateCharge;
0071 
0072   static bool GaussPosition;
0073   static TH1* BlobPos;
0074   static TH1* BlobSigma;
0075   static TF1* BlobFit;
0076 
0077   double GetPHI();
0078 
0079 protected:
0080   void FixTheCharges();
0081 
0082   double correctedcentroid;
0083   double correctedq       ;
0084 
0085   double Precalc_PHI;
0086   double Precalc_R;
0087 
0088 };
0089 
0090 #endif /* __ABLOB_H__ */