51 _bticard(bticard), _tstheta(tstheta) {
112 std::cout <<
"DTTracoCard::loadTRACO called for wheel=" <<
wheel() ;
120 std::vector<DTBtiTrigData>::const_iterator
p;
121 std::vector<DTBtiTrigData>::const_iterator pend=
_bticard->
end();
129 int nbti = (*p).btiNumber();
130 int nsl = (*p).btiSL();
131 int step = (*p).step();
133 DTBtiId id_bti = (*p).parentId();
136 int LL = conf_bti->
LL();
137 int LH = conf_bti->
LH();
138 int CL = conf_bti->
CL();
139 int CH = conf_bti->
CH();
140 int RL = conf_bti->
RL();
141 int RH = conf_bti->
RH();
151 if( ntc<1 || ntc>maxtc )
155 std::cout <<
"Bti trigger assigned to traco " << ntc <<
" (maxtc " << maxtc <<
")" << std::endl;
175 std::cout <<
"ATTENTION: in TRACO n. " << ntc
176 <<
" bti pos " << pos <<
" trigger K= " << K
177 <<
" outside acceptance " << CL <<
"<K<" << CH << std::endl;
192 if( (ntc-1)>0 && (ntc-1)<=maxtc ) {
197 std::cout <<
"ATTENTION: in TRACO n. " << ntc-1
198 <<
" bti pos " << pos+8-4*(-1) <<
" trigger K= " << K
199 <<
" outside acceptance " << LL <<
"<K<" << LH << std::endl;
205 if( (ntc)>0 && (ntc)<=maxtc ) {
210 std::cout <<
"ATTENTION: in TRACO n. " << ntc
211 <<
" bti pos " << pos+8-4*(0) <<
" trigger K= " << K
212 <<
" outside acceptance " << CL <<
"<K<" << CH << std::endl;
217 if( (ntc+1)>0 && (ntc+1)<=maxtc ) {
222 std::cout <<
"ATTENTION: in TRACO n. " << ntc+1
223 <<
" bti pos " << pos+8-4*(+1) <<
" trigger K= " << K
224 <<
" outside acceptance " << RL <<
"<K<" << RH << std::endl;
238 std::cout <<
"DTTracoCard:runTRACO called for wheel=" <<
wheel() ;
248 std::cout <<
"====================================================" << std::endl;
249 std::cout <<
" TRACO triggers " << std::endl;
284 std::cout <<
"====================================================" << std::endl;
298 traco=(*ptraco).second;
310 return (*ptraco).second;
313 std::vector<DTTracoChip*>
316 std::vector<DTTracoChip*> blist;
318 if(
size()<1)
return blist;
321 blist.push_back((*p).second);
333 std::cout <<
"DTTracoChip::trigger: trigger not belonging to this card! ";
336 << tracoid.
sector() <<
")";
380 std::cout <<
"DTTracoCard::localPosition called with wrong argument!" << std::endl;
397 if(trig->
posIn()==0 ) {
400 else if(trig->
posOut()==0) {
433 std::cout <<
"DTtracoCard::localDirection called with wrong argument!" << std::endl;
444 std::cout <<
"K " << trig->
K() <<
" == psi " << psi <<
" in FE frame " << std::endl;
458 std::cout <<
"Direction in chamber frame is (" << xd <<
"," << yd <<
"," << zd <<
")" << std::endl;
469 std::cout <<
"DTTracoCard::config_traco : TRACO (" << tracoid.
wheel()
470 <<
"," << tracoid.
sector()
472 <<
"," << tracoid.
traco()
473 <<
") not found, return 0" << std::endl;
const DTConfigLUTs * getDTConfigLUTs(DTChamberId) const
Get desired LUT configuration.
void clearCache()
Clear all traco stuff (cache & map)
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.
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.
int sector() const
Returns sector number.
int station() const
Return station number.
std::map< std::string, int, std::less< std::string > > psi
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.
~DTTracoCard()
Destructor.
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.
LocalPoint localPosition(const DTTrigData *) const
NEWGEO Local position in chamber of a trigger-data object.
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.
LocalVector localDirection(const DTTrigData *) const
NEWGEO Local direction in chamber of a trigger-data object.
int size() const
Get cache vector's size.
int nTrig(int step) const
Return the number of trigger candidates.