Back to home page

EIC code displayed by LXR

 
 

    


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

0001 import * as THREE from "three";
0002 import {DepthModes} from "three";
0003 
0004 // ============================================================
0005 // COOL COLORS (Light/Pastel) - Sorted by saturation level, then name
0006 // ============================================================
0007 // Level 50 (lightest)
0008 export const AMBER_50        = 0xFFF8E1;  // Extremely light amber/peach
0009 export const BLUE_50         = 0xE3F2FD;  // Extremely light blue
0010 export const BLUE_GRAY_50    = 0xECEFF1;  // Very light blue-gray
0011 export const BLUE_LIGHT_50   = 0xE1F5FE;  // Extremely light blue (cyan-ish)
0012 export const BLUE_WHITE      = 0xF5F9FF;  // Custom ultra-light blue-white
0013 export const BROWN_50        = 0xEFEBE9;  // Extremely light brown/cream
0014 export const CYAN_50         = 0xE0F7FA;  // Extremely light cyan
0015 export const GRAY_50         = 0xFAFAFA;  // Almost white
0016 export const INDIGO_80       = 0xD1D9F0;  // Light indigo (more blue than 50)
0017 export const INDIGO_150      = 0xB2BBE0;  // Light-medium indigo
0018 export const PINK_50         = 0xFCE4EC;  // Extremely light pink
0019 export const PURPLE_50       = 0xF3E5F5;  // Extremely light purple
0020 export const RED_50          = 0xFFEBEE;  // Extremely light red/pink
0021 // Level 100
0022 export const GRAY_100        = 0xF5F5F5;  // Very light gray
0023 export const GREEN_100       = 0xC8E6C9;  // Light green
0024 export const ORANGE_100      = 0xFFE0B2;  // Very light warm orange/peach
0025 export const TAN_LIGHT       = 0xE6D5C3;  // Light tan/beige
0026 export const YELLOW_100      = 0xFFF9C4;  // Very light yellow
0027 // Level 200
0028 export const BLUE_200        = 0x90CAF9;  // Light blue with more saturation
0029 
0030 // ============================================================
0031 // MEDIUM COLORS (Moderate Saturation) - Sorted by saturation level, then name
0032 // ============================================================
0033 // Level 100
0034 export const BROWN_100       = 0xD7CCC8;  // Very light brown/taupe
0035 export const PINK_100        = 0xF8BBD0;  // Very light pink
0036 export const PURPLE_100      = 0xE1BEE7;  // Light purple
0037 export const RED_100         = 0xFFCDD2;  // Very light red
0038 // Level 150 (pink-to-indigo gradient)
0039 export const ORCHID_150      = 0xE2B6D3;  // Light orchid (pink-purple, pinkest)
0040 export const MAUVE_150       = 0xDBB5D3;  // Light mauve (dusty pink-purple)
0041 export const LAVENDER_150    = 0xCCB2D5;  // Light lavender (balanced pink-indigo)
0042 export const LILAC_150       = 0xBDAED7;  // Light lilac (purple, closest to indigo)
0043 // Level 200
0044 export const AMBER_200       = 0xFFE082;  // Medium-light amber
0045 export const BLUE_GRAY_200   = 0xB0BEC5;  // Light-medium blue-gray
0046 export const INDIGO_200      = 0x9FA8DA;  // Medium-light indigo
0047 export const BLUE_LIGHT_200  = 0x81D4FA;  // Medium-light cyan-blue
0048 export const CYAN_200        = 0x80DEEA;  // Medium-light cyan
0049 export const GREEN_200       = 0xA5D6A7;  // Medium-light green
0050 export const ORANGE_200      = 0xFFCC80;  // Medium-light orange
0051 export const ORANGE_DEEP_200 = 0xFFAB91;  // Medium-light deep orange
0052 export const TEAL_200        = 0x80CBC4;  // Medium-light teal
0053 export const YELLOW_200      = 0xFFF59D;  // Medium-light yellow
0054 // Level 300
0055 export const BLUE_300        = 0x64B5F6;  // Medium-light blue
0056 export const GRAY_300        = 0xE0E0E0;  // Light-medium gray
0057 // Other
0058 export const TAN_MEDIUM      = 0xC4A77D;  // Medium tan/camel
0059 
0060 // ============================================================
0061 // WARM COLORS (Saturated/Heavy) - Sorted by saturation level, then name
0062 // ============================================================
0063 // Level 400
0064 export const BLUE_GRAY_400   = 0x78909C;  // Medium-dark blue-gray
0065 export const INDIGO_400      = 0x5C6BC0;  // Medium indigo
0066 export const PINK_400        = 0xEC407A;  // Strong pink
0067 export const PURPLE_400      = 0xAB47BC;  // Medium purple
0068 // Level 500
0069 export const AMBER_500       = 0xFFC107;  // Strong amber
0070 export const BLUE_500        = 0x2196F3;  // Strong blue
0071 export const BROWN_500       = 0x795548;  // Strong brown
0072 export const CYAN_500        = 0x00BCD4;  // Strong cyan
0073 export const GRAY_500        = 0x9E9E9E;  // Medium gray
0074 export const GREEN_500       = 0x4CAF50;  // Strong green
0075 export const ORANGE_500      = 0xFF9800;  // Strong orange
0076 export const ORANGE_DEEP_500 = 0xFF5722;  // Strong deep orange
0077 export const RED_500         = 0xF44336;  // Strong red
0078 export const TEAL_500        = 0x009688;  // Strong teal
0079 export const YELLOW_500      = 0xFFEB3B;  // Strong yellow
0080 // Other warm colors
0081 export const SIENNA          = 0xA0522D;  // Sienna
0082 export const TERRACOTTA      = 0xE2725B;  // Terracotta
0083 
0084 // ============================================================
0085 // METALLIC COLORS - Sorted alphabetically within subcategories
0086 // ============================================================
0087 // Bluish Metallics
0088 export const GUNMETAL_BLUE      = 0x5C6274;  // Gunmetal with blue tint
0089 export const INDIGO_METALLIC_LITE = 0x9FA8DA;  // Light metallic indigo
0090 export const PEWTER             = 0x8A9A9E;  // Pewter (blue-gray)
0091 export const STEEL_BLUE         = 0x4682B4;  // Steel blue - industrial metal
0092 export const TITANIUM           = 0x878F99;  // Titanium - blue-gray metal
0093 // Reddish Metallics
0094 export const COPPER          = 0xB87333;  // Classic copper
0095 export const COPPER_BRIGHT   = 0xDA8A67;  // Bright/polished copper
0096 export const ROSE_GOLD       = 0xB76E79;  // Classic rose gold
0097 export const RUST_METAL      = 0x8C4A3D;  // Oxidized rust metal
0098 // Neutral/Gold Metallics
0099 export const ANTIQUE_BRONZE  = 0x8C7853;  // Aged/antique bronze
0100 export const BRASS           = 0xB5A642;  // Brass
0101 export const BRONZE          = 0xCD7F32;  // Classic bronze
0102 export const CHAMPAGNE       = 0xF5E6A3;  // Champagne gold (light)
0103 export const CHROME          = 0xDBE4EB;  // Chrome / polished silver
0104 export const GOLD            = 0xD4AF37;  // Classic gold
0105 export const GUNMETAL        = 0x53565A;  // Neutral gunmetal gray
0106 export const SILVER          = 0xC0C0C0;  // Classic silver
0107 
0108 // ============================================================
0109 // COLOR COLLECTIONS (exported for use in palette and other components)
0110 // ============================================================
0111 export const COOL_COLORS: Record<string, number> = {
0112   // Level 50
0113   AMBER_50,
0114   BLUE_50,
0115   BLUE_GRAY_50,
0116   BLUE_LIGHT_50,
0117   BLUE_WHITE,
0118   BROWN_50,
0119   CYAN_50,
0120   GRAY_50,
0121   INDIGO_80,
0122   INDIGO_150,
0123   PINK_50,
0124   PURPLE_50,
0125   RED_50,
0126   // Level 100
0127   GRAY_100,
0128   GREEN_100,
0129   ORANGE_100,
0130   TAN_LIGHT,
0131   YELLOW_100,
0132   // Level 200
0133   BLUE_200,
0134 };
0135 
0136 export const MEDIUM_COLORS: Record<string, number> = {
0137   // Level 100
0138   BROWN_100,
0139   PINK_100,
0140   PURPLE_100,
0141   RED_100,
0142   // Level 150 (pink-to-indigo gradient)
0143   LAVENDER_150,
0144   LILAC_150,
0145   MAUVE_150,
0146   ORCHID_150,
0147   // Level 200
0148   AMBER_200,
0149   BLUE_GRAY_200,
0150   BLUE_LIGHT_200,
0151   CYAN_200,
0152   GREEN_200,
0153   INDIGO_200,
0154   ORANGE_200,
0155   ORANGE_DEEP_200,
0156   TEAL_200,
0157   YELLOW_200,
0158 
0159   // Level 300
0160   BLUE_300,
0161   GRAY_300,
0162   // Other
0163   TAN_MEDIUM,
0164 };
0165 
0166 export const WARM_COLORS: Record<string, number> = {
0167   // Level 400
0168   BLUE_GRAY_400,
0169   INDIGO_400,
0170   PINK_400,
0171   PURPLE_400,
0172   // Level 500
0173   AMBER_500,
0174   BLUE_500,
0175   BROWN_500,
0176   CYAN_500,
0177   GRAY_500,
0178   GREEN_500,
0179   ORANGE_500,
0180   ORANGE_DEEP_500,
0181   RED_500,
0182   TEAL_500,
0183   YELLOW_500,
0184   // Other
0185   SIENNA,
0186   TERRACOTTA,
0187 };
0188 
0189 export const METALLIC_COLORS: Record<string, number> = {
0190   // Bluish
0191   GUNMETAL_BLUE,
0192   INDIGO_METALLIC_LITE,
0193   PEWTER,
0194   STEEL_BLUE,
0195   TITANIUM,
0196   // Reddish
0197   COPPER,
0198   COPPER_BRIGHT,
0199   ROSE_GOLD,
0200   RUST_METAL,
0201   // Neutral/Gold
0202   ANTIQUE_BRONZE,
0203   BRASS,
0204   BRONZE,
0205   CHAMPAGNE,
0206   CHROME,
0207   GOLD,
0208   GUNMETAL,
0209   SILVER,
0210 };
0211 
0212 export const ALL_COLORS: Record<string, number> = {
0213   ...COOL_COLORS,
0214   ...MEDIUM_COLORS,
0215   ...WARM_COLORS,
0216   ...METALLIC_COLORS,
0217 };
0218 
0219 
0220 /**
0221  * COOL2 Color Rules - Modern palette based on detector categories
0222  *
0223  * Color scheme:
0224  * - Tracking detectors: yellowish-orange (AMBER, ORANGE, YELLOW)
0225  * - PID detectors: greenish (GREEN, TEAL)
0226  * - Electron calorimeters (Ecal): pink/violetish (PINK, PURPLE)
0227  * - HCALs: bluish (BLUE)
0228  * - Flux return: grey (GRAY)
0229  * - Electron beampipe: saturated blue metallic (STEEL_BLUE)
0230  * - Magnets and support: neutral metal or light colors
0231  */
0232 export const cool2ColorRules = [
0233 
0234   // ============================================================
0235   // CENTRAL DETECTOR - MAGNETS
0236   // ============================================================
0237   {
0238     names: ["SolenoidBarrel_assembly*", "SolenoidEndcapP*", "SolenoidEndcapN*"],
0239     rules: [
0240       {
0241         //color: CHROME,  // Neutral metal for main solenoid
0242         material: new THREE.MeshPhongMaterial({
0243           color: CHROME,  // Metal support
0244           specular: GRAY_50,
0245           shininess: 100,
0246           transparent: false,
0247           opacity: 1,
0248           side: THREE.DoubleSide,
0249           clipShadows: true,
0250           stencilWrite: true,
0251           stencilFunc: THREE.AlwaysStencilFunc,
0252           stencilRef: 1,
0253         }),
0254         merge: true,
0255         outline: true
0256       }
0257     ]
0258   },
0259 
0260   // ============================================================
0261   // CENTRAL DETECTOR - TRACKING (Yellowish-Orange)
0262   // ============================================================
0263 
0264   // Vertex detectors - warmest orange tone
0265   {
0266     name: "VertexBarrelSubAssembly*",
0267     rules: [
0268       {
0269         color: ORANGE_DEEP_200,  // Medium-light orange
0270         merge: true,
0271         outline: true
0272       }
0273     ]
0274   },
0275 
0276   // Silicon trackers - amber/orange tones
0277   {
0278     names: [
0279       "InnerSiTrackerSubAssembly*",
0280       "MiddleSiBarrelSubAssembly*",
0281       "OuterSiBarrelSubAssembly*",
0282       "MiddleSiEndcapSubAssembly*",
0283       "OuterSiEndcapSubAssembly*"
0284     ],
0285     rules: [
0286       {
0287         color: AMBER_200,  // Medium-light amber
0288         merge: true,
0289         outline: true
0290       }
0291     ]
0292   },
0293 
0294   // MPGD Trackers - yellowish
0295   {
0296     names: [
0297       "EndcapMPGDSubAssembly*",
0298       "InnerMPGDBarrelSubAssembly*",
0299       "OuterBarrelMPGDSubAssembly*"
0300     ],
0301     rules: [
0302       {
0303         color: YELLOW_200,  // Medium-light yellow
0304         merge: true,
0305         outline: true
0306       }
0307     ]
0308   },
0309 
0310   // Ecal Barrel Tracker (imaging part) - yellowish as it's tracking
0311   {
0312     name: "EcalBarrelTrackerSubAssembly*",
0313     rules: [
0314       // {
0315       //   color: YELLOW_100,  // Very light yellow
0316       //   merge: true,
0317       //   outline: true
0318       // }
0319       {
0320         material: new THREE.MeshLambertMaterial({
0321           color: YELLOW_100,  // Metal support
0322           transparent: false,
0323           opacity: 1,
0324           side: THREE.DoubleSide,
0325           clipShadows: true,
0326           stencilWrite: true,
0327           stencilFunc: THREE.AlwaysStencilFunc,
0328           stencilRef: 1,
0329         }),
0330         merge: true,
0331         outline: true
0332       }
0333     ]
0334   },
0335 
0336   // ============================================================
0337   // CENTRAL DETECTOR - PID (Greenish)
0338   // ============================================================
0339 
0340   // TOF components - teal green
0341   {
0342     names: ["EndcapTOFSubAssembly*", "BarrelTOFSubAssembly*"],
0343     rules: [
0344       {
0345         color: TEAL_200,  // Medium-light teal
0346         merge: true,
0347         outline: true
0348       }
0349     ]
0350   },
0351 
0352   // DIRC - Green with glass effect
0353   {
0354     name: "DIRC*",
0355     rules: [
0356       {
0357         patterns: ["**/*box*", "**/*prism*"],
0358         material: new THREE.MeshPhysicalMaterial({
0359           color: GREEN_200,  // Medium-light green
0360           metalness: 0.3,
0361           roughness: 0.2,
0362           envMapIntensity: 0.5,
0363           clearcoat: 0.8,
0364           transparent: true,
0365           opacity: 0.5,
0366           reflectivity: 0.2,
0367           ior: 0.9,
0368           side: THREE.DoubleSide,
0369         }),
0370         newName: "DIRC_barAndPrisms"
0371       },
0372       {
0373         patterns: ["**/*rail*"],
0374         newName: "DIRC_rails",
0375         color: SILVER  // Metal rails
0376       },
0377       {
0378         patterns: ["**/*mcp*"],
0379         newName: "DIRC_mcps",
0380         color: GREEN_100  // Light green
0381       }
0382     ]
0383   },
0384 
0385   // DRICH
0386   {
0387     name: "DRICH*",
0388     rules: [
0389       // Pattern-specific rules FIRST (order matters!)
0390       {
0391         patterns: ["**/DRICH_mirror*"],
0392         color: SILVER,  // Simple silver color for fast mode; prettifier handles reflections
0393         merge: true,
0394         outline: false,
0395         newName: "DRICH_mirror"
0396       },
0397       {
0398         patterns: ["**/DRICH*pdu*"],
0399         color: TEAL_200,
0400         merge: true,
0401         newName: "DRICH_pdu"
0402       },
0403       // "The rest" rule LAST - processes remaining unprocessed nodes
0404       {
0405         color: GREEN_100,  // Light green
0406         merge: false,
0407         outline: true
0408       }
0409     ]
0410   },
0411 
0412   // Modular RICH (Negative endcap)
0413   {
0414     name: "RICHEndcapN*",
0415     rules: [
0416       {
0417         color: GREEN_100,  // Medium-light teal
0418         merge: true,
0419         outline: true
0420       }
0421     ]
0422   },
0423 
0424   // ============================================================
0425   // CENTRAL DETECTOR - ECAL (Pink/Violetish)
0426   // ============================================================
0427   {
0428     name:"EcalBarrelScFi*",
0429     rules: [
0430       // {
0431       //   color: PURPLE_50,
0432       //   merge: true,
0433       //   outline: true
0434       // }
0435       {
0436         material: new THREE.MeshLambertMaterial({
0437           color: PURPLE_50,  // Metal support
0438           transparent: false,
0439           opacity: 1,
0440           side: THREE.DoubleSide,
0441           clipShadows: true,
0442           stencilWrite: true,
0443           stencilFunc: THREE.AlwaysStencilFunc,
0444           stencilRef: 1,
0445         }),
0446         merge: true,
0447         outline: true
0448       }
0449     ]
0450 
0451   },
0452 
0453   // Ecal Forward and Barrel
0454   {
0455     name: "EcalEndcapP*",
0456     rules: [
0457       {
0458         color: INDIGO_80,  // Very light pink
0459         merge: true,
0460         outline: true
0461       }
0462     ]
0463   },
0464   {
0465     name: "EcalEndcapPInsert*",
0466     rules: [
0467       {
0468         color: INDIGO_200,  // Very light pink
0469         merge: true,
0470         outline: true
0471       }
0472     ]
0473   },
0474 
0475   // Ecal Backward - slightly different pink/violet
0476   {
0477     name: "EcalEndcapN*",
0478     rules: [
0479       {
0480         patterns: ["**/crystal_vol_0"],
0481         color: INDIGO_80,  // Light purple for crystals
0482         outlineColor: GUNMETAL_BLUE,
0483         merge: true,
0484       },
0485       {
0486         patterns: ["**/inner_support*", "**/ring*"],
0487         material: new THREE.MeshStandardMaterial({
0488           color: SILVER,  // Metal support
0489           roughness: 0.5,
0490           metalness: 0.3,
0491           transparent: true,
0492           opacity: 0.5,
0493           side: THREE.DoubleSide
0494         })
0495       }
0496     ]
0497   },
0498 
0499   // ============================================================
0500   // CENTRAL DETECTOR - HCAL (Bluish)
0501   // ============================================================
0502   {
0503     names: ["LFHCAL*", "HcalEndcapPInsert*", "HcalBarrel*", "HcalEndcapN*"],
0504     rules: [
0505       {
0506         // color: BLUE_200,  // Medium-light blue
0507         material: new THREE.MeshPhongMaterial({
0508           color: BLUE_200,  // Metal support
0509           specular: 0x454545,
0510           shininess: 62,
0511           transparent: false,
0512           opacity: 1,
0513           side: THREE.DoubleSide,
0514           clipShadows: true,
0515           stencilWrite: true,
0516           stencilFunc: THREE.AlwaysStencilFunc,
0517           stencilRef: 1,
0518         }),
0519         merge: true,
0520         outline: true
0521       }
0522     ]
0523   },
0524 
0525   // ============================================================
0526   // CENTRAL DETECTOR - FLUX (Grey)
0527   // ============================================================
0528   {
0529     names: ["FluxBarrel*", "FluxEndcapP*", "FluxEndcapN*"],
0530     rules: [
0531       {
0532         //color: BLUE_50,  // Light-medium gray
0533         material: new THREE.MeshPhongMaterial({
0534           color: BLUE_50,  // Metal support
0535           specular: 0x454545,
0536           shininess: 62,
0537           transparent: false,
0538           depthWrite: true,
0539           depthTest: true,
0540           opacity: 1,
0541           side: THREE.DoubleSide,
0542           clipShadows: true,
0543           stencilWrite: true,
0544           stencilFunc: THREE.AlwaysStencilFunc,
0545           stencilRef: 1,
0546         }),
0547         merge: true,
0548         outline: true
0549       }
0550     ]
0551   },
0552 
0553   // ============================================================
0554   // CENTRAL DETECTOR - SUPPORT (Neutral metal/light)
0555   // ============================================================
0556 
0557   // Tracking supports - light metal
0558   {
0559     names: [
0560       "SVT_IB_Support_L2_assembly*",
0561       "SVT_IB_Support_L1_assembly*",
0562       "SVT_IB_Support_L0_L1_assembly*"
0563     ],
0564     rules: [
0565       {
0566         color: SILVER,  // Silver metal
0567         merge: true,
0568         outline: true
0569       }
0570     ]
0571   },
0572 
0573   // Inner tracker support - semi-transparent
0574   {
0575     name: "InnerTrackerSupport_assembly*",
0576     rules: [
0577       {
0578         material: new THREE.MeshStandardMaterial({
0579           color: TITANIUM,  // Chrome metallic
0580           roughness: 0.4,
0581           metalness: 0.2,
0582           transparent: true,
0583           opacity: 0.7,
0584           blending: THREE.NormalBlending,
0585           depthWrite: true,
0586           polygonOffset: true,
0587           polygonOffsetFactor: 1,
0588           side: THREE.DoubleSide
0589         }),
0590         outline: true,
0591         outlineColor: CHROME,
0592         merge: true,
0593         newName: "InnerTrackerSupport"
0594       }
0595     ]
0596   },
0597 
0598   // Central beam pipe
0599   {
0600     name: "BeamPipe_assembly*",
0601     rules: [
0602       {
0603         // Match v_upstream nodes - applyToDescendants (default true) includes all children
0604         patterns: ["**/v_upstream*"],
0605         color: BROWN_100,
0606         merge: false,
0607         outline: true
0608       },
0609       {
0610         // "The rest" - uses hierarchical skip, so v_upstream descendants are skipped
0611         color: BROWN_100,
0612         merge: false,
0613         outline: true
0614       }
0615     ]
0616   },
0617 
0618   // ============================================================
0619   // FORWARD DETECTOR
0620   // ============================================================
0621 
0622   // Electron beampipe (forward) - Saturated blue metallic
0623   {
0624     name: "Pipe_cen_to_pos_assembly*",
0625     rules: [
0626       {
0627         color: BROWN_100,
0628         merge: true,
0629         outline: true,
0630         outlineColor: BLUE_GRAY_400
0631       }
0632     ]
0633   },
0634 
0635   // B0 Window
0636   {
0637     name: "B0Window_vol_ExitWindow*",
0638     rules: [
0639       {
0640         color: BROWN_100,  // Light-medium blue-gray
0641         merge: true,
0642         outline: true
0643       }
0644     ]
0645   },
0646 
0647   // B0 Tracker - yellowish-orange (tracking)
0648   {
0649     name: "B0TrackerSubAssembly*",
0650     rules: [
0651       {
0652         color: ORANGE_100,  // Very light warm orange
0653         merge: true,
0654         outline: true
0655       }
0656     ]
0657   },
0658 
0659   // B0 ECal - pink/violetish (calorimeter)
0660   {
0661     name: "B0ECal*",
0662     rules: [
0663       {
0664         color: BLUE_300,  // Extremely light pink
0665         merge: true,
0666         outline: true
0667       }
0668     ]
0669   },
0670 
0671   // Forward magnets - neutral metal/greenish
0672   {
0673     names: [
0674       "B0PF_BeamlineMagnet_assembly*",
0675       "B0APF_BeamlineMagnet_assembly*",
0676       "Q0EF_BeamlineMagnet_assembly*",
0677       "Q1APF_BeamlineMagnet_assembly*",
0678       "Q1BPF_BeamlineMagnet_assembly*",
0679       "Q1EF_BeamlineMagnet_assembly*",
0680       "Q2PF_BeamlineMagnet_assembly*",
0681       "B1PF_BeamlineMagnet_assembly*",
0682       "B1APF_BeamlineMagnet_assembly*"
0683     ],
0684     rules: [
0685       {
0686         //color: BLUE_50,
0687         material: new THREE.MeshPhongMaterial({
0688           color: BLUE_50,  // Metal support
0689           specular: 0x454545,
0690           shininess: 62,
0691           transparent: false,
0692           depthWrite: true,
0693           depthTest: true,
0694           opacity: 1,
0695           side: THREE.DoubleSide,
0696           clipShadows: true,
0697           stencilWrite: true,
0698           stencilFunc: THREE.AlwaysStencilFunc,
0699           stencilRef: 1,
0700         }),
0701         merge: true,
0702         outline: true
0703       }
0704     ]
0705   },
0706 
0707   // Forward beampipe (hadron side)
0708   {
0709     name: "BeamPipeB0_assembly*",
0710     rules: [
0711       {
0712         color: BROWN_100,  // Very light gray
0713         merge: true,
0714         outline: true
0715       }
0716     ]
0717   },
0718 
0719   // Off-momentum trackers - yellowish-orange (tracking)
0720   {
0721     names: [
0722       "ForwardOffMTracker_station_1*",
0723       "ForwardOffMTracker_station_2*",
0724       "ForwardOffMTracker_station_3*",
0725       "ForwardOffMTracker_station_4*"
0726     ],
0727     rules: [
0728       {
0729         color: AMBER_500,  // Extremely light amber
0730         merge: true,
0731         outline: true
0732       }
0733     ]
0734   },
0735 
0736   // Roman pots - yellowish-orange (tracking)
0737   {
0738     names: ["ForwardRomanPot_Station_1*", "ForwardRomanPot_Station_2*"],
0739     rules: [
0740       {
0741         color: ORANGE_200,  // Very light warm orange
0742         merge: true,
0743         outline: true
0744       }
0745     ]
0746   },
0747 
0748   // ZDC Crystal - bluish (calorimeter)
0749   {
0750     name: "ZDC_Crystal_envelope*",
0751     rules: [
0752       {
0753         color: PURPLE_400,  // Medium-light cyan-blue
0754         merge: true,
0755         outline: true
0756       }
0757     ]
0758   },
0759 
0760   // ZDC HCal - bluish (HCAL)
0761   {
0762     name: "HcalFarForwardZDC_SiPMonTile*",
0763     rules: [
0764       {
0765         color: BLUE_200,  // Light blue with more saturation
0766         merge: true,
0767         outline: true
0768       }
0769     ]
0770   },
0771 
0772   // Vacuum magnet element
0773   {
0774     name: "VacuumMagnetElement_assembly*",
0775     rules: [
0776       {
0777         color: GRAY_300,  // Light-medium gray
0778         merge: true,
0779         outline: true
0780       }
0781     ]
0782   },
0783 
0784   // ============================================================
0785   // BACKWARD DETECTOR
0786   // ============================================================
0787 
0788   // Electron pipe (backward) - Saturated blue metallic
0789   {
0790     name: "Pipe_Q1eR_to_B2BeR_assembly*",
0791     rules: [
0792       {
0793         color: BROWN_100,
0794         merge: true,
0795         outline: true,
0796         outlineColor: BLUE_GRAY_400
0797       }
0798     ]
0799   },
0800 
0801   // Backward magnets - neutral metal/greenish
0802   {
0803     names: [
0804       "Q1ER_BeamlineMagnet_assembly*",
0805       "Q1APR_BeamlineMagnet_assembly*",
0806       "Q2ER_BeamlineMagnet_assembly*",
0807       "Q1BPR_BeamlineMagnet_assembly*",
0808       "Q2PR_BeamlineMagnet_assembly*",
0809       "Magnets_Q3eR_assembly*"
0810     ],
0811     rules: [
0812       {
0813         color: BLUE_50,  // Light green
0814         merge: true,
0815         outline: true
0816       }
0817     ]
0818   },
0819 
0820   // Tagger
0821   {
0822     names: ["BackwardsTaggerVacuum_assembly*", "BackwardsTaggerAssembly*"],
0823     rules: [
0824       {
0825         color: AMBER_50,  // Extremely light amber (tracking/tagging)
0826         merge: true,
0827         outline: true
0828       }
0829     ]
0830   },
0831 
0832   // Lumi components
0833   {
0834     name: "LumiWindow_vol_ExitWindow*",
0835     rules: [
0836       {
0837         color: GRAY_100,  // Very light gray
0838         merge: true,
0839         outline: true
0840       }
0841     ]
0842   },
0843 
0844   {
0845     name: "LumiCollimator_assembly*",
0846     rules: [
0847       {
0848         color: PEWTER,  // Metallic gray
0849         merge: true,
0850         outline: true
0851       }
0852     ]
0853   },
0854 
0855   {
0856     names: ["SweeperMag_assembly*", "AnalyzerMag_assembly*"],
0857     rules: [
0858       {
0859         color: GREEN_100,  // Light green (magnets)
0860         merge: true,
0861         outline: true
0862       }
0863     ]
0864   },
0865 
0866   {
0867     name: "LumiSpecTracker*",
0868     rules: [
0869       {
0870         color: YELLOW_100,  // Very light yellow (tracking)
0871         merge: true,
0872         outline: true
0873       }
0874     ]
0875   },
0876 
0877   {
0878     name: "LumiPhotonChamber*",
0879     rules: [
0880       {
0881         color: GRAY_300,  // Light-medium gray
0882         merge: true,
0883         outline: true
0884       }
0885     ]
0886   },
0887 
0888   {
0889     name: "LumiDirectPCAL*",
0890     rules: [
0891       {
0892         color: PINK_50,  // Extremely light pink (calorimeter)
0893         merge: true,
0894         outline: true
0895       }
0896     ]
0897   },
0898 
0899   // ============================================================
0900   // DEFAULT RULE
0901   // ============================================================
0902   {
0903     name: "*",
0904     rules: [
0905       {
0906         color: GRAY_100,  // Very light gray default
0907         merge: true,
0908         outline: true
0909       }
0910     ]
0911   }
0912 ];