- if (i==0 && j==0){ // Rounded pcb of central slat (SR1, NR1)
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SC5X", idSlatCh5, 2*index-1,TGeoTranslation(xx3,0.,zPanel));
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SC5X", idSlatCh5, 2*index,TGeoTranslation(xx3,0.,-zPanel));
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SC5I", idSlatCh5, index,TGeoTranslation(xx3,0.,0.));
- GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SC6X", idSlatCh6, 2*index-1,TGeoTranslation(xx3,0.,zPanel));
- GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SC6X", idSlatCh6, 2*index,TGeoTranslation(xx3,0.,-zPanel));
- GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SC6I", idSlatCh6, index,TGeoTranslation(xx3,0.,0.));
- } else {
- if (i==1 && j==0){ // Rounded pcb of rounded slats (SR2. NR2)
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SD5X", idSlatCh5, 2*index-1,TGeoTranslation(xx,0.,zPanel));
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SD5X", idSlatCh5, 2*index,TGeoTranslation(xx,0.,-zPanel));
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SD5I", idSlatCh5, index,TGeoTranslation(xx,0.,0.));
- GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SD6X", idSlatCh6, 2*index-1,TGeoTranslation(xx,0.,zPanel));
- GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SD6X", idSlatCh6, 2*index,TGeoTranslation(xx,0.,-zPanel));
- GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SD6I", idSlatCh6, index,TGeoTranslation(xx,0.,0.));
- } else {
- if ( (i == 0 || i == 1 || i == 2) && j == kNPCB3[i]-1) { // 1 pcb is shortened by 5cm
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SB5X", idSlatCh5, 2*index-1,TGeoTranslation(xx2,0.,zPanel));
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SB5X", idSlatCh5, 2*index,TGeoTranslation(xx2,0.,-zPanel));
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SB5I", idSlatCh5, index,TGeoTranslation(xx2,0.,0.));
- } else {
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("S05X", idSlatCh5, 2*index-1,TGeoTranslation(xx,0.,zPanel));
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("S05X", idSlatCh5, 2*index,TGeoTranslation(xx,0.,-zPanel));
- GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("S05I", idSlatCh5, index,TGeoTranslation(xx,0.,0.));
- }
- GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("S06X", idSlatCh6, 2*index-1,TGeoTranslation(xx,0.,zPanel));
- GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("S06X", idSlatCh6, 2*index,TGeoTranslation(xx,0.,-zPanel));
- GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("S06I", idSlatCh6, index,TGeoTranslation(xx,0.,0.));
+ if (i==0 || i==1) { // Different rotation due to new mapping convention
+ if (i==0 && j==0) { // Rounded pcb of central slat (SR1, NR1)
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SC5X", idSlatCh5, 2*index-1,TGeoTranslation(-xx3,0.,zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SC5X", idSlatCh5, 2*index,TGeoTranslation(-xx3,0.,-zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SC5I", idSlatCh5, index,TGeoTranslation(-xx3,0.,0.),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SC6X", idSlatCh6, 2*index-1,TGeoTranslation(-xx3,0.,zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SC6X", idSlatCh6, 2*index,TGeoTranslation(-xx3,0.,-zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SC6I", idSlatCh6, index,TGeoTranslation(-xx3,0.,0.),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ }
+ else {
+ if (i==1 && j==0){ // Rounded pcb of rounded slats (SR2. NR2)
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SD5X", idSlatCh5, 2*index-1,TGeoTranslation(-xx,0.,zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SD5X", idSlatCh5, 2*index,TGeoTranslation(-xx,0.,-zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SD5I", idSlatCh5, index,TGeoTranslation(-xx,0.,0.),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SD6X", idSlatCh6, 2*index-1,TGeoTranslation(-xx,0.,zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SD6X", idSlatCh6, 2*index,TGeoTranslation(-xx,0.,-zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("SD6I", idSlatCh6, index,TGeoTranslation(-xx,0.,0.),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ }
+ else {
+ if (j == kNPCB3[i]-1) { // 1 pcb is shortened by 5cm
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SB5X", idSlatCh5, 2*index-1,TGeoTranslation(-xx2,0.,zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SB5X", idSlatCh5, 2*index,TGeoTranslation(-xx2,0.,-zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("SB5I", idSlatCh5, index,TGeoTranslation(-xx2,0.,0.),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ }
+ else {
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("S05X", idSlatCh5, 2*index-1,TGeoTranslation(-xx,0.,zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("S05X", idSlatCh5, 2*index,TGeoTranslation(-xx,0.,-zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh5)->AddEnvelopeConstituent("S05I", idSlatCh5, index,TGeoTranslation(-xx,0.,0.),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ }
+ GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("S06X", idSlatCh6, 2*index-1,TGeoTranslation(-xx,0.,zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("S06X", idSlatCh6, 2*index,TGeoTranslation(-xx,0.,-zPanel),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ GetEnvelopes(moduleSlatCh6)->AddEnvelopeConstituent("S06I", idSlatCh6, index,TGeoTranslation(-xx,0.,0.),TGeoRotation("rotAbX",90,180+angle,90,90+angle,180,0));
+ }