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 
16 #include "DCCTowerBlock.h"
17 
18 #include <vector>
19 #include <map>
20 #include <iostream>
21 
23 
26 
27 class FEDRawData;
28 class DCCDataParser;
30 
31  public:
32 
33  EcalTB07DaqFormatter(std::string tbName, int a[68][5][5], int b[71], int c[201]);
34  virtual ~EcalTB07DaqFormatter(){LogDebug("EcalTB07RawToDigi") << "@SUB=EcalTB07DaqFormatter" << "\n"; };
35 
36  void interpretRawData( const FEDRawData & data , EBDigiCollection& digicollection , EEDigiCollection& eeDigiCollection,
37  EcalPnDiodeDigiCollection & pndigicollection,
38  EcalRawDataCollection& DCCheaderCollection,
39  EBDetIdCollection & dccsizecollection,
40  EcalElectronicsIdCollection & ttidcollection , EcalElectronicsIdCollection & blocksizecollection,
41  EBDetIdCollection & chidcollection , EBDetIdCollection & gaincollection,
42  EBDetIdCollection & gainswitchcollection ,
43  EcalElectronicsIdCollection & memttidcollection, EcalElectronicsIdCollection & memblocksizecollection,
44  EcalElectronicsIdCollection & memgaincollection, EcalElectronicsIdCollection & memchidcollection,
45  EcalTrigPrimDigiCollection &tpcollection);
46 
47 
48  private:
49 
50  void DecodeMEM( DCCTBTowerBlock * towerblock, EcalPnDiodeDigiCollection & pndigicollection ,
51  EcalElectronicsIdCollection & memttidcollection, EcalElectronicsIdCollection & memblocksizecollection,
52  EcalElectronicsIdCollection & memgaincollection, EcalElectronicsIdCollection & memchidcollection);
53 
54  std::pair<int,int> cellIndex(int tower_id, int strip, int xtal);
55  int cryIc(int tower_id, int strip, int xtal);
56  bool leftTower(int tower) const ;
57  bool rightTower(int tower) const ;
58 
59  private:
61  int cryIcMap_[68][5][5];
64  std::string tbName_;
65 
66  int getEE_ix(int tower, int strip, int ch);
67  int getEE_iy(int tower, int strip, int ch);
68 
69  enum SMGeom_t {
70  kModules = 4, // Number of modules per supermodule
71  kTriggerTowers = 68, // Number of trigger towers per supermodule
72  kTowersInPhi = 4, // Number of trigger towers in phi
73  kTowersInEta = 17, // Number of trigger towers in eta
74  kCrystals = 1700, // Number of crystals per supermodule
75  kPns = 10, // Number of PN laser monitoring diodes per supermodule
76  kCrystalsInPhi = 20, // Number of crystals in phi
77  kCrystalsInEta = 85, // Number of crystals in eta
78  kCrystalsPerTower = 25, // Number of crystals per trigger tower
79  kCardsPerTower = 5, // Number of VFE cards per trigger tower
80  kChannelsPerCard = 5 // Number of channels per VFE card
81  };
82 
84  kSamplesPerChannel = 10, // Number of sample per channel, per event
85  kSamplesPerPn = 50, // Number of sample per PN, per event
86  kChannelsPerTower = 25, // Number of channels per trigger tower
87  kStripsPerTower = 5, // Number of VFE cards per trigger tower
88  kChannelsPerStrip = 5, // Number channels per VFE card
89  kPnPerTowerBlock = 5, // Number Pn diodes pertaining to 1 tower block = 1/2 mem box
90  kTriggerTowersAndMem = 70 // Number of trigger towers block including mems
91  };
92 
93  // index and container for expected towers (according to DCC status)
95  unsigned _ExpectedTowers[71];
96  unsigned _expTowersIndex;
97 
98  // used for mem boxes unpacking
99  int memRawSample_[kStripsPerTower][kChannelsPerStrip][ kSamplesPerChannel+1]; // store raw data for one mem
100  int data_MEM[500]; // collects unpacked data for both mems
103 
104 };
105 #endif
#define LogDebug(id)
void strip(std::string &input, const std::string &blanks=" \n\t")
Definition: stringTools.cc:16
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
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]