@@ -81,16 +81,17 @@ struct DiffMCQA {
8181 // bin 7: no global tracks which are no vtx tracks
8282 // bin 8: no vtx tracks which are no global tracks
8383 // bin 9: at least one vtx tracks with TOF hit
84- // bin 10: possible ambiguous tracks
85- // bin 11: possible ambiguous FwdTracks
86- // bin 12: number of tracks >= minimum number
87- // bin 13: number of tracks <= maximum number
88- // bin 14: minimum pt <= pt of vtx tracks <= maximum pt
89- // bin 15: minimum eta <= eta of vtx tracks <= maximum eta
90- // bin 16: net charge >= minimum net charge
91- // bin 17: net charge <= maximum net charge
92- // bin 18: IVM >= minimum IVM
93- // bin 19: IVM <= maximum IVM
84+ // bin 10: all vtx tracks with TOF hit
85+ // bin 11: possible ambiguous tracks
86+ // bin 12: possible ambiguous FwdTracks
87+ // bin 13: number of tracks >= minimum number
88+ // bin 14: number of tracks <= maximum number
89+ // bin 15: minimum pt <= pt of vtx tracks <= maximum pt
90+ // bin 16: minimum eta <= eta of vtx tracks <= maximum eta
91+ // bin 17: net charge >= minimum net charge
92+ // bin 18: net charge <= maximum net charge
93+ // bin 19: IVM >= minimum IVM
94+ // bin 20: IVM <= maximum IVM
9495 //
9596 // 3 diverent versions of histograms:
9697 // Diff1: Pythia MBR
@@ -101,7 +102,7 @@ struct DiffMCQA {
101102 " registry" ,
102103 {
103104 // non diffractive events
104- {" Stat" , " #Stat" , {HistType::kTH1F , {{20 , -0.5 , 19 .5 }}}},
105+ {" Stat" , " #Stat" , {HistType::kTH1F , {{21 , -0.5 , 20 .5 }}}},
105106 {" cleanFIT" , " #cleanFIT" , {HistType::kTH2F , {{10 , -0.5 , 9.5 }, {2 , -0.5 , 1.5 }}}},
106107 {" Tracks" , " #Tracks" , {HistType::kTH1F , {{50 , 0.5 , 50.5 }}}},
107108 {" vtxTracks" , " #vtxTracks" , {HistType::kTH1F , {{50 , 0.5 , 50.5 }}}},
@@ -117,6 +118,7 @@ struct DiffMCQA {
117118 {" etaptDG" , " #etaptDG" , {HistType::kTH2F , {{80 , -2 ., 2 .}, {100 , 0 ., 5 .}}}},
118119 {" dEdxTPCDG" , " #dEdxTPCDG" , {HistType::kTH2F , {{100 , 0 ., 5.0 }, {3000 , 0 ., 30000 .}}}},
119120 {" dEdxTOFDG" , " #dEdxTOFDG" , {HistType::kTH2F , {{100 , 0 ., 5.0 }, {1000 , 0 ., 500000 .}}}},
121+ {" netChargeDG" , " #netChargeDG" , {HistType::kTH1F , {{21 , -10.5 , 10.5 }}}},
120122 {" IVMptSysDG" , " #IVMptSysDG" , {HistType::kTH2F , {{100 , 0 ., 5 .}, {350 , 0 ., 3.5 }}}},
121123 {" IVMptTrkDG" , " #IVMptTrkDG" , {HistType::kTH2F , {{100 , 0 ., 5 .}, {350 , 0 ., 3.5 }}}},
122124 // PYTHIA8 diffractive events
@@ -136,6 +138,7 @@ struct DiffMCQA {
136138 {" etaptDGDiff1" , " #etaptDGDiff1" , {HistType::kTH2F , {{80 , -2 ., 2 .}, {100 , 0 ., 5 .}}}},
137139 {" dEdxTPCDGDiff1" , " #dEdxTPCDGDiff1" , {HistType::kTH2F , {{100 , 0 ., 5.0 }, {3000 , 0 ., 30000 .}}}},
138140 {" dEdxTOFDGDiff1" , " #dEdxTOFDGDiff1" , {HistType::kTH2F , {{100 , 0 ., 5.0 }, {1000 , 0 ., 500000 .}}}},
141+ {" netChargeDGDiff1" , " #netChargeDGDiff1" , {HistType::kTH1F , {{21 , -10.5 , 10.5 }}}},
139142 {" IVMptSysDGDiff1" , " #IVMptSysDGDiff1" , {HistType::kTH2F , {{100 , 0 ., 5 .}, {350 , 0 ., 3.5 }}}},
140143 {" IVMptTrkDGDiff1" , " #IVMptTrkDGDiff1" , {HistType::kTH2F , {{100 , 0 ., 5 .}, {350 , 0 ., 3.5 }}}},
141144 // GRANIITTI diffractive events
@@ -155,6 +158,7 @@ struct DiffMCQA {
155158 {" etaptDGDiff2" , " #etaptDGDiff2" , {HistType::kTH2F , {{80 , -2 ., 2 .}, {100 , 0 ., 5 .}}}},
156159 {" dEdxTPCDGDiff2" , " #dEdxTPCDGDiff2" , {HistType::kTH2F , {{100 , 0 ., 5.0 }, {3000 , 0 ., 30000 .}}}},
157160 {" dEdxTOFDGDiff2" , " #dEdxTOFDGDiff2" , {HistType::kTH2F , {{100 , 0 ., 5.0 }, {1000 , 0 ., 500000 .}}}},
161+ {" netChargeDGDiff2" , " #netChargeDGDiff2" , {HistType::kTH1F , {{21 , -10.5 , 10.5 }}}},
158162 {" IVMptSysDGDiff2" , " #IVMptSysDGDiff2" , {HistType::kTH2F , {{100 , 0 ., 5 .}, {350 , 0 ., 3.5 }}}},
159163 {" IVMptTrkDGDiff2" , " #IVMptTrkDGDiff2" , {HistType::kTH2F , {{100 , 0 ., 5 .}, {350 , 0 ., 3.5 }}}},
160164 }};
@@ -436,14 +440,20 @@ struct DiffMCQA {
436440 registry.get <TH1>(HIST (" Stat" ))->Fill (8 ., vtxAndGlobal * 1 .);
437441 }
438442 isDGcandidate &= globalAndVtx;
443+ if (diffCuts.globalTracksOnly ()) {
444+ isDGcandidate &= vtxAndGlobal;
445+ }
439446
440447 // at least one vtx track with TOF hit
441448 if (isPythiaDiff) {
442449 registry.get <TH1>(HIST (" StatDiff1" ))->Fill (9 ., (isDGcandidate && (rgtrwTOF > 0 .)) * 1 .);
450+ registry.get <TH1>(HIST (" StatDiff1" ))->Fill (10 ., (isDGcandidate && (rgtrwTOF == 1 .)) * 1 .);
443451 } else if (isGraniittiDiff) {
444452 registry.get <TH1>(HIST (" StatDiff2" ))->Fill (9 ., (isDGcandidate && (rgtrwTOF > 0 .)) * 1 .);
453+ registry.get <TH1>(HIST (" StatDiff2" ))->Fill (10 ., (isDGcandidate && (rgtrwTOF == 1 .)) * 1 .);
445454 } else {
446455 registry.get <TH1>(HIST (" Stat" ))->Fill (9 ., (isDGcandidate && (rgtrwTOF > 0 .)) * 1 .);
456+ registry.get <TH1>(HIST (" Stat" ))->Fill (10 ., (isDGcandidate && (rgtrwTOF == 1 .)) * 1 .);
447457 }
448458
449459 // check a given bc for possible ambiguous Tracks
@@ -455,11 +465,11 @@ struct DiffMCQA {
455465 }
456466 }
457467 if (isPythiaDiff) {
458- registry.get <TH1>(HIST (" StatDiff1" ))->Fill (10 ., withAmbTracks * 1 .);
468+ registry.get <TH1>(HIST (" StatDiff1" ))->Fill (11 ., withAmbTracks * 1 .);
459469 } else if (isGraniittiDiff) {
460- registry.get <TH1>(HIST (" StatDiff2" ))->Fill (10 ., withAmbTracks * 1 .);
470+ registry.get <TH1>(HIST (" StatDiff2" ))->Fill (11 ., withAmbTracks * 1 .);
461471 } else {
462- registry.get <TH1>(HIST (" Stat" ))->Fill (10 ., withAmbTracks * 1 .);
472+ registry.get <TH1>(HIST (" Stat" ))->Fill (11 ., withAmbTracks * 1 .);
463473 }
464474
465475 // check a given bc for possible ambiguous FwdTracks
@@ -471,29 +481,29 @@ struct DiffMCQA {
471481 }
472482 }
473483 if (isPythiaDiff) {
474- registry.get <TH1>(HIST (" StatDiff1" ))->Fill (11 ., withAmbFwdTracks * 1 .);
484+ registry.get <TH1>(HIST (" StatDiff1" ))->Fill (12 ., withAmbFwdTracks * 1 .);
475485 } else if (isGraniittiDiff) {
476- registry.get <TH1>(HIST (" StatDiff2" ))->Fill (11 ., withAmbFwdTracks * 1 .);
486+ registry.get <TH1>(HIST (" StatDiff2" ))->Fill (12 ., withAmbFwdTracks * 1 .);
477487 } else {
478- registry.get <TH1>(HIST (" Stat" ))->Fill (11 ., withAmbFwdTracks * 1 .);
488+ registry.get <TH1>(HIST (" Stat" ))->Fill (12 ., withAmbFwdTracks * 1 .);
479489 }
480490
481491 // number of vertex tracks <= n
482492 isDGcandidate &= (collision.numContrib () >= diffCuts.minNTracks ());
483493 if (isPythiaDiff) {
484- registry.get <TH1>(HIST (" StatDiff1" ))->Fill (12 ., isDGcandidate * 1 .);
494+ registry.get <TH1>(HIST (" StatDiff1" ))->Fill (13 ., isDGcandidate * 1 .);
485495 } else if (isGraniittiDiff) {
486- registry.get <TH1>(HIST (" StatDiff2" ))->Fill (12 ., isDGcandidate * 1 .);
496+ registry.get <TH1>(HIST (" StatDiff2" ))->Fill (13 ., isDGcandidate * 1 .);
487497 } else {
488- registry.get <TH1>(HIST (" Stat" ))->Fill (12 ., isDGcandidate * 1 .);
498+ registry.get <TH1>(HIST (" Stat" ))->Fill (13 ., isDGcandidate * 1 .);
489499 }
490500 isDGcandidate &= (collision.numContrib () <= diffCuts.maxNTracks ());
491501 if (isPythiaDiff) {
492- registry.get <TH1>(HIST (" StatDiff1" ))->Fill (13 ., isDGcandidate * 1 .);
502+ registry.get <TH1>(HIST (" StatDiff1" ))->Fill (14 ., isDGcandidate * 1 .);
493503 } else if (isGraniittiDiff) {
494- registry.get <TH1>(HIST (" StatDiff2" ))->Fill (13 ., isDGcandidate * 1 .);
504+ registry.get <TH1>(HIST (" StatDiff2" ))->Fill (14 ., isDGcandidate * 1 .);
495505 } else {
496- registry.get <TH1>(HIST (" Stat" ))->Fill (13 ., isDGcandidate * 1 .);
506+ registry.get <TH1>(HIST (" Stat" ))->Fill (14 ., isDGcandidate * 1 .);
497507 }
498508
499509 // net charge and invariant mass
@@ -529,69 +539,74 @@ struct DiffMCQA {
529539 }
530540 }
531541 isDGcandidate &= goodpts;
532- if (isPythiaDiff) {
533- registry.get <TH1>(HIST (" StatDiff1" ))->Fill (14 ., isDGcandidate * 1 .);
534- } else if (isGraniittiDiff) {
535- registry.get <TH1>(HIST (" StatDiff2" ))->Fill (14 ., isDGcandidate * 1 .);
536- } else {
537- registry.get <TH1>(HIST (" Stat" ))->Fill (14 ., isDGcandidate * 1 .);
538- }
539- isDGcandidate &= goodetas;
540542 if (isPythiaDiff) {
541543 registry.get <TH1>(HIST (" StatDiff1" ))->Fill (15 ., isDGcandidate * 1 .);
542544 } else if (isGraniittiDiff) {
543545 registry.get <TH1>(HIST (" StatDiff2" ))->Fill (15 ., isDGcandidate * 1 .);
544546 } else {
545547 registry.get <TH1>(HIST (" Stat" ))->Fill (15 ., isDGcandidate * 1 .);
546548 }
547- isDGcandidate &= (netCharge >= diffCuts. minNetCharge ()) ;
549+ isDGcandidate &= goodetas ;
548550 if (isPythiaDiff) {
549551 registry.get <TH1>(HIST (" StatDiff1" ))->Fill (16 ., isDGcandidate * 1 .);
550552 } else if (isGraniittiDiff) {
551553 registry.get <TH1>(HIST (" StatDiff2" ))->Fill (16 ., isDGcandidate * 1 .);
552554 } else {
553555 registry.get <TH1>(HIST (" Stat" ))->Fill (16 ., isDGcandidate * 1 .);
554556 }
555- isDGcandidate &= (netCharge < = diffCuts.maxNetCharge ());
557+ isDGcandidate &= (netCharge > = diffCuts.minNetCharge ());
556558 if (isPythiaDiff) {
557559 registry.get <TH1>(HIST (" StatDiff1" ))->Fill (17 ., isDGcandidate * 1 .);
558560 } else if (isGraniittiDiff) {
559561 registry.get <TH1>(HIST (" StatDiff2" ))->Fill (17 ., isDGcandidate * 1 .);
560562 } else {
561563 registry.get <TH1>(HIST (" Stat" ))->Fill (17 ., isDGcandidate * 1 .);
562564 }
563- isDGcandidate &= (ivm. M () > = diffCuts.minIVM ());
565+ isDGcandidate &= (netCharge < = diffCuts.maxNetCharge ());
564566 if (isPythiaDiff) {
565567 registry.get <TH1>(HIST (" StatDiff1" ))->Fill (18 ., isDGcandidate * 1 .);
566568 } else if (isGraniittiDiff) {
567569 registry.get <TH1>(HIST (" StatDiff2" ))->Fill (18 ., isDGcandidate * 1 .);
568570 } else {
569571 registry.get <TH1>(HIST (" Stat" ))->Fill (18 ., isDGcandidate * 1 .);
570572 }
571- isDGcandidate &= (ivm.M () < = diffCuts.maxIVM ());
573+ isDGcandidate &= (ivm.M () > = diffCuts.minIVM ());
572574 if (isPythiaDiff) {
573575 registry.get <TH1>(HIST (" StatDiff1" ))->Fill (19 ., isDGcandidate * 1 .);
574576 } else if (isGraniittiDiff) {
575577 registry.get <TH1>(HIST (" StatDiff2" ))->Fill (19 ., isDGcandidate * 1 .);
576578 } else {
577579 registry.get <TH1>(HIST (" Stat" ))->Fill (19 ., isDGcandidate * 1 .);
578580 }
581+ isDGcandidate &= (ivm.M () <= diffCuts.maxIVM ());
582+ if (isPythiaDiff) {
583+ registry.get <TH1>(HIST (" StatDiff1" ))->Fill (20 ., isDGcandidate * 1 .);
584+ } else if (isGraniittiDiff) {
585+ registry.get <TH1>(HIST (" StatDiff2" ))->Fill (20 ., isDGcandidate * 1 .);
586+ } else {
587+ registry.get <TH1>(HIST (" Stat" ))->Fill (20 ., isDGcandidate * 1 .);
588+ }
579589
590+ // update some DG histograms
580591 if (isDGcandidate) {
581592 if (isPythiaDiff) {
582593 registry.get <TH2>(HIST (" vtxPosxyDGDiff1" ))->Fill (collision.posX (), collision.posY ());
583594 registry.get <TH1>(HIST (" vtxPoszDGDiff1" ))->Fill (collision.posZ ());
595+ registry.get <TH1>(HIST (" netChargeDGDiff1" ))->Fill (netCharge);
584596 registry.get <TH2>(HIST (" IVMptSysDGDiff1" ))->Fill (ivm.M (), ivm.Perp ());
585597 } else if (isGraniittiDiff) {
586598 registry.get <TH2>(HIST (" vtxPosxyDGDiff2" ))->Fill (collision.posX (), collision.posY ());
587599 registry.get <TH1>(HIST (" vtxPoszDGDiff2" ))->Fill (collision.posZ ());
600+ registry.get <TH1>(HIST (" netChargeDGDiff2" ))->Fill (netCharge);
588601 registry.get <TH2>(HIST (" IVMptSysDGDiff2" ))->Fill (ivm.M (), ivm.Perp ());
589602 } else {
590603 registry.get <TH2>(HIST (" vtxPosxyDG" ))->Fill (collision.posX (), collision.posY ());
591604 registry.get <TH1>(HIST (" vtxPoszDG" ))->Fill (collision.posZ ());
605+ registry.get <TH1>(HIST (" netChargeDG" ))->Fill (netCharge);
592606 registry.get <TH2>(HIST (" IVMptSysDG" ))->Fill (ivm.M (), ivm.Perp ());
593607 }
594608
609+ // fill dEdx of DG event tracks
595610 for (auto & track : tracks) {
596611 if (track.isPVContributor ()) {
597612 if (isPythiaDiff) {
0 commit comments