Skip to content

Commit

Permalink
stab at using the beam to get elastic events at the MD. this proceduc…
Browse files Browse the repository at this point in the history
…es 1e7 events in about 4.5ks and results in about 500 events at the MD
  • Loading branch information
cipriangal committed Feb 24, 2024
1 parent 25da657 commit da999a7
Show file tree
Hide file tree
Showing 7 changed files with 163 additions and 12 deletions.
30 changes: 30 additions & 0 deletions geometry/mollerParallel.gdml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,26 @@
<auxiliary auxtype="DetNo" auxvalue="5556"/>
</volume>

<volume name="tgtEntVirtualPlane_log">
<materialref ref="G4_Galactic"/>
<solidref ref="smallVirtualPlane_solid"/>
<auxiliary auxtype="Visibility" auxvalue="true"/>
<auxiliary auxtype="Color" auxvalue="yellow"/>
<auxiliary auxtype="Alpha" auxvalue="1"/>
<auxiliary auxtype="SensDet" auxvalue="planeDet"/>
<auxiliary auxtype="DetNo" auxvalue="5687"/>
</volume>

<volume name="tgtExitVirtualPlane_log">
<materialref ref="G4_Galactic"/>
<solidref ref="smallVirtualPlane_solid"/>
<auxiliary auxtype="Visibility" auxvalue="true"/>
<auxiliary auxtype="Color" auxvalue="yellow"/>
<auxiliary auxtype="Alpha" auxvalue="1"/>
<auxiliary auxtype="SensDet" auxvalue="planeDet"/>
<auxiliary auxtype="DetNo" auxvalue="5688"/>
</volume>

<volume name="collar0EntVirtualPlane_log">
<materialref ref="G4_Galactic"/>
<solidref ref="smallVirtualPlane_solid"/>
Expand Down Expand Up @@ -986,6 +1006,16 @@
<position name="collar0USVirtualPlane_pos" unit="mm" z="-1210"/>
</physvol>

<physvol name="tgtEntVirtualPlane_phys">
<volumeref ref="tgtEntVirtualPlane_log"/>
<position name="tgtEntVirtualPlane_pos" unit="mm" z="-5300"/>
</physvol>

<physvol name="tgtExitVirtualPlane_phys">
<volumeref ref="tgtExitVirtualPlane_log"/>
<position name="tgtExitVirtualPlane_pos" unit="mm" z="-3790"/>
</physvol>

<physvol name="collar0DSVirtualPlane_phys">
<volumeref ref="collar0ExitVirtualPlane_log"/>
<position name="collar0DSVirtualPlane_pos" unit="mm" z="-990"/>
Expand Down
63 changes: 57 additions & 6 deletions geometry/target/subTargetRegion.gdml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,17 @@
<zplane rmin="0" rmax="68" z="-3190.0"/>
<zplane rmin="0" rmax="68" z="-1000.0"/>
</polycone>


<tube name="refuseLowR_solid" rmin="0.0" rmax="3.85" z="1"
deltaphi="360" startphi="0" aunit="deg" lunit="mm"/>

<tube name="refuseHighR_solid" rmin="14.35" rmax="200" z="1"
deltaphi="360" startphi="0" aunit="deg" lunit="mm"/>

<tube name="acceptance_solid" rmin="0" rmax="200" z="1"
deltaphi="360" startphi="0" aunit="deg" lunit="mm"/>

</solids>

<structure>
Expand Down Expand Up @@ -334,16 +345,22 @@

<!-- target chamber-->
<volume name="target_chamber_vol1">
<materialref ref="G4_Al"/>
<!-- <materialref ref="G4_Al"/> -->
<materialref ref="Kryptonite"/>
<solidref ref="Tube_target_chamber_1"/>
<auxiliary auxtype="Color" auxvalue="red"/>
</volume>
<volume name="target_chamber_vol2">
<materialref ref="G4_Al"/>
<!-- <materialref ref="G4_Al"/> -->
<materialref ref="Kryptonite"/>
<solidref ref="Tube_target_chamber_2"/>
<auxiliary auxtype="Color" auxvalue="red"/>
</volume>
<volume name="target_chamber_vol3">
<materialref ref="G4_Al"/>
<!-- <materialref ref="G4_Al"/> -->
<materialref ref="Kryptonite"/>
<solidref ref="target_entry_window_subtraction"/>
<auxiliary auxtype="Color" auxvalue="red"/>
</volume>
<volume name="target_chamber_vol5">
<materialref ref="G4_Al"/>
Expand Down Expand Up @@ -375,14 +392,33 @@
<materialref ref="G4_Al"/>
<solidref ref="Target_exit_window_Tube_5"/>
<auxiliary auxtype="Color" auxvalue="cyan"/>
</volume>
</volume>
<volume name="TubeVol6">
<materialref ref="G4_Al"/>
<solidref ref="Target_exit_window_Tube_6"/>
<auxiliary auxtype="Color" auxvalue="cyan"/>
</volume>



<volume name="acceptance_logic">
<materialref ref="G4_Galactic"/>
<solidref ref="acceptance_solid"/>
<auxiliary auxtype="Color" auxvalue="green"/>
</volume>

<volume name="refuseLowR_logic">
<materialref ref="Kryptonite"/>
<solidref ref="refuseLowR_solid"/>
<auxiliary auxtype="Color" auxvalue="red"/>
</volume>

<volume name="refuseHighR_logic">
<materialref ref="Kryptonite"/>
<solidref ref="refuseHighR_solid"/>
<auxiliary auxtype="Color" auxvalue="red"/>
</volume>



<!-- pipe from target exit window to bellow1 -->
<volume name="connecting_pipe_volume_1">
<materialref ref="G4_Al"/>
Expand Down Expand Up @@ -522,6 +558,21 @@
<volumeref ref="flange_vol_1"/>
<position name="flange_pos_1" unit="mm" x="0.0" y="0.0" z="877.01+0.635+6.35+12.7+1.524+134.42+28.45"/>
</physvol>

<physvol name="acceptance">
<volumeref ref="acceptance_logic"/>
<position name="acceptance_pos" unit="mm" z="660"/>
</physvol>

<physvol name="refuseLowR">
<volumeref ref="refuseLowR_logic"/>
<position name="refuseLowR_pos" unit="mm" z="700"/>
</physvol>

<physvol name="refuseHighR">
<volumeref ref="refuseHighR_logic"/>
<position name="refuseHighR_pos" unit="mm" z="700"/>
</physvol>

</volume>

Expand Down
13 changes: 9 additions & 4 deletions geometry/target/targetLadder.gdml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@

<box name="TargetCFoil_solid" x="25*mm" y="25*mm" z="1*mm"/>

<tube name="Target_HighZTarget_solid"
aunit="deg" lunit="mm" deltaphi="360"
rmax="20" rmin="0" z="0.3175"/>

</solids>

<structure>
Expand Down Expand Up @@ -124,9 +128,10 @@
<auxiliary auxtype="TargetSamplingVolume" auxvalue="USAl"/>
</volume>
<volume name="TargetAlDummy2pctDS_logical">
<materialref ref="G4_Al"/>
<solidref ref="TargetAlDummy2pct_solid"/>
<auxiliary auxtype="TargetSamplingVolume" auxvalue="DSAl"/>
<materialref ref="G4_Ta"/>
<solidref ref="Target_HighZTarget_solid"/>
<auxiliary auxtype="TargetSamplingVolume" auxvalue="HighZ"/>
<auxiliary auxtype="Color" auxvalue="yellow"/>
</volume>
<volume name="TargetAlDummy2pctUS_logical">
<materialref ref="G4_Al"/>
Expand Down Expand Up @@ -165,7 +170,7 @@
<solidref ref="TargetPosition_solid"/>
<physvol>
<volumeref ref="TargetAlDummy2pctDS_logical"/>
<position z="+125/2*cm"/>
<position z="0"/>
</physvol>
<auxiliary auxtype="TargetSystem" auxvalue="AlDummy2DS"/>
</volume>
Expand Down
52 changes: 52 additions & 0 deletions macros/runexample_heavyZ.mac
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Example file

# This must be called before initialize
/remoll/geometry/setfile geometry/mollerMother.gdml
/remoll/parallel/setfile geometry/mollerParallel.gdml

# This must be explicitly called
/run/initialize

# Set target ladder position
/remoll/geometry/absolute_position targetLadder (0,490,0)
/remoll/target/mother AlDummy2DS
/remoll/target/volume HighZ

# Load magnetic fields
/control/execute macros/load_magnetic_fieldmaps.mac

# Raster and initial angle stuff
/remoll/oldras true
/remoll/rasx 0.1 mm
/remoll/rasy 0.1 mm
/remoll/evgen/set beam
/remoll/beamcurr 65 microampere
/remoll/beamene 11 GeV

/remoll/kryptonite/enable
/remoll/kryptonite/add Kryptonite
/remoll/kryptonite/list

/remoll/SD/disable_all

/remoll/SD/enable 28
/remoll/SD/detect secondaries 28
/remoll/SD/detect boundaryhits 28

##coll2 exit
/remoll/SD/enable 39
/remoll/SD/detect boundaryhits 39

###coll4 exit
# /remoll/SD/enable 45
# /remoll/SD/detect boundaryhits 45

/remoll/tracking/set 0

/remoll/seed 123456

/remoll/filename o_Ta_1e7.root

/remoll/target/print
/run/beamOn 10000000

2 changes: 1 addition & 1 deletion src/remollBeamTarget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ remollVertex remollBeamTarget::SampleVertex(SamplingType_t sampling_type)
// Gaussian distribution with mean and sigma
bmth = G4RandGauss::shoot(fTh0, fdTh);
bmph = G4RandGauss::shoot(fPh0, fdPh);

if( fRasterX > 0 ){ bmth += fCorrTh*(rasx-fX0)/fRasterX/2; }
if( fRasterY > 0 ){ bmph += fCorrPh*(rasy-fY0)/fRasterY/2; }

Expand Down
2 changes: 1 addition & 1 deletion src/remollGenBeam.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ remollGenBeam::remollGenBeam()
fIsotropicThetaMax(2.0*pi),
fCorrelation(0.0653*mrad/mm,0.0653*mrad/mm,0.0),
fPolarization(0.0,0.0,0.0),
fRaster(5*mm,5*mm,0.0),
fRaster(0.1*mm,0.1*mm,0.0),
fRasterRefZ(-4.5*m),
fParticleName("e-")
{
Expand Down
13 changes: 13 additions & 0 deletions src/remollSteppingAction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,17 @@ remollSteppingAction::~remollSteppingAction()

void remollSteppingAction::UserSteppingAction(const G4Step *aStep)
{
G4StepPoint* thePrePoint = aStep->GetPreStepPoint();
G4VPhysicalVolume* thePrePV = thePrePoint->GetPhysicalVolume();
G4StepPoint* thePostPoint = aStep->GetPostStepPoint();
G4VPhysicalVolume* thePostPV = thePostPoint->GetPhysicalVolume();

if(!thePostPV || !thePrePV) return;

//G4cout<<">>> "<<pv->GetName()<<G4endl;
//std::cin.ignore();
if (((thePrePV->GetName()).contains("acceptance") || (thePostPV->GetName()).contains("acceptance")))
if (aStep->GetTrack()->GetKineticEnergy() < 2*CLHEP::GeV)
aStep->GetTrack()->SetTrackStatus(fStopAndKill);

}

0 comments on commit da999a7

Please sign in to comment.