2 #ifndef GW_GAMMATRACKER_H
24 OFT(
const char *name =
"OFT",
const char *title =
"Orsay's forward tracking program");
27 virtual Int_t DoTracking();
38 #include <tracking_define.h>
39 #include <tracking_data.h>
40 #include <tracking_data_manip.h>
41 #include <tracking_utilitaires.h>
42 #include <tracking_cluster.h>
43 #include <tracking_events.h>
51 Double_t r[intmax][intmax], r_ge[intmax][intmax], erfcu[1000], etot[intmax], probtot[intmax], angn[intmax];
52 Int_t sn[intmax][kmax], numn[intmax], order[intmax], nombre[intmax], flagu[intmax], nbtot[intmax];
53 Double_t angtheta[intmax], angphi[intmax];
55 Int_t numinter[intmax], numintern[intmax], interaction[intmax][kmax];
57 Double_t ddu; Int_t nintu;
78 maprandom(erfcu, ddu, nintu);
88 Int_t n, i, j, itot, itotcurr, mult;
102 if ( gDebug )
printf(
"pack points\n");
103 nb_int = packpoints(nb_int, x, y, z, e, numinter, order);
119 if ( gDebug )
printf(
"smear positions\n");
120 smearpoints(nb_int, x, y, z, erfcu, ddu, nintu);
126 if ( gDebug )
printf(
"Apply Energy threshold\n");
127 nb_int = energy_thresh(nb_int, x, y, z, e, numinter, order);
145 for (i = 0; i < nb_int; i++) {
146 r[i][i] = sqrt(SQ(x[i] - xsource) + SQ(y[i] - ysource) + SQ(z[i] - zsource));
147 angtheta[i] = acos((z[i] - zsource) / r[i][i]);
148 angphi[i] = atan2((y[i] - ysource), (x[i] - xsource));
150 angphi[i] = 2 * PI + angphi[i];
156 if ( gDebug )
printf(
"sort according to increasing theta\n");
157 for (i = 0; i < nb_int; i++) {
158 for (j = i + 1; j < nb_int; j++) {
159 if (angtheta[j] < angtheta[i]) {
164 swapi(numinter, i, j);
166 swap(angtheta, i, j);
175 if ( gDebug )
printf(
"computing all distances between interactions\n");
176 distances(r, r_ge, nb_int, x, y, z);
185 if ( gDebug )
printf(
"find clusters\n");
186 n = cluster_search(numn, angn, et, sn, nb_int, e, angtheta, angphi);
199 if ( gDebug )
printf(
"compute figure of merit of clusters\n");
200 cluster_evaluation(n, et, numn, sn, probtot, interaction, e, x, y, z, r, r_ge, flagu);
214 if ( gDebug )
printf(
"sort clusters\n");
215 cluster_sort_flag(n, et, numn, sn, angn, probtot, interaction, flagu);
222 if ( gDebug )
printf(
"test of direct photopic events\n");
224 single_interaction(nb_int, r, r_ge, n, et, numn, sn, probtot, flagu);
232 if ( gDebug )
printf(
"cluster validation\n");
234 mult = cluster_validation(etot, nbtot, n, probtot, numn, interaction, et, flagu, x, y, z, r, thetafirst, phifirst, thetasecond, phisecond);
UInt_t OutputN
DZ positions.
virtual void SetEnerFactor(Double_t f)
printf("******************************************************************** \n")
Base class to build tracker families.
Double_t * InputZ
Y positions.
OFT(const char *name="OFT", const char *title="Orsay's forward tracking program")
Adapter to plug the Orsay's forward tracking code.
Double_t * OutputPhi2
direction (theta) of the first scattered gamma-ray for polarisation
Double_t * OutputPhi1
incoming direction (theta) of the reconstructed gamma-rays
virtual void SetDistFactor(Double_t f)
UInt_t InputN
Units for energies.
Double_t * OutputTheta1
energies of the reconstructed gamma-rays
Double_t * InputY
X positions.
Double_t * OutputE
of reconstructed gamma-rays
Double_t * InputE
of impacts
virtual Int_t DoTracking()
to track the gamma-rays
Double_t * InputX
errors on energies
Double_t * OutputTheta2
incoming direction (phi) of the reconstructed gamma-rays