28 AthAlgorithm(
name, pSvcLocator), m_temp_coll(nullptr), m_rpcClusterContainer(nullptr)
49 return StatusCode::SUCCESS;
77 return StatusCode::SUCCESS;
85 if(MuonDetMgr==
nullptr){
86 ATH_MSG_ERROR(
"Null pointer to the read MuonDetectorManager conditions object");
87 return StatusCode::FAILURE;
93 return StatusCode::SUCCESS;
108 for ( ; rpcCollection!=lastCollection; ++rpcCollection ){
112 if(!theCollection->
empty()){
120 if (
m_idHelperSvc->rpcIdHelper().get_hash(elementId, rpcHashId, &rpcContext)) {
121 ATH_MSG_ERROR(
"Unable to get RPC hash id from CSC PreDataCollection collection id"
122 <<
"context begin_index = " << rpcContext.
begin_index()
123 <<
" context end_index = " << rpcContext.
end_index()
124 <<
" the identifier is ");
148 <<
" in StoreGate!");
163 return StatusCode::SUCCESS;
172 std::vector<Muon::RpcPrepData*> theDigits= rpcCollection->
stdcont();
178 for(
unsigned int j=0;j< theDigits.size();j++){
198 newPatt[nstrip]=rpcDigit;
228 for(;patt_it!=
m_digits.end();++patt_it){
232 int measphi=
m_idHelperSvc->rpcIdHelper().measuresPhi(panelId);
236 std::map<int, Muon::RpcPrepData*, std::less<int> >
::iterator dig_it=
m_digits[panelId].begin();
238 std::vector<Identifier> theIDs;
239 std::vector<int> theAmbFlags;
245 unsigned int count=0;
250 for(;dig_it!=
m_digits[panelId].end();++dig_it){
259 theIDs.push_back((*dig_it).second->identify());
260 theAmbFlags.push_back((*dig_it).second->ambiguityFlag());
262 globalPosition+=descriptor->
stripPos((*dig_it).second->identify());
263 localPosition+=descriptor->
localStripPos((*dig_it).second->identify());
264 mintime=(*dig_it).second->time();
265 lastTime=(*dig_it).second->time();
267 }
else if(abs(
lastStrip-(*dig_it).first)==1 &&
272 theIDs.push_back((*dig_it).second->identify());
273 theAmbFlags.push_back((*dig_it).second->ambiguityFlag());
275 globalPosition+=descriptor->
stripPos((*dig_it).second->identify());
276 localPosition+=descriptor->
localStripPos((*dig_it).second->identify());
277 if(mintime>(*dig_it).second->time()) mintime=(*dig_it).second->time();
278 lastTime=(*dig_it).second->time();
288 bool hasGoldenStrip=
false;
291 for(
unsigned int k=0;
k<theAmbFlags.size();++
k){
292 clusAmbFlag=
std::max(clusAmbFlag,theAmbFlags[
k]);
294 if(theAmbFlags[
k]==1) hasGoldenStrip=
true;
296 if(hasGoldenStrip) clusAmbFlag=1;
300 localPosition=localPosition*(1/(
float)theIDs.size());
301 globalPosition=globalPosition*(1/(
float)theIDs.size());
305 double err = theIDs.size()*
width/sqrt((
double)12);
311 m_idHelperSvc->rpcIdHelper().get_hash(elementId, rpcHashId, &rpcContext);
335 theIDs.push_back((*dig_it).second->identify());
336 theAmbFlags.push_back((*dig_it).second->ambiguityFlag());
339 globalPosition=descriptor->
stripPos((*dig_it).second->identify());
340 localPosition=descriptor->
localStripPos((*dig_it).second->identify());
341 mintime=(*dig_it).second->time();
342 lastTime=(*dig_it).second->time();
358 bool hasGoldenStrip=
false;
361 for(
unsigned int k=0;
k<theAmbFlags.size();++
k){
362 clusAmbFlag=
std::max(clusAmbFlag,theAmbFlags[
k]);
364 if(theAmbFlags[
k]==1) hasGoldenStrip=
true;
366 if(hasGoldenStrip) clusAmbFlag=1;
372 m_idHelperSvc->rpcIdHelper().get_hash(elementId, rpcHashId, &rpcContext);
375 localPosition=localPosition*(1/(
float)theIDs.size());
376 globalPosition=globalPosition*(1/(
float)theIDs.size());
380 double err = theIDs.size()*
width/sqrt((
double)12);