1 package org.lcsim.geometry; 2 3 /** 4 * The interface for a generic Calorimeter detector, providing access to basic envelope 5 * parameters, calculations of layer parameters such as interaction and radiation lengths, 6 * as well as some methods that eliminate the need for complicated method chaining to access 7 * important information. 8 * 9 * @author Jeremy McCormick 10 * @version $Id: Calorimeter.java,v 1.20 2011/01/04 21:58:51 jeremy Exp $ 11 * 12 */ 13 public interface Calorimeter extends Subdetector 14 { 15 /** 16 * The CalorimeterType is an enum describing the type of Calorimeter. Values are based 17 * on common subsystems in an ILC detector. This enum is designed such that only one 18 * subdetector should have a given type in the compact description except for UNKNOWN, 19 * which not be explicitly used in the calorimeterType field. 20 */ 21 enum CalorimeterType 22 { 23 UNKNOWN, 24 HAD_BARREL, 25 HAD_ENDCAP, 26 EM_BARREL, 27 EM_ENDCAP, 28 MUON_BARREL, 29 MUON_ENDCAP, 30 LUMI, 31 BEAM; 32 33 /** 34 * Convert to CalorimeterType from a String. 35 * @param s The String. 36 * @return The CalorimeterType. 37 */ 38 public static CalorimeterType fromString( final String s ) 39 { 40 if ( s.equals( "HAD_BARREL" ) ) 41 return HAD_BARREL; 42 if ( s.equals( "HAD_ENDCAP" ) ) 43 return HAD_ENDCAP; 44 else if ( s.equals( "EM_BARREL" ) ) 45 return EM_BARREL; 46 else if ( s.equals( "EM_ENDCAP" ) ) 47 return EM_ENDCAP; 48 else if ( s.equals( "MUON_BARREL" ) ) 49 return MUON_BARREL; 50 else if ( s.equals( "MUON_ENDCAP" ) ) 51 return MUON_ENDCAP; 52 else if ( s.equals( "LUMI" ) ) 53 return LUMI; 54 else if ( s.equals( "BEAM" ) ) 55 return BEAM; 56 else 57 return UNKNOWN; 58 } 59 60 /** 61 * Convert from CalorimeterType to String. 62 * @param c The CalorimeterType. 63 * @return The String. 64 */ 65 public static String toString( CalorimeterType c ) 66 { 67 if ( c.equals( HAD_BARREL ) ) 68 return "HAD_BARREL"; 69 else if ( c.equals( HAD_ENDCAP ) ) 70 return "HAD_ENDCAP"; 71 else if ( c.equals( EM_BARREL ) ) 72 return "EM_BARREL"; 73 else if ( c.equals( EM_ENDCAP ) ) 74 return "EM_ENDCAP"; 75 else if ( c.equals( MUON_BARREL ) ) 76 return "MUON_BARREL"; 77 else if ( c.equals( MUON_ENDCAP ) ) 78 return "MUON_ENDCAP"; 79 else if ( c.equals( LUMI ) ) 80 return "LUMI"; 81 else if ( c.equals( BEAM ) ) 82 return "BEAM"; 83 else 84 return "UNKNOWN"; 85 } 86 } 87 88 /** 89 * Get the CalorimeterType of this Calorimeter. 90 * 91 * @return The CalorimeterType. 92 */ 93 public CalorimeterType getCalorimeterType(); 94 95 /** 96 * Get the innerRadius of this Calorimeter or 0 if NA. 97 * 98 * @return The innerRadius. 99 */ 100 public double getInnerRadius(); 101 102 /** 103 * Get the outerRadius of this Calorimeter or 0 if NA. 104 * 105 * @return The outerRadius. 106 */ 107 public double getOuterRadius(); 108 109 /** 110 * Get the innerZ of this Calorimeter or 0 if NA. 111 * 112 * @return The innerZ. 113 */ 114 public double getInnerZ(); 115 116 /** 117 * Get the outerZ of this Calorimeter or 0 if NA. 118 * 119 * @return The outerZ. 120 */ 121 public double getOuterZ(); 122 123 /** 124 * Get the Calorimeter's Z length. 125 * 126 * @return The Calorimeter's Z length. 127 */ 128 public double getZLength(); 129 130 /** 131 * Get the inner phi angle subtended by one calorimeter section or 0 if NA. 132 * 133 * @return The phi angle of one section. 134 */ 135 public double getSectionPhi(); 136 137 /** 138 * Get the number of sides of this calorimeter or 0 if NA. 139 * @return The inner number of sides. 140 */ 141 public int getNumberOfSides(); 142 143 /** 144 * Get the number of layers in the Calorimeter. 145 * @return The number of layers. 146 */ 147 public int getNumberOfLayers(); 148 149 /** 150 * Get the distance to the layer from the IP in mm. 151 * 152 * @param layerNumber The layer index. 153 * @return The distance to the layer. 154 */ 155 public double getDistanceToLayer( int layerNumber ); 156 157 /** 158 * Get the distance to the sensor from the IP in mm. 159 * @param The layer number. 160 * @return The distance to the sensor in mm. 161 */ 162 public double getDistanceToSensor( int layerNumber ); 163 164 /** 165 * Get the total layer thickness in mm. 166 * @return The total layer thickness for the given layer. 167 */ 168 public double getLayerThickness( int layern ); 169 170 /** 171 * Get the total thickness of the calorimeter. 172 * @return The calorimeter's thickness. 173 */ 174 public double getTotalThickness(); 175 176 /** 177 * Get the sensor thickness in mm. 178 * @return The sensor thicknes for the given layer. 179 */ 180 public double getSensorThickness( int layern ); 181 182 /** 183 * Get the number of interaction lengths in the layer. 184 * @param layern The layer number. 185 * @return The number of interaction lengths for the given layer. 186 */ 187 public double getInteractionLengths( int layern ); 188 189 /** 190 * Get the number of radiation lengths in the layer. 191 * @param layern The layer number. 192 * @return The number of radiation lengths for the given layer. 193 */ 194 public double getRadiationLengths( int layern ); 195 196 /** 197 * Get the number of interaction lengths in the layers. 198 * @param layern The layer number. 199 * @return The number of interaction lengths for the given layer. 200 */ 201 public double getInteractionLengths(); 202 203 /** 204 * Get the number of radiation lengths in the layers. 205 * @param layern The layer number. 206 * @return The number of radiation lengths for the given layer. 207 */ 208 public double getRadiationLengths(); 209 210 /** 211 * Get MIP energy loss in GeV in this layer. 212 * @param layern The layer number. 213 * @return MIP energy loss for the given layer. 214 */ 215 public double getDe( int layern ); 216 217 /** 218 * Get the cell U dimension. 219 * @return The cell U dimension. 220 */ 221 public double getCellSizeU(); 222 223 /** 224 * Get the cell V dimension. 225 * @return The cell V dimension. 226 */ 227 public double getCellSizeV(); 228 229 // This would be useful but requires access to the conditions system. 230 // May require using a set method to decouple from conditions package. 231 // public boolean isDigital(); 232 }