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