FEDRA emulsion software from the OPERA Collaboration
AcqTrackReconstructor Class Reference

#include <AcqTrackReconstructor.h>

Inheritance diagram for AcqTrackReconstructor:
Collaboration diagram for AcqTrackReconstructor:

Public Member Functions

 AcqTrackReconstructor ()
 
int RecNetscan (EdbView *View)
 
int RecRating (EdbView *View)
 
int RecSySal (EdbView *View)
 
int RecValeri (EdbView *View)
 
virtual ~AcqTrackReconstructor ()
 

Constructor & Destructor Documentation

◆ AcqTrackReconstructor()

AcqTrackReconstructor::AcqTrackReconstructor ( )
19{
20
21}

◆ ~AcqTrackReconstructor()

AcqTrackReconstructor::~AcqTrackReconstructor ( )
virtual
25{
26}

Member Function Documentation

◆ RecNetscan()

int AcqTrackReconstructor::RecNetscan ( EdbView View)
131 {
132 // reconstruction a la Netscan (slow)
133 return 0;
134 }

◆ RecRating()

int AcqTrackReconstructor::RecRating ( EdbView View)
69 {
70 // reconstruction based on rating propagation
71 int iX,iY,iZ,ind;
72 float SizeX=360.,SizeY=300.; //view size in microns
73 float DX,DY;
74 float DZ=40.;// emulsion thickness in real space
75 float MaxT=.7; //max tangent of track angle
76 MinRating=10; //minimum rating to keep the chain
77 int CurRating=0; // current chain rating during propagation
78 NCellZ=View->GetNframes();
79 DX=DZ*MaxT;
80 DY=DZ*MaxT;
81 NCellX=int(SizeX/DX);
82 NCellY=int(SizeY/DY);
83 Volume=new TObjArray(NCellX*NCellY*NCellZ);
84 for( ind=0;ind<NCellX*NCellY*NCellZ;ind++) Volume->AddAt(new TObjArray(10),ind);
85 TObjArray *arr,*farr;
86 EdbCluster *cl, *fcl;
87 try {
88 //Building index table
89 for(int i=0;i<View->Nclusters();i++)
90 {
91 cl=View->GetCluster(i);
92 cl->SetSegment(0);
93 iX=int((cl->X()+SizeX/2.)/DX);
94 iY=int((cl->Y()+SizeY/2.)/DY);
95 iZ=cl->GetFrame();
96 ind=iZ*NCellX*NCellY+iY*NCellX+iX;
97 if(ind>=NCellX*NCellY*NCellZ) continue;
98 ((TObjArray*)(Volume->At(ind)))->AddLast(cl);
99 }
100 // now all clusters in 9 neighbour cells to the given one are within MaxT angle
101 //Cluster->eSegment is used as chain rating variable
102 for(int Lyr=0;Lyr<NCellZ-MinRating+1;Lyr++) //loop on first layers
103 { iZ=Lyr;
104 for(iX=2;iX<NCellX-2;iX++) for(iY=2;iY<NCellY-2;iY++) //loop on all cells in layer
105 {
106 ind=iZ*NCellX*NCellY+iY*NCellX+iX;
107 arr=(TObjArray*)(Volume->At(ind)); //get array of clusters in the cell
108 for(int i=0;i<arr->GetEntries();i++) //loop on clusters
109 {
110 cl=(EdbCluster*)(arr->At(i)); // looking for beginning of the chain
111 if(cl->GetSegment()>0) continue; // cluster already a member of the chain - go to next
112 // cluster can be a start of the chain. iterate now.
113 if(!Propagate(&CurRating, iX,iY,iZ)) continue; //no valid chain found, skip the cluster
114 cl->SetSegment(CurRating);
115
116 }
117 }
118 }
119
120
121
122 }
123 catch(...) {printf("Exception! ind=%d, max=%d.\n",ind,NCellX*NCellY*NCellZ); }
124 for( ind=0;ind<NCellX*NCellY*NCellZ;ind++) delete (Volume->At(ind));
125 delete Volume;
126
127 return 0;
128 }
int NCellY
Definition: AcqTrackReconstructor.cxx:27
int NCellZ
Definition: AcqTrackReconstructor.cxx:27
TObjArray * Volume
Definition: AcqTrackReconstructor.cxx:28
int Propagate(int *Rating, int iX, int iY, int iZ)
Definition: AcqTrackReconstructor.cxx:32
int NCellX
Definition: AcqTrackReconstructor.cxx:27
int MinRating
Definition: AcqTrackReconstructor.cxx:29
Definition: EdbCluster.h:19
Int_t GetSegment() const
Definition: EdbCluster.h:58
void SetSegment(int seg)
Definition: EdbCluster.h:49
virtual Float_t Y() const
Definition: EdbCluster.h:79
Int_t GetFrame() const
Definition: EdbCluster.h:56
virtual Float_t X() const
Definition: EdbCluster.h:78
float DZ
Definition: hwinit.C:66
Definition: tlg2couples.C:89

◆ RecSySal()

int AcqTrackReconstructor::RecSySal ( EdbView View)
176 {
177 // reconstruction a la SySal
178 return 0;
179 }

◆ RecValeri()

int AcqTrackReconstructor::RecValeri ( EdbView View)
137 {
138 // reconstruction a la Valeri Tiukov (4D histogramming)
139 int iX,iY,iZ,ind;
140 float SizeX=360.,SizeY=300.; //view size in microns
141 float DX,DY;
142 float DZ=40.;// emulsion thickness in real space
143 float MaxT=.7; //max tangent of track angle
144 MinRating=10; //minimum rating to keep the chain
145 int CurRating=0; // current chain rating during propagation
146 NCellZ=View->GetNframes();
147 DX=DZ*MaxT;
148 DY=DZ*MaxT;
149 NCellX=int(SizeX/DX);
150 NCellY=int(SizeY/DY);
151 Volume=new TObjArray(NCellX*NCellY*NCellZ);
152 for( ind=0;ind<NCellX*NCellY*NCellZ;ind++) Volume->AddAt(new TObjArray(10),ind);
153 TObjArray *arr,*farr;
154 EdbCluster *cl, *fcl;
155 try {
156 //Building index table
157 for(int i=0;i<View->Nclusters();i++)
158 {
159 cl=View->GetCluster(i);
160 cl->SetSegment(0);
161 iX=int((cl->X()+SizeX/2.)/DX);
162 iY=int((cl->Y()+SizeY/2.)/DY);
163 iZ=cl->GetFrame();
164 ind=iZ*NCellX*NCellY+iY*NCellX+iX;
165 if(ind>=NCellX*NCellY*NCellZ) continue;
166 ((TObjArray*)(Volume->At(ind)))->AddLast(cl);
167 }
168 }
169 catch(...) {printf("Exception! ind=%d, max=%d.\n",ind,NCellX*NCellY*NCellZ); }
170 for( ind=0;ind<NCellX*NCellY*NCellZ;ind++) delete (Volume->At(ind));
171 delete Volume;
172 return 0;
173 }

The documentation for this class was generated from the following files: