Skip to content

Commit

Permalink
Merge branch 'main' into geometry-y2024
Browse files Browse the repository at this point in the history
  • Loading branch information
klendathu2k authored Nov 2, 2023
2 parents d6cb780 + 0809f9e commit b0966f7
Show file tree
Hide file tree
Showing 6 changed files with 2,265 additions and 5 deletions.
8 changes: 5 additions & 3 deletions StRoot/StFcsFastSimulatorMaker/macro/runSimBfc.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ TString input_chain = "sdt20211025.120000,fzin,geant,FieldOn,logger,MakeEvent,fc

class StFmsSimulatorMaker;

void runSimBfc( Int_t nEvents=1000, Int_t run=1, const char* pid="jet", int TrgVersion=202207,
int debug=0, int e=0, float pt=1.5, float vz=0.0,
void runSimBfc( Int_t nEvents=1000, Int_t run=1, const char* pid="jet",
int e=0, float pt=1.5, float vz=0.0,
int TrgVersion=202209,
int debug=3,
char* epdmask="0.0100",
int leakyHcal=0,
int eventDisplay=0,
Expand Down Expand Up @@ -82,7 +84,7 @@ void runSimBfc( Int_t nEvents=1000, Int_t run=1, const char* pid="jet", int TrgV
fcsTrgSim->setSimMode(1);
fcsTrgSim->setTrigger(TrgVersion);
fcsTrgSim->setDebug(debug);
fcsTrgSim->setEtGain(1.0); //ET match
fcsTrgSim->setEtGain(1.0); //ET match
//fcsTrgSim->setEtGain(0.5); //halfway
//fcsTrgSim->setEtGain(0.0); //E match
//fcsTrgSim->setReadPresMask(Form("mask/fcs_ecal_epd_mask.ele.pt0.6.vz0.thr%s.txt",epdmask));
Expand Down
10 changes: 8 additions & 2 deletions StRoot/StSpinPool/StFcsTriggerSimMaker/StFcsTriggerSimMaker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ int StFcsTriggerSimMaker::Init(){
mTrgSim->stage_version[1]=1;
mTrgSim->stage_version[2]=7;
mTrgSim->stage_version[3]=7;
}else if(mTrgSelect==202209){
mTrgSim->stage_version[0]=3;
mTrgSim->stage_version[1]=1;
mTrgSim->stage_version[2]=7;
mTrgSim->stage_version[3]=7;
}

//Thresholds
Expand Down Expand Up @@ -282,7 +287,7 @@ int StFcsTriggerSimMaker::Make(){
StFcsHit* hit=hits[i];
unsigned short dep = hit->dep();
unsigned short ch = hit->channel();
//printf("ns=%1d ehp=%1d dep=%2d ch=%2d adc=%4d\n",ns,ehp,dep,ch,hit->adc());
//printf("ns=%1d ehp=%1d dep=%2d ch=%2d adc=%4d sim=\n",ns,ehp,dep,ch,hit->adc(0),mSimMode);
if(ehp<0 || ch>=32) continue;
fcs_trg_sim_adc[ns][ehp][dep][ch] = hit->adc(0);
if(mSimMode==0){
Expand All @@ -296,7 +301,8 @@ int StFcsTriggerSimMaker::Make(){
}
mTrgSim->fill_event(ehp,ns,dep,ch,data,8) ;
}else{
data[3] = hit->adc(0);
data[1] = hit->adc(0)-1; //removing 1 to add at tb6
data[6] = 1; //add this so tb6>tb7
mTrgSim->fill_event(ehp,ns,dep,ch,data,8) ;
}
if(mFile) fprintf(mFile,"%2d %2d %2d %2d %5d\n",ns,ehp,dep,ch,hit->adc(0));
Expand Down
138 changes: 138 additions & 0 deletions StRoot/StSpinPool/StFcsTriggerSimMaker/files/fcs_daq_map.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
#### PC Id ("sector") [1..10ish]
#### RDO Id within the PC [1..8]
#### Note: RDOs 1..4 are on the PCIe on the top side of the PC
#### RDOs 5..8 are on the PCIe closer to the bottom/motherboard
#### Also, number 1 (or 5) is the fiber closer to the middle of the PC, or left if looking from behind
####
#### Detector Type [0..3]: 0=ECAL,1=HCAL,2=FPRE,3=Main
#### North/South [0..1]: 0=North,1=South
#### DEP board: 0..23
#### Channel mask -- NOTE THAT IT IS A 64 BIT HEX NUMBER --> THUS "ll" AT THE END and 0x at the beginning
#
# Owner is Tonko!
#

# Version: 7-Oct_2020 -- map accoriding to diagram
# Version: 3-Jun-2020 -- ad-hoc map


############### ECAL North
1 1 0 0 0 0x1FFFFFFFFll # ECAL
1 2 0 0 1 0x1FFFFFFFFll # ECAL
1 3 0 0 2 0x1FFFFFFFFll # ECAL
1 4 0 0 3 0x1FFFFFFFFll # ECAL
1 5 0 0 4 0x1FFFFFFFFll # ECAL
1 6 0 0 5 0x1FFFFFFFFll # ECAL
1 7 0 0 6 0x1FFFFFFFFll # ECAL
1 8 0 0 7 0x1FFFFFFFFll # ECAL

2 1 0 0 8 0x1FFFFFFFFll # ECAL
2 2 0 0 9 0x1FFFFFFFFll # ECAL
2 3 0 0 10 0x1FFFFFFFFll # ECAL
2 4 0 0 11 0x1FFFFFFFFll # ECAL
2 5 0 0 12 0x1FFFFFFFFll # ECAL
2 6 0 0 13 0x1FFFFFFFFll # ECAL
2 7 0 0 14 0x1FFFFFFFFll # ECAL
2 8 0 0 15 0x1FFFFFFFFll # ECAL

3 1 0 0 16 0x1FFFFFFFFll # ECAL
3 2 0 0 17 0x1FFFFFFFFll # ECAL
3 3 0 0 18 0x1FFFFFFFFll # ECAL
3 4 0 0 19 0x1FFFFFFFFll # ECAL
3 5 0 0 20 0x1FFFFFFFFll # ECAL
3 6 0 0 21 0x1FFFFFFFFll # ECAL
3 7 0 0 22 0x1FFFFFFFFll # ECAL
3 8 0 0 23 0x1FFFFFFFFll # ECAL

############### ECAL South
6 1 0 1 0 0x1FFFFFFFFll # ECAL
6 2 0 1 1 0x1FFFFFFFFll # ECAL
6 3 0 1 2 0x1FFFFFFFFll # ECAL
6 4 0 1 3 0x1FFFFFFFFll # ECAL
6 5 0 1 4 0x1FFFFFFFFll # ECAL
6 6 0 1 5 0x1FFFFFFFFll # ECAL
6 7 0 1 6 0x1FFFFFFFFll # ECAL
6 8 0 1 7 0x1FFFFFFFFll # ECAL

7 1 0 1 8 0x1FFFFFFFFll # ECAL
7 2 0 1 9 0x1FFFFFFFFll # ECAL
7 3 0 1 10 0x1FFFFFFFFll # ECAL
7 4 0 1 11 0x1FFFFFFFFll # ECAL
7 5 0 1 12 0x1FFFFFFFFll # ECAL
7 6 0 1 13 0x1FFFFFFFFll # ECAL
7 7 0 1 14 0x1FFFFFFFFll # ECAL
# 7-8 is a dead slot
#

8 1 0 1 16 0x1FFFFFFFFll # ECAL
8 2 0 1 17 0x1FFFFFFFFll # ECAL
8 3 0 1 18 0x1FFFFFFFFll # ECAL
8 4 0 1 19 0x1FFFFFFFFll # ECAL
8 5 0 1 20 0x1FFFFFFFFll # ECAL
8 6 0 1 21 0x1FFFFFFFFll # ECAL
8 7 0 1 22 0x1FFFFFFFFll # ECAL
8 8 0 1 23 0x1FFFFFFFFll # ECAL

############### HCAL North
4 1 1 0 0 0x1FFFFFFFFll # HCAL
4 2 1 0 1 0x1FFFFFFFFll # HCAL
4 3 1 0 2 0x1FFFFFFFFll # HCAL
4 4 1 0 3 0x1FFFFFFFFll # HCAL
4 5 1 0 4 0x1FFFFFFFFll # HCAL
4 6 1 0 5 0x1FFFFFFFFll # HCAL
4 7 1 0 6 0x1FFFFFFFFll # HCAL
4 8 1 0 7 0x1FFFFFFFFll # HCAL

############### HCAL South
9 1 1 1 0 0x1FFFFFFFFll # HCAL
9 2 1 1 1 0x1FFFFFFFFll # HCAL
9 3 1 1 2 0x1FFFFFFFFll # HCAL
9 4 1 1 3 0x1FFFFFFFFll # HCAL
9 5 1 1 4 0x1FFFFFFFFll # HCAL
9 6 1 1 5 0x1FFFFFFFFll # HCAL
9 7 1 1 6 0x1FFFFFFFFll # HCAL
9 8 1 1 7 0x1FFFFFFFFll # HCAL

############### Preshower & HCAL North
5 1 1 0 8 0x1FFFFFFFFll # HCAL
# RDO #2 is connected to what was 7-8
5 2 0 1 15 0x1FFFFFFFFll # ECAL
5 3 2 0 0 0x1FFFFFFFFll # FPRE/EPD
5 4 2 0 1 0x1FFFFFFFFll # FPRE/EPD
5 5 2 0 2 0x1FFFFFFFFll # FPRE/EPD
5 6 2 0 3 0x1FFFFFFFFll # FPRE/EPD
5 7 2 0 4 0x1FFFFFFFFll # FPRE/EPD
5 8 2 0 5 0x1FFFFFFFFll # FPRE/EPD


############### Preshower & HCAL South
10 1 1 1 8 0x1FFFFFFFFll # HCAL
# RDO #2 connected to what was 10-8
10 2 2 1 5 0x1FFFFFFFFll # FPRE/EPD
10 3 2 1 0 0x1FFFFFFFFll # FPRE/EPD
10 4 2 1 1 0x1FFFFFFFFll # FPRE/EPD
10 5 2 1 2 0x1FFFFFFFFll # FPRE/EPD
10 6 2 1 3 0x1FFFFFFFFll # FPRE/EPD
10 7 2 1 4 0x1FFFFFFFFll # FPRE/EPD
# RDO #8 is dead


############### Main crate
# Moved the map to the upper TEF because the lower seems bad
11 5 3 0 0 0x000000003Fll # Main
11 6 3 0 1 0x1FFFFFFFFFll # Stage 2 north
11 7 3 1 1 0x1FFFFFFFFFll # Stage 2 south
#11 6 3 0 1 0x0FFFFFFFFFll # Stage 2 north
#11 7 3 1 1 0x0FFFFFFFFFll # Stage 2 south


# unphysical spares! Also, setup for FY20 tests.
#12 1 0 0 18 0x1FFFFFFFFll
#12 2 0 1 19 0x1FFFFFFFFll
#12 3 0 0 20 0x1FFFFFFFFll
#12 4 0 1 21 0x1FFFFFFFFll
#12 5 2 0 0 0x1FFFFFFFFll
#12 6 2 1 1 0x1FFFFFFFFll
#12 7 1 0 0 0x1FFFFFFFFll
#12 8 1 1 1 0x1FFFFFFFFll

Loading

0 comments on commit b0966f7

Please sign in to comment.