104 {
106 Gaudi::svcLocator() -> service(
"MessageSvc",
msgSvc);
107 MsgStream log(
msgSvc,
"PreXtMdcCalib");
108 log << MSG::DEBUG << "PreXtMdcCalib::fillHist()" << endreq;
109
111 int lay;
112 int digiId;
113 unsigned fgOverFlow;
114 double tdc;
115 double adc;
116 double traw;
117 double trec;
119
120 IDataProviderSvc* eventSvc = NULL;
121 Gaudi::svcLocator()->service("EventDataSvc", eventSvc);
122
123 double xtpar[8];
124 if(! m_fgIniTm){
126 m_t0[lay] = m_mdcFunSvc -> getT0(lay, 0);
127 m_mdcFunSvc->
getXtpar(lay, 0, 0, xtpar);
128 m_tm[lay] = xtpar[6];
129 }
130 m_fgIniTm = true;
131 }
132
133
134 double tes = -9999.0;
135 int esTimeflag = -1;
136 SmartDataPtr<RecEsTimeCol> aevtimeCol(eventSvc,"/Event/Recon/RecEsTimeCol");
137 if( (!aevtimeCol) || (aevtimeCol->size()==0) ){
138 tes = -9999.0;
139 esTimeflag = -1;
140 }else{
141 RecEsTimeCol::iterator iter_evt = aevtimeCol->begin();
142 for(; iter_evt!=aevtimeCol->end(); iter_evt++){
143 tes = (*iter_evt)->getTest();
144 esTimeflag = (*iter_evt)->getStat();
145 }
146 }
147 bool flagTes = false;
148 for(
int iEs=0; iEs<m_param.
nEsFlag; iEs++){
149 if(esTimeflag == m_param.
esFlag[iEs]){
150 flagTes = true;
151 break;
152 }
153 }
154 if( (!flagTes) || (tes < m_param.
tesMin) || (tes > m_param.
tesMax) )
return -1;
155
156
157 SmartDataPtr<MdcDigiCol> mdcDigiCol(eventSvc,"/Event/Digi/MdcDigiCol");
158 if (!mdcDigiCol) {
159 log << MSG::FATAL << "Could not find event" << endreq;
160 }
161
162 MdcDigiCol::iterator
iter = mdcDigiCol->begin();
163 digiId = 0;
164 for(;
iter != mdcDigiCol->end();
iter++, digiId++) {
166 id = (aDigi)->identify();
167
169
170 tdc = (aDigi) -> getTimeChannel();
171 adc = (aDigi) -> getChargeChannel();
172 fgOverFlow = (aDigi) -> getOverflow();
174 trec = traw - tes - m_t0[lay];
175
176
177
178
179 if ( ((fgOverFlow & 1) !=0 ) || ((fgOverFlow & 12) != 0) ||
182
183
184
185 if(trec > 0){
186 if(trec < m_tm[lay]){
187 m_nTot[lay]++;
188 m_htrec[lay]->Fill(trec);
189 m_nhitTot->Fill(lay);
190 }
192 if(trec < m_tbin[
bin]){
193 m_nEntries[lay][
bin]++;
194 m_nhitBin[lay]->Fill(m_tbin[
bin]);
195 }
196 }
197 }
198 }
199 return 1;
200}
*******INTEGER m_nBinMax INTEGER m_NdiMax !No of bins in histogram for cell exploration division $ !Last vertex $ !Last active cell $ !Last cell in buffer $ !No of sampling when dividing cell $ !No of function total $ !Flag for random ceel for $ !Flag for type of for WtMax $ !Flag which decides whether vertices are included in the sampling $ entire domain is hyp !Maximum effective eevents per bin
const double MdcCalTdcCnv
virtual void getXtpar(int layid, int entr, int lr, double par[]) const =0
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
unsigned int getChargeChannel() const
unsigned int getTimeChannel() const