53 #include "StPmdGeom.h"
54 #include "StPmdMapUtil.h"
60 memset(beg,0,end-beg);
75 mPmdGeom->GetRunYear(runno1,rn,year);
77 cout<<
"PMD runno, rn1 "<<runno1<<
" "<<rn<<
" "<<year<<endl;
79 gMessMgr->Warning(
"Unphysical year");
84 Int_t sm=0,row=0,col=0;
91 for(Int_t ism=0;ism<PMD_CRAMS_MAX*2;ism++){
92 for(Int_t irow=0;irow<PMD_ROW_MAX;irow++){
93 for(Int_t icol=0;icol<PMD_COL_MAX;icol++){
94 m_ChannelInBoard[ism][irow][icol]=-1;
95 m_TempChannelInBoard[ism][irow][icol]=-1;
96 m_Chain[ism][irow][icol]=-1;
101 for(Int_t Chain_No=1;Chain_No<=PMD_CHAIN_MAX;Chain_No++){
103 for(Int_t CHANNEL=0;CHANNEL<PMD_CHAIN_CHANNEL_MAX;CHANNEL++){
104 Int_t channel=CHANNEL;
109 fail = mPmdGeom->ChainMapping(Chain_No,channel,sm,col,row,chtemp);
111 mPmdGeom->readBoardDetail(runno1);
112 fail = mPmdGeom->ChainMapping(Chain_No,channel,sm,col,row,chtemp,year);
114 if (sm <=0) fail +=10;
115 if (col<=0) fail +=20;
116 if (row<=0) fail +=40;
118 if(chtemp==-1)
continue;
120 m_ChannelInBoard[sm-1][row-1][col-1]=channel;
121 m_TempChannelInBoard[sm-1][row-1][col-1]=chtemp;
122 m_Chain[sm-1][row-1][col-1]=Chain_No;
131 memset(m_ChannelInBoard [0][0],0,
sizeof(m_ChannelInBoard ));
132 memset(m_TempChannelInBoard[0][0],0,
sizeof(m_TempChannelInBoard));
133 memset(m_Chain [0][0],0,
sizeof(m_Chain ));
135 for(Int_t Chain_No=1;Chain_No<=PMD_CHAIN_MAX;Chain_No++){
136 for(Int_t CHANNEL=0;CHANNEL<PMD_CHAIN_CHANNEL_MAX;CHANNEL++){
137 Int_t channel=CHANNEL;
140 mPmdGeom->ChainMapping(Chain_No,channel,sm,col,row,chtemp);
141 m_ChannelInBoard[sm-1][row-1][col-1]=channel;
142 m_TempChannelInBoard[sm-1][row-1][col-1]=chtemp;
143 m_Chain[sm-1][row-1][col-1]=Chain_No;
149 void StPmdMapUtil::SetSMChainCombos(Int_t runno1){
152 mPmdGeom->readBoardDetail(runno1);
154 mPmdGeom->GetRunYear(runno1,rn,year);
155 for(Int_t ichain = 0;ichain<48;ichain++){
156 for(Int_t ism = 0;ism < 24;ism++){
157 nBoardSMChain[ism][ichain] = 0;
162 for(Int_t ichain = 0;ichain<48;ichain++){
163 for(Int_t ibrd = 0;ibrd < 27;ibrd++){
164 Int_t channel = 10 + ibrd*64;
165 Int_t sm=0,col=0,row=0,chmod=0;
166 Int_t chain = ichain+1;
168 mapcheck = mPmdGeom->ChainMapping(chain,channel,sm,col,row,chmod);
170 mapcheck = mPmdGeom->ChainMapping(chain,channel,sm,col,row,chmod,year);
172 if(mapcheck==
kStOk && sm > 0) {
173 nBoardSMChain[sm-1][ichain]++;
174 SMChainExists[sm-1][ichain]=nSMChain+1;
175 if(nBoardSMChain[sm-1][ichain]==1) {
178 FirstBoard[nSMChain-1] = ibrd+1;
179 SM_Combo[nSMChain-1] = sm;
180 Chain_Combo[nSMChain-1] = chain;
virtual ~StPmdMapUtil()
A constructor.
void StoreMapInfo()
A destructor.