22 #include <mysql/mysql.h>
24 #include <sys/types.h>
28 #include "RTS/trg/include/trgConfNum.h"
29 #include "StDSMUtilities/StDSM2009Utilities.hh"
37 #include "StEmcUtil/database/StEmcDecoder.h"
39 #include "St_db_Maker/St_db_Maker.h"
40 #include "Eemc/EMCdsm2Tree.h"
43 #include "StEvent/StEvent.h"
46 #include "Eemc/StEemcTriggerSimu.h"
47 #include "Eemc/EemcHttpInfo.h"
48 #include "Eemc/EEfeeTPTree.h"
49 #include "Eemc/EEfeeTP.h"
52 #include "StTriggerUtilities/Bemc/StBemcTriggerSimu.h"
53 #include "StEmcRawMaker/StBemcTables.h"
54 #include "StEmcUtil/geometry/StEmcGeom.h"
57 #include "StTriggerUtilities/Emc/StEmcTriggerSimu.h"
60 #include "Bbc/StBbcTriggerSimu.h"
63 #include "L2Emulator/StL2TriggerSimu.h"
66 #include "StTriggerSimuMaker.h"
67 #include "StTriggerSimuResult.h"
70 #include "TBufferFile.h"
71 #include "tables/St_triggerDefinition_Table.h"
72 #include "StTriggerDefinition.h"
75 #include "tables/St_triggerThreshold_Table.h"
76 #include "StTriggerThreshold.h"
89 for (
int a=0; a<numSimulators; a++){
94 fill(mBarrelJetPatchTh,mBarrelJetPatchTh+4,-1);
95 fill(mBarrelHighTowerTh,mBarrelHighTowerTh+4,-1);
98 fill(mEndcapJetPatchTh,mEndcapJetPatchTh+4,-1);
99 fill(mEndcapHighTowerTh,mEndcapHighTowerTh+2,-1);
101 fill(mOverlapJetPatchTh,mOverlapJetPatchTh+3,-1);
109 void StTriggerSimuMaker::useEemc(
int flag){
111 eemc->setConfig(flag);
115 void StTriggerSimuMaker::useBbc(){
120 void StTriggerSimuMaker::useBemc(){
122 bemc->setHeadMaker(
this);
138 Int_t StTriggerSimuMaker::Init() {
139 LOG_INFO <<Form(
"StTriggerSimuMaker::Init(), MCflag=%d",mMCflag)<<endm;
141 if (GetMode() == 10) {
147 bemc->setConfig(StBemcTriggerSimu::kOffline);
151 eemc->setHList(mHList);
155 bemc->setHList(mHList);
158 for(Int_t i=0; i<numSimulators; i++) {
160 mSimulators[i]->
setMC(mMCflag);
161 mSimulators[i]->Init();
166 return StMaker::Init();
169 void StTriggerSimuMaker::Clear(
const Option_t*){
170 LOG_DEBUG<<
"StTriggerSimuMaker::Clear()"<<endm;
172 for(Int_t i=0; i<numSimulators; i++) {
174 mSimulators[i]->Clear();
181 Int_t StTriggerSimuMaker::InitRun(
int runNumber) {
183 assert(runNumber != -1);
184 const TDatime& dbTime = GetDBTime();
185 mYear = dbTime.GetYear();
186 LOG_INFO <<
"runNumber=" << runNumber <<
" with DB timestamp " << dbTime.AsSQLString() << endm;
188 for (Int_t i = 0; i < numSimulators; ++i)
190 mSimulators[i]->InitRun(runNumber);
192 if (mYear >= 2009 && (mSimulators[0] || mSimulators[2])) {
193 emc->setHeadMaker(
this);
198 emc->InitRun(runNumber);
199 LOG_INFO<<Form(
"set year %d for emc trigger definition", mYear)<<endm;
200 mSimulators[3] = emc;
201 if (!mUseOnlineDB && !mUseOfflineDB) {
202 LOG_ERROR <<
"!!! ATTENTION !!! YOU MUST SPECIFY WHICH DATABASE TO USE FOR TRIGGER DEFINITIONS AND THRESHOLDS:" << endm;
203 LOG_ERROR <<
"StTriggerSimuMaker::useOnlineDB()" << endm;
204 LOG_ERROR <<
"StTriggerSimuMaker::useOfflineDB()" << endm;
205 assert(mUseOnlineDB || mUseOfflineDB);
207 assert((mUseOnlineDB && get2009DsmRegistersFromOnlineDatabase (runNumber)) ||
208 (mUseOfflineDB && get2009DsmRegistersFromOfflineDatabase(runNumber)));
211 if (mChangeJPThresh) {
212 LOG_INFO <<
"Shift the following registers by " << mChangeJPThresh <<
":" << endm;
216 setTriggerThresholds2017();
225 for(Int_t i=0; i<numSimulators; i++) {
227 mSimulators[i]->Make();
231 vector<int> trigIds = triggerIds();
232 TString line =
"Triggers: ";
233 for (
size_t i = 0; i < trigIds.size(); ++i) {
234 line += Form(
"%d ",trigIds[i]);
235 buildDetailedResult(trigIds[i]);
237 LOG_DEBUG << line << endm;
242 bool StTriggerSimuMaker::isTrigger(
int trigId) {
244 for(Int_t i=0; i<numSimulators; i++) {
245 if (mSimulators[i] && mSimulators[i]->triggerDecision(trigId) == kNo)
return false;
251 vector<int> StTriggerSimuMaker::triggerIds()
const
256 if (bemc) copy(bemc->triggerIds().begin(),bemc->triggerIds().end(),back_inserter(v));
257 if (eemc) copy(eemc->triggerIds().begin(),eemc->triggerIds().end(),back_inserter(v));
260 set<int> s = emc->triggerIds();
261 copy(s.begin(),s.end(),back_inserter(v));
267 bool StTriggerSimuMaker::isTriggerDefined(
int trigId)
276 vector<int> b = bemc->triggerIds();
277 for (
size_t i = 0; i < b.size(); ++i) {
278 if (trigId==b[i]) TrigDefined=
true;
282 vector<int> e = bemc->triggerIds();
283 for (
size_t i = 0; i < e.size(); ++i) {
284 if (trigId==e[i]) TrigDefined=
true;
289 set<int> s = emc->triggerIds();
290 if (s.count(trigId)>0) TrigDefined =
true;
298 void StTriggerSimuMaker::buildDetailedResult(
int trigId) {
300 result.setTriggerId(trigId);
309 vector< pair<int,int> > Towers=bemc->getTowersAboveThreshold(trigId);
310 for(vector< pair<int,int> >::iterator itr=Towers.begin(); itr!=Towers.end(); itr++){
311 result.addHighTower((*itr).first,(*itr).second);
314 vector< pair<int,int> > tPatches=bemc->getTriggerPatchesAboveThreshold(trigId);
315 for(vector< pair<int,int> >::iterator itr=tPatches.begin(); itr!=tPatches.end(); itr++){
316 result.addTriggerPatch((*itr).first,(*itr).second);
319 vector< pair<int,int> > jPatches=bemc->getJetPatchesAboveThreshold(trigId);
320 for(vector< pair<int,int> >::iterator itr=jPatches.begin(); itr!=jPatches.end(); itr++){
321 result.addJetPatch((*itr).first,(*itr).second);
332 result.setL2Result(lTwo->
result());
340 bool StTriggerSimuMaker::get2009DsmRegistersFromOfflineDatabase(
int runNumber)
342 return getTriggerDefinitions(runNumber) && getTriggerThresholds(runNumber);
345 bool StTriggerSimuMaker::getTriggerDefinitions(
int runNumber)
347 TDataSet* DB = GetInputDB(
"Calibrations/trg");
349 St_triggerDefinition* desc =
dynamic_cast<St_triggerDefinition*
>(DB->
Find(
"triggerDefinition"));
351 LOG_INFO <<
"Using BEMC offline database for trigger definitions" << endm;
352 triggerDefinition_st* table = desc->GetTable();
353 LOG_INFO << Form(
"%s\n", table[0].comments) << endm;
354 LOG_INFO << setw(20) <<
"triggerIndex"
355 << setw(20) <<
"name"
356 << setw(20) <<
"triggerId"
357 << setw(20) <<
"onbits"
358 << setw(20) <<
"offbits"
359 << setw(20) <<
"onbits1"
360 << setw(20) <<
"onbits2"
361 << setw(20) <<
"onbits3"
362 << setw(20) <<
"offbits1"
363 << setw(20) <<
"offbits2"
364 << setw(20) <<
"offbits3"
366 TBufferFile buf(TBuffer::kRead);
367 buf.SetBuffer(table[0].trigdef,
sizeof(table[0].trigdef),
false);
370 for (
int i = 0; i < a->GetEntriesFast(); ++i) {
372 if(!trigdef)
continue;
373 LOG_INFO << setw(20) << trigdef->triggerIndex
374 << setw(20) << trigdef->name
375 << setw(20) << trigdef->triggerId
376 << setw(20) << Form(
"0x%08x", trigdef->onbits)
377 << setw(20) << Form(
"0x%08x", trigdef->offbits)
378 << setw(20) << Form(
"0x%08x", trigdef->onbits1)
379 << setw(20) << Form(
"0x%08x", trigdef->onbits2)
380 << setw(20) << Form(
"0x%08x", trigdef->onbits3)
381 << setw(20) << Form(
"0x%08x", trigdef->offbits1)
382 << setw(20) << Form(
"0x%08x", trigdef->offbits2)
383 << setw(20) << Form(
"0x%08x", trigdef->offbits3)
386 trigDef.triggerIndex = trigdef->triggerIndex;
387 strcpy(trigDef.name,trigdef->name.Data());
388 trigDef.triggerId = trigdef->triggerId;
389 trigDef.onbits = trigdef->onbits;
390 trigDef.offbits = trigdef->offbits;
391 trigDef.onbits1 = trigdef->onbits1;
392 trigDef.onbits2 = trigdef->onbits2;
393 trigDef.onbits3 = trigdef->onbits3;
394 trigDef.offbits1 = trigdef->offbits1;
395 trigDef.offbits2 = trigdef->offbits2;
396 trigDef.offbits3 = trigdef->offbits3;
398 emc->defineTrigger(trigDef);
406 void StTriggerSimuMaker::setTriggerThresholds2017()
408 LOG_INFO<<
"Resetting the following BEMC DSM thresholds for year 2017"<<endm;
409 LOG_INFO<<Form(
"BEMC-EEMC-overlap-JP-th0: %d", 30)<<endm;
410 LOG_INFO<<Form(
"BEMC-EEMC-overlap-JP-th1: %d", 43)<<endm;
411 LOG_INFO<<Form(
"BEMC-EEMC-overlap-JP-th2: %d", 66)<<endm;
412 LOG_INFO<<Form(
"EMC-HTTP-Sel: %d", 0)<<endm;
415 emc->get2009_DSMLayer2_Result()->setRegister(0,30);
416 emc->get2009_DSMLayer2_Result()->setRegister(1,43);
417 emc->get2009_DSMLayer2_Result()->setRegister(2,66);
418 emc->get2009_DSMLayer2_Result()->setRegister(3,0);
423 LOG_INFO<<Form(
"EEMC-JP-th0: %d", 30)<<endm;
424 LOG_INFO<<Form(
"EEMC-JP-th1: %d", 43)<<endm;
425 LOG_INFO<<Form(
"EEMC-JP-th2: %d", 66)<<endm;
427 eemc->get2009_DSMLayer1_Result()->setRegister(0, 30);
428 eemc->get2009_DSMLayer1_Result()->setRegister(1, 43);
429 eemc->get2009_DSMLayer1_Result()->setRegister(2, 66);
436 LOG_INFO<<Form(
"BEMC-HT-th1: %d", 18)<<endm;
437 LOG_INFO<<Form(
"BEMC-HT-th2: %d", 25)<<endm;
438 LOG_INFO<<Form(
"BEMC-HT-th3: %d", 31)<<endm;
439 LOG_INFO<<Form(
"BEMC-HT-UPC %d", 3)<<endm;
440 LOG_INFO<<Form(
"BEMC-TP-UPC: %d", 3)<<endm;
442 for (
int dsm = 0; dsm < 15; ++dsm){
443 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[0] = 18;
444 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[1] = 25;
445 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[2] = 31;
446 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[3] = 3;
447 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[4] = 3;
457 for (
int dsm = 15; dsm < 30; ++dsm){
458 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[0] = 18;
459 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[1] = 25;
460 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[2] = 31;
461 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[3] = 3;
462 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[4] = 3;
476 bool StTriggerSimuMaker::getTriggerThresholds(
int runNumber)
478 TDataSet* DB = GetInputDB(
"Calibrations/trg");
480 St_triggerThreshold* desc =
dynamic_cast<St_triggerThreshold*
>(DB->
Find(
"triggerThreshold"));
482 LOG_INFO <<
"Using BEMC offline database for trigger thresholds" << endm;
483 triggerThreshold_st* table = desc->GetTable();
484 LOG_INFO << Form(
"%s\n", table[0].comments) << endm;
486 LOG_INFO << setw(20) <<
"object"
487 << setw(20) <<
"index"
489 << setw(20) <<
"label"
490 << setw(20) <<
"value"
491 << setw(20) <<
"defaultvalue"
493 TBufferFile buf(TBuffer::kRead);
494 buf.SetBuffer(table[0].trigthr,
sizeof(table[0].trigthr),
false);
497 for (
int i = 0; i < a->GetEntriesFast(); ++i) {
499 if(!trigthr)
continue;
500 LOG_INFO << setw(20) << trigthr->object
501 << setw(20) << trigthr->index
502 << setw(20) << trigthr->reg
503 << setw(20) << trigthr->label
504 << setw(20) << trigthr->value
505 << setw(20) << trigthr->defaultvalue
507 int value = trigthr->value;
508 if (value == -1) value = trigthr->defaultvalue;
509 switch (trigthr->object) {
511 switch (trigthr->index) {
513 emc->get2009_DSMLayer2_Result()->setRegister(trigthr->reg,value);
516 emc->get2009_DSMLayer3_Result()->setRegister(trigthr->reg,value);
521 switch (trigthr->index) {
523 eemc->get2009_DSMLayer1_Result()->setRegister(trigthr->reg,value);
526 eemc->get2009_DSMLayer0_Result()->setRegister(trigthr->reg,value);
529 bemc->get2009_DSMLayer1_Result()->setRegister(trigthr->reg,value);
534 switch (trigthr->index) {
536 for (
int dsm = 0; dsm < 15; ++dsm)
537 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[trigthr->reg] = value;
542 switch (trigthr->index) {
544 for (
int dsm = 15; dsm < 30; ++dsm)
545 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[trigthr->reg] = value;
558 bool StTriggerSimuMaker::get2009DsmRegistersFromOnlineDatabase(
int runNumber)
563 const char* host =
"db04.star.bnl.gov";
564 const char* user =
"";
565 const char* pass =
"";
567 unsigned int port = 3400+mYear%100-1;
568 const char* database =
"Conditions_rts";
569 const char* unix_socket = NULL;
570 unsigned long client_flag = 0;
573 struct passwd *login;
574 login = getpwuid(geteuid());
575 user = login->pw_name;
577 LOG_INFO << Form(
"host=%s user=\"%s\" pass=\"%s\" port=%d database=%s",host,user,pass,port,database) << endm;
581 if (!mysql_real_connect(&mysql,host,user,pass,database,port,unix_socket,client_flag)) {
582 LOG_WARN <<
"Can't connect to database: " << mysql_error(&mysql) << endm;
588 if (mMCflag == 1 || mMCflag == 2) {
590 sprintf(query,
"select max(idx_rn) from triggers where beginTime <= '%s'",GetDBTime().AsSQLString());
591 LOG_INFO << query << endm;
592 mysql_query(&mysql,query);
594 if (MYSQL_RES* result = mysql_store_result(&mysql)) {
595 while (MYSQL_ROW row = mysql_fetch_row(result)) {
596 runNumber = atoi(row[0]);
599 LOG_INFO <<
"DB Time = " << GetDBTime().AsSQLString() << endm;
600 LOG_INFO <<
"Run Number = " << runNumber << endm;
603 LOG_INFO <<
"Using BEMC online database" << endm;
606 sprintf(query,
"select object,idx,reg,label,value,defaultvalue from dict where hash=(select dicthash from run where idx_rn = %d)",runNumber);
607 LOG_INFO << query << endm;
608 mysql_query(&mysql,query);
610 if (MYSQL_RES* result = mysql_store_result(&mysql)) {
611 LOG_INFO << setw(10) <<
"object"
614 << setw(30) <<
"label"
615 << setw(10) <<
"value"
616 << setw(15) <<
"defaultvalue"
619 while (MYSQL_ROW row = mysql_fetch_row(result)) {
620 int object = atoi(row[0]);
621 int idx = atoi(row[1]);
622 int reg = atoi(row[2]);
623 TString label = row[3];
624 int value = atoi(row[4]);
625 int defaultvalue = atoi(row[5]);
627 LOG_INFO << setw(10) <<
object
632 << setw(15) << defaultvalue
635 if (value == -1) value = defaultvalue;
636 if(mYear >= 2009 && mYear <= 2013)
642 emc->get2009_DSMLayer2_Result()->setRegister(reg,value);
645 emc->get2009_DSMLayer3_Result()->setRegister(reg,value);
652 eemc->get2009_DSMLayer1_Result()->setRegister(reg,value);
655 eemc->get2009_DSMLayer0_Result()->setRegister(reg,value);
658 bemc->get2009_DSMLayer1_Result()->setRegister(reg,value);
665 for (
int dsm = 0; dsm < 15; ++dsm)
666 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[reg] = value;
673 for (
int dsm = 15; dsm < 30; ++dsm)
674 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[reg] = value;
681 else if(mYear >= 2013)
687 emc->get2009_DSMLayer2_Result()->setRegister(reg,value);
690 emc->get2009_DSMLayer3_Result()->setRegister(reg,value);
697 eemc->get2009_DSMLayer1_Result()->setRegister(reg,value);
700 eemc->get2009_DSMLayer0_Result()->setRegister(reg,value);
703 bemc->get2009_DSMLayer1_Result()->setRegister(reg,value);
710 for (
int dsm = 0; dsm < 15; ++dsm)
711 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[reg] = value;
718 for (
int dsm = 15; dsm < 30; ++dsm)
719 (*bemc->get2009_DSMLayer0_Result())[dsm].registers[reg] = value;
727 mysql_free_result(result);
733 const int MAX_TRIGGERS = 64;
736 sprintf(query,
"select idx_trigger,name,offlineBit from triggers where idx_rn = %d",runNumber);
737 LOG_INFO << query << endm;
738 mysql_query(&mysql,query);
740 if (MYSQL_RES* result = mysql_store_result(&mysql)) {
741 while (MYSQL_ROW row = mysql_fetch_row(result)) {
742 int idx_trigger = atoi(row[0]);
743 assert(idx_trigger >= 0 && idx_trigger < MAX_TRIGGERS);
744 triggers[idx_trigger].triggerIndex = idx_trigger;
745 strcpy(triggers[idx_trigger].name,row[1]);
746 triggers[idx_trigger].triggerId = atoi(row[2]);
748 mysql_free_result(result);
751 sprintf(query,
"select idx_idx,onbits,offbits,onbits1,onbits2,onbits3,offbits1,offbits2,offbits3 from pwc where idx_rn = %d",runNumber);
752 LOG_INFO << query << endm;
753 mysql_query(&mysql,query);
755 if (MYSQL_RES* result = mysql_store_result(&mysql)) {
756 LOG_INFO << setw(20) <<
"idx_trigger"
757 << setw(20) <<
"name"
758 << setw(20) <<
"offlineBit"
759 << setw(20) <<
"onbits"
760 << setw(20) <<
"offbits"
761 << setw(20) <<
"onbits1"
762 << setw(20) <<
"onbits2"
763 << setw(20) <<
"onbits3"
764 << setw(20) <<
"offbits1"
765 << setw(20) <<
"offbits2"
766 << setw(20) <<
"offbits3"
771 while (MYSQL_ROW row = mysql_fetch_row(result)) {
773 sscanf(row[0],
"%d",&idx_trigger);
774 assert(idx_trigger >= 0 && idx_trigger < MAX_TRIGGERS);
777 sscanf(row[1],
"%ud",&triggers[idx_trigger].onbits);
778 sscanf(row[2],
"%ud",&triggers[idx_trigger].offbits);
779 if(row[3]) sscanf(row[3],
"%ud",&triggers[idx_trigger].onbits1);
780 if(row[4]) sscanf(row[4],
"%ud",&triggers[idx_trigger].onbits2);
781 if(row[5]) sscanf(row[5],
"%ud",&triggers[idx_trigger].onbits3);
782 if(row[6]) sscanf(row[6],
"%ud",&triggers[idx_trigger].offbits1);
783 if(row[7]) sscanf(row[7],
"%ud",&triggers[idx_trigger].offbits2);
784 if(row[8]) sscanf(row[8],
"%ud",&triggers[idx_trigger].offbits3);
786 LOG_INFO << setw(20) << idx_trigger
787 << setw(20) << triggers[idx_trigger].name
788 << setw(20) << triggers[idx_trigger].triggerId
789 << setw(20) << Form(
"0x%08x",triggers[idx_trigger].onbits)
790 << setw(20) << Form(
"0x%08x",triggers[idx_trigger].offbits)
791 << setw(20) << Form(
"0x%08x",triggers[idx_trigger].onbits1)
792 << setw(20) << Form(
"0x%08x",triggers[idx_trigger].onbits2)
793 << setw(20) << Form(
"0x%08x",triggers[idx_trigger].onbits3)
794 << setw(20) << Form(
"0x%08x",triggers[idx_trigger].offbits1)
795 << setw(20) << Form(
"0x%08x",triggers[idx_trigger].offbits2)
796 << setw(20) << Form(
"0x%08x",triggers[idx_trigger].offbits3)
798 emc->defineTrigger(triggers[idx_trigger]);
800 mysql_free_result(result);
808 void StTriggerSimuMaker::overwrite2009DsmRegisters()
810 for (
int reg = 0; reg < 3; ++reg) {
811 int value = mBarrelJetPatchTh[reg];
813 LOG_INFO << setw(20) << reg
814 << setw(30) <<
"BEMC-JP-th" << reg
817 bemc->get2009_DSMLayer1_Result()->setRegister(reg,value);
821 for (
int reg = 0; reg < 4; ++reg) {
822 int value = mBarrelHighTowerTh[reg];
824 LOG_INFO << setw(20) << reg
825 << setw(30) <<
"BEMC-HT-th" << reg
828 bemc->get2009_DSMLayer0_Result()->setRegister(reg,value);
832 for (
int reg = 0; reg < 3; ++reg) {
833 int value = mEndcapJetPatchTh[reg];
835 LOG_INFO << setw(20) << reg
836 << setw(30) <<
"EEMC-JP-th" << reg
839 eemc->get2009_DSMLayer1_Result()->setRegister(reg,value);
843 for (
int reg = 0; reg < 2; ++reg) {
844 int value = mEndcapHighTowerTh[reg];
846 LOG_INFO << setw(20) << reg
847 << setw(30) <<
"EEMC-HT-th" << reg
850 eemc->get2009_DSMLayer0_Result()->setRegister(reg,value);
854 for (
int reg = 0; reg < 3; ++reg) {
855 int value = mOverlapJetPatchTh[reg];
857 LOG_INFO << setw(20) << reg
858 << setw(30) <<
"BEMC-EEMC-overlap-JP-th" << reg
861 emc->get2009_DSMLayer2_Result()->setRegister(reg,value);
866 void StTriggerSimuMaker::changeJetPatchTh()
868 for (
int reg = 0; reg < 3; ++reg) {
869 int value = bemc->get2009_DSMLayer1_Result()->getRegister(reg);
870 value += mChangeJPThresh;
871 LOG_INFO << setw(20) << reg
872 << setw(30) <<
"BEMC-JP-th" << reg
875 bemc->get2009_DSMLayer1_Result()->setRegister(reg,value);
878 for (
int reg = 0; reg < 3; ++reg) {
879 int value = eemc->get2009_DSMLayer1_Result()->getRegister(reg);
880 value += mChangeJPThresh;
881 LOG_INFO << setw(20) << reg
882 << setw(30) <<
"EEMC-JP-th" << reg
885 eemc->get2009_DSMLayer1_Result()->setRegister(reg,value);
888 for (
int reg = 0; reg < 3; ++reg) {
889 int value = emc->get2009_DSMLayer2_Result()->getRegister(reg);
890 value += mChangeJPThresh;
891 LOG_INFO << setw(20) << reg
892 << setw(30) <<
"BEMC-EEMC-overlap-JP-th" << reg
895 emc->get2009_DSMLayer2_Result()->setRegister(reg,value);
899 void StTriggerSimuMaker::setLastDsmRegister(
int reg,
int value)
901 emc->get2009_DSMLayer3_Result()->setRegister(reg,value);
StTriggerSimuDecision triggerDecision(int trigId)
like isTrigger(), but returns kDoNotCare if detector isn't a part of the given trigId ...
StTriggerSimuDecision triggerDecision(int trigId)
like isTrigger(), but returns kDoNotCare if detector isn't a part of the given trigId ...
const unsigned int * result() const
bag of 64 bytes whose interpretation changes year-by-year
StTriggerSimuDecision triggerDecision(int trigId)
like isTrigger(), but returns kDoNotCare if detector isn't a part of the given trigId ...
virtual void setMC(int flag)
0 == real data, 1 or more == Monte Carlo
StTriggerSimuDecision triggerDecision(int trigId)
like isTrigger(), but returns kDoNotCare if detector isn't a part of the given trigId ...
virtual TDataSet * Find(const char *path) const