villano-lab / k100Sim

Geant4 simulation for the K100 cryogenic setup at UMN
MIT License
0 stars 2 forks source link

include Matt's updates to the code #12

Open villaa opened 2 years ago

villaa commented 2 years ago

Matt made several updates to the code that have not been captured in this github repo. A lot of the improvements Matt made were related to the 241Am source encapsulation. It is very useful to have that source be realistic in the sim.

villaa commented 2 years ago

Here I attach the diff with the previous version of master. It's only about 350 lines or so. diffall.txt

villaa commented 2 years ago

Here is the diff, but just copied in text form:

     1  diff --git a/include/k100_DetectorConstruction.hh b/include/k100_DetectorConstruction.hh
     2  index 07aca4a..bdf8ccd 100644
     3  --- a/include/k100_DetectorConstruction.hh
     4  +++ b/include/k100_DetectorConstruction.hh
     5  @@ -224,11 +224,13 @@ private:
     6     G4Material* iceboxCuMat;
     7     G4Material* defaultMat;
     8     G4Material* aluminum, *steel, *brass, *helium, *super;
     9  +  G4Material* palladium, *silver, *gold; // MCF
    10     G4Material* stillHe,*MCHe;
    11     G4Material* blastsand;
    12     G4Material* carbonsteel;
    13     G4Material* lightaluminum;
    14     G4Material* wood;
    15  +  G4Material* kapton; // MCF
    16     G4Material* sodium_borate_anhydrous; //https://www.fishersci.com/shop/products/sodium-tetraborate-anhydrous-99-5-metals-basis-alfa-aesar-2/AA12305A7
    17     G4Material* G4NISTconcrete,*G4NISTair,*G4NISTNaI,*G4NISTPVC,*G4NISTPE,*G4NISTlucite,*G4NISTparaffin,*G4NISTstainless;
    18     G4Material* G4NISTAl;
    19  diff --git a/include/k100vars.hh b/include/k100vars.hh
    20  index 6fef110..564d336 100644
    21  --- a/include/k100vars.hh
    22  +++ b/include/k100vars.hh
    23  @@ -10,7 +10,9 @@
    24   
    25   
    26   G4double frame_x=-10.*2.54*cm, frame_y=-12.0*2.54*cm, frame_z=0.*cm;
    27  -G4double tower_x=0., tower_y=0., tower_z=-6.5*cm;
    28  +//MCF: update tower z position after changing tower composition from 1 to 3 detector housings
    29  +G4double tower_x=0., tower_y=0., tower_z=-2.8652*cm;
    30  +//G4double tower_x=0., tower_y=0., tower_z=-6.5*cm;
    31   //G4double tower_x=0., tower_y=0., tower_z=1.6643*cm; //updated 12/28/17 to get distance from floor right
    32   G4double fridge_x=0., fridge_y=0., fridge_z=0.;
    33   //G4double fridge_x=0., fridge_y=0., fridge_z=8.1643*cm; //updated 12/28/17 to get distance from floor right
    34  diff --git a/src/k100_DetectorConstruction.cc b/src/k100_DetectorConstruction.cc
    35  index c015978..1aba49a 100644
    36  --- a/src/k100_DetectorConstruction.cc
    37  +++ b/src/k100_DetectorConstruction.cc
    38  @@ -74,14 +74,14 @@ k100_DetectorConstruction::k100_DetectorConstruction()
    39     
    40     //
    41     NbOfTowers = 1;
    42  -  NbZipsPerTower = 1; // Corrected: Originally 2
    43  +  NbZipsPerTower = 1; // Corrected: Originally 2 
    44     NbOfZips = NbOfTowers * NbZipsPerTower;
    45     //
    46     ConstructExperimentBool = true;
    47     ConstructTowerBool = true;
    48     ConstructZipBool = true;
    49     ConstructVetoBool = false;
    50  -  ConstructShieldsBool = false;
    51  +  ConstructShieldsBool = true;
    52     ConstructIceBoxBool = false;
    53     ConstructFloorBool = false;
    54     ConstructWallsBool = false;
    55  @@ -285,6 +285,12 @@ void k100_DetectorConstruction::DefineMaterials()
    56     // Define Carbon
    57     G4Element* elementC=new G4Element(name="Carbon", symbol="C", z=6., a=12.011*g/mole);
    58   
    59  +  // Define Nitrogen (MCF) 
    60  +  G4Element* elementN=new G4Element(name="Nitrogen", symbol="N", z=7., a=14.0067*g/mole);
    61  +
    62  +  // Define Chlorine (MCF) 
    63  +  G4Element* elementCl=new G4Element(name="Chlorine", symbol="Cl", z=17., a=35.453*g/mole);
    64  +
    65     // Define Oxygen 
    66     G4Element* elementO=new G4Element(name="Oxygen", symbol="O", z=8., a=15.9994*g/mole);
    67   
    68  @@ -327,6 +333,16 @@ void k100_DetectorConstruction::DefineMaterials()
    69     // Define Zinc
    70     G4Element* elementZn = new G4Element(name="Zinc",symbol="Zn", z=30., a=65.38*g/mole);
    71   
    72  +  // add three more for Am source - mcf
    73  +  // Define Gold 
    74  +  G4Element* elementAu = new G4Element(name="Gold",symbol="Au", z=79., a=196.96657*g/mole);
    75  +
    76  +  // Define Silver
    77  +  G4Element* elementAg = new G4Element(name="Silver",symbol="Ag", z=47., a=107.8682*g/mole);
    78  +
    79  +  // Define Palladium
    80  +  G4Element* elementPd = new G4Element(name="Palladium",symbol="Pd", z=46., a=106.42*g/mole);
    81  +
    82     // ------------------------------------------------
    83   
    84     // ------------------------------------------------
    85  @@ -351,6 +367,13 @@ void k100_DetectorConstruction::DefineMaterials()
    86     WOOD->AddElement(elementO , 1);
    87     WOOD->AddElement(elementC , 2);
    88   
    89  +  //kapton (MCF) 
    90  +  G4Material* KAPTON = new G4Material(name="kapton", density=1.43*g/cm3, ncomponents=4);
    91  +  KAPTON->AddElement(elementC , 22);
    92  +  KAPTON->AddElement(elementH , 10);
    93  +  KAPTON->AddElement(elementN , 2);
    94  +  KAPTON->AddElement(elementO , 5);
    95  +
    96     //sodium borate anhydrous
    97     G4Material* sba = new G4Material(name="sodium_borate_anhydrous", density=2.367*g/cm3, ncomponents=3);
    98     sba->AddElement(elementB , 4);
    99  @@ -370,6 +393,11 @@ void k100_DetectorConstruction::DefineMaterials()
   100     NaI->AddElement(elementNa, natoms=1);
   101     NaI->AddElement(elementI, natoms=1);
   102   
   103  +  // Sodium Chloride (MCF) 
   104  +  G4Material* NaCl = new G4Material(name="NaCl", density = 0.9*g/cm3, ncomponents=2);
   105  +  NaCl->AddElement(elementNa, natoms=1);
   106  +  NaCl->AddElement(elementCl, natoms=1);
   107  +
   108     // Copper
   109     G4Material* Copper = new G4Material(name="Copper", density = 8.920*g/cm3, ncomponents=1);
   110     Copper->AddElement(elementCu, natoms=1);
   111  @@ -410,6 +438,19 @@ void k100_DetectorConstruction::DefineMaterials()
   112     G4Material* Zinc = new G4Material(name="Zinc", density = 7.14*g/cm3, ncomponents=1);
   113     Zinc->AddElement(elementZn, natoms=1);
   114   
   115  +  // add 3 more - mcf
   116  +  // Gold
   117  +  G4Material* Gold = new G4Material(name="Gold", density = 19.282*g/cm3, ncomponents=1);
   118  +  Gold->AddElement(elementAu, natoms=1);
   119  +
   120  +  // Silver
   121  +  G4Material* Silver = new G4Material(name="Silver", density = 10.501*g/cm3, ncomponents=1);
   122  +  Silver->AddElement(elementAg, natoms=1);
   123  +
   124  +  // Palladium
   125  +  G4Material* Palladium = new G4Material(name="Palladium", density = 12.02*g/cm3, ncomponents=1);
   126  +  Palladium->AddElement(elementPd, natoms=1);
   127  +
   128     // Scintillator
   129     G4Material* Scint =new G4Material(name="Scintillator",density = 1.032*g/cm3, ncomponents=2) ;
   130     Scint->AddElement(elementH, natoms=11);
   131  @@ -573,7 +614,7 @@ void k100_DetectorConstruction::DefineMaterials()
   132     // Assign materials to some of the major components
   133   
   134     defaultMat = Vacuum;
   135  -  zipGeMat = Germanium;
   136  +  zipGeMat = Germanium; // MPB: I changed this to make a sim for Matt.  mcf: changed back to germanium
   137     zipSiMat = Silicon;
   138     towerMat = Copper;
   139     scintMat = Scint;
   140  @@ -591,6 +632,7 @@ void k100_DetectorConstruction::DefineMaterials()
   141     lightaluminum=LightAluminum;
   142     sodium_borate_anhydrous=sba;
   143     wood=WOOD;
   144  +  kapton=KAPTON; // MCF
   145     steel=Steel;
   146     carbonsteel=StandardSteel;
   147     brass=Brass;
   148  @@ -598,6 +640,10 @@ void k100_DetectorConstruction::DefineMaterials()
   149     stillHe=stillLiquid;
   150     MCHe=MCLiquid;
   151     super=Super;
   152  +  // three more - mcf
   153  +  palladium=Palladium;
   154  +  silver=Silver;
   155  +  gold=Gold;
   156     // ------------------------------------------------
   157   
   158     G4cout << *(G4Material::GetMaterialTable()) << G4endl;
   159  @@ -944,7 +990,8 @@ void k100_DetectorConstruction::FillTheTower(G4VPhysicalVolume* physicalTower, G
   160     //G4cout << "Zip Array Position In Tower: " << Tower_zPcut[1] - (zPcut[1]-zPcut[0]) - (zPclc[1]-zPclc[0]) - 2*zHctu - zHrb - (zPudh[1]-zPudh[0]) - zPsdh[1] << G4endl; 
   161     G4cout << "Zip Array Position In Tower: " << z0-voidThk/2.0 << G4endl;
   162     G4cout << "Zip Height Above Floor: " << tower_z-floorZ-z0+Zip_z/2.0+(zPsdh[1]-zPsdh[0]-Zip_z)/2.0  << G4endl;
   163  - //Corrected from: G4ThreeVector(0,0,Tower_zPcut[0]+(zPldh[1]-zPldh[0]) + zPsdh[1]);
   164  +  G4cout << "Zip Top Surface: " << tower_z-(z0-voidThk/2.0)+Zip_z/2.0  << G4endl;
   165  +//Corrected from: G4ThreeVector(0,0,Tower_zPcut[0]+(zPldh[1]-zPldh[0]) + zPsdh[1]);
   166     //G4Tubs* solidZipArray = new G4Tubs("ZipArray_S", 0.0, Zip_Rout, 6*Zip_Househeight/2,  0, 2*pi);
   167     G4Tubs* solidZipArray = new G4Tubs("ZipArray_S", 0.0, Zip_Rout, voidThk/2,  0, 2*pi);
   168   
   169  @@ -1243,7 +1290,6 @@ void k100_DetectorConstruction::ConstructTowerGuts(G4VPhysicalVolume* physicalTo
   170     G4PVPlacement* cu_ctup1=new G4PVPlacement(0,position_ctu,"ctup1",cu_ctul1,physicalTower,false,0);
   171     cu_ctul1->SetVisAttributes(VisAttCu3); 
   172   
   173  -
   174     //--------------------------------------------------------------
   175     //Next, ring at base of connector tube, mass 0.051 kg/tower
   176     //--------------------------------------------------------------
   177  @@ -1280,10 +1326,120 @@ void k100_DetectorConstruction::ConstructTowerGuts(G4VPhysicalVolume* physicalTo
   178     cu_sdhl1->SetVisAttributes(VisAttCu3);
   179     //cu_sdhl1->SetVisAttributes(G4VisAttributes::Invisible);  // Make Invisible
   180   
   181  +  // MCF add smoke-detector Am source and associated parts
   182  +  //G4double collimator_to_detector = 0.25*cm; // this is for source mounted on plate
   183  +  //G4double collimator_radius = 0.5*2.54*cm; // this is for source mounted on plate
   184  +  G4double collimator_to_detector = 0.254*2.54*cm; // this is for source mover carriage
   185  +  G4double collimator_radius = 0.1875*2.54*cm; // this is for source mover carriage
   186  +  //------------------------------------------------------------------
   187  +  //Next, lead collimator
   188  +  //------------------------------------------------------------------
   189  +  G4double collimator_zpos = Tower_zPcut[1] - (zPcut[1]-zPcut[0]) - (zPclc[1]-zPclc[0]) - 2*zHctu - zHrb - (zPudh[1]-zPudh[0]) - zPsdh[1] - Zip_z/2.0 - 0.033*2.54*cm - collimator_to_detector;
   190  +  G4ThreeVector position_collimator = G4ThreeVector(0,0,collimator_zpos); 
   191  +  G4Tubs* pb_collimator_s=new G4Tubs("pb_collimator",0.009*2.54*cm,collimator_radius,0.033*2.54*cm,0.*deg,360.*deg); // corrected from earlier versions, had 0.018*2 diam hole
   192  +  G4LogicalVolume* pb_collimator_l=new G4LogicalVolume(pb_collimator_s,shieldPbMat,"collimator_l");
   193  +  G4PVPlacement* pb_collimator_p=new G4PVPlacement(0,position_collimator,"collimator_p",pb_collimator_l,physicalTower,false,0);
   194  +  G4VisAttributes* VisAttCollimator = new G4VisAttributes(G4Colour(3.,3.,3.));
   195  +  pb_collimator_l->SetVisAttributes(VisAttCollimator);  
   196  +  //------------------------------------------------------------------
   197  +  //add kapton tape over collimator hole
   198  +  //------------------------------------------------------------------
   199  +  G4ThreeVector position_coll_kapton = G4ThreeVector(0,0,collimator_zpos+0.033*2.54*cm+0.004*2.54*cm); 
   200  +  G4Tubs* coll_kapton_s=new G4Tubs("coll_kapton",0,0.125*2.54*cm,0.004*2.54*cm,0.*deg,360.*deg); // 1cm diam, 4 mil thick
   201  +  G4LogicalVolume* coll_kapton_l=new G4LogicalVolume(coll_kapton_s,kapton,"coll_kapton_l");
   202  +  G4PVPlacement* coll_kapton_p=new G4PVPlacement(0,position_coll_kapton,"coll_kapton_p",coll_kapton_l,physicalTower,false,0);
   203  +  G4VisAttributes* VisAttCollKap = new G4VisAttributes(G4Colour(255.,255.,0));
   204  +  coll_kapton_l->SetVisAttributes(VisAttCollKap);
   205  +  // MCF add smoke-detector Am source
   206  +  //------------------------------------------------------------------
   207  +  //Brass source carriage - SOURCE-MOVER SETUP ONLY
   208  +  //------------------------------------------------------------------
   209  +  G4Box* amcarriage_0_s = new G4Box("amcarriage_0",0.205*2.54*cm,0.205*2.54*cm,0.185*2.54*cm); 
   210  +  G4Tubs* amcarriage_bighole_s=new G4Tubs("amcarriage_bighole",0,0.1875*2.54*cm+0.001*2.54*cm,0.135*2.54*cm,0.*deg,360.*deg);
   211  +  G4Tubs* amcarriage_smallhole_s=new G4Tubs("amcarriage_smallhole",0,0.02*2.54*cm,0.05*2.54*cm,0.*deg,360.*deg);
   212  +  G4ThreeVector amc_bh_pos(0.,0.,-0.185*2.54*cm+0.135*2.54*cm);
   213  +  G4ThreeVector amc_sh_pos(0.,0.,0.185*2.54*cm-0.05*2.54*cm);
   214  +  G4RotationMatrix noRot;
   215  +  G4Transform3D amc_bh_off(noRot,amc_bh_pos);
   216  +  G4Transform3D amc_sh_off(noRot,amc_sh_pos);
   217  +  G4SubtractionSolid* amcarriage_1_s = new G4SubtractionSolid("amcarriage_1",amcarriage_0_s,amcarriage_bighole_s,amc_bh_off);
   218  +  G4SubtractionSolid* amcarriage_s = new G4SubtractionSolid("amcarriage",amcarriage_1_s,amcarriage_smallhole_s,amc_sh_off);
   219  +  G4ThreeVector position_amcarriage = G4ThreeVector(0,0,collimator_zpos+0.033*2.54*cm+0.008*2.54*cm+0.1*2.54*cm-0.185*2.54*cm); // position depends on collimator and kapton 
   220  +  G4LogicalVolume* amcarriage_l=new G4LogicalVolume(amcarriage_s,brass,"amcarriage_l");
   221  +  G4PVPlacement* amcarriage_p=new G4PVPlacement(0,position_amcarriage,"amcarriage_p",amcarriage_l,physicalTower,false,0);
   222  +  G4VisAttributes* VisBrass = new G4VisAttributes(G4Colour(255/255.,215/255.,0/255.));
   223  +  amcarriage_l->SetVisAttributes(VisBrass);
   224  +  //------------------------------------------------------------------
   225  +  //Brass ring which holds Am source - SOURCE-MOVER SETUP ONLY
   226  +  //------------------------------------------------------------------
   227  +  G4ThreeVector position_amring = G4ThreeVector(0,0,collimator_zpos-0.033*2.54*cm-1.74005*mm); // this piece sits atop collimator 
   228  +  G4Tubs* amring_s=new G4Tubs("amring",0.085*2.54*cm+0.001*2.54*cm,0.1875*2.54*cm,1.74005*mm,0.*deg,360.*deg); 
   229  +  G4LogicalVolume* amring_l=new G4LogicalVolume(amring_s,brass,"amring_l");
   230  +  G4PVPlacement* amring_p=new G4PVPlacement(0,position_amring,"amring_p",amring_l,physicalTower,false,0);
   231  +  amring_l->SetVisAttributes(VisBrass);
   232  +  //------------------------------------------------------------------
   233  +  //Next, Am source encapsulation
   234  +  //------------------------------------------------------------------
   235  +  G4Tubs* amencaps_0_s=new G4Tubs("amencaps_0",0,0.085*2.54*cm,1.72735*mm,0.*deg,360.*deg); 
   236  +  G4Tubs* amencaps_hole_s=new G4Tubs("amencaps_hole",0,0.045*2.54*cm+0.001*mm,0.35575*mm,0.*deg,360.*deg);
   237  +  G4ThreeVector amenc_h_pos(0.,0.,1.72735*mm-0.35575*mm);
   238  +  //G4RotationMatrix noRot;
   239  +  G4Transform3D amenc_h_off(noRot,amenc_h_pos);
   240  +  G4SubtractionSolid* amencaps_s = new G4SubtractionSolid("amencaps",amencaps_0_s,amencaps_hole_s,amenc_h_off);
   241  +  G4ThreeVector position_amencaps = G4ThreeVector(0,0,collimator_zpos-0.033*2.54*cm-1.72735*mm-0.001*mm); // this piece sits atop collimator 
   242  +  G4LogicalVolume* amencaps_l=new G4LogicalVolume(amencaps_s,carbonsteel,"amencaps_l");
   243  +  G4PVPlacement* amencaps_p=new G4PVPlacement(0,position_amencaps,"amencaps_p",amencaps_l,physicalTower,false,0);
   244  +  G4VisAttributes* VisAttAmEn = new G4VisAttributes(G4Colour(80.,80.,120.));
   245  +  amencaps_l->SetVisAttributes(VisAttAmEn);
   246  +  //------------------------------------------------------------------
   247  +  //Next, Am source: Pd upper layer, Au middle layer, Ag lower layer
   248  +  //------------------------------------------------------------------
   249  +  G4ThreeVector position_amfoil_upper = G4ThreeVector(0,0,collimator_zpos-0.033*2.54*cm-0.75e-3*mm-0.02*2.54*cm); // collimator-to-source gap of 0.02 inches 
   250  +  G4Tubs* amfoil_upper_s=new G4Tubs("amfoil_upper",0,0.045*2.54*cm,0.75e-3*mm,0.*deg,360.*deg); // 0.09" diam, 1.5 um thick
   251  +  G4LogicalVolume* amfoil_upper_l=new G4LogicalVolume(amfoil_upper_s,palladium,"amfoil_upper_l");
   252  +  G4PVPlacement* amfoil_upper_p=new G4PVPlacement(0,position_amfoil_upper,"amfoil_upper_p",amfoil_upper_l,physicalTower,false,0);
   253  +  G4VisAttributes* VisAttAmUp = new G4VisAttributes(G4Colour(255.,0,0));
   254  +  amfoil_upper_l->SetVisAttributes(VisAttAmUp);
   255  +  //  
   256  +  G4ThreeVector position_amfoil_middle = G4ThreeVector(0,0,collimator_zpos-0.033*2.54*cm-0.75e-3*mm-0.02*2.54*cm-0.75e-3*mm-1.0e-3*mm);
   257  +  G4Tubs* amfoil_middle_s=new G4Tubs("amfoil_middle",0,0.045*2.54*cm,1.0e-3*mm,0.*deg,360.*deg); // 0.09" diam, 2.0 um thick
   258  +  G4LogicalVolume* amfoil_middle_l=new G4LogicalVolume(amfoil_middle_s,gold,"amfoil_middle_l");
   259  +  G4PVPlacement* amfoil_middle_p=new G4PVPlacement(0,position_amfoil_middle,"amfoil_middle_p",amfoil_middle_l,physicalTower,false,0);
   260  +  G4VisAttributes* VisAttAmMid = new G4VisAttributes(G4Colour(0,255.,0));
   261  +  amfoil_middle_l->SetVisAttributes(VisAttAmMid);
   262  +  G4cout << "Americium zcenter: " << tower_z-(collimator_zpos-0.033*2.54*cm-0.75e-3*mm-0.02*2.54*cm-0.75e-3*mm-1.0e-3*mm)  << G4endl;
   263  +  G4cout << "Americium zcenter -58.0559 in um: " << 1.e3*(tower_z-(collimator_zpos-0.033*2.54*cm-0.75e-3*mm-0.02*2.54*cm-0.75e-3*mm-1.0e-3*mm))-58055.9  << G4endl;
   264  +  G4cout << "Americium rad, half-thick: " << 0.045*2.54*cm <<" "<< 1.0e-3*mm << G4endl;
   265  +  //  
   266  +  G4ThreeVector position_amfoil_lower = G4ThreeVector(0,0,collimator_zpos-0.033*2.54*cm-0.75e-3*mm-0.02*2.54*cm-0.75e-3*mm-1.0e-3*mm-1.0e-3*mm-100.e-3*mm);
   267  +  G4Tubs* amfoil_lower_s=new G4Tubs("amfoil_lower",0,0.045*2.54*cm,100.e-3*mm,0.*deg,360.*deg); // 0.09" diam, 200 um thick
   268  +  G4LogicalVolume* amfoil_lower_l=new G4LogicalVolume(amfoil_lower_s,silver,"amfoil_lower_l");
   269  +  G4PVPlacement* amfoil_lower_p=new G4PVPlacement(0,position_amfoil_lower,"amfoil_lower_p",amfoil_lower_l,physicalTower,false,0);
   270  +  G4VisAttributes* VisAttAmLow = new G4VisAttributes(G4Colour(0,0,255.));
   271  +  amfoil_lower_l->SetVisAttributes(VisAttAmLow);
   272  +
   273  +  //------------------------------------------------------------------
   274  +  //Next, source holder plate. This version for SOURCE MOVER ONLY
   275  +  //------------------------------------------------------------------
   276  +  G4double zsplt[2] = {-0.0215*2.54*cm,0.0215*2.54*cm};
   277  +  G4double risplt[2] = {0,0};
   278  +  G4double rosplt[2] = {1.995*2.54*cm,1.995*2.54*cm};
   279  +  G4Polyhedra* sourceplate_0_s = new G4Polyhedra("sourceplate_0",0.*deg,360.*deg,6,2,zsplt,risplt,rosplt);
   280  +  G4Box* sourceplate_slit_s = new G4Box("sourceplate_slit", 0.0625*2.54*cm, 1.5*2.54*cm, 0.0215*2.54*cm+0.025*mm);
   281  +  G4ThreeVector sourceplate_slit_pos(0.,0.43*2.54*cm,0.);
   282  +  //G4RotationMatrix noRot;
   283  +  G4Transform3D sourceplate_slit_off(noRot,sourceplate_slit_pos);
   284  +  G4SubtractionSolid* sourceplate_s = new G4SubtractionSolid("sourceplate",sourceplate_0_s,sourceplate_slit_s,sourceplate_slit_off);
   285  +  G4ThreeVector position_sourceplate = G4ThreeVector(0,0,collimator_zpos+0.033*2.54*cm+0.15*2.54*cm+0.0215*2.54*cm); // 0.15 in below collimator 
   286  +  G4LogicalVolume* sourceplate_l=new G4LogicalVolume(sourceplate_s,towerMat,"sourceplate_l");
   287  +  G4PVPlacement* sourceplate_p=new G4PVPlacement(0,position_sourceplate,"sourceplate_p",sourceplate_l,physicalTower,false,0);
   288  +  sourceplate_l->SetVisAttributes(VisAttCu4);
   289   
   290     //------------------------------------------------------------------
   291     //Next, the lower cap of the detector housing, mass 0.078 kg/tower
   292     //------------------------------------------------------------------
   293  +  // MCF remove housing lid
   294  +  /*
   295     G4ThreeVector position_ldh = G4ThreeVector(0,0, Tower_zPcut[1] - (zPcut[1]-zPcut[0]) - (zPclc[1]-zPclc[0]) - 2*zHctu - zHrb - (zPudh[1]-zPudh[0]) - (zPsdh[1]-zPsdh[0]) - zPldh[1] ); 
   296     G4cout << "z shift for lower det housing cap: " << Tower_zPcut[1] - (zPcut[1]-zPcut[0]) - (zPclc[1]-zPclc[0]) - 2*zHctu - zHrb - (zPudh[1]-zPudh[0]) - (zPsdh[1]-zPsdh[0]) - zPldh[1] << G4endl;
   297     G4cout << "Height of lower det housing cap: " << zPldh[1] - zPldh[0] << G4endl;
   298  @@ -1291,7 +1447,7 @@ void k100_DetectorConstruction::ConstructTowerGuts(G4VPhysicalVolume* physicalTo
   299     G4LogicalVolume* cu_ldhl1 = new G4LogicalVolume(cu_ldhs,towerMat,"ldhl1");
   300     G4PVPlacement* cu_ldhp1 = new G4PVPlacement(0,position_ldh,"ldhp1",cu_ldhl1,physicalTower,false,0);
   301     cu_ldhl1->SetVisAttributes(VisAttCu2);
   302  -
   303  +  */
   304   
   305   
   306     //------------------------------------------------------------------
   307  diff --git a/src/k100_DetectorParameterDef.icc b/src/k100_DetectorParameterDef.icc
   308  index d8a33bd..acba8c0 100644
   309  --- a/src/k100_DetectorParameterDef.icc
   310  +++ b/src/k100_DetectorParameterDef.icc
   311  @@ -60,12 +60,20 @@ sdcx_lenH[5]=5.294*cm; //8.34*cm;
   312   sdcx_radius = 4.18*cm;
   313   
   314   // Tower Size
   315  -Tower_zPcut[0]= (zPcut[0] + zPclc[0] - zHctu  - zHrb/2 + zPudh[0] + zPsdh[0] + zPldh[0] - 1*microHair); 
   316  -Tower_zPcut[1]= (zPcut[1] + zPclc[1] + zHctu  + zHrb/2 + zPudh[1] + zPsdh[1] + zPldh[1] + 1*microHair);
   317  +// MCF: modifying the size of the tower world to accomodate 3 detector housings
   318  +// for typical K100 setups, can include electrode housing, detector housing, source housing
   319  +// note that this affects tower placement. Tower z-placement is with reference to tower center
   320  +// since we are adding 2 extra housings, tower should be placed 1 housing-height higher. that's 3.6348 cm
   321  +//Tower_zPcut[0]= (zPcut[0] + zPclc[0] - zHctu  - zHrb/2 + zPudh[0] + zPsdh[0] + zPldh[0] - 1*microHair); 
   322  +//Tower_zPcut[1]= (zPcut[1] + zPclc[1] + zHctu  + zHrb/2 + zPudh[1] + zPsdh[1] + zPldh[1] + 1*microHair);
   323  +Tower_zPcut[0]= (zPcut[0] + zPclc[0] - zHctu  - zHrb/2 + zPudh[0] + 3.0*zPsdh[0] + zPldh[0] - 1*microHair); 
   324  +Tower_zPcut[1]= (zPcut[1] + zPclc[1] + zHctu  + zHrb/2 + zPudh[1] + 3.0*zPsdh[1] + zPldh[1] + 1*microHair);
   325   Tower_rIcut[0]= 0.*cm; Tower_rIcut[1]= 0.*cm;
   326   //Tower_rOcut[0]= (rOsdh[0] + 0.2*cm + 1*microHair); /// The 0.2 is to allow for the side coax thickness, it will be replaced by a variable
   327   Tower_rOcut[0]= (rOsdh[0] + 0.4*cm + 1*microHair); /// The 0.2 is to allow for the side coax thickness, it will be replaced by a variable
   328  -Tower_rOcut[1]= (sdcx_radius + sdcx_thicknessH + 1*microHair);
   329  +// MCF: modify the smaller radius of the tower world, make the same as the larger radius
   330  +//Tower_rOcut[1]= (sdcx_radius + sdcx_thicknessH + 1*microHair);
   331  +Tower_rOcut[1]=Tower_rOcut[0];
   332   
   333   
   334   
   335  @@ -107,6 +115,8 @@ DetBoxShim = 0.1*micrometer;
   336   // -----------------------
   337   Zip_Rout = 5.0*cm; //Corrected from 3.81*cm; 
   338   Zip_z = 1.312*2.54*cm; //Corrected from 2.54*cm; 
   339  +//Zip_z = 1.0*cm; //MPB: test to get muon spectrum for 1cm Ge
   340  +//Zip_z = 0.025*cm; //MPB: test to get muon spectrum for 0.025cm Ge
   341   Zip_Flat_R1 = Zip_Rout*0.983744; //Corrected from  Zip_Rout*0.9473333;
   342   Zip_Flat_R2 = Zip_Rout; //Corrected from Zip_Rout*0.9906666;
   343   // -----------------------