]>
Commit | Line | Data |
---|---|---|
12f6dd57 | 1 | // -- |
2 | // -- | |
3 | // Implementation for TTree output in PHOS DA | |
4 | // for calibrating energy by pi0 and MIP. | |
5 | // -- | |
6 | // -- Author: Hisayuki Torii (Hiroshima Univ.) | |
7 | // -- | |
8 | ||
9 | #ifndef AliPHOSDATreeEvent_H | |
10 | #define AliPHOSDATreeEvent_H | |
11 | #include <iostream> | |
12 | #include <Rtypes.h> | |
13 | #include <ctime> | |
14 | #include "AliPHOSDATreeCluster.h" | |
15 | ||
16 | class AliPHOSDATreeEvent{ | |
17 | ||
18 | friend std::ostream& operator<<(std::ostream& out,const AliPHOSDATreeEvent& event); | |
19 | ||
20 | public: | |
21 | ||
22 | AliPHOSDATreeEvent(): fTime(0), fNDigits(0), fDigits(0), fNClusters(0), fClusters(0){/* */}; | |
23 | AliPHOSDATreeEvent(const AliPHOSDATreeEvent& evt); | |
24 | AliPHOSDATreeEvent& operator=(const AliPHOSDATreeEvent& evt); | |
25 | virtual ~AliPHOSDATreeEvent(){ | |
26 | if( fNDigits > 0 ) delete[] fDigits; | |
27 | if( fNClusters > 0 ) delete[] fClusters; | |
28 | }; | |
29 | time_t GetTime() const{return fTime;}; | |
30 | void SetTime(time_t time){fTime=time;}; | |
31 | int GetNDigits() const{ return fNDigits; }; | |
32 | int GetNClusters() const{ return fNClusters; }; | |
33 | AliPHOSDATreeCluster& GetCluster(int nclusters){ | |
34 | if( nclusters < fNClusters ) return fClusters[nclusters]; | |
35 | }; | |
36 | AliPHOSDATreeDigit& GetDigit(int ndigits){ | |
37 | if( ndigits < fNDigits ) return fDigits[ndigits]; | |
38 | }; | |
39 | bool Fill(float fenergy,int row,int col); | |
40 | bool Fill(AliPHOSDATreeDigit& digit); | |
41 | bool ExecuteClustering(); | |
42 | void Reset(){ | |
43 | if( fNDigits > 0 ) delete[] fDigits; | |
44 | if( fNClusters > 0 ) delete[] fClusters; | |
45 | fTime = 0; | |
46 | fNDigits = 0; | |
47 | fNClusters = 0; | |
48 | }; | |
49 | void Print(char* opt=""); | |
50 | ||
51 | private: | |
52 | bool Clusterize(AliPHOSDATreeDigit& digit); | |
53 | ||
54 | time_t fTime; // Time information | |
55 | int fNDigits; // Number of digits in event | |
56 | AliPHOSDATreeDigit* fDigits; //[fNDigits] | |
57 | int fNClusters; // Number of clusters in event | |
58 | AliPHOSDATreeCluster* fClusters; //[fNClusters] | |
59 | ||
60 | ClassDef(AliPHOSDATreeEvent,1) // Simple Event Structure for PHOS DA | |
61 | }; | |
62 | #endif | |
63 |