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;
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;
DTBtiTrigData triggerData(int step, unsigned n) const
Return the data part of the requested trigger.
int station() const
Return station number.
LocalPoint localPosition(const DTBtiId) const
Local position in chamber of a BTI.
std::vector< DTDigi * > _digis
Local3DVector LocalVector
bool getDTTPGDebug() const
Get global debug flag.
Point3DBase< Scalar, LocalTag > LocalPoint
int sector() const
Returns sector number.
float cellPitch() const
Width of a cell (cm) i.e. distance between ywo wires.
std::vector< DTBtiChip * > btiList(int)
Returns the active BTI list in a given superlayer.
DTBtiTrig * storeTrigger(DTBtiTrigData)
const std::map< DTBtiId, DTConfigBti > & getDTConfigBtiMap(DTChamberId) const
Get desired BTI configuration map for a given DTChamber.
Sin< T >::type sin(const T &t)
DTBtiCard(DTTrigGeom *)
Constructor.
void clearCache()
Clear all BTI stuff (map & cache)
DTBtiChip * activeGetBTI(int sl, int n)
Returns the required DTBtiChip. Create it if it doesn't exist.
int bti() const
Returns the bti.
std::map< std::string, int, std::less< std::string > > psi
const DTConfigPedestals * _pedestals
~DTBtiCard() override
Destructor.
void setConfig(const DTConfigManager *conf)
Set configuration.
void run()
Run DTBtiChip algorithm.
DTBtiChip * getBTI(int sl, int n) const
Returns the required BTI. Return 0 if it doesn't exist.
int size() const
Get cache vector's size.
int wheel() const
Returns wheel number.
DTTrigGeom * geom() const
Associated geometry.
int number() const
Return DTBtiChip number.
int wheel() const
Return wheel number.
int sector() const
Return sector number.
Cos< T >::type cos(const T &t)
BTIContainer::const_iterator BTI_const_iter
DTChamberId statId() const
Identifier of the associated chamber.
int superlayer() const
Returns the superlayer.
const_iterator end() const
Get last cache element.
static const int NSTEPL
Constants: first and last step to start trigger finding.
bool useAcceptParam() const
Use Bti acceptance parameters (LL,LH,CL,CH,RL,RH)
DTConfigBti * config_bti(DTBtiId &btiid) const
Return bti chip configuration.
float cellH() const
Height of a cell (cm)
int superlayer() const
Return the superlayer number (deprecated method name)
BTIContainer::iterator BTI_iter
float getOffset(const DTWireId &wire) const
Get wire by wire delay.
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.
int debug() const
Debug flag.
int mapTubeInFEch(int nsl, int nlay, int ntube) const
Staggering of first wire of layer respect to default: obsolete 19/6/06.
const DTConfigPedestals * getDTConfigPedestals() const
Get desired Pedestals configuration.
DTChamberId ChamberId() const
Identifier of the associated chamber.
LocalVector localDirection(const DTTrigData *) const override
NEWGEO Local direction in chamber of a trigger-data object.
float ST() const
Max drift time in 12.5 ns steps.
void loadBTI(const DTDigiCollection dtDigis)
store digi's in DTBtiChip's
int nTrig(int step) const
Number of triggers found.
DTBtiId parentId() const
Return parent BTI identifier.
void add_digi(int cell, const DTDigi *digi)
Add a digi to the DTBtiChip.
int station() const
Returns station number.
bool debug() const
Return TU debug flag.
void runBTI()
run DTBtiChip algorithm
void clearCache()
Clear cache vector.
const_iterator begin() const
Get first cache element.
void localClear()
clear the BTI maps
int step() const
Return trigger step.
int nCell(int sl) const
Number of BTIs in a required superlayer (i.e. nCells in lay 1)