cout << "m_n_ion_mm " << m_n_ion_mm << " N_PRI_AVE " << N_PRI_AVE << " m_track_length_limit " << m_track_length_limit << endl; cout << "xIN " << trkPosIn[0] << " yIN " << trkPosIn[1] << " zIN " << trkPosIn[2] << endl;
cout << "xOUT " << trkPosOut[0] << " yOUT " << trkPosOut[1] << " zOUT " << trkPosOut[2] << endl;
77 {
78
79 double time_spent = 0.;
80 clock_t begin = clock();
81
82 clear();
83
84
85
86 m_track_length_limit = TMath::Sqrt((trkPosOut[0] - trkPosIn[0])*(trkPosOut[0] - trkPosIn[0]) + (trkPosOut[1] - trkPosIn[1])*(trkPosOut[1] - trkPosIn[1]) + (trkPosOut[2] - trkPosIn[2])*(trkPosOut[2] - trkPosIn[2]));
87 m_track_length = 0;
88
89 m_n_ion_mm =
N_PRI_AVE/m_track_length_limit;
90
91
92
93
94
95
96
97
98 int counter = 0;
99
100 double last_x;
101 double last_y;
102 double last_z;
103 double last_t;
104
105 while(1) {
106
107
109 if(!is_inside) break;
110
111
113 m_nIonE += nof_sec_ele;
114
115
117 double y = 0;
118 double z = 0;
121
122
123
124 m_cx.push_back(x);
125 m_cy.push_back(y);
126 m_cz.push_back(z);
128
129
130
132 double distance = TMath::Sqrt((last_x - x)*(last_x - x) + (last_y - y)*(last_y - y) + (last_z - z)*(last_z - z));
133 h_distance_cluster->Fill(distance);
135 last_y = y;
136 last_z = z;
138 }
139
140
141 for(int iele = 0; iele < nof_sec_ele + 1; iele++)
142 {
143 m_ex.push_back(x);
144 m_ey.push_back(y);
145 m_ez.push_back(z);
147
148 }
149 counter++;
150
151
152 }
153
154 if(m_nIonE != m_ex.size()) std::cout << "IonizationGTS::setTrack ERRRRRRRRRRRRRROR" << std::endl;
155
156 if(
m_testing==
true) h_nof_cluster->Fill(counter-1);
157
158 clock_t end = clock();
159 time_spent += (double)(end - begin) / CLOCKS_PER_SEC;
160 cout << "Sampling::ionization " << m_nIonE << " time " << time_spent << " seconds" << endl;
161
162
163
164
165}
void compute_pos(double trkPosIn[], double trkPosOut[], double &x, double &y, double &z)
bool generate_primary_ele()
int generate_secondary_ele()