21#include "Ex03CalorHit.h"
22#include "Ex03DetectorConstruction.h"
25#include <TLorentzVector.h>
26#include <TMCRootManager.h>
28#include <TVirtualMC.h>
67 fAbsorberVolId(origin.fAbsorberVolId),
68 fGapVolId(origin.fGapVolId),
69 fVerboseLevel(origin.fVerboseLevel),
70 fPrintModulo(origin.fPrintModulo)
137 if (TMCRootManager::Instance())
Register();
154 Int_t
id =
fMC->CurrentVolID(copyNo);
158 fMC->CurrentVolOffID(2, copyNo);
160 Double_t edep =
fMC->Edep();
163 if (
fMC->TrackCharge() != 0.) step =
fMC->TrackStep();
198 TMCRootManager::Instance()->Register(
"hits",
"TClonesArray", &
fCalCollection);
208 cout <<
"\n-------->Hits Collection: in this event: " << endl;
210 for (Int_t i = 0; i < nofHits; i++) (*
fCalCollection)[i]->Print();
218 Double_t totEAbs = 0.;
219 Double_t totLAbs = 0.;
220 Double_t totEGap = 0.;
221 Double_t totLGap = 0.;
224 for (Int_t i = 0; i < nofHits; i++) {
231 cout <<
" Absorber: total energy (MeV): " << setw(7) << totEAbs * 1.0e03
232 <<
" total track length (cm): " << setw(7) << totLAbs << endl
233 <<
" Gap: total energy (MeV): " << setw(7) << totEGap * 1.0e03
234 <<
" total track length (cm): " << setw(7) << totLGap << endl;
Definition of the Ex03bCalorimeterSD class.
void AddAbs(Double_t de, Double_t dl)
void AddGap(Double_t de, Double_t dl)
The detector construction (via TGeo )
Int_t GetNbOfLayers() const
The calorimeter sensitive detector.
TVirtualMC * fMC
The VMC implementation.
Int_t fPrintModulo
The event modulus number to be printed.
Ex03DetectorConstruction * fDetector
Detector construction.
virtual void Print(Option_t *option="") const
TClonesArray * fCalCollection
Hits collection.
Int_t fAbsorberVolId
The absorber volume Id.
Ex03CalorHit * GetHit(Int_t i) const
Int_t fGapVolId
The gap volume Id.
virtual ~Ex03bCalorimeterSD()
virtual void ProcessHits()
Int_t fVerboseLevel
Verbosity level.