This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gdraw / gdbomb.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:20:20  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.25  by  S.Giani
11 *-- Author :
12 *
13       SUBROUTINE GDBOMB(ICPOIN,ISHAPE)
14 *
15 ********************************************************************************
16 *
17 *  This subroutine allows exploded view of detectors !
18 *
19 *  GBOOM > 0 => EXPLOSION
20 *
21 *  GBOOM = 0 => RESET
22 *
23 *  GBOOM < 0 => IMPLOSION
24 *
25 ********************************************************************************
26 *
27 #include "geant321/gcbank.inc"
28 #include "geant321/gcunit.inc"
29 #include "geant321/gcvolu.inc"
30 #include "geant321/gcgobj.inc"
31 *SG
32 #include "geant321/gcmutr.inc"
33 #include "geant321/gcdraw.inc"
34 #include "geant321/gchiln.inc"
35 #include "geant321/gcspee.inc"
36       DIMENSION RRMIN(3),RRMAX(3)
37       SAVE SEXP1, SEXP2, SEXP3
38 C.    ------------------------------------------------------------------
39 *
40 *
41       IF(GBOOM.NE.0)THEN
42          IF(ISUBLI.EQ.1) THEN
43             CALL CGSHIF(SEXP1,SEXP2,SEXP3,Q(ICPOIN))
44             ITSTCU=1
45          ELSE
46             CALL CGMNMX(Q(ICPOIN),RRMIN,RRMAX)
47             EXP1=(RRMAX(1)+RRMIN(1))*.5
48             EXP2=(RRMAX(2)+RRMIN(2))*.5
49             EXP3=(RRMAX(3)+RRMIN(3))*.5
50             AEXP1=ABS(EXP1)
51             AEXP2=ABS(EXP2)
52             AEXP3=ABS(EXP3)
53             AA1=MAX(ABS(RRMAX(1)),ABS(RRMIN(1)))
54             AA2=MAX(ABS(RRMAX(2)),ABS(RRMIN(2)))
55             AA3=MAX(ABS(RRMAX(3)),ABS(RRMIN(3)))
56             IF((AEXP1/AA1).LE.0.05.AND.(AEXP2/AA2).LE.0.05.AND.
57      +                 (AEXP3/AA3).LE.0.05)THEN
58                ITSTCU=0
59                IF(IPORLI.EQ.1)LPASS=1
60             ELSE
61                ITSTCU=1
62                IF(ISHAPE.EQ.11.OR.ISHAPE.EQ.12)LPASS=1
63                SEXP1=GBOOM*EXP1
64                SEXP2=GBOOM*EXP2
65                SEXP3=GBOOM*EXP3
66                CALL CGSHIF(SEXP1,SEXP2,SEXP3,Q(ICPOIN))
67             ENDIF
68          ENDIF
69       ENDIF
70 *
71  999  END
72