~msavic/maus/ev-reducer

« back to all changes in this revision

Viewing changes to src/common_py/geometry/xsltScripts/ParentFileCreation.xsl

  • Committer: Durga Rajaram
  • Date: 2017-12-14 18:46:57 UTC
  • Revision ID: durga@fnal.gov-20171214184657-y2rplnbzlgwr2qd9
add datacards to set coolingchannel current scale factors, modifying^Ceometry download scripts to enable this. added analyze_data_offline_globals script for globals processing

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
                        Substitution $SSUT1Polarity +1<xsl:text>                            
132
132
                            
133
133
                        </xsl:text></xsl:when>
134
 
                                        <xsl:when test="contains(@name, 'SSU-E1')">Substitution $SSUE1Current <xsl:value-of select="@iset"/>
 
134
                        <xsl:when test="contains(@name, 'SSU-E1')">Substitution $SSUE1Current <xsl:value-of select="@iset"/>
 
135
                        Substitution $SSUE1Scale <xsl:value-of select="@scale"/>
135
136
                        Substitution $SSUE1Polarity +1<xsl:text>
136
137
                            
137
138
                        </xsl:text></xsl:when>
138
139
                                        <xsl:when test="contains(@name, 'SSU-E2')">Substitution $SSUE2Current <xsl:value-of select="@iset"/>
 
140
                        Substitution $SSUE2Scale <xsl:value-of select="@scale"/>
139
141
                        Substitution $SSUE2Polarity +1<xsl:text>
140
142
                            
141
143
                        </xsl:text></xsl:when>
142
144
                                        <xsl:when test="contains(@name, 'SSU-C')">Substitution $SSUCCurrent <xsl:value-of select="@iset"/>
 
145
                        Substitution $SSUCScale <xsl:value-of select="@scale"/>
143
146
                        Substitution $SSUCPolarity +1<xsl:text> 
144
147
                        
145
148
                        </xsl:text></xsl:when>
146
149
                                        <xsl:when test="contains(@name, 'SSU-M1')">Substitution $SSUM1Current <xsl:value-of select="@iset"/>
 
150
                        Substitution $SSUM1Scale <xsl:value-of select="@scale"/>
147
151
                        Substitution $SSUM1Polarity +1<xsl:text>
148
152
                            
149
153
                        </xsl:text></xsl:when>
150
154
                                        <xsl:when test="contains(@name, 'SSU-M2')">Substitution $SSUM2Current <xsl:value-of select="@iset"/>
151
 
                                Substitution $SSUM2Polarity +1<xsl:text>
 
155
                        Substitution $SSUM2Scale <xsl:value-of select="@scale"/>
 
156
                        Substitution $SSUM2Polarity +1<xsl:text>
152
157
                            
153
158
                        </xsl:text></xsl:when>            
154
159
                                    </xsl:choose>
161
166
                                <xsl:for-each select="coil">
162
167
                                    <xsl:choose>
163
168
                                        <xsl:when test="contains(@name, 'FCM-U')">Substitution $FCMUCurrent <xsl:value-of select="@iset"/>
 
169
                        Substitution $FCMUScale <xsl:value-of select="@scale"/>
164
170
                        Substitution $FCMUPolarity +1<xsl:text>
165
171
                                        
166
172
                        </xsl:text>
167
173
                                        </xsl:when>
168
174
                                        <xsl:when test="contains(@name, 'FCM-D')">Substitution $FCMDCurrent <xsl:value-of select="@iset"/>
 
175
                        Substitution $FCMDScale <xsl:value-of select="@scale"/>
169
176
                        Substitution $FCMDPolarity +1<xsl:text>
170
177
                            
171
178
                        </xsl:text></xsl:when>                   
179
186
                                    <xsl:for-each select="coil">
180
187
                                        <xsl:choose>
181
188
                                        <xsl:when test="contains(@name, 'FCM-U')">Substitution $FCMUCurrent <xsl:value-of select="@iset"/>
 
189
                        Substitution $FCMUScale <xsl:value-of select="@scale"/>
182
190
                        Substitution $FCMUPolarity +1<xsl:text>
183
191
                                        
184
192
                        </xsl:text></xsl:when>
185
193
                                        <xsl:when test="contains(@name, 'FCM-D')">Substitution $FCMDCurrent <xsl:value-of select="@iset"/>
 
194
                        Substitution $FCMDScale <xsl:value-of select="@scale"/>
186
195
                        Substitution $FCMDPolarity +1<xsl:text>
187
196
                            
188
197
                        </xsl:text></xsl:when>
192
201
                            <xsl:when test="contains(@name, 'FCM') and ( contains(@mode, 'Off') or contains(@mode, 'off'))">
193
202
                        Substitution $FCMMode +1<xsl:text>
194
203
                                        
195
 
                        </xsl:text>Substitution $FCMUPolarity +1<xsl:text>
 
204
                            </xsl:text>
 
205
                            Substitution $FCMUScale <xsl:value-of select="@scale"/>
 
206
                            Substitution $FCMUPolarity +1
 
207
                            <xsl:text>
196
208
                                        
197
 
                        </xsl:text>Substitution $FCMDPolarity +1<xsl:text>
 
209
                                </xsl:text>
 
210
                            Substitution $FCMDScale <xsl:value-of select="@scale"/>
 
211
                            Substitution $FCMDPolarity +1
 
212
                                <xsl:text>
198
213
                                        
199
214
                        </xsl:text>
200
215
                        </xsl:when>    
205
220
                                <xsl:for-each select="coil">
206
221
                                    <xsl:choose>
207
222
                                        <xsl:when test="contains(@name, 'FCU-C')">Substitution $FCMUCurrent <xsl:value-of select="@iset"/>
 
223
                        Substitution $FCMUScale <xsl:value-of select="@scale"/>
208
224
                        Substitution $FCMUPolarity +1<xsl:text>
209
225
                                        
210
226
                        </xsl:text>Substitution $FCMDCurrent <xsl:value-of select="@iset"/>
 
227
                        Substitution $FCMDScale <xsl:value-of select="@scale"/>
211
228
                        Substitution $FCMDPolarity +1<xsl:text>
212
229
                            
213
230
                        </xsl:text></xsl:when>                   
220
237
                        </xsl:text>
221
238
                                    <xsl:for-each select="coil">
222
239
                                        <xsl:choose>
223
 
                                        <xsl:when test="contains(@name, 'FCU-C')">Substitution $FCMUCurrent <xsl:value-of select="@iset"/>
 
240
                                            <xsl:when test="contains(@name, 'FCU-C')">Substitution $FCMUCurrent <xsl:value-of select="@iset"/>
 
241
                        Substitution $FCMUScale <xsl:value-of select="@scale"/>
224
242
                        Substitution $FCMUPolarity +1<xsl:text>
225
243
                                        
226
244
                        </xsl:text>Substitution $FCMDCurrent <xsl:value-of select="@iset"/>
 
245
                        Substitution $FCMDScale <xsl:value-of select="@scale"/>
227
246
                        Substitution $FCMDPolarity +1<xsl:text>
228
247
                            
229
248
                        </xsl:text></xsl:when>    
233
252
                            <xsl:when test="contains(@name, 'FCU') and ( contains(@mode, 'Off') or contains(@mode, 'off'))">
234
253
                        Substitution $FCMMode +1<xsl:text>
235
254
                                        
236
 
                        </xsl:text>Substitution $FCMUPolarity +1<xsl:text>
 
255
                            </xsl:text>
 
256
                        Substitution $FCMUScale <xsl:value-of select="@scale"/>
 
257
                        Substitution $FCMUPolarity +1<xsl:text>
237
258
                                        
238
 
                        </xsl:text>Substitution $FCMDPolarity +1<xsl:text>
 
259
                            </xsl:text>
 
260
                        Substitution $FCMDScale <xsl:value-of select="@scale"/>
 
261
                        Substitution $FCMDPolarity +1<xsl:text>
239
262
                                        
240
263
                        </xsl:text>
241
264
                        </xsl:when>    
251
274
 
252
275
                        </xsl:text></xsl:when>
253
276
                                            <xsl:when test="contains(@name, 'SSD-E2')">Substitution $SSDE2Current <xsl:value-of select="@iset"/>
 
277
                        Substitution $SSDE2Scale <xsl:value-of select="@scale"/>
254
278
                        Substitution $SSDE2Polarity +1<xsl:text>
255
279
                            
256
280
                        </xsl:text></xsl:when>     
257
281
                                            <xsl:when test="contains(@name, 'SSD-C')">Substitution $SSDCCurrent <xsl:value-of select="@iset"/>
 
282
                        Substitution $SSDCScale <xsl:value-of select="@scale"/>
258
283
                        Substitution $SSDCPolarity +1<xsl:text> 
259
284
                        
