Commit 0195f1ee authored by Adrien Matta's avatar Adrien Matta
Browse files

* Progress on Catana:

        - CSV file reading
        - nicer visualisation
        - working analysis
parent 39165bb9
Pipeline #77244 passed with stages
in 29 minutes and 34 seconds
/*****************************************************************************
* Copyright (C) 2009-2020 this file is part of the NPTool Project *
* Copyright (C) 2009-2020 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: Adrien Matta contact address: matta@lpccaen.in2p3.fr *
* Original Author: Adrien Matta contact address: matta@lpccaen.in2p3.fr *
* *
* Creation Date : July 2020 *
* Creation Date : July 2020 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold Catana Treated data *
* This class hold Catana Treated data *
* *
*---------------------------------------------------------------------------*
* Comment: *
......@@ -203,13 +203,10 @@ void TCatanaPhysics::Clear() {
///////////////////////////////////////////////////////////////////////////
void TCatanaPhysics::ReadConfiguration(NPL::InputParser parser) {
vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithToken("Catana");
/* vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithToken("Catana");
if(NPOptionManager::getInstance()->GetVerboseLevel())
cout << "//// " << blocks.size() << " detectors found " << endl;
vector<string> cart = {"POS","Shape"};
vector<string> sphe = {"R","Theta","Phi","Shape"};
for(unsigned int i = 0 ; i < blocks.size() ; i++){
if(blocks[i]->HasTokenList(cart)){
if(NPOptionManager::getInstance()->GetVerboseLevel())
......@@ -232,7 +229,7 @@ void TCatanaPhysics::ReadConfiguration(NPL::InputParser parser) {
cout << "ERROR: check your input file formatting " << endl;
exit(1);
}
}
}*/
}
///////////////////////////////////////////////////////////////////////////
......
This diff is collapsed.
......@@ -50,17 +50,15 @@ class Catana : public NPS::VDetector{
////////////////////////////////////////////////////
public:
// Cartesian
void AddDummyDetector(double Z);
void AddDetectorType1(double R, double Theta, double Phi);
void AddDetectorType2(double R, double Theta, double Phi);
void AddDetectorType3(double R, double Theta, double Phi);
void AddDetectorType1(double X, double Y, double Z, double Theta, double Phi, int ID);
void AddDetectorType2(double X, double Y, double Z, double Theta, double Phi, int ID);
void AddDetectorType3(double X, double Y, double Z, double Theta, double Phi, int ID);
void ReadCSV(string path);
G4LogicalVolume* BuildDummyDetector();
G4LogicalVolume* BuildDetectorType1();
G4LogicalVolume* BuildDetectorType2();
G4LogicalVolume* BuildDetectorType3();
private:
G4LogicalVolume* m_DummyDetector;
G4LogicalVolume* m_DetectorType1;
G4LogicalVolume* m_DetectorType2;
G4LogicalVolume* m_DetectorType3;
......@@ -102,19 +100,35 @@ class Catana : public NPS::VDetector{
////////////////////////////////////////////////////
private: // Geometry
// Detector Coordinate
vector<double> m_Z;
vector<double> m_R1;
vector<double> m_R2;
vector<double> m_R3;
vector<double> m_X1;
vector<double> m_X2;
vector<double> m_X3;
vector<double> m_Y1;
vector<double> m_Y2;
vector<double> m_Y3;
vector<double> m_Z1;
vector<double> m_Z2;
vector<double> m_Z3;
vector<double> m_Theta1;
vector<double> m_Theta2;
vector<double> m_Theta3;
vector<double> m_Phi1;
vector<double> m_Phi2;
vector<double> m_Phi3;
vector<int> m_ID1;
vector<int> m_ID2;
vector<int> m_ID3;
double m_DZ1;
double m_DZ2;
double m_DZ3;
// Visualisation Attribute
G4VisAttributes* m_VisCrystal;
G4VisAttributes* m_VisCrystal1;
G4VisAttributes* m_VisCrystal2;
G4VisAttributes* m_VisCrystal3;
G4VisAttributes* m_VisCasing;
G4VisAttributes* m_VisTeflon;
// Needed for dynamic loading of the library
public:
......
ID,DetectorType,Layer,X,Y,Z,Theta,Phi
1, 1, 1, -38.4258, 242.611, 26.5, 84.75, 9
2, 1, 1, -111.516, 218.862, 26.5, 84.75, 27
3, 1, 1, -173.69, 173.69, 26.5, 84.75, 45
4, 1, 1, -218.862, 111.516, 26.5, 84.75, 63
5, 1, 1, -242.611, 38.4258, 26.5, 84.75, 81
6, 1, 1, -242.611, -38.4258, 26.5, 84.75, 99
7, 1, 1, -218.862, -111.516, 26.5, 84.75, 117
8, 1, 1, -173.69, -173.69, 26.5, 84.75, 135
9, 1, 1, -111.516, -218.862, 26.5, 84.75, 153
10, 1, 1, -38.4258, -242.611, 26.5, 84.75, 171
11, 1, 1, 38.4258, -242.611, 26.5, 84.75, 189
12, 1, 1, 111.516, -218.862, 26.5, 84.75, 207
13, 1, 1, 173.69, -173.69, 26.5, 84.75, 225
14, 1, 1, 218.862, -111.516, 26.5, 84.75, 243
15, 1, 1, 242.611, -38.4258, 26.5, 84.75, 261
16, 1, 1, 242.611, 38.4258, 26.5, 84.75, 279
17, 1, 1, 218.862, 111.516, 26.5, 84.75, 297
18, 1, 1, 173.69, 173.69, 26.5, 84.75, 315
19, 1, 1, 111.516, 218.862, 26.5, 84.75, 333
20, 1, 1, 38.4258, 242.611, 26.5, 84.75, 351
21, 1, 2, -39.4712, 249.212, 74.7, 74.25, 9
22, 1, 2, -114.55, 224.817, 74.7, 74.25, 27
23, 1, 2, -178.416, 178.416, 74.7, 74.25, 45
24, 1, 2, -224.817, 114.55, 74.7, 74.25, 63
25, 1, 2, -249.212, 39.4712, 74.7, 74.25, 81
26, 1, 2, -249.212, -39.4712, 74.7, 74.25, 99
27, 1, 2, -224.817, -114.55, 74.7, 74.25, 117
28, 1, 2, -178.416, -178.416, 74.7, 74.25, 135
29, 1, 2, -114.55, -224.817, 74.7, 74.25, 153
30, 1, 2, -39.4712, -249.212, 74.7, 74.25, 171
31, 1, 2, 39.4712, -249.212, 74.7, 74.25, 189
32, 1, 2, 114.55, -224.817, 74.7, 74.25, 207
33, 1, 2, 178.416, -178.416, 74.7, 74.25, 225
34, 1, 2, 224.817, -114.55, 74.7, 74.25, 243
35, 1, 2, 249.212, -39.4712, 74.7, 74.25, 261
36, 1, 2, 249.212, 39.4712, 74.7, 74.25, 279
37, 1, 2, 224.817, 114.55, 74.7, 74.25, 297
38, 1, 2, 178.416, 178.416, 74.7, 74.25, 315
39, 1, 2, 114.55, 224.817, 74.7, 74.25, 333
40, 1, 2, 39.4712, 249.212, 74.7, 74.25, 351
41, 2, 3, -39.34, 248.383, 123.2, 64, 9
42, 2, 3, -114.169, 224.069, 123.2, 64, 27
43, 2, 3, -177.823, 177.823, 123.2, 64, 45
44, 2, 3, -224.069, 114.169, 123.2, 64, 63
45, 2, 3, -248.383, 39.34, 123.2, 64, 81
46, 2, 3, -248.383, -39.34, 123.2, 64, 99
47, 2, 3, -224.069, -114.169, 123.2, 64, 117
48, 2, 3, -177.823, -177.823, 123.2, 64, 135
49, 2, 3, -114.169, -224.069, 123.2, 64, 153
50, 2, 3, -39.34, -248.383, 123.2, 64, 171
51, 2, 3, 39.34, -248.383, 123.2, 64, 189
52, 2, 3, 114.169, -224.069, 123.2, 64, 207
53, 2, 3, 177.823, -177.823, 123.2, 64, 225
54, 2, 3, 224.069, -114.169, 123.2, 64, 243
55, 2, 3, 248.383, -39.34, 123.2, 64, 261
56, 2, 3, 248.383, 39.34, 123.2, 64, 279
57, 2, 3, 224.069, 114.169, 123.2, 64, 297
58, 2, 3, 177.823, 177.823, 123.2, 64, 315
59, 2, 3, 114.169, 224.069, 123.2, 64, 333
60, 2, 3, 39.34, 248.383, 123.2, 64, 351
61, 2, 4, -37.4072, 236.18, 168.2, 54, 9
62, 2, 4, -108.56, 213.061, 168.2, 54, 27
63, 2, 4, -169.086, 169.086, 168.2, 54, 45
64, 2, 4, -213.061, 108.56, 168.2, 54, 63
65, 2, 4, -236.18, 37.4072, 168.2, 54, 81
66, 2, 4, -236.18, -37.4072, 168.2, 54, 99
67, 2, 4, -213.061, -108.56, 168.2, 54, 117
68, 2, 4, -169.086, -169.086, 168.2, 54, 135
69, 2, 4, -108.56, -213.061, 168.2, 54, 153
70, 2, 4, -37.4072, -236.18, 168.2, 54, 171
71, 2, 4, 37.4072, -236.18, 168.2, 54, 189
72, 2, 4, 108.56, -213.061, 168.2, 54, 207
73, 2, 4, 169.086, -169.086, 168.2, 54, 225
74, 2, 4, 213.061, -108.56, 168.2, 54, 243
75, 2, 4, 236.18, -37.4072, 168.2, 54, 261
76, 2, 4, 236.18, 37.4072, 168.2, 54, 279
77, 2, 4, 213.061, 108.56, 168.2, 54, 297
78, 2, 4, 169.086, 169.086, 168.2, 54, 315
79, 2, 4, 108.56, 213.061, 168.2, 54, 333
80, 2, 4, 37.4072, 236.18, 168.2, 54, 351
81, 3, 5, -33.7152, 212.87, 211.3, 43.5, 9
82, 3, 5, -97.8454, 192.032, 211.3, 43.5, 27
83, 3, 5, -152.398, 152.398, 211.3, 43.5, 45
84, 3, 5, -192.032, 97.8454, 211.3, 43.5, 63
85, 3, 5, -212.87, 33.7152, 211.3, 43.5, 81
86, 3, 5, -212.87, -33.7152, 211.3, 43.5, 99
87, 3, 5, -192.032, -97.8454, 211.3, 43.5, 117
88, 3, 5, -152.398, -152.398, 211.3, 43.5, 135
89, 3, 5, -97.8454, -192.032, 211.3, 43.5, 153
90, 3, 5, -33.7152, -212.87, 211.3, 43.5, 171
91, 3, 5, 33.7152, -212.87, 211.3, 43.5, 189
92, 3, 5, 97.8454, -192.032, 211.3, 43.5, 207
93, 3, 5, 152.398, -152.398, 211.3, 43.5, 225
94, 3, 5, 192.032, -97.8454, 211.3, 43.5, 243
95, 3, 5, 212.87, -33.7152, 211.3, 43.5, 261
96, 3, 5, 212.87, 33.7152, 211.3, 43.5, 279
97, 3, 5, 192.032, 97.8454, 211.3, 43.5, 297
98, 3, 5, 152.398, 152.398, 211.3, 43.5, 315
99, 3, 5, 97.8454, 192.032, 211.3, 43.5, 333
100, 3, 5, 33.7152, 212.87, 211.3, 43.5, 351
101, 4, 6, -28.1643, 177.822, 250, 32.5, 9
102, 4, 6, -81.736, 160.416, 250, 32.5, 27
103, 4, 6, -127.307, 127.307, 250, 32.5, 45
104, 4, 6, -160.416, 81.736, 250, 32.5, 63
105, 4, 6, -177.822, 28.1643, 250, 32.5, 81
106, 4, 6, -177.822, -28.1643, 250, 32.5, 99
107, 4, 6, -160.416, -81.736, 250, 32.5, 117
108, 4, 6, -127.307, -127.307, 250, 32.5, 135
109, 4, 6, -81.736, -160.416, 250, 32.5, 153
110, 4, 6, -28.1643, -177.822, 250, 32.5, 171
111, 4, 6, 28.1643, -177.822, 250, 32.5, 189
112, 4, 6, 81.736, -160.416, 250, 32.5, 207
113, 4, 6, 127.307, -127.307, 250, 32.5, 225
114, 4, 6, 160.416, -81.736, 250, 32.5, 243
115, 4, 6, 177.822, -28.1643, 250, 32.5, 261
116, 4, 6, 177.822, 28.1643, 250, 32.5, 279
117, 4, 6, 160.416, 81.736, 250, 32.5, 297
118, 4, 6, 127.307, 127.307, 250, 32.5, 315
119, 4, 6, 81.736, 160.416, 250, 32.5, 333
120, 4, 6, 28.1643, 177.822, 250, 32.5, 351
121, 5, 7, -21.105, 133.252, 278.357, 21.5, 9
122, 5, 7, -61.2492, 120.208, 278.357, 21.5, 27
123, 5, 7, -95.3979, 95.3979, 278.357, 21.5, 45
124, 5, 7, -120.208, 61.2492, 278.357, 21.5, 63
125, 5, 7, -133.252, 21.105, 278.357, 21.5, 81
126, 5, 7, -133.252, -21.105, 278.357, 21.5, 99
127, 5, 7, -120.208, -61.2492, 278.357, 21.5, 117
128, 5, 7, -95.3979, -95.3979, 278.357, 21.5, 135
129, 5, 7, -61.2492, -120.208, 278.357, 21.5, 153
130, 5, 7, -21.105, -133.252, 278.357, 21.5, 171
131, 5, 7, 21.105, -133.252, 278.357, 21.5, 189
132, 5, 7, 61.2492, -120.208, 278.357, 21.5, 207
133, 5, 7, 95.3979, -95.3979, 278.357, 21.5, 225
134, 5, 7, 120.208, -61.2492, 278.357, 21.5, 243
135, 5, 7, 133.252, -21.105, 278.357, 21.5, 261
136, 5, 7, 133.252, 21.105, 278.357, 21.5, 279
137, 5, 7, 120.208, 61.2492, 278.357, 21.5, 297
138, 5, 7, 95.3979, 95.3979, 278.357, 21.5, 315
139, 5, 7, 61.2492, 120.208, 278.357, 21.5, 333
140, 5, 7, 21.105, 133.252, 278.357, 21.5, 351
......@@ -7,23 +7,27 @@ Target
X= 0 mm
Y= 0 mm
Z= 0 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Catana Type1
R= 200 mm
Theta= 90 deg
Phi= 60 deg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Catana Type2
R= 200 mm
Theta= 70 deg
Phi= 0 deg
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Catana Type3
R= 100 mm
Theta= 0 deg
Phi= 0 deg
Catana CSV
Path= CATANA_Detectors_samurai09.csv
%Path= CATANAPLUS_Detectors.csv
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Catana Type1
% R= 200 mm
% Theta= 90 deg
% Phi= 60 deg
% ID= 1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Catana Type2
% R= 200 mm
% Theta= 70 deg
% Phi= 0 deg
% ID= 2
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Catana Type3
% R= 100 mm
% Theta=
% Phi=
%
% Theta= 0 deg
% Phi= 0 deg
% ID= 3
......@@ -128,4 +128,7 @@ Strasse Outer
Z= 129 mm
Phi= 300 deg
Shift= -5 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Catana CSV
Path= Catana.csv
......@@ -98,7 +98,7 @@ Strasse Outer
Strasse Chamber
Z= -30 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Catana Dummy
% Z= 300 mm
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Catana CSV
Path= Catana.csv
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment