BOSS 7.1.1
BESIII Offline Software System
Loading...
Searching...
No Matches
DTagSetAlg Class Reference

#include <DTagSetAlg.h>

+ Inheritance diagram for DTagSetAlg:

Public Member Functions

 DTagSetAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
StatusCode initialize ()
 
StatusCode execute ()
 
StatusCode finalize ()
 
unsigned int IntToTag1 (int val1, int val2, int val3, int val4)
 
unsigned int IntToTag2 (int val1, int val2, int val3, int val4, int val5, int val6)
 

Detailed Description

Definition at line 15 of file DTagSetAlg.h.

Constructor & Destructor Documentation

◆ DTagSetAlg()

DTagSetAlg::DTagSetAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 48 of file DTagSetAlg.cxx.

48 :
49 Algorithm(name, pSvcLocator) {
50 declareProperty("QC", m_QC=true);
51 }

Member Function Documentation

◆ execute()

StatusCode DTagSetAlg::execute ( )

Definition at line 160 of file DTagSetAlg.cxx.

160 {
161
162 int nGoodCharged = 0; //1
163 int nGoodChargedp = 0; //2
164 int nGoodChargedm = 0; //3
165 int nCharged = 0; //4
166 int nNeutrk = 0; //5
167 int nTottrk = 0; //6
168 int totCharged = 0; //7
169 int npionp = 0; //8
170 int npionm = 0; //9
171 int nprotonp = 0; //10
172 int nprotonm = 0; //11
173 int nkaonp = 0; //12
174 int nkaonm = 0; //13
175 int nlambda = 0; //14
176 int nalambda= 0; //15
177 int nks = 0; //16
178 int ngamma = 0; //17
179 int neta = 0; //18
180 int npi0 = 0; //19
181 int nmuonp = 0; //20
182 int nmuonm = 0; //21
183 int nelectronp = 0; //22
184 int nelectronm = 0; //23
185
186 Hep3Vector xorigin(0,0,0);
187 if(m_vtxsvc->isVertexValid()){
188 double* dbv = m_vtxsvc->PrimaryVertex();
189 xorigin.setX(dbv[0]);
190 xorigin.setY(dbv[1]);
191 xorigin.setZ(dbv[2]);
192 }
193
194 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(), EventModel::EventHeader);
195 if (!eventHeader) {
196 std::cout << "Could not find Event Header" << std::endl;
197 return StatusCode::FAILURE;
198 }
199 int EvtNo = eventHeader->eventNumber();
200 int RunNo = eventHeader->runNumber();
201 if ( iEvt == 0 ) std::cout << "RUN=" << RunNo << std::endl;
202 SmartDataPtr<EvtRecEvent> evtRecEvent(eventSvc(), EventModel::EvtRec::EvtRecEvent);
203 SmartDataPtr<EvtRecTrackCol> evtRecTrkCol(eventSvc(), EventModel::EvtRec::EvtRecTrackCol);
204
205 nCharged = evtRecEvent->totalCharged();
206 nNeutrk = evtRecEvent->totalNeutral();
207 nTottrk = evtRecEvent->totalTracks();
208
209 // Good charged track selection
210 vector<int> iGood;
211 iGood.clear();
212 for ( Int_t iCharge = 0; iCharge < evtRecEvent->totalCharged(); ++iCharge ) {
213 EvtRecTrackIterator itTrk=evtRecTrkCol->begin() + iCharge;
214 if(!(*itTrk)->isMdcTrackValid()) continue;
215 RecMdcTrack *mdcTrk = (*itTrk)->mdcTrack();
216 double theta = mdcTrk->theta();
217 HepVector a = mdcTrk->helix();
218 HepSymMatrix Ea = mdcTrk->err();
219 HepPoint3D point0(0.,0.,0.); // the initial point for MDC reconstruction
220 HepPoint3D IP(xorigin[0],xorigin[1],xorigin[2]);
221 VFHelix helixip(point0,a,Ea);
222 helixip.pivot(IP);
223 HepVector vecipa = helixip.a();
224 double Rvxy0=fabs(vecipa[0]); //the nearest distance to IP in xy plane
225 double Rvz0=vecipa[3]; //the nearest distance to IP in z direction
226 double Rvphi0=vecipa[1];
227 if(fabs(Rvxy0) >= 1.0) continue;
228 if(fabs(Rvz0) >= 10.0) continue;
229 if(fabs(cos(theta))>=0.93) continue;
230 if(mdcTrk->charge() > 0) nGoodChargedp++;
231 if(mdcTrk->charge() < 0) nGoodChargedm++;
232 ++nGoodCharged;
233 totCharged +=mdcTrk->charge();
234 iGood.push_back(iCharge);
235 }
236 // std::cout <<"iEvt: "<<iEvt <<" nGoodCharged: "<<nGoodCharged<<std::endl;
237
238 // get photons
239 for(int i = evtRecEvent->totalCharged(); i< evtRecEvent->totalTracks(); i++) {
240 EvtRecTrackIterator iTrk=evtRecTrkCol->begin() + i;
241 if((*iTrk)->isEmcShowerValid()){
242 RecEmcShower* emcShower = (*iTrk)->emcShower();
243 if ( (emcShower->energy()>0.025) && (emcShower->time()>0) && (emcShower->time()<14) && ( ( (abs(cos(emcShower->theta()))<0.80) && (emcShower->energy()>0.025) ) || ( (abs(cos(emcShower->theta()))<0.92) && (abs(cos(emcShower->theta()))>0.86) && (emcShower->energy()>0.050) ) ) ){
244 ngamma++;
245 }
246 }
247 }
248
249 // get tracks
250 for (int i=0;i<iGood.size();i++){
251 EvtRecTrackIterator iTrk = evtRecTrkCol->begin() + iGood[i];
252 RecMdcKalTrack* mdcKalTrack = (*iTrk)->mdcKalTrack();
253
254 // set up pid (but only make very rough pid cuts)
256 pid->init();
257 pid->setMethod(pid->methodProbability());
258 pid->setRecTrack(*iTrk);
259 pid->usePidSys(pid->useDedx() | pid->useTof1() | pid->useTof2());
260 pid->identify(pid->onlyPion() | pid->onlyKaon() | pid->onlyProton() | pid->onlyElectron() | pid->onlyMuon());
261 pid->calculate();
262 if(!(pid->IsPidInfoValid())) continue;
263
264 if ((pid->probPion() > pid->probKaon()) && (pid->probPion() > pid->probProton())){
265 if (mdcKalTrack->charge() > 0) npionp++;
266 if (mdcKalTrack->charge() < 0) npionm++;
267 }
268
269 if ((pid->probKaon() > pid->probPion()) && (pid->probKaon() > pid->probProton())){
270 if (mdcKalTrack->charge() > 0) nkaonp++;
271 if (mdcKalTrack->charge() < 0) nkaonm++;
272 }
273
274 if ((pid->probProton() > pid->probPion()) && (pid->probProton() > pid->probKaon())){
275 if (mdcKalTrack->charge() > 0) nprotonp++;
276 if (mdcKalTrack->charge() < 0) nprotonm++;
277 }
278
279 if (pid->probElectron() > 1.0e-5){
280 if (mdcKalTrack->charge() > 0) nelectronp++;
281 if (mdcKalTrack->charge() < 0) nelectronm++;
282 }
283
284 if (pid->probMuon() > 1.0e-5){
285 if (mdcKalTrack->charge() > 0) nmuonp++;
286 if (mdcKalTrack->charge() < 0) nmuonm++;
287 }
288 }
289
290 // get etas, eta --> gamma gamma
291 SmartDataPtr<EvtRecEtaToGGCol> evtRecEtaToGGCol(eventSvc(), EventModel::EvtRec::EvtRecEtaToGGCol);
292 for (EvtRecEtaToGGCol::iterator iEta = evtRecEtaToGGCol->begin(); iEta != evtRecEtaToGGCol->end(); iEta++){
293 if ((((*iEta)->chisq() < 2500) && ((*iEta)->unconMass() > 0.40) && ((*iEta)->unconMass() < 0.70))){
294 EvtRecTrack* lo = const_cast<EvtRecTrack*>((*iEta)->loEnGamma());
295 RecEmcShower* loShower = lo->emcShower();
296 if ( (loShower->energy() > 0.025) && (loShower->time() > 0) && (loShower->time() < 14) && ( ( (abs(cos(loShower->theta())) < 0.80) && (loShower->energy() > 0.025) ) || ( (abs(cos(loShower->theta())) < 0.92) && (abs(cos(loShower->theta())) > 0.86) && (loShower->energy() > 0.050) ) ) ){
297 EvtRecTrack* hi = const_cast<EvtRecTrack*>((*iEta)->hiEnGamma());
298 RecEmcShower* hiShower = hi->emcShower();
299 if ( (hiShower->energy() > 0.025) && (hiShower->time() > 0) && (hiShower->time() < 14) && ( ( (abs(cos(hiShower->theta())) < 0.80) && (hiShower->energy() > 0.025) ) || ( (abs(cos(hiShower->theta())) < 0.92) && (abs(cos(hiShower->theta())) > 0.86) && (hiShower->energy() > 0.050) ) ) ){
300 neta++;
301 }
302 }
303 }
304 }
305
306 // get pi0s, pi0 --> gamma gamma
307 SmartDataPtr<EvtRecPi0Col> evtRecPi0Col(eventSvc(), EventModel::EvtRec::EvtRecPi0Col);
308 for (EvtRecPi0Col::iterator iPi0 = evtRecPi0Col->begin(); iPi0 != evtRecPi0Col->end(); iPi0++){
309 if ((((*iPi0)->chisq() < 2500) && ((*iPi0)->unconMass() > 0.107) && ((*iPi0)->unconMass() < 0.163))){
310 EvtRecTrack* lo = const_cast<EvtRecTrack*>((*iPi0)->loEnGamma());
311 RecEmcShower* loShower = lo->emcShower();
312 if ( (loShower->energy() > 0.025) && (loShower->time() > 0) && (loShower->time() < 14) && ( (( abs(cos(loShower->theta())) < 0.80) && (loShower->energy() > 0.025) ) || ( (abs(cos(loShower->theta())) < 0.92) && (abs(cos(loShower->theta())) > 0.86) && (loShower->energy() > 0.050) ) ) ){
313 EvtRecTrack* hi = const_cast<EvtRecTrack*>((*iPi0)->hiEnGamma());
314 RecEmcShower* hiShower = hi->emcShower();
315 if ( (hiShower->energy() > 0.025) && (hiShower->time() > 0) && (hiShower->time() < 14) && ( ( (abs(cos(hiShower->theta())) < 0.80) && (hiShower->energy() > 0.025) ) || ( (abs(cos(hiShower->theta())) < 0.92) && (abs(cos(hiShower->theta())) > 0.86) && (hiShower->energy() > 0.050) ) ) ){
316 npi0++;
317 }
318 }
319 }
320 }
321
322 // get kshorts
323 // [[ vertexId is the pdgID ]]
324 // Ks --> pi+ pi- and Lambda --> p+ pi- and ALambda --> p- pi+
325 SmartDataPtr<EvtRecVeeVertexCol> evtRecVeeVertexCol(eventSvc(), EventModel::EvtRec::EvtRecVeeVertexCol);
326 for (EvtRecVeeVertexCol::iterator iKs = evtRecVeeVertexCol->begin(); iKs != evtRecVeeVertexCol->end(); iKs++){
327 if ((*iKs)->vertexId() == 310){
328 if ( ((*iKs)->mass() > 0.471) && ((*iKs)->mass() < 0.524) && ((*iKs)->chi2() < 100) ){
329 nks++;
330 }
331 }
332 }
333
334 for (EvtRecVeeVertexCol::iterator iL = evtRecVeeVertexCol->begin(); iL != evtRecVeeVertexCol->end(); iL++){
335 if ((*iL)->vertexId() == 3122){
336 if ( ((*iL)->mass() > 1.100) && ((*iL)->mass() < 1.130) && ((*iL)->chi2() < 100) ){
337 nlambda++;
338 }
339 }
340 if ((*iL)->vertexId() == -3122){
341 if ( ((*iL)->mass() > 1.100) && ((*iL)->mass() < 1.130) && ((*iL)->chi2() < 100) ){
342 nalambda++;
343 }
344 }
345 }
346
347 unsigned int tagdata1 = nGoodCharged;
348 unsigned int tagdata2 = IntToTag1(nNeutrk, nTottrk, ngamma, npi0);
349 unsigned int tagdata3 = IntToTag2(npionp, npionm, nkaonp, nkaonm, nprotonp, nprotonm);
350 unsigned int tagdata4 = IntToTag2(nlambda, nalambda, nelectronp, nelectronm, nmuonp, nmuonm);
351 unsigned int tagdata5 = IntToTag2(nks, neta, nCharged, nGoodChargedp, nGoodChargedm, totCharged);
352
353 m_tagFilterSvc->setTagData1(tagdata1);
354 m_tagFilterSvc->setTagData2(tagdata2);
355 m_tagFilterSvc->setTagData3(tagdata3);
356 m_tagFilterSvc->setTagData4(tagdata4);
357 m_tagFilterSvc->setTagData5(tagdata5);
358
359 SmartDataPtr<EvtRecDTagCol> evtRecDTagCol(eventSvc(), EventModel::EvtRec::EvtRecDTagCol);
360
361 std::set<UInt_t> Dsmode0, Dsmode1, D0mode0, D0mode1, Dmode0, Dmode1;
362 Dsmode0.clear(); Dsmode1.clear(); D0mode0.clear(); D0mode1.clear(), Dmode0.clear(); Dmode1.clear();
363 if ( evtRecDTagCol ) {
364 EvtRecDTagCol::iterator iter_begin = evtRecDTagCol->begin();
365 EvtRecDTagCol::iterator iter_end = evtRecDTagCol->end();
366 //cout << "Mode = ";
367 for (EvtRecDTagCol::iterator iter = iter_begin; iter != iter_end; iter++) {
368 Int_t type = (*iter)->type();
369 Int_t mode = (*iter)->decayMode();
370 //cout << mode << "," << type << " " ;
371 if ( mode>=400 && mode<505 ) {
372 if (type==1) {
373 Dsmode1.insert(mode);
374 } else {
375 Dsmode0.insert(mode);
376 }
377 }
378 else if ( mode>=0 && mode<200 ) {
379 if (type==1) {
380 D0mode1.insert(mode);
381 } else {
382 D0mode0.insert(mode);
383 }
384 }
385 else if ( mode>=200 && mode<400 ) {
386 if (type==1) {
387 Dmode1.insert(mode);
388 } else {
389 Dmode0.insert(mode);
390 }
391 }
392 }
393 //cout << endl;
394 }
395
396 UInt_t Ds_modemap = 0, D0_modemap = 0, D_modemap = 0, QC_status = 0;
397 int data0=3;
398
399 if (m_QC) QC_status = eventHeader->eventTag();//eventTag is assigned as QCMCFilter status for psi(3770) -> D0D0bar MC
400 else QC_status = 1;
401
402 std::set<UInt_t>::iterator it1, it0;
403/*
404 if ( Dsmode1.size()>0 ) {
405 std::cout << "Evt: " << iEvt << " Ds_1 : ";
406 Ds_modemap |= (1<<31);
407 for (it1=Dsmode1.begin(); it1!=Dsmode1.end(); ++it1) {
408 std::cout << ' ' << *it1;
409 Ds_modemap |= (1<<Ds_modeTag[*it1]);
410 }
411 std::cout << " (" << nGoodCharged<<","<<ngamma<<")";
412 } else {
413 if ( Dsmode0.size()>0 ) {
414 std::cout << "Evt: " << iEvt << " Ds_0 : ";
415 for (it0=Dsmode0.begin(); it0!=Dsmode0.end(); ++it0) {
416 std::cout << ' ' << *it0;
417 Ds_modemap |= (1<<Ds_modeTag[*it0]);
418 }
419 std::cout << " (" << nGoodCharged<<","<<ngamma<<")";
420 }
421 }
422*/
423 if ( D0mode1.size()>0 || Dmode1.size()>0 || D0mode0.size()>0 || Dmode0.size()>0 ) {
424 std::cout << EvtNo;
425 if (m_QC) std::cout << " QC= " << QC_status;
426 } else {
427 if ( Dsmode1.size()>0 ) {
428 if (m_QC) std::cout << EvtNo << " QC= " << QC_status << " Ds_1";
429 else std::cout << EvtNo << " Ds_1";
430 Ds_modemap |= (1<<31);
431 for (it1=Dsmode1.begin(); it1!=Dsmode1.end(); ++it1) {
432 std::cout << ' ' << *it1;
433 Ds_modemap |= (1<<Ds_modeTag[*it1]);
434 }
435 std::cout << " ("<<nCharged<<">"<<nGoodCharged<<","<<nNeutrk<<">"<<ngamma<<"):2"<<std::endl;
436 } else {
437 if ( Dsmode0.size()>0 ) {
438 if (m_QC) std::cout << EvtNo << " QC= " << QC_status << " Ds_0";
439 else std::cout << EvtNo << " Ds_0";
440 for (it0=Dsmode0.begin(); it0!=Dsmode0.end(); ++it0) {
441 std::cout << ' ' << *it0;
442 Ds_modemap |= (1<<Ds_modeTag[*it0]);
443 }
444 std::cout << " ("<<nCharged<<">"<<nGoodCharged<<","<<nNeutrk<<">"<<ngamma<<"):2"<<std::endl;
445 }
446 }
447 }
448
449 if ( D0mode1.size()>0 ) {
450 std::cout << " D0_1";
451 D0_modemap |= (1<<31);
452 for (it1=D0mode1.begin(); it1!=D0mode1.end(); ++it1) {
453 std::cout << ' ' << *it1;
454 D0_modemap |= (1<<D0_modeTag[*it1]);
455 }
456 } else {
457 if ( D0mode0.size()>0 ) {
458 std::cout << " D0_0";
459 for (it0=D0mode0.begin(); it0!=D0mode0.end(); ++it0) {
460 std::cout << ' ' << *it0;
461 D0_modemap |= (1<<D0_modeTag[*it0]);
462 }
463 }
464 }
465
466 if ( Dmode1.size()>0 ) {
467 std::cout << " D+_1";
468 D_modemap |= (1<<31);
469 for (it1=Dmode1.begin(); it1!=Dmode1.end(); ++it1) {
470 std::cout << ' ' << *it1;
471 D_modemap |= (1<<D_modeTag[*it1]);
472 }
473 } else {
474 if ( Dmode0.size()>0 ) {
475 std::cout << " D+_0";
476 for (it0=Dmode0.begin(); it0!=Dmode0.end(); ++it0) {
477 std::cout << ' ' << *it0;
478 D_modemap |= (1<<D_modeTag[*it0]);
479 }
480 }
481 }
482
483 if ( D0mode1.size()>0 || Dmode1.size()>0 ) {
484 data0 = 0;
485 std::cout << " ("<<nCharged<<">"<<nGoodCharged<<","<<nNeutrk<<">"<<ngamma<<")"<<":0" << endl;
486 } else if ( D0mode0.size()>0 || Dmode0.size()>0 ) {
487 data0 = 1;
488 std::cout << " ("<<nCharged<<">"<<nGoodCharged<<","<<nNeutrk<<">"<<ngamma<<")"<<":1" << endl;
489 } else if ( Dsmode1.size()>0 || Dsmode0.size()>0 ) {
490 data0 = 2;
491 }
492/*
493 if (Ds_modemap>0) {
494 cout << "Ds_mode = " << " ";
495 for(int i = 0; i < 32; i ++) {
496 int bit = Ds_modemap&(1<<(32-i-1));
497 if(bit == 0) cout << 0;
498 else cout << 1;
499 if(i % 4 == 3)cout << ' ';
500 }
501 cout << " " << Ds_modemap << endl;
502 }
503 if (D0_modemap>0) {
504 cout << "D0_mode = " << " ";
505 for(int i = 0; i < 32; i ++) {
506 int bit = D0_modemap&(1<<(32-i-1));
507 if(bit == 0) cout << 0;
508 else cout << 1;
509 if(i % 4 == 3)cout << ' ';
510 }
511 cout << " " << D0_modemap << endl;
512 }
513 if (D_modemap>0) {
514 cout << "Dp_mode = " << " ";
515 for(int i = 0; i < 32; i ++) {
516 int bit = D_modemap&(1<<(32-i-1));
517 if(bit == 0) cout << 0;
518 else cout << 1;
519 if(i % 4 == 3)cout << ' ';
520 }
521 cout << " " << D_modemap << endl;
522 }
523*/
524 m_tagFilterSvc->setTagData0(data0);
525 m_tagFilterSvc->setTagData6(Ds_modemap);
526 m_tagFilterSvc->setTagData7(D0_modemap);
527 m_tagFilterSvc->setTagData8(D_modemap);
528 m_tagFilterSvc->setTagData9(QC_status);
529 // cout << iEvt << " Data0= " << tagdata1 << " 1= " << tagdata2 << " 2= " << tagdata3 << " 3= " << tagdata4 << " 4= " << tagdata5 << endl;
530 // cout << "nNeutrk= " << nNeutrk << ", nTottrk= " << nTottrk << ", ngamma = "<< ngamma << ", npi0= " << npi0 << endl;
531 // cout << "npionp=" << npionp << ", npionm=" << npionm << ", nkaonp= " << nkaonp << ", nkaonm= " << nkaonm << ", nprotonp= " << nprotonp << ", nprotonm= " << nprotonm << endl;
532 // cout << "nlambda= " << nlambda << ", nalambda= " << nalambda << ", nelectronp= " << nelectronp << ", nelectronm= " << nelectronm << ", nmuonp= " << nmuonp << ", nmuonm= " << nmuonm << endl;
533 // cout << "nks= " << nks << ", neta= " << neta << ", nCharged= " << nCharged << ", nGoodChargedp= " << nGoodChargedp << ", nGoodChargedm= " << nGoodChargedm << ", totCharged= " << totCharged << endl;
534
535 iEvt++;
536}
double cos(const BesAngle a)
Definition BesAngle.h:213
EvtRecTrackCol::iterator EvtRecTrackIterator
EvtStreamInputIterator< typename Generator::result_type > iter(Generator gen, int N=0)
unsigned int IntToTag2(int val1, int val2, int val3, int val4, int val5, int val6)
unsigned int IntToTag1(int val1, int val2, int val3, int val4)
double theta() const
double time() const
double energy() const
const int charge() const
const double theta() const
Definition DstMdcTrack.h:59
const HepSymMatrix err() const
const int charge() const
Definition DstMdcTrack.h:53
const HepVector helix() const
......
RecEmcShower * emcShower()
Definition EvtRecTrack.h:58
virtual bool isVertexValid()=0
virtual double * PrimaryVertex()=0
int useTof2() const
int onlyProton() const
int methodProbability() const
int useDedx() const
int onlyMuon() const
int onlyKaon() const
int onlyElectron() const
int onlyPion() const
int useTof1() const
void setRecTrack(EvtRecTrack *trk)
double probKaon() const
Definition ParticleID.h:124
void setMethod(const int method)
Definition ParticleID.h:94
void identify(const int pidcase)
Definition ParticleID.h:103
double probMuon() const
Definition ParticleID.h:122
double probElectron() const
Definition ParticleID.h:121
void usePidSys(const int pidsys)
Definition ParticleID.h:97
static ParticleID * instance()
bool IsPidInfoValid() const
double probPion() const
Definition ParticleID.h:123
void calculate()
void init()
double probProton() const
Definition ParticleID.h:125
void setTagData8(unsigned int t)
void setTagData0(unsigned int t)
void setTagData3(unsigned int t)
void setTagData9(unsigned int t)
void setTagData6(unsigned int t)
void setTagData5(unsigned int t)
void setTagData4(unsigned int t)
void setTagData1(unsigned int t)
void setTagData2(unsigned int t)
void setTagData7(unsigned int t)
_EXTERN_ std::string EvtRecPi0Col
Definition EventModel.h:123
_EXTERN_ std::string EvtRecEvent
Definition EventModel.h:116
_EXTERN_ std::string EvtRecVeeVertexCol
Definition EventModel.h:121
_EXTERN_ std::string EvtRecEtaToGGCol
Definition EventModel.h:124
_EXTERN_ std::string EvtRecDTagCol
Definition EventModel.h:122
_EXTERN_ std::string EvtRecTrackCol
Definition EventModel.h:117

