SND@LHC Software
Loading...
Searching...
No Matches
hcal.cxx
Go to the documentation of this file.
1
8#include "hcal.h"
9
10#include "hcalPoint.h"
11#include "hcalLightMap.h"
12
13#include "FairGeoInterface.h"
14#include "FairGeoLoader.h"
15#include "FairGeoNode.h"
16#include "FairGeoRootBuilder.h"
17#include "FairRuntimeDb.h"
18#include "FairRootManager.h"
19#include "FairRun.h"
20#include "FairRunAna.h"
21#include "ShipStack.h"
22#include "FairVolume.h"
23#include "FairGeoMedium.h"
24#include "FairGeoMedia.h"
25
26#include "TClonesArray.h"
27#include "TGeoMCGeometry.h"
28#include "TGeoManager.h"
29#include "TParticle.h"
30#include "TVirtualMC.h"
31#include "TGeoBBox.h"
32#include "TGeoPgon.h"
33#include "TGeoTube.h"
34#include "TGeoMatrix.h"
35#include "TList.h"
36
37#include <iostream>
38#include <stdlib.h>
39
40using namespace std;
41
42#define kN kNumberOfHCALSensitiveVolumes
43
44// ----- Default constructor -------------------------------------------
46 : FairDetector("HCAL", kTRUE, khcal),
47 fInf(NULL),
48 fDebug(NULL),
49 fTrackID(-1),
50 fVolumeID(-1),
51 fPos(),
52 fMom(),
53 fTime(-1.),
54 fLength(-1.),
55 fELoss(-1.),
56 fPosIndex(0),
57 fHcalCollection(new TClonesArray("hcalPoint")),
58 fLiteCollection(new TClonesArray("hcalPoint")),
59 fHcalSize(),
60 fSimpleGeo(0),
61 fFastMC(0),
62 fXSize(0),
63 fYSize(0),
64 fDX(0.),
65 fDY(0.),
66 fModuleSize(0.),
67 fZHcal(0.),
68 fSemiX(0.),
69 fSemiY(0.),
70 fAbsorber("Lead"),
71 fThicknessAbsorber(0.),
72 fThicknessScin(0.),
73 fThicknessTyvk(0.),
74 fThicknessLayer(0.),
75 fThicknessSteel(0.),
76 fEdging(0.),
77 fHoleRad(0.),
78 fFiberRad(0.),
79 fXCell(0),
80 fYCell(0),
81 fNH(0),
82 fCF(0),
83 fLightMapName(""),
84 fLightMap(NULL),
85 fNLayers(0),
86 fModuleLength(0.),
87 fVolIdMax(0),
88 fFirstNumber(0),
89 fVolArr(),
90 fModule(NULL),
91 fScTile(NULL),
92 fTileEdging(NULL),
93 fPbTile(NULL),
94 fTvTile(NULL),
95 fHoleVol(),
96 fFiberVol(),
97 fSteelTapes(),
98 fHolePos(),
99 fModules(0),
100 fRawNumber(),
101 fStructureId(0)
102{
103 fVerboseLevel = 1;
104
105 Int_t i;
106
107 for(i=kN-1;i>-1;i--)
108 fVolArr[i]=-1111;
109}
110// -------------------------------------------------------------------------
111
112
113
114// ----- Standard constructor ------------------------------------------
115hcal::hcal(const char* name, Bool_t active, const char* fileGeo)
116 : FairDetector(name, active, khcal),
117 fInf(NULL),
118 fDebug(NULL),
119 fTrackID(-1),
120 fVolumeID(-1),
121 fPos(),
122 fMom(),
123 fTime(-1.),
124 fLength(-1.),
125 fELoss(-1.),
126 fPosIndex(0),
127 fHcalCollection(new TClonesArray("hcalPoint")),
128 fLiteCollection(new TClonesArray("hcalPoint")),
129 fHcalSize(),
130 fSimpleGeo(0),
131 fFastMC(0),
132 fXSize(0),
133 fYSize(0),
134 fDX(0.),
135 fDY(0.),
136 fModuleSize(0.),
137 fZHcal(0.),
138 fSemiX(0.),
139 fSemiY(0.),
140 fAbsorber("Lead"),
141 fThicknessAbsorber(0.),
142 fThicknessScin(0.),
143 fThicknessTyvk(0.),
144 fThicknessLayer(0.),
145 fThicknessSteel(0.),
146 fEdging(0.),
147 fHoleRad(0.),
148 fFiberRad(0.),
149 fXCell(0),
150 fYCell(0),
151 fNH(0),
152 fCF(0),
153 fLightMapName(""),
154 fLightMap(NULL),
155 fNLayers(0),
156 fModuleLength(0.),
157 fVolIdMax(0),
158 fFirstNumber(0),
159 fVolArr(),
160 fModule(NULL),
161 fScTile(NULL),
162 fTileEdging(NULL),
163 fPbTile(NULL),
164 fTvTile(NULL),
165 fHoleVol(),
166 fFiberVol(),
167 fSteelTapes(),
168 fHolePos(),
169 fModules(0),
170 fRawNumber(),
171 fStructureId(0)
172{
180 fVerboseLevel=0;
181 Int_t i;
182 Int_t j;
183 TString nm;
184 Info("hcal","Geometry is read from file %s.", fileGeo);
185 fInf=hcalInf::GetInstance(fileGeo);
186 if (fInf==NULL)
187 {
188 Fatal("hcal"," Can't read geometry from %s.", fileGeo);
189 return;
190 }
194
196
201
204
205 fPosIndex=0;
206 fDebug="";
207
208 fSemiX=fInf->GetVariableStrict("xsemiaxis");
209 fSemiY=fInf->GetVariableStrict("ysemiaxis");
210 fHoleRad=fInf->GetVariableStrict("holeradius");
211 fFiberRad=fInf->GetVariableStrict("fiberradius");
213 fEdging=fInf->GetVariableStrict("tileedging");
214 fModuleSize=fInf->GetVariableStrict("modulesize");
215 fSimpleGeo=(Int_t)fInf->GetVariableStrict("usesimplegeo");
216 fFastMC=(Int_t)fInf->GetVariableStrict("fastmc");
217 fDX=fInf->GetVariableStrict("xpos");
218 fDY=fInf->GetVariableStrict("ypos");
220
221 for(i=kN-1;i>-1;i--)
222 fVolArr[i]=-1111;
223
224 for(i=0;i<2;i++)
225 {
226 fSteelTapes[i]=NULL;
227 }
228 for(i=0;i<3;i++)
229 {
230 fHoleVol[i]=NULL;
231 fFiberVol[i]=NULL;
232 }
234 for(i=0;i<fInf->GetXSize();i++)
235 for(j=0;j<fInf->GetYSize();j++)
236 {
237 if (fInf->GetType(i,j)==0) continue;
238 if (fInf->GetType(i,j)==1)
239 fModules++;
240 else
241 Fatal("hcal", "Wrong module type");
242 }
243
244 fCF=(Int_t)fInf->GetVariableStrict("cf");
245 fNH=(Int_t)fInf->GetVariableStrict("nh");
247 if (fLightMapName!="none")
249 else
250 fLightMap=NULL;
251 fAbsorber=fInf->GetStringVariable("absorbermaterial");
252 Info("hcal", "Number of modules is %d, lightmap %s", fModules, fLightMapName.Data());
255 Info("hcal", "Size of cell of type %d is %f cm.", i, fXCell);
256}
257
258// -------------------------------------------------------------------------
259
261{
262 FairDetector::Initialize();
263/*
264 FairRun* sim = FairRun::Instance();
265 FairRuntimeDb* rtdb=sim->GetRuntimeDb();
266 CbmGeoHcalPar *par=new CbmGeoHcalPar();
267// fInf->FillGeoPar(par,0);
268 rtdb->addContainer(par);
269*/
270}
271
272// ----- Destructor ----------------------------------------------------
274{
275 if (fHcalCollection) {
276 fHcalCollection->Delete();
277 delete fHcalCollection;
278 fHcalCollection=NULL;
279 }
280 if (fLiteCollection) {
281 fLiteCollection->Delete();
282 delete fLiteCollection;
283 fLiteCollection=NULL;
284 }
285}
286// -------------------------------------------------------------------------
287
288// ----- Private method SetHcalCuts ------------------------------------
289void hcal::SetHcalCuts(Int_t medium)
290{
292 if (fInf->GetElectronCut() > 0) {
293 gMC->Gstpar(medium,"CUTGAM",fInf->GetElectronCut());
294 gMC->Gstpar(medium,"CUTELE",fInf->GetElectronCut());
295 gMC->Gstpar(medium,"BCUTE" ,fInf->GetElectronCut());
296 gMC->Gstpar(medium,"BCUTM" ,fInf->GetElectronCut());
297 }
298
299 if (fInf->GetHadronCut() > 0) {
300 gMC->Gstpar(medium,"CUTNEU",fInf->GetHadronCut());
301 gMC->Gstpar(medium,"CUTHAD",fInf->GetHadronCut());
302 gMC->Gstpar(medium,"CUTMUO",fInf->GetHadronCut());
303// gMC->Gstpar(medium,"PPCUTM",fInf->GetHadronCut());
304 }
305 ;
306}
307// -------------------------------------------------------------------------
308
310{
311 fFirstNumber=fLiteCollection->GetEntriesFast();
312}
313
314//_____________________________________________________________________________
316{
317 Double_t edep = fELoss;
318 Double_t el=oldHit->GetEnergyLoss();
319 Double_t ttime=gMC->TrackTime()*1.0e9;
320 oldHit->SetEnergyLoss(el+edep);
321 if(ttime<oldHit->GetTime())
322 oldHit->SetTime(ttime);
323}
324
325//_____________________________________________________________________________
327{
328 FairRun* fRun = FairRun::Instance();
329// if (strcmp(fRun->GetName(),"TGeant3") == 0)
330 {
331 Int_t mediumID;
332 mediumID = gGeoManager->GetMedium("Scintillator")->GetId();
333 SetHcalCuts(mediumID);
334 mediumID = gGeoManager->GetMedium(fAbsorber)->GetId();
335 SetHcalCuts(mediumID);
336 mediumID = gGeoManager->GetMedium("Tyvek")->GetId();
337 SetHcalCuts(mediumID);
338 mediumID = gGeoManager->GetMedium("SensVacuum")->GetId();
339 SetHcalCuts(mediumID);
340 mediumID = gGeoManager->GetMedium("ECALAir")->GetId();
341 SetHcalCuts(mediumID);
342 mediumID = gGeoManager->GetMedium("ECALFiber")->GetId();
343 SetHcalCuts(mediumID);
344 mediumID = gGeoManager->GetMedium("ECALTileEdging")->GetId();
345 SetHcalCuts(mediumID);
346 mediumID = gGeoManager->GetMedium("ECALSteel")->GetId();
347 SetHcalCuts(mediumID);
348 }
349}
350// ----- Public method ProcessHits --------------------------------------
351Bool_t hcal::ProcessHits(FairVolume* vol)
352{
354 TString Hcal="Hcal";
355 fELoss = gMC->Edep();
356 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
357 fTime = gMC->TrackTime()*1.0e09;
358 fLength = gMC->TrackLength();
359
360 //if (vol->getVolumeId()==fStructureId) {
361 if (Hcal.CompareTo(gMC->CurrentVolName())==0) {
362 if (gMC->IsTrackEntering()) {
364 ((ShipStack*)gMC->GetStack())->AddPoint(khcal, fTrackID);
365
367
368 return kTRUE;
369 } else {
370 return kFALSE;
371 }
372 }
373
374 if (fELoss<=0) return kFALSE;
375
376 if (fELoss>0)
377 {
378 Int_t i;
379 TParticle* p=gMC->GetStack()->GetCurrentTrack();
380 Double_t x, y, z;
381 Double_t px;
382 Double_t py;
383 Double_t dx;
384 Int_t mx;
385 Int_t my;
386 Int_t type;
387 Int_t cx;
388 Int_t cy;
389 Int_t layer;
390 gMC->TrackPosition(x, y, z);
391// cout << "Id: " << p->GetPdgCode() << " (" << x << ", " << y << ", ";
392// cout << z << "): ";
393// cout << endl;
394/*
395 for(i=0;i<10;i++)
396 {
397 gMC->CurrentVolOffID(i, mx); cout << i << ":" << mx << ", ";
398 }
399 cout << endl;
400*/
401 if (fSimpleGeo==0)
402 {
403 gMC->CurrentVolOffID(1, layer); layer--;
404 gMC->CurrentVolOffID(2, mx); mx--;
405 gMC->CurrentVolOffID(3, my); my--;
406 }
407 else
408 {
409 gMC->CurrentVolOffID(0, layer); layer--;
410 gMC->CurrentVolOffID(1, mx); mx--;
411 gMC->CurrentVolOffID(2, my); my--;
412 }
413 Int_t id=(my*100+mx)*10;
414 if (layer>fNLayers1) id++;
415// cout << mx << "(" << x << "), " << my << "(" << y << "), layer="<< layer << endl;
416/*
417 Float_t rx; Float_t ry; Int_t ten;
418 GetCellCoordInf(id, rx, ry, ten); rx--; ry--;
419 type=fInf->GetType(mx, my);
420 Float_t d=fInf->GetVariableStrict("modulesize")/type;
421 if (x>rx-0.001&&x<rx+d+0.001&&y>ry-0.001&&y<ry+d+0.001)
422 {
423// cout << "+++ ";
424 ;
425 }
426 else
427 {
428 cout << mx << ", " << my << ", " << cell << endl;
429 cout << "--- ";
430 cout << "(" << x << ", " << y << ") : (" << rx << ", " << ry << ")" << endl;
431 }
432*/
433 fVolumeID=id;
434 if (fSimpleGeo==0)
435 {
436 // An old version
437 // px=mx*fModuleSize-fHcalSize[0]/2.0+cx*fModuleSize/type;
438 // py=my*fModuleSize-fHcalSize[1]/2.0+cy*fModuleSize/type;
439 // With correction for steel tapes and edging
440 // TODO: Check this
443
444 px=(x-px)/fXCell;
445 py=(y-py)/fYCell;
446 if (px>=0&&px<1&&py>=0&&py<1)
447 {
448 fELoss*=fLightMap->Data(px-0.5, py-0.5);
449 FillLitePoint(0);
450 }
451 }
452 else
453 FillLitePoint(0);
454// for(i=0;i<8;i++)
455// {
456// Int_t t;
457//
458// gMC->CurrentVolOffID(i, t);
459// cout << i << ": " << gMC->CurrentVolOffName(i) << " " << t << "; ";
460// }
461// cout << endl;
462 }
463 ((ShipStack*)gMC->GetStack())->AddPoint(khcal, fTrackID);
464
466
467 return kTRUE;
468
469}
470
472Int_t hcal::GetVolType(Int_t volnum)
473{
474 Int_t i;
475 for(i=kN-1;i>-1;i--) {
476 if (fVolArr[i]==volnum) break;
477 }
478
479 return i;
480}
481
482//-----------------------------------------------------------------------------
484{
487 gMC->TrackPosition(fPos);
488 gMC->TrackMomentum(fMom);
489 fVolumeID = -1;
490 Double_t mass = gMC->TrackMass();
491 // Calculate kinetic energy
492 Double_t ekin = TMath::Sqrt( fMom.Px()*fMom.Px() +
493 fMom.Py()*fMom.Py() +
494 fMom.Pz()*fMom.Pz() +
495 mass * mass ) - mass;
496 fELoss = ekin;
497 // Create hcalPoint at the entrance of calorimeter
498 // for particles with pz>0 coming through the front wall
499 if (fMom.Pz() > 0 && fPos.Z() < fZHcal+0.01)
500 {
501 TParticle* part=((ShipStack*)gMC->GetStack())->GetParticle(fTrackID);
502 AddHit(fTrackID, fVolumeID, TVector3(fPos.X(), fPos.Y(), fPos.Z()),
503 TVector3(fMom.Px(), fMom.Py(), fMom.Pz()), fTime, fLength,
504 fELoss, part->GetPdgCode());
505 }
506 fTrackID=gMC->GetStack()->GetCurrentTrackNumber();
507}
508
509hcalPoint* hcal::FindHit(Int_t VolId, Int_t TrackId)
510{
511 for(Int_t i=fFirstNumber;i<fLiteCollection->GetEntriesFast();i++)
512 {
513 hcalPoint* point=(hcalPoint*)fLiteCollection->At(i);
514 if (point->GetTrackID()==TrackId&&point->GetDetectorID()==VolId)
515 return point;
516 }
517 return NULL;
518}
519//-----------------------------------------------------------------------------
520Bool_t hcal::FillLitePoint(Int_t volnum)
521{
524 //Search for input track
525
526 static Float_t zmin=fZHcal-0.0001;
527 static Float_t zmax=fZHcal+fHcalSize[2];
528 static Float_t xhcal=fHcalSize[0]/2;
529 static Float_t yhcal=fHcalSize[1]/2;
530 TParticle* part=gMC->GetStack()->GetCurrentTrack();
531 fTrackID=gMC->GetStack()->GetCurrentTrackNumber();
532
533// cout << zmin << " : " << zmax << " : " << xhcal << ", " << yhcal << endl;
534// cout << part->GetFirstMother() << " : " << part->Vx() << ", " << part->Vy() << ", " << part->Vz() << endl;
536 while (part->GetFirstMother()>=0&&part->Vz()>=zmin&&part->Vz()<=zmax&&TMath::Abs(part->Vx())<=xhcal&&TMath::Abs(part->Vy())<=yhcal)
537 {
538 fTrackID=part->GetFirstMother();
539 part =((ShipStack*)gMC->GetStack())->GetParticle(fTrackID);
540// cout << "-> " << part->GetFirstMother() << " : " << part->Vx() << ", " << part->Vy() << ", " << part->Vz() << endl;
541 }
542// if (part->Vz()>500)
543// cout << part->Vx() << ", " << part->Vy() << ", " << part->Vz() << endl;
544#ifdef _DECAL
545 if (fTrackID<0) cout<<"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!fTrackID="<<fTrackID<<endl;
546#endif
547 hcalPoint* oldHit;
548 hcalPoint* newHit;
549
550 if ((oldHit=FindHit(fVolumeID,fTrackID))!=NULL)
551 ChangeHit(oldHit);
552 else
553 // Create hcalPoint for scintillator volumes
555
556
557 return kTRUE;
558}
559
560// ----- Public method EndOfEvent --------------------------------------
562 if (fVerboseLevel) Print();
563 fHcalCollection->Clear();
564
565 fLiteCollection->Clear();
566 fPosIndex = 0;
567 fFirstNumber=0;
568}
569// -------------------------------------------------------------------------
570
571// ----- Public method GetCollection -----------------------------------
572TClonesArray* hcal::GetCollection(Int_t iColl) const
573{
574 if (iColl == 0) return fHcalCollection;
575 if (iColl == 1) return fLiteCollection;
576 else return NULL;
577}
578// -------------------------------------------------------------------------
579
580// ----- Public method Reset -------------------------------------------
582{
583 fHcalCollection->Clear();
584 fLiteCollection->Clear();
586 fFirstNumber=0;
587}
588// -------------------------------------------------------------------------
589
590// ----- Public method Print -------------------------------------------
591void hcal::Print() const
592{
593 Int_t nHits = fHcalCollection->GetEntriesFast();
594 Int_t nLiteHits;
595 Int_t i;
596
597 cout << "-I- hcal: " << nHits << " points registered in this event.";
598 cout << endl;
599
600 nLiteHits=fLiteCollection->GetEntriesFast();
601 cout << "-I- hcal: " << nLiteHits << " lite points registered in this event.";
602 cout << endl;
603
604 if (fVerboseLevel>1)
605 {
606 for (i=0;i<nHits;i++)
607 (*fHcalCollection)[i]->Print();
608 for (i=0;i<nLiteHits;i++)
609 (*fLiteCollection)[i]->Print();
610 }
611}
612// -------------------------------------------------------------------------
613
614// ----- Public method CopyClones --------------------------------------
615void hcal::CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset)
616{
617 Int_t nEntries = cl1->GetEntriesFast();
618 Int_t i;
619 Int_t index;
620 cout << "-I- hcal: " << nEntries << " entries to add." << endl;
621 TClonesArray& clref = *cl2;
622 if (cl1->GetClass()==hcalPoint::Class()) {
623 hcalPoint* oldpoint = NULL;
624 for (i=0; i<nEntries; i++) {
625 oldpoint = (hcalPoint*) cl1->At(i);
626 index = oldpoint->GetTrackID()+offset;
627 oldpoint->SetTrackID(index);
628 new (clref[fPosIndex]) hcalPoint(*oldpoint);
629 fPosIndex++;
630 }
631 cout << "-I- hcal: " << cl2->GetEntriesFast() << " merged entries."
632 << endl;
633 }
634 else if (cl1->GetClass()==hcalPoint::Class()) {
635 hcalPoint* oldpoint = NULL;
636 for (i=0; i<nEntries; i++) {
637 oldpoint = (hcalPoint*) cl1->At(i);
638 index = oldpoint->GetTrackID()+offset;
639 oldpoint->SetTrackID(index);
640 new (clref[fPosIndex]) hcalPoint(*oldpoint);
641 fPosIndex++;
642 }
643 cout << "-I- hcal: " << cl2->GetEntriesFast() << " merged entries."
644 << endl;
645 }
646}
647// -------------------------------------------------------------------------
648
649// ----- Public method Register ----------------------------------------
651{
652 FairRootManager::Instance()->Register("HcalPoint","Hcal",fHcalCollection,kTRUE);
653 FairRootManager::Instance()->Register("HcalPointLite","HcalLite",fLiteCollection,kTRUE);
654 ;
655}
656// -------------------------------------------------------------------------
657
658// ----- Public method ConstructGeometry -------------------------------
660{
661 FairGeoLoader*geoLoad = FairGeoLoader::Instance();
662 FairGeoInterface *geoFace = geoLoad->getGeoInterface();
663 FairGeoMedia *Media = geoFace->getMedia();
664 FairGeoBuilder *geobuild=geoLoad->getGeoBuilder();
665
666 TGeoVolume *top=gGeoManager->GetTopVolume();
667
668 // cout << top->GetName() << endl;
669 TGeoVolume *volume;
670 FairGeoMedium *CbmMedium;
671 TGeoPgon *spl;
672
673 Float_t *buf = 0;
674 Int_t i;
675 Double_t par[10];
676 Float_t y;
677 TString nm;
679 Double_t moduleth=thickness*fNLayers;
680// Float_t sumWeight;
681// Int_t i;
682
683 // create SensVacuum which is defined in the media file
684
686 InitMedia();
687 par[0]=fSemiX;
688 par[1]=fSemiY;
689 par[2]=fHcalSize[2]/2.0;
690
691 if (!IsActive()){
692 Double_t fudgeFactor = 6.34 / 13.7 ; // to have same interaction length as before
693 par[2] = par[2]*fudgeFactor;
694 volume=gGeoManager->Volume("Hcal", "BOX", gGeoManager->GetMedium("iron")->GetId(), par, 3);
695 gGeoManager->Node("Hcal", 1, top->GetName(), 0.0,0.0, fZHcal, 0, kTRUE, buf, 0);
696 return;
697 }
698
699 volume=gGeoManager->Volume("Hcal", "BOX", gGeoManager->GetMedium("SensVacuum")->GetId(), par, 3);
700 gGeoManager->Node("Hcal", 1, top->GetName(), 0.0,0.0, fZHcal, 0, kTRUE, buf, 0);
701 volume->SetVisLeaves(kTRUE);
702 volume->SetVisContainers(kFALSE);
703 volume->SetVisibility(kFALSE);
704
705
706 AddSensitiveVolume(volume);
707 fStructureId=volume->GetNumber();
708
709 if (fFastMC==0)
710 {
711 if (fSimpleGeo==0)
713 else
715
716 TGeoVolume* vol=new TGeoVolumeAssembly("HcalStructure");
717//To suppress warring
718 vol->SetMedium(gGeoManager->GetMedium("SensVacuum"));
719 for(i=0;i<fYSize;i++)
720 {
721 volume=ConstructRaw(i);
722 if (volume==NULL)
723 {
724 continue;
725 }
726 nm=volume->GetName();
727 y=(i-fYSize/2.0+0.5)*fModuleSize;
728 gGeoManager->Node(nm.Data(), i+1, "HcalStructure", 0.0, y, 0.0, 0, kTRUE, buf, 0);
729 }
730//TODO:
731//Should move the guarding volume, not structure itself
732 gGeoManager->Node("HcalStructure", 1, "Hcal", fDX, fDY, 0.0, 0, kTRUE, buf, 0);
733 }
734}
735// -------------------------------------------------------------------------
736
737// ----- Public method ConstructRaw ----------------------------------------
738TGeoVolume* hcal::ConstructRaw(Int_t num)
739{
740 Int_t i;
741 list<pair<Int_t, TGeoVolume*> >::const_iterator p=fRawNumber.begin();
742 pair<Int_t, TGeoVolume*> out;
743 Float_t x;
744 Float_t* buf=NULL;
745 for(i=0;i<fXSize;i++)
746 if ((Int_t)fInf->GetType(i, num)!=0) break;
747 if (i==fXSize)
748 return NULL;
749 for(;p!=fRawNumber.end();++p)
750 {
751 for(i=0;i<fXSize;i++)
752 if (fInf->GetType(i, num)!=fInf->GetType(i, (*p).first))
753 break;
754 if (i==fXSize)
755 break;
756 }
757 if (p!=fRawNumber.end())
758 return (*p).second;
759 TString nm="HCALRaw"; nm+=num;
760 TString md;
761 TGeoVolume* vol=new TGeoVolumeAssembly(nm);
762//To suppress warring
763 vol->SetMedium(gGeoManager->GetMedium("SensVacuum"));
764 for(i=0;i<fXSize;i++)
765 {
766 x=(i-fXSize/2.0+0.5)*fModuleSize;
767 if (fInf->GetType(i, num)==0) continue;
768 md="HcalModule";
769 gGeoManager->Node(md.Data(),i+1, nm.Data(), x, 0.0, 0.0, 0, kTRUE, buf, 0);
770 }
771
772 out.first=num;
773 out.second=vol;
774 fRawNumber.push_back(out);
775 return out.second;
776}
777// -------------------------------------------------------------------------
778
779
780// ----- Public method BeginEvent -----------------------------------------
782{
783 ;
784}
785// -------------------------------------------------------------------------
786
787
788// -------------------------------------------------------------------------
789
790// ----- Private method AddHit -----------------------------------------
791hcalPoint* hcal::AddHit(Int_t trackID, Int_t detID, TVector3 pos,
792 TVector3 mom, Double_t time, Double_t length,
793 Double_t eLoss, Int_t pdgcode)
794{
795 TClonesArray& clref = *fHcalCollection;
796 Int_t size = clref.GetEntriesFast();
797 return new(clref[size]) hcalPoint(trackID, detID, pos, mom,
798 time, length, eLoss, pdgcode);
799}
800// -------------------------------------------------------------------------
801
802// ----- Private method AddHit -----------------------------------------
803hcalPoint* hcal::AddLiteHit(Int_t trackID, Int_t detID, Double32_t time, Double32_t eLoss)
804{
805 TClonesArray& clref = *fLiteCollection;
806 Int_t size = clref.GetEntriesFast();
807 return new(clref[size]) hcalPoint(trackID, detID, time, eLoss);
808}
809// -------------------------------------------------------------------------
810
811// ----- Private method ConstructModule ----------------------------------
813{
814 if (fModule!=NULL) return;
815
816 ConstructTile(0);
817 ConstructTile(1);
819
820 TString nm="HcalModule";
821 TString nm1;
822 TString cellname="HcalCell";
823 TString scin="ScTile";
824 TString lead="LeadTile";
825 TString tyvek="TvTile";
826 Int_t i;
827 Int_t j;
828 Int_t n;
829 Float_t x;
830 Float_t y;
831 Float_t* buf=NULL;
833 Double_t moduleth=thickness*fNLayers;
834 Double_t par[3]={fModuleSize/2.0, fModuleSize/2.0, moduleth/2.0};
835
836 if (fSteelTapes[0]==NULL)
837 {
838 TGeoBBox* st1=new TGeoBBox(fThicknessSteel/2.0, fModuleSize/2.0-fThicknessSteel, moduleth/2.0);
839 nm1="HcalModuleSteelTape1";
840 fSteelTapes[0]=new TGeoVolume(nm1.Data(), st1, gGeoManager->GetMedium("ECALSteel"));
841 }
842 if (fSteelTapes[1]==NULL)
843 {
844 TGeoBBox* st2=new TGeoBBox(fModuleSize/2.0-fThicknessSteel, fThicknessSteel/2.0, moduleth/2.0);
845 nm1="HcalModuleSteelTape2";
846 fSteelTapes[1]=new TGeoVolume(nm1.Data(), st2, gGeoManager->GetMedium("ECALSteel"));
847 }
848
849
850// TGeoVolume* modulev=new TGeoVolumeAssembly(nm);
851 TGeoVolume* modulev=gGeoManager->Volume(nm.Data(), "BOX", gGeoManager->GetMedium("ECALAir")->GetId(), par, 3);
852 modulev->SetLineColor(kOrange+3);
853 for(i=0;i<fNLayers;i++)
854 {
855 gGeoManager->Node(scin.Data(), i+1, nm.Data(), 0.0, 0.0, -thickness*fNLayers/2.0+fThicknessScin/2.0+i*thickness, 0, kTRUE, buf, 0);
856 gGeoManager->Node(lead.Data(), i+1, nm.Data(), 0.0, 0.0, -thickness*fNLayers/2.0+fThicknessScin+i*thickness+fThicknessTyvk+fThicknessAbsorber/2.0, 0, kTRUE, buf, 0);
857 if (fThicknessTyvk>0.0)
858 {
859 gGeoManager->Node(tyvek.Data(), 2*i+1, nm.Data(), 0.0, 0.0, -thickness*fNLayers/2.0+fThicknessScin+i*thickness+1.5*fThicknessTyvk+fThicknessAbsorber, 0, kTRUE, buf, 0);
860 gGeoManager->Node(tyvek.Data(), 2*i+2, nm.Data(), 0.0, 0.0, -thickness*fNLayers/2.0+fThicknessScin+i*thickness+0.5*fThicknessTyvk, 0, kTRUE, buf, 0);
861 }
862 }
863
864 nm1="HcalModuleSteelTape1";
865 gGeoManager->Node(nm1.Data(), 1, nm.Data(), -fThicknessSteel/2.0+fModuleSize/2.0, 0.0, 0.0, 0, kTRUE, buf, 0);
866 gGeoManager->Node(nm1.Data(), 2, nm.Data(), +fThicknessSteel/2.0-fModuleSize/2.0, 0.0, 0.0, 0, kTRUE, buf, 0);
867 nm1="HcalModuleSteelTape2";
868 gGeoManager->Node(nm1.Data(), 1, nm.Data(), 0.0, -fThicknessSteel/2.0+fModuleSize/2.0, 0.0, 0, kTRUE, buf, 0);
869 gGeoManager->Node(nm1.Data(), 2, nm.Data(), 0.0, +fThicknessSteel/2.0-fModuleSize/2.0, 0.0, 0, kTRUE, buf, 0);
870
871 fModuleLength=moduleth;
872 fModule=modulev;
873}
874// -------------------------------------------------------------------------
875
876// ----- Private method ConstructModuleSimple-----------------------------
878{
879 if (fModule!=NULL) return;
880
884
885 TString nm="HcalModule";
886 TString nm1;
887 TString cellname="HcalCell";
888 TString scin="ScTile";
889 TString lead="LeadTile";
890 TString tyvek="TvTile";
891 Int_t i;
892 Int_t j;
893 Int_t n;
894 Float_t x;
895 Float_t y;
896 Float_t* buf=NULL;
898 Double_t moduleth=thickness*fNLayers;
899 Double_t par[3]={fModuleSize/2.0, fModuleSize/2.0, moduleth/2.0};
900
901// TGeoVolume* modulev=new TGeoVolumeAssembly(nm);
902 TGeoVolume* modulev=gGeoManager->Volume(nm.Data(), "BOX", gGeoManager->GetMedium("ECALAir")->GetId(), par, 3);
903 modulev->SetLineColor(kOrange+3);
904 for(i=0;i<fNLayers;i++)
905 {
906 gGeoManager->Node(scin.Data(), i+1, nm.Data(), 0.0, 0.0, -thickness*fNLayers/2.0+fThicknessScin/2.0+i*thickness, 0, kTRUE, buf, 0);
907 gGeoManager->Node(lead.Data(), i+1, nm.Data(), 0.0, 0.0, -thickness*fNLayers/2.0+fThicknessScin+i*thickness+fThicknessTyvk+fThicknessAbsorber/2.0, 0, kTRUE, buf, 0);
908 if (fThicknessTyvk>0.0)
909 {
910 gGeoManager->Node(tyvek.Data(), 2*i+1, nm.Data(), 0.0, 0.0, -thickness*fNLayers/2.0+fThicknessScin+i*thickness+1.5*fThicknessTyvk+fThicknessAbsorber, 0, kTRUE, buf, 0);
911 gGeoManager->Node(tyvek.Data(), 2*i+2, nm.Data(), 0.0, 0.0, -thickness*fNLayers/2.0+fThicknessScin+i*thickness+0.5*fThicknessTyvk, 0, kTRUE, buf, 0);
912 }
913 }
914
915 fModuleLength=moduleth;
916 fModule=modulev;
917}
918// -------------------------------------------------------------------------
919
920// ----- Private method InitMedium ---------------------------------------
921Int_t hcal::InitMedium(const char* name)
922{
923 static FairGeoLoader *geoLoad=FairGeoLoader::Instance();
924 static FairGeoInterface *geoFace=geoLoad->getGeoInterface();
925 static FairGeoMedia *media=geoFace->getMedia();
926 static FairGeoBuilder *geoBuild=geoLoad->getGeoBuilder();
927
928 FairGeoMedium *CbmMedium=media->getMedium(name);
929
930 if (!CbmMedium)
931 {
932 Fatal("InitMedium","Material %s not defined in media file.", name);
933 return -1111;
934 }
935 TGeoMedium* medium=gGeoManager->GetMedium(name);
936 if (medium!=NULL)
937 return CbmMedium->getMediumIndex();
938
939 return geoBuild->createMedium(CbmMedium);
940}
941// -------------------------------------------------------------------------
942
943// ----- Private method InitMedia ----------------------------------------
945{
946 Info("InitMedia", "Initializing media.");
947 InitMedium("SensVacuum");
948 InitMedium("ECALVacuum");
949 InitMedium(fAbsorber.Data());
950 InitMedium("Scintillator");
951 InitMedium("Tyvek");
952 InitMedium("ECALAir");
953 InitMedium("ECALFiber");
954 InitMedium("ECALSteel");
955 InitMedium("ECALTileEdging");
956}
957// -------------------------------------------------------------------------
958
959// ----- Private method ConstructTile ------------------------------------
960void hcal::ConstructTile(Int_t material)
961{
962 switch (material)
963 {
964 case 0: if (fScTile!=NULL) return; break;
965 case 1: if (fPbTile!=NULL) return; break;
966 case 2: if (fTvTile!=NULL) return; break;
967 default: Error("ConstructTile", "Can't construct a tile of type %d.", material);
968 }
969 Double_t thickness;
970 TGeoVolume* hole;
971 TGeoVolume* fiber;
972 TGeoTranslation** tr;
973 TGeoTranslation* tm;
974 Int_t nh=fNH;
975 Int_t i;
976 Int_t j;
977 TString nm;
978 TString nm1;
979 TString nm2;
980 TString medium;
981 Double_t x;
982 Double_t y;
983 TGeoBBox* tile;
984 TGeoVolume* tilev;
985 TGeoBBox* edging;
986 TGeoVolume* edgingv;
987 Double_t* buf=NULL;
988
989 switch (material)
990 {
991 case 0: thickness=fThicknessScin/2.0; break;
992 case 1: thickness=fThicknessAbsorber/2.0; break;
993 case 2: thickness=fThicknessTyvk/2.0; break;
994 default: Error("ConstructTile", "Can't construct a tile of type %d.", material);
995 }
996
997 if (thickness<=0.0) return;
998 // Holes in the tiles
999 if (fHoleRad>0)
1000 {
1001 nm1="ECALHole_"; nm1+=material;
1002 nm2="ECALFiber_"; nm2+=material;
1003 if (fHoleVol[material]==NULL)
1004 {
1005 TGeoTube* holetube=new TGeoTube(0, fHoleRad, thickness);
1006 fHoleVol[material]=new TGeoVolume(nm1.Data(), holetube, gGeoManager->GetMedium("ECALAir"));
1007 }
1008 hole=fHoleVol[material];
1009 // Fibers in holes
1010 if (fFiberRad>0)
1011 {
1012 if (fFiberVol[material]==NULL)
1013 {
1014 TGeoTube* fibertube=new TGeoTube(0, fFiberRad, thickness);
1015 fFiberVol[material]=new TGeoVolume(nm2.Data(), fibertube, gGeoManager->GetMedium("ECALFiber"));
1016 gGeoManager->Node(nm2.Data(), 1, nm1.Data(), 0.0, 0.0, 0.0, 0, kTRUE, buf, 0);
1017 }
1018 fiber=fFiberVol[material];
1019 // TODO: Cerenkoff !!!
1020 //AddSensitiveVolume(fiber);
1021 }
1022 }
1023/*
1024 if (fHolePos==NULL)
1025 {
1026 tr=new TGeoTranslation*[nh*nh];
1027 for(i=0;i<nh;i++)
1028 for(j=0;j<nh;j++)
1029 {
1030 nm="sh"; nm+="_"; nm+=j*nh+i;
1031 x=(i-nh/2+0.5)*fXCell/nh;
1032 y=(j-nh/2+0.5)*fYCell/nh;
1033
1034
1035 tm=new TGeoTranslation(nm, x, y, 0);
1036 gGeoManager->AddTransformation(tm);
1037 tr[j*nh+i]=tm;
1038 }
1039 fHolePos=tr;
1040 }
1041 tr=fHolePos;
1042*/
1044 switch (material)
1045 {
1046 case 0: nm="ScTile"; medium="Scintillator"; break;
1047 case 1: nm="LeadTile"; medium=fAbsorber; break;
1048 case 2: nm="TvTile"; medium="Tyvek"; break;
1049 default: Error("ConstructTile", "Can't construct a tile of type %d.", material);
1050 }
1051
1052 if (material==0)
1053 tile=new TGeoBBox(fXCell/2.0, fYCell/2.0, thickness);
1054 else
1055 tile=new TGeoBBox(fXCell/2.0+fEdging, fYCell/2.0+fEdging, thickness);
1056 tilev=new TGeoVolume(nm, tile, gGeoManager->GetMedium(medium));
1057 if (fHoleRad>0)
1058 {
1059 nm1="ECALHole_"; nm1+=material;
1060 for(i=0;i<nh;i++)
1061 for(j=0;j<nh;j++)
1062 {
1063 x=(i-nh/2+0.5)*fXCell/nh;
1064 y=(j-nh/2+0.5)*fYCell/nh;
1065 gGeoManager->Node(nm1.Data(), j*nh+i+1, nm.Data(), x, y, 0.0, 0, kTRUE, buf, 0);
1066 }
1067 // clear fiber
1068 if (nh%2==0&&fCF!=0)
1069 gGeoManager->Node(nm1.Data(), j*nh+i+1, nm.Data(), 0.0, 0.0, 0.0, 0, kTRUE, buf, 0);
1070
1071 }
1072/*
1073 if (fHoleRad>0)
1074 {
1075 for(i=0;i<nh;i++)
1076 for(j=0;j<nh;j++)
1077 tilev->AddNode(hole, j*nh+i+1, tr[j*nh+i]);
1078 // Clear Fiber
1079 if (nh%2==0)
1080 tilev->AddNode(hole, j*nh+i+1);
1081 }
1082*/
1084 if (material==0)
1085 {
1086 AddSensitiveVolume(tilev);
1087 edging=new TGeoBBox(fXCell/2.0+fEdging, fYCell/2.0+fEdging, thickness);
1088
1089 edgingv=new TGeoVolume(nm+"_edging", edging, gGeoManager->GetMedium("ECALTileEdging"));
1090 edgingv->AddNode(tilev, 1);
1091 fScTile=tilev;
1092 fTileEdging=edgingv;
1093 }
1094 else
1095 {
1096 if (material==1) //Lead
1097 fPbTile=tilev;
1098 else
1099 fTvTile=tilev;
1100 return;
1101 }
1102}
1103// -------------------------------------------------------------------------
1104
1105// ----- Private method ConstructTileSimple ------------------------------
1106void hcal::ConstructTileSimple(Int_t material)
1107{
1108 switch (material)
1109 {
1110 case 0: if (fScTile!=NULL) return; break;
1111 case 1: if (fPbTile!=NULL) return; break;
1112 case 2: if (fTvTile!=NULL) return; break;
1113 default: Error("ConstructTileSimple", "Can't construct a tile of type %d.", material);
1114 }
1115 Double_t thickness;
1116 TGeoVolume* hole;
1117 TGeoVolume* fiber;
1118 TGeoTranslation** tr;
1119 TGeoTranslation* tm;
1120 Int_t nh=fNH;
1121 Int_t i;
1122 Int_t j;
1123 TString nm;
1124 TString nm1;
1125 TString nm2;
1126 TString medium;
1127 Double_t x;
1128 Double_t y;
1129 TGeoBBox* tile;
1130 TGeoVolume* tilev;
1131 TGeoBBox* edging;
1132 TGeoVolume* edgingv;
1133 Double_t* buf=NULL;
1134
1135 switch (material)
1136 {
1137 case 0: thickness=fThicknessScin/2.0; break;
1138 case 1: thickness=fThicknessAbsorber/2.0; break;
1139 case 2: thickness=fThicknessTyvk/2.0; break;
1140 default: Error("ConstructTile", "Can't construct a tile of type %d.", material);
1141 }
1142
1143 if (thickness<=0.0) return;
1145 switch (material)
1146 {
1147 case 0: nm="ScTile"; medium="Scintillator"; break;
1148 case 1: nm="LeadTile"; medium=fAbsorber; break;
1149 case 2: nm="TvTile"; medium="Tyvek"; break;
1150 default: Error("ConstructTile", "Can't construct a tile of type %d.", material);
1151 }
1152
1153 tile=new TGeoBBox(fModuleSize/2.0, fModuleSize/2.0, thickness);
1154 tilev=new TGeoVolume(nm, tile, gGeoManager->GetMedium(medium));
1156 if (material==0)
1157 {
1158 AddSensitiveVolume(tilev);
1159 fScTile=tilev;
1160 fTileEdging=tilev;
1161 }
1162 else
1163 {
1164 if (material==1) //Absorber
1165 fPbTile=tilev;
1166 else
1167 fTvTile=tilev;
1168 return;
1169 }
1170}
1171// -------------------------------------------------------------------------
1172
1173// ----- Public method GetCellCoordInf ----------------------------------------
1174Bool_t hcal::GetCellCoordInf(Int_t fVolID, Float_t &x, Float_t &y, Int_t& section)
1175{
1176 static hcalInf* inf=NULL;
1177 if (inf==NULL)
1178 {
1179 inf=hcalInf::GetInstance(NULL);
1180 if (inf==NULL)
1181 {
1182 cerr << "hcal::GetCellCoordInf(): Can't get geometry information." << endl;
1183 return kFALSE;
1184 }
1185 }
1186 Int_t volid=fVolID;
1187 section=volid%10; volid=volid-section; volid/=10;
1188 Int_t mx=volid%100; volid-=mx; volid/=100;
1189 Int_t my=volid%100; volid-=my; volid/=100;
1190 static Float_t modulesize=inf->GetVariableStrict("modulesize");
1191 static Float_t xcalosize=inf->GetHcalSize(0);
1192 static Float_t ycalosize=inf->GetHcalSize(1);
1193 static Float_t dx=inf->GetVariableStrict("xpos");
1194 static Float_t dy=inf->GetVariableStrict("ypos");
1195 x=mx*modulesize-xcalosize/2.0+1.0; x+=dx;
1196 y=my*modulesize-ycalosize/2.0+1.0; y+=dy;
1197
1198 return kFALSE;
1199}
1200
1201// ------------------------------------------------------------------------------
1202
1203Bool_t hcal::GetCellCoord(Int_t fVolID, Float_t &x, Float_t &y, Int_t& section)
1204{
1205 return GetCellCoordInf(fVolID, x, y, section);
1206}
1207
1208
@ khcal
Double_t GetAbsorber() const
Definition hcalInf.h:40
Double_t GetScin() const
Definition hcalInf.h:41
Int_t GetN1Layers() const
Definition hcalInf.h:39
static hcalInf * GetInstance(const char *filename)
Definition hcalInf.cxx:35
Double_t GetVariableStrict(const char *key)
Definition hcalInf.cxx:82
Double_t GetHcalSize(Int_t num) const
Definition hcalInf.h:55
Double_t GetTyveec() const
Definition hcalInf.h:42
Int_t GetNLayers() const
Definition hcalInf.h:38
Double_t GetElectronCut() const
Definition hcalInf.h:52
Int_t GetYSize() const
Definition hcalInf.h:47
Int_t GetXSize() const
Definition hcalInf.h:46
Double_t GetHadronCut() const
Definition hcalInf.h:53
char GetType(Int_t x, Int_t y) const
Definition hcalInf.h:158
TString GetStringVariable(const char *key)
Definition hcalInf.cxx:103
Double_t GetZPos() const
Definition hcalInf.h:34
Double_t Data(Double_t x, Double_t y)
Option_t * fDebug
Definition hcal.h:108
Int_t fCF
Definition hcal.h:179
std::list< std::pair< Int_t, TGeoVolume * > > fRawNumber
Number of mudules.
Definition hcal.h:223
Int_t fXSize
Definition hcal.h:144
virtual void EndOfEvent()
Definition hcal.cxx:561
void ConstructTileSimple(Int_t material)
Definition hcal.cxx:1106
Float_t fZHcal
Definition hcal.h:152
Float_t fModuleLength
Definition hcal.h:189
TString fAbsorber
Definition hcal.h:157
Float_t fXCell
Definition hcal.h:175
Int_t fYSize
Definition hcal.h:145
Int_t fSimpleGeo
Definition hcal.h:140
virtual void FinishPrimary()
Definition hcal.cxx:309
static Bool_t GetCellCoordInf(Int_t fVolumeID, Float_t &x, Float_t &y, Int_t &section)
Definition hcal.cxx:1174
Float_t fSemiY
Definition hcal.h:155
virtual void ChangeHit(hcalPoint *oldHit=NULL)
Definition hcal.cxx:315
virtual void Register()
Definition hcal.cxx:650
hcalInf * fInf
Definition hcal.h:107
Int_t fVolumeID
Definition hcal.h:117
Int_t fPosIndex
Definition hcal.h:129
void ConstructTile(Int_t material)
Definition hcal.cxx:960
Int_t fTrackID
Definition hcal.h:115
void ConstructModule()
Definition hcal.cxx:812
virtual void SetSpecialPhysicsCuts()
Definition hcal.cxx:326
TClonesArray * fHcalCollection
Definition hcal.h:132
Bool_t FillLitePoint(Int_t volnum)
Definition hcal.cxx:520
hcalLightMap * fLightMap
Definition hcal.h:183
Int_t fFastMC
Definition hcal.h:142
void InitMedia()
Definition hcal.cxx:944
Int_t GetVolType(Int_t volnum)
Definition hcal.cxx:472
Float_t fYCell
Definition hcal.h:176
Int_t fNLayers
Definition hcal.h:185
static Bool_t GetCellCoord(Int_t fVolumeID, Float_t &x, Float_t &y, Int_t &section)
Definition hcal.cxx:1203
Float_t fThicknessTyvk
Definition hcal.h:163
virtual void ConstructGeometry()
Definition hcal.cxx:659
TGeoVolume * fScTile
Calorimeter Modules.
Definition hcal.h:214
hcal()
Definition hcal.cxx:45
void SetHcalCuts(Int_t medium)
Definition hcal.cxx:289
Int_t fNH
Definition hcal.h:178
hcalPoint * AddLiteHit(Int_t trackID, Int_t detID, Double32_t time, Double32_t eLoss)
Definition hcal.cxx:803
TGeoVolume * fTileEdging
Pb tiles.
Definition hcal.h:215
virtual Bool_t ProcessHits(FairVolume *vol=NULL)
Definition hcal.cxx:351
Float_t fHoleRad
Definition hcal.h:171
TGeoVolume * fPbTile
Edging of scintillator tiles.
Definition hcal.h:216
Int_t fFirstNumber
Definition hcal.h:193
virtual void CopyClones(TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
Definition hcal.cxx:615
TGeoVolume * fSteelTapes[2]
Fiber volume.
Definition hcal.h:220
virtual void Print() const
Definition hcal.cxx:591
hcalPoint * FindHit(Int_t VolId, Int_t TrackId)
Definition hcal.cxx:509
TGeoVolume * ConstructRaw(Int_t number)
Definition hcal.cxx:738
Int_t fVolArr[kNumberOfHCALSensitiveVolumes]
Definition hcal.h:200
Float_t fHcalSize[3]
Definition hcal.h:137
Double32_t fLength
Definition hcal.h:125
TLorentzVector fMom
Definition hcal.h:121
TGeoVolume * fHoleVol[3]
Tyvek sheets.
Definition hcal.h:218
virtual ~hcal()
Definition hcal.cxx:273
Int_t fModules
Positions of holes.
Definition hcal.h:222
TClonesArray * fLiteCollection
Definition hcal.h:134
hcalPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t pdgcode)
Definition hcal.cxx:791
TGeoVolume * fModule
Definition hcal.h:213
Float_t fDX
Definition hcal.h:147
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition hcal.cxx:572
Double32_t fELoss
Definition hcal.h:127
Float_t fSemiX
Definition hcal.h:154
Float_t fThicknessAbsorber
Definition hcal.h:159
Double32_t fTime
Definition hcal.h:123
Float_t fDY
Definition hcal.h:148
Int_t InitMedium(const char *name)
Definition hcal.cxx:921
Float_t fThicknessScin
Definition hcal.h:161
virtual void Initialize()
Definition hcal.cxx:260
Float_t fModuleSize
Definition hcal.h:150
TGeoVolume * fTvTile
Scintillator tiles.
Definition hcal.h:217
void ConstructModuleSimple()
Definition hcal.cxx:877
TString fLightMapName
Definition hcal.h:181
TGeoVolume * fFiberVol[3]
Hole volume.
Definition hcal.h:219
Float_t fFiberRad
Definition hcal.h:173
Int_t fStructureId
List of constructed raws.
Definition hcal.h:226
void ResetParameters()
Definition hcal.h:238
Float_t fEdging
Definition hcal.h:169
Float_t fThicknessSteel
Definition hcal.h:167
Int_t fNLayers1
Definition hcal.h:187
virtual void BeginEvent()
Definition hcal.cxx:781
TLorentzVector fPos
Definition hcal.h:119
void FillWallPoint()
Definition hcal.cxx:483
virtual void Reset()
Definition hcal.cxx:581
#define kN
Definition ecal.cxx:43