|
ATLAS Offline Software
|
Fits straight cosmic muon track to TileCal event.
More...
#include <TileMuonFitter.h>
|
| TileMuonFitter (const std::string &name, ISvcLocator *pSvcLocator) |
| Constructor. More...
|
|
virtual | ~TileMuonFitter () |
|
virtual StatusCode | initialize () |
|
virtual StatusCode | execute () |
|
virtual StatusCode | finalize () |
|
void | buildCells () |
| Creates an internal cell container (just vectors) from the input CaloCellContainer. More...
|
|
void | setEventDefaults () |
| Reset variables. More...
|
|
bool | eventSelection () |
| Checks if there are good cells on the top and bottom modules. More...
|
|
int | fitTrack () |
| Fits a straight track to the cell centers, using the auxiliary class TileMuonTrackDistance. More...
|
|
int | houghTrack () |
| Fits a straight track to the cells centers, using a Hough Transform algorithm. More...
|
|
void | calculateTime () |
| Calculates time in reference plane. More...
|
|
void | calculateTimeAtYequal0 () |
| Extrapolates cell time to y=0. More...
|
|
void | calculateTimeAtZequal0 () |
| Extrapolates cell time to z=0. More...
|
|
void | buildTileCosmicMuon (int fitok) |
| Selects between the two next methods. More...
|
|
void | buildTileCosmicMuonAtYequal0 (int fitok) |
| Creates output TileCosmicMuon object in StoreGate. More...
|
|
void | buildTileCosmicMuonAtZequal0 (int fitok) |
| Creates output TileCosmicMuon object in StoreGate. More...
|
|
void | buildComTime (int fitok) |
| Selects between the two next methods. More...
|
|
void | buildComTimeAtYequal0 (int fitok) |
| Creates output ComTime object in StoreGate. More...
|
|
void | buildComTimeAtZequal0 (int fitok) |
| Creates output ComTime object in StoreGate. More...
|
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
|
void | trackIntersection (std::vector< double > <op, std::vector< double > &lbot, int index) |
| Calculates length of track intersection with TileCal (by sampling). More...
|
|
void | trackSegmentIntersection (std::vector< double > &segPath, std::vector< int > &segPartition, std::vector< int > &segModule, std::vector< int > &segSampling, int index) |
| Calculates length of track intersection with TileCal (by sampling and module). More...
|
|
void | energyInTrack (std::vector< double > &etop, std::vector< double > &ebot, std::vector< IdentifierHash > &cells, int index) |
| Sums up energy in TileCal cells close to the track (by sampling). More...
|
|
bool | checkLBz (double x1) |
| Checks if x1 is within LB z coordinate bounds. More...
|
|
bool | checkEBz (double x1) |
| Checks if x1 is within EB z coordinate bounds. More...
|
|
bool | checkEBAz (double x1) |
| Checks if x1 is within EBA z coordinate bounds. More...
|
|
bool | checkEBCz (double x1) |
| Checks if x1 is within EBC z coordinate bounds. More...
|
|
bool | checkLBr (double x1, uint8_t s1) |
| Checks if x1 is within LB r coordinate bounds for sampling s1. More...
|
|
bool | checkEBr (double x1, uint8_t s1) |
| Checks if x1 is within EB r coordinate bounds for sampling s1. More...
|
|
bool | checkLBr (double x1) |
| Checks if x1 is within LB r coordinate bounds for any sampling. More...
|
|
bool | checkEBr (double x1) |
| Checks if x1 is within EB r coordinate bounds for any sampling. More...
|
|
int | whichEBr (double x1) |
| Returns sampling index if x1 is within EB r coordinate bounds. More...
|
|
int | whichLBr (double x1) |
| Returns sampling index if x1 is within LB r coordinate bounds. More...
|
|
int | whichModule (CLHEP::Hep3Vector tempvec) |
| Returns module index for TVector3 input. More...
|
|
void | cart2hough (float x1, float y1, float x2, float y2, double &raio, double &angu) |
|
void | hough2cart (double r, double a, double offset, double &aa, double &bb) |
|
float | dist2line (CellInfo &ci, float *pos, float *w) |
|
void | points2dir (CellInfo &ci1, CellInfo &ci2, float *w) |
|
unsigned int | CntCells (unsigned int index1, unsigned int index2, double &skew) |
|
bool | guessTrack (unsigned int &index1, unsigned int &index2) |
|
unsigned int | buildCellInfoVector () |
|
float | selectCells (float *p, float *w) |
|
bool | isHaloMuon (double azy) |
|
void | doHough (double &rxy, double &axy, double &rzy, double &azy) |
|
void | addTrack (double aa, double bb, double cc, double dd) |
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKey> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &) |
| specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &) |
| specialization for handling Gaudi::Property<SG::VarHandleBase> More...
|
|
Gaudi::Details::PropertyBase & | declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &) |
| specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
|
|
Fits straight cosmic muon track to TileCal event.
This class implements a cosmic muon track reconstruction from TileCal information only. The algorithm is described in the ATL-TILECAL-INT-2007-003 note. It uses CaloCells as input, fits a straight line to the cells, weighted with energy or energy density and outputs single track parameters. Cell timing is also used to provide the time at which the muon crossed the horizontal (y=0) plane.
Definition at line 88 of file TileMuonFitter.h.
◆ StoreGateSvc_t
◆ TileMuonFitter()
TileMuonFitter::TileMuonFitter |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~TileMuonFitter()
TileMuonFitter::~TileMuonFitter |
( |
| ) |
|
|
virtual |
◆ addTrack()
void TileMuonFitter::addTrack |
( |
double |
aa, |
|
|
double |
bb, |
|
|
double |
cc, |
|
|
double |
dd |
|
) |
| |
|
private |
◆ buildCellInfoVector()
unsigned int TileMuonFitter::buildCellInfoVector |
( |
| ) |
|
|
private |
Definition at line 1698 of file TileMuonFitter.cxx.
1699 const float distance_cut[2][3] = { { 300.0, 820.0, 470.0 }, { 350.0, 540.0, 740.0 } };
1716 cell.track_index = -1;
1720 if (section < 1 || section > 2 || sample < 0 || sample >= 3)
◆ buildCells()
void TileMuonFitter::buildCells |
( |
| ) |
|
Creates an internal cell container (just vectors) from the input CaloCellContainer.
Throws away cells below threshold or flagged from jobOptions.
Definition at line 319 of file TileMuonFitter.cxx.
327 for (; collItr != lastColl; ++collItr) {
332 if (tilecell == 0)
continue;
338 double ener =
cell->energy();
340 double deltatime = tilecell->
timeDiff();
343 if (fabs(caloDDE->
eta()) < 0.05 && caloDDE->
r() > 3500) {
345 <<
" Cell r: " << caloDDE->
r()
346 <<
" Tile diff: " << tilecell->
timeDiff() );
352 double volume = caloDDE->
volume();
◆ buildComTime()
void TileMuonFitter::buildComTime |
( |
int |
fitok | ) |
|
◆ buildComTimeAtYequal0()
void TileMuonFitter::buildComTimeAtYequal0 |
( |
int |
fitok | ) |
|
Creates output ComTime object in StoreGate.
Definition at line 1447 of file TileMuonFitter.cxx.
1476 <<
p0 <<
" " <<
p1 <<
" " <<
p2 <<
" " <<
p3 );
1480 if (!(fitok == 1) ||
p1 == 0.0) {
1481 sc = theComTime.record(std::make_unique<ComTime>());
1483 Hep3Vector theZeroCrossingPosition(-1.0 *
p0 /
p1, 0.0,
p2 - 1.0 *
p3 *
p0 /
p1);
1484 Hep3Vector theDirection(1.0,
p1,
p3);
1485 theDirection = theDirection.unit();
1488 sc = theComTime.record(std::make_unique<ComTime>(0.0, ztime, theZeroCrossingPosition, theDirection));
1493 <<
" Position X: " << theZeroCrossingPosition.getX()
1494 <<
" Position Y: " << theZeroCrossingPosition.getY()
1495 <<
" Position Z: " << theZeroCrossingPosition.getZ() <<
endmsg;
1498 <<
" Direction v: " << theDirection.getY()
1499 <<
" Direction w: " << theDirection.getZ() <<
endmsg;
1503 if (
sc.isFailure()) {
◆ buildComTimeAtZequal0()
void TileMuonFitter::buildComTimeAtZequal0 |
( |
int |
fitok | ) |
|
Creates output ComTime object in StoreGate.
Definition at line 1512 of file TileMuonFitter.cxx.
1540 <<
p0 <<
" " <<
p1 <<
" " <<
p2 <<
" " <<
p3 );
1544 if (!(fitok == 1) ||
p3 == 0.0) {
1545 sc = theComTime.record(std::make_unique<ComTime>());
1547 Hep3Vector theZeroCrossingPosition(-1.0 *
p2 /
p3,
p0 - 1.0 *
p1 *
p2 /
p3, 0.0);
1548 Hep3Vector theDirection(1.0,
p1,
p3);
1549 theDirection = theDirection.unit();
1552 sc = theComTime.record(std::make_unique<ComTime>(0.0, ztime, theZeroCrossingPosition, theDirection));
1557 <<
" Position X: " << theZeroCrossingPosition.getX()
1558 <<
" Position Y: " << theZeroCrossingPosition.getY()
1559 <<
" Position Z: " << theZeroCrossingPosition.getZ() <<
endmsg;
1562 <<
" Direction v: " << theDirection.getY()
1563 <<
" Direction w: " << theDirection.getZ() <<
endmsg;
1567 if (
sc.isFailure()) {
◆ buildTileCosmicMuon()
void TileMuonFitter::buildTileCosmicMuon |
( |
int |
fitok | ) |
|
◆ buildTileCosmicMuonAtYequal0()
void TileMuonFitter::buildTileCosmicMuonAtYequal0 |
( |
int |
fitok | ) |
|
Creates output TileCosmicMuon object in StoreGate.
Definition at line 681 of file TileMuonFitter.cxx.
692 StatusCode sc = cosmicMuonContainer.record(std::make_unique<TileCosmicMuonContainer>());
693 if (
sc.isFailure()) {
694 ATH_MSG_FATAL(
"Cannot record TileCosmicMuonContainer" << cosmicMuonContainer.key() );
703 ATH_MSG_DEBUG(
"Starting BuildTileCosmicMuon at y=0 m_linePar: "
704 <<
p0 <<
" " <<
p1 <<
" " <<
p2 <<
" " <<
p3 );
708 if (!(fitok == 1) ||
p1 == 0.0) {
709 cosmicMuonContainer->push_back(theTileCosmicMuon);
711 Hep3Vector theDirection(1.0,
p1,
p3);
712 theDirection = theDirection.unit();
715 std::vector<double> ltop, lbot, etop, ebot;
716 std::vector<IdentifierHash>
cells;
717 std::vector<double> segPath;
718 std::vector<int> segPartition, segModule, segSampling;
743 cosmicMuonContainer->push_back(theTileCosmicMuon);
◆ buildTileCosmicMuonAtZequal0()
void TileMuonFitter::buildTileCosmicMuonAtZequal0 |
( |
int |
fitok | ) |
|
Creates output TileCosmicMuon object in StoreGate.
Definition at line 754 of file TileMuonFitter.cxx.
765 StatusCode sc = cosmicMuonContainer.record(std::make_unique<TileCosmicMuonContainer>());
766 if (
sc.isFailure()) {
767 ATH_MSG_FATAL(
"Cannot record TileCosmicMuonContainer" << cosmicMuonContainer.key() );
776 ATH_MSG_DEBUG(
"Starting BuildTileCosmicMuon at z=0 m_linePar: "
777 <<
p0 <<
" " <<
p1 <<
" " <<
p2 <<
" " <<
p3 );
781 if (!(fitok == 1) ||
p3 == 0.0) {
782 cosmicMuonContainer->push_back(theTileCosmicMuon);
784 Hep3Vector theDirection(1.0,
p1,
p3);
785 theDirection = theDirection.unit();
788 std::vector<double> ltop, lbot, etop, ebot;
789 std::vector<IdentifierHash>
cells;
790 std::vector<double> segPath;
791 std::vector<int> segPartition, segModule, segSampling;
816 cosmicMuonContainer->push_back(theTileCosmicMuon);
◆ calculateTime()
void TileMuonFitter::calculateTime |
( |
| ) |
|
◆ calculateTimeAtYequal0()
void TileMuonFitter::calculateTimeAtYequal0 |
( |
| ) |
|
Extrapolates cell time to y=0.
Definition at line 542 of file TileMuonFitter.cxx.
558 <<
p0 <<
" " <<
p1 <<
" " <<
p2 <<
" " <<
p3 );
565 Hep3Vector theZeroCrossingPosition(-1.0 *
p0 /
p1, 0.0,
p2 - 1.0 *
p3 *
p0 /
p1);
◆ calculateTimeAtZequal0()
void TileMuonFitter::calculateTimeAtZequal0 |
( |
| ) |
|
Extrapolates cell time to z=0.
Definition at line 605 of file TileMuonFitter.cxx.
621 <<
p0 <<
" " <<
p1 <<
" " <<
p2 <<
" " <<
p3 );
628 Hep3Vector theZeroCrossingPosition(-1.0 *
p2 /
p3,
p0 - 1.0 *
p1 *
p2 /
p3, 0.0);
◆ cart2hough()
void TileMuonFitter::cart2hough |
( |
float |
x1, |
|
|
float |
y1, |
|
|
float |
x2, |
|
|
float |
y2, |
|
|
double & |
raio, |
|
|
double & |
angu |
|
) |
| |
|
private |
Definition at line 1577 of file TileMuonFitter.cxx.
1581 if (
x1 ==
x2)
x1 += 0.001F;
1582 if (
y1 ==
y2)
y1 += 0.001F;
1587 raio = fabs(
b) / sqrt(
a *
a + 1.0);
1589 if (a < 0.0 && b > 0.0)
1591 else if (
a > 0.0 &&
b < 0.0)
1593 else if (
a < 0.0 &&
b < 0.0)
1599 if (angu < 0.0) angu = 2.0 *
pi + angu;
◆ checkEBAz()
bool TileMuonFitter::checkEBAz |
( |
double |
x1 | ) |
|
|
private |
◆ checkEBCz()
bool TileMuonFitter::checkEBCz |
( |
double |
x1 | ) |
|
|
private |
◆ checkEBr() [1/2]
bool TileMuonFitter::checkEBr |
( |
double |
x1 | ) |
|
|
private |
Checks if x1 is within EB r coordinate bounds for any sampling.
Definition at line 1317 of file TileMuonFitter.cxx.
1318 if (
x1 < 0.0)
x1 = -1.0 *
x1;
◆ checkEBr() [2/2]
bool TileMuonFitter::checkEBr |
( |
double |
x1, |
|
|
uint8_t |
s1 |
|
) |
| |
|
private |
Checks if x1 is within EB r coordinate bounds for sampling s1.
Definition at line 1338 of file TileMuonFitter.cxx.
1339 if (
s1 > 3U)
return false;
1340 if (
x1 < 0.0)
x1 = -1.0 *
x1;
◆ checkEBz()
bool TileMuonFitter::checkEBz |
( |
double |
x1 | ) |
|
|
private |
◆ checkLBr() [1/2]
bool TileMuonFitter::checkLBr |
( |
double |
x1 | ) |
|
|
private |
Checks if x1 is within LB r coordinate bounds for any sampling.
Definition at line 1307 of file TileMuonFitter.cxx.
1308 if (
x1 < 0)
x1 = -1.0 *
x1;
◆ checkLBr() [2/2]
bool TileMuonFitter::checkLBr |
( |
double |
x1, |
|
|
uint8_t |
s1 |
|
) |
| |
|
private |
Checks if x1 is within LB r coordinate bounds for sampling s1.
Definition at line 1327 of file TileMuonFitter.cxx.
1328 if (
s1 > 3U)
return false;
1329 if (
x1 < 0.0)
x1 = -1.0 *
x1;
◆ checkLBz()
bool TileMuonFitter::checkLBz |
( |
double |
x1 | ) |
|
|
private |
◆ CntCells()
unsigned int TileMuonFitter::CntCells |
( |
unsigned int |
index1, |
|
|
unsigned int |
index2, |
|
|
double & |
skew |
|
) |
| |
|
private |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ dist2line()
float TileMuonFitter::dist2line |
( |
CellInfo & |
ci, |
|
|
float * |
pos, |
|
|
float * |
w |
|
) |
| |
|
private |
◆ doHough()
void TileMuonFitter::doHough |
( |
double & |
rxy, |
|
|
double & |
axy, |
|
|
double & |
rzy, |
|
|
double & |
azy |
|
) |
| |
|
private |
Definition at line 1759 of file TileMuonFitter.cxx.
1782 for (
i = 1;
i < NPoints;
i++) {
1783 for (j = 0; j <
i; j++) {
1787 if (rxy < nminrxy || rxy > nmaxrxy || axy < nminaxy || axy > nmaxaxy || rzy < nminrzy
1788 || rzy > nmaxrzy || azy < nminazy || azy > nmaxazy)
continue;
1800 const double inv_aw = 1. / aw;
1801 rxy = arxy * inv_aw;
1802 axy = aaxy * inv_aw;
1803 rzy = arzy * inv_aw;
1804 azy = aazy * inv_aw;
◆ energyInTrack()
void TileMuonFitter::energyInTrack |
( |
std::vector< double > & |
etop, |
|
|
std::vector< double > & |
ebot, |
|
|
std::vector< IdentifierHash > & |
cells, |
|
|
int |
index |
|
) |
| |
|
private |
Sums up energy in TileCal cells close to the track (by sampling).
Definition at line 1382 of file TileMuonFitter.cxx.
1386 double distance_cut[2][3] = { { 300., 375., 860. }, { 750., 750., 1700. } };
1389 for (is = 0; is < 3; is++) {
1399 for (; collItr != lastColl; ++collItr) {
1403 if (tilecell == 0)
continue;
1409 double volume = caloDDE->
volume();
1410 if (volume == 0.0) {
1411 ATH_MSG_DEBUG(
"Warning: Skipping cell with zero volume!" );
1417 if (section < 1 || section > 2 || sample < 0 || sample >= 3)
break;
1418 dataP.set(caloDDE->
x(), caloDDE->
y(), caloDDE->
z());
1422 cells.push_back(cell_idhash);
1423 if (caloDDE->
y() > 0.0) etop[
sample] +=
cell->energy();
◆ eventSelection()
bool TileMuonFitter::eventSelection |
( |
| ) |
|
Checks if there are good cells on the top and bottom modules.
If not, skips event.
Definition at line 378 of file TileMuonFitter.cxx.
386 double maxReg1Energy;
387 double maxReg2Energy;
392 maxReg1Energy = maxReg2Energy = 0.;
393 maxReg1Index = maxReg2Index = -1;
398 }
else if (!
m_beamType.compare(
"collisions")) {
404 if (cellPosition > 0) {
418 if (maxReg1Index >= 0 && maxReg2Index >= 0) {
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode TileMuonFitter::execute |
( |
| ) |
|
|
virtual |
Definition at line 253 of file TileMuonFitter.cxx.
261 if (!cellContainer.isValid()) {
290 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
Add StoreName to extra input/output deps as needed.
use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode TileMuonFitter::finalize |
( |
| ) |
|
|
virtual |
◆ fitTrack()
int TileMuonFitter::fitTrack |
( |
| ) |
|
Fits a straight track to the cell centers, using the auxiliary class TileMuonTrackDistance.
Definition at line 435 of file TileMuonFitter.cxx.
439 std::vector<double>
X;
440 std::vector<double>
Y;
441 std::vector<double>
Z;
470 double erraa, errbb, errcc, errdd;
471 aa = bb =
cc =
dd = erraa = errbb = errcc = errdd = 0.0;
482 MnUserParameters upar;
483 upar.Add(
"bb", bb, 0.1);
484 upar.Add(
"dd",
dd, 0.1);
487 FunctionMinimum
min = migrad();
489 bool myIsValid =
min.IsValid();
494 bb =
min.UserState().Value(
"bb");
495 dd =
min.UserState().Value(
"dd");
498 errbb =
min.UserState().Error(
"bb");
499 errdd =
min.UserState().Error(
"dd");
517 <<
" dd " << errdd <<
endmsg;
◆ guessTrack()
bool TileMuonFitter::guessTrack |
( |
unsigned int & |
index1, |
|
|
unsigned int & |
index2 |
|
) |
| |
|
private |
Definition at line 1673 of file TileMuonFitter.cxx.
1677 double skew, skew_min = 999999999.9;
1678 unsigned int cnt, cnt_max = 0U;
1680 for (
i = 1;
i < NPoints;
i++) {
1681 for (j = 0; j <
i; j++) {
1684 if (
cnt > cnt_max || (
cnt == cnt_max && skew < skew_min)) {
◆ hough2cart()
void TileMuonFitter::hough2cart |
( |
double |
r, |
|
|
double |
a, |
|
|
double |
offset, |
|
|
double & |
aa, |
|
|
double & |
bb |
|
) |
| |
|
private |
◆ houghTrack()
int TileMuonFitter::houghTrack |
( |
| ) |
|
Fits a straight track to the cells centers, using a Hough Transform algorithm.
Definition at line 1807 of file TileMuonFitter.cxx.
1812 bool compute =
true;
1837 double rxy, axy, rzy, azy;
1856 <<
" cc: " << (
aa -
cc) /
dd
1857 <<
" dd " << bb /
dd );
1864 std::vector<double>
X;
1865 std::vector<double>
Y;
1866 std::vector<double>
Z;
◆ initialize()
StatusCode TileMuonFitter::initialize |
( |
| ) |
|
|
virtual |
Definition at line 131 of file TileMuonFitter.cxx.
161 ATH_MSG_INFO(
"Weighting cell position and time with energy density." );
164 ATH_MSG_INFO(
"Weighting cell position and time with energy." );
167 ATH_MSG_INFO(
"Not weighting cell position and time." );
176 <<
" from jobproperties not recognized. Setting to cosmics for TMF only." );
193 if (tileDD->
n_samp() != 3)
break;
195 hack = (tileDD->
dr(0) > 300);
197 for (
int is = 0; is < 3; is++)
200 }
else if (tileDD->
n_eta(0) == 10 && tileDD->
sign_eta() == -1) {
202 }
else if (tileDD->
n_eta(0) == 5 && tileDD->
sign_eta() == 1) {
205 for (
int is = 0; is < 3; is++)
208 }
else if (tileDD->
n_eta(0) == 5 && tileDD->
sign_eta() == -1) {
219 ATH_MSG_INFO(
"Old geometry detected: moving inner/outer radius by +10/-40 mm " );
226 ATH_MSG_INFO(
"Geometry read from TileDetDescr for track length calculation:" );
227 for (
int is = 0; is < 4; is++)
235 ATH_MSG_INFO(
"TileMuonFitter initialization completed" );
237 return StatusCode::SUCCESS;
◆ inputHandles()
Return this algorithm's input handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ isHaloMuon()
bool TileMuonFitter::isHaloMuon |
( |
double |
azy | ) |
|
|
private |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
Return this algorithm's output handles.
We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.
◆ points2dir()
Definition at line 1631 of file TileMuonFitter.cxx.
1632 w[0] = ci1.
x - ci2.
x;
1633 w[1] = ci1.
y - ci2.
y;
1634 w[2] = ci1.
z - ci2.
z;
1636 float invmod = 1.0F / sqrt(
w[0] *
w[0] +
w[1] *
w[1] +
w[2] *
w[2]);
◆ renounce()
◆ renounceArray()
◆ selectCells()
float TileMuonFitter::selectCells |
( |
float * |
p, |
|
|
float * |
w |
|
) |
| |
|
private |
◆ setEventDefaults()
void TileMuonFitter::setEventDefaults |
( |
| ) |
|
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ trackIntersection()
void TileMuonFitter::trackIntersection |
( |
std::vector< double > & |
ltop, |
|
|
std::vector< double > & |
lbot, |
|
|
int |
index |
|
) |
| |
|
private |
Calculates length of track intersection with TileCal (by sampling).
check intersection with cylinder
Make the list of valid LB intersection points
Now let's make the list of valid EB intersection points
check intersection with vertical planes
We need to check if we need to add the horizontal point. The criterion is: is the horizontal plane crossing point within TileCal or not?
check intersection with horizontal plane
Order points according to the y coordinate, and create two different vectors, one for bottom, one for top
Now create ordered vector, adding in the horizontal plane point if needed. This must go at the top of the bottom list and at the bottom of the top list, since they are ordered according to y.
Now let's turn points into segment lengths. We take two successive points from the top or bottom stack. The segment is simply the difference between them. The region indices are checked with the midpoint. We discard this segment if its midpoint is in the LB/EB gap.
Definition at line 827 of file TileMuonFitter.cxx.
837 std::vector<Hep3Vector> intPoint;
838 std::vector<Hep3Vector> topIPO;
839 std::vector<Hep3Vector> bottomIPO;
840 std::vector<Hep3Vector> temp3v;
841 std::vector<Hep3Vector> plane;
842 Hep3Vector horizontalPlane;
848 for (is = 0; is < 3; is++) {
853 for (is = 0; is < 4; is++) {
857 if (aux_squared > 0) {
858 double x[2] = { (-1.0 *
p0 *
p1 + sqrt(aux_squared)) / (1 +
p1 *
p1), (-1.0 *
p0 *
p1
859 - sqrt(aux_squared)) / (1 +
p1 *
p1) };
862 if (
checkLBz(temp3v[
i].
z())) intPoint.push_back(temp3v[
i]);
868 if (aux_squared > 0) {
869 double x[2] = { (-1.0 *
p0 *
p1 + sqrt(aux_squared)) / (1 +
p1 *
p1), (-1.0 *
p0 *
p1
870 - sqrt(aux_squared)) / (1 +
p1 *
p1) };
873 if (
checkEBz(temp3v[
i].
z())) intPoint.push_back(temp3v[
i]);
878 uint8_t ncylint = intPoint.size();
881 for (
ip = 0;
ip < 6;
ip++)
882 plane[
ip].
set(0, 0, 0);
884 const double inv_p3 = 1. /
p3;
885 for (
ip = 0;
ip < 2;
ip++) {
895 for (is = 0; is < 3; is++) {
904 <<
" with planes: " << intPoint.size() - ncylint );
909 horizontalPlane.set(0, 0, 0);
913 const double inv_p1 = 1. /
p1;
915 horizontalPlane.set(-1.0 *
p0 * inv_p1, 0,
p2 -
p3 *
p0 * inv_p1);
917 for (
i = 0;
i < 3;
i++)
918 if (
checkLBr(horizontalPlane.x(),
i)) idx_hor =
i;
921 for (
i = 0;
i < 3;
i++)
922 if (
checkEBr(horizontalPlane.x(),
i)) idx_hor =
i;
927 <<
" X: " << horizontalPlane.x()
928 <<
" Z: " << horizontalPlane.z() );
935 std::vector<uint8_t> neworder;
940 for (j = 0; j <
npoints; j++) {
942 for (
k = 0;
k < neworder.size();
k++) {
943 if (j == neworder[
k])
filled =
true;
946 if (intPoint[j].
y() >
ymax) {
947 ymax = intPoint[j].y();
951 if (jmax < 9999) neworder.push_back(jmax);
954 if (neworder.size() !=
npoints)
956 <<
" New order: " << neworder.size() );
962 if (idx_hor < 99) bottomIPO.push_back(horizontalPlane);
965 if (intPoint[neworder[
i]].
y() > 0)
966 topIPO.push_back(intPoint[neworder[
i]]);
968 bottomIPO.push_back(intPoint[neworder[
i]]);
970 if (idx_hor < 99) topIPO.push_back(horizontalPlane);
973 <<
" and on bottom: " << bottomIPO.size() );
975 if (topIPO.size() > 1 && bottomIPO.size()) {
983 Hep3Vector temp_midpoint;
985 for (
i = 0;
i < topIPO.size() - 1;
i++) {
987 <<
" X: " << topIPO[
i].
x()
988 <<
" Y: " << topIPO[
i].
y()
989 <<
" Z: " << topIPO[
i].
z() );
991 temp_midpoint = (topIPO[
i] + topIPO[
i + 1]) / 2.;
995 temp_idx =
whichLBr(temp_midpoint.perp());
996 else if (
checkEBz(temp_midpoint.z()))
997 temp_idx =
whichEBr(temp_midpoint.perp());
1003 if (temp_idx < 0 || temp_idx > 2)
continue;
1004 ltop[temp_idx] += (topIPO[
i] - topIPO[
i + 1]).
mag();
1011 <<
" X: " << topIPO[topIPO.size() - 1].x()
1012 <<
" Y: " << topIPO[topIPO.size() - 1].y()
1013 <<
" Z: " << topIPO[topIPO.size() - 1].z() );
1016 for (
i = 0;
i < bottomIPO.size() - 1;
i++) {
1018 <<
" X: " << bottomIPO[
i].
x()
1019 <<
" Y: " << bottomIPO[
i].
y()
1020 <<
" Z: " << bottomIPO[
i].
z() );
1023 temp_midpoint = (bottomIPO[
i] + bottomIPO[
i + 1]) / 2.;
1027 temp_idx =
whichLBr(temp_midpoint.perp());
1028 else if (
checkEBz(temp_midpoint.z()))
1029 temp_idx =
whichEBr(temp_midpoint.perp());
1035 if (temp_idx < 0 || temp_idx > 2)
continue;
1036 lbot[temp_idx] += (bottomIPO[
i] - bottomIPO[
i + 1]).
mag();
1042 <<
" X: " << bottomIPO[bottomIPO.size() - 1].x()
1043 <<
" Y: " << bottomIPO[bottomIPO.size() - 1].y()
1044 <<
" Z: " << bottomIPO[bottomIPO.size() - 1].z() );
◆ trackSegmentIntersection()
void TileMuonFitter::trackSegmentIntersection |
( |
std::vector< double > & |
segPath, |
|
|
std::vector< int > & |
segPartition, |
|
|
std::vector< int > & |
segModule, |
|
|
std::vector< int > & |
segSampling, |
|
|
int |
index |
|
) |
| |
|
private |
Calculates length of track intersection with TileCal (by sampling and module).
check intersection with cylinder
Make the list of valid LB intersection points
Now let's make the list of valid EB intersection points
check intersection with vertical planes
check intersection with module planes
Order points according to the y coordinate.
Now let's turn points into segment lengths. We take two successive points from the stack. The segment is simply the difference between them. The region indices are checked with the midpoint. We discard this segment if its midpoint is in the LB/EB gap.
Definition at line 1053 of file TileMuonFitter.cxx.
1064 std::vector<Hep3Vector> intPoint;
1065 std::vector<Hep3Vector> ordPoint;
1067 std::vector<Hep3Vector> temp3v;
1068 std::vector<Hep3Vector> plane;
1069 std::vector<Hep3Vector> modPlane;
1073 modPlane.resize(32);
1076 segPartition.clear();
1078 segSampling.clear();
1083 for (is = 0; is < 4; is++) {
1087 if (aux_squared > 0) {
1088 double x[2] = { (-1.0 *
p0 *
p1 + sqrt(aux_squared)) / (1 +
p1 *
p1), (-1.0 *
p0 *
p1
1089 - sqrt(aux_squared)) / (1 +
p1 *
p1) };
1090 for (
i = 0;
i < 2;
i++) {
1092 if (
checkLBz(temp3v[
i].
z())) intPoint.push_back(temp3v[
i]);
1098 if (aux_squared > 0) {
1099 double x[2] = { (-1.0 *
p0 *
p1 + sqrt(aux_squared)) / (1 +
p1 *
p1), (-1.0 *
p0 *
p1
1100 - sqrt(aux_squared)) / (1 +
p1 *
p1) };
1101 for (
i = 0;
i < 2;
i++) {
1103 if (
checkEBz(temp3v[
i].
z())) intPoint.push_back(temp3v[
i]);
1108 uint16_t ncylint = intPoint.size();
1111 for (
ip = 0;
ip < 6;
ip++)
1112 plane[
ip].
set(0, 0, 0);
1114 for (
ip = 0;
ip < 2;
ip++) {
1124 for (is = 0; is < 3; is++) {
1131 uint16_t nvpint = intPoint.size() - ncylint;
1134 double tanTheta, tempX;
1135 for (
ip = 0;
ip < 32;
ip++) {
1136 tanTheta =
tan(
pi / 32. *
double(
ip));
1137 if ((tanTheta -
p1) != 0) {
1138 tempX =
p0 / (tanTheta -
p1);
1139 modPlane[
ip].set(tempX,
p0 +
p1 * tempX,
p2 +
p3 * tempX);
1142 intPoint.push_back(modPlane[
ip]);
1146 intPoint.push_back(modPlane[
ip]);
1150 uint16_t nmpint = intPoint.size() - ncylint - nvpint;
1154 <<
" cylinders: " << ncylint
1155 <<
" vertical planes: " << nvpint
1156 <<
" module planes: " << nmpint );
1161 std::vector<int> neworder;
1166 for (j = 0; j <
npoints; j++) {
1168 for (
k = 0;
k < neworder.size();
k++) {
1169 if (j == neworder[
k])
filled =
true;
1172 if (intPoint[j].
y() >
ymax) {
1173 ymax = intPoint[j].y();
1177 if (jmax < 9999) neworder.push_back(jmax);
1180 if (neworder.size() !=
npoints)
1184 ordPoint.push_back(intPoint[neworder[
i]]);
1194 if (ordPoint.size() > 1) {
1195 Hep3Vector temp_midpoint;
1196 int temp_idr, temp_idp, temp_idm;
1197 bool extra_debug =
false;
1198 for (
i = 0;
i < ordPoint.size();
i++) {
1200 <<
" X: " << ordPoint[
i].
x()
1201 <<
" Y: " << ordPoint[
i].
y()
1202 <<
" Z: " << ordPoint[
i].
z() );
1204 if (
i == ordPoint.size() - 1)
break;
1206 temp_midpoint = (ordPoint[
i] + ordPoint[
i + 1]) / 2.;
1209 temp_idr =
whichLBr(temp_midpoint.perp());
1210 temp_idp = (temp_midpoint.z() > 0) ? 1 : 2;
1211 }
else if (
checkEBz(temp_midpoint.z())) {
1212 temp_idr =
whichEBr(temp_midpoint.perp());
1213 temp_idp = (temp_midpoint.z() > 0) ? 3 : 4;
1218 if (temp_idr < 0 || temp_idr > 2)
continue;
1219 if (temp_idm < 0 || temp_idm > 63)
continue;
1221 segPath.push_back((ordPoint[
i] - ordPoint[
i + 1]).
mag());
1222 segPartition.push_back(temp_idp);
1223 segModule.push_back(temp_idm);
1224 segSampling.push_back(temp_idr);
1230 for (
i = 0;
i < segPath.size();
i++) {
1231 if (segPath[
i] > 1100) extra_debug =
true;
1233 <<
" Path : " << segPath[
i]
1234 <<
" Partition : " << segPartition[
i]
1235 <<
" Module : " << segModule[
i]
1236 <<
" Sampling : " << segSampling[
i] );
1247 <<
" cylinders: " << ncylint
1248 <<
" vertical planes: " << nvpint
1249 <<
" module planes: " << nmpint <<
endmsg;
1251 for (
i = 0;
i < ordPoint.size();
i++) {
1253 <<
" X: " << ordPoint[
i].x()
1254 <<
" Y: " << ordPoint[
i].y()
1255 <<
" Z: " << ordPoint[
i].z() <<
endmsg;
1258 for (
i = 0;
i < segPath.size();
i++) {
1260 <<
" Path : " << segPath[
i]
1261 <<
" Partition : " << segPartition[
i]
1262 <<
" Module : " << segModule[
i]
1263 <<
" Sampling : " << segSampling[
i] <<
endmsg;
◆ updateVHKA()
◆ whichEBr()
int TileMuonFitter::whichEBr |
( |
double |
x1 | ) |
|
|
private |
Returns sampling index if x1 is within EB r coordinate bounds.
Definition at line 1349 of file TileMuonFitter.cxx.
1351 for (
int i = 0;
i < 3;
i++) {
◆ whichLBr()
int TileMuonFitter::whichLBr |
( |
double |
x1 | ) |
|
|
private |
Returns sampling index if x1 is within LB r coordinate bounds.
Definition at line 1359 of file TileMuonFitter.cxx.
1361 for (
int i = 0;
i < 3;
i++) {
◆ whichModule()
int TileMuonFitter::whichModule |
( |
CLHEP::Hep3Vector |
tempvec | ) |
|
|
private |
Returns module index for TVector3 input.
Definition at line 1369 of file TileMuonFitter.cxx.
1370 double phi = tempvec.phi();
◆ m_beamType
std::string TileMuonFitter::m_beamType |
|
protected |
Flag to indicate: cosmics, singlebeam or collisions.
Definition at line 213 of file TileMuonFitter.h.
◆ m_caloCells
◆ m_caloIndex
◆ m_cellContainerKey
Initial value:{this, "CaloCellContainer", "AllCalo",
"Input CaloCellContainer name" }
Definition at line 264 of file TileMuonFitter.h.
◆ m_cellDeltaTime
std::vector<double> TileMuonFitter::m_cellDeltaTime |
|
protected |
Selected cell's time difference between two PMTs.
Definition at line 240 of file TileMuonFitter.h.
◆ m_cellEnergy
std::vector<double> TileMuonFitter::m_cellEnergy |
|
protected |
◆ m_cellHash
◆ m_cellInfo
std::vector<CellInfo> TileMuonFitter::m_cellInfo |
|
private |
◆ m_cellPosition
std::vector<CLHEP::Hep3Vector> TileMuonFitter::m_cellPosition |
|
protected |
◆ m_cellTime
std::vector<double> TileMuonFitter::m_cellTime |
|
protected |
◆ m_cellWeight
std::vector<double> TileMuonFitter::m_cellWeight |
|
protected |
◆ m_comTimeKey
◆ m_cosmicMuonContainerKey
Initial value:{this,
"TileCosmicMuonKey",
"TileCosmicMuonMF",
"Output TileCosmicMuonContainer name"}
Definition at line 267 of file TileMuonFitter.h.
◆ m_deltaTimeCut
double TileMuonFitter::m_deltaTimeCut |
|
protected |
◆ m_detStore
◆ m_doDensity
bool TileMuonFitter::m_doDensity |
|
protected |
Flag defining the energy weighting parameter: energy density or plain energy.
Definition at line 211 of file TileMuonFitter.h.
◆ m_doHoughTransform
bool TileMuonFitter::m_doHoughTransform |
|
protected |
◆ m_doWeighted
bool TileMuonFitter::m_doWeighted |
|
protected |
Flag to weigh or not the chi-square with an energy parameter.
Definition at line 208 of file TileMuonFitter.h.
◆ m_eThreshold
double TileMuonFitter::m_eThreshold |
|
protected |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_fitMinimum
std::vector<double> TileMuonFitter::m_fitMinimum |
|
protected |
◆ m_linePar
std::vector<std::vector<double> > TileMuonFitter::m_linePar |
|
protected |
◆ m_maxBottomIndex
int TileMuonFitter::m_maxBottomIndex |
|
protected |
◆ m_maxTopIndex
int TileMuonFitter::m_maxTopIndex |
|
protected |
◆ m_meanX
double TileMuonFitter::m_meanX |
|
protected |
◆ m_meanY
double TileMuonFitter::m_meanY |
|
protected |
◆ m_meanZ
double TileMuonFitter::m_meanZ |
|
protected |
◆ m_minimumCells
int TileMuonFitter::m_minimumCells |
|
protected |
◆ m_nCells
int TileMuonFitter::m_nCells |
|
protected |
◆ m_reg1to2
bool TileMuonFitter::m_reg1to2 |
|
protected |
◆ m_theTrack
Auxiliary class representing the function to be minimized - weighted sum of squares of orthogonal distances from track to cells)
Definition at line 201 of file TileMuonFitter.h.
◆ m_tileDD_radiusEB
std::vector<double> TileMuonFitter::m_tileDD_radiusEB |
|
protected |
Radial bounds of the 3 samplings in EB, loaded from Detector Description.
Definition at line 219 of file TileMuonFitter.h.
◆ m_tileDD_radiusLB
std::vector<double> TileMuonFitter::m_tileDD_radiusLB |
|
protected |
Radial bounds of the 3 samplings in LB, loaded from Detector Description.
Definition at line 217 of file TileMuonFitter.h.
◆ m_tileDD_zEBA
std::vector<double> TileMuonFitter::m_tileDD_zEBA |
|
protected |
Z bounds of EBA, loaded from Detector Description.
Definition at line 221 of file TileMuonFitter.h.
◆ m_tileDD_zEBC
std::vector<double> TileMuonFitter::m_tileDD_zEBC |
|
protected |
Z bounds of EBC, loaded from Detector Description.
Definition at line 223 of file TileMuonFitter.h.
◆ m_tileDD_zLB
std::vector<double> TileMuonFitter::m_tileDD_zLB |
|
protected |
Z bounds of LB, loaded from Detector Description.
Definition at line 225 of file TileMuonFitter.h.
◆ m_tileHWID
◆ m_tileID
◆ m_tileMgr
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_weightedMeanX
double TileMuonFitter::m_weightedMeanX |
|
protected |
◆ m_weightedMeanY
double TileMuonFitter::m_weightedMeanY |
|
protected |
◆ m_weightedMeanZ
double TileMuonFitter::m_weightedMeanZ |
|
protected |
◆ m_zeroCrossingTime
std::vector<double> TileMuonFitter::m_zeroCrossingTime |
|
protected |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
static const CaloCell_ID::SUBCALO m_caloIndex
tile_descr_const_iterator tile_descriptors_begin() const
double GetMeanX()
X mean getter.
std::vector< double > m_tileDD_zLB
Z bounds of LB, loaded from Detector Description.
void setEventDefaults()
Reset variables.
int indexLastCellCalo(const CaloCell_ID::SUBCALO caloNum) const
index of last cell of given calorimeter (-2 if none) Note that it is normally more efficient to use i...
size_type cell_hash_max(void) const
int whichModule(CLHEP::Hep3Vector tempvec)
Returns module index for TVector3 input.
void buildCells()
Creates an internal cell container (just vectors) from the input CaloCellContainer.
void SetSegmentPath(const std::vector< double > &path)
std::vector< double > m_cellTime
Selected cell's time.
Scalar phi() const
phi method
Class containing detailed results from TileMuonFitter.
std::vector< double > m_zeroCrossingTime
Time at y=0.
void trackIntersection(std::vector< double > <op, std::vector< double > &lbot, int index)
Calculates length of track intersection with TileCal (by sampling).
Scalar perp() const
perp method - perpenticular length
int houghTrack()
Fits a straight track to the cells centers, using a Hough Transform algorithm.
void buildTileCosmicMuon(int fitok)
Selects between the two next methods.
bool eventSelection()
Checks if there are good cells on the top and bottom modules.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
void buildComTimeAtYequal0(int fitok)
Creates output ComTime object in StoreGate.
void SetPositionX(double posx)
bool checkLBr(double x1, uint8_t s1)
Checks if x1 is within LB r coordinate bounds for sampling s1.
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
void cart2hough(float x1, float y1, float x2, float y2, double &raio, double &angu)
void buildComTimeAtZequal0(int fitok)
Creates output ComTime object in StoreGate.
std::vector< double > m_tileDD_radiusEB
Radial bounds of the 3 samplings in EB, loaded from Detector Description.
void calculateTimeAtZequal0()
Extrapolates cell time to z=0.
void calculateTime()
Calculates time in reference plane.
int sample(const Identifier &id) const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< CLHEP::Hep3Vector > m_cellPosition
Position of selected cell's center.
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
void SetSegmentSampling(const std::vector< int > &sampling)
float dist2line(CellInfo &ci, float *pos, float *w)
std::vector< std::vector< double > > m_linePar
Vector with the fitted four track parameters.
unsigned int buildCellInfoVector()
void SetEnergyBottom(const std::vector< double > &energy)
const std::string & key() const
Return the StoreGate ID for the referenced object.
void calculateTimeAtYequal0()
Extrapolates cell time to y=0.
void SetEnergyTop(const std::vector< double > &energy)
std::vector< double > m_fitMinimum
Chi-square minumum.
tile_descr_const_iterator tile_descriptors_end() const
float dz(unsigned int samp) const
std::vector< CellInfo > m_cellInfo
std::vector< double > m_cellEnergy
Selected cell's energy.
int whichLBr(double x1)
Returns sampling index if x1 is within LB r coordinate bounds.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
int n_eta(unsigned int samp) const
void SetPositionY(double posy)
std::vector< double > m_cellWeight
Selected cell's weight for fit.
float dr(unsigned int samp) const
float timeDiff(void) const
get time diff for two PMTs (data member)
bool checkEBr(double x1, uint8_t s1)
Checks if x1 is within EB r coordinate bounds for sampling s1.
void SetWeighted(bool weight)
Set weight/no-weight flag.
bool m_doHoughTransform
Flag to use Hough Transform instead of Fit.
int indexFirstCellCalo(const CaloCell_ID::SUBCALO caloNum) const
index of first cell of given calorimeter (-1 if none).
float rcenter(unsigned int samp) const
bool checkEBAz(double x1)
Checks if x1 is within EBA z coordinate bounds.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
bool checkLBz(double x1)
Checks if x1 is within LB z coordinate bounds.
void SetDirectionPhi(double phi)
bool guessTrack(unsigned int &index1, unsigned int &index2)
float zcenter(unsigned int samp) const
unsigned int CntCells(unsigned int index1, unsigned int index2, double &skew)
::StatusCode StatusCode
StatusCode definition for legacy code.
void SetPositionZ(double posz)
int nCellsCalo(const CaloCell_ID::SUBCALO caloNum) const
get number of cels of given calorimeter
void SetSegmentPartition(const std::vector< int > &partition)
std::vector< IdentifierHash > m_cellHash
Selected cell's identifier hash.
ROOT::Minuit2::TileMuonTrackDistance * m_theTrack
Auxiliary class representing the function to be minimized - weighted sum of squares of orthogonal dis...
std::vector< double > m_cellDeltaTime
Selected cell's time difference between two PMTs.
#define CHECK(...)
Evaluate an expression and check for errors.
void SetSegmentModule(const std::vector< int > &module)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
double GetMeanZ()
Z mean getter.
void buildTileCosmicMuonAtZequal0(int fitok)
Creates output TileCosmicMuon object in StoreGate.
bool checkEBz(double x1)
Checks if x1 is within EB z coordinate bounds.
void Means()
Calculates means (weighted or not) of cell positions.
void trackSegmentIntersection(std::vector< double > &segPath, std::vector< int > &segPartition, std::vector< int > &segModule, std::vector< int > &segSampling, int index)
Calculates length of track intersection with TileCal (by sampling and module).
CaloDetDescrElement * get_cell_element(unsigned int cell_hash) const
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
double GetMeanY()
Y mean getter.
int whichEBr(double x1)
Returns sampling index if x1 is within EB r coordinate bounds.
float volume() const
cell volume
bool checkEBCz(double x1)
Checks if x1 is within EBC z coordinate bounds.
void buildTileCosmicMuonAtYequal0(int fitok)
Creates output TileCosmicMuon object in StoreGate.
void SetPathBottom(const std::vector< double > &path)
void doHough(double &rxy, double &axy, double &rzy, double &azy)
void SetFitNCells(int ncells)
void energyInTrack(std::vector< double > &etop, std::vector< double > &ebot, std::vector< IdentifierHash > &cells, int index)
Sums up energy in TileCal cells close to the track (by sampling).
std::vector< double > m_tileDD_zEBC
Z bounds of EBC, loaded from Detector Description.
bool m_doWeighted
Flag to weigh or not the chi-square with an energy parameter.
int m_nCells
Number of cells selected for fit.
CLHEP::Hep3Vector ClosestPoint(CLHEP::Hep3Vector *dataPoint, const std::vector< double > &par) const
Returns point in track defined by par closest to dataPoint.
void buildComTime(int fitok)
Selects between the two next methods.
DataObjIDColl m_extendedExtraObjects
std::string m_beamType
Flag to indicate: cosmics, singlebeam or collisions.
bool isHaloMuon(double azy)
void addTrack(double aa, double bb, double cc, double dd)
Data object for each calorimeter readout cell.
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
void points2dir(CellInfo &ci1, CellInfo &ci2, float *w)
bool m_doDensity
Flag defining the energy weighting parameter: energy density or plain energy.
std::vector< double > m_tileDD_zEBA
Z bounds of EBA, loaded from Detector Description.
void SetDirectionTheta(double theta)
std::vector< double > m_tileDD_radiusLB
Radial bounds of the 3 samplings in LB, loaded from Detector Description.
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
void SetTrackCellHash(const std::vector< IdentifierHash > &cells)
void SetFitQuality(double quality)
float eta() const
cell eta
void SetPathTop(const std::vector< double > &path)
AthAlgorithm()
Default constructor:
const TileHWID * m_tileHWID
IdentifierHash cell_hash(const Identifier &cell_id) const
fast conversion from ID to hash for cells
const boost::regex rr(r_r)
int section(const Identifier &id) const
float selectCells(float *p, float *w)
double m_eThreshold
Cell energy threshold.
void hough2cart(double r, double a, double offset, double &aa, double &bb)
Identifier cell_id(const Identifier &any_id) const
SG::WriteHandleKey< TileCosmicMuonContainer > m_cosmicMuonContainerKey
Auxiliary to TileMuonFitter. Chi-square function for Minuit.
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
int m_minimumCells
Minimum number of cells needed for fit.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Scalar mag() const
mag method
const TileDetDescrManager * m_tileMgr
const CaloCellContainer * m_caloCells
double m_deltaTimeCut
Cell Delta Time cut.
int fitTrack()
Fits a straight track to the cell centers, using the auxiliary class TileMuonTrackDistance.
SG::WriteHandleKey< ComTime > m_comTimeKey
void SetTime(double time)
Setters.