CbmRoot
Loading...
Searching...
No Matches
CbmRich.cxx
Go to the documentation of this file.
1/* Copyright (C) 2006-2023 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: claudia Hoehne [committer], Andrey Lebedev, Florian Uhlig, Semen Lebedev, Martin Beyer */
4
5#include "CbmRich.h"
6
7#include "CbmGeometryUtils.h"
9#include "CbmRichPoint.h"
10#include "CbmStack.h"
11
12#include <FairGeoInterface.h>
13#include <FairGeoLoader.h>
14#include <FairRootManager.h>
15#include <FairRun.h>
16#include <FairVolume.h>
17
18// #include <FairGeoBuilder.h>
19#include <FairGeoMedia.h>
20
21#include <TClonesArray.h>
22#include <TFile.h>
23#include <TGDMLParse.h>
24#include <TGeoManager.h>
25#include <TGeoMatrix.h>
26#include <TGeoMedium.h>
27#include <TGeoNode.h>
28#include <TLorentzVector.h>
29#include <TObjArray.h>
30#include <TParticle.h>
31#include <TParticlePDG.h>
32#include <TVirtualMC.h>
33
34std::map<TString, TGeoMedium*> CbmRich::fFixedMedia;
35
37 : FairDetector("RICH", kTRUE, ToIntegralType(ECbmModuleId::kRich))
38 , fPosIndex(0)
39 , fRegisterPhotonsOnSensitivePlane(true)
40 , fRichPoints(new TClonesArray("CbmRichPoint"))
41 , fRichRefPlanePoints(new TClonesArray("CbmRichPoint"))
42 , fRichMirrorPoints(new TClonesArray("CbmRichPoint"))
43 , fRotation(nullptr)
44 , fPositionRotation(nullptr)
45{
46 fVerboseLevel = 1;
47}
48
49CbmRich::CbmRich(const char* name, Bool_t active, Double_t px, Double_t py, Double_t pz, Double_t rx, Double_t ry,
50 Double_t rz)
51 : FairDetector(name, active, ToIntegralType(ECbmModuleId::kRich))
52 , fPosIndex(0)
53 , fRegisterPhotonsOnSensitivePlane(true)
54 , fRichPoints(new TClonesArray("CbmRichPoint"))
55 , fRichRefPlanePoints(new TClonesArray("CbmRichPoint"))
56 , fRichMirrorPoints(new TClonesArray("CbmRichPoint"))
57 , fRotation(new TGeoRotation("", rx, ry, rz))
58 , fPositionRotation(new TGeoCombiTrans(px, py, pz, fRotation))
59{
60 fVerboseLevel = 1;
61}
62
64{
65 if (fRichPoints) {
66 fRichPoints->Delete();
67 delete fRichPoints;
68 }
70 fRichRefPlanePoints->Delete();
72 }
73
75 fRichMirrorPoints->Delete();
76 delete fRichMirrorPoints;
77 }
78}
79
81{
82 FairDetector::Initialize();
84}
85
86Bool_t CbmRich::IsSensitive(const std::string& name)
87{
88 //return true;
89 TString volName = name;
90 if (volName.Contains("pmt_pixel") || volName.Contains("sens_plane")) return kTRUE;
91 // mirrors
92 if (volName.Contains("mirror_tile_type")) return kTRUE;
93 return kFALSE;
94}
95
96Bool_t CbmRich::CheckIfSensitive(std::string name) { return IsSensitive(name); }
97
98
99Bool_t CbmRich::ProcessHits(FairVolume* vol)
100{
101 Int_t pdgCode = gMC->TrackPid();
102 Int_t iVol = vol->getMCid();
103 TString volName = TString(vol->GetName());
104
105 // Treat MAPMT pixels
106 if (volName.Contains("pmt_pixel")) {
107 if (gMC->IsTrackEntering()) {
108 TParticle* part = gMC->GetStack()->GetCurrentTrack();
109 Double_t charge = part->GetPDG()->Charge() / 3.;
110 Int_t trackID = gMC->GetStack()->GetCurrentTrackNumber();
111 Double_t time = gMC->TrackTime() * 1.0e09;
112 Double_t length = gMC->TrackLength();
113 Double_t eLoss = gMC->Edep();
114
115 // For pmt pixels use unique pixel address as detId instead of volume id
116 const std::string path = std::string(gMC->CurrentVolPath());
118 if (pixelAddress == -1) {
119 LOG(error) << "CbmRich::ProcessHits() Pixel address is not found for path " << path;
120 return kFALSE;
121 }
122
123 TLorentzVector tPos, tMom;
124 gMC->TrackPosition(tPos);
125 gMC->TrackMomentum(tMom);
126
127 if (pdgCode == 50000050) { // Cherenkovs only
128 AddHit(trackID, pixelAddress, TVector3(tPos.X(), tPos.Y(), tPos.Z()), TVector3(tMom.Px(), tMom.Py(), tMom.Pz()),
129 time, length, eLoss);
130
131 // Increment number of RichPoints for this track
132 CbmStack* stack = static_cast<CbmStack*>(gMC->GetStack());
134 return kTRUE;
135 }
136 else {
137 if (charge == 0.) {
138 return kFALSE; // No neutrals
139 }
140 else { // Charged particles
141 AddHit(trackID, pixelAddress, TVector3(tPos.X(), tPos.Y(), tPos.Z()),
142 TVector3(tMom.Px(), tMom.Py(), tMom.Pz()), time, length, eLoss);
143
144 // Increment number of RichPoints for this track
145 CbmStack* stack = static_cast<CbmStack*>(gMC->GetStack());
147 return kTRUE;
148 }
149 }
150 }
151 }
152
153 // Treat imaginary plane in front of the mirrors
154 // Two modes based on fRegisterPhotonsOnSensitivePlane:
155 // 1. [true] register only cherenkov photons
156 // Use case: check ingoing cherenkov photons into the mirror and outgoing cherenkov photons from the mirror
157 // 2. [false] register all charged particles
158 // Use case: compare track extrapolation with MC track
159 if (volName.Contains("sens_plane")) {
160 if (gMC->IsTrackEntering()) {
161 TParticle* part = gMC->GetStack()->GetCurrentTrack();
162 Double_t charge = part->GetPDG()->Charge() / 3.;
163
164 if ((fRegisterPhotonsOnSensitivePlane && pdgCode == 50000050)
165 || (!fRegisterPhotonsOnSensitivePlane && charge != 0.)) {
166 Int_t trackID = gMC->GetStack()->GetCurrentTrackNumber();
167 Double_t time = gMC->TrackTime() * 1.0e09;
168 Double_t length = gMC->TrackLength();
169 Double_t eLoss = gMC->Edep();
170
171 TLorentzVector tPos, tMom;
172 gMC->TrackPosition(tPos);
173 gMC->TrackMomentum(tMom);
174
175 AddRefPlaneHit(trackID, iVol, TVector3(tPos.X(), tPos.Y(), tPos.Z()), TVector3(tMom.Px(), tMom.Py(), tMom.Pz()),
176 time, length, eLoss);
177
178 // Increment number of RefPlanePoints for this track
179 CbmStack* stack = static_cast<CbmStack*>(gMC->GetStack());
181 return kTRUE;
182 }
183 else {
184 return kFALSE;
185 }
186 }
187 }
188
189 // Treat mirror
190 if (volName.Contains("mirror_tile_type")) {
191 if (gMC->IsTrackEntering()) {
192 TParticle* part = gMC->GetStack()->GetCurrentTrack();
193 Double_t charge = part->GetPDG()->Charge() / 3.;
194 if (charge != 0.) {
195 Int_t trackID = gMC->GetStack()->GetCurrentTrackNumber();
196 Double_t time = gMC->TrackTime() * 1.0e09;
197 Double_t length = gMC->TrackLength();
198 Double_t eLoss = gMC->Edep();
199
200 TLorentzVector tPos, tMom;
201 gMC->TrackPosition(tPos);
202 gMC->TrackMomentum(tMom);
203
204 AddMirrorHit(trackID, iVol, TVector3(tPos.X(), tPos.Y(), tPos.Z()), TVector3(tMom.Px(), tMom.Py(), tMom.Pz()),
205 time, length, eLoss);
206 return kTRUE;
207 }
208 }
209 }
210
211 return kFALSE;
212}
213
215{
216 if (fVerboseLevel) Print("");
217 Reset();
218}
219
221{
222 FairRootManager::Instance()->Register("RichPoint", "Rich", fRichPoints, kTRUE);
223 FairRootManager::Instance()->Register("RefPlanePoint", "RichRefPlane", fRichRefPlanePoints, kTRUE);
224 FairRootManager::Instance()->Register("RichMirrorPoint", "RichMirror", fRichMirrorPoints, kFALSE);
225}
226
227TClonesArray* CbmRich::GetCollection(Int_t iColl) const
228{
229 if (iColl == 0) return fRichPoints;
230 if (iColl == 1) return fRichRefPlanePoints;
231 if (iColl == 2) return fRichMirrorPoints;
232 return nullptr;
233}
234
235void CbmRich::Print(Option_t*) const
236{
237 Int_t nHits = fRichPoints->GetEntriesFast();
238 LOG(info) << fName << ": " << nHits << " points registered in this event.";
239
240 if (fVerboseLevel > 1)
241 for (Int_t i = 0; i < nHits; i++)
242 (*fRichPoints)[i]->Print();
243}
244
246{
247 fRichPoints->Delete();
248 fRichRefPlanePoints->Delete();
249 fRichMirrorPoints->Delete();
250 fPosIndex = 0;
251}
252
253void CbmRich::CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset)
254{
255 Int_t nEntries = cl1->GetEntriesFast();
256 LOG(info) << "CbmRich: " << nEntries << " entries to add.";
257 TClonesArray& clref = *cl2;
258 CbmRichPoint* oldpoint {nullptr};
259 for (Int_t i = 0; i < nEntries; i++) {
260 oldpoint = static_cast<CbmRichPoint*>(cl1->At(i));
261 Int_t index = oldpoint->GetTrackID() + offset;
262 oldpoint->SetTrackID(index);
263 new (clref[fPosIndex]) CbmRichPoint(*oldpoint);
264 fPosIndex++;
265 }
266 LOG(info) << "CbmRich: " << cl2->GetEntriesFast() << " merged entries.";
267}
268
270{
271 LOG(info) << "CbmRich::ConstructOpGeometry()";
273}
274
276{
277 TString fileName = GetGeometryFileName();
278 if (fileName.EndsWith(".root")) {
280 LOG(info) << "Importing RICH geometry from ROOT file " << fgeoName.Data();
281 TGeoCombiTrans* fCombiTrans {};
282 Cbm::GeometryUtils::ImportRootGeometry(fgeoName, this, fCombiTrans);
283 }
284 else {
285 LOG(info) << "Constructing RICH geometry from ROOT file " << fgeoName.Data();
286 FairModule::ConstructRootGeometry();
287 }
288 }
289 else if (fileName.EndsWith(".gdml")) {
290 LOG(info) << "Constructing RICH geometry from GDML file " << fileName.Data();
292 }
293 else {
294 LOG(fatal) << "Geometry format of RICH file " << fileName.Data()
295 << " not supported. Only ROOT and GDML formats are supported.";
296 }
297}
298
300{
301 FairRun* run = FairRun::Instance();
302 Bool_t isGeant4 = std::string(run->GetName()) == "TGeant4";
303 LOG(info) << "CbmRich::SetRichGlassPropertiesForGeant4() Transport engine:" << std::string(run->GetName());
304
305 // for GEANT3 simulation no need to implement reflectivity
306 if (!isGeant4) {
307 LOG(info) << "CbmRich::SetRichGlassPropertiesForGeant4() fIsGeant4 is "
308 "false. No need to set RICH glass properties. Return.";
309 return;
310 }
311 else {
312 LOG(info) << "CbmRich::SetRichGlassPropertiesForGeant4() fIsGeant4 is "
313 "true. RICH glass properties will be set.";
314 }
315
316 std::vector<Double_t> energyAr = {
317 1.5499, 1.5695, 1.5897, 1.6103, 1.6315, 1.6533, 1.6756, 1.6985, 1.7221, 1.7464, 1.7713, 1.7970, 1.8234,
318 1.8507, 1.8787, 1.9076, 1.9374, 1.9682, 1.9999, 2.0327, 2.0666, 2.1016, 2.1378, 2.1753, 2.2142, 2.2544,
319 2.2962, 2.3395, 2.3845, 2.4313, 2.4799, 2.5305, 2.5832, 2.6382, 2.6955, 2.7554, 2.8180, 2.8836, 2.9522,
320 3.0242, 3.0998, 3.1793, 3.2630, 3.3512, 3.4443, 3.5427, 3.6469, 3.7574, 3.8748, 3.9998, 4.1331, 4.2757,
321 4.4284, 4.5924, 4.7690, 4.9598, 5.1664, 5.3910, 5.6361, 5.9045, 6.1997};
322 // Transform to GeV
323 for (Double_t& energy : energyAr) {
324 energy *= 1.e-9;
325 }
326
327 std::vector<Double_t> reflectivityAr = {
328 0.15719, 0.15315, 0.15218, 0.14953, 0.14761, 0.14416, 0.13753, 0.13844, 0.13705, 0.13307, 0.13136, 0.12569, 0.12284,
329 0.12089, 0.13101, 0.12494, 0.12199, 0.12150, 0.12257, 0.11783, 0.11909, 0.12021, 0.12080, 0.11712, 0.11935, 0.12015,
330 0.11385, 0.11364, 0.11526, 0.11908, 0.12109, 0.12011, 0.12193, 0.12681, 0.12622, 0.12601, 0.12824, 0.13084, 0.13182,
331 0.13287, 0.13463, 0.13513, 0.13665, 0.13826, 0.13960, 0.14072, 0.14205, 0.13977, 0.14090, 0.14073, 0.14031, 0.13951,
332 0.13868, 0.13622, 0.13762, 0.13898, 0.13963, 0.14713, 0.15901, 0.18620, 0.22529};
333
334 for (Double_t& reflectivity : reflectivityAr) {
335 reflectivity = 1. - reflectivity;
336 }
337
338 gMC->DefineOpSurface("RICHglassSurf", kGlisur, kDielectric_metal, kPolished, 0.0);
339 gMC->SetMaterialProperty("RICHglassSurf", "REFLECTIVITY", static_cast<Int_t>(energyAr.size()), energyAr.data(),
340 reflectivityAr.data());
341
342 for (int i = 0; i < 10; i++) {
343 if (gGeoManager->FindVolumeFast(("mirror_tile_type" + std::to_string(i)).c_str()) == nullptr) continue;
344 gMC->SetSkinSurface(("RICHglassSkin" + std::to_string(i)).c_str(), ("mirror_tile_type" + std::to_string(i)).c_str(),
345 "RICHglassSurf");
346 }
347}
348
349void CbmRich::ConstructGdmlGeometry(TGeoMatrix* geoMatrix)
350{
351 TFile* old = gFile;
352 TGDMLParse parser;
353 TGeoVolume* gdmlTop {nullptr};
354
355 // Before importing GDML
356 Int_t maxInd = gGeoManager->GetListOfMedia()->GetEntries() - 1;
357
358 gdmlTop = parser.GDMLReadFile(GetGeometryFileName());
359
360 // Cheating - reassigning media indices after GDML import (need to fix this in TGDMLParse class!!!)
361 // for (Int_t i=0; i<gGeoManager->GetListOfMedia()->GetEntries(); i++)
362 // gGeoManager->GetListOfMedia()->At(i)->Dump();
363 // After importing GDML
364 Int_t j = gGeoManager->GetListOfMedia()->GetEntries() - 1;
365 Int_t curId {};
366 TGeoMedium* m {nullptr};
367 do {
368 m = static_cast<TGeoMedium*>(gGeoManager->GetListOfMedia()->At(j));
369 curId = m->GetId();
370 m->SetId(curId + maxInd);
371 j--;
372 } while (curId > 1);
373 // LOG(debug) << "====================================================================";
374 // for (Int_t i=0; i<gGeoManager->GetListOfMedia()->GetEntries(); i++)
375 // gGeoManager->GetListOfMedia()->At(i)->Dump();
376
377 Int_t newMaxInd = gGeoManager->GetListOfMedia()->GetEntries() - 1;
378
379 gGeoManager->GetTopVolume()->AddNode(gdmlTop, 1, geoMatrix);
380 ExpandNodeForGdml(gGeoManager->GetTopVolume()->GetNode(gGeoManager->GetTopVolume()->GetNdaughters() - 1));
381
382 for (Int_t k = maxInd + 1; k < newMaxInd + 1; k++) {
383 TGeoMedium* medToDel = static_cast<TGeoMedium*>(gGeoManager->GetListOfMedia()->At(maxInd + 1));
384 LOG(debug) << " removing media " << medToDel->GetName() << " with id " << medToDel->GetId() << " (k=" << k
385 << ")";
386 gGeoManager->GetListOfMedia()->Remove(medToDel);
387 }
388 gGeoManager->SetAllIndex();
389
390 gFile = old;
391}
392
393void CbmRich::ExpandNodeForGdml(TGeoNode* node)
394{
395 LOG(debug) << "----------------------------------------- ExpandNodeForGdml for node " << node->GetName();
396
397 TGeoVolume* curVol = node->GetVolume();
398
399 LOG(debug) << " volume: " << curVol->GetName();
400
401 if (curVol->IsAssembly()) { LOG(debug) << " skipping volume-assembly"; }
402 else {
403
404 TGeoMedium* curMed = curVol->GetMedium();
405 TGeoMaterial* curMat = curVol->GetMaterial();
406 TGeoMedium* curMedInGeoManager = gGeoManager->GetMedium(curMed->GetName());
407 TGeoMaterial* curMatOfMedInGeoManager = curMedInGeoManager->GetMaterial();
408 TGeoMaterial* curMatInGeoManager = gGeoManager->GetMaterial(curMat->GetName());
409
410 // Current medium and material assigned to the volume from GDML
411 LOG(debug2) << " curMed\t\t\t\t" << curMed << "\t" << curMed->GetName() << "\t" << curMed->GetId();
412 LOG(debug2) << " curMat\t\t\t\t" << curMat << "\t" << curMat->GetName() << "\t" << curMat->GetIndex();
413
414 // Medium and material found in the gGeoManager - either the pre-loaded one or one from GDML
415 LOG(debug2) << " curMedInGeoManager\t\t" << curMedInGeoManager << "\t" << curMedInGeoManager->GetName() << "\t"
416 << curMedInGeoManager->GetId();
417 LOG(debug2) << " curMatOfMedInGeoManager\t\t" << curMatOfMedInGeoManager << "\t"
418 << curMatOfMedInGeoManager->GetName() << "\t" << curMatOfMedInGeoManager->GetIndex();
419 LOG(debug2) << " curMatInGeoManager\t\t" << curMatInGeoManager << "\t" << curMatInGeoManager->GetName() << "\t"
420 << curMatInGeoManager->GetIndex();
421
422 TString matName = curMat->GetName();
423 TString medName = curMed->GetName();
424
425 if (curMed->GetId() != curMedInGeoManager->GetId()) {
426 if (fFixedMedia.find(medName) == fFixedMedia.end()) {
427 LOG(debug) << " Medium needs to be fixed";
428 fFixedMedia[medName] = curMedInGeoManager;
429 Int_t ind = curMat->GetIndex();
430 gGeoManager->RemoveMaterial(ind);
431 LOG(debug) << " removing material " << curMat->GetName() << " with index " << ind;
432 for (Int_t i = ind; i < gGeoManager->GetListOfMaterials()->GetEntries(); i++) {
433 TGeoMaterial* m = static_cast<TGeoMaterial*>(gGeoManager->GetListOfMaterials()->At(i));
434 m->SetIndex(m->GetIndex() - 1);
435 }
436
437 LOG(debug) << " Medium fixed";
438 }
439 else {
440 LOG(debug) << " Already fixed medium found in the list ";
441 }
442 }
443 else {
444 if (fFixedMedia.find(medName) == fFixedMedia.end()) {
445 LOG(debug) << " There is no correct medium in the memory yet";
446
447 FairGeoLoader* geoLoad = FairGeoLoader::Instance();
448 FairGeoInterface* geoFace = geoLoad->getGeoInterface();
449 FairGeoMedia* geoMediaBase = geoFace->getMedia();
450 // FairGeoBuilder* geobuild = geoLoad->getGeoBuilder();
451
452 FairGeoMedium* curMedInGeo = geoMediaBase->getMedium(medName);
453 if (curMedInGeo == nullptr) {
454 LOG(fatal) << medName << " Media not found in Geo file.";
458 }
459 else {
460 LOG(debug) << " Found media in Geo file" << medName;
461 // Int_t nmed = geobuild->createMedium(curMedInGeo);
462 fFixedMedia[medName] = static_cast<TGeoMedium*>(gGeoManager->GetListOfMedia()->Last());
463 gGeoManager->RemoveMaterial(curMatOfMedInGeoManager->GetIndex());
464 LOG(debug) << " removing material " << curMatOfMedInGeoManager->GetName() << " with index "
465 << curMatOfMedInGeoManager->GetIndex();
466 for (Int_t i = curMatOfMedInGeoManager->GetIndex(); i < gGeoManager->GetListOfMaterials()->GetEntries();
467 i++) {
468 TGeoMaterial* m = static_cast<TGeoMaterial*>(gGeoManager->GetListOfMaterials()->At(i));
469 m->SetIndex(m->GetIndex() - 1);
470 }
471 }
472
473 if (curMedInGeo->getSensitivityFlag()) {
474 LOG(debug) << " Adding sensitive " << curVol->GetName();
475 AddSensitiveVolume(curVol);
476 }
477 }
478 else {
479 LOG(debug) << " Already fixed medium found in the list";
480 LOG(debug) << "!!! Sensitivity: " << fFixedMedia[medName]->GetParam(0);
481 if (fFixedMedia[medName]->GetParam(0) == 1) {
482 LOG(debug) << " Adding sensitive " << curVol->GetName();
483 AddSensitiveVolume(curVol);
484 }
485 }
486 }
487
488 curVol->SetMedium(fFixedMedia[medName]);
489 gGeoManager->SetAllIndex();
490
491 // gGeoManager->GetListOfMaterials()->Print();
492 // gGeoManager->GetListOfMedia()->Print();
493 }
494
496 if (curVol->GetNdaughters() != 0) {
497 TObjArray* NodeChildList = curVol->GetNodes();
498 TGeoNode* curNodeChild {nullptr};
499 for (Int_t j = 0; j < NodeChildList->GetEntriesFast(); j++) {
500 curNodeChild = static_cast<TGeoNode*>(NodeChildList->At(j));
501 ExpandNodeForGdml(curNodeChild);
502 }
503 }
504}
505
506CbmRichPoint* CbmRich::AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length,
507 Double_t eLoss)
508{
509 TClonesArray& clref = *fRichPoints;
510 Int_t size = clref.GetEntriesFast();
511 return new (clref[size]) CbmRichPoint(trackID, detID, pos, mom, time, length, eLoss);
512}
513
514CbmRichPoint* CbmRich::AddRefPlaneHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time,
515 Double_t length, Double_t eLoss)
516{
517 TClonesArray& clref = *fRichRefPlanePoints;
518 Int_t tsize = clref.GetEntriesFast();
519 return new (clref[tsize]) CbmRichPoint(trackID, detID, pos, mom, time, length, eLoss);
520}
521
522CbmRichPoint* CbmRich::AddMirrorHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time,
523 Double_t length, Double_t eLoss)
524{
525 TClonesArray& clref = *fRichMirrorPoints;
526 Int_t tsize = clref.GetEntriesFast();
527 return new (clref[tsize]) CbmRichPoint(trackID, detID, pos, mom, time, length, eLoss);
528}
529
ClassImp(CbmConverterManager)
XPU_D constexpr auto ToIntegralType(T enumerator) -> typename std::underlying_type< T >::type
Definition CbmDefs.h:29
ECbmModuleId
Definition CbmDefs.h:39
@ kRef
Reference plane.
@ kRich
Ring-Imaging Cherenkov Detector.
Defines the active detector RICH. Constructs the geometry and creates MCPoints.
static constexpr size_t size()
Definition KfSimdPseudo.h:2
static CbmRichDigiMapManager & GetInstance()
Return Instance of CbmRichGeoManager.
Int_t GetPixelAddressByPath(const std::string &path)
Return digi address by path to node.
Defines the active detector RICH. Constructs the geometry and creates MCPoints.
Definition CbmRich.h:40
Int_t fPosIndex
Definition CbmRich.h:159
virtual Bool_t IsSensitive(const std::string &name)
Definition CbmRich.cxx:86
void ConstructGdmlGeometry(TGeoMatrix *geoMatrix)
Construct geometry from GDML file.
Definition CbmRich.cxx:349
virtual Bool_t ProcessHits(FairVolume *vol=nullptr)
Defines the action to be taken when a step is inside the active volume. Creates CbmRichPoints for MAP...
Definition CbmRich.cxx:99
void SetRichGlassPropertiesForGeant4()
Set Cherenkov propeties for RICH mirror.
Definition CbmRich.cxx:299
virtual void ConstructGeometry()
Construct geometry. Currently ROOT and ASCII formats are supported. The concrete method for geometry ...
Definition CbmRich.cxx:275
void ConstructOpGeometry()
Put some optical properties.
Definition CbmRich.cxx:269
Bool_t fRegisterPhotonsOnSensitivePlane
Definition CbmRich.h:163
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Copies the hit collection with a given track index offset.
Definition CbmRich.cxx:253
TClonesArray * fRichMirrorPoints
Definition CbmRich.h:167
virtual ~CbmRich()
Destructor.
Definition CbmRich.cxx:63
CbmRichPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss)
Adds a RichPoint to the TClonesArray.
Definition CbmRich.cxx:506
void ExpandNodeForGdml(TGeoNode *node)
Assign materials by taking description from medoa.geo and not from GDML for a certain node.
Definition CbmRich.cxx:393
TGeoCombiTrans * fPositionRotation
Definition CbmRich.h:172
virtual void EndOfEvent()
If verbosity level is set, print hit collection at the end of the event and resets it afterwards.
Definition CbmRich.cxx:214
CbmRich()
Default constructor.
Definition CbmRich.cxx:36
TClonesArray * fRichPoints
Definition CbmRich.h:165
TClonesArray * fRichRefPlanePoints
Definition CbmRich.h:166
virtual void Reset()
Clears the hit collection.
Definition CbmRich.cxx:245
CbmRichPoint * AddRefPlaneHit(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.
Definition CbmRich.cxx:514
virtual void Print(Option_t *) const
Screen output of hit collection.
Definition CbmRich.cxx:235
static std::map< TString, TGeoMedium * > fFixedMedia
Definition CbmRich.h:170
virtual void Register()
Registers the hit collection in the ROOT manager.
Definition CbmRich.cxx:220
virtual void Initialize()
Initialize detector. Stores volume IDs for RICH detector and mirror.
Definition CbmRich.cxx:80
virtual TClonesArray * GetCollection(Int_t iColl) const
Return hit collection.
Definition CbmRich.cxx:227
virtual Bool_t CheckIfSensitive(std::string name)
Check whether a volume is sensitive. The decision is based on the volume name. Only used in case of R...
Definition CbmRich.cxx:96
CbmRichPoint * AddMirrorHit(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.
Definition CbmRich.cxx:522
void AddPoint(ECbmModuleId iDet)
Definition CbmStack.cxx:331
Bool_t IsNewGeometryFile(TString &filename)
void ImportRootGeometry(TString &filename, FairModule *mod, TGeoMatrix *mat)