/[PAMELA software]/DarthVader/TrackerLevel2/src/TrkHough.cpp
ViewVC logotype

Annotation of /DarthVader/TrackerLevel2/src/TrkHough.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Fri Nov 10 11:38:44 2006 UTC (18 years ago) by pam-fi
Branch: MAIN
CVS Tags: v3r04, v3r05, v3r00, v3r03, v4r00, v2r01, v3r06
TrkHough class added for track recognition debug

1 pam-fi 1.1 /**
2     * \file TrkHough.cpp
3     * \author David Fedele
4     */
5     #include <TrkHough.h>
6     #include <iostream>
7     using namespace std;
8    
9     //--------------------------------------
10     //
11     //
12     //--------------------------------------
13     TrkHough::TrkHough(){
14    
15     ndblt=0;
16     alfayz1=0;
17     alfayz2=0;
18     db_cloud=0;
19    
20     ntrpt=0;
21     alfaxz1=0;
22     alfaxz2=0;
23     alfaxz3=0;
24     tr_cloud=0;
25    
26     nclouds_yz=0;
27     alfayz1_av=0;
28     alfayz2_av=0;
29     ptcloud_yz=0;
30    
31     nclouds_xz=0;
32     alfaxz1_av=0;
33     alfaxz2_av=0;
34     alfaxz3_av=0;
35     ptcloud_xz=0;
36    
37     nclstr=0;
38     totaltime=0;
39     houghtime=0;
40     fittime=0;
41    
42     };
43     //--------------------------------------
44     //
45     //
46     //--------------------------------------
47     TrkHough::~TrkHough(){
48    
49     delete [] alfayz1;
50     delete [] alfayz2;
51     delete [] db_cloud;
52    
53     delete [] alfaxz1;
54     delete [] alfaxz2;
55     delete [] alfaxz3;
56     delete [] tr_cloud;
57    
58     delete [] alfayz1_av;
59     delete [] alfayz2_av;
60     delete [] ptcloud_yz;
61    
62     delete [] alfaxz1_av;
63     delete [] alfaxz2_av;
64     delete [] alfaxz3_av;
65     delete [] ptcloud_xz;
66    
67     };
68     //--------------------------------------
69     //
70     //
71     //--------------------------------------
72     /**
73     * Fills a TrkHough object with values from a struct cTrkhough (to get data from F77 common).
74     */
75     void TrkHough::SetFromHoughStruct(cTrkHough *lh){
76    
77     ndblt = lh->ndblt_nt;
78     ntrpt = lh->ntrpt_nt;
79     nclouds_yz = lh->nclouds_yz_nt;
80     nclouds_xz = lh->nclouds_xz_nt;
81     nclstr = lh->nclstr;
82     totaltime = lh->totaltime;
83     houghtime = lh->houghtime;
84     fittime = lh->fittime;
85    
86     alfayz1 = new Float_t[ndblt];
87     alfayz2 = new Float_t[ndblt];
88     db_cloud = new Int_t[ndblt];
89     for(int i=0; i<ndblt; i++){
90     alfayz1[i] = (Float_t) lh->alfayz1_nt[i];
91     alfayz2[i] = (Float_t) lh->alfayz2_nt[i];
92     db_cloud[i] = (Int_t) lh->db_cloud_nt[i];
93     }
94    
95     alfaxz1 = new Float_t[ntrpt];
96     alfaxz2 = new Float_t[ntrpt];
97     alfaxz3 = new Float_t[ntrpt];
98     tr_cloud = new Int_t[ntrpt];
99     for(int i=0; i<ntrpt; i++){
100     alfaxz1[i] = (Float_t) lh->alfaxz1_nt[i];
101     alfaxz2[i] = (Float_t) lh->alfaxz2_nt[i];
102     alfaxz3[i] = (Float_t) lh->alfaxz3_nt[i];
103     tr_cloud[i] = (Int_t) lh->tr_cloud_nt[i];
104     }
105    
106     alfayz1_av = new Float_t[nclouds_yz];
107     alfayz2_av = new Float_t[nclouds_yz];
108     ptcloud_yz = new Int_t[nclouds_yz];
109     for(int i=0; i<nclouds_yz; i++){
110     alfayz1_av[i] = (Float_t) lh->alfayz1_av_nt[i];
111     alfayz2_av[i] = (Float_t) lh->alfayz2_av_nt[i];
112     ptcloud_yz[i] = (Int_t) lh->ptcloud_yz_nt[i];
113     }
114    
115     alfaxz1_av = new Float_t[nclouds_xz];
116     alfaxz2_av = new Float_t[nclouds_xz];
117     alfaxz3_av = new Float_t[nclouds_xz];
118     ptcloud_xz = new Int_t[nclouds_xz];
119     for(int i=0; i<nclouds_xz; i++){
120     alfaxz1_av[i] = (Float_t) lh->alfaxz1_av_nt[i] ;
121     alfaxz2_av[i] = (Float_t) lh->alfaxz2_av_nt[i];
122     alfaxz3_av[i] = (Float_t) lh->alfaxz3_av_nt[i];
123     ptcloud_xz[i] = (Int_t) lh->ptcloud_xz_nt[i];
124     }
125     };
126     //--------------------------------------
127     //
128     //
129     //--------------------------------------
130     void TrkHough::Clear(){
131    
132     ndblt = 0;
133     ntrpt = 0;
134     nclouds_yz = 0;
135     nclouds_xz = 0;
136     nclstr = 0;
137     totaltime = 0;
138     houghtime = 0;
139     fittime = 0;
140    
141     };
142     //--------------------------------------
143     //
144     //
145     //--------------------------------------
146     void TrkHough::Delete(){
147    
148     ndblt = 0;
149     ntrpt = 0;
150     nclouds_yz = 0;
151     nclouds_xz = 0;
152     nclstr = 0;
153     totaltime = 0;
154     houghtime = 0;
155     fittime = 0;
156    
157     this->~TrkHough();
158    
159     };
160    
161    
162     ClassImp(TrkHough);

  ViewVC Help
Powered by ViewVC 1.1.23