PandaRoot
PndEmcXClMoments.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 // File and Version Information:
3 //
4 // Description:
5 // Class PndEmcXClMoments.
6 //
7 // Environment:
8 // Software developed for the BaBar Detector at the SLAC B-Factory.
9 //
10 // Author List:
11 // Thorsten Brandt Originator
12 //
13 // Copyright Information:
14 //
15 // Dima Melnichuk, adaption for pandaroot
16 //
17 //------------------------------------------------------------------------
18 //#pragma once
19 #ifndef PNDEMCXCLMOMENTS_H
20 #define PNDEMCXCLMOMENTS_H
21 
23 #include "TObject.h"
24 #include <iostream>
25 #include <vector>
26 
27 class TVector3;
28 class PndEmcDigi;
29 class PndEmcCluster;
30 
32  Double_t deposited_energy;
33  Double_t r;
34  Double_t phi;
35 };
36 
38 
39  public:
40  // Constructors
41 
42  PndEmcXClMoments(const PndEmcCluster &cluster, const TClonesArray *digiArray);
44 
45  // Destructor
46 
47  virtual ~PndEmcXClMoments();
48 
49  // Operators
50 
51  // Selectors (const)
52 
53  // Second moment of energy about centroid
54  virtual Double_t SecondMoment() const;
55  virtual Double_t SecondMomentPhi() const;
56  virtual Double_t SecondMomentTheta() const;
57 
58  // Absolute value Zernike-Moment of index(m,n); according to the
59  // definition of the Zernike moments, n and m must satisfy
60  // (a) n>=m (b) n-m even (c) n,m>=0
61  // Otherwise this function returns -1;
62  virtual Double_t AbsZernikeMoment(int n, int m, Double_t R0 = 15) const;
63 
64  // Parameter for description of the LATeral energydeposition
65  // within the cluster; if cluster contains less than 3 digis,
66  // the function return 0
67  virtual Double_t Lat() const;
68 
69  virtual void Print(const Option_t *opt = "") const;
70 
71  // Modifiers
72 
73  protected:
74  // Helper functions
75 
76  void Init();
77 
78  // explicit implementation of polynomial part of
79  // Zernike-Functions for n<=5;
80 
81  Double_t f00(Double_t r) const;
82  Double_t f11(Double_t r) const;
83  Double_t f20(Double_t r) const;
84  Double_t f22(Double_t r) const;
85  Double_t f31(Double_t r) const;
86  Double_t f33(Double_t r) const;
87  Double_t f40(Double_t r) const;
88  Double_t f42(Double_t r) const;
89  Double_t f44(Double_t r) const;
90  Double_t f51(Double_t r) const;
91  Double_t f53(Double_t r) const;
92  Double_t f55(Double_t r) const;
93 
94  // Calculation of Zernike-Moments for n<=5 :
95  Double_t Fast_AbsZernikeMoment(int n, int m, Double_t R0) const;
96 
97  // Calculation of Zernike-Moments for general values of (n,m)
98  Double_t Calc_AbsZernikeMoment(int n, int m, Double_t R0) const;
99 
100  Double_t Fak(int n) const;
101 
102  private:
103  // These should never get used
105  PndEmcXClMoments &operator=(const PndEmcXClMoments &);
106 
107  // Data members
108  std::vector<PndEmcClEnergyDeposition> *fEnergyDistribution;
109  Int_t fClusterSize;
110  Double_t (PndEmcXClMoments::*fFcn[12])(Double_t) const;
111  // Double_t (PndEmcXClMoments::*fFcn2)( Double_t ); // STE: Is it needed??
112 
113  ClassDef(PndEmcXClMoments, 1)
114 };
115 
116 #endif // PNDEMCXCLMOMENTS_HH
__m128 m
Definition: P4_F32vec4.h:26