FairShip
Loading...
Searching...
No Matches
veto Class Reference

#include <veto.h>

Inheritance diagram for veto:
Collaboration diagram for veto:

Public Member Functions

 veto ()
 Constructor for the Veto class.
 
Bool_t ProcessHits (FairVolume *v=0) override
 Processes a hit in the veto detector.
 
void SetFastMuon ()
 
void SetFollowMuon ()
 
void SetVesselDimensions (Float_t x1, Float_t x2, Float_t y1, Float_t y2, Float_t vesselstart)
 
void ConstructGeometry () override
 Constructs the detector geometry.
 
void SetVesselStructure (Float_t a, Float_t b, Float_t c, TString d, Float_t l, TString e, TString f, TString v, Float_t r)
 
void PreTrack () override
 
void SetUseSupport (Int_t use=1)
 
Int_t GetUseSupport () const
 
void SetLiquidVeto (Int_t liquid=1)
 
Int_t GetLiquidVeto () const
 
- Public Member Functions inherited from SHiP::Detector< vetoPoint >
 Detector ()=default
 
 Detector (const char *Name, Bool_t Active, Int_t detID)
 
 Detector (const char *Name, Bool_t Active)
 
 ~Detector () override=default
 
vetoPointAddHit (Args &&... args)
 
void ConstructGeometry () override=0
 
void Initialize () override
 
void Reset () override
 
void EndOfEvent () override
 
void Register () override
 
TClonesArray * GetCollection (Int_t iColl) const override
 
void UpdatePointTrackIndices (const std::map< Int_t, Int_t > &indexMap) override
 Update track indices in point collection after track filtering.
 
void SetSpecialPhysicsCuts () override
 
void FinishPrimary () override
 
void FinishRun () override
 
void BeginPrimary () override
 
void PostTrack () override
 
void PreTrack () override
 
void BeginEvent () override
 
void CopyClones (TClonesArray *cl1, TClonesArray *cl2, Int_t offset) override
 
- Public Member Functions inherited from ISTLPointContainer
virtual void UpdatePointTrackIndices (const std::map< Int_t, Int_t > &indexMap)=0
 Update track indices in point collection after track filtering.
 
virtual ~ISTLPointContainer ()=default
 

Private Member Functions

 veto (const veto &)=delete
 
vetooperator= (const veto &)=delete
 
TGeoVolume * GeoTrapezoid (TString xname, Double_t wz, Double_t wX_start, Double_t wX_end, Double_t wY_start, Double_t wY_end, Int_t color, TGeoMedium *material, Bool_t sens)
 
TGeoVolume * GeoTrapezoidHollow (TString xname, Double_t thick, Double_t wz, Double_t wX_start, Double_t wX_end, Double_t wY_start, Double_t wY_end, Int_t color, TGeoMedium *material, Bool_t sens)
 
void AddBlock (TGeoVolumeAssembly *tInnerWall, TGeoVolumeAssembly *tDecayVacuum, TGeoVolumeAssembly *tOuterWall, TGeoVolumeAssembly *tLongitRib, TGeoVolumeAssembly *tVerticalRib, TGeoVolumeAssembly *ttLiSc, int &liScCounter, int blockNr, int nx, int ny, double z1, double z2, double Zshift, double dist, double wallThick, double liscThick1, double liscThick2, double ribThick)
 
TGeoVolumeAssembly * GeoCornerRib (TString xname, double ribThick, double lt1, double lt2, double dz, double slopeX, double slopeY, Int_t color, TGeoMedium *material, Bool_t sens)
 
int makeId (double z, double x, double y)
 
int liscId (TString ShapeTypeName, int blockNr, int Zlayer, int number, int position)
 
double wx (double z)
 slope along the width (x)
 
double wy (double z)
 slope along the length (y)
 
