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::one::EDAnalyzer< edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 RawDataConverter (const edm::ParameterSet &)
 
 ~RawDataConverter () override=default
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () 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 endRun (edm::Run const &, edm::EventSetup const &) 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::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- 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< Bconsumes (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 ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
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 19 of file RawDataConverter.cc.

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

20  : theOutputFile(nullptr),
21  theOutputTree(nullptr),
22  latency(-1),
23  eventnumber(-1),
24  runnumber(-1),
25  lumiBlock(-1)
26 
27 {
28  theOutputFile = new TFile(iConfig.getUntrackedParameter<std::string>("OutputFileName").c_str(), "RECREATE");
29  theOutputFile->cd();
30  theOutputTree = new TTree("lasRawDataTree", "lasRawDataTree");
31  theOutputTree->Branch("lasRawData", &theData);
32  theOutputTree->Branch("latency", &latency, "latency/I");
33  theOutputTree->Branch("eventnumber", &eventnumber, "eventnumber/I");
34  theOutputTree->Branch("runnumber", &runnumber, "runnumber/I");
35  theOutputTree->Branch("lumiblock", &lumiBlock, "lumiblock/I");
36 
37  theDigiModuleLabels = iConfig.getParameter<std::vector<std::string> >("DigiModuleLabels");
38  theProductInstanceLabels = iConfig.getParameter<std::vector<std::string> >("ProductInstanceLabels");
39 }
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 ( )
overridedefault

Member Function Documentation

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

Implements edm::one::EDAnalyzerBase.

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

120  {
121  // Determine the digi type to be used (only for the first time this methosd is called)
122  static DigiType digitype = Unknown; // Type of digis in this run
123  if (digitype == Unknown)
124  digitype = GetValidLabels(iEvent); // Initialization of Digi Type
125 
127  // Retrieve SiStripEventSummary produced by the digitizer
130  //iEvent.getByLabel( digiProducer, summary );
131  iEvent.getByLabel("siStripDigis", summary);
132  latency = static_cast<int32_t>(summary->latency());
133  eventnumber = iEvent.id().event();
134  runnumber = iEvent.run();
135  lumiBlock = iEvent.luminosityBlock();
136  //edm::LogAbsolute("RawdataConverter") << " > run: " << runnumber << " event: " << eventnumber << " lumiBlock: " << lumiBlock << " latency: " << latency << std::endl;
137 
139  // Handles for holding possible Digis
141  edm::Handle<edm::DetSetVector<SiStripProcessedRawDigi> > theStripProcessedRawDigis;
142 
143  // Get the Digis as definef by digitype
144  // Currently only ZeroSuppressed is implemented properly
145  switch (digitype) {
146  case ZeroSuppressed:
147  GetDigis<SiStripDigi>(iEvent);
148  break;
149  case VirginRaw:
150  throw std::runtime_error("RawDataConverter is not yet able to process VirginRaw Data");
151  break;
152  case ProcessedRaw:
153  throw std::runtime_error("RawDataConverter is not yet able to process ProcessedRaw Data");
154  break;
155  default:
156  throw std::runtime_error("Did not find valid Module or Instance label");
157  }
158 
159  // Push Container into the Tree
160  theOutputTree->Fill();
161 
162  return;
163 }
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 ( )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 44 of file RawDataConverter.cc.

References fillDetectorId().

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

Definition at line 49 of file RawDataConverter.cc.

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

49  {
50  std::vector<edm::eventsetup::EventSetupRecordKey> oToFill;
51  theEventSetup.fillAvailableRecordKeys(oToFill);
52  std::ostringstream o;
53  for (std::vector<edm::eventsetup::EventSetupRecordKey>::size_type i = 0; i < oToFill.size(); i++) {
54  o << oToFill[i].name() << "\n";
55  }
56  LogDebug("RawDataConverter") << "The size of EventSetup is: " << oToFill.size() << "\n" << o.str();
57 }
uint16_t size_type
#define LogDebug(id)
void RawDataConverter::ClearData ( void  )
private

set all strips to zero

Definition at line 176 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().

176  {
177  // Assign a vector filled with zeros to all module entries
178  // The vector is const static to increase performance
179  // Even more performant would be to have a complete data object that is filled with zero
180 
181  // Empty object to be assigned to all modules
182  static const std::vector<float> zero_buffer(512, 0);
183 
184  // loop helper and its variables
186  int det, ring, beam, disk, pos;
187 
188  // loop TEC+- (internal)
189  det = 0;
190  ring = 0;
191  beam = 0;
192  disk = 0;
193  do {
194  theData.GetTECEntry(det, ring, beam, disk) = zero_buffer;
195  } while (loop.TECLoop(det, ring, beam, disk));
196 
197  // loop TIB/TOB
198  det = 2;
199  beam = 0;
200  pos = 0; // <- set det = 2 (TIB)
201  do {
202  theData.GetTIBTOBEntry(det, beam, pos) = zero_buffer;
203  } while (loop.TIBTOBLoop(det, beam, pos));
204 
205  // loop TEC (AT)
206  det = 0;
207  beam = 0;
208  disk = 0;
209  do {
210  theData.GetTEC2TECEntry(det, beam, disk) = zero_buffer;
211  } while (loop.TEC2TECLoop(det, beam, disk));
212 }
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 ( )
overrideprivatevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 168 of file RawDataConverter.cc.

References theOutputFile.

Referenced by o2olib.O2ORunMgr::executeJob().

168  {
169  theOutputFile->Write();
170  theOutputFile->Close();
171 }
void RawDataConverter::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlineoverrideprivate

Definition at line 22 of file RawDataConverter.h.

22 {};
void RawDataConverter::fillDetectorId ( void  )
private

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

Definition at line 217 of file RawDataConverter.cc.

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

Referenced by beginJob().

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

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())
63  throw std::runtime_error("Could not find the Digis");
64 
65  // set everything in the local container to zero
66  ClearData();
67 
68  // Fill the Digis into the Raw Data Container
69 
70  LASGlobalLoop loop; // loop helper
71  int det, ring, beam, disk, pos; // and its variables
72 
73  // loop over TEC+- (internal) modules
74  det = 0;
75  ring = 0;
76  beam = 0;
77  disk = 0;
78  do {
79  // Find the module in the DetSetVector and get a pointer (iterator) to it
81  detSetVector->find(detectorId.GetTECEntry(det, ring, beam, disk));
82 
83  if (theModule != detSetVector->end()) {
84  // loop over all the Digis in this Module
86  for (theDigi = theModule->data.begin(); theDigi != theModule->data.end(); ++theDigi) {
87  // fill the number of adc counts into the local container
88  if (theDigi->channel() < 512)
89  theData.GetTECEntry(det, ring, beam, disk).at(theDigi->channel()) = theDigi->adc();
90  }
91  }
92  } while (loop.TECLoop(det, ring, beam, disk));
93 
94  // loop TIB/TOB
95  det = 2;
96  beam = 0;
97  pos = 0; // <- set det = 2 (TIB)
98  do {
99  // Find the module in the DetSetVector and get a pointer (iterator) to it
101  detSetVector->find(detectorId.GetTIBTOBEntry(det, beam, pos));
102 
103  if (theModule != detSetVector->end()) {
104  // loop over all the Digis in this Module
105  typename edm::DetSet<Digitype>::const_iterator theDigi;
106  for (theDigi = theModule->data.begin(); theDigi != theModule->data.end(); ++theDigi) {
107  // fill the number of adc counts into the local container
108  if (theDigi->channel() < 512)
109  theData.GetTIBTOBEntry(det, beam, pos).at(theDigi->channel()) = theDigi->adc();
110  }
111  }
112  } while (loop.TIBTOBLoop(det, beam, pos));
113 
114  // loop TEC (AT)
115  det = 0;
116  beam = 0;
117  disk = 0;
118  do {
119  // Find the module in the DetSetVector and get a pointer (iterator) to it
121  detSetVector->find(detectorId.GetTEC2TECEntry(det, beam, disk));
122 
123  if (theModule != detSetVector->end()) {
124  // loop over all the Digis in this Module
125  typename edm::DetSet<Digitype>::const_iterator theDigi;
126  for (theDigi = theModule->data.begin(); theDigi != theModule->data.end(); ++theDigi) {
127  // fill the number of adc counts into the local container
128  if (theDigi->channel() < 512)
129  theData.GetTEC2TECEntry(det, beam, disk).at(theDigi->channel()) = theDigi->adc();
130  }
131  }
132  } while (loop.TEC2TECLoop(det, beam, disk));
133 }
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 59 of file RawDataConverter.cc.

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

