]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/Reve/NLTProjector.h
Getting rid of effC++ warnings about missing copy constructor and assignment operator.
[u/mrichter/AliRoot.git] / EVE / Reve / NLTProjector.h
CommitLineData
debf9f47 1#ifndef REVE_NLTProjector
2#define REVE_NLTProjector
3
4#include "TNamed.h"
5#include "TString.h"
6
7namespace std {
8template<typename _Tp> class allocator;
9template<typename _Tp, typename _Alloc > class list;
10}
11
12class TGeoManager;
13class TGeoMatrix;
14class TBuffer3D;
15
16namespace Reve {
17class Vector;
18class PointSet;
19class NLTPolygonSet;
20class NLTPolygon;
21class TrackList;
22/**************************************************************************/
23// NLTProjections
24/**************************************************************************/
25class NLTProjection {
26public:
27 enum Type_e { CFishEye, RhoZ, RhoPhi};
28
29 Float_t fDistortion; // sensible values from 0 to 0.01
30
31 virtual Bool_t AcceptSegment(Vector& /*v1*/, Vector& /*v2*/) {return kTRUE;}
32 virtual Vector* Project(Vector* pnts, Int_t npnts, Bool_t create_new = kTRUE);
33 NLTProjection():fDistortion(0.) {}
34 ClassDef(NLTProjection, 0)
35};
36
37class PhiZ: public NLTProjection {
38};
39
40class RhoZ: public NLTProjection {
41public:
42 virtual Bool_t AcceptSegment(Vector& v1, Vector& v2);
43 virtual Vector* Project(Vector* pnts, Int_t npnts, Bool_t copy = kTRUE);
44 ClassDef(RhoZ, 0)
45};
46
47class CircularFishEye: public NLTProjection {
48public:
49 virtual Vector* Project(Vector* pnts, Int_t npnts, Bool_t copy = kTRUE);
50 ClassDef(CircularFishEye, 0)
51};
52
53/**************************************************************************/
54// NLTProjector
55/**************************************************************************/
56class NLTProjector : public TNamed
57{
58protected:
59 void CheckPoint(Int_t idx, Float_t* bbox);
60 Bool_t IsFirstIdxHead(Int_t s0, Int_t s1, TBuffer3D* buff);
61
62private:
63 NLTProjection* fProjection;
64
65 Float_t fEps; // distance accounted in reducing the ponts
66
67 // temporary variables cashed
68 Int_t* fIdxMap; // map from original to projected and reduced point needed oly for geometry
69 Int_t fNRPnts; // number of reduced and projected points
70 Vector* fRPnts; // reduced and projected points
71
72 void ReducePoints(Vector* p, Int_t N);
73 void MakePolygonsFromBP(TBuffer3D* buff, std::list<NLTPolygon, std::allocator<NLTPolygon> >& pols);
74 void MakePolygonsFromBS(TBuffer3D* buff, std::list<NLTPolygon, std::allocator<NLTPolygon> >& pols);
75 void CleanUp();
76
77public:
78 NLTProjector();
79 virtual ~NLTProjector();
80
81 NLTPolygonSet* ProjectGeoShape(TBuffer3D* buff, Int_t useBuffPols=-1);
82 void ProjectPointSet(PointSet* ps);
83 void ProjectTrackList(TrackList* tl);
84
85 void SetProjection(NLTProjection* p){ fProjection = p;}
86 void SetProjection(NLTProjection::Type_e type, Float_t distort = 0.);
87 NLTProjection* GetProjection(){ return fProjection; }
88
89 void DumpBuffer(TBuffer3D* b);
90 ClassDef(NLTProjector, 0) //GUI for editing TGLViewer attributes
91 };
92}
93#endif