TGeoVolume * GeoSideObj (TString xname, double dz, double a1, double b1, double a2, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
 
TGeoVolume * GeoCornerLiSc1 (TString xname, double dz, bool isClockwise, double a1, double a2, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
 
TGeoVolume * GeoCornerLiSc2 (TString xname, double dz, bool isClockwise, double a1, double a2, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
 
TGeoVolume * MakeSegments ()
 

Private Attributes

Bool_t fFastMuon
 
Bool_t fFollowMuon
 
Float_t f_InnerSupportThickness
 
Float_t f_OuterSupportThickness
 
Float_t f_LidThickness
 Thickness of the entrance/exit lid of the Decay Volume.
 
Float_t f_VetoThickness
 Thickness of the liquid scintillator along z(Default = 20cm).
 
Float_t f_RibThickness
 
TString vetoMed_name
 medium of veto counter, liquid or plastic scintillator
 
TString supportMedIn_name
 medium of internal support structure(Default = Aluminum).
 
TString supportMedOut_name
 medium of external support structure(Default = Aluminum).
 
TString decayVolumeMed_name
 medium of decay volume(Default= helium).
 
TGeoMedium * vetoMed
 
TGeoMedium * supportMedIn
 
TGeoMedium * supportMedOut
 
TGeoMedium * decayVolumeMed
 
Float_t VetoStartInnerX
 Width of the Vessel along X at the start.
 
Float_t VetoStartInnerY
 Length of the Vessel along Y at the start.
 
Float_t VetoEndInnerX
 Width of the Vessel along X at the end.
 
Float_t VetoEndInnerY
 Length of the Vessel along Y at the end.
 
Float_t zStartDecayVol
 z Position of the Decay Volume start in the global coordinate system
 
Int_t fUseSupport
 
Int_t fLiquidVeto
 Flag option for Liquid Scintillator (Default=True).
 

Additional Inherited Members

- Protected Attributes inherited from SHiP::Detector< vetoPoint >
Int_t fEventID
 
Int_t fTrackID
 event index
 
Int_t fVolumeID
 track index
 
TLorentzVector fPos
 volume id
 
TLorentzVector fMom
 position at entrance
 
Double_t fTime
 momentum at entrance
 
Double_t fLength
 time
 
Double_t fELoss
 length
 
std::vector< vetoPoint > * fDetPoints
 energy loss
 
TGeoVolume * fDetector
 

Detailed Description

Definition at line 29 of file veto.h.

Constructor & Destructor Documentation

◆ veto() [1/2]

veto::veto ( )

Constructor for the Veto class.

Name : Veto Active: kTRUE for active detectors (ProcessHits() will be called) kFALSE for inactive detectors

Initializes the veto detector with the given parameters.

Definition at line 63 of file veto.cxx.

64 : SHiP::Detector<vetoPoint>("Veto", kTRUE, kVETO),
65 fFastMuon(kFALSE),
66 fFollowMuon(kFALSE) {
67 fUseSupport = 1;
68 fLiquidVeto = 1;
69}
@ kVETO
Int_t fUseSupport
Definition: veto.h:126
Bool_t fFollowMuon
Definition: veto.h:89
Bool_t fFastMuon
Definition: veto.h:89
Int_t fLiquidVeto
Flag option for Liquid Scintillator (Default=True).
Definition: veto.h:128

◆ veto() [2/2]

veto::veto ( const veto )
privatedelete

Member Function Documentation

◆ AddBlock()

void veto::AddBlock ( TGeoVolumeAssembly *  tInnerWall,
TGeoVolumeAssembly *  tDecayVacuum,
TGeoVolumeAssembly *  tOuterWall,
TGeoVolumeAssembly *  tLongitRib,
TGeoVolumeAssembly *  tVerticalRib,
TGeoVolumeAssembly *  ttLiSc,
int &  liScCounter,
int  blockNr,
int  nx,
int  ny,
double  z1,
double  z2,
double  Zshift,
double  dist,
double  wallThick,
double  liscThick1,
double  liscThick2,
double  ribThick 
)
private

Adds a custom block of OuterWall+InnerWall+LiSc+Support ribs for a given distance along z. Ensures consistency in implementation throughout the z.

inner wall

decay vacuum

outer wall

define longitudinal ribs

define corner ribs

define & place vertical ribs

place corner ribs

Definition at line 364 of file veto.cxx.

372 {
373 TString blockName = "block";
374 blockName += blockNr;
375
376 int ribColor = 15;
377
378 double wz = (z2 - z1);
379 double slX = (wx(z2) - wx(z1)) / 2 / wz;
380 double slY = (wy(z2) - wy(z1)) / 2 / wz;
381
382 double dZ = (cell_thickness_z - ribThick) / 2; // half space between ribs
383
384 double tX = 0;
385 double tY = 0;
386 double tZ = 0;
387 TString name("");
388
390 TString nameInnerWall = (TString)tInnerWall->GetName() + "_" + blockName;
391 TGeoVolume* TIW =
392 GeoTrapezoidHollow(nameInnerWall, wallThick, wz, wx(z1), wx(z2), wy(z1),
393 wy(z2), ribColor, supportMedIn);
394 tInnerWall->AddNode(TIW, 0, new TGeoTranslation(0, 0, Zshift));
395
397 TString nameDecayVacuum = (TString)tDecayVacuum->GetName() + "_" + blockName;
398 TGeoVolume* TDV = GeoTrapezoid(nameDecayVacuum, wz, wx(z1), wx(z2), wy(z1),
399 wy(z2), 1, decayVolumeMed);
400 TDV->SetVisibility(kFALSE);
401 tDecayVacuum->AddNode(TDV, 0, new TGeoTranslation(0, 0, Zshift));
402
404 TString nameOuterWall = (TString)tOuterWall->GetName() + "_" + blockName;
405 TGeoVolume* TOW = GeoTrapezoidHollow(
406 nameOuterWall, wallThick, wz, wx(z1) + 2 * (wallThick + liscThick1),
407 wx(z2) + 2 * (wallThick + liscThick2),
408 wy(z1) + 2 * (wallThick + liscThick1),
409 wy(z2) + 2 * (wallThick + liscThick2), ribColor, supportMedIn);
410 tOuterWall->AddNode(TOW, 0, new TGeoTranslation(0, 0, Zshift));
411
413
414 std::vector<TGeoVolume*> vLongitRibX(nx);
415 std::vector<TGeoVolume*> vLongitRibY(ny);
416
417 double z1_x_thickness_1 = wx(z1 + ribThick) + 2 * (wallThick + liscThick1);
418 double z1_x_thickness_2 =
419 wx(z1 + cell_thickness_z) + 2 * (wallThick + liscThick1);
420
421 double z1_x1_Step = (z1_x_thickness_1 - nx * ribThick) / (nx + 1);
422 double z1_x2_Step = (z1_x_thickness_2 - nx * ribThick) / (nx + 1);
423
424 double z1_y_thickness_1 = wy(z1 + ribThick) + 2 * (wallThick + liscThick1);
425 double z1_y_thickness_2 =
426 wy(z1 + cell_thickness_z) + 2 * (wallThick + liscThick1);
427
428 double z1_y1_Step = (z1_y_thickness_1 - ny * ribThick) / (ny + 1);
429 double z1_y2_Step = (z1_y_thickness_2 - ny * ribThick) / (ny + 1);
430
431 double z1_x1, z1_x2, z1_y1, z1_y2;
432
433 z1_x1 = z1_x_thickness_1 / 2;
434 z1_x2 = z1_x_thickness_2 / 2;
435
436 z1_y1 = z1_y_thickness_1 / 2 - liscThick1;
437 z1_y2 = z1_y_thickness_2 / 2 - liscThick2;
438
439 for (int i = 0; i < nx; i++) {
440 z1_x1 = z1_x1 - z1_x1_Step;
441 z1_x2 = z1_x2 - z1_x2_Step;
442
443 name = "";
444 name.Form("vLongitRibX_%s_phi%d", blockName.Data(),
445 makeId(0, z1_x1, z1_y1));
446 vLongitRibX.at(i) =
447 GeoSideObj(name, dZ, ribThick, liscThick1, ribThick, liscThick2,
448 z1_x2 - z1_x1, z1_y2 - z1_y1, ribColor, supportMedIn);
449
450 z1_x1 = z1_x1 - ribThick;
451 z1_x2 = z1_x2 - ribThick;
452 }
453
454 z1_y1 = z1_y_thickness_1 / 2;
455 z1_y2 = z1_y_thickness_2 / 2;
456
457 z1_x1 = z1_x_thickness_1 / 2 - liscThick1;
458 z1_x2 = z1_x_thickness_2 / 2 - liscThick2;
459
460 for (int i = 0; i < ny; i++) {
461 z1_y1 = z1_y1 - z1_y1_Step;
462 z1_y2 = z1_y2 - z1_y2_Step;
463
464 name = "";
465 name.Form("vLongitRibY_%s_phi%d", blockName.Data(),
466 makeId(0, z1_x1, z1_y1));
467 vLongitRibY.at(i) =
468 GeoSideObj(name, dZ, liscThick1, ribThick, liscThick2, ribThick,
469 z1_x2 - z1_x1, z1_y2 - z1_y1, ribColor, supportMedIn);
470 z1_y1 = z1_y1 - ribThick;
471 z1_y2 = z1_y2 - ribThick;
472 }
473
475
476 name = "CornerRib_L_" + blockName + "_id";
477 TGeoVolumeAssembly* CornerRib_L =
478 GeoCornerRib(name, ribThick, liscThick1, liscThick2, dZ, slX, slY,
479 ribColor, supportMedIn);
480 name = "CornerRib_R_" + blockName + "_id";
481 TGeoVolumeAssembly* CornerRib_R =
482 GeoCornerRib(name, ribThick, liscThick1, liscThick2, dZ, slY, slX,
483 ribColor, supportMedIn);
484
485 for (double zi = z1; zi < z2; zi += cell_thickness_z) {
486 int Zlayer = static_cast<int>(zi) / cell_thickness_z + 1;
487
489 TString nameVR("");
490 nameVR.Form("VetoVerticalRib_z%d", static_cast<int>(zi));
491 TGeoVolume* TVR = GeoTrapezoidHollow(
492 nameVR, liscThick1, ribThick, wx(zi) + 2 * wallThick,
493 wx(zi + ribThick) + 2 * wallThick, wy(zi) + 2 * wallThick,
494 wy(zi + ribThick) + 2 * wallThick, ribColor, supportMedIn);
495 tZ = Zshift - wz / 2 + zi - z1 + ribThick / 2;
496
497 tVerticalRib->AddNode(TVR, 0, new TGeoTranslation(0, 0, tZ));
498
499 if (z2 - zi < cell_thickness_z) continue;
500
501 tX = wx(zi + ribThick) / 2 + wallThick;
502 tY = wy(zi + ribThick) / 2 + wallThick;
503 tZ = tZ + cell_thickness_z / 2;
504
506 tLongitRib->AddNode(
507 CornerRib_L, makeId(zi, tX, tY),
508 new TGeoCombiTrans(tX, tY, tZ, new TGeoRotation("r", 0, 0, 0)));
509 tLongitRib->AddNode(
510 CornerRib_L, makeId(zi, -tX, -tY),
511 new TGeoCombiTrans(-tX, -tY, tZ, new TGeoRotation("r", 0, 0, 180)));
512 tLongitRib->AddNode(
513 CornerRib_R, makeId(zi, -tX, tY),
514 new TGeoCombiTrans(-tX, tY, tZ, new TGeoRotation("r", 0, 0, 90)));
515 tLongitRib->AddNode(
516 CornerRib_R, makeId(zi, tX, -tY),
517 new TGeoCombiTrans(tX, -tY, tZ, new TGeoRotation("r", 0, 0, 270)));
518
519 double zi_x_thickness_1 = wx(zi + ribThick) + 2 * (wallThick + liscThick1);
520 double zi_x_thickness_2 =
521 wx(zi + cell_thickness_z) + 2 * (wallThick + liscThick1);
522
523 double zi_x1_Step = (zi_x_thickness_1 - nx * ribThick) / (nx + 1);
524 double zi_x2_Step = (zi_x_thickness_2 - nx * ribThick) / (nx + 1);
525
526 double zi_y_thickness_1 = wy(zi + ribThick) + 2 * (wallThick + liscThick1);
527 double zi_y_thickness_2 =
528 wy(zi + cell_thickness_z) + 2 * (wallThick + liscThick1);
529
530 double zi_y1_Step = (zi_y_thickness_1 - ny * ribThick) / (ny + 1);
531 double zi_y2_Step = (zi_y_thickness_2 - ny * ribThick) / (ny + 1);
532
533 double zi_x1, zi_x2, zi_y1, zi_y2;
534
535 zi_x1 = zi_x_thickness_1 / 2 - liscThick1;
536 zi_x2 = zi_x_thickness_2 / 2 - liscThick1;
537
538 zi_y1 = zi_y_thickness_1 / 2;
539 zi_y2 = zi_y_thickness_2 / 2;
540
541 name = "";
542 name.Form("LiSc_S4_%d", liscId("LiSc_S4", blockNr, Zlayer, 0, 0));
543 TGeoVolume* LiSc_S4 = GeoCornerLiSc2(
544 name, dZ, 0, zi_y1_Step - liscThick1, zi_y2_Step - liscThick2,
545 liscThick1, liscThick2, zi_y2_Step - zi_y1_Step, zi_x2 - zi_x1,
546 kMagenta - 10, vetoMed, true);
547 ttLiSc->AddNode(LiSc_S4, liscId("LiSc_S4", blockNr, Zlayer, 0, 1),
548 new TGeoCombiTrans(zi_x1, -(zi_y1 - zi_y1_Step), tZ,
549 new TGeoRotation("r", 0, 0, 0)));
550 ttLiSc->AddNode(LiSc_S4, liscId("LiSc_S4", blockNr, Zlayer, 0, 2),
551 new TGeoCombiTrans(-zi_x1, (zi_y1 - zi_y1_Step), tZ,
552 new TGeoRotation("r", 0, 0, 180)));
553
554 name = "";
555 name.Form("LiSc_S6_%d", liscId("LiSc_S6", blockNr, Zlayer, ny, 0));
556 TGeoVolume* LiSc_S6 = GeoCornerLiSc2(
557 name, dZ, 1, zi_y1_Step - liscThick1, zi_y2_Step - liscThick2,
558 liscThick1, liscThick2, zi_y2_Step - zi_y1_Step, zi_x2 - zi_x1,
559 kMagenta - 10, vetoMed, true);
560 ttLiSc->AddNode(LiSc_S6, liscId("LiSc_S6", blockNr, Zlayer, ny, 1),
561 new TGeoCombiTrans(zi_x1, (zi_y1 - zi_y1_Step), tZ,
562 new TGeoRotation("r", 0, 0, 0)));
563 ttLiSc->AddNode(LiSc_S6, liscId("LiSc_S6", blockNr, Zlayer, ny, 2),
564 new TGeoCombiTrans(-zi_x1, -(zi_y1 - zi_y1_Step), tZ,
565 new TGeoRotation("r", 0, 0, 180)));
566
567 for (int i = 0; i < ny; i++) {
568 zi_y1 = zi_y1 - zi_y1_Step;
569 zi_y2 = zi_y2 - zi_y2_Step;
570
571 tLongitRib->AddNode(vLongitRibY.at(i), makeId(zi, zi_x1, zi_y1),
572 new TGeoCombiTrans(zi_x1, (zi_y1 - ribThick), tZ,
573 new TGeoRotation("r", 0, 0, 0)));
574 tLongitRib->AddNode(vLongitRibY.at(i), makeId(zi, -zi_x1, -zi_y1),
575 new TGeoCombiTrans(-zi_x1, -(zi_y1 - ribThick), tZ,
576 new TGeoRotation("r", 0, 0, 180)));
577
578 if (i > 0) {
579 name = "";
580 name.Form("LiScY_%d", liscId("LiScY", blockNr, Zlayer, i, 0));
581 TGeoVolume* LiScY = GeoSideObj(
582 name, dZ, liscThick1, zi_y1_Step, liscThick2, zi_y2_Step,
583 zi_x2 - zi_x1, zi_y2 - zi_y1, kMagenta - 10, vetoMed, true);
584 ttLiSc->AddNode(LiScY, liscId("LiScY", blockNr, Zlayer, i, 1),
585 new TGeoCombiTrans(zi_x1, zi_y1, tZ,
586 new TGeoRotation("r", 0, 0, 0)));
587 ttLiSc->AddNode(LiScY, liscId("LiScY", blockNr, Zlayer, i, 2),
588 new TGeoCombiTrans(-zi_x1, -zi_y1, tZ,
589 new TGeoRotation("r", 0, 0, 180)));
590 }
591
592 zi_y1 = zi_y1 - ribThick;
593 zi_y2 = zi_y2 - ribThick;
594 }
595
596 zi_x1 = zi_x_thickness_1 / 2;
597 zi_x2 = zi_x_thickness_2 / 2;
598
599 zi_y1 = zi_y_thickness_1 / 2 - liscThick1;
600 zi_y2 = zi_y_thickness_2 / 2 - liscThick1;
601
602 name = "";
603 name.Form("LiSc_S3_%d", liscId("LiSc_S3", blockNr, Zlayer, 0, 0));
604
605 TGeoVolume* LiSc_S3 = GeoCornerLiSc1(
606 name, dZ, 0, zi_x1_Step - liscThick1 - ribThick / sqrt(2),
607 zi_x2_Step - liscThick2 - ribThick / sqrt(2), liscThick1, liscThick2,
608 zi_x2_Step - zi_x1_Step - ribThick / 2, zi_y2 - zi_y1, kMagenta - 10,
609 vetoMed, true);
610 ttLiSc->AddNode(LiSc_S3, liscId("LiSc_S3", blockNr, Zlayer, 0, 1),
611 new TGeoCombiTrans(-(zi_x1 - zi_x1_Step), zi_y1, tZ,
612 new TGeoRotation("r", 0, 0, 0)));
613 ttLiSc->AddNode(LiSc_S3, liscId("LiSc_S3", blockNr, Zlayer, 0, 2),
614 new TGeoCombiTrans((zi_x1 - zi_x1_Step), -zi_y1, tZ,
615 new TGeoRotation("r", 0, 0, 180)));
616
617 name = "";
618 name.Form("LiSc_S5_%d", liscId("LiSc_S5", blockNr, Zlayer, nx, 0));
619
620 TGeoVolume* LiSc_S5 = GeoCornerLiSc1(
621 name, dZ, 1, zi_x1_Step - liscThick1 - ribThick / sqrt(2),
622 zi_x2_Step - liscThick2 - ribThick / sqrt(2), liscThick1, liscThick2,
623 zi_x2_Step - zi_x1_Step - ribThick / 2, zi_y2 - zi_y1, kMagenta - 10,
624 vetoMed, true);
625 ttLiSc->AddNode(LiSc_S5, liscId("LiSc_S5", blockNr, Zlayer, nx, 1),
626 new TGeoCombiTrans((zi_x1 - zi_x1_Step), zi_y1, tZ,
627 new TGeoRotation("r", 0, 0, 0)));
628 ttLiSc->AddNode(LiSc_S5, liscId("LiSc_S5", blockNr, Zlayer, nx, 2),
629 new TGeoCombiTrans(-(zi_x1 - zi_x1_Step), -zi_y1, tZ,
630 new TGeoRotation("r", 0, 0, 180)));
631
632 for (int i = 0; i < nx; i++) {
633 zi_x1 = zi_x1 - zi_x1_Step;
634 zi_x2 = zi_x2 - zi_x2_Step;
635
636 tLongitRib->AddNode(vLongitRibX.at(i), makeId(zi, zi_x1, zi_y1),
637 new TGeoCombiTrans((zi_x1 - ribThick), zi_y1, tZ,
638 new TGeoRotation("r", 0, 0, 0)));
639 tLongitRib->AddNode(vLongitRibX.at(i), makeId(zi, -zi_x1, -zi_y1),
640 new TGeoCombiTrans(-(zi_x1 - ribThick), -zi_y1, tZ,
641 new TGeoRotation("r", 0, 0, 180)));
642
643 if (i > 0) {
644 name = "";
645 name.Form("LiScX_%d", liscId("LiScX", blockNr, Zlayer, i, 0));
646 TGeoVolume* LiScX = GeoSideObj(
647 name, dZ, zi_x1_Step, liscThick1, zi_x2_Step, liscThick2,
648 zi_x2 - zi_x1, zi_y2 - zi_y1, kMagenta - 10, vetoMed, true);
649 ttLiSc->AddNode(LiScX, liscId("LiScX", blockNr, Zlayer, i, 1),
650 new TGeoCombiTrans(zi_x1, zi_y1, tZ,
651 new TGeoRotation("r", 0, 0, 0)));
652 ttLiSc->AddNode(LiScX, liscId("LiScX", blockNr, Zlayer, i, 2),
653 new TGeoCombiTrans(-zi_x1, -zi_y1, tZ,
654 new TGeoRotation("r", 0, 0, 180)));
655 }
656
657 zi_x1 = zi_x1 - ribThick;
658 zi_x2 = zi_x2 - ribThick;
659 }
660 }
661}
TGeoVolume * GeoTrapezoidHollow(TString xname, Double_t thick, Double_t wz, Double_t wX_start, Double_t wX_end, Double_t wY_start, Double_t wY_end, Int_t color, TGeoMedium *material, Bool_t sens)
Definition: veto.cxx:99
int liscId(TString ShapeTypeName, int blockNr, int Zlayer, int number, int position)
Definition: veto.cxx:337
int makeId(double z, double x, double y)
Definition: veto.cxx:323
TGeoMedium * vetoMed
Definition: veto.h:109
TGeoMedium * decayVolumeMed
Definition: veto.h:112
TGeoVolume * GeoCornerLiSc2(TString xname, double dz, bool isClockwise, double a1, double a2, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition: veto.cxx:237
double wy(double z)
slope along the length (y)
Definition: veto.cxx:161
TGeoVolume * GeoSideObj(TString xname, double dz, double a1, double b1, double a2, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition: veto.cxx:171
TGeoVolumeAssembly * GeoCornerRib(TString xname, double ribThick, double lt1, double lt2, double dz, double slopeX, double slopeY, Int_t color, TGeoMedium *material, Bool_t sens)
Definition: veto.cxx:274
TGeoVolume * GeoCornerLiSc1(TString xname, double dz, bool isClockwise, double a1, double a2, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition: veto.cxx:200
TGeoMedium * supportMedIn
Definition: veto.h:110
TGeoVolume * GeoTrapezoid(TString xname, Double_t wz, Double_t wX_start, Double_t wX_end, Double_t wY_start, Double_t wY_end, Int_t color, TGeoMedium *material, Bool_t sens)
Definition: veto.cxx:71
double wx(double z)
slope along the width (x)
Definition: veto.cxx:151
int i
Definition: ShipAna.py:97

◆ ConstructGeometry()

void veto::ConstructGeometry ( )
overridevirtual

Constructs the detector geometry.

Create the detector geometry

This function is responsible for setting up the geometry of the DecayVolume+SBT detector. It is called during the detector's construction phase.

medium of veto counter, liquid or plastic scintillator

medium of support structure, iron, balloon

medium of support structure, aluminium, balloon

Implements SHiP::Detector< vetoPoint >.

Definition at line 823 of file veto.cxx.

823 {
824 TGeoVolume* top = gGeoManager->GetTopVolume();
825
826 ShipGeo::InitMedium("vacuums");
827 ShipGeo::InitMedium("Aluminum");
828 ShipGeo::InitMedium("helium");
829 ShipGeo::InitMedium("Scintillator");
830 ShipGeo::InitMedium("steel");
831
832 gGeoManager->SetNsegments(100);
833
834 vetoMed = gGeoManager->GetMedium(
835 vetoMed_name);
836 supportMedIn = gGeoManager->GetMedium(
838 supportMedOut = gGeoManager->GetMedium(
840 decayVolumeMed = gGeoManager->GetMedium(
841 decayVolumeMed_name); // decay volume, air/helium/vacuum
842 LOG(info) << "veto: Decay Volume medium set as: " << decayVolumeMed_name;
843 TGeoVolume* tDecayVol = new TGeoVolumeAssembly("DecayVolume");
844
845 TGeoVolume* seg = MakeSegments();
846 tDecayVol->AddNode(seg, 1, new TGeoTranslation(0, 0, 0));
847 top->AddNode(tDecayVol, 1, new TGeoTranslation(0, 0, zStartDecayVol)); //));
848
849 // only for fastMuon simulation, otherwise output becomes too big
850 if (fFastMuon && fFollowMuon) {
851 const char* Vol = "TGeoVolume";
852 const char* Cavern = "Cavern";
853 const char* Ain = "AbsorberAdd";
854 const char* Aout = "AbsorberAddCore";
855 TObjArray* volumelist = gGeoManager->GetListOfVolumes();
856 int lastvolume = volumelist->GetLast();
857 int volumeiterator = 0;
858 while (volumeiterator <= lastvolume) {
859 const char* volumename = volumelist->At(volumeiterator)->GetName();
860 const char* classname = volumelist->At(volumeiterator)->ClassName();
861 if (strstr(classname, Vol)) {
862 if (strstr(volumename, Cavern) || strstr(volumename, Ain) ||
863 strstr(volumename, Aout)) {
864 AddSensitiveVolume(gGeoManager->GetVolume(volumename));
865 LOG(info) << "veto: made sensitive for following muons: "
866 << volumename;
867 }
868 }
869 volumeiterator++;
870 }
871 }
872}
TString supportMedIn_name
medium of internal support structure(Default = Aluminum).
Definition: veto.h:103
TString decayVolumeMed_name
medium of decay volume(Default= helium).
Definition: veto.h:107
TGeoMedium * supportMedOut
Definition: veto.h:111
TGeoVolume * MakeSegments()
Definition: veto.cxx:663
Float_t zStartDecayVol
z Position of the Decay Volume start in the global coordinate system
Definition: veto.h:124
TString supportMedOut_name
medium of external support structure(Default = Aluminum).
Definition: veto.h:105
TString vetoMed_name
medium of veto counter, liquid or plastic scintillator
Definition: veto.h:101
Int_t InitMedium(const char *name)
Definition: ShipGeoUtil.h:20

◆ GeoCornerLiSc1()

TGeoVolume * veto::GeoCornerLiSc1 ( TString  xname,
double  dz,
bool  isClockwise,
double  a1,
double  a2,
double  b1,
double  b2,
double  dA,
double  dB,
Int_t  color,
TGeoMedium *  material,
Bool_t  sens = kFALSE 
)
private

Definition of a LiSc cell (Type 1)

Definition at line 200 of file veto.cxx.

203 {
204 TGeoArb8* T1 = new TGeoArb8(dz);
205
206 if (isClockwise) {
207 T1->SetVertex(0, 0, 0);
208 T1->SetVertex(1, 0, b1);
209 T1->SetVertex(2, a1 + b1, b1);
210 T1->SetVertex(3, a1, 0);
211
212 T1->SetVertex(4, dA, dB);
213 T1->SetVertex(5, dA, dB + b2);
214 T1->SetVertex(6, dA + a2 + b2, dB + b2);
215 T1->SetVertex(7, dA + a2, dB);
216 } else {
217 T1->SetVertex(0, 0, 0);
218 T1->SetVertex(1, -a1, 0);
219 T1->SetVertex(2, -(a1 + b1), b1);
220 T1->SetVertex(3, 0, b1);
221
222 T1->SetVertex(4, -dA, dB);
223 T1->SetVertex(5, -(dA + a2), dB);
224 T1->SetVertex(6, -(dA + a2 + b2), dB + b2);
225 T1->SetVertex(7, -dA, dB + b2);
226 }
227
228 TGeoVolume* T = new TGeoVolume(xname, T1, material);
229 T->SetLineColor(color);
230 // and make the volumes sensitive..
231 if (sens) {
232 AddSensitiveVolume(T);
233 }
234 return T;
235}

◆ GeoCornerLiSc2()

TGeoVolume * veto::GeoCornerLiSc2 ( TString  xname,
double  dz,
bool  isClockwise,
double  a1,
double  a2,
double  b1,
double  b2,
double  dA,
double  dB,
Int_t  color,
TGeoMedium *  material,
Bool_t  sens = kFALSE 
)
private

Definition of a LiSc cell (Type 2)

Definition at line 237 of file veto.cxx.

240 {
241 TGeoArb8* T1 = new TGeoArb8(dz);
242
243 if (isClockwise) {
244 T1->SetVertex(0, 0, 0);
245 T1->SetVertex(1, 0, a1);
246 T1->SetVertex(2, b1, a1 + b1);
247 T1->SetVertex(3, b1, 0);
248
249 T1->SetVertex(4, dB, dA);
250 T1->SetVertex(5, dB, dA + a2);
251 T1->SetVertex(6, dB + b2, dA + a2 + b2);
252 T1->SetVertex(7, dB + b2, dA);
253 } else {
254 T1->SetVertex(0, 0, 0);
255 T1->SetVertex(1, b1, 0);
256 T1->SetVertex(2, b1, -(a1 + b1));
257 T1->SetVertex(3, 0, -a1);
258
259 T1->SetVertex(4, dB, -dA);
260 T1->SetVertex(5, dB + b2, -dA);
261 T1->SetVertex(6, dB + b2, -(dA + a2 + b2));
262 T1->SetVertex(7, dB, -(dA + a2));
263 }
264
265 TGeoVolume* T = new TGeoVolume(xname, T1, material);
266 T->SetLineColor(color);
267 // and make the volumes sensitive.
268 if (sens) {
269 AddSensitiveVolume(T);
270 }
271 return T;
272}

◆ GeoCornerRib()

TGeoVolumeAssembly * veto::GeoCornerRib ( TString  xname,
double  ribThick,
double  lt1,
double  lt2,
double  dz,
double  slopeX,
double  slopeY,
Int_t  color,
TGeoMedium *  material,
Bool_t  sens = kFALSE 
)
private

Definition of a Corner Rib Support Structure.

Definition at line 274 of file veto.cxx.

278 {
279 Double_t wz = dz * 2;
280 double d = ribThick * sqrt(2) / 2;
281 double dx = slopeX * wz;
282 double dy = slopeY * wz;
283
284 TGeoArb8* T1 = new TGeoArb8(dz);
285 T1->SetVertex(0, lt1, lt1 - d);
286 T1->SetVertex(1, 0, -d);
287 T1->SetVertex(2, 0, 0);
288 T1->SetVertex(3, lt1, lt1);
289
290 T1->SetVertex(4, dx + lt2, dy + lt2 - d);
291 T1->SetVertex(5, dx, dy - d);
292 T1->SetVertex(6, dx, dy);
293 T1->SetVertex(7, dx + lt2, dy + lt2);
294
295 TGeoArb8* T2 = new TGeoArb8(dz);
296 T2->SetVertex(0, lt1 - d, lt1);
297 T2->SetVertex(1, lt1, lt1);
298 T2->SetVertex(2, 0, 0);
299 T2->SetVertex(3, -d, 0);
300
301 T2->SetVertex(4, dx + lt2 - d, dy + lt2);
302 T2->SetVertex(5, dx + lt2, dy + lt2);
303 T2->SetVertex(6, dx, dy);
304 T2->SetVertex(7, dx - d, dy);
305
306 TGeoVolume* T1v = new TGeoVolume("part", T1, material);
307 TGeoVolume* T2v = new TGeoVolume("part", T2, material);
308 T1v->SetLineColor(color);
309 T2v->SetLineColor(color);
310 if (sens) {
311 AddSensitiveVolume(T1v);
312 }
313 if (sens) {
314 AddSensitiveVolume(T2v);
315 }
316
317 TGeoVolumeAssembly* T = new TGeoVolumeAssembly(xname);
318 T->AddNode(T1v, 1, new TGeoTranslation(0, 0, 0));
319 T->AddNode(T2v, 2, new TGeoTranslation(0, 0, 0));
320 return T;
321}

◆ GeoSideObj()

TGeoVolume * veto::GeoSideObj ( TString  xname,
double  dz,
double  a1,
double  b1,
double  a2,
double  b2,
double  dA,
double  dB,
Int_t  color,
TGeoMedium *  material,
Bool_t  sens = kFALSE 
)
private

Definition of a Rib Support Structure.

Definition at line 171 of file veto.cxx.

174 {
175 // a1- width in X, at the beginning
176 // b1- width in Y, at the beginning
177 // a2- width in X, at the end
178 // b2- width in Y, at the end
179
180 TGeoArb8* T1 = new TGeoArb8(dz);
181 T1->SetVertex(0, 0, 0);
182 T1->SetVertex(1, 0, b1);
183 T1->SetVertex(2, a1, b1);
184 T1->SetVertex(3, a1, 0);
185
186 T1->SetVertex(4, dA, dB);
187 T1->SetVertex(5, dA, dB + b2);
188 T1->SetVertex(6, dA + a2, dB + b2);
189 T1->SetVertex(7, dA + a2, dB);
190
191 TGeoVolume* T = new TGeoVolume(xname, T1, material);
192 T->SetLineColor(color);
193 // and make the volumes sensitive..
194 if (sens) {
195 AddSensitiveVolume(T);
196 }
197 return T;
198}

◆ GeoTrapezoid()

TGeoVolume * veto::GeoTrapezoid ( TString  xname,
Double_t  wz,
Double_t  wX_start,
Double_t  wX_end,
Double_t  wY_start,
Double_t  wY_end,
Int_t  color,
TGeoMedium *  material,
Bool_t  sens = kFALSE 
)
private

Adds a solid Trapezoid of thickness (along z) wz with start cross-section dimensions of wX_start * wY_start and end cross-section dimensions of wX_end *wY_end

Definition at line 71 of file veto.cxx.

75 {
76 Double_t dz = z_thick / 2;
77 Double_t dx1 = x_thick_start / 2 - 1.E-6;
78 Double_t dx2 = x_thick_end / 2 - 1.E-6;
79 Double_t dy1 = y_thick_start / 2 - 1.E-6;
80 Double_t dy2 = y_thick_end / 2 - 1.E-6;
81 TGeoArb8* T1 = new TGeoArb8("T1" + xname, dz + 1.E-6);
82 T1->SetVertex(0, -dx1, -dy1);
83 T1->SetVertex(1, -dx1, dy1);
84 T1->SetVertex(2, dx1, dy1);
85 T1->SetVertex(3, dx1, -dy1);
86 T1->SetVertex(4, -dx2, -dy2);
87 T1->SetVertex(5, -dx2, dy2);
88 T1->SetVertex(6, dx2, dy2);
89 T1->SetVertex(7, dx2, -dy2);
90
91 TGeoVolume* T = new TGeoVolume(xname, T1, material);
92 T->SetLineColor(color);
93 if (sens) {
94 AddSensitiveVolume(T);
95 } // and make the volumes sensitive..
96 return T;
97}

◆ GeoTrapezoidHollow()

TGeoVolume * veto::GeoTrapezoidHollow ( TString  xname,
Double_t  thick,
Double_t  wz,
Double_t  wX_start,
Double_t  wX_end,
Double_t  wY_start,
Double_t  wY_end,
Int_t  color,
TGeoMedium *  material,
Bool_t  sens = kFALSE 
)
private

Adds a Hollow Trapezoid of thickness (along z) wz with start cross-section dimensions of wX_start * wY_start and end cross-section dimensions of wX_end *wY_end. The trapezoid is hollowed out to have a thickness of "thick" cm.

Definition at line 99 of file veto.cxx.

102 {
103 Double_t dx_start = x_thick_start / 2;
104 Double_t dy_start = y_thick_start / 2;
105 Double_t dx_end = x_thick_end / 2;
106 Double_t dy_end = y_thick_end / 2;
107 Double_t dz = z_thick / 2;
108
109 TString nm = xname.ReplaceAll(
110 "-", ""); // otherwise it will try to subtract "-" in TGeoComposteShape
111 Double_t dx1 = dx_start + wallthick;
112 Double_t dx2 = dx_end + wallthick;
113 Double_t dy1 = dy_start + wallthick;
114 Double_t dy2 = dy_end + wallthick;
115
116 TGeoArb8* T2 = new TGeoArb8("T2" + nm, dz);
117 T2->SetVertex(0, -dx1, -dy1);
118 T2->SetVertex(1, -dx1, dy1);
119 T2->SetVertex(2, dx1, dy1);
120 T2->SetVertex(3, dx1, -dy1);
121 T2->SetVertex(4, -dx2, -dy2);
122 T2->SetVertex(5, -dx2, dy2);
123 T2->SetVertex(6, dx2, dy2);
124 T2->SetVertex(7, dx2, -dy2);
125
126 Double_t tdx1 = dx_start;
127 Double_t tdx2 = dx_end;
128 Double_t tdy1 = dy_start;
129 Double_t tdy2 = dy_end;
130 TGeoArb8* T1 = new TGeoArb8("T1" + nm, dz + 1.E-6);
131 T1->SetVertex(0, -tdx1, -tdy1);
132 T1->SetVertex(1, -tdx1, tdy1);
133 T1->SetVertex(2, tdx1, tdy1);
134 T1->SetVertex(3, tdx1, -tdy1);
135 T1->SetVertex(4, -tdx2, -tdy2);
136 T1->SetVertex(5, -tdx2, tdy2);
137 T1->SetVertex(6, tdx2, tdy2);
138 T1->SetVertex(7, tdx2, -tdy2);
139
140 TGeoCompositeShape* T321 =
141 new TGeoCompositeShape("T3" + nm, "T2" + nm + "-T1" + nm);
142 TGeoVolume* T = new TGeoVolume(xname, T321, material);
143 T->SetLineColor(color);
144 // and make the volumes sensitive..
145 if (sens) {
146 AddSensitiveVolume(T);
147 }
148 return T;
149}

◆ GetLiquidVeto()

Int_t veto::GetLiquidVeto ( ) const
inline

Definition at line 82 of file veto.h.

82{ return fLiquidVeto; }

◆ GetUseSupport()

Int_t veto::GetUseSupport ( ) const
inline

Definition at line 79 of file veto.h.

79{ return fUseSupport; }

◆ liscId()

int veto::liscId ( TString  ShapeTypeName,
int  blockNr,
int  Zlayer,
int  number,
int  position 
)
private

Detector ID implementation for the SBT

Definition at line 337 of file veto.cxx.

338 {
339 int id = 999999;
340 int ShapeType = -1;
341
342 if (ShapeTypeName == "LiScX")
343 ShapeType = 1;
344 else if (ShapeTypeName == "LiScY")
345 ShapeType = 2;
346 else if (ShapeTypeName == "LiSc_S3")
347 ShapeType = 3;
348 else if (ShapeTypeName == "LiSc_S4")
349 ShapeType = 4;
350 else if (ShapeTypeName == "LiSc_S5")
351 ShapeType = 5;
352 else if (ShapeTypeName == "LiSc_S6")
353 ShapeType = 6;
354
355 if (ShapeType < 0)
356 id = 999999;
357 else
358 id = ShapeType * 100000 + blockNr * 10000 + Zlayer * 100 + number * 10 +
359 position;
360
361 return id;
362}

◆ makeId()

int veto::makeId ( double  z,
double  x,
double  y 
)
private

Definition of ID for the support structure.

Definition at line 323 of file veto.cxx.

323 {
324 double Z = z / 10;
325 double r = sqrt(x * x + y * y);
326 double phi = 999;
327 if (y >= 0)
328 phi = acos(x / r);
329 else
330 phi = -acos(x / r) + 2 * TMath::Pi();
331
332 phi = phi * 180 / TMath::Pi();
333 return static_cast<int>(Z) * 1000000 + static_cast<int>(r) * 1000 +
334 static_cast<int>(phi);
335}

◆ MakeSegments()

TGeoVolume * veto::MakeSegments ( )
private

Definition at line 663 of file veto.cxx.

663 {
664 TGeoVolumeAssembly* tTankVol = new TGeoVolumeAssembly("T2");
665
666 Double_t cell_thickness_z0 =
667 800 * mm; // length of the first cell along z (800mm) 2024 version
668 Double_t cell_thickness_z =
669 820 * mm; // length of the cell along z (820mm) 2024 version
670
671 TString nameInnerWall = "VetoInnerWall";
672 TGeoVolumeAssembly* tInnerWall = new TGeoVolumeAssembly(nameInnerWall);
673
674 TString nameDecayVacuum = "DecayVacuum";
675 TGeoVolumeAssembly* tDecayVacuum = new TGeoVolumeAssembly(nameDecayVacuum);
676
677 TString nameOuterWall = "VetoOuterWall";
678 TGeoVolumeAssembly* tOuterWall = new TGeoVolumeAssembly(nameOuterWall);
679
680 TString nameLongitRib = "VetoLongitRib";
681 TGeoVolumeAssembly* tLongitRib = new TGeoVolumeAssembly(nameLongitRib);
682
683 TString nameVerticalRib = "VetoVerticalRib";
684 TGeoVolumeAssembly* tVerticalRib = new TGeoVolumeAssembly(nameVerticalRib);
685
686 TString nameLiSc = "VetoLiSc";
687 TGeoVolumeAssembly* ttLiSc = new TGeoVolumeAssembly(nameLiSc);
688 int liScCounter = 0;
689
690 int nx = 2; // number of Longitudinal ribs on X
691 int ny = 3; // number of Longitudinal ribs on Y
692
693 double wallThick = f_InnerSupportThickness;
694 double liscThick = f_VetoThickness;
695 double ribThick = f_RibThickness;
696
697 //******************************** Block1
698 //**************************************
699 double z1 = 0 * m;
700 double z2 = 800 * mm;
701 double wz = (z2 - z1);
702
703 double Zshift = wz / 2; // calibration of Z position
704
705 AddBlock(tInnerWall, tDecayVacuum, tOuterWall, tLongitRib, tVerticalRib,
706 ttLiSc, liScCounter, 1, nx, ny, z1, z2, Zshift, cell_thickness_z0,
707 wallThick, liscThick, liscThick, ribThick);
708
709 //******************************** Block2
710 //**************************************
711
712 Zshift += wz / 2;
713
714 z1 = 800 * mm;
715 z2 = 50.0 * m;
716 wz = (z2 - z1);
717
718 Zshift += wz / 2;
719
720 AddBlock(tInnerWall, tDecayVacuum, tOuterWall, tLongitRib, tVerticalRib,
721 ttLiSc, liScCounter, 2, nx, ny, z1, z2, Zshift, cell_thickness_z,
722 wallThick, liscThick, liscThick, ribThick);
723
724 double zi = z2;
725
726 TString nameVR("");
727 nameVR.Form("VetoVerticalRib_z%d", static_cast<int>(zi));
728 TGeoVolume* TVR = GeoTrapezoidHollow(
729 nameVR, liscThick, ribThick, wx(zi) + 2 * wallThick,
730 wx(zi + ribThick) + 2 * wallThick, wy(zi) + 2 * wallThick,
731 wy(zi + ribThick) + 2 * wallThick, 15, supportMedIn);
732 double tZ = Zshift - wz / 2 + zi - z1 + ribThick / 2;
733
734 tVerticalRib->AddNode(TVR, 0, new TGeoTranslation(0, 0, tZ));
735
736 tTankVol->AddNode(tInnerWall, 0, new TGeoTranslation(0, 0, 0));
737 tTankVol->AddNode(tDecayVacuum, 0, new TGeoTranslation(0, 0, 0));
738 tTankVol->AddNode(tOuterWall, 0, new TGeoTranslation(0, 0, 0));
739 tTankVol->AddNode(tVerticalRib, 0, new TGeoTranslation(0, 0, 0));
740 tTankVol->AddNode(tLongitRib, 0, new TGeoTranslation(0, 0, 0));
741 tTankVol->AddNode(ttLiSc, 0, new TGeoTranslation(0, 0, 0));
742
743 return tTankVol;
744}
Double_t m
Double_t mm
Float_t f_VetoThickness
Thickness of the liquid scintillator along z(Default = 20cm).
Definition: veto.h:97
void AddBlock(TGeoVolumeAssembly *tInnerWall, TGeoVolumeAssembly *tDecayVacuum, TGeoVolumeAssembly *tOuterWall, TGeoVolumeAssembly *tLongitRib, TGeoVolumeAssembly *tVerticalRib, TGeoVolumeAssembly *ttLiSc, int &liScCounter, int blockNr, int nx, int ny, double z1, double z2, double Zshift, double dist, double wallThick, double liscThick1, double liscThick2, double ribThick)
Definition: veto.cxx:364
Float_t f_InnerSupportThickness
Definition: veto.h:91
Float_t f_RibThickness
Definition: veto.h:98

◆ operator=()

veto & veto::operator= ( const veto )
privatedelete

◆ PreTrack()

void veto::PreTrack ( )
override

The following methods can be implemented if you need to make any optional action in your detector during the transport.

Definition at line 806 of file veto.cxx.

806 {
807 if (!fFastMuon) {
808 return;
809 }
810 if (TMath::Abs(gMC->TrackPid()) != 13) {
811 gMC->StopTrack();
812 }
813}

◆ ProcessHits()

Bool_t veto::ProcessHits ( FairVolume *  vol = 0)
override

Processes a hit in the veto detector.

this method is called for each step during simulation (see FairMCApplication::Stepping())

This method is called whenever a hit is registered in the veto detector. It processes the hit information and records the relevant data.

Parameters
xX-coordinate of the hit.
yY-coordinate of the hit.
zZ-coordinate of the hit.
timeTime of the hit.
energyEnergy deposited by the hit.
Returns
True if the hit was processed successfully, false otherwise.

This method is called from the MC stepping

Definition at line 760 of file veto.cxx.

760 {
762 // Set parameters at entrance of volume. Reset ELoss.
763 if (gMC->IsTrackEntering()) {
764 fELoss = 0.;
765 fTime = gMC->TrackTime() * 1.0e09;
766 fLength = gMC->TrackLength();
767 gMC->TrackPosition(fPos);
768 gMC->TrackMomentum(fMom);
769 }
770 // Sum energy loss for all steps in the active volume
771 fELoss += gMC->Edep();
772
773 // Create vetoPoint at exit of active volume
774 if (gMC->IsTrackExiting() || gMC->IsTrackStop() ||
775 gMC->IsTrackDisappeared()) {
776 if (fELoss == 0.) {
777 return kFALSE;
778 }
779
780 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
781 fEventID = gMC->CurrentEvent();
782 Int_t veto_uniqueId;
783 gMC->CurrentVolID(veto_uniqueId);
784 TParticle* p = gMC->GetStack()->GetCurrentTrack();
785 Int_t pdgCode = p->GetPdgCode();
786 TLorentzVector pos;
787 gMC->TrackPosition(pos);
788 TLorentzVector Mom;
789 gMC->TrackMomentum(Mom);
790 Double_t xmean = (fPos.X() + pos.X()) / 2.;
791 Double_t ymean = (fPos.Y() + pos.Y()) / 2.;
792 Double_t zmean = (fPos.Z() + pos.Z()) / 2.;
793 AddHit(fEventID, fTrackID, veto_uniqueId, TVector3(xmean, ymean, zmean),
794 TVector3(fMom.Px(), fMom.Py(), fMom.Pz()), fTime, fLength, fELoss,
795 pdgCode, TVector3(pos.X(), pos.Y(), pos.Z()),
796 TVector3(Mom.Px(), Mom.Py(), Mom.Pz()));
797
798 // Increment number of veto det points in TParticle
799 ShipStack* stack = dynamic_cast<ShipStack*>(gMC->GetStack());
800 stack->AddPoint(kVETO);
801 }
802
803 return kTRUE;
804}
Int_t fTrackID
event index
Definition: Detector.h:85
TLorentzVector fPos
volume id
Definition: Detector.h:87
Double_t fTime
momentum at entrance
Definition: Detector.h:89
Double_t fELoss
length
Definition: Detector.h:91
vetoPoint * AddHit(Args &&... args)
Definition: Detector.h:38
TLorentzVector fMom
position at entrance
Definition: Detector.h:88
ROOT p
Definition: makeDecay.py:76

◆ SetFastMuon()

void veto::SetFastMuon ( )
inline

Definition at line 43 of file veto.h.

43{ fFastMuon = true; } // kill all tracks except of muons

◆ SetFollowMuon()

void veto::SetFollowMuon ( )
inline

Definition at line 44 of file veto.h.

44 {
45 fFollowMuon = true;
46 } // make muon shield active to follow muons

◆ SetLiquidVeto()

void veto::SetLiquidVeto ( Int_t  liquid = 1)
inline

Definition at line 81 of file veto.h.

81{ fLiquidVeto = liquid; }

◆ SetUseSupport()

void veto::SetUseSupport ( Int_t  use = 1)
inline

Definition at line 78 of file veto.h.

78{ fUseSupport = use; }

◆ SetVesselDimensions()

void veto::SetVesselDimensions ( Float_t  x1,
Float_t  x2,
Float_t  y1,
Float_t  y2,
Float_t  vesselstart 
)
inline

Definition at line 47 of file veto.h.

48 {
49 VetoStartInnerX = x1;
50 VetoEndInnerX = x2;
51 VetoStartInnerY = y1;
52 VetoEndInnerY = y2;
53 zStartDecayVol = vesselstart;
54 }
Float_t VetoStartInnerX
Width of the Vessel along X at the start.
Definition: veto.h:115
Float_t VetoEndInnerX
Width of the Vessel along X at the end.
Definition: veto.h:119
Float_t VetoEndInnerY
Length of the Vessel along Y at the end.
Definition: veto.h:121
Float_t VetoStartInnerY
Length of the Vessel along Y at the start.
Definition: veto.h:117

◆ SetVesselStructure()

void veto::SetVesselStructure ( Float_t  a,
Float_t  b,
Float_t  c,
TString  d,
Float_t  l,
TString  e,
TString  f,
TString  v,
Float_t  r 
)
inline

Definition at line 59 of file veto.h.

60 {
66 vetoMed_name = e;
70 }
Float_t f_LidThickness
Thickness of the entrance/exit lid of the Decay Volume.
Definition: veto.h:95
Float_t f_OuterSupportThickness
Definition: veto.h:92
constants c
Definition: hnl.py:115

◆ wx()

double veto::wx ( double  z)
private

slope along the width (x)

Definition at line 151 of file veto.cxx.

151 { // calculate x thickness at z
152
153 double wx1 = VetoStartInnerX;
154 double wx2 = VetoEndInnerX;
155 double z1 = 0 * m;
156 double z2 = 50 * m;
157
158 return (wx1 + (z - z1) * (wx2 - wx1) / (z2 - z1));
159}

◆ wy()

double veto::wy ( double  z)
private

slope along the length (y)

Definition at line 161 of file veto.cxx.

161 { // calculate y thickness at z
162
163 double wy1 = VetoStartInnerY;
164 double wy2 = VetoEndInnerY;
165 double z1 = 0 * m;
166 double z2 = 50 * m;
167
168 return (wy1 + (z - z1) * (wy2 - wy1) / (z2 - z1));
169}

Member Data Documentation

◆ decayVolumeMed

TGeoMedium* veto::decayVolumeMed
private

Definition at line 112 of file veto.h.

◆ decayVolumeMed_name

TString veto::decayVolumeMed_name
private

medium of decay volume(Default= helium).

Definition at line 107 of file veto.h.

◆ f_InnerSupportThickness

Float_t veto::f_InnerSupportThickness
private

Definition at line 91 of file veto.h.

◆ f_LidThickness

Float_t veto::f_LidThickness
private

Thickness of the entrance/exit lid of the Decay Volume.

Definition at line 95 of file veto.h.

◆ f_OuterSupportThickness

Float_t veto::f_OuterSupportThickness
private

Definition at line 92 of file veto.h.

◆ f_RibThickness

Float_t veto::f_RibThickness
private

Definition at line 98 of file veto.h.

◆ f_VetoThickness

Float_t veto::f_VetoThickness
private

Thickness of the liquid scintillator along z(Default = 20cm).

Definition at line 97 of file veto.h.

◆ fFastMuon

Bool_t veto::fFastMuon
private

Track information to be stored until the track leaves the active volume.

Definition at line 89 of file veto.h.

◆ fFollowMuon

Bool_t veto::fFollowMuon
private

Definition at line 89 of file veto.h.

◆ fLiquidVeto

Int_t veto::fLiquidVeto
private

Flag option for Liquid Scintillator (Default=True).

Definition at line 128 of file veto.h.

◆ fUseSupport

Int_t veto::fUseSupport
private

Definition at line 126 of file veto.h.

◆ supportMedIn

TGeoMedium* veto::supportMedIn
private

Definition at line 110 of file veto.h.

◆ supportMedIn_name

TString veto::supportMedIn_name
private

medium of internal support structure(Default = Aluminum).

Definition at line 103 of file veto.h.

◆ supportMedOut

TGeoMedium* veto::supportMedOut
private

Definition at line 111 of file veto.h.

◆ supportMedOut_name

TString veto::supportMedOut_name
private

medium of external support structure(Default = Aluminum).

Definition at line 105 of file veto.h.

◆ VetoEndInnerX

Float_t veto::VetoEndInnerX
private

Width of the Vessel along X at the end.

Definition at line 119 of file veto.h.

◆ VetoEndInnerY

Float_t veto::VetoEndInnerY
private

Length of the Vessel along Y at the end.

Definition at line 121 of file veto.h.

◆ vetoMed

TGeoMedium* veto::vetoMed
private

Definition at line 109 of file veto.h.

◆ vetoMed_name

TString veto::vetoMed_name
private

medium of veto counter, liquid or plastic scintillator

Definition at line 101 of file veto.h.

◆ VetoStartInnerX

Float_t veto::VetoStartInnerX
private

Width of the Vessel along X at the start.

Definition at line 115 of file veto.h.

◆ VetoStartInnerY

Float_t veto::VetoStartInnerY
private

Length of the Vessel along Y at the start.

Definition at line 117 of file veto.h.

◆ zStartDecayVol

Float_t veto::zStartDecayVol
private

z Position of the Decay Volume start in the global coordinate system

Definition at line 124 of file veto.h.


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