96 std::cout <<
"DTTracoCard::loadTRACO called for wheel=" <<
wheel();
104 std::vector<DTBtiTrigData>::const_iterator
p;
105 std::vector<DTBtiTrigData>::const_iterator pend =
_bticard->
end();
113 int nbti = (*p).btiNumber();
114 int nsl = (*p).btiSL();
115 int step = (*p).step();
117 DTBtiId id_bti = (*p).parentId();
120 int LL = conf_bti->
LL();
121 int LH = conf_bti->
LH();
122 int CL = conf_bti->
CL();
123 int CH = conf_bti->
CH();
124 int RL = conf_bti->
RL();
125 int RH = conf_bti->
RH();
135 if (ntc < 1 || ntc > maxtc)
139 std::cout <<
"Bti trigger assigned to traco " << ntc <<
" (maxtc " << maxtc <<
")" << std::endl;
158 std::cout <<
"ATTENTION: in TRACO n. " << ntc <<
" bti pos " << pos <<
" trigger K= " << K
159 <<
" outside acceptance " << CL <<
"<K<" << CH << std::endl;
175 if ((ntc - 1) > 0 && (ntc - 1) <= maxtc) {
176 if (!
_flag_acc || (K >= LL && K <= LH)) {
180 std::cout <<
"ATTENTION: in TRACO n. " << ntc - 1 <<
" bti pos " << pos + 8 - 4 * (-1)
181 <<
" trigger K= " << K <<
" outside acceptance " << LL <<
"<K<" << LH << std::endl;
187 if ((ntc) > 0 && (ntc) <= maxtc) {
188 if (!
_flag_acc || (K >= CL && K <= CH)) {
192 std::cout <<
"ATTENTION: in TRACO n. " << ntc <<
" bti pos " << pos + 8 - 4 * (0) <<
" trigger K= " << K
193 <<
" outside acceptance " << CL <<
"<K<" << CH << std::endl;
198 if ((ntc + 1) > 0 && (ntc + 1) <= maxtc) {
199 if (!
_flag_acc || (K >= RL && K <= RH)) {
203 std::cout <<
"ATTENTION: in TRACO n. " << ntc + 1 <<
" bti pos " << pos + 8 - 4 * (+1)
204 <<
" trigger K= " << K <<
" outside acceptance " << RL <<
"<K<" << RH << std::endl;
225 std::cout <<
"====================================================" << std::endl;
226 std::cout <<
" TRACO triggers " << std::endl;
266 std::cout <<
"====================================================" << std::endl;
278 traco = (*ptraco).second;
290 return (*ptraco).second;
294 std::vector<DTTracoChip *> blist;
300 blist.push_back((*p).second);
309 std::cout <<
"DTTracoChip::trigger: trigger not belonging to this card! ";
355 std::cout <<
"DTTracoCard::localPosition called with wrong argument!" << std::endl;
372 if (trig->
posIn() == 0) {
374 }
else if (trig->
posOut() == 0) {
407 std::cout <<
"DTtracoCard::localDirection called with wrong argument!" << std::endl;
418 std::cout <<
"K " << trig->
K() <<
" == psi " << psi <<
" in FE frame " << std::endl;
421 float xd = -
sin(psi);
423 float zd = -
cos(psi);
431 std::cout <<
"Direction in chamber frame is (" << xd <<
"," << yd <<
"," << zd <<
")" << std::endl;
440 std::cout <<
"DTTracoCard::config_traco : TRACO (" << tracoid.
wheel() <<
"," << tracoid.
sector() <<
","
441 << tracoid.
station() <<
"," << tracoid.
traco() <<
") not found, return 0" << std::endl;
const DTConfigLUTs * getDTConfigLUTs(DTChamberId) const
Get desired LUT configuration.
LocalVector localDirection(const DTTrigData *) const override
NEWGEO Local direction in chamber of a trigger-data object.
void clearCache()
Clear all traco stuff (cache & map)
constexpr int32_t ceil(float num)
DTConfigBti * config_bti(DTBtiId &btiid) const
Return bti chip configuration.
int RL() const
K left limit for right traco.
DTTrigGeom * geom() const
Associated geometry.
Local3DVector LocalVector
void run()
Run TRACO algorithm.
Point3DBase< Scalar, LocalTag > LocalPoint
int sector() const
Return sector number.
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
void runTRACO()
run TRACO algorithm
int posIn() const
Return the position of inner segment.
int posOut() const
Return the position of outer segment.
DTTracoCard(DTTrigGeom *, DTBtiCard *, DTTSTheta *)
Constructor.
void addTrig(int step, DTTracoTrig *)
Add a TRACO trigger.
DTTracoChip * activeGetTRACO(int)
Returns the required DTTracoChip. Create it if it doesn't exist.
Sin< T >::type sin(const T &t)
int CH() const
K right limit for center traco.
int step() const
Return step.
TRACOContainer::iterator TRACO_iter
void setConfig(const DTConfigManager *conf)
Set configuration.
int X() const
Return trigger X parameter.
void add_btiT(int step, int pos, const DTBtiTrigData *btitrig)
Add a BTI trigger to the TRACO.
DTTracoChip * getTRACO(int n) const
Returns the required DTTracoChip. Return 0 if it doesn't exist.
std::map< std::string, int, std::less< std::string > > psi
int sector() const
Returns sector number.
int station() const
Return station number.
~DTTracoCard() override
Destructor.
int traco() const
Returns the traco.
void localClear()
clear the TRACO map
int LL() const
K left limit for left traco.
ConfTracoMap _conf_traco_map
int station() const
Returns station number.
float distSL() const
Distance between the phi view superlayers (cms)
int wheel() const
Return wheel number.
DTTracoId parentId() const
Return parent TRACO identifier.
TRACOContainer::const_iterator TRACO_const_iter
Cos< T >::type cos(const T &t)
DTTracoTrig * storeTrigger(DTTracoTrigData)
bool debug()
Return TU debug flag.
DTChamberId ChamberId() const
Identifier of the associated chamber.
DTConfigTraco * config_traco(const DTTracoId &tracoid) const
Return single TRACO config.
static const int NSTEPL
Constants: first and last step to start trigger finding.
int wheel() const
Returns wheel number.
bool getDTTPGDebug() const
Get global debug flag.
const std::map< DTTracoId, DTConfigTraco > & getDTConfigTracoMap(DTChamberId) const
Get desired TRACO configuration map for a given DTChamber.
DTChamberId statId() const
Identifier of the associated chamber.
bool lutFromDB() const
Lut from DB flag.
std::vector< DTTracoChip * > tracoList()
Returns the active TRACO list.
const_iterator begin() const
Get first cache element.
DTTracoTrigData triggerData(int step, unsigned n) const
Return the data part of the requested trigger.
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
int LH() const
K right limit for left traco.
int RH() const
K right limit for right traco.
void loadTRACO()
store BTI triggers in TRACO's
int K() const
Return trigger K parameter.
int useSecondTrack(int step) const
a flag for a usable second track
int CL() const
K left limit for center traco.
const DTConfigLUTs * _conf_luts
bool useAcceptParam() const
Use Bti acceptance parameters (LL,LH,CL,CH,RL,RH)
const_iterator end() const
Get last cache element.
void clearCache()
Clear cache vector.
int size() const
Get cache vector's size.
int nTrig(int step) const
Return the number of trigger candidates.
LocalPoint localPosition(const DTTrigData *) const override
NEWGEO Local position in chamber of a trigger-data object.