diff --git a/Inputs/DetectorConfiguration/Riken_65mm.detector b/Inputs/DetectorConfiguration/Riken_65mm.detector index 6e69943152cf28638e5df00c77501f5b09688edf..e835d16d5c57068b99fb2c1ac4af0e1b9047b727 100644 --- a/Inputs/DetectorConfiguration/Riken_65mm.detector +++ b/Inputs/DetectorConfiguration/Riken_65mm.detector @@ -128,30 +128,30 @@ VIS= all %%%%%%%%%%%%%%%%%%%%% -AddThinSi +SSSDArray %%%%%%%%%% Det 1 %%%%%%%% -ThinSi +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 %%%%%%%% -ThinSi +SSSD A= -11.79 56.29 89.59 B= -58.66 56.29 70.79 C= -64.48 9.85 85.31 D= -17.61 9.85 104.11 % %%%%%%%%%% Det 3 %%%%%%%% -ThinSi +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.59 % %%%%%%%%%% Det 4 %%%%%%%% -ThinSi +SSSD A= 11.79 -56.29 89.59 B= 58.66 -56.29 70.79 C= 64.48 -9.85 85.31 diff --git a/Inputs/DetectorConfiguration/SSSD.detector b/Inputs/DetectorConfiguration/SSSD.detector new file mode 100644 index 0000000000000000000000000000000000000000..e3cbb377bc0107882efd95976742a633d792b2dd --- /dev/null +++ b/Inputs/DetectorConfiguration/SSSD.detector @@ -0,0 +1,19 @@ +%%%%%%%%%%%%%%%%%%%% +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 + + + diff --git a/Inputs/DetectorConfiguration/ThinSi.detector b/Inputs/DetectorConfiguration/ThinSi.detector deleted file mode 100644 index 352ff0601de682f39a585712f3183bae144275a2..0000000000000000000000000000000000000000 --- a/Inputs/DetectorConfiguration/ThinSi.detector +++ /dev/null @@ -1,19 +0,0 @@ -%%%%%%%%%%%%%%%%%%%% -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 - - - diff --git a/NPLib/SSSD/TSSSDPhysics.cxx b/NPLib/SSSD/TSSSDPhysics.cxx index 5ba76ce55472a7a7198a32af35cb1dc7b79c0903..a79aff3d03e029f81f805d04bdc773e2c22bcb30 100644 --- a/NPLib/SSSD/TSSSDPhysics.cxx +++ b/NPLib/SSSD/TSSSDPhysics.cxx @@ -94,10 +94,10 @@ void TSSSDPhysics::ReadConfiguration(string Path) getline(ConfigFile, LineBuffer); - // If line is a Start Up ThinSi bloc, Reading toggle to true - if (LineBuffer.compare(0, 6, "ThinSi") == 0) + // If line is a Start Up SSSD bloc, Reading toggle to true + if (LineBuffer.compare(0, 4, "SSSD") == 0) { - cout << "Detector found: " << endl ; + cout << "SSSD found: " << endl ; ReadingStatus = true ; } @@ -114,22 +114,22 @@ void TSSSDPhysics::ReadConfiguration(string Path) if (DataBuffer.compare(0, 1, "%") == 0) { ConfigFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );} // 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 ; ReadingStatus = false ; } - //Position method - else if (DataBuffer=="A=") { - check_A = true; - ConfigFile >> DataBuffer ; - TLX = atof(DataBuffer.c_str()) ; - ConfigFile >> DataBuffer ; - TLY = atof(DataBuffer.c_str()) ; - ConfigFile >> DataBuffer ; - TLZ = atof(DataBuffer.c_str()) ; - cout << " A corner Position : (" << TLX << ";"<< TLY << ";"<< TLZ << ")"<<endl; - } + //Position method + else if (DataBuffer=="A=") { + check_A = true; + ConfigFile >> DataBuffer ; + TLX = atof(DataBuffer.c_str()) ; + ConfigFile >> DataBuffer ; + TLY = atof(DataBuffer.c_str()) ; + ConfigFile >> DataBuffer ; + TLZ = atof(DataBuffer.c_str()) ; + cout << " A corner Position : (" << TLX << ";"<< TLY << ";"<< TLZ << ")"<<endl; + } else if (DataBuffer=="B=") { check_B = true; diff --git a/NPLib/VDetector/DetectorManager.cxx b/NPLib/VDetector/DetectorManager.cxx index 5c8250e8ba75e93c7d5912b5785f3dd5326d107a..f9cfad7eebfd28ebf803ecbdff71741a591bd7b9 100644 --- a/NPLib/VDetector/DetectorManager.cxx +++ b/NPLib/VDetector/DetectorManager.cxx @@ -7,6 +7,7 @@ // Detector #include "TMust2Physics.h" +#include "TCATSPhysics.h" #include "TSSSDPhysics.h" #include "TPlasticPhysics.h" #include "GaspardTracker.h" @@ -47,7 +48,8 @@ void DetectorManager::ReadConfigurationFile(string Path) /////////Boolean//////////////////// bool MUST2 = false; - bool AddThinSi = false; + bool CATS = false; + bool SSSD = false; bool ScintillatorPlastic = false; bool GeneralTarget = false; bool GPDTracker = false; @@ -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) { MUST2 = true; @@ -177,6 +179,25 @@ void DetectorManager::ReadConfigurationFile(string Path) 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) ///////// //////////////////////////////////////////// @@ -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) { - AddThinSi = true ; - cout << "//////// Thin Si ////////" << endl << endl; + else if (LineBuffer.compare(0, 9, "SSSDArray") == 0 && SSSD == false) { + SSSD = true ; + cout << "//////// SSSD ////////" << endl << endl; // Instantiate the new array as a VDetector Object VDetector* myDetector = new TSSSDPhysics();