EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CbmRich Class Reference

Defines the active detector RICH. Constructs the geometry and creates MCPoints. More...

#include <EicRoot/blob/master/rich/CbmRich.h>

+ Inheritance diagram for CbmRich:
+ Collaboration diagram for CbmRich:

Public Member Functions

 CbmRich ()
 Default constructor.
 
 CbmRich (const char *name, Bool_t active, Double_t px=0., Double_t py=0., Double_t pz=0., Double_t rx=0., Double_t ry=0., Double_t rz=0.)
 Constructor for the GDML geometry.
 
virtual ~CbmRich ()
 Destructor.
 
virtual void Initialize ()
 Initialize detector. Stores volume IDs for RICH detector and mirror.
 
virtual Bool_t ProcessHits (FairVolume *vol=0)
 Defines the action to be taken when a step is inside the active volume. Creates CbmRichPoints and CbmRichMirrorPoints and adds them to the collections.
 
virtual void EndOfEvent ()
 If verbosity level is set, print hit collection at the end of the event and resets it afterwards.
 
virtual void Register ()
 Registers the hit collection in the ROOT manager.
 
virtual TClonesArray * GetCollection (Int_t iColl) const
 Return hit collection.
 
virtual void Print () const
 Screen output of hit collection.
 
virtual void Reset ()
 Clears the hit collection.
 
