GEMC  2.3
Geant4 Monte-Carlo Framework
example.cc
Go to the documentation of this file.
1 #include "bst_strip.h"
2 #include "fst_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 BST" << 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 == "BST")
27  {
28  class bst_strip bsts;
29  bsts.fill_infos();
30  bsts.FindCard(layer, z);
31  X = bsts.x;
32  Y = bsts.y;
33  Z = bsts.z;
34  Strip = bsts.FindStrip(layer, sector, X, Y, Z);
35  }
36  if(D == "FST")
37  {
38  class fst_strip fsts;
39  fsts.fill_infos();
40  X = x;
41  Y = y;
42  Z = z;
43  Strip = fsts.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
STL namespace.
void fill_infos()
Definition: bst_strip.cc:12
vector< double > FindStrip(int layer, int sector, int isens, G4ThreeVector Lxyz)
Definition: bst_strip.cc:36