◆ finalize()

StatusCode DTagSetAlg::finalize ( )

Definition at line 538 of file DTagSetAlg.cxx.

538 {
539 MsgStream log(msgSvc(), name());
540 log << MSG::INFO << "In DTagSetAlg finalize()" << iEvt << "Events processed" << endmsg;
541 return StatusCode::SUCCESS;
542}
IMessageSvc * msgSvc()

◆ initialize()

StatusCode DTagSetAlg::initialize ( )

Definition at line 53 of file DTagSetAlg.cxx.

53 {
54 MsgStream log(msgSvc(), name());
55
56 log << MSG::INFO << "in initialize()" << endmsg;
57 iEvt=0;
58 std::cout << "DTagSetAlg: QC = " << m_QC << std::endl;;
59
60 Gaudi::svcLocator()->service("VertexDbSvc", m_vtxsvc);
61 ITagFilterSvc* tmpSvc=0;
62 Gaudi::svcLocator()->service("TagFilterSvc", tmpSvc);
63 m_tagFilterSvc = dynamic_cast<TagFilterSvc *>(tmpSvc);
64
65 Ds_modeTag[400] = 1;
66 Ds_modeTag[401] = 0;
67 Ds_modeTag[402] = 2;
68 Ds_modeTag[403] = 13;
69 Ds_modeTag[404] = 3;
70 Ds_modeTag[405] = 4;
71 Ds_modeTag[406] = 5;
72 Ds_modeTag[407] = 14;
73 Ds_modeTag[420] = 28;
74 Ds_modeTag[421] = 6;
75 Ds_modeTag[422] = 24;
76 Ds_modeTag[423] = 25;
77 Ds_modeTag[424] = 26;
78 Ds_modeTag[425] = 27;
79 Ds_modeTag[440] = 7;
80 Ds_modeTag[441] = 8;
81 Ds_modeTag[442] = 20;
82 Ds_modeTag[450] = 21;
83 Ds_modeTag[451] = 22;
84 Ds_modeTag[452] = 23;
85 Ds_modeTag[460] = 9;
86 Ds_modeTag[461] = 15;
87 Ds_modeTag[470] = 16;
88 Ds_modeTag[471] = 17;
89 Ds_modeTag[480] = 10;
90 Ds_modeTag[481] = 11;
91 Ds_modeTag[500] = 29;
92 Ds_modeTag[501] = 18;
93 Ds_modeTag[502] = 12;
94 Ds_modeTag[503] = 19;
95 Ds_modeTag[504] = 30;
96
97 D0_modeTag[0] = 0;
98 D0_modeTag[1] = 1;
99 D0_modeTag[2] = 2;
100 D0_modeTag[3] = 3;
101 D0_modeTag[4] = 4;
102 D0_modeTag[5] = 5;
103 D0_modeTag[50] = 6;
104 D0_modeTag[51] = 7;
105 D0_modeTag[100] = 8;
106 D0_modeTag[101] = 9;
107 D0_modeTag[102] = 10;
108 D0_modeTag[103] = 11;
109 D0_modeTag[104] = 12;
110 D0_modeTag[105] = 13;
111 D0_modeTag[106] = 14;
112 D0_modeTag[107] = 15;
113 D0_modeTag[108] = 16;
114 D0_modeTag[109] = 17;
115 D0_modeTag[110] = 18;
116 D0_modeTag[111] = 19;
117 D0_modeTag[112] = 20;
118 D0_modeTag[113] = 21;
119 D0_modeTag[114] = 22;
120 D0_modeTag[115] = 23;
121 D0_modeTag[116] = 24;
122 D0_modeTag[117] = 25;
123 D0_modeTag[118] = 26;
124 D0_modeTag[119] = 27;
125 D0_modeTag[120] = 28;
126 D0_modeTag[121] = 29;
127 D0_modeTag[122] = 30;
128 D0_modeTag[123] = 30;
129 D0_modeTag[124] = 30;
130 D0_modeTag[125] = 30;
131 D0_modeTag[126] = 30;
132
133 D_modeTag[200] = 0;
134 D_modeTag[201] = 1;
135 D_modeTag[202] = 2;
136 D_modeTag[203] = 3;
137 D_modeTag[204] = 4;
138 D_modeTag[205] = 5;
139 D_modeTag[206] = 6;
140 D_modeTag[207] = 7;
141 D_modeTag[208] = 8;
142 D_modeTag[209] = 9;
143 D_modeTag[210] = 10;
144 D_modeTag[211] = 11;
145 D_modeTag[212] = 12;
146 D_modeTag[213] = 13;
147 D_modeTag[214] = 14;
148 D_modeTag[215] = 15;
149 D_modeTag[216] = 16;
150 D_modeTag[217] = 17;
151 D_modeTag[218] = 18;
152 D_modeTag[219] = 19;
153 D_modeTag[220] = 20;
154 D_modeTag[221] = 21;
155 D_modeTag[222] = 22;
156
157 return StatusCode::SUCCESS;
158}

◆ IntToTag1()

unsigned int DTagSetAlg::IntToTag1 ( int val1,
int val2,
int val3,
int val4 )

Definition at line 544 of file DTagSetAlg.cxx.

545{
546 unsigned int res=0;
547 res = (val4 +(val3<<8) +(val2<<16) +(val1<<24));
548 return res;
549}

Referenced by execute().

◆ IntToTag2()

unsigned int DTagSetAlg::IntToTag2 ( int val1,
int val2,
int val3,
int val4,
int val5,
int val6 )

Definition at line 551 of file DTagSetAlg.cxx.

552{
553 unsigned int res=0;
554 res = (val6 +(val5<<5) +(val4<<10) +(val3<<15) +(val2<<20) +(val1<<26));
555 return res;
556}

Referenced by execute().


The documentation for this class was generated from the following files: