19 const std::string&
name,
33 ATH_CHECK(m_cscPrepContainerKey.initialize(!m_cscPrepContainerKey.empty()));
35 return StatusCode::SUCCESS;
49 if(!m_cscPrepContainerKey.empty()){
50 auto cscPrepContainerHandle =
SG::makeHandle(m_cscPrepContainerKey);
52 if (!cscPrepContainerHandle.isValid()) {
53 ATH_MSG_ERROR(
"Cannot retrieve CSC PRD Container key: " << m_cscPrepContainerKey.key());
54 return StatusCode::FAILURE;
59 if( cscCol==
nullptr )
continue;
60 cscHits.reserve( cscHits.size() + cscCol->size() );
63 if( prepData==
nullptr )
continue;
70 double phiw = muonRoad.
phi[4][0];
73 bool isunspoiled =
IsUnspoiled (prepData->status());
78 cscHit.
StationName = m_idHelperSvc->cscIdHelper().stationName( prepData->identify() );
79 cscHit.StationEta = m_idHelperSvc->cscIdHelper().stationEta( prepData->identify() );
80 cscHit.StationPhi = m_idHelperSvc->cscIdHelper().stationPhi( prepData->identify() );
81 cscHit.ChamberLayer = (
true==isunspoiled) ? 1 : 0;
82 cscHit.WireLayer = m_idHelperSvc->cscIdHelper().wireLayer( prepData->identify() );
83 cscHit.MeasuresPhi = m_idHelperSvc->cscIdHelper().measuresPhi( prepData->identify() );
84 cscHit.Strip = m_idHelperSvc->cscIdHelper().strip( prepData->identify() );
86 cscHit.StripId = (cscHit.StationName << 18)
87 | ((cscHit.StationEta + 2) << 16) | (cscHit.StationPhi << 12)
88 | (cscHit.WireLayer << 9) | (cscHit.MeasuresPhi << 8) | (cscHit.Strip);
89 cscHit.eta = prepData->globalPosition().eta();
90 cscHit.phi = prepData->globalPosition().phi();
91 cscHit.r = prepData->globalPosition().perp();
92 cscHit.z = prepData->globalPosition().z();
93 cscHit.charge = prepData->charge();
94 cscHit.time = prepData->time();
95 cscHit.resolution = std::sqrt( prepData->localCovariance()(0,0) );
96 cscHit.Residual = ( cscHit.MeasuresPhi==0 ) ? calc_residual( aw, bw, cscHit.z, cscHit.r ) : calc_residual_phi( aw,bw,phiw, cscHit.phi, cscHit.z);
101 double width = (cscHit.MeasuresPhi) ? 250. : 100.;
102 if( std::abs(cscHit.Residual)>
width ){
104 if( std::abs(cscHit.Residual)>3.*
width ){
109 cscHits.push_back( cscHit );
113 <<
"SN=" << cscHit.StationName <<
","
114 <<
"SE=" << cscHit.StationEta <<
","
115 <<
"SP=" << cscHit.StationPhi <<
","
116 <<
"CL=" << cscHit.ChamberLayer <<
","
117 <<
"WL=" << cscHit.WireLayer <<
","
118 <<
"MP=" << cscHit.MeasuresPhi <<
","
119 <<
"St=" << cscHit.Strip <<
","
120 <<
"ID=" << cscHit.StripId <<
","
121 <<
"eta=" << cscHit.eta <<
","
122 <<
"phi=" << cscHit.phi <<
","
123 <<
"r=" << cscHit.r <<
","
124 <<
"z=" << cscHit.z <<
","
125 <<
"q=" << cscHit.charge <<
","
126 <<
"t=" << cscHit.time <<
","
127 <<
"Rs=" << cscHit.Residual <<
","
128 <<
"OL=" << cscHit.isOutlier);
134 return StatusCode::SUCCESS;
146 double dz =
x - (
y-bw)*ia;
147 return dz/std::sqrt(1.+iaq);
155 double roadr = hitz*aw + bw;