Added docs and fixed a bug
[u/mrichter/AliRoot.git] / FMD / AliFMDMultAlgorithm.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /* $Id$ */
17
18 //____________________________________________________________________
19 // 
20 // Base class for FMD reconstruction algorithms. 
21 //
22 // Derived classes will implement various ways of reconstructing the
23 // charge particle multiplicity in the FMD.  
24 // 
25 //      +---------------------+       +---------------------+
26 //      | AliFMDReconstructor |<>-----| AliFMDMultAlgorithm |
27 //      +---------------------+       +---------------------+
28 //                                               ^
29 //                                               |
30 //                                   +-----------+---------+
31 //                                   |                     |
32 //                         +-------------------+   +------------------+
33 //                         | AliFMDMultPoisson |   | AliFMDMultNaiive |
34 //                         +-------------------+   +------------------+
35 //
36 // AliFMDReconstructor acts as a manager class.  It contains a list of
37 // AliFMDMultAlgorithm objects.  The call graph looks something like 
38 //
39 //
40 //       +----------------------+            +----------------------+
41 //       | :AliFMDReconstructor |            | :AliFMDMultAlgorithm |
42 //       +----------------------+            +----------------------+
43 //                  |                                  |
44 //    Reconstruct  +-+                                 |
45 //    ------------>| |                         PreRun +-+
46 //                 | |------------------------------->| |   
47 //                 | |                                +-+
48 //                 | |-----+ (for each event)          |
49 //                 | |     | *ProcessEvent             |
50 //                 |+-+    |                           |
51 //                 || |<---+                 PreEvent +-+
52 //                 || |------------------------------>| |      
53 //                 || |                               +-+
54 //                 || |-----+                          |
55 //                 || |     | ProcessDigits            |
56 //                 ||+-+    |                          |
57 //                 ||| |<---+                          |
58 //                 ||| |         *ProcessDigit(digit) +-+
59 //                 ||| |----------------------------->| |
60 //                 ||| |                              +-+
61 //                 ||+-+                               |
62 //                 || |                     PostEvent +-+
63 //                 || |------------------------------>| |
64 //                 || |                               +-+
65 //                 |+-+                                |
66 //                 | |                        PostRun +-+
67 //                 | |------------------------------->| |
68 //                 | |                                +-+
69 //                 +-+                                 |
70 //                  |                                  |
71 //
72 //
73 #include "AliFMDMultAlgorithm.h"        // ALIFMDMULTALGORITHM_H
74 #include "AliFMDDigit.h"                // ALIFMDDIGIT_H
75 #include <TClonesArray.h>               // ROOT_TClonesArray
76
77 //____________________________________________________________________
78 ClassImp(AliFMDMultAlgorithm);
79
80 //____________________________________________________________________
81 AliFMDMultAlgorithm::AliFMDMultAlgorithm(const char* name, const char* title)
82   : TNamed(name, title), 
83     fTreeR(0), 
84     fMult(0), 
85     fFMD(0)
86 {}
87
88 //____________________________________________________________________
89 AliFMDMultAlgorithm::~AliFMDMultAlgorithm()
90 {
91   if (fMult) delete fMult;
92 }
93
94
95 //____________________________________________________________________
96 void
97 AliFMDMultAlgorithm::PreEvent(TTree* treeR, Float_t /* ipZ */) 
98 {
99   if (fMult) fMult->Clear();
100   fNMult = 0;
101   fTreeR = treeR;
102 }
103
104
105
106 //____________________________________________________________________
107 // 
108 // EOF
109 //