FairRoot/PandaRoot
Public Member Functions | List of all members
PndTarget Class Reference

#include <PndTarget.h>

Inheritance diagram for PndTarget:

Public Member Functions

 PndTarget (const char *name, const char *Title="PND Target")
 
 PndTarget ()
 
virtual ~PndTarget ()
 
virtual void ConstructGeometry ()
 

Detailed Description

Definition at line 7 of file PndTarget.h.

Constructor & Destructor Documentation

PndTarget::PndTarget ( const char *  name,
const char *  Title = "PND Target" 
)

Definition at line 22 of file PndTarget.cxx.

23  : FairModule(name ,title)
24 {
25 }
TString name
PndTarget::PndTarget ( )

Definition at line 18 of file PndTarget.cxx.

19 {
20 }
PndTarget::~PndTarget ( )
virtual

Definition at line 15 of file PndTarget.cxx.

16 {
17 }

Member Function Documentation

void PndTarget::ConstructGeometry ( )
virtual

Definition at line 26 of file PndTarget.cxx.

References Bool_t, fRun, PndGeoPassivePar::GetGeoPassiveNodes(), PndGeoPassivePar::GetGeoSensitiveNodes(), par, and rtdb.

27 {
28  FairGeoLoader *loader=FairGeoLoader::Instance();
29  FairGeoInterface *GeoInterface =loader->getGeoInterface();
30  PndGeoTarget *MGeo=new PndGeoTarget();
31  MGeo->setGeomFile(GetGeometryFileName());
32  GeoInterface->addGeoModule(MGeo);
33  Bool_t rc = GeoInterface->readSet(MGeo);
34  if ( rc ) MGeo->create(loader->getGeoBuilder());
35 
36  TList* volList = MGeo->getListOfVolumes();
37  // store geo parameter
38  FairRun *fRun = FairRun::Instance();
39  FairRuntimeDb *rtdb= FairRun::Instance()->GetRuntimeDb();
40  PndGeoPassivePar* par=(PndGeoPassivePar*)(rtdb->getContainer("PndGeoPassivePar"));
41  TObjArray *fSensNodes = par->GetGeoSensitiveNodes();
42  TObjArray *fPassNodes = par->GetGeoPassiveNodes();
43 
44  TListIter iter(volList);
45  FairGeoNode* node = NULL;
46  FairGeoVolume *aVol=NULL;
47 
48  while( (node = (FairGeoNode*)iter.Next()) ) {
49  aVol = dynamic_cast<FairGeoVolume*> ( node );
50  if ( node->isSensitive() ) {
51  fSensNodes->AddLast( aVol );
52  }else{
53  fPassNodes->AddLast( aVol );
54  }
55  }
56  ProcessNodes( volList );
57  par->setChanged();
58  par->setInputVersion(fRun->GetRunId(),1);
59 
60 }
TObjArray * GetGeoPassiveNodes()
Double_t par[3]
FairRunAna * fRun
Definition: hit_dirc.C:58
FairRuntimeDb * rtdb
Definition: hit_dirc.C:66
TObjArray * GetGeoSensitiveNodes()

The documentation for this class was generated from the following files: