19 const std::string&
name,
33 ATH_CHECK(m_cscPrepContainerKey.initialize(!m_cscPrepContainerKey.empty()));
35 return StatusCode::SUCCESS;
50 if(!m_cscPrepContainerKey.empty()){
51 auto cscPrepContainerHandle =
SG::makeHandle(m_cscPrepContainerKey, ctx);
53 if (!cscPrepContainerHandle.isValid()) {
54 ATH_MSG_ERROR(
"Cannot retrieve CSC PRD Container key: " << m_cscPrepContainerKey.key());
55 return StatusCode::FAILURE;
60 if( cscCol==
nullptr )
continue;
61 cscHits.reserve( cscHits.size() + cscCol->size() );
64 if( prepData==
nullptr )
continue;
71 double phiw = muonRoad.
phi[4][0];
74 bool isunspoiled =
IsUnspoiled (prepData->status());
79 cscHit.
StationName = m_idHelperSvc->cscIdHelper().stationName( prepData->identify() );
80 cscHit.StationEta = m_idHelperSvc->cscIdHelper().stationEta( prepData->identify() );
81 cscHit.StationPhi = m_idHelperSvc->cscIdHelper().stationPhi( prepData->identify() );
82 cscHit.ChamberLayer = (
true==isunspoiled) ? 1 : 0;
83 cscHit.WireLayer = m_idHelperSvc->cscIdHelper().wireLayer( prepData->identify() );
84 cscHit.MeasuresPhi = m_idHelperSvc->cscIdHelper().measuresPhi( prepData->identify() );
85 cscHit.Strip = m_idHelperSvc->cscIdHelper().strip( prepData->identify() );
87 cscHit.StripId = (cscHit.StationName << 18)
88 | ((cscHit.StationEta + 2) << 16) | (cscHit.StationPhi << 12)
89 | (cscHit.WireLayer << 9) | (cscHit.MeasuresPhi << 8) | (cscHit.Strip);
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) );
97 cscHit.Residual = ( cscHit.MeasuresPhi==0 ) ? calc_residual( aw, bw, cscHit.z, cscHit.r ) : calc_residual_phi( aw,bw,phiw, cscHit.phi, cscHit.z);
102 double width = (cscHit.MeasuresPhi) ? 250. : 100.;
103 if( std::abs(cscHit.Residual)>
width ){
105 if( std::abs(cscHit.Residual)>3.*
width ){
110 cscHits.push_back( cscHit );
114 <<
"SN=" << cscHit.StationName <<
","
115 <<
"SE=" << cscHit.StationEta <<
","
116 <<
"SP=" << cscHit.StationPhi <<
","
117 <<
"CL=" << cscHit.ChamberLayer <<
","
118 <<
"WL=" << cscHit.WireLayer <<
","
119 <<
"MP=" << cscHit.MeasuresPhi <<
","
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 <<
","
128 <<
"Rs=" << cscHit.Residual <<
","
129 <<
"OL=" << cscHit.isOutlier);
135 return StatusCode::SUCCESS;
147 double dz =
x - (
y-bw)*ia;
148 return dz/std::sqrt(1.+iaq);
156 double roadr = hitz*aw + bw;