Skip to content
Snippets Groups Projects
Commit e04450de authored by matta's avatar matta
Browse files

* Adding CATS in NPL DetectorManager

* Changing old naming convention ThinSi to SSSD
parent 3cfff982
No related branches found
No related tags found
No related merge requests found
...@@ -128,30 +128,30 @@ VIS= all ...@@ -128,30 +128,30 @@ VIS= all
%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%
AddThinSi SSSDArray
%%%%%%%%%% Det 1 %%%%%%%% %%%%%%%%%% Det 1 %%%%%%%%
ThinSi SSSD
A= 17.61 9.85 104.11 A= 17.61 9.85 104.11
B= 64.48 9.85 85.31 B= 64.48 9.85 85.31
C= 58.66 56.29 70.79 C= 58.66 56.29 70.79
D= 11.79 56.29 89.69 D= 11.79 56.29 89.69
% %
%%%%%%%%%% Det 2 %%%%%%%% %%%%%%%%%% Det 2 %%%%%%%%
ThinSi SSSD
A= -11.79 56.29 89.59 A= -11.79 56.29 89.59
B= -58.66 56.29 70.79 B= -58.66 56.29 70.79
C= -64.48 9.85 85.31 C= -64.48 9.85 85.31
D= -17.61 9.85 104.11 D= -17.61 9.85 104.11
% %
%%%%%%%%%% Det 3 %%%%%%%% %%%%%%%%%% Det 3 %%%%%%%%
ThinSi SSSD
A= -17.61 -9.85 104.11 A= -17.61 -9.85 104.11
B= -64.48 -9.85 85.31 B= -64.48 -9.85 85.31
C= -58.66 -56.29 70.79 C= -58.66 -56.29 70.79
D= -11.79 -56.29 89.59 D= -11.79 -56.29 89.59
% %
%%%%%%%%%% Det 4 %%%%%%%% %%%%%%%%%% Det 4 %%%%%%%%
ThinSi SSSD
A= 11.79 -56.29 89.59 A= 11.79 -56.29 89.59
B= 58.66 -56.29 70.79 B= 58.66 -56.29 70.79
C= 64.48 -9.85 85.31 C= 64.48 -9.85 85.31
......
%%%%%%%%%%%%%%%%%%%%
SSSDArray
%%%%%%%%% Det 1 %%%%%%%%
SSSD
A= 17.61 9.85 104.11
B= 64.48 9.85 85.31
C= 58.66 56.29 70.79
D= 11.79 56.29 89.69
%%%%%%%%% Det 2 %%%%%%%%
SSSD
THETA= 33
PHI= -130
R= 110
BETA= 0 0 -0
SIDE= right
%%%%%%%%%%%%%%%%%%%%
AddThinSi
%%%%%%%%% Det 1 %%%%%%%%
ThinSi
A= 17.61 9.85 104.11
B= 64.48 9.85 85.31
C= 58.66 56.29 70.79
D= 11.79 56.29 89.69
%%%%%%%%% Det 2 %%%%%%%%
ThinSi
THETA= 33
PHI= -130
R= 110
BETA= 0 0 -0
SIDE= right
...@@ -94,10 +94,10 @@ void TSSSDPhysics::ReadConfiguration(string Path) ...@@ -94,10 +94,10 @@ void TSSSDPhysics::ReadConfiguration(string Path)
getline(ConfigFile, LineBuffer); getline(ConfigFile, LineBuffer);
// If line is a Start Up ThinSi bloc, Reading toggle to true // If line is a Start Up SSSD bloc, Reading toggle to true
if (LineBuffer.compare(0, 6, "ThinSi") == 0) if (LineBuffer.compare(0, 4, "SSSD") == 0)
{ {
cout << "Detector found: " << endl ; cout << "SSSD found: " << endl ;
ReadingStatus = true ; ReadingStatus = true ;
} }
...@@ -114,22 +114,22 @@ void TSSSDPhysics::ReadConfiguration(string Path) ...@@ -114,22 +114,22 @@ void TSSSDPhysics::ReadConfiguration(string Path)
if (DataBuffer.compare(0, 1, "%") == 0) { ConfigFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );} if (DataBuffer.compare(0, 1, "%") == 0) { ConfigFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );}
// Finding another telescope (safety), toggle out // Finding another telescope (safety), toggle out
else if (DataBuffer.compare(0, 6, "ThinSi") == 0) { else if (DataBuffer.compare(0, 4, "SSSD") == 0) {
cout << "WARNING: Another Telescope is find before standard sequence of Token, Error may occured in Telecope definition" << endl ; cout << "WARNING: Another Telescope is find before standard sequence of Token, Error may occured in Telecope definition" << endl ;
ReadingStatus = false ; ReadingStatus = false ;
} }
//Position method //Position method
else if (DataBuffer=="A=") { else if (DataBuffer=="A=") {
check_A = true; check_A = true;
ConfigFile >> DataBuffer ; ConfigFile >> DataBuffer ;
TLX = atof(DataBuffer.c_str()) ; TLX = atof(DataBuffer.c_str()) ;
ConfigFile >> DataBuffer ; ConfigFile >> DataBuffer ;
TLY = atof(DataBuffer.c_str()) ; TLY = atof(DataBuffer.c_str()) ;
ConfigFile >> DataBuffer ; ConfigFile >> DataBuffer ;
TLZ = atof(DataBuffer.c_str()) ; TLZ = atof(DataBuffer.c_str()) ;
cout << " A corner Position : (" << TLX << ";"<< TLY << ";"<< TLZ << ")"<<endl; cout << " A corner Position : (" << TLX << ";"<< TLY << ";"<< TLZ << ")"<<endl;
} }
else if (DataBuffer=="B=") { else if (DataBuffer=="B=") {
check_B = true; check_B = true;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// Detector // Detector
#include "TMust2Physics.h" #include "TMust2Physics.h"
#include "TCATSPhysics.h"
#include "TSSSDPhysics.h" #include "TSSSDPhysics.h"
#include "TPlasticPhysics.h" #include "TPlasticPhysics.h"
#include "GaspardTracker.h" #include "GaspardTracker.h"
...@@ -47,7 +48,8 @@ void DetectorManager::ReadConfigurationFile(string Path) ...@@ -47,7 +48,8 @@ void DetectorManager::ReadConfigurationFile(string Path)
/////////Boolean//////////////////// /////////Boolean////////////////////
bool MUST2 = false; bool MUST2 = false;
bool AddThinSi = false; bool CATS = false;
bool SSSD = false;
bool ScintillatorPlastic = false; bool ScintillatorPlastic = false;
bool GeneralTarget = false; bool GeneralTarget = false;
bool GPDTracker = false; bool GPDTracker = false;
...@@ -159,7 +161,7 @@ void DetectorManager::ReadConfigurationFile(string Path) ...@@ -159,7 +161,7 @@ void DetectorManager::ReadConfigurationFile(string Path)
} }
//////////////////////////////////////////// ////////////////////////////////////////////
//////// Search for MUST2 Array //////// //////// Search for MUST2 Array ////////
//////////////////////////////////////////// ////////////////////////////////////////////
else if (LineBuffer.compare(0, 10, "MUST2Array") == 0 && MUST2 == false) { else if (LineBuffer.compare(0, 10, "MUST2Array") == 0 && MUST2 == false) {
MUST2 = true; MUST2 = true;
...@@ -177,6 +179,25 @@ void DetectorManager::ReadConfigurationFile(string Path) ...@@ -177,6 +179,25 @@ void DetectorManager::ReadConfigurationFile(string Path)
AddDetector("MUST2", myDetector); AddDetector("MUST2", myDetector);
} }
////////////////////////////////////////////
//////// Search for CATS Array ////////
////////////////////////////////////////////
else if (LineBuffer.compare(0, 9, "CATSArray") == 0 && CATS == false) {
MUST2 = true;
cout << "//////// CATS Array ////////" << endl << endl;
// Instantiate the new array as a VDetector Object
VDetector* myDetector = new TCATSPhysics();
// Read Position of Telescope
ConfigFile.close();
myDetector->ReadConfiguration(Path);
ConfigFile.open(Path.c_str());
// Add array to the VDetector Vector
AddDetector("CATS", myDetector);
}
//////////////////////////////////////////// ////////////////////////////////////////////
////////// Search for W1 (Micron) ///////// ////////// Search for W1 (Micron) /////////
//////////////////////////////////////////// ////////////////////////////////////////////
...@@ -197,11 +218,11 @@ void DetectorManager::ReadConfigurationFile(string Path) ...@@ -197,11 +218,11 @@ void DetectorManager::ReadConfigurationFile(string Path)
} }
//////////////////////////////////////////// ////////////////////////////////////////////
////////// Search for ThinSi (SSSD)///////// ////////// Search for SSSD /////////
//////////////////////////////////////////// ////////////////////////////////////////////
else if (LineBuffer.compare(0, 9, "AddThinSi") == 0 && AddThinSi == false) { else if (LineBuffer.compare(0, 9, "SSSDArray") == 0 && SSSD == false) {
AddThinSi = true ; SSSD = true ;
cout << "//////// Thin Si ////////" << endl << endl; cout << "//////// SSSD ////////" << endl << endl;
// Instantiate the new array as a VDetector Object // Instantiate the new array as a VDetector Object
VDetector* myDetector = new TSSSDPhysics(); VDetector* myDetector = new TSSSDPhysics();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment