Back to home page

EIC code displayed by LXR

 
 

    


Warning, /firebird/packages/epic/src/cad-geometry-ruleset.ts is written in an unsupported language. File is not indexed.

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