CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
RawDataConverter Class Reference

#include <RawDataConverter.h>

Inheritance diagram for RawDataConverter:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 RawDataConverter (const edm::ParameterSet &)
 
 ~RawDataConverter () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

enum  DigiType { ZeroSuppressed, VirginRaw, ProcessedRaw, Unknown }
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginRun (edm::Run const &, edm::EventSetup const &) override
 
void ClearData (void)
 
void endJob () override
 
void fillDetectorId (void)
 
template<class T >
void GetDigis (const edm::Event &)
 
DigiType GetValidLabels (const edm::Event &iEvent)
 

Private Attributes

std::string CurrentInstanceLabel
 
std::string CurrentModuleLabel
 
LASGlobalData< int > detectorId
 
int eventnumber
 
int latency
 
int lumiBlock
 
int runnumber
 
LASGlobalData< std::vector
< float > > 
theData
 
std::vector< std::string > theDigiModuleLabels
 
TFile * theOutputFile
 
TTree * theOutputTree
 
std::vector< std::string > theProductInstanceLabels
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 12 of file RawDataConverter.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

RawDataConverter::RawDataConverter ( const edm::ParameterSet iConfig)
explicit

constructors and destructor

Definition at line 22 of file RawDataConverter.cc.

References eventnumber, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), latency, lumiBlock, runnumber, AlCaHLTBitMon_QueryRunRegistry::string, theData, theDigiModuleLabels, theOutputFile, theOutputTree, and theProductInstanceLabels.

23  : theOutputFile(nullptr),
24  theOutputTree(nullptr),
25  latency(-1),
26  eventnumber(-1),
27  runnumber(-1),
28  lumiBlock(-1)
29 
30 {
31  theOutputFile = new TFile(iConfig.getUntrackedParameter<std::string>("OutputFileName").c_str(), "RECREATE");
32  theOutputFile->cd();
33  theOutputTree = new TTree("lasRawDataTree", "lasRawDataTree");
34  theOutputTree->Branch("lasRawData", &theData);
35  theOutputTree->Branch("latency", &latency, "latency/I");
36  theOutputTree->Branch("eventnumber", &eventnumber, "eventnumber/I");
37  theOutputTree->Branch("runnumber", &runnumber, "runnumber/I");
38  theOutputTree->Branch("lumiblock", &lumiBlock, "lumiblock/I");
39 
40  theDigiModuleLabels = iConfig.getParameter<std::vector<std::string> >("DigiModuleLabels");
41  theProductInstanceLabels = iConfig.getParameter<std::vector<std::string> >("ProductInstanceLabels");
42 }
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > theDigiModuleLabels
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
LASGlobalData< std::vector< float > > theData
std::vector< std::string > theProductInstanceLabels
RawDataConverter::~RawDataConverter ( )
override

Definition at line 47 of file RawDataConverter.cc.

47 {}

Member Function Documentation

void RawDataConverter::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 128 of file RawDataConverter.cc.

References edm::EventID::event(), eventnumber, edm::Event::getByLabel(), GetValidLabels(), edm::EventBase::id(), iEvent, latency, lumiBlock, edm::EventBase::luminosityBlock(), ProcessedRaw, edm::Event::run(), runnumber, edmLumisInFiles::summary, theOutputTree, Unknown, VirginRaw, and ZeroSuppressed.

128  {
129  // Determine the digi type to be used (only for the first time this methosd is called)
130  static DigiType digitype = Unknown; // Type of digis in this run
131  if (digitype == Unknown)
132  digitype = GetValidLabels(iEvent); // Initialization of Digi Type
133 
135  // Retrieve SiStripEventSummary produced by the digitizer
138  //iEvent.getByLabel( digiProducer, summary );
139  iEvent.getByLabel("siStripDigis", summary);
140  latency = static_cast<int32_t>(summary->latency());
141  eventnumber = iEvent.id().event();
142  runnumber = iEvent.run();
143  lumiBlock = iEvent.luminosityBlock();
144  //edm::LogAbsolute("RawdataConverter") << " > run: " << runnumber << " event: " << eventnumber << " lumiBlock: " << lumiBlock << " latency: " << latency << std::endl;
145 
147  // Handles for holding possible Digis
149  edm::Handle<edm::DetSetVector<SiStripProcessedRawDigi> > theStripProcessedRawDigis;
150 
151  // Get the Digis as definef by digitype
152  // Currently only ZeroSuppressed is implemented properly
153  switch (digitype) {
154  case ZeroSuppressed:
155  GetDigis<SiStripDigi>(iEvent);
156  break;
157  case VirginRaw:
158  throw std::runtime_error("RawDataConverter is not yet able to process VirginRaw Data");
159  break;
160  case ProcessedRaw:
161  throw std::runtime_error("RawDataConverter is not yet able to process ProcessedRaw Data");
162  break;
163  default:
164  throw std::runtime_error("Did not find valid Module or Instance label");
165  }
166 
167  // Push Container into the Tree
168  theOutputTree->Fill();
169 
170  return;
171 }
EventNumber_t event() const
Definition: EventID.h:40
DigiType GetValidLabels(const edm::Event &iEvent)
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:61
int iEvent
Definition: GenABIO.cc:224
RunNumber_t run() const
Definition: Event.h:109
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500
edm::EventID id() const
Definition: EventBase.h:59
void RawDataConverter::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 52 of file RawDataConverter.cc.

References fillDetectorId().

