StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
digcluster.h
1 #ifndef MAPS_DIGCLUSTER_H
2 #define MAPS_DIGCLUSTER_H
3 
4 #include <TNamed.h>
5 #include <TList.h>
6 #include <TGraph.h>
7 #include "Riostream.h"
8 #include "vector"
9 
10 // ROOT classes
11 #include "TString.h"
12 #include "TObject.h"
13 #include "TVector.h"
14 #include "TFile.h"
15 #include "TSystem.h"
16 #include "TRandom.h"
17 #include "TH1.h"
18 #include "TH2.h"
19 #include "TObjArray.h"
20 #include "TTree.h"
21 #include "TBranch.h"
22 #include "TClonesArray.h"
23 using namespace std;
24 
25 class DIGInitialize;
26 class DIGPlane;
27 class DIGADC;
28 class DIGBeam;
29 class DIGTransport;
30 class DIGAction;
31 class DIGEvent;
32 class DIGMAPS;
33 //==============================================================================
34 class DIGCluster : public TObject {
35  public:
36  DIGCluster();
37  DIGCluster(DIGCluster& adigCluster);
38  virtual ~DIGCluster();
39  void Clear(const Option_t * /*option*/ = "");
40  void PrintInfo();
41 
42  Int_t GetNpixels(){return fNpixels;}
43  std::vector<Int_t> GetPixelMap(){return fPixelMap;}
44  std::vector<Int_t> GetDigitalCharge(){return fDigitalChargeMap;}
45 
46  void AddPixel(Int_t DigitalCharge, Int_t PixelNumber);
47  Int_t GetTotalCharge();
48  Int_t Get1stCrownCharge(DIGPlane *myDIGPlane);
49  Int_t Get2ndCrownCharge(DIGPlane *myDIGPlane);
50  Int_t Get4NeigboursCharge(DIGPlane *myDIGPlane);
51 
52  Int_t GetMultiplicity(Int_t Threshold);
53  Double_t GetXposition_CoG(){ return Xposition_CoG;}
54  Double_t GetYposition_CoG(){ return Yposition_CoG;}
55  void SetXposition_CoG(Double_t aXposition_CoG){Xposition_CoG = aXposition_CoG;}
56  void SetYposition_CoG(Double_t aYposition_CoG){Yposition_CoG = aYposition_CoG ;}
57  void Compute_CoG(DIGPlane *myDIGPlane);
58  void Compute_SeedPixel(DIGPlane *myDIGPlane); // compute the seed pixel.
59  Int_t GetSeedPixelIndex(); //return the seed pixel index in the pixel map.
60  void SetSeedPixelIndex(Int_t Index);
61  void GetXYPixelNumber(Int_t &Xpix, Int_t &Ypix, DIGPlane *myDIGPlane, Int_t PixelNumber);
62  Bool_t IsPixelInThePlane(Int_t Xpix, Int_t Ypix, DIGPlane *myDIGPlane);
63 
64  std::vector<Int_t> Get4NeigboursPixelsIndex(DIGPlane *myDIGPlane);
65  std::vector<Int_t> Get1stCrownPixelsIndex(DIGPlane *myDIGPlane);
66  std::vector<Int_t> Get2ndCrownPixelsIndex(DIGPlane *myDIGPlane);
67 
68 
69  protected:
70  //
71  Int_t fNpixels;
72  vector< Int_t > fPixelMap;
73  vector< Int_t > fDigitalChargeMap;
74  Double_t Xposition_CoG;
75  Double_t Yposition_CoG;
76  Int_t fSeedPixelIndex;
77 
78  ClassDef(DIGCluster,1);
79 };
80 
81 
82 
83 //==============================================================================
84 
85 #endif
Definition: digadc.h:36