diff --git a/doc/musrSim.pdf b/doc/musrSim.pdf index 4c1f5e2..7746f58 100644 Binary files a/doc/musrSim.pdf and b/doc/musrSim.pdf differ diff --git a/doc/musrSim.tex b/doc/musrSim.tex index 56d04a7..70a6e1c 100644 --- a/doc/musrSim.tex +++ b/doc/musrSim.tex @@ -474,19 +474,23 @@ care. $x$, $y$ and $z$). In such cases, the user can specify this in the field map file using the keyword ``symmetryType \emph{number}'', where the \emph{number} specifies how the field should be extrapolated to other octants. - The ``symmetryType 1'' case means that the planes of symmetry are (x,y) and - (x,z), i.e. if the field at point $(x,y,z)$ is $(F_x,F_y,F_z)$, the field in - different octants will look like this: - $(-x,y,z) \rightarrow (F_x,F_y,F_z)$; - $(x,-y,z) \rightarrow (F_x,-F_y,F_z)$; - $(-x,-y,z) \rightarrow (F_x,-F_y,F_z)$; - $(x,y,-z) \rightarrow (F_x,F_y,-F_z)$; - $(-x,y,-z) \rightarrow (F_x,F_y,-F_z)$; - $(x,-y,-z) \rightarrow (F_x,-F_y,-F_z)$; - $(-x,-y,-z) \rightarrow (F_x,-F_y,-F_z)$. \\ - Similar case is the ``symmetryType 2'', where the planes of symmetry are - (x,y) and (y,z). - These two symmetry types are realised in a the spin rotator oriented along the z axis.\\ + The ``symmetryType 1'' case can be used for a field between two electrodes + (e.g.\ of a spin rotator), where the electrodes are parallel with the $(y,z)$ plane + (i.e.\ the main component of the field is along the $x$ axis). + In this case: if the field at point $(x,y,z)$ is $(F_x,F_y,F_z)$, the field in + different octants will look be: \\ + $(x,y,z) \rightarrow (F_x,F_y,F_z)$;\\ + $(x,y,-z) \rightarrow (F_x,F_y,-F_z)$;\\ + $(x,-y,z) \rightarrow (F_x,-F_y,F_z)$;\\ + $(x,-y,-z) \rightarrow (F_x,-F_y,-F_z)$;\\ + $(-x,y,z) \rightarrow (F_x,-F_y,-F_z)$;\\ + $(-x,y,-z) \rightarrow (F_x,-F_y,F_z)$;\\ + $(-x,-y,z) \rightarrow (F_x,F_y,-F_z)$;\\ + $(-x,-y,-z) \rightarrow (F_x,F_y,F_z)$. \\ + Similar case is the ``symmetryType 2'', where the main field component is along the + $y$ axis. + These two symmetry types are realised as electric and magnetic fields + in a spin rotator oriented along the z axis.\\ Example of the beginning of the 3DBOpera-type field map file:\\ 2 2 55\\ 1 X\\ diff --git a/musrSimAna/musrAnalysis.cxx b/musrSimAna/musrAnalysis.cxx index a34d4b5..42f7e15 100644 --- a/musrSimAna/musrAnalysis.cxx +++ b/musrSimAna/musrAnalysis.cxx @@ -985,6 +985,18 @@ void musrAnalysis::FillHistograms(Int_t iiiEntry) { // Check whether there was good hit in the Positron counter // Long64_t dataBinMin = (mCounterHitExistsForThisEventID) ? timeBin0+dataWindowBinMin : timeBinOfThePreviouslyProcessedHit-100000000; // Long64_t dataBinMax = (mCounterHitExistsForThisEventID) ? timeBin0+dataWindowBinMax : timeBinOfThePreviouslyProcessedHit+100000000; + detP_x = -1001.; + detP_y = -1001.; + detP_z = -1001.; + detP_time_start = -1001.; + detP_time_end = -1001.; + detP_theta = -1001.; + detP_phi = -1001.; + detP_phi_MINUS_pos_Phi = -1001.; + detP_phi_MINUS_pos_Phi360 = -1001.; + detP_theta_MINUS_pos_Theta = -1001.; + detP_theta_MINUS_pos_Theta360 = -1001.; + detP_time_start_MINUS_muDecayTime = -1001.; pileup_eventID = -1001; pileup_muDecayDetID_double = -1001; pileup_muDecayPosX = -1000000000; @@ -997,18 +1009,31 @@ void musrAnalysis::FillHistograms(Int_t iiiEntry) { Long64_t dataBinMax = timeBin0+dataWindowBinMax; pCounterHitExistsForThisEventID = PositronCounterHit(eventID,dataBinMin,dataBinMax,timeBin1,timeBin2,posEntry,idetP,idetP_ID,idetP_edep,doubleHitP); //cDEL if (pCounterHitExistsForThisEventID) std::cout<<" timeBin1-timeBin2 = "<0)&&(posEntry>0)&&(kEntry!=posEntry)) { - // This must be a pileup event (positron counter hit comes from the different event than the muon counter hit) + // + if (pCounterHitExistsForThisEventID&&(posEntry>0)) { + // Get variables of the detector hit corresponding to the positron candidate: fChain->GetEntry(posEntry); - pileup_eventID = eventID; - pileup_muDecayDetID_double = muDecayDetID; - pileup_muDecayPosX = muDecayPosX; - pileup_muDecayPosY = muDecayPosY; - pileup_muDecayPosZ = muDecayPosZ; - pileup_muDecayPosR = sqrt(muDecayPosX*muDecayPosX+muDecayPosY*muDecayPosY); - // if (pileup_muDecayDetID_double==-1000) { - // std::cout<<"DEBUG: pileup_muDecayDetID_double==-1000, posEntry="<SetProperTime(decaytime); } diff --git a/src/musrTabulatedElementField.cc b/src/musrTabulatedElementField.cc index cee4a21..fc24bea 100644 --- a/src/musrTabulatedElementField.cc +++ b/src/musrTabulatedElementField.cc @@ -570,10 +570,12 @@ void musrTabulatedElementField::addFieldValue3D(const G4double point[4], if (symmetryType!=0) { switch(symmetryType) { case (1): - B[1]*=y_sign; B[2]*=z_sign; + // B[1]*=y_sign; B[2]*=z_sign; + B[1]*=y_sign*x_sign; B[2]*=z_sign*x_sign; break; case (2): - B[0]*=x_sign; B[2]*=z_sign; + // B[0]*=x_sign; B[2]*=z_sign; + B[0]*=x_sign*y_sign; B[2]*=z_sign*y_sign; break; case (101): if (xySwap) {