19#include <TLorentzVector.h>
20#include <TMCRootManager.h>
22#include <TVirtualMC.h>
54 for (Int_t iRow = 0; iRow <
fgkNofRows; ++iRow) {
64 fVolId(origin.fVolId),
65 fWriteHits(origin.fWriteHits),
66 fVerboseLevel(origin.fVerboseLevel)
76 for (Int_t iRow = 0; iRow <
fgkNofRows; ++iRow) {
84 :
TNamed(), fCalCollection(0), fVolId(0), fWriteHits(true), fVerboseLevel(1)
130 if (TMCRootManager::Instance())
Register();
132 fVolId = gMC->VolId(
"HadCalScintiLogical");
141 Int_t
id = gMC->CurrentVolID(copyNo);
142 if (
id !=
fVolId)
return false;
144 Double_t edep = gMC->Edep();
145 if (edep == 0.)
return false;
148 gMC->CurrentVolOffID(2, rowNo);
150 gMC->CurrentVolOffID(3, columnNo);
158 std::cerr <<
"No hit found for layer with "
159 <<
"rowNo = " << rowNo <<
" columnNo = " << columnNo << endl;
203 TMCRootManager::Instance()->Register(
215 cout <<
"\n-------->Hits Collection: in this event: " << endl;
218 for (Int_t i = 0; i < nofHits; i++) (*
fCalCollection)[i]->Print();
228 Double_t totalEdep = 0.;
236 cout << GetName() <<
" has " << nofHits <<
" hits. Total Edep is "
237 << totalEdep * 1e03 <<
" (MeV)" << endl;
Definition of the A01HadCalorHit class.
Definition of the A01HadCalorimeterSD class.
The hadron calorimeter hit.
Int_t GetColumnID() const
void SetRowID(Int_t volId)
void SetColumnID(Int_t z)
void AddEdep(Double_t de)
The hadron calorimeter sensitive detector.
A01HadCalorHit * GetHit(Int_t i) const
static const Int_t fgkNofRows
Int_t fVerboseLevel
Verbosity level.
virtual void Print(Option_t *option="") const
Int_t fVolId
The calorimeter volume Id.
static const Int_t fgkNofColumns
Bool_t fWriteHits
Option to write hits.
TClonesArray * fCalCollection
Hits collection.
virtual ~A01HadCalorimeterSD()