/[PAMELA software]/PamVMC_update/trk/src/f77/locatf.F
ViewVC logotype

Contents of /PamVMC_update/trk/src/f77/locatf.F

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Tue Oct 15 15:51:24 2013 UTC (11 years, 2 months ago) by formato
Branch: MAIN, rel
CVS Tags: reltag, HEAD
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
PamVMC update

1 *
2 * $Id: locatf.F,v 1.5 2009-06-12 18:39:59 pam-rm2 Exp $
3 *
4 * $Log: locatf.F,v $
5 * Revision 1.5 2009-06-12 18:39:59 pam-rm2
6 * - Introduced user-defined names of output files and random seeds number.
7 * Users can do it use options of PamVMCApplication constructor:
8 * PamVMCApplication(const char* name, const char *title, const char*
9 * filename="pamtest", Int_t seed=0).
10 * The Random object that I use is TRandom3 object which has astronomical
11 * large period (in case of default initialization 0). All random generators
12 * in the code use this object by calling of gRandom singleton which keeps
13 * it.
14 *
15 * - Corrected TOF digitization routine. No problems with TDC hits due to
16 * hadronic interactions anymore.
17 *
18 * - Some small changes was done to compile code under Root 5.23. +
19 * geant4_vmc v. 2.6 without any warnings
20 *
21 * - Some classes of PamG4RunConfiguartion was changed for geant4_vmc v.
22 * 2.6.Some obsolete classes was deleted as soon as developers implemented
23 * regions.
24 *
25 * - Navigation was changed from "geomRootToGeant4" to "geomRoot", because on
26 * VMC web page written that as soon as Geant4 has no option ONLY/MANY
27 * translation of overlapped geometry to Geant4 through VGM could be wrong.
28 * I'd like to stay with Root navigation:
29 * http://root.cern.ch/root/vmc/Geant4VMC.html. This should be default
30 * option.
31 *
32 * - New Tracker digitization routine written by Sergio was implemented
33 *
34 * - PamVMC again became compatible with geant4_vmc v.2.5 and ROOT 5.20.
35 * The problem was that ROOT developers introduced in TVirtualMC class a new
36 * method SetMagField and new base class:TVirtualMagField from which
37 * user-defined classes shoukd be derived
38 *
39 * Revision 1.1 2009-02-19 17:46:26 nikolas
40 * Cleaning up before releasing
41 *
42 * Revision 1.2 1996/05/24 10:56:52 jamie
43 * add locatr entry for consistency with wrup
44 *
45 * Revision 1.1.1.1 1996/02/15 17:48:49 mclareni
46 * Kernlib
47 *
48 *
49 #if !defined(CERNLIB_QMIBMVF)
50 *#include "kernnum/pilot.h"
51 *
52 * Name change (consistancy)
53 *
54 FUNCTION LOCATR(ARRAY,LENGTH,OBJECT)
55 DIMENSION ARRAY(*)
56 LOCATR=LOCATF(ARRAY,LENGTH,OBJECT)
57 END
58
59 FUNCTION LOCATF(ARRAY,LENGTH,OBJECT)
60 C BINARY SEARCH THRU 'ARRAY' TO FIND 'OBJECT'
61 C 'ARRAY' IS ASSUMED TO BE SORTED PRIOR TO CALL
62 C IF MATCH IS FOUND, FUNCTION RETURNS POSITION OF ELEMENT
63 C IF NO MATCH FOUND, FUNCTION GIVES NEGATIVE OF NEAREST ELEMENT
64 C SMALLER THAN OBJECT
65 C F. JAMES , SEPT.,1974
66 DIMENSION ARRAY(2)
67 NABOVE = LENGTH + 1
68 NBELOW = 0
69 10 IF (NABOVE-NBELOW .LE. 1) GO TO 200
70 MIDDLE = (NABOVE+NBELOW) / 2
71 IF (OBJECT - ARRAY(MIDDLE)) 100, 180, 140
72 100 NABOVE = MIDDLE
73 GO TO 10
74 140 NBELOW = MIDDLE
75 GO TO 10
76 180 LOCATF = MIDDLE
77 GO TO 300
78 200 LOCATF = -NBELOW
79 300 RETURN
80 END
81 #endif

  ViewVC Help
Powered by ViewVC 1.1.23