CMS 3D CMS Logo

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 ()
 
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
 
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::vector< ModuleDescription const * > &modules, 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 updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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 &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

Definition at line 10 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.

22  :
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 getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< std::string > theDigiModuleLabels
LASGlobalData< std::vector< float > > theData
std::vector< std::string > theProductInstanceLabels
RawDataConverter::~RawDataConverter ( )
override

Definition at line 48 of file RawDataConverter.cc.

48  {
49 }

Member Function Documentation

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

Definition at line 136 of file RawDataConverter.cc.

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

137 {
138  // Determine the digi type to be used (only for the first time this methosd is called)
139  static DigiType digitype = Unknown; // Type of digis in this run
140  if(digitype == Unknown) digitype = GetValidLabels( iEvent ); // Initialization of Digi Type
141 
143  // Retrieve SiStripEventSummary produced by the digitizer
146  //iEvent.getByLabel( digiProducer, summary );
147  iEvent.getByLabel( "siStripDigis", summary );
148  latency = static_cast<int32_t>( summary->latency() );
149  eventnumber = iEvent.id().event();
150  runnumber = iEvent.run();
151  lumiBlock = iEvent.luminosityBlock();
152  //edm::LogAbsolute("RawdataConverter") << " > run: " << runnumber << " event: " << eventnumber << " lumiBlock: " << lumiBlock << " latency: " << latency << std::endl;
153 
155  // Handles for holding possible Digis
158 
159  // Get the Digis as definef by digitype
160  // Currently only ZeroSuppressed is implemented properly
161  switch( digitype){
162  case ZeroSuppressed:
163  GetDigis<SiStripDigi>(iEvent);
164  break;
165  case VirginRaw:
166  throw std::runtime_error("RawDataConverter is not yet able to process VirginRaw Data");
167  break;
168  case ProcessedRaw:
169  throw std::runtime_error("RawDataConverter is not yet able to process ProcessedRaw Data");
170  break;
171  default:
172  throw std::runtime_error("Did not find valid Module or Instance label");
173  }
174 
175 
176  // Push Container into the Tree
177  theOutputTree->Fill();
178 
179  return;
180 }
EventNumber_t event() const
Definition: EventID.h:41
const uint32_t & latency() const
DigiType GetValidLabels(const edm::Event &iEvent)
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:63
int iEvent
Definition: GenABIO.cc:230
RunNumber_t run() const
Definition: Event.h:99
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:464
edm::EventID id() const
Definition: EventBase.h:60
void RawDataConverter::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 55 of file RawDataConverter.cc.

References fillDetectorId().

56 {
58 
59 }
void fillDetectorId(void)
void RawDataConverter::beginRun ( edm::Run const &  theRun,
edm::EventSetup const &  theEventSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 66 of file RawDataConverter.cc.

References edm::EventSetup::fillAvailableRecordKeys(), mps_fire::i, LogDebug, and connectstrParser::o.

67 {
68  std::vector< edm::eventsetup::EventSetupRecordKey > oToFill;
69  theEventSetup.fillAvailableRecordKeys (oToFill);
70  std::ostringstream o;
72  o << oToFill[i].name() << "\n";
73  }
74  LogDebug("RawDataConverter") << "The size of EventSetup is: " << oToFill.size() << "\n" << o.str();
75 }
#define LogDebug(id)
uint16_t size_type
void RawDataConverter::ClearData ( void  )
private

set all strips to zero

Definition at line 196 of file RawDataConverter.cc.

References 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().

196  {
197 
198  // Assign a vector filled with zeros to all module entries
199  // The vector is const static to increase performance
200  // Even more performant would be to have a complete data object that is filled with zero
201 
202  // Empty object to be assigned to all modules
203  static const std::vector<float> zero_buffer(512,0);
204 
205  // loop helper and its variables
207  int det, ring, beam, disk, pos;
208 
209  // loop TEC+- (internal)
210  det = 0; ring = 0; beam = 0; disk = 0;
211  do {
212  theData.GetTECEntry( det, ring, beam, disk ) = zero_buffer;
213  } while( loop.TECLoop( det, ring, beam, disk ) );
214 
215  // loop TIB/TOB
216  det = 2; beam = 0; pos = 0; // <- set det = 2 (TIB)
217  do {
218  theData.GetTIBTOBEntry( det, beam, pos ) = zero_buffer;
219  } while( loop.TIBTOBLoop( det, beam, pos ) );
220 
221  // loop TEC (AT)
222  det = 0; beam = 0; disk = 0;
223  do {
224  theData.GetTEC2TECEntry( det, beam, disk ) = zero_buffer;
225  } while( loop.TEC2TECLoop( det, beam, disk ) );
226 
227 }
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:91
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 186 of file RawDataConverter.cc.

References theOutputFile.

Referenced by o2olib.O2ORunMgr::executeJob().

187 {
188  theOutputFile->Write();
189  theOutputFile->Close();
190 }
void RawDataConverter::fillDetectorId ( void  )
private

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

Definition at line 233 of file RawDataConverter.cc.

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

Referenced by beginJob().

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