Referenced by analyze().

61 {
62  // Clear the current labels
63  CurrentModuleLabel = "";
65 
66  //Create handles for testing
70 
71  // Create stream foer debug message
72  std::ostringstream search_message;
73  search_message << "Searching for SiStripDigis\n";
74  // Loop through Module and instance labels that were defined in the configuration
75  for (std::vector<std::string>::iterator moduleLabel = theDigiModuleLabels.begin();
76  moduleLabel != theDigiModuleLabels.end();
77  ++moduleLabel) {
78  for (std::vector<std::string>::iterator instanceLabel = theProductInstanceLabels.begin();
79  instanceLabel != theProductInstanceLabels.end();
80  ++instanceLabel) {
81  search_message << "Checking for Module " << *moduleLabel << " Instance " << *instanceLabel << "\n";
82 
83  //First try ZeroSuppressed Digis
84  iEvent.getByLabel(*moduleLabel, *instanceLabel, theStripDigis);
85  if (theStripDigis.isValid()) {
86  search_message << "Found ZeroSuppressed\n";
87  edm::LogInfo("RawDataConverter") << search_message.str();
88  CurrentModuleLabel = *moduleLabel;
89  CurrentInstanceLabel = *instanceLabel;
90  return ZeroSuppressed;
91  }
92 
93  // Next try VirginRaw Digis
94  iEvent.getByLabel(*moduleLabel, *instanceLabel, theStripRawDigis);
95  if (theStripRawDigis.isValid()) {
96  search_message << "Found Raw\n";
97  edm::LogInfo("RawDataConverter") << search_message.str();
98  CurrentModuleLabel = *moduleLabel;
99  CurrentInstanceLabel = *instanceLabel;
100  return VirginRaw;
101  }
102 
103  // Next try ProcessedRaw Digis
104  iEvent.getByLabel(*moduleLabel, *instanceLabel, theStripProcessedRawDigis);
105  if (theStripProcessedRawDigis.isValid()) {
106  search_message << "Found ProcessedRaw\n";
107  edm::LogInfo("RawDataConverter") << search_message.str();
108  CurrentModuleLabel = *moduleLabel;
109  CurrentInstanceLabel = *instanceLabel;
110  return ProcessedRaw;
111  }
112  }
113  }
114  return Unknown;
115 }
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 38 of file RawDataConverter.h.

Referenced by GetDigis(), and GetValidLabels().

std::string RawDataConverter::CurrentModuleLabel
private

Definition at line 37 of file RawDataConverter.h.

Referenced by GetDigis(), and GetValidLabels().

LASGlobalData<int> RawDataConverter::detectorId
private

Definition at line 48 of file RawDataConverter.h.

Referenced by fillDetectorId(), and GetDigis().

int RawDataConverter::eventnumber
private

Definition at line 45 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

int RawDataConverter::latency
private

Definition at line 44 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

int RawDataConverter::lumiBlock
private

Definition at line 47 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

int RawDataConverter::runnumber
private

Definition at line 46 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

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

Definition at line 42 of file RawDataConverter.h.

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

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

Definition at line 34 of file RawDataConverter.h.

Referenced by GetValidLabels(), and RawDataConverter().

TFile* RawDataConverter::theOutputFile
private

Definition at line 40 of file RawDataConverter.h.

Referenced by endJob(), and RawDataConverter().

TTree* RawDataConverter::theOutputTree
private

Definition at line 41 of file RawDataConverter.h.

Referenced by analyze(), and RawDataConverter().

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

Definition at line 35 of file RawDataConverter.h.

Referenced by GetValidLabels(), and RawDataConverter().