Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/digits_hits/utils/src/G4VScoringMesh.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /digits_hits/utils/src/G4VScoringMesh.cc (Version 11.3.0) and /digits_hits/utils/src/G4VScoringMesh.cc (Version 9.1.p3)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 // G4VScoringMesh                              <<  26 //
 27 // ------------------------------------------- <<  27 // $Id: G4VScoringMesh.cc,v 1.34 2007/11/07 04:12:07 akimura Exp $
                                                   >>  28 // GEANT4 tag $Name: geant4-09-01-patch-03 $
                                                   >>  29 //
 28                                                    30 
 29 #include "G4VScoringMesh.hh"                       31 #include "G4VScoringMesh.hh"
 30 #include "G4THitsMap.hh"                       << 
 31 #include "G4SystemOfUnits.hh"                  << 
 32 #include "G4VPhysicalVolume.hh"                    32 #include "G4VPhysicalVolume.hh"
 33 #include "G4MultiFunctionalDetector.hh"            33 #include "G4MultiFunctionalDetector.hh"
 34 #include "G4VPrimitiveScorer.hh"                   34 #include "G4VPrimitiveScorer.hh"
 35 #include "G4VSDFilter.hh"                          35 #include "G4VSDFilter.hh"
 36 #include "G4SDManager.hh"                          36 #include "G4SDManager.hh"
 37                                                    37 
 38 G4VScoringMesh::G4VScoringMesh(const G4String& <<  38 G4VScoringMesh::G4VScoringMesh(G4String wName)
 39   : fWorldName(wName)                          <<  39   : fWorldName(wName),fConstructed(false),fActive(true),
 40   , fCurrentPS(nullptr)                        <<  40     fRotationMatrix(NULL), fMFD(new G4MultiFunctionalDetector(wName)),
 41   , fConstructed(false)                        <<  41     verboseLevel(0),sizeIsSet(false),nMeshIsSet(false)
 42   , fActive(true)                              << 
 43   , fShape(MeshShape::undefined)               << 
 44   , fRotationMatrix(nullptr)                   << 
 45   , fMFD(new G4MultiFunctionalDetector(wName)) << 
 46   , verboseLevel(0)                            << 
 47   , sizeIsSet(false)                           << 
 48   , nMeshIsSet(false)                          << 
 49   , fDrawUnit("")                              << 
 50   , fDrawUnitValue(1.)                         << 
 51   , fMeshElementLogical(nullptr)               << 
 52   , fParallelWorldProcess(nullptr)             << 
 53   , fGeometryHasBeenDestroyed(false)           << 
 54   , copyNumberLevel(0)                         << 
 55   , layeredMassFlg(false)                      << 
 56 {                                                  42 {
 57   G4SDManager::GetSDMpointer()->AddNewDetector     43   G4SDManager::GetSDMpointer()->AddNewDetector(fMFD);
 58                                                    44 
 59   fSize[0] = fSize[1] = fSize[2] = 0.;             45   fSize[0] = fSize[1] = fSize[2] = 0.;
 60   fAngle[0]                      = 0.0;        << 
 61   fAngle[1]                      = CLHEP::twop << 
 62   fNSegment[0] = fNSegment[1] = fNSegment[2] =     46   fNSegment[0] = fNSegment[1] = fNSegment[2] = 1;
 63   fDivisionAxisNames[0] = fDivisionAxisNames[1 << 
 64 }                                                  47 }
 65                                                    48 
 66 void G4VScoringMesh::ResetScore()              <<  49 G4VScoringMesh::~G4VScoringMesh()
 67 {                                                  50 {
 68   if(verboseLevel > 9)                         <<  51   ;
 69     G4cout << "G4VScoringMesh::ResetScore() is << 
 70   for(const auto& mp : fMap)                   << 
 71   {                                            << 
 72     if(verboseLevel > 9)                       << 
 73       G4cout << "G4VScoringMesh::ResetScore()" << 
 74     mp.second->clear();                        << 
 75   }                                            << 
 76 }                                                  52 }
 77                                                    53 
 78 void G4VScoringMesh::SetSize(G4double size[3]) <<  54 void G4VScoringMesh::ResetScore() {
 79 {                                              <<  55   if(verboseLevel > 9) G4cout << "G4VScoringMesh::ResetScore() is called." << G4endl;
 80   if(!sizeIsSet)                               <<  56   std::map<G4String, G4THitsMap<G4double>* >::iterator itr = fMap.begin();
 81   {                                            <<  57   for(; itr != fMap.end(); itr++) {
 82     sizeIsSet = true;                          <<  58     if(verboseLevel > 9) G4cout << "G4VScoringMesh::ResetScore()" << itr->first << G4endl;
 83     for(G4int i = 0; i < 3; ++i)               <<  59     itr->second->clear();
 84     {                                          << 
 85       fSize[i] = size[i];                      << 
 86     }                                          << 
 87   }                                            << 
 88   else                                         << 
 89   {                                            << 
 90     G4String message = "   Mesh size has alrea << 
 91     message += "  This method is ignored.";    << 
 92     G4Exception("G4VScoringMesh::SetSize()",   << 
 93                 "DigiHitsUtilsScoreVScoringMes << 
 94   }                                                60   }
 95 }                                                  61 }
 96                                                <<  62 void G4VScoringMesh::SetSize(G4double size[3]) {
 97 G4ThreeVector G4VScoringMesh::GetSize() const  <<  63   for(int i = 0; i < 3; i++) fSize[i] = size[i];
 98 {                                              <<  64   sizeIsSet = true;
 99   if(sizeIsSet)                                << 
100     return G4ThreeVector(fSize[0], fSize[1], f << 
101   return G4ThreeVector(0., 0., 0.);            << 
102 }                                                  65 }
103                                                <<  66 void G4VScoringMesh::SetCenterPosition(G4double centerPosition[3]) {
104 void G4VScoringMesh::SetAngles(G4double startA <<  67   fCenterPosition = G4ThreeVector(centerPosition[0], centerPosition[1], centerPosition[2]);
105 {                                              << 
106   fAngle[0] = startAngle;                      << 
107   fAngle[1] = spanAngle;                       << 
108 }                                                  68 }
109                                                <<  69 void G4VScoringMesh::SetNumberOfSegments(G4int nSegment[3]) {
110 void G4VScoringMesh::SetCenterPosition(G4doubl <<  70   for(int i = 0; i < 3; i++) fNSegment[i] = nSegment[i];
111 {                                              <<  71   nMeshIsSet = true;
112   fCenterPosition =                            << 
113     G4ThreeVector(centerPosition[0], centerPos << 
114 }                                                  72 }
115                                                <<  73 void G4VScoringMesh::GetNumberOfSegments(G4int nSegment[3]) {
116 void G4VScoringMesh::SetNumberOfSegments(G4int <<  74   for(int i = 0; i < 3; i++) nSegment[i] = fNSegment[i];
117 {                                              << 
118   if(!nMeshIsSet || fShape == MeshShape::realW << 
119      fShape == MeshShape::probe)               << 
120   {                                            << 
121     for(G4int i = 0; i < 3; ++i)               << 
122       fNSegment[i] = nSegment[i];              << 
123     nMeshIsSet = true;                         << 
124   }                                            << 
125   else                                         << 
126   {                                            << 
127     G4String message = "   Number of bins has  << 
128     message += "  This method is ignored.";    << 
129     G4Exception("G4VScoringMesh::SetNumberOfSe << 
130                 "DigiHitsUtilsScoreVScoringMes << 
131   }                                            << 
132 }                                              << 
133                                                << 
134 void G4VScoringMesh::GetNumberOfSegments(G4int << 
135 {                                              << 
136   for(G4int i = 0; i < 3; ++i)                 << 
137     nSegment[i] = fNSegment[i];                << 
138 }                                                  75 }
139                                                <<  76 void G4VScoringMesh::RotateX(G4double delta) {
140 void G4VScoringMesh::RotateX(G4double delta)   <<  77   if(fRotationMatrix == NULL) fRotationMatrix = new G4RotationMatrix();
141 {                                              << 
142   if(fRotationMatrix == nullptr)               << 
143     fRotationMatrix = new G4RotationMatrix();  << 
144   fRotationMatrix->rotateX(delta);                 78   fRotationMatrix->rotateX(delta);
145 }                                                  79 }
146                                                    80 
147 void G4VScoringMesh::RotateY(G4double delta)   <<  81 void G4VScoringMesh::RotateY(G4double delta) {
148 {                                              <<  82   if(fRotationMatrix == NULL) fRotationMatrix = new G4RotationMatrix();
149   if(fRotationMatrix == nullptr)               << 
150     fRotationMatrix = new G4RotationMatrix();  << 
151   fRotationMatrix->rotateY(delta);                 83   fRotationMatrix->rotateY(delta);
152 }                                                  84 }
153                                                    85 
154 void G4VScoringMesh::RotateZ(G4double delta)   <<  86 void G4VScoringMesh::RotateZ(G4double delta) {
155 {                                              <<  87   if(fRotationMatrix == NULL) fRotationMatrix = new G4RotationMatrix();
156   if(fRotationMatrix == nullptr)               << 
157     fRotationMatrix = new G4RotationMatrix();  << 
158   fRotationMatrix->rotateZ(delta);                 88   fRotationMatrix->rotateZ(delta);
159 }                                                  89 }
160                                                    90 
161 void G4VScoringMesh::SetPrimitiveScorer(G4VPri <<  91 void G4VScoringMesh::SetPrimitiveScorer(G4VPrimitiveScorer * ps) {
162 {                                              <<  92 
163   if(!ReadyForQuantity())                          93   if(!ReadyForQuantity())
164   {                                                94   {
165     G4cerr << "ERROR : G4VScoringMesh::SetPrim <<  95     G4cerr << "ERROR : G4VScoringMesh::SetPrimitiveScorer() : " << ps->GetName() 
166            << prs->GetName()                   <<  96            << " does not yet have mesh size or number of bins. Set them first." << G4endl
167            << " does not yet have mesh size or <<  97            << "This Method is ignored." << G4endl;
168            << G4endl << "This Method is ignore << 
169     return;                                        98     return;
170   }                                                99   }
171   if(verboseLevel > 0)                         << 100   if(verboseLevel > 0) G4cout << "G4VScoringMesh::SetPrimitiveScorer() : "
172     G4cout << "G4VScoringMesh::SetPrimitiveSco << 101             << ps->GetName() << " is registered."
173            << " is registered."                << 102             << " 3D size: ("
174            << " 3D size: (" << fNSegment[0] << << 103             << fNSegment[0] << ", "
175            << fNSegment[2] << ")" << G4endl;   << 104             << fNSegment[1] << ", "
176                                                << 105             << fNSegment[2] << ")" << G4endl;
177   prs->SetNijk(fNSegment[0], fNSegment[1], fNS << 106 
178   fCurrentPS = prs;                            << 107   ps->SetNijk(fNSegment[0], fNSegment[1], fNSegment[2]);
179   fMFD->RegisterPrimitive(prs);                << 108   fCurrentPS = ps;
180   auto  map =                                  << 109   fMFD->RegisterPrimitive(ps);
181     new G4THitsMap<G4StatDouble>(fWorldName, p << 110   G4THitsMap<G4double> * map = new G4THitsMap<G4double>(fWorldName, ps->GetName());
182   fMap[prs->GetName()] = map;                  << 111   fMap[ps->GetName()] = map;
183 }                                                 112 }
184                                                   113 
185 void G4VScoringMesh::SetFilter(G4VSDFilter* fi << 114 void G4VScoringMesh::SetFilter(G4VSDFilter * filter) {
186 {                                              << 115 
187   if(fCurrentPS == nullptr)                    << 116   if(fCurrentPS == NULL) {
188   {                                            << 117     G4cerr << "ERROR : G4VScoringMesh::SetSDFilter() : a quantity must be defined first. This method is ignored." << G4endl;
189     G4cerr << "ERROR : G4VScoringMesh::SetSDFi << 
190               "defined first. This method is i << 
191            << G4endl;                          << 
192     return;                                       118     return;
193   }                                               119   }
194   if(verboseLevel > 0)                         << 120   if(verboseLevel > 0) G4cout << "G4VScoringMesh::SetFilter() : "
195     G4cout << "G4VScoringMesh::SetFilter() : " << 121             << filter->GetName()
196            << " is set to " << fCurrentPS->Get << 122             << " is set to "
                                                   >> 123             << fCurrentPS->GetName() << G4endl;
197                                                   124 
198   G4VSDFilter* oldFilter = fCurrentPS->GetFilt    125   G4VSDFilter* oldFilter = fCurrentPS->GetFilter();
199   if(oldFilter != nullptr)                     << 126   if(oldFilter)
200   {                                               127   {
201     G4cout << "WARNING : G4VScoringMesh::SetFi << 128     G4cout << "WARNING : G4VScoringMesh::SetFilter() : " << oldFilter->GetName() 
202            << " is overwritten by " << filter-    129            << " is overwritten by " << filter->GetName() << G4endl;
203   }                                               130   }
204   fCurrentPS->SetFilter(filter);                  131   fCurrentPS->SetFilter(filter);
205 }                                                 132 }
206                                                   133 
207 void G4VScoringMesh::SetCurrentPrimitiveScorer << 134 void G4VScoringMesh::SetCurrentPrimitiveScorer(G4String & name) {
208 {                                              << 
209   fCurrentPS = GetPrimitiveScorer(name);          135   fCurrentPS = GetPrimitiveScorer(name);
210   if(fCurrentPS == nullptr)                    << 136   if(fCurrentPS == NULL) {
211   {                                            << 137     G4cerr << "ERROR : G4VScoringMesh::SetCurrentPrimitiveScorer() : The primitive scorer <"
212     G4cerr << "ERROR : G4VScoringMesh::SetCurr << 138      << name << "> does not found." << G4endl;
213               "primitive scorer <"             << 
214            << name << "> does not found." << G << 
215   }                                            << 
216 }                                              << 
217                                                << 
218 G4bool G4VScoringMesh::FindPrimitiveScorer(con << 
219 {                                              << 
220   const auto itr = fMap.find(psname);          << 
221   return itr != fMap.cend();                   << 
222 }                                              << 
223                                                << 
224 G4String G4VScoringMesh::GetPSUnit(const G4Str << 
225 {                                              << 
226   const auto itr = fMap.find(psname);          << 
227   if(itr == fMap.cend())                       << 
228   {                                            << 
229     return G4String("");                       << 
230   }                                            << 
231                                                << 
232   return GetPrimitiveScorer(psname)->GetUnit() << 
233 }                                              << 
234                                                << 
235 G4String G4VScoringMesh::GetCurrentPSUnit()    << 
236 {                                              << 
237   G4String unit = "";                          << 
238   if(fCurrentPS == nullptr)                    << 
239   {                                            << 
240     G4String msg = "ERROR : G4VScoringMesh::Ge << 
241     msg += " Current primitive scorer is null. << 
242     G4cerr << msg << G4endl;                   << 
243   }                                            << 
244   else                                         << 
245   {                                            << 
246     unit = fCurrentPS->GetUnit();              << 
247   }                                               139   }
248   return unit;                                 << 
249 }                                                 140 }
250                                                   141 
251 void G4VScoringMesh::SetCurrentPSUnit(const G4 << 142 G4bool G4VScoringMesh::FindPrimitiveScorer(G4String & psname) {
252 {                                              << 143   std::map<G4String, G4THitsMap<G4double>* >::iterator itr = fMap.find(psname);;
253   if(fCurrentPS == nullptr)                    << 144   if(itr == fMap.end()) return false;
254   {                                            << 145   return true;
255     G4String msg = "ERROR : G4VScoringMesh::Ge << 
256     msg += " Current primitive scorer is null. << 
257     G4cerr << msg << G4endl;                   << 
258   }                                            << 
259   else                                         << 
260   {                                            << 
261     fCurrentPS->SetUnit(unit);                 << 
262   }                                            << 
263 }                                                 146 }
264                                                   147 
265 G4double G4VScoringMesh::GetPSUnitValue(const  << 148 G4VPrimitiveScorer * G4VScoringMesh::GetPrimitiveScorer(G4String & name) {
266 {                                              << 149   if(fMFD == NULL) return NULL;
267   const auto itr = fMap.find(psname);          << 
268   if(itr == fMap.cend())                       << 
269   {                                            << 
270     return 1.;                                 << 
271   }                                            << 
272                                                << 
273   return GetPrimitiveScorer(psname)->GetUnitVa << 
274 }                                              << 
275                                                << 
276 void G4VScoringMesh::GetDivisionAxisNames(G4St << 
277 {                                              << 
278   for(G4int i = 0; i < 3; ++i)                 << 
279     divisionAxisNames[i] = fDivisionAxisNames[ << 
280 }                                              << 
281                                                << 
282 G4VPrimitiveScorer* G4VScoringMesh::GetPrimiti << 
283 {                                              << 
284   if(fMFD == nullptr)                          << 
285     return nullptr;                            << 
286                                                   150 
287   G4int nps = fMFD->GetNumberOfPrimitives();      151   G4int nps = fMFD->GetNumberOfPrimitives();
288   for(G4int i = 0; i < nps; ++i)               << 152   for(G4int i = 0; i < nps; i++) {
289   {                                            << 153     G4VPrimitiveScorer * ps = fMFD->GetPrimitive(i);
290     G4VPrimitiveScorer* prs = fMFD->GetPrimiti << 154     if(name == ps->GetName()) return ps;
291     if(name == prs->GetName())                 << 155   }
292       return prs;                              << 156 
                                                   >> 157   return NULL;
                                                   >> 158 }
                                                   >> 159 void G4VScoringMesh::List() const {
                                                   >> 160   G4cout << " Size: ("
                                                   >> 161    << fSize[0]/cm << ", "
                                                   >> 162    << fSize[1]/cm << ", "
                                                   >> 163    << fSize[2]/cm << ") [cm]"
                                                   >> 164    << G4endl;
                                                   >> 165   G4cout << " # of segments: ("
                                                   >> 166    << fNSegment[0] << ", "
                                                   >> 167    << fNSegment[1] << ", "
                                                   >> 168    << fNSegment[2] << ")"
                                                   >> 169    << G4endl;
                                                   >> 170   G4cout << " displacement: ("
                                                   >> 171    << fCenterPosition.x()/cm << ", "
                                                   >> 172    << fCenterPosition.y()/cm << ", "
                                                   >> 173    << fCenterPosition.z()/cm << ") [cm]"
                                                   >> 174    << G4endl;
                                                   >> 175   if(fRotationMatrix != 0) {
                                                   >> 176     G4cout << " rotation matrix: "
                                                   >> 177      << fRotationMatrix->xx() << "  "
                                                   >> 178      << fRotationMatrix->xy() << "  "
                                                   >> 179      << fRotationMatrix->xz() << G4endl
                                                   >> 180      << "                  "
                                                   >> 181      << fRotationMatrix->yx() << "  "
                                                   >> 182      << fRotationMatrix->yy() << "  "
                                                   >> 183      << fRotationMatrix->yz() << G4endl
                                                   >> 184      << "                  "
                                                   >> 185      << fRotationMatrix->zx() << "  "
                                                   >> 186      << fRotationMatrix->zy() << "  "
                                                   >> 187      << fRotationMatrix->zz() << G4endl;
293   }                                               188   }
294                                                   189 
295   return nullptr;                              << 
296 }                                              << 
297                                                << 
298 void G4VScoringMesh::List() const              << 
299 {                                              << 
300   G4cout << " # of segments: (" << fNSegment[0 << 
301          << fNSegment[2] << ")" << G4endl;     << 
302   G4cout << " displacement: (" << fCenterPosit << 
303          << fCenterPosition.y() / cm << ", " < << 
304          << ") [cm]" << G4endl;                << 
305   if(fRotationMatrix != nullptr)               << 
306   {                                            << 
307     G4cout << " rotation matrix: " << fRotatio << 
308            << fRotationMatrix->xy() << "  " << << 
309            << "                  " << fRotatio << 
310            << fRotationMatrix->yy() << "  " << << 
311            << "                  " << fRotatio << 
312            << fRotationMatrix->zy() << "  " << << 
313   }                                            << 
314                                                   190 
315   G4cout << " registered primitve scorers : "     191   G4cout << " registered primitve scorers : " << G4endl;
316   G4int nps = fMFD->GetNumberOfPrimitives();      192   G4int nps = fMFD->GetNumberOfPrimitives();
317   G4VPrimitiveScorer* prs;                     << 193   G4VPrimitiveScorer * ps;
318   for(G4int i = 0; i < nps; ++i)               << 194   for(int i = 0; i < nps; i++) {
319   {                                            << 195     ps = fMFD->GetPrimitive(i);
320     prs = fMFD->GetPrimitive(i);               << 196     G4cout << "   " << i << "  " << ps->GetName();
321     G4cout << "   " << i << "  " << prs->GetNa << 197     if(ps->GetFilter() != NULL) G4cout << "     with  " << ps->GetFilter()->GetName();
322     if(prs->GetFilter() != nullptr)            << 
323       G4cout << "     with  " << prs->GetFilte << 
324     G4cout << G4endl;                             198     G4cout << G4endl;
325   }                                               199   }
326 }                                              << 
327                                                << 
328 void G4VScoringMesh::Dump()                    << 
329 {                                              << 
330   G4cout << "scoring mesh name: " << fWorldNam << 
331   G4cout << "# of G4THitsMap : " << fMap.size( << 
332   for(const auto& mp : fMap)                   << 
333   {                                            << 
334     G4cout << "[" << mp.first << "]" << G4endl << 
335     mp.second->PrintAllHits();                 << 
336   }                                            << 
337   G4cout << G4endl;                            << 
338 }                                              << 
339                                                << 
340 void G4VScoringMesh::DrawMesh(const G4String&  << 
341                               G4VScoreColorMap << 
342 {                                              << 
343   fDrawPSName = psName;                        << 
344   const auto fMapItr = fMap.find(psName);      << 
345   if(fMapItr != fMap.cend())                   << 
346   {                                            << 
347     fDrawUnit      = GetPSUnit(psName);        << 
348     fDrawUnitValue = GetPSUnitValue(psName);   << 
349     Draw(fMapItr->second, colorMap, axflg);    << 
350   }                                            << 
351   else                                         << 
352   {                                            << 
353     G4cerr << "Scorer <" << psName << "> is no << 
354            << G4endl;                          << 
355   }                                            << 
356 }                                              << 
357                                                << 
358 void G4VScoringMesh::DrawMesh(const G4String&  << 
359                               G4int iColumn, G << 
360 {                                              << 
361   fDrawPSName = psName;                        << 
362   const auto fMapItr = fMap.find(psName);      << 
363   if(fMapItr != fMap.cend())                   << 
364   {                                            << 
365     fDrawUnit      = GetPSUnit(psName);        << 
366     fDrawUnitValue = GetPSUnitValue(psName);   << 
367     DrawColumn(fMapItr->second, colorMap, idxP << 
368   }                                            << 
369   else                                         << 
370   {                                            << 
371     G4cerr << "Scorer <" << psName << "> is no << 
372            << G4endl;                          << 
373   }                                            << 
374 }                                              << 
375                                                   200 
376 void G4VScoringMesh::Accumulate(G4THitsMap<G4d << 
377 {                                              << 
378   G4String psName = map->GetName();            << 
379   const auto fMapItr = fMap.find(psName);      << 
380   if (fMapItr != fMap.cend())  { *(fMapItr->se << 
381                                                   201 
382   if(verboseLevel > 9)                         << 
383   {                                            << 
384     G4cout << G4endl;                          << 
385     G4cout << "G4VScoringMesh::Accumulate()" < << 
386     G4cout << "  PS name : " << psName << G4en << 
387     if(fMapItr == fMap.cend())                 << 
388     {                                          << 
389       G4cout << "  " << psName << " was not fo << 
390     }                                          << 
391     else                                       << 
392     {                                          << 
393       G4cout << "  map size : " << map->GetSiz << 
394       map->PrintAllHits();                     << 
395     }                                          << 
396     G4cout << G4endl;                          << 
397   }                                            << 
398 }                                                 202 }
399                                                   203 
400 void G4VScoringMesh::Accumulate(G4THitsMap<G4S << 204 void G4VScoringMesh::Dump() {
401 {                                              << 205   G4cout << "scoring mesh name: " << fWorldName << G4endl;
402   G4String psName = map->GetName();            << 
403   const auto fMapItr = fMap.find(psName);      << 
404   if (fMapItr != fMap.cend()) { *(fMapItr->sec << 
405                                                << 
406   if(verboseLevel > 9)                         << 
407   {                                            << 
408     G4cout << G4endl;                          << 
409     G4cout << "G4VScoringMesh::Accumulate()" < << 
410     G4cout << "  PS name : " << psName << G4en << 
411     if(fMapItr == fMap.cend())                 << 
412     {                                          << 
413       G4cout << "  " << psName << " was not fo << 
414     }                                          << 
415     else                                       << 
416     {                                          << 
417       G4cout << "  map size : " << map->GetSiz << 
418       map->PrintAllHits();                     << 
419     }                                          << 
420     G4cout << G4endl;                          << 
421   }                                            << 
422 }                                              << 
423                                                   206 
424 void G4VScoringMesh::Construct(G4VPhysicalVolu << 207   G4cout << "# of G4THitsMap : " << fMap.size() << G4endl;
425 {                                              << 208   std::map<G4String, G4THitsMap<G4double>* >::iterator itr = fMap.begin();
426   if(fConstructed)                             << 209   for(; itr != fMap.end(); itr++) {
427   {                                            << 210     G4cout << "[" << itr->first << "]" << G4endl;
428     if(fGeometryHasBeenDestroyed)              << 211     itr->second->PrintAllHits();
429     {                                          << 
430       SetupGeometry(fWorldPhys);               << 
431       fGeometryHasBeenDestroyed = false;       << 
432     }                                          << 
433     if(verboseLevel > 0)                       << 
434       G4cout << fWorldName << " --- All quanti << 
435     ResetScore();                              << 
436   }                                            << 
437   else                                         << 
438   {                                            << 
439     fConstructed = true;                       << 
440     SetupGeometry(fWorldPhys);                 << 
441   }                                               212   }
442 }                                              << 213   G4cout << G4endl;
443                                                   214 
444 void G4VScoringMesh::WorkerConstruct(G4VPhysic << 
445 {                                              << 
446   if(fConstructed)                             << 
447   {                                            << 
448     if(fGeometryHasBeenDestroyed)              << 
449     {                                          << 
450       fMeshElementLogical->SetSensitiveDetecto << 
451       fGeometryHasBeenDestroyed = false;       << 
452     }                                          << 
453                                                << 
454     if(verboseLevel > 0)                       << 
455       G4cout << fWorldPhys->GetName() << " --- << 
456              << G4endl;                        << 
457     ResetScore();                              << 
458   }                                            << 
459   else                                         << 
460   {                                            << 
461     fConstructed = true;                       << 
462     fMeshElementLogical->SetSensitiveDetector( << 
463   }                                            << 
464 }                                                 215 }
465                                                   216 
466 void G4VScoringMesh::Merge(const G4VScoringMes << 
467 {                                              << 
468   const MeshScoreMap scMap = scMesh->GetScoreM << 
469                                                << 
470   auto fMapItr = fMap.cbegin();                << 
471   auto mapItr  = scMap.cbegin();               << 
472   for(; fMapItr != fMap.cend(); ++fMapItr)     << 
473   {                                            << 
474     if(verboseLevel > 9)                       << 
475       G4cout << "G4VScoringMesh::Merge()" << f << 
476     *(fMapItr->second) += *(mapItr->second);   << 
477     ++mapItr;                                  << 
478   }                                            << 
479 }                                              << 
480                                                   217