]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSNeuralTracker.h
Fix coding rule violations (MinJung)
[u/mrichter/AliRoot.git] / ITS / AliITSNeuralTracker.h
index dd7de3785294968dad3fe74d0b08596f8f93abaf..1ea82428b18d88d6948c8ce5a08eab3f4a5440b8 100644 (file)
@@ -1,9 +1,3 @@
-#ifndef ALIITSNEURALTRACKER_H
-#define ALIITSNEURALTRACKER_H
-
-class TObjArray;
-class TCanvas;
-
 ///////////////////////////////////////////////////////////////////////
 //
 // AliITSneuralTracker:
@@ -15,14 +9,21 @@ class TCanvas;
 //
 ///////////////////////////////////////////////////////////////////////
 
+#ifndef ALIITSNEURALTRACKER_H
+#define ALIITSNEURALTRACKER_H
+
+class TObjArray;
+class TCanvas;
+
+#include <TTree.h>
+
+#include "AliITSNeuralPoint.h"
+
 class AliITSNeuralTracker : public TObject {
 
 public:
 
-                AliITSNeuralTracker();
-                               AliITSNeuralTracker(AliITSNeuralTracker &t) {
-                               Fatal("AliITSNeuralTracker", "No copy constructor
-                               allowed!");exit(0);}
+       AliITSNeuralTracker();
        virtual ~AliITSNeuralTracker();
 
        // ******************************************************************************
@@ -33,35 +34,36 @@ public:
        // ******************************************************************************
        class AliITSNode : public AliITSNeuralPoint {
        public:
-               AliITSNode() 
-                       {fInnerOf = fOuterOf = fMatches = 0; fNext = fPrev = 0;}
-                       
-               AliITSNode(AliITSNeuralPoint *p, Bool_t init = kTRUE) // declared inline
-                       : AliITSNeuralPoint(p)
-                       {
-                               fInnerOf = fOuterOf = fMatches = 0;
-                               fNext = fPrev = 0;
-                               if (init) {
-                                       fInnerOf = new TObjArray;
-                                       fOuterOf = new TObjArray;
-                                       fMatches = new TObjArray;
-                               }
-                       }
-                       
+               AliITSNode():fPosInTree(0),fInnerOf(0),fOuterOf(0),fMatches(0),fNext(0),fPrev(0){}
+               
+               AliITSNode(AliITSNeuralPoint *p, Bool_t init = kTRUE): AliITSNeuralPoint(p),fPosInTree(0),fInnerOf(0),fOuterOf(0),fMatches(0),fNext(0),fPrev(0) {
+                       if (init) { fInnerOf = new TObjArray; fOuterOf = new TObjArray; fMatches = new TObjArray;}}
                AliITSNode(AliITSRecPoint *p, AliITSgeomMatrix *gm)
-                       : AliITSNeuralPoint(p,gm) 
-                       {fInnerOf = fOuterOf = fMatches = 0; fNext = fPrev = 0;}
+                       : AliITSNeuralPoint(p,gm),fPosInTree(0),fInnerOf(0),fOuterOf(0),fMatches(0),fNext(0),fPrev(0) {}
 
                virtual  ~AliITSNode() 
                        {fInnerOf = fOuterOf = fMatches = 0; fNext = fPrev = 0;}
-
+                       
+       
+               
                Double_t  ThetaDeg()                    {return GetTheta()*180.0/TMath::Pi();}
 
-               Int_t     GetSector(Double_t sec_width) {return (Int_t)(GetPhi()/sec_width);}
+               Int_t     GetSector(Double_t secwidth) const {return (Int_t)(GetPhi()/secwidth);}
                Int_t     GetThetaCell()                {return (Int_t)(ThetaDeg());}
                
+               Int_t&     PosInTree() {return fPosInTree;}
+               
+               TObjArray*&  InnerOf() {return fInnerOf;}
+               TObjArray*&  OuterOf() {return fOuterOf;}
+               TObjArray*&  Matches() {return fMatches;}
+               
+               AliITSNode*& Next() {return fNext;}
+               AliITSNode*& Prev() {return fPrev;}
+               
+       private:
+               AliITSNode(const AliITSNode &t);
+               AliITSNode& operator=(const AliITSNode& t);
                Int_t        fPosInTree;  // position in tree of converted points
-
                TObjArray   *fInnerOf; //!
                TObjArray   *fOuterOf; //! 
                TObjArray   *fMatches; //!
@@ -82,11 +84,25 @@ public:
        // ******************************************************************************
        class AliITSneuron : public TObject {
        public:
-                           AliITSneuron():fUsed(0),fActivation(0.),fInner(0),fOuter(0),fGain(0) { }
+               AliITSneuron():fUsed(0),fActivation(0.),fInner(0),fOuter(0),fGain(0) { }
+               
                virtual    ~AliITSneuron() {fInner=fOuter=0;fGain=0;}
+               
+               
 
                Double_t    Weight(AliITSneuron *n);
-               void        Add2Gain(AliITSneuron *n, Double_t mult_const, Double_t exponent);
+               void        Add2Gain(AliITSneuron *n, Double_t multconst, Double_t exponent);
+               
+               Int_t&       Used() {return fUsed;}
+               Double_t&    Activation() {return fActivation;}
+               AliITSNode*& Inner() {return fInner;}
+               AliITSNode*& Outer() {return fOuter;}
+               TObjArray*&  Gain()  {return fGain;}
+               
+       private:
+
+               AliITSneuron(const AliITSneuron &t); 
+               AliITSneuron& operator=(const AliITSneuron& t);
 
                Int_t             fUsed;        //  utility flag
                Double_t          fActivation;  //  Activation value
@@ -107,8 +123,18 @@ public:
        // ******************************************************************************
        class AliITSlink : public TObject {
        public:
-                        AliITSlink() : fWeight(0.), fLinked(0) { }
+               AliITSlink() : fWeight(0.), fLinked(0) { }
+               
                virtual ~AliITSlink()   {fLinked = 0;}
+                               
+               
+               Double_t& Weight() {return fWeight;}
+               AliITSneuron*& Linked() {return fLinked;}
+               
+       private:
+               
+               AliITSlink(const AliITSlink &t);
+               AliITSlink& operator=(const AliITSlink& t);
 
                Double_t      fWeight;  //  Weight value
                AliITSneuron *fLinked;  //! the connected neuron
@@ -137,10 +163,10 @@ public:
        // Points array arrangement & control
 
        void     CreateArrayStructure(Int_t nsecs);
-       Int_t    ArrangePoints(TTree *pts_tree);
+       Int_t    ArrangePoints(TTree *ptstree);
        void     StoreAbsoluteMatches();
-       Bool_t   PassCurvCut(AliITSNode *p1, AliITSNode *p2, Int_t curv_idx, Double_t vx, Double_t vy, Double_t vz);
-       Int_t    PassAllCuts(AliITSNode *p1, AliITSNode *p2, Int_t curv_idx, Double_t vx, Double_t vy, Double_t vz);
+       Bool_t   PassCurvCut(AliITSNode *p1, AliITSNode *p2, Int_t curvidx, Double_t vx, Double_t vy, Double_t vz);
+       Int_t    PassAllCuts(AliITSNode *p1, AliITSNode *p2, Int_t curvidx, Double_t vx, Double_t vy, Double_t vz);
        void     PrintPoints();
        void     PrintMatches(Bool_t stop = kTRUE);
 
@@ -154,12 +180,15 @@ public:
        Double_t Activate(AliITSneuron* &n);   // calculates the new neural activation
        Bool_t   Update();                     // an updating cycle
        void     CleanNetwork();               // removes deactivated units and resolves competitions
-       Int_t    Save(Int_t sector_idx);       // save found tracks for # sector
-       TTree*   GetChains()                   {return fChains;}
+       Int_t    Save(Int_t sectoridx);        // save found tracks for # sector
+       TTree*   GetChains() const             {return fChains;}
        void     WriteChains()                 {fChains->Write();}
 
 private:
 
+       AliITSNeuralTracker(const AliITSNeuralTracker &n);
+       AliITSNeuralTracker& operator=(const AliITSNeuralTracker& t);
+
        Bool_t       CheckOccupation() const; 
 
        Int_t        fSectorNum;            //  number of azymuthal sectors