|
ATLAS Offline Software
|
#include <MuonHoughPatternFinderTool.h>
|
struct | Hists |
| pointer to the CSC segment combination collection More...
|
|
|
| MuonHoughPatternFinderTool (const std::string &, const std::string &, const IInterface *) |
| constructor More...
|
|
virtual | ~MuonHoughPatternFinderTool () |
| destructor More...
|
|
virtual StatusCode | initialize () override |
| initialize More...
|
|
virtual StatusCode | finalize () override |
| finalize More...
|
|
MuonPatternHoughPair | find (const std::vector< const MdtPrepDataCollection * > &mdtCols, const std::vector< const CscPrepDataCollection * > &cscCols, const std::vector< const TgcPrepDataCollection * > &tgcCols, const std::vector< const RpcPrepDataCollection * > &rpcCols, const MuonSegmentCombinationCollection *cscSegmentCombis, const EventContext &ctx) const override |
| find patterns for a give set of MuonPrepData collections + optionally CSC segment combinations More...
|
|
MuonPatternHoughPair | find (const MdtPrepDataContainer *mdtCont, const CscPrepDataContainer *cscCols, const TgcPrepDataContainer *tgcCont, const RpcPrepDataContainer *rpcCont, const sTgcPrepDataContainer *stgcCont, const MMPrepDataContainer *mmCont, const EventContext &ctx) const override |
|
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 |
|
|
MuonPatternHoughPair | find (const EventContext &ctx, const std::vector< const MdtPrepDataCollection * > &mdtCols, const std::vector< const CscPrepDataCollection * > &cscCols, const std::vector< const TgcPrepDataCollection * > &tgcCols, const std::vector< const RpcPrepDataCollection * > &rpcCols, const std::vector< const sTgcPrepDataCollection * > &stgcCols, const std::vector< const MMPrepDataCollection * > &mmCols, const MuonSegmentCombinationCollection *cscSegmentCombis) const |
|
template<class T > |
std::vector< const MuonPrepDataCollection< T > * > | stdVec (const MuonPrepDataContainerT< T > *cont) const |
|
std::unique_ptr< MuonHoughHitContainer > | getAllHits (const std::vector< const MdtPrepDataCollection * > &mdtCols, const std::vector< const TgcPrepDataCollection * > &tgcCols, const std::vector< const RpcPrepDataCollection * > &rpcCols, const MuonSegmentCombinationCollection *cscSegmentCombis, std::map< int, std::vector< std::pair< int, int >>> &rpcmdtstationmap, std::map< int, std::vector< std::pair< int, int >>> &tgcmdtstationmap, EtaPhiHitAssocMap &phietahitassociation) const |
| retrieves all hits and converts them into internal EDM More...
|
|
std::unique_ptr< MuonPatternCombinationCollection > | analyse (const EventContext &ctx, const MuonHoughHitContainer &hitcontainer, const EtaPhiHitAssocMap &phietahitassociation) const |
| analyse hits More...
|
|
void | record (std::unique_ptr< MuonPrdPatternCollection > &patCol, const SG::WriteHandleKey< MuonPrdPatternCollection > &key, const EventContext &ctx) const |
| record patterncollection to storegate or deletes collection when m_recordAllOutput is false More...
|
|
void | addRpcCollection (const RpcPrepDataCollection *rpc_coll, MuonHoughHitContainer &hitcontainer, std::map< int, std::vector< std::pair< int, int >>> &rpcmdtstationmap, EtaPhiHitAssocMap &phietahitassociation) const |
| convert and add rpc preprawdata collection (1 chamber) More...
|
|
void | addMdtCollection (const MdtPrepDataCollection *mdt_coll, MuonHoughHitContainer &hitcontainer, std::map< int, std::vector< std::pair< int, int >>> &rpcmdtstationmap, std::map< int, std::vector< std::pair< int, int >>> &tgcmdtstationmap) const |
| convert and add mdt preprawdata collection (1 chamber) More...
|
|
void | addCscCollection (const CscPrepDataCollection *csc_coll, MuonHoughHitContainer &hitcontainer, EtaPhiHitAssocMap &phietahitassociation) const |
| convert and add csc preprawdata collection (1 chamber) More...
|
|
template<class CollContainer > |
void | addCollection (const CollContainer &cont, MuonHoughHitContainer &hitcontainer, EtaPhiHitAssocMap &phietahitassociation) const |
| Inserts the Prds into the Hough container & fills the eta phi association map. More...
|
|
template<class CollContainer > |
void | addCollections (const std::vector< const CollContainer * > &colls, MuonHoughHitContainer &hitcontainer, EtaPhiHitAssocMap &phietahitassociation) const |
|
void | addTgcCollection (const Muon::TgcPrepDataCollection *, MuonHoughHitContainer &hitcontainer, std::map< int, std::vector< std::pair< int, int >>> &tgcmdtstationmap, EtaPhiHitAssocMap &phietahitassociation) const |
| convert and add tgc preprawdata collection (1 chamber) More...
|
|
void | fastSegmentFinder (TrkDriftCircleMath::DCVec &dcs, int &nl1, int &nl2, double &angleDif, std::vector< int > &sel) const |
| finds best segment for given driftcircle vector (nl1/2 = number of dc's in ml 1 and 2, angledif is difference between angle of segment and chamberangle, sel is vector of selected hits (0 not selected, 1 selected) More...
|
|
int | calculateStationCode (const Identifier) const |
| calculateStationCode(const Identifier) More...
|
|
void | updateRpcMdtStationMap (const Identifier rpcid, int hit_begin, int hit_end, std::map< int, std::vector< std::pair< int, int >>> &rpcmdtstationmap) const |
| update station map for rpc chamber, with id of chamber, and size of hits in rpc chamber More...
|
|
void | updateTgcMdtStationMap (const Identifier tgcid, int hit_begin, int hit_end, std::map< int, std::vector< std::pair< int, int >>> &tgcmdtstationmap) const |
| update station map for tgc chamber, with id of chamber, and size of hits in tgc chamber More...
|
|
int | stationCode (const Identifier &id) const |
| calculates an unique stationcode integer (own convention) More...
|
|
Hists & | getHists () 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...
|
|
|
static int | stationCode (int stationname, int phi, int eta) |
| calculates an unique stationcode integer (own convention) More...
|
|
static void | addToStationMap (std::map< int, std::vector< std::pair< int, int >>> &stationmap, std::map< int, std::vector< std::pair< int, int >>>::iterator &it, int &stationcode, const int &hit_begin, const int &hit_end) |
|
|
ToolHandle< IMuonHoughPatternTool > | m_muonHoughPatternTool {this, "muonHoughPatternTool",""} |
| Pointer to concrete tool. More...
|
|
ToolHandle< Muon::IMuonCombinePatternTool > | m_muonCombinePatternTool |
| Pointer to concrete tool. More...
|
|
ServiceHandle< Muon::IMuonIdHelperSvc > | m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"} |
|
PublicToolHandle< Muon::MuonEDMPrinterTool > | m_printer |
|
Gaudi::Property< bool > | m_hit_reweights {this, "HitReweights", true} |
| reweight hits (true) More...
|
|
Gaudi::Property< bool > | m_mdt_adc_cut {this, "MDT_ADC_cut", true} |
| use adc cut (true) More...
|
|
Gaudi::Property< int > | m_mdt_adc_min {this, "MDT_ADC_value", 50} |
| value of adc cut (50) More...
|
|
Gaudi::Property< bool > | m_mdt_tdc_cut {this, "MDT_TDC_cut", true} |
| use tdc cut (false) More...
|
|
Gaudi::Property< bool > | m_use_rpc {this, "RPC", true} |
| use rpc preprawdata (true) More...
|
|
Gaudi::Property< bool > | m_use_tgc {this, "TGC", true} |
| use tgc preprawdata (true) More...
|
|
Gaudi::Property< bool > | m_use_csc {this, "CSC", true} |
| use csc preprawdata (true) More...
|
|
Gaudi::Property< bool > | m_use_mdt {this, "MDT", true} |
| use mdt preprawdata (true) More...
|
|
Gaudi::Property< bool > | m_use_mm {this, "MM", true} |
|
Gaudi::Property< bool > | m_use_stgc {this, "STGC", true} |
|
double | m_weight_csc_on_segment {2.} |
| use weight for csc segments More...
|
|
Gaudi::Property< bool > | m_showerskip {this, "ShowerSkipping", true} |
| reduce cpu for showers (true) More...
|
|
Gaudi::Property< double > | m_showerskipperc {this, "ShowerSkipPercentage", 0.3} |
| percentage of occupancy to skip MDT chamber (0.3) More...
|
|
Gaudi::Property< bool > | m_use_histos {this, "UseHistos", false} |
| flag to output a root file to study the weights of hits More...
|
|
Gaudi::Property< bool > | m_summary {this, "DoSummary", false} |
| flag to print out a summary of what comes in and what comes out More...
|
|
Gaudi::Property< bool > | m_recordAllOutput {this, "RecordAll", false} |
| flag to write out intermediate patterns More...
|
|
Gaudi::Property< std::string > | m_cscAssoOutputLocation {this, "PatCscSegAssMapOutputLocation", "MuonPatCscSegAssMap"} |
| storegate location for csc association map More...
|
|
std::unique_ptr< Hists > | m_h |
|
SG::WriteHandleKey< MuonPrdPatternCollection > | m_CosmicPhiPatternsKey {this, "CosmicPhiKey", "CosmicPhiPatterns"} |
|
SG::WriteHandleKey< MuonPrdPatternCollection > | m_CosmicEtaPatternsKey {this, "CosmicEtaPatterns", "CosmicEtaPatterns"} |
|
SG::WriteHandleKey< MuonPrdPatternCollection > | m_COMBINED_PATTERNSKey {this, "PATTERNS", "COMBINED_PATTERNS"} |
|
std::map< int, int > | m_RpcToMdtOuterStDict {} |
| Dictionary to translate from the RPC to the MDT station names. More...
|
|
std::map< int, int > | m_RpcToMdtInnerStDict {} |
|
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 |
|
◆ EtaPhiHitAssocMap
◆ MuonPatternHoughPair
◆ PrepDataSet
◆ StoreGateSvc_t
◆ MuonHoughPatternFinderTool()
Muon::MuonHoughPatternFinderTool::MuonHoughPatternFinderTool |
( |
const std::string & |
t, |
|
|
const std::string & |
n, |
|
|
const IInterface * |
p |
|
) |
| |
◆ ~MuonHoughPatternFinderTool()
Muon::MuonHoughPatternFinderTool::~MuonHoughPatternFinderTool |
( |
| ) |
|
|
virtualdefault |
◆ addCollection()
template<class CollContainer >
Inserts the Prds into the Hough container & fills the eta phi association map.
Define the maximum channel
Enlarge the vector artifically by 3 to make enough space for Pads, strip and wires which are all aligned in the same channel vector
Find channel accumulations
NSW prepdata has the pecularity that the prds are already clustered
Find channels that have accumulated hits
Require that there is an adjacent channel
Second loop over the contrainer to fill the map
Definition at line 807 of file MuonHoughPatternFinderTool.cxx.
810 if (cont.empty())
return;
811 std::map<Identifier, unsigned> nHitsPerLayer{};
812 hitcontainer.
reserve(cont.size() + hitcontainer.
size());
814 unsigned channel_max{0};
825 channel_max =
m_idHelperSvc->stgcIdHelper().channelMax(cont.front()->identify()) * 3;
827 channel_max =
m_idHelperSvc->mmIdHelper().channelMax(cont.front()->identify());
849 const int n_gasGaps =
m_idHelperSvc->rpcIdHelper().gasGapMax(
id);
850 const int n_doubR =
m_idHelperSvc->rpcIdHelper().doubletRMax(
id);
851 return n_gasGaps* (
m_idHelperSvc->rpcIdHelper().doubletR(
id) - 1) +
854 const int n_gasGaps =
m_idHelperSvc->tgcIdHelper().gasGapMax(
id);
857 const int n_layer =
m_idHelperSvc->cscIdHelper().chamberLayerMax(
id);
858 const int n_chlay =
m_idHelperSvc->cscIdHelper().wireLayerMax(
id);
859 return n_layer*(
m_idHelperSvc->cscIdHelper().wireLayer(
id) -1) +
862 const int n_lay =
m_idHelperSvc->stgcIdHelper().gasGapMax(
id);
863 const int n_chtype =
m_idHelperSvc->stgcIdHelper().channelTypeMax(
id);
864 return n_chtype*n_lay*(
m_idHelperSvc->stgcIdHelper().multilayer(
id) - 1) +
869 return n_lay*(
m_idHelperSvc->mmIdHelper().multilayer(
id) - 1) +
873 return static_cast<int>(
layers.size());
877 std::vector<float> channelWeights;
881 channelWeights.assign(2*channel_max + 2, 2.);
883 channelWeights.assign(2*channel_max + 2, 0);
884 for (
const auto* prd : cont) {
885 const bool measures_phi =
m_idHelperSvc->measuresPhi(prd->identify());
886 layers.insert(layer_number(prd->identify()));
891 const int channel =
ch + measures_phi * channel_max;
892 channelWeights.at(
channel -1) += 0.55;
893 channelWeights.at(
channel) += 1.;
894 channelWeights.at(
channel + 1) +=0.55;
898 const int channel = layer_channel(prd->identify()) + measures_phi * channel_max;
899 channelWeights[
channel -1] += 0.55;
901 channelWeights[
channel + 1] +=0.55;
906 std::map<Identifier, PrepDataSet> gasgapphimap{};
907 for (
const auto* prd : cont) {
908 const bool measures_phi =
m_idHelperSvc->measuresPhi(prd->identify());
909 const int channel = layer_channel(prd->identify()) + measures_phi * channel_max;
913 if (!measures_phi)
continue;
914 gasgapphimap[
m_idHelperSvc->gasGapId(prd->identify())].insert(prd);
924 for (
const auto* prd : cont) {
927 double number_of_hits = nHitsPerLayer[
m_idHelperSvc->layerId(prd->identify())];
928 weight = number_of_hits ? 1. / (0.25 * std::sqrt(number_of_hits) + 0.75 * number_of_hits) : 0.;
935 std::shared_ptr<MuonHoughHit> hit = std::make_shared<MuonHoughHit>(prd->globalPosition(),
942 h.m_weighthistogram->Fill(
weight);
944 h.m_weighthistogramcsc->Fill(
weight);
946 h.m_weighthistogramtgc->Fill(
weight);
948 h.m_weighthistogramrpc->Fill(
weight);
950 h.m_weighthistogramstgc->Fill(
weight);
952 h.m_weighthistogrammm->Fill(
weight);
957 if (!phi_prds.empty()) phietahitassociation.insert(std::make_pair(prd, phi_prds));
◆ addCollections()
template<class CollContainer >
◆ addCscCollection()
convert and add csc preprawdata collection (1 chamber)
◆ addMdtCollection()
void Muon::MuonHoughPatternFinderTool::addMdtCollection |
( |
const MdtPrepDataCollection * |
mdt_coll, |
|
|
MuonHoughHitContainer & |
hitcontainer, |
|
|
std::map< int, std::vector< std::pair< int, int >>> & |
rpcmdtstationmap, |
|
|
std::map< int, std::vector< std::pair< int, int >>> & |
tgcmdtstationmap |
|
) |
| const |
|
private |
convert and add mdt preprawdata collection (1 chamber)
if (mdt_hit.weighted_trigger < 0.1) { mdt_hit.weighted_trigger = 1.; }
and finally add hits to container:
Definition at line 452 of file MuonHoughPatternFinderTool.cxx.
455 const unsigned int size = mdt_coll->size();
479 <<
" association to pattern still possible");
481 for (
const MdtPrepData* mdt_hit : *mdt_coll) {
485 hitcontainer.
addHit(new_mdt_hit(mdt_hit, 0., 0.));
492 std::map<int, int> nHitsPerLayer;
493 std::map<int, int> number_of_hots_per_layer;
496 std::vector<SegmentData> collected_data{};
497 collected_data.reserve(
size);
499 std::vector<double> tubecount(idHelper.tubeMax() + 2);
514 SegmentData prd_data{};
515 prd_data.index = collected_data.size();
518 const int tube = idHelper.tube(prd_data.id());
519 const int multi_layer = idHelper.multilayer(prd_data.id());
520 const int tube_layer = idHelper.tubeLayer(prd_data.id());
522 prd_data.layer_number =
523 (multi_layer - 1) * idHelper.tubeLayerMax() + (tube_layer - 1);
525 tubecount[
tube] += 1.;
526 tubecount[
tube - 1] += 0.5;
527 tubecount[
tube + 1] += 0.5;
529 ATH_MSG_VERBOSE(
" layer_number: " << prd_data.layer_number <<
" multi_layer: " << multi_layer
530 <<
" tube_layer: " << tube_layer);
531 collected_data.push_back(std::move(prd_data));
534 const unsigned int prdsize = collected_data.size();
536 if (!prdsize)
return;
539 for (
const SegmentData& mdt_hit : collected_data) {
541 hitcontainer.
addHit(new_mdt_hit(mdt_hit.prd, 1., 1.));
546 double tubem = *(std::max_element(tubecount.begin(), tubecount.end()));
551 for (
const SegmentData& mdt_hit : collected_data) {
553 hitcontainer.
addHit(new_mdt_hit(mdt_hit.prd, 0., 0.));
556 h.m_weighthistogram->Fill(0);
557 h.m_weighthistogrammdt->Fill(0);
566 for (SegmentData& mdt_hit : collected_data) {
567 const int tube = idHelper.tube(mdt_hit.id());
568 if (tubecount[
tube] > 1) ++nHitsPerLayer[mdt_hit.layer_number];
571 if (tubecount[
tube] <= 1.) mdt_hit.prob = 0.;
575 for (
const auto& map_it : nHitsPerLayer) {
576 const bool count_1 = map_it.first >= idHelper.tubeLayerMax();
582 if (ml1 + ml2 < 2.01) {
584 for (
const SegmentData& mdt_hit : collected_data) {
586 hitcontainer.
addHit(new_mdt_hit(mdt_hit.prd, 0., 0.));
589 h.m_weighthistogram->Fill(0);
590 h.m_weighthistogrammdt->Fill(0);
597 dcs.reserve(prdsize);
599 for (
const SegmentData& mdt_hit : collected_data) {
600 if (mdt_hit.prob < 0.01)
continue;
609 mdtHelper.
tube(hitId) - 1);
617 dcs.emplace_back(std::move(dc));
620 bool seg_found =
true;
622 std::vector<int>
sel(dcs.size());
623 double angleDif = 0.;
627 if (ml1 + ml2 >= 2.1) {
628 int removed_hits = 0;
629 for (
unsigned int i = 0;
i <
sel.size(); ++
i) {
631 unsigned int j = dcs[
i - removed_hits].index();
632 SegmentData& mdt_hit = collected_data[j];
633 mdt_hit.onsegment = 1;
634 mdt_hit.psi = angleDif;
635 ++number_of_hots_per_layer[mdt_hit.layer_number];
638 dcs.erase(dcs.begin() +
i - removed_hits);
649 int stationcode =
stationCode(collected_data[0].
id());
650 const bool barrel = idHelper.isBarrel(collected_data[0].
id());
653 std::map<int, std::vector<std::pair<int, int>>>::const_iterator stationmap_it = rpcmdtstationmap.find(stationcode);
655 if (stationmap_it != rpcmdtstationmap.end()) {
656 const std::vector<std::pair<int, int>>& stationhits = (*stationmap_it).second;
659 for (
unsigned int i = 0;
i < stationhits.size();
i++) {
661 for (
int j = stationhits[
i].
first; j < stationhits[
i].second; j++) {
662 const std::shared_ptr<MuonHoughHit> rpchit = hitcontainer.
getHit(j);
663 if (rpchit->
getWeight() < 0.01)
continue;
665 const double rpc_radius = rpcPos.perp();
666 const double rpc_rz_ratio = rpc_radius / rpcPos.z();
667 const double rpc_inv_rz_ratio = 1. / rpc_rz_ratio;
669 for (SegmentData& mdt_hit : collected_data) {
674 dis = globalpos.z() - globalpos.perp() * rpc_inv_rz_ratio;
676 dis = globalpos.perp() - rpc_rz_ratio * globalpos.z();
681 if (std::abs(dis) < 250.) {
682 double wnew = 1.5 + (250. - std::abs(dis)) / 251.;
683 mdt_hit.weighted_trigger =
std::max(mdt_hit.weighted_trigger, wnew);
692 stationmap_it = tgcmdtstationmap.find(stationcode);
694 if (stationmap_it != tgcmdtstationmap.end()) {
695 const std::vector<std::pair<int, int>>& stationhits = (*stationmap_it).second;
698 for (
unsigned int i = 0;
i < stationhits.size();
i++) {
700 for (
int j = stationhits[
i].
first; j < stationhits[
i].second; j++) {
701 const std::shared_ptr<MuonHoughHit>
tgchit = hitcontainer.
getHit(j);
704 const double tgc_rz_ratio = tgcPos.perp() / tgcPos.z();
706 for (SegmentData& mdt_hit : collected_data) {
708 if (mdt_hit.weighted_trigger < 0.1) mdt_hit.weighted_trigger = 3.;
710 double dis = globalpos.perp() - tgc_rz_ratio * globalpos.z();
711 if (std::abs(dis) < 250.) {
712 double wnew = 3.5 + (250. - std::abs(dis)) / 251.;
713 mdt_hit.weighted_trigger =
std::max(mdt_hit.weighted_trigger, wnew);
722 for (SegmentData& mdt_hit : collected_data) {
726 mdt_hit.tr_confirmation = (mdt_hit.weighted_trigger > 1.5 && mdt_hit.weighted_trigger < 2.55) ||
727 (mdt_hit.weighted_trigger > 3.5 && mdt_hit.weighted_trigger < 4.55);
730 if (mdt_hit.tr_confirmation && !mdt_hit.onsegment) {
731 ++number_of_hots_per_layer[mdt_hit.layer_number];
737 for (SegmentData& mdt_hit : collected_data) {
738 if (mdt_hit.prob < 0.01) {
744 std::map<int, int>::const_iterator map_it = nHitsPerLayer.find(mdt_hit.layer_number);
745 if (map_it != nHitsPerLayer.end()) {
746 int layerhits = (*map_it).second;
747 double layer_weight = 1. / (0.25 * layerhits + 0.75 * std::sqrt(layerhits));
749 if (!mdt_hit.tr_confirmation && !mdt_hit.onsegment) {
751 mdt_hit.prob =
std::max(0., mdt_hit.prob - 0.2);
753 mdt_hit.weights = mdt_hit.prob * layer_weight;
758 double rej = 1. / (1. - layer_weight + 0.10);
761 if (mdt_hit.onsegment && mdt_hit.tr_confirmation) {
763 }
else if (mdt_hit.onsegment) {
764 rej0 = 1.75 / (mdt_hit.psi + 0.05);
766 else if (mdt_hit.tr_confirmation) {
770 double rej_total = rej * rej0;
771 mdt_hit.prob = rej_total / (1. + rej_total);
774 map_it = number_of_hots_per_layer.find(mdt_hit.layer_number);
775 if (map_it != number_of_hots_per_layer.end()) {
776 int layerhits_conf = (*map_it).second;
777 mdt_hit.weights = mdt_hit.prob / (0.25 * layerhits_conf + 0.75 * std::sqrt(layerhits_conf));
779 ATH_MSG_INFO(
"Entry not in map! This should not happen");
780 mdt_hit.weights = mdt_hit.prob;
784 ATH_MSG_INFO(
"Entry not in map! This should not happen");
785 mdt_hit.weights = mdt_hit.prob;
791 <<
" trigger weight " << mdt_hit.weighted_trigger <<
" on segment " << mdt_hit.onsegment <<
" psi " << mdt_hit.psi
792 <<
" prob " << mdt_hit.prob <<
" weight " << mdt_hit.weights);
793 hitcontainer.
addHit(new_mdt_hit(mdt_hit.prd, mdt_hit.prob, mdt_hit.weights));
796 h.m_weighthistogram->Fill(mdt_hit.weights);
797 h.m_weighthistogrammdt->Fill(mdt_hit.weights);
◆ addRpcCollection()
◆ addTgcCollection()
◆ addToStationMap()
void Muon::MuonHoughPatternFinderTool::addToStationMap |
( |
std::map< int, std::vector< std::pair< int, int >>> & |
stationmap, |
|
|
std::map< int, std::vector< std::pair< int, int >>>::iterator & |
it, |
|
|
int & |
stationcode, |
|
|
const int & |
hit_begin, |
|
|
const int & |
hit_end |
|
) |
| |
|
staticprivate |
Definition at line 1142 of file MuonHoughPatternFinderTool.cxx.
1145 it = stationmap.find(stationcode);
1146 if (
it == stationmap.end()) {
1147 std::vector<std::pair<int, int>> dummyvec;
1148 dummyvec.emplace_back(hit_begin, hit_end);
1149 stationmap[stationcode] = dummyvec;
1151 (*it).second.emplace_back(hit_begin, hit_end);
◆ analyse()
analyse hits
reconstructed patterns stored per [number_of_ids][level][which_segment]
Definition at line 202 of file MuonHoughPatternFinderTool.cxx.
208 std::stringstream sstr{};
209 for (
size_t h = 0;
h < hitcontainer.
size() ; ++
h){
210 const auto& houghHit = hitcontainer.
getHit(
h);
211 sstr<<
m_printer->print(*houghHit->getPrd())<<
" weight: "<<houghHit->getWeight()<<std::endl;
224 std::unique_ptr<MuonPrdPatternCollection> phipatterns{
m_muonHoughPatternTool->getPhiMuonPatterns(houghpattern)};
225 std::unique_ptr<MuonPrdPatternCollection> etapatterns{
m_muonHoughPatternTool->getEtaMuonPatterns(houghpattern)};
228 if (phipatterns->empty())
229 ATH_MSG_INFO(
" summarizing input: Phi pattern combination empty");
231 ATH_MSG_INFO(
" summarizing Phi pattern combination input: " << std::endl <<
m_printer->print(*phipatterns));
232 if (etapatterns->empty())
233 ATH_MSG_INFO(
" summarizing input: Eta pattern combination empty");
235 ATH_MSG_INFO(
" summarizing Eta pattern combination input: " << std::endl <<
m_printer->print(*etapatterns));
239 ATH_MSG_DEBUG(
"size: phi: " << phipatterns->size() <<
" eta: " << etapatterns->size());
241 std::unique_ptr<MuonPrdPatternCollection> combinedpatterns;
242 std::unique_ptr<MuonPatternCombinationCollection> patterncombinations{};
245 if (!etapatterns->empty()) {
246 combinedpatterns =
m_muonCombinePatternTool->combineEtaPhiPatterns(*phipatterns, *etapatterns, phietahitassociation);
249 if (combinedpatterns) {
253 combinedpatterns = std::make_unique<MuonPrdPatternCollection>();
260 return patterncombinations;
◆ calculateStationCode()
int Muon::MuonHoughPatternFinderTool::calculateStationCode |
( |
const |
Identifier | ) |
const |
|
private |
calculateStationCode(const Identifier)
◆ 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
◆ fastSegmentFinder()
void Muon::MuonHoughPatternFinderTool::fastSegmentFinder |
( |
TrkDriftCircleMath::DCVec & |
dcs, |
|
|
int & |
nl1, |
|
|
int & |
nl2, |
|
|
double & |
angleDif, |
|
|
std::vector< int > & |
sel |
|
) |
| const |
|
private |
finds best segment for given driftcircle vector (nl1/2 = number of dc's in ml 1 and 2, angledif is difference between angle of segment and chamberangle, sel is vector of selected hits (0 not selected, 1 selected)
Definition at line 1155 of file MuonHoughPatternFinderTool.cxx.
1175 if (dcs.empty())
return;
1177 DCCit it_end = dcs.end();
1179 std::map<int, DCVec> layerHits;
1180 std::map<int, int> dcsId;
1184 for (;
it1 != it_end; ++
it1, nhits++) {
1187 dcsId[isort] = nhits;
1188 int ilay = 4 * (
it1->id().ml()) +
it1->id().lay();
1191 map_it = layerHits.find(ilay);
1192 if (map_it != layerHits.end()) {
1193 (*map_it).second.push_back(*
it1);
1196 dcl.reserve(dcs.size());
1197 dcl.push_back(*
it1);
1198 layerHits[ilay] = dcl;
1202 unsigned int nHits = 0;
1203 unsigned int nHitsLine = 0;
1204 unsigned int nPassedTubes = 0;
1205 double roadWidth = 1.5;
1209 for (
int i = 0;
i < 8;
i++) {
1210 if (layerHits.count(
i) != 1)
continue;
1211 DCVec& dci = layerHits[
i];
1212 if (dci.size() > 10)
continue;
1213 DCCit iti = dci.begin();
1214 DCCit iti_end = dci.end();
1215 for (; iti != iti_end; ++iti) {
1217 float tubeRadius = 14.6;
1219 tubeRadius = (*iti).rot()->detectorElement()->innerTubeRadius();
1221 for (
int j = 7; j >
i; j--) {
1222 if (layerHits.count(j) != 1)
continue;
1223 DCVec& dcj = layerHits[j];
1224 if (dcj.size() > 10)
continue;
1225 DCCit itj = dcj.begin();
1226 DCCit itj_end = dcj.end();
1227 for (; itj != itj_end; ++itj) {
1229 double hitx = (*itj).x();
1230 double hity = (*itj).y();
1231 double norm = std::hypot(hitx, hity);
1232 double cphi = hitx /
norm;
1233 double sphi = hity /
norm;
1235 for (TrkDriftCircleMath::TangentToCircles::LineVec::const_iterator lit =
lines.begin(); lit !=
lines.end(); ++lit) {
1236 double coshit =
std::cos((*lit).phi());
1237 double sinhit =
std::sin((*lit).phi());
1238 const double cospsi =
std::min(
std::max(-1.,coshit * cphi + sinhit * sphi), 1.);
1239 double psi = std::acos(cospsi);
1240 if (psi > 0.3)
continue;
1243 unsigned int matchedHits = matchWithLine.
hitsOnTrack();
1246 if (matchedHits > nHits || (matchedHits == nHits && psi < angleDif)) {
1247 int dnl = std::abs(
static_cast<int>(matchWithLine.
hitsMl1()) -
static_cast<int>(matchWithLine.
hitsMl2()));
1248 ATH_MSG_DEBUG(
" matchWithLine.hitsOnTrack() > nHits old " << nHits <<
" new: " << matchedHits);
1249 ATH_MSG_DEBUG(
" dnl " << dnl <<
" old dnl " << std::abs(nl1 - nl2));
1250 ATH_MSG_DEBUG(
" hit cos phi " << cphi <<
" line " << coshit <<
" sin phi " << sphi <<
" line " << sinhit
1254 nHits = matchedHits;
1255 nl1 = matchWithLine.
hitsMl1();
1256 nl2 = matchWithLine.
hitsMl2();
1257 nHitsLine = hitsOnLine.size();
1259 hitsOnLineSel = hitsOnLine;
1263 ATH_MSG_VERBOSE(
" Select nHits " << nHits <<
" nl1 " << nl1 <<
" nl2 " << nl2);
1264 if (nHits >= dcs.size())
stop =
true;
1275 ATH_MSG_DEBUG(
" Fast segment finder Max Layers hit " << dcs.size() <<
" nHitsLine - nHits " << nHitsLine - nl1 - nl2
1276 <<
" passed Tubes -nHits " << nPassedTubes - nl1 - nl2 <<
" nl1 " << nl1
1277 <<
" nl2 " << nl2 <<
" angleDif " << angleDif);
1282 for (; itt != itt_end; ++itt,
i++) {
1284 if (dcsId.count(isort) == 1) {
1285 int dcsIndex = dcsId[isort];
1288 ATH_MSG_DEBUG(
" Selected Hit index " << dcsIndex <<
" MultiLayer " << itt->id().ml() <<
" layer " << itt->id().lay()
1289 <<
" tube " << itt->id().tube());
1291 ATH_MSG_WARNING(
" ALARM fastSegmentFinder hit NOT found " <<
i <<
" isort " << isort);
◆ finalize()
StatusCode Muon::MuonHoughPatternFinderTool::finalize |
( |
| ) |
|
|
overridevirtual |
finalize
Definition at line 181 of file MuonHoughPatternFinderTool.cxx.
183 auto save_histo = [
this](std::unique_ptr<TH1>& h_ptr) {
185 m_h->m_file->WriteObject(h_ptr.get(), h_ptr->GetName());
188 save_histo(
m_h->m_weighthistogram);
189 save_histo(
m_h->m_weighthistogrammdt);
190 save_histo(
m_h->m_weighthistogramrpc);
191 save_histo(
m_h->m_weighthistogramcsc);
192 save_histo(
m_h->m_weighthistogramtgc);
193 save_histo(
m_h->m_weighthistogramstgc);
194 save_histo(
m_h->m_weighthistogrammm);
199 return StatusCode::SUCCESS;
◆ find() [1/3]
map between mdt chamber identifiers and corresponding rpc hits (hit_no_begin and hit_no_end)
map between mdt chamber identifiers and corresponding tgc hits (hit_no_begin and hit_no_end)
map for association between trigger eta hits (first) and phi hits (second) within the same gasgap, used for combining patterns in MuonCombinePatternTool
Definition at line 128 of file MuonHoughPatternFinderTool.cxx.
138 std::map<int, std::vector<std::pair<int, int>>> rpcmdtstationmap;
141 std::map<int, std::vector<std::pair<int, int>>> tgcmdtstationmap;
149 std::unique_ptr<MuonHoughHitContainer> hitcontainer{
150 getAllHits(mdtCols, tgcCols, rpcCols, cscSegmentCombis, rpcmdtstationmap, tgcmdtstationmap, phietahitassociation)};
162 std::unique_ptr<MuonPatternCombinationCollection> patCombiCol =
analyse(ctx, *hitcontainer,
163 phietahitassociation);
168 ATH_MSG_DEBUG(
" NO pattern combinations found, creating empty collection ");
169 patCombiCol = std::make_unique<MuonPatternCombinationCollection>();
173 ATH_MSG_INFO(
" summarizing Combined pattern combination output: " <<std::endl <<
m_printer->print(*patCombiCol));
178 return {std::move(patCombiCol),
nullptr};
◆ find() [2/3]
◆ find() [3/3]
◆ getAllHits()
std::unique_ptr< MuonHoughHitContainer > Muon::MuonHoughPatternFinderTool::getAllHits |
( |
const std::vector< const MdtPrepDataCollection * > & |
mdtCols, |
|
|
const std::vector< const TgcPrepDataCollection * > & |
tgcCols, |
|
|
const std::vector< const RpcPrepDataCollection * > & |
rpcCols, |
|
|
const MuonSegmentCombinationCollection * |
cscSegmentCombis, |
|
|
std::map< int, std::vector< std::pair< int, int >>> & |
rpcmdtstationmap, |
|
|
std::map< int, std::vector< std::pair< int, int >>> & |
tgcmdtstationmap, |
|
|
EtaPhiHitAssocMap & |
phietahitassociation |
|
) |
| const |
|
private |
retrieves all hits and converts them into internal EDM
Definition at line 263 of file MuonHoughPatternFinderTool.cxx.
271 std::unique_ptr<MuonHoughHitContainer> hitcontainer = std::make_unique<MuonHoughHitContainer>();
278 std::set<Identifier> csc_set;
281 std::map<int, int> nHitsPerLayer;
285 std::vector<const Muon::CscClusterOnTrack*> csc_rots;
287 std::vector<int> layer_ids;
289 csc_rots.reserve(400);
291 layer_ids.reserve(400);
296 for (
unsigned int ss = 0;
ss < msc->numberOfStations(); ++
ss) {
297 for (
const std::unique_ptr<MuonSegment>&
ms : *msc->stationSegments(
ss)) {
304 std::vector<const Trk::PrepRawData*> eta_vector;
306 int nRoTs =
ms->numberOfContainedROTs();
307 for (
int i = 0;
i < nRoTs; ++
i) {
310 ATH_MSG_INFO(
"Dynamic cast to CscClusterOnTrack failed!");
313 csc_rots.push_back(cscOnSeg);
316 csc_pair = csc_set.insert(
id);
317 if (!csc_pair.second) {
318 ATH_MSG_DEBUG(
" CSC hit was already added, weight set to 0");
319 layer_ids.push_back(0);
321 const int layer_id = 1000 *
m_idHelperSvc->cscIdHelper().stationEta(
id) +
326 ++nHitsPerLayer[layer_id];
327 layer_ids.push_back(layer_id);
337 if (!phi_set.empty()) {
338 ATH_MSG_VERBOSE(
"Number of Phi Csc hits in segment: " << phi_set.size());
339 for (
const Trk::PrepRawData* prd : eta_vector) { phietahitassociation.insert(std::make_pair(prd, phi_set)); }
345 for (
unsigned int i = 0;
i < csc_rots.size();
i++) {
352 if (layer_ids[
i] != 0) {
353 double number_of_hits = (
double)nHitsPerLayer[layer_ids[
i]];
360 hitcontainer->
addHit(hit);
363 h.m_weighthistogram->Fill(
weight);
364 h.m_weighthistogramcsc->Fill(
weight);
373 addRpcCollection(rpc_coll, *hitcontainer, rpcmdtstationmap, phietahitassociation);
379 addTgcCollection(tgc_coll, *hitcontainer, tgcmdtstationmap, phietahitassociation);
385 addMdtCollection(prep_coll, *hitcontainer, rpcmdtstationmap, tgcmdtstationmap);
392 ATH_MSG_VERBOSE(
"MuonHoughPatternFinderTool::getAllHits() saving " << hitcontainer->
size() <<
" converted hits");
393 for (
unsigned int i = 0;
i < hitcontainer->
size();
i++) {
395 << hitcontainer->
getHit(
i)->getHity() <<
"," << hitcontainer->
getHit(
i)->getHitz() <<
") "
396 <<
" weight: " << hitcontainer->
getHit(
i)->getWeight()
397 <<
" measures phi: " << hitcontainer->
getHit(
i)->getMeasuresPhi());
401 ATH_MSG_VERBOSE(
"MuonHoughPatternFinderTool::getAllHits() saving " << phietahitassociation.size() <<
"associated hits ");
◆ getHists()
◆ initialize()
StatusCode Muon::MuonHoughPatternFinderTool::initialize |
( |
| ) |
|
|
overridevirtual |
initialize
Definition at line 57 of file MuonHoughPatternFinderTool.cxx.
60 ATH_MSG_FATAL(
"Filling histograms not supported in MT jobs.");
61 return StatusCode::FAILURE;
64 m_h = std::make_unique<Hists>();
65 m_h->m_file = std::make_unique<TFile>(
"Hough_histos.root",
"RECREATE");
66 m_h->m_weighthistogram = std::make_unique<TH1F>(
"weighthisto",
"weighthisto", 100, -0.5, 2);
67 m_h->m_weighthistogrammdt = std::make_unique<TH1F>(
"weighthistomdt",
"weighthistomdt", 100, -0.3, 2.2);
68 m_h->m_weighthistogramrpc = std::make_unique<TH1F>(
"weighthistorpc",
"weighthistorpc", 100, -0.3, 2.2);
69 m_h->m_weighthistogramcsc = std::make_unique<TH1F>(
"weighthistocsc",
"weighthistocsc", 100, -0.3, 2.2);
70 m_h->m_weighthistogramtgc = std::make_unique<TH1F>(
"weighthistotgc",
"weighthistotgc", 100, -0.3, 2.2);
71 m_h->m_weighthistogramstgc = std::make_unique<TH1F>(
"weighthistostgc",
"weighthistostgc", 100, -0.3, 2.2);
72 m_h->m_weighthistogrammm = std::make_unique<TH1F>(
"weighthistomm",
"weighthistomm", 100, -0.3, 2.2);
103 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.
◆ interfaceID()
static const InterfaceID& Muon::IMuonHoughPatternFinderTool::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
access to tool interface
Definition at line 29 of file IMuonHoughPatternFinderTool.h.
30 static const InterfaceID IID_IMuonHoughPatternFinderTool(
"Muon::IMuonHoughPatternFinderTool", 1, 0);
31 return IID_IMuonHoughPatternFinderTool;
◆ 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.
◆ record()
record patterncollection to storegate or deletes collection when m_recordAllOutput is false
Definition at line 406 of file MuonHoughPatternFinderTool.cxx.
421 if (
sc.isFailure()) {
◆ renounce()
◆ renounceArray()
◆ stationCode() [1/2]
int Muon::MuonHoughPatternFinderTool::stationCode |
( |
const Identifier & |
id | ) |
const |
|
private |
◆ stationCode() [2/2]
int Muon::MuonHoughPatternFinderTool::stationCode |
( |
int |
stationname, |
|
|
int |
phi, |
|
|
int |
eta |
|
) |
| |
|
staticprivate |
◆ stdVec()
Definition at line 106 of file MuonHoughPatternFinderTool.cxx.
107 if (!cont)
return {};
108 std::vector<const MuonPrepDataCollection<T>*>
vec;
109 vec.reserve(cont->size());
111 [](
const MuonPrepDataCollection<T>*
ptr){return ptr;});
◆ 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.
◆ updateRpcMdtStationMap()
void Muon::MuonHoughPatternFinderTool::updateRpcMdtStationMap |
( |
const Identifier |
rpcid, |
|
|
int |
hit_begin, |
|
|
int |
hit_end, |
|
|
std::map< int, std::vector< std::pair< int, int >>> & |
rpcmdtstationmap |
|
) |
| const |
|
private |
update station map for rpc chamber, with id of chamber, and size of hits in rpc chamber
Definition at line 961 of file MuonHoughPatternFinderTool.cxx.
970 std::map<int, std::vector<std::pair<int, int>>>
::iterator it;
980 int idphi1 = idphi - 1;
981 if (idphi1 == 0) idphi1 = 8;
982 int idphi2 = idphi + 1;
983 if (idphi2 > 8) idphi2 = 1;
989 int stationNameMDT = station_itr->second;
991 stationcode =
stationCode(stationNameMDT, idphi1, ideta);
994 stationcode =
stationCode(stationNameMDT, idphi2, ideta);
1002 stationNameMDT = station_itr->second;
1003 stationcode =
stationCode(stationNameMDT, idphi, ideta);
◆ updateTgcMdtStationMap()
void Muon::MuonHoughPatternFinderTool::updateTgcMdtStationMap |
( |
const Identifier |
tgcid, |
|
|
int |
hit_begin, |
|
|
int |
hit_end, |
|
|
std::map< int, std::vector< std::pair< int, int >>> & |
tgcmdtstationmap |
|
) |
| const |
|
private |
update station map for tgc chamber, with id of chamber, and size of hits in tgc chamber
Definition at line 1007 of file MuonHoughPatternFinderTool.cxx.
1014 if (st[0] !=
'T')
return;
1016 constexpr std::array<int, 5> T31{2, 3, 3, 4, 4};
1017 constexpr std::array<int, 5> T32{3, 4, 4, 5, 5};
1018 constexpr std::array<int, 5> T11{2, 3, 4, 4, 4};
1019 constexpr std::array<int, 5> T12{3, 4, 5, 5, 5};
1021 std::map<int, std::vector<std::pair<int, int>>>
::iterator it;
1026 if (st[2] ==
'F') modphiTGC = 24;
1027 if (st[1] ==
'4') modphiTGC = 24;
1031 int index = abs(ideta) - 1;
1032 int idphi1MDT = 1 +
int(8. * (idphi + 1) / modphiTGC);
1033 int idphi2MDT = 1 +
int(8. * (idphi - 1) / modphiTGC);
1034 if (idphi1MDT > 8) idphi1MDT = 1;
1035 if (idphi2MDT > 8) idphi2MDT = 1;
1038 if (ideta < 0)
sign = -1;
1045 ideta1MDT =
sign * 1;
1046 ideta2MDT =
sign * 2;
1051 ideta1MDT =
sign * 4;
1052 ideta2MDT =
sign * 5;
1053 }
else if (st[1] ==
'3') {
1063 std::string station1 =
"EML";
1064 std::string station2 =
"EMS";
1070 int stationNameMDT1 = idHelper.stationNameIndex(station1);
1071 int stationNameMDT2 = idHelper.stationNameIndex(station2);
1075 int stationcode =
stationCode(stationNameMDT1, idphi1MDT, ideta1MDT);
1077 stationcode =
stationCode(stationNameMDT2, idphi1MDT, ideta1MDT);
1079 if (ideta1MDT != ideta2MDT) {
1080 stationcode =
stationCode(stationNameMDT1, idphi1MDT, ideta2MDT);
1082 stationcode =
stationCode(stationNameMDT2, idphi1MDT, ideta2MDT);
1085 if (idphi1MDT != idphi2MDT) {
1086 stationcode =
stationCode(stationNameMDT1, idphi2MDT, ideta1MDT);
1088 stationcode =
stationCode(stationNameMDT2, idphi2MDT, ideta1MDT);
1090 if (ideta1MDT != ideta2MDT) {
1091 stationcode =
stationCode(stationNameMDT1, idphi2MDT, ideta2MDT);
1093 stationcode =
stationCode(stationNameMDT2, idphi2MDT, ideta2MDT);
1099 if (station1 ==
"EMS") { station1 =
"EOS"; }
1100 if (station2 ==
"EML") {
1105 stationNameMDT1 = idHelper.stationNameIndex(station1);
1106 stationNameMDT2 = idHelper.stationNameIndex(station2);
1108 stationcode =
stationCode(stationNameMDT1, idphi1MDT, ideta1MDT);
1110 stationcode =
stationCode(stationNameMDT2, idphi1MDT, ideta1MDT);
1112 if (ideta1MDT != ideta2MDT) {
1113 stationcode =
stationCode(stationNameMDT1, idphi1MDT, ideta2MDT);
1115 stationcode =
stationCode(stationNameMDT2, idphi1MDT, ideta2MDT);
1118 if (idphi1MDT != idphi2MDT) {
1119 stationcode =
stationCode(stationNameMDT1, idphi2MDT, ideta1MDT);
1121 stationcode =
stationCode(stationNameMDT2, idphi2MDT, ideta1MDT);
1124 if (ideta1MDT != ideta2MDT) {
1125 stationcode =
stationCode(stationNameMDT1, idphi2MDT, ideta2MDT);
1127 stationcode =
stationCode(stationNameMDT2, idphi2MDT, ideta2MDT);
◆ updateVHKA()
◆ m_COMBINED_PATTERNSKey
◆ m_CosmicEtaPatternsKey
◆ m_CosmicPhiPatternsKey
◆ m_cscAssoOutputLocation
Gaudi::Property<std::string> Muon::MuonHoughPatternFinderTool::m_cscAssoOutputLocation {this, "PatCscSegAssMapOutputLocation", "MuonPatCscSegAssMap"} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_h
std::unique_ptr<Hists> Muon::MuonHoughPatternFinderTool::m_h |
|
private |
◆ m_hit_reweights
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_hit_reweights {this, "HitReweights", true} |
|
private |
◆ m_idHelperSvc
◆ m_mdt_adc_cut
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_mdt_adc_cut {this, "MDT_ADC_cut", true} |
|
private |
◆ m_mdt_adc_min
Gaudi::Property<int> Muon::MuonHoughPatternFinderTool::m_mdt_adc_min {this, "MDT_ADC_value", 50} |
|
private |
◆ m_mdt_tdc_cut
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_mdt_tdc_cut {this, "MDT_TDC_cut", true} |
|
private |
◆ m_muonCombinePatternTool
◆ m_muonHoughPatternTool
ToolHandle<IMuonHoughPatternTool> Muon::MuonHoughPatternFinderTool::m_muonHoughPatternTool {this, "muonHoughPatternTool",""} |
|
private |
◆ m_printer
Initial value:{this, "printerTool", "Muon::MuonEDMPrinterTool/MuonEDMPrinterTool",
"ToolHandle for EDM printing of segments"}
Definition at line 160 of file MuonHoughPatternFinderTool.h.
◆ m_recordAllOutput
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_recordAllOutput {this, "RecordAll", false} |
|
private |
◆ m_RpcToMdtInnerStDict
std::map<int, int> Muon::MuonHoughPatternFinderTool::m_RpcToMdtInnerStDict {} |
|
private |
◆ m_RpcToMdtOuterStDict
std::map<int, int> Muon::MuonHoughPatternFinderTool::m_RpcToMdtOuterStDict {} |
|
private |
◆ m_showerskip
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_showerskip {this, "ShowerSkipping", true} |
|
private |
◆ m_showerskipperc
Gaudi::Property<double> Muon::MuonHoughPatternFinderTool::m_showerskipperc {this, "ShowerSkipPercentage", 0.3} |
|
private |
◆ m_summary
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_summary {this, "DoSummary", false} |
|
private |
◆ m_use_csc
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_use_csc {this, "CSC", true} |
|
private |
◆ m_use_histos
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_use_histos {this, "UseHistos", false} |
|
private |
◆ m_use_mdt
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_use_mdt {this, "MDT", true} |
|
private |
◆ m_use_mm
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_use_mm {this, "MM", true} |
|
private |
◆ m_use_rpc
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_use_rpc {this, "RPC", true} |
|
private |
◆ m_use_stgc
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_use_stgc {this, "STGC", true} |
|
private |
◆ m_use_tgc
Gaudi::Property<bool> Muon::MuonHoughPatternFinderTool::m_use_tgc {this, "TGC", true} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_weight_csc_on_segment
double Muon::MuonHoughPatternFinderTool::m_weight_csc_on_segment {2.} |
|
private |
The documentation for this class was generated from the following files:
JetConstituentVector::iterator iterator
int multilayer(const Identifier &id) const
Access to components of the ID.
const DCOnTrackVec & match(const DCVec &dcs)
void set(const Line &l, double deltaCut, MatchStrategy strategy, double tubeRadius)
int getNLayers() const
Returns the number of tube layers inside the multilayer.
std::vector< DCOnTrack > DCOnTrackVec
const Amg::Vector3D & getPosition() const
return (x,y,z) vector
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
MuonPrepDataCollection< RpcPrepData > RpcPrepDataCollection
std::shared_ptr< MuonHoughHit > getHit(int hitno) const
returns Hit at position hitno
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Identifier identify(const UncalibratedMeasurement *meas)
Returns the associated identifier.
bool msgLvl(const MSG::Level lvl) const
int tubeLayer(const Identifier &id) const
static LineVec tangentLines(const DriftCircle &dc1, const DriftCircle &dc2)
std::vector< size_t > vec
This class represents a drift time measurement.
#define ATH_MSG_VERBOSE(x)
int adc() const
Returns the ADC (typically range is 0 to 250)
@ MdtStatusDriftTime
The tube produced a vaild measurement.
unsigned int hitsOnTrack() const
void addHit(const std::shared_ptr< MuonHoughHit > &hit)
add hit to container
Implementation of 2 dimensional vector class.
std::vector< DriftCircle > DCVec
virtual void setOwner(IDataHandleHolder *o)=0
DCOnTrackVec::iterator DCOnTrackIt
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
unsigned int passedTubes() const
Class representing clusters from the CSC.
std::vector< HWIdentifier >::iterator it1
unsigned int size() const
returns size of hitcontainer
::StatusCode StatusCode
StatusCode definition for legacy code.
void reserve(int size)
allocates memory for hitvector
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
int tube(const Identifier &id) const
virtual const Amg::Vector3D & globalPosition() const
Returns the global position of the CENTER of the drift tube (i.e.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
unsigned int hitsMl2() const
bool isBarrel(const Identifier &id) const
DCVec::const_iterator DCCit
Class to represent measurements from the Monitored Drift Tubes.
double getWeight() const
returns weight in histogram after rescaling
Eigen::Matrix< double, 3, 1 > Vector3D
virtual const CscPrepData * prepRawData() const override final
Returns the CscPrepData - is a CscPrepData in this scope.
Class to represent the calibrated clusters created from CSC strips.
#define ATH_MSG_WARNING(x)
Identifier identify() const
return the identifier -extends MeasurementBase
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
MuonPrepDataCollection< TgcPrepData > TgcPrepDataCollection
#define ATLAS_THREAD_SAFE
MdtDriftCircleStatus status() const
Returns the status of the measurement.
static constexpr int maxNTubesPerLayer
The maxNTubesPerLayer represents the absolute maximum of tubes which are built into a single multilay...
DetectorTechnology
enum to identify the muondetectortechnology
int getNtubesperlayer() const
Returns the number of tubes in each tube layer.
std::vector< MuonHoughPatternContainer > MuonHoughPatternContainerShip
size_type size() const noexcept
Returns the number of elements in the collection.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
virtual const MuonGM::MdtReadoutElement * detectorElement() const override
Returns the detector element corresponding to this PRD.
unsigned int hitsMl1() const
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
std::vector< Line > LineVec
@ InTime
drift time too small to be compatible with drift spectrum