ghit
Loading...
Searching...
No Matches
ghit_example.cc File Reference

Minimal example showing how to construct and compare GHit objects. More...

#include "gtouchable.h"
#include "gtouchable_options.h"
#include "glogger.h"
#include "ghit.h"
Include dependency graph for ghit_example.cc:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

This example demonstrates:

  • Creating a GTouchable for a specific detector identity.
  • Creating a GHit and storing it in a vector (emulating a G4THitsCollection<GHit> usage pattern).
  • Generating randomized test hits via GHit::create() and comparing them using GHit::is_same_hit().
Note
This is an example program intended for demonstration and quick tests.

Definition in file ghit_example.cc.

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 24 of file ghit_example.cc.