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

#include <veto.h>

Inheritance diagram for veto:
[legend]
Collaboration diagram for veto:
[legend]

Public Member Functions

 veto ()
 Constructor for the Veto class.
Bool_t ProcessHits (FairVolume *v=nullptr) 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, Float_t he_balloon_thickness, TString he_balloon_med)
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 () override=default
vetoPoint * AddHit (Args &&... args)
void Initialize () override
void Reset () override
void EndOfEvent () override
void Register () override
TClonesArray * GetCollection (Int_t iColl) const override
void UpdatePointTrackIndices (const std::vector< 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 ~ISTLPointContainer ()=default

Private Member Functions

 veto (const veto &)=delete
veto & operator= (const veto &)=delete
TGeoVolume * make_geo_trapezoid (const 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 add_block (TGeoVolumeAssembly *outer_wall, TGeoVolumeAssembly *longitudinal_rib, TGeoVolumeAssembly *vertical_rib, TGeoVolumeAssembly *lisc, int block_number, int nx, int ny, double z1, double z2, double z_shift, double cell_thickness_z, double wall_thickness, double lisc_thickness_start, double lisc_thickness_end, double rib_thickness)
TGeoVolumeAssembly * GeoCornerRib (const TString &xname, double rib_thickness, 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 (const TString &ShapeTypeName, int block_number, 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 (const 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 (const 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 (const 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 * make_segments ()

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
Float_t f_he_balloon_thickness
 Thickness of the He Balloon.
TString vetoMed_name
 medium of veto counter, liquid or plastic scintillator
TString supportMedIn_name
 medium of internal support structure(Default = Aluminium).
TString supportMedOut_name
 medium of external support structure(Default = Aluminium).
TString decayVolumeMed_name
 medium of decay volume(Default= helium).
TString f_he_balloon_med_name
 medium of He Balloon(Default= PVC).
TGeoMedium * vetoMed
TGeoMedium * supportMedIn
TGeoMedium * supportMedOut
TGeoMedium * decayVolumeMed
TGeoMedium * f_he_balloon_med
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 30 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 64 of file veto.cxx.

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

◆ veto() [2/2]

veto::veto ( const veto & )
privatedelete

Member Function Documentation

◆ add_block()

void veto::add_block ( TGeoVolumeAssembly * outer_wall,
TGeoVolumeAssembly * longitudinal_rib,
TGeoVolumeAssembly * vertical_rib,
TGeoVolumeAssembly * lisc,
int block_number,
int nx,
int ny,
double z1,
double z2,
double z_shift,
double cell_thickness_z,
double wall_thickness,
double lisc_thickness_start,
double lisc_thickness_end,
double rib_thickness )
private

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

outer wall

define longitudinal ribs

define corner ribs

define & place vertical ribs

place corner ribs

Definition at line 367 of file veto.cxx.

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

◆ 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 861 of file veto.cxx.

861 {
862 TGeoVolume* top = gGeoManager->GetTopVolume();
863
869
870 gGeoManager->SetNsegments(100);
871
872 vetoMed = gGeoManager->GetMedium(
873 vetoMed_name);
874 supportMedIn = gGeoManager->GetMedium(
876 supportMedOut = gGeoManager->GetMedium(
878 decayVolumeMed = gGeoManager->GetMedium(
879 decayVolumeMed_name); // decay volume, air/helium/vacuum
881 gGeoManager->GetMedium(f_he_balloon_med_name); // He Balloon medium, pvc
882 LOG(info) << "veto: Decay Volume medium set as: " << decayVolumeMed_name;
883 TGeoVolume* tDecayVol = new TGeoVolumeAssembly("DecayVolume");
884
885 TGeoVolume* seg = make_segments();
886 tDecayVol->AddNode(seg, 1, new TGeoTranslation(0, 0, 0));
887 top->AddNode(tDecayVol, 1, new TGeoTranslation(0, 0, zStartDecayVol)); //));
888
889 // only for fastMuon simulation, otherwise output becomes too big
890 if (fFastMuon && fFollowMuon) {
891 const char* Vol = "TGeoVolume";
892 const char* Cavern = "Cavern";
893 const char* Ain = "AbsorberAdd";
894 const char* Aout = "AbsorberAddCore";
895 TObjArray* volumelist = gGeoManager->GetListOfVolumes();
896 int lastvolume = volumelist->GetLast();
897 int volumeiterator = 0;
898 while (volumeiterator <= lastvolume) {
899 const char* volumename = volumelist->At(volumeiterator)->GetName();
900 const char* classname = volumelist->At(volumeiterator)->ClassName();
901 if (strstr(classname, Vol)) {
902 if (strstr(volumename, Cavern) || strstr(volumename, Ain) ||
903 strstr(volumename, Aout)) {
904 AddSensitiveVolume(gGeoManager->GetVolume(volumename));
905 LOG(info) << "veto: made sensitive for following muons: "
906 << volumename;
907 }
908 }
909 volumeiterator++;
910 }
911 }
912}
TString supportMedIn_name
medium of internal support structure(Default = Aluminium).
Definition veto.h:110
TString decayVolumeMed_name
medium of decay volume(Default= helium).
Definition veto.h:114
TGeoMedium * supportMedOut
Definition veto.h:120
TGeoMedium * decayVolumeMed
Definition veto.h:121
TGeoMedium * f_he_balloon_med
Definition veto.h:122
TGeoVolume * make_segments()
Definition veto.cxx:675
Float_t zStartDecayVol
z Position of the Decay Volume start in the global coordinate system
Definition veto.h:134
TString supportMedOut_name
medium of external support structure(Default = Aluminium).
Definition veto.h:112
TString vetoMed_name
medium of veto counter, liquid or plastic scintillator
Definition veto.h:108
TString f_he_balloon_med_name
medium of He Balloon(Default= PVC).
Definition veto.h:116
Int_t InitMedium(const char *name)
Definition ShipGeoUtil.h:22

◆ GeoCornerLiSc1()

TGeoVolume * veto::GeoCornerLiSc1 ( const 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.

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

◆ GeoCornerLiSc2()

TGeoVolume * veto::GeoCornerLiSc2 ( const 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 238 of file veto.cxx.

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

◆ GeoCornerRib()

TGeoVolumeAssembly * veto::GeoCornerRib ( const TString & xname,
double rib_thickness,
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 276 of file veto.cxx.

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

◆ GeoSideObj()

TGeoVolume * veto::GeoSideObj ( const 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}

◆ 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 87 of file veto.h.

87{ return fLiquidVeto; }

◆ GetUseSupport()

Int_t veto::GetUseSupport ( ) const
inline

Definition at line 84 of file veto.h.

84{ return fUseSupport; }

◆ liscId()

int veto::liscId ( const TString & ShapeTypeName,
int block_number,
int Zlayer,
int number,
int position )
private

Detector ID implementation for the SBT

Definition at line 340 of file veto.cxx.

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

◆ make_geo_trapezoid()

TGeoVolume * veto::make_geo_trapezoid ( const 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 72 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}

◆ make_segments()

TGeoVolume * veto::make_segments ( )
private

inner vessel: decay medium nested in PVC balloon nested in support wall. The vessel is solid; the liner leaves a wall of thickness wall_thickness, the decay medium leaves a balloon skin of thickness f_he_balloon_thickness on all sides (the front/back skin doubles as the balloon lids).

Definition at line 675 of file veto.cxx.

675 {
676 TGeoVolumeAssembly* tTankVol = new TGeoVolumeAssembly("T2");
677
678 Double_t cell_thickness_z0 =
679 800 * mm; // length of the first cell along z (800mm) 2024 version
680 Double_t cell_thickness_z =
681 820 * mm; // length of the cell along z (820mm) 2024 version
682
683 TString nameOuterWall = "VetoOuterWall";
684 TGeoVolumeAssembly* outer_wall = new TGeoVolumeAssembly(nameOuterWall);
685
686 TString nameLongitRib = "VetoLongitRib";
687 TGeoVolumeAssembly* longitudinal_rib = new TGeoVolumeAssembly(nameLongitRib);
688
689 TString nameVerticalRib = "VetoVerticalRib";
690 TGeoVolumeAssembly* vertical_rib = new TGeoVolumeAssembly(nameVerticalRib);
691
692 TString nameLiSc = "VetoLiSc";
693 TGeoVolumeAssembly* lisc = new TGeoVolumeAssembly(nameLiSc);
694
695 int nx = 2; // number of Longitudinal ribs on X
696 int ny = 3; // number of Longitudinal ribs on Y
697
698 double wall_thickness = f_InnerSupportThickness;
699 double lisc_thickness = f_VetoThickness;
700 double rib_thickness = f_RibThickness;
701
702 //******************************** Block1
703 //**************************************
704 double z1 = 0 * m;
705 double z2 = 800 * mm;
706 double wz = (z2 - z1);
707
708 double z_shift = wz / 2; // calibration of Z position
709
710 add_block(outer_wall, longitudinal_rib, vertical_rib, lisc, 1, nx, ny, z1, z2,
711 z_shift, cell_thickness_z0, wall_thickness, lisc_thickness,
712 lisc_thickness, rib_thickness);
713
714 //******************************** Block2
715 //**************************************
716
717 z_shift += wz / 2;
718
719 z1 = 800 * mm;
720 z2 = 50.0 * m;
721 wz = (z2 - z1);
722
723 z_shift += wz / 2;
724
725 add_block(outer_wall, longitudinal_rib, vertical_rib, lisc, 2, nx, ny, z1, z2,
726 z_shift, cell_thickness_z, wall_thickness, lisc_thickness,
727 lisc_thickness, rib_thickness);
728
729 double zi = z2;
730
731 TString nameVR("");
732 nameVR.Form("VetoVerticalRib_z%d", static_cast<int>(zi));
733 TGeoVolume* TVR = GeoTrapezoidHollow(
734 nameVR, lisc_thickness, rib_thickness, wx(zi) + 2 * wall_thickness,
735 wx(zi + rib_thickness) + 2 * wall_thickness, wy(zi) + 2 * wall_thickness,
736 wy(zi + rib_thickness) + 2 * wall_thickness, 15, supportMedIn);
737 double tZ = z_shift - wz / 2 + zi - z1 + rib_thickness / 2;
738
739 vertical_rib->AddNode(TVR, 0, new TGeoTranslation(0, 0, tZ));
740
745 const double z_start = 0 * m;
746 const double z_end = 50 * m;
747 const double balloon_thickness = f_he_balloon_thickness;
748 TGeoVolume* vessel = make_geo_trapezoid(
749 "VetoInnerWall", z_end - z_start, wx(z_start) + 2 * wall_thickness,
750 wx(z_end) + 2 * wall_thickness, wy(z_start) + 2 * wall_thickness,
751 wy(z_end) + 2 * wall_thickness, 15, supportMedIn);
752 TGeoVolume* decay_medium = nullptr;
753 if (balloon_thickness > 0) {
754 TGeoVolume* liner =
755 make_geo_trapezoid("HeBalloon", z_end - z_start, wx(z_start), wx(z_end),
756 wy(z_start), wy(z_end), kGreen, f_he_balloon_med);
757 decay_medium = make_geo_trapezoid(
758 "decay_medium", (z_end - z_start) - 2 * balloon_thickness,
759 wx(z_start + balloon_thickness) - 2 * balloon_thickness,
760 wx(z_end - balloon_thickness) - 2 * balloon_thickness,
761 wy(z_start + balloon_thickness) - 2 * balloon_thickness,
762 wy(z_end - balloon_thickness) - 2 * balloon_thickness, 1,
764 liner->AddNode(decay_medium, 0);
765 vessel->AddNode(liner, 0);
766 } else {
767 decay_medium = make_geo_trapezoid("decay_medium", z_end - z_start,
768 wx(z_start), wx(z_end), wy(z_start),
769 wy(z_end), 1, decayVolumeMed);
770 vessel->AddNode(decay_medium, 0);
771 }
772 decay_medium->SetVisibility(kFALSE);
773 tTankVol->AddNode(vessel, 0,
774 new TGeoTranslation(0, 0, (z_start + z_end) / 2));
775
776 tTankVol->AddNode(outer_wall, 0, new TGeoTranslation(0, 0, 0));
777 tTankVol->AddNode(vertical_rib, 0, new TGeoTranslation(0, 0, 0));
778 tTankVol->AddNode(longitudinal_rib, 0, new TGeoTranslation(0, 0, 0));
779 tTankVol->AddNode(lisc, 0, new TGeoTranslation(0, 0, 0));
780
781 return tTankVol;
782}
constexpr Double_t m
TGeoVolume * make_geo_trapezoid(const 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:72
Float_t f_VetoThickness
Thickness of the liquid scintillator along z(Default = 20cm).
Definition veto.h:102
Float_t f_he_balloon_thickness
Thickness of the He Balloon.
Definition veto.h:105
Float_t f_InnerSupportThickness
Definition veto.h:96
Float_t f_RibThickness
Definition veto.h:103
void add_block(TGeoVolumeAssembly *outer_wall, TGeoVolumeAssembly *longitudinal_rib, TGeoVolumeAssembly *vertical_rib, TGeoVolumeAssembly *lisc, int block_number, int nx, int ny, double z1, double z2, double z_shift, double cell_thickness_z, double wall_thickness, double lisc_thickness_start, double lisc_thickness_end, double rib_thickness)
Definition veto.cxx:367
constexpr double mm
Definition ShipUnit.h:25

◆ makeId()

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

Definition of ID for the support structure.

Definition at line 326 of file veto.cxx.

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

◆ 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 844 of file veto.cxx.

844 {
845 if (!fFastMuon) {
846 return;
847 }
848 if (TMath::Abs(gMC->TrackPid()) != 13) {
849 gMC->StopTrack();
850 }
851}

◆ ProcessHits()

Bool_t veto::ProcessHits ( FairVolume * vol = nullptr)
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 798 of file veto.cxx.

798 {
800 // Set parameters at entrance of volume. Reset ELoss.
801 if (gMC->IsTrackEntering()) {
802 fELoss = 0.;
803 fTime = gMC->TrackTime() * 1.0e09;
804 fLength = gMC->TrackLength();
805 gMC->TrackPosition(fPos);
806 gMC->TrackMomentum(fMom);
807 }
808 // Sum energy loss for all steps in the active volume
809 fELoss += gMC->Edep();
810
811 // Create vetoPoint at exit of active volume
812 if (gMC->IsTrackExiting() || gMC->IsTrackStop() ||
813 gMC->IsTrackDisappeared()) {
814 if (fELoss == 0.) {
815 return kFALSE;
816 }
817
818 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
819 fEventID = gMC->CurrentEvent();
820 Int_t veto_uniqueId;
821 gMC->CurrentVolID(veto_uniqueId);
822 TParticle* p = gMC->GetStack()->GetCurrentTrack();
823 Int_t pdgCode = p->GetPdgCode();
824 TLorentzVector pos;
825 gMC->TrackPosition(pos);
826 TLorentzVector Mom;
827 gMC->TrackMomentum(Mom);
828 Double_t xmean = (fPos.X() + pos.X()) / 2.;
829 Double_t ymean = (fPos.Y() + pos.Y()) / 2.;
830 Double_t zmean = (fPos.Z() + pos.Z()) / 2.;
831 AddHit(fEventID, fTrackID, veto_uniqueId, TVector3(xmean, ymean, zmean),
832 TVector3(fMom.Px(), fMom.Py(), fMom.Pz()), fTime, fLength, fELoss,
833 pdgCode, TVector3(pos.X(), pos.Y(), pos.Z()),
834 TVector3(Mom.Px(), Mom.Py(), Mom.Pz()));
835
836 // Increment number of veto det points in TParticle
837 ShipStack* stack = dynamic_cast<ShipStack*>(gMC->GetStack());
838 stack->AddPoint(kVETO);
839 }
840
841 return kTRUE;
842}
vetoPoint * AddHit(Args &&... args)
Definition Detector.h:38

◆ SetFastMuon()

void veto::SetFastMuon ( )
inline

Definition at line 44 of file veto.h.

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

◆ SetFollowMuon()

void veto::SetFollowMuon ( )
inline

Definition at line 45 of file veto.h.

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

◆ SetLiquidVeto()

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

Definition at line 86 of file veto.h.

86{ fLiquidVeto = liquid; }

◆ SetUseSupport()

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

Definition at line 83 of file veto.h.

83{ 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 48 of file veto.h.

49 {
50 VetoStartInnerX = x1;
51 VetoEndInnerX = x2;
52 VetoStartInnerY = y1;
53 VetoEndInnerY = y2;
54 zStartDecayVol = vesselstart;
55 }
Float_t VetoStartInnerX
Width of the Vessel along X at the start.
Definition veto.h:125
Float_t VetoEndInnerX
Width of the Vessel along X at the end.
Definition veto.h:129
Float_t VetoEndInnerY
Length of the Vessel along Y at the end.
Definition veto.h:131
Float_t VetoStartInnerY
Length of the Vessel along Y at the start.
Definition veto.h:127

◆ 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,
Float_t he_balloon_thickness,
TString he_balloon_med )
inline

Definition at line 60 of file veto.h.

63 {
67 supportMedIn_name = std::move(d);
69 vetoMed_name = std::move(e);
70 supportMedOut_name = std::move(f);
71 decayVolumeMed_name = std::move(v);
73 f_he_balloon_thickness = he_balloon_thickness;
74 f_he_balloon_med_name = std::move(he_balloon_med);
75 }
Float_t f_LidThickness
Thickness of the entrance/exit lid of the Decay Volume.
Definition veto.h:100
Float_t f_OuterSupportThickness
Definition veto.h:97
c
Definition hnl.py:116

◆ 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 121 of file veto.h.

◆ decayVolumeMed_name

TString veto::decayVolumeMed_name
private

medium of decay volume(Default= helium).

Definition at line 114 of file veto.h.

◆ f_he_balloon_med

TGeoMedium* veto::f_he_balloon_med
private

Definition at line 122 of file veto.h.

◆ f_he_balloon_med_name

TString veto::f_he_balloon_med_name
private

medium of He Balloon(Default= PVC).

Definition at line 116 of file veto.h.

◆ f_he_balloon_thickness

Float_t veto::f_he_balloon_thickness
private

Thickness of the He Balloon.

Definition at line 105 of file veto.h.

◆ f_InnerSupportThickness

Float_t veto::f_InnerSupportThickness
private

Definition at line 96 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 100 of file veto.h.

◆ f_OuterSupportThickness

Float_t veto::f_OuterSupportThickness
private

Definition at line 97 of file veto.h.

◆ f_RibThickness

Float_t veto::f_RibThickness
private

Definition at line 103 of file veto.h.

◆ f_VetoThickness

Float_t veto::f_VetoThickness
private

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

Definition at line 102 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 94 of file veto.h.

◆ fFollowMuon

Bool_t veto::fFollowMuon
private

Definition at line 94 of file veto.h.

◆ fLiquidVeto

Int_t veto::fLiquidVeto
private

Flag option for Liquid Scintillator (Default=True).

Definition at line 138 of file veto.h.

◆ fUseSupport

Int_t veto::fUseSupport
private

Definition at line 136 of file veto.h.

◆ supportMedIn

TGeoMedium* veto::supportMedIn
private

Definition at line 119 of file veto.h.

◆ supportMedIn_name

TString veto::supportMedIn_name
private

medium of internal support structure(Default = Aluminium).

Definition at line 110 of file veto.h.

◆ supportMedOut

TGeoMedium* veto::supportMedOut
private

Definition at line 120 of file veto.h.

◆ supportMedOut_name

TString veto::supportMedOut_name
private

medium of external support structure(Default = Aluminium).

Definition at line 112 of file veto.h.

◆ VetoEndInnerX

Float_t veto::VetoEndInnerX
private

Width of the Vessel along X at the end.

Definition at line 129 of file veto.h.

◆ VetoEndInnerY

Float_t veto::VetoEndInnerY
private

Length of the Vessel along Y at the end.

Definition at line 131 of file veto.h.

◆ vetoMed

TGeoMedium* veto::vetoMed
private

Definition at line 118 of file veto.h.

◆ vetoMed_name

TString veto::vetoMed_name
private

medium of veto counter, liquid or plastic scintillator

Definition at line 108 of file veto.h.

◆ VetoStartInnerX

Float_t veto::VetoStartInnerX
private

Width of the Vessel along X at the start.

Definition at line 125 of file veto.h.

◆ VetoStartInnerY

Float_t veto::VetoStartInnerY
private

Length of the Vessel along Y at the start.

Definition at line 127 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 134 of file veto.h.


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