52 { fillDetectorId(); }
void fillDetectorId(void)
void RawDataConverter::beginRun ( edm::Run const &  theRun,
edm::EventSetup const &  theEventSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 57 of file RawDataConverter.cc.

References edm::EventSetup::fillAvailableRecordKeys(), mps_fire::i, LogDebug, and class-composition::o.

57  {
58  std::vector<edm::eventsetup::EventSetupRecordKey> oToFill;
59  theEventSetup.fillAvailableRecordKeys(oToFill);
60  std::ostringstream o;
61  for (std::vector<edm::eventsetup::EventSetupRecordKey>::size_type i = 0; i < oToFill.size(); i++) {
62  o << oToFill[i].name() << "\n";
63  }
64  LogDebug("RawDataConverter") << "The size of EventSetup is: " << oToFill.size() << "\n" << o.str();
65 }
uint16_t size_type
#define LogDebug(id)
void RawDataConverter::ClearData ( void  )
private

set all strips to zero

Definition at line 184 of file RawDataConverter.cc.

References EcalCondDBWriter_cfi::beam, LASGlobalData< T >::GetTEC2TECEntry(), LASGlobalData< T >::GetTECEntry(), LASGlobalData< T >::GetTIBTOBEntry(), heppy_loop::loop, relativeConstraints::ring, LASGlobalLoop::TEC2TECLoop(), LASGlobalLoop::TECLoop(), theData, and LASGlobalLoop::TIBTOBLoop().

Referenced by GetDigis().

184  {
185  // Assign a vector filled with zeros to all module entries
186  // The vector is const static to increase performance
187  // Even more performant would be to have a complete data object that is filled with zero
188 
189  // Empty object to be assigned to all modules
190  static const std::vector<float> zero_buffer(512, 0);
191 
192  // loop helper and its variables
194  int det, ring, beam, disk, pos;
195 
196  // loop TEC+- (internal)
197  det = 0;
198  ring = 0;
199  beam = 0;
200  disk = 0;
201  do {
202  theData.GetTECEntry(det, ring, beam, disk) = zero_buffer;
203  } while (loop.TECLoop(det, ring, beam, disk));
204 
205  // loop TIB/TOB
206  det = 2;
207  beam = 0;
208  pos = 0; // <- set det = 2 (TIB)
209  do {
210  theData.GetTIBTOBEntry(det, beam, pos) = zero_buffer;
211  } while (loop.TIBTOBLoop(det, beam, pos));
212 
213  // loop TEC (AT)
214  det = 0;
215  beam = 0;
216  disk = 0;
217  do {
218  theData.GetTEC2TECEntry(det, beam, disk) = zero_buffer;
219  } while (loop.TEC2TECLoop(det, beam, disk));
220 }
bool TEC2TECLoop(int &, int &, int &) const
T & GetTIBTOBEntry(int subdetector, int beam, int tibTobPosition)
T & GetTEC2TECEntry(int subdetector, int beam, int tecDisk)
T & GetTECEntry(int subdetector, int tecRing, int beam, int tecDisk)
Definition: LASGlobalData.h:84
LASGlobalData< std::vector< float > > theData
bool TECLoop(int &, int &, int &, int &) const
bool TIBTOBLoop(int &, int &, int &) const
void RawDataConverter::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 176 of file RawDataConverter.cc.

References theOutputFile.

Referenced by o2olib.O2ORunMgr::executeJob().

176  {
177  theOutputFile->Write();
178  theOutputFile->Close();
179 }
void RawDataConverter::fillDetectorId ( void  )
private

all the detector ids for the LAS modules hard-coded (this should be changed...)

Definition at line 225 of file RawDataConverter.cc.

References detectorId, LASGlobalData< T >::SetTEC2TECEntry(), LASGlobalData< T >::SetTECEntry(), and LASGlobalData< T >::SetTIBTOBEntry().

Referenced by beginJob().

225  {
226  // TEC+
227  detectorId.SetTECEntry(0, 0, 0, 0, 470307208);
228  detectorId.SetTECEntry(0, 0, 0, 1, 470323592);
229  detectorId.SetTECEntry(0, 0, 0, 2, 470339976);
230  detectorId.SetTECEntry(0, 0, 0, 3, 470356360);
231  detectorId.SetTECEntry(0, 0, 0, 4, 470372744);
232  detectorId.SetTECEntry(0, 0, 0, 5, 470389128);
233  detectorId.SetTECEntry(0, 0, 0, 6, 470405512);
234  detectorId.SetTECEntry(0, 0, 0, 7, 470421896);
235  detectorId.SetTECEntry(0, 0, 0, 8, 470438280);
236  detectorId.SetTECEntry(0, 0, 1, 0, 470307464);
237  detectorId.SetTECEntry(0, 0, 1, 1, 470323848);
238  detectorId.SetTECEntry(0, 0, 1, 2, 470340232);
239  detectorId.SetTECEntry(0, 0, 1, 3, 470356616);
240  detectorId.SetTECEntry(0, 0, 1, 4, 470373000);
241  detectorId.SetTECEntry(0, 0, 1, 5, 470389384);
242  detectorId.SetTECEntry(0, 0, 1, 6, 470405768);
243  detectorId.SetTECEntry(0, 0, 1, 7, 470422152);
244  detectorId.SetTECEntry(0, 0, 1, 8, 470438536);
245  detectorId.SetTECEntry(0, 0, 2, 0, 470307720);
246  detectorId.SetTECEntry(0, 0, 2, 1, 470324104);
247  detectorId.SetTECEntry(0, 0, 2, 2, 470340488);
248  detectorId.SetTECEntry(0, 0, 2, 3, 470356872);
249  detectorId.SetTECEntry(0, 0, 2, 4, 470373256);
250  detectorId.SetTECEntry(0, 0, 2, 5, 470389640);
251  detectorId.SetTECEntry(0, 0, 2, 6, 470406024);
252  detectorId.SetTECEntry(0, 0, 2, 7, 470422408);
253  detectorId.SetTECEntry(0, 0, 2, 8, 470438792);
254  detectorId.SetTECEntry(0, 0, 3, 0, 470307976);
255  detectorId.SetTECEntry(0, 0, 3, 1, 470324360);
256  detectorId.SetTECEntry(0, 0, 3, 2, 470340744);
257  detectorId.SetTECEntry(0, 0, 3, 3, 470357128);
258  detectorId.SetTECEntry(0, 0, 3, 4, 470373512);
259  detectorId.SetTECEntry(0, 0, 3, 5, 470389896);
260  detectorId.SetTECEntry(0, 0, 3, 6, 470406280);
261  detectorId.SetTECEntry(0, 0, 3, 7, 470422664);
262  detectorId.SetTECEntry(0, 0, 3, 8, 470439048);
263  detectorId.SetTECEntry(0, 0, 4, 0, 470308232);
264  detectorId.SetTECEntry(0, 0, 4, 1, 470324616);
265  detectorId.SetTECEntry(0, 0, 4, 2, 470341000);
266  detectorId.SetTECEntry(0, 0, 4, 3, 470357384);
267  detectorId.SetTECEntry(0, 0, 4, 4, 470373768);
268  detectorId.SetTECEntry(0, 0, 4, 5, 470390152);
269  detectorId.SetTECEntry(0, 0, 4, 6, 470406536);
270  detectorId.SetTECEntry(0, 0, 4, 7, 470422920);
271  detectorId.SetTECEntry(0, 0, 4, 8, 470439304);
272  detectorId.SetTECEntry(0, 0, 5, 0, 470308488);
273  detectorId.SetTECEntry(0, 0, 5, 1, 470324872);
274  detectorId.SetTECEntry(0, 0, 5, 2, 470341256);
275  detectorId.SetTECEntry(0, 0, 5, 3, 470357640);
276  detectorId.SetTECEntry(0, 0, 5, 4, 470374024);
277  detectorId.SetTECEntry(0, 0, 5, 5, 470390408);
278  detectorId.SetTECEntry(0, 0, 5, 6, 470406792);
279  detectorId.SetTECEntry(0, 0, 5, 7, 470423176);
280  detectorId.SetTECEntry(0, 0, 5, 8, 470439560);
281  detectorId.SetTECEntry(0, 0, 6, 0, 470308744);
282  detectorId.SetTECEntry(0, 0, 6, 1, 470325128);
283  detectorId.SetTECEntry(0, 0, 6, 2, 470341512);
284  detectorId.SetTECEntry(0, 0, 6, 3, 470357896);
285  detectorId.SetTECEntry(0, 0, 6, 4, 470374280);
286  detectorId.SetTECEntry(0, 0, 6, 5, 470390664);
287  detectorId.SetTECEntry(0, 0, 6, 6, 470407048);
288  detectorId.SetTECEntry(0, 0, 6, 7, 470423432);
289  detectorId.SetTECEntry(0, 0, 6, 8, 470439816);
290  detectorId.SetTECEntry(0, 0, 7, 0, 470309000);
291  detectorId.SetTECEntry(0, 0, 7, 1, 470325384);
292  detectorId.SetTECEntry(0, 0, 7, 2, 470341768);
293  detectorId.SetTECEntry(0, 0, 7, 3, 470358152);
294  detectorId.SetTECEntry(0, 0, 7, 4, 470374536);
295  detectorId.SetTECEntry(0, 0, 7, 5, 470390920);
296  detectorId.SetTECEntry(0, 0, 7, 6, 470407304);
297  detectorId.SetTECEntry(0, 0, 7, 7, 470423688);
298  detectorId.SetTECEntry(0, 0, 7, 8, 470440072);
299  detectorId.SetTECEntry(0, 1, 0, 0, 470307272);
300  detectorId.SetTECEntry(0, 1, 0, 1, 470323656);
301  detectorId.SetTECEntry(0, 1, 0, 2, 470340040);
302  detectorId.SetTECEntry(0, 1, 0, 3, 470356424);
303  detectorId.SetTECEntry(0, 1, 0, 4, 470372808);
304  detectorId.SetTECEntry(0, 1, 0, 5, 470389192);
305  detectorId.SetTECEntry(0, 1, 0, 6, 470405576);
306  detectorId.SetTECEntry(0, 1, 0, 7, 470421960);
307  detectorId.SetTECEntry(0, 1, 0, 8, 470438344);
308  detectorId.SetTECEntry(0, 1, 1, 0, 470307528);
309  detectorId.SetTECEntry(0, 1, 1, 1, 470323912);
310  detectorId.SetTECEntry(0, 1, 1, 2, 470340296);
311  detectorId.SetTECEntry(0, 1, 1, 3, 470356680);
312  detectorId.SetTECEntry(0, 1, 1, 4, 470373064);
313  detectorId.SetTECEntry(0, 1, 1, 5, 470389448);
314  detectorId.SetTECEntry(0, 1, 1, 6, 470405832);
315  detectorId.SetTECEntry(0, 1, 1, 7, 470422216);
316  detectorId.SetTECEntry(0, 1, 1, 8, 470438600);
317  detectorId.SetTECEntry(0, 1, 2, 0, 470307784);
318  detectorId.SetTECEntry(0, 1, 2, 1, 470324168);
319  detectorId.SetTECEntry(0, 1, 2, 2, 470340552);
320  detectorId.SetTECEntry(0, 1, 2, 3, 470356936);
321  detectorId.SetTECEntry(0, 1, 2, 4, 470373320);
322  detectorId.SetTECEntry(0, 1, 2, 5, 470389704);
323  detectorId.SetTECEntry(0, 1, 2, 6, 470406088);
324  detectorId.SetTECEntry(0, 1, 2, 7, 470422472);
325  detectorId.SetTECEntry(0, 1, 2, 8, 470438856);
326  detectorId.SetTECEntry(0, 1, 3, 0, 470308040);
327  detectorId.SetTECEntry(0, 1, 3, 1, 470324424);
328  detectorId.SetTECEntry(0, 1, 3, 2, 470340808);
329  detectorId.SetTECEntry(0, 1, 3, 3, 470357192);
330  detectorId.SetTECEntry(0, 1, 3, 4, 470373576);
331  detectorId.SetTECEntry(0, 1, 3, 5, 470389960);
332  detectorId.SetTECEntry(0, 1, 3, 6, 470406344);
333  detectorId.SetTECEntry(0, 1, 3, 7, 470422728);
334  detectorId.SetTECEntry(0, 1, 3, 8, 470439112);
335  detectorId.SetTECEntry(0, 1, 4, 0, 470308296);
336  detectorId.SetTECEntry(0, 1, 4, 1, 470324680);
337  detectorId.SetTECEntry(0, 1, 4, 2, 470341064);
338  detectorId.SetTECEntry(0, 1, 4, 3, 470357448);
339  detectorId.SetTECEntry(0, 1, 4, 4, 470373832);
340  detectorId.SetTECEntry(0, 1, 4, 5, 470390216);
341  detectorId.SetTECEntry(0, 1, 4, 6, 470406600);
342  detectorId.SetTECEntry(0, 1, 4, 7, 470422984);
343  detectorId.SetTECEntry(0, 1, 4, 8, 470439368);
344  detectorId.SetTECEntry(0, 1, 5, 0, 470308552);
345  detectorId.SetTECEntry(0, 1, 5, 1, 470324936);
346  detectorId.SetTECEntry(0, 1, 5, 2, 470341320);
347  detectorId.SetTECEntry(0, 1, 5, 3, 470357704);
348  detectorId.SetTECEntry(0, 1, 5, 4, 470374088);
349  detectorId.SetTECEntry(0, 1, 5, 5, 470390472);
350  detectorId.SetTECEntry(0, 1, 5, 6, 470406856);
351  detectorId.SetTECEntry(0, 1, 5, 7, 470423240);
352  detectorId.SetTECEntry(0, 1, 5, 8, 470439624);
353  detectorId.SetTECEntry(0, 1, 6, 0, 470308808);
354  detectorId.SetTECEntry(0, 1, 6, 1, 470325192);
355  detectorId.SetTECEntry(0, 1, 6, 2, 470341576);
356  detectorId.SetTECEntry(0, 1, 6, 3, 470357960);
357  detectorId.SetTECEntry(0, 1, 6, 4, 470374344);
358  detectorId.SetTECEntry(0, 1, 6, 5, 470390728);
359  detectorId.SetTECEntry(0, 1, 6, 6, 470407112);
360  detectorId.SetTECEntry(0, 1, 6, 7, 470423496);
361  detectorId.SetTECEntry(0, 1, 6, 8, 470439880);
362  detectorId.SetTECEntry(0, 1, 7, 0, 470309064);
363  detectorId.SetTECEntry(0, 1, 7, 1, 470325448);
364  detectorId.SetTECEntry(0, 1, 7, 2, 470341832);
365  detectorId.SetTECEntry(0, 1, 7, 3, 470358216);
366  detectorId.SetTECEntry(0, 1, 7, 4, 470374600);
367  detectorId.SetTECEntry(0, 1, 7, 5, 470390984);
368  detectorId.SetTECEntry(0, 1, 7, 6, 470407368);
369  detectorId.SetTECEntry(0, 1, 7, 7, 470423752);
370  detectorId.SetTECEntry(0, 1, 7, 8, 470440136);
371 
372  // TEC-
373  detectorId.SetTECEntry(1, 0, 0, 0, 470045064);
374  detectorId.SetTECEntry(1, 0, 0, 1, 470061448);
375  detectorId.SetTECEntry(1, 0, 0, 2, 470077832);
376  detectorId.SetTECEntry(1, 0, 0, 3, 470094216);
377  detectorId.SetTECEntry(1, 0, 0, 4, 470110600);
378  detectorId.SetTECEntry(1, 0, 0, 5, 470126984);
379  detectorId.SetTECEntry(1, 0, 0, 6, 470143368);
380  detectorId.SetTECEntry(1, 0, 0, 7, 470159752);
381  detectorId.SetTECEntry(1, 0, 0, 8, 470176136);
382  detectorId.SetTECEntry(1, 0, 1, 0, 470045320);
383  detectorId.SetTECEntry(1, 0, 1, 1, 470061704);
384  detectorId.SetTECEntry(1, 0, 1, 2, 470078088);
385  detectorId.SetTECEntry(1, 0, 1, 3, 470094472);
386  detectorId.SetTECEntry(1, 0, 1, 4, 470110856);
387  detectorId.SetTECEntry(1, 0, 1, 5, 470127240);
388  detectorId.SetTECEntry(1, 0, 1, 6, 470143624);
389  detectorId.SetTECEntry(1, 0, 1, 7, 470160008);
390  detectorId.SetTECEntry(1, 0, 1, 8, 470176392);
391  detectorId.SetTECEntry(1, 0, 2, 0, 470045576);
392  detectorId.SetTECEntry(1, 0, 2, 1, 470061960);
393  detectorId.SetTECEntry(1, 0, 2, 2, 470078344);
394  detectorId.SetTECEntry(1, 0, 2, 3, 470094728);
395  detectorId.SetTECEntry(1, 0, 2, 4, 470111112);
396  detectorId.SetTECEntry(1, 0, 2, 5, 470127496);
397  detectorId.SetTECEntry(1, 0, 2, 6, 470143880);
398  detectorId.SetTECEntry(1, 0, 2, 7, 470160264);
399  detectorId.SetTECEntry(1, 0, 2, 8, 470176648);
400  detectorId.SetTECEntry(1, 0, 3, 0, 470045832);
401  detectorId.SetTECEntry(1, 0, 3, 1, 470062216);
402  detectorId.SetTECEntry(1, 0, 3, 2, 470078600);
403  detectorId.SetTECEntry(1, 0, 3, 3, 470094984);
404  detectorId.SetTECEntry(1, 0, 3, 4, 470111368);
405  detectorId.SetTECEntry(1, 0, 3, 5, 470127752);
406  detectorId.SetTECEntry(1, 0, 3, 6, 470144136);
407  detectorId.SetTECEntry(1, 0, 3, 7, 470160520);
408  detectorId.SetTECEntry(1, 0, 3, 8, 470176904);
409  detectorId.SetTECEntry(1, 0, 4, 0, 470046088);
410  detectorId.SetTECEntry(1, 0, 4, 1, 470062472);
411  detectorId.SetTECEntry(1, 0, 4, 2, 470078856);
412  detectorId.SetTECEntry(1, 0, 4, 3, 470095240);
413  detectorId.SetTECEntry(1, 0, 4, 4, 470111624);
414  detectorId.SetTECEntry(1, 0, 4, 5, 470128008);
415  detectorId.SetTECEntry(1, 0, 4, 6, 470144392);
416  detectorId.SetTECEntry(1, 0, 4, 7, 470160776);
417  detectorId.SetTECEntry(1, 0, 4, 8, 470177160);
418  detectorId.SetTECEntry(1, 0, 5, 0, 470046344);
419  detectorId.SetTECEntry(1, 0, 5, 1, 470062728);
420  detectorId.SetTECEntry(1, 0, 5, 2, 470079112);
421  detectorId.SetTECEntry(1, 0, 5, 3, 470095496);
422  detectorId.SetTECEntry(1, 0, 5, 4, 470111880);
423  detectorId.SetTECEntry(1, 0, 5, 5, 470128264);
424  detectorId.SetTECEntry(1, 0, 5, 6, 470144648);
425  detectorId.SetTECEntry(1, 0, 5, 7, 470161032);
426  detectorId.SetTECEntry(1, 0, 5, 8, 470177416);
427  detectorId.SetTECEntry(1, 0, 6, 0, 470046600);
428  detectorId.SetTECEntry(1, 0, 6, 1, 470062984);
429  detectorId.SetTECEntry(1, 0, 6, 2, 470079368);
430  detectorId.SetTECEntry(1, 0, 6, 3, 470095752);
431  detectorId.SetTECEntry(1, 0, 6, 4, 470112136);
432  detectorId.SetTECEntry(1, 0, 6, 5, 470128520);
433  detectorId.SetTECEntry(1, 0, 6, 6, 470144904);
434  detectorId.SetTECEntry(1, 0, 6, 7, 470161288);
435  detectorId.SetTECEntry(1, 0, 6, 8, 470177672);
436  detectorId.SetTECEntry(1, 0, 7, 0, 470046856);
437  detectorId.SetTECEntry(1, 0, 7, 1, 470063240);
438  detectorId.SetTECEntry(1, 0, 7, 2, 470079624);
439  detectorId.SetTECEntry(1, 0, 7, 3, 470096008);
440  detectorId.SetTECEntry(1, 0, 7, 4, 470112392);
441  detectorId.SetTECEntry(1, 0, 7, 5, 470128776);
442  detectorId.SetTECEntry(1, 0, 7, 6, 470145160);
443  detectorId.SetTECEntry(1, 0, 7, 7, 470161544);
444  detectorId.SetTECEntry(1, 0, 7, 8, 470177928);
445  detectorId.SetTECEntry(1, 1, 0, 0, 470045128);
446  detectorId.SetTECEntry(1, 1, 0, 1, 470061512);
447  detectorId.SetTECEntry(1, 1, 0, 2, 470077896);
448  detectorId.SetTECEntry(1, 1, 0, 3, 470094280);
449  detectorId.SetTECEntry(1, 1, 0, 4, 470110664);
450  detectorId.SetTECEntry(1, 1, 0, 5, 470127048);
451  detectorId.SetTECEntry(1, 1, 0, 6, 470143432);
452  detectorId.SetTECEntry(1, 1, 0, 7, 470159816);
453  detectorId.SetTECEntry(1, 1, 0, 8, 470176200);
454  detectorId.SetTECEntry(1, 1, 1, 0, 470045384);
455  detectorId.SetTECEntry(1, 1, 1, 1, 470061768);
456  detectorId.SetTECEntry(1, 1, 1, 2, 470078152);
457  detectorId.SetTECEntry(1, 1, 1, 3, 470094536);
458  detectorId.SetTECEntry(1, 1, 1, 4, 470110920);
459  detectorId.SetTECEntry(1, 1, 1, 5, 470127304);
460  detectorId.SetTECEntry(1, 1, 1, 6, 470143688);
461  detectorId.SetTECEntry(1, 1, 1, 7, 470160072);
462  detectorId.SetTECEntry(1, 1, 1, 8, 470176456);
463  detectorId.SetTECEntry(1, 1, 2, 0, 470045640);
464  detectorId.SetTECEntry(1, 1, 2, 1, 470062024);
465  detectorId.SetTECEntry(1, 1, 2, 2, 470078408);
466  detectorId.SetTECEntry(1, 1, 2, 3, 470094792);
467  detectorId.SetTECEntry(1, 1, 2, 4, 470111176);
468  detectorId.SetTECEntry(1, 1, 2, 5, 470127560);
469  detectorId.SetTECEntry(1, 1, 2, 6, 470143944);
470  detectorId.SetTECEntry(1, 1, 2, 7, 470160328);
471  detectorId.SetTECEntry(1, 1, 2, 8, 470176712);
472  detectorId.SetTECEntry(1, 1, 3, 0, 470045896);
473  detectorId.SetTECEntry(1, 1, 3, 1, 470062280);
474  detectorId.SetTECEntry(1, 1, 3, 2, 470078664);
475  detectorId.SetTECEntry(1, 1, 3, 3, 470095048);
476  detectorId.SetTECEntry(1, 1, 3, 4, 470111432);
477  detectorId.SetTECEntry(1, 1, 3, 5, 470127816);
478  detectorId.SetTECEntry(1, 1, 3, 6, 470144200);
479  detectorId.SetTECEntry(1, 1, 3, 7, 470160584);
480  detectorId.SetTECEntry(1, 1, 3, 8, 470176968);
481  detectorId.SetTECEntry(1, 1, 4, 0, 470046152);
482  detectorId.SetTECEntry(1, 1, 4, 1, 470062536);
483  detectorId.SetTECEntry(1, 1, 4, 2, 470078920);
484  detectorId.SetTECEntry(1, 1, 4, 3, 470095304);
485  detectorId.SetTECEntry(1, 1, 4, 4, 470111688);
486  detectorId.SetTECEntry(1, 1, 4, 5, 470128072);
487  detectorId.SetTECEntry(1, 1, 4, 6, 470144456);
488  detectorId.SetTECEntry(1, 1, 4, 7, 470160840);
489  detectorId.SetTECEntry(1, 1, 4, 8, 470177224);
490  detectorId.SetTECEntry(1, 1, 5, 0, 470046408);
491  detectorId.SetTECEntry(1, 1, 5, 1, 470062792);
492  detectorId.SetTECEntry(1, 1, 5, 2, 470079176);
493  detectorId.SetTECEntry(1, 1, 5, 3, 470095560);
494  detectorId.SetTECEntry(1, 1, 5, 4, 470111944);
495  detectorId.SetTECEntry(1, 1, 5, 5, 470128328);
496  detectorId.SetTECEntry(1, 1, 5, 6, 470144712);
497  detectorId.SetTECEntry(1, 1, 5, 7, 470161096);
498  detectorId.SetTECEntry(1, 1, 5, 8, 470177480);
499  detectorId.SetTECEntry(1, 1, 6, 0, 470046664);
500  detectorId.SetTECEntry(1, 1, 6, 1, 470063048);
501  detectorId.SetTECEntry(1, 1, 6, 2, 470079432);
502  detectorId.SetTECEntry(1, 1, 6, 3, 470095816);
503  detectorId.SetTECEntry(1, 1, 6, 4, 470112200);
504  detectorId.SetTECEntry(1, 1, 6, 5, 470128584);
505  detectorId.SetTECEntry(1, 1, 6, 6, 470144968);
506  detectorId.SetTECEntry(1, 1, 6, 7, 470161352);
507  detectorId.SetTECEntry(1, 1, 6, 8, 470177736);
508  detectorId.SetTECEntry(1, 1, 7, 0, 470046920);
509  detectorId.SetTECEntry(1, 1, 7, 1, 470063304);
510  detectorId.SetTECEntry(1, 1, 7, 2, 470079688);
511  detectorId.SetTECEntry(1, 1, 7, 3, 470096072);
512  detectorId.SetTECEntry(1, 1, 7, 4, 470112456);
513  detectorId.SetTECEntry(1, 1, 7, 5, 470128840);
514  detectorId.SetTECEntry(1, 1, 7, 6, 470145224);
515  detectorId.SetTECEntry(1, 1, 7, 7, 470161608);
516  detectorId.SetTECEntry(1, 1, 7, 8, 470177992);
517 
518  // TIB
519  detectorId.SetTIBTOBEntry(2, 0, 0, 369174604);
520  detectorId.SetTIBTOBEntry(2, 0, 1, 369174600);
521  detectorId.SetTIBTOBEntry(2, 0, 2, 369174596);
522  detectorId.SetTIBTOBEntry(2, 0, 3, 369170500);
523  detectorId.SetTIBTOBEntry(2, 0, 4, 369170504);
524  detectorId.SetTIBTOBEntry(2, 0, 5, 369170508);
525  detectorId.SetTIBTOBEntry(2, 1, 0, 369174732);
526  detectorId.SetTIBTOBEntry(2, 1, 1, 369174728);
527  detectorId.SetTIBTOBEntry(2, 1, 2, 369174724);
528  detectorId.SetTIBTOBEntry(2, 1, 3, 369170628);
529  detectorId.SetTIBTOBEntry(2, 1, 4, 369170632);
530  detectorId.SetTIBTOBEntry(2, 1, 5, 369170636);
531  detectorId.SetTIBTOBEntry(2, 2, 0, 369174812);
532  detectorId.SetTIBTOBEntry(2, 2, 1, 369174808);
533  detectorId.SetTIBTOBEntry(2, 2, 2, 369174804);
534  detectorId.SetTIBTOBEntry(2, 2, 3, 369170708);
535  detectorId.SetTIBTOBEntry(2, 2, 4, 369170712);
536  detectorId.SetTIBTOBEntry(2, 2, 5, 369170716);
537  detectorId.SetTIBTOBEntry(2, 3, 0, 369174940);
538  detectorId.SetTIBTOBEntry(2, 3, 1, 369174936);
539  detectorId.SetTIBTOBEntry(2, 3, 2, 369174932);
540  detectorId.SetTIBTOBEntry(2, 3, 3, 369170836);
541  detectorId.SetTIBTOBEntry(2, 3, 4, 369170840);
542  detectorId.SetTIBTOBEntry(2, 3, 5, 369170844);
543  detectorId.SetTIBTOBEntry(2, 4, 0, 369175068);
544  detectorId.SetTIBTOBEntry(2, 4, 1, 369175064);
545  detectorId.SetTIBTOBEntry(2, 4, 2, 369175060);
546  detectorId.SetTIBTOBEntry(2, 4, 3, 369170964);
547  detectorId.SetTIBTOBEntry(2, 4, 4, 369170968);
548  detectorId.SetTIBTOBEntry(2, 4, 5, 369170972);
549  detectorId.SetTIBTOBEntry(2, 5, 0, 369175164);
550  detectorId.SetTIBTOBEntry(2, 5, 1, 369175160);
551  detectorId.SetTIBTOBEntry(2, 5, 2, 369175156);
552  detectorId.SetTIBTOBEntry(2, 5, 3, 369171060);
553  detectorId.SetTIBTOBEntry(2, 5, 4, 369171064);
554  detectorId.SetTIBTOBEntry(2, 5, 5, 369171068);
555  detectorId.SetTIBTOBEntry(2, 6, 0, 369175292);
556  detectorId.SetTIBTOBEntry(2, 6, 1, 369175288);
557  detectorId.SetTIBTOBEntry(2, 6, 2, 369175284);
558  detectorId.SetTIBTOBEntry(2, 6, 3, 369171188);
559  detectorId.SetTIBTOBEntry(2, 6, 4, 369171192);
560  detectorId.SetTIBTOBEntry(2, 6, 5, 369171196);
561  detectorId.SetTIBTOBEntry(2, 7, 0, 369175372);
562  detectorId.SetTIBTOBEntry(2, 7, 1, 369175368);
563  detectorId.SetTIBTOBEntry(2, 7, 2, 369175364);
564  detectorId.SetTIBTOBEntry(2, 7, 3, 369171268);
565  detectorId.SetTIBTOBEntry(2, 7, 4, 369171272);
566  detectorId.SetTIBTOBEntry(2, 7, 5, 369171276);
567 
568  // TOB
569  detectorId.SetTIBTOBEntry(3, 0, 0, 436232314);
570  detectorId.SetTIBTOBEntry(3, 0, 1, 436232306);
571  detectorId.SetTIBTOBEntry(3, 0, 2, 436232298);
572  detectorId.SetTIBTOBEntry(3, 0, 3, 436228198);
573  detectorId.SetTIBTOBEntry(3, 0, 4, 436228206);
574  detectorId.SetTIBTOBEntry(3, 0, 5, 436228214);
575  detectorId.SetTIBTOBEntry(3, 1, 0, 436232506);
576  detectorId.SetTIBTOBEntry(3, 1, 1, 436232498);
577  detectorId.SetTIBTOBEntry(3, 1, 2, 436232490);
578  detectorId.SetTIBTOBEntry(3, 1, 3, 436228390);
579  detectorId.SetTIBTOBEntry(3, 1, 4, 436228398);
580  detectorId.SetTIBTOBEntry(3, 1, 5, 436228406);
581  detectorId.SetTIBTOBEntry(3, 2, 0, 436232634);
582  detectorId.SetTIBTOBEntry(3, 2, 1, 436232626);
583  detectorId.SetTIBTOBEntry(3, 2, 2, 436232618);
584  detectorId.SetTIBTOBEntry(3, 2, 3, 436228518);
585  detectorId.SetTIBTOBEntry(3, 2, 4, 436228526);
586  detectorId.SetTIBTOBEntry(3, 2, 5, 436228534);
587  detectorId.SetTIBTOBEntry(3, 3, 0, 436232826);
588  detectorId.SetTIBTOBEntry(3, 3, 1, 436232818);
589  detectorId.SetTIBTOBEntry(3, 3, 2, 436232810);
590  detectorId.SetTIBTOBEntry(3, 3, 3, 436228710);
591  detectorId.SetTIBTOBEntry(3, 3, 4, 436228718);
592  detectorId.SetTIBTOBEntry(3, 3, 5, 436228726);
593  detectorId.SetTIBTOBEntry(3, 4, 0, 436233018);
594  detectorId.SetTIBTOBEntry(3, 4, 1, 436233010);
595  detectorId.SetTIBTOBEntry(3, 4, 2, 436233002);
596  detectorId.SetTIBTOBEntry(3, 4, 3, 436228902);
597  detectorId.SetTIBTOBEntry(3, 4, 4, 436228910);
598  detectorId.SetTIBTOBEntry(3, 4, 5, 436228918);
599  detectorId.SetTIBTOBEntry(3, 5, 0, 436233146);
600  detectorId.SetTIBTOBEntry(3, 5, 1, 436233138);
601  detectorId.SetTIBTOBEntry(3, 5, 2, 436233130);
602  detectorId.SetTIBTOBEntry(3, 5, 3, 436229030);
603  detectorId.SetTIBTOBEntry(3, 5, 4, 436229038);
604  detectorId.SetTIBTOBEntry(3, 5, 5, 436229046);
605  detectorId.SetTIBTOBEntry(3, 6, 0, 436233338);
606  detectorId.SetTIBTOBEntry(3, 6, 1, 436233330);
607  detectorId.SetTIBTOBEntry(3, 6, 2, 436233322);
608  detectorId.SetTIBTOBEntry(3, 6, 3, 436229222);
609  detectorId.SetTIBTOBEntry(3, 6, 4, 436229230);
610  detectorId.SetTIBTOBEntry(3, 6, 5, 436229238);
611  detectorId.SetTIBTOBEntry(3, 7, 0, 436233466);
612  detectorId.SetTIBTOBEntry(3, 7, 1, 436233458);
613  detectorId.SetTIBTOBEntry(3, 7, 2, 436233450);
614  detectorId.SetTIBTOBEntry(3, 7, 3, 436229350);
615  detectorId.SetTIBTOBEntry(3, 7, 4, 436229358);
616  detectorId.SetTIBTOBEntry(3, 7, 5, 436229366);
617 
618  // TEC+ AT
619  detectorId.SetTEC2TECEntry(0, 0, 0, 470307208);
620  detectorId.SetTEC2TECEntry(0, 0, 1, 470323592);
621  detectorId.SetTEC2TECEntry(0, 0, 2, 470339976);
622  detectorId.SetTEC2TECEntry(0, 0, 3, 470356360);
623  detectorId.SetTEC2TECEntry(0, 0, 4, 470372744);
624  detectorId.SetTEC2TECEntry(0, 1, 0, 470307468);
625  detectorId.SetTEC2TECEntry(0, 1, 1, 470323852);
626  detectorId.SetTEC2TECEntry(0, 1, 2, 470340236);
627  detectorId.SetTEC2TECEntry(0, 1, 3, 470356620);
628  detectorId.SetTEC2TECEntry(0, 1, 4, 470373004);
629  detectorId.SetTEC2TECEntry(0, 2, 0, 470307716);
630  detectorId.SetTEC2TECEntry(0, 2, 1, 470324100);
631  detectorId.SetTEC2TECEntry(0, 2, 2, 470340484);
632  detectorId.SetTEC2TECEntry(0, 2, 3, 470356868);
633  detectorId.SetTEC2TECEntry(0, 2, 4, 470373252);
634  detectorId.SetTEC2TECEntry(0, 3, 0, 470307976);
635  detectorId.SetTEC2TECEntry(0, 3, 1, 470324360);
636  detectorId.SetTEC2TECEntry(0, 3, 2, 470340744);
637  detectorId.SetTEC2TECEntry(0, 3, 3, 470357128);
638  detectorId.SetTEC2TECEntry(0, 3, 4, 470373512);
639  detectorId.SetTEC2TECEntry(0, 4, 0, 470308236);
640  detectorId.SetTEC2TECEntry(0, 4, 1, 470324620);
641  detectorId.SetTEC2TECEntry(0, 4, 2, 470341004);
642  detectorId.SetTEC2TECEntry(0, 4, 3, 470357388);
643  detectorId.SetTEC2TECEntry(0, 4, 4, 470373772);
644  detectorId.SetTEC2TECEntry(0, 5, 0, 470308488);
645  detectorId.SetTEC2TECEntry(0, 5, 1, 470324872);
646  detectorId.SetTEC2TECEntry(0, 5, 2, 470341256);
647  detectorId.SetTEC2TECEntry(0, 5, 3, 470357640);
648  detectorId.SetTEC2TECEntry(0, 5, 4, 470374024);
649  detectorId.SetTEC2TECEntry(0, 6, 0, 470308748);
650  detectorId.SetTEC2TECEntry(0, 6, 1, 470325132);
651  detectorId.SetTEC2TECEntry(0, 6, 2, 470341516);
652  detectorId.SetTEC2TECEntry(0, 6, 3, 470357900);
653  detectorId.SetTEC2TECEntry(0, 6, 4, 470374284);
654  detectorId.SetTEC2TECEntry(0, 7, 0, 470308996);
655  detectorId.SetTEC2TECEntry(0, 7, 1, 470325380);
656  detectorId.SetTEC2TECEntry(0, 7, 2, 470341764);
657  detectorId.SetTEC2TECEntry(0, 7, 3, 470358148);
658  detectorId.SetTEC2TECEntry(0, 7, 4, 470374532);
659 
660  // TEC- AT
661  detectorId.SetTEC2TECEntry(1, 0, 0, 470045064);
662  detectorId.SetTEC2TECEntry(1, 0, 1, 470061448);
663  detectorId.SetTEC2TECEntry(1, 0, 2, 470077832);
664  detectorId.SetTEC2TECEntry(1, 0, 3, 470094216);
665  detectorId.SetTEC2TECEntry(1, 0, 4, 470110600);
666  detectorId.SetTEC2TECEntry(1, 1, 0, 470045316);
667  detectorId.SetTEC2TECEntry(1, 1, 1, 470061700);
668  detectorId.SetTEC2TECEntry(1, 1, 2, 470078084);
669  detectorId.SetTEC2TECEntry(1, 1, 3, 470094468);
670  detectorId.SetTEC2TECEntry(1, 1, 4, 470110852);
671  detectorId.SetTEC2TECEntry(1, 2, 0, 470045580);
672  detectorId.SetTEC2TECEntry(1, 2, 1, 470061964);
673  detectorId.SetTEC2TECEntry(1, 2, 2, 470078348);
674  detectorId.SetTEC2TECEntry(1, 2, 3, 470094732);
675  detectorId.SetTEC2TECEntry(1, 2, 4, 470111116);
676  detectorId.SetTEC2TECEntry(1, 3, 0, 470045832);
677  detectorId.SetTEC2TECEntry(1, 3, 1, 470062216);
678  detectorId.SetTEC2TECEntry(1, 3, 2, 470078600);
679  detectorId.SetTEC2TECEntry(1, 3, 3, 470094984);
680  detectorId.SetTEC2TECEntry(1, 3, 4, 470111368);
681  detectorId.SetTEC2TECEntry(1, 4, 0, 470046084);
682  detectorId.SetTEC2TECEntry(1, 4, 1, 470062468);
683  detectorId.SetTEC2TECEntry(1, 4, 2, 470078852);
684  detectorId.SetTEC2TECEntry(1, 4, 3, 470095236);
685  detectorId.SetTEC2TECEntry(1, 4, 4, 470111620);
686  detectorId.SetTEC2TECEntry(1, 5, 0, 470046344);
687  detectorId.SetTEC2TECEntry(1, 5, 1, 470062728);
688  detectorId.SetTEC2TECEntry(1, 5, 2, 470079112);
689  detectorId.SetTEC2TECEntry(1, 5, 3, 470095496);
690  detectorId.SetTEC2TECEntry(1, 5, 4, 470111880);
691  detectorId.SetTEC2TECEntry(1, 6, 0, 470046596);
692  detectorId.SetTEC2TECEntry(1, 6, 1, 470062980);
693  detectorId.SetTEC2TECEntry(1, 6, 2, 470079364);
694  detectorId.SetTEC2TECEntry(1, 6, 3, 470095748);
695  detectorId.SetTEC2TECEntry(1, 6, 4, 470112132);
696  detectorId.SetTEC2TECEntry(1, 7, 0, 470046860);
697  detectorId.SetTEC2TECEntry(1, 7, 1, 470063244);
698  detectorId.SetTEC2TECEntry(1, 7, 2, 470079628);
699  detectorId.SetTEC2TECEntry(1, 7, 3, 470096012);
700  detectorId.SetTEC2TECEntry(1, 7, 4, 470112396);
701 }
void SetTEC2TECEntry(int subdetector, int beam, int tecDisk, T)
LASGlobalData< int > detectorId
void SetTIBTOBEntry(int subdetector, int beam, int tibTobPosition, T)
void SetTECEntry(int subdetector, int tecRing, int beam, int tecDisk, T)
template<class Digitype >
void RawDataConverter::GetDigis ( const edm::Event iEvent)
private

Definition at line 54 of file RawDataConverter.h.

References EcalCondDBWriter_cfi::beam, edm::DetSetVector< T >::begin(), ClearData(), CurrentInstanceLabel, CurrentModuleLabel, detectorId, edm::DetSetVector< T >::end(), edm::Event::getByLabel(), LASGlobalData< T >::GetTEC2TECEntry(), LASGlobalData< T >::GetTECEntry(), LASGlobalData< T >::GetTIBTOBEntry(), edm::HandleBase::isValid(), LogDebug, heppy_loop::loop, relativeConstraints::ring, LASGlobalLoop::TEC2TECLoop(), LASGlobalLoop::TECLoop(), theData, and LASGlobalLoop::TIBTOBLoop().

54  {
55  LogDebug("RawDataConverter") << "Fill ZeroSuppressed Digis into the Tree";
56 
57  // Get the DetSetVector for the SiStripDigis
58  // This is a vector with all the modules, each module containing zero or more strips with signal (Digis)
59  edm::Handle<edm::DetSetVector<Digitype> > detSetVector; // Handle for holding the DetSetVector
60  iEvent.getByLabel(CurrentModuleLabel, CurrentInstanceLabel, detSetVector);
61  if (!detSetVector.isValid())
62  throw std::runtime_error("Could not find the Digis");
63 
64  // set everything in the local container to zero
65  ClearData();
66 
67  // Fill the Digis into the Raw Data Container
68 
69  LASGlobalLoop loop; // loop helper
70  int det, ring, beam, disk, pos; // and its variables
71 
72  // loop over TEC+- (internal) modules
73  det = 0;
74  ring = 0;
75  beam = 0;
76  disk = 0;
77  do {
78  // Find the module in the DetSetVector and get a pointer (iterator) to it
80  detSetVector->find(detectorId.GetTECEntry(det, ring, beam, disk));
81 
82  if (theModule != detSetVector->end()) {
83  // loop over all the Digis in this Module
85  for (theDigi = theModule->data.begin(); theDigi != theModule->data.end(); ++theDigi) {
86  // fill the number of adc counts into the local container
87  if (theDigi->channel() < 512)
88  theData.GetTECEntry(det, ring, beam, disk).at(theDigi->channel()) = theDigi->adc();
89  }
90  }
91  } while (loop.TECLoop(det, ring, beam, disk));
92 
93  // loop TIB/TOB
94  det = 2;
95  beam = 0;
96  pos = 0; // <- set det = 2 (TIB)
97  do {
98  // Find the module in the DetSetVector and get a pointer (iterator) to it
100  detSetVector->find(detectorId.GetTIBTOBEntry(det, beam, pos));
101 
102  if (theModule != detSetVector->end()) {
103  // loop over all the Digis in this Module
104  typename edm::DetSet<Digitype>::const_iterator theDigi;
105  for (theDigi = theModule->data.begin(); theDigi != theModule->data.end(); ++theDigi) {
106  // fill the number of adc counts into the local container
107  if (theDigi->channel() < 512)
108  theData.GetTIBTOBEntry(det, beam, pos).at(theDigi->channel()) = theDigi->adc();
109  }
110  }
111  } while (loop.TIBTOBLoop(det, beam, pos));
112 
113  // loop TEC (AT)
114  det = 0;
115  beam = 0;
116  disk = 0;
117  do {
118  // Find the module in the DetSetVector and get a pointer (iterator) to it
120  detSetVector->find(detectorId.GetTEC2TECEntry(det, beam, disk));
121 
122  if (theModule != detSetVector->end()) {
123  // loop over all the Digis in this Module
124  typename edm::DetSet<Digitype>::const_iterator theDigi;
125  for (theDigi = theModule->data.begin(); theDigi != theModule->data.end(); ++theDigi) {
126  // fill the number of adc counts into the local container
127  if (theDigi->channel() < 512)
128  theData.GetTEC2TECEntry(det, beam, disk).at(theDigi->channel()) = theDigi->adc();
129  }
130  }
131  } while (loop.TEC2TECLoop(det, beam, disk));
132 }
LASGlobalData< int > detectorId
bool TEC2TECLoop(int &, int &, int &) const
T & GetTIBTOBEntry(int subdetector, int beam, int tibTobPosition)
bool isValid() const
Definition: HandleBase.h:70
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:325
T & GetTEC2TECEntry(int subdetector, int beam, int tecDisk)
T & GetTECEntry(int subdetector, int tecRing, int beam, int tecDisk)
Definition: LASGlobalData.h:84
std::string CurrentModuleLabel
LASGlobalData< std::vector< float > > theData
bool TECLoop(int &, int &, int &, int &) const
bool TIBTOBLoop(int &, int &, int &) const
iterator begin()
Return an iterator to the first DetSet.
Definition: DetSetVector.h:314
std::string CurrentInstanceLabel
collection_type::const_iterator const_iterator
Definition: DetSet.h:31
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:102
#define LogDebug(id)
RawDataConverter::DigiType RawDataConverter::GetValidLabels ( const edm::Event iEvent)
private

Definition at line 67 of file RawDataConverter.cc.

References CurrentInstanceLabel, CurrentModuleLabel, edm::Event::getByLabel(), edm::HandleBase::isValid(), ProcessedRaw, theDigiModuleLabels, theProductInstanceLabels, Unknown, VirginRaw, and ZeroSuppressed.

Referenced by analyze().

69 {
70  // Clear the current labels
71  CurrentModuleLabel = "";
73 
74  //Create handles for testing
78 
79  // Create stream foer debug message
80  std::ostringstream search_message;
81  search_message << "Searching for SiStripDigis\n";
82  // Loop through Module and instance labels that were defined in the configuration
83  for (std::vector<std::string>::iterator moduleLabel = theDigiModuleLabels.begin();
84  moduleLabel != theDigiModuleLabels.end();
85  ++moduleLabel) {
86  for (std::vector<std::string>::iterator instanceLabel = theProductInstanceLabels.begin();
87  instanceLabel != theProductInstanceLabels.end();
88  ++instanceLabel) {
89  search_message << "Checking for Module " << *moduleLabel << " Instance " << *instanceLabel << "\n";
90 
91  //First try ZeroSuppressed Digis
92  iEvent.getByLabel(*moduleLabel, *instanceLabel, theStripDigis);
93  if (theStripDigis.isValid()) {
94  search_message << "Found ZeroSuppressed\n";
95  edm::LogInfo("RawDataConverter") << search_message.str();
96  CurrentModuleLabel = *moduleLabel;
97  CurrentInstanceLabel = *instanceLabel;
98  return ZeroSuppressed;
99  }
100 
101  // Next try VirginRaw Digis
102  iEvent.getByLabel(*moduleLabel, *instanceLabel, theStripRawDigis);
103  if (theStripRawDigis.isValid()) {
104  search_message << "Found Raw\n";
105  edm::LogInfo("RawDataConverter") << search_message.str();
106  CurrentModuleLabel = *moduleLabel;
107  CurrentInstanceLabel = *instanceLabel;
108  return VirginRaw;
109  }
110 
111  // Next try ProcessedRaw Digis
112  iEvent.getByLabel(*moduleLabel, *instanceLabel, theStripProcessedRawDigis);
113  if (theStripProcessedRawDigis.isValid()) {
114  search_message << "Found ProcessedRaw\n";
115  edm::LogInfo("RawDataConverter") << search_message.str();
116  CurrentModuleLabel = *moduleLabel;
117  CurrentInstanceLabel = *instanceLabel;
118  return ProcessedRaw;
119  }
120  }
121  }
122  return Unknown;
123 }
std::vector< std::string > theDigiModuleLabels
bool isValid() const
Definition: HandleBase.h:70
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500
Log< level::Info, false > LogInfo
std::string CurrentModuleLabel
std::string CurrentInstanceLabel
std::vector< std::string > theProductInstanceLabels

Member Data Documentation

std::string RawDataConverter::CurrentInstanceLabel
private

Definition at line 37 of file RawDataConverter.h.

Referenced by GetDigis(), and GetValidLabels().

std::string RawDataConverter::CurrentModuleLabel
private

Definition at line 36 of file RawDataConverter.h.

Referenced by GetDigis(), and GetValidLabels().

LASGlobalData<int> RawDataConverter::detectorId
private

Definition at line 47 of file RawDataConverter.h.

Referenced by fillDetectorId(), and GetDigis().

int RawDataConverter::eventnumber
private

Definition at line 44 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

int RawDataConverter::latency
private

Definition at line 43 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

int RawDataConverter::lumiBlock
private

Definition at line 46 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

int RawDataConverter::runnumber
private

Definition at line 45 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

LASGlobalData<std::vector<float> > RawDataConverter::theData
private

Definition at line 41 of file RawDataConverter.h.

Referenced by ClearData(), GetDigis(), and RawDataConverter().

std::vector<std::string> RawDataConverter::theDigiModuleLabels
private

Definition at line 33 of file RawDataConverter.h.

Referenced by GetValidLabels(), and RawDataConverter().

TFile* RawDataConverter::theOutputFile
private

Definition at line 39 of file RawDataConverter.h.

Referenced by endJob(), and RawDataConverter().

TTree* RawDataConverter::theOutputTree
private

Definition at line 40 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

std::vector<std::string> RawDataConverter::theProductInstanceLabels
private

Definition at line 34 of file RawDataConverter.h.

Referenced by GetValidLabels(), and RawDataConverter().