GEMC  2.3
Geant4 Monte-Carlo Framework
example.cc
Go to the documentation of this file.
1 #include "fmt_strip.h"
2 #include "bmt_strip.h"
3 
4 #include <iostream>
5 using namespace std;
6 
7 int main(int argn, char** argv)
8 {
9  if(argn != 7)
10  {
11  cout << endl << " Wrong mumber of arguments. Usage: example layer sector x y z BMT" << endl << endl;
12  exit(0);
13  }
14 
15  int layer = atoi(argv[1]);
16  int sector = atoi(argv[2]);
17  double x = atof(argv[3]);
18  double y = atof(argv[4]);
19  double z = atof(argv[5]);
20  string D = argv[6];
21 
22  double X,Y,Z;
23 
24  int Strip;
25 
26  if(D == "FMT")
27  {
28  class fmt_strip fmts;
29  fmts.fill_infos();
30  X = x;
31  Y = y;
32  Z = z;
33  Strip = fmts.FindStrip(layer, sector, X, Y, Z);
34  }
35 
36  if(D == "BMT")
37  {
38  class bmt_strip bmts;
39  bmts.fill_infos();
40  X = x;
41  Y = y;
42  Z = z;
43  Strip = bmts.FindStrip(layer, sector, X, Y, Z);
44  }
45 
46 
47  cout << D << ": ";
48  cout << " x = " << X << " " ;
49  cout << " y = " << Y << " " ;
50  cout << " z = " << Z << " " ;
51  cout << " Strip = " << Strip << endl;
52 
53  return 1;
54 
55 }
int main(int argn, char **argv)
Definition: example.cc:7
void fill_infos()
Definition: fmt_strip.cc:7
STL namespace.
vector< double > FindStrip(int layer, int sector, G4ThreeVector xyz, double Edep, bmtConstants bmtc)
Definition: bmt_strip.cc:18
vector< double > FindStrip(int layer, int sector, double x, double y, double z, double Edep)
Definition: fmt_strip.cc:69