Message: Re: confused by hits, hit collections, and sensitive detectors Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: confused by hits, hit collections, and sensitive detectors 

Forum: Hits, Digitization and Pileup
Re: None confused by hits, hit collections, and sensitive detectors (Ken Teh)
Date: 30 Dec, 2006
From: Makoto Asai <Makoto Asai>

More than one G4Event objects may co-exist simultaneously for the
sake of pile-up study. Thus, each G4Event object must have its own
hits collection vector.

As you know, each kind of sensitive detector detects its unique set
of quantities such as position, energy, etc. Thus each sensitive
detector has its unique hit class. On the other hand, an experimental
set-up may have identical detectors. For example in A01 example in
examples/extended/analysis, each of two lever arms has a set of
drift chambers. In this example, one drift chamber SD class is 
instantiated twice with different detector name. Thus, in 
EndOfEventAction one can identify each hits collection by the 
collection ID (associated with the unique detector name).

In EndOfEventAction, you can access to each individual hit of each
individual hits collection to record it, as demonstrated in exampleN02.
Alternatively, you can implement your own hits collection sub-class
so that it knows how to record his of its kind. Actually, this 
alternative way is better in the sense of object orientation. Your 
EndOfEventAction does not need names of the hits collections, but 
just loops over all hits collections stored in G4HCofThisEvent and 
invokes "Record()" virtual method.

class MyHitsCollectionBase : public G4THitsCollection
{
  public:
    virtual void Record() const = 0;
    ...
};

class MyConcreteHitsCollection : public MyHitsCollectionBase 
{
  public:
    virtual void Record() const;
    ...
};

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

 Add Message Add Message
to: "Re: confused by hits, hit collections, and sensitive detectors"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]