37 std::string measphi_name(
bool measphi) {
38 if (measphi)
return "phi";
43 std::string
chamber(
int istation,
int zsec,
int phi) {
44 std::ostringstream ssout;
47 else if (istation == 2)
67 declareInterface<ICscSegmentFinder>(
this);
81 return StatusCode::SUCCESS;
85std::unique_ptr<MuonSegmentCombinationCollection>
Csc2dSegmentMaker::find(
const std::vector<const Muon::CscPrepDataCollection*>& pcols,
86 const EventContext& ctx)
const {
90 for (
unsigned int icol = 0; icol < pcols.size(); ++icol) {
92 if (clus->
empty())
continue;
96 unsigned int col_count = 0;
98 for (
unsigned int icol = 0; icol < pcols.size(); ++icol) {
103 if (clus->
empty())
continue;
106 mpsegs->push_back(pcol);
111 if (!mpsegs->empty())
112 ATH_MSG_DEBUG(
"found " << mpsegs->size() <<
" 2d csc segments");
123 if (clus.
empty())
return nullptr;
144 std::string redName = stationName.substr(0, 3);
146 ATH_MSG_DEBUG(
"in station " << stationName <<
" eta " << stationEta <<
", phi " << stationPhi <<
", chamber layer " << chamberLayer);
156 for (
int iLay = 0; iLay < 4; iLay++) {
157 for (
int iPhi = 0; iPhi < 2; iPhi++) {
165 ATH_MSG_DEBUG(
"get strip quality for " << isPhi <<
" layer " << iLay <<
" strip " << iStrip);
167 m_idHelperSvc->cscIdHelper().channelID(redName, stationEta, stationPhi, chamberLayer, iLay + 1, iPhi, iStrip + 1);
169 m_idHelperSvc->cscIdHelper().get_channel_hash(stripId, hashID);
180 ATH_MSG_DEBUG(
"final status for eta is " << layStatus[0] <<
" and phi " << layStatus[1]);
185 int station =
m_idHelperSvc->cscIdHelper().stationName(
id) - 49;
191 if (iclu == clus.
begin()) {
192 col_station = station;
196 ATH_MSG_DEBUG(
"****** " << chamber(station,
eta, phisec) << measphi_name(measphi) << iwlay);
198 if (station != col_station ||
eta != col_eta || phisec != col_phisec) {
213 phi_clus[iwlay - 1].emplace_back(lpos, ptclu, measphi);
216 eta_clus[iwlay - 1].emplace_back(lpos, ptclu, measphi);
222 int nHitLayer_eta = 0;
223 int nHitLayer_phi = 0;
224 for (
int i = 0; i < 4; ++i) {
225 if (!eta_clus[i].
empty()) ++nHitLayer_eta;
226 if (!phi_clus[i].
empty()) ++nHitLayer_phi;
228 ATH_MSG_DEBUG(
"there are " << nHitLayer_eta <<
" eta hit layers and " << nHitLayer_phi <<
" phi hit layers");
232 if (nHitLayer_eta >= 2 || nHitLayer_phi >= 2) {
233 ATH_MSG_DEBUG(
"Csc2dSegment calls get2dMuonSegmentCombination !!!");
234 pcol =
m_segmentTool->get2dMuonSegmentCombination(eta_id, phi_id, eta_clus, phi_clus, lpos000, ctx, layStatus[0], layStatus[1]);
238 for (
unsigned int i = 0; i < 4; ++i) {
239 for (TrkClusters::iterator itclus = eta_clus[i].begin(); itclus != eta_clus[i].end(); ++itclus) {
delete itclus->cl; }
241 for (TrkClusters::iterator itclus = phi_clus[i].begin(); itclus != phi_clus[i].end(); ++itclus) {
delete itclus->cl; }
250 const EventContext&)
const {
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
DataVector< Muon::MuonSegmentCombination > MuonSegmentCombinationCollection
This typedef represents a collection of MuonSegmentCombination objects.
static const Attributes_t empty
constexpr int pow(int base, int exp) noexcept
std::unique_ptr< MuonSegmentCombinationCollection > find(const std::vector< const Muon::CscPrepDataCollection * > &pcols, const EventContext &ctx) const
ToolHandle< ICscSegmentUtilTool > m_segmentTool
Csc2dSegmentMaker(const std::string &, const std::string &, const IInterface *)
PublicToolHandle< Muon::MuonEDMPrinterTool > m_printer
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
ToolHandle< Muon::IMuonClusterOnTrackCreator > m_cscClusterOnTrackCreator
Gaudi::Property< std::string > m_cscdig_sg_inkey
Muon::MuonSegmentCombination * findSegmentCombination(const Muon::CscPrepDataCollection &pcol, const EventContext &ctx) const
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
const_iterator begin() const noexcept
const PrepDataT * front() const
size_type size() const noexcept
bool empty() const noexcept
std::vector< Cluster > ChamberTrkClusters[4]
This is a "hash" representation of an Identifier.
int maxNumberOfStrips(int measuresPhi) const
int getStationPhi() const
int getStationEta() const
virtual Amg::Transform3D GlobalToAmdbLRSTransform() const
const std::string & getStationName() const
Class to represent the calibrated clusters created from CSC strips.
Class representing clusters from the CSC.
virtual const Amg::Vector3D & globalPosition() const override final
Returns the global position.
virtual const MuonGM::CscReadoutElement * detectorElement() const override final
Return the detector element corresponding to this PRD.
This class represents the corrected MDT measurements, where the corrections include the effects of wi...
Base class for Muon cluster RIO_OnTracks.
virtual const Amg::Vector3D & globalPosition() const override
Returns global position.
Class to hold a set of MuonSegments belonging together.
This is the common class for 3D segments used in the muon spectrometer.
Identifier identify() const
return the identifier
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 3, 1 > Vector3D
MuonPrepDataCollection< CscPrepData > CscPrepDataCollection
MuonPrepDataContainerT< CscStripPrepData > CscStripPrepDataContainer
MuonPrepDataContainerT< CscPrepData > CscPrepDataContainer