Changeset 1208 for trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization
- Timestamp:
- Nov 30, 2009, 3:52:24 PM (16 years ago)
- Location:
- trunk/documents/UserDoc
- Files:
-
- 8 edited
-
. (modified) (1 prop)
-
DocBookUsersGuides (modified) (1 prop)
-
DocBookUsersGuides/ForApplicationDeveloper (modified) (1 prop)
-
DocBookUsersGuides/ForApplicationDeveloper/xml (modified) (1 prop)
-
DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization (modified) (1 prop)
-
DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/compiledcontrol.xml (modified) (3 diffs)
-
DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/enhanceddrawing.xml (modified) (6 diffs)
-
DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/visTutor (modified) (1 prop)
Legend:
- Unmodified
- Added
- Removed
-
trunk/documents/UserDoc
-
Property svn:ignore
set to
CVS
-
Property svn:ignore
set to
-
trunk/documents/UserDoc/DocBookUsersGuides
-
Property svn:ignore
set to
CVS
-
Property svn:ignore
set to
-
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper
-
Property svn:ignore
set to
CVS
-
Property svn:ignore
set to
-
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml
-
Property svn:ignore
set to
CVS
-
Property svn:ignore
set to
-
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization
-
Property svn:ignore
set to
CVS
-
Property svn:ignore
set to
-
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/compiledcontrol.xml
r904 r1208 6 6 <!-- Changed by: Dennis Wright, 27-Nov-2001 --> 7 7 <!-- Converted to DocBook: Katsuya Amako, Aug-2006 --> 8 <!-- Corrected Get methods: Joseph Perl, 17-Mar-2009 --> 8 9 <!-- --> 9 10 <!-- ******************************************************** --> … … 363 364 void MyEventAction::EndOfEventAction() 364 365 { 365 const G4Event* evt = fpEventManager-> get_const_currentEvent();366 367 G4SDManager * SDman = G4SDManager:: get_SDMpointer();366 const G4Event* evt = fpEventManager->GetConstCurrentEvent(); 367 368 G4SDManager * SDman = G4SDManager::GetSDMpointer(); 368 369 G4String colNam; 369 G4int trackerCollID = SDman-> get_collectionID(colNam="TrackerCollection");370 G4int calorimeterCollID = SDman-> get_collectionID(colNam="CalCollection");371 372 G4TrajectoryContainer * trajectoryContainer = evt-> get_trajectoryContainer();370 G4int trackerCollID = SDman->GetCollectionID(colNam="TrackerCollection"); 371 G4int calorimeterCollID = SDman->GetCollectionID(colNam="CalCollection"); 372 373 G4TrajectoryContainer * trajectoryContainer = evt->GetTrajectoryContainer(); 373 374 G4int n_trajectories = 0; 374 375 if(trajectoryContainer) 375 376 { n_trajectories = trajectoryContainer->entries(); } 376 377 377 G4HCofThisEvent * HCE = evt-> get_HCofThisEvent();378 G4HCofThisEvent * HCE = evt->GetHCofThisEvent(); 378 379 G4int n_hitCollection = 0; 379 380 if(HCE) 380 { n_hitCollection = HCE-> get_capacity(); }381 { n_hitCollection = HCE->GetCapacity(); } 381 382 382 383 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance(); … … 391 392 for(G4int i=0; i < n_trajectories; i++) 392 393 { 393 (*(evt-> get_trajectoryContainer()))[i]->DrawTrajectory();394 (*(evt->GetTrajectoryContainer()))[i]->DrawTrajectory(); 394 395 } 395 396 396 397 // Construct 3D data for hits 397 398 MyTrackerHitsCollection* THC 398 = (MyTrackerHitsCollection*)(HCE-> get_HC(trackerCollID));399 = (MyTrackerHitsCollection*)(HCE->GetHC(trackerCollID)); 399 400 if(THC) THC->DrawAllHits(); 400 401 MyCalorimeterHitsCollection* CHC 401 = (MyCalorimeterHitsCollection*)(HCE-> get_HC(calorimeterCollID));402 = (MyCalorimeterHitsCollection*)(HCE->GetHC(calorimeterCollID)); 402 403 if(CHC) CHC->DrawAllHits(); 403 404 -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/enhanceddrawing.xml
r904 r1208 81 81 </entry> 82 82 <entry> 83 0 83 2 pixels or mm* 84 </entry> 85 </row> 86 <row> 87 <entry> 88 Auxiliary point size type 89 </entry> 90 <entry> 91 screen 84 92 </entry> 85 93 </row> … … 129 137 </entry> 130 138 <entry> 131 0 139 2 pixels or mm* 140 </entry> 141 </row> 142 <row> 143 <entry> 144 Step point size type 145 </entry> 146 <entry> 147 screen 132 148 </entry> 133 149 </row> … … 167 183 </tgroup> 168 184 </informaltable> 185 </para> 186 187 <para> 188 * Depending on size type. If size type == screen, pixels are assumed and no unit need be supplied. If size type == world, a unit must be supplied, e.g., 10 cm. 169 189 </para> 170 190 … … 176 196 The context approach is intended to replace the configuration 177 197 through the imode parameter. The use of imode is depreciated and 178 will be removed in Geant4 v 9.0.198 will be removed in Geant4 v10.0. 179 199 </para></listitem> 180 200 <listitem><para> … … 581 601 582 602 <para> 583 To draw by time, you need to use a trajectory that records the 584 track time at the beginning and end of each step. To do this, write 585 a tracking action that sets G4RichTrajectory, for example: 586 587 <informalexample> 588 <programlisting> 589 #include "G4UserTrackingAction.hh" 590 class G4Track; 591 class MyTrackingAction : public G4UserTrackingAction 592 { 593 public: 594 virtual void PreUserTrackingAction(const G4Track* aTrack); 595 }; 596 #include "G4RichTrajectory.hh" 597 #include "G4TrackingManager.hh" 598 #include "G4IdentityTrajectoryFilter.hh" 599 #include "G4TransportationManager.hh" 600 #include "G4PropagatorInField.hh" 601 void MyTrackingAction::PreUserTrackingAction(const G4Track* aTrack) 602 { 603 // Require rich trajectory... 604 fpTrackingManager->SetTrajectory(new G4RichTrajectory(aTrack)); 605 606 // Activate storing of auxiliary points for smoother trajectory... 607 static G4IdentityTrajectoryFilter curvedFilter; 608 G4TransportationManager::GetTransportationManager()-> 609 GetPropagatorInField()->SetTrajectoryFilter(&curvedFilter); 610 } 611 </programlisting> 612 </informalexample> 613 614 and register an instance of this with the run manager (this can be 615 done once and for all as soon as the run manager is instantiated, 616 probably in your main program): 617 618 <informalexample> 619 <programlisting> 620 #include "MyTrackingAction.hh" 621 ... 622 runManager -> SetUserAction (new MyTrackingAction); 603 To draw by time, you need to use G4RichTrajectory, for example: 604 605 <informalexample> 606 <programlisting> 607 /vis/scene/add/trajectories rich 608 </programlisting> 609 </informalexample> 610 611 or 612 613 <informalexample> 614 <programlisting> 615 /vis/scene/add/trajectories rich smooth 623 616 </programlisting> 624 617 </informalexample> … … 648 641 /vis/open OGLSX 649 642 /vis/drawVolume 650 /vis/scene/add/trajectories 643 /vis/scene/add/trajectories rich 651 644 /vis/ogl/set/startTime 0.5 ns 652 645 /vis/ogl/set/endTime 0.8 ns -
trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Visualization/visTutor
-
Property svn:ignore
set to
CVS
-
Property svn:ignore
set to
Note:
See TracChangeset
for help on using the changeset viewer.
