Back to home page

EIC code displayed by LXR

 
 

    


Warning, /firebird/firebird-ng/src/app/theme/geometry-ruleset.ts is written in an unsupported language. File is not indexed.

0001 
0002 import * as THREE from "three";
0003 import {disposeHierarchy, getColorOrDefault} from "../utils/three.utils";
0004 
0005 export const modernRules = [
0006   // Solenoid components - Light blue-gray with a touch more color
0007   {
0008     names: ["SolenoidBarrel_assembly_0", "SolenoidEndcapP_1", "SolenoidEndcapN_2"],
0009     rules: [
0010       {
0011         color: 0xCFD8DC,  // Blue Gray 100 - light blue-gray (slightly more saturated)
0012         merge: true,
0013         outline: true
0014       }
0015     ]
0016   },
0017 
0018   // Trackers - Warm light peach with a touch more color
0019   {
0020     names: ["InnerSiTrackerSubAssembly_4", "MiddleSiTrackerSubAssembly_5", "OuterSiTrackerSubAssembly_6", "B0TrackerSubAssembly_12"],
0021     rules: [
0022       {
0023         color: 0xFFCC80,  // Orange 200 - slightly more vibrant peach
0024         merge: true,
0025         outline: true
0026       }
0027     ]
0028   },
0029 
0030   // MPGD Trackers - Light warm yellow with a touch more color
0031   {
0032     names: ["EndcapMPGDSubAssembly_7", "InnerMPGDBarrelSubAssembly_8", "OuterBarrelMPGDSubAssembly_11"],
0033     rules: [
0034       {
0035         color: 0xFFF59D,  // Yellow 200 - light yellow with more saturation
0036         merge: true,
0037         outline: true
0038       }
0039     ]
0040   },
0041 
0042   // TOF components - Light blue with more color
0043   {
0044     names: ["EndcapTOFSubAssembly_9", "BarrelTOFSubAssembly_10"],
0045     rules: [
0046       {
0047         color: 0xB3E5FC,  // Light Blue 100 - light blue with more saturation
0048         merge: true,
0049         outline: true
0050       }
0051     ]
0052   },
0053 
0054   // Inner tracker support - White with slight blue tint
0055   {
0056     name: "InnerTrackerSupport_assembly_13",
0057     rules: [
0058       {
0059         material: new THREE.MeshStandardMaterial({
0060           color: 0xE1F5FE,  // Light Blue 50 - extremely light blue
0061           roughness: 0.5,
0062           metalness: 0.1,
0063           transparent: true,
0064           opacity: 0.5,
0065           blending: THREE.NormalBlending,
0066           depthWrite: false,
0067           polygonOffset: true,
0068           polygonOffsetFactor: 1,
0069           side: THREE.DoubleSide
0070         }),
0071         outline: true,
0072         outlineColor: 0xEEEEEE,  // Light gray outline
0073         merge: true,
0074         newName: "InnerTrackerSupport"
0075       }
0076     ]
0077   },
0078 
0079   // DIRC - Light cyan/blue with more color
0080   {
0081     name: "DIRC_14",
0082     rules: [
0083       {
0084         patterns: ["**/*box*", "**/*prism*"],
0085         material: new THREE.MeshPhysicalMaterial({
0086           color: 0xB2EBF2,  // Cyan 100 - light cyan with more saturation
0087           metalness: .4,
0088           roughness: .2,
0089           envMapIntensity: 0.5,
0090           clearcoat: 0.8,
0091           transparent: true,
0092           opacity: .5,
0093           reflectivity: 0.2,
0094           ior: 0.9,
0095           side: THREE.DoubleSide,
0096         }),
0097         newName: "DIRC_barAndPrisms"
0098       },
0099       {
0100         patterns: ["**/*rail*"],
0101         newName: "DIRC_rails",
0102         color: 0xF5F5F5  // Gray 100 - almost white
0103       },
0104       {
0105         patterns: ["**/*mcp*"],
0106         newName: "DIRC_mcps",
0107         color: 0xB3E5FC  // Light Blue 100 - light blue with more saturation
0108       }
0109     ]
0110   },
0111 
0112   // RICH components - Light indigo with a touch more color
0113   {
0114     names: ["RICHEndcapN_Vol_15", "DRICH_16"],
0115     rules: [
0116       {
0117         color: 0xC5CAE9,  // Indigo 100 - light indigo with more saturation
0118         merge: true,
0119         outline: true
0120       }
0121     ]
0122   },
0123 
0124   // Ecal components - Light lavender with more color
0125   {
0126     names: ["EcalEndcapP_17", "EcalEndcapPInsert_18", "EcalBarrelImaging_19", "EcalBarrelScFi_20", "B0ECal_43"],
0127     rules: [
0128       {
0129         color: 0xE1BEE7,  // Purple 100 - light purple with more saturation
0130         merge: true,
0131         outline: true
0132       }
0133     ]
0134   },
0135 
0136   // EcalEndcapN - Light blue crystal with more color
0137   {
0138     name: "EcalEndcapN*",
0139     rules: [
0140       {
0141         patterns: ["**/crystal_vol_0"],
0142         color: 0xBBDEFB,  // Blue 100 - light blue with more saturation
0143         material: new THREE.MeshStandardMaterial({
0144           color: 0xBBDEFB,
0145           roughness: 0.5,
0146           metalness: 0.1,
0147           transparent: true,
0148           opacity: 0.5,
0149           side: THREE.DoubleSide
0150         })
0151       },
0152       {
0153         patterns: ["**/inner_support*", "**/ring*"],
0154         material: new THREE.MeshStandardMaterial({
0155           color: 0xF5F5F5,  // Gray 100 - almost white
0156           roughness: 0.5,
0157           metalness: 0.1,
0158           transparent: true,
0159           opacity: 0.5,
0160           side: THREE.DoubleSide
0161         })
0162       }
0163     ]
0164   },
0165 
0166   // Hcal components - Slightly darker blue as requested
0167   {
0168     names: ["LFHCAL_env_22", "HcalEndcapPInsert_23", "HcalBarrel_24", "HcalEndcapN_25"],
0169     rules: [
0170       {
0171         color: 0x90CAF9,  // Blue 200 - slightly more saturated/darker blue
0172         merge: true,
0173         outline: true
0174       }
0175     ]
0176   },
0177 
0178   // Flux components - Light blue as requested (same as original HCALs)
0179   {
0180     names: ["FluxBarrel_env_25", "FluxEndcapP_26", "FluxEndcapN_26", "FluxEndcapN_28"],
0181     rules: [
0182       {
0183         color: 0xE3F2FD,  // Blue 50 - extremely light blue
0184         merge: true,
0185         outline: true
0186       }
0187     ]
0188   },
0189 
0190   // Beam Pipe components - Nearly white
0191   {
0192     names: [
0193       "BeamPipe_assembly_27",
0194       "BeamPipeB0_assembly_36",
0195       "B0Window_vol_ExitWindow_37",
0196       "Pipe_cen_to_pos_assembly_38",
0197       "Pipe_Q1eR_to_B2BeR_assembly_53",
0198       "Q0EF_vac_40",
0199       "Q1EF_vac_42"
0200     ],
0201     rules: [
0202       {
0203         color: 0xFAFAFA,  // Gray 50 - almost white
0204         merge: true,
0205         outline: true
0206       }
0207     ]
0208   },
0209 
0210   // Magnet components - Light steel blue with more color
0211   {
0212     names: [
0213       "B0PF_BeamlineMagnet_assembly_28",
0214       "B0APF_BeamlineMagnet_assembly_29",
0215       "Q1APF_BeamlineMagnet_assembly_30",
0216       "Q1BPF_BeamlineMagnet_assembly_31",
0217       "Q0EF_assembly_39",
0218       "Q1EF_assembly_41",
0219       "Magnet_Q1eR_assembly_54",
0220       "Magnet_Q2eR_assembly_55",
0221       "Magnet_B2AeR_assembly_56",
0222       "Magnet_B2BeR_assembly_57",
0223       "Magnets_Q3eR_assembly_58"
0224     ],
0225     rules: [
0226       {
0227         color: 0xB0BEC5,  // Blue Gray 200 - slightly more saturated blue-gray
0228         merge: true,
0229         outline: true
0230       }
0231     ]
0232   },
0233 
0234   // Vertex Barrel - Warm amber with more color
0235   {
0236     name: "VertexBarrelSubAssembly_3",
0237     rules: [
0238       {
0239         color: 0xFFE082,  // Amber 200 - light amber with more saturation
0240         merge: true,
0241         outline: true
0242       }
0243     ]
0244   },
0245 
0246   // Default rule for anything not matched above
0247   {
0248     name: "*",
0249     rules: [
0250       {
0251         color: 0xF5F5F5,  // Gray 100 - very light gray
0252         merge: true,
0253         outline: true
0254       }
0255     ]
0256   }
0257 ]