BOSS 7.1.2
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 199 of file DTagSetAlg.cxx.

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

577 {
578 MsgStream log(msgSvc(), name());
579 log << MSG::INFO << "In DTagSetAlg finalize()" << iEvt << "Events processed" << endmsg;
580 return StatusCode::SUCCESS;
581}
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[6] = 6; // new mode
104 D0_modeTag[7] = 7; // new mode
105 D0_modeTag[8] = 8; // new mode
106 D0_modeTag[9] = 8; // new mode
107 D0_modeTag[10] = 9; // new mode
108 D0_modeTag[50] = 10;
109 D0_modeTag[51] = 11;
110 D0_modeTag[100] = 12;
111 D0_modeTag[101] = 13;
112 D0_modeTag[102] = 14;
113 D0_modeTag[103] = 15;
114 D0_modeTag[104] = 16;
115 D0_modeTag[105] = 16;
116 D0_modeTag[106] = 17;
117 D0_modeTag[107] = 16;
118 D0_modeTag[108] = 16;
119 D0_modeTag[109] = 18;
120 D0_modeTag[110] = 19;
121 D0_modeTag[111] = 20;
122 D0_modeTag[112] = 16;
123 D0_modeTag[113] = 21;
124 D0_modeTag[114] = 22;
125 D0_modeTag[115] = 23;
126 D0_modeTag[116] = 24;
127 D0_modeTag[117] = 25;
128 D0_modeTag[118] = 26;
129 D0_modeTag[119] = 27;
130 D0_modeTag[120] = 28;
131 D0_modeTag[121] = 29;
132 D0_modeTag[122] = 30;
133 D0_modeTag[123] = 30;
134 D0_modeTag[124] = 30;
135 D0_modeTag[125] = 30;
136 D0_modeTag[126] = 30;
137 D0_modeTag[127] = 30; // new mode
138 D0_modeTag[128] = 30; // new mode
139 D0_modeTag[129] = 30; // new mode
140 D0_modeTag[130] = 30; // new mode
141 D0_modeTag[131] = 30; // new mode
142 D0_modeTag[132] = 30; // new mode
143 D0_modeTag[133] = 30; // new mode
144 D0_modeTag[134] = 30; // new mode
145 D0_modeTag[135] = 30; // new mode
146
147 D_modeTag[200] = 0;
148 D_modeTag[201] = 1;
149 D_modeTag[202] = 2;
150 D_modeTag[203] = 3;
151 D_modeTag[204] = 4;
152 D_modeTag[205] = 5;
153 D_modeTag[206] = 6;
154 D_modeTag[207] = 7;
155 D_modeTag[208] = 8;
156 D_modeTag[209] = 9;
157 D_modeTag[210] = 10;
158 D_modeTag[211] = 11;
159 D_modeTag[212] = 12;
160 D_modeTag[213] = 13;
161 D_modeTag[214] = 14;
162 D_modeTag[215] = 15;
163 D_modeTag[216] = 16;
164 D_modeTag[217] = 17;
165 D_modeTag[218] = 18;
166 D_modeTag[219] = 19;
167 D_modeTag[220] = 20;
168 D_modeTag[221] = 21;
169 D_modeTag[222] = 22;
170 D_modeTag[223] = 23; // new mode
171 D_modeTag[224] = 24; // new mode
172 D_modeTag[225] = 24; // new mode
173 D_modeTag[226] = 25; // new mode
174 D_modeTag[227] = 25; // new mode
175 D_modeTag[228] = 26; // new mode
176 D_modeTag[229] = 27; // new mode
177 D_modeTag[230] = 28; // new mode
178 D_modeTag[231] = 29; // new mode
179 D_modeTag[232] = 29; // new mode
180 D_modeTag[233] = 29; // new mode
181 D_modeTag[234] = 29; // new mode
182 D_modeTag[235] = 29; // new mode
183 D_modeTag[236] = 29; // new mode
184 D_modeTag[237] = 29; // new mode
185 D_modeTag[238] = 29; // new mode
186 D_modeTag[239] = 29; // new mode
187 D_modeTag[240] = 29; // new mode
188 D_modeTag[241] = 29; // new mode
189 D_modeTag[242] = 29; // new mode
190 D_modeTag[290] = 30; // new DCS mode
191 D_modeTag[291] = 30; // new DCS mode
192 D_modeTag[292] = 30; // new DCS mode
193 D_modeTag[293] = 30; // new DCS mode
194 D_modeTag[294] = 30; // new DCS mode
195
196 return StatusCode::SUCCESS;
197}

◆ IntToTag1()

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

Definition at line 583 of file DTagSetAlg.cxx.

584{
585 unsigned int res=0;
586 res = (val4 +(val3<<8) +(val2<<16) +(val1<<24));
587 return res;
588}

Referenced by execute().

◆ IntToTag2()

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

Definition at line 590 of file DTagSetAlg.cxx.

591{
592 unsigned int res=0;
593 res = (val6 +(val5<<5) +(val4<<10) +(val3<<15) +(val2<<20) +(val1<<26));
594 return res;
595}

Referenced by execute().


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