260
285
                        </xsl:text></xsl:when>
261
286
                                            <xsl:when test="contains(@name, 'SSD-E1')">Substitution $SSDE1Current <xsl:value-of select="@iset"/>
 
287
                        Substitution $SSDE1Scale <xsl:value-of select="@scale"/>
262
288
                        Substitution $SSDE1Polarity +1<xsl:text>
263
289
                            
264
290
                        </xsl:text></xsl:when>
265
291
                                            <xsl:when test="contains(@name, 'SSD-M1')">Substitution $SSDM1Current <xsl:value-of select="@iset"/>
 
292
                        Substitution $SSDM1Scale <xsl:value-of select="@scale"/>
266
293
                        Substitution $SSDM1Polarity +1<xsl:text>
267
294
                            
268
295
                        </xsl:text></xsl:when>
269
296
                                            <xsl:when test="contains(@name, 'SSD-M2')">Substitution $SSDM2Current <xsl:value-of select="@iset"/>
 
297
                        Substitution $SSDM2Scale <xsl:value-of select="@scale"/>
270
298
                        Substitution $SSDM2Polarity +1<xsl:text>
271
299
                            
272
300
                        </xsl:text></xsl:when>    
374
402
                        PropertyDouble Thickness <xsl:value-of select="Thickness/@value"/>
375
403
                        PropertyDouble InnerRadius <xsl:value-of select="InnerRadius/@value"/>
376
404
                        ScaleFactor <xsl:choose>
377
 
                                <xsl:when test="contains(FieldName/@name, 'MatchCoil1_0') and boolean($mcmode)">$SSUM1Polarity*$SSUM1Current*0.52</xsl:when>
378
 
                                <xsl:when test="contains(FieldName/@name, 'MatchCoil2_0') and boolean($mcmode)">$SSUM2Polarity*$SSUM2Current*0.5176</xsl:when>
379
 
                                <xsl:when test="contains(FieldName/@name, 'CenterCoil_0') and boolean($mcmode)">$SSUCPolarity*$SSUCCurrent*0.528</xsl:when>
380
 
                                <xsl:when test="contains(FieldName/@name, 'EndCoil1_0') and contains($ccrun,'1')">$SSUE1Polarity*$SSUE1Current*0.529</xsl:when>
381
 
                                <xsl:when test="contains(FieldName/@name, 'EndCoil2_0') and contains($ccrun,'1')">$SSUE2Polarity*$SSUE2Current*0.532</xsl:when>
382
 
                                <xsl:when test="contains(FieldName/@name, 'EndCoil1_0') and contains($cctag,'1')">$SSUT1Polarity*($SSUCCurrent+$SSUT1Current)*0.529</xsl:when>
383
 
                                <xsl:when test="contains(FieldName/@name, 'EndCoil2_0') and contains($cctag,'1')">$SSUT2Polarity*($SSUCCurrent+$SSUT2Current)*0.532</xsl:when>
384
 
                                <xsl:when test="contains(FieldName/@name, 'FCoil_0') and boolean($mcmode)">$FCMUPolarity*$FCMUCurrent*0.5565</xsl:when>
385
 
                                <xsl:when test="contains(FieldName/@name, 'FCoil_1') and boolean($mcmode)">$FCMUPolarity*$FCMMode*$FCMDCurrent*0.5565</xsl:when>
386
 
                                <xsl:when test="contains(FieldName/@name, 'MatchCoil1_1') and boolean($mcmode)">$SSDM1Polarity*$FCMMode*$SSDM1Current*0.52</xsl:when>
387
 
                                <xsl:when test="contains(FieldName/@name, 'MatchCoil2_1') and boolean($mcmode)">$SSDM2Polarity*$FCMMode*$SSDM2Current*0.5174</xsl:when>
388
 
                                <xsl:when test="contains(FieldName/@name, 'CenterCoil_1') and boolean($mcmode)">$SSDCPolarity*$FCMMode*$SSDCCurrent*0.52817</xsl:when>
389
 
                                <xsl:when test="contains(FieldName/@name, 'EndCoil1_1') and contains($ccrun,'1')">$SSDE1Polarity*$FCMMode*$SSDE1Current*0.5316</xsl:when>
390
 
                                <xsl:when test="contains(FieldName/@name, 'EndCoil2_1') and contains($ccrun,'1')">$SSDE2Polarity*$FCMMode*$SSDE2Current*0.5291</xsl:when>
