File indexing completed on 2024-04-06 12:19:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019 #include "L1Trigger/DTSectorCollector/interface/DTSCTrigUnit.h"
0020
0021
0022
0023
0024
0025
0026
0027
0028 #include <iostream>
0029 #include <cmath>
0030
0031
0032
0033
0034 DTSCTrigUnit::DTSCTrigUnit(const DTChamber* stat) {
0035
0036
0037
0038
0039
0040 _geom = new DTTrigGeom(stat, false);
0041
0042
0043 _theBTIs = new DTBtiCard(_geom);
0044
0045
0046 _theTSTheta = new DTTSTheta(_geom, _theBTIs);
0047
0048
0049 _theTRACOs = new DTTracoCard(_geom, _theBTIs, _theTSTheta);
0050
0051
0052 _theTSPhi = new DTTSPhi(_geom, _theTRACOs);
0053 }
0054
0055
0056
0057
0058 DTSCTrigUnit::~DTSCTrigUnit() {
0059 delete _theBTIs;
0060 delete _theTRACOs;
0061 delete _theTSPhi;
0062 delete _theTSTheta;
0063 delete _geom;
0064 }
0065
0066 DTGeomSupplier* DTSCTrigUnit::GeomSupplier(const DTTrigData* trig) const {
0067
0068 DTTrigData* tr = const_cast<DTTrigData*>(trig);
0069 if (dynamic_cast<DTBtiTrigData*>(tr))
0070 return _theBTIs;
0071 if (dynamic_cast<DTTracoTrigData*>(tr))
0072 return _theTRACOs;
0073 if (dynamic_cast<DTChambPhSegm*>(tr))
0074 return _theTSPhi;
0075 if (dynamic_cast<DTChambThSegm*>(tr))
0076 return _theTSTheta;
0077
0078
0079
0080
0081 return nullptr;
0082 }
0083
0084 void DTSCTrigUnit::setConfig(const DTConfigManager* conf) {
0085 _theBTIs->setConfig(conf);
0086 _theTSTheta->setConfig(conf);
0087 _theTRACOs->setConfig(conf);
0088 _theTSPhi->setConfig(conf);
0089 }