Line data Source code
1 : #ifndef ALIMUONNODE_H
2 : #define ALIMUONNODE_H
3 :
4 : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 : * See cxx source for full Copyright notice */
6 :
7 : // $Id$
8 :
9 : /// \ingroup geometry
10 : /// \class AliMUONNode
11 : /// \brief A node of a segment tree
12 : ///
13 : // author Laurent Aphecetche
14 :
15 : #ifndef ROOT_TObject
16 : # include "TObject.h"
17 : #endif
18 :
19 : class TObjArray;
20 :
21 : class AliMUONNode : public TObject
22 : {
23 : public:
24 : AliMUONNode(Double_t a, Double_t b, Double_t midpoInt_t);
25 : virtual ~AliMUONNode();
26 :
27 : void Print(const char* opt="") const;
28 :
29 : void Contribution(Double_t b, Double_t e, TObjArray& stack);
30 :
31 : void InsertInterval(Double_t b, Double_t e, TObjArray& stack);
32 :
33 : void DeleteInterval(Double_t b, Double_t e, TObjArray& stack);
34 :
35 : Bool_t IsFullyContained(Double_t b, Double_t e) const;
36 :
37 : void Update();
38 :
39 : void Demote();
40 :
41 : void Promote();
42 :
43 : /// Get cardinality
44 0 : Int_t C() const { return fC; }
45 :
46 : /// Increase cardinality
47 0 : void C(Int_t v) { fC += v; }
48 :
49 : /// Get potent state
50 0 : Int_t P() const { return fP; }
51 :
52 : /// Set left node
53 0 : void LeftNode(AliMUONNode* n) { fLeftNode = n; }
54 :
55 : /// Set right node
56 0 : void RightNode(AliMUONNode* n) { fRightNode = n; }
57 :
58 : private:
59 :
60 : /// not implemented
61 : AliMUONNode(const AliMUONNode& node);
62 : /// not implemented
63 : AliMUONNode& operator=(const AliMUONNode& node);
64 : AliMUONNode* fLeftNode; ///< left node
65 : AliMUONNode* fRightNode; ///< right node
66 :
67 : Double_t fMin; ///< Min
68 : Double_t fMax; ///< Max
69 : Double_t fMidPoint; ///< (Min+Max)/2
70 :
71 : Int_t fC; ///< cardinality
72 : Int_t fP; ///< potent state
73 :
74 12 : ClassDef(AliMUONNode,0) // A node of a segment tree
75 : };
76 :
77 : #endif
|