74 #include "StPeCTrigger.h"
75 #include "StPeCMaker.h"
76 #include "StEventTypes.h"
78 #include "StMessMgr.h"
79 #include "StPeCCtbSlat.h"
90 l0_2000->setYear1Input ();
91 l0_2000->setP4SLuts ();
95 l0_2000Corrected =
new StPeCL0 ();
96 l0_2000Corrected->setYear1Input ();
97 l0_2000Corrected->setP4PLuts ();
101 l0Offline2001 =
new StPeCL0 ();
102 l0Offline2001->setYear2Input ();
103 l0Offline2001->setCountingLuts ();
105 ctbSlats =
new TClonesArray (
"StPeCCtbSlat", 10);
109 StPeCTrigger::~StPeCTrigger() {
114 void StPeCTrigger::clear() {
118 Int_t StPeCTrigger::process(
StEvent *event,
string triggerSel)
131 tw =
event->l0Trigger()->triggerWord();
132 runN =
event->runId();
133 LOG_INFO <<
"StPeCTrigger::reading StEvent ---------- " << endm;
134 l0_2000->setInfoLevel ( infoLevel );
144 LOG_ERROR <<
"StTriggerData not available "<< endm;
146 nBtofTriggerHits = trigData->tofMultiplicity();
147 nBTOFhits =
event->btofCollection()->tofHits().size();
148 bunchId = trigData->bunchId7Bit();
149 lastDSM0 = trigData->lastDSM(0);
150 lastDSM1 = trigData->lastDSM(1);
153 ttid= triggerIdColl->nominal();
164 if(runN>11011035 && runN<= 11039028) trg_3000 =ttid->isTrigger(1);
165 if(runN>11011035 && runN<= 11039028) trg_3001 =ttid->isTrigger(11);
166 if(runN>11039028 && runN<= 11077018) trg_3000 =ttid->isTrigger(260023);
167 if(runN>11050046 && runN<= 11077018) trg_3001 =ttid->isTrigger(1);
169 if(runN>12130030 && runN<= 12146002) trg_3000 =ttid->isTrigger(4);
170 if(runN>12130030 && runN<= 12179050) trg_3001 =ttid->isTrigger(11);
171 if(runN>12146002 && runN<= 12152016) trg_3000 =ttid->isTrigger(350007);
172 if(runN>12152016 && runN<= 12179050) trg_3000 =ttid->isTrigger(350017);
174 if(runN>13116029 && runN<= 13116046) trg_3000 =ttid->isTrigger(1);
175 if(runN>13110010 && runN<= 13116042) trg_3001 =ttid->isTrigger(2);
176 if(runN>13121046 && runN<= 13125024) trg_3001 =ttid->isTrigger(1);
177 if(runN>13125024 && runN<= 13130033) trg_3001 =ttid->isTrigger(400604);
178 if(runN>13131006 && runN<= 13136015) trg_3001 =ttid->isTrigger(400614);
179 if(runN>13116047 && runN<= 13117027) trg_3000 =ttid->isTrigger(400601);
180 if(runN>13117027 && runN<= 13117036) trg_3000 =ttid->isTrigger(400611);
181 if(runN>13117036 && runN<= 13118017) trg_3000 =ttid->isTrigger(400621);
182 if(runN>13118017 && runN<= 13130033) trg_3000 =ttid->isTrigger(400631);
183 if(runN>13131006 && runN<= 13136015) trg_3000 =ttid->isTrigger(400641);
185 if(runN>15001001 && runN<= 15070001) trg_3000 =ttid->isTrigger(8);
198 printf (
"StPeCTrigger::StPeCTrigger: No trigger information \n" ) ;
212 if ( infoLevel > 10 ) {
213 cout <<
"ZDC sum " << zdc.adcSum() << endl;
214 cout <<
"ZDC sum west " << zdc.adcSum(west) << endl;
215 cout <<
"ZDC sum east " << zdc.adcSum(east) << endl;
218 zdcWest = zdc.adcSum(west) ;
219 zdcEast = zdc.adcSum(east) ;
220 zdcSum = zdc.adcSum() ;
222 zdcWestUA = zdc.adc(0) ;
223 zdcEastUA = zdc.adc(4) ;
224 zdcSumUA = zdcEastUA+zdcWestUA ;
228 for(
int i=0;i<8;i++){
229 zdcSMDEastH[i] = trigData->zdcSMD(east, hori, i+1);
230 zdcSMDEastV[i] = trigData->zdcSMD(east, vert, i+1);
231 zdcSMDWestH[i] = trigData->zdcSMD(west, hori, i+1);
232 zdcSMDWestV[i] = trigData->zdcSMD(west, vert, i+1);
245 for(
int i=0;i<8;i++){
258 float mwcThres = 2. ;
269 for(i=0; i<mwc.numberOfSectors(); i++){
270 for(j=0; j<mwc.numberOfSubSectors(); j++){
271 mwcsum += mwc.mips(i,j,0);
272 if ( mwc.mips(i,j,0) > mwcThres ) {
274 if ( i == 1 || i == 2 || i == 3 ) mwcSW++ ;
275 else if ( i == 4 || i == 5 || i == 6 ) mwcBW++ ;
276 else if ( i == 7 || i == 8 || i == 9 ) mwcNW++ ;
277 else if ( i == 10 || i == 11 || i == 0 ) mwcTW++ ;
278 else if ( i == 13 || i == 14 || i == 15 ) mwcNE++ ;
279 else if ( i == 16 || i == 17 || i == 18 ) mwcBE++ ;
280 else if ( i == 19 || i == 20 || i == 21 ) mwcSE++ ;
281 else if ( i == 22 || i == 23 || i == 12 ) mwcTE++ ;
286 cout <<
"mwc mips " << mwcsum << endl;
301 float ctbThres = 2. ;
303 TClonesArray &pCtbSlats = *ctbSlats;
304 for(i=0; i<120; i++){
306 ctbsum += ctb.mips(i,j,0);
307 if ( ctb.mips(i,j,0) > 0 ) {
308 Byte_t i_eta = (Byte_t)(j+1);
309 Byte_t i_phi = (Byte_t)(i+1);
310 Int_t adc = (Int_t)ctb.mips(i,j,0) ;
311 new(pCtbSlats[nCtbHits++])
StPeCCtbSlat(i_phi,i_eta,adc) ;
314 if ( ctb.mips(i,j,0) > ctbThres ) {
315 if ( i >= 5 && i < 20 ) ctbSW++ ;
316 else if ( i >= 20 && i < 35 ) ctbBW++ ;
317 else if ( i >= 35 && i < 50 ) ctbNW++ ;
318 else if ( i >= 50 && i < 60 ) ctbTW++ ;
319 else if ( i < 5 ) ctbTW++ ;
320 else if ( i >= 65 && i < 80 ) ctbNE++ ;
321 else if ( i >= 80 && i < 95 ) ctbBE++ ;
322 else if ( i >= 95 && i < 110 ) ctbSE++ ;
323 else if ( i >= 110 ) ctbTE++ ;
324 else if ( i >= 60 && i < 65 ) ctbTE++ ;
328 if ( infoLevel > 10 )
329 cout <<
"CTB MIP total sum = " << ctbsum << endl;
339 if ( infoLevel > 10 ) {
340 cout <<
"BBC East adc[0] = " << bbc.adc(8) << endl;
345 bbcAdcSumEastSm=bbc.adc(8);
346 bbcAdcSumWestSm=bbc.adcSumWest();
347 bbcAdcSumEastLg=bbc.adcSumEastLarge();;
348 bbcAdcSumWestLg=bbc.adcSumWestLarge();;
350 bbcNHitEastSm=bbc.nHitEast();
351 bbcNHitWestSm=bbc.nHitWest();
353 bbcNHitEastLg=bbc.nHitEastLarge();;
354 bbcNHitWestLg=bbc.nHitWestLarge();;
360 bbcTacEast = trigData->bbcEarliestTDC(east);
361 bbcTacWest = trigData->bbcEarliestTDC(west);
362 bbcTimeDiff = trigData->bbcTimeDifference();
363 for(
int i=0;i<36;i++){
364 bbcTDCEast[i] = trigData->bbcTDC(east, i+1);
365 bbcTDCWest[i] = trigData->bbcTDC(west, i+1);
366 bbcADCEast[i] = trigData->bbcADC(east, i+1);
367 bbcADCWest[i] = trigData->bbcADC(west, i+1);
386 for(
int i=0;i<36;i++){
397 p4 = l0_2000->process ( event ) ;
398 p4c = l0_2000Corrected->process ( event ) ;
399 p5 = l0Offline2001->process ( event ) ;
405 {
for (
int i = 0 ; i < 40 ; i++ ) trgOut[i] = 0 ;}
407 if ( infoLevel > 20 ) {
408 printf (
"trgBits : " ) ;
409 for (
int i = 0 ; i < 24 ; i++ ) {
410 printf (
"%d ", trgOut[i] ) ;
428 ftpHitC =
event->ftpcHitCollection();
429 int nFtpcPlanes = 20 ;
431 printf (
"there is a hit collection \n" ) ;
432 for (
int iPlane = 0 ; iPlane < nFtpcPlanes ; iPlane++ ) {
434 plane = ftpHitC->plane(iPlane);
435 if ( !plane ) continue ;
436 for (
int iSector = 0 ; iSector < 6 ; iSector++ ) {
438 sector = plane->sector(iSector);
439 if ( !sector ) continue ;
440 StSPtrVecFtpcHit& hits = sector->hits();
441 for (
unsigned int iHit = 0 ; iHit < hits.size() ; iHit++ ) {
444 if ( iPlane < 10 ) ftpW++ ;
457 Int_t StPeCTrigger::process(
StMuDst* mudst,
string triggerSel)
468 tw = mudst->
event()->l0Trigger().triggerWord();
469 LOG_INFO <<
"StPeCTrigger::reading StMuDst ---------- " << endm;
472 double zdcRate = mudst->
event()->runInfo().zdcCoincidenceRate();
477 LOG_ERROR <<
"StTriggerData not available in StMuDst "<< endm;
480 lastDSM0 = trigData->lastDSM(0);
481 lastDSM1 = trigData->lastDSM(1);
485 runN = mudst->
event()->eventInfo().runId();
486 LOG_INFO <<
"StPeCTrigger Run ID: " << runN << endm;
489 vector<unsigned int> triggerIds;
497 triggerIds= ttid.triggerIds();
498 std::vector<unsigned int>::iterator iiter;
501 if(triggerSel==
"ZDC_Monitor"){
502 trg_3000 =ttid.isTrigger(260022);
503 trg_3001 =ttid.isTrigger(260750);
507 if(triggerSel==
"zerobias"){
508 trg_3000 =ttid.isTrigger(9300);
509 trg_3001 =ttid.isTrigger(260750);
510 LOG_INFO <<
"StPeCTrigger::value of trg_3000 zerobias ---------- " <<trg_3000<< endm;
511 LOG_INFO <<
"StPeCTrigger::value of trg_3001 UPC_Main ---------- " <<trg_3001<< endm;
513 if(triggerSel==
"UPC_Main"){
514 if(runN>11011035 && runN<= 11039028) trg_3000 =ttid.isTrigger(1);
515 if(runN>11011035 && runN<= 11039028) trg_3001 =ttid.isTrigger(11);
516 if(runN>11039028 && runN<= 11077018) trg_3000 =ttid.isTrigger(260750);
517 if(runN>11050046 && runN<= 11077018) trg_3001 =ttid.isTrigger(1);
519 if(runN>12130030 && runN<= 12146002) trg_3000 =ttid.isTrigger(4);
520 if(runN>12130030 && runN<= 12179050) trg_3001 =ttid.isTrigger(11);
521 if(runN>12146002 && runN<= 12152016) trg_3000 =ttid.isTrigger(350007);
522 if(runN>12152016 && runN<= 12179050) trg_3000 =ttid.isTrigger(350017);
524 if(runN>13116029 && runN<= 13116046) trg_3000 =ttid.isTrigger(1);
525 if(runN>13110010 && runN<= 13116042) trg_3001 =ttid.isTrigger(2);
526 if(runN>13121046 && runN<= 13125024) trg_3001 =ttid.isTrigger(1);
527 if(runN>13125024 && runN<= 13130033) trg_3001 =ttid.isTrigger(400604);
528 if(runN>13131006 && runN<= 13136015) trg_3001 =ttid.isTrigger(400614);
529 if(runN>13116047 && runN<= 13117027) trg_3000 =ttid.isTrigger(400601);
530 if(runN>13117027 && runN<= 13117036) trg_3000 =ttid.isTrigger(400611);
531 if(runN>13117036 && runN<= 13118017) trg_3000 =ttid.isTrigger(400621);
532 if(runN>13118017 && runN<= 13130033) trg_3000 =ttid.isTrigger(400631);
533 if(runN>13131006 && runN<= 13136015) trg_3000 =ttid.isTrigger(400641);
537 LOG_INFO <<
"StPeCTrigger::value of trg_3000 UPC_Main ---------- " <<trg_3000<< endm;
538 LOG_INFO <<
"StPeCTrigger::value of trg_3001 UPC_Topo ---------- " <<trg_3001<< endm;
541 if(runN>15001001 && runN<= 15070001){
543 trg_3000 =ttid.isTrigger(8);
544 LOG_INFO <<
"StPeCTrigger::value of trg_3000 UPC_cosmic ------------------------------------ " <<trg_3000<< endm;
547 if(runN>15077068 && runN<= 15170001){
548 if(triggerSel==
"UPC_Main"){
550 trg_3000 =ttid.isTrigger(11);
551 trg_3001 =ttid.isTrigger(14);
552 trg_2001 =ttid.isTrigger(24);
553 trg_2004 =ttid.isTrigger(25);
555 trg_3000 =ttid.isTrigger(450701);
556 LOG_INFO <<
"StPeCTrigger::value of trg_3000 UPC_Main ------------------------------------ " <<trg_3000<< endm;
557 trg_3001 =ttid.isTrigger(450713);
558 trg_2001 =ttid.isTrigger(450717);
559 trg_2004 =ttid.isTrigger(450702);
562 if(triggerSel==
"UPC_Main-p"){
564 trg_3000 =ttid.isTrigger(450717);
565 trg_3001 =ttid.isTrigger(450701);
566 trg_2001 =ttid.isTrigger(450713);
567 trg_2004 =ttid.isTrigger(450705);
568 LOG_INFO <<
"StPeCTrigger::value of trg_3000 UPC_topo ------------------------------------ " <<trg_3000<< endm;
570 if(triggerSel==
"UPC_highG"){
572 trg_3000 =ttid.isTrigger(450713);
573 trg_3001 =ttid.isTrigger(450701);
574 trg_2001 =ttid.isTrigger(450702);
575 trg_2004 =ttid.isTrigger(450705);
576 LOG_INFO <<
"StPeCTrigger::value of trg_3000 UPC_jpsiA ------------------------------------ " <<trg_3000<< endm;
578 if(triggerSel==
"UPC_topo"){
580 trg_3000 =ttid.isTrigger(450702);
581 trg_3001 =ttid.isTrigger(450701);
582 trg_2001 =ttid.isTrigger(450713);
583 trg_2004 =ttid.isTrigger(450705);
584 LOG_INFO <<
"StPeCTrigger::value of trg_3000 UPC_topo ------------------------------------ " <<trg_3000<< endm;
586 if(triggerSel==
"UPC_jpsiC"){
588 trg_3000 =ttid.isTrigger(25);
589 trg_3001 =ttid.isTrigger(11);
590 trg_2001 =ttid.isTrigger(24);
591 trg_2004 =ttid.isTrigger(14);
592 LOG_INFO <<
"StPeCTrigger::value of trg_3000 UPC_jpsiC ------------------------------------ " <<trg_3000<< endm;
594 if(triggerSel==
"UPC_jpsiB"){
596 trg_3000 =ttid.isTrigger(450705);
597 trg_3001 =ttid.isTrigger(450701);
598 trg_2001 =ttid.isTrigger(450713);
599 trg_2004 =ttid.isTrigger(450702);
600 LOG_INFO <<
"StPeCTrigger::value of trg_3000 UPC_jpsiB ------------------------------------ " <<trg_3000<< endm;
602 if(triggerSel==
"UPC_jpsiA"){
604 trg_3000 =ttid.isTrigger(24);
605 trg_3001 =ttid.isTrigger(11);
606 trg_2001 =ttid.isTrigger(24);
607 trg_2004 =ttid.isTrigger(14);
608 LOG_INFO <<
"StPeCTrigger::value of trg_3000 UPC_jpsiA ------------------------------------ " <<trg_3000<< endm;
610 if(triggerSel==
"UPC_main_daq10k"){
612 trg_3000 =ttid.isTrigger(3);
614 LOG_INFO <<
"StPeCTrigger::value of trg_3000 UPC_main_daq10k ------------------------------------ " <<trg_3000<< endm;
618 if(runN>16041100 && runN<= 16770001){
619 if(triggerSel==
"RP_trig"){
622 if(ttid.isTrigger(470707)) trg_3000 = trg_3000 | (
int)pow(2.0, 0.0);
623 if(ttid.isTrigger(470708)) trg_3000 = trg_3000 | (
int)pow(2.0, 1.0);
624 if(ttid.isTrigger(470711)) trg_3000 = trg_3000 | (
int)pow(2.0, 2.0);
625 if(ttid.isTrigger(9) ) trg_3000 = trg_3000 | (
int)pow(2.0, 3.0);
626 if(ttid.isTrigger(470724)) trg_3000 = trg_3000 | (
int)pow(2.0, 4.0);
627 if(ttid.isTrigger(470701)) trg_3000 = trg_3000 | (
int)pow(2.0, 5.0);
628 if(ttid.isTrigger(470703)) trg_3000 = trg_3000 | (
int)pow(2.0, 6.0);
629 if(ttid.isTrigger(470702)) trg_3000 = trg_3000 | (
int)pow(2.0, 7.0);
630 if(ttid.isTrigger(470712)) trg_3000 = trg_3000 | (
int)pow(2.0, 8.0);
631 if(ttid.isTrigger(470729)) trg_3000 = trg_3000 | (
int)pow(2.0, 9.0);
632 if(ttid.isTrigger(470730)) trg_3000 = trg_3000 | (
int)pow(2.0,10.0);
633 if(ttid.isTrigger(470725)) trg_3000 = trg_3000 | (
int)pow(2.0,11.0);
635 if(runN>= 16064034 && runN< 16124016) {
636 if(ttid.isTrigger(480707)) trg_3000 = trg_3000 | (
int)pow(2.0, 0.0);
637 if(ttid.isTrigger(480713)) trg_3000 = trg_3000 | (
int)pow(2.0, 1.0);
638 if(ttid.isTrigger(480711)) trg_3000 = trg_3000 | (
int)pow(2.0, 2.0);
639 if(ttid.isTrigger(480706)) trg_3000 = trg_3000 | (
int)pow(2.0, 3.0);
640 if(ttid.isTrigger(480704)) trg_3000 = trg_3000 | (
int)pow(2.0, 4.0);
641 if(ttid.isTrigger(480701)) trg_3000 = trg_3000 | (
int)pow(2.0, 5.0);
642 if(ttid.isTrigger(480703)) trg_3000 = trg_3000 | (
int)pow(2.0, 6.0);
643 if(ttid.isTrigger(480702)) trg_3000 = trg_3000 | (
int)pow(2.0, 7.0);
644 if(ttid.isTrigger(480712)) trg_3000 = trg_3000 | (
int)pow(2.0, 8.0);
645 if(ttid.isTrigger(480709)) trg_3000 = trg_3000 | (
int)pow(2.0, 9.0);
646 if(ttid.isTrigger(480710)) trg_3000 = trg_3000 | (
int)pow(2.0,10.0);
647 if(ttid.isTrigger(480705)) trg_3000 = trg_3000 | (
int)pow(2.0,11.0);
650 if(runN>= 16125033 && runN<16160013) {
652 if(runN>= 16125033 && runN< 16138047 &&ttid.isTrigger(500704)){
653 trg_3000 = trg_3000 | (int)pow(2.0, 4.0);
654 cout<<
" ZMU "<<trg_3000<<endl;
656 if( ttid.isTrigger(500701)){
657 trg_3000 = trg_3000 | (int)pow(2.0, 5.0);
658 cout<<
" SD "<<trg_3000<<endl;
660 if( ttid.isTrigger(500703)) {
661 trg_3000 = trg_3000 | (int)pow(2.0, 6.0);
662 cout<<
" SDT "<<trg_3000<<endl;
664 if(runN>= 16125033 && runN< 16138047 &&ttid.isTrigger(500709)) {
665 trg_3000 = trg_3000 | (int)pow(2.0, 9.0);
666 cout<<
" 2MU "<<trg_3000<<endl;
668 if(runN>= 16138047 && runN< 16142049 &&ttid.isTrigger(500729)){
669 trg_3000 = trg_3000 | (int)pow(2.0, 9.0);
670 cout<<
" 2MU B "<<trg_3000<<endl;
672 if(runN>= 16142049 && ttid.isTrigger(500749)) {
673 trg_3000 = trg_3000 | (int)pow(2.0, 9.0);
674 cout<<
" ZMU "<<trg_3000<<endl;
676 if(runN>= 16138044 && ttid.isTrigger(500710)){
677 trg_3000 = trg_3000 | (int)pow(2.0,10.0);
678 cout<<
" 2E "<<trg_3000<<endl;
680 if(runN>= 16128030 && ttid.isTrigger(500000)) {
681 trg_3000 = trg_3000 | (int)pow(2.0,11.0);
682 cout<<
" UPC "<<trg_3000<<endl;
686 if(runN>= 16149001 && runN< 16149044 && ttid.isTrigger(500730)) {
687 trg_3000 = trg_3000 | (int)pow(2.0,12.0);
688 cout<<
" UPC "<<trg_3000<<endl;
690 if(runN>= 16149044 && runN< 16159025 && ttid.isTrigger(500750)) {
691 trg_3000 = trg_3000 | (int)pow(2.0,12.0);
692 cout<<
" UPC "<<trg_3000<<endl;
696 if(runN>= 16160012) {
698 if( ttid.isTrigger(510704)){
699 trg_3000 = trg_3000 | (int)pow(2.0, 4.0);
700 cout<<
" ZMU "<<trg_3000<<endl;
702 if( ttid.isTrigger(510701)){
703 trg_3000 = trg_3000 | (int)pow(2.0, 5.0);
704 cout<<
" SD "<<trg_3000<<endl;
706 if( ttid.isTrigger(510703)) {
707 trg_3000 = trg_3000 | (int)pow(2.0, 6.0);
708 cout<<
" SDT "<<trg_3000<<endl;
710 if( ttid.isTrigger(510709)) {
711 trg_3000 = trg_3000 | (int)pow(2.0, 9.0);
712 cout<<
" 2MU "<<trg_3000<<endl;
715 if( ttid.isTrigger(510710)){
716 trg_3000 = trg_3000 | (int)pow(2.0,10.0);
717 cout<<
" 2E "<<trg_3000<<endl;
719 if( ttid.isTrigger(510714)) {
720 trg_3000 = trg_3000 | (int)pow(2.0,11.0);
721 cout<<
" UPC "<<trg_3000<<endl;
723 if(runN>= 16160032 && runN< 16169095 && ttid.isTrigger(510710)) {
724 trg_3000 = trg_3000 | (int)pow(2.0,12.0);
725 cout<<
" UPC "<<trg_3000<<endl;
729 LOG_INFO <<
"StPeCTrigger::value of trg_3000 RP triggers ------------------------------------ " <<trg_3000<< endm;
735 if(runN>= 17040085 && runN<17160013) {
736 LOG_INFO <<
"StPeCTrigger::2016 ------------------------------------ " <<trg_3000<<
" trigSel "<<triggerSel<<endm;
737 if(triggerSel==
"UPC_trig"){
738 if( ttid.isTrigger(520701)){
739 trg_3000 = trg_3000 | (int)pow(2.0, 0.0);
740 cout<<
" UPC_Main "<<trg_3000<<endl;
742 if( ttid.isTrigger(520702)){
743 trg_3000 = trg_3000 | (int)pow(2.0, 1.0);
744 cout<<
" UPC_zdcsum "<<trg_3000<<endl;
746 if( ttid.isTrigger(520703)) {
747 trg_3000 = trg_3000 | (int)pow(2.0, 2.0);
748 cout<<
" UPC_JPsi "<<trg_3000<<endl;
753 LOG_INFO <<
"StPeCTrigger::2016 AFTER------------------------------------ " <<trg_3000<< endm;
756 if(triggerSel==
"Ignore"){
761 LOG_INFO <<
"StPeCTrigger::Ignore trigger selection ------------------------------------ " <<trg_3000 << endm;
764 lastDSM0 = trigData->lastDSM(0);
765 lastDSM1 = trigData->lastDSM(1);
770 trg_3000 = ttid.isTrigger(1);
771 trg_3001 = ttid.isTrigger(2);
772 trg_3001 = ttid.isTrigger(4);
774 if(runN>14137093 && runN<15001001){
775 trg_3000 = ttid.isTrigger(3);
776 trg_3001 = ttid.isTrigger(430104);
777 trg_3001 = ttid.isTrigger(430605);
794 l0_2000->setInfoLevel ( infoLevel );
805 if ( infoLevel > 10 ) {
806 cout <<
"ZDC sum " << zdc.adcSum() << endl;
807 cout <<
"ZDC sum west " << zdc.adcSum(west) << endl;
808 cout <<
"ZDC sum east " << zdc.adcSum(east) << endl;
810 zdcCoincidenceRate = zdcRate;
812 zdcWest = trigData->zdcAttenuated(west);
813 zdcEast = trigData->zdcAttenuated(east);
814 zdcSum = zdcEast+zdcWest ;
816 zdcWestTDC = trigData->zdcTDC(west);
817 zdcEastTDC = trigData->zdcTDC(east);
818 zdcTimeDifference = trigData->zdcTimeDifference();
821 zdcWestUA = trigData->zdcUnAttenuated(west);
822 zdcEastUA = trigData->zdcUnAttenuated(east);
823 zdcSumUA = zdcEastUA+zdcWestUA ;
828 for(
int i=0;i<8;i++){
829 zdcSMDEastH[i] = trigData->zdcSMD(east, hori, i+1);
830 zdcSMDEastV[i] = trigData->zdcSMD(east, vert, i+1);
831 zdcSMDWestH[i] = trigData->zdcSMD(west, hori, i+1);
832 zdcSMDWestV[i] = trigData->zdcSMD(west, vert, i+1);
835 zdcSMDHighestStripEastH = trigData->zdcSMDHighestStrip(east, hori);
836 zdcSMDHighestStripEastV = trigData->zdcSMDHighestStrip(east, vert);
837 zdcSMDHighestStripWestH = trigData->zdcSMDHighestStrip(west, hori);
838 zdcSMDHighestStripWestV = trigData->zdcSMDHighestStrip(west, vert);
842 zdcCoincidenceRate = 0.;
852 zdcTimeDifference = 0;
854 for(
int i=0;i<8;i++){
862 zdcSMDHighestStripEastH = 0;
863 zdcSMDHighestStripEastV = 0;
864 zdcSMDHighestStripWestH = 0;
865 zdcSMDHighestStripWestV = 0;
881 float ctbThres = 2. ;
883 TClonesArray &pCtbSlats = *ctbSlats;
884 for(i=0; i<120; i++){
886 ctbsum += ctb.mips(i,j,0);
887 if ( ctb.mips(i,j,0) > 0 ) {
888 Byte_t i_eta = (Byte_t)(j+1);
889 Byte_t i_phi = (Byte_t)(i+1);
890 Int_t adc = (Int_t)ctb.mips(i,j,0) ;
891 new(pCtbSlats[nCtbHits++])
StPeCCtbSlat(i_phi,i_eta,adc) ;
894 if ( ctb.mips(i,j,0) > ctbThres ) {
895 if ( i >= 5 && i < 20 ) ctbSW++ ;
896 else if ( i >= 20 && i < 35 ) ctbBW++ ;
897 else if ( i >= 35 && i < 50 ) ctbNW++ ;
898 else if ( i >= 50 && i < 60 ) ctbTW++ ;
899 else if ( i < 5 ) ctbTW++ ;
900 else if ( i >= 65 && i < 80 ) ctbNE++ ;
901 else if ( i >= 80 && i < 95 ) ctbBE++ ;
902 else if ( i >= 95 && i < 110 ) ctbSE++ ;
903 else if ( i >= 110 ) ctbTE++ ;
904 else if ( i >= 60 && i < 65 ) ctbTE++ ;
908 if ( infoLevel > 10 )
909 cout <<
"CTB MIP total sum = " << ctbsum << endl;
917 size_t Nvert = mudst->numberOfPrimaryVertices();
918 LOG_INFO <<
"StPeCTrigger::fill(event mudst) #vertices: " <<Nvert<< endm;
919 for (
size_t verti = 0;verti<Nvert;++verti){
936 bbcAdcSumEastSm=bbc.adcSumEast();
937 bbcAdcSumWestSm=bbc.adcSumWest();
938 bbcAdcSumEastLg=bbc.adcSumEastLarge();;
939 bbcAdcSumWestLg=bbc.adcSumWestLarge();;
946 bbcTacEast = trigData->bbcEarliestTDC(east);
947 bbcTacWest = trigData->bbcEarliestTDC(west);
948 bbcTimeDiff = trigData->bbcTimeDifference();
949 for(
int i=0;i<36;i++){
950 bbcTDCEast[i] = trigData->bbcTDC(east, i+1);
951 bbcTDCWest[i] = trigData->bbcTDC(west, i+1);
952 bbcADCEast[i] = trigData->bbcADC(east, i+1);
953 bbcADCWest[i] = trigData->bbcADC(west, i+1);
973 for(
int i=0;i<36;i++){
984 unsigned short tofMult;
985 tofMult = trigData->tofMultiplicity();
986 nBtofTriggerHits = tofMult;
987 nBTOFhits = mudst->numberOfBTofHit();
988 nPrimaryTracks = mudst->numberOfPrimaryTracks();
991 for(
int itof=0;itof<tofMult;itof++) {
998 bunchId = trigData->bunchId7Bit();
1002 p4 = l0_2000->process(mudst);
1003 p4c = l0_2000Corrected->process(mudst);
1004 p5 = l0Offline2001->process(mudst);
1010 {
for (
int i = 0 ; i < 40 ; i++ ) trgOut[i] = 0 ;}
1012 if ( infoLevel > 20 ) {
1013 printf (
"trgBits : " ) ;
1014 for (
int i = 0 ; i < 24 ; i++ ) {
1015 printf (
"%d ", trgOut[i] ) ;
static StMuPrimaryVertex * primaryVertex()
return pointer to current primary vertex
static StMuBTofHit * btofHit(int i)
returns pointer to the i-th muBTofHit
StThreeVectorF primaryVertexPosition(int vtx_id=-1) const
The StMuDst is supposed to be structured in 'physical events'. Therefore there is only 1 primary vert...
Collection of trigger ids as stored in StEvent.
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
static void setVertexIndex(Int_t vtx_id)
Set the index number of the current primary vertex (used by both primaryTracks() functions and for St...
Collection of trigger ids as stored in MuDst.