102 for (
int i = 0;
i < 3;
i++) {
110 std::vector<DTDigi*>::const_iterator
p;
247 for (detUnitIt = dtDigis.begin(); detUnitIt != dtDigis.end(); ++detUnitIt) {
248 const DTLayerId&
id = (*detUnitIt).first;
253 std::cout <<
"--------------" << std::endl;
259 int tube = (*digiIt).wire();
264 std::cout <<
" digi time : " << (*digiIt).time();
266 std::cout <<
" drift time after subtraction : " << tdrift << std::endl;
269 if (tdrift < 500 && tdrift > -500) {
278 int layn =
id.layer();
293 std::cout <<
" now nbti is " << nch << std::endl;
346 std::cout <<
", " << nbtisig <<
" BTIs with signal" << std::endl;
351 std::cout <<
"====================================================" << std::endl;
352 std::cout <<
" BTI triggers " << std::endl;
356 for (
int sl = 1; sl <= 3; sl++) {
375 std::cout <<
"====================================================" << std::endl;
382 if (n < 1 || n >
geom()->nCell(sl)) {
384 std::cout <<
"DTBtiCard::activeGetBTI :";
387 std::cout <<
" dummy BTI returned!" << std::endl;
401 if (_debug_bti == 3) {
402 std::cout <<
"DTBtiCard::activeGetBTI :";
403 std::cout <<
" bti number: " << n << std::endl;
406 if (sl < 1 || sl > 3) {
407 if (_debug_bti > 1) {
408 std::cout <<
"DTBtiCard::activeGetBTI :";
409 std::cout <<
" invalid superlayer number: " << sl;
410 std::cout <<
" dummy BTI returned!" << std::endl;
419 bti = (*pbti).second;
428 if (sl < 1 || sl > 3 || n == 999) {
430 std::cout <<
" invalid superlayer number: " << sl;
431 std::cout <<
" 0 returned!" << std::endl;
438 return (*pbti).second;
442 std::vector<DTBtiChip*> blist;
447 if (sl < 1 || sl > 3) {
449 std::cout <<
" invalid superlayer number: " << sl;
450 std::cout <<
" empty list returned" << std::endl;
455 blist.push_back((*p).second);
464 std::cout <<
"DTBtiCard::trigger: trigger not belonging to this card! ";
470 auto trig = std::make_unique<DTBtiTrig>(bti, td);
471 auto pTrig = trig.get();
523 std::cout <<
"DTBtiCard::localPosition called with wrong argument!" << std::endl;
541 if (trig->
btiSL() == 2)
553 std::cout <<
"DTBtiCard::localPosition of BTI in (" << x <<
"," << y <<
"," << z <<
")" << std::endl;
556 std::cout <<
"in Local Point (" << x + xt <<
"," << y + yt <<
"," << z <<
")" << std::endl;
567 std::cout <<
"DTBtiCard::localDirection called with wrong argument!" << std::endl;
581 float zd = -
cos(psi);
582 if (trig->
btiSL() == 2)
599 std::cout <<
"DTBtiCard::localDirection of BTI in (" << xb <<
"," << yb <<
"," << zb <<
")" << std::endl;
602 std::cout <<
"in Local Direction (" << xd <<
"," << yd <<
"," << zd <<
")" << std::endl;
639 ConfBtiMap::const_iterator biter =
_conf_bti_map.find(btiid);
642 <<
"," << btiid.
superlayer() <<
"," << btiid.
bti() <<
") not found, return 0" << std::endl;
DTConfigBti * config_bti(DTBtiId &btiid) const
Return bti chip configuration.
std::vector< DTDigi * > _digis
int debug() const
Debug flag.
DTTrigGeom * geom() const
Associated geometry.
Local3DVector LocalVector
int mapTubeInFEch(int nsl, int nlay, int ntube) const
Staggering of first wire of layer respect to default: obsolete 19/6/06.
Point3DBase< Scalar, LocalTag > LocalPoint
int sector() const
Return sector number.
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
uint16_t *__restrict__ id
std::vector< DTBtiChip * > btiList(int)
Returns the active BTI list in a given superlayer.
DTBtiTrig * storeTrigger(DTBtiTrigData)
Sin< T >::type sin(const T &t)
DTBtiCard(DTTrigGeom *)
Constructor.
DTBtiId parentId() const
Return parent BTI identifier.
void clearCache()
Clear all BTI stuff (map & cache)
float ST() const
Max drift time in 12.5 ns steps.
DTBtiChip * activeGetBTI(int sl, int n)
Returns the required DTBtiChip. Create it if it doesn't exist.
std::map< std::string, int, std::less< std::string > > psi
int station() const
Return station number.
const DTConfigPedestals * _pedestals
~DTBtiCard() override
Destructor.
const uint16_t range(const Frame &aFrame)
void setConfig(const DTConfigManager *conf)
Set configuration.
bool debug() const
Return TU debug flag.
int X() const
Return trigger X parameter.
void run()
Run DTBtiChip algorithm.
int wheel() const
Returns wheel number.
int superlayer() const
Returns the superlayer.
DTBtiTrigData triggerData(int step, unsigned n) const
Return the data part of the requested trigger.
int sector() const
Returns sector number.
int wheel() const
Return wheel number.
float cellH() const
Height of a cell (cm)
DTBtiChip * getBTI(int sl, int n) const
Returns the required BTI. Return 0 if it doesn't exist.
int station() const
Returns station number.
Cos< T >::type cos(const T &t)
float getOffset(const DTWireId &wire) const
Get wire by wire delay.
const std::map< DTBtiId, DTConfigBti > & getDTConfigBtiMap(DTChamberId) const
Get desired BTI configuration map for a given DTChamber.
BTIContainer::const_iterator BTI_const_iter
int nTrig(int step) const
Number of triggers found.
DTChamberId ChamberId() const
Identifier of the associated chamber.
static const int NSTEPL
Constants: first and last step to start trigger finding.
bool getDTTPGDebug() const
Get global debug flag.
int superlayer() const
Return the superlayer number (deprecated method name)
int number() const
Return DTBtiChip number.
int bti() const
Returns the bti.
BTIContainer::iterator BTI_iter
DTChamberId statId() const
Identifier of the associated chamber.
int btiSL() const
Return parent BTI superlayer.
std::pair< const_iterator, const_iterator > Range
std::vector< DigiType >::const_iterator const_iterator
LocalPoint localPosition(const DTTrigData *) const override
NEWGEO Local position in chamber of a trigger-data object.
const_iterator begin() const
Get first cache element.
int K() const
Return trigger K parameter.
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
LocalVector localDirection(const DTTrigData *) const override
NEWGEO Local direction in chamber of a trigger-data object.
void print() const override
Print.
void loadBTI(const DTDigiCollection dtDigis)
store digi's in DTBtiChip's
void add_digi(int cell, const DTDigi *digi)
Add a digi to the DTBtiChip.
void addTrig(int step, std::unique_ptr< DTBtiTrig > btitrig)
bool useAcceptParam() const
Use Bti acceptance parameters (LL,LH,CL,CH,RL,RH)
void runBTI()
run DTBtiChip algorithm
const_iterator end() const
Get last cache element.
void clearCache()
Clear cache vector.
const DTConfigPedestals * getDTConfigPedestals() const
Get desired Pedestals configuration.
void localClear()
clear the BTI maps
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)
int size() const
Get cache vector's size.
int step() const
Return trigger step.