StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
EEfeeTP.h
1 #ifndef EEfeeTP_h
2 #define EEfeeTP_h
3 /**************************************************************
4  * $Id: EEfeeTP.h,v 1.4 2020/01/13 20:45:49 zchang Exp $
5  * compute Endcap FEE response for a single trigger patch (TP)
6  **************************************************************/
7 #include <stdlib.h>
8 #include <stdio.h>
9 #include <string.h>
10 
11 
12 class EEfeeTP {
13  enum {mxT=10,mxTxt=100};
14  int lenCh, cha0L, cha0H, crateID; // addres of towers in ETOW data block
15  char name[mxTxt];
16  int nT; // # of active towers in this TP
17 
18  // .... working variables
19  int adc12[mxT], ped4[mxT]; // input
20  int chanID[mxT]; // oryginal channel mapping
21  int adc10p[mxT]; // 10 bit ADC corrected for FEE pedestal
22  int adc6[mxT]; // 6 bit ADC w/ overflow bit
23  int HT6b; // final 6-bit HT value
24  int TPsum6b; // final 6-bit TPsum value
25  int HTchId; // channel ID for HT
26 
27 public:
28 
29  EEfeeTP( int xcrate, const char *TPname, int lenH, int xcha0L, int xcha0H=-1);
30 
31  void compute(int *adcA, int *ped4A, int *maskA, int highTowerMask, int patchSumMask);
32  void print(int k=0) const;
33  void clear();
34  //..... transient values
35  int getTranHTchId() const {return HTchId;}
36  int getCrateID() const {return crateID;}
37  int getNtow() const {return nT;}
38  //..... output
39  int getOutTPsum() const {return TPsum6b;}
40  int getOutHT() const {return HT6b;}
41  int getOut12bit() const { return (getOutTPsum()<<6) + getOutHT();}
42  //zchang
43  void test(int tp, int ht) { TPsum6b = tp; HT6b = ht; }
44 };
45 #endif
46 
47 /*
48  * $Log: EEfeeTP.h,v $
49  * Revision 1.4 2020/01/13 20:45:49 zchang
50  * removing old run13 dsm algo files
51  *
52  * Revision 1.3 2011/10/16 17:41:59 pibero
53  * Implement EEMC FEE HT & TP masks
54  *
55  * Revision 1.2 2009/11/19 15:48:40 balewski
56  * add (char*) to many strings to make SL5 happ, few other adjustments
57  *
58  * Revision 1.1 2009/10/12 18:04:27 pibero
59  * Moved StEEmcUtil/EEdsm to StTriggerUtilities/Eemc
60  *
61  * Revision 1.2 2009/02/24 03:56:19 ogrebeny
62  * Corrected const-ness
63  *
64  * Revision 1.1 2007/08/17 01:15:37 balewski
65  * full blown Endcap trigger simu, by Xin
66  *
67  *
68  **************************************************************/
69 
70