forked from uwcms/UCT2015
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheic9bit.patch
More file actions
62 lines (62 loc) · 3.07 KB
/
eic9bit.patch
File metadata and controls
62 lines (62 loc) · 3.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
? L1TriggerConfig/L1ScalesProducers/python/__init__.py
Index: DataFormats/L1CaloTrigger/interface/L1CaloEmCand.h
===================================================================
RCS file: /local/reps/CMSSW/CMSSW/DataFormats/L1CaloTrigger/interface/L1CaloEmCand.h,v
retrieving revision 1.12
diff -w -r1.12 L1CaloEmCand.h
7a8,11
> // hack to give RCT EIC candidates more bits of precision
> #define L1EMCAND_PRECISION (9)
>
>
44c48
< unsigned rank() const { return m_data & 0x3f; }
---
> unsigned rank() const { return m_data & ((1 << (L1EMCAND_PRECISION-1)) - 1); }
47c51
< unsigned rctCard() const { return (m_data>>7) & 0x7; }
---
> unsigned rctCard() const { return (m_data>>L1EMCAND_PRECISION) & 0x7; }
50c54
< unsigned rctRegion() const { return (m_data>>6) & 0x1; }
---
> unsigned rctRegion() const { return (m_data>>(L1EMCAND_PRECISION-1)) & 0x1; }
Index: DataFormats/L1CaloTrigger/src/L1CaloEmCand.cc
===================================================================
RCS file: /local/reps/CMSSW/CMSSW/DataFormats/L1CaloTrigger/src/L1CaloEmCand.cc,v
retrieving revision 1.11
diff -w -r1.11 L1CaloEmCand.cc
52c52,53
< m_data = (rank & 0x3f) + ((region & 0x1)<<6) + ((card & 0x7)<<7);
---
> // 0x3f->0xff hack to support 9bit EIC in RCT
> m_data = (rank & ((1 << (L1EMCAND_PRECISION-1)) - 1)) + ((region & 0x1)<<(L1EMCAND_PRECISION-1)) + ((card & 0x7)<<(L1EMCAND_PRECISION));
63c64,65
< m_data = (rank & 0x3f) + ((region & 0x1)<<6) + ((card & 0x7)<<7);
---
> // 0x3f->0xff hack to support 9bit EIC in RCT
> m_data = (rank & ((1 << (L1EMCAND_PRECISION-1)) - 1)) + ((region & 0x1)<<(L1EMCAND_PRECISION-1)) + ((card & 0x7)<<(L1EMCAND_PRECISION));
Index: L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTrivialProducer.h
===================================================================
RCS file: /local/reps/CMSSW/CMSSW/L1TriggerConfig/L1ScalesProducers/interface/L1ScalesTrivialProducer.h,v
retrieving revision 1.3
diff -w -r1.3 L1ScalesTrivialProducer.h
60a61,62
> unsigned int m_emEtMaxRank;
> unsigned int m_emEtMaxLinScale;
Index: L1TriggerConfig/L1ScalesProducers/src/L1ScalesTrivialProducer.cc
===================================================================
RCS file: /local/reps/CMSSW/CMSSW/L1TriggerConfig/L1ScalesProducers/src/L1ScalesTrivialProducer.cc,v
retrieving revision 1.6
diff -w -r1.6 L1ScalesTrivialProducer.cc
29a30,35
> // These are used to enable use of the general ctor of the L1CaloEtScale
> // http://cmslxr.fnal.gov/lxr/source/CondFormats/L1TObjects/interface/L1CaloEtScale.h#038
> // This specifies the maximum number of bits used to encode the number
> m_emEtMaxRank = ps.getParameter<unsigned int>("L1CaloEmMaxRank");
> // Maximum it can be in the linear scale
> m_emEtMaxLinScale = ps.getParameter<unsigned int>("L1CaloEmMaxLinScale");
58c64
< std::auto_ptr<L1CaloEtScale> emScale = std::auto_ptr<L1CaloEtScale>( new L1CaloEtScale(m_emEtScaleInputLsb, m_emEtThresholds) );
---
> std::auto_ptr<L1CaloEtScale> emScale = std::auto_ptr<L1CaloEtScale>( new L1CaloEtScale(m_emEtMaxLinScale, m_emEtMaxRank, m_emEtScaleInputLsb, m_emEtThresholds) );