CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EcalTB07DaqFormatter.h
Go to the documentation of this file.
1 #ifndef EcalTB07DaqFormatter_H
2 #define EcalTB07DaqFormatter_H
3 
14 #include "DCCTowerBlock.h"
15 
16 #include <vector>
17 #include <map>
18 #include <iostream>
19 
21 
24 
25 class FEDRawData;
26 class DCCDataParser;
28 
29  public:
30 
31  EcalTB07DaqFormatter(std::string tbName, int a[68][5][5], int b[71], int c[201]);
32  virtual ~EcalTB07DaqFormatter(){LogDebug("EcalTB07RawToDigi") << "@SUB=EcalTB07DaqFormatter" << "\n"; };
33 
34  void interpretRawData( const FEDRawData & data , EBDigiCollection& digicollection , EEDigiCollection& eeDigiCollection,
35  EcalPnDiodeDigiCollection & pndigicollection,
36  EcalRawDataCollection& DCCheaderCollection,
37  EBDetIdCollection & dccsizecollection,
38  EcalElectronicsIdCollection & ttidcollection , EcalElectronicsIdCollection & blocksizecollection,
39  EBDetIdCollection & chidcollection , EBDetIdCollection & gaincollection,
40  EBDetIdCollection & gainswitchcollection ,
41  EcalElectronicsIdCollection & memttidcollection, EcalElectronicsIdCollection & memblocksizecollection,
42  EcalElectronicsIdCollection & memgaincollection, EcalElectronicsIdCollection & memchidcollection,
43  EcalTrigPrimDigiCollection &tpcollection);
44 
45 
46  private:
47 
48  void DecodeMEM( DCCTBTowerBlock * towerblock, EcalPnDiodeDigiCollection & pndigicollection ,
49  EcalElectronicsIdCollection & memttidcollection, EcalElectronicsIdCollection & memblocksizecollection,
50  EcalElectronicsIdCollection & memgaincollection, EcalElectronicsIdCollection & memchidcollection);
51 
52  std::pair<int,int> cellIndex(int tower_id, int strip, int xtal);
53  int cryIc(int tower_id, int strip, int xtal);
54  bool leftTower(int tower) const ;
55  bool rightTower(int tower) const ;
56 
57  private:
59  int cryIcMap_[68][5][5];
63 
64  int getEE_ix(int tower, int strip, int ch);
65  int getEE_iy(int tower, int strip, int ch);
66 
67  enum SMGeom_t {
68  kModules = 4, // Number of modules per supermodule
69  kTriggerTowers = 68, // Number of trigger towers per supermodule
70  kTowersInPhi = 4, // Number of trigger towers in phi
71  kTowersInEta = 17, // Number of trigger towers in eta
72  kCrystals = 1700, // Number of crystals per supermodule
73  kPns = 10, // Number of PN laser monitoring diodes per supermodule
74  kCrystalsInPhi = 20, // Number of crystals in phi
75  kCrystalsInEta = 85, // Number of crystals in eta
76  kCrystalsPerTower = 25, // Number of crystals per trigger tower
77  kCardsPerTower = 5, // Number of VFE cards per trigger tower
78  kChannelsPerCard = 5 // Number of channels per VFE card
79  };
80 
82  kSamplesPerChannel = 10, // Number of sample per channel, per event
83  kSamplesPerPn = 50, // Number of sample per PN, per event
84  kChannelsPerTower = 25, // Number of channels per trigger tower
85  kStripsPerTower = 5, // Number of VFE cards per trigger tower
86  kChannelsPerStrip = 5, // Number channels per VFE card
87  kPnPerTowerBlock = 5, // Number Pn diodes pertaining to 1 tower block = 1/2 mem box
88  kTriggerTowersAndMem = 70 // Number of trigger towers block including mems
89  };
90 
91  // index and container for expected towers (according to DCC status)
93  unsigned _ExpectedTowers[71];
94  unsigned _expTowersIndex;
95 
96  // used for mem boxes unpacking
97  int memRawSample_[kStripsPerTower][kChannelsPerStrip][ kSamplesPerChannel+1]; // store raw data for one mem
98  int data_MEM[500]; // collects unpacked data for both mems
101 
102 };
103 #endif
#define LogDebug(id)
int cryIc(int tower_id, int strip, int xtal)
DCCTBDataParser * theParser_
int getEE_iy(int tower, int strip, int ch)
bool leftTower(int tower) const
void DecodeMEM(DCCTBTowerBlock *towerblock, EcalPnDiodeDigiCollection &pndigicollection, EcalElectronicsIdCollection &memttidcollection, EcalElectronicsIdCollection &memblocksizecollection, EcalElectronicsIdCollection &memgaincollection, EcalElectronicsIdCollection &memchidcollection)
void interpretRawData(const FEDRawData &data, EBDigiCollection &digicollection, EEDigiCollection &eeDigiCollection, EcalPnDiodeDigiCollection &pndigicollection, EcalRawDataCollection &DCCheaderCollection, EBDetIdCollection &dccsizecollection, EcalElectronicsIdCollection &ttidcollection, EcalElectronicsIdCollection &blocksizecollection, EBDetIdCollection &chidcollection, EBDetIdCollection &gaincollection, EBDetIdCollection &gainswitchcollection, EcalElectronicsIdCollection &memttidcollection, EcalElectronicsIdCollection &memblocksizecollection, EcalElectronicsIdCollection &memgaincollection, EcalElectronicsIdCollection &memchidcollection, EcalTrigPrimDigiCollection &tpcollection)
double b
Definition: hdecay.h:120
bool pnIsOkInBlock[kPnPerTowerBlock]
int getEE_ix(int tower, int strip, int ch)
bool rightTower(int tower) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
EcalTB07DaqFormatter(std::string tbName, int a[68][5][5], int b[71], int c[201])
std::pair< int, int > cellIndex(int tower_id, int strip, int xtal)
double a
Definition: hdecay.h:121
int memRawSample_[kStripsPerTower][kChannelsPerStrip][kSamplesPerChannel+1]