Report problems to ATLAS LXR Team (with time and IP address indicated)

The LXR Cross Referencer

source navigation ]
diff markup ]
identifier search ]
general search ]
 
 
Architecture: linux ]
Version: head ] [ nightly ] [ GaudiDev ]
  Links to LXR source navigation pages for stable releases [ 12.*.* ]   [ 13.*.* ]   [ 14.*.* ]   [ 15.*.* ] 

001 
002 #include "MuonGeoModel/RDBReaderAtlas.h"
003 #include "MuonReadoutGeometry/GlobalUtilities.h"
004 #include "MuonGeoModel/StationSelector.h"
005 #include "MuonGeoModel/MdtComponent.h"
006 #include "MuonReadoutGeometry/MuonDetectorManager.h"
007 #include "RDBAccessSvc/IRDBAccessSvc.h"
008 #include "RDBAccessSvc/IRDBRecord.h"
009 #include "RDBAccessSvc/IRDBRecordset.h"
010 #include "MuonReadoutGeometry/TgcReadoutParams.h"
011 #include "CLHEP/Units/SystemOfUnits.h"
012 
013 #include "MuonGeoModel/TGC_Technology.h"
014 
015 namespace MuonGM {
016 
017 RDBReaderAtlas::RDBReaderAtlas(StoreGateSvc *pDetStore, IRDBAccessSvc* pRDBAccess, std::string geoTag, std::string geoNode,
018                                const std::map<std::string,std::string>* asciiFileDBMap)
019     :
020   DBReader(pDetStore),
021   _geoTag(geoTag),
022   _geoNode(geoNode),
023   m_pRDBAccess(pRDBAccess)
024 {
025   m_msgSvc = Athena::getMessageSvc();
026     MsgStream log(m_msgSvc, "MuGM:RDBReadAtlas");
027     SCdbaccess = StatusCode::FAILURE;
028 
029     log<<MSG::INFO<<"Start retriving dbObjects with tag = <"<<geoTag<<"> node <"<<geoNode<<">"<<endreq;
030     // here putting RDB data in private "objects" form
031     const IRDBRecordset* dbdata;
032     dbdata = m_pRDBAccess->getRecordset("ATYP",geoTag,geoNode);
033     dhatyp = new DblQ00Atyp(dbdata);
034     atyp = dhatyp->data();
035     dbdata = m_pRDBAccess->getRecordset("ASMP",geoTag,geoNode);
036     dhasmp = new DblQ00Asmp(dbdata);
037     asmp = dhasmp->data();
038     dbdata = m_pRDBAccess->getRecordset("ALMN",geoTag,geoNode);
039     dhalmn = new DblQ00Almn(dbdata);
040     almn = dhalmn->data();
041     dbdata = m_pRDBAccess->getRecordset("APTP",geoTag,geoNode);
042     dhaptp = new DblQ00Aptp(dbdata);
043     aptp = dhaptp->data();
044     dbdata = m_pRDBAccess->getRecordset("ACUT",geoTag,geoNode);
045     dhacut = new DblQ00Acut(dbdata);
046     acut = dhacut->data();
047     dbdata = m_pRDBAccess->getRecordset("ALIN",geoTag,geoNode);
048     dhalin = new DblQ00Alin(dbdata);
049     alin = dhalin->data();
050     dbdata = m_pRDBAccess->getRecordset("DBAM",geoTag,geoNode);
051     dhdbam = new DblQ00Dbam(dbdata);
052     dbam = dhdbam->data();
053     dbdata = m_pRDBAccess->getRecordset("AWLN",geoTag,geoNode);
054     dhwrpc = new DblQ00Awln(dbdata);
055     wrpc= dhwrpc->data();
056     dbdata = m_pRDBAccess->getRecordset("ATLN",geoTag,geoNode);
057     dhwtgc = new DblQ00Atln(dbdata);
058     wtgc= dhwtgc->data();
059     dbdata = m_pRDBAccess->getRecordset("WMDT",geoTag,geoNode);
060     dhwmdt = new DblQ00Wmdt(dbdata);
061     wmdt= dhwmdt->data();
062     dbdata = m_pRDBAccess->getRecordset("WCSC",geoTag,geoNode);
063     dhwcsc = new DblQ00Wcsc(dbdata);
064     wcsc= dhwcsc->data();
065     dbdata = m_pRDBAccess->getRecordset("WRPC",geoTag,geoNode);
066     dhwrpcall = new DblQ00Wrpc(dbdata);
067     wrpcall= dhwrpcall->data();
068     dbdata = m_pRDBAccess->getRecordset("WTGC",geoTag,geoNode);
069     dhwtgcall = new DblQ00Wtgc(dbdata);
070     wtgcall= dhwtgcall->data();
071     dbdata = m_pRDBAccess->getRecordset("WSPA",geoTag,geoNode);
072     dhwspa = new DblQ00Wspa(dbdata);
073     wspa= dhwspa->data();
074     dbdata = m_pRDBAccess->getRecordset("WDED",geoTag,geoNode);
075     dhwded = new DblQ00Wded(dbdata);
076     wded= dhwded->data();
077     dbdata = m_pRDBAccess->getRecordset("WSUP",geoTag,geoNode);
078     dhwsup = new DblQ00Wsup(dbdata);
079     wsup= dhwsup->data();
080 
081     // ASZT
082     dhaszt=0;
083     if (asciiFileDBMap!=0 && 
084         asciiFileDBMap->find("ASZT") != asciiFileDBMap->end()) {         
085       log<<MSG::INFO<<"getting aszt from ascii file"<<endreq;
086       dbdata=0;
087       dhaszt = new DblQ00Aszt(asciiFileDBMap->find("ASZT")->second);
088       if (dhaszt->size()==0) 
089         log<<MSG::ERROR<<"Couldn't read ASZT from ascii file!"<<endreq;
090       else log<<MSG::INFO<<"N. of lines read = "<<dhaszt->size()<<endreq;
091     }
092     if (dhaszt==0 || dhaszt->size()==0) {
093       dbdata = m_pRDBAccess->getRecordset("ASZT",geoTag,geoNode);    
094       if (dbdata->size() == 0) {
095         dhaszt = new DblQ00Aszt();
096         log<<MSG::INFO<<"No ASZT table "<<endreq;
097       }
098       else {
099         log<<MSG::INFO<<"ASZT table found"<<endreq;
100         dhaszt = new DblQ00Aszt(dbdata);
101         //aszt= dhaszt->data();
102       }
103     }
104     log<<MSG::DEBUG<<"writing ASZT values to file"<<endreq;
105     
106     aszt= dhaszt->data();
107 
108     //
109     //dhaszt->WriteAsztToAsciiFile("aszt.txt");
110     
111     
112     if (geoTag != "ATLAS-00")
113     {
114         dbdata = m_pRDBAccess->getRecordset("WCHV",geoTag,geoNode);
115         dhwchv = new DblQ00Wchv(dbdata);
116         wchv= dhwchv->data();
117         dbdata = m_pRDBAccess->getRecordset("WCRO",geoTag,geoNode);
118         dhwcro = new DblQ00Wcro(dbdata);
119         wcro= dhwcro->data();
120         dbdata = m_pRDBAccess->getRecordset("WCMI",geoTag,geoNode);
121         dhwcmi = new DblQ00Wcmi(dbdata);
122         wcmi= dhwcmi->data();
123         dbdata = m_pRDBAccess->getRecordset("WLBI",geoTag,geoNode);
124         dhwlbi = new DblQ00Wlbi(dbdata);
125         wlbi= dhwlbi->data();
126     }
127 
128     
129     
130     // everything fetched 
131     SCdbaccess = StatusCode::SUCCESS;    
132     log<<MSG::INFO<<"Access granted for all dbObjects needed by muon detectors"<<endreq;
133 }
134 
135 StatusCode RDBReaderAtlas::ProcessDB()
136 {
137     MsgStream log(m_msgSvc, "MuGM:RDBReadAtlas");
138     // Check access to the database (from the constructor)
139     if (SCdbaccess == StatusCode::FAILURE)
140     {
141         return SCdbaccess;
142     }
143 
144     MYSQL * mysql = MYSQL::GetPointer();
145     // set GeometryVersion in MYSQL
146     mysql->setGeometryVersion(getGeometryVersion());
147     // set LayoutName read from amdb
148     mysql->setLayoutName(dbam[0].amdb);
149     // set NovaVersion     in MYSQL
150     mysql->setNovaVersion(dbam[0].version);
151     // set AmdbVersion     in MYSQL
152     mysql->setNovaReadVersion(dbam[0].nvrs);
153 
154     // Process Stations and components
155     MuonGM::ProcessStations(dhalmn, almn, dhatyp, atyp);
156     
157     // Process Technologies
158     ProcessTechnologies();
159 
160     // Process Positions
161     MuonGM::ProcessPositions(dhaptp, aptp);
162 
163     // Process Cutouts
164     if (getGeometryVersion().substr(0,1) != "P")
165         MuonGM::ProcessCutouts(dhacut, acut, dhalin, alin, dhatyp, atyp);
166 
167     // Process Alignements
168     if (dhaszt->size() >0) MuonGM::ProcessAlignements(dhaszt, aszt);
169     
170 
171     // Process TgcReadout
172     RDBReaderAtlas::ProcessTGCreadout();
173 
174     //
175     log<<MSG::INFO<<"Intermediate Objects built from primary numbers"<<endreq;
176 
177     return SCdbaccess;
178 
179 }
180 RDBReaderAtlas::~RDBReaderAtlas()
181 {
182     delete dhdbam;
183     delete dhatyp;
184     delete dhasmp;
185     delete dhaszt;
186     delete dhalmn;
187     delete dhaptp;
188     delete dhwmdt;
189     delete dhwrpc;
190     delete dhwrpcall;
191     delete dhwcsc;
192     delete dhwtgc;
193     delete dhwtgcall;
194     delete dhalin;
195     delete dhacut;
196     delete dhwded;
197     delete dhwspa;
198     delete dhwsup;
199     delete dhwchv;
200     delete dhwcro;
201     delete dhwcmi;
202     delete dhwlbi;
203 }
204 
205 
206 void RDBReaderAtlas::ProcessTechnologies()
207 {
208     MsgStream log(m_msgSvc, "MuGM:ProcTechnol.s");
209     // here loop over station-components to init technologies at each new entry
210     std::vector<std::string> slist;
211     slist.push_back("*");
212     StationSelector sel(slist);
213     StationSelector::StationIterator it;
214     log<<MSG::DEBUG<<" from RDBReaderAtlas --- start "<<endreq;
215 
216 
217     bool have_spa_details = (getGeometryVersion().substr(0,1) != "P");
218 
219     for ( it = sel.begin(); it != sel.end(); it++ )
220     {
221         Station *station = (*it).second;
222         for ( int ic = 0; ic< station->GetNrOfComponents(); ic++ )
223         {
224             Component* c = station->GetComponent(ic);
225             if (c == NULL)  continue;
226             std::string cname = c->name;
227             if      (cname.substr(0,3) == "CSC") MuonGM::ProcessCSC(dhwcsc, wcsc, cname);
228             else if (cname.substr(0,3) == "MDT") MuonGM::ProcessMDT(dhwmdt, wmdt, cname);
229             else if (cname.substr(0,3) == "RPC") MuonGM::ProcessRPC(dhwrpc, wrpc, dhwrpcall, wrpcall, cname);            
230             else if (cname.substr(0,3) == "TGC") MuonGM::ProcessTGC(dhwtgc, wtgc, dhwtgcall, wtgcall, cname);
231             else if (cname.substr(0,3) == "SPA") MuonGM::ProcessSPA(dhwspa, wspa, cname);
232             else if (cname.substr(0,3) == "DED") MuonGM::ProcessDED(dhwded, wded, cname);
233             else if (cname.substr(0,3) == "SUP") MuonGM::ProcessSUP(dhwsup, wsup, cname);
234             else if (cname.substr(0,3) == "CHV" && have_spa_details) MuonGM::ProcessCHV(dhwchv, wchv, cname);
235             else if (cname.substr(0,3) == "CRO" && have_spa_details) MuonGM::ProcessCRO(dhwcro, wcro, cname);
236             else if (cname.substr(0,3) == "CMI" && have_spa_details) MuonGM::ProcessCMI(dhwcmi, wcmi, cname);
237             else if (cname.substr(0,2) == "LB"  && have_spa_details)  MuonGM::ProcessLBI(dhwlbi, wlbi, cname);
238         }
239     }
240 
241     log<<MSG::INFO<<"nMDT "<<nmdt<<" nCSC "<<ncsc<<" nTGC "<<ntgc<<" nRPC "<<nrpc<<endreq;
242     log<<MSG::INFO<<"nDED "<<nded<<" nSUP "<<nsup<<" nSPA "<<nspa<<endreq;
243     log<<MSG::INFO<<"nCHV "<<nchv<<" nCRO "<<ncro<<" nCMI "<<ncmi<<" nLBI "<<nlbi<<endreq;
244 
245 }
246 
247 void RDBReaderAtlas::ProcessTGCreadout () {
248 
249     MsgStream log(m_msgSvc, "MuGM:RDBReadAtlas");
250 
251     if (getGeometryVersion().substr(0,1) == "P") 
252     {
253 
254 
255         const IRDBRecordset *ggsd = m_pRDBAccess->getRecordset("GGSD",_geoTag,_geoNode);
256         const IRDBRecordset *ggcd = m_pRDBAccess->getRecordset("GGCD",_geoTag,_geoNode);
257         log<<MSG::INFO
258            <<"RDBReaderAtlas::ProcessTGCreadout GGSD, GGCD retrieven from Oracle"<<endreq;
259 
260     
261         int version = (int) (*ggsd)[0]->getDouble("VERS");
262         float wirespacing = (*ggsd)[0]->getDouble("WIRESP")*cm;
263         log<<MSG::INFO
264            <<" ProcessTGCreadout - version "<<version<<" wirespacing "<<wirespacing<<endreq;
265     
266         //
267         // in case of the layout P03
268         //
269     
270         // loop over the banks of station components: ALMN
271         for (unsigned int ich=0; ich<ggcd->size(); ++ich)
272         {
273             int type = (int)(*ggcd)[ich]->getDouble("ICHTYP");
274             if (ich<19) 
275             {
276                 std::string name=RDBReaderAtlas::TGCreadoutName(type);
277                 //             std::cout<<" loop over types "<<ich<<" type = "<<type
278                 //                      <<" name "<<name<<" nwire 1,2,3 gap = "<<(*ggcd)[ich]->getDouble("NWGS")[0]<<" "
279                 //                      <<(*ggcd)[ich]->getDouble("NWGS")[1]<<" "<<(*ggcd)[ich]->getDouble("NWGS")[2]<<std::endl;
280           
281 
282                 int nchrng = (int) (*ggcd)[ich]->getDouble("NCHRNG");
283                 std::vector<float> nwgs,roffst,poffst,nsps;
284                 std::vector<float> iwgs1(180), iwgs2(180), iwgs3(180);
285           
286                 for (int i=0;i<3;i++) {
287                     std::ostringstream Astr;
288                     Astr <<"_" << i; 
289                     std::string A=Astr.str();
290                     nwgs.push_back((*ggcd)[ich]->getDouble("NWGS"+A));
291                     roffst.push_back((*ggcd)[ich]->getDouble("ROFFST"+A));
292                     poffst.push_back((*ggcd)[ich]->getDouble("POFFST"+A));
293                     nsps.push_back((*ggcd)[ich]->getDouble("NSPS"+A));
294                 }
295                 for (int i=0;i<nwgs[0];i++) {
296                     std::ostringstream Astr;
297                     Astr <<"_" << i; 
298                     std::string A=Astr.str();
299                     //float xxx = (*ggcd)[ich]->getDouble("IWGS1"+A);
300                     iwgs1[i] = (float)(*ggcd)[ich]->getDouble("IWGS1"+A);
301                 }
302                 for (int i=0;i<nwgs[1];i++) {
303                     std::ostringstream Astr;
304                     Astr <<"_" << i; 
305                     std::string A=Astr.str();
306                     iwgs2[i] = (float)(*ggcd)[ich]->getDouble("IWGS2"+A);
307                 }
308                 for (int i=0;i<nwgs[2];i++) {
309                     std::ostringstream Astr;
310                     Astr <<"_" << i; 
311                     std::string A=Astr.str();
312                     iwgs3[i] = (float)(*ggcd)[ich]->getDouble("IWGS3"+A);
313                 }
314                 TgcReadoutParams* rpar =  new TgcReadoutParams(name, type, version, wirespacing,
315                                                               nchrng,   
316                                                               &(nwgs[0]),
317                                                               &(iwgs1[0]),
318                                                               &iwgs2[0],
319                                                               &iwgs3[0],
320                                                               &roffst[0],
321                                                               &nsps[0],
322                                                               &poffst[0], _mgr->msgSvc());
323                 MYSQL::GetPointer()->StoreTgcRPars(rpar);
324                 _mgr->storeTgcReadoutParams(rpar);
325           
326                 //             std::cout<<" TgcReadoutParams registered at "<<rpar<<" here is name, type, version, wirespacing, nch "
327                 //                      <<rpar->GetName()<<" "<<rpar->chamberType()<<" "<<rpar->readoutVersion()<<" "
328                 //                      <<rpar->wirePitch() <<" "<<rpar->nPhiChambers()
329                 //                      <<std::endl;
330                 //             MYSQL *mysql=  MYSQL::GetPointer();
331                 //             TgcReadoutParams* rpar1 = mysql->GetTgcRPars(name);
332                 //             std::cout<<" TgcReadoutParams from mysql at "<<rpar1<<" here is name, type, version, wirespacing, nch "
333                 //                      <<rpar1->GetName()<<" "<<rpar1->chamberType()<<" "<<rpar1->readoutVersion()<<" "
334                 //                      <<rpar1->wirePitch() <<" "<<rpar1->nPhiChambers()
335                 //                      <<std::endl;
336                 //             std::cout<<" nGangs/gg1,2,3 "<<rpar->nGangs(1)<<" "<<rpar->nGangs(2)<<" "<<rpar->nGangs(3)<<std::endl;
337                 //             for (int g=1; g<=rpar->nGangs(1); ++g)
338                 //             {
339                 //                 int gg = 1;
340                 //                 std::cout<<" nWirec/gang  "<<rpar->nWires(gg, g)<<" for gang/gg "<<g<<"/"<<gg<<std::endl;
341                 //                 gg++;
342                 //                 std::cout<<"              "<<rpar->nWires(gg, g)<<" for gang/gg "<<g<<"/"<<gg<<std::endl;
343                 //                 gg++;
344                 //                 std::cout<<"              "<<rpar->nWires(gg, g)<<" for gang/gg "<<g<<"/"<<gg<<std::endl;
345                 //             }
346             }
347         }
348     
349     }
350     else //if (getGeometryVersion().substr(0,1) == "Q") 
351     {
352         //
353         // in case of layout Q and following
354         //
355         const IRDBRecordset *ggln;
356         //        if (_geoTag == "ATLAS-01") ggln = m_pRDBAccess->getRecordset("GGLN","GGLN-02");
357         //        else ggln = m_pRDBAccess->getRecordset("GGLN",_geoTag,_geoNode);
358         ggln = m_pRDBAccess->getRecordset("GGLN",_geoTag,_geoNode);
359 
360         int version = (int) (*ggln)[0]->getInt("VERS");
361         float wirespacing = (*ggln)[0]->getFloat("WIRESP")*mm;
362         log<<MSG::INFO
363            <<" ProcessTGCreadout - version "<<version<<" wirespacing "<<wirespacing<<endreq;
364 
365         MYSQL *mysql=MYSQL::GetPointer();
366 
367         // loop over the banks of station components: ALMN
368         for (unsigned int ich=0; ich<ggln->size(); ++ich)
369         {
370             int type = (int)(*ggln)[ich]->getInt("JSTA");
371             //            if (ich<22) 
372             //            {
373                 std::string oldname=RDBReaderAtlas::TGCreadoutName(type);
374                 std::string name="TGCReadout"+MuonGM::buildString(type,2);
375 //                 std::cout<<" loop over types "<<ich<<" type = "<<type
376 //                          <<" name "<<name<<" oldname "<<oldname<<std::endl;
377                           
378                 // NCHRNG missing in GGLN, HARD-CODED !!!
379                 int nchrng;
380                 if (type == 1 || type == 6 || type == 12 || type >= 18) {
381                     nchrng = 24;
382                 }
383                 else {
384                     nchrng = 48;
385                 }
386                 std::vector<float> nwgs,roffst,poffst,nsps;
387                 std::vector<float> iwgs1(130), iwgs2(130), iwgs3(130), slarge(33), sshort(33);
388           
389                 for (int i=0;i<3;i++) {
390                     std::ostringstream Astr;
391                     Astr <<"_" << i; 
392                     std::string A=Astr.str();
393                     nwgs.push_back((*ggln)[ich]->getInt("NWGS"+A));
394                     roffst.push_back((*ggln)[ich]->getInt("ROFFST"+A));
395                     //      poffst.push_back((*ggln)[ich]->getInt("POFFST"+A));
396                     poffst.push_back(0);
397                     nsps.push_back((*ggln)[ich]->getInt("NSPS"+A));
398                 }
399                 for (int i=0;i<nwgs[0];i++) {
400                     std::ostringstream Astr;
401                     Astr <<"_" << i; 
402                     std::string A=Astr.str();
403                     //float xxx = (*ggln)[ich]->getInt("IWGS1"+A);
404                     iwgs1[i] = (float)(*ggln)[ich]->getInt("IWGS1"+A);
405                 }
406                 for (int i=0;i<nwgs[1];i++) {
407                     std::ostringstream Astr;
408                     Astr <<"_" << i; 
409                     std::string A=Astr.str();
410                     iwgs2[i] = (float)(*ggln)[ich]->getInt("IWGS2"+A);
411                 }
412                 for (int i=0;i<nwgs[2];i++) {
413                     std::ostringstream Astr;
414                     Astr <<"_" << i; 
415                     std::string A=Astr.str();
416                     iwgs3[i] = (float)(*ggln)[ich]->getInt("IWGS3"+A);
417                 }
418 
419                 // read and store parameters for strips
420 
421                 float pdist = (*ggln)[ich]->getFloat("PDIST");
422 
423                 for (int i=0;i<nsps[0]+1;i++) {
424                     std::ostringstream Astr;
425                     Astr <<"_" << i; 
426                     std::string A=Astr.str();
427                     slarge[i] = (float)(*ggln)[ich]->getFloat("SLARGE"+A);
428                     sshort[i] = (float)(*ggln)[ich]->getFloat("SHORT"+A);
429                 }
430 
431                 //std::cout<<" nchrng "<<nchrng<<std::endl;
432                 
433                 TgcReadoutParams* rpar = new TgcReadoutParams(name, type, version, wirespacing,
434                                                               nchrng,
435                                                               &(nwgs[0]),
436                                                               &(iwgs1[0]),
437                                                               &iwgs2[0],
438                                                               &iwgs3[0],
439                                                               pdist,
440                                                               &slarge[0],
441                                                               &sshort[0],
442                                                               &roffst[0],
443                                                               &nsps[0],
444                                                               &poffst[0], _mgr->msgSvc());
445                 MYSQL::GetPointer()->StoreTgcRPars(rpar);                
446                 _mgr->storeTgcReadoutParams(rpar);
447 
448                 // parameters for TGC inactive inner structure
449 
450                 std::ostringstream Astr;
451                 if (ich < 9) {
452                   Astr << "0" << ich+1;
453                 }
454                 else {
455                   Astr << ich+1;
456                 }
457                 std::string A = Astr.str();
458                 TGC *tgc = (TGC*) mysql->GetTechnology("TGC"+A);
459                 tgc->widthWireSupport     = (*ggln)[ich]->getFloat("S1PP");
460                 tgc->widthGasChannel      = (*ggln)[ich]->getFloat("S2PP");
461                 tgc->distanceWireSupport  = (*ggln)[ich]->getFloat("WSEP");
462                 tgc->offsetWireSupport[0] = (*ggln)[ich]->getFloat("SP1WI");
463                 tgc->offsetWireSupport[1] = (*ggln)[ich]->getFloat("SP2WI");
464                 tgc->offsetWireSupport[2] = (*ggln)[ich]->getFloat("SP3WI");
465                 tgc->angleTilt            = (*ggln)[ich]->getFloat("TILT")*deg;
466                 tgc->radiusButton         = (*ggln)[ich]->getFloat("SP1BU");
467                 tgc->pitchButton[0]       = (*ggln)[ich]->getFloat("SP2BU");
468                 tgc->pitchButton[1]       = (*ggln)[ich]->getFloat("SP3BU");
469                 tgc->angleButton          = (*ggln)[ich]->getFloat("SP4BU")*deg;
470 
471 //                 std::cout<<" TgcReadoutParams registered at "<<rpar<<" here is name, type, version, wirespacing, nch "
472 //                          <<rpar->GetName()<<" "<<rpar->chamberType()<<" "<<rpar->readoutVersion()<<" "
473 //                          <<rpar->wirePitch() <<" "<<rpar->nPhiChambers()
474 //                          <<std::endl;
475 //                 MYSQL *mysql=  MYSQL::GetPointer();
476 //                 TgcReadoutParams* rpar1 = mysql->GetTgcRPars(name);
477 //                 std::cout<<" TgcReadoutParams from mysql at "<<rpar1<<" here is name, type, version, wirespacing, nch "
478 //                          <<rpar1->GetName()<<" "<<rpar1->chamberType()<<" "<<rpar1->readoutVersion()<<" "
479 //                          <<rpar1->wirePitch() <<" "<<rpar1->nPhiChambers()
480 //                          <<std::endl;
481 //                 std::cout<<" nGangs/gg1,2,3 "<<rpar->nGangs(1)<<" "<<rpar->nGangs(2)<<" "<<rpar->nGangs(3)<<std::endl;
482 //                 for (int g=1; g<=rpar->nGangs(1); ++g)
483 //                 {
484 //                     int gg = 1;
485 //                     std::cout<<" nWirec/gang  "<<rpar->nWires(gg, g)<<" for gang/gg "<<g<<"/"<<gg<<std::endl;
486 //                     gg++;
487 //                     std::cout<<"              "<<rpar->nWires(gg, g)<<" for gang/gg "<<g<<"/"<<gg<<std::endl;
488 //                     gg++;
489 //                     std::cout<<"              "<<rpar->nWires(gg, g)<<" for gang/gg "<<g<<"/"<<gg<<std::endl;
490 //                 }
491 //              std::cout << "GGLN pdist= " << pdist << std::endl;
492 //              for (int i=0; i< 33; i++)
493 //                std::cout << "GGLN slarge[" << i << "]= " << slarge[i] << ", sshort[" << i << "]= " << sshort[i] << std::endl;
494                 //}
495         }
496     }
497 
498 }
499 
500 std::string RDBReaderAtlas::TGCreadoutName(int ichtyp) 
501 {
502 
503     if (getGeometryVersion().substr(0,1) == "P") 
504     {
505         
506         if ( _tgcReadoutMapping.size() == 0)
507         { // first time fill the vector 
508             //std::cout<<" filling the map "<<std::endl;
509             _tgcReadoutMapping.push_back("T1F1");  // 1
510             
511             _tgcReadoutMapping.push_back("T1E1");  // 2
512             _tgcReadoutMapping.push_back("T1E2");
513             _tgcReadoutMapping.push_back("T1E3");
514             _tgcReadoutMapping.push_back("T1E4");
515             
516             _tgcReadoutMapping.push_back("T2F1");  // 6
517             
518             _tgcReadoutMapping.push_back("T2E1");  // 7
519             _tgcReadoutMapping.push_back("T2E2");
520             _tgcReadoutMapping.push_back("T2E3");
521             _tgcReadoutMapping.push_back("T2E4");
522             _tgcReadoutMapping.push_back("T2E5");  // 11
523             
524             _tgcReadoutMapping.push_back("T3F1");  // 12 
525             
526             _tgcReadoutMapping.push_back("T3E1");  // 13
527             _tgcReadoutMapping.push_back("T3E2");
528             _tgcReadoutMapping.push_back("T3E3");
529             _tgcReadoutMapping.push_back("T3E4");
530             _tgcReadoutMapping.push_back("T3E5");  // 17
531             
532             _tgcReadoutMapping.push_back("T4F1");  // 18 
533             
534             _tgcReadoutMapping.push_back("T4E1");  // 19
535         }
536         
537         if (ichtyp<1 || ichtyp>19) {
538             std::cerr<<" DBReader::TGCreadoutName  - ichtype "
539                      <<ichtyp<<" out of range 1-19"<<std::endl;
540             return "XXXY";
541         }
542     }
543     else // if (getGeometryVersion().substr(0,1) == "Q") 
544     {
545         // Layout Q and following
546         //
547         if ( _tgcReadoutMapping.size() == 0)
548         { // first time fill the vector 
549             //std::cout<<" filling the map "<<std::endl;
550             _tgcReadoutMapping.push_back("T1F1_1");  // 1
551             
552             _tgcReadoutMapping.push_back("T1E1_1");  // 2
553             _tgcReadoutMapping.push_back("T1E1_2");
554             _tgcReadoutMapping.push_back("T1E1_3");
555             _tgcReadoutMapping.push_back("T1E1_4");
556             
557             _tgcReadoutMapping.push_back("T2F1_1");  // 6
558             
559             _tgcReadoutMapping.push_back("T2E1_1");  // 7
560             _tgcReadoutMapping.push_back("T2E1_2");
561             _tgcReadoutMapping.push_back("T2E1_3");
562             _tgcReadoutMapping.push_back("T2E1_4");
563             _tgcReadoutMapping.push_back("T2E1_5");  // 11
564             
565             _tgcReadoutMapping.push_back("T3F1_1");  // 12 
566             
567             _tgcReadoutMapping.push_back("T3E1_1");  // 13
568             _tgcReadoutMapping.push_back("T3E1_2");
569             _tgcReadoutMapping.push_back("T3E1_3");
570             _tgcReadoutMapping.push_back("T3E1_4");
571             _tgcReadoutMapping.push_back("T3E1_5");  // 17
572             
573             _tgcReadoutMapping.push_back("T4F1_1");  // 18 
574             _tgcReadoutMapping.push_back("T4F2_1");  // 19 
575             
576             _tgcReadoutMapping.push_back("T4E1_1");  // 20
577             _tgcReadoutMapping.push_back("T4E2_1");  // 21
578         }
579         
580         if (ichtyp<1 || ichtyp>21) {
581             std::cerr<<" DBReader::TGCreadoutName  - ichtype "
582                      <<ichtyp<<" out of range 1-21"<<std::endl;
583             return "XXXY";
584         }
585     }
586     
587 
588         
589     return _tgcReadoutMapping[ichtyp-1];
590 }
591 
592 
593 } // namespace MuonGM
594 

source navigation ] diff markup ] identifier search ] general search ]

Due to the LXR bug, the updates fail sometimes to remove references to deleted files. The Saturday's full rebuilds fix these problems
This page was automatically generated by the LXR engine. Valid HTML 4.01!