#include <simpleTarget.h>
|
| simpleTarget (const char *Name, Bool_t Active) |
|
| simpleTarget () |
|
virtual | ~simpleTarget () |
|
virtual void | Initialize () |
|
virtual Bool_t | ProcessHits (FairVolume *v=0) |
|
virtual void | Register () |
|
virtual TClonesArray * | GetCollection (Int_t iColl) const |
|
virtual void | Reset () |
|
void | ConstructGeometry () |
|
virtual void | CopyClones (TClonesArray *cl1, TClonesArray *cl2, Int_t offset) |
|
virtual void | SetSpecialPhysicsCuts () |
|
virtual void | EndOfEvent () |
|
virtual void | FinishPrimary () |
|
virtual void | FinishRun () |
|
virtual void | BeginPrimary () |
|
virtual void | PostTrack () |
|
virtual void | PreTrack () |
|
virtual void | BeginEvent () |
|
vetoPoint * | AddHit (Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t pdgcode, TVector3 Lpos, TVector3 Lmom) |
|
void | SetEnergyCut (Float_t emax) |
|
void | SetOnlyMuons () |
|
void | SetFastMuon () |
|
void | SetParameters (TString m, Float_t l, Float_t z) |
|
Definition at line 14 of file simpleTarget.h.
◆ simpleTarget() [1/2]
simpleTarget::simpleTarget |
( |
const char * |
Name, |
|
|
Bool_t |
Active |
|
) |
| |
Name : Detector Name Active: kTRUE for active detectors (ProcessHits() will be called) kFALSE for inactive detectors
◆ simpleTarget() [2/2]
simpleTarget::simpleTarget |
( |
| ) |
|
default constructor
Definition at line 35 of file simpleTarget.cxx.
36 : FairDetector(
"simpleTarget", kTRUE,
kVETO),
49{}
Bool_t fOnlyMuons
max energy to transport
TLorentzVector fMom
position at entrance
Double_t fTime
momentum at entrance
TClonesArray * fsimpleTargetPointCollection
Int_t fVolumeID
track index
TLorentzVector fPos
volume id
◆ ~simpleTarget()
simpleTarget::~simpleTarget |
( |
| ) |
|
|
virtual |
◆ AddHit()
vetoPoint * simpleTarget::AddHit |
( |
Int_t |
trackID, |
|
|
Int_t |
detID, |
|
|
TVector3 |
pos, |
|
|
TVector3 |
mom, |
|
|
Double_t |
time, |
|
|
Double_t |
length, |
|
|
Double_t |
eLoss, |
|
|
Int_t |
pdgcode, |
|
|
TVector3 |
Lpos, |
|
|
TVector3 |
Lmom |
|
) |
| |
Definition at line 146 of file simpleTarget.cxx.
150{
152 Int_t size = clref.GetEntriesFast();
153 return new(clref[size])
vetoPoint(trackID, detID, pos, mom,
154 time, length, eLoss, pdgCode,Lpos,Lmom);
155}
◆ BeginEvent()
virtual void simpleTarget::BeginEvent |
( |
| ) |
|
|
inlinevirtual |
◆ BeginPrimary()
virtual void simpleTarget::BeginPrimary |
( |
| ) |
|
|
inlinevirtual |
◆ ConstructGeometry()
void simpleTarget::ConstructGeometry |
( |
| ) |
|
Create the detector geometry
Definition at line 128 of file simpleTarget.cxx.
129{
130 static FairGeoLoader *geoLoad=FairGeoLoader::Instance();
131 static FairGeoInterface *geoFace=geoLoad->getGeoInterface();
132 static FairGeoMedia *media=geoFace->getMedia();
133 static FairGeoBuilder *geoBuild=geoLoad->getGeoBuilder();
134
135 FairGeoMedium *ShipMedium=media->getMedium(
fMaterial);
136 TGeoMedium* mat=gGeoManager->GetMedium(
fMaterial);
137 if (mat==NULL)
138 geoBuild->createMedium(ShipMedium);
140 TGeoVolume *
top=gGeoManager->GetTopVolume();
141 TGeoVolume *
target = gGeoManager->MakeBox(
"target",mat,10.*100.,10.*100.,
fThick);
142 top->AddNode(target, 1,
new TGeoTranslation(0, 0,
fzPos));
143 AddSensitiveVolume(target);
144}
◆ CopyClones()
virtual void simpleTarget::CopyClones |
( |
TClonesArray * |
cl1, |
|
|
TClonesArray * |
cl2, |
|
|
Int_t |
offset |
|
) |
| |
|
inlinevirtual |
The following methods can be implemented if you need to make any optional action in your detector during the transport.
Definition at line 55 of file simpleTarget.h.
◆ EndOfEvent()
void simpleTarget::EndOfEvent |
( |
| ) |
|
|
virtual |
◆ FinishPrimary()
virtual void simpleTarget::FinishPrimary |
( |
| ) |
|
|
inlinevirtual |
◆ FinishRun()
virtual void simpleTarget::FinishRun |
( |
| ) |
|
|
inlinevirtual |
◆ GetCollection()
TClonesArray * simpleTarget::GetCollection |
( |
Int_t |
iColl | ) |
const |
|
virtual |
Gets the produced collections
Definition at line 171 of file simpleTarget.cxx.
172{
174 else { return NULL; }
175}
◆ Initialize()
void simpleTarget::Initialize |
( |
| ) |
|
|
virtual |
Initialization of the detector is done here
Definition at line 114 of file simpleTarget.cxx.
115{
116 FairDetector::Initialize();
117 TSeqCollection* fileList=gROOT->GetListOfFiles();
118 fout = ((TFile*)fileList->At(0));
119}
TFile * fout
for fast processing
◆ PostTrack()
virtual void simpleTarget::PostTrack |
( |
| ) |
|
|
inlinevirtual |
◆ PreTrack()
void simpleTarget::PreTrack |
( |
| ) |
|
|
virtual |
◆ ProcessHits()
Bool_t simpleTarget::ProcessHits |
( |
FairVolume * |
v = 0 | ) |
|
|
virtual |
this method is called for each step during simulation (see FairMCApplication::Stepping())
This method is called from the MC stepping
Definition at line 59 of file simpleTarget.cxx.
60{
62
63 if (
gMC->IsTrackEntering() ) {
69 }
70
72
73
74 if (
gMC->IsTrackExiting() ||
76 gMC->IsTrackDisappeared() ) {
77 if (
fELoss == 0. ) {
return kFALSE; }
78
82 new (clref[0])
vetoPoint(0, 0, TVector3(0, 0, 0), TVector3(0, 0, 0),
83 0, 0,
fTotalEloss, 0,TVector3(0, 0, 0), TVector3(0, 0, 0));
84 return kTRUE;}
85
86 fTrackID =
gMC->GetStack()->GetCurrentTrackNumber();
87
88 Int_t veto_uniqueId;
89 gMC->CurrentVolID(veto_uniqueId);
90
91 TParticle*
p=
gMC->GetStack()->GetCurrentTrack();
92 Int_t pdgCode =
p->GetPdgCode();
93 TLorentzVector Pos;
94 gMC->TrackPosition(Pos);
95 TLorentzVector Mom;
96 gMC->TrackMomentum(Mom);
97 Double_t xmean = (
fPos.X()+Pos.X())/2. ;
98 Double_t ymean = (
fPos.Y()+Pos.Y())/2. ;
99 Double_t zmean = (
fPos.Z()+Pos.Z())/2. ;
100
103 fELoss,pdgCode,TVector3(Pos.X(), Pos.Y(), Pos.Z()),TVector3(Mom.Px(), Mom.Py(), Mom.Pz()) );
104
105
108 }
109
110 return kTRUE;
111}
vetoPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t pdgcode, TVector3 Lpos, TVector3 Lmom)
◆ Register()
void simpleTarget::Register |
( |
| ) |
|
|
virtual |
Registers the produced collections in FAIRRootManager.
Definition at line 164 of file simpleTarget.cxx.
165{
166
167 FairRootManager::Instance()->Register("vetoPoint", "veto",
169}
◆ Reset()
void simpleTarget::Reset |
( |
| ) |
|
|
virtual |
has to be called after each event to reset the containers
Definition at line 176 of file simpleTarget.cxx.
◆ SetEnergyCut()
void simpleTarget::SetEnergyCut |
( |
Float_t |
emax | ) |
|
|
inline |
◆ SetFastMuon()
void simpleTarget::SetFastMuon |
( |
| ) |
|
|
inline |
◆ SetOnlyMuons()
void simpleTarget::SetOnlyMuons |
( |
| ) |
|
|
inline |
◆ SetParameters()
void simpleTarget::SetParameters |
( |
TString |
m, |
|
|
Float_t |
l, |
|
|
Float_t |
z |
|
) |
| |
|
inline |
◆ SetSpecialPhysicsCuts()
virtual void simpleTarget::SetSpecialPhysicsCuts |
( |
| ) |
|
|
inlinevirtual |
◆ EMax
Float_t simpleTarget::EMax |
|
private |
◆ fELoss
Double_t simpleTarget::fELoss |
|
private |
◆ fFastMuon
Bool_t simpleTarget::fFastMuon |
|
private |
◆ fLength
Double_t simpleTarget::fLength |
|
private |
◆ fMaterial
TString simpleTarget::fMaterial |
|
private |
◆ fMom
TLorentzVector simpleTarget::fMom |
|
private |
◆ fOnlyMuons
Bool_t simpleTarget::fOnlyMuons |
|
private |
◆ fout
TFile* simpleTarget::fout |
|
private |
◆ fPos
TLorentzVector simpleTarget::fPos |
|
private |
◆ fsimpleTargetPointCollection
TClonesArray* simpleTarget::fsimpleTargetPointCollection |
|
private |
◆ fThick
Double_t simpleTarget::fThick |
|
private |
◆ fTime
Double_t simpleTarget::fTime |
|
private |
◆ fTotalEloss
Double_t simpleTarget::fTotalEloss |
|
private |
◆ fTrackID
Int_t simpleTarget::fTrackID |
|
private |
Track information to be stored until the track leaves the active volume.
Definition at line 80 of file simpleTarget.h.
◆ fVolumeID
Int_t simpleTarget::fVolumeID |
|
private |
◆ fzPos
Double_t simpleTarget::fzPos |
|
private |
The documentation for this class was generated from the following files: