19 const std::string& name,
20 const IInterface* parent):
35 return StatusCode::SUCCESS;
53 if (!cscPrepContainerHandle.isValid()) {
55 return StatusCode::FAILURE;
60 if( cscCol==
nullptr )
continue;
61 cscHits.reserve( cscHits.size() + cscCol->size() );
64 if( prepData==
nullptr )
continue;
68 double aw = muonRoad.
aw[chamber][0];
69 double bw = muonRoad.
bw[chamber][0];
71 double phiw = muonRoad.
phi[4][0];
74 bool isunspoiled =
IsUnspoiled (prepData->status());
90 cscHit.
eta = prepData->globalPosition().eta();
91 cscHit.
phi = prepData->globalPosition().phi();
92 cscHit.
r = prepData->globalPosition().perp();
93 cscHit.
z = prepData->globalPosition().z();
94 cscHit.
charge = prepData->charge();
95 cscHit.
time = prepData->time();
96 cscHit.
resolution = std::sqrt( prepData->localCovariance()(0,0) );
110 cscHits.push_back( cscHit );
120 <<
"St=" << cscHit.
Strip <<
","
121 <<
"ID=" << cscHit.
StripId <<
","
122 <<
"eta=" << cscHit.
eta <<
","
123 <<
"phi=" << cscHit.
phi <<
","
124 <<
"r=" << cscHit.
r <<
","
125 <<
"z=" << cscHit.
z <<
","
126 <<
"q=" << cscHit.
charge <<
","
127 <<
"t=" << cscHit.
time <<
","
135 return StatusCode::SUCCESS;
147 double dz =
x - (
y-bw)*ia;
148 return dz/std::sqrt(1.+iaq);
156 double roadr = hitz*aw + bw;
158 return roadr*( std::cos(phiw)*std::sin(hitphi)-std::sin(phiw)*std::cos(hitphi) );
#define ATH_CHECK
Evaluate an expression and check for errors.
bool IsUnspoiled(Muon::CscClusterStatus status)
Class representing clusters from the CSC.
double calc_residual_phi(double aw, double bw, double phiw, double hitphi, double hitz) const
virtual StatusCode initialize() override
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
double calc_residual(double aw, double bw, double x, double y) const
SG::ReadHandleKey< Muon::CscPrepDataContainer > m_cscPrepContainerKey
CscDataPreparator(const std::string &type, const std::string &name, const IInterface *parent)
StatusCode prepareData(const EventContext &ctx, TrigL2MuonSA::MuonRoad &muonRoad, TrigL2MuonSA::CscHits &cscHits) const
double aw[N_STATION][N_SECTOR]
double bw[N_STATION][N_SECTOR]
double phi[N_STATION][N_SECTOR]
MuonPrepDataCollection< CscPrepData > CscPrepDataCollection
CscClusterStatus
Enum to represent the cluster status - see the specific enum values for more details.
@ CscStatusUnspoiled
Clean cluster with precision fit.
@ CscStatusSplitUnspoiled
Clean cluster with precision fit after split cluster.
MuonPrepDataContainerT< CscPrepData > CscPrepDataContainer
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
std::vector< CscHitData > CscHits
@ CSC
CSC measurement point.