55 {
56  LogDebug("RawDataConverter") << "Fill ZeroSuppressed Digis into the Tree";
57 
58  // Get the DetSetVector for the SiStripDigis
59  // This is a vector with all the modules, each module containing zero or more strips with signal (Digis)
60  edm::Handle< edm::DetSetVector< Digitype > > detSetVector; // Handle for holding the DetSetVector
61  iEvent.getByLabel( CurrentModuleLabel , CurrentInstanceLabel , detSetVector );
62  if( ! detSetVector.isValid() ) 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; ring = 0; beam = 0; disk = 0;
74  do {
75  // Find the module in the DetSetVector and get a pointer (iterator) to it
76  typename edm::DetSetVector< Digitype >::const_iterator theModule = detSetVector->find( detectorId.GetTECEntry( det, ring, beam, disk ) );
77 
78  if ( theModule != detSetVector->end() ) {
79  // loop over all the Digis in this Module
81  for (theDigi = theModule->data.begin(); theDigi != theModule->data.end(); ++theDigi ) {
82  // fill the number of adc counts into the local container
83  if ( theDigi->channel() < 512 ) theData.GetTECEntry( det, ring, beam, disk ).at( theDigi->channel() ) = theDigi->adc();
84  }
85  }
86  } while( loop.TECLoop( det, ring, beam, disk ) );
87 
88  // loop TIB/TOB
89  det = 2; beam = 0; pos = 0; // <- set det = 2 (TIB)
90  do {
91  // Find the module in the DetSetVector and get a pointer (iterator) to it
92  typename edm::DetSetVector< Digitype >::const_iterator theModule = detSetVector->find( detectorId.GetTIBTOBEntry( det, beam, pos ) );
93 
94  if ( theModule != detSetVector->end() ) {
95  // loop over all the Digis in this Module
97  for (theDigi = theModule->data.begin(); theDigi != theModule->data.end(); ++theDigi ) {
98  // fill the number of adc counts into the local container
99  if ( theDigi->channel() < 512 ) theData.GetTIBTOBEntry( det, beam, pos ).at( theDigi->channel() ) = theDigi->adc();
100  }
101  }
102  } while( loop.TIBTOBLoop( det, beam, pos ) );
103 
104 
105  // loop TEC (AT)
106  det = 0; beam = 0; disk = 0;
107  do {
108  // Find the module in the DetSetVector and get a pointer (iterator) to it
109  typename edm::DetSetVector< Digitype >::const_iterator theModule = detSetVector->find( detectorId.GetTEC2TECEntry( det, beam, disk ) );
110 
111  if ( theModule != detSetVector->end() ) {
112  // loop over all the Digis in this Module
114  for (theDigi = theModule->data.begin(); theDigi != theModule->data.end(); ++theDigi ) {
115  // fill the number of adc counts into the local container
116  if ( theDigi->channel() < 512 ) theData.GetTEC2TECEntry( det, beam, disk ).at( theDigi->channel() ) = theDigi->adc();
117  }
118  }
119  } while( loop.TEC2TECLoop( det, beam, disk ) );
120 }
#define LogDebug(id)
LASGlobalData< int > detectorId
bool TEC2TECLoop(int &, int &, int &) const
T & GetTIBTOBEntry(int subdetector, int beam, int tibTobPosition)
bool isValid() const
Definition: HandleBase.h:74
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:464
iterator end()
Return the off-the-end iterator.
Definition: DetSetVector.h:361
T & GetTEC2TECEntry(int subdetector, int beam, int tecDisk)
T & GetTECEntry(int subdetector, int tecRing, int beam, int tecDisk)
Definition: LASGlobalData.h:91
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:346
std::string CurrentInstanceLabel
collection_type::const_iterator const_iterator
Definition: DetSet.h:33
collection_type::const_iterator const_iterator
Definition: DetSetVector.h:104
RawDataConverter::DigiType RawDataConverter::GetValidLabels ( const edm::Event iEvent)
private

Definition at line 79 of file RawDataConverter.cc.

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

Referenced by analyze().

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

Member Data Documentation

std::string RawDataConverter::CurrentInstanceLabel
private

Definition at line 35 of file RawDataConverter.h.

Referenced by GetDigis(), and GetValidLabels().

std::string RawDataConverter::CurrentModuleLabel
private

Definition at line 34 of file RawDataConverter.h.

Referenced by GetDigis(), and GetValidLabels().

LASGlobalData<int> RawDataConverter::detectorId
private

Definition at line 45 of file RawDataConverter.h.

Referenced by fillDetectorId(), and GetDigis().

int RawDataConverter::eventnumber
private

Definition at line 42 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

int RawDataConverter::latency
private

Definition at line 41 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

int RawDataConverter::lumiBlock
private

Definition at line 44 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

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

Definition at line 39 of file RawDataConverter.h.

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

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

Definition at line 31 of file RawDataConverter.h.

Referenced by GetValidLabels(), and RawDataConverter().

TFile* RawDataConverter::theOutputFile
private

Definition at line 37 of file RawDataConverter.h.

Referenced by endJob(), and RawDataConverter().

TTree* RawDataConverter::theOutputTree
private

Definition at line 38 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

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

Definition at line 32 of file RawDataConverter.h.

Referenced by GetValidLabels(), and RawDataConverter().