virtual void CopyClones (TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
 Copies the hit collection with a given track index offset.
 
virtual void ConstructGeometry ()
 Construct geometry. Currently ROOT and ASCII formats are supported. The concrete method for geometry construction is called according to geometry file.
 
void ConstructAsciiGeometry ()
 Construct geometry from ASCII file. Supported structure for the mirrors are added on a fly.
 
void ConstructGdmlGeometry (TGeoMatrix *geoMatrix)
 Construct geometry from GDML file.
 
void ExpandNodeForGdml (TGeoNode *node)
 Assign materials by taking description from medoa.geo and not from GDML for a certain node.
 
void ConstructOpGeometry ()
 Put some optical properties.
 
virtual Bool_t CheckIfSensitive (std::string name)
 
void SetScale (double scale)
 
- Public Member Functions inherited from FairDetector
 FairDetector (const char *Name, Bool_t Active, Int_t DetId=0)
 
 FairDetector ()
 
virtual ~FairDetector ()
 
virtual void FinishPrimary ()
 
virtual void FinishRun ()
 
virtual void BeginPrimary ()
 
virtual void PostTrack ()
 
virtual void PreTrack ()
 
virtual void BeginEvent ()
 
virtual void FinishEvent ()
 
virtual void SetSpecialPhysicsCuts ()
 
void SaveGeoParams ()
 
Int_t GetDetId ()
 
- Public Member Functions inherited from FairModule
 FairModule ()
 
 FairModule (const char *Name, const char *title, Bool_t Active=kFALSE)
 
virtual ~FairModule ()
 
virtual void Print (Option_t *option="") const
 
virtual void SetGeometryFileName (TString fname, TString geoVer="0")
 
virtual TString GetGeometryFileName ()
 
virtual TString GetGeometryFileVer ()
 
virtual void ConstructRootGeometry ()
 
virtual void ConstructASCIIGeometry ()
 
virtual void ExpandNode (TGeoNode *Node)
 
virtual Int_t getVolId (const TString &vname) const
 
Int_t GetModId ()
 
void SetVerboseLevel (Int_t level)
 
Bool_t IsActive ()
 
void SetModId (Int_t id)
 
void SetMotherVolume (TString volName)
 
void ProcessNodes (TList *aList)
 
virtual void SetParContainers ()
 
TList * GetListOfGeoPar ()
 
FairVolumegetFairVolume (FairGeoNode *fNode)
 
void AddSensitiveVolume (TGeoVolume *v)
 
void ImportRootMaterials ()
 

Private Member Functions

TGeoVolume * GetGasVolume (TGeoVolume *gdmlTop)
 
CbmRichPointAddHit (Int_t trackID, Int_t pdg, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
 Adds a RichPoint to the TClonesArray.
 
CbmRichPointAddRefPlaneHit (Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
 Adds a RichRefPlanePoint to the TClonesArray.
 
CbmRichPointAddMirrorHit (Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
 Adds a RichMirrorPoint to the TClonesArray.
 
 CbmRich (const CbmRich &)
 Copy constructor.
 
CbmRichoperator= (const CbmRich &)
 Assignment operator.
 

Private Attributes

Int_t fPosIndex
 
TClonesArray * fRichPoints
 
TClonesArray * fRichRefPlanePoints
 
TClonesArray * fRichMirrorPoints
 
TGeoRotation * fRotation
 
TGeoCombiTrans * fPositionRotation
 
Double_t mScale
 

Static Private Attributes

static std::map< TString, Int_t > fFixedMats
 
static Bool_t fIsFirstGDML = kTRUE
 

Additional Inherited Members

- Public Attributes inherited from FairModule
TString fMotherVolumeName
 
- Static Public Attributes inherited from FairModule
static FairVolumeListvList =0
 
static Int_t fNbOfVolumes =0
 
static TRefArray * svList =0
 
static TArrayI * volNumber =0
 
- Protected Attributes inherited from FairDetector
Int_t fDetId
 
FairLoggerfLogger
 

Detailed Description

Defines the active detector RICH. Constructs the geometry and creates MCPoints.

Author
Volker Friese
Date
2004

Definition at line 33 of file CbmRich.h.

View newest version in sPHENIX GitHub at line 33 of file CbmRich.h

Constructor & Destructor Documentation

CbmRich::CbmRich ( )

Default constructor.

Definition at line 45 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 45 of file CbmRich.cxx

References fPosIndex, fRichMirrorPoints, fRichPoints, fRichRefPlanePoints, and FairModule::fVerboseLevel.

CbmRich::CbmRich ( const char *  name,
Bool_t  active,
Double_t  px = 0.,
Double_t  py = 0.,
Double_t  pz = 0.,
Double_t  rx = 0.,
Double_t  ry = 0.,
Double_t  rz = 0. 
)

Constructor for the GDML geometry.

Parameters
[in]nameDetector name.
[in]activeSensitivity flag.
[in]pxPosition X.
[in]pyPosition Y.
[in]pzPosition Z from target to the center of the RICH detector.
[in]rxRotation around X.
[in]ryRotation around Y.
[in]rzRotation around Z.

Definition at line 64 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 64 of file CbmRich.cxx

References FairModule::fVerboseLevel.

CbmRich::~CbmRich ( )
virtual

Destructor.

Definition at line 86 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 86 of file CbmRich.cxx

References fRichMirrorPoints, fRichPoints, and fRichRefPlanePoints.

CbmRich::CbmRich ( const CbmRich )
private

Copy constructor.

Member Function Documentation

CbmRichPoint * CbmRich::AddHit ( Int_t  trackID,
Int_t  pdg,
Int_t  detID,
TVector3  pos,
TVector3  mom,
Double_t  time,
Double_t  length,
Double_t  eLoss 
)
private

Adds a RichPoint to the TClonesArray.

Definition at line 609 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 609 of file CbmRich.cxx

References fRichPoints.

Referenced by ProcessHits().

+ Here is the caller graph for this function:

CbmRichPoint * CbmRich::AddMirrorHit ( Int_t  trackID,
Int_t  detID,
TVector3  pos,
TVector3  mom,
Double_t  time,
Double_t  length,
Double_t  eLoss 
)
private

Adds a RichMirrorPoint to the TClonesArray.

Definition at line 639 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 639 of file CbmRich.cxx

References fRichMirrorPoints.

Referenced by ProcessHits().

+ Here is the caller graph for this function:

CbmRichPoint * CbmRich::AddRefPlaneHit ( Int_t  trackID,
Int_t  detID,
TVector3  pos,
TVector3  mom,
Double_t  time,
Double_t  length,
Double_t  eLoss 
)
private

Adds a RichRefPlanePoint to the TClonesArray.

Definition at line 625 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 625 of file CbmRich.cxx

References fRichRefPlanePoints.

Referenced by ProcessHits().

+ Here is the caller graph for this function:

Bool_t CbmRich::CheckIfSensitive ( std::string  name)
virtual

Check whether a volume is sensitive. The decision is based on the volume name. Only used in case of ROOT geometry.

Since
11.06.2012
Parameters
name)Volume name kTRUE if volume is sensitive, else kFALSE

Reimplemented from FairModule.

Definition at line 114 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 114 of file CbmRich.cxx

References name.

void CbmRich::ConstructAsciiGeometry ( )

Construct geometry from ASCII file. Supported structure for the mirrors are added on a fly.

Definition at line 312 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 312 of file CbmRich.cxx

References FairGeoInterface::addGeoModule(), FairGeoSet::create(), FairRuntimeDb::getContainer(), FairGeoLoader::getGeoBuilder(), FairGeoLoader::getGeoInterface(), FairModule::GetGeometryFileName(), CbmGeoRichPar::GetGeoPassiveNodes(), CbmGeoRichPar::GetGeoSensitiveNodes(), FairGeoSet::getListOfVolumes(), FairRun::GetRunId(), FairRun::GetRuntimeDb(), FairGeoLoader::Instance(), FairRun::Instance(), FairGeoNode::isSensitive(), FairModule::ProcessNodes(), FairGeoInterface::readSet(), FairParSet::setChanged(), FairGeoSet::setGeomFile(), FairParSet::setInputVersion(), and Acts::Test::volume.

Referenced by ConstructGeometry().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CbmRich::ConstructGdmlGeometry ( TGeoMatrix *  geoMatrix)

Construct geometry from GDML file.

Parameters
[in]geoMatrixPosition and rotation of the RICH detector.

Definition at line 444 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 444 of file CbmRich.cxx

References _AEROGEL_MEDIUM_, aerogel(), FairGeoBuilder::createMedium(), ExpandNodeForGdml(), fIsFirstGDML, EicGDMLParse::GDMLReadFile(), GetGasVolume(), FairGeoLoader::getGeoBuilder(), FairGeoLoader::getGeoInterface(), FairModule::GetGeometryFileName(), FairGeoInterface::getMedia(), FairGeoMedia::getMedium(), FairGeoLoader::Instance(), mScale, name, charm_jet_coverage::parser, and Acts::Test::volume.

Referenced by ConstructGeometry().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void CbmRich::ConstructGeometry ( )
virtual

Construct geometry. Currently ROOT and ASCII formats are supported. The concrete method for geometry construction is called according to geometry file.

Reimplemented from FairModule.

Definition at line 295 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 295 of file CbmRich.cxx

References ConstructAsciiGeometry(), ConstructGdmlGeometry(), FairModule::ConstructRootGeometry(), fPositionRotation, and FairModule::GetGeometryFileName().

+ Here is the call graph for this function:

void CbmRich::ConstructOpGeometry ( )
virtual

Put some optical properties.

Reimplemented from FairModule.

Definition at line 290 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 290 of file CbmRich.cxx

void CbmRich::CopyClones ( TClonesArray *  cl1,
TClonesArray *  cl2,
Int_t  offset 
)
virtual

Copies the hit collection with a given track index offset.

Parameters
[in]cl1Origin array.
[out]cl2Target array.
[in]offsetIndex offset.

Reimplemented from FairDetector.

Definition at line 271 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 271 of file CbmRich.cxx

References fPosIndex, FairMCPoint::GetTrackID(), offset, and FairMCPoint::SetTrackID().

+ Here is the call graph for this function:

void CbmRich::EndOfEvent ( )
virtual

If verbosity level is set, print hit collection at the end of the event and resets it afterwards.

Reimplemented from FairDetector.

Definition at line 233 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 233 of file CbmRich.cxx

References FairModule::fVerboseLevel, Print(), and Reset().

+ Here is the call graph for this function:

void CbmRich::ExpandNodeForGdml ( TGeoNode *  node)

Assign materials by taking description from medoa.geo and not from GDML for a certain node.

Parameters
[in]nodeGeoNode.

Assembly-volumes are skipped as they do not have any material

New medium found in gmdl - it is not in gGeoManager list. This should never happen as GDML parser adds medium into the list. If happens - something is extremely strange.

Medium is in the list in gGeoManager. Trying to replace it with the one from the Geo file.

This should not happen. This means that somebody uses material in GDML that is not in the media.geo file. Most probably this is the sign to the user to check materials' names in the CATIA model.

The volume is sensitive => add it to the list

Recursevly go down the tree of nodes

Definition at line 539 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 539 of file CbmRich.cxx

References FairModule::AddSensitiveVolume(), FairGeoBuilder::createMedium(), fFixedMats, FairGeoLoader::getGeoBuilder(), FairGeoLoader::getGeoInterface(), FairGeoInterface::getMedia(), FairGeoMedia::getMedium(), FairGeoMedium::getSensitivityFlag(), FairGeoLoader::Instance(), and printf().

Referenced by ConstructGdmlGeometry().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TClonesArray * CbmRich::GetCollection ( Int_t  iColl) const
virtual

Return hit collection.

Implements FairDetector.

Definition at line 246 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 246 of file CbmRich.cxx

References fRichMirrorPoints, fRichPoints, and fRichRefPlanePoints.

TGeoVolume * CbmRich::GetGasVolume ( TGeoVolume *  gdmlTop)
private

Definition at line 367 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 367 of file CbmRich.cxx

References _RICH_GAS_VOLUME_, and Acts::Test::volume.

Referenced by ConstructGdmlGeometry().

+ Here is the caller graph for this function:

void CbmRich::Initialize ( )
virtual

Initialize detector. Stores volume IDs for RICH detector and mirror.

Reimplemented from FairDetector.

Definition at line 103 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 103 of file CbmRich.cxx

References FairRuntimeDb::getContainer(), CbmGeoRichPar::GetGeoSensitiveNodes(), FairRun::GetRuntimeDb(), FairDetector::Initialize(), and FairRun::Instance().

+ Here is the call graph for this function:

CbmRich& CbmRich::operator= ( const CbmRich )
private

Assignment operator.

void CbmRich::Print ( void  ) const
virtual

Screen output of hit collection.

Definition at line 255 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 255 of file CbmRich.cxx

References fRichPoints, and FairModule::fVerboseLevel.

Referenced by EndOfEvent().

+ Here is the caller graph for this function:

Bool_t CbmRich::ProcessHits ( FairVolume vol = 0)
virtual

Defines the action to be taken when a step is inside the active volume. Creates CbmRichPoints and CbmRichMirrorPoints and adds them to the collections.

Parameters
[in]volPointer to the active volume.

Implements FairDetector.

Definition at line 124 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 124 of file CbmRich.cxx

References AddHit(), AddMirrorHit(), CbmStack::AddPoint(), AddRefPlaneHit(), charge, FairVolume::getMCid(), kREF, kRICH, G4BARRELHCAL::length, part, and Acts::Test::time.

+ Here is the call graph for this function:

void CbmRich::Register ( )
virtual

Registers the hit collection in the ROOT manager.

Implements FairDetector.

Definition at line 239 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 239 of file CbmRich.cxx

References fRichMirrorPoints, fRichPoints, fRichRefPlanePoints, FairRootManager::Instance(), and FairRootManager::Register().

+ Here is the call graph for this function:

void CbmRich::Reset ( )
virtual

Clears the hit collection.

Implements FairDetector.

Definition at line 263 of file CbmRich.cxx.

View newest version in sPHENIX GitHub at line 263 of file CbmRich.cxx

References fPosIndex, fRichMirrorPoints, fRichPoints, and fRichRefPlanePoints.

Referenced by EndOfEvent().

+ Here is the caller graph for this function:

void CbmRich::SetScale ( double  scale)
inline

Definition at line 171 of file CbmRich.h.

View newest version in sPHENIX GitHub at line 171 of file CbmRich.h

References mScale.

Referenced by simulation().

+ Here is the caller graph for this function:

Member Data Documentation

std::map< TString, Int_t > CbmRich::fFixedMats
staticprivate

Definition at line 181 of file CbmRich.h.

View newest version in sPHENIX GitHub at line 181 of file CbmRich.h

Referenced by ExpandNodeForGdml().

Bool_t CbmRich::fIsFirstGDML = kTRUE
staticprivate

Definition at line 182 of file CbmRich.h.

View newest version in sPHENIX GitHub at line 182 of file CbmRich.h

Referenced by ConstructGdmlGeometry().

Int_t CbmRich::fPosIndex
private

Definition at line 171 of file CbmRich.h.

View newest version in sPHENIX GitHub at line 171 of file CbmRich.h

Referenced by CbmRich(), CopyClones(), and Reset().

TGeoCombiTrans* CbmRich::fPositionRotation
private

Definition at line 184 of file CbmRich.h.

View newest version in sPHENIX GitHub at line 184 of file CbmRich.h

Referenced by ConstructGeometry().

TClonesArray* CbmRich::fRichMirrorPoints
private

Definition at line 178 of file CbmRich.h.

View newest version in sPHENIX GitHub at line 178 of file CbmRich.h

Referenced by AddMirrorHit(), CbmRich(), GetCollection(), Register(), Reset(), and ~CbmRich().

TClonesArray* CbmRich::fRichPoints
private

Definition at line 176 of file CbmRich.h.

View newest version in sPHENIX GitHub at line 176 of file CbmRich.h

Referenced by AddHit(), CbmRich(), GetCollection(), Print(), Register(), Reset(), and ~CbmRich().

TClonesArray* CbmRich::fRichRefPlanePoints
private

Definition at line 177 of file CbmRich.h.

View newest version in sPHENIX GitHub at line 177 of file CbmRich.h

Referenced by AddRefPlaneHit(), CbmRich(), GetCollection(), Register(), Reset(), and ~CbmRich().

TGeoRotation* CbmRich::fRotation
private

Definition at line 183 of file CbmRich.h.

View newest version in sPHENIX GitHub at line 183 of file CbmRich.h

Double_t CbmRich::mScale
private

Definition at line 185 of file CbmRich.h.

View newest version in sPHENIX GitHub at line 185 of file CbmRich.h

Referenced by ConstructGdmlGeometry(), and SetScale().


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