BAC - OFFLINE J. Gajewski M. Gromisz G. Grzelak M. Krzyzanowska M. Krzyzanowski 19.03.90 Last update: J. Gajewski 5.11.92 The Backing Calorimeter Reconstruction Package ---------------------------------------------- for the ZEPHYR Programme ------------------------- version 4.02 Contents (list of chapters): 1. General remarks. 2. General steering/data flow. 3. Data structures. 4. Reconstruction algorithm. 5. Conventions - units, reference frames, numbering. 6. Packages/procedures description. 7. Common blocks description. 8. ADAMO subschemas. 9. Control Cards 10.Index of the BAC Reconstruction Package global symbols. 1. General remarks. =================== The BAC Reconstruction Package is an integral part of the ZEPHYR programme and is driven by its general steering routines. The source code can be found f.eg. on Disk$ZOF:[Zephyr.Pro.Source.Pam]XXRec.Car and is written in Fortran 77 with external references to: - ZRRec library (general Zeus reconstruction library) - ADAMO library (see f.eg. Introduction to ADAMO, by M.G.Green, Preprint CERN/DD/US/131) - CERNLib library. All names of global object (i.e. procedures, common blocks) specific for the BAC Package are distinguished by a "X" letter at the begining. Data analysis is often done by either EAZE or self written programs. In order to use in such programs the subroutines from XXRec library one has to (as bare minimum): - call XBINIT(IErr) before processing first event, i.e. in case of EAZE this call should be in ZUINIT. Alternatively, if one is satisfied with default values of cuts/constants, one may either call XBSDEF or load block data XXBKDT. - call XBGEOM after reading in and before the processing of every event, i.e. in case of EAZE at the beginning of ZUANAL. 1.1. Vocabulary of XXRec jargon ------------------------------- BAC 'chambers' are proportional 'Tubes' having 7 or 8 'Wires'. Four (rarely less) such tubes are mechanically put together forming so called 'XLayer', sometimes called also 'Module' or '4-Chamber'. XLayer is the only geometrically well defined object, whose dimensions, position and orientation is known to the XXRec package and stored in 'Geometry GAF'. The Tube composition of the XLayer is characterised by 'WireMap', f.eg. 8870 means that XLayer consists of 3 Tubes, first two having 8 Wires and the third has 7 wires. Each XLayer is read by 'Hit Readout' giving a 'Hit Pattern' - a word where each bit corresponds to single wire. XLayers are placed in gaps of Iron Yoke, those which are directly beneath the others in the direction of the depth of the calorimeter form 'Wire Tower'. The signals from all wires and XLayers of the Wire Tower are summed up and read via two sets of amplifiers, shapers and FADCs. These two sets differ in the amplification and the dynamic range and are called 'Normal' and 'Amplified Readouts'. The values of the final signals at some fixed time intervals are called 'Crossings'. XLayers have several 'Pads' along its length. Pads which are directly beneath the others in the direction of the depth of the calorimeter form 'Pad Tower'. The signals from all Pads of the Pad Tower are summed up and read via FADCs giving also a set of Crossings. For (mainly) trigger purposes signals from several Pad Towers (usually neighbouring Pads perpendicular to Wire Tower direction) are summed up forming 'Strip Towers', which are also read by FADCs giving a set of Crossings. Pad Towers have the best granulation (roughly 50cm x 50cm), Wire Towers have best dynamic range of energy measurement. ------------------------------------------------------------------------- Figure 1. Schematic spatial organisation of BAC readouts (XLayer's Hits) ------------------------------------------------------------------------- W i r e Tube = Chamber I II II II I I.|.|.|.|.|.|.|.II.|.|.|.|.|.|.|.II.|.|.|.|.|.|.|.II.|.|.|.|.|.|.I I---------------II---------------II---------------II-------------I XLayer = Module = 4-Chamber (with WireMap=8887) ------------------------------------------------------------------------- Figure 2. Schematic spatial organisation of BAC readouts (Towers) ------------------------------------------------------------------------- STRIP TOWER +--------+ / | | /| | | /X| | | /|L| +--------+ /I|a|/ | | /|R|y/ | | /X|O|/ | | /|L|N/ W T +--------+--------+--------+--------+--------+I|a|/ I O | | | PAD | | |R|y/ R W | | | TOWER | | |O|/ E E | | | | | |N/ R +--------+--------+--------+--------+--------+/ | | | | | | | | | | | +----> Normal +--------+ | | | +------> Amplified | | | | +--------+ 2. General steering/data flow. ============================== Full BAC Package can be logically divided into several sub-packages corresponding to different stages of ZEPHYR run. For each sub-package driving routine has been provided. These routines interface BAC Package to ZEPHYR steering and perform appropriate actions (calling other routines) An error status is returned to ZEPHYR. Data transfer between BAC Package and other parts of ZEPHYR is carried out through ADAMO tables (except error flags, I/O units numbers e.t.c.) wherease BAC specific subroutines communicate between each other mostly through common blocks and parameters as well as ADAMO tables. For detailed description of procedures, BAC internal and ADAMO common blocks refer to next chapters. ZEPHYR run stages and sub-package drivers are named below. 2.1 Run initialisation stage. ----------------------------- XBINIT Sets variables to default values, processes input cards, initializes constants, histograms and technical analysis (quality monitor) package. 2.2 Event initialisation stage. ------------------------------- XBCALB Reads calibration data for current event from GAF. Dummy now (calbration constants are presently read from data cards). For historical reasons calls XBGEOM. XBCOND Reads condition data for current event from GAF. Dummy now. XBGEOM Reads BAC Geometry Tables for current event from GAF ( ie. ADAMO Direct Access File containing geometry data base). XBEVIN Performs data correction for some corrupted runs, pre-reconstruction (FADC crossing to deposit conversion) and data quality monitoring. 2.3 Event reconstruction stage. ------------------------------- XBRECO Performs reconstruction, finds Jet/MIP candidates, fills event output ADAMO tables, conditionaly prints out a semi-graphics plot of reconstructed event. 2.4 Event termination stage. ---------------------------- Done globally by ZEPHYR, outside BAC Package. 2.5 Run termination stage. -------------------------- XBTERM Prints out run and quality monitor statistics. Reports statistics of all failures of the BAC reconstruction algorithm. Output can be switched on/off via input cards. 3. Data structures. =================== 3.1 ADAMO structures, Numbering scheme. --------------------------------------- The BAC Reconstruction Package operates on Entity - Relationship sets defined in four DDL sub-schemas: XBRECO - defining tables to store BAC geometry data as read from GAF. XXINP - defining tables to store detector readout for a single event. XXOUT0 - defining tables to store pre-reconstructed energy deposits. XXOUT1 - defining tables to store reconstructed Jet/MIPs candidaates. Section 8 of this document contains a full definition of these sub-schemas. Numbering scheme. ----------------- Each Tower/Layer is characterised by a set of integer numbers. Numbers are packed into a 32 bits long unique object identifier. Bytes within an identifier and bits within a byte are numbered according to the Little-Endian convention (i.e. the most significant bit/byte is the last one). Those Tower/Layer identifiers are often referred as GG-indices and contain following information packed into one word: TYPE : Object type: Normal_Wire_Tower = 1, Amplified_Wire_Tower = 2, Strip_Tower = 3, Pad_Tower = 4, Wire_Layer = 5, Sensitive_Pad = 6 UNITID : Barrel=1, Forecap=2, Rearcap=3 AREA : Area Number [0:12] CXP,CYP : Pad Tower Numbers (unique within the Unit) CXW,CYW : Wire Tower Numbers (unique within the Unit) CXS,CYS : Strip Tower Numbers (unique within the Unit) Discrete Coordinantes on the two dimensional projections of the Barrel, Forecap and Rearcap. In Endcaps CX, CY increase along the HERA X and Y axes respectively. In the Barrel CX incrises according to the Theta angle, CY to the Phi angle. CL : Layer Number within a Component in Barrel [1: 9] A-I in Forecap [1:10] A-J in Rearcap [1: 7] A-G Layer A is allways the nearest to the Vertex. RHO : The Two Special Density Bits (valid only for pads and strips) RHO = 0 - normal pad or strip tower RHO = 1 - only odd LAYERs in tower RHO = 2 - only even LAYERs in tower Packing Schema: field #bits position ----- ----- -------- not_used 6 27:32 TYPE 3 24:26 UNITID 2 22:23 AREA 4 18:21 CX 5 13:17 CY 6 7:12 CL 4 3: 6 RHO 2 1: 2 Remark: "GG" are the initials of the author of this indexing scheme. 3.1.1 Sub-schema XBRECO Table XBAC - each row represents one part of the BAC ( Barrel, Forcap or Rearcap). Table XXLay - each row corresponds to a particular Chamber Module ie. set of 1 to 4 of single tubes. Chamber Modules are characterised by the following set of attributes: NumXL - a Chamber Module identifier (GGIndex) MapWir - a coded layout of Module Wires Each row of XXLay table is linked to: - an appropriate row of XPos table which specifies the position of a centre of the electronic end of the Module in the ZEUS coordinate system; - to XRot table specifing elements of a rotation matrix transforming local Module coordinates into ZEUS ones; - to XDim table specifying the dimensions of the Module. Table XWTow - each row corresponds to a particular Wire Tower. Wire Towers are characterised by the following set of attributes: NumWT - a Wire Tower identifier NXLay - a number of Modules in that Wire Tower XLayID(10) - a list of all Module identifiers in the order from most inner to most outer one. Table XPTow - each row corresponds to a particular Pad Tower. Pad Towers are characterised by the following set of attributes: NumPT - an Pad Tower identifier NXLay - a number of Modules in that Pad Tower XLayID(10) - a list of Module identifiers XSTow - refernce link to the Strip Tower to which this Pad Tower belongs. Table XSTow - each row corresponds to a particular Strip Tower. Strip Towers has one attribute: NumST - an Strip Tower identifier ------------------------------------------------------------------------- Figure 3. E-R diagram of XBRECO sub-schema. ------------------------------------------------------------------------- +----------------------------------------------------+ | XBAC | +----------------------------------------------------+ | | +------+ +----------------------------------------------------+ | XDim | A A A A +------+ A A A A -->>| | | | | | | +------+ +-------+ +-------+ +-------+ +-------+ | | XSTow | | XPTow | | XWTow | | XXLay | | +------+ +-------+ +-------+ +-------+ +-------+ | | XPos | | |<<----| | | | | |--- +------+ | | | | | | | |----->| | | | | | | | | |--- +------+ +-------+ +-------+ +-------+ +-------+ | | +------+ | | XRot | | +------+ -->>| | +------+ 3.1.2 Sub-schema XXINP Tables defined in this sub-schema contain BAC readout data in the form of Tower Identifier followed by four FADC crossings packed into one word. There might be several crossings for each tower - higher row number corresponds to higher crossing numbers. So each of the following tables has two attributes: - Num - contains the tower identifier (GG-index), - Cross - contains packed crossings. Table XXW1RD The Normal Wire Tower readout (filp-flopped). Table XXW6RD The Amplified Wire Tower readout. Table XXPTRD The Pad Tower readout (flip-flopped). Table XXSTRD The Strip Tower readout. Table XXXLRD The Hit (XLayer) readout (reversed order). Table XXPSRD The Sensitive Pad Tower (triangle) readout. There are also following tables describing the BAC on-line status (they are not used directly for reconstruction, but might be useful for formal consistency checks): Table XXSTAT Readout status. Table XXNODE Transputer Node Status. Table XXTRIG Trigger info. Table XXTPST Transputer Setup. All tables from subschema XXINP are defined to be STATIC (i.e. new entries cannot be added) and have no reference links. 3.1.3 Sub-schema XXOUT0 The subschema XXOUT0 form a intermediate output of BAC reconstruction. It contains tables derived directly from input readout tables after zero suppresion, pulse shape analysis, energy calibration and rough spatial reconstruction (for graphic purposes). The following tables: Table XWTPH for Wire Tower (combined Normal + Amplified) Table XPTPH for Pad Tower Table XXLHP for Hit Pattern Table XPSPQ for Sensitive Pad have all very similar attributes, namely (see DDL for details): Num - Tower identifier (GG-index) PH - Pulse Height E - Energy in GeV XYZin(3) - ZEUS coordinates of the middle of innermost XLayer XYZout(3) - ZEUS coordinates of the middle of outermost XLayer 3.1.4 Sub-schema XXOUT1 The subschema XXOUT1 contains the ultimate output of the BAC reconstruction given in terms of MIP/Jet candidates. Set of parameters describing each candidate is stored as a row of appropriate XJetEt or XMIPEt table. Additionaly for some MIPs, usually that which cross the bottom of BAC, an entry in table XTrkEt is created. If the reconstruction algorithm does not allow to distinguish beetwen MIP and Jet, entries in both of these tables are created and a link from XMIPEt to XJetEt is established do mark an ambiguity. Table XEntit summarises all reconstructed objects and ambiguities. Tables XJetEt and XMIPEt have very similar attributes, namely (see DDL for details and minor differences): XYZ...(3) - Jet Centre of Gravity or first reconstructed point coordinates in ZEUS frame in cm XYZCov(3,3) Covariances of the XYZ... ...Cos(3) - Direction cosines of Jet Axis at centre of gravity or MIP direction YZCov(2,2) Covariances of Yp and Zp (Yp=cosY/cosX) XEnDep - Energy Deposit in BAC in GeV DEnDep - error on energy deposit NHitXY - Number of hits in depth,widths plane XMatEt - link showing possible matching with CAL cluster (CIdClu) XMCSEt - link showing possible matching with CAL condensate (CConSa) Table XTrkEt contains (not filled in the present version): PTrak - MIP momentum in GeV/c DPTrak - error on MIP momentum ------------------------------------------------------------------------------ Figure 4. E-R diagram of XXOUT1 sub-schema. ------------------------------------------------------------------------------ +----------------+ | XEntit | +----------------+ | NJet | | NMIP | | ..... | +----------------+ ^ ^ ^ ^ | | - - | | +---------+ +-----------+ | | * * | | +------------+ +------------+ | XMIPEt |-*-|-------------|->>| XJetEt | +------------+ +------------+ | XYZFPo(3) | | XYZCoG(3) | | XYZCos(3) | | JAXCos(3) | | ........ | | ........ | +------------+ +------------+ ^ - | * | +------------+ | XTrkEt | +------------+ | PTrak | | ...... | +------------+ 3.2 BAC Reconstruction Package common blocks. --------------------------------------------- For detailed description refer to section 7 of this document. 4. Reconstruction Algorithm. ============================ Wire and Pad Tower readouts are recalculated into Energy Deposits and mapped approximately onto phi-theta sphere (LEGO plots). In this LEGO plots, clusters are looked for, using a simple adjacency algorithm. Wire and Tower clusters are matched against each other resulting in an unique set of clusters. The shape of each cluster is analysed using its hit-pattern readout resulting in a classification of a cluster as a MIP (muon?) or Jet (shower) candidate. 5. Conventions - units, reference frames, numbering. ==================================================== For BAC Reconstuction Package the following conventions are valid, exceptions are especially distinguished. All longitudal quantities are given in cm. All energetic quantities are given in GeV. All global/local reference frames are right-hand. 6. Packages / procedures description. ===================================== 6.1 Run Initialisation Package. ------------------------------------ +-----------------+ 6.1.1 | XBINIT ( IERR ) | +-----------------+ SUBROUTINE PURPOSE initialise run , define control cards, set all variables to default values. PARAMETERS IERR [ INTE, S, O ] - Non zero on output if initialisation IMPLICIT OUTPUT BAC commons with various steering variables, cuts and counters METHOD perform calls to: - XBSDEF to define default values of various costants. This is a duplication of Block Data XXBKDT to avoid problems on some installations. - KWIN and XBFFKY to define BAC input control cards, and eventually redefine default values of constants. - prints constants, which will be used for the current run. - XBOOKH to book standard histograms. - XTINIT to initialise quality monitor package. - XBOOKT to book quality monitor histograms, - XBSFOR to define non-standard print formats for PRITAB. - zeroes some internal run statistics and error counters. +--------+ 6.1.2 | XBFFKY | +--------+ SUBROUTINE PURPOSE define BAC specific input control cards with calls to FFKEY procedure. PARAMETERS none METHOD calls FFKEY procedure to define input control cards keywords and types. See chapter on Control Cards for full list of defined c/c. +--------+ 6.1.3 | XXBKDT | +--------+ BLOCK DATA PURPOSE Initialize program constants and set variables to default values. IMPLICIT OUTPUT Common Block /XCRUNV/, /XCLCUT/, /XCSCUT/, /XCONST/, /XCNPAD/ +--------+ 6.1.4 | XBOOKH | +--------+ SUBROUTINE PURPOSE define BAC reconstruction standard histograms PARAMETERS none METHOD defines 'BAC' HBOOK subdirectory and various histograms: - Total Wire and Pad Energy and their correlation, - Corelation of Wire and Pad energies for matched clusters, - Number of hits for MIPses and Showers, - Energy of reconstructed Showers. +--------+ 6.1.5 | XBOOKT | +--------+ SUBROUTINE PURPOSE define BAC quality monitor histograms PARAMETERS none METHOD defines various expert histograms to study FADC shapes: - sum of signals in various tower types - frequency of errors - RMS of pedestals - position of pulse maximum 6.2. BAC Geometry initialisation Package. ----------------------------------------- +-----------------+ 6.2.1 | XBGEOM ( IERR ) | +-----------------+ SUBROUTINE PURPOSE Read BAC geometry/detector definition from GAF. PARAMETERS IERR [ INTE, S, O ] - Non zero on output if initialisation has failed. IMPLICIT INPUT GAF IMPLICIT OUTPUT ADAMO tables XBAC, XWTow, XPTow, XXLay, XPos, XRot, XDim. METHOD Using ZDFET and ZDCHEK the tables of dataflow XBAGeometry4 are transferred to memory. 6.3 BAC Event initialisation Package. -------------------------------------- +-----------------+ 6.3.1 | XBCALB ( IERR ) | +-----------------+ SUBROUTINE PURPOSE Read BAC event calibration data from GAF. Dummy now. PARAMETERS IERR [ INTE, S, O ] - Non zero on output if initialisation has failed. +-----------------+ 6.3.2 | XBEVIN ( IERR ) | +-----------------+ SUBROUTINE PURPOSE initialise BAC Reconstruction Package for an event processing. PARAMETERS IERR [ INTE, S, O ] - Non zero on output if initialisation has faled. METHOD - clear all output ADAMO tables, - check if all GAFs for current event are present, eventually fetch them (XBGEOM,XBCALB,XBCOND), - perform data correction for some corrupted runs (XCORC2), - checks formal consistency of the data (XXCCON), - call XPRERE for pre-reconstruction (FADC crossing to deposit conversion), - call XTANAL for data quality monitoring, - finally create a new entry in XEntit table. +-----------------+ 6.3.3 | XBCOND ( IERR ) | +-----------------+ SUBROUTINE PURPOSE Read BAC event condition data from GAF. Dummy now. PARAMETERS IERR [ INTE, S, O ] - Non zero on output if initialisation has failed. +--------------------------------------------+ 6.3.4 | XPHANA ( GGIndex, NCross, FADC, Fate, PH ) | +--------------------------------------------+ SUBROUTINE PURPOSE Conversion of Crossings into Pulse Height. Checking Pulse Shape. PARAMETERS GGIndex [ INTE, S, I ] - Tower Identifier NCross [ INTE, S, I ] - Number of elements in FADC table FADC [ INTE, V, I ] - FADC Crossings in that order as thay have appeared in XX..RD table Fate [ LOGI, S, O ] - Pulse Shape quality (.true. if pulse OK) PH [ REAL, S, O ] - Pulse Height (0. if Fate=.false.; decimal fraction of .001 added for saturated FADCs) IMPLICIT INPUT Common /XCCOND/ with pulse shape cuts as defined by control cards: XSTP, XW1P, XW6P, XPAP (or by default values) IMPLICIT OUTPUT None METHOD The Pulse Height is calculated as PH=max(FADC)-FADC(2) If IMax is a position of the maximum i.e. max(FADC)=FADC(IMax) then shape is regarded as OK, if: - PH .ge. PHMax and - IMax .ge. CrossMin and - IMax .le. CrossMax and - Shape has single maximum (PHMax, CrosMin & Max are taken from /XCCOND/) If the user sets in control cards CrossMin<0 then much more rigoreus checking of pulse shape is done (s/r XPulHi) +-------------------------------------+ 6.3.5 | XPULHI (FADC,NCross,PH,Range,ErrSt) | +-------------------------------------+ SUBROUTINE PURPOSE Conversion of Crossings into Pulse Height. Rigoreus checking of the Pulse Shape. PARAMETERS FADC [ INTE, V, I ] - FADC crossings NCross [ INTE, S, I ] - Number of elements in cross table PH [ REAL, S, O ] - Pulse Height (0. if ErrSt<>0) Range [ INTE, S, O ] - range of pulse (max(cross)-min(cross)) ErrSt [ INTE, S, O ] - Error Status,= 0 -> good pulse 1 - pulse without pedestal 2 - wrong position of maximum 3 - wrong pulse increase time 4 - wrong "topology" of pulse 5 - 'chimney' (digital error) -1 - pedestal's pulse IMPLICIT INPUT None (in this version) IMPLICIT OUTPUT None METHOD The Pulse Height is calculated as PH=max(FADC)-FADC(2) Shape is classified as OK if: 1) has a well defined pedestal 2) good position of maximum 3) good time of pulse increase 4) good number and depth of local max.'s and min.'s 5) is not a "chimney" +-----------------+ 6.3.6 | XPRERE ( IERR ) | +-----------------+ SUBROUTINE PURPOSE Conversion of RAW data into energy deposits. PARAMETERS IERR [ INTE, S, O ] - Non zero on output if conversion has failed. IMPLICIT INPUT ADAMO tables XXXLRD, XXPTRD, XXW1RD, XXW6RD, XXSTRD, XXPSRD IMPLICIT OUTPUT ADAMO tables XXLHP, XPTPH, XWTPH, XSTPH, XPSPQ METHOD Hit readout: Table XXLHP is constructed from Table XXXLRD ------------- - Zero and doubled entries are suppressed, - Hit pattern order is inversed. Pad readout: Table XPTPH is constructed from Table XXPTRD ------------- - All crossings for this same Pad tower are selected - Crossings are flip-flopped - Pulse shape is analysed (s/r XPHANA) giving height - Pulse height is calibrated to deposit (f/n XPEDEP) - Rough coordinates (for graphic) of innermost and outermost XLayer centre are reconstructed (s/r XPRPAD) Wire readout: Table XWTPH is constructed from Tables XXW1RD & XXW6RD ------------- - Crossings for this same Normal Wire tower are selected - (Normal) crossings are flip-flopped - Pulse shape is analysed (s/r XPHANA) giving height (N) - The GG-index of the Amplified Wire tower is calculated from the GG-index of the Normal Wire tower - Crossings for Amplified Wire tower are selected - Pulse shape is analysed (s/r XPHANA) giving height (A) - Both pulse heights are calibrated into single deposit (f/n XPEDEP) - Rough coordinates (for graphic) of innermost and outermost XLayer centre are reconstructed (s/r XPRWIR) Strip readout: Table XSTPH is constructed from Table XXSTRD ------------- - All crossings for this same Strip tower are selected - Pulse shape is analysed (s/r XPHANA) giving height - Pulse height is calibrated to deposit (f/n XSEDEP) - Rough coordinates (for graphic) of innermost and outermost XLayer centre are reconstructed (s/r XPRSTR) Sensitive Pad readout: Table XPSPQ is constructed from Table XXPSRD --------------------- - Dummy (not yet coded) 6.4 BAC Event Reconstruction Package. --------------------------------------- +---------------------+ 6.4.1 | XAMBIG(IDMIP,IDJET) | +---------------------+ SUBROUTINE PURPOSE To construct for ambigeus cases XJetEt and XMIPEt banks simultaneusly. PARAMETERS IDMIP [ INTE, S, I ] - MIP bank identifier IDJET [ INTE, S, I ] - Jet bank identifier METHOD Subroutines XJET and XMIP are called to create both banks. +--------------------------------------------------------------------+ 6.4.2. | XCFIND(IPW,ICOMP,NOISE1,NOISE2,XLEGO,CLNUM,MAXI,MAXJ,NLEGO,SUMVAL, | | LSTART,MAXNCL,NCLUST,LISTID,MAXL,L) | +--------------------------------------------------------------------+ SUBROUTINE PURPOSE Cluster finding for single BAC LEGO-Plot. PARAMETERS IPW [ INTE, S, I ] - =1 for pad, =2 for wire LEGO/Clusters ICOMP [ INTE, S, I ] - =1 for barrel, =2 for forward, =3 for rear NOISE1 [ REAL, S, I ] - level at which peak value of LEGO plot is searched for NOISE2 [ REAL, S, I ] - level at which adjacent values of LEGO plot are searched for XLEGO [ REAL, A, I ] - LEGO plot values. XLEGO(MAXI,MAXJ) CLNUM [ INTE, A, O ] - cluster number to which given LEGO plot cell has been classified. CLNUM(MAXI,MAXJ) MAXI [ INTE, S, I ] - dimension of LEGO in THETA direction MAXJ [ INTE, S, I ] - dimension of LEGO in PHI direction NLEGO [ INTE, V, O ] - number of LEGO Plot cells classified to a given cluster. NLEGO(MAXNCL) SUMVAL [ REAL, V, O ] - Total energy deposited in a given cluster. SUMVAL(MAXNCL) LSTART [ INTE, V, O ] - pointer to LISTID, where the first cell identifier is to be found. This is always cell with peak value. LSTART(MAXNCL) MAXNCL [ INTE, S, I ] - maximum number of clusters allowed. NCLUST [ INTE, S,IO ] - actual number of clusters found up to now. LISTID [ INTE, V, O ] - list of all cells which were assigned to any cluster. Contains cell identifiers (coded coordinates ICOMP, ITHETA, IPHI ]. LISTID(MAXL) MAXL [ INTE, S, I ] - maximal dimension of LISTID L [ INTE, S,IO ] - last used pointer to LISTID METHOD LEGO Plot is searched for a value > NOISE1 which has not been used up to now. All neighbouring (see subroutine XNEIGH) cells with a value > NOISE2 are added to the cluster. Then neighbour to the neighbours are checked in the same way, and this procedure is repeated until no new neigbours are found. If two clusters are divided by single dead tower they will be put together. +---------------------------+ 6.4.3. | XDECID(IFATE,IDMIP,IDJET) | +---------------------------+ SUBROUTINE PURPOSE To make final decision whether given cluster is a JET or MIP (or ambigeus case). PARAMETERS IFATE [ INTE, S, O ] - =-1 if cluster has been classified as MIP = 0 if cluster is ambigeus =+1 if cluster has been classified as JET IDMIP [ INTE, S, O ] - MIP bank identifier IDJET [ INTE, S, O ] - Jet bank identifier METHOD Using partial decisions made for a single projection by subroutine XSHAPE a combined decision is worked out. For ambigeus cases if the total cluster deposit is > XECUT2 then jet hypothesis is preferred. +--------+ 6.4.4. | XEHITM | +--------+ SUBROUTINE PURPOSE To construct for a given cluster a 3-dimensional Hit-map PARAMETERS none IMPLICIT INPUT Common Block /XCLUST/ ADAMO tables XPTow, XXLay, XXLHP, XPos, XRot, XDim IMPLICIT OUTPUT Common Block /XCHITM/ METHOD For a given cluster (clusters derived from Pad-Tower readout are used since they are geometrically more accurate) all its LEGO plot cells are looked for. For each such a cell (which corresponds to a definite Pad Tower) all XLayers contributing to that pad tower are looked through. For each XLayer one can derive: - using Hit Pattern readout for that XLayer which wires has been hit. The number of the hitted wire defines the 'X-horizontal' coordinate of the hit (across the wires) - the ITHETA subidentifier of the Pad Tower identifier defines the second 'Z-horizontal' coordinate of the hit (along the wires) - the position in HERA of the XLayer itself defines the 'Y-vertical' coordinate of the hit (in the direction of the depth of the calorimeter). Thus the 3-dimensional hit map is constructed and knowing wire spacing, pad length and the thickness of the gas in the chambers the errors of respectively X,Z,Y coordinates can be estimated. All this measurements are brought to the common 'master' reference system (it is a system of the first XLayer of the first Pad Tower i.e. LEGO cell with peak value in a cluster). In abscence of the Hit readout the X-error is increased. In abscence of the Pad readout the Z-error is increased. +--------+ 6.4.5. | XELEGO | +--------+ SUBROUTINE PURPOSE To construct LEGO plots for PAD and WIRE Tower readout. PARAMETERS none IMPLICIT INPUT ADAMO tables XPTPH, XWTPH IMPLICIT OUTPUT Common Block /XCLEGO/ METHOD All Wire Towers readouts are fetched from table XWTPH. For each table entry its GGindex is decoded to the component identi- fier, as well as theta and phi subidentifiers. Those subidentifiers are used as LEGO plot indices. The Energy Deposits in the calorimeter (as derived from Pulse Height by function XWEDEP) is then stored as LEGO plot value. Analogical procedure is then applied to Pad Tower readout to construct Pad Tower LEGO plots. +-----------------+ 6.4.6. | XBRECO ( IERR ) | +-----------------+ SUBROUTINE PURPOSE To steer the BAC reconstruction of a single event. PARAMETERS IERR [ INTE, S, O ] - Non zero if reconstruction has failed. IMPLICIT INPUT ADAMO tables XPTPH, XWTPH, XSTPH, XXLHP, XPSPQ IMPLICIT OUTPUT ADAMO tables XMIPEt, XJetEt, XTrkEt METHOD In all Pad and Wire Tower LEGO plots clusters are looked for. They might be optionally (usually for debugging purposes) displayed (see KWIN control cards).Then Pad and Wire clusters are matched against each other resulting in a unique set of clusters (XMATCH). For each cluster using hit-pattern readout all its hits are collected in a form of a 3-dimensional map (XEHITM). The shape of the cluster is analyzed (XSHAPE) in two projections XY and ZY resulting in some predecisions whether this cluster is a MIP (muon?) or a JET (shower?). After final decision (XDECID) about classification of that cluster respective output banks are created (XMIP, XJET, XAMBIG). +---------------------------+ 6.4.7. | XGETID(ICOMP,JPHI,ITHETA) | +---------------------------+ INTEGER FUNCTION PURPOSE To code Pad/Wire Tower identifier from LEGO plot indices PARAMETERS XGETID [ INTE, S, F ] - Pad/Wire Tower identifier ICOMP [ INTE, S, I ] - component index JPHI [ INTE, S, I ] - PHI index ITHETA [ INTE, S, I ] - THETA index +------------------------------+ 6.4.8. | XGETIX(ID,ICOMP,JPHI,ITHETA) | +------------------------------+ SUBROUTINE PURPOSE To decode LEGO plot indices from Pad/Wire Tower identifier PARAMETERS ID [ INTE, S, I ] - Pad/Wire Tower identifier ICOMP [ INTE, S, O ] - component index JPHI [ INTE, S, O ] - PHI index ITHETA [ INTE, S, O ] - THETA index +-------------+ 6.4.9. | XJET(IDJET) | +-------------+ SUBROUTINE PURPOSE To construct XJetEt bank PARAMETERS IDJET [ INTE, S, I ] - Jet bank identifier IMPLICIT INPUT Common Block /XCLUST/, /XCHITM/, /XCSHAP/ IMPLICIT OUTPUT ADAMO table XJetEt METHOD Table entries are calculated from the results of: - clustering (Energy Deposit) - hit-maps (centre of gravity) - shape analysis (direction of the jet axis - points from vertex to BAC) +-------------------------------------------+ 6.4.10. | XLEGOG(IPW,ICOMP,JPHI,ITHETA,NUMCL,VALUE) | +-------------------------------------------+ SUBROUTINE PURPOSE to get LEGO plot value from any LEGO-plot PARAMETERS IPW [ INTE, S, I ] - =1 for pad, =2 for wire LEGO/Clusters ICOMP [ INTE, S, I ] - component index JPHI [ INTE, S, I ] - PHI index ITHETA [ INTE, S, I ] - THETA index NUMCL [ INTE, S, O ] - cluster number to which this cell belongs VALUE [ REAL, S, O ] - LEGO Plot value IMPLICIT INPUT Common Block /XCLEGO/ +-------------------------------------+ 6.4.11. | XLEGOP(IPW,ICOMP,JPHI,ITHETA,NUMCL) | +-------------------------------------+ SUBROUTINE PURPOSE to store cluster number for a cell from any LEGO-plot PARAMETERS IPW [ INTE, S, I ] - =1 for pad, =2 for wire LEGO/Clusters ICOMP [ INTE, S, I ] - component index JPHI [ INTE, S, I ] - PHI index ITHETA [ INTE, S, I ] - THETA index NUMCL [ INTE, S, I ] - cluster number to which this cell belongs IMPLICIT OUTPUT Common Block /XCLEGO/ +--------+ 6.4.12. | XMATCH | +--------+ SUBROUTINE PURPOSE to match Pad and Tower Clusters PARAMETERS none IMPLICIT INPUT Common Block /XCLUST/, tables XWTow, XPTow IMPLICIT OUTPUT Common Block /XCLUST/ METHOD For each Wire (and then Pad) clusters a list of all XLayers (belonging to any tower in that cluster) are formed. Then for each Wire cluster (which usually is geometrically bigger then Pad cluster) all Pad clusters are looked through. One counts for a given Pad cluster the number of its XLayers which are found also in the list of XLayers of the current Wire cluster. Then: - if none of the XLayers from the Pad cluster is found among the list of XLayers from the current Wire cluster - it means that given Pad cluster is different from current Wire cluster and the next Pad cluster is looked through. - if all XLayers from the Pad cluster are found among the list of XLayers from the current Wire cluster - it means that given Pad cluster is embedded in the current Wire cluster. - if only some XLayers from the Pad cluster are found among the list of XLayers from the current Wire cluster - such pad cluster is ignored for the time beeing (it will be reconstructed on the basis of solely pad cluster infor- mation). The number of Pad clusters, which are fully embedded in a current wire cluster is counted. Then if this number is: = 0 (i.e. there is wire cluster without correspondin pad cluster) current wire cluster is ignored assuming that it was electronic noise fluctuation. = 1 there is clean one to one correspondence, this cluster will be reconstructed on the basis of pad geometrical data with the energy taken from wire cluster (wire clusters have worse geometrical resolution but better energy range and accuracy). > 1 an extra (pad type) cluster is constructed containing all pad clusters assigned to a given wire cluster. Both original pad clusters as well as this extra cluster will be reconstructed. Also pad clusters which have not been associated with any of the wire clusters will be reconstructed on solely pad information. +-------------------+ 6.4.13. | XMIP(IDMIP,IDJET) | +-------------------+ SUBROUTINE PURPOSE To construct XMIPEt bank PARAMETERS IDMIP [ INTE, S, I ] - MIP bank identifier IDJET [ INTE, S, I ] - Jet bank identifier (=0 if MIP nonambigeus) IMPLICIT INPUT Common Block /XCHITM/, /XCSHAP/ IMPLICIT OUTPUT ADAMO table XMIPEt METHOD Table entries are calculated from the results of: - hit-maps (first point seen) - shape analysis (direction of the MIP at the first seen point - from vertex to BAC) +----------------------------------------------------------+ 6.4.14. | XNEIGH(IPW,ICOMP,JPHI,ITHETA,ICOMPN,JPHIN,ITHETN,NNEIGH) | +----------------------------------------------------------+ SUBROUTINE PURPOSE To find all cells which are neighbours of the given LEGO cell PARAMETERS IPW [ INTE, S, I ] - =1 for pad, =2 for wire LEGO/Clusters ICOMP [ INTE, S, I ] - component index JPHI [ INTE, S, I ] - PHI index ITHETA [ INTE, S, I ] - THETA index ICOMPN [ INTE, V, O ] - component index of the neighbour JPHIN [ INTE, V, O ] - PHI index of the neighbour ITHETN [ INTE, V, O ] - THETA index of the neighbour NNEIGH [ INTE, S, O ] - number of the neighbours METHOD for a given cell (ICOMP,JPHI,ITHETA) the indices of the neigbouring cells (in both directions and diagonally) are stored in the corresponding output vectors. If the cell lyies on a border of a component LEGO plot the neighbouring cells in the other component are also included. Since in that case their geometrical relationship cannot be easy evaluated from the indices the complicated lookup tables are used with the 'hard-wired' neighbourhood relations. +----------------------------------------------------------+ 6.4.15. | XPADZP(ICOMP,ITHE,JPHI,ITUBE,ZLENG,ZCHERA,ZLOCAL,PADLEN) | +----------------------------------------------------------+ SUBROUTINE PURPOSE gives z-position of a pad-centre in local Xlayer coordinate system respective to electronic side. Positive local Z is towards electronic side of the tube, so local Z is always negative. Additionally the pad length is returned. PARAMETERS ICOMP [ INTE, S, I ] - component index ITHE [ INTE, S, I ] - THETA index JPHI [ INTE, S, I ] - JPHI index ITUBE [ INTE, S, I ] - Tube number inside a 4-Module ZLENG [ REAL, S, I ] - Tube length ZCHERA [ REAL, S, I ] - Z coordinate of tube centre ZLOCAL [ REAL, S, O ] - 'Z-horizontal' coordinate of a pad centre PADLEN [ REAL, S, O ] - pad length METHOD It is assumed that a tube has many standard length pads (i.e. 49 cm + 0.1 cm pad spacing) and a one pad, which may have nonstandard length. +----------------+ 6.4.16. | XPEDEP(Num,PH) | +----------------+ REAL FUNCTION PURPOSE calculates Energy Deposit in a calorimeter Pad tower from its Pulse Height PARAMETERS XPEDEP [ REAL, S, O ] - Energy Deposit in GeV Num [ INTE, S, I ] - Pad Tower GG-index PH [ REAL, S, I ] - Pulse Height METHOD The Pulse Height (as read by readout electronic) is recalcu- lated into the corresponding Energy deposit. Energy is given a negative sign if the tower has been saturated. WARNING This is preliminary version - Calbration GAF format not yet fixed. +-----------------------------------------+ 6.4.17. | XPLEGO(IPW,ICOMP,XLEGO,CLNUM,MAXI,MAXJ) | +-----------------------------------------+ SUBROUTINE PURPOSE to display single (pseudo-) LEGO-plot PARAMETERS IPW [ INTE, S, I ] - =1 for pad, =2 for wire LEGO/Clusters ICOMP [ INTE, S, I ] - =1 for barrel, =2 for forward, =3 for rear XLEGO [ REAL, A, I ] - LEGO plot values. XLEGO(MAXI,MAXJ) CLNUM [ INTE, A, O ] - cluster number to which given LEGO plot cell has been classified. CLNUM(MAXI,MAXJ) MAXI [ INTE, S, I ] - dimension of LEGO in THETA direction MAXJ [ INTE, S, I ] - dimension of LEGO in PHI direction METHOD A (PHI,THETA) plot is displayed showing for each cell the cluster number to which this cell has been assigned. Cells with non-zero signal, which has not been assigned to any cluster are displayed by dots. XPLEGO is used usually for debugging purposes; It is switched by non-zero value (see KWIN control cards) of the XCPADL or XCWIRL variable. +------------------------------------------------------+ 6.4.18. | XPSHAP(ICL,IPRO,MASXID,NFIT,XF,YF,WF,IJET,A,B,CHI2F) | +------------------------------------------------------+ SUBROUTINE PURPOSE to display hit-map projection together with its line fit. PARAMETERS ICL [ INTE, S, I ] - cluster number for which hit map is displayed IPRO [ INTE, S, I ] - =1 for YvsX, =2 YvsZ projection MASXID [ INTE, S, I ] - Hit-map is displayed in 'MASter-refer.-frame' which is the reference frame of the first XLayer of the first tower of the cluster. MASXID is the identifier of this XLayer. NFIT [ INTE, S, I ] - number of points to be displayed. XF [ REAL, V, I ] - coordinates of the hits, which will be displayed vertically. It is 'Y-coordinate', which goes into depth of the calorimeter YF [ REAL, V, I ] - coordinates of the hits, which will be displayed horizontally. It is either 'X-coord.' (which goes across the wires) or 'Z-coord.' (which goes along the wires) WF [ REAL, V, I ] - weight associated IJET [ INTE, S, I ] - cluster predecision: =0 clean MIP, =1 proba- ble MIP, =2 probable JET, =3 clean JET A [ REAL, S, I ] - parameter of the line fit Y = A*X + B B [ REAL, S, I ] - parameter of the line fit Y = A*X + B CHI2F [ REAL, S, I ] - chi2/ndf of the line fit Y = A*X + B METHOD Hits are displayed as numbers proprtional to their weight. Tracks goes usually from top to the down of the plot. Fitted line is shown by stars. Scales are adjusted to give maximum resolution as a fraction or multiple of the natural hit spacing. Header and axes descriptions contain various relevant information. XPSHAP is used usually for debugging purposes; It is switched by non-zero value (see KWIN control cards) of the XHPADM variable. +---------------------------+ 6.4.19. | XPTRUE(ICOMP,JPHI,ITHETA) | +---------------------------+ SUBROUTINE PURPOSE To convert LEGO Plot indices of the Pad Tower into the true Pad Tower subidentifiers PARAMETERS ICOMP [ INTE, S, I ] - component index JPHI [ INTE, S, I ] - PHI index ITHETA [ INTE, S,IO ] - THETA index METHOD At the stage of constructing the LEGO plot Pad Tower subidentifiers (after some correction to achieve more uniform phi and theta mapping) are transformed into LEGO indices. XPTRUE performs reverse transformation. +--------+ 6.4.20. | XSHAPE | +--------+ SUBROUTINE PURPOSE To perform cluster shape analysis by: - 'histogramming' hits along Y-Master - performing line-fits to XvsY or ZvsY PARAMETERS none IMPLICIT INPUT Common Block /XCHITM/ IMPLICIT OUTPUT Common Block /XCSHAP/ METHOD For both projections of the hit-map (first XvsY, then Zvsy) a subset of the non-identical hits (disregarding the third coordinate) is formed. To each point of that subset a weight is assigned W=1/sqrt(det(cov. matrix)). For such a subset a line-fit is performed. The 'histogramming' (which is not a histogramming in a normal meaning) goes like that: - for each Y-bin the number of points in that bin is calcu- lated as well as the list of X (or Z) bin indices of all points in that Y-bin. - The list of X/Z indices is sorted in increasing order and one looks if any two consecutive are more then 1 bin apart from each other. The idea is that hits in consecutive bins might be caused by a very slanting track but the existance of the gap is a strong hint that this pattern has been caused by more then one track. - the number of Y-bins, for which such a gap exist is then calculated. Both chi2/ndf of the line fit and number of Y-bins with gaps are then compared with cut values (see control cards) initia- lized by KWIN. The result of this comparison is used to make predecisions about cluster classification. By those pre- decision more weight is put to 'gap' criteria then to 'chi2' criteria. Depending on the value of XHPADM control card variable hit maps, line-fit, and other relevant information are optionally (for debugging purposes) displayed. +----------------+ 6.4.21. | XWEDEP(Num,PH) | +----------------+ REAL FUNCTION PURPOSE calculates Energy Deposit in a calorimeter Wire tower from its Pulse Heights PARAMETERS XWEDEP [ REAL, S, F ] - Energy Deposit in GeV Num [ INTE, S, I ] - Wire Tower GGindex PH [ REAL, V, I ] - Pulse height of normal and amplified Wire METHOD The Pulse Height (as read by readout electronic) is recalcu- lated into the corresponding Energy deposit. The Energy Deposit is calculated from Amplified Wire Tower readout unless it is saturated when it is taken from Normal Wire Tower readout. The latter has worse accuracy but larger dynamic range. Saturation is signalled by a negative value of Energy. WARNING This is preliminary version - Calibration GAF format not yet fixed. 6.4 BAC Event Termination Package. ------------------------------------ Supported by general ZEPHYR routines. 6.5 BAC Run termination Package. ---------------------------------- +-----------------+ 6.5.1 | XBTERM ( IERR ) | +-----------------+ SUBROUTINE PURPOSE Print out run statistics. PARAMETERS IERR [ INTE, S, O ] - Non zero on output if termination has failed. 6.6. BAC Reconstruction utility routines ----------------------------------------- +-----------------+ 6.6.1. | XADDEN (E1, E2) | +-----------------+ REAL FUNCTION PURPOSE Add two energies preserving information about saturated towers PARAMETERS XADDEN [ REAL, S, F ] - Sum of E1 and E2 with saturation sign E1 [ REAL, S, I ] - first energy E2 [ REAL, S, I ] - second energy METHOD BAC reconstruction uses the convention that energy of saturated tower is negative. Consequently when summing energies of indivi- dual towers (f.eg. during clustering) the sum is negative if any of the towers have been saturated. +----------------------+ 6.6.2. | XERREN (IPW, E, DE2) | +----------------------+ SUBROUTINE PURPOSE Calculate error of the energy deposit. PARAMETERS IPW [ INTE, S, I ] - =1 for Pad Tower, =2 for Wire Tower E [ REAL, S, I ] - energy DE2 [ REAL, S, O ] - error**2 of the energy METHOD Uses following parametrisation of the Tower resolution (based on the results early CERN tests): E<30 E>30 Pads 1.35-.007*E 1.14 Wire *1 1.40-.006*E 1.22 Wire *6 1.30-.008*E 1.06 +-----------------------------------------+ 6.6.3. | XTOWER (X,PADNUM,WIRENUM,STRIPNUM,FROM) | +-----------------------------------------+ SUBROUTINE PURPOSE Find out to which readout towers the given point X belongs. PARAMETERS X [ REAL, V, I ] - Point in BAC in Zeus Coordinate system PADNUM [ INTE, S, O ] - GGindex of the corresponding Pad Tower WIRENUM [ INTE, S, O ] - GGindex of the corresponding Wire Tower STRIPNUM [ INTE, S, O ] - GGindex of the corresponding Strip Tower FROM [ INTE, S, O ] - =0 point outside BAC; =1/2/3 in B/F/RBAC METHOD At first entry all Pad towers are prereconstructed (s/r XPRPAD); corresponding Wire towers are found by looking for common XLayers; corresponding Strip towers are found by Pad-->Strip link. The point is checked for being inside BAC volume using parametri- sation based on Geant geometry description. For points inside BAC its Pad Tower is found by looking into table with Pad towers centres (created at first entry) and applying smallest (distance/characteristic size)**2 criterium. +------------------------------------------------+ 6.6.4. | BASDEC (GGIndex,Type,UnitID,Area,Cx,Cy,Cl,Rho) | +------------------------------------------------+ SUBROUTINE PURPOSE Decode GGIndex into its sub-identifiers. PARAMETERS GGIndex [ INTE, S, I ] - See Numbering scheme ... Type [ INTE, S, O ] - See Numbering scheme ... UnitID [ INTE, S, O ] - See Numbering scheme ... Area [ INTE, S, O ] - See Numbering scheme ... Cx [ INTE, S, O ] - See Numbering scheme ... Cy [ INTE, S, O ] - See Numbering scheme ... Cl [ INTE, S, O ] - See Numbering scheme ... Rho [ INTE, S, O ] - See Numbering scheme ... METHOD Lots of JBYT calls. WARNING This subroutine is not a part of XXRec package. It resides in Mozart.Car and is frequently used by both Mozart and ZEPHYR as well as user analysis programs. +------------------------------------------------+ 6.6.5. | BASCOD (Type,UnitID,Area,Cx,Cy,Cl,Rho,GGIndex) | +------------------------------------------------+ SUBROUTINE PURPOSE To code GGIndex from its sub-identifiers. PARAMETERS Type [ INTE, S, I ] - See Numbering scheme ... UnitID [ INTE, S, I ] - See Numbering scheme ... Area [ INTE, S, I ] - See Numbering scheme ... Cx [ INTE, S, I ] - See Numbering scheme ... Cy [ INTE, S, I ] - See Numbering scheme ... Cl [ INTE, S, I ] - See Numbering scheme ... Rho [ INTE, S, I ] - See Numbering scheme ... GGIndex [ INTE, S, O ] - See Numbering scheme ... METHOD Lots of SBYT calls. WARNING This subroutine is not a part of XXRec package. It resides in Mozart.Car and is frequently used by both Mozart and ZEPHYR as well as user analysis programs. 7. Common Blocks Description. ============================= +--------+ 7.1. | XCHEAD | +--------+ COMMON /XCHEAD/ XEVNUM INTEGER *4 XEVNUM PURPOSE contains internal event number VARIABLES XEVNUM - current (sequential) event number in this reconstruction run +--------+ 7.2. | XCHITM | +--------+ PARAMETER (MXNHIT=120) COMMON /XCHITM/ ICL , MASXID, MASPOS(3), MASROT(3,3), MASINV(3,3), + NHIT, IDHIT (3,MXNHIT), + XYZMAS(3,MXNHIT), COVMAS(3,3,MXNHIT) REAL *4 MASPOS , MASROT , MASINV, + XYZMAS , COVMAS INTEGER *4 ICL , MASXID, NHIT, ID HIT PURPOSE contains Hit map for a single cluster VARIABLES ICL - cluster number MASXID - XLayer identifier of the first XLayer of the first tower belonging to that cluster. The reconstruction is performed in the reference frame of this XLayer, here called 'master' reference frame. MASPOS - X,Y,Z of the centre of the 'master' XLayer in HERA MASROT - Rotation matrix from master to HERA frame MASINV - inverse of the above NHIT - total number of hits for this cluster IDHIT - unique hit identifier: in X - number of the hitted wire in Y - XLayer identifier in Z - Pad Tower identifier XYZMAS - hit coordinates in 'master' frame COVMAS - covariance matrix of the hit in 'master' frame +--------+ 7.3. | XCLCUT | +--------+ COMMON /XCLCUT/ XCUTMX(3,2), XCUTAD(3,2) REAL *4 XCUTMX , XCUTAD PURPOSE contains constans to steer clustering - initialized by KWIN control cards VARIABLES XCUTMX - minimum value of (BAR/FOR/RER, PAD/WIR) deposit for finding cluster maximum (seed) value XCUTAD - minimum value of (BAR/FOR/RER, PAD/WIR) deposit for adding the tower to a cluster +--------+ 7.4. | XCLEGO | +--------+ COMMON/XCLEGO/ XBPADT(20,60 ) ,XBWIRT(2,60 ), + XFPADT(14,16 ) ,XFWIRT(2,16 ), + XRPADT(14,18 ) ,XRWIRT(2,18 ), + XBPADN(20,60 ) ,XBWIRN(2,60 ), + XFPADN(14,16 ) ,XFWIRN(2,16 ), + XRPADN(14,18 ) ,XRWIRN(2,18 ), + XBPADI(20,60 ) ,XBWIRI(2,60 ), + XFPADI(14,16 ) ,XFWIRI(2,16 ), + XRPADI(14,18 ) ,XRWIRI(2,18 ) REAL *4 XBPADT ,XBWIRT, + XFPADT ,XFWIRT, + XRPADT ,XRWIRT INTEGER *4 XBPADN ,XBWIRN, + XFPADN ,XFWIRN, + XRPADN ,XRWIRN INTEGER *4 XBPADI ,XBWIRI, + XFPADI ,XFWIRI, + XRPADI ,XRWIRI PURPOSE contains Pad and Wire Tower LEGOs for Barrel/Forward/Rear VARIABLES XBPADT - Pad tower LEGO plot for Barrel (En. dep. in cal.) XBWIRT - Wire tower LEGO plot for Barrel XFPADT - Pad tower LEGO plot for Forward XFWIRT - Wire tower LEGO plot for Forward XRPADT - Pad tower LEGO plot for Rear XRWIRT - Wire tower LEGO plot for Rear analogously: XBPADN XBWIRN cluster number to which given LEGO plot XFPADN cell has been classified. XFWIRN XRPADN XRWIRN analogously: XBPADI XBWIRI XFPADI GGindices of the last contributing tower. XFWIRI XRPADI XRWIRI +--------+ 7.5. | XCLUST | +--------+ INTEGER *4 MAXCL , MAXL PARAMETER (MAXCL=20, MAXL=60) COMMON/XCLUST/ XNCPAD,XPNCEL(MAXCL),XPSUMD(MAXCL),XPLSTA(MAXCL), + DPSUMD(MAXCL), + XL PAD,XPLIST(MAXL) ,XPFATE(MAXCL), + XNCWIR,XWNCEL(MAXCL),XWSUMD(MAXCL),XWLSTA(MAXCL), + DWSUMD(MAXCL), + XL WIR,XWLIST(MAXL) ,XWFATE(MAXCL) INTEGER *4 XNCPAD,XPNCEL ,XPFATE ,XPLSTA , + XL PAD,XPLIST , + XNCWIR,XWNCEL ,XWFATE ,XWLSTA , + XL WIR,XWLIST REAL *4 XPSUMD, XWSUMD REAL *4 DPSUMD, DWSUMD PURPOSE contains results of Clustering and Matching VARIABLES (... stands for PAD or WIR; . stands for P or W) XNC... - # of found clusters X.NCEL - # of cells assigned to a given cluster X.SUMD - sum of energies in a given cluster D.SUMD - error**2 of the cluster energy X.LSTA - index of first cell of a given cluster in X.LIST XL ... - index of last cell of last cluster in X.LIST X.LIST - list of cell identifiers XPFATE - number of the wire cluster matched with that pad cluster (0 - if pad cluster not matched with any wire cluster; negative - if it is 'extra' pad cluster - see description of subr. XMATCH) XWFATE - number of the pad cluster matched with that wire cluster (0 - if wire cluster not matched with any pad cluster; negative - if it is 'extra' wire cluster - see description of subr. XMATCH) +--------+ 7.6. | XCNPAD | +--------+ COMMON/XCNPAD/ MinFP(16),MaxFP(16),MinRP(18),MaxRP(18) INTEGER MinFP ,MaxFP ,MinRP ,MaxRP PURPOSE contains minimal and maximal pad number in Forward/Rear cups VARIABLES: MinFP - minimal pad number in FBAC for given CY MaxFP - maximal pad number in FBAC for given CY MinRP - minimal pad number in RBAC for given CY MaxRP - maximal pad number in RBAC for given CY +--------+ 7.7. | XCONST | +--------+ COMMON /XCONST/ EDGE , RIB , GASGAP REAL *4 EDGE , RIB , GASGAP PURPOSE contains fixed chamber dimensions VARIABLES EDGE - width of the side wall of the LST tube = 0.15 cm RIB - widths of the inner rib of the LST tube= 0.15 cm GASGAP - widths of the gas gap between two ribs = 1.50 cm +--------+ 7.8. | XCRUNS | +--------+ INTEGER *4 NESTOP, NEVERR, MaxFatErr PARAMETER (NESTOP=10,NEVERR=11,MaxFatErr=100) COMMON /XCRUNS/ XEVSTA(NESTOP), XEVERR(NEVERR), FatErr INTEGER *4 XEVSTA ,XEVERR , FatErr PURPOSE contains event processing and error statistics VARIABLES XEVSTA(1) - number of non-empty event records read-in XEVSTA(2) - # events which failed geom./calib./cond. XEVSTA(3) - # events which failed pre-reconstruction. XEVSTA(4) - # events which failed reconstruction. XEVSTA(5) - # events with reconstructed MIP or Shower XEVSTA(6) - # of unique MIPses XEVSTA(7) - # of unique Showers XEVSTA(8) - # of ambigeus MIPses XEVSTA(9) - # of ambigeus Showers XEVSTA(10)- unused XEVERR(1) - # of times the cluster buffer exceeded XEVERR(2) - # of times the LEGO buffer exceeded XEVERR(3) - # of times wire- vs. hit-pat. mismatch XEVERR(4) - # of times the HIT buffer exceeded XEVERR(5) - # of times the Pad Tower had no hits XEVERR(6) - # of times Pad Cluster belongs to more than 1 Wire Cluster XEVERR(7) - # of times there is a Pad Cluster partially without corresponding Wire Cluster XEVERR(8) - # of times there is a Wire Cluster without corresponding Pad Cluster XEVERR(9) - # of times Hit Pattern readout doubly defined XEVERR(10)- # of times there is a Pad Cluster totally without corresponding Wire Cluster XEVERR(11)- # of times Tower index had wrong area code FatErr - total number of severe reconstruction errors so far +--------+ 7.9. | XCRUNV | +--------+ COMMON /XCRUNV/ XRSTOP, XESTOP +, XCPADL, XCWIRL, XHPADM, XRSTAT +, XHISTO INTEGER *4 XCPADL, XRSTOP, XESTOP, XCWIRL +, XHPADM, XRSTAT +, XHISTO COMMON /XCRUNC/ XCRDAT, XVERSN CHARACTER * 6 XVERSN CHARACTER * 8 XCRDAT PURPOSE to store run identification and control variables VARIABLES XVERSN - XRECON Version number f.eg. 1.00 XCRDAT - XRECON creation date f.eg. yyyymmdd XRSTOP - if not 0 the run should be stopped after processing of the current event. 4 very fatal error (internal inconsistency) XESTOP - if not 0 the processing of the current event should be abandoned 2 calibration not possible 3 reconstruction not possible XCPADL - if .ne. 0 Pad -Tower LEGO will be printed XCWIRL - if .ne. 0 Wire-Tower LEGO will be printed XHPADM - if .ne. 0 Pad-Cluster Hits will be printed XRSTAT - if .ne. 0 run statistics will be printed +--------+ 7.10 | XCSCUT | +--------+ COMMON /XCSCUT/ XCHCUT(2), XNCCUT(2) REAL *4 XCHCUT INTEGER *4 XNCCUT PURPOSE to store cuts used for cluster shape analysis VARIABLES XCHCUT - chi2/ndf cut for MIP/Jet discrimination XNCCUT - cut on # of hit gaps for MIP/Jet discrimination (given for XvsY and ZvsY projection - see description of subr. XSHAPE) +--------+ 7.11. | XCSHAP | +--------+ COMMON /XCSHAP/ IJET(2) , NFIT(2) ,NBINX(2), NCONX(2) +, A(2), B(2), CHI2F(2), CVABAB(4,4) INTEGER *4 IJET , NFIT ,NBINX , NCONX REAL *4 A , B , CHI2F , CVABAB PURPOSE to store results of shape analysis (per projection) VARIABLES IJET - cluster classification predecision = 0 - clear MIP = 1 - rather MIP then Jet = 2 - rather Jet then MIP = 3 - clear Jet NFIT - # of hits used for this projection NBINX - # of Y-bins NCONX - # of Y-bins, which have hit gap A - A parameter of the line fit Y = A*(X or Z) + B B - B parameter of the line fit Y = A*(X or Z) + B CHI2F - chi2/ndf of the line fit Y = A*(X or Z) + B (given for XvsY and ZvsY projection - see description of subr. XSHAPE) CVABAB - total covariance matrix of fit in both projections +--------+ 7.12. | XCDBUG | +--------+ Common /XCDBUG/ XDBErr, + XDBInp, XDBCro, XDBCal, XDBPre, XDBGAF, + XDBLeg, XDBClu, XDBNei, XDBMat, XDBHiM, + XDBCSh, XDBCId, XDBOut, + XDBPad, XDBWir, XDBHit, XDBStr, XDBTri, + XDBJet, XDBMIP, XDBTrk, + CosSep91_MC, CosSep91_Data, + TechInfo, TechHist Integer NXDBFl Parameter (NXDBFl=22) Logical XDBFlg(NXDBFl) Equivalence (XDBFlg(1),XDBErr) Logical XDBIPW(2) Equivalence (XDBIPW(1),XDBPad) Equivalence (XDBIPW(2),XDBWir) PURPOSE to store logical flags; see description of control/cards +--------+ 7.13. | XCCOND | +--------+ Real StripPHCut, Wire1PHCut, Wire6PHCut, PadPHCut Integer StripCrossMin, StripCrossMax, + Wire1CrossMin, Wire1CrossMax, + Wire6CrossMin, Wire6CrossMax, + PadCrossMin, PadCrossMax C COMMON /XCCOND/ C PHCut, CrossMin, CrossMax for different readouts + StripPHCut, StripCrossMin, StripCrossMax, + Wire1PHCut, Wire1CrossMin, Wire1CrossMax, + Wire6PHCut, Wire6CrossMin, Wire6CrossMax, + PadPHCut, PadCrossMin, PadCrossMax PURPOSE Common to store Pulse Shape parameter cuts; see Control Cards +--------+ 7.14. | XCAUXL | +--------+ Integer Max_unitid, Max_Rho Parameter ( Max_Unitid=3 ) Integer PCx, PCy, SCx, SCy, WCx, WCy Parameter ( PCx=20, PCy=60, SCx=20, SCy=8, WCx=2, WCy=60 ) Real Pad_Lego1, Strip_Lego1, Wire_Lego1 Real Pad_ped, Strip_ped, Wire_Ped Real Pad_Imax, Strip_Imax, Wire_IMax Real Pad_Ph, Strip_Ph, Wire_Ph Real Pad_Err, Strip_Err, Wire_Err Real Pad_Ped_RMS, Strip_Ped_RMS, Wire_Ped_RMS Real Pad_Ped_Mean, Strip_Ped_Mean, Wire_Ped_Mean Common /XCAuxL/ Pad_Lego1(PCx, PCy,Max_unitid), + Strip_Lego1(SCx,SCy,Max_unitid), + Wire_Lego1(WCx,WCy,2,Max_Unitid), C + Pad_Ped(PCx,PCy,Max_Unitid,0:2), + Pad_Imax(PCx,PCy,Max_Unitid,0:2), + Pad_Ph(PCx,PCy,Max_Unitid,0:2), + Pad_Err(PCx,PCy,Max_Unitid,0:2), + Pad_Ped_RMS(PCx,PCy,Max_Unitid,0:2), + Pad_Ped_Mean(PCx,PCy,Max_Unitid,0:2), C + Strip_Ped(SCx,SCy,Max_Unitid,0:2), + Strip_Imax(SCx,SCy,Max_Unitid,0:2), + Strip_Ph(SCx,SCy,Max_Unitid,0:2), + Strip_Err(SCx,SCy,Max_Unitid,0:2), + Strip_Ped_RMS(SCx,SCy,Max_Unitid,0:2), + Strip_Ped_Mean(SCx,SCy,Max_Unitid,0:2), C + Wire_Ped(WCx,WCy,2,Max_Unitid,0:2), + Wire_Imax(WCx,WCy,2,Max_Unitid,0:2), + Wire_Ph(WCx,WCy,2,Max_Unitid,0:2), + Wire_Err(WCx,WCy,2,Max_Unitid,0:2), + Wire_Ped_RMS(WCx,WCy,2,Max_Unitid,0:2), + Wire_Ped_Mean(WCx,WCy,2,Max_Unitid,0:2) C Real Sum_Pad_Err, Sum_Strip_Err, Sum_Wire_Err Real Sum_Pad, Sum_Strip, Sum_Wire Real Sum_Pad_Freq,Sum_Strip_Freq,Sum_Wire_Freq Common /XCSums/ Sum_Pad_Err(PCx,PCy,Max_unitid), + Sum_Strip_Err(SCx,SCy,max_unitid), + Sum_Wire_Err(WCx,WCy,2,max_unitid), C + Sum_Pad_Freq(PCx,PCy,Max_Unitid), + Sum_Strip_Freq(SCx,SCy,Max_Unitid), + Sum_Wire_Freq(WCx,WCy,2,Max_Unitid), C + Sum_Pad(PCx,PCy,Max_unitid,0:2), + Sum_Strip(SCx,SCy,max_unitid,0:2), + Sum_Wire(WCx,WCy,2,max_unitid,0:2) C PURPOSE to store the results of quality monitoring, i.e. auxiliary (technical) lego plots 8. ADAMO subschemas. ==================== DEFINE ATTRIBUTE GGIndx = BITP : 'Tower/Layer Identifier'; END ATTRIBUTE 8.1. ==== SUBSCHEMA XBRECO : 'E-R Definition of the BAC Geometry ' DEFINE DATAFLOW XBAGeometry4 = {XBAC_}, {XXLay_}, {XDim_}, {XPos_}, {XRot_}, {XSTow_}, {XPTow_}, {XWTow_}; END DATAFLOW DEFINE ESET /*-------------------------------------------------------------------*/ /* LOGICAL ORGANISATION */ /*-------------------------------------------------------------------*/ XBAC = ( NumBAC = INTE[1, 3] : 'BAC part identifier' ) SIZE 3, * ; /*-------------------------------------------------------------------*/ /* SPATIAL ORGANISATION */ /*-------------------------------------------------------------------*/ XDim = ( NumDim = INTE : 'Chamber Set Number', X = REAL[11.75, 53.60] : 'Chamber Set width (cm)', Y = REAL 1.1 : 'Chamber Set height (cm)', Z(4) = REAL[0., 1000.] : 'Lenghts of Chambers belonging to the Set (cm)' ) SIZE 71, * ; XPos = ( NumPos = INTE : 'X-Layer Displacement Vector Number', HPos(3) = REAL : 'X-Layer Displacement Vector in the HERA Ref. Frame (cm)' ) SIZE 1564, * ; XRot = ( NumRot = INTE : 'X-Layer Rotation Matrix Number', HRot(3,3) = REAL[-1., 1.] : 'X-Layer Rot. Matrix in the HERA Ref. Frame') SIZE 17, * ; /*--------------------------------------------------------------------*/ /* READOUT ORGANISATION */ /*--------------------------------------------------------------------*/ XSTow = ( NumST = GGIndx : 'The Strip Tower Identifier' ) SIZE 195, * ; XPTow = ( NumPT = GGIndx : 'The Pad Tower Identifier', NXLay = INTE [0, 10] : 'Number of X-Layers composing given PadTower', XLayID(10) = GGIndx : 'Array of X-Layers Identfiers composing given PadTower' ) SIZE 1732, * ; XWTow = ( NumWT = GGIndx : 'The Wire Tower Identifier', NXLay = INTE [0,10] : 'Number of X-Layers composing given Wire Tower', XLayID(10) = GGIndx : 'Array of X-Layers Identifiers composing given Wire Tower' ) SIZE 178, * ; XXLay = ( NumXL = GGIndx : 'The X-Layer Identifier', MapWir = INTE [0, 8888] : 'Decimally Coded Wire Bit Pattern' ) SIZE 1564, * ; END ESET DEFINE RSET /*-------------------------------------------------------------------*/ /* SPATIAL ORGANISATION */ /*-------------------------------------------------------------------*/ ( XXLay [1, 1] -> [0, *] XDim ) : 'Every X-Layer is related to the Chamber Set bank' ; ( XXLay [1, 1] -> [0, *] XPos ) : 'Every X-Layer has its own Position bank' ; ( XXLay [1, 1] -> [0, *] XRot ) : 'Every X-Layer is related to the Rot. Matrix bank' ; /*--------------------------------------------------------------------*/ /* READOUT ORGANISATION */ /*--------------------------------------------------------------------*/ ( XSTow [1, 1] -> [1, *] XBAC ) : 'Every Strip Tower belongs to a certain part of BAC' INVERTED ; ( XPTow [1, 1] -> [1, *] XBAC ) : 'Every Pad Tower belongs to a certain part of BAC' INVERTED ; ( XPTow [1, 1] -> [1, *] XSTow ) : 'Every Pad Tower belongs to a certain Strip Tower' INVERTED ; ( XWTow [1, 1] -> [1, *] XBAC ) : 'Every Wire Tower belongs to a certain part of BAC' INVERTED ; ( XXLay [1, 1] -> [1, *] XBAC ) : 'Every X-Layer belongs to a certain part of BAC.' END RSET END SUBSCHEMA 8.2. ==== SUBSCHEMA XXINP : 'The BAC Raw Data Definition' DEFINE ATTRIBUTE Num = GGIndx : 'Tower/Layer Identifier'; Cross = BITP : 'Packed four subsequent FADC Crossings Values, 8 bits each. Little-Endian convention assumed i.e. the earliest Crossing is packed at the lowest machine address '; END ATTRIBUTE DEFINE ESET /*-------------------------------------------------------------------*/ /* RAW DATA */ /*-------------------------------------------------------------------*/ XXW1RD = ( Num, Cross ) STATIC :'Normal Wire Tower Crossings'; XXW6RD = ( Num, Cross ) STATIC :'Amplified Wire Tower Crossings'; XXSTRD = ( Num, Cross ) STATIC :'Strip Tower Crossings'; XXPTRD = ( Num, Cross ) STATIC :'Pad Tower Crossings'; XXXLRD = ( Num, Cross ) STATIC :'Hit Pattern Crossings'; XXPSRD = ( Num, Cross ) STATIC :'Sensitive Pad Crossings'; /*-------------------------------------------------------------------*/ /* Readout status data */ /*-------------------------------------------------------------------*/ XXSTAT = (SwVrsn = INTE : 'Software version', CmpTim = INTE : 'Event completion time', SLTTyp = BITP : 'SLT decision copy - type', FLTNum = INTE : 'SLT decision copy - FLT number', SLTNum = INTE : 'SLT decision copy - SLT number', BunNum = INTE [0,219] : 'FLT data copy - bunch crossing number', GFLTNu = INTE [0,255] : 'FLT data copy - GFLT number (low byte)', GFLTyp = BITP : 'FLT data copy - GFLT type', FLTFlg = BITP : 'FLT data copy - flags', Spare(1:11) = INTE : 'Reserved' ) STATIC : 'Readout status bank' ; XXNODE = (PPMAdr = INTE [0,65536] : 'PPM address', PipPnr = INTE : 'Pipeline pointer status word', StrTim = INTE : 'Time of readout start', Spare(1:2) = INTE : 'Reserved' ) STATIC : 'Transputer node info' ; XXTRIG = (TBD(100) = INTE : 'Trigger info' ) STATIC : 'Trigger info bank' ; END ESET DEFINE ESET XXTPST = (Setup = INTE : 'TP setup packet copies' ) STATIC : 'Begin-of-run bank' ; END ESET DEFINE DATAFLOW XXBORZI = {XXTPST_}; END DATAFLOW END SUBSCHEMA 8.3. ==== SUBSCHEMA XXOUT0 : 'Definition of the Pre-Reconstructed Data Structures for the Backing Calorimeter Reconstruction Programme. They might be helpful for graphic-display purposes.' DEFINE ESET /*-------------------------------------------------------------------*/ /* PRE-RECONSTRUCTED DATA */ /*-------------------------------------------------------------------*/ XWTPH = ( Num = GGIndx : 'The Wire Tower Identifier', PH(2) = REAL : 'PH(1) The Normal Wire Tower Reconstructed Pulse Height PH(2) The Amplified Wire Tower Reconstructed Pulse Height', E = REAL : 'Energy deposited in Wire Tower (GeV)', XYZin (3) = REAL : 'Cartesian coor. (X, Y, Z in the HERA ref. frame) of the Inermost Tower Reference Point. For graphics purposes.', XYZout(3) = REAL : 'Cartesian coor. (X, Y, Z in the HERA ref. frame) of the Outermost Tower Reference Point. For graphics purposes.' ) ; XSTPH = ( Num = GGIndx : 'The Strip Tower Identifier', PH = REAL : 'The Strip Tower Reconstr. Pulse Height', E = REAL : 'Energy deposited in Strip Tower (GeV)', RPTin (3) = REAL : 'Spherical coordinates (R (cm), Phi, Theta in the HERA ref. frame) of the Inermost Tower Reference Point. For graphics purposes.', RPTout(3) = REAL : 'Spherical coordinates (R (cm), Phi, Theta in the HERA ref. frame) of the Outermost Tower Reference Point. For graphics purposes.' ) ; XPTPH = ( Num = GGIndx : 'The Pad Tower Identifier', PH = REAL : 'The Pad Tower Reconstructed Pulse Height', E = REAL : 'Energy deposited in Pad Tower (GeV)', XYZin (3) = REAL : 'Cartesian coor. (X, Y, Z in the HERA ref. frame (cm)) of the Inermost Tower Reference Point. For graphics purposes.', XYZout(3) = REAL : 'Cartesian coor. (X, Y, Z in the HERA ref. frame (cm)) of the Outermost Tower Reference Point. For graphics purposes.' ) ; XXLHP = ( Num = GGIndx : 'The Wire Layer Identifier', HP = BITP : 'The Wire Layer Reconstructed Hit Pattern' ) ; XPSPQ = ( Num = GGIndx : 'The Sensitive Pad Identifier', PH(2) = REAL : 'The Sensitive Pad Reconstr. Pulse Heights') ; END ESET END SUBSCHEMA 8.4. ==== SUBSCHEMA XXOUT1 : 'BAC OUTPUT from Phase 1 of ZEPHYR.' DEFINE ESET XEntit = ( NJet = INTE : '# of Jets', NMIP = INTE : '# of Minimum Ionasing Particles', NJetAm = INTE : '# of Jets classified as Ambigous', NMIPAm = INTE : '# of MIPs classified as Ambigous', NPadCl = INTE : '# of Pad Clusters', EPadCl = REAL : 'Energy of all Pad Clusters', NWirCl = INTE : '# of Wire Clusters', EWirCl = REAL : 'Energy of all Wire Clusters' ); XJetEt = ( XYZCOG(3) = REAL : 'X,Y,Z of Jet Centre Of Gravity in ZEUS coordinate system', XYZCov(3,3) = REAL : 'Covariances of the Jet Centre Of Gravity in ZEUS coordinates', JAxCos(3) = REAL : 'Direction cosines of Jet Axis at centre of gravity', YZCov(2,2) = REAL : 'Covariances of Yp and Zp of the Jet Axis direction', XEnDep = REAL : 'Energy Deposit in BAC', DEnDep = REAL : 'Error on Energy Deposit', NHitXY = INTE : 'Number of hits in depth,widths plane' ) KEY * = ->XEntit END KEY ; XMIPEt = ( XYZFPo(3) = REAL : 'X,Y,Z of the 1st point in BAC (usually at innermost BAC layer)', XYZCov(3,3) = REAL : 'Covariances of the 1st point seen in ZEUS coordinate system', XYZCos(3) = REAL : 'Direction cosines of MIP at the 1st point in BAC', YZCov(2,2) = REAL : 'Covariances of Yp and Zp of the MIP direction at 1st seen point', XEnDep = REAL : 'Energy Deposit in BAC', DEnDep = REAL : 'Error on Energy Deposit', NHitXY = INTE : 'Number of hits in depth,widths plane' ) KEY * = ->XEntit END KEY ; XTrkEt = ( PTrak = REAL : 'MIP momentum signed by charge (usually defined only for MIPs crossing the bottom part of BAC, where we have sensitive pad readout)', DPTrak = REAL : 'Error on MIP momentum' ) KEY * = ->XMIPEt END KEY END ESET DEFINE RSET (XJetEt [1,1] -> [0,*] XEntit ) : 'Each Jet will be linked to XEntit bank, There may be no jets in a event.' INVERTED ; (XMIPEt [1,1] -> [0,*] XEntit ) : 'Each MIP will be linked to XEntit bank, There may be no mips in a event.' INVERTED ; (XTrkEt [1,1] -> [0,1] XMIPEt ) : 'For some MIPs there will be one XTrkEt bank. This will happen in BAC bottom, where we have Sensitive Pad readout and we can hopefully reconstruct MIPs momentum.' INVERTED ; (XMIPEt [0,1] -> [0,*] XJetEt ) : 'There may be ambigous situations where we cannot distinguish between Jet and MIP. Both posibilities will be then given and the existance of the ambiguity can be recognised by the presence of this link. Of course not every Jet or MIP is ambigous, but one can imagine the situation of several MIPs being ambigues to one Jet.' INVERTED ; (XJetEt [1,1] -> [0,*] XMatEt ) : 'Each Jet will be linked to XMatEt bank, There may be no jets for a given entry to XMatEt; e.g. muon or shower totally absorbed in UCAL.' INVERTED ; (XMIPEt [1,1] -> [0,*] XMatEt ) : 'Each MIP will be linked to XMatEt bank, There may be no MIPs for a given entry to XMatEt; e.g. non-muon or shower totally absorbed in UCAL.' INVERTED ; (XJetEt [1,1] -> [0,*] XMCSEt ) : 'Each Jet will be linked to XMCSEt bank, There may be no jets for a given entry to XMCSEt; e.g. for condensates totally absorbed in UCAL.' INVERTED ; (XMIPEt [1,1] -> [0,*] XMCSEt ) : 'Each MIP will be linked to XMCSEt bank, There may be no MIPs for a given entry to XMCSEt; e.g. for condensates totally absorbed in UCAL.' INVERTED ; END RSET END SUBSCHEMA 9. Control Cards =================== Several types Control Cards are defined in subroutine XBFFKY and read format free by KWIN package. Note that KWIN package is case sensi- tive. The cards are a part of Zephyr_Control.Cards and should start with XXRECO- in columns 1-7 : XXRECO-keyword value(s) 9.1. Debug Options: ==== ---------------------------------------------------------------------- keyword type number description / default value ---------------------------------------------------------------------- XDBG LOGICAL 22 Flags for extensive debug printout when processing variuos types of data through different program phases. Several flags may be simultaneusly used. / All flags are defaulted to .FALSE. 1 XDBErr Print non-fatal errors 'on-line' Program Phases: 2 XDBInp Print Input Raw Data 3 XDBCro Print Crossings 4 XDBCal Print Pulse Height and Energy 5 XDBPre Print Pre-Reconstructed Data 6 XDBGAF Print contents of the Geometrical GAF 7 XDBLeg Print LEGO plot 8 XDBClu Debug Clustering process 9 XDBNei Debug Neighbour search 10 XDBMat Debug Cluster Matching 11 XDBHiM Debug Hit Maps 12 XDBCSh Debug Cluster Shape analysis 13 XDBCId Debug Cluster Identification 14 XDBOut Print Output entities. Data Types: 15 XDBPad Pads 16 XDBWir Wires (Normal or Amplified) 17 XDBHit Hit Patterns 18 XDBStr Strips 19 XDBTri Sensitive Pads (triangles) 20 XDBJet Jets 21 XDBMIP MIPses 22 XDBTrk Tracks --------------------------------------------------------------------- 9.2. Options to treat runs with slightly wrong data: ==== ---------------------------------------------------------------------- keyword type number description / default value ---------------------------------------------------------------------- XCOS LOGICAL 2 Flags used for September 91 Cosmic run / (default values .FALSE.) 1 CosSep91_MC - Strip MC data from readouts not active in Sep 91 Cosmic Run 2 CosSep91_Data - Correct corrupted Tower indices --------------------------------------------------------------------- 9.3. Options to use Quality Monitor (Technical Analysis) ==== ---------------------------------------------------------------------- keyword type number description / default value ---------------------------------------------------------------------- XTEC LOGICAL 2 Flags used to switch Quality Monitor / (default values .FALSE.) 1 TechInfo - Technical Analysis switch i.e. commons /XCAuxL/ and /XCSums/ will be filled 2 TechHist - switch for standard Quality Monitor histograms (needs prior switching of the TechInfo) --------------------------------------------------------------------- 9.4. Pulse shape cuts ==== ---------------------------------------------------------------------- keyword type number description / default value ---------------------------------------------------------------------- XSTP INTEGER 3 Cuts for a STRIP Tower Pulse Shape 1 Minimum (PulseHeight - Pedestal) / 2 2 Minimal Position of Pulse Maximum / 8 3 Maximal Position of Pulse Maximum /11 XW1P INTEGER 3 Cuts for a WIRE*1 Tower Pulse Shape / 2,8,11 XW6P INTEGER 3 Cuts for a WIRE*6 Tower Pulse Shape / 2,8,11 XPAP INTEGER 3 Cuts for a PAD Tower Pulse Shape / 2,8,11 ---------------------------------------------------------------------- 9.5. Calibration constants ==== ---------------------------------------------------------------------- keyword type number description / default value ---------------------------------------------------------------------- XSTC REAL 13 Calibration for a STRIP Tower Pulse in FADC counts/GeV per area / 13*12.5 XW1C REAL 13 Calibration for a WIRE*1 Tower Pulse in FADC counts/GeV per area / 13*1.25 XW6C REAL 13 Calibration for a WIRE*6 Tower Pulse in FADC counts/GeV per area / 13*9.375 XPAC REAL 13 Calibration for a PAD Tower Pulse in FADC counts/GeV per area / 13*6.7 ---------------------------------------------------------------------- 9.6. Output Options: ==== ---------------------------------------------------------------------- keyword type number description / default value ---------------------------------------------------------------------- XLPP INTEGER 1 Print Pad -Tower Lego Plot ( 1 yes, 0 no ) / 0 XLPW INTEGER 1 Print Wire-Tower Lego Plot ( 1 yes, 0 no ) / 0 XPHM INTEGER 1 Print Pad-Cluster Hits Map ( 1 yes, 0 no ) / 0 XPST INTEGER 1 Print Final Run statistics ( 1 yes, 0 no ) / 1 XHIS INTEGER 1 Print Standard histograms ( 1 yes, 0 no ) / 1 --------------------------------------------------------------------- 9.7. Reconstruction Constants (Clustering and identification cuts): ==== ---------------------------------------------------------------------- keyword type number description / default value ---------------------------------------------------------------------- XCMX REAL 6 Minimum value of deposit for finding cluster maximum, array (2,3). BAR FOR RER PAD 0.148 0.148 0.148 WIR 0.037 0.037 0.037 XCAD REAL 6 Minimum value of deposit for adding a tower to cluster, array (2,3). BAR FOR RER PAD 0.148 0.148 0.148 WIR 0.037 0.037 0.037 XCHC REAL 2 chi2/ndf cut for MIP/Jet discrimination 10. 10. XCNC INTEGER 2 cut on number of hit gaps for MIP/Jet discrimination 1 1 ---------------------------------------------------------------------- 10. Index of the BAC Reconstruction Package global symbols. ============================================================= (in alphabetical order) ---------------------------------------------------- name class described ---------------------------------------------------- BASCOD subroutine ................. 6.6.5 BASDEC subroutine ................. 6.6.4 XADDEN real function............... 6.6.1 XAMBIG subroutine ................. 6.4.1 XBAC window - common block ...... 8.1 XBCALB subroutine ................. 6.3.1 XBCOND subroutine ................. 6.3.3 XBEVIN subroutine ................. 6.3.2 XBFFKY subroutine ................. 6.1.2 XBGEOM subroutine ................. 6.2.1 XBINIT subroutine ................. 6.1.1 XBRECO subroutine ................. 6.4.6 XBRECO subschema ................. 8.1 XBTERM subroutine ................. 6.5.1 XCAUXL common block ............... 7.14 XCCOND common block ............... 7.13 XCDBUG common block ............... 7.12 XCFIND subroutine ................. 6.4.2 XCHEAD common block ............... 7.1 XCHITM common block ............... 7.2 XCLCUT common block ............... 7.3 XCLEGO common block ............... 7.4 XCLUST common block ............... 7.5 XCNPAD common block ............... 7.6 XCONST common block ............... 7.7 XCRUNS common block ............... 7.8 XCRUNV common block ............... 7.9 XCSCUT common block ............... 7.10 XCSHAP common block ............... 7.11 XDECID subroutine ................. 6.4.3 XDIM window - common block ...... 8.1 XEHITM subroutine ................. 6.4.4 XELEGO subroutine ................. 6.4.5 XENTIT window - common block ...... 8.4 XERREN subroutine ................. 6.6.2 XGETID integer function ........... 6.4.7 XGETIX subroutine ................. 6.4.8 XJET subroutine ................. 6.4.9 XJETET window - common block ...... 8.4 XLEGOG subroutine ................. 6.4.10 XLEGOP subroutine ................. 6.4.11 XMATCH subroutine ................. 6.4.12 XMIP subroutine ................. 6.4.13 XMIPET window - common block ...... 8.4 XNEIGH subroutine ................. 6.4.14 XPADZP subroutine ................. 6.4.15 XPEDEP subroutine ................. 6.4.16 XPHANA subroutine ................. 6.3.4 XPLEGO subroutine ................. 6.4.17 XPOS window - common block ...... 8.1 XPRERE subroutine ................. 6.3.6 XPSHAP subroutine ................. 6.4.18 XPSPQ window - common block ...... 8.3 XPTOW window - common block ...... 8.1 XPTPH window - common block ...... 8.3 XPTRUE subroutine ................. 6.4.19 XPULHI subroutine ................. 6.3.5 XROT window - common block ...... 8.1 XSHAPE subroutine ................. 6.4.20 XSTPH window - common block ...... 8.3 XXW1RD window - common block ...... 8.2 XTOWER subroutine ................. 6.6.3 XTRKET window - common block ...... 8.4 XWEDEP subroutine ................. 6.4.21 XWTOW window - common block ...... 8.1 XWTPH window - common block ...... 8.3 XXBKDT block data ................. 6.1.3 XXINP subschema .................. 8.2 XXLAY window - common block ...... 8.1 XXLHP window - common block ...... 8.3 XXOUT0 subschema .................. 8.3 XXOUT1 subschema .................. 8.4 XXNODE window - common block ...... 8.2 XXPSRD window - common block ...... 8.2 XXPTRD window - common block ...... 8.2 XXSTAT window - common block ...... 8.2 XXSTRD window - common block ...... 8.2 XXTPST window - common block ...... 8.2 XXTRIG window - common block ...... 8.2 XXW1RD window - common block ...... 8.2 XXW6RD window - common block ...... 8.2 XXXLRD window - common block ...... 8.2