diff --git a/Armory/ClassSX3.h b/Armory/ClassSX3.h index 66bf23a..b4194f7 100644 --- a/Armory/ClassSX3.h +++ b/Armory/ClassSX3.h @@ -58,7 +58,7 @@ private: const float radius = 88; const float width = 40; const float length = 75; // 75 - const float gap = 0; // 46 + const float gap = 46; // 46 short id; // -1 when no hit short chUp; diff --git a/Armory/anasenMS.cpp b/Armory/anasenMS.cpp index 6abab3e..26a5d17 100644 --- a/Armory/anasenMS.cpp +++ b/Armory/anasenMS.cpp @@ -101,8 +101,8 @@ int main(int argc, char **argv){ transfer.SetA(27, 13, 0); // 18Ne projectile TGraph* elossBeam = LoadELoss("../ELoss/HeLoss/E_vs_x_Al-27.dat"); transfer.Seta(4, 2); // 4He target - transfer.Setb(4, 2); // outgoing proton from the primary transfer - transfer.SetB(27, 13); // 21Na* heavy product + transfer.Setb(1, 1); // outgoing proton from the primary transfer + transfer.SetB(30, 14); // 21Na* heavy product const double beamA = 27; // mass number of 27Al beam bool enableSequentialDecay = false; // turning to false to disable sequential decay for now, can be set to true to enable @@ -553,7 +553,7 @@ int main(int argc, char **argv){ tree2->Fill(); - }else if (false){//(qqqID >= 0){ + }else if (qqqID >= 0){ // handle QQQ hit case sx3Up = -1; sx3Dn = -1; diff --git a/DetectorConstruction.cc b/DetectorConstruction.cc index 42be93b..8a59171 100644 --- a/DetectorConstruction.cc +++ b/DetectorConstruction.cc @@ -64,15 +64,17 @@ G4VPhysicalVolume* DetectorConstruction::Construct() G4double wireALength = sqrt(zLen*zLen + pow(2 * radiusA * sin(dAngle/2.), 2)); G4double wireATheta = atan2(2 * radiusA * sin(dAngle / 2.), zLen); - G4Tubs* solidPC_A = new G4Tubs("PC_A", 0, 0.01*mm, wireALength/2., 0, 360*deg); + G4Tubs* solidPC_A = new G4Tubs("PC_A", 0, 1*mm, wireALength/2., 0, 360*deg); G4LogicalVolume* logicPC_A = new G4LogicalVolume(solidPC_A, al, "PC_A"); for(int i = 0; i < nWire; i++){ G4double phi = 2 * CLHEP::pi / nWire * i + dAngle / 2.; G4ThreeVector pos(radiusAnew * cos(phi), radiusAnew * sin(phi), 0); - G4RotationMatrix* rot = new G4RotationMatrix(); - rot->rotateZ(360./nWire * (i + wireShift/2.) * deg); - rot->rotateY(wireATheta); + // Euler angles: phi (Z), theta (Y), psi (Z) + G4double phi_euler = 360./nWire * (i + wireShift/2.) * deg; + G4double theta_euler = wireATheta; + G4double psi_euler = 0; + G4RotationMatrix* rot = new G4RotationMatrix(phi_euler, theta_euler, psi_euler); new G4PVPlacement(rot, pos, logicPC_A, "PC_A", logicWorld, false, i); } @@ -80,15 +82,17 @@ G4VPhysicalVolume* DetectorConstruction::Construct() G4double wireCLength = sqrt(zLen*zLen + pow(2 * radiusC * sin(dAngle/2.), 2)); G4double wireCTheta = atan2(2 * radiusC * sin(dAngle / 2.), zLen); - G4Tubs* solidPC_C = new G4Tubs("PC_C", 0, 0.01*mm, wireCLength/2., 0, 360*deg); + G4Tubs* solidPC_C = new G4Tubs("PC_C", 0, 1*mm, wireCLength/2., 0, 360*deg); G4LogicalVolume* logicPC_C = new G4LogicalVolume(solidPC_C, al, "PC_C"); for(int i = 0; i < nWire; i++){ G4double phi = 2 * CLHEP::pi / nWire * i - dAngle/2.; G4ThreeVector pos(radiusCnew * cos(phi), radiusCnew * sin(phi), 0); - G4RotationMatrix* rot = new G4RotationMatrix(); - rot->rotateZ(360./nWire * (i - wireShift/2.) * deg); - rot->rotateY(-wireCTheta); + // Euler angles: phi (Z), theta (Y), psi (Z) + G4double phi_euler = 360./nWire * (i - wireShift/2.) * deg; + G4double theta_euler = -wireCTheta; + G4double psi_euler = 0; + G4RotationMatrix* rot = new G4RotationMatrix(phi_euler, theta_euler, psi_euler); new G4PVPlacement(rot, pos, logicPC_C, "PC_C", logicWorld, false, i); } @@ -105,13 +109,13 @@ G4VPhysicalVolume* DetectorConstruction::Construct() for(int i = 0; i < nSX3; i++){ G4double phi = 2 * CLHEP::pi / nSX3 * (i + 0.5); G4ThreeVector pos1(sx3Radius * cos(phi), sx3Radius * sin(phi), sx3Length/2. + sx3Gap); - G4RotationMatrix* rot1 = new G4RotationMatrix(); - rot1->rotateZ(360./nSX3 * (i + 0.5) * deg); + // Euler angles: phi (Z), theta (Y), psi (Z) + G4double phi_euler = 360./nSX3 * (i + 0.5) * deg; + G4RotationMatrix* rot1 = new G4RotationMatrix(phi_euler, 0, 0); new G4PVPlacement(rot1, pos1, logicSX3, "SX3_front", logicWorld, false, 2*i); G4ThreeVector pos2(sx3Radius * cos(phi), sx3Radius * sin(phi), -sx3Length/2. - sx3Gap); - G4RotationMatrix* rot2 = new G4RotationMatrix(); - rot2->rotateZ(360./nSX3 * (i + 0.5) * deg); + G4RotationMatrix* rot2 = new G4RotationMatrix(phi_euler, 0, 0); new G4PVPlacement(rot2, pos2, logicSX3, "SX3_back", logicWorld, false, 2*i+1); } @@ -122,8 +126,9 @@ G4VPhysicalVolume* DetectorConstruction::Construct() for(int i = 0; i < 4; i++){ G4ThreeVector pos(0, 0, 100.*mm); - G4RotationMatrix* rot = new G4RotationMatrix(); - rot->rotateZ(360./4 * i * deg); + // Euler angles: phi (Z), theta (Y), psi (Z) + G4double phi_euler = 360./4 * i * deg; + G4RotationMatrix* rot = new G4RotationMatrix(phi_euler, 0, 0); new G4PVPlacement(rot, pos, logicQQQ, "QQQ", logicWorld, false, i); } diff --git a/ELoss/PCEnergyAnalysis.py b/ELoss/PCEnergyAnalysis.py index 04240d9..75751f2 100644 --- a/ELoss/PCEnergyAnalysis.py +++ b/ELoss/PCEnergyAnalysis.py @@ -1076,7 +1076,7 @@ class MyInteractiveApp(cmd.Cmd): qz = np.asarray(qqqZ, dtype=float) qc = np.asarray(qqqE, dtype=float) - if x.size > 0 and False: + if x.size > 0 and True: fig = plt.figure(figsize=(8,6)) ax = fig.add_subplot(111, projection='3d')