SND@LHC Software
Loading...
Searching...
No Matches
veto Class Reference

#include <veto.h>

Inheritance diagram for veto:
Collaboration diagram for veto:

Public Member Functions

 veto (const char *Name, Bool_t Active)
 
 veto ()
 
virtual ~veto ()
 
virtual void Initialize ()
 
virtual Bool_t ProcessHits (FairVolume *v=0)
 
virtual void Register ()
 
virtual TClonesArray * GetCollection (Int_t iColl) const
 
virtual void Reset ()
 
void SetFastMuon ()
 
void SetFollowMuon ()
 
void ConstructGeometry ()
 
void SetZpositions (Float_t z0, Float_t z1, Float_t z2, Float_t z3, Float_t z4, Int_t c)
 
void SetTubZpositions (Float_t z1, Float_t z2, Float_t z3, Float_t z4, Float_t z5, Float_t z6)
 
void SetTublengths (Float_t l1, Float_t l2, Float_t l3, Float_t l6)
 
void SetB (Float_t b)
 
void SetFloorHeight (Float_t a, Float_t b)
 
void SetXYstart (Float_t b, Float_t fx, Float_t c, Float_t fy)
 
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)
 
vetoPointAddHit (Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t pdgcode, TVector3 Lpos, TVector3 Lmom)
 
virtual void CopyClones (TClonesArray *cl1, TClonesArray *cl2, Int_t offset)
 
virtual void SetSpecialPhysicsCuts ()
 
virtual void EndOfEvent ()
 
virtual void FinishPrimary ()
 
virtual void FinishRun ()
 
virtual void BeginPrimary ()
 
virtual void PostTrack ()
 
virtual void PreTrack ()
 
virtual void BeginEvent ()
 
void SetUseSupport (Int_t use=1)
 
Int_t GetUseSupport () const
 
void SetPlasticVeto (Int_t plastic=1)
 
Int_t GetPlasticVeto () const
 
void SetLiquidVeto (Int_t liquid=1)
 
Int_t GetLiquidVeto () const
 

Private Member Functions

 veto (const veto &)
 
vetooperator= (const veto &)
 
Int_t InitMedium (const char *name)
 
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 * GeoTrapezoidNew (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 distC, 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)
 
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 a, 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 a, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
 
TGeoVolume * MakeSegments (Double_t dz, Double_t dx_start, Double_t dy, Double_t slopex, Double_t slopey, Double_t floorHeight)
 
TGeoVolume * MakeMagnetSegment (Int_t seg)
 
TGeoVolume * MakeLidSegments (Int_t seg, Double_t dx, Double_t dy)
 
Int_t GetCopyNumber (Int_t iz, Int_t iplank, Int_t region)
 Map of copy number to center of tiles.
 
void InnerAddToMap (Int_t ncpy, Double_t x, Double_t y, Double_t z, Double_t dx=-1111, Double_t dy=-1111, Double_t dz=-1111)
 

Private Attributes

Int_t fTrackID
 
Int_t fVolumeID
 track index
 
TLorentzVector fPos
 volume id
 
TLorentzVector fMom
 position at entrance
 
Float_t fTime
 momentum at entrance
 
Float_t fLength
 time
 
Float_t fELoss
 length
 
Float_t fT0z
 energy loss
 
Float_t fT1z
 z-position of veto station
 
Float_t fT2z
 z-position of tracking station 1
 
Float_t fT3z
 z-position of tracking station 2
 
Float_t fT4z
 z-position of tracking station 3
 
Int_t fDesign
 z-position of tracking station 4
 
Bool_t fFastMuon
 1: cylindrical with basic tracking chambers,
 
Bool_t fFollowMuon
 
Float_t fTub1z
 
Float_t fTub2z
 
Float_t fTub3z
 
Float_t fTub4z
 
Float_t fTub5z
 
Float_t fTub6z
 
Float_t fTub1length
 
Float_t fTub2length
 
Float_t fTub3length
 
Float_t fTub6length
 
Float_t f_InnerSupportThickness
 
Float_t f_PhiRibsThickness
 
Float_t f_OuterSupportThickness
 
Float_t f_LidThickness
 
Float_t f_VetoThickness
 
Float_t f_RibThickness
 
Float_t fBtube
 
Float_t ws
 
TString vetoMed_name
 
TString supportMedIn_name
 medium of veto counter, liquid or plastic scintillator
 
TString supportMedOut_name
 medium of support structure, iron, balloon
 
TString decayVolumeMed_name
 medium of support structure, aluminium, balloon
 
TGeoMedium * vetoMed
 medium of decay volume, vacuum/air/helium
 
TGeoMedium * supportMedIn
 
TGeoMedium * supportMedOut
 
TGeoMedium * decayVolumeMed
 
Float_t fXstart
 
Float_t fYstart
 
Float_t zFocusX
 
Float_t zFocusY
 
Float_t floorHeightA
 
Float_t floorHeightB
 
Int_t fUseSupport
 
Int_t fPlasticVeto
 
Int_t fLiquidVeto
 
TClonesArray * fvetoPointCollection
 
Int_t fDeltaCpy
 
std::map< Int_t, TVector3 > fCenters
 

Detailed Description

Definition at line 15 of file veto.h.

Constructor & Destructor Documentation

◆ veto() [1/3]

veto::veto ( const char *  Name,
Bool_t  Active 
)

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

Definition at line 61 of file veto.cxx.

62 : FairDetector(name, active, kVETO),
63 fTrackID(-1),
64 fVolumeID(-1),
65 fPos(),
66 fMom(),
67 fTime(-1.),
68 fLength(-1.),
69 fELoss(-1),
70 fFastMuon(kFALSE),
71 fFollowMuon(kFALSE),
72 fT0z(-2390.),
73 fT1z(1510.),
74 fT2z(1710.),
75 fT3z(2150.),
76 fT4z(2370.),
79 f_LidThickness(80.*mm),
81 f_VetoThickness(0.3*m),
82 zFocusX(-80*m),
83 zFocusY(-80*m),
84 ws(0.5*m),
85 fXstart(1.5*m),
86 fYstart(1.5*m),
87 fvetoPointCollection(new TClonesArray("vetoPoint")),
88 vetoMed_name("Scintillator"), // for liquid scintillator
89 supportMedIn_name("steel"), // for vacuum option
90 supportMedOut_name("Aluminum"), // for vacuum option
91 f_RibThickness(3.*cm),
92 decayVolumeMed_name("vacuums") // for vacuum option
93{
97}
Double_t m
Double_t mm
@ kVETO
TClonesArray * fvetoPointCollection
Definition veto.h:155
TString supportMedIn_name
medium of veto counter, liquid or plastic scintillator
Definition veto.h:139
Float_t fT4z
z-position of tracking station 3
Definition veto.h:113
Float_t ws
Definition veto.h:137
TString decayVolumeMed_name
medium of support structure, aluminium, balloon
Definition veto.h:141
Int_t fUseSupport
Definition veto.h:151
Float_t fYstart
Definition veto.h:147
Bool_t fFollowMuon
Definition veto.h:119
Float_t zFocusX
Definition veto.h:148
Int_t fVolumeID
track index
Definition veto.h:103
Float_t fT0z
energy loss
Definition veto.h:109
Float_t fTime
momentum at entrance
Definition veto.h:106
TLorentzVector fMom
position at entrance
Definition veto.h:105
Float_t f_LidThickness
Definition veto.h:133
Float_t f_OuterSupportThickness
Definition veto.h:132
Float_t fT3z
z-position of tracking station 2
Definition veto.h:112
Float_t f_VetoThickness
Definition veto.h:134
Float_t zFocusY
Definition veto.h:148
Int_t fTrackID
Definition veto.h:102
Float_t fELoss
length
Definition veto.h:108
TString supportMedOut_name
medium of support structure, iron, balloon
Definition veto.h:140
Float_t fXstart
Definition veto.h:147
Bool_t fFastMuon
1: cylindrical with basic tracking chambers,
Definition veto.h:119
Float_t f_InnerSupportThickness
Definition veto.h:130
TString vetoMed_name
Definition veto.h:138
TLorentzVector fPos
volume id
Definition veto.h:104
Float_t f_RibThickness
Definition veto.h:135
Float_t fLength
time
Definition veto.h:107
Float_t fT2z
z-position of tracking station 1
Definition veto.h:111
Int_t fPlasticVeto
Definition veto.h:152
Float_t fT1z
z-position of veto station
Definition veto.h:110
Float_t f_PhiRibsThickness
Definition veto.h:131
Int_t fLiquidVeto
Definition veto.h:153

◆ veto() [2/3]

veto::veto ( )

default constructor

Definition at line 45 of file veto.cxx.

46 : FairDetector("veto", kTRUE, kVETO),
47 fTrackID(-1),
48 fVolumeID(-1),
49 fPos(),
50 fMom(),
51 fTime(-1.),
52 fLength(-1.),
53 fELoss(-1),
54 fvetoPointCollection(new TClonesArray("vetoPoint"))
55{
59}

◆ ~veto()

veto::~veto ( )
virtual

destructor

Definition at line 99 of file veto.cxx.

100{
102 fvetoPointCollection->Delete();
104 }
105}

◆ veto() [3/3]

veto::veto ( const veto )
private

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  distC,
double  wallThick,
double  liscThick1,
double  liscThick2,
double  ribThick 
)
private

Definition at line 435 of file veto.cxx.

