diff --git a/StRoot/RTS/include/rtsLog.h b/StRoot/RTS/include/rtsLog.h index be8b087ab84..c93e3cd42bb 100755 --- a/StRoot/RTS/include/rtsLog.h +++ b/StRoot/RTS/include/rtsLog.h @@ -93,41 +93,14 @@ void rtsLogAddJmlFile (char *fname); -/*Tonko: not used Special (mis)handling for STAR Offline Code -#ifdef __ROOT__ -#define RTS_DISABLE_LOG -#endif -*/ -#ifdef RTS_DISABLE_LOG - -#define RTS_ASSERT(expr) assert(expr) - - - #define LOG(SEV,STRING,ARGS...) \ - do { \ - const char *const yada = SEV ; \ - if((*yada == 'E')) { \ - fprintf(stderr,"" ANSI_RED "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - else if((*yada == 'C')) { \ - fprintf(stderr,"" ANSI_RED "" ANSI_REVERSE "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - else if((*yada == 'I')) { \ - fprintf(stderr,"" ANSI_BLUE "" ANSI_BOLD "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - else if((*yada == 'T')) { \ - fprintf(stderr,"" ANSI_GREEN "" ANSI_BOLD "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - else if((*yada == 'W')) { \ - fprintf(stderr,"" ANSI_CYAN "" ANSI_BOLD "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - else if((*yada == 'O')) { \ - fprintf(stderr,"" ANSI_BLUE "" ANSI_REVERSE "RTS_" SEV ": " __FILE__ " [line %d]: " STRING "" ANSI_RESET "\n" , __LINE__ , ##ARGS) ;\ - } \ - } while(0) \ +#ifndef RTS_ENABLE_LOG +#define RTS_ASSERT(expr) assert(expr) +#define LOG(SEV,STRING,ARGS...) +#define rtsLogUnix_v(str, ...) +#define rtsLogAddCmd(x) // the following become noops... @@ -136,7 +109,7 @@ void rtsLogAddJmlFile (char *fname); #define rtsLogLevelInt(x) #define rtsLogOutput(x) -#else /* RTS_DISABLE_LOG */ +#else /* RTS_ENABLE_LOG */ #ifdef __GNUC__ @@ -270,12 +243,12 @@ INLINE_HACK void rtsLogLevel(const char *level) -#endif +#endif /* RTS_LOG_COLORED */ -#endif +#endif /* __vxworks */ -#endif /* RTS_DISABLE_LOG */ +#endif /* RTS_ENABLE_LOG */ #ifdef __cplusplus } diff --git a/StRoot/RTS/src/LOG/Makefile b/StRoot/RTS/src/LOG/Makefile index 8107ebe358f..c1447ead38a 100755 --- a/StRoot/RTS/src/LOG/Makefile +++ b/StRoot/RTS/src/LOG/Makefile @@ -2,6 +2,7 @@ include ../rtsmakefile.def include ../rtsplus.def + # zap LDLIBS LDLIBS = @@ -28,7 +29,7 @@ rtsLog.o : rtsLog.C rtsLog: rtsLog.o rtsLogUnix.o $(CXX) $(CXXFLAGS) rtsLogUnix.o rtsLog.o -o rtsLog - + #operDisplay.sh: diff --git a/StRoot/RTS/src/LOG/rtsLog.C b/StRoot/RTS/src/LOG/rtsLog.C index 481ebdfe1b6..b9aa11ed557 100644 --- a/StRoot/RTS/src/LOG/rtsLog.C +++ b/StRoot/RTS/src/LOG/rtsLog.C @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) use_stdin = 0 ; rtsLogLevel(DBG) ; - rtsLogOutput(RTS_LOG_NET) ; + //rtsLogOutput(RTS_LOG_NET) ; memset(logstr,0,sizeof(logstr)) ; diff --git a/StRoot/RTS/src/LOG/rtsLogUnix.c b/StRoot/RTS/src/LOG/rtsLogUnix.c index 7e65ca77188..6d63e49c7ea 100755 --- a/StRoot/RTS/src/LOG/rtsLogUnix.c +++ b/StRoot/RTS/src/LOG/rtsLogUnix.c @@ -29,6 +29,30 @@ extern "C" { volatile int tonkoLogLevel = 2 ; + + + + +#ifdef RTS_ENABLE_LOG +#warning "DAQ logging is enabled" +#ifdef RTS_LOG_DEFAULT_NET +#warning "DAQ logging defaults to daqman" +#else +#warning "DAQ logging defaults to STDERR" +#endif /* RTS_LOG_DEFAULT_NET */ +#else +#warning "DAQ logging is disabled" +#endif /* RTS_ENABLE_LOG */ + + +#ifdef RTS_ENABLE_LOG + +#ifdef RTS_LOG_DEFAULT_NET +static int output_flag = RTS_LOG_NET ; +#else +static int output_flag = RTS_LOG_STDERR ; +#endif + static const char *getCmd(void) ; static int odesc = -1 ; static int handchange ; @@ -42,7 +66,7 @@ static char servER[80] = RTS_LOG_HOST ; #endif static int port = RTS_LOG_PORT ; -static int output_flag = RTS_LOG_NET ; + static char cmd[1024] ; /* @@ -113,7 +137,6 @@ void rtsLogAddJmlFile (char *fname) jml_fname = _g_fname; } - int rtsLogUnix_v(const char *str, ...) { /* common to all threads */ @@ -328,8 +351,6 @@ int rtsLogUnix_v(const char *str, ...) return 0 ; } - - static const char *getCmd(void) { @@ -370,6 +391,11 @@ static const char *getCmd(void) #endif } + +#endif + + + #ifdef __cplusplus } #endif diff --git a/StRoot/RTS/src/rtsmakefile.def b/StRoot/RTS/src/rtsmakefile.def index 2b345a55a73..7f0b82f740c 100755 --- a/StRoot/RTS/src/rtsmakefile.def +++ b/StRoot/RTS/src/rtsmakefile.def @@ -17,6 +17,8 @@ ifeq ($(HOST_NAME),daqman.starp.bnl.gov) endif +HOSTDOMAIN = $(shell hostname -d) + # jml... TARGET_CPU_STRING to mean the full string... # go from "uname" to gcc -mcpu=TARGET_CPU variant @@ -373,14 +375,38 @@ DEFINES = -D_REENTRANT ${RTS_DAQMAN_FLAGS} -DRTS_HOST_NAME=\"${HOST_NAME}\" -DTA # Set strict errors in LINUX -BASEFLAGS = -O3 -Wall -Werror -Wno-error=strict-overflow -Wno-error=maybe-uninitialized -Wno-error=unused-label -Wno-error=unused-value -Wno-error=unused-variable -Wno-error=unused-function -Wno-unused-but-set-variable -pipe -fverbose-asm ${HOSTFLAGS} +BASEFLAGS = -O3 -Wall -Wno-error=strict-overflow -Wno-error=maybe-uninitialized -Wno-error=unused-label -Wno-error=unused-value -Wno-error=unused-variable -Wno-error=unused-function -Wno-unused-but-set-variable -pipe -fverbose-asm ${HOSTFLAGS} + +#-O3 ifneq (${TARGET_SYSTEM}, LINUX) - BASEFLAGS = -O3 -Wall -pipe -fverbose-asm ${HOSTFLAGS} + BASEFLAGS = -Wall -pipe -fverbose-asm ${HOSTFLAGS} endif ifeq (${HOST_NAME},xvme01.daq.bnl.local) - BASEFLAGS = -O3 -Wall -Werror -Wno-error=strict-overflow -Wno-error=unused-label -Wno-error=unused-value -Wno-error=unused-variable -Wno-error=unused-function -Wno-unused-but-set-variable -pipe -fverbose-asm ${HOSTFLAGS} + BASEFLAGS = -O3 -Wall -Wno-error=strict-overflow -Wno-error=unused-label -Wno-error=unused-value -Wno-error=unused-variable -Wno-error=unused-function -Wno-unused-but-set-variable -pipe -fverbose-asm ${HOSTFLAGS} +endif + +# if not compiling on one of the standard domains, then +# use the default log destination of std_err +# if compiling on local domain, write to daqman +# +# if compiling somewhere else for writing to daqman these defines +ifeq (${HOSTDOMAIN},starp.bnl.gov) + DEFINES += -DRTS_LOG_DEFAULT_NET + DEFINES += -DRTS_ENABLE_LOG +else ifeq (${HOSTDOMAIN},daq.bnl.local) + DEFINES += -DRTS_LOG_DEFAULT_NET + DEFINES += -DRTS_ENABLE_LOG +else ifeq (${HOSTDOMAIN},daq2.bnl.local) + DEFINES += -DRTS_LOG_DEFAULT_NET + DEFINES += -DRTS_ENABLE_LOG +else ifeq (${HOSTDOMAIN},trg.bnl.local) + DEFINES += -DRTS_LOG_DEFAULT_NET + DEFINES += -DRTS_ENABLE_LOG +else ifeq (${HOSTDOMAIN},l4.bnl.local) + DEFINES += -DRTS_LOG_DEFAULT_NET + DEFINES += -DRTS_ENABLE_LOG endif CCFLAGS = ${BASEFLAGS} ${USRCCFLAGS} ${DEFINES} ${INCLUDES} @@ -396,6 +422,10 @@ ifeq ($(RTS_PROJECT),PP2PP) endif endif + + + + # noticed problems on Linux where the default linker gcc doesn't work well for g++ compiled # files LINK.o = $(CXX) $(LDFLAGS) $(TARGET_ARCH) diff --git a/StRoot/StBFChain/BigFullChain.h b/StRoot/StBFChain/BigFullChain.h index 64c9c046cf0..917dd831eaa 100644 --- a/StRoot/StBFChain/BigFullChain.h +++ b/StRoot/StBFChain/BigFullChain.h @@ -1715,7 +1715,7 @@ Bfc_st BFC[] = { // standard chains // Sti/Stv chains {"Sti" ,"Sti","","StiLib,StiLibs,SCL,StEvent,StDbT,TpcIT,compend,sim_T,tbutil","StiMaker" , "StEventUtilities,StiUtilities,StiMaker","Sti tracker",kFALSE}, - {"StiCA" ,"Sti","","Sti","StiMaker","TPCCATracker,StiCA" ,"StiCA tracker",kFALSE}, + {"StiCA" ,"Sti","","Sti","StiMaker","TPCCATracker" ,"StiCA tracker",kFALSE}, {"StiCAPerf","","","","", "TPCCATrackerPerformance", "CA Performance",kFALSE}, {"StiCA" ,"Sti","","Sti,StiLib,StiCALib,StiLibs,SCL,StEvent,StDbT,TpcIT,compend,tbutil","StiMaker" , "StEventUtilities,libEG,StiUtilities,StiMaker","Sti+CA tracker",kFALSE}, diff --git a/StRoot/StEvent/StFcsCollection.h b/StRoot/StEvent/StFcsCollection.h index bec1c4abc1a..5dbc2465d0b 100644 --- a/StRoot/StEvent/StFcsCollection.h +++ b/StRoot/StEvent/StFcsCollection.h @@ -53,6 +53,9 @@ class StFcsCollection : public StObject { const StSPtrVecFcsPoint& points(unsigned int det) const; // Return the point list unsigned int numberOfPoints(unsigned int det) const; // Return the number of points + void setDataExist(int v) {mDataExist=v;} + int isDataExist() {return mDataExist;} + int fcsReconstructionFlag() const; void setFcsReconstructionFlag(int v); @@ -64,9 +67,9 @@ class StFcsCollection : public StObject { StSPtrVecFcsPoint mPoints[kFcsNDet]; Int_t mFcsReconstructionFlag=0; // undefined for now + Int_t mDataExist=0; // if FCS data existed in daq file - ClassDef(StFcsCollection,1) - + ClassDef(StFcsCollection,2) }; inline int StFcsCollection::fcsReconstructionFlag() const {return mFcsReconstructionFlag;} diff --git a/StRoot/StEvent/StFstConsts.h b/StRoot/StEvent/StFstConsts.h index 422bcd2702d..fd84cc5ed12 100644 --- a/StRoot/StEvent/StFstConsts.h +++ b/StRoot/StEvent/StFstConsts.h @@ -52,7 +52,7 @@ const float kFstrStart[kFstNumRStripsPerWedge]= {5.000, 7.875, 10.750, 13.625, 1 const float kFstrStop[kFstNumRStripsPerWedge] = {7.875, 10.750, 136.25, 16.500, 19.375, 22.250, 25.125, 28.000}; // in cm //general APV chip constants -const unsigned char kFstNumTimeBins = 3; // 3 time bins for ADC sampling (maximum time bin number) +const unsigned char kFstNumTimeBins = 9; // 9 time bins for ADC sampling (maximum time bin number, 3 or 9) const unsigned char kFstDefaultTimeBin = 2; // the default time bin number (2nd time bin) for FST raw hits const int kFstMaxAdc = 4096; // ADC value should be less than 4096 (12 bits ADC) diff --git a/StRoot/StFcsClusterMaker/StFcsClusterMaker.cxx b/StRoot/StFcsClusterMaker/StFcsClusterMaker.cxx index 050df3cfbe6..6a92d4d5acf 100644 --- a/StRoot/StFcsClusterMaker/StFcsClusterMaker.cxx +++ b/StRoot/StFcsClusterMaker/StFcsClusterMaker.cxx @@ -285,7 +285,7 @@ float StFcsClusterMaker::isNeighbor(StFcsHit* hit, StFcsCluster* clu){ if(ehp==1) thr=mNeighborDistance_Hcal; float d = distance(hit,h); float e = h->energy(); - if(d < thr) ne=e; + if(d < thr && e>ne) ne=e; } return ne; } diff --git a/StRoot/StSpinPool/StFcsRawDaqReader/StFcsRawDaqReader.cxx b/StRoot/StSpinPool/StFcsRawDaqReader/StFcsRawDaqReader.cxx index a5acdd6f601..78ee20a42ad 100644 --- a/StRoot/StSpinPool/StFcsRawDaqReader/StFcsRawDaqReader.cxx +++ b/StRoot/StSpinPool/StFcsRawDaqReader/StFcsRawDaqReader.cxx @@ -33,7 +33,7 @@ #include "RTS/src/DAQ_STGC/daq_stgc.h" #include "RTS/src/DAQ_READER/daq_dta.h" #include "StRoot/StEvent/StTriggerData.h" -#include "StRoot/StEvent/StTriggerData2019.h" +#include "StRoot/StEvent/StTriggerData2022.h" #include "StRoot/StEvent/StFcsCollection.h" #include "StRoot/StEvent/StFcsHit.h" #include "StRoot/StFcsDbMaker/StFcsDbMaker.h" @@ -87,7 +87,7 @@ Int_t StFcsRawDaqReader::Init(){ struct tm* local = localtime((const time_t*)&unixtime); int date=(local->tm_year+1900)*10000 + (local->tm_mon+1)*100 + local->tm_mday; int time=local->tm_hour*10000 + local->tm_min*100 + local->tm_sec; - printf("Event Unix Time = %d %0d %06d\n",mRdr->evt_time,date,time); + LOG_INFO << Form("Event Unix Time = %d %0d %06d",mRdr->evt_time,date,time) << endm; StFcsDbMaker* mFcsDbMkr = static_cast(GetMaker("fcsDbMkr")); if(!mFcsDbMkr){ @@ -154,7 +154,7 @@ Int_t StFcsRawDaqReader::Make() { if(trgcmd != 4 && trgcmd !=10){ // 4=phys/ped 10=LED nskip++; nskiptot++; - if(mDebug) printf("trgcmd=%d skipping nskip=%d nskiptot=%d\n",trgcmd,nskip,nskiptot); + if(mDebug) LOG_INFO << Form("trgcmd=%d skipping nskip=%d nskiptot=%d",trgcmd,nskip,nskiptot)<trgcmd; if(trgcmd != 4 && trgcmd !=10){ // 4=phys/ped 10=LED - printf("This should not happen!!! trgcmd=%d skipping nskip=%d nskiptot=%d\n",trgcmd,nskip,nskiptot); + LOG_INFO << Form("This should not happen!!! trgcmd=%d skipping nskip=%d nskiptot=%d",trgcmd,nskip,nskiptot)<0){ @@ -209,10 +209,10 @@ Int_t StFcsRawDaqReader::Make() { dd = mRdr->det("trg")->get("raw"); int startrg=0,fcstrg=0; if(!dd){ - //printf("trg/raw not found\n"); + LOG_WARN << "trg/raw not found" << endm; }else{ while(dd->iterate()) { - uint8_t *trg_raw = dd->Byte; + u_char *trg_raw = dd->Byte; struct simple_desc { short len ; char evt_desc ; @@ -220,16 +220,16 @@ Int_t StFcsRawDaqReader::Make() { } *desc ; desc = (simple_desc *) trg_raw ; //printf("Trigger: raw bank has %d bytes: ver 0x%02X, desc %d, len %d\n",dd->ncontent,desc->ver,desc->evt_desc,desc->len); - if(desc->ver==0x46){ - TriggerDataBlk2019* trgdata2019 = (TriggerDataBlk2019*)dd->Byte; - LOG_DEBUG << "Creating StTriggerData for ver=0x46 (2019) with run="<setTriggerData((StTriggerData*)new StTriggerData2019(trgdata2019,mRun,1,mDebug)); + if(desc->ver==0x47){ + TriggerDataBlk2022* trgdata2022 = (TriggerDataBlk2022*)dd->Byte; + LOG_INFO << "Creating StTriggerData for ver=0x47 (2022) with run="<setTriggerData((StTriggerData*)new StTriggerData2022(trgdata2022,mRun,1,mDebug)); LOG_DEBUG << "Added StTriggerData to StEvent"<GetObject()); - //mTrg = mEvent->triggerData(); - //LOG_DEBUG << "Got back Dataset StTriggerData addr="<GetObject()); + mTrg = mEvent->triggerData(); + LOG_DEBUG << "Got back Dataset StTriggerData addr="<lastDSM(5); //unsigned short lastdsm4 = mTrg->lastDSM(4); @@ -247,9 +247,9 @@ Int_t StFcsRawDaqReader::Make() { LOG_DEBUG << Form("FCS TCU Bits = 0x%04x",mFcsTcuBit)<l2sum(); - startrg = (l2sum & 0xFF8000FFFFFFFFFF)?1:0; - fcstrg = (l2sum & 0x007FFF0000000000)?1:0; - LOG_DEBUG << Form("L2SUM = 0x%016llx STAR=%1d FCS=%1d",l2sum,startrg,fcstrg) << endm; + //startrg = (l2sum & 0xFF8000FFFFFFFFFF)?1:0; + //fcstrg = (l2sum & 0x007FFF0000000000)?1:0; + //LOG_DEBUG << Form("L2SUM = 0x%016llx STAR=%1d FCS=%1d",l2sum,startrg,fcstrg) << endm; }else{ printf("Unknown StTriggerData version = %x\n",desc->ver); @@ -272,8 +272,8 @@ Int_t StFcsRawDaqReader::Make() { //printf("DEPIO EHP=%1d NS=%1d DEP=%02d CH=%02d N=%d\n", // ehp,ns,dep,ch,dd->ncontent); if(ehp==3 && ns==0 && dep==0 && (ch==4 || ch==5)){ - uint32_t n=dd->ncontent; - uint16_t *d16 = (uint16_t *)dd->Void; + u_int n=dd->ncontent; + u_short *d16 = (u_short *)dd->Void; if(ch==4) mFcsDepOut += (d16[96] & 0xFF); if(ch==5) mFcsDepOut += (d16[96] & 0xFF) << 8; //for(int i=0; idet("fcs")->get(mode[mReadMode].c_str()); - if(dd){ + if(!dd){ + mFcsCollectionPtr->setDataExist(0); + }else{ + mFcsCollectionPtr->setDataExist(1); while(dd->iterate()) { int sec = ((dd->sec >> 11) & 0x1F) + 1; int rdo = ((dd->sec >> 8) & 0x7) + 1; @@ -299,12 +302,12 @@ Int_t StFcsRawDaqReader::Make() { int ns = (dd->sec >> 5) & 1; int dep = dd->row ; int ch = dd->pad ; - uint32_t n=dd->ncontent; + u_int n=dd->ncontent; int detid,id,crt,sub; mFcsDb->getIdfromDep(ehp,ns,dep,ch,detid,id,crt,sub); //printf("EHP=%1d NS=%1d DEP=%02d CH=%02d DET=%1d id=%4d\n",ehp,ns,dep,ch,detid,id); //if(ch>=32) continue; - uint16_t *d16 = (uint16_t *)dd->Void; + u_short *d16 = (u_short *)dd->Void; StFcsHit* hit=0; unsigned short tmp[1024]; if(mReadMode==0){ @@ -312,9 +315,9 @@ Int_t StFcsRawDaqReader::Make() { }else{ /* if(startrg==0 && fcstrg==1){ - for(uint32_t i=0; iadc[i].tb; - uint32_t data = dd->adc[i].adc; + for(u_int i=0; iadc[i].tb; + u_int data = dd->adc[i].adc; tmp[i*2 ]=data; tmp[i*2+1]=tb + 8; //printf("AAA %4d : %4d %4d : %4d %4d\n",i,data&0xfff,d16[i*2]&0xfff,tb,d16[i*2+1]); @@ -330,7 +333,7 @@ Int_t StFcsRawDaqReader::Make() { if(detid<6) nvaliddata++; if(mDebug){ - printf("FCS %3s : S%d:%d [det %d, ns %d, dep %d ch %d] det=%d id=%3d : size=%d : adc=", + printf("FCS %3s : S%2d:%2d [det%1d ns%1d dep%2d ch%2d] det=%d id=%3d size=%3d adc=", mode[mReadMode].c_str(),sec,rdo,ehp,ns,dep,ch,detid,id,n) ; for(unsigned int tb=0; tbnTimeBin(); tb++) printf("%4d ", hit->adc(tb)); //for(int tb=0; tb<3; tb++) printf("%4d ", hit->adc(tb)); @@ -353,7 +356,7 @@ Int_t StFcsRawDaqReader::Make() { dd = mRdr->det("stgc")->get("altro",r) ; while(dd && dd->iterate()) { //per xing and per RDO if(mDebug) printf("STGC ALTRO: stgc%02d(sec) RDO=%1d ALTRO=%03d(row) Ch=%02d(pad)\n",dd->sec,r,dd->row,dd->pad); - for(uint32_t i=0; incontent; i++) { + for(u_int i=0; incontent; i++) { if(mDebug) printf(" TB=%3d ADC=%4d",dd->adc[i].tb,dd->adc[i].adc) ; ndata++; } diff --git a/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx b/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx index 7b8780d635a..b84b2f6a04e 100644 --- a/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx +++ b/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.cxx @@ -1,3 +1,4 @@ + /* * * \class StFcsTrgQaMaker @@ -40,72 +41,87 @@ Int_t StFcsTrgQaMaker::Init(){ LOG_FATAL << "Error finding StFcsTrgSimMaker"<< endm; return kStFatal; } + fcs_trg_base* trg=mFcsTrgSimMkr->getTriggerEmu(); + if(!trg){ + LOG_FATAL << "Error finding fcs_trg_base from StFcsTrgSimMaker"<< endm; + return kStFatal; + } if(mRun>0){ int yday=mRun/1000; sprintf(mFilename,"%d/%d.trgQa.root",yday,mRun); }else if(mFilename==0){ - static char* fname = const_cast("fcs.trgqa.root"); + char* fname = "fcs.trgqa.root"; mFilename=fname; } printf("StFcsTrgQaMaker::Init - Opening %s\n",mFilename); mFile=new TFile(mFilename,"RECREATE"); - const char* cname[4]={"All","SIM","DEP","TCU"}; - for(int i=0; i<4; i++){ - mETot[i] = new TH1F(Form("ETot%s", cname[i]), Form("ETot%s", cname[i]),256,0,1024); - mHTot[i] = new TH1F(Form("HTot%s", cname[i]), Form("HTot%s", cname[i]),256,0,512); - mEHT [i] = new TH1F(Form("EHT%s", cname[i]), Form("EHT%s", cname[i]),256,0,256); - mHHT [i] = new TH1F(Form("HHT%s", cname[i]), Form("HHT%s", cname[i]),256,0,256); - mJP[0][i] = new TH1F(Form("JP2%s", cname[i]), Form("JP2%s", cname[i]),256,0,1024); - mJP[1][i] = new TH1F(Form("JP1%s", cname[i]), Form("DiJP1%s", cname[i]),256,0,1024); - - mPOR [i] = new TH1F(Form("POR%s", cname[i]), Form("POR%s", cname[i]),256,0,512); - mE4b4[i] = new TH1F(Form("E4b4%s",cname[i]), Form("E4b4%s", cname[i]),256,0,256); - mH4b4[i] = new TH1F(Form("H4b4%s",cname[i]), Form("H4b4%s", cname[i]),256,0,256); - - mSum[0][i] = new TH1F(Form("Sum%s", cname[i]), Form("E+H%s", cname[i]),256,0,256); - mEHR[0][i] = new TH1F(Form("EHR%s", cname[i]), Form("EHRatio%s", cname[i]), 64,0,1.05); - mSum[1][i] = new TH1F(Form("Had%s", cname[i]), Form("E+H%s", cname[i]),256,0,256); - mEHR[1][i] = new TH1F(Form("RHad%s",cname[i]), Form("EHRatio%s", cname[i]), 64,0,1.05); - mSum[2][i] = new TH1F(Form("EM%s", cname[i]), Form("E+H%s", cname[i]),256,0,256); - mEHR[2][i] = new TH1F(Form("REM%s", cname[i]), Form("EHRatio%s", cname[i]), 64,0,1.05); - mSum[3][i] = new TH1F(Form("Gam%s", cname[i]), Form("E+H%s", cname[i]),256,0,256); - mEHR[3][i] = new TH1F(Form("RGam%s",cname[i]), Form("EHRatio%s", cname[i]), 64,0,1.05); - mSum[4][i] = new TH1F(Form("Ele%s", cname[i]), Form("E+H%s", cname[i]),256,0,256); - mEHR[4][i] = new TH1F(Form("REle%s",cname[i]), Form("EHRatio%s", cname[i]), 64,0,1.05); - - mDEm [i] = new TH2F(Form("DEm%s", cname[i]),Form("DiEM%s", cname[i]),256,0,256,256,0,256); - mDHad[i] = new TH2F(Form("DHad%s",cname[i]),Form("DiHadron%s", cname[i]),256,0,256,256,0,256); - mDGam[i] = new TH2F(Form("DGam%s",cname[i]),Form("DiGamma%s", cname[i]),256,0,256,256,0,256); - mDEle[i] = new TH2F(Form("DEle%s",cname[i]),Form("DiElectron%s",cname[i]),256,0,256,256,0,256); - mDJP [i] = new TH2F(Form("DJP%s", cname[i]),Form("DiJP%s", cname[i]),256,0,256,256,0,256); - } - mSumTot[0] = new TH2F("SumEtot","SumEtot;E4x4+H4x4;Etot",256,0,256,256,0,1024); - mSumTot[1] = new TH2F("SumHtot","SumHtot;E4x4+H4x4;Htot",256,0,256,256,0,512); - const char* NS[2]={"N","S"}; - for(int ns=0; nsJPATHR2,trg->JPBCTHR2,trg->JPDETHR2),11,-5.5,5.5); + mJPMap[1] = new TH1F("JP1",Form("JP1 THR A=%d,BC=%d,DE=%d",trg->JPATHR1,trg->JPBCTHR1,trg->JPDETHR1),11,-5.5,5.5); + mJPMap[2] = new TH1F("JP0",Form("JP0 THR A=%d,BC=%d,DE=%d",trg->JPATHR0,trg->JPBCTHR0,trg->JPDETHR0),11,-5.5,5.5); + + mE4x4 = new TH1F("E4x4", "MAX E4x4", 256,0,256); + mEM4x4 = new TH1F("EM4x4", "MAX EM4x4", 256,0,256); + mELE4x4 = new TH1F("ELE4x4", "MAX ELE4x4", 256,0,256); + mERatio = new TH1F("EMRatio", "MAX EM Ratio=E/(E+Hmax)", 64,0,1.05); + mELERatio = new TH1F("ELERatio","MAX ELE Ratio=E/(E+Hmax)", 64,0,1.05); + + mH4x4 = new TH1F("H4x4", "MAX H4x4", 256,0,256); + mEH4x4 = new TH1F("EH4x4", "MAX E+H4x4", 256,0,256); + mHAD4x4 = new TH1F("HAD4x4", "MAX Had4x4", 256,0,256); + mHRatio = new TH1F("HRatio", "MAX E+H Ratio=E/(E+H)", 64,0,1.05); + mHADRatio = new TH1F("HADRatio","MAX Had Ratio=E/(E+H)", 64,0,1.05); + + mE4x4Map[0] = new TH2F("EM4x4MapEM2", Form("EM EM2=%d",trg->EMTHR2), 19,-9.5,9.5,15,-15.5,-0.5); + mE4x4Map[1] = new TH2F("EM4x4MapEM1", Form("EM EM1=%d",trg->EMTHR1), 19,-9.5,9.5,15,-15.5,-0.5); + mE4x4Map[2] = new TH2F("EM4x4MapEM0", Form("EM EM0=%d",trg->EMTHR0), 19,-9.5,9.5,15,-15.5,-0.5); + mE4x4Map[3] = new TH2F("EM4x4MapELE2", Form("EM ELE2=%d",trg->ELETHR2),19,-9.5,9.5,15,-15.5,-0.5); + + mELE4x4Map[0] = new TH2F("ELE4x4MapELE2",Form("ELE ELE2=%d",trg->ELETHR2), 19,-9.5,9.5,15,-15.5,-0.5); + mELE4x4Map[1] = new TH2F("ELE4x4MapELE1",Form("ELE ELE1=%d",trg->ELETHR1), 19,-9.5,9.5,15,-15.5,-0.5); + + mEH4x4Map[0] = new TH2F("EHMapHAD2", Form("E+H HAD2=%d",trg->HADTHR2), 19,-9.5,9.5,15,-15.5,-0.5); + mEH4x4Map[1] = new TH2F("EHMapHAD1", Form("E+H HAD1=%d",trg->HADTHR1), 19,-9.5,9.5,15,-15.5,-0.5); + mEH4x4Map[2] = new TH2F("EHMapHAD0", Form("E+H HAD0=%d",trg->HADTHR0), 19,-9.5,9.5,15,-15.5,-0.5); + + mDsmOut = new TH1F("DsmOut","DsmOut",33,0,33); + mDepOut = new TH1F("DepOut","DepOut",33,0,33); + mTcuBit = new TH1F("TcuBit","TcuBit",33,0,33); + mTcuDep = new TH1F("TcuDep","TcuDepMismatch",33,0,33); + mSimDep = new TH1F("SimDep","SimDepMismatch",33,0,33); + + const float maxadc=500; + mAdc[0]=new TH2F("EN_Id_Adc","EcalNorth; Id; ADC",mFcsDb->maxId(0),0.0,mFcsDb->maxId(0),500,0.0,maxadc); + mAdc[1]=new TH2F("ES_Id_Adc","EcalSouth; Id; ADC",mFcsDb->maxId(1),0.0,mFcsDb->maxId(1),500,0.0,maxadc); + mAdc[2]=new TH2F("HN_Id_Adc","HcalNorth; Id; ADC",mFcsDb->maxId(2),0.0,mFcsDb->maxId(2),500,0.0,maxadc); + mAdc[3]=new TH2F("HS_Id_Adc","HcalSouth; Id; ADC",mFcsDb->maxId(3),0.0,mFcsDb->maxId(3),500,0.0,maxadc); + mAdc[4]=new TH2F("PN_Id_Adc","PresNorth; Id; ADC",mFcsDb->maxId(4),0.0,mFcsDb->maxId(4),500,0.0,maxadc); + mAdc[5]=new TH2F("PS_Id_Adc","PresSouth; Id; ADC",mFcsDb->maxId(5),0.0,mFcsDb->maxId(5),500,0.0,maxadc); return kStOK; }; @@ -116,30 +132,6 @@ Int_t StFcsTrgQaMaker::Make() { return kStFatal; } - //Getting Trigger Data - TObjectSet *os = (TObjectSet*)GetDataSet("StTriggerData"); - StTriggerData* trgd=0; - if(os){ - trgd = (StTriggerData*)os->GetObject(); - if(trgd){ - //LOG_INFO << "got StTriggerData addr="<lastDSM(5); - - //TCU bits - for(int i=0; i<16; i++) if((tcubit >> i) & 0x1) mTcuBit->Fill(i); - - //DSM out - int dsmout=trg->dsmout; - for(int i=0; i<16; i++) if((dsmout >> i) & 0x1) mDsmOut->Fill(i); - //Getting StEvent and FcsCollection StEvent* event= (StEvent*)GetInputDS("StEvent"); StFcsCollection *fcs = 0; @@ -152,6 +144,36 @@ Int_t StFcsTrgQaMaker::Make() { LOG_INFO << "No StFcsCollection found" << endm; return kStErr; } + if(fcs->isDataExist()==0) { + LOG_INFO << "No FCS data in this event" << endm; + return kStOk; + } + //Getting Trigger Data + StTriggerData* trgd = event->triggerData(); + if(!trgd){ + TObjectSet *os = (TObjectSet*)GetDataSet("StTriggerData"); + if(os){ + trgd = (StTriggerData*)os->GetObject(); + if(trgd){ + //LOG_INFO << "got StTriggerData addr="<lastDSM(2) + (trgd->lastDSM(5)<<16); + + //TCU bits + for(int i=0; i<32; i++) if((tcubit >> i) & 0x1) mTcuBit->Fill(i); + + //DSM out + unsigned int dsmout=trg->dsmout; + for(int i=0; i<32; i++) if((dsmout >> i) & 0x1) mDsmOut->Fill(i); + mDsmOut->Fill(32); //DEP out int depout=0; @@ -164,202 +186,184 @@ Int_t StFcsTrgQaMaker::Make() { int ns = hits[i]->ns(); int dep = hits[i]->dep(); int ch = hits[i]->channel(); - //printf("DEP TRG data = %1d %1d %02d %02d\n",ehp,ns,dep,ch); - if(ehp!=3) continue; - if(ns!=0) continue; - if(dep!=0) continue; - if(ch==4 || ch==5){ + if(ehp!=3) continue; //DEPIO boards only + if(dep==0 && (ch==4 || ch==5) ){ //stage3 DEP to TCU int ntb = hits[i]->nTimeBin(); for(int j=0; jadc(j); unsigned short tb = hits[i]->timebin(j); - //if(tb>=96-8 && tb<=96+8) - //if(tb>=96-8){ - if(0){ - printf("DEPIO data = d%1d ns%1d dep%2d ch%2d tb%3d 0x%x",ehp,ns,dep,ch,tb,adc); - if(ch==5 && (adc&0x1)) printf(" ELE2"); - printf("\n");; - } + //printf("DEPIO3 data = ehp%1d ns%1d dep%2d ch%2d tb%3d 0x%x\n",ehp,ns,dep,ch,tb,adc); if(tb!=mS3off) continue; if(ch==4) depout += adc; if(ch==5) depout += (adc << 8); + } + } + if(dep==1 && ch==36){ //stage2 north/south DEP to TCU + int ntb = hits[i]->nTimeBin(); + for(int j=0; jadc(j); + unsigned short tb = hits[i]->timebin(j); + //printf("DEPIO2 data = ehp%1d ns%1d dep%02d ch%02d tb%03d 0x%x\n",ehp,ns,dep,ch,tb,adc); + if(tb!=mS2off) continue; + if(ns==0) depout += (adc&0xff) << 16; + if(ns==1) depout += (adc&0xff) << 24; } - } + } + } + for(int i=0; i<32; i++) if((depout >> i) & 0x1) mDepOut->Fill(i); + + const char* BIT[32]={"HAD0","HAD1","HAD2", + "EM0","EM1","EM2", + "JP2","JPA1","JPBC1","JPDE1","JPA0","JPBC0","JPDE0", + "DiJP","DiJPAsy","DiELEA", + "ELE0-N","ELE1-N","ELE2-N","EM3-N","EHT-N","HHT-N","ETOT-N","HTOT-N", + "ELE0-S","ELE1-S","ELE2-S","EM3-S","EHT-S","HHT-S","ETOT-S","HTOT-S"}; + if(GetDebug()){ + LOG_INFO << Form("FCSBits SIM = %08x ",dsmout); + for(int i=0; i<32; i++){ if((dsmout>>i)&1) {LOG_INFO << BIT[i] << " ";} } LOG_INFO<>i)&1) {LOG_INFO << BIT[i] << " ";} } LOG_INFO<>i)&1) {LOG_INFO << BIT[i] << " ";} } LOG_INFO<> i) & 0x1) mDepOut->Fill(i); //Mismatch - for(int i=0; i<16; i++) if((depout >> i) != (tcubit >> i)) mTcuDep->Fill(i); - for(int i=0; i<16; i++) if((depout >> i) != (dsmout >> i)) mSimDep->Fill(i); + LOG_INFO << Form("FCSBitsMM DEP-TCU Mismatch "); + for(int i=0; i<32; i++) if(((depout>> i)&1) != ((tcubit>>i)&1)) {mTcuDep->Fill(i); LOG_INFO << BIT[i] << " ";} + LOG_INFO<>i)&1) != ((depout>>i)&1)) {mSimDep->Fill(i); LOG_INFO << BIT[i] << " ";} + LOG_INFO<numberOfHits(det); + StSPtrVecFcsHit& hits = fcs->hits(det); + for (int i=0; iid(); + int ehp = hits[i]->ehp(); + int ns = hits[i]->ns(); + int c = mFcsDb->getColumnNumber(det,id); + int r = mFcsDb->getRowNumber(det,id); + float cc = c * (ns*2-1); + float rr = - r; + mTow[ehp]->Fill(cc,rr,hits[i]->energy()); + } + } unsigned int max; int maxns,maxc,maxr; - + int maxns2,maxc2,maxr2; + int maxns3,maxc3,maxr3; + int maxns4,maxc4,maxr4; + int maxns5,maxc5,maxr5; //Ecal HT 2x2 - max=0; for(int ns=0; nse2x2[ns][r][c]>max){ //find max Ecal 2x2 - max=trg->e2x2[ns][r][c]; maxns=ns; maxr=r; maxc=c; + max=trg->e2x2[ns][r][c]; maxr=r; maxc=c; } } } + if(max>0){ + mEHT[ns]->Fill(max); + mEHTMap->Fill((maxc+1)*(ns*2-1),-maxr-1); + } } - mEHT[0]->Fill(max); - if((dsmout>>0)&0x1) mEHT[1]->Fill(max); - if((depout>>0)&0x1) mEHT[2]->Fill(max); - if((tcubit>>0)&0x1) mEHT[3]->Fill(max); //Hcal HT 2x2 - max=0; for(int ns=0; nsh2x2[ns][r][c]>max){ //find max Hcal 2x2 - max=trg->h2x2[ns][r][c]; maxns=ns; maxr=r; maxc=c; + max=trg->h2x2[ns][r][c]; maxr=r; maxc=c; } } } + if(max>0){ + mHHT[ns]->Fill(max); + mHHTMap->Fill((maxc+1)*(ns*2-1),-maxr-1); + } } - mHHT[0]->Fill(max); - if((dsmout>>1)&0x1) mHHT[1]->Fill(max); - if((depout>>1)&0x1) mHHT[2]->Fill(max); - if((tcubit>>1)&0x1) mHHT[3]->Fill(max); //Ecal Tot - max=trg->etot[0]; - if(trg->etot[1] > max) max=trg->etot[1]; - mETot[0]->Fill(max); - if((dsmout>>2)&0x1) mETot[1]->Fill(max); - if((depout>>2)&0x1) mETot[2]->Fill(max); - if((tcubit>>2)&0x1) mETot[3]->Fill(max); + mETot[0]->Fill(trg->etot[0]); + mETot[1]->Fill(trg->etot[1]); //Hcal Tot - max=trg->htot[0]; - if(trg->htot[1] > max) max=trg->htot[1]; - mHTot[0]->Fill(max); - if((dsmout>>3)&0x1) mHTot[1]->Fill(max); - if((depout>>3)&0x1) mHTot[2]->Fill(max); - if((tcubit>>3)&0x1) mHTot[3]->Fill(max); + mHTot[0]->Fill(trg->htot[0]); + mHTot[1]->Fill(trg->htot[1]); //JP - max=0; for(int ns=0; nsjet[ns][r]>max){ //find max JP - max=trg->jet[ns][r]; maxns=ns; maxr=r; - } + for(int j=0; j<5; j++){ + if(trg->jet[ns][j]>max){ //find max JP + mJP[ns][j]->Fill(trg->jet[ns][j]); + if((trg->d_out.s2[ns].s2_to_s3[0].d[1]>>j)&0x1) mJPMap[0]->Fill((j+1)*(ns*2-1)); + if((trg->d_out.s2[ns].s2_to_s3[1].d[1]>>j)&0x1) mJPMap[1]->Fill((j+1)*(ns*2-1)); + if((trg->d_out.s2[ns].s2_to_s3[0].d[2]>>j)&0x1) mJPMap[2]->Fill((j+1)*(ns*2-1)); + } } - } - mJP[0][0]->Fill(max); - if((dsmout>>4)&0x1) mJP[0][1]->Fill(max); - if((depout>>4)&0x1) mJP[0][2]->Fill(max); - if((tcubit>>4)&0x1) mJP[0][3]->Fill(max); - mJP[1][0]->Fill(max); - if((dsmout>>9)&0x1) mJP[1][1]->Fill(max); - if((depout>>9)&0x1) mJP[1][2]->Fill(max); - if((tcubit>>9)&0x1) mJP[1][3]->Fill(max); - - //ecal 4x4 - max=0; + } + + //Ecal 4x4 for(int ns=0; nsesum[ns][r][c]>max){ //find max Ecal 4x4 - max=trg->esum[ns][r][c]; maxns=ns; maxr=r; maxc=c; + int esum=trg->esum[ns][r][c]; + int sum=trg->sum[ns][r][c]; + if(esum>max){ //find max Ecal 4x4 + max=esum; maxns=ns; maxr=r; maxc=c; } - } - } - } - mE4b4[0]->Fill(max); - - //Fill only for max ecal 4x4 - if(max>0){ - int id=maxr*kFcsEcal4x4NCol + maxc; - float pt=max*mPtCh; - mEcal[maxns]->Fill(id,pt); - if(pt>mEcalPtThr){ - mEcalNorm[maxns]->Fill(id); - for(int dep=0; dep<6; dep++){ - for(int ch=0; ch<32; ch++){ - if(trg->phit[maxns][dep][ch]>0){ - int idp=dep*32 + ch; - mEPmap[maxns]->Fill(id,idp); - } + if(esum>emmax && trg->ratiomax[ns][r][c] > 1.0/(1.0+(float)trg->EM_HERATIO_THR/128)){ + emmax=esum; maxns2=ns; maxr2=r; maxc2=c; } - } - } - } - - //hcal - max=0; - for(int ns=0; nshsum[ns][r][c]==0) continue; - int id=r*kFcsHcal4x4NCol + c; - mHcal[ns]->Fill(id,trg->hsum[ns][r][c]*0.0316); - if(trg->hsum[ns][r][c]>max){ //find max Ecal 4x4 - max=trg->esum[ns][r][c]; maxns=ns; maxr=r; maxc=c; + if(esum>elemax && trg->ratiomax[ns][r][c] > 1.0/(1.0+(float)trg->EM_HERATIO_THR/128) && trg->epdcoin[ns][r][c]){ + elemax=esum; maxns3=ns; maxr3=r; maxc3=c; } - } - } - } - mH4b4[0]->Fill(max); - - //Pres ADC - max=0; - for(int ns=0; nspadc[ns][dep][ch]>0){ - int idp=dep*32 + ch; - mPres[ns]->Fill(idp,trg->padc[ns][dep][ch]/150.0); + if(sum>summax){ + summax=sum; maxns4=ns; maxr4=r; maxc4=c; } - if(trg->padc[ns][dep][ch]>max){ //find max Ecal 4x4 - max=trg->padc[ns][dep][ch]; maxns=ns; maxr=dep; maxc=ch; + if(sum>hadmax && trg->ratio[ns][r][c] < 1.0/(1.0+(float)trg->HAD_HERATIO_THR/128)){ + hadmax=sum; maxns5=ns; maxr5=r; maxc5=c; } - } - } - } - mPOR[0]->Fill(max); - - //ecal+hcal 4x4 - max=0; - for(int ns=0; nssum[ns][r][c]>max){ //find max Ecal 4x4 - max=trg->sum[ns][r][c]; maxns=ns; maxr=r; maxc=c; + int cc=(c+1)*(ns*2-1); + int rr=-r-1; + if(esum > trg->EMTHR2) mE4x4Map[0]->Fill(cc,rr); + if(esum > trg->EMTHR1) mE4x4Map[1]->Fill(cc,rr); + if(esum > trg->EMTHR0) mE4x4Map[2]->Fill(cc,rr); + if(esum > trg->ELETHR2) mE4x4Map[3]->Fill(cc,rr); + if(trg->epdcoin[ns][r][c]){ + if(esum > trg->ELETHR2) mELE4x4Map[0]->Fill(cc,rr); + if(esum > trg->ELETHR1) mELE4x4Map[1]->Fill(cc,rr); } + if(sum > trg->HADTHR2) mEH4x4Map[0]->Fill(cc,rr); + if(sum > trg->HADTHR1) mEH4x4Map[1]->Fill(cc,rr); + if(sum > trg->HADTHR0) mEH4x4Map[2]->Fill(cc,rr); } } - } - if(max>0){ - mSum[0][0]->Fill(max); - mSumTot[0]->Fill(max,trg->etot[maxns]); - mSumTot[1]->Fill(max,trg->htot[maxns]); - mEHR[0][0]->Fill(trg->ratio[maxns][maxr][maxc]); - if(trg->had[maxns][maxr][maxc]){ - mSum[1][0]->Fill(max); - mEHR[1][0]->Fill(trg->ratio[maxns][maxr][maxc]); - } - if(trg->em[maxns][maxr][maxc]){ - mSum[2][0]->Fill(max); - mEHR[2][0]->Fill(trg->ratio[maxns][maxr][maxc]); - if(trg->epdcoin[maxns][maxr][maxc]==0){ - mSum[3][0]->Fill(max); - mEHR[3][0]->Fill(trg->ratio[maxns][maxr][maxc]); - } - if(trg->epdcoin[maxns][maxr][maxc]==1){ - mSum[4][0]->Fill(max); - mEHR[4][0]->Fill(trg->ratio[maxns][maxr][maxc]); - } - } + if(max>0) mE4x4->Fill(max); + if(emmax>0) mEM4x4->Fill(emmax); + if(elemax>0) mELE4x4->Fill(elemax); + if(summax>0) mEH4x4->Fill(summax); + if(hadmax>0) mHAD4x4->Fill(summax); + if(max>0) mERatio->Fill(trg->ratiomax[maxns][maxr][maxc]); + if(elemax>0) mELERatio->Fill(trg->ratiomax[maxns3][maxr3][maxc3]); + if(summax>0) mHRatio->Fill(trg->ratio[maxns4][maxr4][maxc4]); + if(hadmax>0) mHADRatio->Fill(trg->ratio[maxns5][maxr5][maxc5]); } + + for(int det=0; dethits(det); + int nh=fcs->numberOfHits(det); + for(int i=0; iFill(hits[i]->id(),(float)hits[i]->adcSum()); + } + return kStOK; }; diff --git a/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.h b/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.h index 84b6ec44d3c..7ead1958a63 100644 --- a/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.h +++ b/StRoot/StSpinPool/StFcsTrgQaMaker/StFcsTrgQaMaker.h @@ -30,6 +30,7 @@ class StFcsTrgQaMaker : public StMaker { void setPtCh(float v) {mPtCh=v;} void setEcalPtThr(float v) {mEcalPtThr=v;} void setS3off(int v) {mS3off=v;} + void setS2off(int v) {mS2off=v;} protected: @@ -41,33 +42,47 @@ class StFcsTrgQaMaker : public StMaker { int mRun=0; float mPtCh=0.0316; float mEcalPtThr=1.5; - int mS3off=96; - - TH1F* mETot[4]; - TH1F* mHTot[4]; - TH1F* mEHT[4]; - TH1F* mHHT[4]; - TH1F* mJP[2][4]; - - TH1F* mE4b4[4]; - TH1F* mH4b4[4]; - TH1F* mPOR[4]; - - TH1F* mSum[5][4]; - TH1F* mEHR[5][4]; - TH2F* mSumTot[2]; - - TH2F* mDEm[4]; - TH2F* mDHad[4]; - TH2F* mDGam[4]; - TH2F* mDEle[4]; - TH2F* mDJP[4]; - - TH2F* mEcal[kFcsNorthSouth]; - TH2F* mHcal[kFcsNorthSouth]; - TH2F* mPres[kFcsNorthSouth]; - TH2F* mEPmap[kFcsNorthSouth]; - TH1F* mEcalNorm[kFcsNorthSouth]; + + //marker.adc_start = 7 + //marker.s1_out_start = marker.adc_start + 11 = 18 + //marker.s2_in_start = marker.s1_out_start + 2 = 20 + //marker.s2_to_s3_start = marker.s2_in_start + 15 = 35 + //marker.s3_in_start = marker.s2_to_s3_start + 8 = 43 + //marker.dsm_out_start=marker.s3_in_start + 14 = 57 + //So... DEPIO DSM out is 50 tb later than ADC + //center trig tb=50 => tb=47~54 and 47=marker.adc_start(7)+5xing*8tb/xing + //Thus.... mS3off=47+50 = 97 + int mS3off=97; + int mS2off=97; //Tonko says same as S3off + + TH2F* mTow[2]; + + TH1F* mETot[2]; + TH1F* mHTot[2]; + + TH1F* mEHT[2]; + TH2F* mEHTMap; + TH1F* mHHT[2]; + TH2F* mHHTMap; + + TH1F* mJP[2][5]; + TH1F* mJPMap[3]; + + TH1F* mE4x4; + TH1F* mEM4x4; + TH1F* mELE4x4; + TH1F* mERatio; + TH1F* mELERatio; + + TH1F* mH4x4; + TH1F* mEH4x4; + TH1F* mHAD4x4; + TH1F* mHRatio; + TH1F* mHADRatio; + + TH2F* mE4x4Map[4]; + TH2F* mELE4x4Map[2]; + TH2F* mEH4x4Map[3]; TH1F* mDsmOut; TH1F* mDepOut; @@ -75,6 +90,8 @@ class StFcsTrgQaMaker : public StMaker { TH1F* mTcuDep; TH1F* mSimDep; + TH2F* mAdc[3]; + ClassDef(StFcsTrgQaMaker,1); }; diff --git a/StRoot/StSpinPool/StFcsTriggerSimMaker/StFcsTriggerSimMaker.cxx b/StRoot/StSpinPool/StFcsTriggerSimMaker/StFcsTriggerSimMaker.cxx index cd58c43b242..1ffeebf0de8 100644 --- a/StRoot/StSpinPool/StFcsTriggerSimMaker/StFcsTriggerSimMaker.cxx +++ b/StRoot/StSpinPool/StFcsTriggerSimMaker/StFcsTriggerSimMaker.cxx @@ -50,6 +50,16 @@ #include "StRoot/RTS/src/TRG_FCS/fcs_trg_base.h" +#include "StMaker.h" +#include "StChain.h" +#include "StMuDSTMaker/COMMON/StMuDst.h" +#include "StMuDSTMaker/COMMON/StMuEvent.h" +#include "StMuDSTMaker/COMMON/StMuFcsCollection.h" +#include "StMuDSTMaker/COMMON/StMuFcsHit.h" +#include "StMuDSTMaker/COMMON/StMuTypes.hh" +#include "StMuDSTMaker/COMMON/StMuEvent.h" +#include "StMuDSTMaker/COMMON/StMuFcsCollection.h" + namespace { enum {kMaxNS=2, kMaxDet=3, kMaxDep=24, kMaxCh=32, kMaxEcalDep=24, kMaxHcalDep=8, kMaxPresDep=4, kMaxLink2=2}; uint32_t fcs_trg_sim_adc[kMaxNS][kMaxDet][kMaxDep][kMaxCh] ; @@ -184,17 +194,17 @@ int StFcsTriggerSimMaker::InitRun(int runNumber){ mTree->Branch("trg",&mTrg,"trg/I"); } if(mQaHistFilename){ - mQaHistFile=new TFile(mQaHistFilename,"RECREATE"); - mTrgRate = new TH1F("FcsTrgRate","FcsTrgRate",mNTRG+1,0,mNTRG+1); + mQaHistFile=new TFile(mQaHistFilename,"RECREATE"); + mTrgRate = new TH1F("FcsTrgRate","FcsTrgRate",mNTRG+1,0,mNTRG+1); } //Write Text event file & gainfile FILE* gainfile=0; FILE* gainfile2=0; if(mFilename){ - mFile = fopen(mFilename,"w"); - gainfile=fopen("fcs_et_gain.txt","w"); - gainfile2=fopen("fcs_et_gain2.txt","w"); + mFile = fopen(mFilename,"w"); + gainfile=fopen("fcs_et_gain.txt","w"); + gainfile2=fopen("fcs_et_gain2.txt","w"); } //Fill ETgain, GainCorr and Pedestal @@ -266,11 +276,27 @@ int StFcsTriggerSimMaker::Finish(){ } int StFcsTriggerSimMaker::Make(){ - StEvent* event = (StEvent*)GetInputDS("StEvent"); - if(!event) {LOG_ERROR << "StFcsTriggerSimMaker::Make did not find StEvent"<fcsCollection(); - if(!mFcsColl) {LOG_ERROR << "StFcsTriggerSimMaker::Make did not find StEvent->StFcsCollection"<StFcsCollection"<start_event(); //Feed ADC @@ -279,35 +305,40 @@ int StFcsTriggerSimMaker::Make(){ memset(fcs_trg_sim_adc,0,sizeof(fcs_trg_sim_adc)); int n=0; for(int det=0; det<=kFcsNDet; det++){ - StSPtrVecFcsHit& hits = mFcsColl->hits(det); - int ns = mFcsDb->northSouth(det); - int ehp = mFcsDb->ecalHcalPres(det); - int nh = mFcsColl->numberOfHits(det); - for(int i=0; idep(); - unsigned short ch = hit->channel(); - //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){ - int ntb=hit->nTimeBin(); - for(int t=0; ttimebin(t); - if(tb>=mTrgTimebin-3 && tb<=mTrgTimebin+4){ - data[tb-mTrgTimebin+3] = hit->adc(t); - //printf("tb=%3d i=%2d adc=%4d\n",tb,tb-mTrgTimebin+3,hit->adc(t)); - } - } - mTrgSim->fill_event(ehp,ns,dep,ch,data,8) ; - }else{ - 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)); - n++; - } + + int ns = mFcsDb->northSouth(det); + int ehp = mFcsDb->ecalHcalPres(det); + + if((event)&&(mFcsColl)){ + StSPtrVecFcsHit& hits = mFcsColl->hits(det); + + int nh = mFcsColl->numberOfHits(det); + + for(int i=0; ichannel(); + + if(ehp<0 || ch>=32) continue; + feedADC(hit, ns, ehp, data); + n++; + } + + }else if((muevent)&&(mMuFcsColl)){ //Use StMuDst info instead of StEvent for Trigger Reconstruction + + int nh = mMuFcsColl->numberOfHits(det); + int det_hit_index = mMuFcsColl->indexOfFirstHit(det); + + for(int i=0; igetHit(hit_index); + unsigned short ch = hit->channel(); + + if(ehp<0 || ch>=32) continue; + feedADC(hit, ns, ehp, data); + n++; + } + } } if(mFile) fprintf(mFile,"%2d %2d %2d %2d %5d\n",-1,0,0,0,0); LOG_INFO << Form("StFcsTriggerSimMaker feeded %d hits",n) << endm;; @@ -315,7 +346,7 @@ int StFcsTriggerSimMaker::Make(){ //Run Trigger Simulation // uint16_t dsm_out = fcs_trg_run(mTrgSelect, mDebug); uint32_t dsm_out = mTrgSim->end_event(); - + //QA Tree mFlt=0; StarPrimaryMaker* pmkr= static_cast(GetMaker("PrimaryMaker")); @@ -327,7 +358,7 @@ int StFcsTriggerSimMaker::Make(){ } mTcu=dsm_out; if(mQaTreeFile) mTree->Fill(); - + //Results LOG_INFO << Form("Output to TCU = 0x%08x Filter=0x%08x",mTcu,mFlt)<Fill(mNTRG); NTRG[mNTRG]++; - for(int i=0; iFill(i); - NTRG[i]++; - } + for(int i=0; iFill(i); + NTRG[i]++; + } } - + LOG_INFO << "Triggers = "; for(int i=0; i void StFcsTriggerSimMaker::feedADC(T* hit, int ns, int ehp, uint16_t data_array[]){ + + unsigned short dep = hit->dep(); + unsigned short ch = hit->channel(); + +// printf("ns=%1d ehp=%1d dep=%2d ch=%2d adc=%4d sim=%d\n",ns,ehp,dep,ch,hit->adc(0),mSimMode); + fcs_trg_sim_adc[ns][ehp][dep][ch] = hit->adc(0); + if(mSimMode==0){ + int ntb=hit->nTimeBin(); + for(int t=0; ttimebin(t); + if(tb>=mTrgTimebin-3 && tb<=mTrgTimebin+4){ + data_array[tb-mTrgTimebin+3] = hit->adc(t); +// printf("tb=%3d i=%2d adc=%4d\n",tb,tb-mTrgTimebin+3,hit->adc(t)); + } + } + mTrgSim->fill_event(ehp,ns,dep,ch,data_array,8) ; + }else{ + data_array[1] = hit->adc(0)-1; //removing 1 to add at tb6 + data_array[6] = 1; //add this so tb6>tb7 + mTrgSim->fill_event(ehp,ns,dep,ch,data_array,8) ; + } + if(mFile) fprintf(mFile,"%2d %2d %2d %2d %5d\n",ns,ehp,dep,ch,hit->adc(0)); + +} diff --git a/StRoot/StSpinPool/StFcsTriggerSimMaker/StFcsTriggerSimMaker.h b/StRoot/StSpinPool/StFcsTriggerSimMaker/StFcsTriggerSimMaker.h index 306e759a37a..9d5fec4f7e6 100644 --- a/StRoot/StSpinPool/StFcsTriggerSimMaker/StFcsTriggerSimMaker.h +++ b/StRoot/StSpinPool/StFcsTriggerSimMaker/StFcsTriggerSimMaker.h @@ -8,15 +8,19 @@ #define STAR_StFcsTriggerSimMaker_HH #include "StMaker.h" +#include class StFcsDb; class StFcsCollection; +class StMuFcsCollection; class TFile; class fcs_trg_base; class link_t; class geom_t; class TTree; class TH1F; +class StFcsHit; +class StMuFcsHit; class StFcsTriggerSimMaker : public StMaker{ public: @@ -42,6 +46,8 @@ class StFcsTriggerSimMaker : public StMaker{ void setEtGain(float v) {mEtFactor=v;} fcs_trg_base* getTriggerEmu() {return mTrgSim;} + + template void feedADC(T* hit, int ns, int ehp, uint16_t data_array[]); //this is for just running stage2 from macro void runStage2(link_t ecal[], link_t hcal[], link_t pres[], geom_t &geo, link_t output[]); @@ -49,6 +55,8 @@ class StFcsTriggerSimMaker : public StMaker{ private: StFcsDb* mFcsDb=0; StFcsCollection* mFcsColl=0; + StMuFcsCollection* mMuFcsColl = 0; + int mTrgSelect=0; int mDebug=0; char* mFilename=0; diff --git a/StRoot/StiCA/StiCATpcSeedFinder.cxx b/StRoot/Sti/StiCATpcSeedFinder.cxx similarity index 97% rename from StRoot/StiCA/StiCATpcSeedFinder.cxx rename to StRoot/Sti/StiCATpcSeedFinder.cxx index 575a487efb8..eeefe44b25c 100644 --- a/StRoot/StiCA/StiCATpcSeedFinder.cxx +++ b/StRoot/Sti/StiCATpcSeedFinder.cxx @@ -192,5 +192,3 @@ StiDebug::Count("Reused_Pct",reUsed, pct); } mEnded = 3; return 0; } -//________________________________________________________________________________ -StiCATpcSeedFinder* StiCALoader::New() { return new StiCATpcSeedFinder;} diff --git a/StRoot/StiCA/StiCATpcSeedFinder.h b/StRoot/Sti/StiCATpcSeedFinder.h similarity index 91% rename from StRoot/StiCA/StiCATpcSeedFinder.h rename to StRoot/Sti/StiCATpcSeedFinder.h index daf0a0bda8f..e300cbfcf18 100644 --- a/StRoot/StiCA/StiCATpcSeedFinder.h +++ b/StRoot/Sti/StiCATpcSeedFinder.h @@ -42,12 +42,4 @@ class StiCATpcSeedFinder: public StiTrackFinder std::vector *mSeeds; }; -class StiCALoader { -public: -static StiCATpcSeedFinder* New(); -#if 0 -ClassDef(StiCALoader,0) -#endif -}; - #endif diff --git a/StRoot/StiCA/StiCATpcTrackerInterface.cxx b/StRoot/Sti/StiCATpcTrackerInterface.cxx similarity index 100% rename from StRoot/StiCA/StiCATpcTrackerInterface.cxx rename to StRoot/Sti/StiCATpcTrackerInterface.cxx diff --git a/StRoot/StiCA/StiCATpcTrackerInterface.h b/StRoot/Sti/StiCATpcTrackerInterface.h similarity index 100% rename from StRoot/StiCA/StiCATpcTrackerInterface.h rename to StRoot/Sti/StiCATpcTrackerInterface.h diff --git a/StRoot/Sti/StiDefaultToolkit.cxx b/StRoot/Sti/StiDefaultToolkit.cxx index 7851fea4aac..8e203daceb3 100644 --- a/StRoot/Sti/StiDefaultToolkit.cxx +++ b/StRoot/Sti/StiDefaultToolkit.cxx @@ -390,6 +390,7 @@ #include "Sti/StiDefaultTrackFilter.h" #include "Sti/StiDetectorGroup.h" #include "Sti/StiDetectorGroups.h" +#include "Sti/StiCATpcSeedFinder.h" #include "StDetectorDbMaker/StiHitErrorCalculator.h" #include "StiTpc/StiTpcHitLoader.h" #include "StiSvt/StiSvtHitLoader.h" @@ -639,11 +640,7 @@ StiTrackFinder * StiDefaultToolkit::getTrackSeedFinderKNN() //______________________________________________________________________________ StiTrackFinder * StiDefaultToolkit::getTrackSeedFinderCA() { - gSystem->Load("TPCCATracker"); - gSystem->Load("StiCA"); - auto *mySeed = (StiTrackFinder*)gROOT->ProcessLineFast("StiCALoader::New()"); - assert(mySeed); - return mySeed; + return new StiCATpcSeedFinder(); } //______________________________________________________________________________ diff --git a/StRoot/Sti/StiMasterDetectorBuilder.cxx b/StRoot/Sti/StiMasterDetectorBuilder.cxx index 8f146366e14..0c8aca51886 100644 --- a/StRoot/Sti/StiMasterDetectorBuilder.cxx +++ b/StRoot/Sti/StiMasterDetectorBuilder.cxx @@ -25,7 +25,6 @@ void StiMasterDetectorBuilder::build(StMaker&source) { if (! gGeoManager) StiVMCToolKit::GetVMC(); - TGeoManager *gGeoManagerSV = gGeoManager; gGeoManager = 0; StMaker *chain=StMaker::GetChain(); LOG_INFO << "We are StiMasterDetectorBuilder::build() and will clone the geometry if exists" << endm; @@ -35,12 +34,6 @@ void StiMasterDetectorBuilder::build(StMaker&source) } #if 1 - if ( gGeoManagerSV ){ - LOG_INFO << "Create a clone of VmcGeometry for reconstruction" << endm; - gGeoManagerSV->Clone("CloneGeom"); - } else { - LOG_INFO << "Could not get a pointer to gGeoManager " << endm; - } #else if ( chain ) { LOG_INFO << "StiMasterDetectorBuilder::build() : Create clone of VmcGeometry by reinitialization for reconstruction" <>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> WHY IS THIS COMMENTED OUT??? void AgBlock::Inherit() { diff --git a/StarVMC/StarAgmlLib/AgBlock.h b/StarVMC/StarAgmlLib/AgBlock.h index 653b60e9510..be59cca0b61 100644 --- a/StarVMC/StarAgmlLib/AgBlock.h +++ b/StarVMC/StarAgmlLib/AgBlock.h @@ -153,7 +153,7 @@ class AgBlock : public TNamed int numberBranches() const { return mNumberBranches; } void branch(){ mNumberBranches++; } - void AddCut( TString cut, double value ){ mGstpar[cut] = value; } + void AddCut( TString cut, double value ); std::map& GetCuts() { return mGstpar; } private: diff --git a/StarVMC/StarAgmlLib/AgMLExtension.cxx b/StarVMC/StarAgmlLib/AgMLExtension.cxx index 5287b9bdb3f..de85e142434 100644 --- a/StarVMC/StarAgmlLib/AgMLExtension.cxx +++ b/StarVMC/StarAgmlLib/AgMLExtension.cxx @@ -13,3 +13,5 @@ AgMLExtension::AgMLExtension() : TGeoRCExtension(), { Grab(); } + +void AgMLExtension::AddCut( TString cut, double value ){ mGstpar[cut] = value; } diff --git a/StarVMC/StarAgmlLib/AgMLExtension.h b/StarVMC/StarAgmlLib/AgMLExtension.h index 3d1d0bbef11..e379749d116 100644 --- a/StarVMC/StarAgmlLib/AgMLExtension.h +++ b/StarVMC/StarAgmlLib/AgMLExtension.h @@ -57,7 +57,7 @@ class AgMLExtension : public TGeoRCExtension { std::vector GetUserHits(){ return mHitScoring; } - void AddCut( TString cut, double value ){ mGstpar[cut] = value; } + void AddCut( TString cut, double value ); std::map& GetCuts() { return mGstpar; } diff --git a/StarVMC/StarAgmlLib/AgModule.cxx b/StarVMC/StarAgmlLib/AgModule.cxx index 95c41d06912..29465ba7618 100644 --- a/StarVMC/StarAgmlLib/AgModule.cxx +++ b/StarVMC/StarAgmlLib/AgModule.cxx @@ -25,6 +25,8 @@ TDataSet *AgModule::Geom() else return mGeomSet; }; +void AgModule::AddHitScoring( TString name, AgMLScoring* sc ){ mHitScoring[name] = sc; } + // --------------------------------------------------------------------------------------------- AgBlock *AgModule::AddBlock( const Char_t *name, AgBlock *_block ) { diff --git a/StarVMC/StarAgmlLib/AgModule.h b/StarVMC/StarAgmlLib/AgModule.h index dd0f3f5a1f6..c69e5a3d61d 100644 --- a/StarVMC/StarAgmlLib/AgModule.h +++ b/StarVMC/StarAgmlLib/AgModule.h @@ -40,7 +40,7 @@ class AgModule : public AgBlock void SetTrackingFlag( int flag ){ mTrackingFlag = flag; } int GetTrackingFlag(){ return mTrackingFlag; } - void AddHitScoring( TString name, AgMLScoring* sc ){ mHitScoring[name] = sc; } + void AddHitScoring( TString name, AgMLScoring* sc ); std::map GetHitScoring(){ return mHitScoring; } private: diff --git a/StarVMC/StarAgmlLib/AgShape.cxx b/StarVMC/StarAgmlLib/AgShape.cxx index 66a0fd26a38..5ca97db14c9 100644 --- a/StarVMC/StarAgmlLib/AgShape.cxx +++ b/StarVMC/StarAgmlLib/AgShape.cxx @@ -626,6 +626,8 @@ Bool_t AgShape::morphed() return true; // No shapes match } +std::vector< TString > &AgShape::parList(){ return mParList[mId]; } + // ============================================================================================================= Bool_t AgShape::parameterized() { diff --git a/StarVMC/StarAgmlLib/AgShape.h b/StarVMC/StarAgmlLib/AgShape.h index 63ab9a840a5..a58c8e9f7e0 100644 --- a/StarVMC/StarAgmlLib/AgShape.h +++ b/StarVMC/StarAgmlLib/AgShape.h @@ -67,7 +67,7 @@ class AgShape : public TNamed, public AgParameterList Bool_t morphed(); /// Return a list of the parameters which define this shape - std::vector< TString > &parList(){ return mParList[mId]; } + std::vector< TString > &parList(); /// Returns true if the shape's parameters are to be set /// when positioned diff --git a/StarVMC/StarAgmlLib/StarAgmlStacker.cxx b/StarVMC/StarAgmlLib/StarAgmlStacker.cxx index 0e1bc6d1c07..a79aebeb2bd 100644 --- a/StarVMC/StarAgmlLib/StarAgmlStacker.cxx +++ b/StarVMC/StarAgmlLib/StarAgmlStacker.cxx @@ -129,6 +129,12 @@ TString StarAgmlStacker::realname( TString nname ) return mRealnames[nname]; } + +const std::vector &StarAgmlStacker::nicknames(const Char_t *name) +{ + return mNicknames[ TString(name) ]; +} + // --------------------------------------------------------------------------------------------------- void StarAgmlStacker::Debug( const Char_t *name, const Char_t *flag ) { diff --git a/StarVMC/StarAgmlLib/StarAgmlStacker.h b/StarVMC/StarAgmlLib/StarAgmlStacker.h index ea323dbaed6..809b6496682 100644 --- a/StarVMC/StarAgmlLib/StarAgmlStacker.h +++ b/StarVMC/StarAgmlLib/StarAgmlStacker.h @@ -35,10 +35,7 @@ class StarAgmlStacker : public TNamed virtual Bool_t SearchVolume( const AgShape &shape, const AgAttribute &attr )=0; - const std::vector &nicknames(const Char_t *name) - { - return mNicknames[ TString(name) ]; - } + const std::vector &nicknames(const Char_t *name); void Debug( const Char_t *name, const Char_t *flag="position" ); diff --git a/mgr/Conscript-standard b/mgr/Conscript-standard index 0df341f33a7..db1f9b9204b 100644 --- a/mgr/Conscript-standard +++ b/mgr/Conscript-standard @@ -895,7 +895,7 @@ if ( $pkg !~ /^sim$/ && $pkg !~ /^gen$/ ) { $CPPPATH = "#StarVMC" . $main::PATH_SEPARATOR . $CPPPATH; # print "StarVMC change CPPPATH to $CPPPATH =========\n"; - } elsif ($pkg eq "TPCCATracker" or $pkg eq "StiCA") { + } elsif ($pkg eq "TPCCATracker" or $pkg eq "Sti") { $CPPPATH .= $main::PATH_SEPARATOR . "#" . $Dir . $main::PATH_SEPARATOR . "#" . $Dir . "/code"; diff --git a/mgr/Dyson/Export/AgROOT.py b/mgr/Dyson/Export/AgROOT.py index 314ecc42791..8934d724515 100644 --- a/mgr/Dyson/Export/AgROOT.py +++ b/mgr/Dyson/Export/AgROOT.py @@ -687,7 +687,7 @@ class StarGeometry { /// Construct geometry with the specified tag, and return wrapped in a TDataSet static TDataSet* Construct( const char* name = "%s"); static bool List ( const char* name = "%s"); - static void Whitelist( const char* name, int value=1 ){ whitelist[name]=value; } + static void Whitelist( const char* name, int value=1 ); static void InitAgML ( const char* stacker="StarTGeoStacker"); StarGeometry(){ /* nada */ }; virtual ~StarGeometry(){ /* nada */ } @@ -718,6 +718,8 @@ class Geometry : public StarGeometry { std::map StarGeometry::whitelist= {{"all",1}}; + void StarGeometry::Whitelist(const char* name, int value){ whitelist[name]=value; } + TDataSet* StarGeometry::Construct( const char* name ) { std::string tag = name;