131 if(orChannel)
return nullptr;
132 if(asdin->isValid()==
false)
return nullptr;
134 const bool asdinisEndcap = asdin->isEndcap();
135 const bool asdinisTriplet = asdin->isTriplet();
136 const int asdinLayer = asdin->getLayer();
137 const int asdinChannel = asdin->getChannel();
139 TGCDatabase* databaseP =
140 m_database[asdin->getRegionType()][asdin->getModuleType()];
142 TGCChannelASDOut* asdout =
nullptr;
146 if(asdin->isEndcap()) {
147 if(!asdin->isInner()){
155 if(!asdin->isInner()){
166 if(asdin->isEndcap()&&!asdin->isInner()){
167 chamber = 5-asdin->getChamber();
169 chamber = asdin->getChamber()-1;
175 const int MaxEntry = databaseP->getMaxEntry();
176 for(
int i=0;
i<MaxEntry;
i++){
179 if(asdinisEndcap&&asdinisTriplet)
180 dbChamber = dbChamber-1;
182 int dbChannel = asdinChannel-1;
183 if(databaseP->getEntry(
i,7)==dbChannel&&
184 databaseP->getEntry(
i,1)==dbChamber&&
185 databaseP->getEntry(
i,0)==asdinLayer)
193 bool is_Backward =
false;
194 if(asdin->isEndcap()){
195 if(!asdin->isInner()) {
196 if(asdin->isAside()) is_Backward = (sector%2==1);
197 else is_Backward = (sector%2==0);
202 if(asdin->isAside()) is_Backward =
false;
203 else is_Backward =
true;
204 }
else if(sector == 16) {
205 if(asdin->isAside()) is_Backward =
true;
206 else is_Backward =
false;
210 if(asdin->isAside()) is_Backward = (sector%3==2);
211 else is_Backward = (sector%3!=2);
215 if(asdin->isAside()) is_Backward =
true;
217 if(( is_Backward && asdin->isAside()) ||
218 (!is_Backward && asdin->isCside()))
219 channel = 32-asdin->getChannel();
221 channel = asdin->getChannel()-1;
223 if(
channel==-1)
return nullptr;
225 asdout =
new TGCChannelASDOut(asdin->getSideType(),
226 asdin->getSignalType(),
227 asdin->getRegionType(),