438 {
439
440 TString blockName = "block";
441 blockName+=blockNr;
442
443 int ribColor=15;
444
445 double wz=(z2-z1);
446 double slX=(wx(z2)-wx(z1))/2/wz;
447 double slY=(wy(z2)-wy(z1))/2/wz;
448
449 double dZ = (dist-ribThick)/2; //half space between ribs
450
451
452 double tX=0;
453 double tY=0;
454 double tZ=0;
455 TString name("");
456
457 double idX=0;
458 double idY=0;
459 double idZ=0;
460
461
462 //inner wall
463 TString nameInnerWall = (TString)tInnerWall->GetName()+"_"+blockName;
464 TGeoVolume* TIW = GeoTrapezoidNew(nameInnerWall,wallThick,wz,wx(z1),wx(z2),wy(z1),wy(z2),ribColor,supportMedIn);
465 tInnerWall->AddNode(TIW,0, new TGeoTranslation(0, 0,Zshift ));
466
467 //decay vacuum
468 TString nameDecayVacuum = (TString)tDecayVacuum->GetName()+"_"+blockName;
469 TGeoVolume* TDV = GeoTrapezoid(nameDecayVacuum,wz,wx(z1),wx(z2),wy(z1),wy(z2),1,decayVolumeMed);
470 TDV->SetVisibility(kFALSE);
471 tDecayVacuum->AddNode(TDV,0, new TGeoTranslation(0, 0,Zshift ));
472
473
474 //outer wall
475 TString nameOuterWall = (TString)tOuterWall->GetName()+"_"+blockName;
476 TGeoVolume* TOW = GeoTrapezoidNew(nameOuterWall,wallThick,wz,
477 wx(z1)+2*(wallThick+liscThick1),wx(z2)+2*(wallThick+liscThick2),wy(z1)+2*(wallThick+liscThick1),wy(z2)+2*(wallThick+liscThick2),ribColor,supportMedIn);
478 tOuterWall->AddNode(TOW, 0 , new TGeoTranslation(0, 0,Zshift));
479
480
481 //vertical ribs, longitudinal, and lisc:
482 //corner ribs
483 name="CornerRib_L_"+blockName+"_id";
484 TGeoVolumeAssembly* CornerRib_L = GeoCornerRib(name,ribThick, liscThick1,liscThick2,dZ, slX,slY, ribColor ,supportMedIn);
485 name="CornerRib_R_"+blockName+"_id";
486 TGeoVolumeAssembly* CornerRib_R = GeoCornerRib(name,ribThick, liscThick1,liscThick2,dZ, slY,slX, ribColor ,supportMedIn);
487
488 std::vector<TGeoVolume*> vLongitRibX(nx);
489 std::vector<TGeoVolume*> vLongitRibY(ny);
490 double xStep1=(wx(z1+ribThick)+2*wallThick-2*distC)/(nx-1);//rib thiknes + lisc size
491 double xStep2=(wx(z1+dist)+2*wallThick-2*distC)/(nx-1);
492 double yStep1=(wy(z1+ribThick)+2*wallThick-2*distC)/(ny-1);
493 double yStep2=(wy(z1+dist)+2*wallThick-2*distC)/(ny-1);
494 for(int i=0;i<nx;i++){
495 double xpos1=wx(z1+ribThick)/2+wallThick-distC-ribThick/2-i*xStep1;
496 double xpos2=wx(z1+dist)/2+wallThick-distC-ribThick/2-i*xStep2;
497 double ypos1=wy(z1+ribThick)/2+wallThick;
498 double ypos2=wy(z1+dist)/2+wallThick;
499 name=""; name.Form("vLongitRibX_%s_phi%d",blockName.Data(),makeId(0,xpos1,ypos1));
500 vLongitRibX.at(i) = GeoSideObj(name, dZ,ribThick, liscThick1,ribThick, liscThick2,xpos2-xpos1, ypos2-ypos1,ribColor, supportMedIn);
501 }
502 for(int i=0;i<ny;i++){
503 double xpos1=wx(z1+ribThick)/2+wallThick;
504 double xpos2=wx(z1+dist)/2+wallThick;
505 double ypos1=wy(z1+ribThick)/2+wallThick-distC-ribThick/2-i*yStep1;
506 double ypos2=wy(z1+dist)/2+wallThick-distC-ribThick/2-i*yStep2;
507 name=""; name.Form("vLongitRibX_%s_phi%d",blockName.Data(),makeId(0,xpos1,ypos1));
508 vLongitRibY.at(i) = GeoSideObj(name, dZ, liscThick1,ribThick, liscThick2,ribThick, xpos2-xpos1, ypos2-ypos1,ribColor, supportMedIn);
509 }
510
511 //corners lisc
512 double xPos1=wx(z1+ribThick)/2+wallThick-distC+ribThick/2;
513 double xPos2=wx(z1+dist)/2+wallThick-distC+ribThick/2;
514 double yPos1=wy(z1+ribThick)/2+wallThick;
515 double yPos2=wy(z1+dist)/2+wallThick;
516 name=""; name.Form("LiSc_L1_%d",liscId("LiSc_L1",blockNr,0,0,0));
517 TGeoVolume* LiSc_L1 = GeoCornerLiSc1(name,dZ,1,distC-ribThick/sqrt(2)-ribThick/2, liscThick1,liscThick2, xPos2-xPos1, yPos2-yPos1, kMagenta-10 ,vetoMed,true);
518 name=""; name.Form("LiSc_R1_%d",liscId("LiSc_R1",blockNr,0,0,0));
519 TGeoVolume* LiSc_R1 = GeoCornerLiSc1(name,dZ,0,distC-ribThick/sqrt(2)-ribThick/2, liscThick1,liscThick2, xPos2-xPos1, yPos2-yPos1, kMagenta-10 ,vetoMed,true);
520 xPos1=wx(z1+ribThick)/2+wallThick;
521 xPos2=wx(z1+dist)/2+wallThick;
522 yPos1=wy(z1+ribThick)/2+wallThick-distC+ribThick/2;
523 yPos2=wy(z1+dist)/2+wallThick-distC+ribThick/2;
524 name=""; name.Form("LiSc_L2_%d",liscId("LiSc_L2",blockNr,0,0,0));
525 TGeoVolume* LiSc_L2 = GeoCornerLiSc2(name,dZ,1,distC-ribThick/sqrt(2)-ribThick/2, liscThick1,liscThick2, xPos2-xPos1, yPos2-yPos1, kMagenta-10 ,vetoMed,true);
526 name=""; name.Form("LiSc_R2_%d",liscId("LiSc_R2",blockNr,0,0,0));
527 TGeoVolume* LiSc_R2 = GeoCornerLiSc2(name,dZ,0,distC-ribThick/sqrt(2)-ribThick/2, liscThick1,liscThick2, xPos2-xPos1, yPos2-yPos1, kMagenta-10 ,vetoMed,true);
528
529 for(double pos=z1;pos<z2;pos+=dist){
530 int Zlayer = (int)pos/dist+1;
531
532 //place vertical ribs
533 TString nameVR(""); nameVR.Form("VetoVerticalRib_z%d",(int)pos);
534 TGeoVolume* TVR = GeoTrapezoidNew(nameVR,liscThick1,
535 ribThick,wx(pos)+2*wallThick,wx(pos+ribThick)+2*wallThick,wy(pos)+2*wallThick,wy(pos+ribThick)+2*wallThick,ribColor,supportMedIn);
536 tZ=Zshift-wz/2+pos-z1+ribThick/2;
537 tVerticalRib->AddNode(TVR,0, new TGeoTranslation(0, 0,tZ ));
538 if(z2-pos<dist)continue;
539
540 //place longitudinal ribs in the corners
541 tX=wx(pos+ribThick)/2+wallThick;
542 tY=wy(pos+ribThick)/2+wallThick ;
543 tZ=tZ+ribThick/2+(dist-ribThick)/2;
544 tLongitRib->AddNode(CornerRib_L, makeId(pos,tX,tY) , new TGeoCombiTrans(tX,tY,tZ,new TGeoRotation("r",0,0,0)));
545 tLongitRib->AddNode(CornerRib_L, makeId(pos,-tX,-tY) , new TGeoCombiTrans(-tX,-tY,tZ,new TGeoRotation("r",0,0,180)));
546 tLongitRib->AddNode(CornerRib_R, makeId(pos,-tX,tY) , new TGeoCombiTrans(-tX,tY,tZ,new TGeoRotation("r",0,0,90)));
547 tLongitRib->AddNode(CornerRib_R, makeId(pos,tX,-tY) , new TGeoCombiTrans(tX,-tY,tZ,new TGeoRotation("r",0,0,270)));
548
549 //place longitudinal ribs and lisc on the sides
550 idZ = pos+ribThick/2+dist/2;
551
552 //x side
553 double xStepZ1=(wx(pos+ribThick)+2*wallThick-2*distC)/(nx-1);
554 double xStepZ2=(wx(pos+dist)+2*wallThick-2*distC)/(nx-1);
555 for(int i=0;i<nx;i++){
556
557 double xpos1=wx(pos+ribThick)/2+wallThick-distC-ribThick/2-i*xStepZ1;
558 double ypos1=wy(pos+ribThick)/2+wallThick;
559 tLongitRib->AddNode(vLongitRibX.at(i), makeId(pos,xpos1,ypos1) , new TGeoCombiTrans(xpos1,ypos1,tZ,new TGeoRotation("r",0,0,0)));
560 tLongitRib->AddNode(vLongitRibX.at(i), makeId(pos,-xpos1,-ypos1) , new TGeoCombiTrans(-xpos1,-ypos1,tZ,new TGeoRotation("r",0,0,180)));
561 //lisc
562 if(i<nx-1){
563 double xpos2=wx(pos+dist)/2+wallThick-distC-ribThick/2-i*xStepZ2;
564 double ypos2=wy(pos+dist)/2+wallThick;
565 name=""; name.Form("LiScX_%d",liscId("LiScX",blockNr,Zlayer,i,0));
566 TGeoVolume* LiScX = GeoSideObj(name, dZ,xStepZ1-ribThick, liscThick1,xStepZ2-ribThick, liscThick2,
567 (xpos2-xStepZ2)-(xpos1-xStepZ1), ypos2-ypos1,kMagenta-10,vetoMed,true);
568
569 ttLiSc->AddNode(LiScX, liscId("LiScX",blockNr,Zlayer,i,1) , new TGeoCombiTrans(xpos1-xStepZ1+ribThick,ypos1,tZ,new TGeoRotation("r",0,0,0)));
570 ttLiSc->AddNode(LiScX, liscId("LiScX",blockNr,Zlayer,i,2) , new TGeoCombiTrans(-(xpos1-xStepZ1+ribThick),-ypos1,tZ,new TGeoRotation("r",0,0,180)));
571 }
572 }
573
574
575 //y side
576 double yStepZ1=(wy(pos+ribThick)+2*wallThick-2*distC)/(ny-1);
577 double yStepZ2=(wy(pos+dist)+2*wallThick-2*distC)/(ny-1);
578 for(int i=0;i<ny;i++){
579 double xpos1=wx(pos+ribThick)/2+wallThick;
580 double ypos1=wy(pos+ribThick)/2+wallThick-distC-ribThick/2-i*yStepZ1;
581 tLongitRib->AddNode(vLongitRibY.at(i), makeId(pos,xpos1,ypos1) , new TGeoCombiTrans(xpos1,ypos1,tZ,new TGeoRotation("r",0,0,0)));
582 tLongitRib->AddNode(vLongitRibY.at(i), makeId(pos,-xpos1,-ypos1) , new TGeoCombiTrans(-xpos1,-ypos1,tZ,new TGeoRotation("r",0,0,180)));
583 //lisc
584 if(i<ny-1){
585 double xpos2=wx(pos+dist)/2+wallThick;
586 double ypos2=wy(pos+dist)/2+wallThick-distC-ribThick/2-i*yStepZ2;
587 name=""; name.Form("LiScY_%d",liscId("LiScY",blockNr,Zlayer,i,0));
588 TGeoVolume* LiScY = GeoSideObj(name, dZ,liscThick1, yStepZ1-ribThick, liscThick2, yStepZ2-ribThick,
589 xpos2-xpos1, (ypos2-yStepZ2)-(ypos1-yStepZ1), kMagenta-10,vetoMed,true);
590
591
592 ttLiSc->AddNode(LiScY, liscId("LiScY",blockNr,Zlayer,i,1), new TGeoCombiTrans( xpos1, ypos1-yStepZ1+ribThick,tZ,new TGeoRotation("r",0,0,0)));
593 ttLiSc->AddNode(LiScY, liscId("LiScY",blockNr,Zlayer,i,2), new TGeoCombiTrans(-xpos1,-(ypos1-yStepZ1+ribThick),tZ,new TGeoRotation("r",0,0,180)));
594 }
595
596 }
597
598
599 //place lisc in the corners
600 double xP1=wx(pos+ribThick)/2+wallThick-distC+ribThick/2;
601 double yP1=wy(pos+ribThick)/2+wallThick;
602
603 ttLiSc->AddNode(LiSc_L1, liscId("LiSc_L1",blockNr,Zlayer,0,1) , new TGeoCombiTrans(xP1,yP1,tZ,new TGeoRotation("r",0,0,0)));
604 ttLiSc->AddNode(LiSc_L1, liscId("LiSc_L1",blockNr,Zlayer,0,2) , new TGeoCombiTrans(-xP1,-yP1,tZ,new TGeoRotation("r",0,0,180)));
605
606 ttLiSc->AddNode(LiSc_R1, liscId("LiSc_R1",blockNr,Zlayer,0,1) , new TGeoCombiTrans(-xP1,yP1,tZ,new TGeoRotation("r",0,0,0)));
607 ttLiSc->AddNode(LiSc_R1, liscId("LiSc_R1",blockNr,Zlayer,0,2) , new TGeoCombiTrans(xP1,-yP1,tZ,new TGeoRotation("r",0,0,180)));
608
609 xP1=wx(pos+ribThick)/2+wallThick;
610 yP1=wy(pos+ribThick)/2+wallThick-distC+ribThick/2;
611 ttLiSc->AddNode(LiSc_L2, liscId("LiSc_L2",blockNr,Zlayer,0,1) , new TGeoCombiTrans(xP1,yP1,tZ,new TGeoRotation("r",0,0,0)));
612 ttLiSc->AddNode(LiSc_L2, liscId("LiSc_L2",blockNr,Zlayer,0,2) , new TGeoCombiTrans(-xP1,-yP1,tZ,new TGeoRotation("r",0,0,180)));
613
614 ttLiSc->AddNode(LiSc_R2, liscId("LiSc_R2",blockNr,Zlayer,0,1) , new TGeoCombiTrans(xP1,-yP1,tZ,new TGeoRotation("r",0,0,0)));
615 ttLiSc->AddNode(LiSc_R2, liscId("LiSc_R2",blockNr,Zlayer,0,2) , new TGeoCombiTrans(-xP1,yP1,tZ,new TGeoRotation("r",0,0,180)));
616
617 }
618
619
620}
TGeoVolume * GeoCornerLiSc2(TString xname, double dz, bool isClockwise, double a, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:320
int liscId(TString ShapeTypeName, int blockNr, int Zlayer, int number, int position)
Definition veto.cxx:417
TGeoVolume * GeoTrapezoidNew(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:139
int makeId(double z, double x, double y)
Definition veto.cxx:406
TGeoVolume * GeoCornerLiSc1(TString xname, double dz, bool isClockwise, double a, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:283
TGeoMedium * vetoMed
medium of decay volume, vacuum/air/helium
Definition veto.h:142
TGeoMedium * decayVolumeMed
Definition veto.h:145
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:253
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:358
TGeoMedium * supportMedIn
Definition veto.h:143
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:114
int i
Definition ShipAna.py:86
double wx(double z)
Definition veto.cxx:184
double wy(double z)
Definition veto.cxx:218

◆ AddHit()

vetoPoint * veto::AddHit ( Int_t  trackID,
Int_t  detID,
TVector3  pos,
TVector3  mom,
Double_t  time,
Double_t  length,
Double_t  eLoss,
Int_t  pdgcode,
TVector3  Lpos,
TVector3  Lmom 
)

This method is an example of how to add your own point of type vetoPoint to the clones array

Definition at line 1266 of file veto.cxx.

1270{
1271 TClonesArray& clref = *fvetoPointCollection;
1272 Int_t size = clref.GetEntriesFast();
1273 // cout << "veto hit called "<< pos.z()<<endl;
1274 return new(clref[size]) vetoPoint(trackID, detID, pos, mom,
1275 time, length, eLoss, pdgCode,Lpos,Lmom);
1276}

◆ BeginEvent()

virtual void veto::BeginEvent ( )
inlinevirtual

Definition at line 86 of file veto.h.

86{;}

◆ BeginPrimary()

virtual void veto::BeginPrimary ( )
inlinevirtual

Definition at line 83 of file veto.h.

83{;}

◆ ConstructGeometry()

void veto::ConstructGeometry ( )

Create the detector geometry

medium of veto counter, liquid or plastic scintillator

medium of support structure, iron, balloon

medium of support structure, aluminium, balloon

Definition at line 1159 of file veto.cxx.

1160{
1161 /* decay tube, veto detectors and tracking detectors are closely related
1162 therefore, incorporate here the previously external defined ShipChamber
1163 and make the walls sensitive
1164 */
1166
1167 TGeoVolume *top=gGeoManager->GetTopVolume();
1168 InitMedium("Concrete");
1169 TGeoMedium *concrete =gGeoManager->GetMedium("Concrete");
1170 InitMedium("steel");
1171 TGeoMedium *polypropylene = gGeoManager->GetMedium("polypropylene");
1172 InitMedium("polypropylene");
1173 TGeoMedium *St =gGeoManager->GetMedium("steel");
1174 InitMedium("vacuums");
1175 TGeoMedium *vac =gGeoManager->GetMedium("vacuums");
1176 InitMedium("Aluminum");
1177 TGeoMedium *Al =gGeoManager->GetMedium("Aluminum");
1178 InitMedium("ShipSens");
1179 TGeoMedium *Sens =gGeoManager->GetMedium("ShipSens");
1180 InitMedium("Scintillator");
1181 TGeoMedium *Se =gGeoManager->GetMedium("Scintillator");
1182 gGeoManager->SetNsegments(100);
1183 vetoMed = gGeoManager->GetMedium(vetoMed_name);
1184 supportMedIn = gGeoManager->GetMedium(supportMedIn_name);
1185 supportMedOut = gGeoManager->GetMedium(supportMedOut_name);
1186 decayVolumeMed = gGeoManager->GetMedium(decayVolumeMed_name); // decay volume, air/helium/vacuum
1187 // put everything in an assembly
1188 TGeoVolume *tDecayVol = new TGeoVolumeAssembly("DecayVolume");
1189 TGeoVolume *tMaGVol = new TGeoVolumeAssembly("MagVolume");
1190 Double_t zStartDecayVol = fTub1z-fTub1length-f_InnerSupportThickness;
1191 Double_t zStartMagVol = fTub3z+fTub3length-f_InnerSupportThickness; //? is this needed, -f_InnerSupportThickness
1192
1194 Double_t slopex = (2.5*m + d)/(fTub6z-fTub6length - zFocusX);
1195 Double_t slopey = (fBtube + d) /(fTub6z-fTub6length - zFocusY);
1197 Double_t dx1 = slopex*(zpos - zFocusX);
1198 Double_t dy = slopey*(zpos - zFocusY);
1199 // make the entrance window
1200 // add floor:
1201 Double_t Length = zStartMagVol - zStartDecayVol - 2.2*m;
1202 TGeoBBox *box = new TGeoBBox("box1", 10 * m, floorHeightA/2., Length/2.);
1203 TGeoVolume *floor = new TGeoVolume("floor1",box,concrete);
1204 floor->SetLineColor(11);
1205 tDecayVol->AddNode(floor, 0, new TGeoTranslation(0, -10*m+floorHeightA/2.,Length/2.));
1206 //entrance lid
1207 TGeoVolume* T1Lid = MakeLidSegments(1,dx1,dy);
1208 tDecayVol->AddNode(T1Lid, 1, new TGeoTranslation(0, 0, zpos - zStartDecayVol+f_LidThickness/2.1));
1209
1210 //without segment1, recalculate the z and (half)length of segment 2:
1211 //Take into account to remove the between seg1 and seg2 due to straw-veto station.
1212 //and add this gap to the total length.
1213 Double_t tgap=fTub2z-fTub1z-fTub2length-fTub1length;
1214 fTub2z=fTub1z+fTub2length+tgap/2.;
1216 TGeoVolume* seg2 = MakeSegments(fTub2length,dx1,dy,slopex,slopey,floorHeightA);
1217 tDecayVol->AddNode(seg2, 1, new TGeoTranslation(0, 0, fTub2z-zStartDecayVol));
1219 Length = fTub6length+fTub2length+3*m; // extend under ecal and muon detectors
1220 box = new TGeoBBox("box2", 10 * m, floorHeightB/2., Length/2.);
1221 floor = new TGeoVolume("floor2",box,concrete);
1222 floor->SetLineColor(11);
1223 tMaGVol->AddNode(floor, 0, new TGeoTranslation(0, -10*m+floorHeightB/2., Length/2.-2*fTub3length - 0.5*m));
1224
1225 //TGeoVolume* magnetInnerWalls = MakeMagnetSegment(3);
1226 //tMaGVol->AddNode(magnetInnerWalls, 1, new TGeoTranslation(0, 0, fTub4z - zStartMagVol));
1227
1228
1229 // make the exit window
1230 Double_t dx2 = slopex*(fTub6z +fTub6length - zFocusX);
1231 TGeoVolume *T6Lid = gGeoManager->MakeBox("T6Lid",supportMedOut,dx2,dy,f_LidThickness/2.);
1232 T6Lid->SetLineColor(18);
1233 T6Lid->SetLineColor(2);
1234 T6Lid->SetFillColor(2);
1235 tMaGVol->AddNode(T6Lid, 1, new TGeoTranslation(0, 0,fTub6z+fTub6length+f_LidThickness/2.+0.1*cm - zStartMagVol));
1236 //finisMakeSegments assembly and position
1237 top->AddNode(tDecayVol, 1, new TGeoTranslation(0, 0,zStartDecayVol));
1238 top->AddNode(tMaGVol, 1, new TGeoTranslation(0, 0,zStartMagVol));
1239
1240
1241// only for fastMuon simulation, otherwise output becomes too big
1242 if (fFastMuon && fFollowMuon){
1243 const char* Vol = "TGeoVolume";
1244 const char* Mag = "Mag";
1245 const char* Rock = "rock";
1246 const char* Ain = "AbsorberAdd";
1247 const char* Aout = "AbsorberAddCore";
1248 TObjArray* volumelist = gGeoManager->GetListOfVolumes();
1249 int lastvolume = volumelist->GetLast();
1250 int volumeiterator=0;
1251 while ( volumeiterator<=lastvolume ) {
1252 const char* volumename = volumelist->At(volumeiterator)->GetName();
1253 const char* classname = volumelist->At(volumeiterator)->ClassName();
1254 if (strstr(classname,Vol)){
1255 if (strstr(volumename,Mag) || strstr(volumename,Rock)|| strstr(volumename,Ain) || strstr(volumename,Aout)){
1256 AddSensitiveVolume(gGeoManager->GetVolume(volumename));
1257 cout << "veto: made sensitive for following muons: "<< volumename <<endl;
1258 }
1259 }
1260 volumeiterator++;
1261 }
1262 }
1263
1264}
Float_t floorHeightA
Definition veto.h:149
Float_t fTub6z
Definition veto.h:125
Float_t fTub3z
Definition veto.h:122
TGeoMedium * supportMedOut
Definition veto.h:144
Float_t fTub2z
Definition veto.h:121
Float_t floorHeightB
Definition veto.h:149
TGeoVolume * MakeLidSegments(Int_t seg, Double_t dx, Double_t dy)
Definition veto.cxx:972
Float_t fBtube
Definition veto.h:136
Float_t fTub2length
Definition veto.h:127
Float_t fTub3length
Definition veto.h:128
TGeoVolume * MakeSegments(Double_t dz, Double_t dx_start, Double_t dy, Double_t slopex, Double_t slopey, Double_t floorHeight)
Definition veto.cxx:833
Int_t InitMedium(const char *name)
Definition veto.cxx:1021
Float_t fTub1length
Definition veto.h:126
Float_t fTub6length
Definition veto.h:129
Float_t fTub1z
Definition veto.h:120

◆ CopyClones()

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

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

Definition at line 77 of file veto.h.

78 {;}

◆ EndOfEvent()

void veto::EndOfEvent ( )
virtual

Definition at line 1111 of file veto.cxx.

1112{
1113
1114 fvetoPointCollection->Clear();
1115
1116}

◆ FinishPrimary()

virtual void veto::FinishPrimary ( )
inlinevirtual

Definition at line 81 of file veto.h.

81{;}

◆ FinishRun()

virtual void veto::FinishRun ( )
inlinevirtual

Definition at line 82 of file veto.h.

82{;}

◆ GeoCornerLiSc1()

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

Definition at line 283 of file veto.cxx.

285 {
286
287 TGeoArb8 *T1 = new TGeoArb8(dz);
288
289 if(isClockwise){
290 T1->SetVertex(0,0,0);
291 T1->SetVertex(1,0,b1);
292 T1->SetVertex(2,a+b1,b1);
293 T1->SetVertex(3,a,0);
294
295 T1->SetVertex(4,dA,dB);
296 T1->SetVertex(5,dA,dB+b2);
297 T1->SetVertex(6,dA+a+b2,dB+b2);
298 T1->SetVertex(7,dA+a,dB);
299 }
300 else{
301 T1->SetVertex(0,0,0);
302 T1->SetVertex(1,-a,0);
303 T1->SetVertex(2,-a-b1,b1);
304 T1->SetVertex(3,0,b1);
305
306 T1->SetVertex(4,-dA,dB);
307 T1->SetVertex(5,-dA-a,dB);
308 T1->SetVertex(6,-dA-a-b2,dB+b2);
309 T1->SetVertex(7,-dA,dB+b2);
310 }
311
312
313 TGeoVolume *T = new TGeoVolume(xname, T1, material);
314 T->SetLineColor(color);
315 //and make the volunes sensitive..
316 if (sens) {AddSensitiveVolume(T);}
317 return T;
318}

◆ GeoCornerLiSc2()

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

Definition at line 320 of file veto.cxx.

322 {
323
324 TGeoArb8 *T1 = new TGeoArb8(dz);
325
326 if(isClockwise){
327 T1->SetVertex(0,0,0);
328 T1->SetVertex(1,0,a);
329 T1->SetVertex(2,b1,a+b1);
330 T1->SetVertex(3,b1,0);
331
332 T1->SetVertex(4,dA,dB);
333 T1->SetVertex(5,dA,dB+a);
334 T1->SetVertex(6,dA+b2,dB+a+b2);
335 T1->SetVertex(7,dA+b2,dB);
336 }
337 else{
338 T1->SetVertex(0,0,0);
339 T1->SetVertex(1,b1,0);
340 T1->SetVertex(2,b1,-a-b1);
341 T1->SetVertex(3,0,-a);
342
343 T1->SetVertex(4,dA,-dB);
344 T1->SetVertex(5,dA+b2,-dB);
345 T1->SetVertex(6,dA+b2,-dB-a-b2);
346 T1->SetVertex(7,dA,-dB-a);
347 }
348
349
350 TGeoVolume *T = new TGeoVolume(xname, T1, material);
351 T->SetLineColor(color);
352 //and make the volunes sensitive..
353 if (sens) {AddSensitiveVolume(T);}
354 return T;
355}

◆ 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 at line 358 of file veto.cxx.

359 {
360
361 Double_t wz=dz*2;
362 double d=ribThick*sqrt(2)/2;
363 double dx=slopeX*wz;
364 double dy=slopeY*wz;
365
366 TGeoArb8 *T1 = new TGeoArb8(dz);
367 T1->SetVertex(0,lt1,lt1-d);
368 T1->SetVertex(1,0,-d);
369 T1->SetVertex(2,0,0);
370 T1->SetVertex(3,lt1,lt1);
371
372 T1->SetVertex(4,dx+lt2,dy+lt2-d);
373 T1->SetVertex(5,dx,dy-d);
374 T1->SetVertex(6,dx,dy);
375 T1->SetVertex(7,dx+lt2,dy+lt2);
376
377 TGeoArb8 *T2 = new TGeoArb8(dz);
378 T2->SetVertex(0,lt1-d,lt1);
379 T2->SetVertex(1,lt1,lt1);
380 T2->SetVertex(2,0,0);
381 T2->SetVertex(3,-d,0);
382
383 T2->SetVertex(4,dx+lt2-d,dy+lt2);
384 T2->SetVertex(5,dx+lt2,dy+lt2);
385 T2->SetVertex(6,dx,dy);
386 T2->SetVertex(7,dx-d,dy);
387
388
389
390 TGeoVolume *T1v = new TGeoVolume("part", T1, material);
391 TGeoVolume *T2v = new TGeoVolume("part", T2, material);
392 T1v->SetLineColor(color);
393 T2v->SetLineColor(color);
394 if (sens) {AddSensitiveVolume(T1v);}
395 if (sens) {AddSensitiveVolume(T2v);}
396
397
398
399 TGeoVolumeAssembly *T = new TGeoVolumeAssembly(xname);
400 T->AddNode(T1v,1, new TGeoTranslation(0, 0,0));
401 T->AddNode(T2v,2, new TGeoTranslation(0, 0,0));
402 return T;
403}

◆ 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 at line 253 of file veto.cxx.

255 {
256
257 //a1- width in X, at the beginning
258 //b1- width in Y, at the beginning
259 //a2- width in X, at the end
260 //b2- width in Y, at the end
261
262 TGeoArb8 *T1 = new TGeoArb8(dz);
263 T1->SetVertex(0,0,0);
264 T1->SetVertex(1,0,b1);
265 T1->SetVertex(2,a1,b1);
266 T1->SetVertex(3,a1,0);
267
268 T1->SetVertex(4,dA,dB);
269 T1->SetVertex(5,dA,dB+b2);
270 T1->SetVertex(6,dA+a2,dB+b2);
271 T1->SetVertex(7,dA+a2,dB);
272
273
274
275 TGeoVolume *T = new TGeoVolume(xname, T1, material);
276 T->SetLineColor(color);
277 //and make the volunes sensitive..
278 if (sens) {AddSensitiveVolume(T);}
279 return T;
280}

◆ 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

Definition at line 114 of file veto.cxx.

118{
119
120
121 Double_t dz=wz/2;
122 Double_t tdx1 = wX_start/2-1.E-6;
123 Double_t tdx2 = wX_end/2-1.E-6;
124 Double_t tdy1 = wY_start/2-1.E-6;
125 Double_t tdy2 = wY_end/2-1.E-6;
126 TGeoArb8 *T1 = new TGeoArb8("T1"+xname,dz+1.E-6);
127 T1->SetVertex(0,-tdx1,-tdy1); T1->SetVertex(1,-tdx1,tdy1); T1->SetVertex(2,tdx1,tdy1); T1->SetVertex(3,tdx1,-tdy1);
128 T1->SetVertex(4,-tdx2,-tdy2); T1->SetVertex(5,-tdx2,tdy2); T1->SetVertex(6,tdx2,tdy2); T1->SetVertex(7,tdx2,-tdy2);
129
130
131// TGeoCompositeShape *T321 = new TGeoCompositeShape("T3"+nm,"T2"+nm+"-T1"+nm);
132 TGeoVolume *T = new TGeoVolume(xname, T1, material);
133 T->SetLineColor(color);
134 //and make the volunes sensitive..
135 if (sens) {AddSensitiveVolume(T);}
136 return T;
137}

◆ GeoTrapezoidNew()

TGeoVolume * veto::GeoTrapezoidNew ( 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

Definition at line 139 of file veto.cxx.

143{
144
145
146
147 Double_t dx_start=wX_start/2;
148 Double_t dy_start=wY_start/2;
149 Double_t dx_end=wX_end/2;
150 Double_t dy_end=wY_end/2;
151 Double_t dz=wz/2;
152
153
154 TString nm = xname.ReplaceAll("-",""); //otherwise it will try to subtract "-" in TGeoComposteShape
155 Double_t dx1 = dx_start+thick;
156 Double_t dx2 = dx_end+thick;
157 Double_t dy1 = dy_start+thick;
158 Double_t dy2 = dy_end+thick;
159
160 TGeoArb8 *T2 = new TGeoArb8("T2"+nm,dz);
161 T2->SetVertex(0,-dx1,-dy1); T2->SetVertex(1,-dx1,dy1); T2->SetVertex(2,dx1,dy1); T2->SetVertex(3,dx1,-dy1);
162 T2->SetVertex(4,-dx2,-dy2); T2->SetVertex(5,-dx2,dy2); T2->SetVertex(6,dx2,dy2); T2->SetVertex(7,dx2,-dy2);
163
164 Double_t tdx1 = dx_start;
165 Double_t tdx2 = dx_end;
166 Double_t tdy1 = dy_start;
167 Double_t tdy2 = dy_end;
168 TGeoArb8 *T1 = new TGeoArb8("T1"+nm,dz+1.E-6);
169 T1->SetVertex(0,-tdx1,-tdy1); T1->SetVertex(1,-tdx1,tdy1); T1->SetVertex(2,tdx1,tdy1); T1->SetVertex(3,tdx1,-tdy1);
170 T1->SetVertex(4,-tdx2,-tdy2); T1->SetVertex(5,-tdx2,tdy2); T1->SetVertex(6,tdx2,tdy2); T1->SetVertex(7,tdx2,-tdy2);
171
172
173 TGeoCompositeShape *T321 = new TGeoCompositeShape("T3"+nm,"T2"+nm+"-T1"+nm);
174 TGeoVolume *T = new TGeoVolume(xname, T321, material);
175 T->SetLineColor(color);
176 //and make the volunes sensitive..
177 if (sens) {AddSensitiveVolume(T);}
178 return T;
179}

◆ GetCollection()

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

Gets the produced collections

Definition at line 1139 of file veto.cxx.

1140{
1141 if (iColl == 0) { return fvetoPointCollection; }
1142 else { return NULL; }
1143}

◆ GetCopyNumber()

Int_t veto::GetCopyNumber ( Int_t  iz,
Int_t  iplank,
Int_t  region 
)
inlineprivate

Map of copy number to center of tiles.

Definition at line 193 of file veto.h.

194 { return (iz*1000+iplank)*10+region+fDeltaCpy; }
Int_t fDeltaCpy
Definition veto.h:189

◆ GetLiquidVeto()

Int_t veto::GetLiquidVeto ( ) const
inline

Definition at line 95 of file veto.h.

95{return fLiquidVeto;}

◆ GetPlasticVeto()

Int_t veto::GetPlasticVeto ( ) const
inline

Definition at line 92 of file veto.h.

92{return fPlasticVeto;}

◆ GetUseSupport()

Int_t veto::GetUseSupport ( ) const
inline

Definition at line 89 of file veto.h.

89{return fUseSupport;}

◆ Initialize()

void veto::Initialize ( )
virtual

Initialization of the detector is done here

Definition at line 107 of file veto.cxx.

108{
109 FairDetector::Initialize();
110// FairRuntimeDb* rtdb= FairRun::Instance()->GetRuntimeDb();
111// vetoGeoPar* par=(vetoGeoPar*)(rtdb->getContainer("vetoGeoPar"));
112}

◆ InitMedium()

Int_t veto::InitMedium ( const char *  name)
private

Definition at line 1021 of file veto.cxx.

1022{
1023 static FairGeoLoader *geoLoad=FairGeoLoader::Instance();
1024 static FairGeoInterface *geoFace=geoLoad->getGeoInterface();
1025 static FairGeoMedia *media=geoFace->getMedia();
1026 static FairGeoBuilder *geoBuild=geoLoad->getGeoBuilder();
1027
1028 FairGeoMedium *ShipMedium=media->getMedium(name);
1029
1030 if (!ShipMedium)
1031 {
1032 Fatal("InitMedium","Material %s not defined in media file.", name);
1033 return -1111;
1034 }
1035 TGeoMedium* medium=gGeoManager->GetMedium(name);
1036 if (medium!=NULL)
1037 return ShipMedium->getMediumIndex();
1038
1039 return geoBuild->createMedium(ShipMedium);
1040}

◆ InnerAddToMap()

void veto::InnerAddToMap ( Int_t  ncpy,
Double_t  x,
Double_t  y,
Double_t  z,
Double_t  dx = -1111,
Double_t  dy = -1111,
Double_t  dz = -1111 
)
private

Definition at line 1278 of file veto.cxx.

1279{
1280 if (fCenters.find(ncpy)!=fCenters.end())
1281 {
1282 cout << ncpy << " is already in the map" << endl;
1283 return;
1284 }
1285 fCenters[ncpy]=TVector3(x, y, z);
1286}
std::map< Int_t, TVector3 > fCenters
Definition veto.h:190

◆ liscId()

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

Definition at line 417 of file veto.cxx.

417 {
418 //LiScX - ShapeType 1
419 int id = 999999;
420 int ShapeType = -1;
421
422 if(ShapeTypeName == "LiScX")ShapeType=1;
423 else if(ShapeTypeName == "LiScY")ShapeType=2;
424 else if(ShapeTypeName == "LiSc_L1")ShapeType=3;
425 else if(ShapeTypeName == "LiSc_R1")ShapeType=4;
426 else if(ShapeTypeName == "LiSc_L2")ShapeType=5;
427 else if(ShapeTypeName == "LiSc_R2")ShapeType=6;
428
429 if(ShapeType<0) id = 999999;
430 else id = ShapeType*100000 + blockNr*10000 + Zlayer*100 + number*10 + position;
431 return id;
432}

◆ makeId()

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

Definition at line 406 of file veto.cxx.

406 {
407 double Z=z/10;
408 double r=sqrt(x*x+y*y);
409 double phi=999;
410 if(y>=0)phi=acos(x/r);
411 else phi=-acos(x/r)+2*TMath::Pi();
412
413 phi=phi*180/TMath::Pi();
414 return (int)Z*1000000 + (int)r*1000 + (int)phi;
415}

◆ MakeLidSegments()

TGeoVolume * veto::MakeLidSegments ( Int_t  seg,
Double_t  dx,
Double_t  dy 
)
private

Definition at line 972 of file veto.cxx.

973{
974 // dz is the half-length, dx1 half-width x at start, dx2 half-width at end
975 TString nm;
976 nm = "T"; nm += seg;
977 nm+= "Lid";
978 TGeoVolumeAssembly *tDecayVol = new TGeoVolumeAssembly(nm);
979 //Assume ~1 m between ribs, calculate number of ribs
980 Double_t dist = 0.8*m; //with Napoli design: 0.8 m
981 Int_t nribs = 2+dx*2./dist ;
982 Double_t ribspacing = (dx*2.-nribs*f_InnerSupportThickness)/(nribs-1)+f_InnerSupportThickness;
983
984 Double_t hwidth=15.*cm; //half-width of a H-bar
985 Double_t ribwidth=f_VetoThickness; //( but should become it owns indepent dimension )
986
987 //place lid
988 //TGeoVolume *T1Lid = gGeoManager->MakeBox("T1Lidbox",supportMedIn,dx+f_InnerSupportThickness/2,dy,f_InnerSupportThickness/2.);
989 //make it out of 8 mm of Al.
990 TGeoVolume *T1Lid = gGeoManager->MakeBox("T1Lidbox",supportMedOut,dx+f_InnerSupportThickness/2,dy,f_LidThickness/2.);
991 T1Lid->SetLineColor(18);
992 tDecayVol->AddNode(T1Lid, 1, new TGeoTranslation(0, 0, 0));
993
994
995 //Do not place H-bar ribs anymore..
996 if (1==0){
997 //now place ribs
998 nm = "T"; nm += seg;
999 nm+= "LidRib";
1000 for (Int_t nr=0; nr<nribs; nr++) {
1001 Double_t xrib = -dx +f_RibThickness/2. +nr*ribspacing;
1002 TGeoVolume* T = gGeoManager->MakeBox(nm,supportMedIn,f_InnerSupportThickness/2.,dy,ribwidth/2.);
1003 T->SetLineColor(14);
1004 tDecayVol->AddNode(T, nr, new TGeoTranslation(xrib, 0,-ribwidth/2.-f_InnerSupportThickness/2.));
1005 }
1006
1007 //add H-bars in the front
1008 nm = "T"; nm += seg;
1009 nm+= "LidH";
1010 for (Int_t nr=0; nr<nribs; nr++) {
1011 Double_t xrib = -dx +f_RibThickness/2. +nr*ribspacing;
1012 TGeoVolume* T = gGeoManager->MakeBox(nm,supportMedIn,hwidth,dy,f_InnerSupportThickness/2.);
1013 T->SetLineColor(14);
1014 tDecayVol->AddNode(T, nr, new TGeoTranslation(xrib, 0,-ribwidth-f_InnerSupportThickness));
1015 }
1016 }
1017 return tDecayVol;
1018}
Double_t cm

◆ MakeMagnetSegment()

TGeoVolume * veto::MakeMagnetSegment ( Int_t  seg)
private

Definition at line 623 of file veto.cxx.

623 {
624 TString nm;
625 nm = "T"; nm += seg;
626 TGeoVolumeAssembly *tMagVol = new TGeoVolumeAssembly(nm);
627
628 bool isVert = 1;
629 bool isLongOutCover = 1;
630
631 double dzMagnetPart = 238.1*cm ; //from Piets Wertelaers drawings
632 double thiknes = 12*mm;
633 double xPos=0;
634 double yPos=0;
635 double zPos=0;
636
637 //make walls inside magnet area
638 double dx=5*cm;//from Piets Wertelaers drawings
639 double dy=500*cm;//from Piets Wertelaers drawings
640 double dz=dzMagnetPart;
641 TGeoVolume* InnerMagWall_Y = gGeoManager->MakeBox("InnerMagWall_Y", supportMedIn, dx, dy, dz);
642 InnerMagWall_Y->SetLineColor(15);
643 tMagVol->AddNode(InnerMagWall_Y, 1 , new TGeoCombiTrans(255*cm,0,0,new TGeoRotation("r",0,0,0)));
644 tMagVol->AddNode(InnerMagWall_Y, 2 , new TGeoCombiTrans(-255*cm,0,0,new TGeoRotation("r",0,0,0)));
645
646 dx=260*cm;//from Piets Wertelaers drawings
647 dy=5*cm;//from Piets Wertelaers drawings
648 dz=dzMagnetPart;
649 TGeoVolume* InnerMagWall_X = gGeoManager->MakeBox("InnerMagWall_X", supportMedIn, dx, dy, dz);
650 InnerMagWall_X->SetLineColor(15);
651 tMagVol->AddNode(InnerMagWall_X, 1 , new TGeoCombiTrans(0,505*cm,0,new TGeoRotation("r",0,0,0)));
652 tMagVol->AddNode(InnerMagWall_X, 2 , new TGeoCombiTrans(0,-505*cm,0,new TGeoRotation("r",0,0,0)));
653
654
655
656 xPos=(-358.2*cm-250.4*cm)/2;
657 yPos=602.4*cm-(602.4-500.4)*cm/2;
658 zPos=dzMagnetPart+thiknes/2;
659
660 dx=(358.2-250.4)*cm/2;
661 dy=604.4*cm;
662 dz=thiknes/2;
663 TGeoVolume* VertMagCover_Y = gGeoManager->MakeBox("VertMagCover_Y", supportMedIn, dx, dy, dz);
664 dx=250.4*cm;
665 dy=(602.4-500.4)*cm/2;
666 TGeoVolume* VertMagCover_X = gGeoManager->MakeBox("VertMagCover_X", supportMedIn, dx, dy, dz);
667 VertMagCover_Y->SetLineColor(15);
668 VertMagCover_X->SetLineColor(15);
669
670 if(isVert)tMagVol->AddNode(VertMagCover_Y, 1 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
671 if(isVert)tMagVol->AddNode(VertMagCover_Y, 2 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
672 if(isVert)tMagVol->AddNode(VertMagCover_Y, 3 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
673 if(isVert)tMagVol->AddNode(VertMagCover_Y, 4 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
674
675 if(isVert)tMagVol->AddNode(VertMagCover_X, 1 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
676 if(isVert)tMagVol->AddNode(VertMagCover_X, 2 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
677 if(isVert)tMagVol->AddNode(VertMagCover_X, 3 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
678 if(isVert)tMagVol->AddNode(VertMagCover_X, 4 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
679
680
681 double dxOoutCover=thiknes/2;
682 double dyOoutCover=604.4*cm;
683 double dzOoutCover=56.0*cm/2;
684 double xPosOutetCover = xPos-(358.2-250.4)*cm/2;
685 double yPosOutetCover = 602.4*cm;
686 double zPosOutetCover = zPos-dzOoutCover-thiknes/2;
687
688 TGeoVolume* LongOutCover_Y1 = gGeoManager->MakeBox("LongOutCover_Y1", supportMedIn, dxOoutCover, dyOoutCover, dzOoutCover);
689 dxOoutCover=fabs(xPosOutetCover)-thiknes;
690 dyOoutCover=thiknes/2;
691 TGeoVolume* LongOutCover_X1 = gGeoManager->MakeBox("LongOutCover_X1", supportMedIn, dxOoutCover, dyOoutCover, dzOoutCover);
692
693 LongOutCover_Y1->SetLineColor(15);
694 LongOutCover_X1->SetLineColor(15);
695
696 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 1 , new TGeoCombiTrans(xPosOutetCover,0,zPosOutetCover,new TGeoRotation("r",0,0,0)));
697 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 2 , new TGeoCombiTrans(-xPosOutetCover,0,zPosOutetCover,new TGeoRotation("r",0,0,0)));
698 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 3 , new TGeoCombiTrans(xPosOutetCover,0,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
699 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 4 , new TGeoCombiTrans(-xPosOutetCover,0,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
700
701
702 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 1 , new TGeoCombiTrans(0,yPosOutetCover,zPosOutetCover,new TGeoRotation("r",0,0,0)));
703 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 2 , new TGeoCombiTrans(0,-yPosOutetCover,zPosOutetCover,new TGeoRotation("r",0,0,0)));
704 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 3 , new TGeoCombiTrans(0,yPosOutetCover,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
705 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 4 , new TGeoCombiTrans(0,-yPosOutetCover,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
706
707
708 zPos=328.5*cm;
709 if(isVert)tMagVol->AddNode(VertMagCover_Y, 5 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
710 if(isVert)tMagVol->AddNode(VertMagCover_Y, 6 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
711 if(isVert)tMagVol->AddNode(VertMagCover_Y, 7 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
712 if(isVert)tMagVol->AddNode(VertMagCover_Y, 8 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
713
714 if(isVert)tMagVol->AddNode(VertMagCover_X, 5 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
715 if(isVert)tMagVol->AddNode(VertMagCover_X, 6 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
716 if(isVert)tMagVol->AddNode(VertMagCover_X, 7 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
717 if(isVert)tMagVol->AddNode(VertMagCover_X, 8 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
718
719 zPos=442.3*cm;
720 if(isVert)tMagVol->AddNode(VertMagCover_Y, 9 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
721 if(isVert)tMagVol->AddNode(VertMagCover_Y, 10 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
722 if(isVert)tMagVol->AddNode(VertMagCover_Y, 11 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
723 if(isVert)tMagVol->AddNode(VertMagCover_Y, 12 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
724
725 if(isVert)tMagVol->AddNode(VertMagCover_X, 9 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
726 if(isVert)tMagVol->AddNode(VertMagCover_X, 10 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
727 if(isVert)tMagVol->AddNode(VertMagCover_X, 11 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
728 if(isVert)tMagVol->AddNode(VertMagCover_X, 12 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
729
730
731 zPos=532.1*cm;
732 if(isVert)tMagVol->AddNode(VertMagCover_Y, 10 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
733 if(isVert)tMagVol->AddNode(VertMagCover_Y, 11 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
734 if(isVert)tMagVol->AddNode(VertMagCover_Y, 12 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
735 if(isVert)tMagVol->AddNode(VertMagCover_Y, 13 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
736
737 if(isVert)tMagVol->AddNode(VertMagCover_X, 10 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
738 if(isVert)tMagVol->AddNode(VertMagCover_X, 11 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
739 if(isVert)tMagVol->AddNode(VertMagCover_X, 12 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
740 if(isVert)tMagVol->AddNode(VertMagCover_X, 13 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
741
742 zPos=589.3*cm;
743 if(isVert)tMagVol->AddNode(VertMagCover_X, 14 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
744 if(isVert)tMagVol->AddNode(VertMagCover_X, 15 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
745 if(isVert)tMagVol->AddNode(VertMagCover_X, 16 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
746 if(isVert)tMagVol->AddNode(VertMagCover_X, 17 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
747
748 dx=(358.2-250.4)*cm/2-37.0*cm/2;
749 dy=604.4*cm;
750 dz=thiknes/2;
751 xPos+=37.0*cm/2;
752 TGeoVolume* VertMagCover_y = gGeoManager->MakeBox("VertMagCover_y", supportMedIn, dx, dy, dz);
753 VertMagCover_y->SetLineColor(15);
754 if(isVert)tMagVol->AddNode(VertMagCover_y, 1 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
755 if(isVert)tMagVol->AddNode(VertMagCover_y, 2 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
756 if(isVert)tMagVol->AddNode(VertMagCover_y, 3 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
757 if(isVert)tMagVol->AddNode(VertMagCover_y, 4 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
758
759
760 dx=thiknes/2;
761 dy=604.4*cm;
762 dz=88.5*cm/2;
763 TGeoVolume* LongOutCover_Y2 = gGeoManager->MakeBox("LongOutCover_Y2", supportMedIn, dx, dy, dz);
764 LongOutCover_Y2->SetLineColor(15);
765
766 xPos = xPosOutetCover;
767 yPos = 0*cm;
768 zPos = 283.65*cm;
769
770 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 1 , new TGeoTranslation(xPos,yPos,zPos));
771 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 2 , new TGeoTranslation(xPos,yPos,-zPos));
772 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 3 , new TGeoTranslation(-xPos,yPos,zPos));
773 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 4 , new TGeoTranslation(-xPos,yPos,-zPos));
774
775 xPos=-323.0*cm;
776 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 5 , new TGeoTranslation(xPos,yPos,zPos));
777 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 6 , new TGeoTranslation(xPos,yPos,-zPos));
778 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 7 , new TGeoTranslation(-xPos,yPos,zPos));
779 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 8 , new TGeoTranslation(-xPos,yPos,-zPos));
780
781 xPos = xPosOutetCover;
782 zPos = 487.2*cm;
783 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 9 , new TGeoTranslation(xPos,yPos,zPos));
784 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 10 , new TGeoTranslation(xPos,yPos,-zPos));
785 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 11 , new TGeoTranslation(-xPos,yPos,zPos));
786 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 12 , new TGeoTranslation(-xPos,yPos,-zPos));
787
788 xPos=-323.0*cm;
789 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 13 , new TGeoTranslation(xPos,yPos,zPos));
790 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 14 , new TGeoTranslation(xPos,yPos,-zPos));
791 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 16 , new TGeoTranslation(-xPos,yPos,zPos));
792 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 17 , new TGeoTranslation(-xPos,yPos,-zPos));
793
794
795 dz=112.6*cm/2;
796 TGeoVolume* LongOutCover_Y3 = gGeoManager->MakeBox("LongOutCover_Y3", supportMedIn, dx, dy, dz);
797 LongOutCover_Y3->SetLineColor(15);
798 xPos = xPosOutetCover;
799 zPos = 385.4*cm;
800
801 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 1 , new TGeoTranslation(xPos,yPos,zPos));
802 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 2 , new TGeoTranslation(xPos,yPos,-zPos));
803 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 3 , new TGeoTranslation(-xPos,yPos,zPos));
804 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 4 , new TGeoTranslation(-xPos,yPos,-zPos));
805
806
807 dy-=(358.2-250.4)*cm;
808 TGeoVolume* LongOutCover_Y4 = gGeoManager->MakeBox("LongOutCover_Y4", supportMedIn, dx, dy, dz);
809 LongOutCover_Y4->SetLineColor(2);
810
811 xPos=-255.0*cm;
812 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 1 , new TGeoTranslation(xPos,yPos,zPos));
813 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 2 , new TGeoTranslation(xPos,yPos,-zPos));
814 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 3 , new TGeoTranslation(-xPos,yPos,zPos));
815 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 4 , new TGeoTranslation(-xPos,yPos,-zPos));
816
817
818 /*
819 dxOoutCover=fabs(xPosOutetCover)-thiknes;
820 dyOoutCover=thiknes/2;
821 TGeoVolume* LongOutCover_X2 = gGeoManager->MakeBox("LongOutCover_X1", supportMedIn, dxOoutCover, dyOoutCover, dzOoutCover);
822
823 LongOutCover_X2->SetLineColor(15);
824 */
825
826
827 return tMagVol;
828
829
830}

◆ MakeSegments()

TGeoVolume * veto::MakeSegments ( Double_t  dz,
Double_t  dx_start,
Double_t  dy,
Double_t  slopex,
Double_t  slopey,
Double_t  floorHeight 
)
private

Definition at line 833 of file veto.cxx.

834{
835 TGeoVolumeAssembly *tTankVol = new TGeoVolumeAssembly("T2");
836 Double_t dist = 0.8*m; //with Napoli design: 0.8 m
837
838
839 int isInnerWall=1;
840 int isDecayVacuum=1;
841 int isOuterWall=1;
842 int isVerticalRib=1;
843 int isLongitRib=1;
844 int isLiSc=1;
845
846
847 //assembly for innerwall
848 TString nameInnerWall = "VetoInnerWall";
849 TGeoVolumeAssembly *tInnerWall = new TGeoVolumeAssembly(nameInnerWall);
850 //assembly for decay volume
851 TString nameDecayVacuum = "DecayVacuum";
852 TGeoVolumeAssembly *tDecayVacuum = new TGeoVolumeAssembly(nameDecayVacuum);
853 //assembly for outerwall
854 TString nameOuterWall = "VetoOuterWall";
855 TGeoVolumeAssembly *tOuterWall = new TGeoVolumeAssembly(nameOuterWall);
856 //assembly for longitudinal rib
857 TString nameLongitRib = "VetoLongitRib";
858 TGeoVolumeAssembly *tLongitRib = new TGeoVolumeAssembly(nameLongitRib);
859 //assembly for vertical ribs
860 TString nameVerticalRib = "VetoVerticalRib";
861 TGeoVolumeAssembly *tVerticalRib = new TGeoVolumeAssembly(nameVerticalRib);
862 //assembly for liqued scintilator
863 TString nameLiSc = "VetoLiSc";
864 TGeoVolumeAssembly *ttLiSc = new TGeoVolumeAssembly(nameLiSc);
865 int liScCounter=0;
866
867 //******************************** Block1: *************************************************************
868 double z1=0*m;
869 double z2=14.4*m;
870 double wz=(z2-z1);//to delete
871 double slX=(wx(z2)-wx(z1))/2/wz;//to delete
872 double slY=(wy(z2)-wy(z1))/2/wz;//to delete
873
874 double wallThick= 20*mm;//wall thiknes
875 double liscThick1= 300*mm;
876 double liscThick2= 300*mm;
877 double ribThick = 10*mm;
878
879 double Zshift=-dz + wz/2;//calibration of Z position
880 double shiftPlot=0;//calibration of Z position
881
882 int nx=4; // number of Longitudinal ribs on X
883 int ny=6; // number of Longitudinal ribs on Y
884
885 double distC = 150*mm; //rib distance from corner
886
887
888
889 AddBlock(tInnerWall,tDecayVacuum,tOuterWall,tLongitRib,tVerticalRib,ttLiSc, liScCounter,
890 1, nx, ny, z1,z2,Zshift,dist,distC,
891 wallThick,liscThick1,liscThick2,ribThick);
892
893
894
895
896
897// //******************************** Block2: p1 *************************************************************
898 Zshift+=wz/2;
899 z1=14.4*m;
900 z2=15.2*m;
901 wz=(z2-z1);
902 Zshift+=wz/2;
903 liscThick2=410*mm;
904//
905// Zshift+=shiftPlot;
906//
907 AddBlock(tInnerWall,tDecayVacuum,tOuterWall,tLongitRib,tVerticalRib,ttLiSc, liScCounter,
908 2, nx, ny, z1,z2,Zshift,dist,distC,
909 wallThick,liscThick1,liscThick2,ribThick);
910
911 //******************************** Block3: p2 *************************************************************
912 Zshift+=wz/2;
913 z1=15.2*m;
914 z2=24.0*m;
915 wz=z2-z1;
916 Zshift+=wz/2;
917//
918// Zshift+=shiftPlot;
919//
920 liscThick1=410*mm;
921 AddBlock(tInnerWall,tDecayVacuum,tOuterWall,tLongitRib,tVerticalRib,ttLiSc, liScCounter,
922 3, nx, ny, z1,z2,Zshift,dist,distC,
923 wallThick,liscThick1,liscThick2,ribThick);
924
925//
926// //******************************** Block4: p3 *************************************************************
927 Zshift+=wz/2;
928 z1=24.0*m;
929 z2=33.6*m;
930 wz=z2-z1;
931 Zshift+=wz/2;
932
933// Zshift+=shiftPlot;
934//
935 nx=7;//number of Longitudinal ribs on X
936 ny=11;//number of Longitudinal ribs on Y
937
938 AddBlock(tInnerWall,tDecayVacuum,tOuterWall,tLongitRib,tVerticalRib,ttLiSc, liScCounter,
939 4, nx, ny, z1,z2,Zshift,dist,distC,
940 wallThick,liscThick1,liscThick2,ribThick);
941
942//
943 //******************************** Block5: *************************************************************
944 Zshift+=wz/2;
945 z1=33.6*m;
946 z2=50.0*m;
947 wz=z2-z1;
948 Zshift+=wz/2;
949
950 wallThick= 30*mm;
951 liscThick1=390*mm;
952 liscThick2=390*mm;
953
954// Zshift+=shiftPlot;
955//
956 AddBlock(tInnerWall,tDecayVacuum,tOuterWall,tLongitRib,tVerticalRib,ttLiSc, liScCounter,
957 5, nx, ny, z1,z2,Zshift,dist,distC,
958 wallThick,liscThick1,liscThick2,ribThick);
959
960
961
962 if(isInnerWall)tTankVol->AddNode(tInnerWall,0, new TGeoTranslation(0, 0,0 ));
963 if(isDecayVacuum)tTankVol->AddNode(tDecayVacuum,0, new TGeoTranslation(0, 0,0 ));
964 if(isOuterWall)tTankVol->AddNode(tOuterWall,0, new TGeoTranslation(0, 0,0 ));
965 if(isVerticalRib)tTankVol->AddNode(tVerticalRib,0, new TGeoTranslation(0, 0,0 ));
966 if(isLongitRib)tTankVol->AddNode(tLongitRib,0, new TGeoTranslation(0, 0,0 ));
967 if(isLiSc)tTankVol->AddNode(ttLiSc,0, new TGeoTranslation(0, 0,0 ));
968
969 return tTankVol;
970}
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 distC, double wallThick, double liscThick1, double liscThick2, double ribThick)
Definition veto.cxx:435

◆ operator=()

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

◆ PostTrack()

virtual void veto::PostTrack ( )
inlinevirtual

Definition at line 84 of file veto.h.

84{;}

◆ PreTrack()

void veto::PreTrack ( )
virtual

Definition at line 1118 of file veto.cxx.

1118 {
1119 if (!fFastMuon){return;}
1120 if (TMath::Abs(gMC->TrackPid())!=13){
1121 gMC->StopTrack();
1122 }
1123}

◆ ProcessHits()

Bool_t veto::ProcessHits ( FairVolume *  v = 0)
virtual

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

This method is called from the MC stepping

Definition at line 1062 of file veto.cxx.

1063{
1065 //Set parameters at entrance of volume. Reset ELoss.
1066 if ( gMC->IsTrackEntering() ) {
1067 fELoss = 0.;
1068 fTime = gMC->TrackTime() * 1.0e09;
1069 fLength = gMC->TrackLength();
1070 gMC->TrackPosition(fPos);
1071 gMC->TrackMomentum(fMom);
1072 }
1073 // Sum energy loss for all steps in the active volume
1074 fELoss += gMC->Edep();
1075
1076 // Create vetoPoint at exit of active volume
1077 if ( gMC->IsTrackExiting() ||
1078 gMC->IsTrackStop() ||
1079 gMC->IsTrackDisappeared() ) {
1080 if (fELoss == 0. ) { return kFALSE; }
1081
1082 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
1083
1084 Int_t veto_uniqueId;
1085 gMC->CurrentVolID(veto_uniqueId);
1086
1087 //cout << "in veto.cxx (ProcessHits): veto_uniqueId: " << veto_uniqueId << endl;
1088
1089 TParticle* p=gMC->GetStack()->GetCurrentTrack();
1090 Int_t pdgCode = p->GetPdgCode();
1091 TLorentzVector Pos;
1092 gMC->TrackPosition(Pos);
1093 TLorentzVector Mom;
1094 gMC->TrackMomentum(Mom);
1095 Double_t xmean = (fPos.X()+Pos.X())/2. ;
1096 Double_t ymean = (fPos.Y()+Pos.Y())/2. ;
1097 Double_t zmean = (fPos.Z()+Pos.Z())/2. ;
1098// cout << veto_uniqueId << " :(" << xmean << ", " << ymean << ", " << zmean << "): " << gMC->CurrentVolName() << endl;
1099 AddHit(fTrackID, veto_uniqueId, TVector3(xmean, ymean, zmean),
1100 TVector3(fMom.Px(), fMom.Py(), fMom.Pz()), fTime, fLength,
1101 fELoss,pdgCode,TVector3(Pos.X(), Pos.Y(), Pos.Z()),TVector3(Mom.Px(), Mom.Py(), Mom.Pz()) );
1102
1103 // Increment number of veto det points in TParticle
1104 ShipStack* stack = (ShipStack*) gMC->GetStack();
1105 stack->AddPoint(kVETO);
1106 }
1107
1108 return kTRUE;
1109}
vetoPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t pdgcode, TVector3 Lpos, TVector3 Lmom)
Definition veto.cxx:1266

◆ Register()

void veto::Register ( )
virtual

Registers the produced collections in FAIRRootManager.

This will create a branch in the output tree called vetoPoint, setting the last parameter to kFALSE means: this collection will not be written to the file, it will exist only during the simulation.

Definition at line 1124 of file veto.cxx.

1125{
1126
1133 FairRootManager::Instance()->Register("vetoPoint", "veto",
1134 fvetoPointCollection, kTRUE);
1135
1136}

◆ Reset()

void veto::Reset ( )
virtual

has to be called after each event to reset the containers

Definition at line 1145 of file veto.cxx.

1146{
1147 fvetoPointCollection->Clear();
1148}

◆ SetB()

void veto::SetB ( Float_t  b)
inline

◆ SetFastMuon()

void veto::SetFastMuon ( )
inline

Definition at line 49 of file veto.h.

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

◆ SetFloorHeight()

void veto::SetFloorHeight ( Float_t  a,
Float_t  b 
)
inline

◆ SetFollowMuon()

void veto::SetFollowMuon ( )
inline

Definition at line 50 of file veto.h.

50{fFollowMuon=true;} // make muon shield active to follow muons

◆ SetLiquidVeto()

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

Definition at line 94 of file veto.h.

94{fLiquidVeto=liquid;}

◆ SetPlasticVeto()

void veto::SetPlasticVeto ( Int_t  plastic = 1)
inline

Definition at line 91 of file veto.h.

91{fPlasticVeto=plastic;}

◆ SetSpecialPhysicsCuts()

virtual void veto::SetSpecialPhysicsCuts ( )
inlinevirtual

Definition at line 79 of file veto.h.

79{;}

◆ SetTublengths()

void veto::SetTublengths ( Float_t  l1,
Float_t  l2,
Float_t  l3,
Float_t  l6 
)

half length of tub1

half length of tub2

half length of tub3

half length of tub6

Definition at line 1052 of file veto.cxx.

1053{
1054 fTub1length = l1;
1055 fTub2length = l2;
1056 fTub3length = l3;
1057 fTub6length = l6;
1058}

◆ SetTubZpositions()

void veto::SetTubZpositions ( Float_t  z1,
Float_t  z2,
Float_t  z3,
Float_t  z4,
Float_t  z5,
Float_t  z6 
)

z-position of tub1

z-position of tub2

z-position of tub3

z-position of tub4

z-position of tub5

z-position of tub6

Definition at line 1042 of file veto.cxx.

1043{
1044 fTub1z = z1;
1045 fTub2z = z2;
1046 fTub3z = z3;
1047 fTub4z = z4;
1048 fTub5z = z5;
1049 fTub6z = z6;
1050}
Float_t fTub5z
Definition veto.h:124
Float_t fTub4z
Definition veto.h:123

◆ SetUseSupport()

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

Definition at line 88 of file veto.h.

88{fUseSupport=use;}

◆ 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

◆ SetXYstart()

void veto::SetXYstart ( Float_t  b,
Float_t  fx,
Float_t  c,
Float_t  fy 
)
inline

Definition at line 60 of file veto.h.

60{fXstart=b; zFocusX=fx; fYstart=c; zFocusY=fy;}

◆ SetZpositions()

void veto::SetZpositions ( Float_t  z0,
Float_t  z1,
Float_t  z2,
Float_t  z3,
Float_t  z4,
Int_t  c 
)

z-position of veto station

z-position of tracking station 1

z-position of tracking station 2

z-position of tracking station 3

z-position of tracking station 4

Definition at line 1149 of file veto.cxx.

1150{
1151 fT0z = z0;
1152 fT1z = z1;
1153 fT2z = z2;
1154 fT3z = z3;
1155 fT4z = z4;
1156 fDesign = c;
1157}
Int_t fDesign
z-position of tracking station 4
Definition veto.h:114

Member Data Documentation

◆ decayVolumeMed

TGeoMedium* veto::decayVolumeMed
private

Definition at line 145 of file veto.h.

◆ decayVolumeMed_name

TString veto::decayVolumeMed_name
private

medium of support structure, aluminium, balloon

Definition at line 141 of file veto.h.

◆ f_InnerSupportThickness

Float_t veto::f_InnerSupportThickness
private

Definition at line 130 of file veto.h.

◆ f_LidThickness

Float_t veto::f_LidThickness
private

Definition at line 133 of file veto.h.

◆ f_OuterSupportThickness

Float_t veto::f_OuterSupportThickness
private

Definition at line 132 of file veto.h.

◆ f_PhiRibsThickness

Float_t veto::f_PhiRibsThickness
private

Definition at line 131 of file veto.h.

◆ f_RibThickness

Float_t veto::f_RibThickness
private

Definition at line 135 of file veto.h.

◆ f_VetoThickness

Float_t veto::f_VetoThickness
private

Definition at line 134 of file veto.h.

◆ fBtube

Float_t veto::fBtube
private

Definition at line 136 of file veto.h.

◆ fCenters

std::map<Int_t, TVector3> veto::fCenters
private

Definition at line 190 of file veto.h.

◆ fDeltaCpy

Int_t veto::fDeltaCpy
private

Definition at line 189 of file veto.h.

◆ fDesign

Int_t veto::fDesign
private

z-position of tracking station 4

Definition at line 114 of file veto.h.

◆ fELoss

Float_t veto::fELoss
private

length

Definition at line 108 of file veto.h.

◆ fFastMuon

Bool_t veto::fFastMuon
private

1: cylindrical with basic tracking chambers,

Definition at line 119 of file veto.h.

◆ fFollowMuon

Bool_t veto::fFollowMuon
private

Definition at line 119 of file veto.h.

◆ fLength

Float_t veto::fLength
private

time

Definition at line 107 of file veto.h.

◆ fLiquidVeto

Int_t veto::fLiquidVeto
private

Definition at line 153 of file veto.h.

◆ floorHeightA

Float_t veto::floorHeightA
private

Definition at line 149 of file veto.h.

◆ floorHeightB

Float_t veto::floorHeightB
private

Definition at line 149 of file veto.h.

◆ fMom

TLorentzVector veto::fMom
private

position at entrance

Definition at line 105 of file veto.h.

◆ fPlasticVeto

Int_t veto::fPlasticVeto
private

Definition at line 152 of file veto.h.

◆ fPos

TLorentzVector veto::fPos
private

volume id

Definition at line 104 of file veto.h.

◆ fT0z

Float_t veto::fT0z
private

energy loss

Definition at line 109 of file veto.h.

◆ fT1z

Float_t veto::fT1z
private

z-position of veto station

Definition at line 110 of file veto.h.

◆ fT2z

Float_t veto::fT2z
private

z-position of tracking station 1

Definition at line 111 of file veto.h.

◆ fT3z

Float_t veto::fT3z
private

z-position of tracking station 2

Definition at line 112 of file veto.h.

◆ fT4z

Float_t veto::fT4z
private

z-position of tracking station 3

Definition at line 113 of file veto.h.

◆ fTime

Float_t veto::fTime
private

momentum at entrance

Definition at line 106 of file veto.h.

◆ fTrackID

Int_t veto::fTrackID
private

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

Definition at line 102 of file veto.h.

◆ fTub1length

Float_t veto::fTub1length
private

Definition at line 126 of file veto.h.

◆ fTub1z

Float_t veto::fTub1z
private

Definition at line 120 of file veto.h.

◆ fTub2length

Float_t veto::fTub2length
private

Definition at line 127 of file veto.h.

◆ fTub2z

Float_t veto::fTub2z
private

Definition at line 121 of file veto.h.

◆ fTub3length

Float_t veto::fTub3length
private

Definition at line 128 of file veto.h.

◆ fTub3z

Float_t veto::fTub3z
private

Definition at line 122 of file veto.h.

◆ fTub4z

Float_t veto::fTub4z
private

Definition at line 123 of file veto.h.

◆ fTub5z

Float_t veto::fTub5z
private

Definition at line 124 of file veto.h.

◆ fTub6length

Float_t veto::fTub6length
private

Definition at line 129 of file veto.h.

◆ fTub6z

Float_t veto::fTub6z
private

Definition at line 125 of file veto.h.

◆ fUseSupport

Int_t veto::fUseSupport
private

Definition at line 151 of file veto.h.

◆ fvetoPointCollection

TClonesArray* veto::fvetoPointCollection
private

container for data points

Definition at line 155 of file veto.h.

◆ fVolumeID

Int_t veto::fVolumeID
private

track index

Definition at line 103 of file veto.h.

◆ fXstart

Float_t veto::fXstart
private

Definition at line 147 of file veto.h.

◆ fYstart

Float_t veto::fYstart
private

Definition at line 147 of file veto.h.

◆ supportMedIn

TGeoMedium* veto::supportMedIn
private

Definition at line 143 of file veto.h.

◆ supportMedIn_name

TString veto::supportMedIn_name
private

medium of veto counter, liquid or plastic scintillator

Definition at line 139 of file veto.h.

◆ supportMedOut

TGeoMedium* veto::supportMedOut
private

Definition at line 144 of file veto.h.

◆ supportMedOut_name

TString veto::supportMedOut_name
private

medium of support structure, iron, balloon

Definition at line 140 of file veto.h.

◆ vetoMed

TGeoMedium* veto::vetoMed
private

medium of decay volume, vacuum/air/helium

Definition at line 142 of file veto.h.

◆ vetoMed_name

TString veto::vetoMed_name
private

Definition at line 138 of file veto.h.

◆ ws

Float_t veto::ws
private

Definition at line 137 of file veto.h.

◆ zFocusX

Float_t veto::zFocusX
private

Definition at line 148 of file veto.h.

◆ zFocusY

Float_t veto::zFocusY
private

Definition at line 148 of file veto.h.


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