15 std::vector<int> vecTP;
29 if(!readNSW_TrigRawDataContainer.
isValid()){
31 return StatusCode::FAILURE;
36 int nsw_sideId = (nsw_sector->sectorSide()==
'A')?0:1;
38 nsw_sector->sectorId(),
41 nsw_trk->deltaTheta(),
48 return StatusCode::SUCCESS;
52 std::shared_ptr<const NSWTrigOut>
55 auto indexIsOk = [
this](
int idx)->
bool{
63 std::shared_ptr<NSWTrigOut> trigNSW_output;
65 trigNSW_output->clear();
68 if ( TGC_TriggerSector<0 || TGC_TriggerSector>47 )
return 0;
70 int temp=
int((TGC_TriggerSector-2)/6);
71 int NSW_TriggerSector=temp*2+
int((TGC_TriggerSector-1-6*temp)/5);
72 if(TGC_TriggerSector==0 || TGC_TriggerSector==1) {
78 if (not indexIsOk(NSW_TriggerSector))
return nullptr;
81 if ( NSW_TriggerSector == 15 ) {
84 if (not indexIsOk(NSW_TriggerSector + 1))
return nullptr;
88 if( !(TGC_TriggerSector%6==4 || TGC_TriggerSector%6==5) ){
89 return trigNSW_output;
93 if ( NSW_TriggerSector==14 ) {
98 if (not indexIsOk(NSW_TriggerSector + 2))
return nullptr;
102 return trigNSW_output;
106 if ( TGC_TriggerSector<0 || TGC_TriggerSector>23 )
return 0;
109 int temp=
int((TGC_TriggerSector-4)/6);
110 int NSW_TriggerSector=temp*4+
int((TGC_TriggerSector-6*temp-4)/2)+2;
111 if(TGC_TriggerSector==0 || TGC_TriggerSector==1)
112 NSW_TriggerSector=15;
113 else if(TGC_TriggerSector==2 || TGC_TriggerSector==3)
117 if (not indexIsOk(NSW_TriggerSector))
return nullptr;
120 if(TGC_TriggerSector==0 || TGC_TriggerSector==1){
123 }
else if(TGC_TriggerSector==22 || TGC_TriggerSector==23){
124 if (not indexIsOk(NSW_TriggerSector + 1))
return nullptr;
128 if (not indexIsOk(NSW_TriggerSector + 2))
return nullptr;
133 return trigNSW_output;
146 m_buffer[
side][NSWTriggerProcesser]->setNSWTriggerProcessor(NSWTriggerProcesser);
147 m_buffer[
side][NSWTriggerProcesser]->setEta(NSWeta_8bit);
148 m_buffer[
side][NSWTriggerProcesser]->setPhi(NSWphi_6bit);
149 m_buffer[
side][NSWTriggerProcesser]->setDtheta(NSWDtheta_5bit);
152 m_buffer[
side][NSWTriggerProcesser]->setMonitor(NSWmonitor);
157 for(
int idx1=0; idx1<2; idx1++){
166 for(
int idx1=0; idx1<2; idx1++){