|
ATLAS Offline Software
|
#include <CscSegmentUtilTool.h>
|
| CscSegmentUtilTool (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~CscSegmentUtilTool ()=default |
|
virtual StatusCode | initialize () |
|
std::unique_ptr< std::vector< std::unique_ptr< Muon::MuonSegment > > > | getMuonSegments (Identifier eta_id, Identifier phi_id, ICscSegmentFinder::ChamberTrkClusters &eta_clus, ICscSegmentFinder::ChamberTrkClusters &phi_clus, const Amg::Vector3D &lpos000, const EventContext &ctx) const |
|
Muon::MuonSegmentCombination * | get4dMuonSegmentCombination (Identifier eta_id, Identifier phi_id, ICscSegmentFinder::ChamberTrkClusters &eta_clus, ICscSegmentFinder::ChamberTrkClusters &phi_clus, const Amg::Vector3D &lpos000, const EventContext &ctx) const |
|
Muon::MuonSegmentCombination * | get4dMuonSegmentCombination (const Muon::MuonSegmentCombination *Muon2dSegComb, const EventContext &ctx) const |
|
Muon::MuonSegmentCombination * | get2dMuonSegmentCombination (Identifier eta_id, Identifier phi_id, ICscSegmentFinder::ChamberTrkClusters &eta_clus, ICscSegmentFinder::ChamberTrkClusters &phi_clus, const Amg::Vector3D &lpos000, const EventContext &ctx, int etaStat=0, int phiStat=0) const |
|
void | spoiled_count (const ICscSegmentFinder::RioList &rios, double threshold, int &nspoil, int &nunspoil) |
|
void | spoiled_count (const ICscSegmentFinder::RioList &rios, int &nspoil, int &nunspoil) |
|
void | spoiled_count (const ICscSegmentFinder::RioList &rios, int &nspoil, int &nunspoil, int &spoilmap) |
|
void | fit_rio_residual (const Trk::PlaneSurface &ssrf, bool dump, const ICscSegmentFinder::RioList &clus, unsigned int irclu, double &res, double &dres, double &rs, double &drs) const |
|
virtual void | spoiled_count (const std::vector< const Trk::RIO_OnTrack * > &rios, double threshold, int &nspoil, int &nunspoil)=0 |
|
virtual void | spoiled_count (const std::vector< const Trk::RIO_OnTrack * > &rios, int &nspoil, int &nunspoil)=0 |
|
virtual void | spoiled_count (const std::vector< const Trk::RIO_OnTrack * > &rios, int &nspoil, int &nunspoil, int &spoilmap)=0 |
|
virtual void | fit_rio_residual (const Trk::PlaneSurface &ssrf, bool dump, const std::vector< const Trk::RIO_OnTrack * > &clus, unsigned int irclu, double &res, double &dres, double &rs, double &drs) const =0 |
|
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 | sysInitialize () override |
| Perform system initialization for an algorithm. 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 |
|
|
Muon::MuonSegment * | build_segment (const ICscSegmentFinder::Segment &seg, bool measphi, Identifier chid, bool use2Lay, const EventContext &ctx) const |
|
void | fit_rio_segment (const Trk::PlaneSurface &ssrf, bool dump, const ICscSegmentFinder::RioList &clus, double &s0, double &s1, double &d0, double &d1, double &d01, double &chsq, double &zshift) const |
|
void | fit_residual (const ICscSegmentFinder::TrkClusters &clus, const Amg::Vector3D &lpos000, unsigned int irclu, double &res, double &dres, const EventContext &ctx) const |
|
void | find_2dsegments (bool measphi, int station, int eta, int phi, const ICscSegmentFinder::ChamberTrkClusters &clus, const Amg::Vector3D &lpos000, ICscSegmentFinder::Segments &segs, double localPos, double localSlope, const EventContext &ctx) const |
|
void | find_2dseg3hit (bool measphi, int station, int eta, int phi, const ICscSegmentFinder::ChamberTrkClusters &clus, const Amg::Vector3D &lpos000, ICscSegmentFinder::Segments &segs, ICscSegmentFinder::Segments &segs4hit, double localPos, double localSlope, const EventContext &ctx) const |
|
void | find_2dseg2hit (bool measphi, int station, int eta, int phi, int layStat, const ICscSegmentFinder::ChamberTrkClusters &clus, const Amg::Vector3D &lpos000, ICscSegmentFinder::Segments &segs, double localPos, double localSlope, const EventContext &ctx) const |
|
void | add_2dsegments (ICscSegmentFinder::Segments &segs4, ICscSegmentFinder::Segments &segs3) const |
| Adds 3-hit segments to 4-hit segments. More...
|
|
void | add_2dseg2hits (ICscSegmentFinder::Segments &segs, ICscSegmentFinder::Segments &segs2, int layStat) const |
|
bool | unique_hits (ICscSegmentFinder::TrkClusters &fitclus, ICscSegmentFinder::Segments &segs) const |
| Method for checking whether three hit segments are already part of 4 hit segments. More...
|
|
void | get2dSegments (Identifier eta_id, Identifier phi_id, ICscSegmentFinder::ChamberTrkClusters &eta_clus, ICscSegmentFinder::ChamberTrkClusters &phi_clus, ICscSegmentFinder::Segments &etasegs, ICscSegmentFinder::Segments &phisegs, const Amg::Vector3D &lpos000, const EventContext &ctx, int etaStat=0, int phiStat=0) const |
|
Muon::MuonSegment * | make_4dMuonSegment (const Muon::MuonSegment &rsg, const Muon::MuonSegment &psg, bool use2LaySegsEta, bool use2LaySegsPhi) const |
|
int | find_outlier_cluster (const ICscSegmentFinder::TrkClusters &clus, const Amg::Vector3D &lpos000, double &returned_chsq, const EventContext &ctx) const |
|
void | fit_segment (const ICscSegmentFinder::TrkClusters &clus, const Amg::Vector3D &lpos000, double &s0, double &s1, double &d0, double &d1, double &d01, double &chsq, double &time, double &dtime, double &zshift, const EventContext &ctx, int outlierLayer=-1) const |
|
void | fit_detailCalcPart1 (const ICscSegmentFinder::TrkClusters &clus, const Amg::Vector3D &lpos000, double &s0, double &s1, double &d0, double &d1, double &d01, double &chsq, bool &measphi, double &time, double &dtime, double &zshift, bool IsSlopeGive, int outlierHitLayer, const EventContext &ctx) const |
|
void | fit_detailCalcPart2 (double q0, double q1, double q2, double q01, double q11, double q02, double &s0, double &s1, double &d0, double &d1, double &d01, double &chsq) const |
|
double | getDefaultError (Identifier id, bool measphi, const Muon::CscPrepData *prd, const EventContext &ctx) const |
|
void | getRios (const ICscSegmentFinder::Segment &seg, ICscSegmentFinder::MbaseList *prios, bool measphi, const EventContext &ctx) const |
|
double | matchLikelihood (const Muon::MuonSegment &rsg, const Muon::MuonSegment &psg) const |
|
bool | isGood (const uint32_t stripHashId, const EventContext &ctx) const |
|
int | stripStatusBit (const uint32_t stripHashId, const EventContext &ctx) const |
|
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...
|
|
|
Gaudi::Property< double > | m_max_chisquare_tight {this, "max_chisquare_tight", 16, "for outlier removal"} |
|
Gaudi::Property< double > | m_max_chisquare_loose {this, "max_chisquare_loose", 2000, "for outlier removal"} |
|
Gaudi::Property< double > | m_max_chisquare {this, "max_chisquare", 25} |
|
Gaudi::Property< double > | m_max_slope_r {this, "max_slope_r", 0.2} |
|
Gaudi::Property< double > | m_max_slope_phi {this, "max_slope_phi", 0.2} |
|
Gaudi::Property< double > | m_min_xylike {this, "min_xylike", -1, "Minimum value used for xy matching of 4D segments"} |
|
Gaudi::Property< double > | m_fitsegment_tantheta_tolerance {this, "tantheta_update_tolerance", 0.0001} |
|
Gaudi::Property< double > | m_IPerror {this, "IPerror", 250} |
|
Gaudi::Property< float > | m_cluster_error_scaler {this, "cluster_error_scaler", 1} |
|
Gaudi::Property< int > | m_nunspoil {this, "UnspoiledHits", -1} |
|
Gaudi::Property< int > | m_max_3hitseg_sharehit {this, "max_3hitseg_sharedhit", 0} |
|
Gaudi::Property< unsigned int > | m_max_seg_per_chamber {this, "max_seg_per_chamber", 50} |
|
Gaudi::Property< bool > | m_x5data {this, "X5data", false} |
|
Gaudi::Property< bool > | m_zshift {this, "zshift", true} |
|
Gaudi::Property< bool > | m_IPconstraint {this, "IPconstraint", true} |
|
Gaudi::Property< bool > | m_allEtaPhiMatches {this, "allEtaPhiMatches", true} |
|
Gaudi::Property< bool > | m_TightenChi2 {this, "TightenChi2", true} |
|
Gaudi::Property< bool > | m_remove4Overlap {this, "Remove4Overlap", true} |
|
Gaudi::Property< bool > | m_remove3Overlap {this, "Remove3Overlap", true} |
|
ToolHandle< Muon::ICscClusterOnTrackCreator > | m_rotCreator |
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
SG::ReadCondHandleKey< CscCondDbData > | m_readKey {this, "ReadKey", "CscCondDbData", "Key of CscCondDbData"} |
|
SG::ReadHandleKey< xAOD::EventInfo > | m_eventInfo {this, "EventInfo", "EventInfo", "event info"} |
|
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > | m_DetectorManagerKey |
|
StoreGateSvc_t | m_evtStore |
| Pointer to StoreGate (event store by default) More...
|
|
StoreGateSvc_t | m_detStore |
| Pointer to StoreGate (detector store by default) More...
|
|
std::vector< SG::VarHandleKeyArray * > | m_vhka |
|
bool | m_varHandleArraysDeclared |
|
Definition at line 35 of file CscSegmentUtilTool.h.
◆ StoreGateSvc_t
◆ CscSegmentUtilTool()
CscSegmentUtilTool::CscSegmentUtilTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~CscSegmentUtilTool()
virtual CscSegmentUtilTool::~CscSegmentUtilTool |
( |
| ) |
|
|
virtualdefault |
◆ add_2dseg2hits()
Definition at line 1279 of file CscSegmentUtilTool.cxx.
1280 if (segs2.empty())
return;
1281 ATH_MSG_DEBUG(
" Total Input 2-layer segment size " << segs2.size());
1283 int lay0 = -1, lay1 = -1;
1284 for (
int i = 0;
i < 4;
i++) {
1288 else if (lay1 == -1)
1292 bool checkCrossTalk =
false;
1293 if (std::abs(lay0 - lay1) == 1 && lay0 + lay1 != 3)
1294 checkCrossTalk =
true;
1296 std::vector<int> isegs2OK(segs2.size(), 1);
1297 ICscSegmentFinder::Segments::const_iterator iseg;
1298 ICscSegmentFinder::Segments::const_iterator iseg2;
1304 for (iseg = segs2.begin(); iseg != segs2.end(); ++iseg) {
1306 if (!isegs2OK[iiseg])
continue;
1308 for (iseg2 = iseg + 1; iseg2 != segs2.end(); ++iseg2) {
1309 int nhits_common = 0;
1311 if (!isegs2OK[iiseg2])
continue;
1312 double charges[2] = {0, 0};
1313 for (
int iclus = 0; iclus < iseg->nclus; iclus++) {
1315 if (checkCrossTalk) {
1317 std::vector<const Muon::CscStripPrepData*> strips =
m_rotCreator->GetICscClusterUtilTool()->getStrips(prep);
1318 std::vector<double> stripCharges;
1319 for (
unsigned int s = 0;
s < strips.size(); ++
s) {
1322 stripCharges.push_back(sfit.
charge);
1324 double maxCharge = 0, centCharge = 0;
1325 for (
unsigned int s = 0;
s < stripCharges.size();
s++) {
1326 if (stripCharges[
s] > maxCharge) {
1327 maxCharge = stripCharges[
s];
1328 centCharge = stripCharges[
s];
1329 if (
s > 0) centCharge += stripCharges[
s - 1];
1330 if (
s < stripCharges.size() - 1) centCharge += stripCharges[
s + 1];
1333 charges[iclus] = centCharge;
1335 float chargeRatio = charges[0] / charges[1];
1336 if (charges[0] > charges[1]) chargeRatio = charges[1] / charges[0];
1337 if (chargeRatio < .01) {
1343 for (
int iclus2 = 0; iclus2 < iseg2->nclus; iclus2++) {
1348 if (nhits_common != 0) {
1349 isegs2OK[iiseg2] = 0;
1350 ATH_MSG_DEBUG(
" seg2 segment nr " << iiseg2 <<
" dropped with nhits_common " << nhits_common);
1355 for (iseg = segsAll.begin(); iseg != segsAll.end(); ++iseg) {
1358 for (iseg2 = segs2.begin(); iseg2 != segs2.end(); ++iseg2) {
1359 int nhits_common = 0;
1361 if (isegs2OK[iiseg2] == 0)
continue;
1362 for (
int iclus = 0; iclus < iseg->nclus; iclus++) {
1370 for (
int iclus2 = 0; iclus2 < iseg2->nclus; iclus2++) {
1375 if (nhits_common > 0) {
1376 isegs2OK[iiseg2] = 0;
1377 ATH_MSG_DEBUG(
" seg2 segment nr " << iiseg2 <<
" dropped with nhits_common " << nhits_common);
1378 if (iseg2 == segs2.begin()) segs.push_back(*iseg);
1379 }
else if (nhits_common == 0) {
1380 if (iseg2 == segs2.begin()) segs.push_back(*iseg);
1381 }
else if (nhits_common == -1)
1386 for (iseg = segs2.begin(); iseg != segs2.end(); ++iseg) {
1391 segs.push_back(*iseg);
1392 ATH_MSG_DEBUG(
" seg2 accepted, nclusters " << iseg->nclus <<
" chi2 " << iseg->chsq <<
" unspoiled " << iseg->nunspoil
1393 <<
" mPhi " <<
m_idHelperSvc->cscIdHelper().measuresPhi(
id));
1395 ATH_MSG_DEBUG(
" seg2 rejected, nclusters " << iseg->nclus <<
" chi2 " << iseg->chsq <<
" unspoiled " << iseg->nunspoil
1396 <<
" mPhi " <<
m_idHelperSvc->cscIdHelper().measuresPhi(
id));
◆ add_2dsegments()
Adds 3-hit segments to 4-hit segments.
Definition at line 1146 of file CscSegmentUtilTool.cxx.
1149 if (segs4.empty() and segs3.empty())
return;
1151 ATH_MSG_DEBUG(
" Total Input seg4 segment size " << segs4.size());
1152 ATH_MSG_DEBUG(
" Total Input seg3 segment size " << segs3.size());
1154 std::vector<int> isegs4OK(segs4.size(), 1);
1155 std::vector<int> isegs3OK(segs3.size(), 1);
1158 ICscSegmentFinder::Segments::const_iterator iseg;
1159 ICscSegmentFinder::Segments::const_iterator iseg2;
1166 for (iseg = segs4All.begin(); iseg != segs4All.end(); ++iseg) {
1169 for (iseg2 = iseg + 1; iseg2 != segs4All.end(); ++iseg2) {
1170 int nhits_common = 0;
1172 for (
int iclus = 0; iclus < iseg->nclus; iclus++) {
1174 for (
int iclus2 = 0; iclus2 < iseg2->nclus; iclus2++) {
1180 isegs4OK[iiseg2] = 0;
1181 ATH_MSG_DEBUG(
" seg4 segment nr " << iiseg2 <<
" dropped with nhits_common " << nhits_common);
1187 for (iseg = segs4All.begin(); iseg != segs4All.end(); ++iseg) {
1192 ATH_MSG_DEBUG(
" seg4 eta segment rejected with nclusters too few unspoiled hits " << iseg->nclus <<
" chi2 " << iseg->chsq
1193 <<
" unspoiled " << iseg->nunspoil);
1194 isegs4OK[iiseg] = 0;
1197 segs4.push_back(*iseg);
1198 ATH_MSG_DEBUG(
" seg4 segment accepted with nclusters " << iseg->nclus <<
" chi2 " << iseg->chsq <<
" unspoiled "
1199 << iseg->nunspoil <<
" measuresPhi "
1202 ATH_MSG_DEBUG(
" seg4 segment rejected with nclusters " << iseg->nclus <<
" chi2 " << iseg->chsq <<
" unspoiled "
1203 << iseg->nunspoil <<
" measuresPhi "
1207 int segs4Size = segs4.size();
1208 ATH_MSG_DEBUG(
" Total seg4 segment accepted size " << segs4Size);
1212 for (iseg = segs4.begin(); iseg != segs4.end(); ++iseg) {
1214 for (iseg2 = segs3.begin(); iseg2 != segs3.end(); ++iseg2) {
1216 int nhits_common = 0;
1217 for (
int iclus = 0; iclus < iseg->nclus; iclus++) {
1219 for (
int iclus2 = 0; iclus2 < iseg2->nclus; iclus2++) {
1225 isegs3OK[iiseg2] = 0;
1226 ATH_MSG_DEBUG(
" seg3 segment nr " << iiseg2 <<
" dropped with nhits_common " << nhits_common);
1232 for (iseg = segs3.begin(); iseg != segs3.end(); ++iseg) {
1235 for (iseg2 = iseg + 1; iseg2 != segs3.end(); ++iseg2) {
1237 int nhits_common = 0;
1238 for (
int iclus = 0; iclus < iseg->nclus; iclus++) {
1240 for (
int iclus2 = 0; iclus2 < iseg2->nclus; iclus2++) {
1246 isegs3OK[iiseg2] = 0;
1247 ATH_MSG_DEBUG(
" seg3 segment nr " << iiseg2 <<
" dropped with nhits_common " << nhits_common);
1254 for (iseg = segs3.begin(); iseg != segs3.end(); ++iseg) {
1259 ATH_MSG_DEBUG(
" seg3 eta segment rejected with nclusters too few unspoiled hits " << iseg->nclus <<
" chi2 " << iseg->chsq
1260 <<
" unspoiled " << iseg->nunspoil);
1261 isegs3OK[iiseg] = 0;
1264 segs4.push_back(*iseg);
1265 ATH_MSG_DEBUG(
" seg3 segment accepted with nclusters " << iseg->nclus <<
" chi2 " << iseg->chsq <<
" unspoiled "
1266 << iseg->nunspoil <<
" measuresPhi "
1269 ATH_MSG_DEBUG(
" seg3 segment rejected with nclusters " << iseg->nclus <<
" chi2 " << iseg->chsq <<
" unspoiled "
1270 << iseg->nunspoil <<
" measuresPhi "
1274 ATH_MSG_DEBUG(
" Total seg3 segment size " << segs4.size() - segs4Size);
◆ build_segment()
Definition at line 762 of file CscSegmentUtilTool.cxx.
770 if (MuonDetMgr ==
nullptr) {
771 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
789 xf.pretranslate(glop);
800 }
else if (pbnd_rtrap) {
810 double lx = measphi ? seg.
s0 : 0.;
811 double ly = measphi ? 0. : seg.
s0;
813 double dlx = measphi ? seg.
s1 : 0.;
814 double dly = measphi ? 0. : seg.
s1;
822 Amg::Vector3D lposRefShift = lposRef - ldirRef * lposRef.z();
825 double s0 = lposRefShift.x();
831 getRios(seg, &prios, measphi, ctx);
834 int ndof =
int(prios.size()) - 2;
836 if (use2Lay)
ndof = 1;
842 double ameas = std::atan2(1.0, seg.
s1);
845 double dfac = -1.0 / (1 + seg.
s1 * seg.
s1);
846 double e_pos_pos = seg.
d0 * seg.
d0;
847 double e_pos_dir = seg.
d01 * dfac;
848 const double e_dir_dir = seg.
d1 * seg.
d1 * dfac * dfac;
851 cov(0, 0) = e_pos_pos;
852 cov(0, 2) = e_pos_dir;
854 cov(2, 2) = e_dir_dir;
855 cov(1, 1) = 1000000.0;
877 tantheta =
d.x() /
d.z();
882 ATH_MSG_VERBOSE(
" d.x : d.z : tantheta " <<
d.x() <<
" " <<
d.z() <<
" " << tantheta);
888 const double initialDiffTanTheta = 99;
889 double diff_tantheta = initialDiffTanTheta;
890 const unsigned int nTrials = 10;
891 unsigned int n_update = 0;
900 for (ICscSegmentFinder::RioList::size_type irio = 0; irio < pseg_ref->
numberOfContainedROTs(); ++irio) {
916 prios_new.push_back(cot);
931 fitclus.emplace_back(lpos, pcl, measphi);
940 ATH_MSG_DEBUG(
"build_segments:: " << seg_new.
time <<
" " << seg_new.
dtime <<
" fitclus size " << fitclus.size());
946 double lx = measphi ? seg_new.
s0 : 0.;
947 double ly = measphi ? 0. : seg_new.
s0;
948 double lz = seg_new.
zshift;
949 double dlx = measphi ? seg_new.
s1 : 0.;
950 double dly = measphi ? 0. : seg_new.
s1;
958 Amg::Vector3D lposRefShift = lposRef - ldirRef * lposRef.z();
959 double s0 = lposRefShift.x();
963 double ameas_new = atan2(1.0, seg_new.
s1);
966 double dfac_new = -1.0 / (1 + seg_new.
s1 * seg_new.
s1);
967 double e_pos_pos_new = seg_new.
d0 * seg_new.
d0;
968 double e_pos_dir_new = seg_new.
d01 * dfac_new;
969 const double e_dir_dir_new = seg_new.
d1 * seg_new.
d1 * dfac_new * dfac_new;
972 cov(0, 0) = e_pos_pos_new;
973 cov(0, 2) = e_pos_dir_new;
974 cov(2, 2) = e_dir_dir_new;
975 cov(1, 1) = 1000000.0;
984 std::move(prios_new),
991 double tanthetanew = 0;
993 ATH_MSG_WARNING(
"build_segment() - new segment z is 0, staying with old segment and continue loop");
997 diff_tantheta = initialDiffTanTheta;
999 if (n_update == (nTrials - 1))
break;
1002 tanthetanew = dnew.x() / dnew.z();
1007 ATH_MSG_DEBUG(
" build_segment:: right after new assigning and resetting * " << pseg->
time());
1009 if (tantheta == 0) {
1010 ATH_MSG_WARNING(
"build_segment() - tantheta=0 but tanthetanew=" << tanthetanew <<
", set diff_tantheta=tanthetanew");
1011 diff_tantheta = tanthetanew;
1014 diff_tantheta = std::abs(tanthetanew - tantheta) / tantheta;
1017 ATH_MSG_VERBOSE(
" tantheta change in segment: " << tantheta <<
" ==> " << tanthetanew <<
" -ratio- " << diff_tantheta);
1019 tantheta = tanthetanew;
1041 ATH_MSG_DEBUG(
" build_segment:: right just before returning * " << pseg->
time());
◆ 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()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ 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
◆ find_2dseg2hit()
void CscSegmentUtilTool::find_2dseg2hit |
( |
bool |
measphi, |
|
|
int |
station, |
|
|
int |
eta, |
|
|
int |
phi, |
|
|
int |
layStat, |
|
|
const ICscSegmentFinder::ChamberTrkClusters & |
clus, |
|
|
const Amg::Vector3D & |
lpos000, |
|
|
ICscSegmentFinder::Segments & |
segs, |
|
|
double |
localPos, |
|
|
double |
localSlope, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 1504 of file CscSegmentUtilTool.cxx.
1512 int lay0 = -1, lay1 = -1;
1513 for (
int i = 0;
i < 4;
i++) {
1517 else if (lay1 == -1)
1520 ATH_MSG_WARNING(
"can't do 2-layer segment finding, more than 2 layers marked as good");
1525 if (lay0 == -1 || lay1 == -1) {
1526 ATH_MSG_WARNING(
"can't do 2-layer segment finding, fewer than 2 layers marked as good");
1530 const int maxhits = 2;
1533 ICscSegmentFinder::TrkClusters::const_iterator icl[maxhits] {};
1537 for (icl[0] = clus1.begin(); icl[0] != clus1.end(); ++icl[0]) {
1540 for (icl[1] = clus2.begin(); icl[1] != clus2.end(); ++icl[1]) {
1545 for (
int i = 0;
i < maxhits;
i++) { fitclus.push_back(*(icl[
i])); }
1551 fit_segment(fitclus, lpos000, seg.
s0, seg.
s1, seg.
d0, seg.
d1, seg.
d01, seg.
chsq, seg.
time, seg.
dtime, seg.
zshift, ctx);
1555 for (
int i = 0;
i < maxhits;
i++) {
1564 double local_max_chi = 0.;
1573 if (seg.
chsq > local_max_chi)
keep =
false;
1574 ATH_MSG_VERBOSE(
" nunspoil, chi2, and local_max_chi " << nunspoil <<
" " << seg.
chsq <<
" " << local_max_chi <<
" " <<
keep);
1583 segs.push_back(seg);
1587 ATH_MSG_VERBOSE(
" Segment measphi? " << measphi <<
" chsq:" << seg.
chsq <<
" abs(seg.s1) " << std::abs(seg.
s1)
1589 <<
" keep? " <<
keep);
◆ find_2dseg3hit()
void CscSegmentUtilTool::find_2dseg3hit |
( |
bool |
measphi, |
|
|
int |
station, |
|
|
int |
eta, |
|
|
int |
phi, |
|
|
const ICscSegmentFinder::ChamberTrkClusters & |
clus, |
|
|
const Amg::Vector3D & |
lpos000, |
|
|
ICscSegmentFinder::Segments & |
segs, |
|
|
ICscSegmentFinder::Segments & |
segs4hit, |
|
|
double |
localPos, |
|
|
double |
localSlope, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 1403 of file CscSegmentUtilTool.cxx.
1409 constexpr
int maxcomb = 4;
1410 constexpr std::array<int, maxcomb> layAcomb{1, 2, 3, 0};
1411 constexpr std::array<int, maxcomb> layBcomb{2, 3, 0, 1};
1412 constexpr std::array<int, maxcomb> layCcomb{3, 0, 1, 2};
1417 constexpr
int maxhits = 3;
1423 for (
int icomb = 0; icomb < maxcomb; icomb++) {
1425 ICscSegmentFinder::TrkClusters::const_iterator icl[maxhits];
1426 auto & pCluster1 = icl[0];
1427 auto & pCluster2 = icl[1];
1428 auto & pCluster3 = icl[2];
1431 for (pCluster1 = clus1.begin(); pCluster1 != clus1.end(); ++pCluster1) {
1434 for (pCluster2 = clus2.begin(); pCluster2 != clus2.end(); ++pCluster2) {
1437 for (pCluster3 = clus3.begin(); pCluster3 != clus3.end(); ++pCluster3) {
1439 fitclus = {*pCluster1, *pCluster2, *pCluster3};
1449 fit_segment(fitclus, lpos000, seg.
s0, seg.
s1, seg.
d0, seg.
d1, seg.
d01, seg.
chsq, seg.
time, seg.
dtime, seg.
zshift, ctx);
1453 for (
int i = 0;
i < maxhits;
i++) {
1463 double local_max_chi = 0.;
1473 if (seg.
chsq > local_max_chi)
keep =
false;
1475 ATH_MSG_VERBOSE(
" nunspoil and local_max_chi " << nunspoil <<
" " << local_max_chi <<
" " <<
keep);
1480 double outlierRemoved_chsq;
1484 seg.
chsq = outlierRemoved_chsq;
1492 if (
keep) segs.push_back(seg);
1494 ATH_MSG_VERBOSE(
" Segment measphi? " << measphi <<
" chsq:" << seg.
chsq <<
" abs(seg.s1) " << std::abs(seg.
s1)
1495 <<
" keep? " <<
keep);
◆ find_2dsegments()
Definition at line 1046 of file CscSegmentUtilTool.cxx.
1050 ATH_MSG_DEBUG(
"find_2dsegments called!! ID: " << measphi_name(measphi) <<
" " << std::showpos <<
eta <<
" "
1064 for (ICscSegmentFinder::TrkClusters::const_iterator icl1 = clus1.begin(); icl1 != clus1.end(); ++icl1) {
1065 for (ICscSegmentFinder::TrkClusters::const_iterator icl2 = clus2.begin(); icl2 != clus2.end(); ++icl2) {
1066 for (ICscSegmentFinder::TrkClusters::const_iterator icl3 = clus3.begin(); icl3 != clus3.end(); ++icl3) {
1067 for (ICscSegmentFinder::TrkClusters::const_iterator icl4 = clus4.begin(); icl4 != clus4.end(); ++icl4) {
1068 fitclus = {*icl1, *icl2, *icl3, *icl4};
1072 <<
Amg::error((*icl2).cl->localCovariance(), ierr) <<
" "
1073 <<
Amg::error((*icl3).cl->localCovariance(), ierr) <<
" "
1074 <<
Amg::error((*icl4).cl->localCovariance(), ierr) <<
" ");
1078 fit_segment(fitclus, lpos000, seg.
s0, seg.
s1, seg.
d0, seg.
d1, seg.
d01, seg.
chsq, seg.
time, seg.
dtime, seg.
zshift, ctx);
1079 seg.
clus[0] = *icl1;
1080 seg.
clus[1] = *icl2;
1081 seg.
clus[2] = *icl3;
1082 seg.
clus[3] = *icl4;
1085 for (
int i = 0;
i < 4; ++
i) {
1094 double local_max_chi = 0.;
1103 ATH_MSG_VERBOSE(
" find_2dsegments:: nunspoil and local_max_chi " << nunspoil <<
" " << local_max_chi <<
" " <<
keep
1108 double outlierRemoved_chsq;
1112 seg.
chsq = outlierRemoved_chsq;
1127 if (
keep) segs.push_back(seg);
1129 ATH_MSG_VERBOSE(
" nunspoil and local_max_chi " << nunspoil <<
" " << local_max_chi <<
" " <<
keep <<
" " << seg.
s1
1132 ATH_MSG_VERBOSE(
" Segment measphi? " << measphi <<
" chsq:" << seg.
chsq <<
" abs(seg.s1) " << std::abs(seg.
s1)
1134 <<
" keep? " <<
keep);
◆ find_outlier_cluster()
Definition at line 390 of file CscSegmentUtilTool.cxx.
394 double chsq_reference = 10000;
399 for (
unsigned int ire = 0; ire < clus.size(); ire++) {
402 if (isunspoiled) ++nunspoil;
404 for (
unsigned int itr = 0; itr < clus.size(); itr++)
405 if (ire != itr) fitclus.push_back(clus[itr]);
407 ATH_MSG_VERBOSE(
" find_outlier_cluster drop ire " << ire <<
" fitclus size " << fitclus.size());
410 fit_segment(fitclus, lpos000, s0,
s1,
d0,
d1, d01, chsq,
time, dtime, zshift, ctx);
411 if (chsq < chsq_reference && isunspoiled) {
412 chsq_reference = chsq;
416 if (remclu_ind >= 0)
ATH_MSG_VERBOSE(
" new chsq " << ire <<
" " << chsq <<
" @" << remclu_ind);
422 ATH_MSG_VERBOSE(
" Number of unspoiled cluster is " << nunspoil <<
" which is not enough!! At least 3 unspoiled hits required!! ");
426 returned_chsq = 99999;
427 if (remclu_ind >= 0) {
430 for (
unsigned int ire = 0; ire < clus.size(); ire++) fitclus.push_back(clus[ire]);
432 ATH_MSG_VERBOSE(
" final fit outlier_cluster drop cluster index " << remclu_ind <<
" fitclus.size " << fitclus.size());
435 fit_segment(fitclus, lpos000, s0,
s1,
d0,
d1, d01, chsq,
time, dtime, zshift, ctx, remclu_ind);
436 returned_chsq = chsq;
◆ fit_detailCalcPart1()
void CscSegmentUtilTool::fit_detailCalcPart1 |
( |
const ICscSegmentFinder::TrkClusters & |
clus, |
|
|
const Amg::Vector3D & |
lpos000, |
|
|
double & |
s0, |
|
|
double & |
s1, |
|
|
double & |
d0, |
|
|
double & |
d1, |
|
|
double & |
d01, |
|
|
double & |
chsq, |
|
|
bool & |
measphi, |
|
|
double & |
time, |
|
|
double & |
dtime, |
|
|
double & |
zshift, |
|
|
bool |
IsSlopeGive, |
|
|
int |
outlierHitLayer, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 226 of file CscSegmentUtilTool.cxx.
235 for (ICscSegmentFinder::TrkClusters::const_iterator iclu = clus.begin(); iclu != clus.end(); ++iclu) {
243 double y =
cl.locY();
245 double x =
cl.locX();
254 if (IsSlopeGiven && outlierHitLayer != (iclu - clus.begin()))
259 double w = 1.0 / (
d *
d);
264 if (q0 > 0.) zshift = q1 / q0;
277 double x = lpos000.z();
278 double y = measphi ? lpos000.x() : lpos000.y();
283 double w = 1.0 / (
d *
d);
285 q1 +=
w * (
x - zshift);
286 q2 +=
w * (
x - zshift) * (
x - zshift);
288 q11 +=
w * (
x - zshift) *
y;
292 int cntSuccessHit = 0;
293 double sumHitTimes = 0.;
294 double sumHitTimeSquares = 0.;
298 float latestEarlyTime = -9999;
299 float earliestLateTime = 9999;
300 for (ICscSegmentFinder::TrkClusters::const_iterator iclu = clus.begin(); iclu != clus.end(); ++iclu) {
308 double y =
cl.locY();
310 double x =
cl.locX();
319 if (IsSlopeGiven)
d =
m_rotCreator->GetICscClusterFitter()->getCorrectedError(prd,
s1);
320 if (outlierHitLayer == (iclu - clus.begin()))
d =
getDefaultError(
id, measphi, prd, ctx);
325 double w = 1.0 / (
d *
d);
327 q1 +=
w * (
x - zshift);
328 q2 +=
w * (
x - zshift) * (
x - zshift);
330 q11 +=
w * (
x - zshift) *
y;
335 sumHitTimes += prd->
time();
341 if (latestEarlyTime < prd->
time()) latestEarlyTime = prd->
time();
346 if (earliestLateTime > prd->
time()) earliestLateTime = prd->
time();
350 ATH_MSG_DEBUG(
" Time Calculation!!! " << cntSuccessHit <<
" " << cntEarlyHit <<
" " << cntLateHit <<
" " << sumHitTimes <<
" "
351 << latestEarlyTime <<
" " << earliestLateTime);
353 if (cntSuccessHit > 0) {
354 time = sumHitTimes /
float(cntSuccessHit);
355 float timeSquare = sumHitTimeSquares /
float(cntSuccessHit);
360 dtime = std::sqrt(dtime);
362 if (cntEarlyHit > 0 && cntLateHit > 0) {
365 ATH_MSG_DEBUG(
"Segment has nonzero earlyHits and nonzero lateHits. This should be backgrounds!!");
366 }
else if (cntEarlyHit > 0) {
367 time = latestEarlyTime;
368 dtime = std::abs(latestEarlyTime);
369 }
else if (cntLateHit > 0) {
370 time = earliestLateTime;
371 dtime = earliestLateTime;
375 ATH_MSG_DEBUG(
"Every Hit is CscTimeUnavailable or CscTimeStatusUndefined!!! Should be investigated");
383 if (IsSlopeGiven && q2 * q0 - q1 * q1 == 0.0)
return;
385 fit_detailCalcPart2(q0, q1, q2, q01, q11, q02, s0,
s1,
d0,
d1, d01, chsq);
◆ fit_detailCalcPart2()
void CscSegmentUtilTool::fit_detailCalcPart2 |
( |
double |
q0, |
|
|
double |
q1, |
|
|
double |
q2, |
|
|
double |
q01, |
|
|
double |
q11, |
|
|
double |
q02, |
|
|
double & |
s0, |
|
|
double & |
s1, |
|
|
double & |
d0, |
|
|
double & |
d1, |
|
|
double & |
d01, |
|
|
double & |
chsq |
|
) |
| const |
|
private |
Definition at line 1597 of file CscSegmentUtilTool.cxx.
1601 if (q2 * q0 - q1 * q1 == 0.0) {
1611 double r00 = q2 / (q2 * q0 - q1 * q1);
1612 double r01 = q1 / (q1 * q1 - q2 * q0);
1613 double r10 = q1 / (q1 * q1 - q0 * q2);
1614 double r11 = q0 / (q0 * q2 - q1 * q1);
1615 s0 = r01 * q11 + r00 * q01;
1616 s1 = r11 * q11 + r10 * q01;
1617 d0 = r01 * r01 * q2 + 2.0 * r00 * r01 * q1 + r00 * r00 * q0;
1619 d0 = -1.0 * std::sqrt(-1.0 *
d0);
1623 d1 = r11 * r11 * q2 + 2.0 * r10 * r11 * q1 + r10 * r10 * q0;
1625 d1 = -1.0 * std::sqrt(-1.0 *
d1);
1628 d01 = r01 * r11 * q2 + (r01 * r10 + r00 * r11) * q1 + r00 * r10 * q0;
1629 chsq = q02 +
s1 *
s1 * q2 + 2 *
s0 *
s1 * q1 +
s0 *
s0 * q0 - 2 *
s0 * q01 - 2 *
s1 * q11;
1632 ATH_MSG_VERBOSE(
" details s1 = " <<
s1 <<
" " <<
d1 <<
" " << d01 <<
" => " << r11 <<
" " << r10 <<
"chsq = " << chsq);
◆ fit_residual()
Definition at line 450 of file CscSegmentUtilTool.cxx.
455 for (
unsigned int iclu = 0; iclu < clus.size(); ++iclu) {
456 if (iclu != irclu) fitclus.push_back(clus[iclu]);
460 fit_segment(fitclus, lpos000, s0,
s1,
d0,
d1, d01, chsq,
time, dtime, zshift, ctx);
466 double y = clus[irclu].locY();
471 double x = clus[irclu].locX();
476 if (
d0 < 0 ||
d1 < 0) {
481 double seg_y =
s0 +
s1 *
x;
482 double seg_dsquare =
d0 *
d0 + 2.0 *
x * d01 +
d1 *
d1 *
x *
x;
485 dres =
d *
d + seg_dsquare;
487 ATH_MSG_VERBOSE(
" fit_residual d0:d01:d1 :: seg_dsquare:dres " <<
d0 <<
" " << d01 <<
" " <<
d1 <<
" :: " << seg_dsquare <<
" "
491 dres = -1.0 * std::sqrt(-1.0 * dres);
493 dres = std::sqrt(dres);
◆ fit_rio_residual() [1/2]
Definition at line 603 of file CscSegmentUtilTool.cxx.
605 ATH_MSG_DEBUG(
"CscSegmentUtilTool::fit_rio_segment called ");
609 for (
unsigned int irio = 0; irio < rios.size(); ++irio) {
610 if (irio != irrio) fitrios.push_back(rios[irio]);
612 if ((irrio == 1) && (irio == 0 || irio == 2)) fitrios3pt.push_back(rios[irio]);
613 if ((irrio == 2) && (irio == 1 || irio == 3)) fitrios3pt.push_back(rios[irio]);
616 double s0,
s1,
d0,
d1, d01, chsq, zshift;
623 double y = msmt[iloc];
638 double seg_y =
s0 +
s1 *
x;
639 double seg_dsquare =
d0 *
d0 + 2.0 *
x * d01 +
d1 *
d1 *
x *
x;
642 dres =
d *
d + seg_dsquare;
644 ATH_MSG_VERBOSE(
" fit_residual d0:d01:d1 :: seg_dsquare:dres " <<
d0 <<
" " << d01 <<
" " <<
d1 <<
" :: " << seg_dsquare <<
" "
648 dres = -1.0 * std::sqrt(-1.0 * dres);
650 dres = std::sqrt(dres);
656 if (irrio == 1 || irrio == 2) {
658 double s0_3pt, s1_3pt, d0_3pt, d1_3pt, d01_3pt, chsq_3pt, zshift_3pt;
659 fit_rio_segment(ssrf,
dump, fitrios3pt, s0_3pt, s1_3pt, d0_3pt, d1_3pt, d01_3pt, chsq_3pt, zshift_3pt);
661 if (d0_3pt < 0 || d1_3pt < 0) {
665 seg_y = s0_3pt + s1_3pt *
x;
666 seg_dsquare = d0_3pt * d0_3pt + 2.0 *
x * d01_3pt + d1_3pt * d1_3pt *
x *
x;
669 drs =
d *
d + seg_dsquare;
671 ATH_MSG_VERBOSE(
" fit_rio_residual d0:d01:d1 :: seg_dsquare:dres " << d0_3pt <<
" " << d01_3pt <<
" " << d1_3pt
672 <<
" :: " << seg_dsquare <<
" " << drs);
675 drs = -1.0 * std::sqrt(-1.0 * drs);
677 drs = std::sqrt(drs);
◆ fit_rio_residual() [2/2]
◆ fit_rio_segment()
Definition at line 504 of file CscSegmentUtilTool.cxx.
506 ATH_MSG_DEBUG(
"CscSegmentUtilTool::fit_rio_segment called: ");
512 for (ICscSegmentFinder::RioList::const_iterator irio = rios.begin(); irio != rios.end(); ++irio) {
517 double y = msmt[iloc];
532 ATH_MSG_VERBOSE(
" RIO global pos: " << gpos.x() <<
" " << gpos.y() <<
" " << gpos.z());
533 ATH_MSG_VERBOSE(
" RIO local pos: " << lpos.x() <<
" " << lpos.y() <<
" " << lpos.z());
538 double w = 1.0 / (
d *
d);
544 if (q0 > 0) zshift = q1 / q0;
555 for (ICscSegmentFinder::RioList::const_iterator irio = rios.begin(); irio != rios.end(); ++irio) {
560 double y = msmt[iloc];
576 ATH_MSG_VERBOSE(
" RIO global pos: " << gpos.x() <<
" " << gpos.y() <<
" " << gpos.z());
577 ATH_MSG_VERBOSE(
" RIO local pos: " << lpos.x() <<
" " << lpos.y() <<
" " << lpos.z());
582 double w = 1.0 / (
d *
d);
584 q1 +=
w * (
x - zshift);
585 q2 +=
w * (
x - zshift) * (
x - zshift);
587 q11 +=
w * (
x - zshift) *
y;
592 fit_detailCalcPart2(q0, q1, q2, q01, q11, q02, s0,
s1,
d0,
d1, d01, chsq);
◆ fit_segment()
void CscSegmentUtilTool::fit_segment |
( |
const ICscSegmentFinder::TrkClusters & |
clus, |
|
|
const Amg::Vector3D & |
lpos000, |
|
|
double & |
s0, |
|
|
double & |
s1, |
|
|
double & |
d0, |
|
|
double & |
d1, |
|
|
double & |
d01, |
|
|
double & |
chsq, |
|
|
double & |
time, |
|
|
double & |
dtime, |
|
|
double & |
zshift, |
|
|
const EventContext & |
ctx, |
|
|
int |
outlierLayer = -1 |
|
) |
| const |
|
private |
Definition at line 209 of file CscSegmentUtilTool.cxx.
214 bool measphi =
false;
215 fit_detailCalcPart1(clus, lpos000, s0,
s1,
d0,
d1, d01, chsq, measphi,
time, dtime, zshift,
false, outlierHitLayer,
219 fit_detailCalcPart1(clus, lpos000, s0,
s1,
d0,
d1, d01, chsq, measphi,
time, dtime, zshift,
true, outlierHitLayer,
◆ get2dMuonSegmentCombination()
Implements ICscSegmentUtilTool.
Definition at line 148 of file CscSegmentUtilTool.cxx.
153 int nGoodEta = 0, nGoodPhi = 0;
154 for (
int i = 0;
i < 4; ++
i) {
155 ATH_MSG_DEBUG(
"get2dMuonSegmentCombination2: No of clusters in layer " <<
i <<
" " << eta_clus[
i].
size() <<
" "
156 << phi_clus[
i].
size());
161 if (nGoodEta < 2 && nGoodPhi < 2) {
162 ATH_MSG_DEBUG(
" Not enough hits in either eta or phi to form a segment");
174 get2dSegments(eta_id, phi_id, eta_clus, phi_clus, eta_segs, phi_segs, lpos000, ctx, etaStat, phiStat);
176 for (ICscSegmentFinder::Segments::const_iterator iseg = eta_segs.begin(); iseg != eta_segs.end(); ++iseg) {
177 std::unique_ptr<MuonSegment> pseg(
build_segment(*iseg,
false, eta_id, nGoodEta == 2, ctx));
179 ATH_MSG_DEBUG(
" =============================> get2dMuonSegmentCombination:: MuonSegment time (eta) from build_segment is "
181 psegs->push_back(std::move(pseg));
189 for (ICscSegmentFinder::Segments::const_iterator iseg = phi_segs.begin(); iseg != phi_segs.end(); ++iseg) {
190 std::unique_ptr<MuonSegment> pseg(
build_segment(*iseg,
true, phi_id, nGoodPhi == 2, ctx));
192 ATH_MSG_DEBUG(
" get2dMuonSegmentCombination:: MuonSegment time (phi) from build_segment is " << pseg->time());
193 phisegs->push_back(std::move(pseg));
196 ATH_MSG_DEBUG(
"added " << phisegs->size() <<
" phi segments");
200 ATH_MSG_DEBUG(
"Added " << eta_segs.size() <<
" r-segments and " << phi_segs.size() <<
" phi-segments.");
◆ get2dSegments()
Definition at line 2015 of file CscSegmentUtilTool.cxx.
2025 int col_station =
m_idHelperSvc->cscIdHelper().stationName(chId) - 49;
2026 int col_eta =
m_idHelperSvc->cscIdHelper().stationEta(chId);
2027 int col_phisec =
m_idHelperSvc->cscIdHelper().stationPhi(chId);
2029 ATH_MSG_DEBUG(
"get2dSegments called " << eta_id <<
" " << phi_id <<
" " << col_station <<
" " << col_eta <<
" " << col_phisec
2030 <<
" " << etaStat <<
" " << phiStat <<
" "
2031 <<
" Counts: " << eta_clus[0].
size() <<
" " << eta_clus[1].
size() <<
" " << eta_clus[2].
size()
2032 <<
" " << eta_clus[3].
size());
2036 double pos_eta = -999;
2037 double slope_eta = -999;
2038 double pos_phi = -999;
2039 double slope_phi = -999;
2042 find_2dsegments(
false, col_station, col_eta, col_phisec, eta_clus, lpos000, eta_segs, pos_eta, slope_eta, ctx);
2043 find_2dsegments(
true, col_station, col_eta, col_phisec, phi_clus, lpos000, phi_segs, pos_phi, slope_phi, ctx);
2046 find_2dseg3hit(
false, col_station, col_eta, col_phisec, eta_clus, lpos000, eta_segs3hit, eta_segs, pos_eta, slope_eta, ctx);
2047 find_2dseg3hit(
true, col_station, col_eta, col_phisec, phi_clus, lpos000, phi_segs3hit, phi_segs, pos_phi, slope_phi, ctx);
2053 int nGoodEta = 0, nGoodPhi = 0;
2054 for (
int i = 0;
i < 4; ++
i) {
2058 if (nGoodEta == 2) {
2063 find_2dseg2hit(
false, col_station, col_eta, col_phisec, etaStat, eta_clus, lpos000, eta_segs2hit, pos_eta, slope_eta, ctx);
2069 if (nGoodPhi == 2) {
2073 find_2dseg2hit(
true, col_station, col_eta, col_phisec, phiStat, phi_clus, lpos000, phi_segs2hit, pos_phi, slope_phi, ctx);
◆ get4dMuonSegmentCombination() [1/2]
Implements ICscSegmentUtilTool.
Definition at line 1635 of file CscSegmentUtilTool.cxx.
1643 ATH_MSG_DEBUG(
" Combination has r/phi segments " << rsegs.size() <<
" / " << phisegs.size());
1644 ATH_MSG_DEBUG(
"chamber has " << insegs->getNGoodCscLayers(1) <<
" good eta layers and " << insegs->getNGoodCscLayers(0)
1645 <<
" good phi layers");
1647 if ((rsegs.empty() && insegs->useStripsInSegment(1)) || (phisegs.empty() && insegs->useStripsInSegment(0))) {
1648 ATH_MSG_DEBUG(
" Station does not have a r/phi segment, cannot make 4d segment ");
1655 if (insegs->useStripsInSegment(1) && insegs->useStripsInSegment(0)) {
1656 for (ICscSegmentFinder::SegmentVec::const_iterator irsg = rsegs.begin(); irsg != rsegs.end(); ++irsg) {
1657 for (ICscSegmentFinder::SegmentVec::const_iterator ipsg = phisegs.begin(); ipsg != phisegs.end(); ++ipsg) {
1684 ATH_MSG_DEBUG(
"Segment rejected too low likelihood: " << xylike);
1689 std::unique_ptr<MuonSegment> pseg(
make_4dMuonSegment(rsg, psg, insegs->use2LayerSegments(1), insegs->use2LayerSegments(0)));
1692 pnewsegs->push_back(std::move(pseg));
1696 }
else if (!insegs->useStripsInSegment(0)) {
1697 for (ICscSegmentFinder::SegmentVec::const_iterator irsg = rsegs.begin(); irsg != rsegs.end(); ++irsg) {
1699 unsigned int nMinRIOs = 3;
1700 if (insegs->use2LayerSegments(1)) nMinRIOs = 2;
1703 <<
", RIO's, insufficient to build the 4d segment from a single eta segment");
1706 std::unique_ptr<MuonSegment> pseg(
new MuonSegment(rsg));
1708 pnewsegs->push_back(std::move(pseg));
1710 }
else if (!insegs->useStripsInSegment(1)) {
1711 for (ICscSegmentFinder::SegmentVec::const_iterator ipsg = phisegs.begin(); ipsg != phisegs.end(); ++ipsg) {
1713 unsigned int nMinRIOs = 3;
1714 if (insegs->use2LayerSegments(0)) nMinRIOs = 2;
1717 <<
", RIO's, insufficient to build the 4d segment from a single phi segment");
1720 std::unique_ptr<MuonSegment> pseg(
new MuonSegment(psg));
1722 pnewsegs->push_back(std::move(pseg));
1726 if (pnewsegs->empty()) {
1729 ATH_MSG_DEBUG(
"created " << pnewsegs->size() <<
" new 4d segments");
◆ get4dMuonSegmentCombination() [2/2]
◆ getDefaultError()
Definition at line 2147 of file CscSegmentUtilTool.cxx.
2148 const std::vector<Identifier>& strip_ids = prd->
rdoList();
2149 unsigned int nstrip = strip_ids.size();
2152 if (MuonDetMgr ==
nullptr) {
2153 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
2159 double wmeas = pitch * nstrip;
2160 double weff = wmeas - 20;
2161 double weffmin = 0.5 * wmeas;
2162 if (weff < weffmin) weff = weffmin;
2163 double err = weff / std::sqrt(12.0);
◆ getMuonSegments()
Implements ICscSegmentUtilTool.
Definition at line 116 of file CscSegmentUtilTool.cxx.
119 if (!enoughHitLayers(eta_clus, phi_clus)) {
120 ATH_MSG_DEBUG(
" Could not find at least two individual layer hits! ");
121 std::unique_ptr<std::vector<std::unique_ptr<MuonSegment> > > segments;
125 for (
int i = 0;
i < 4; ++
i)
126 ATH_MSG_DEBUG(
"getMuonSegments2: No of clusters in layer " <<
i <<
" " << eta_clus[
i].
size() <<
" " << phi_clus[
i].
size());
128 ATH_MSG_DEBUG(
"getMuonSegments called get2dMuonSegmentCombination");
129 std::unique_ptr<MuonSegmentCombination> Muon2dSegComb(
get2dMuonSegmentCombination(eta_id, phi_id, eta_clus, phi_clus, lpos000, ctx));
131 ATH_MSG_DEBUG(
"getMuonSegments called get4dMuonSegmentCombination");
134 std::unique_ptr<std::vector<std::unique_ptr<MuonSegment> > > segments_clone(
new std::vector<std::unique_ptr<MuonSegment> >);
137 std::vector<std::unique_ptr<MuonSegment> >* segments = Muon4dSegComb->stationSegments(0);
139 if (!segments->empty()) {
140 for (
unsigned int i = 0;
i < segments->size(); ++
i) { segments_clone->push_back(std::move(segments->at(
i))); }
144 return segments_clone;
◆ getRios()
◆ initialize()
StatusCode CscSegmentUtilTool::initialize |
( |
| ) |
|
|
virtual |
◆ 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.
◆ interfaceID()
static const InterfaceID& ICscSegmentUtilTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ isGood()
bool CscSegmentUtilTool::isGood |
( |
const uint32_t |
stripHashId, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
privatevirtual |
◆ make_4dMuonSegment()
Definition at line 1754 of file CscSegmentUtilTool.cxx.
1785 cov(0, 0) = phicov(0, 0);
1786 cov(2, 2) = phicov(2, 2);
1787 cov(0, 2) = phicov(0, 2);
1789 cov(1, 1) = rcov(0, 0);
1790 cov(3, 3) = rcov(2, 2);
1791 cov(1, 3) = rcov(0, 2);
1792 cov(3, 1) = rcov(1, 3);
1806 xf.pretranslate(glop);
1810 }
else if (bnd_rtrap) {
1813 ATH_MSG_WARNING(
" no SurfaceBounds bounds for 4D segment found keep old bound ");
1822 ATH_MSG_VERBOSE(
" positions in NEW Eta frame for phi measurement x " << phietalpos.x() <<
" y " << phietalpos.y() <<
" z shift "
1823 << phietalpos.z() <<
" angleXZ " << phidir);
1824 double phiposNew = phietalpos.x() - phidir * phietalpos.z();
1826 ATH_MSG_VERBOSE(
" positions old z " << phipos <<
" New frame " << phietalpos.x() <<
" corrected " << phiposNew);
1836 unsigned int nMinRIOsEta = 3, nMinRIOsPhi = 3;
1837 if (use2LaySegsEta) nMinRIOsEta = 2;
1838 if (use2LaySegsPhi) nMinRIOsPhi = 2;
1839 if (etarios.size() >= nMinRIOsEta && phirios.size() >= nMinRIOsPhi) {
1841 ATH_MSG_DEBUG(
" eta/phi segment sizes: " << etarios.size() <<
" " << phirios.size());
1844 int maxeta = etarios.size();
1845 int maxphi = phirios.size();
1848 int eta_matchcode = 6;
1849 int phi_matchcode = 6;
1850 if (maxeta == 3) eta_matchcode = 3;
1851 if (maxphi == 3) phi_matchcode = 3;
1852 int eta_match = 0, phi_match = 0;
1856 for (
int ieta = 0; ieta < maxeta; ieta++) {
1857 for (
int iphi = 0; iphi < maxphi; iphi++) {
1864 int iw_eta =
m_idHelperSvc->cscIdHelper().wireLayer(id_eta);
1865 int iw_phi =
m_idHelperSvc->cscIdHelper().wireLayer(id_phi);
1868 if (iw_eta != iw_phi) {
continue; }
1886 << std::setprecision(9) <<
" etapos: r " << etapold->
globalPosition().perp() <<
" z "
1888 << surf << std::endl
1892 <<
" locpos " << locPos.x() <<
" " << locPos.y() <<
" " << locPos.z() <<
" locposS " << locPosS.x()
1893 <<
" " << locPosS.y() <<
" " << locPosS.z() <<
" inbounds " << surf.
insideBounds(lpn) <<
" normals "
1895 << locNorm.x() <<
" " << locNorm.y() <<
" " << locNorm.z());
1902 eta_matchcode -= ieta;
1903 phi_matchcode -= iphi;
1913 rios.push_back(etaRot);
1916 rios.push_back(phiRot);
1929 int eta_single = maxeta - eta_match;
1930 int phi_single = maxphi - phi_match;
1932 ATH_MSG_DEBUG(
" eta_single, phi_single: " << eta_single <<
" " << phi_single <<
" eta_matchcode, phi_matchcode: " << eta_matchcode
1933 <<
" " << phi_matchcode);
1937 if (eta_single == 1) {
1938 if (eta_matchcode >= 0 && eta_matchcode < 4) {
1941 rios.push_back(pnew);
1945 else if (eta_single > 1) {
1949 if (eta_single != 0) {
1950 ATH_MSG_DEBUG(
"eta hit in a 2-layer segment not matched, bailing");
1958 if (phi_single == 1) {
1959 if (phi_matchcode >= 0 && phi_matchcode < 4) {
1962 rios.push_back(pnew);
1966 else if (phi_single > 1) {
1970 if (phi_single != 0) {
1971 ATH_MSG_DEBUG(
"phi hit in a 2-layer segment not matched, bailing");
1977 ATH_MSG_WARNING(
"Unexpected input RIO counts: " << etarios.size() <<
" " << phirios.size());
1978 for (ICscSegmentFinder::RioList::const_iterator irio = etarios.begin(); irio != etarios.end(); ++irio) {
1981 rios.push_back(pnew);
1983 for (ICscSegmentFinder::RioList::const_iterator irio = phirios.begin(); irio != phirios.end(); ++irio) {
1986 rios.push_back(pnew);
1990 unsigned int nMinRIOsTot = 5;
1991 if (use2LaySegsEta || use2LaySegsPhi) nMinRIOsTot = 4;
1992 if (rios.size() < nMinRIOsTot) {
1993 ATH_MSG_WARNING(
"too few CSC hits collected, not making segment: rios " << rios.size());
◆ matchLikelihood()
Definition at line 2168 of file CscSegmentUtilTool.cxx.
2174 int maxeta = etarios.size();
2175 int maxphi = phirios.size();
2177 double prob_real = 1, prob_ghost = 1;
2179 for (
int ieta = 0; ieta < maxeta; ieta++) {
2180 for (
int iphi = 0; iphi < maxphi; iphi++) {
2204 int eta_wlay =
m_idHelperSvc->cscIdHelper().wireLayer(eta_sid);
2205 int phi_wlay =
m_idHelperSvc->cscIdHelper().wireLayer(phi_sid);
2208 if (eta_wlay == phi_wlay) {
2210 double eta_chg = eta_prd->
charge();
2211 double phi_chg = phi_prd->
charge();
2213 if (eta_chg > 0 && phi_chg > 0) {
2214 qratio = eta_chg / phi_chg;
2216 prob_ghost *=
pdf_bkg(qratio);
2228 if (
match)
return 0.5;
2229 if (!
match)
return 0.;
◆ 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.
◆ pdf_bkg()
double CscSegmentUtilTool::pdf_bkg |
( |
const double |
x | ) |
|
|
staticprivate |
Definition at line 2253 of file CscSegmentUtilTool.cxx.
2255 double par[8] = {0.0394188, 0.0486057, 0.0869231, 1.16153, -0.109998, 0.009729, 0.36183, 0.228344};
2258 if (
x > 10)
return 0.0895146;
◆ pdf_sig()
double CscSegmentUtilTool::pdf_sig |
( |
const double |
x | ) |
|
|
staticprivate |
Definition at line 2235 of file CscSegmentUtilTool.cxx.
2237 double par[6] = {1.25049, 1.02934, 0.0517436, 0.0229711, 0.900799, 0.374422};
2240 if (
x > 10)
return 0.015619;
◆ qratio_like()
double CscSegmentUtilTool::qratio_like |
( |
const double |
pdf_sig, |
|
|
const double |
pdf_bkg |
|
) |
| |
|
staticprivate |
◆ renounce()
◆ renounceArray()
◆ spoiled_count() [1/6]
Definition at line 694 of file CscSegmentUtilTool.cxx.
697 for (ICscSegmentFinder::RioList::const_iterator irio = rios.begin(); irio != rios.end(); ++irio) {
◆ spoiled_count() [2/6]
Definition at line 712 of file CscSegmentUtilTool.cxx.
715 for (ICscSegmentFinder::RioList::const_iterator irio = rios.begin(); irio != rios.end(); ++irio) {
◆ spoiled_count() [3/6]
Definition at line 730 of file CscSegmentUtilTool.cxx.
735 for (ICscSegmentFinder::RioList::const_iterator irio = rios.begin(); irio != rios.end(); ++irio) {
◆ spoiled_count() [4/6]
virtual void ICscSegmentUtilTool::spoiled_count |
( |
const std::vector< const Trk::RIO_OnTrack * > & |
rios, |
|
|
double |
threshold, |
|
|
int & |
nspoil, |
|
|
int & |
nunspoil |
|
) |
| |
|
pure virtualinherited |
◆ spoiled_count() [5/6]
virtual void ICscSegmentUtilTool::spoiled_count |
( |
const std::vector< const Trk::RIO_OnTrack * > & |
rios, |
|
|
int & |
nspoil, |
|
|
int & |
nunspoil |
|
) |
| |
|
pure virtualinherited |
◆ spoiled_count() [6/6]
virtual void ICscSegmentUtilTool::spoiled_count |
( |
const std::vector< const Trk::RIO_OnTrack * > & |
rios, |
|
|
int & |
nspoil, |
|
|
int & |
nunspoil, |
|
|
int & |
spoilmap |
|
) |
| |
|
pure virtualinherited |
◆ stripStatusBit()
int CscSegmentUtilTool::stripStatusBit |
( |
const uint32_t |
stripHashId, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
private |
Definition at line 2291 of file CscSegmentUtilTool.cxx.
2296 if (!readCdo->readChannelStatus(stripHashId,
status).isSuccess())
2297 ATH_MSG_WARNING(
" failed to access CSC conditions database - status - "
2298 <<
"strip hash id = " << stripHashId);
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ unique_hits()
Method for checking whether three hit segments are already part of 4 hit segments.
Definition at line 2082 of file CscSegmentUtilTool.cxx.
2085 int nclus = fitclus.size();
2086 ATH_MSG_VERBOSE(
" unique_hits nclus " << nclus <<
" segs size " << segs.size());
2088 ICscSegmentFinder::Segments::const_iterator iseg;
2089 for (iseg = segs.begin(); iseg != segs.end(); ++iseg) {
2090 int nhits_common = 0;
2092 for (
int iclus = 0; iclus < iseg->nclus; iclus++) {
2094 ICscSegmentFinder::TrkClusters::const_iterator ihit;
2095 for (ihit = fitclus.begin(); ihit != fitclus.end(); ++ihit) {
◆ updateVHKA()
◆ m_allEtaPhiMatches
Gaudi::Property<bool> CscSegmentUtilTool::m_allEtaPhiMatches {this, "allEtaPhiMatches", true} |
|
private |
◆ m_cluster_error_scaler
Gaudi::Property<float> CscSegmentUtilTool::m_cluster_error_scaler {this, "cluster_error_scaler", 1} |
|
private |
◆ m_DetectorManagerKey
Initial value:{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}
Definition at line 112 of file CscSegmentUtilTool.h.
◆ m_detStore
◆ m_eventInfo
◆ m_evtStore
◆ m_fitsegment_tantheta_tolerance
Gaudi::Property<double> CscSegmentUtilTool::m_fitsegment_tantheta_tolerance {this, "tantheta_update_tolerance", 0.0001} |
|
private |
◆ m_idHelperSvc
◆ m_IPconstraint
Gaudi::Property<bool> CscSegmentUtilTool::m_IPconstraint {this, "IPconstraint", true} |
|
private |
◆ m_IPerror
Gaudi::Property<double> CscSegmentUtilTool::m_IPerror {this, "IPerror", 250} |
|
private |
◆ m_max_3hitseg_sharehit
Gaudi::Property<int> CscSegmentUtilTool::m_max_3hitseg_sharehit {this, "max_3hitseg_sharedhit", 0} |
|
private |
◆ m_max_chisquare
Gaudi::Property<double> CscSegmentUtilTool::m_max_chisquare {this, "max_chisquare", 25} |
|
private |
◆ m_max_chisquare_loose
Gaudi::Property<double> CscSegmentUtilTool::m_max_chisquare_loose {this, "max_chisquare_loose", 2000, "for outlier removal"} |
|
private |
◆ m_max_chisquare_tight
Gaudi::Property<double> CscSegmentUtilTool::m_max_chisquare_tight {this, "max_chisquare_tight", 16, "for outlier removal"} |
|
private |
◆ m_max_seg_per_chamber
Gaudi::Property<unsigned int> CscSegmentUtilTool::m_max_seg_per_chamber {this, "max_seg_per_chamber", 50} |
|
private |
◆ m_max_slope_phi
Gaudi::Property<double> CscSegmentUtilTool::m_max_slope_phi {this, "max_slope_phi", 0.2} |
|
private |
◆ m_max_slope_r
Gaudi::Property<double> CscSegmentUtilTool::m_max_slope_r {this, "max_slope_r", 0.2} |
|
private |
◆ m_min_xylike
Gaudi::Property<double> CscSegmentUtilTool::m_min_xylike {this, "min_xylike", -1, "Minimum value used for xy matching of 4D segments"} |
|
private |
◆ m_nunspoil
Gaudi::Property<int> CscSegmentUtilTool::m_nunspoil {this, "UnspoiledHits", -1} |
|
private |
◆ m_readKey
◆ m_remove3Overlap
Gaudi::Property<bool> CscSegmentUtilTool::m_remove3Overlap {this, "Remove3Overlap", true} |
|
private |
◆ m_remove4Overlap
Gaudi::Property<bool> CscSegmentUtilTool::m_remove4Overlap {this, "Remove4Overlap", true} |
|
private |
◆ m_rotCreator
Initial value:{this, "rot_creator",
"Muon::CscClusterOnTrackCreator/CscClusterOnTrackCreator"}
Definition at line 105 of file CscSegmentUtilTool.h.
◆ m_TightenChi2
Gaudi::Property<bool> CscSegmentUtilTool::m_TightenChi2 {this, "TightenChi2", true} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_x5data
Gaudi::Property<bool> CscSegmentUtilTool::m_x5data {this, "X5data", false} |
|
private |
◆ m_zshift
Gaudi::Property<bool> CscSegmentUtilTool::m_zshift {this, "zshift", true} |
|
private |
The documentation for this class was generated from the following files:
float errorTime() const
access to the error on the measured time
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
void setNGoodCscLayers(int nEta, int nPhi)
def rtime(fn, *args, **kw)
virtual const Amg::Vector3D & globalPosition() const override
Returns global position.
Scalar phi() const
phi method
int charge() const
Returns the charge.
virtual RIO_OnTrack * clone() const override=0
Pseudo-constructor, needed to avoid excessive RTTI.
double e1(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 1st sampling
Scalar eta() const
pseudorapidity method
Eigen::Matrix< double, 2, 1 > Vector2D
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
bool IsUnspoiled(Muon::CscClusterStatus status)
const Trk::RIO_OnTrack * rioOnTrack(unsigned int) const
returns the RIO_OnTrack (also known as ROT) objects depending on the integer
virtual const Amg::Vector3D & globalPosition() const override=0
Interface method to get the global Position.
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
bool msgLvl(const MSG::Level lvl) const
@ loc2
generic first and second local coordinate
DataVector< const Trk::MeasurementBase > MbaseList
#define ATH_MSG_VERBOSE(x)
const Amg::Vector3D & center() const
Returns the center position of the Surface.
MuonSegment_v1 MuonSegment
Reference the current persistent version:
unsigned int numberOfContainedROTs() const
number of RIO_OnTracks
bool is_valid() const
Check if id is in a valid state.
std::pair< double, ParamDefs > DefinedParameter
virtual void setOwner(IDataHandleHolder *o)=0
CscTimeStatus timeStatus() const
Returns the Csc time status flag.
@ CscTimeLate
Not successful time measurement but samples indicates late time above 200ns in RAW time.
Class representing clusters from the CSC.
virtual CscClusterOnTrack * clone() const override final
Clone this ROT.
const Trk::LocalDirection & localDirection() const
local direction
Eigen::Affine3d Transform3D
CscClusterStatus status() const
Returns the Csc status (position measurement) flag.
std::pair< std::vector< unsigned int >, bool > res
void setT0Error(float t0, float t0Error)
set the fitted time and error on the time
std::vector< Cluster > TrkClusters
virtual const Amg::Vector3D & normal() const
Returns the normal vector of the Surface (i.e.
Muon::MuonSegmentCombination::SegmentVec SegmentVec
double time() const
Returns the time.
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
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.
std::vector< Segment > Segments
represents the three-dimensional global direction with respect to a planar surface frame.
const Amg::MatrixX & localCovariance() const
Interface method to get the localError.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
float time() const
Return the time(ns)
@ CscTimeSuccess
Time measurement is successful to use.
Identifier identify() const
return the identifier
virtual SurfaceBounds * clone() const =0
clone() method to make deep copy in Surface copy constructor and for assigment operator of the Surfac...
double error(const Amg::MatrixX &mat, int index)
return diagonal error of the matrix caller should ensure the matrix is symmetric and the index is in ...
const Amg::Vector2D & localPosition() const
return the local position reference
value_type push_back(value_type pElem)
Add an element to the end of the collection.
StatusCode initialize(bool used=true)
virtual bool insideBounds(const Amg::Vector2D &locpos, double tol1=0., double tol2=0.) const =0
virtual methods to be overwritten by the inherited surfaces
Eigen::Matrix< double, 3, 1 > Vector3D
virtual const Trk::PrepRawData * prepRawData() const =0
returns the PrepRawData (also known as RIO) object to which this RIO_OnTrack is associated.
virtual const CscPrepData * prepRawData() const override final
Returns the CscPrepData - is a CscPrepData in this scope.
const LocalParameters & localParameters() const
Interface method to get the LocalParameters.
bool addSegments(std::unique_ptr< SegmentVec >)
Add a set of Segments for a give station.
virtual MuonSegment * clone() const override final
needed to avoid excessive RTTI
SegmentAmbiSolver::SegmentVec SegmentVec
Class to represent the calibrated clusters created from CSC strips.
virtual bool globalToLocal(const Amg::Vector3D &glob, const Amg::Vector3D &mom, Amg::Vector2D &loc) const =0
Specified by each surface type: GlobalToLocal method without dynamic memory allocation - boolean chec...
def time(flags, cells_name, *args, **kw)
double e2(const xAOD::CaloCluster &cluster)
return the uncorrected cluster energy in 2nd sampling
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
#define ATH_MSG_WARNING(x)
virtual const SurfaceBounds & bounds() const override final
This method returns the bounds by reference, static NoBounds in case of no boundaries.
Identifier identify() const
return the identifier -extends MeasurementBase
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
double chiSquared() const
returns the of the overall track fit
int numberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as integer
virtual const Amg::Vector3D & globalPosition() const override final
global position
virtual const Surface & associatedSurface() const override=0
returns the surface for the local to global transformation
float time() const
access to the measured time
double angleXZ() const
access method for angle of local XZ projection
const FitQuality * fitQuality() const
return the FitQuality object, returns NULL if no FitQuality is defined
virtual const Trk::SurfaceBounds & bounds() const override
Return the boundaries of the element.
const Amg::Transform3D & transform() const
Returns HepGeom::Transform3D by reference.
string station_name
Simple script to generate a BIS78 cabling map as used for the Monte Carlo processing.
Polygon globalToLocal(const Polygon &pol, float z, const Trk::PlaneSurface &surf)
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
std::vector< const Trk::RIO_OnTrack * > RioList
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual PlaneSurface * clone() const override
Virtual constructor.
@ CscTimeEarly
Not successful time measurement but samples indicates early time below -50ns in RAW time.
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
bool match(std::string s1, std::string s2)
match the individual directories of two strings
virtual const Trk::PlaneSurface & associatedSurface() const override final
returns the surface for the local to global transformation
const Amg::Vector3D & globalDirection() const
global direction
double cathodeReadoutPitch(int chLayer, int measuresPhi) const