391
 
                                <xsl:when test="contains(FieldName/@name, 'EndCoil1_1') and contains($cctag,'1')">$SSDT1Polarity*$FCMMode*($SSDCCurrent+$SSDT1Current)*0.5316</xsl:when>
392
 
                                <xsl:when test="contains(FieldName/@name, 'EndCoil2_1') and contains($cctag,'1')">$SSDT2Polarity*$FCMMode*($SSDCCurrent+$SSDT2Current)*0.5291</xsl:when>
 
405
                                <xsl:when test="contains(FieldName/@name, 'MatchCoil1_0') and boolean($mcmode)">$SSUM1Polarity*$SSUM1Current*0.52*$SSUM1SCale</xsl:when>
 
406
                                <xsl:when test="contains(FieldName/@name, 'MatchCoil2_0') and boolean($mcmode)">$SSUM2Polarity*$SSUM2Current*0.5176*$SSUM2SCale</xsl:when>
 
407
                                <xsl:when test="contains(FieldName/@name, 'CenterCoil_0') and boolean($mcmode)">$SSUCPolarity*$SSUCCurrent*0.528*$SSUCSCale</xsl:when>
 
408
                                <xsl:when test="contains(FieldName/@name, 'EndCoil1_0') and contains($ccrun,'1')">$SSUE1Polarity*$SSUE1Current*0.529*$SSUE1SCale</xsl:when>
 
409
                                <xsl:when test="contains(FieldName/@name, 'EndCoil2_0') and contains($ccrun,'1')">$SSUE2Polarity*$SSUE2Current*0.532*$SSUE2SCale</xsl:when>
 
410
                                <xsl:when test="contains(FieldName/@name, 'EndCoil1_0') and contains($cctag,'1')">$SSUT1Polarity*($SSUCCurrent+$SSUT1Current)*0.529*$SSUE1Scale</xsl:when>
 
411
                                <xsl:when test="contains(FieldName/@name, 'EndCoil2_0') and contains($cctag,'1')">$SSUT2Polarity*($SSUCCurrent+$SSUT2Current)*0.532*$SSUE2Scale</xsl:when>
 
412
                                <xsl:when test="contains(FieldName/@name, 'FCoil_0') and boolean($mcmode)">$FCMUPolarity*$FCMUCurrent*0.5565*FCMUScale</xsl:when>
 
413
                                <xsl:when test="contains(FieldName/@name, 'FCoil_1') and boolean($mcmode)">$FCMUPolarity*$FCMMode*$FCMDCurrent*0.5565*FCMDScale</xsl:when>
 
414
                                <xsl:when test="contains(FieldName/@name, 'MatchCoil1_1') and boolean($mcmode)">$SSDM1Polarity*$FCMMode*$SSDM1Current*0.52*$SSDM1Scale</xsl:when>
 
415
                                <xsl:when test="contains(FieldName/@name, 'MatchCoil2_1') and boolean($mcmode)">$SSDM2Polarity*$FCMMode*$SSDM2Current*0.5174*$SSDM2Scale</xsl:when>
 
416
                                <xsl:when test="contains(FieldName/@name, 'CenterCoil_1') and boolean($mcmode)">$SSDCPolarity*$FCMMode*$SSDCCurrent*0.52817*$SSDCScale</xsl:when>
 
417
                                <xsl:when test="contains(FieldName/@name, 'EndCoil1_1') and contains($ccrun,'1')">$SSDE1Polarity*$FCMMode*$SSDE1Current*0.5316*$SSDE1Scale</xsl:when>
 
418
                                <xsl:when test="contains(FieldName/@name, 'EndCoil2_1') and contains($ccrun,'1')">$SSDE2Polarity*$FCMMode*$SSDE2Current*0.5291*$SSDE2Scale</xsl:when>
 
419
                                <xsl:when test="contains(FieldName/@name, 'EndCoil1_1') and contains($cctag,'1')">$SSDT1Polarity*$FCMMode*($SSDCCurrent+$SSDT1Current)*0.5316*$SSDE1Scale</xsl:when>
 
420
                                <xsl:when test="contains(FieldName/@name, 'EndCoil2_1') and contains($cctag,'1')">$SSDT2Polarity*$FCMMode*($SSDCCurrent+$SSDT2Current)*0.5291*$SSDE2Scale</xsl:when>
393
421
                                <xsl:otherwise><xsl:value-of select="ScaleFactor/@name"/></xsl:otherwise>
394
422
                            </xsl:choose>
395
423
                            }