diff --git a/StRoot/StBFChain/BigFullChain.h b/StRoot/StBFChain/BigFullChain.h index 0a1d8b9eb15..55a6dfabe68 100644 --- a/StRoot/StBFChain/BigFullChain.h +++ b/StRoot/StBFChain/BigFullChain.h @@ -1132,6 +1132,7 @@ Bfc_st BFC[] = { // standard chains {"NoLocalCintDb","" ,"","" ,"","","Switch off local Cint Db",kFALSE}, {"NoMySQLDb" ,"" ,"","" ,"","","Switch off MySQL Db",kFALSE}, {"NoCintCalDb" ,"" ,"","NoLocalCintDb" ,"","","Switch off local Cint Db",kFALSE}, + {"TFGDbTag", "" ,"","" ,"","","Switch on TFG specific Db tag",kFALSE}, {"dbSnapshot" ,"" ,"","" ,"","","Create?use dbSnapshot",kFALSE}, {"NoEvent" ,"" ,"","-event,-analysis" ,"","","Switch Off StEvent and StAnalysis Makers",kFALSE}, {"MakeDoc" ,"" ,"","" ,"","","Make HTML documentation for the given Chain",kFALSE}, @@ -1173,8 +1174,11 @@ Bfc_st BFC[] = { // standard chains , "... Corr4+SCEbyE,OGridLeak3D,OSpaceZ2...",kFALSE}, {"CorrX" ,"" ,"","ExB,OShortR,OBmap,OPr13,OIFC,OSectorAlign,NewTpcAlignment" ",-AlignSectors,-OBmap2D,-OClock,-OTwist" ,"","","New Tpc Alignment",kFALSE}, - {"CorrY" ,"" ,"","ExB,OShortR,OBmap,OPr40,OIFC,OSectorAlign,NewTpcAlignment,OSpaceZ2,OGridLeakFull" + {"CorrY" ,"" ,"","ExB,OShortR,OBmap,OPr40,-OPr13,OIFC,OSectorAlign,NewTpcAlignment,OSpaceZ2,OGridLeakFull" ",-AlignSectors,-OBmap2D,-OClock,-OTwist" ,"","","New Tpc Alignment",kFALSE}, + {"Alignment2024","" ,"","NewTpcAlignment" ,"","","Turn on Alignment 2024",kFALSE}, + {"CorrZ","" ,"","Alignment2024,TFGdbOpt,-CorrY,-CorrX,ExB,OShortR,OBmap,OPr40,-Opr13,OIFC,OSpaceZ2" + ",OGridLeakFull,-OBmap2D,-OClock,-OTwist,-OSectorAlign" ,"","","Tpc Alignment 2024",kFALSE}, {"ExB" ,"" ,"","","" ,"","Activate ExB correction",kFALSE}, {"EB1" ,"" ,"","","" ,"","Force ExB configuration 1",kFALSE}, {"EB2" ,"" ,"","","" ,"","Force ExB configuration 2",kFALSE}, @@ -1231,6 +1235,7 @@ Bfc_st BFC[] = { // standard chains {"useLDV" ,"" ,"","","" ,"","... uses laserDV database flavor",kFALSE}, {"useCDV" ,"" ,"","","" ,"","... uses ofl database flavor",kFALSE}, {"useNewLDV" ,"" ,"","","" ,"","... uses ofl database flavor",kFALSE}, + {"TFGdbOpt" ,"" ,"","","" ,"","... uses TFG database flavor for alignemnt tables",kFALSE}, {"------------","-----------","-----------","------------------------------------------","","","",kFALSE}, {"Tables ","-----------","-----------","------------------------------------------","","","",kFALSE}, {"------------","-----------","-----------","------------------------------------------","","","",kFALSE}, @@ -1764,7 +1769,7 @@ Bfc_st BFC[] = { // standard chains // Sti/Stv chains - {"Sti" ,"Sti","","StiLib,StiLibs,SCL,StEvent,StDbT,TpcIT,compend,sim_T,tbutil","StiMaker" + {"Sti" ,"Sti","","StiLib,StiLibs,SCL,StEvent,dbutil,StDbT,TpcIT,compend,sim_T,tbutil","StiMaker" , "StEventUtilities,StiUtilities,StiMaker","Sti tracker",kFALSE}, {"StiCA" ,"Sti","","Sti","StiMaker","TPCCATracker" ,"StiCA tracker",kFALSE}, {"StiCAPerf","","","","", "TPCCATrackerPerformance", "CA Performance",kFALSE}, @@ -1823,7 +1828,7 @@ Bfc_st BFC[] = { // standard chains {"ETofQa", "", "ETofChain", "db, ETofUtil, muDst", "StETofQAMaker", "StETofQAMaker", "ETOF QA maker",kFALSE}, - {"ETofA", "", "","etofdat,ETofCalib,etofhit,ETofMatch","","... ETOF chain options for data", kFALSE}, + {"ETofA", "", "","etofdat,ETofCalib,etofhit,ETofMatch","","","... ETOF chain options for data", kFALSE}, // the below needs to be done earlier to save time - leaving here for documentation purposes as two diff --git a/StRoot/StBFChain/StBFChain.cxx b/StRoot/StBFChain/StBFChain.cxx index 3fbf49397b9..267e083943c 100644 --- a/StRoot/StBFChain/StBFChain.cxx +++ b/StRoot/StBFChain/StBFChain.cxx @@ -292,6 +292,8 @@ Int_t StBFChain::Instantiate() // Determine flavors TString flavors = "ofl"; // default flavor for offline + // TFG specific Db tag + if (GetOption("TFGDbTag")) flavors += "+TFG"; // fixed target flavor if (GetOption("FXT")) flavors.Prepend("FXT+"); @@ -762,6 +764,8 @@ Int_t StBFChain::Instantiate() if ( GetOption("useLDV") ) mk->SetAttr("useLDV",kTRUE) ;// uses laserDV database if ( GetOption("useCDV") ) mk->SetAttr("useCDV",kTRUE) ;// uses ofl database if ( GetOption("useNewLDV") ) mk->SetAttr("useNewLDV",kTRUE);// uses new laserDV + if ( GetOption("Alignment2024") ) mk->SetAttr("Alignment2024",kTRUE);// uses new Alignment2024 + if ( GetOption("Cosmics") ) mk->SetAttr("Cosmics" ,kTRUE); if ( GetOption("shadow") ) mk->SetAttr("NoReset",kTRUE);// no resetting ExB if ( GetOption("ExB")){ mk->SetAttr("ExB", kTRUE); // bit 0 is ExB ON or OFF @@ -1923,6 +1927,18 @@ void StBFChain::SetDbOptions(StMaker *mk){ if (GetOption("NoSsdIt")) {mk->SetAttr("blacklist", "ssd"); gMessMgr->QAInfo() << "blacklist ssd" << endm;} if (GetOption("NoSstIt")) {mk->SetAttr("blacklist", "sst"); gMessMgr->QAInfo() << "blacklist sst" << endm;} } + if (GetOption("TFGdbOpt")) { + const Char_t *TFGTables[] = {"tpcSectorT0offset", "starTriggerDelay", + "TpcPosition", "TpcHalfPosition", "TpcWheelPosition", + "TpcSuperSectorPositionB", "TpcSuperSectorPositionD", + "TpcInnerSectorPositionB", "TpcOuterSectorPositionB", + "tpcBXT0CorrEPD", "tpcTimeBucketCor", 0}; + LOG_INFO << "TFG version for TPC alignment parameters" << endm; + for (Int_t i = 0; TFGTables[i]; i++) { + LOG_INFO << "SetFlavor(\"TFG\",\"" << TFGTables[i] << "\"); // disable sim+ofl" << endm; + mk->SetFlavor("TFG",TFGTables[i]); + } + } } //_____________________________________________________________________ /// Creates output-tree branches diff --git a/StRoot/StDbUtilities/StGlobalDirection.hh b/StRoot/StDbUtilities/StGlobalDirection.hh index 8eb64670dd0..16c716f0a93 100644 --- a/StRoot/StDbUtilities/StGlobalDirection.hh +++ b/StRoot/StDbUtilities/StGlobalDirection.hh @@ -6,8 +6,8 @@ class StGlobalDirection : public StGlobalCoordinate { public: StGlobalDirection() : StGlobalCoordinate() {} - StGlobalDirection(const double x, const double y, const double z) : - StGlobalCoordinate(x,y,z) {} + StGlobalDirection(const double x, const double y, const double z) : StGlobalCoordinate(x,y,z) {} + StGlobalDirection(const double *x) : StGlobalCoordinate(x) { } StGlobalDirection(const StThreeVector& xyz) : StGlobalCoordinate(xyz) {} StGlobalDirection(const StThreeVectorF& xyz) : StGlobalCoordinate(xyz) {} virtual ~StGlobalDirection() {}; diff --git a/StRoot/StDbUtilities/StTpcCoordinate.cxx b/StRoot/StDbUtilities/StTpcCoordinate.cxx index ef7c0456c78..7e2b036a37e 100644 --- a/StRoot/StDbUtilities/StTpcCoordinate.cxx +++ b/StRoot/StDbUtilities/StTpcCoordinate.cxx @@ -7,6 +7,7 @@ #include "StTpcLocalSectorAlignedCoordinate.hh" #include "StTpcLocalSectorDirection.hh" #include "StTpcLocalSectorCoordinate.hh" +#include "Stiostream.h" //________________________________________________________________________________ StTpcLocalCoordinate::StTpcLocalCoordinate(double x, double y, double z) : StTpcCoordinate(x,y,z,0,0) {} //________________________________________________________________________________ @@ -21,6 +22,8 @@ ostream& operator<<(ostream& os, const StTpcCoordinate& a) { return os << OS; } //________________________________________________________________________________ +void StTpcCoordinate::Print(Option_t *option) const {cout << *this << endl;} +//________________________________________________________________________________ ostream& operator<<(ostream& os, const StTpcLocalDirection& a) { return os << "TPC_Local Direction( (" << OS; } diff --git a/StRoot/StDbUtilities/StTpcCoordinate.h b/StRoot/StDbUtilities/StTpcCoordinate.h index 772f7417820..32382ae228b 100644 --- a/StRoot/StDbUtilities/StTpcCoordinate.h +++ b/StRoot/StDbUtilities/StTpcCoordinate.h @@ -4,7 +4,6 @@ */ #ifndef ST_TPC_COORDINATE_H #define ST_TPC_COORDINATE_H -#include "Stiostream.h" #include "StThreeVector.hh" class StTpcCoordinate { @@ -27,6 +26,7 @@ class StTpcCoordinate { virtual void setPosition(StThreeVector& position) { mPosition = position; } virtual void setSector(Int_t sector) { mFromSector = sector; } virtual void setRow(Int_t row) { mFromRow = row; } + virtual void Print(Option_t *option="") const; protected: StThreeVector mPosition; Int_t mFromSector; diff --git a/StRoot/StDbUtilities/StTpcCoordinateTransform.cc b/StRoot/StDbUtilities/StTpcCoordinateTransform.cc index fda88d8e6d0..df2d25cbc72 100644 --- a/StRoot/StDbUtilities/StTpcCoordinateTransform.cc +++ b/StRoot/StDbUtilities/StTpcCoordinateTransform.cc @@ -265,6 +265,7 @@ #include "StDetectorDbMaker/St_tpcPadPlanesC.h" #include "StDetectorDbMaker/St_iTPCSurveyC.h" #include "StDetectorDbMaker/St_starTriggerDelayC.h" +#include "StDetectorDbMaker/St_CosmicsDelayC.h" #include "TMath.h" #include "StThreeVectorD.hh" #if defined (__SUNPRO_CC) && __SUNPRO_CC >= 0x500 @@ -275,25 +276,15 @@ StTpcCoordinateTransform::StTpcCoordinateTransform(StTpcDb* /* globalDbPointer * { if (St_tpcPadConfigC::instance() && StTpcDb::instance()->Electronics() -#if 0 - && StTpcDb::instance()->GlobalPosition() -#endif ) { mTimeBinWidth = 1./StTpcDb::instance()->Electronics()->samplingFrequency(); mInnerSectorzOffset = StTpcDb::instance()->Dimensions()->zInnerOffset(); mOuterSectorzOffset = StTpcDb::instance()->Dimensions()->zOuterOffset(); -#if 0 - mInnerSectorzOffset_West = StTpcDb::instance()->Dimensions()->zInnerOffset_West(); - mOuterSectorzOffset_West = StTpcDb::instance()->Dimensions()->zOuterOffset_West(); -#endif } else { gMessMgr->Error() << "StTpcDb IS INCOMPLETE! Cannot contstruct Coordinate transformation." << endm; assert(St_tpcPadConfigC::instance()); assert(StTpcDb::instance()->Electronics()); -#if 0 - assert(StTpcDb::instance()->GlobalPosition()); -#endif } } //________________________________________________________________________________ @@ -311,9 +302,6 @@ void StTpcCoordinateTransform::operator()(const StTpcLocalSectorCoordinate& a, S #else Double_t zoffset = (row>St_tpcPadConfigC::instance()->innerPadRows(sector)) ? mOuterSectorzOffset :mInnerSectorzOffset; #endif /* Don't apply zOffSet for prompt hits */ -#if 0 - if (sector <= 12) zoffset+= (row>St_tpcPadConfigC::instance()->innerPadRows(sector)) ? mOuterSectorzOffset_West :mInnerSectorzOffset_West; -#endif Double_t t0offset = (useT0 && sector>=1&§or<=24) ? St_tpcPadGainT0BC::instance()->T0(sector,row,TMath::Nint (probablePad)) : 0; t0offset *= mTimeBinWidth; if (! useT0 && useTau) // for cluster @@ -333,9 +321,6 @@ void StTpcCoordinateTransform::operator()(const StTpcPadCoordinate& a, StTpcLoc #else Double_t zoffset = (a.row()>St_tpcPadConfigC::instance()->innerPadRows(sector)) ? mOuterSectorzOffset : mInnerSectorzOffset; #endif /* Don't apply zOffSet for prompt hits */ -#if 0 - if (a.sector() <= 12) zoffset+= (a.row() > St_tpcPadConfigC::instance()->innerPadRows(sector)) ? mOuterSectorzOffset_West :mInnerSectorzOffset_West; -#endif Double_t t0offset = useT0 ? St_tpcPadGainT0BC::instance()->T0(a.sector(),a.row(),TMath::Nint(a.pad())) : 0; t0offset *= mTimeBinWidth; if (! useT0 && useTau) // for cluster @@ -424,12 +409,12 @@ Double_t StTpcCoordinateTransform::zFromTB(Double_t tb, Int_t sector, Int_t row, if (! St_starTriggerDelayC::instance()->Table()->IsMarked()) {// new scheme: offset = clocks*timebin + t0 trigT0 = St_starTriggerDelayC::instance()->clocks()*mTimeBinWidth; elecT0 = St_starTriggerDelayC::instance()->tZero(); + if (StTpcDb::IsCosmics()) { + trigT0 += St_CosmicsDelayC::instance()->clocks()*mTimeBinWidth; + elecT0 += St_CosmicsDelayC::instance()->tZero(); + } } else { // old scheme trigT0 = StTpcDb::instance()->triggerTimeOffset()*1e6; // units are s -#if 0 - if ((sector <= 12 && tb <= 350) || // extra West laser off set, membrane cluster with time bucket > 350 - (sector > 12 && tb > 350)) {trigT0 += StTpcDb::instance()->triggerTimeOffsetWest()*1e6;} -#endif elecT0 = StTpcDb::instance()->Electronics()->tZero(); // units are us } Double_t sectT0 = St_tpcPadrowT0C::instance()->T0(sector,row);// units are us @@ -452,12 +437,12 @@ Double_t StTpcCoordinateTransform::tBFromZ(Double_t z, Int_t sector, Int_t row, if (! St_starTriggerDelayC::instance()->Table()->IsMarked()) {// new scheme: offset = clocks*timebin + t0 trigT0 = St_starTriggerDelayC::instance()->clocks()*mTimeBinWidth; elecT0 = St_starTriggerDelayC::instance()->tZero(); + if (StTpcDb::IsCosmics()) { + trigT0 += St_CosmicsDelayC::instance()->clocks()*mTimeBinWidth; + elecT0 += St_CosmicsDelayC::instance()->tZero(); + } } else { // old scheme trigT0 = StTpcDb::instance()->triggerTimeOffset()*1e6; // units are s -#if 0 - if ((sector <= 12 && z < 195) || // extra West laser off set, membrane cluster with time z < 195 - (sector > 12 && z > 195)) {trigT0 += StTpcDb::instance()->triggerTimeOffsetWest()*1e6;} -#endif elecT0 = StTpcDb::instance()->Electronics()->tZero(); // units are us } Double_t sectT0 = St_tpcPadrowT0C::instance()->T0(sector,row);// units are us @@ -471,37 +456,19 @@ Double_t StTpcCoordinateTransform::tBFromZ(Double_t z, Int_t sector, Int_t row, } //________________________________________________________________________________ // FOR SECTOR 12 ONLY!!!! (Local coordinate); +Int_t StTpcCoordinateTransform::rowFromLocal(const StThreeVector& a, Int_t sector) { + if (! StTpcDb::Alignment2024()) return rowFromLocalY(a.x(), sector); + return rowFromLocalY(a.y(), sector); +} Int_t StTpcCoordinateTransform::rowFromLocalY(Double_t y, Int_t sector) { - static Int_t Nrows = 0; + static Int_t NrowsOld = 0; static Double_t *Radii = 0; -#ifndef __OLD__ - if (Nrows != St_tpcPadConfigC::instance()->padRows(sector)) { - Nrows = St_tpcPadConfigC::instance()->padRows(sector); + Int_t Nrows = St_tpcPadConfigC::instance()->numberOfRows(sector); + if (Nrows != NrowsOld) { if (Radii) delete [] Radii; - Radii = new Double_t[Nrows+1]; - for (Int_t i = 1; i <= Nrows+1; i++) { - if (i == 1) { - Radii[i-1] = (3*St_tpcPadConfigC::instance()->radialDistanceAtRow(sector,i) - - St_tpcPadConfigC::instance()->radialDistanceAtRow(sector,i+1))/2; - } else if (i == Nrows + 1) { - Radii[i-1] = (3*St_tpcPadConfigC::instance()->radialDistanceAtRow(sector,i-1) - - St_tpcPadConfigC::instance()->radialDistanceAtRow(sector,i-2))/2; - } else { - Radii[i-1] = (St_tpcPadConfigC::instance()->radialDistanceAtRow(sector,i-1) + - St_tpcPadConfigC::instance()->radialDistanceAtRow(sector,i))/2; - } - } - } - Long64_t row = TMath::BinarySearch(Nrows+1, Radii, y) + 1; - if (row <= 0) row = 1; - if (row > Nrows) row = Nrows; - return row; -#else - if (! Nrows) { - Nrows = St_tpcPadPlanesC::instance()->padRows(); Radii = new Double_t[Nrows]; for (Int_t i = 1; i <= Nrows; i++) { - Radii[i-1] = St_tpcPadPlanesC::instance()->radialDistanceAtRow(i); + Radii[i-1] = St_tpcPadConfigC::instance()->radialDistanceAtRow(sector, i); } } if (y < Radii[0]) return 1; @@ -512,7 +479,20 @@ Int_t StTpcCoordinateTransform::rowFromLocalY(Double_t y, Int_t sector) { } row++; return row; -#endif +} +//________________________________________________________________________________ +TGeoHMatrix &StTpcCoordinateTransform::Sub2Tpc(Int_t sector, Int_t row, Double_t drift) { + static TGeoHMatrix rotA; + StBeamDirection part = east; + if (sector <= 12) part = west; + TGeoTranslation GG(0, 0, - drift); + // TGeoHMatrix rotA = StTpcDb::instance()->Sup12S2Tpc(sector) * GG.Inverse() * StTpcDb::instance()->Wheel(part) * StTpcDb::instance()->SubS2Sup12S(sector,row) * GG; + rotA = StTpcDb::instance()->Sup12S2Tpc(sector); + rotA *= GG.Inverse(); + rotA *= StTpcDb::instance()->Wheel(part); + rotA *= StTpcDb::instance()->SubS2Sup12S(sector,row); + rotA *= GG; + return *&rotA; } //________________________________________________________________________________ void StTpcCoordinateTransform::operator()(const StTpcLocalSectorCoordinate& a, StTpcLocalCoordinate& b ) @@ -521,25 +501,113 @@ void StTpcCoordinateTransform::operator()(const StTpcLocalSectorCoordina Int_t row = a.fromRow(); Int_t sector = a.fromSector(); if (row < 1 || row > St_tpcPadConfigC::instance()->numberOfRows(sector)) row = rowFromLocal(a); - StTpcDb::instance()->Pad2Tpc(a.sector(),row).LocalToMasterVect(a.position().xyz(),xGG.xyz()); - const Double_t *trans = StTpcDb::instance()->Pad2Tpc(sector,row).GetTranslation(); // 4 - TGeoTranslation GG2TPC(trans[0],trans[1],trans[2]); - GG2TPC.LocalToMaster(xGG.xyz(), b.position().xyz()); - b.setSector(a.sector()); b.setRow(row); + if (! StTpcDb::Alignment2024()) { + StTpcDb::instance()->Pad2Tpc(sector,row).LocalToMasterVect(a.position().xyz(),xGG.xyz()); + const Double_t *trans = StTpcDb::instance()->Pad2Tpc(sector,row).GetTranslation(); // 4 + TGeoTranslation GG2TPC(trans[0],trans[1],trans[2]); + GG2TPC.LocalToMaster(xGG.xyz(), b.position().xyz()); + } else {// new alignment with drift along z in Super sector coordinate system + Double_t drift = a.position().z() + StTpcDb::instance()->SubS2Sup12S(sector,row).GetTranslation()[2]; + TGeoHMatrix &rotA = Sub2Tpc(sector, row, drift); + rotA.LocalToMaster(a.position().xyz(), b.position().xyz()); + } + b.setSector(sector); b.setRow(row); +} +//________________________________________________________________________________ +void StTpcCoordinateTransform::operator()(const StTpcLocalSectorDirection& a, StTpcLocalDirection& b) +{ + Int_t sector = a.fromSector(); + Int_t row = a.fromRow(); + if (! StTpcDb::Alignment2024()) { + StTpcDb::instance()->Pad2Tpc(sector,a.row()).LocalToMasterVect(a.position().xyz(),b.position().xyz()); + } else { + TGeoHMatrix &rotA = Sub2Tpc(sector, row); + rotA.LocalToMasterVect(a.position().xyz(), b.position().xyz()); + } + b.setSector(sector); b.setRow(row); } //________________________________________________________________________________ void StTpcCoordinateTransform::operator()(const StTpcLocalCoordinate& a, StTpcLocalSectorCoordinate& b ) { + Int_t sector = a.fromSector(); + if (! sector) sector = ((StTpcLocalCoordinate *) &a)->setSectorFromCoordinates(); Int_t row = a.fromRow(); + StThreeVectorD xGG; + if (! StTpcDb::Alignment2024()) { + if ( ! (row >= 1 && row <= St_tpcPadConfigC::instance()->numberOfRows(sector))) { + StThreeVectorD xyzS; + StTpcDb::instance()->SupS2Tpc(sector).MasterToLocalVect(a.position().xyz(),xyzS.xyz()); + row = rowFromLocalY(xyzS[0], sector); + } + const Double_t *trans = StTpcDb::instance()->Pad2Tpc(sector,row).GetTranslation(); // 4 + TGeoTranslation GG2TPC(trans[0],trans[1],trans[2]); + GG2TPC.MasterToLocal(a.position().xyz(), xGG.xyz()); + StTpcDb::instance()->Pad2Tpc(sector,row).MasterToLocalVect(xGG.xyz(),b.position().xyz()); b.setSector(sector); b.setRow(row); + } else { + if ( ! (row >= 1 && row <= St_tpcPadConfigC::instance()->numberOfRows(sector))) { + StThreeVectorD xyzS; + StTpcDb::instance()->Sup12S2Tpc(sector).MasterToLocalVect(a.position().xyz(),xyzS.xyz()); + row = rowFromLocalY(xyzS[1], sector); + } + StThreeVectorD xyzLS; + StTpcDb::instance()->Sup12S2Tpc(sector).MasterToLocal(a.position().xyz(),xyzLS.xyz()); + Double_t drift = xyzLS.z(); + TGeoHMatrix &rotA = Sub2Tpc(sector, row, drift); + rotA.MasterToLocal(a.position().xyz(), b.position().xyz()); + } + b.setSector(sector); b.setRow(row); +} +//________________________________________________________________________________ +void StTpcCoordinateTransform::operator()(const StTpcLocalDirection& a, StTpcLocalSectorDirection& b ) +{ Int_t sector = a.fromSector(); - if ( ! (row >= 1 && row <= St_tpcPadConfigC::instance()->numberOfRows(sector))) { - StThreeVectorD xyzS; - StTpcDb::instance()->SupS2Tpc(sector).MasterToLocalVect(a.position().xyz(),xyzS.xyz()); - row = rowFromLocalY(xyzS[0], sector); + Int_t row = a.fromRow(); + if (! StTpcDb::Alignment2024()) { + StTpcDb::instance()->Pad2Tpc(sector,a.row()).MasterToLocalVect(a.position().xyz(),b.position().xyz()); + } else { + TGeoHMatrix &rotA = Sub2Tpc(sector, row); + rotA.MasterToLocalVect(a.position().xyz(), b.position().xyz()); + } + b.setSector(sector); + b.setRow(row); +} +//________________________________________________________________________________ +void StTpcCoordinateTransform::testTpcCoordinateTransform(Int_t sector, Int_t row, Int_t pad, Int_t time, Int_t kase) { + if (kase >= 0) StTpcDb::SetAlignment2024(kase); + else StTpcDb::SetAlignment2024(kFALSE); + static StTpcCoordinateTransform transform(StTpcDb::instance()); + cout << "Coordinates ============================" << endl; + StTpcPadCoordinate coorP(sector, row, pad, time); cout << coorP << endl; + StTpcLocalSectorCoordinate coorLS; + StTpcLocalSectorCoordinate coorLST; + StTpcLocalSectorCoordinate coorLSF; + StTpcLocalCoordinate coorTPC; + StGlobalCoordinate coorG; + StTpcPadCoordinate coorP2; + cout << "coorP \t" << coorP << endl; +#if 0 + transform(coorP,coorLS); cout << "Default \t" << coorLS << endl; + transform(coorP,coorLS ,kFALSE, kTRUE); cout << "Cluster without T0, with tau\t" << coorLS << endl; + transform(coorP,coorLST,kFALSE,kFALSE); cout << "Pixel with T0, without tau\t" << coorLST << endl; + transform(coorP,coorLST, kTRUE,kFALSE); cout << "Pixel without T0, without tau\t" << coorLST << endl; + transform(coorP,coorG, kTRUE,kFALSE); cout << "Pixel without T0, without tau\t" << coorG << endl; +#endif + + cout << "coorP input \t" << coorP << endl; + Int_t k1 = 1, k2 = 0; + if (kase >= 0) {k1 = k2 = kase;} + for (Int_t k = k1; k >= k2; k--) { + if (k1 != k2) StTpcDb::SetAlignment2024(k); + if (! StTpcDb::Alignment2024() ) cout << "Tpc to Sub Sector ======= Old ========" << endl; + else cout << "Tpc to Sub Sector ======= New ========" << endl; + transform(coorP,coorLS); cout << "coorP => coorLS \t" << coorLS << endl; + transform(coorLS, coorP2); cout << "coorLS => coorP2 \t" << coorP2 << endl; + transform(coorLS, coorTPC); cout << "coorLS => coorTPC \t" << coorTPC << endl; + transform(coorTPC, coorLS); cout << "coorTPC => coorLS \t" << coorLS << endl; + transform(coorP,coorTPC); cout << "coorP => coorTPC \t" << coorTPC << endl; + transform(coorTPC,coorP2); cout << "coorTPC => coorP2 \t" << coorP2 << endl; + transform(coorP,coorG); cout << "coorP => coorG \t" << coorG << endl; + transform(coorG,coorP2, sector, row); cout << "coorG => coorP2 \t" << coorP2 << endl; + transform(coorLS,coorP2); cout << "coorLS => coorP2 \t" << coorP2 << endl; } - const Double_t *trans = StTpcDb::instance()->Pad2Tpc(a.sector(),row).GetTranslation(); // 4 - TGeoTranslation GG2TPC(trans[0],trans[1],trans[2]); - StThreeVectorD xGG; - GG2TPC.MasterToLocal(a.position().xyz(), xGG.xyz()); - StTpcDb::instance()->Pad2Tpc(a.sector(),row).MasterToLocalVect(xGG.xyz(),b.position().xyz()); b.setSector(a.sector()); b.setRow(row); } diff --git a/StRoot/StDbUtilities/StTpcCoordinateTransform.hh b/StRoot/StDbUtilities/StTpcCoordinateTransform.hh index 3357259a127..8c7a7483a48 100644 --- a/StRoot/StDbUtilities/StTpcCoordinateTransform.hh +++ b/StRoot/StDbUtilities/StTpcCoordinateTransform.hh @@ -175,6 +175,7 @@ #include "StTpcLocalSectorDirection.hh" #include "StTpcLocalSectorAlignedDirection.hh" #include "StGlobalDirection.hh" +#include "TGeoMatrix.h" // pad => sector12 => subsector => sector => tpc => global // TpcPadCoordinate => TpcSectL => TpcSectLAligned => TpcLocal => Global class StTpcCoordinateTransform {//: public StObject { @@ -186,75 +187,75 @@ public: void operator()(const StTpcPadCoordinate& a, StTpcLocalSectorCoordinate& b,Bool_t useT0=kFALSE, Bool_t useTau=kTRUE); // Raw Data <--> Tpc Local Coordinates void operator()(const StTpcLocalCoordinate& a, StTpcPadCoordinate& b,Bool_t useT0=kFALSE, Bool_t useTau=kTRUE) - {StTpcLocalSectorCoordinate c; this->operator()(a,c); this->operator()(c,b,useT0,useTau);} + { StTpcLocalSectorCoordinate c; + this->operator()(a,c); + this->operator()(c,b,useT0,useTau);} void operator()(const StTpcPadCoordinate& a, StTpcLocalCoordinate& b,Bool_t useT0=kFALSE, Bool_t useTau=kTRUE) - {StTpcLocalSectorCoordinate c; this->operator()(a,c,useT0,useTau); this->operator()(c,b);} + { StTpcLocalSectorCoordinate c; + this->operator()(a,c,useT0,useTau); + this->operator()(c,b);} // Tpc Local Sector <--> TPC Local void operator()(const StTpcLocalSectorCoordinate& a, StTpcLocalCoordinate& b ); -// { Double_t xyzS[3] = {a.position().x(), a.position().y(), 0.}; -// StTpcDb::instance()->Pad2Tpc(a.sector(),a.row()).LocalToMaster(xyzS,b.position().xyz()); -// b.position().setZ(b.position().z() + a.position().z()); -// b.setSector(a.sector()); b.setRow(a.row());} void operator()(const StTpcLocalSectorCoordinate& a, StTpcLocalSectorAlignedCoordinate& b) {b = a;} - void operator()(const StTpcLocalSectorDirection& a, StTpcLocalDirection& b) - {StTpcDb::instance()->Pad2Tpc(a.sector(),a.row()).LocalToMasterVect(a.position().xyz(),b.position().xyz()); b.setSector(a.sector()); b.setRow(a.row());} + void operator()(const StTpcLocalSectorDirection& a, StTpcLocalDirection& b); + void operator()(const StTpcLocalCoordinate& a, StTpcLocalSectorCoordinate& b ); void operator()(const StTpcLocalSectorDirection& a, StTpcLocalSectorAlignedDirection& b) {b = a;} + void operator()(const StTpcLocalDirection& a, StTpcLocalSectorDirection& b ); + // Tpc Local Sector <--> Global void operator()(const StTpcLocalSectorCoordinate& a, StGlobalCoordinate& b) { StTpcLocalCoordinate c; this->operator()(a,c); this->operator()(c,b); } - void operator()(const StTpcLocalSectorDirection& a, StGlobalDirection& b) + void operator()(const StTpcLocalSectorDirection& a, StGlobalDirection& b) {StTpcDb::instance()->Pad2Glob(a.sector(),a.row()).LocalToMasterVect(a.position().xyz(),b.position().xyz());} - void operator()(const StTpcLocalCoordinate& a, StTpcLocalSectorCoordinate& b ); -// { Double_t xyzS[3] = {a.position().x(), a.position().y(), 0.}; -// StTpcDb::instance()->Pad2Tpc(a.sector(),a.row()).MasterToLocal(xyzS,b.position().xyz()); b.setSector(a.sector()); b.setRow(a.row()); -// b.position().setZ(b.position().z() + a.position().z()); -// } - void operator()(const StTpcLocalDirection& a, StTpcLocalSectorDirection& b ) - {StTpcDb::instance()->Pad2Tpc(a.sector(),a.row()).MasterToLocalVect(a.position().xyz(),b.position().xyz()); b.setSector(a.sector()); b.setRow(a.row());} - void operator()(const StGlobalCoordinate& a,StTpcLocalSectorCoordinate& b,Int_t sector, Int_t row) + void operator()(const StGlobalCoordinate& a,StTpcLocalSectorCoordinate& b,Int_t sector, Int_t row) { StTpcLocalCoordinate c; this->operator()(a,c,sector,row); this->operator()(c,b); } - void operator()(const StGlobalDirection& a,StTpcLocalSectorDirection& b,Int_t sector, Int_t row) - {StTpcDb::instance()->Pad2Glob(sector,row).MasterToLocalVect(a.position().xyz(),b.position().xyz()); b.setSector(sector); b.setRow(row);} - // Internal TpcCoordinate <--> Global Coordinate - void operator()(const StTpcLocalCoordinate& a, StGlobalCoordinate& b) + void operator()(const StGlobalDirection& a, StTpcLocalSectorDirection& b,Int_t sector, Int_t row) + { + StTpcDb::instance()->Pad2Glob(sector,row).MasterToLocalVect(a.position().xyz(),b.position().xyz()); + b.setSector(sector); + b.setRow(row);} + // TpcCoordinate <--> Global Coordinate + void operator()(const StTpcLocalCoordinate& a, StGlobalCoordinate& b) {StTpcDb::instance()->Tpc2GlobalMatrix().LocalToMaster(a.position().xyz(),b.position().xyz());} - void operator()(const StGlobalCoordinate& a, StTpcLocalCoordinate& b,Int_t sector, Int_t row) - {StTpcDb::instance()->Tpc2GlobalMatrix().MasterToLocal(a.position().xyz(),b.position().xyz()); b.setSector(sector); b.setRow(row);} - void operator()(const StTpcLocalDirection& a, StGlobalDirection& b) + void operator()(const StGlobalCoordinate& a, StTpcLocalCoordinate& b,Int_t sector = 0, Int_t row = 0) + {StTpcDb::instance()->Tpc2GlobalMatrix().MasterToLocal(a.position().xyz(),b.position().xyz()); + if (sector > 0 && sector <= 24) b.setSector(sector); + else b.setSectorFromCoordinates(); + b.setRow(row);} + void operator()(const StTpcLocalDirection& a, StGlobalDirection& b) {StTpcDb::instance()->Tpc2GlobalMatrix().LocalToMasterVect(a.position().xyz(),b.position().xyz());} - void operator()(const StGlobalDirection& a, StTpcLocalDirection& b,Int_t sector, Int_t row) - {StTpcDb::instance()->Tpc2GlobalMatrix().MasterToLocalVect(a.position().xyz(),b.position().xyz()); b.setSector(sector); b.setRow(row);} + void operator()(const StGlobalDirection& a, StTpcLocalDirection& b,Int_t sector, Int_t row) + { StTpcDb::instance()->Tpc2GlobalMatrix().MasterToLocalVect(a.position().xyz(),b.position().xyz()); + b.setSector(sector); + b.setRow(row);} // Raw Data <--> Global Coordinate - void operator()(const StTpcPadCoordinate& a, StGlobalCoordinate& b,Bool_t useT0=kFALSE, Bool_t useTau=kTRUE) - {StTpcLocalCoordinate c; this->operator()(a,c,useT0,useTau); this->operator()(c,b);} - void operator()(const StGlobalCoordinate& a, StTpcPadCoordinate& b,Int_t sector, Int_t row, Bool_t useT0=kFALSE, Bool_t useTau=kTRUE) - {StTpcLocalCoordinate c; this->operator()(a,c,sector,row); this->operator()(c,b,useT0,useTau);} + void operator()(const StTpcPadCoordinate& a, StGlobalCoordinate& b,Bool_t useT0=kFALSE, Bool_t useTau=kTRUE) + { StTpcLocalCoordinate c; + this->operator()(a,c,useT0,useTau); + this->operator()(c,b);} + void operator()(const StGlobalCoordinate& a, StTpcPadCoordinate& b,Int_t sector, Int_t row, Bool_t useT0=kFALSE, Bool_t useTau=kTRUE) + { StTpcLocalCoordinate c; + this->operator()(a,c,sector,row); + this->operator()(c,b,useT0,useTau);} Double_t tBFromZ(Double_t z, Int_t sector, Int_t row, Int_t pad = 0) const; Double_t zFromTB(Double_t tb, Int_t sector, Int_t row, Int_t pad = 0) const; // Transformation Routines!! // Raw Data (pad row timebin or drift L From tpc local sector Coordinates static Int_t rowFromLocalY(Double_t y, Int_t sector); - static Int_t rowFromLocal(const StThreeVector& a, Int_t sector) {return rowFromLocalY(a.y(), sector);} + static Int_t rowFromLocal(const StThreeVector& a, Int_t sector); Double_t padFromLocal(const StThreeVector& a, Int_t sector, Int_t row) const {return padFromX(a.x(), sector, row);} Double_t padFromX(Double_t x, Int_t sector, Int_t row) const; Int_t rowFromLocal(const StTpcLocalSectorCoordinate& a) const {return rowFromLocal(a.position(),a.sector());} Double_t padFromLocal(const StTpcLocalSectorCoordinate& a) const {return padFromLocal(a.position(),a.sector(),a.row());} // tpc local sector Coordinates from Raw Data StThreeVector xyFromRow(const StTpcPadCoordinate& a) {return StThreeVector (xFromPad(a.sector(),a.row(),a.pad()),yFromRow(a.sector(),a.row()),0);} - Double_t yFromRow(Int_t sector, Int_t row) const {return (St_tpcPadConfigC::instance()->radialDistanceAtRow(sector,row));} - Double_t xFromPad(Int_t sector, Int_t row, Double_t pad) const; -// sector from Tpc local coordinates - Int_t sectorFromCoordinate(const StThreeVector& a) const{ - Double_t angle = TMath::RadToDeg()*TMath::ATan2(a.y(),a.x()); - if(angle<0) angle+= 360; - Int_t sectorNumber= (int)( (angle+15)/30); - if(a.z()>0){sectorNumber=15-sectorNumber; if(sectorNumber> 12)sectorNumber-=12;} - else {sectorNumber+=9; if(sectorNumber<=12)sectorNumber+=12;} - return sectorNumber; - } + Double_t yFromRow(Int_t sector, Int_t row) const {return (St_tpcPadConfigC::instance()->radialDistanceAtRow(sector,row));} + Double_t xFromPad(Int_t sector, Int_t row, Double_t pad) const; + static void testTpcCoordinateTransform(Int_t sector = 3, Int_t row = 24, Int_t pad = 1, Int_t time = 0, Int_t kase = -1); private: + static TGeoHMatrix &Sub2Tpc(Int_t sector, Int_t row, Double_t drift = 0); Double_t mTimeBinWidth; Double_t mInnerSectorzOffset; Double_t mOuterSectorzOffset; @@ -264,7 +265,6 @@ private: #endif Int_t mNoOfInnerRows; Int_t mNoOfRows; - // ClassDef(StTpcCoordinateTransform,0) // }; diff --git a/StRoot/StDbUtilities/StTpcLocalCoordinate.hh b/StRoot/StDbUtilities/StTpcLocalCoordinate.hh index 1305a63fe39..d7eafc31c9f 100644 --- a/StRoot/StDbUtilities/StTpcLocalCoordinate.hh +++ b/StRoot/StDbUtilities/StTpcLocalCoordinate.hh @@ -54,6 +54,8 @@ #ifndef ST_TPC_LOCAL_COORDINATE_HH #define ST_TPC_LOCAL_COORDINATE_HH #include "StTpcCoordinate.h" +#include "StThreeVectorD.hh" +#include "TMath.h" class StTpcLocalCoordinate : public StTpcCoordinate { public: StTpcLocalCoordinate() : StTpcCoordinate(0,0,0,0,0) {} @@ -64,6 +66,17 @@ public: StTpcLocalCoordinate(const StThreeVector& xyz, int sector, int row) : StTpcCoordinate(xyz,sector,row) {} virtual ~StTpcLocalCoordinate() {} + Int_t sector() { if (! mFromSector) setSectorFromCoordinates(); return mFromSector; } + static Int_t sectorFromCoordinate(Double_t x, Double_t y, Double_t z) { + Double_t angle = TMath::RadToDeg()*TMath::ATan2(y,x); + if(angle < 0) angle += 360; + Int_t sectorNumber = (Int_t) ( (angle+15)/30); + if(z > 0){sectorNumber =15-sectorNumber; if(sectorNumber> 12) sectorNumber -= 12;} + else {sectorNumber+=9; if(sectorNumber<=12) sectorNumber += 12;} + return sectorNumber; + } + static Int_t sectorFromCoordinate(StThreeVectorD &position) {return sectorFromCoordinate(position.x(), position.y(), position.z());} + Int_t setSectorFromCoordinates() {return mFromSector = sectorFromCoordinate(position());} }; ostream& operator<<(ostream&, const StTpcLocalCoordinate&); #endif diff --git a/StRoot/StDbUtilities/StTpcLocalSectorCoordinate.hh b/StRoot/StDbUtilities/StTpcLocalSectorCoordinate.hh index 4a5a2fc2694..67f937919fb 100644 --- a/StRoot/StDbUtilities/StTpcLocalSectorCoordinate.hh +++ b/StRoot/StDbUtilities/StTpcLocalSectorCoordinate.hh @@ -9,13 +9,9 @@ class StTpcLocalSectorCoordinate : public StTpcCoordinate { public: StTpcLocalSectorCoordinate() : StTpcCoordinate(0,0,0,0,0) {} - StTpcLocalSectorCoordinate(double x, double y, double z) : - StTpcCoordinate(x,y,z,0,0) {} - StTpcLocalSectorCoordinate(const StThreeVector& xyz) : - StTpcCoordinate(xyz,0,0) {} - StTpcLocalSectorCoordinate(double x, double y, double z, int sector, int row=0) : + StTpcLocalSectorCoordinate(double x, double y, double z, int sector=0, int row=0) : StTpcCoordinate(x,y,z,sector,row) {} - StTpcLocalSectorCoordinate(const StThreeVector& xyz, int sector, int row=0) : + StTpcLocalSectorCoordinate(const StThreeVector& xyz, int sector=0, int row=0) : StTpcCoordinate(xyz,sector,row) {} virtual ~StTpcLocalSectorCoordinate() {} }; diff --git a/StRoot/StDetectorDbMaker/StDetectorDbChairs.cxx b/StRoot/StDetectorDbMaker/StDetectorDbChairs.cxx index efbd2fc4546..e7edaf3bec3 100644 --- a/StRoot/StDetectorDbMaker/StDetectorDbChairs.cxx +++ b/StRoot/StDetectorDbMaker/StDetectorDbChairs.cxx @@ -7,6 +7,7 @@ #include "TMath.h" #include "TString.h" #include "Math/SMatrix.h" +#include "TArrayD.h" using namespace ROOT::Math; #include "TCernLib.h" @@ -17,6 +18,8 @@ using namespace ROOT::Math; #include "tables/St_tpcSectorT0offset_Table.h" #include "tables/St_tofTrayConfig_Table.h" #define makeSTRING(PATH) # PATH +// if (! strcmp(makeSTRING(C_STRUCT),"tpcSectorT0offset")) {for (Int_t i = 0; i < 24; i++) def.t0[i] = -22.257;} + #define CHECKTABLED(C_STRUCT) \ if (table->InheritsFrom("St_" # C_STRUCT)) { \ St_ ## C_STRUCT *t = (St_ ## C_STRUCT *) table ; \ @@ -26,7 +29,6 @@ using namespace ROOT::Math; Int_t shift = 0; \ Int_t NrowSize = t->GetRowSize(); \ if (! strcmp(makeSTRING(C_STRUCT),"Survey")) {shift = 4; NrowSize = 12*8;} \ - if (! strcmp(makeSTRING(C_STRUCT),"tpcSectorT0offset")) {for (Int_t i = 0; i < 24; i++) def.t0[i] = -22.257;} \ if (! strcmp(makeSTRING(C_STRUCT),"tofTrayConfig")) {def.entries = 120; for (Int_t i = 0; i < 120; i++) {def.iTray[i] = i+1; def.nModules[i] = 32;} \ for (Int_t i = 0; i < table->GetNRows(); i++, s++) { \ if (memcmp(&def+shift, s+shift, NrowSize)) {iprt = kTRUE; break;} \ @@ -2395,6 +2397,8 @@ Float_t St_starTriggerDelayC::TrigT0GG(Int_t io, Int_t i) const { else delay += -0.502; return delay; } +#include "St_CosmicsDelayC.h" +MakeChairInstance2(starTriggerDelay,St_CosmicsDelayC,Calibrations/tpc/CosmicsDelay); //__________________Calibrations/trg______________________________________________________________ #include "St_defaultTrgLvlC.h" MakeChairInstance(defaultTrgLvl,Calibrations/trg/defaultTrgLvl); @@ -2522,11 +2526,217 @@ MakeChairInstance(starMagOnl,RunLog/onl/starMagOnl); MakeChairOptionalInstance(starMagAvg,RunLog/onl/starMagAvg); #include "St_beamInfoC.h" MakeChairInstance(beamInfo,RunLog/onl/beamInfo); -static Double_t kuAtomicMassUnit = 931.4940054e-3; -static Double_t kProtonMass = kuAtomicMassUnit*1.00727646662; +static Double_t kuAtomicMassUnit = 931.4940054e-3; // GeV +static Double_t kElectronMass = 0.51099907e-3; // GeV +//________________________________________________________________________________ +Double_t St_beamInfoC::BeamMass(Int_t MassNumber, const Char_t *Species, Int_t &A) { // return mass in GeV + /* + +MySQL [RunLog_onl]> select DISTINCT blueSpecies,blueMassNumber,yellowSpecies,yellowMassNumber from beamInfo where blueEnergy > 0 or yellowEnergy > 0 limit 200; ++-------------+----------------+---------------+------------------+ +| blueSpecies | blueMassNumber | yellowSpecies | yellowMassNumber | ++-------------+----------------+---------------+------------------+ +| Au | 197 | Au | 197 | +| Au | 197 | Proton | 1 | +| Proton | 1 | Proton | 1 | +| Deuteron | 2 | Au | 197 | +| d | 2 | Au | 197 | +| PP | 0 | PP | 0 | +| Cu | 0 | Cu | 0 | +| U | 0 | U | 0 | +| Cu | 0 | Au | 197 | +| He3 | 0 | Au | 197 | +| PP | 0 | Au | 197 | +| PP | 0 | Al | 0 | +| Au | 197 | Al | 0 | +| D | 0 | Au | 197 | +| Zr | 0 | Zr | 0 | +| Au | 197 | Zr | 0 | +| Ru | 0 | Ru | 0 | +| Al | 0 | Au | 197 | +| O | 0 | O | 0 | +| He3 | 0 | He3 | 0 | ++-------------+----------------+---------------+------------------+ +20 rows in set (0.00 sec) + */ + TString IonName(Species); + A = MassNumber; + if (A <= 0) { + if (IonName == "Proton") A = 1; + else if (IonName == "PP") A = 1; + else if (IonName == "d") A = 2; + else if (IonName == "D") A = 2; + else if (IonName == "He3") A = 3; + else if (IonName == "O") A = 16; + else if (IonName == "Al") A = 27; + else if (IonName == "Cu") A = 63; + else if (IonName == "Zr") A = 96; + else if (IonName == "Ru") A = 96; + else if (IonName == "Au") A = 197; + else if (IonName == "U") A = 238; + else assert(A); + } + Double_t Z = 1; + Double_t AU = 0.0; + // https://periodictable.com/Isotopes/ + if (A == 1) {AU = 1.00782503207; Z = 1;} + else if (A == 2) {AU = 2.01410177785; Z = 1;} + else if (A == 3) {AU = 2.01410177785; Z = 2;} + else if (A == 16) {AU = 15.99491461956; Z = 8;} + else if (A == 27) {AU = 26.981538627; Z = 13;} + else if (A == 63) {AU = 62.929597474; Z = 29;} + else if (A == 96) { + if (IonName == "Zr") { A = 95.908273386; Z = 40;} + else if (IonName == "Ru") { A = 95.907597835; Z = 44;} + } + else if (A == 197) {AU = 196.966568662; Z = 79;} + else if (A == 238) {AU = 238.050788247; Z = 92;} + else assert(0); + Double_t Mass = kuAtomicMassUnit * AU - Z*kElectronMass; + return Mass; +} //________________________________________________________________________________ Bool_t St_beamInfoC::IsFixedTarget() { - Bool_t isFixTag = kFALSE; + Int_t run = runNumber(); + Int_t year = 2000 + run/1000000 - 1; + if (year < 2018 || year > 2022) return kFALSE; + if (year == 2019 && (/* 27GeV_fixedTarget_2018 */ ( run >= 19138032 && run <= 19138036 ) || + /* 27GeV_fixedTarget_2018 */ ( run >= 19148036 && run <= 19148036 ) || + /* 27GeV_fixedTarget_2018 */ ( run >= 19148038 && run <= 19148047 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19151029 && run <= 19151029 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19151031 && run <= 19151031 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19151034 && run <= 19151034 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19151036 && run <= 19151036 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19151039 && run <= 19151039 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19151041 && run <= 19151041 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19151043 && run <= 19151050 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19151052 && run <= 19151056 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19151066 && run <= 19151072 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19151082 && run <= 19151084 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152001 && run <= 19152003 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152008 && run <= 19152010 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152014 && run <= 19152014 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152016 && run <= 19152016 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152021 && run <= 19152021 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152023 && run <= 19152025 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152027 && run <= 19152046 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152048 && run <= 19152048 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152051 && run <= 19152055 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152071 && run <= 19152071 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152073 && run <= 19152076 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19152078 && run <= 19152081 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19153001 && run <= 19153004 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19153007 && run <= 19153007 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19153009 && run <= 19153025 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19153027 && run <= 19153029 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19153031 && run <= 19153037 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19153042 && run <= 19153044 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19153050 && run <= 19153059 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19153061 && run <= 19153066 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19154001 && run <= 19154002 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19154005 && run <= 19154005 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19154007 && run <= 19154007 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19154012 && run <= 19154024 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19154026 && run <= 19154032 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19154036 && run <= 19154041 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19154044 && run <= 19154049 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19154051 && run <= 19154058 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19154061 && run <= 19154061 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19154063 && run <= 19154067 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19155001 && run <= 19155001 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19155003 && run <= 19155006 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19155008 && run <= 19155011 ) || + /* 3p85GeV_fixedTarget_2018 */ ( run >= 19155016 && run <= 19155022 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19158057 && run <= 19158057 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19159043 && run <= 19159046 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19160032 && run <= 19160044 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19161001 && run <= 19161001 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19161020 && run <= 19161030 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19161034 && run <= 19161042 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19162033 && run <= 19162034 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19162043 && run <= 19162044 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19163001 && run <= 19163004 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19163024 && run <= 19163028 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19163032 && run <= 19163036 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19163042 && run <= 19163048 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19164001 && run <= 19164001 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19164022 && run <= 19164025 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19165030 && run <= 19165049 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19166001 && run <= 19166002 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19166004 && run <= 19166004 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19166019 && run <= 19166020 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19167001 && run <= 19167001 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19167050 && run <= 19167053 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19168004 && run <= 19168015 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19168017 && run <= 19168020 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19168041 && run <= 19168046 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19169001 && run <= 19169015 ) || + /* 26p5GeV_fixedTarget_2018 */ ( run >= 19169017 && run <= 19169017 )) ) return kTRUE; + else if (year == 2019 && (/* 2019: 0832 7.3GeV_fixedTarget */ ( run >= 20107029 && run <= 20107029 ) || + /* 2019: 0865 7.3GeV_fixedTarget */ ( run >= 20113042 && run <= 20113048 ) || + /* 2019: 1102 3p85GeV_fixedTarget */ ( run >= 20158041 && run <= 20158042 ) || + /* 2019: 1113 3p85GeV_fixedTarget */ ( run >= 20160023 && run <= 20160027 ) || + /* 2019: 1164 7.3GeV_fixedTarget */ ( run >= 20169028 && run <= 20169055 ) || + /* 2019: 1206 4p59GeV_fixedTarget */ ( run >= 20179039 && run <= 20183025 ) || + /* 2019: 1261 31GeV_fixedTarget */ ( run >= 20189035 && run <= 20190024)) ) return kTRUE; + else if (year == 2020 && (/* 2020: 0161 5p75GeV_fixedTarget */ ( run >= 20355020 && run <= 20355021 ) || + /* 2020: 0363 31p2GeV_fixedTarget */ ( run >= 21028011 && run <= 21029036 ) || + /* 2020: 0374 9p8GeV_fixedTarget */ ( run >= 21029051 && run <= 21032016 ) || + /* 2020: 0387 19p5GeV_fixedTarget */ ( run >= 21032046 && run <= 21034013 ) || + /* 2020: 0399 7p3GeV_fixedTarget */ ( run >= 21035003 && run <= 21036013 ) || + /* 2020: 0461 5p75GeV_fixedTarget */ ( run >= 21044023 && run <= 21045011 ) || + /* 2020: 0889 26p5GeV_fixedTarget */ ( run >= 21211028 && run <= 21211028 ) || + /* 2020: 0966 26p5GeV_fixedTarget */ ( run >= 21226023 && run <= 21226036 ) || + /* 2020: 1000 26p5GeV_fixedTarget */ ( run >= 21232025 && run <= 21232025 ) || + /* 2020: 1045 26p5GeV_fixedTarget */ ( run >= 21240017 && run <= 21240028 ) || + /* 2020: 1104 26p5GeV_fixedTarget */ ( run >= 21251020 && run <= 21252033 ) || + /* 2020: 1122 26p5GeV_fixedTarget */ ( run >= 21256006 && run <= 21257018 ) || + /* 2020: 1131 26p5GeV_fixedTarget */ ( run >= 21257029 && run <= 21258004)) ) return kTRUE; + else if (year == 2021 && (/* 2021: 0548 tune_3p85GeV_fixedTarget_2021 */ ( run >= 22121022 && run <= 22121030 ) || + /* 2021: 0550 3p85GeV_fixedTarget_2021 */ ( run >= 22121033 && run <= 22121033 ) || + /* 2021: 0551 tune_3p85GeV_fixedTarget_2021 */ ( run >= 22121035 && run <= 22121035 ) || + /* 2021: 0552 3p85GeV_fixedTarget_2021 */ ( run >= 22121036 && run <= 22121041 ) || + /* 2021: 0553 tune_3p85GeV_fixedTarget_2021 */ ( run >= 22121042 && run <= 22121043 ) || + /* 2021: 0554 3p85GeV_fixedTarget_2021 */ ( run >= 22121044 && run <= 22125011 ) || + /* 2021: 0576 tune_44p5GeV_fixedTarget_2021 */ ( run >= 22126003 && run <= 22126009 ) || + /* 2021: 0577 44p5GeV_fixedTarget_2021 */ ( run >= 22126010 && run <= 22126023 ) || + /* 2021: 0580 tune_44p5GeV_fixedTarget_2021 */ ( run >= 22126024 && run <= 22126024 ) || + /* 2021: 0581 44p5GeV_fixedTarget_2021 */ ( run >= 22126025 && run <= 22126029 ) || + /* 2021: 0582 70GeV_fixedTarget_2021 */ ( run >= 22126045 && run <= 22127018 ) || + /* 2021: 0585 100GeV_fixedTarget_2021 */ ( run >= 22128001 && run <= 22128011 ) || + /* 2021: 0760 tune_26p5GeV_fixedTarget_2021 */ ( run >= 22154032 && run <= 22154034 ) || + /* 2021: 0762 26p5GeV_fixedTarget_2021 */ ( run >= 22154036 && run <= 22154037 ) || + /* 2021: 0783 tune_3p85GeV_fixedTarget_2021 */ ( run >= 22158025 && run <= 22158031 ) || + /* 2021: 0784 3p85GeV_fixedTarget_2021 */ ( run >= 22158032 && run <= 22158033 ) || + /* 2021: 0785 tune_3p85GeV_fixedTarget_2021 */ ( run >= 22158035 && run <= 22158035 ) || + /* 2021: 0786 3p85GeV_fixedTarget_2021 */ ( run >= 22158036 && run <= 22158036 ) || + /* 2021: 0787 tune_3p85GeV_fixedTarget_2021 */ ( run >= 22158037 && run <= 22158037 ) || + /* 2021: 0788 3p85GeV_fixedTarget_2021 */ ( run >= 22159001 && run <= 22159001 ) || + /* 2021: 0789 tune_3p85GeV_fixedTarget_2021 */ ( run >= 22159002 && run <= 22159002 ) || + /* 2021: 0790 3p85GeV_fixedTarget_2021 */ ( run >= 22159003 && run <= 22159015 ) || + /* 2021: 0794 tune_3p85GeV_fixedTarget_2021 */ ( run >= 22159026 && run <= 22159050 ) || + /* 2021: 0798 3p85GeV_fixedTarget_2021 */ ( run >= 22159051 && run <= 22160032 ) || + /* 2021: 0801 tune_3p85GeV_fixedTarget_2021 */ ( run >= 22160045 && run <= 22160045 ) || + /* 2021: 0802 3p85GeV_fixedTarget_2021 */ ( run >= 22160046 && run <= 22168015 ) || + /* 2021: 0841 tune_26p5GeV_fixedTarget_2021 */ ( run >= 22168028 && run <= 22168028 ) || + /* 2021: 0842 26p5GeV_fixedTarget_2021 */ ( run >= 22168037 && run <= 22170022 ) || + /* 2021: 0858 3p85GeV_fixedTarget_2021 */ ( run >= 22171021 && run <= 22172010 ) || + /* 2021: 0862 3p85GeV_fixedTarget_2021 */ ( run >= 22172022 && run <= 22174019 ) || + /* 2021: 0874 3p85GeV_fixedTarget_2021 */ ( run >= 22174046 && run <= 22178013 ) || + /* 2021: 0885 tune_26p5GeV_fixedTarget_2021 */ ( run >= 22178018 && run <= 22178018 ) || + /* 2021: 0886 26p5GeV_fixedTarget_2021 */ ( run >= 22178019 && run <= 22178021 ) || + /* 2021: 0887 tune_26p5GeV_fixedTarget_2021 */ ( run >= 22178025 && run <= 22178025 ) || + /* 2021: 0888 26p5GeV_fixedTarget_2021 */ ( run >= 22178026 && run <= 22178029 ) || + /* 2021: 0889 tune_26p5GeV_fixedTarget_2021 */ ( run >= 22178030 && run <= 22178030 ) || + /* 2021: 0890 26p5GeV_fixedTarget_2021 */ ( run >= 22178031 && run <= 22178033 ) || + /* 2021: 0893 tune_3p85GeV_fixedTarget_2021 */ ( run >= 22179019 && run <= 22179019 ) || + /* 2021: 0894 3p85GeV_fixedTarget_2021 */ ( run >= 22179020 && run <= 22179022 ) || + /* 2021: 0915 tune_26p5GeV_fixedTarget_2021 */ ( run >= 22183023 && run <= 22183023 ) || + /* 2021: 0916 26p5GeV_fixedTarget_2021 */ ( run >= 22183024 && run <= 22183028 ) || + /* 2021: 0920 tune_26p5GeV_fixedTarget_2021 */ ( run >= 22184016 && run <= 22184016 ) || + /* 2021: 0921 26p5GeV_fixedTarget_2021 */ ( run >= 22184017 && run <= 22184019)) ) return kTRUE; + return kFALSE; +#if 0 Float_t MaxIntensity = TMath::Max(blueIntensity(), yellowIntensity()); Float_t MinIntensity = TMath::Min(blueIntensity(), yellowIntensity()); if (MaxIntensity > 0.5) { @@ -2541,14 +2751,14 @@ Bool_t St_beamInfoC::IsFixedTarget() { ) isFixTag = kTRUE; } return isFixTag; +#endif } //________________________________________________________________________________ Float_t St_beamInfoC::GammaYellow() { Float_t gamma = 1; - Int_t N = TMath::Nint(getYellowMassNumber()); // no. of nucleons - if (N < 1) N = 1; + Int_t N; + Double_t M = BeamMass(getYellowMassNumber(), getYellowSpecies(), N); Double_t E = N*getYellowEnergy(); // total energy per nucleon - Double_t M = kuAtomicMassUnit*N; gamma = E/M; return gamma; } @@ -2556,10 +2766,9 @@ Float_t St_beamInfoC::GammaYellow() { Float_t St_beamInfoC::GammaBlue() { Float_t gamma = 1; if (! IsFixedTarget()) { - Int_t N = TMath::Nint(getBlueMassNumber()); // no. of nucleons - if (N < 1) N = 1; + Int_t N; + Double_t M = BeamMass(getBlueMassNumber(), getBlueSpecies(), N); Double_t E = N*getBlueEnergy(); // total energy - Double_t M = kuAtomicMassUnit*N; if (E < M) E = M; gamma = E/M; } @@ -2567,8 +2776,12 @@ Float_t St_beamInfoC::GammaBlue() { } //________________________________________________________________________________ Float_t St_beamInfoC::GammaCMS() { - Double_t eBlue = kProtonMass*GammaBlue(); - Double_t eYellow = kProtonMass*GammaYellow(); + Int_t NBlue; + Double_t MBlue = BeamMass(getBlueMassNumber(), getBlueSpecies(), NBlue); + Double_t eBlue = MBlue*GammaBlue()/NBlue; + Int_t NYellow; + Double_t MYellow = BeamMass(getYellowMassNumber(), getYellowSpecies(), NYellow); + Double_t eYellow = MYellow*GammaYellow()/NYellow; Double_t Etot = eBlue + eYellow; Double_t Ecm = SqrtS(); Double_t gammaCM = Etot/Ecm; @@ -2586,18 +2799,29 @@ Float_t St_beamInfoC::BetaYellow() { } //________________________________________________________________________________ Float_t St_beamInfoC::BetaCMS() { - Double_t eBlue = kProtonMass*GammaBlue(); - Double_t eYellow = kProtonMass*GammaYellow(); + Int_t NBlue; + Double_t MBlue = BeamMass(getBlueMassNumber(), getBlueSpecies(), NBlue); + Double_t MBluePerNucleon = MBlue/NBlue; + Double_t eBlue = MBluePerNucleon*GammaBlue(); + Int_t NYellow; + Double_t MYellow = BeamMass(getYellowMassNumber(), getYellowSpecies(), NYellow); + Double_t MYellowPerNucleon = MYellow/NYellow; + Double_t eYellow = MYellowPerNucleon*GammaYellow(); Double_t Etot = eBlue + eYellow; Double_t betaCM = (eBlue*BetaBlue() + eYellow*BetaYellow())/Etot; return betaCM; } //________________________________________________________________________________ Float_t St_beamInfoC::SqrtS() { - static Double_t mP = kuAtomicMassUnit*1.00727646662; // proton mass - Double_t eBlue = mP*GammaBlue(); - Double_t eYellow = mP*GammaYellow(); - return TMath::Sqrt(2*mP*mP + 2*eBlue*eYellow*(1 - BetaBlue()*BetaYellow())); + Int_t NBlue; + Double_t MBlue = BeamMass(getBlueMassNumber(), getBlueSpecies(), NBlue); + Double_t MBluePerNucleon = MBlue/NBlue; + Double_t eBlue = MBluePerNucleon*GammaBlue(); + Int_t NYellow; + Double_t MYellow = BeamMass(getYellowMassNumber(), getYellowSpecies(), NYellow); + Double_t MYellowPerNucleon = MYellow/NYellow; + Double_t eYellow = MYellowPerNucleon*GammaYellow(); + return TMath::Sqrt(MBluePerNucleon*MBluePerNucleon + MYellowPerNucleon*MYellowPerNucleon + 2*eBlue*eYellow*(1 - BetaBlue()*BetaYellow())); } //________________________________________________________________________________ Float_t St_beamInfoC::Ycms() { @@ -2772,7 +2996,9 @@ MakeChairInstance2(Survey,StsstSensorOnLadder,Geometry/sst/sstSensorOnLadder); MakeChairAltInstance2(Survey,StTpcInnerSectorPosition,Geometry/tpc/TpcInnerSectorPosition,Geometry/tpc/TpcInnerSectorPositionB,gEnv->GetValue("NewTpcAlignment",0)); MakeChairAltInstance2(Survey,StTpcOuterSectorPosition,Geometry/tpc/TpcOuterSectorPosition,Geometry/tpc/TpcOuterSectorPositionB,gEnv->GetValue("NewTpcAlignment",0)); MakeChairAltInstance2(Survey,StTpcSuperSectorPosition,Geometry/tpc/TpcSuperSectorPosition,Geometry/tpc/TpcSuperSectorPositionB,gEnv->GetValue("NewTpcAlignment",0)); +MakeChairInstance2(Survey,StTpcSuperSectorPositionD,Geometry/tpc/TpcSuperSectorPositionD); MakeChairInstance2(Survey,StTpcHalfPosition,Geometry/tpc/TpcHalfPosition); +MakeChairInstance2(Survey,StTpcWheelPosition,Geometry/tpc/TpcWheelPosition); MakeChairInstance2(Survey,StTpcPosition,Geometry/tpc/TpcPosition); #include "St_iTPCSurveyC.h" MakeChairInstance(iTPCSurvey,Geometry/tpc/iTPCSurvey); @@ -2900,6 +3126,10 @@ void St_SurveyC::Normalize(TGeoHMatrix &R) { } //________________________________________________________________________________ const TGeoHMatrix &St_SurveyC::GetMatrix(Int_t i) { +#if 0 + static TGeoIdentity identity; + if (i > (Int_t) getNumRows()) return *&identity; +#endif assert(fRotations || fRotations[i]); assert(TMath::Abs(fRotations[i]->Determinant())-1 < 1.e-3); return *fRotations[i]; @@ -2965,10 +3195,13 @@ St_SurveyC *St_SurveyC::instance(const Char_t *name) { if (Name == "SsdSectorsOnGlobal") return (St_SurveyC *) StSsdSectorsOnGlobal::instance(); if (Name == "SsdLaddersOnSectors") return (St_SurveyC *) StSsdLaddersOnSectors::instance(); if (Name == "SsdWafersOnLadders") return (St_SurveyC *) StSsdWafersOnLadders::instance(); + if (Name == "TpcPosition") return (St_SurveyC *) StTpcPosition::instance(); + if (Name == "TpcHalfPosition") return (St_SurveyC *) StTpcHalfPosition::instance(); + if (Name == "TpcWheelPosition") return (St_SurveyC *) StTpcWheelPosition::instance(); + if (Name == "TpcSuperSectorPosition") return (St_SurveyC *) StTpcSuperSectorPosition::instance(); + if (Name == "TpcSuperSectorPositionD")return (St_SurveyC *) StTpcSuperSectorPositionD::instance(); if (Name == "TpcInnerSectorPosition") return (St_SurveyC *) StTpcInnerSectorPosition::instance(); if (Name == "TpcOuterSectorPosition") return (St_SurveyC *) StTpcOuterSectorPosition::instance(); - if (Name == "TpcSuperSectorPosition") return (St_SurveyC *) StTpcSuperSectorPosition::instance(); - if (Name == "TpcHalfPosition") return (St_SurveyC *) StTpcHalfPosition::instance(); if (Name == "idsOnTpc") return (St_SurveyC *) StidsOnTpc::instance(); if (Name == "pstOnIds") return (St_SurveyC *) StpstOnIds::instance(); if (Name == "istOnPst") return (St_SurveyC *) StistOnPst::instance(); @@ -2977,6 +3210,28 @@ St_SurveyC *St_SurveyC::instance(const Char_t *name) { if (Name == "istSensorOnLadder") return (St_SurveyC *) StistSensorOnLadder::instance(); return 0; } +//________________________________________________________________________________ +void St_SurveyC::GetGraphs(const St_Survey* table, TGraph* g[6]) { + if (! table) return; + Int_t N = table->GetNRows(); + const Char_t *Names[6] = {"x","y","z","#alpha","#beta","#gamma"}; + TArrayD S(N); + TArrayD X(6*N), eX(6*N); + Survey_st *row = table->GetTable(); + for (Int_t i = 0; i < N; i++, row++) { + S[i] = i + 1; + X[0*N+i] = 1e4*row->t0; eX[0*N+i] = 1e4*row->sigmaTrX; + X[1*N+i] = 1e4*row->t1; eX[1*N+i] = 1e4*row->sigmaTrY; + X[2*N+i] = 1e4*row->t2; eX[2*N+i] = 1e4*row->sigmaTrZ; + X[3*N+i] = 1e3*row->r21; eX[3*N+i] = 1e3*row->sigmaRotX; + X[4*N+i] = 1e3*row->r02; eX[4*N+i] = 1e3*row->sigmaRotY; + X[5*N+i] = 1e3*row->r10; eX[5*N+i] = 1e3*row->sigmaRotZ; + } + for (Int_t i = 0; i < 6; i++) { + // g[i] = new TGraphErrors(N, S.GetArray(), X.GetArray()+i*N, 0, eX.GetArray()+i*N); g[i]->SetName(Names[i]); + g[i] = new TGraph(N, S.GetArray(), X.GetArray()+i*N); g[i]->SetName(Names[i]); + } +} //__________________Calibrations/rhic______________________________________________________________ #include "St_vertexSeedC.h" MakeChairInstance(vertexSeed,Calibrations/rhic/vertexSeed); diff --git a/StRoot/StDetectorDbMaker/StTpcSurveyC.h b/StRoot/StDetectorDbMaker/StTpcSurveyC.h index 29fa41b0772..85b152cba3f 100644 --- a/StRoot/StDetectorDbMaker/StTpcSurveyC.h +++ b/StRoot/StDetectorDbMaker/StTpcSurveyC.h @@ -32,7 +32,32 @@ class StTpcSuperSectorPosition : public St_SurveyC {// Extra rotation for whole ClassDef(StTpcSuperSectorPosition,1) //C++ TChair for TpcSuperSectorPosition }; -class StTpcHalfPosition : public St_SurveyC {// Extra rotation for half of Tpc to Tpc +class StTpcSuperSectorPositionD : public St_SurveyC {// Extra rotation for whole Super Sector to half Tpc, part depending on direction of Mag.field + public: + static StTpcSuperSectorPositionD* instance(); + StTpcSuperSectorPositionD(St_Survey *table=0) : St_SurveyC(table) {} + virtual ~StTpcSuperSectorPositionD() {fgInstance = 0;} + private: + static StTpcSuperSectorPositionD* fgInstance; + ClassDef(StTpcSuperSectorPositionD,1) //C++ TChair for TpcSuperSectorPositionD +}; + +class StTpcWheelPosition : public St_SurveyC {// Extra rotation for Wheel to Tpc (no drift) + public: + static StTpcWheelPosition* instance(); + StTpcWheelPosition(St_Survey *table=0) : St_SurveyC(table) {} + virtual ~StTpcWheelPosition() {fgInstance = 0;} + const TGeoHMatrix &GetEastMatrix() {return GetMatrix(east);} + const TGeoHMatrix &GetWestMatrix() {return GetMatrix(west);} + const TGeoHMatrix &GetEastMatrixR() {return GetMatrixR(east);} + const TGeoHMatrix &GetWestMatrixR() {return GetMatrixR(west);} + static void Normalize(TGeoHMatrix &R) {} + private: + static StTpcWheelPosition* fgInstance; + ClassDef(StTpcWheelPosition,1) //C++ TChair for TpcWheelPosition +}; + +class StTpcHalfPosition : public St_SurveyC {// Extra rotation for half to Tpc public: static StTpcHalfPosition* instance(); StTpcHalfPosition(St_Survey *table=0) : St_SurveyC(table) {} diff --git a/StRoot/StDetectorDbMaker/St_CosmicsDelayC.h b/StRoot/StDetectorDbMaker/St_CosmicsDelayC.h new file mode 100644 index 00000000000..1891b82671a --- /dev/null +++ b/StRoot/StDetectorDbMaker/St_CosmicsDelayC.h @@ -0,0 +1,23 @@ +#ifndef St_CosmicsDelayC_h +#define St_CosmicsDelayC_h + +#include "TChair.h" +#include "tables/St_starTriggerDelay_Table.h" + +class St_CosmicsDelayC : public TChair { + public: + static St_CosmicsDelayC* instance(); + starTriggerDelay_st *Struct(Int_t i = 0) const {return ((St_starTriggerDelay*) Table())->GetTable()+i;} + UInt_t getNumRows() const {return GetNRows();} + Float_t clocks(Int_t i = 0) const {return Struct(i)->clocks;} + Float_t tZero(Int_t i = 0) const {return Struct(i)->tZero;} + Float_t TrigT0(Int_t i = 0) const; // usec + Float_t TrigT0GG(Int_t io = 0, Int_t i = 0) const; // usec add cables + protected: + St_CosmicsDelayC(St_starTriggerDelay *table=0) : TChair(table) {} + virtual ~St_CosmicsDelayC() {if (Table()->IsMarked()) delete GetThisTable(); fgInstance = 0;} + private: + static St_CosmicsDelayC* fgInstance; + ClassDef(St_CosmicsDelayC,1) //C++ TChair for starTriggerDelay table class +}; +#endif diff --git a/StRoot/StDetectorDbMaker/St_SurveyC.h b/StRoot/StDetectorDbMaker/St_SurveyC.h index b576a913154..7c7891aaadb 100644 --- a/StRoot/StDetectorDbMaker/St_SurveyC.h +++ b/StRoot/StDetectorDbMaker/St_SurveyC.h @@ -1,9 +1,9 @@ #ifndef St_SurveyC_h #define St_SurveyC_h - #include "TChair.h" #include "tables/St_Survey_Table.h" #include "TGeoMatrix.h" +#include "TGraph.h" class St_SurveyC : public TChair { public: virtual ~St_SurveyC(); @@ -40,6 +40,7 @@ class St_SurveyC : public TChair { const Double_t *t(Int_t i = 0) const {return &Struct(i)->t0;} static void Normalize(TGeoHMatrix &rot); static Double_t IsOrtogonal(const Double_t *r); + static void GetGraphs(const St_Survey* table, TGraph *g[6]); protected: St_SurveyC(St_Survey *table=0); private: diff --git a/StRoot/StDetectorDbMaker/St_beamInfoC.h b/StRoot/StDetectorDbMaker/St_beamInfoC.h index 8b7e60d0b78..2a9516ac478 100644 --- a/StRoot/StDetectorDbMaker/St_beamInfoC.h +++ b/StRoot/StDetectorDbMaker/St_beamInfoC.h @@ -51,6 +51,7 @@ class St_beamInfoC : public TChair { Float_t Frequency(); Float_t SqrtS(); Float_t Ycms(); + static Double_t BeamMass(Int_t MassNumber, const Char_t *Species, Int_t &A); protected: St_beamInfoC(St_beamInfo *table=0) : TChair(table) {} virtual ~St_beamInfoC() {fgInstance = 0;} diff --git a/StRoot/StDetectorDbMaker/StiChairs.cxx b/StRoot/StDetectorDbMaker/StiChairs.cxx index 15f9503b8ce..a4b9c4901a1 100644 --- a/StRoot/StDetectorDbMaker/StiChairs.cxx +++ b/StRoot/StDetectorDbMaker/StiChairs.cxx @@ -1,3 +1,4 @@ +#include "Riostream.h" #include "TMath.h" #include "StarChairDefs.h" #include "St_db_Maker/St_db_Maker.h" @@ -52,7 +53,7 @@ MakeChairInstance2(KalmanTrackFitterParameters,StiKalmanTrackFitterParameters,Ca MakeChairInstance2(KalmanTrackFinderParameters,StiKalmanTrackFinderParameters,Calibrations/tracker/KalmanTrackFinderParameters); #include "StiTpcHitErrorMDF4.h" //________________________________________________________________________________ -void StiTpcHitErrorMDF4::convert(Double_t _z, Double_t _eta, Double_t _tanl, Double_t AdcL) { +void StiTpcHitErrorMDF4::convert(Double_t _z, Double_t _eta, Double_t _tanl, Double_t AdcL) const { fxx[0] = 1. - TMath::Abs(_z)/207.707; // Z Double_t y = TMath::Tan(_eta); fxx[1] = y*y; // tanP**2 @@ -63,16 +64,20 @@ void StiTpcHitErrorMDF4::convert(Double_t _z, Double_t _eta, Double_t _tanl, Do void StiTpcHitErrorMDF4::calculateError(Double_t _z, Double_t _eta, Double_t _tanl, Double_t &ecross, Double_t &edip, Double_t fudgeFactor, Double_t AdcL, - Double_t *dZ, Double_t *dX) { - static const Double_t tenMicrons = 1e-3; - static const Double_t min2Err = tenMicrons*tenMicrons; + Double_t *dZ, Double_t *dX) const { + static const Double_t hundredMicrons = 1e-2; + static const Double_t min2Err = hundredMicrons*hundredMicrons; static const Double_t max2Err = 1.; static const Double_t scale = 1.; + static Double_t timeP = -1; + static Double_t padP = -1; + timeP = timePitch(); + padP = padPitch(); convert(_z, _eta, _tanl, AdcL); Double_t dPadSigmaSQ = Eval( 0, fxx); Double_t dTimeSigmaSQ = Eval( 2, fxx); - ecross = scale*padPitch() *padPitch() *dPadSigmaSQ * fudgeFactor; - edip = scale*timePitch()*timePitch()*dTimeSigmaSQ * fudgeFactor; + ecross = scale*padP *padP *dPadSigmaSQ ; + edip = scale*timeP*timeP*dTimeSigmaSQ; Int_t fail = 0; if (ecross< min2Err) {ecross = min2Err; fail++;} if (ecross> max2Err) {ecross = max2Err; fail++;} @@ -82,16 +87,29 @@ void StiTpcHitErrorMDF4::calculateError(Double_t _z, Double_t _eta, Double_t _t if (fail) *dZ = 0; else { Double_t dTime = Eval( 3, fxx); - *dZ = - timePitch()*dTime * TMath::Sign(1., _z); + *dZ = - timeP*dTime * TMath::Sign(1., _z); } } if (dX) { if (fail) *dX = 0; else { Double_t dPad = Eval( 1, fxx); - *dX = - padPitch()*dPad; + *dX = - padP*dPad; } } + if (fudgeFactor > 1.0) { + ecross *= fudgeFactor; + edip *= fudgeFactor; + } + static Int_t _debug = 0; + if (_debug) { + cout << "z = " << _z << " eta = " << _eta << " tanl = " << _tanl << " AdcL = " << AdcL << " fudgeFactor = " << fudgeFactor + << ": ecross = " << ecross << " edip = " << edip; + if (dZ) cout << " dZ = " << *dZ; + if (dX) cout << " dX = " << *dX; + cout << endl; + _debug++; + } } MakeChairInstance2(MDFCorrection4,StiTpcInnerHitErrorMDF4,Calibrations/tracker/TpcInnerHitErrorMDF4); MakeChairInstance2(MDFCorrection4,StiTpcOuterHitErrorMDF4,Calibrations/tracker/TpcOuterHitErrorMDF4); diff --git a/StRoot/StDetectorDbMaker/StiTpcHitErrorMDF4.h b/StRoot/StDetectorDbMaker/StiTpcHitErrorMDF4.h index 5d2ef96dd7d..01346c27345 100644 --- a/StRoot/StDetectorDbMaker/StiTpcHitErrorMDF4.h +++ b/StRoot/StDetectorDbMaker/StiTpcHitErrorMDF4.h @@ -1,6 +1,5 @@ #ifndef StiTpcHitErrorMDF4_h #define StiTpcHitErrorMDF4_h - #include "Sti/StiNodePars.h" #include "St_MDFCorrection4C.h" #include "StDetectorDbMaker/St_tpcDriftVelocityC.h" @@ -10,20 +9,20 @@ class StiTpcHitErrorMDF4 : public St_MDFCorrection4C { public: virtual void calculateError(Double_t _z, Double_t _eta, Double_t _tanl, Double_t &ecross, Double_t &edip, - Double_t fudgeFactor = 1, Double_t AdcL = 5.5, Double_t *dZ = 0, Double_t *dX = 0); + Double_t fudgeFactor = 1, Double_t AdcL = 5.5, Double_t *dZ = 0, Double_t *dX = 0) const; virtual void calculateError(const StiNodePars *pars, Double_t &ecross, Double_t &edip, - Double_t fudgeFactor = 1, Double_t AdcL = 5.5, Double_t *dZ = 0, Double_t *dX = 0) { + Double_t fudgeFactor = 1, Double_t AdcL = 5.5, Double_t *dZ = 0, Double_t *dX = 0) const { calculateError(pars->z(), pars->eta(), pars->tanl(), ecross, edip, fudgeFactor, AdcL, dZ, dX); } protected: - StiTpcHitErrorMDF4(St_MDFCorrection4 *table=0) : St_MDFCorrection4C(table) {} + StiTpcHitErrorMDF4(St_MDFCorrection4 *table=0) : St_MDFCorrection4C(table) {} virtual ~StiTpcHitErrorMDF4() {} private: - void convert(Double_t _z, Double_t _eta, Double_t _tanl, Double_t AdcL); - Double_t fxx[4]; - virtual Double_t padPitch() = 0; - Double_t timePitch() {return St_tpcDriftVelocityC::instance()->timeBucketPitch();} + void convert(Double_t _z, Double_t _eta, Double_t _tanl, Double_t AdcL) const; + mutable Double_t fxx[4]; + virtual Double_t padPitch() const = 0; + Double_t timePitch() const {return St_tpcDriftVelocityC::instance()->timeBucketPitch();} ClassDefineChair(StiTpcHitErrorMDF4,St_MDFCorrection4, MDFCorrection4_st ) ClassDef(StiTpcHitErrorMDF4,1) //C++ TChair for MDFCorrection4 table class }; @@ -36,7 +35,7 @@ class StiTpcInnerHitErrorMDF4 : public StiTpcHitErrorMDF4 { virtual ~StiTpcInnerHitErrorMDF4() {fgInstance = 0;} private: static StiTpcInnerHitErrorMDF4* fgInstance; - Double_t padPitch() {return St_tpcPadConfigC::instance()->innerSectorPadPitch();} + Double_t padPitch() const {return St_tpcPadConfigC::instance()->innerSectorPadPitch();} ClassDef(StiTpcInnerHitErrorMDF4,1) //C++ TChair for MDFCorrection4 table class }; //________________________________________________________________________________ @@ -48,7 +47,7 @@ class StiTpcOuterHitErrorMDF4 : public StiTpcHitErrorMDF4 { virtual ~StiTpcOuterHitErrorMDF4() {fgInstance = 0;} private: static StiTpcOuterHitErrorMDF4* fgInstance; - Double_t padPitch() {return St_tpcPadConfigC::instance()->innerSectorPadPitch();} + Double_t padPitch() const {return St_tpcPadConfigC::instance()->outerSectorPadPitch();} ClassDef(StiTpcOuterHitErrorMDF4,1) //C++ TChair for MDFCorrection4 table class }; diff --git a/StRoot/StEvent/StTpcHit.cxx b/StRoot/StEvent/StTpcHit.cxx index 520e8c478d3..9537d202ff0 100644 --- a/StRoot/StEvent/StTpcHit.cxx +++ b/StRoot/StEvent/StTpcHit.cxx @@ -72,15 +72,20 @@ * Completely Revised for New Version * **************************************************************************/ +#include #include "StTpcHit.h" #include "StTrack.h" +#include "StDetectorDbMaker/St_tpcPadConfigC.h" static const char rcsid[] = "$Id: StTpcHit.cxx,v 2.19 2011/10/17 00:13:49 fisyak Exp $"; - +#ifdef __TFG__VERSION__ +TString StTpcHit::fgFMT("/HALL_1/CAVE_1/TpcRefSys_1/TPCE_1/TPGV_%d/TPSS_%d/TPAD_%d"); +#endif /* __TFG__VERSION__ */ StMemoryPool StTpcHit::mPool(sizeof(StTpcHit)); ClassImp(StTpcHit) - +//________________________________________________________________________________ void StTpcHit::setExtends(Float_t cl_x, Float_t cl_t, Short_t mnpad, Short_t mxpad, Short_t mntmbk, Short_t mxtmbk) { + assert(cl_x > 0 && cl_t > 0); // && mAdc > 0); mAdc == 0 may come from StTpcFastSimMaker setPadTmbk(cl_x, cl_t); Short_t pad = TMath::Nint(mMcl_x/64.); Short_t time = TMath::Nint(mMcl_t/64.); @@ -89,14 +94,59 @@ void StTpcHit::setExtends(Float_t cl_x, Float_t cl_t, Short_t mnpad, Short_t mxp mMintmbk = time - mntmbk; mMaxtmbk = mxtmbk - time; } - +//________________________________________________________________________________ ostream& operator<<(ostream& os, const StTpcHit& v) { return os << Form("Tpc s/r %3i/%3i ",v.sector(),v.padrow()) << *((StHit *)&v) - << Form(" pmin/max %3i/%3i np %2i tmin/max %3i/%3i nt %2i tm %6.2f pad %6.2f adc %4i", + << Form(" dX %5.2f",v.dX()) + << Form(" pmin/max %3i/%3i np %2i tmin/max %3i/%3i nt %2i tm %6.2f pad %6.2f adc %5i", (Int_t) v.minPad(), (Int_t) v.maxPad(),(Int_t) v.padsInHit(), (Int_t) v.minTmbk(), (Int_t) v.maxTmbk(),(Int_t) v.timeBucketsInHit(), v.timeBucket(),v.pad(), v.adc()); } +//________________________________________________________________________________ void StTpcHit::Print(Option_t *option) const {cout << *this << endl;} +//________________________________________________________________________________ +#ifdef __TFG__VERSION__ + const Char_t *StTpcHit::GetPath() const { + Int_t sec = sector(); + Int_t half = (sec - 1)/12 + 1; + Int_t sectorVMC = (sec - 1)%12 + 1; + Int_t rowRC = padrow(); + Int_t rowVMC = 0; + Int_t NoOfInnerRows = St_tpcPadConfigC::instance()->innerPadRows(sec); + Int_t NoOfRows = St_tpcPadConfigC::instance()->padRows(sec); + if (NoOfInnerRows == 13) { + if (rowRC <= NoOfInnerRows) {rowVMC = 3*(rowRC - 1) + 2; } + else {rowVMC = (rowRC - 14 + 41); } + if (rowVMC > 72) rowVMC = 72; + } else {// iTPC + if (rowRC <= NoOfInnerRows) { + rowVMC = rowRC + 1; + if (rowVMC < 2) rowVMC = 2; + if (rowVMC > 41) rowVMC = 41; + } else { + rowVMC = rowRC + 3; + if (rowVMC < 44) rowVMC = 44; + if (rowRC > NoOfRows) rowRC = NoOfRows; + } + } + // Int_t planeId = 100*sec + rowRC; + Int_t indx[3] = {half, sectorVMC, rowVMC}; + static TString path; + path = FormPath(fgFMT,3,indx); + return path.Data(); +} +#endif /* __TFG__VERSION__ */ +//________________________________________________________________________________ +Int_t StTpcHit:: Compare(const TObject *obj) const { + StTpcHit *hit = (StTpcHit *) obj; + if (sector() < hit->sector()) return -1; + else if (sector() > hit->sector()) return 1; + if (padrow() < hit->padrow()) return -1; + else if (padrow() > hit->padrow()) return 1; + if (TMath::Abs(position().z()) < TMath::Abs(hit->position().z())) return -1; + else if (TMath::Abs(position().z()) > TMath::Abs(hit->position().z())) return 1; + return 0; +} diff --git a/StRoot/StEvent/StTpcHit.h b/StRoot/StEvent/StTpcHit.h index f9e1f6ce91c..d90312ee31e 100644 --- a/StRoot/StEvent/StTpcHit.h +++ b/StRoot/StEvent/StTpcHit.h @@ -115,11 +115,11 @@ #include "StHit.h" #include "StMemoryPool.hh" #include "TMath.h" - +#include "TString.h" class StTpcHit : public StHit { public: - StTpcHit() : StHit() {mMinpad = mMaxpad = mMintmbk = mMaxtmbk = 0; mMcl_x = mMcl_t = 0; mAdc =0; mChargeModified = 0; mdX = 0;} + StTpcHit() : StHit() {mMinpad = mMaxpad = mMintmbk = mMaxtmbk = 0; mMcl_x = mMcl_t = 0; mAdc =0; mChargeModified = mdX = mdY = mdZ = 0;} StTpcHit(const StThreeVectorF& p, const StThreeVectorF& e, UInt_t hw, float q, UChar_t c = 0, @@ -128,7 +128,9 @@ class StTpcHit : public StHit { Short_t mnpad=0, Short_t mxpad=0, Short_t mntmbk=0, Short_t mxtmbk=0, Float_t cl_x = 0, Float_t cl_t = 0, UShort_t Adc = 0) : StHit(p, e, hw, q, c, IdTruth, quality, Id), mAdc(Adc) { - setExtends(cl_x, cl_t, mnpad, mxpad, mntmbk, mxtmbk); mChargeModified = 0; mdX = 0;} + mChargeModified = mdX = mdY = mdZ = 0; + setExtends(cl_x, cl_t, mnpad, mxpad, mntmbk, mxtmbk); + } ~StTpcHit() {} StDetectorId detector() const; @@ -141,7 +143,9 @@ class StTpcHit : public StHit { void setPadTmbk(Float_t cl_x, Float_t cl_t) { mMcl_x = TMath::Nint(cl_x*64); mMcl_t = TMath::Nint(cl_t*64);} void setExtends(Float_t cl_x, Float_t cl_t, Short_t mnpad, Short_t mxpad, Short_t mntmbk, Short_t mxtmbk); void setAdc(UShort_t Adc = 0) {mAdc = Adc;} - void setdX(Float_t dX) {mdX = dX;} + void setdX(Float_t DX) {mdX = DX;} + void setdY(Float_t DY) {mdY = DY;} + void setdZ(Float_t DZ) {mdZ = DZ;} UInt_t sector() const {return bits(4, 5);} // bits 4-8 -> 1-24 UInt_t padrow() const {return bits(9, 7);} // bits 9-15 -> 1-128 UInt_t padsInHit() const {return maxPad() - minPad() + 1;} @@ -153,38 +157,46 @@ class StTpcHit : public StHit { Int_t volumeID() const {return 100 * sector() + padrow();} Short_t timeBucketsInHit() const {return maxTmbk() - minTmbk() + 1;} // number of time bucket fired in this hit Float_t timeBucket() const {return static_cast(mMcl_t)/64.;} + Float_t timeBucketC()const {return mTimeBucket;} Float_t pad() const {return static_cast(mMcl_x)/64.;} UShort_t adc() const {return mAdc;} Float_t chargeModified() const {return mChargeModified;} - Float_t dX() {return mdX;} + Float_t dX() const {return mdX;} + Float_t dY() const {return mdY;} + Float_t dZ() const {return mdZ;} void Print(Option_t *option="") const; virtual Bool_t IsSortable() const { return kTRUE; } - virtual Int_t Compare(const TObject *obj) const { - StTpcHit *hit = (StTpcHit *) obj; - if (sector() > hit->sector()) return kTRUE; - if (padrow() > hit->padrow()) return kTRUE; - if (TMath::Abs(position().z()) > TMath::Abs(hit->position().z())) return kTRUE; - return kFALSE; - } + virtual Int_t Compare(const TObject *obj) const; virtual const StThreeVectorF& positionU() const {return *&mPositionU;} virtual const StThreeVectorF& positionL() const {return *&mPositionL;} virtual void setPositionU(const StThreeVectorF& p) {mPositionU = p;} virtual void setPositionL(const StThreeVectorF& p) {mPositionL = p;} - + virtual void setTimeBucket(Float_t tb) {mTimeBucket = tb;} +#ifdef __TFG__VERSION__ + static const Char_t *GetFMT() {return fgFMT.Data();} + static void SetFMT(const Char_t *path=0) {fgFMT = path;} + virtual const Char_t *GetPath() const; +#endif /* __TFG__VERSION__ */ protected: static StMemoryPool mPool; //! - UChar_t mMinpad; /* central pad - lowest pad id in this hit*/ - UChar_t mMaxpad; /* highest pad id in this hit - central pad */ - UChar_t mMintmbk; /* central timebucket - lowest time bucket in hit*/ - UChar_t mMaxtmbk; /* highest time bucket in hit - central timebucket */ - Short_t mMcl_x; /* average pad*64 */ - Short_t mMcl_t; /* average timebucket*64 */ - UShort_t mAdc; /* cluster ADC sum */ - Float_t mChargeModified; //! - StThreeVectorF mPositionU; // upper position = y_local + padlength/2. - StThreeVectorF mPositionL; // lower position = y_local - padlength/2. - Float_t mdX; // estimated dX from StdEdxY2Maker - ClassDef(StTpcHit,10) + UChar_t mMinpad; /* central pad - lowest pad id in this hit*/ + UChar_t mMaxpad; /* highest pad id in this hit - central pad */ + UChar_t mMintmbk; /* central timebucket - lowest time bucket in hit*/ + UChar_t mMaxtmbk; /* highest time bucket in hit - central timebucket */ + Short_t mMcl_x; /* average pad*64 */ + Short_t mMcl_t; /* average timebucket*64 */ + UShort_t mAdc; /* cluster ADC sum */ + Float_t mChargeModified; //! + StThreeVectorF mPositionU; // upper position = y_local + padlength/2. + StThreeVectorF mPositionL; // lower position = y_local - padlength/2. + Float_t mdX; // estimated dX from StdEdxY2Maker + Float_t mTimeBucket; // average timebucket corrected + Float_t mdY; // Z correction from Hit error parameterization + Float_t mdZ; // Z correction from Hit error parameterization +#ifdef __TFG__VERSION__ + static TString fgFMT; +#endif /* __TFG__VERSION__ */ + ClassDef(StTpcHit,13) }; ostream& operator<<(ostream& os, StTpcHit const & v); diff --git a/StRoot/StStarLogger/Bfc.xml b/StRoot/StStarLogger/Bfc.xml new file mode 100644 index 00000000000..d3c3d3548d5 --- /dev/null +++ b/StRoot/StStarLogger/Bfc.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/StRoot/StTpcDb/PACKAGE b/StRoot/StTpcDb/PACKAGE index 8e1ddf2db11..2e53d3b7066 100644 --- a/StRoot/StTpcDb/PACKAGE +++ b/StRoot/StTpcDb/PACKAGE @@ -2,4 +2,3 @@ # package StTpcDb # author: Library:libStTpcDb.so:LIBS += -lglobal_Tables -lPhysics -lStChain -lStDb_Tables -lStDbUtilities -lStDetectorDbMaker -#Library:libStTpcDb.so:LIBS += -lglobal_Tables -lStChain -lStDb_Tables -lStDbUtilities -lStDetectorDbMaker -ltpc_Tables diff --git a/StRoot/StTpcDb/StTpcDb.cxx b/StRoot/StTpcDb/StTpcDb.cxx index 9fe152d16c5..0311ae90e02 100755 --- a/StRoot/StTpcDb/StTpcDb.cxx +++ b/StRoot/StTpcDb/StTpcDb.cxx @@ -11,177 +11,7 @@ * the data, and returns the data to the user via simple * interface classes. * - *************************************************************************** - * - * $Log: StTpcDb.cxx,v $ - * Revision 1.69 2021/03/26 20:26:48 fisyak - * Synchronize with TFG version, new schema for Inner Sector alignment (thank to Hongwei) - * - * Revision 1.65 2018/06/21 01:47:14 perev - * iTPCheckIn - * - * Revision 1.63.6.1 2018/02/16 22:14:59 perev - * iTPC - * - * Revision 1.63 2015/05/17 22:53:52 fisyak - * Remove duplicted line - * - * Revision 1.62 2014/07/01 20:28:32 fisyak - * Add alternative (B) table for new TPC alignment - * - * Revision 1.61 2014/06/27 14:04:25 fisyak - * Add env. NewTpcAlignment to switch between new and old scheme - * - * Revision 1.60 2014/06/26 21:32:57 fisyak - * New Tpc Alignment, v632 - * - * Revision 1.59 2012/09/17 19:39:44 fisyak - * Add rotation for Half Tpc's - * - * Revision 1.58 2012/05/03 23:56:48 fisyak - * Set interpolation for one week only, fix sign of interpolation (thanks Gene), add TriggerId - * - * Revision 1.57 2011/07/21 16:48:53 fisyak - * New schema for Sub Sector Alginement: SuperSectror position (defined by inner sub sector) and Outer sector position wrt SuperSectror position - * - * Revision 1.56 2011/01/18 14:39:43 fisyak - * Clean up TpcDb interfaces and Tpc coordinate transformation - * - * Revision 1.55 2010/05/27 19:14:26 fisyak - * Take out flavoring by 'sim' for tpcGlobalPosition,tpcSectorPosition and starClockOnl tables. remove usage tpcISTimeOffsets and tpcOSTimeOffsets tables - * - * Revision 1.54 2010/01/27 21:30:39 perev - * GetValidity now is static - * - * Revision 1.53 2010/01/26 21:04:42 fisyak - * Add new dE/dx calibration tables: TpcRowQ, tpcMethaneIn, tpcWaterOut, TpcZDC - * - * Revision 1.52 2009/12/07 23:44:58 fisyak - * Drop coordinate transformation for fortran, remove TpcHitErr - * - * Revision 1.51 2009/11/02 17:31:41 fisyak - * use directly field from StarMagField, replace St_tpcGainC and St_tpcT0C by St_tpcPadGainT0C, add remove defaults in coordinate transformations - * - * Revision 1.50 2009/03/16 14:13:30 fisyak - * Use StDetectorDb chairs for TpcGlobalPosition and TpcSectorPosition - * - * Revision 1.49 2008/09/10 15:46:36 fisyak - * Recalculate Tpc drift velocity once per event, avoid expensive conversion to unix time - * - * Revision 1.48 2008/08/01 14:28:22 fisyak - * Add new getT0, clean up - * - * Revision 1.47 2007/10/29 21:37:27 fisyak - * add protection from laserDriftVelocity and cathodeDriftVelocity mixing - * - * Revision 1.46 2007/08/12 15:06:30 fisyak - * Use separated East/West drift velocities only >= 2007, for back compartibility - * - * Revision 1.45 2007/07/19 22:19:23 perev - * Bug in drift velocity fixed - * - * Revision 1.44 2007/07/12 20:21:09 fisyak - * Drift velocity depends on TPC half, use online RHIC clock - * - * Revision 1.43 2007/04/16 22:51:03 fisyak - * Add protection from infinit endTime - * - * Revision 1.42 2007/04/15 20:57:01 fisyak - * Add drift velocity interpolation between two measurement in time - * - * Revision 1.41 2007/03/21 17:27:01 fisyak - * use TGeoHMatrix, change mode for switching drift velocities - * - * Revision 1.40 2005/07/06 22:26:53 fisyak - * dEdx_t=>dEdxY2_t - * - * Revision 1.39 2005/03/30 17:56:59 fisyak - * Fix a bug with flavor handling, StTpcDb has to be instantiated after setting flavor - * - * Revision 1.38 2004/11/19 10:21:54 jecc - * Initialize pointers - * - * Revision 1.37 2004/10/27 21:44:28 fisyak - * Add debug print for tables Validities, add access to ExB correction - * - * Revision 1.36 2004/03/16 22:17:46 jecc - * Update triggerTimeOffset() due to a change in L0 TriggerActionWd - * - * Revision 1.35 2004/02/23 00:35:00 fisyak - * Add access to tpcPadResponse - * - * Revision 1.34 2004/01/14 22:54:30 fisyak - * Add hooks for Pedestal and tpcGain - * - * Revision 1.33 2002/04/02 00:16:30 hardtke - * New class that gets hit errors from database - * - * Revision 1.32 2002/02/06 18:39:13 hardtke - * Add tpc Field Cage structure - * - * Revision 1.31 2001/08/14 18:18:03 hardtke - * Add sector position structures - * - * Revision 1.30 2001/06/20 22:25:26 hardtke - * Get TRS gain parameters from tsspar table - * - * Revision 1.29 2001/05/21 23:25:34 hardtke - * Add tpcGlobalPosition to StTpcDb. This includes the global position offset and the rotation w.r.t. the magnet - * - * Revision 1.28 2000/08/18 17:19:21 hardtke - * use laser velocity, if available - * - * Revision 1.27 2000/08/10 18:41:34 hardtke - * only look for L0_trigger table once per event -- improves timing - * - * Revision 1.26 2000/08/09 14:54:54 hardtke - * Add Clear option, set trigger table pointer to 0 after each event - * - * Revision 1.25 2000/08/09 13:00:03 hardtke - * Add protections to make sure trigger table is filled before using - * - * Revision 1.24 2000/08/08 19:15:22 hardtke - * use correct trigger time offset in case of laser - * - * Revision 1.23 2000/08/04 21:03:55 perev - * Leaks + Clear() cleanup - * - * Revision 1.22 2000/05/12 20:31:38 fisyak - * Add ClassImp for abstract classes, new rootcint requires them - * - * Revision 1.21 2000/05/11 17:17:27 hardtke - * make trigger time offset available -- currently NOT different for beam and laser events - * - * Revision 1.20 2000/04/05 15:44:56 hardtke - * fix solaris bug -- char* was too short for table name - * - * Revision 1.19 2000/03/30 17:02:36 hardtke - * limit warning message in StRTpcPadPlane - * - * Revision 1.18 2000/02/23 21:03:17 hardtke - * fix tpc_row_par -- causing tpt problems - * - * Revision 1.17 2000/02/15 22:21:47 hardtke - * Add effective drift distances - * - * Revision 1.16 2000/02/10 00:29:08 hardtke - * Add tpg functions to StTpcDbMaker, fix a few bugs - * - * Revision 1.15 2000/01/24 15:31:31 hardtke - * change to use new gain and t0 tables - * - * Revision 1.14 2000/01/11 15:49:52 hardtke - * get Electronics table from Calibrations database, Fix error messages - * - * Revision 1.13 1999/12/16 22:00:53 hardtke - * add CVS tags - * - **************************************************************************/ -////////////////////////////////////////////////////////////////////////// -// // -// StTpcDb // -// // -// // + ***************************************************************************/ #include "StChain.h" #include "StTpcDb.h" #include "tables/St_trgTimeOffset_Table.h" @@ -198,38 +28,16 @@ #include "TEnv.h" StTpcDb* gStTpcDb = 0; Bool_t StTpcDb::mOldScheme = kTRUE; +Bool_t StTpcDb::mAlignment2024 = kFALSE; +Bool_t StTpcDb::mCosmics = kFALSE; +TGeoHMatrix *StTpcDb::mTpc2GlobMatrix = 0; // C++ routines: //_____________________________________________________________________________ ClassImp(StTpcDb); -//_____________________________________________________________________________ -StTpcDb::StTpcDb() { - assert(gStTpcDb==0); - memset(mBeg,0,mEnd-mBeg+1); - mTpc2GlobMatrix = new TGeoHMatrix("Default Tpc2Glob"); - for (Int_t i = 1; i <= 24; i++) { - for (Int_t k = 0; k < kTotalTpcSectorRotaions; k++) { - mTpcSectorRotations[i-1][k] = new TGeoHMatrix(Form("Default %02i %i",i,k)); - } - } - mFlip = new TGeoHMatrix; - mzGG = Dimensions()->gatingGridZ(); // zGG - Double_t Rotation[9] = {0, 1, 0, - 1, 0, 0, - 0, 0,-1}; - // Double_t Translation[3] = {0, 0, mzGG}; - mFlip->SetName("Flip"); mFlip->SetRotation(Rotation);// mFlip->SetTranslation(Translation); - mShift[0] = new TGeoTranslation("Signed Drift distance to z for East", 0, 0, -mzGG); - mShift[1] = new TGeoTranslation("Signed Drift distance to z for West", 0, 0, mzGG); - mHalf[0] = new TGeoHMatrix("Default for east part of TPC"); - mHalf[1] = new TGeoHMatrix("Default for west part of TPC"); - gStTpcDb = this; -} -//_____________________________________________________________________________ -//_____________________________________________________________________________ -StTpcDb::~StTpcDb() { +void StTpcDb::Clear() { for (Int_t i = 0;i<24;i++) { for (Int_t k = 0; k < kTotalTpcSectorRotaions; k++) - SafeDelete(mTpcSectorRotations[i][k]); + SafeDelete(mTpcSectorRotations[i][k]); } SafeDelete(mHalf[0]); SafeDelete(mHalf[1]); @@ -237,6 +45,29 @@ StTpcDb::~StTpcDb() { SafeDelete(mShift[1]); SafeDelete(mTpc2GlobMatrix); SafeDelete(mFlip); +} +//________________________________________________________________________________ +void StTpcDb::SetAlignment2024(Bool_t k) { + if (gStTpcDb && (! mTpc2GlobMatrix || mAlignment2024 != k)) { + if (k) {LOG_INFO << "StTpcDb::SetAlignment2024 switch to new schema for Rotation matrices" << endm;} + else {LOG_INFO << "StTpcDb::SetAlignment2024 switch to old schema for Rotation matrices" << endm;} + mAlignment2024 = k; + gStTpcDb->Clear(); + gStTpcDb->SetTpcRotations(); + } + mAlignment2024 = k; +} +//_____________________________________________________________________________ +StTpcDb::StTpcDb() { + assert(gStTpcDb==0); + memset(mBeg,0,mEnd-mBeg+1); + Clear(); + gStTpcDb = this; + SetAlignment2024(mAlignment2024); +} +//_____________________________________________________________________________ +StTpcDb::~StTpcDb() { + Clear(); gStTpcDb = 0; } //----------------------------------------------------------------------------- @@ -259,7 +90,7 @@ float StTpcDb::DriftVelocity(Int_t sector, Int_t row) { void StTpcDb::SetDriftVelocity() { static UInt_t u0 = 0; // beginTime of current Table static UInt_t u1 = 0; // beginTime for next Table - static UInt_t umax = TUnixTime(20250101,0,1).GetUTime(); // maximum time allowed for next table + static UInt_t umax = TUnixTime(20310101,0,1).GetUTime(); // maximum time allowed for next table // for back compartiblity switch to separated West and East drift velocities after 2007 static St_tpcDriftVelocity *dvel0 = 0; static St_tpcDriftVelocity *dvel1 = 0; @@ -337,7 +168,7 @@ void StTpcDb::SetTpcRotations() { /* . <-- the system of coordinate where Outer to Inner Alignment done --> global = Tpc2GlobalMatrix() * SupS2Tpc(sector) * StTpcSuperSectorPosition(sector) * Flip() * { StTpcInnerSectorPosition(sector) | StTpcOuterSectorPosition(sector)} * local - . result of super sector alignment result of Outer to Inner sub sector alignment + . result of super sector alignment result of Outxser to Inner sub sector alignment */ /* 03/07/14 StTpcPadCoordinate P(sector,row,pad,timebacket); @@ -358,24 +189,86 @@ void StTpcDb::SetTpcRotations() { Z_tpc is not changed during any sector transformation !!! ================================================================================ 10/17/18 Just checking new schema + 02/02/2024 revist StTpcCoordinateTransorm + Global <=> TPCE = StGlobalCoordinate <=> StTpcLocalCoordinate + StTpcDb::Tpc2GlobalMatrix() = StTpcPosition::instance()->GetMatrix(); + + TPCE <=> TPGV[2] => StTpcDb::TpcHalf(StBeamDirection part) + mHalf[east} = StTpcHalfPosition::instance()->GetEastMatrix() + mHalf[west] = StTpcHalfPosition::instance()->GetWestMatrix(); + TPCE <=> TPSS = StTpcLocalCoordinate <=> StTpcLocalSectorDirection + + StTpcDb::Pad2Tpc(sector,row) = StTpcDb::TpcRot(sector,(kPadInner2Tpc|kPadOuter2Tpc)) == + + + TPCE ( TPGV ) * ( TPSS ) StTpcPosition * ((Shift(half) * StTpcHalfPosition(half)) * (rotmS(sector,iPhi) * StTpcSuperSectorPosition) * Flip) * (StTpcInnerSectorPosition || StTpcOuterSectorPosition) kTpcRefSys * kTpcHalf * kTpcPad kTpcRefSys * kSupS2Tpc kTpc2GlobalMatrix := StTpcPosition - kSupS2Tpc := (Shift(half) * StTpcHalfPosition(half)) * (rotmS(sector,iPhi) * StTpcSuperSectorPosition) - kSupS2Glob := StTpcPosition * kSupS2Tpc - kSubSInner2SupS := Flip * StTpcInnerSectorPosition - kSubSOuter2SupS := Flip * StTpcOuterSectorPosition - kSubSInner2Tpc := kSupS2Tpc * kSubSInner2SupS - kSubSOuter2Tpc := kSupS2Tpc * kSubSOuter2SupS - kPadInner2SupS := kSubSInner2SupS - kPadOuter2SupS := kSubSOuter2SupS - kPadInner2Tpc := kSupS2Tpc * kPadInner2SupS == kSubSInner2Tpc - kPadOuter2Tpc := kSupS2Tpc * PadOuter2SupS = kSupS2Tpc * kSubSOuter2SupS = kSubSOuter2Tpc - kPadInner2Glob := kTpc2GlobalMatrix * kPadInner2Tpc = kTpc2GlobalMatrix * kSubSInner2Tpc - kPadOuter2Glob := kTpc2GlobalMatrix * kPadOuter2Tpc = kTpc2GlobalMatrix * kSubSOuter2Tpc + kSupS2Tpc := (Shift(half) * StTpcHalfPosition(half)) * (rotmS(sector,iPhi) * StTpcSuperSectorPosition * dR) + kSupS2Glob := StTpcPosition * kSupS2Tpc + kSubSInner2SupS := Flip * StTpcInnerSectorPosition + kSubSOuter2SupS := Flip * StTpcOuterSectorPosition + kSubSInner2Tpc := kSupS2Tpc * dR^-1 *kSubSInner2SupS dR => Outer wrt Inner + kSubSOuter2Tpc := kSupS2Tpc * dR *kSubSOuter2SupS + kPadInner2SupS := kSubSInner2SupS + kPadOuter2SupS := kSubSOuter2SupS + kPadInner2Tpc := kSupS2Tpc * kPadInner2SupS == kSubSInner2Tpc + kPadOuter2Tpc := kSupS2Tpc * PadOuter2SupS = kSupS2Tpc * kSubSOuter2SupS = kSubSOuter2Tpc + kPadInner2Glob := kTpc2GlobalMatrix * kPadInner2Tpc = kTpc2GlobalMatrix * kSubSInner2Tpc + kPadOuter2Glob := kTpc2GlobalMatrix * kPadOuter2Tpc = kTpc2GlobalMatrix * kSubSOuter2Tpc +================================================================================ +Revist 03/23/2024 move Flip + kSubs2Tpc = *mShift[part]) * (*mHalf[part]) * (*rotm) * Flip * TpcSuperSectorPosition * dR * GG(z) * WHEEL * kSubS(Inner|Outer)2SupS || kPad(Inner|Outer)2SupS * dR * GG^-1(z) + <-- Sup12S2Tpc ------> <--- Sub2SupS12 ---> +04/03/2014 +Old alpha = beta = 0 + kSubs2Tpc = *mShift[part]) * (*mHalf[part]) * (*rotm) * Flip * TpcSuperSectorPosition * dR * dR' * GG(z) * WHEEL * kSubS(Inner|Outer)2SupS || kPad(Inner|Outer)2SupS * dR * GG^-1(z) + <-- Sup12S2Tpc ------> <--- Sub2SupS12 ---> +New + kSubs2Tpc = *mShift[part]) * (*mHalf[part]) * (*rotm) * Flip * TpcSuperSectorPosition * dR * dR' * GG(z) * WHEEL * kSubS(Inner|Outer)2SupS || kPad(Inner|Outer)2SupS * GG^-1(z) + <-- Sup12S2Tpc ------> <--- Sub2SupS12 ---> + kSubs2Tpc = *mShift[part]) * (*mHalf[part]) * (*rotm) * Flip * TpcSuperSectorPosition * dR * dR' * GG(z) * WHEEL * dR" * kSubS(Inner|Outer)2SupS || kPad(Inner|Outer)2SupS * GG^-1(z) + kSubs2Tpc = *mShift[part]) * (*mHalf[part]) * (*rotm) * Flip * TpcSuperSectorPosition * dR * dR' * GG(z) * WHEEL * kSubS(Inner|Outer)2SupS || kPad(Inner|Outer)2SupS * GG^-1(z) + kSubs2Tpc = *mShift[part]) * (*mHalf[part]) * (*rotm) * Flip * TpcSuperSectorPosition * dR * GG(z) * WHEEL * dR" * kSubS(Inner|Outer)2SupS || kPad(Inner|Outer)2SupS * GG^-1(z) + <-- Sup12S2Tpc ------> <--- Sub2SupS12 ---> + dR' * GG(z) * WHEEL = GG(z) * WHEEL * dR" + dR" = WHEEL^1 * GG(z)^-1 * dR' * GG(z) * WHEEL ~ dR' + + kSubs2Tpc = *mShift[part]) * (*mHalf[part]) * (*rotm) * Flip * TpcSuperSectorPosition * dR * GG(z) * WHEEL * kSubS(Inner|Outer)2SupS || kPad(Inner|Outer)2SupS * dR" * GG^-1(z) + <-- --> <-- --> + xG = <-- --> * x <-- --> xPad + kSubs2Tpc = *mShift[part]) * (*mHalf[part]) * (*rotm) * Flip * TpcSuperSectorPosition * dR * GG(z) * WHEEL * dR" * kSubS(Inner|Outer)2SupS || kPad(Inner|Outer)2SupS * GG^-1(z) + x = <-- --> * xPadGG + x = <-- dR' * WHEEL --> * xPad + xPadGG = GG^-1 * xPad + dR' * WHEEL = WHEEL * dR"; dR" = WHEEL^-1 * dR'* WHEEL +-------------------------------------------------------------------------------- +Revist 04/17/2024 modify Half (rotaion around Wheel position) and Flip (add shift before absorbed by mShift); + add to flip shift to by zGG + kSubs2Tpc = *mShift[part]) * (*mHalf[part]) * (*mShift[part])^^-1 * rotm) * Flip * TpcSuperSectorPosition * ddRO * dRO * GG(z) * WHEEL * kSubS(Inner|Outer)2SupS || kPad(Inner|Outer)2SupS * GG^-1(z) + <-- Sup12S2Tpc ------> <--- Sub2SupS12 ---> + +Mag.Flip: HS == Half sum; HD == Half dif +FF: dRO = ROHS * dROHD +RF: dRO = ROHS * dROHD^^-1 +dFF: dRO_new = ddROFF * ROHS * dROHD +dRF: dRO_new = ddRORF * ROHS * dROHD^^-1 + ddRO * dRO = FF ? ddROFF * dROHS * dROHD + +dR( alpha,beta,gamma, x_0, y_0, z_0) := +matrix([ 1,-gamma, beta, x_0], + [ gamma, 1,-alpha, y_0], + [ -beta, alpha, 1, z_0], + [ 0, 0, 0, 1]); +dRT( alpha,beta,gamma, x_0, y_0, z_0) := dR^-1 +matrix([ 1, gamma, -beta,-x_0], + [-gamma, 1, alpha,-y_0], + [ beta,-alpha, 1,-z_0], + [ 0, 0, 0, 1]); */ assert(Dimensions()->numberOfSectors() == 24); Float_t gFactor = StarMagField::Instance()->GetFactor(); @@ -390,15 +283,75 @@ void StTpcDb::SetTpcRotations() { } else { LOG_INFO << "StTpcDb::SetTpcRotations use old schema for Rotation matrices" << endm; } + const Char_t *names[kTotalTpcSectorRotaions]; + names[kSupS2Tpc] = "SupS_%02i2Tpc"; + names[kSupS2Glob] = "SupS_%02i2Glob"; + names[kSubSInner2SupS] = "SubS_%02iInner2SupS"; + names[kSubSOuter2SupS] = "SubS_%02iOuter2SupS"; + names[kPadInner2SupS] = "PadInner2SupS_%02i"; + names[kPadOuter2SupS] = "PadOuter2SupS_%02i"; + + names[kSup12S2Tpc] = "Sup12S_%02i2Tpc"; + names[kSup12S2Glob] = "Sup12S_%02i2Glob"; + names[kSubSInner2Sup12S] = "SubS_%02iInner2Sup12S"; + names[kSubSOuter2Sup12S] = "SubS_%02iOuter2Sup12S"; + names[kPadInner2Sup12S] = "PadInner2Sup12S_%02i"; + names[kPadOuter2Sup12S] = "PadOuter2Sup12S_%02i"; + + names[kSubSInner2Tpc] = "SubS_%02iInner2Tpc"; + names[kSubSOuter2Tpc] = "SubS_%02iOuter2Tpc"; + names[kSubSInner2Glob] = "SubS_%02iInner2Glob"; + names[kSubSOuter2Glob] = "SubS_%02iOuter2Glob"; + names[kPadInner2Tpc] = "PadInner2Tpc"; + names[kPadOuter2Tpc] = "PadOuter2Tpc"; + names[kPadInner2Glob] = "PadInner2Glob"; + names[kPadOuter2Glob] = "PadOuter2Glob"; + names[kWheel] = "Wheel"; + names[kRotM] = "RotM"; + mTpc2GlobMatrix = new TGeoHMatrix("Default Tpc2Glob"); + mFlip = new TGeoHMatrix; + mzGG = Dimensions()->gatingGridZ(); // zGG + Double_t Rotation[9] = {0, 1, 0, + 1, 0, 0, + 0, 0,-1}; + mFlip->SetName("Flip"); mFlip->SetTitle("flip to Sector 12 local coordiname"); mFlip->SetRotation(Rotation); + if (mAlignment2024) { + Double_t Translation[3] = {0, 0, mzGG}; + mFlip->SetTranslation(Translation); + } + if (! mAlignment2024) { + mShift[0] = new TGeoTranslation("Signed Drift distance to z for East", 0, 0, -mzGG); + mShift[1] = new TGeoTranslation("Signed Drift distance to z for West", 0, 0, mzGG); + } else { + mzWheel = 229.71; + mShift[0] = new TGeoTranslation("Signed Drift distance to z for East", 0, 0, -mzWheel); + mShift[1] = new TGeoTranslation("Signed Drift distance to z for West", 0, 0, mzWheel); + } + mHalf[0] = new TGeoHMatrix("Default for east part of TPC"); + mHalf[1] = new TGeoHMatrix("Default for west part of TPC"); + mWheel[0] = new TGeoHMatrix("Default for east wheel of TPC"); + mWheel[1] = new TGeoHMatrix("Default for west wheel of TPC"); St_SurveyC *chair = 0; + St_SurveyC *chairD = 0; + Int_t Id = 0; + TGeoHMatrix rotA; + TGeoHMatrix dR; + static Int_t newRotations[6] = {kSup12S2Tpc, kSup12S2Glob, kSubSInner2Sup12S, kSubSOuter2Sup12S, kPadInner2Sup12S, kPadOuter2Sup12S}; + static Int_t oldRotations[6] = {kSupS2Tpc , kSupS2Glob , kSubSInner2SupS , kSubSOuter2SupS , kPadInner2SupS , kPadOuter2SupS }; for (Int_t sector = 0; sector <= 24; sector++) {// loop over Tpc as whole, sectors, inner and outer subsectors + // Avoid mixure with Alignment2024 Int_t k; Int_t k1 = kSupS2Tpc; - Int_t k2 = kTotalTpcSectorRotaions; + Int_t k2 = kTotalTpcSectorRotaions - 2; // - kRotM && dRS12 if (sector == 0) {k2 = k1; k1 = kUndefSector;} for (k = k1; k < k2; k++) { - Int_t Id = 0; - TGeoHMatrix rotA; // After alignment + if (! mAlignment2024) { + for (Int_t l = 0; l < 6; l++) if (k == newRotations[l]) goto ENDLOOP; + } else { + for (Int_t l = 0; l < 6; l++) if (k == oldRotations[l]) goto ENDLOOP; + } + Id = 0; + rotA = TGeoHMatrix();; // After alignment chair = 0; if (!sector ) { // TPC Reference System if (mOldScheme) { // old scheme @@ -419,15 +372,20 @@ void StTpcDb::SetTpcRotations() { rotA = StTpcPosition::instance()->GetMatrix(); *mHalf[east] = StTpcHalfPosition::instance()->GetEastMatrix(); *mHalf[west] = StTpcHalfPosition::instance()->GetWestMatrix(); + *mWheel[east] = StTpcWheelPosition::instance()->GetEastMatrix(); + *mWheel[west] = StTpcWheelPosition::instance()->GetWestMatrix(); } } else { Id = 10*sector + k; - StBeamDirection part = east; - if (sector <= 12) part = west; + StBeamDirection part = TpcPart(sector); switch (k) { case kSupS2Tpc: // SupS => Tpc - if (sector <= 12) {iphi = (360 + 90 - 30* sector )%360; Rot = Form("R%03i",iphi);} - else {iphi = ( 90 + 30*(sector - 12))%360; Rot = Form("Y%03i",iphi);} + case kSup12S2Tpc: // Sup12S => Tpc + chair = StTpcSuperSectorPosition::instance(); + chairD = StTpcSuperSectorPositionD::instance(); + iphi = SectorPhiDeg(sector); + if (sector <= 12) {Rot = Form("R%03i",iphi);} + else {Rot = Form("Y%03i",iphi);} rotm = 0; if (gGeoManager) { listOfMatrices = gGeoManager->GetListOfMatrices(); @@ -437,23 +395,52 @@ void StTpcDb::SetTpcRotations() { if (sector <= 12) rotm = new TGeoRotation(Rot); else rotm = new TGeoRotation(Rot, 90.0, 0.0, 90.0, -90.0, 180.0, 0.00); // Flip (x,y,z) => ( x,-y,-z) rotm->RotateZ(iphi); + if (gGeoManager) rotm->RegisterYourself(); + } + if (Debug()) { + rotm->Print(); } - rotA = (*mShift[part]) * (*mHalf[part]) * (*rotm); - rotA *= StTpcSuperSectorPosition::instance()->GetMatrix(sector-1); - if (gGeoManager) rotm->RegisterYourself(); - else SafeDelete(rotm); + if (! mAlignment2024) { + rotA = (*mShift[part]) * (*mHalf[part]) * (*rotm); + } else { + rotA = (*mShift[part]) * (*mHalf[part]) * (*mShift[part]).Inverse() * (*rotm); + } + if (k == kSup12S2Tpc) rotA *= Flip(); // new in 2024 schema + SetTpcRotationMatrix(&rotA,sector,kRotM);// Save ideal rotation + dR = chair->GetMatrix(sector-1); + if (chairD->getNumRows() == 24) { + if (gFactor > 0.2) { + dR *= chairD->GetMatrix(sector-1); + } else if (gFactor < -0.2) { + dR *= chairD->GetMatrix(sector-1).Inverse(); + } + } + SetTpcRotationMatrix(&dR,sector,kdRS12);// Save correction + rotA = TpcRot(sector, kRotM) * dR; + // if (k == kSup12S2Tpc) rotA *= Flip(); // new in 2023 schema + if (! gGeoManager) SafeDelete(rotm); break; case kSupS2Glob: // SupS => Tpc => Glob rotA = Tpc2GlobalMatrix() * SupS2Tpc(sector); break; + case kSup12S2Glob: // SupS => Tpc => Glob + rotA = Tpc2GlobalMatrix() * Sup12S2Tpc(sector); + break; case kSubSInner2SupS: + case kSubSInner2Sup12S: if (mOldScheme) {rotA = Flip(); break;} chair = StTpcInnerSectorPosition::instance(); case kSubSOuter2SupS: + case kSubSOuter2Sup12S: if (mOldScheme) {rotA = Flip() * StTpcOuterSectorPosition::instance()->GetMatrix(sector-1); break;} if (! chair) chair = StTpcOuterSectorPosition::instance(); - rotA = Flip() * chair->GetMatrix(sector-1); - if (chair->GetNRows() > 24) { + //new 2024 Flip done in Sup12STpc + //new 2024 if (k == kSubSInner2SupS || k == kSubSOuter2SupS) rotA = Flip() * chair->GetMatrix(sector-1); // to Sector 12 + //new 2024 else rotA = chair->GetMatrix(sector-1); // to Sector 12 + if (k == kSubSOuter2SupS || + k == kSubSInner2SupS) rotA = Flip() * chair->GetMatrix(sector-1); + else rotA = chair->GetMatrix(sector-1); + if (chair->GetNRows() == 48) { if (gFactor > 0.2) { rotA *= chair->GetMatrix(sector-1+24); } else if (gFactor < -0.2) { @@ -461,23 +448,40 @@ void StTpcDb::SetTpcRotations() { } } break; - case kSubSInner2Tpc: rotA = SupS2Tpc(sector) * SubSInner2SupS(sector); break; // (Subs[io] => SupS) => Tpc - case kSubSOuter2Tpc: rotA = SupS2Tpc(sector) * SubSOuter2SupS(sector); break; // -"- - + case kSubSInner2Tpc: // (Subs[io] => SupS) => Tpc + if (! mAlignment2024) rotA = SupS2Tpc(sector) * SubSInner2SupS(sector); + else rotA = Sup12S2Tpc(sector) * SubSInner2Sup12S(sector); + break; + case kSubSOuter2Tpc: // -"- + if (! mAlignment2024) rotA = SupS2Tpc(sector) * SubSOuter2SupS(sector); + else rotA = Sup12S2Tpc(sector) * SubSOuter2Sup12S(sector); + break; case kSubSInner2Glob: rotA = Tpc2GlobalMatrix() * SubSInner2Tpc(sector); break; // Subs[io] => SupS => Tpc) => Glob case kSubSOuter2Glob: rotA = Tpc2GlobalMatrix() * SubSOuter2Tpc(sector); break; // -"- case kPadInner2SupS: rotA = SubSInner2SupS(sector); break; // (Pad == SecL) => (SubS[io] => SupS) case kPadOuter2SupS: rotA = SubSOuter2SupS(sector); break; // -"- - case kPadInner2Tpc: rotA = SupS2Tpc(sector) * PadInner2SupS(sector); break; // (Pad == SecL) => (SubS[io] => SupS => Tpc) - case kPadOuter2Tpc: rotA = SupS2Tpc(sector) * PadOuter2SupS(sector); break; // -"- - + case kPadInner2Sup12S: rotA = SubSInner2Sup12S(sector); break; // (Pad == SecL) => (SubS[io] => Sup12S) + case kPadOuter2Sup12S: rotA = SubSOuter2Sup12S(sector); break; // -"- + case kPadInner2Tpc: // (Pad == SecL) => (SubS[io] => SupS => Tpc) + if (! mAlignment2024) rotA = SupS2Tpc(sector) * PadInner2SupS(sector); + else rotA = Sup12S2Tpc(sector) * PadInner2Sup12S(sector); + break; + case kPadOuter2Tpc: // -"- + if (! mAlignment2024) rotA = SupS2Tpc(sector) * PadOuter2SupS(sector); + else rotA = Sup12S2Tpc(sector) * PadOuter2Sup12S(sector); + break; case kPadInner2Glob: rotA = Tpc2GlobalMatrix() * PadInner2Tpc(sector); break; // (Pad == SecL) => (SubS[io] => SupS => Tpc => Glob) case kPadOuter2Glob: rotA = Tpc2GlobalMatrix() * PadOuter2Tpc(sector); break; // -"- + case kWheel: + if (! mAlignment2024) {rotA = SupS2Tpc(sector).Inverse(); rotA *= *(mWheel[part]); rotA *= SupS2Tpc(sector);} + else {rotA = Sup12S2Tpc(sector).Inverse(); rotA *= *(mWheel[part]); rotA *= Sup12S2Tpc(sector);} + break; default: assert(0); } } +#if 0 // Normalize Double_t *r = rotA.GetRotationMatrix(); Double_t norm; @@ -491,28 +495,15 @@ void StTpcDb::SetTpcRotations() { d[1], c[1], t[1], d[2], c[2], t[2]}; rotA.SetRotation(rot); - const Char_t *names[kTotalTpcSectorRotaions] = { - "SupS_%02itoTpc", - "SupS_%02itoGlob", - "SubS_%02iInner2SupS", - "SubS_%02iOuter2SupS", - "SubS_%02iInner2Tpc", - "SubS_%02iOuter2Tpc", - "SubS_%02iInner2Glob", - "SubS_%02iOuter2Glob", - "PadInner2SupS_%02i", - "PadOuter2SupS_%02i", - "SupS_%02i12Inner2Tpc", - "SupS_%02i12Outer2Tpc", - "SupS_%02i12Inner2Glob", - "SupS_%02i12Outer2Glob" - }; +#endif if (sector == 0) rotA.SetName("Tpc2Glob"); else rotA.SetName(Form(names[k],sector)); if (Debug() > 1) { cout << "Id : " << Id << " "; rotA.Print(); } SetTpcRotationMatrix(&rotA,sector,k); + ENDLOOP: + continue; } } } diff --git a/StRoot/StTpcDb/StTpcDb.h b/StRoot/StTpcDb/StTpcDb.h index 2de51abdf37..61d99ca5dba 100644 --- a/StRoot/StTpcDb/StTpcDb.h +++ b/StRoot/StTpcDb/StTpcDb.h @@ -11,121 +11,7 @@ * the data, and returns the data to the user via simple * interface classes. * - *************************************************************************** - * - * $Log: StTpcDb.h,v $ - * Revision 1.46 2021/03/26 20:26:48 fisyak - * Synchronize with TFG version, new schema for Inner Sector alignment (thank to Hongwei) - * - * Revision 1.44 2018/06/21 01:47:16 perev - * iTPCheckIn - * - * Revision 1.41.10.1 2018/02/16 22:14:59 perev - * iTPC - * Revision 1.43 2018/06/07 04:30:35 genevb - * Remove unnecessary dependence on StMagUtilities.h - * - * Revision 1.42 2018/04/11 02:43:22 smirnovd - * Enable TPC/iTPC switch via St_tpcPadConfig - * - * This is accomplished by substituting St_tpcPadPlanes with St_tpcPadConfig. - * A sector ID is passed to St_tpcPadConfig in order to extract parameters for - * either TPC or iTPC - * - * Revision 1.41 2014/06/27 14:04:25 fisyak - * Add env. NewTpcAlignment to switch between new and old scheme - * - * Revision 1.40 2014/06/26 21:32:57 fisyak - * New Tpc Alignment, v632 - * - * Revision 1.39 2012/09/17 19:39:44 fisyak - * Add rotation for Half Tpc's - * - * Revision 1.38 2012/05/03 23:56:48 fisyak - * Set interpolation for one week only, fix sign of interpolation (thanks Gene), add TriggerId - * - * Revision 1.37 2011/07/21 16:48:53 fisyak - * New schema for Sub Sector Alginement: SuperSectror position (defined by inner sub sector) and Outer sector position wrt SuperSectror position - * - * Revision 1.36 2011/01/18 14:39:43 fisyak - * Clean up TpcDb interfaces and Tpc coordinate transformation - * - * Revision 1.35 2010/05/27 19:14:26 fisyak - * Take out flavoring by 'sim' for tpcGlobalPosition,tpcSectorPosition and starClockOnl tables. remove usage tpcISTimeOffsets and tpcOSTimeOffsets tables - * - * Revision 1.34 2009/12/07 23:44:58 fisyak - * Drop coordinate transformation for fortran, remove TpcHitErr - * - * Revision 1.33 2009/11/02 17:31:41 fisyak - * use directly field from StarMagField, replace St_tpcGainC and St_tpcT0C by St_tpcPadGainT0C, add remove defaults in coordinate transformations - * - * Revision 1.32 2009/03/16 14:13:31 fisyak - * Use StDetectorDb chairs for TpcGlobalPosition and TpcSectorPosition - * - * Revision 1.31 2008/09/10 15:46:36 fisyak - * Recalculate Tpc drift velocity once per event, avoid expensive conversion to unix time - * - * Revision 1.30 2008/08/01 14:28:25 fisyak - * Add new getT0, clean up - * - * Revision 1.29 2007/08/12 15:06:30 fisyak - * Use separated East/West drift velocities only >= 2007, for back compartibility - * - * Revision 1.28 2007/07/12 20:21:09 fisyak - * Drift velocity depends on TPC half, use online RHIC clock - * - * Revision 1.27 2007/03/21 17:27:01 fisyak - * use TGeoHMatrix, change mode for switching drift velocities - * - * Revision 1.26 2004/10/27 21:44:28 fisyak - * Add debug print for tables Validities, add access to ExB correction - * - * Revision 1.25 2004/02/23 00:35:00 fisyak - * Add access to tpcPadResponse - * - * Revision 1.24 2004/01/14 22:54:30 fisyak - * Add hooks for Pedestal and tpcGain - * - * Revision 1.23 2002/04/02 00:16:31 hardtke - * New class that gets hit errors from database - * - * Revision 1.22 2002/02/06 18:39:13 hardtke - * Add tpc Field Cage structure - * - * Revision 1.21 2001/08/14 18:18:03 hardtke - * Add sector position structures - * - * Revision 1.20 2001/05/21 23:25:34 hardtke - * Add tpcGlobalPosition to StTpcDb. This includes the global position offset and the rotation w.r.t. the magnet - * - * Revision 1.19 2000/08/10 18:41:34 hardtke - * only look for L0_trigger table once per event -- improves timing - * - * Revision 1.18 2000/08/09 14:54:54 hardtke - * Add Clear option, set trigger table pointer to 0 after each event - * - * Revision 1.17 2000/08/08 19:15:23 hardtke - * use correct trigger time offset in case of laser - * - * Revision 1.16 2000/05/11 17:17:27 hardtke - * make trigger time offset available -- currently NOT different for beam and laser events - * - * Revision 1.15 2000/03/27 21:21:22 fine - * Adjusted to ROOT 2.24 - * - * Revision 1.14 2000/02/10 00:29:09 hardtke - * Add tpg functions to StTpcDbMaker, fix a few bugs - * - * Revision 1.13 2000/01/25 16:01:10 fisyak - * Devorce with StAF - * - * Revision 1.12 2000/01/11 15:49:52 hardtke - * get Electronics table from Calibrations database, Fix error messages - * - * Revision 1.11 1999/12/16 22:00:53 hardtke - * add CVS tags - * - **************************************************************************/ + ***************************************************************************/ #ifndef ClassStTpcDb #define ClassStTpcDb @@ -136,7 +22,7 @@ // This class implements to offline interface to the STAR database // // // ////////////////////////////////////////////////////////////////////////// - +#include #include "StMessMgr.h" #include "StEnumerations.h" #include "StDetectorDbMaker/St_tpcPadConfigC.h" @@ -163,47 +49,66 @@ class StTpcDb { // Glob = Global coordinate // Tpc = Tpc -"- survey // Half = Tpc Half west / east -"- survey + // Wheel = Wheel rotations from Survey, no drift // SupS = super sector misalignment(?) // SubS[io] = SubSector[io] misalignment // SecL = sector -"- coordinate (y_p, x_p, DriftDistance - z_p); // Pad = Pad -"- (x_p,y_p,z_p) (Sector12 coordinate system) // Tpc => Global is mTpc2GlobMatrix - // Pad => SecL is internal Flip matrix - enum ETpcSectorRotationType {kUndefSector =-2, - kFlip =-1, // Flip * Subs[io] => SupS - kSupS2Tpc = 0, // SupS => Tpc - kSupS2Glob = 1, // SupS => Tpc => Glob; - kSubSInner2SupS = 2, // Subs[io] => SupS - kSubSOuter2SupS = 3, // -"- - kSubSInner2Tpc = 4, // (Subs[io] => SupS) => Tpc - kSubSOuter2Tpc = 5, // -"- - kSubSInner2Glob = 6, // (Subs[io] => SupS => Tpc) => Glob - kSubSOuter2Glob = 7, // -"- - kPadInner2SupS = 8, // (Pad => SecL) => (SubS[io] => SupS) - kPadOuter2SupS = 9, // -"- - kPadInner2Tpc =10, // (Pad => SecL) => (SubS[io] => SupS => Tpc) - kPadOuter2Tpc =11, // -"- - kPadInner2Glob =12, // (Pad => SecL) => (SubS[io] => SupS => Tpc => Glob) - kPadOuter2Glob =13, // -"- - kTotalTpcSectorRotaions =14}; + // Pad => SecL is internal Flip matrix Sup12 == Supersector 12 coordinate system x,y,z)_TPC => (-y,-x,drift = zGG - |z|), move Flip from Pad to Sup12 + enum ETpcSectorRotationType {kUndefSector = -2, + kFlip = -1, // Flip * Subs[io] => SupS + + kSupS2Tpc = 0, // SupS(sector) => Tpc, SupS(0) == mTpc2GlobMatrix + kSupS2Glob = 1, // SupS => Tpc => Glob; + kSubSInner2SupS = 2, // Subs[io] => SupS + kSubSOuter2SupS = 3, // -"- + kPadInner2SupS = 4, // (Pad => SecL) => (SubS[io] => SupS) + kPadOuter2SupS = 5, // -"- + + kSup12S2Tpc = 6, // Sup12S => Tpc + kSup12S2Glob = 7, // Sup12S => Tpc => Glob; + kSubSInner2Sup12S = 8, // Subs[io] => Sup12S + kSubSOuter2Sup12S = 9, // -"- + kPadInner2Sup12S = 10, // (Pad => SecL) => (SubS[io] => Sup12S) + kPadOuter2Sup12S = 11, // -"- + + kSubSInner2Tpc = 12, // (Subs[io] => SupS) => Tpc + kSubSOuter2Tpc = 13, // -"- + kSubSInner2Glob = 14, // (Subs[io] => SupS => Tpc) => Glob + kSubSOuter2Glob = 15, // -"- + kPadInner2Tpc = 16, // (Pad => SecL) => (SubS[io] => SupS => Tpc) + kPadOuter2Tpc = 17, // -"- + kPadInner2Glob = 18, // (Pad => SecL) => (SubS[io] => SupS => Tpc => Glob) + kPadOuter2Glob = 19, // -"- + + kWheel = 20, // Account of Wheel rotation around X and Y axes at GG + kRotM = 21, // Ideal rotaion + kdRS12 = 22, // Super Sector correction + kTotalTpcSectorRotaions = 23}; private: + static TGeoHMatrix *mTpc2GlobMatrix;//! Char_t mBeg[1]; //! Int_t m_Debug; //! - TGeoTranslation *mShift[2]; //! + TGeoTranslation *mShift[2]; //! TGeoHMatrix *mFlip; //! - TGeoHMatrix *mTpc2GlobMatrix;//! TGeoHMatrix *mHalf[2]; //! + TGeoHMatrix *mWheel[2]; //! TGeoHMatrix *mTpcSectorRotations[24][kTotalTpcSectorRotaions]; //! Float_t mDriftVel[2]; //! UInt_t mUc; //! time for which above mDriftVel have been calculated Int_t mTriggerId; //! to distinguish local clock and RHIC clock Double_t mzGG; //! Gating Grid z + Double_t mzWheel; //! Wheel z Char_t mEnd[1]; //! static Bool_t mOldScheme; //! switch between Old and New alignment scheme + static Bool_t mAlignment2024; //! switch between Old and 2024 alignment scheme + static Bool_t mCosmics; //! if cosmics private: StTpcDb(); public: virtual ~StTpcDb(); + void Clear(); St_tpcWirePlanesC *WirePlaneGeometry() {return St_tpcWirePlanesC::instance();} St_tpcDimensionsC *Dimensions() {return St_tpcDimensionsC::instance();} St_tpcSlowControlSimC *SlowControlSim() {return St_tpcSlowControlSimC::instance();} @@ -220,6 +125,14 @@ class StTpcDb { Bool_t IsLaser() {return mTriggerId != 0;} static Bool_t IsOldScheme() {return mOldScheme;} Double_t zGG() {return mzGG;} + static Int_t SectorPhiDeg(Int_t sector) {// sector Phi degree + Int_t iphi = 0; + assert(sector >= 1 && sector <= 24); + if (sector <= 12) {iphi = (360 + 90 - 30* sector )%360;} + else {iphi = ( 90 + 30*(sector - 12))%360;} + return iphi; + } + static StBeamDirection TpcPart(Int_t sector) {StBeamDirection part = east; if (sector <= 12) part = west; return part;} //small pieces of data: void SetDriftVelocity(); Float_t DriftVelocity(Int_t sector=24) {return DriftVelocity(sector, 0);} @@ -228,7 +141,7 @@ class StTpcDb { void SetTpc2GlobalMatrix(TGeoHMatrix *m) {SetTpcRotationMatrix(m);} void SetTpcRotationMatrix(TGeoHMatrix *m, Int_t sector = 0, Int_t k = kSupS2Tpc) { if (sector == 0) {if (m) *mTpc2GlobMatrix = *m;} - else {if (m) *mTpcSectorRotations[sector-1][k] = *m;} + else {if (m) mTpcSectorRotations[sector-1][k] = new TGeoHMatrix(*m);} } void SetDebug(Int_t m) {m_Debug = m;} Int_t Debug() {return m_Debug;} @@ -236,9 +149,10 @@ class StTpcDb { Int_t TriggerId() {return mTriggerId;} const TGeoHMatrix &Flip() const {return *mFlip;} const TGeoHMatrix &TpcHalf(StBeamDirection part) const {return *mHalf[part];} - const TGeoTranslation &Shift(StBeamDirection part) const {return *mShift[part];} + const TGeoHMatrix &TpcWheel(StBeamDirection part) const {return *mWheel[part];} // Wheel Rotation in TPC coordinate system + const TGeoTranslation &Shift(StBeamDirection part) const {return *mShift[part];} const TGeoHMatrix &Tpc2GlobalMatrix() const {return *mTpc2GlobMatrix;} - const TGeoHMatrix &TpcRot(Int_t sector, Int_t k) const {return *mTpcSectorRotations[sector-1][k];} + const TGeoHMatrix &TpcRot(Int_t sector, Int_t k) const {assert(mTpcSectorRotations[sector-1][k]); return *mTpcSectorRotations[sector-1][k];} const TGeoHMatrix &SupS2Tpc(Int_t sector = 1) const {return TpcRot(sector,kSupS2Tpc);} const TGeoHMatrix &SupS2Glob(Int_t sector = 1) const {return TpcRot(sector,kSupS2Glob);} const TGeoHMatrix &SubSInner2SupS(Int_t sector = 1) const {return TpcRot(sector,kSubSInner2SupS);} @@ -262,6 +176,25 @@ class StTpcDb { const TGeoHMatrix &Pad2SupS(Int_t sector = 1, Int_t row = 1) const {Int_t k = (row <= St_tpcPadConfigC::instance()->innerPadRows(sector)) ? kPadInner2SupS: kPadOuter2SupS; return TpcRot(sector,k);} const TGeoHMatrix &Pad2Tpc(Int_t sector = 1, Int_t row = 1) const {Int_t k = (row <= St_tpcPadConfigC::instance()->innerPadRows(sector)) ? kPadInner2Tpc: kPadOuter2Tpc; return TpcRot(sector,k);} const TGeoHMatrix &Pad2Glob(Int_t sector = 1, Int_t row = 1) const {Int_t k = (row <= St_tpcPadConfigC::instance()->innerPadRows(sector)) ? kPadInner2Glob: kPadOuter2Glob; return TpcRot(sector,k);} + //-------------------------------------------------------------------------------- + const TGeoHMatrix &Sup12S2Tpc(Int_t sector = 1) const {return TpcRot(sector,kSup12S2Tpc);} + const TGeoHMatrix &Wheel(Int_t sector = 1) const {return TpcRot(sector,kWheel);} // TPC Wheel rotation in Super Sector coordinate system + const TGeoHMatrix &Sup12S2Glob(Int_t sector = 1) const {return TpcRot(sector,kSup12S2Glob);} + const TGeoHMatrix &SubSInner2Sup12S(Int_t sector = 1) const {return TpcRot(sector,kSubSInner2Sup12S);} + const TGeoHMatrix &SubSOuter2Sup12S(Int_t sector = 1) const {return TpcRot(sector,kSubSOuter2Sup12S);} + + const TGeoHMatrix &PadInner2Sup12S(Int_t sector = 1) const {return TpcRot(sector,kPadInner2Sup12S);} + const TGeoHMatrix &PadOuter2Sup12S(Int_t sector = 1) const {return TpcRot(sector,kPadOuter2Sup12S);} + + const TGeoHMatrix &SubS2Sup12S(Int_t sector = 1, Int_t row = 1) const {Int_t k = (row <= St_tpcPadConfigC::instance()->innerPadRows(sector)) ? kSubSInner2Sup12S : kSubSOuter2Sup12S; return TpcRot(sector,k);} + + const TGeoHMatrix &Pad2Sup12S(Int_t sector = 1, Int_t row = 1) const {Int_t k = (row <= St_tpcPadConfigC::instance()->innerPadRows(sector)) ? kPadInner2Sup12S: kPadOuter2Sup12S; return TpcRot(sector,k);} + + + static void SetAlignment2024(Bool_t k = kFALSE); + static Bool_t Alignment2024() {return mAlignment2024;} + static void SetCosmics(Bool_t k = kFALSE) {mCosmics = k;} + static Bool_t IsCosmics() {return mCosmics;} ClassDef(StTpcDb,0) }; #endif diff --git a/StRoot/StTpcDb/StTpcDbMaker.cxx b/StRoot/StTpcDb/StTpcDbMaker.cxx index ed4d09b4c97..e695b4943c3 100755 --- a/StRoot/StTpcDb/StTpcDbMaker.cxx +++ b/StRoot/StTpcDb/StTpcDbMaker.cxx @@ -229,17 +229,22 @@ #include "StDbUtilities/StTpcPadCoordinate.hh" #include "StDbUtilities/StMagUtilities.h" #include "StarMagField.h" -#include "math_constants.h" +#include "StTriggerIdCollection.h" +#include "StTriggerData.h" #include "StDetectorDbMaker/StDetectorDbTpcRDOMasks.h" #include "StDetectorDbMaker/StDetectorDbMagnet.h" +#include "StDetectorDbMaker/St_trgTimeOffsetC.h" +#include "StDetectorDbMaker/St_tpcChargeEventC.h" #include "StDetectorDbMaker/St_tpcAnodeHVavgC.h" #include "StDetectorDbMaker/St_tpcChargeEventC.h" +#include "StDetectorDbMaker/St_beamInfoC.h" #if ROOT_VERSION_CODE < 331013 #include "TCL.h" #else #include "TCernLib.h" #endif #include "TEnv.h" +#include "TROOT.h" ClassImp(StTpcDbMaker) //_____________________________________________________________________________ Int_t StTpcDbMaker::InitRun(int runnumber){ @@ -255,7 +260,17 @@ Int_t StTpcDbMaker::InitRun(int runnumber){ gMessMgr->QAInfo() << "ReSet environment NewTpcAlignment (year >= 2013) from " << iNewTpcAlignmentOld << " to " << iNewTpcAlignment << endm; gEnv->SetValue("NewTpcAlignment", iNewTpcAlignment); } - +#if 0 /* move to StBFChain::SetDbOptions */ + if (IAttr("TFGdbOpt")) { + LOG_INFO << "Disable MySQL for TPC alignment parameters" << endm; + SetFlavor("TFG","tpcSectorT0offset"); // disable MySQL + SetFlavor("TFG","TpcPosition"); // disable MySQL + SetFlavor("TFG","TpcHalfPosition"); // disable MySQL + SetFlavor("TFG","TpcSuperSectorPositionB"); // disable MySQL + SetFlavor("TFG","TpcInnerSectorPositionB"); // disable MySQL + SetFlavor("TFG","TpcOuterSectorPositionB"); // disable MySQL + } +#endif // Create Needed Tables: if (! IAttr("Simu")) { Float_t gFactor = StarMagField::Instance()->GetFactor(); @@ -294,9 +309,19 @@ Int_t StTpcDbMaker::InitRun(int runnumber){ SetFlavor("ofl+TFG+laserDV","tpcDriftVelocity"); gMessMgr->Info() << "StTpcDbMaker::Using any drift velocity" << endm; } + if( IAttr("Alignment2024") ) { + StTpcDb::SetAlignment2024(kTRUE); + gMessMgr->Info() << "StTpcDbMaker::Use Alignment2024 " << endm; + } else { + StTpcDb::SetAlignment2024(kFALSE); + } StTpcDb::instance()->SetDriftVelocity(); if (IAttr("ExB")) { + if(! IAttr("OSpaceFXT") && St_beamInfoC::instance()->IsFixedTarget() ) { + SetAttr("OSpaceFXT" , kTRUE); + SetAttr("OSpaceZ2" , kFALSE); + } // Backward compatibility preserved. Int_t mask=1; // Al Saulys request if ( IAttr("EB1") ){ // Do nothing (i.e. bit 1 at 0) @@ -339,7 +364,14 @@ Int_t StTpcDbMaker::InitRun(int runnumber){ new StMagUtilities(gStTpcDb, option); #endif } - StTpcDb::instance()->SetTpcRotations(); + if (IAttr("Cosmics")) { + StTpcDb::SetCosmics(kTRUE); + gMessMgr->Info() << "StTpcDbMaker::Use Cosmics " << endm; + } + if ( gROOT->GetClass("StTpcRTSHitMaker") || gROOT->GetClass("StiMaker")) { + St_tpcPadGainT0C::instance(); // activate extra gain corrections for tpx + St_itpcPadGainT0C::instance(); // activate extra gain corrections for iTPC + } return kStOK; } //_____________________________________________________________________________ @@ -350,35 +382,6 @@ Int_t StTpcDbMaker::Make(){ return kStEOF; } StTpcDb::instance()->SetDriftVelocity(); -#if 0 - if (IAttr("laserIT")) { - St_trgTimeOffsetC::instance()->SetLaser(kFALSE); - StEvent* pEvent = dynamic_cast (GetInputDS("StEvent")); - if (pEvent) { - const StTriggerIdCollection* trig = pEvent->triggerIdCollection(); - if (trig) { - const StTriggerId *nominal = trig->nominal(); - if (nominal) { - Int_t TriggerId = 0; - StTpcDb::instance()->SetTriggerId(TriggerId); - static Int_t goodIds[2] = {9200,9201}; // Laser trigger IDs - for (Int_t i = 0; i < 2; i++) { - if (nominal->isTrigger(goodIds[i])) {TriggerId = goodIds[i]; break;} - } - if (TriggerId) { - St_trgTimeOffsetC::instance()->SetLaser(kTRUE); - StTpcDb::instance()->SetTriggerId(TriggerId); - } - } - } - if (IAttr("OAbortGap")) { - StTriggerData* trg = pEvent->triggerData(); - if (trg) St_tpcChargeEventC::instance()->findChargeTimes(trg->bunchCounter()); - } - } - if (! St_trgTimeOffsetC::instance()->IsLaser()) return kStSkip; - } -#endif // SetTpcRotations(); return kStOK; } diff --git a/StRoot/StTpcHitMaker/StTpcHitMaker.cxx b/StRoot/StTpcHitMaker/StTpcHitMaker.cxx index 2c6de24fadd..fb308739ba3 100644 --- a/StRoot/StTpcHitMaker/StTpcHitMaker.cxx +++ b/StRoot/StTpcHitMaker/StTpcHitMaker.cxx @@ -679,6 +679,7 @@ Int_t StTpcHitMaker::UpdateHitCollection(Int_t sector) { Int_t iRdo = StDetectorDbTpcRDOMasks::instance()->rdoForPadrow(sector,row,pad); if ( ! StDetectorDbTpcRDOMasks::instance()->isOn(sector,iRdo)) continue; StTpcHit *tpcHit = CreateTpcHit(*c,sector,row); + if (! tpcHit) continue; Int_t iok = hitCollection->addHit(tpcHit); assert(iok); } @@ -715,6 +716,7 @@ Int_t StTpcHitMaker::UpdateHitCollection(Int_t sector) { Int_t iRdo = StDetectorDbTpcRDOMasks::instance()->rdoForPadrow(sector,row,pad); if ( ! StDetectorDbTpcRDOMasks::instance()->isOn(sector,iRdo)) continue; StTpcHit *tpcHit = CreateTpcHit(*cld,sector,row); + if (! tpcHit) continue; Int_t iok = hitCollection->addHit(tpcHit); assert(iok); } @@ -731,6 +733,14 @@ StTpcHit *StTpcHitMaker::CreateTpcHit(const tpc_cl &cluster, Int_t sector, Int_t Float_t pad = cluster.p; Float_t time = cluster.t; + if (pad <= 0 || time <= 0) { + static Int_t iBreak = 0; + if (Debug() || iBreak < 13) { + LOG_ERROR << " Illegal cluster at pad = " << pad << " timebucket = " << time << " in Sector : row " << sector << " : " << row << endm; + } + iBreak++; + return 0; + } if (kReaderType == kLegacyTpx) time += 22; // remove Tonko's offset static StTpcCoordinateTransform transform(gStTpcDb); static StTpcLocalSectorCoordinate local; diff --git a/StRoot/StTpcHitMoverMaker/PACKAGE b/StRoot/StTpcHitMoverMaker/PACKAGE index 7948048abde..9ed374f0e93 100644 --- a/StRoot/StTpcHitMoverMaker/PACKAGE +++ b/StRoot/StTpcHitMoverMaker/PACKAGE @@ -1,5 +1,5 @@ # $Id $ # package StTpcHitMoverMaker # author: -Library:libStTpcHitMoverMaker.so:LIBS += -lStChain -lStDbUtilities -l_StEvent -l_StTpcDb -ltpc_Tables +Library:libStTpcHitMoverMaker.so:LIBS += -lStChain -lStEvent -lStTpcDb #Library:libStTpcHitMoverMaker.so:LIBS += -lStChain -lStDbUtilities -lStEvent -lStTpcDb -ltpc_Tables diff --git a/StRoot/StTpcHitMoverMaker/StTpcHitMoverMaker.cxx b/StRoot/StTpcHitMoverMaker/StTpcHitMoverMaker.cxx index 3036fcaf525..cdbe0b56d98 100644 --- a/StRoot/StTpcHitMoverMaker/StTpcHitMoverMaker.cxx +++ b/StRoot/StTpcHitMoverMaker/StTpcHitMoverMaker.cxx @@ -7,7 +7,6 @@ #ifdef __CORRECT_CHARGE__ #include "StDetectorDbMaker/St_tss_tssparC.h" #endif /* __CORRECT_CHARGE__ */ -#include "StDetectorDbMaker/St_tpcSlewingC.h" #include "StDetectorDbMaker/St_tpcPadConfigC.h" #include "StDetectorDbMaker/St_tpcEffectiveGeomC.h" #include "StDetectorDbMaker/St_tpcTimeBucketCorC.h" @@ -34,10 +33,6 @@ StTpcHitMover::~StTpcHitMover() { FlushDB(); } //________________________________________________________________________________ -Int_t StTpcHitMover::Init() { - return StMaker::Init(); -} -//________________________________________________________________________________ Int_t StTpcHitMover::InitRun(Int_t runnumber) { FlushDB(); return kStOk; @@ -54,24 +49,32 @@ Int_t StTpcHitMover::Make() { return kStSkip; } static StGlobalCoordinate coorG; + static St_tpcTimeBucketCorC *tpcTimeBucketCor = 0; + if (! StTpcDb::IsOldScheme()) { + tpcTimeBucketCor = St_tpcTimeBucketCorC::instance(); + if (tpcTimeBucketCor && (tpcTimeBucketCor->nrows() == 0)) tpcTimeBucketCor = 0; + } Bool_t EmbeddingShortCut = IAttr("EmbeddingShortCut"); StEvent* pEvent = dynamic_cast (GetInputDS("StEvent")); + Double_t triggerOffset = 0; + int doEPDT0Correction = 0; if (! pEvent) { LOG_WARN << "StTpcHitMover::Make there is no StEvent " << endm; return kStWarn; } + double mTimeBinWidth = 1./StTpcDb::instance()->Electronics()->samplingFrequency(); + double ebyeT0 = (IAttr("EbyET0") ? StEbyET0::Instance()->getT0(pEvent) / mTimeBinWidth : 0); + if (pEvent->epdCollection()) { // EPD (or other trigger detector) based event-by-event correction for the hit timing - double mTimeBinWidth = 1./StTpcDb::instance()->Electronics()->samplingFrequency(); // StEbyET0 returns microsec, will need it in time buckets - double ebyeT0 = (IAttr("EbyET0") ? StEbyET0::Instance()->getT0(pEvent) / mTimeBinWidth : 0); - int ew = 0; +// int ew = 0; int TAC = 0; int maxTAC = -1; - int doEPDT0Correction = StTpcBXT0CorrEPDC::instance()->nrows(); + doEPDT0Correction = StTpcBXT0CorrEPDC::instance()->nrows(); if (doEPDT0Correction) { StEpdCollection * epdCol = pEvent->epdCollection(); @@ -83,17 +86,19 @@ Int_t StTpcHitMover::Make() { StEpdHit * epdHit = dynamic_cast(epdHits[i]); TAC = 0; if (epdHit->tile() > 9) continue; // only tiles 1 - 9 have timing info - if (epdHit->id() < 0) ew = -1; // tile is on the east - else ew = 1; +// if (epdHit->id() < 0) ew = -1; // tile is on the east +// else ew = 1; if (epdHit->adc() < 100) continue; TAC = epdHit->tac(); // this is the timing if (TAC > maxTAC) maxTAC = TAC; } } + double driftVelocity = StTpcDb::instance()->DriftVelocity(1); + triggerOffset = StTpcBXT0CorrEPDC::instance()->getCorrection(maxTAC, driftVelocity, mTimeBinWidth); } // ====================================================== - - gMessMgr->Info() << "StTpcHitMover::Make use StEvent " << endm; + } +// gMessMgr->Info() << "StTpcHitMover::Make use StEvent " << endm; if (! gStTpcDb) { gMessMgr->Error() << "StTpcHitMover::Make TpcDb has not been instantiated " << endm; return kStErr; @@ -119,14 +124,14 @@ Int_t StTpcHitMover::Make() { if (sectorCollection) { Int_t sector = i + 1; - double driftVelocity = StTpcDb::instance()->DriftVelocity(sector); + // double driftVelocity = StTpcDb::instance()->DriftVelocity(sector); Int_t numberOfPadrows = sectorCollection->numberOfPadrows(); for (int j = 0; j< numberOfPadrows; j++) { Int_t row = j + 1; - Int_t io = 0; - if (row > St_tpcPadConfigC::instance()->innerPadRows(sector)) io = 1; - Double_t padlength = (io == 0) ? + Int_t io = 1; + if (row > St_tpcPadConfigC::instance()->innerPadRows(sector)) io = 0; + Double_t padlength = (io == 1) ? St_tpcPadConfigC::instance()->innerSectorPadLength(sector) : St_tpcPadConfigC::instance()->outerSectorPadLength(sector); StTpcPadrowHitCollection *rowCollection = sectorCollection->padrow(j); @@ -152,22 +157,24 @@ Int_t StTpcHitMover::Make() { moveTpcHit(coorL,coorG); StThreeVectorF xyzF(coorG.position().x(),coorG.position().y(),coorG.position().z()); tpcHit->setPosition(xyzF); - } else { // transoform from original pad and time bucket measurements + } else { // transform from original pad and time bucket measurements Float_t pad = tpcHit->pad(); Float_t time = tpcHit->timeBucket(); - if (! StTpcDb::IsOldScheme()) { - if (St_tpcTimeBucketCorC::instance()->getNumRows()) { - Int_t io = 0; - if (row <= St_tpcPadConfigC::instance()->innerPadRows(sector)) io = 1; + if (tpcTimeBucketCor) { + if (TMath::Abs(209.4 - TMath::Abs(tpcHit->position().z())) < 3.0) { + // Don't touch prompt hits + } else if (tpcTimeBucketCor) { Double_t noTmbks = tpcHit->maxTmbk() - tpcHit->minTmbk() + 1; - time += St_tpcTimeBucketCorC::instance()->CalcCorrection(io, noTmbks); + Int_t iowe = io; + if (sector > 12 && tpcTimeBucketCor->nrows() >= 4) iowe += 2; + time += tpcTimeBucketCor->CalcCorrection(iowe, noTmbks); } } // THIS IS A BLOCK TO CORRECT TIMING IN FXT MODE FOR DATA - if (doEPDT0Correction) time += StTpcBXT0CorrEPDC::instance()->getCorrection(maxTAC, driftVelocity, mTimeBinWidth); + if (doEPDT0Correction) time += triggerOffset; time += ebyeT0; // ====================================================== - + tpcHit->setTimeBucket(time); StTpcPadCoordinate padcoord(sector, row, pad, time); StTpcLocalSectorCoordinate coorS; transform(padcoord,coorS,kFALSE); diff --git a/StRoot/StTpcHitMoverMaker/StTpcHitMoverMaker.h b/StRoot/StTpcHitMoverMaker/StTpcHitMoverMaker.h index 4ef3a0607be..527ccf60228 100644 --- a/StRoot/StTpcHitMoverMaker/StTpcHitMoverMaker.h +++ b/StRoot/StTpcHitMoverMaker/StTpcHitMoverMaker.h @@ -19,7 +19,6 @@ class StTpcHitMover : public StMaker { StTpcHitMover(const char *name="tpc_hit_mover"); virtual ~StTpcHitMover(); - virtual Int_t Init(); virtual Int_t InitRun(Int_t runnumber); virtual Int_t Make(); virtual void FlushDB(); diff --git a/StRoot/Sti/StiDetector.h b/StRoot/Sti/StiDetector.h index 7bc60610cac..9bb27e8e0fd 100644 --- a/StRoot/Sti/StiDetector.h +++ b/StRoot/Sti/StiDetector.h @@ -17,7 +17,7 @@ template class StiCompositeTreeNode; class StiHitErrorCalculator; class StiElossCalculator; class StiDetector; - +class StiTpcHitErrorMDF4; typedef std::vector StiDetVect; @@ -84,7 +84,9 @@ class StiDetector : public Named StiCompositeTreeNode * getTreeNode() const {return mNode;} void setHitErrorCalculator(const StiHitErrorCalculator * calculator) {_hitErrorCalculator = calculator;} + void setHitErrorCalculatorMDF4(const StiTpcHitErrorMDF4 * calculator) {_hitErrorCalculatorMDF4 = calculator;} const StiHitErrorCalculator * getHitErrorCalculator() const {return _hitErrorCalculator;} + const StiTpcHitErrorMDF4 * getHitErrorCalculatorMDF4() const {return _hitErrorCalculatorMDF4;} void setGroupId(int id) { _groupId = _groupId < 0 ? id : _groupId; } int getGroupId() const {return _groupId;} @@ -115,6 +117,7 @@ class StiDetector : public Named /// Hit Error Calculator for this detector const StiHitErrorCalculator * _hitErrorCalculator; + const StiTpcHitErrorMDF4 *_hitErrorCalculatorMDF4; /// Continuous scatter attributes. StiMaterial *gas; diff --git a/StRoot/Sti/StiHit.cxx b/StRoot/Sti/StiHit.cxx index 312bc6feb29..817d3f0d481 100644 --- a/StRoot/Sti/StiHit.cxx +++ b/StRoot/Sti/StiHit.cxx @@ -9,6 +9,7 @@ #endif #include #include "StEventTypes.h" +#include "StEnumerations.h" #include "StiHit.h" #include "StiDetector.h" #include "StiPlacement.h" @@ -147,15 +148,20 @@ static int nCall =0; nCall++; mz = gz; double dd[3]={mx,my,mz}; - - if (!detector->insideL(dd,7,1.2)) { +// Special TPC case. Pileup tracks could be very far +// from volume in Z for splitted sectors + int mask = 7; + if (detector->getGroupId()==kTpcId) mask = 3; + if (!detector->insideL(dd,mask,1.2)) { LOG_ERROR << Form("**** StiHit.%s outside (%d) by %g (%g) ****" ,detector->getName().c_str() ,StiDetector::mgIndex ,StiDetector::mgValue[0],StiDetector::mgValue[1]) << endm; - assert( detector->insideL(dd,7,1.5)); // + // assert( detector->insideL(dd,7,1.5)); // +// static Int_t ibreak = 0; +// ibreak++; } mx = detector->_cos*gx + detector->_sin*gy; @@ -240,7 +246,12 @@ static int nCall =0; nCall++; void StiHit::addTimesUsed() { mTimesUsed++; - assert(mTimesUsed <=mMaxTimes); + // assert(mTimesUsed <=mMaxTimes); + static Int_t iwarn = 0; + if (iwarn <= 13 && mTimesUsed > mMaxTimes) { + iwarn++; + LOG_ERROR << "StiHit::addTimesUsed : mTimesUsed = " << (UInt_t) mTimesUsed << " > mMaxTimes " << mMaxTimes <position(); } @@ -309,7 +320,13 @@ int StiHit::qaTruth() const if (!stHit) return 0; return stHit->qaTruth(); } - - +//________________________________________________________________________________ +Float_t StiHit::y(Float_t time) const { + return my + _vy*time + _dY; +} +//________________________________________________________________________________ +Float_t StiHit::z(Float_t time) const { + return mz + _vz*time + _dZ; +} diff --git a/StRoot/Sti/StiHit.h b/StRoot/Sti/StiHit.h index 3520bf4015e..33007de8d56 100644 --- a/StRoot/Sti/StiHit.h +++ b/StRoot/Sti/StiHit.h @@ -67,8 +67,10 @@ class StiHit const Float_t &x() const {return mx;} const Float_t &y() const {return my;} const Float_t &z() const {return mz;} - const Float_t y(Float_t time) const {return my + _vy*time;} - const Float_t z(Float_t time) const {return mz + _vz*time;} + Float_t y(Float_t time) const; // {return my + _vy*time + _dY;} + Float_t z(Float_t time) const; // {return mz + _vz*time + _dZ;} + Float_t dY() const {return _dY;} + Float_t dZ() const {return _dZ;} ///Return the global x, y, z values. Float_t x_g() const {return _xg;} Float_t y_g() const {return _yg;} @@ -76,7 +78,6 @@ class StiHit ///Return the rxy. float rxy() const {return sqrt(_xg*_xg+_yg*_yg);} - ///Return components of the error matrix. Float_t sxx() const {return msxx;} Float_t syy() const {return msyy;} @@ -110,7 +111,7 @@ class StiHit ///Return a const reference to a StThreeVectorF that denotes the position ///of the hit in global STAR coordinates. - const StThreeVectorF globalPosition() const; + StThreeVectorF globalPosition() const; void set(Float_t position, Float_t angle, Float_t y, Float_t z); @@ -139,15 +140,17 @@ class StiHit ///Set the pointer to the corresponding StHit object. void setStHit(const StMeasuredPoint*hit){msthit=hit;} ///Set the number of times used - void setMaxTimes(int set) {mMaxTimes = set;} - void setTimesUsed(int set){mTimesUsed=set;}///??? + void setMaxTimes(int k) {mMaxTimes = k;} + void setTimesUsed(int k){mTimesUsed=k;}///??? void addTimesUsed(); void subTimesUsed(); ///Return a boolean that marks whether or not this hit is assigned to a ///track >= than max times. int isUsed() const {return mTimesUsed>=mMaxTimes;} - void setVz(Float_t vz) {_vz = vz;} - void setVy(Float_t vy) {_vy = vy;} + void setVz(Float_t vZ) {_vz = vZ;} + void setVy(Float_t vY) {_vy = vY;} + void setdY(Float_t DY) {_dY = DY;} + void setdZ(Float_t DZ) {_dZ = DZ;} void reset(); void unset(){;} void rotate(double angle); @@ -181,6 +184,7 @@ class StiHit Float_t _energy; // drift velocities cm/mksec( 0 for non driting ) Float_t _vy, _vz; + Float_t _dY, _dZ; // track parameter dependent systematics in pad and time direction (TPC) char mEnd[1]; public: Int_t mCount; diff --git a/StRoot/Sti/StiNodePars.h b/StRoot/Sti/StiNodePars.h index 1e47d287524..db8be818d05 100644 --- a/StRoot/Sti/StiNodePars.h +++ b/StRoot/Sti/StiNodePars.h @@ -1,7 +1,7 @@ #ifndef __StiNodePars_h_ #define __StiNodePars_h_ #include "Rtypes.h" - +#include "TMath.h" #define kEC 2.99792458e-4 #define kZEROHZ 2e-6 //minimal/zero mag field #define kZEROPTI 1e-3 //minimal/zero 1/pt @@ -15,14 +15,14 @@ class StiNodePars { enum {kX=0,kY=1,kZ=2,kPhi=3,kPtin=4,kTan=5,kCurv=6,kHz=7}; void reset(){memset(this,0,sizeof(StiNodePars));_cosCA=1;} void ready(); - int isZeroH() const { return fabs(P[kHz]) <= kZEROHZ;} + int isZeroH() const { return TMath::Abs(P[kHz]) <= kZEROHZ;} StiNodePars &merge(double wt,StiNodePars &other); StiNodePars &operator=(const StiNodePars& fr); void rotate(double alfa); int nan() const; /// accessors - double operator[](Int_t idx) const {return P[idx];} - double &operator[](Int_t idx) {return P[idx];} + operator const double *() const {return P;} + operator double *() {return P;} double x() const {return P[kX];} double y() const {return P[kY];}// local Y-coordinate of this track (reference plane) double z() const {return P[kZ];}// local Z-coordinate of this track (reference plane) @@ -43,7 +43,7 @@ class StiNodePars { double &curv() {return P[kCurv];} double &hz() {return P[kHz];} double *A(Int_t i) {return &P[i];} - + double *A() {return P;} Int_t check(const char *pri=0) const; void print() const; @@ -62,12 +62,12 @@ float mELoss,mLen,mDens,mX0; inline void StiNodePars::ready() { _cosCA=cos(P[kPhi]);_sinCA=sin(P[kPhi]); - if (fabs(P[kHz])<= kZEROHZ) { + if (TMath::Abs(P[kHz])<= kZEROHZ) { P[kCurv] = kZEROCURV; P[kPtin]= kZEROPTI; } else { P[kCurv] = P[kHz]*P[kPtin]; } } - +std::ostream& operator<<(std::ostream& os, StiNodePars const & pars); #endif diff --git a/StRoot/Sti/StiTrackNodeHelper.cxx b/StRoot/Sti/StiTrackNodeHelper.cxx index df78b6286b4..cd346bd703d 100644 --- a/StRoot/Sti/StiTrackNodeHelper.cxx +++ b/StRoot/Sti/StiTrackNodeHelper.cxx @@ -4,10 +4,17 @@ #include "StiTrackNodeHelper.h" #include "StiElossCalculator.h" #include "StDetectorDbMaker/StiHitErrorCalculator.h" +#include "StDetectorDbMaker/StiTpcHitErrorMDF4.h" +#include "StEvent/StTpcHit.h" +#include "StEvent/StEnumerations.h" #include "StMessMgr.h" #include "TArrayD.h" #include "TSystem.h" +#if ROOT_VERSION_CODE < 331013 +#include "TCL.h" +#else #include "TCernLib.h" +#endif //#define __CHECKIT__ // Enable unused paramter and error checks @@ -65,6 +72,10 @@ void StiTrackNodeHelper::set(StiKalmanTrackNode *pNode,StiKalmanTrackNode *sNode mParentNode = pNode; mTargetNode = sNode; mTargetHz = mTargetNode->getHz(); +assert(mTargetHz); + if (! sNode->fitPars().hz()) sNode->fitPars().hz() = mTargetHz; + //assert(sNode->fitPars().hz()); +assert(!pNode || pNode->fitPars().hz()); mParentHz = mTargetHz; if (mParentNode) { mParentHz = mParentNode->getHz(); @@ -77,7 +88,7 @@ void StiTrackNodeHelper::set(StiKalmanTrackNode *pNode,StiKalmanTrackNode *sNode #ifdef __CHECKIT__ mTargetNode->mFP.check("1StiTrackNodeHelper::set"); #endif - assert(fabs(mTargetHz-mTargetNode->mFP.hz()) < EC*0.1); + //yf assert(fabs(mTargetHz-mTargetNode->mFP.hz()) < EC*0.1); } mDetector = mTargetNode->getDetector(); @@ -123,7 +134,7 @@ int StiTrackNodeHelper::propagatePars(const StiNodePars &parPars }// end of rotation part ierr = rotPars.check(); // check parameter validity to continue if (ierr) return 1; - + // Propagation x1 = rotPars.x(); int kase = (mDetector) ? mDetector->getShape()->getShapeCode():0; @@ -358,7 +369,7 @@ int StiTrackNodeHelper::makeFit(int smooth) } mChi2 = chi2; if (mChi2>999) mChi2=999; ians = updateNode(); - if (debug() & 8) { LOG_DEBUG << Form("%5d ",ians); StiKalmanTrackNode::PrintStep();} + if (debug() & 8) { LOG_INFO << Form("%5d ",ians); StiKalmanTrackNode::PrintStep();} if (!ians) break; if (mTargetNode == mVertexNode) return 15; mState = StiTrackNode::kTNReady; @@ -415,6 +426,7 @@ int StiTrackNodeHelper::join() case kNewFitd: // Old invalid & New Fitd mJoinPars = mFitdPars; mJoinErrs = mFitdErrs; + mJoinPars.hz() = mTargetHz; kase = -1; break; @@ -465,16 +477,8 @@ int StiTrackNodeHelper::join() default: assert(0); }//end Switch } while(kase>=0); - - if (std::fabs(mJoinPars.hz() - mTargetHz) > 1e-10) - { - LOG_WARN << "Expected |mJoinPars.hz() - mTargetHz| <= 1e-10 " - << "instead |" << mJoinPars.hz() << " - " << mTargetHz << "| = " - << std::fabs(mJoinPars.hz() - mTargetHz) << ". " - << "Will set mJoinPars.hz to " << mTargetHz << endm; - mJoinPars.hz() = mTargetHz; - } - + mJoinPars.hz()=mTargetHz;//////////////////////??????????????????????????????????????????????????? + assert(fabs(mJoinPars.hz()-mTargetHz)<=1e-10); assert(fabs(mTargetNode->getHz()-mTargetHz)<=1e-10); @@ -509,10 +513,10 @@ double StiTrackNodeHelper::joinTwo(int nP1,const double *P1,const double *E1 int nE2 = nP2*(nP2+1)/2; TArrayD ard(nE2*6); double *a = ard.GetArray(); - double *sumE = (a); - double *sumEI = (a+=nE2); - double *e1sumEIe1 = (a+=nE2); - double *subP = (a+=nE2); + double *sumE = (a); + double *sumEI = (a+=nE2); + double *e1sumEIe1 = (a+=nE2); + double *subP = (a+=nE2); double *sumEIsubP = (a+=nE2); double chi2=3e33,p,q; @@ -626,7 +630,7 @@ double StiTrackNodeHelper::joinVtx(const double *Y,const StiHitErrs &B enum {nP1=3,nE1=6,nP2=6,nE2=21}; StiNodeErrs Ai=A; //Inverted A - + Ai._cXX=1; TCL::trsinv(Ai.G(),Ai.G(),nP2); Ai._cXX=0; @@ -667,7 +671,9 @@ double StiTrackNodeHelper::joinVtx(const double *Y,const StiHitErrs &B //______________________________________________________________________________ int StiTrackNodeHelper::save() { +mPredPars.hz()=mTargetHz;///???????????????????????????? assert(fabs(mPredPars.hz()-mTargetHz)<=1e-10); +mFitdPars.hz()=mTargetHz;///??????????????????????????? assert(fabs(mFitdPars.hz()-mTargetHz)<=1e-10); assert(fabs(mTargetNode->getHz()-mTargetHz)<=1e-10); @@ -1009,8 +1015,12 @@ if(ERRTEST) errTest(mPredPars,mPredErrs,mHit,mHrr,mFitdPars,mFitdErrs,mChi2); return -14; } } //EndIf Not a primary - if (debug()) StiKalmanTrackNode::comment += Form(" chi2 = %6.2f",mChi2); - if (mTargetNode && debug()) { + if (mTargetNode && debug() & 8) { + if (mTargetNode->getDetector()) + StiKalmanTrackNode::ResetComment(::Form("%40s ",mTargetNode->getDetector()->getName().c_str())); + else + StiKalmanTrackNode::ResetComment("Vx "); + StiKalmanTrackNode::comment += Form(" chi2 = %6.2f",mChi2); mTargetNode->PrintpT("U"); } mState = StiTrackNode::kTNFitEnd; @@ -1102,9 +1112,28 @@ int StiTrackNodeHelper::getHitErrors(const StiHit *hit,const StiNodePars *pars,S { hrr->reset(); const StiDetector *det = hit->detector(); - const StiHitErrorCalculator *calc = (det)? det->getHitErrorCalculator():0; - if (calc) {//calculate it - calc->calculateError(pars,hrr->hYY,hrr->hZZ); + const StiTpcHitErrorMDF4 *calcMDF4 = (det)? det->getHitErrorCalculatorMDF4() : 0; + const StiHitErrorCalculator *calc = (det)? det->getHitErrorCalculator() : 0; + if (calc || calcMDF4) {//calculate it + Double_t fudgeFactor = 1; + StTpcHit *tpcHit = (StTpcHit*) hit->stHit(); + if (tpcHit) { + if ((tpcHit->detector() == kTpcId || tpcHit->detector() == kiTpcId)) { + if (tpcHit->flag() == 2) { + fudgeFactor = 16.; + } + } + } + if (calcMDF4) { + Double_t Adc = tpcHit->adc(); + Double_t AdcL = 5.5; + if (Adc > 0) AdcL = TMath::Log(Adc); + Double_t dZ = 0; + ((StiTpcHitErrorMDF4 *) calcMDF4)->calculateError(pars,hrr->hYY,hrr->hZZ, fudgeFactor, AdcL, &dZ); + ((StiHit *) hit)->setdZ(dZ); + } else { + calc->calculateError(pars,hrr->hYY,hrr->hZZ, fudgeFactor); + } } else {//get from hit const float *ermx = hit->errMtx(); for (int i=0;i<6;i++){hrr->G()[i]=ermx[i];} diff --git a/StRoot/StiTpc/StiTpcDetectorBuilder.cxx b/StRoot/StiTpc/StiTpcDetectorBuilder.cxx index fb9d80a4584..44b4318ecd0 100644 --- a/StRoot/StiTpc/StiTpcDetectorBuilder.cxx +++ b/StRoot/StiTpc/StiTpcDetectorBuilder.cxx @@ -13,6 +13,7 @@ #include "Sti/Base/Factory.h" #include "Sti/StiToolkit.h" #include "Rtypes.h" +#include "StDetectorDbMaker/StiTpcHitErrorMDF4.h" #include "StDetectorDbMaker/StiTpcInnerHitErrorCalculator.h" #include "StDetectorDbMaker/StiTpcOuterHitErrorCalculator.h" #include "StiTpcDetectorBuilder.h" @@ -236,11 +237,17 @@ StiDetector* StiTpcDetectorBuilder::constructTpcPadrowDetector(StiLayer stiLayer pDetector->setShape(pShape); pDetector->setPlacement(pPlacement); - if (tpc_padrow_id <= nInnerPadrows) + if (tpc_padrow_id <= nInnerPadrows) { + if (StTpcDb::Alignment2024()) { + pDetector->setHitErrorCalculatorMDF4(StiTpcInnerHitErrorMDF4::instance()); + } pDetector->setHitErrorCalculator(StiTpcInnerHitErrorCalculator::instance()); - else + } else { + if (StTpcDb::Alignment2024()) { + pDetector->setHitErrorCalculatorMDF4(StiTpcOuterHitErrorMDF4::instance()); + } pDetector->setHitErrorCalculator(StiTpcOuterHitErrorCalculator::instance()); - + } pDetector->setKey(1,stiLayer.sti_padrow_id); pDetector->setKey(2,stiLayer.sti_sector_id); diff --git a/StRoot/macros/analysis/find_vertex.C b/StRoot/macros/analysis/find_vertex.C index 703e8956862..63b8f942da2 100644 --- a/StRoot/macros/analysis/find_vertex.C +++ b/StRoot/macros/analysis/find_vertex.C @@ -123,6 +123,7 @@ void find_vertex(char * fname="high_053/st_physics_6053108_raw_2020002.event.roo // Load my makers + gSystem->Load("StDbUtilities"); // new addition 08/11/2024 gSystem->Load("Sti"); gSystem->Load("libStEEmcUtil"); gSystem->Load("libMinuit"); diff --git a/StRoot/macros/bfc.C b/StRoot/macros/bfc.C index 3c7538fb0eb..7cc7427dfc5 100644 --- a/StRoot/macros/bfc.C +++ b/StRoot/macros/bfc.C @@ -128,6 +128,7 @@ void Load(const Char_t *options) if(gSystem->Load("libStStarLogger.so") >= 0) { // StMemStat::PrintMem("load log4cxx"); cout << " + libStStarLogger.so"; gROOT->ProcessLine("StLoggerManager::StarLoggerInit();"); + if (gROOT->IsBatch()) StLoggerManager::setColorEnabled(kFALSE); } } // gSystem->Load("libHtml"); diff --git a/StarDb/Calibrations/tpc/TpcSecRowB.r2020.C b/StarDb/Calibrations/tpc/TpcSecRowB.y2020.C similarity index 100% rename from StarDb/Calibrations/tpc/TpcSecRowB.r2020.C rename to StarDb/Calibrations/tpc/TpcSecRowB.y2020.C diff --git a/StarDb/Calibrations/tpc/TpcSecRowB.r2021.C b/StarDb/Calibrations/tpc/TpcSecRowB.y2021.C similarity index 100% rename from StarDb/Calibrations/tpc/TpcSecRowB.r2021.C rename to StarDb/Calibrations/tpc/TpcSecRowB.y2021.C diff --git a/StarDb/Calibrations/tpc/TpcSecRowB.y2022.C b/StarDb/Calibrations/tpc/TpcSecRowB.y2022.C new file mode 120000 index 00000000000..b0c66b8ab91 --- /dev/null +++ b/StarDb/Calibrations/tpc/TpcSecRowB.y2022.C @@ -0,0 +1 @@ +TpcSecRowB.C \ No newline at end of file diff --git a/StarDb/Calibrations/tpc/TpcSecRowB.y2023.C b/StarDb/Calibrations/tpc/TpcSecRowB.y2023.C new file mode 120000 index 00000000000..b0c66b8ab91 --- /dev/null +++ b/StarDb/Calibrations/tpc/TpcSecRowB.y2023.C @@ -0,0 +1 @@ +TpcSecRowB.C \ No newline at end of file diff --git a/StarDb/Calibrations/tracker/KalmanTrackFinderParameters.y2017.C b/StarDb/Calibrations/tracker/KalmanTrackFinderParameters.y2017.C new file mode 120000 index 00000000000..98a2d485d6e --- /dev/null +++ b/StarDb/Calibrations/tracker/KalmanTrackFinderParameters.y2017.C @@ -0,0 +1 @@ +KalmanTrackFinderParameters.y2013.C \ No newline at end of file diff --git a/StarDb/Calibrations/tracker/TpcInnerHitErrorMDF4.C b/StarDb/Calibrations/tracker/TpcInnerHitErrorMDF4.C new file mode 120000 index 00000000000..c37d1ee7e99 --- /dev/null +++ b/StarDb/Calibrations/tracker/TpcInnerHitErrorMDF4.C @@ -0,0 +1 @@ +TpcInnerHitErrorMDF4.y2019.C \ No newline at end of file diff --git a/StarDb/Calibrations/tracker/TpcInnerHitErrorMDF4.y2019.C b/StarDb/Calibrations/tracker/TpcInnerHitErrorMDF4.y2019.C new file mode 100644 index 00000000000..4c6cfdcd131 --- /dev/null +++ b/StarDb/Calibrations/tracker/TpcInnerHitErrorMDF4.y2019.C @@ -0,0 +1,209 @@ +#ifndef __CINT__ +#include "tables/St_MDFCorrection4_Table.h" +#endif +TDataSet *CreateTable() { + if (!gROOT->GetClass("St_MDFCorrection4")) return 0; + MDFCorrection4_st row; + St_MDFCorrection4 *tableSet = new St_MDFCorrection4("TpcInnerHitErrorMDF4",4); + memset(&row,0,tableSet->GetRowSize()); + row.nrows = 4; //dPadI dPadIGP11p5GeV.root + row.idx = 1;// Sigma + row.PolyType = 1; + row.NVariables = 4; + row.NCoefficients = 20; + row.XMin[ 0] = 0.017847; row.XMin[ 1] = 0.0025; row.XMin[ 2] = 0.0025; row.XMin[ 3] = 3.75; + row.XMax[ 0] = 0.98074; row.XMax[ 1] = 1.8225; row.XMax[ 2] = 30.803; row.XMax[ 3] = 8.25; + row.Power[ 0] = 1; row.Power[ 1] = 1; row.Power[ 2] = 1; row.Power[ 3] = 1; + row.Power[ 4] = 1; row.Power[ 5] = 3; row.Power[ 6] = 1; row.Power[ 7] = 1; + row.Power[ 8] = 1; row.Power[ 9] = 1; row.Power[10] = 2; row.Power[11] = 1; + row.Power[12] = 1; row.Power[13] = 1; row.Power[14] = 1; row.Power[15] = 2; + row.Power[16] = 2; row.Power[17] = 1; row.Power[18] = 1; row.Power[19] = 1; + row.Power[20] = 1; row.Power[21] = 1; row.Power[22] = 3; row.Power[23] = 1; + row.Power[24] = 1; row.Power[25] = 4; row.Power[26] = 1; row.Power[27] = 1; + row.Power[28] = 1; row.Power[29] = 1; row.Power[30] = 1; row.Power[31] = 4; + row.Power[32] = 1; row.Power[33] = 4; row.Power[34] = 2; row.Power[35] = 1; + row.Power[36] = 1; row.Power[37] = 5; row.Power[38] = 1; row.Power[39] = 3; + row.Power[40] = 2; row.Power[41] = 1; row.Power[42] = 1; row.Power[43] = 2; + row.Power[44] = 1; row.Power[45] = 1; row.Power[46] = 4; row.Power[47] = 1; + row.Power[48] = 1; row.Power[49] = 1; row.Power[50] = 2; row.Power[51] = 3; + row.Power[52] = 1; row.Power[53] = 4; row.Power[54] = 3; row.Power[55] = 1; + row.Power[56] = 1; row.Power[57] = 4; row.Power[58] = 1; row.Power[59] = 3; + row.Power[60] = 1; row.Power[61] = 3; row.Power[62] = 1; row.Power[63] = 4; + row.Power[64] = 1; row.Power[65] = 4; row.Power[66] = 4; row.Power[67] = 1; + row.Power[68] = 1; row.Power[69] = 4; row.Power[70] = 3; row.Power[71] = 2; + row.Power[72] = 2; row.Power[73] = 5; row.Power[74] = 2; row.Power[75] = 1; + row.Power[76] = 1; row.Power[77] = 5; row.Power[78] = 2; row.Power[79] = 2; + row.DMean = 0.00901855; + row.Coefficients[ 0] = 0.009335; row.Coefficients[ 1] = -0.031488; + row.Coefficients[ 2] = -0.0081522; row.Coefficients[ 3] = -0.009034; + row.Coefficients[ 4] = 0.0028505; row.Coefficients[ 5] = -0.0028989; + row.Coefficients[ 6] = -0.023329; row.Coefficients[ 7] = -0.0070426; + row.Coefficients[ 8] = -0.0128; row.Coefficients[ 9] = 0.0014923; + row.Coefficients[10] = -0.0033229; row.Coefficients[11] = -0.004563; + row.Coefficients[12] = 0.0034459; row.Coefficients[13] = -0.0035417; + row.Coefficients[14] = -0.005921; row.Coefficients[15] = 0.0058214; + row.Coefficients[16] = -0.0048328; row.Coefficients[17] = 0.00050608; + row.Coefficients[18] = 0.0014908; row.Coefficients[19] = -0.0044357; + row.CoefficientsRMS[ 0] = 3.0428e-05; row.CoefficientsRMS[ 1] = 3.269e-05; + row.CoefficientsRMS[ 2] = 4.8372e-05; row.CoefficientsRMS[ 3] = 8.9125e-06; + row.CoefficientsRMS[ 4] = 2.3516e-06; row.CoefficientsRMS[ 5] = 3.2081e-05; + row.CoefficientsRMS[ 6] = 3.5563e-05; row.CoefficientsRMS[ 7] = 1.2526e-05; + row.CoefficientsRMS[ 8] = 4.9645e-05; row.CoefficientsRMS[ 9] = 1.5067e-05; + row.CoefficientsRMS[10] = 6.208e-06; row.CoefficientsRMS[11] = 1.4007e-05; + row.CoefficientsRMS[12] = 9.7342e-06; row.CoefficientsRMS[13] = 3.3253e-05; + row.CoefficientsRMS[14] = 2.1167e-05; row.CoefficientsRMS[15] = 1.3646e-05; + row.CoefficientsRMS[16] = 1.47e-05; row.CoefficientsRMS[17] = 1.1541e-05; + row.CoefficientsRMS[18] = 3.9619e-06; row.CoefficientsRMS[19] = 1.5787e-05; + tableSet->AddAt(&row); // idx = 1 + memset(&row,0,tableSet->GetRowSize()); + row.nrows = 4; //dPadI dPadIGP11p5GeV.root + row.idx = 2;// Mu + row.PolyType = 1; + row.NVariables = 4; + row.NCoefficients = 20; + row.XMin[ 0] = 0.017847; row.XMin[ 1] = 0.0025; row.XMin[ 2] = 0.0025; row.XMin[ 3] = 3.75; + row.XMax[ 0] = 0.98074; row.XMax[ 1] = 1.8225; row.XMax[ 2] = 30.803; row.XMax[ 3] = 8.25; + row.Power[ 0] = 1; row.Power[ 1] = 1; row.Power[ 2] = 1; row.Power[ 3] = 1; + row.Power[ 4] = 1; row.Power[ 5] = 3; row.Power[ 6] = 1; row.Power[ 7] = 3; + row.Power[ 8] = 1; row.Power[ 9] = 1; row.Power[10] = 2; row.Power[11] = 1; + row.Power[12] = 1; row.Power[13] = 3; row.Power[14] = 2; row.Power[15] = 1; + row.Power[16] = 2; row.Power[17] = 1; row.Power[18] = 4; row.Power[19] = 1; + row.Power[20] = 2; row.Power[21] = 3; row.Power[22] = 3; row.Power[23] = 1; + row.Power[24] = 2; row.Power[25] = 2; row.Power[26] = 2; row.Power[27] = 3; + row.Power[28] = 1; row.Power[29] = 5; row.Power[30] = 3; row.Power[31] = 1; + row.Power[32] = 1; row.Power[33] = 5; row.Power[34] = 3; row.Power[35] = 4; + row.Power[36] = 2; row.Power[37] = 3; row.Power[38] = 4; row.Power[39] = 4; + row.Power[40] = 2; row.Power[41] = 1; row.Power[42] = 1; row.Power[43] = 1; + row.Power[44] = 2; row.Power[45] = 1; row.Power[46] = 2; row.Power[47] = 1; + row.Power[48] = 1; row.Power[49] = 4; row.Power[50] = 1; row.Power[51] = 1; + row.Power[52] = 1; row.Power[53] = 1; row.Power[54] = 4; row.Power[55] = 1; + row.Power[56] = 2; row.Power[57] = 3; row.Power[58] = 1; row.Power[59] = 1; + row.Power[60] = 1; row.Power[61] = 1; row.Power[62] = 1; row.Power[63] = 4; + row.Power[64] = 4; row.Power[65] = 1; row.Power[66] = 1; row.Power[67] = 1; + row.Power[68] = 1; row.Power[69] = 3; row.Power[70] = 2; row.Power[71] = 2; + row.Power[72] = 1; row.Power[73] = 4; row.Power[74] = 1; row.Power[75] = 2; + row.Power[76] = 1; row.Power[77] = 1; row.Power[78] = 3; row.Power[79] = 3; + row.DMean = -0.000850584; + row.Coefficients[ 0] = -0.0026694; row.Coefficients[ 1] = -0.0022531; + row.Coefficients[ 2] = -0.0022724; row.Coefficients[ 3] = -0.00017768; + row.Coefficients[ 4] = 0.00080313; row.Coefficients[ 5] = -0.00049902; + row.Coefficients[ 6] = 0.0005523; row.Coefficients[ 7] = 0.00051847; + row.Coefficients[ 8] = 0.00087607; row.Coefficients[ 9] = -0.00069464; + row.Coefficients[10] = -0.0031648; row.Coefficients[11] = -0.0027661; + row.Coefficients[12] = 0.00065497; row.Coefficients[13] = 0.00017034; + row.Coefficients[14] = 0.001416; row.Coefficients[15] = -0.00036636; + row.Coefficients[16] = -0.00016099; row.Coefficients[17] = 0.0015757; + row.Coefficients[18] = -0.0010378; row.Coefficients[19] = 0.00043493; + row.CoefficientsRMS[ 0] = 7.0711e-11; row.CoefficientsRMS[ 1] = 1.3212e-10; + row.CoefficientsRMS[ 2] = 9.3602e-11; row.CoefficientsRMS[ 3] = 1.3438e-10; + row.CoefficientsRMS[ 4] = 1.0334e-10; row.CoefficientsRMS[ 5] = 1.4972e-10; + row.CoefficientsRMS[ 6] = 1.1847e-10; row.CoefficientsRMS[ 7] = 1.5864e-10; + row.CoefficientsRMS[ 8] = 4.8389e-10; row.CoefficientsRMS[ 9] = 4.7268e-10; + row.CoefficientsRMS[10] = 9.6368e-11; row.CoefficientsRMS[11] = 1.0725e-10; + row.CoefficientsRMS[12] = 1.5738e-10; row.CoefficientsRMS[13] = 7.5613e-11; + row.CoefficientsRMS[14] = 1.4424e-10; row.CoefficientsRMS[15] = 2.1568e-10; + row.CoefficientsRMS[16] = 9.4444e-11; row.CoefficientsRMS[17] = 1.2094e-09; + row.CoefficientsRMS[18] = 1.4164e-09; row.CoefficientsRMS[19] = 8.6355e-11; + tableSet->AddAt(&row); // idx = 2 + memset(&row,0,tableSet->GetRowSize()); + row.nrows = 4; //dTimeI dTimeIGP11p5GeV.root + row.idx = 3;// Sigma + row.PolyType = 1; + row.NVariables = 4; + row.NCoefficients = 20; + row.XMin[ 0] = 0.017847; row.XMin[ 1] = 0.0025; row.XMin[ 2] = 0.0025; row.XMin[ 3] = 3.75; + row.XMax[ 0] = 0.98074; row.XMax[ 1] = 2.4025; row.XMax[ 2] = 30.803; row.XMax[ 3] = 8.25; + row.Power[ 0] = 1; row.Power[ 1] = 1; row.Power[ 2] = 1; row.Power[ 3] = 1; + row.Power[ 4] = 1; row.Power[ 5] = 1; row.Power[ 6] = 2; row.Power[ 7] = 1; + row.Power[ 8] = 1; row.Power[ 9] = 1; row.Power[10] = 4; row.Power[11] = 1; + row.Power[12] = 2; row.Power[13] = 1; row.Power[14] = 1; row.Power[15] = 1; + row.Power[16] = 2; row.Power[17] = 1; row.Power[18] = 2; row.Power[19] = 1; + row.Power[20] = 1; row.Power[21] = 2; row.Power[22] = 1; row.Power[23] = 4; + row.Power[24] = 1; row.Power[25] = 1; row.Power[26] = 3; row.Power[27] = 4; + row.Power[28] = 1; row.Power[29] = 1; row.Power[30] = 4; row.Power[31] = 4; + row.Power[32] = 1; row.Power[33] = 1; row.Power[34] = 5; row.Power[35] = 4; + row.Power[36] = 1; row.Power[37] = 1; row.Power[38] = 4; row.Power[39] = 3; + row.Power[40] = 1; row.Power[41] = 3; row.Power[42] = 1; row.Power[43] = 4; + row.Power[44] = 1; row.Power[45] = 1; row.Power[46] = 5; row.Power[47] = 3; + row.Power[48] = 1; row.Power[49] = 4; row.Power[50] = 4; row.Power[51] = 2; + row.Power[52] = 1; row.Power[53] = 5; row.Power[54] = 1; row.Power[55] = 4; + row.Power[56] = 2; row.Power[57] = 4; row.Power[58] = 2; row.Power[59] = 3; + row.Power[60] = 1; row.Power[61] = 5; row.Power[62] = 4; row.Power[63] = 2; + row.Power[64] = 1; row.Power[65] = 4; row.Power[66] = 3; row.Power[67] = 4; + row.Power[68] = 2; row.Power[69] = 4; row.Power[70] = 3; row.Power[71] = 3; + row.Power[72] = 1; row.Power[73] = 1; row.Power[74] = 1; row.Power[75] = 2; + row.Power[76] = 1; row.Power[77] = 1; row.Power[78] = 1; row.Power[79] = 3; + row.DMean = 0.0770039; + row.Coefficients[ 0] = 0.14099; row.Coefficients[ 1] = 0.15548; + row.Coefficients[ 2] = 0.031962; row.Coefficients[ 3] = 0.027021; + row.Coefficients[ 4] = 0.015733; row.Coefficients[ 5] = -0.033396; + row.Coefficients[ 6] = -0.075108; row.Coefficients[ 7] = -0.10193; + row.Coefficients[ 8] = -0.056198; row.Coefficients[ 9] = -0.018322; + row.Coefficients[10] = -0.041983; row.Coefficients[11] = 0.0088973; + row.Coefficients[12] = 0.077923; row.Coefficients[13] = -0.025731; + row.Coefficients[14] = -0.02046; row.Coefficients[15] = 0.048227; + row.Coefficients[16] = -0.059486; row.Coefficients[17] = -0.020632; + row.Coefficients[18] = -0.015509; row.Coefficients[19] = -0.012421; + row.CoefficientsRMS[ 0] = 8.9211e-11; row.CoefficientsRMS[ 1] = 5.6399e-11; + row.CoefficientsRMS[ 2] = 1.2943e-10; row.CoefficientsRMS[ 3] = 7.8792e-11; + row.CoefficientsRMS[ 4] = 1.2064e-10; row.CoefficientsRMS[ 5] = 2.272e-10; + row.CoefficientsRMS[ 6] = 1.1047e-10; row.CoefficientsRMS[ 7] = 1.1791e-10; + row.CoefficientsRMS[ 8] = 4.1307e-11; row.CoefficientsRMS[ 9] = 1.4306e-10; + row.CoefficientsRMS[10] = 2.7329e-10; row.CoefficientsRMS[11] = 3.4059e-11; + row.CoefficientsRMS[12] = 7.4744e-10; row.CoefficientsRMS[13] = 1.0839e-10; + row.CoefficientsRMS[14] = 9.8324e-11; row.CoefficientsRMS[15] = 5.7152e-10; + row.CoefficientsRMS[16] = 1.2813e-10; row.CoefficientsRMS[17] = 1.0961e-10; + row.CoefficientsRMS[18] = 2.1552e-10; row.CoefficientsRMS[19] = 8.9356e-11; + tableSet->AddAt(&row); // idx = 3 + memset(&row,0,tableSet->GetRowSize()); + row.nrows = 4; //dTimeI dTimeIGP11p5GeV.root + row.idx = 4;// Mu + row.PolyType = 1; + row.NVariables = 4; + row.NCoefficients = 20; + row.XMin[ 0] = 0.017847; row.XMin[ 1] = 0.0025; row.XMin[ 2] = 0.0025; row.XMin[ 3] = 3.75; + row.XMax[ 0] = 0.98074; row.XMax[ 1] = 2.4025; row.XMax[ 2] = 30.803; row.XMax[ 3] = 8.25; + row.Power[ 0] = 1; row.Power[ 1] = 1; row.Power[ 2] = 1; row.Power[ 3] = 1; + row.Power[ 4] = 1; row.Power[ 5] = 1; row.Power[ 6] = 2; row.Power[ 7] = 1; + row.Power[ 8] = 1; row.Power[ 9] = 1; row.Power[10] = 1; row.Power[11] = 2; + row.Power[12] = 1; row.Power[13] = 1; row.Power[14] = 1; row.Power[15] = 3; + row.Power[16] = 1; row.Power[17] = 1; row.Power[18] = 3; row.Power[19] = 2; + row.Power[20] = 1; row.Power[21] = 1; row.Power[22] = 1; row.Power[23] = 4; + row.Power[24] = 1; row.Power[25] = 3; row.Power[26] = 1; row.Power[27] = 1; + row.Power[28] = 2; row.Power[29] = 1; row.Power[30] = 1; row.Power[31] = 2; + row.Power[32] = 1; row.Power[33] = 3; row.Power[34] = 1; row.Power[35] = 2; + row.Power[36] = 2; row.Power[37] = 1; row.Power[38] = 3; row.Power[39] = 1; + row.Power[40] = 2; row.Power[41] = 1; row.Power[42] = 2; row.Power[43] = 3; + row.Power[44] = 2; row.Power[45] = 2; row.Power[46] = 1; row.Power[47] = 3; + row.Power[48] = 1; row.Power[49] = 5; row.Power[50] = 2; row.Power[51] = 1; + row.Power[52] = 2; row.Power[53] = 1; row.Power[54] = 1; row.Power[55] = 4; + row.Power[56] = 2; row.Power[57] = 2; row.Power[58] = 4; row.Power[59] = 1; + row.Power[60] = 1; row.Power[61] = 4; row.Power[62] = 1; row.Power[63] = 3; + row.Power[64] = 2; row.Power[65] = 3; row.Power[66] = 1; row.Power[67] = 3; + row.Power[68] = 2; row.Power[69] = 2; row.Power[70] = 3; row.Power[71] = 3; + row.Power[72] = 2; row.Power[73] = 3; row.Power[74] = 2; row.Power[75] = 1; + row.Power[76] = 3; row.Power[77] = 1; row.Power[78] = 2; row.Power[79] = 2; + row.DMean = -0.0589004; + row.Coefficients[ 0] = -0.25669; row.Coefficients[ 1] = -0.18444; + row.Coefficients[ 2] = -0.23436; row.Coefficients[ 3] = -0.12591; + row.Coefficients[ 4] = -0.054896; row.Coefficients[ 5] = -0.090793; + row.Coefficients[ 6] = -0.055669; row.Coefficients[ 7] = 0.30043; + row.Coefficients[ 8] = -0.080683; row.Coefficients[ 9] = 0.11585; + row.Coefficients[10] = -0.085476; row.Coefficients[11] = 0.070794; + row.Coefficients[12] = 0.017; row.Coefficients[13] = 0.096205; + row.Coefficients[14] = -0.014395; row.Coefficients[15] = 0.038102; + row.Coefficients[16] = 0.076423; row.Coefficients[17] = -0.094327; + row.Coefficients[18] = -0.065312; row.Coefficients[19] = -0.011084; + row.CoefficientsRMS[ 0] = 1.8471e-10; row.CoefficientsRMS[ 1] = 5.3084e-11; + row.CoefficientsRMS[ 2] = 4.8263e-10; row.CoefficientsRMS[ 3] = 1.3771e-10; + row.CoefficientsRMS[ 4] = 1.413e-10; row.CoefficientsRMS[ 5] = 1.6382e-10; + row.CoefficientsRMS[ 6] = 1.7035e-10; row.CoefficientsRMS[ 7] = 5.588e-10; + row.CoefficientsRMS[ 8] = 2.0566e-10; row.CoefficientsRMS[ 9] = 1.6972e-10; + row.CoefficientsRMS[10] = 1.9562e-10; row.CoefficientsRMS[11] = 2.0536e-10; + row.CoefficientsRMS[12] = 5.8984e-11; row.CoefficientsRMS[13] = 2.261e-10; + row.CoefficientsRMS[14] = 5.4589e-11; row.CoefficientsRMS[15] = 1.212e-10; + row.CoefficientsRMS[16] = 2.0753e-10; row.CoefficientsRMS[17] = 2.0853e-10; + row.CoefficientsRMS[18] = 1.7647e-10; row.CoefficientsRMS[19] = 1.4169e-10; + tableSet->AddAt(&row); // idx = 4 + return (TDataSet *)tableSet; +} diff --git a/StarDb/Calibrations/tracker/TpcOuterHitErrorMDF4.C b/StarDb/Calibrations/tracker/TpcOuterHitErrorMDF4.C new file mode 120000 index 00000000000..e5a83a8440d --- /dev/null +++ b/StarDb/Calibrations/tracker/TpcOuterHitErrorMDF4.C @@ -0,0 +1 @@ +TpcOuterHitErrorMDF4.y2019.C \ No newline at end of file diff --git a/StarDb/Calibrations/tracker/TpcOuterHitErrorMDF4.y2019.C b/StarDb/Calibrations/tracker/TpcOuterHitErrorMDF4.y2019.C new file mode 100644 index 00000000000..9771834dd81 --- /dev/null +++ b/StarDb/Calibrations/tracker/TpcOuterHitErrorMDF4.y2019.C @@ -0,0 +1,209 @@ +#ifndef __CINT__ +#include "tables/St_MDFCorrection4_Table.h" +#endif +TDataSet *CreateTable() { + if (!gROOT->GetClass("St_MDFCorrection4")) return 0; + MDFCorrection4_st row; + St_MDFCorrection4 *tableSet = new St_MDFCorrection4("TpcOuterHitErrorMDF4",4); + memset(&row,0,tableSet->GetRowSize()); + row.nrows = 4; //dPadO dPadOGP11p5GeV.root + row.idx = 1;// Sigma + row.PolyType = 1; + row.NVariables = 4; + row.NCoefficients = 20; + row.XMin[ 0] = 0.017847; row.XMin[ 1] = 0.0025; row.XMin[ 2] = 0.0025; row.XMin[ 3] = 3.25; + row.XMax[ 0] = 0.98074; row.XMax[ 1] = 4.2025; row.XMax[ 2] = 9.9225; row.XMax[ 3] = 8.75; + row.Power[ 0] = 1; row.Power[ 1] = 1; row.Power[ 2] = 1; row.Power[ 3] = 1; + row.Power[ 4] = 1; row.Power[ 5] = 3; row.Power[ 6] = 1; row.Power[ 7] = 1; + row.Power[ 8] = 1; row.Power[ 9] = 1; row.Power[10] = 1; row.Power[11] = 2; + row.Power[12] = 1; row.Power[13] = 3; row.Power[14] = 1; row.Power[15] = 2; + row.Power[16] = 2; row.Power[17] = 1; row.Power[18] = 1; row.Power[19] = 1; + row.Power[20] = 1; row.Power[21] = 2; row.Power[22] = 1; row.Power[23] = 3; + row.Power[24] = 1; row.Power[25] = 1; row.Power[26] = 2; row.Power[27] = 3; + row.Power[28] = 1; row.Power[29] = 4; row.Power[30] = 2; row.Power[31] = 1; + row.Power[32] = 1; row.Power[33] = 5; row.Power[34] = 1; row.Power[35] = 1; + row.Power[36] = 2; row.Power[37] = 2; row.Power[38] = 3; row.Power[39] = 1; + row.Power[40] = 2; row.Power[41] = 1; row.Power[42] = 4; row.Power[43] = 1; + row.Power[44] = 1; row.Power[45] = 1; row.Power[46] = 3; row.Power[47] = 3; + row.Power[48] = 3; row.Power[49] = 1; row.Power[50] = 3; row.Power[51] = 1; + row.Power[52] = 1; row.Power[53] = 4; row.Power[54] = 3; row.Power[55] = 1; + row.Power[56] = 1; row.Power[57] = 5; row.Power[58] = 2; row.Power[59] = 1; + row.Power[60] = 2; row.Power[61] = 3; row.Power[62] = 3; row.Power[63] = 1; + row.Power[64] = 2; row.Power[65] = 1; row.Power[66] = 5; row.Power[67] = 1; + row.Power[68] = 1; row.Power[69] = 3; row.Power[70] = 1; row.Power[71] = 4; + row.Power[72] = 1; row.Power[73] = 1; row.Power[74] = 5; row.Power[75] = 3; + row.Power[76] = 1; row.Power[77] = 2; row.Power[78] = 4; row.Power[79] = 3; + row.DMean = 0.0122058; + row.Coefficients[ 0] = 0.011092; row.Coefficients[ 1] = -0.0050559; + row.Coefficients[ 2] = -0.02058; row.Coefficients[ 3] = 0.01045; + row.Coefficients[ 4] = -0.0020002; row.Coefficients[ 5] = -0.02241; + row.Coefficients[ 6] = 0.023997; row.Coefficients[ 7] = -0.028277; + row.Coefficients[ 8] = 0.0014264; row.Coefficients[ 9] = -0.023958; + row.Coefficients[10] = 0.013982; row.Coefficients[11] = -0.00052498; + row.Coefficients[12] = 0.0018993; row.Coefficients[13] = -0.0045704; + row.Coefficients[14] = -0.0097242; row.Coefficients[15] = -0.01327; + row.Coefficients[16] = 0.0058038; row.Coefficients[17] = -0.004116; + row.Coefficients[18] = -0.0038928; row.Coefficients[19] = 0.0063783; + row.CoefficientsRMS[ 0] = 5.1679e-06; row.CoefficientsRMS[ 1] = 3.1279e-06; + row.CoefficientsRMS[ 2] = 1.5507e-05; row.CoefficientsRMS[ 3] = 2.5429e-05; + row.CoefficientsRMS[ 4] = 2.5281e-06; row.CoefficientsRMS[ 5] = 5.9922e-06; + row.CoefficientsRMS[ 6] = 1.0833e-05; row.CoefficientsRMS[ 7] = 8.3612e-06; + row.CoefficientsRMS[ 8] = 8.6648e-06; row.CoefficientsRMS[ 9] = 1.1921e-05; + row.CoefficientsRMS[10] = 6.8634e-06; row.CoefficientsRMS[11] = 5.2494e-06; + row.CoefficientsRMS[12] = 2.8269e-06; row.CoefficientsRMS[13] = 6.2336e-06; + row.CoefficientsRMS[14] = 1.5778e-05; row.CoefficientsRMS[15] = 1.1019e-05; + row.CoefficientsRMS[16] = 4.5526e-06; row.CoefficientsRMS[17] = 7.7983e-06; + row.CoefficientsRMS[18] = 3.2781e-06; row.CoefficientsRMS[19] = 4.8768e-06; + tableSet->AddAt(&row); // idx = 1 + memset(&row,0,tableSet->GetRowSize()); + row.nrows = 4; //dPadO dPadOGP11p5GeV.root + row.idx = 2;// Mu + row.PolyType = 1; + row.NVariables = 4; + row.NCoefficients = 20; + row.XMin[ 0] = 0.017847; row.XMin[ 1] = 0.0025; row.XMin[ 2] = 0.0025; row.XMin[ 3] = 3.25; + row.XMax[ 0] = 0.98074; row.XMax[ 1] = 4.2025; row.XMax[ 2] = 9.9225; row.XMax[ 3] = 8.75; + row.Power[ 0] = 1; row.Power[ 1] = 1; row.Power[ 2] = 1; row.Power[ 3] = 1; + row.Power[ 4] = 1; row.Power[ 5] = 3; row.Power[ 6] = 1; row.Power[ 7] = 1; + row.Power[ 8] = 1; row.Power[ 9] = 4; row.Power[10] = 1; row.Power[11] = 1; + row.Power[12] = 1; row.Power[13] = 5; row.Power[14] = 1; row.Power[15] = 1; + row.Power[16] = 1; row.Power[17] = 1; row.Power[18] = 1; row.Power[19] = 3; + row.Power[20] = 1; row.Power[21] = 2; row.Power[22] = 3; row.Power[23] = 1; + row.Power[24] = 1; row.Power[25] = 3; row.Power[26] = 1; row.Power[27] = 2; + row.Power[28] = 2; row.Power[29] = 1; row.Power[30] = 3; row.Power[31] = 1; + row.Power[32] = 1; row.Power[33] = 1; row.Power[34] = 1; row.Power[35] = 4; + row.Power[36] = 2; row.Power[37] = 2; row.Power[38] = 3; row.Power[39] = 1; + row.Power[40] = 2; row.Power[41] = 3; row.Power[42] = 3; row.Power[43] = 1; + row.Power[44] = 1; row.Power[45] = 1; row.Power[46] = 3; row.Power[47] = 4; + row.Power[48] = 1; row.Power[49] = 2; row.Power[50] = 3; row.Power[51] = 2; + row.Power[52] = 1; row.Power[53] = 3; row.Power[54] = 1; row.Power[55] = 3; + row.Power[56] = 1; row.Power[57] = 1; row.Power[58] = 5; row.Power[59] = 2; + row.Power[60] = 2; row.Power[61] = 1; row.Power[62] = 5; row.Power[63] = 1; + row.Power[64] = 1; row.Power[65] = 2; row.Power[66] = 3; row.Power[67] = 3; + row.Power[68] = 2; row.Power[69] = 1; row.Power[70] = 3; row.Power[71] = 3; + row.Power[72] = 1; row.Power[73] = 4; row.Power[74] = 4; row.Power[75] = 1; + row.Power[76] = 1; row.Power[77] = 3; row.Power[78] = 5; row.Power[79] = 1; + row.DMean = -0.00135296; + row.Coefficients[ 0] = -0.011787; row.Coefficients[ 1] = 0.017428; + row.Coefficients[ 2] = 0.018864; row.Coefficients[ 3] = 0.0068387; + row.Coefficients[ 4] = -0.0061022; row.Coefficients[ 5] = -0.0034775; + row.Coefficients[ 6] = -0.007112; row.Coefficients[ 7] = -0.028389; + row.Coefficients[ 8] = -0.0013612; row.Coefficients[ 9] = -0.037112; + row.Coefficients[10] = -0.010606; row.Coefficients[11] = -0.0039881; + row.Coefficients[12] = 0.0073319; row.Coefficients[13] = -0.0019778; + row.Coefficients[14] = 0.0018032; row.Coefficients[15] = -0.00051138; + row.Coefficients[16] = -0.0019375; row.Coefficients[17] = -0.0021751; + row.Coefficients[18] = -0.0010786; row.Coefficients[19] = 0.00082372; + row.CoefficientsRMS[ 0] = 0.00039793; row.CoefficientsRMS[ 1] = 0.00036032; + row.CoefficientsRMS[ 2] = 2.7054e-05; row.CoefficientsRMS[ 3] = 4.7664e-05; + row.CoefficientsRMS[ 4] = 0.000386; row.CoefficientsRMS[ 5] = 0.00019095; + row.CoefficientsRMS[ 6] = 0.00033088; row.CoefficientsRMS[ 7] = 0.00037707; + row.CoefficientsRMS[ 8] = 0.00010976; row.CoefficientsRMS[ 9] = 0.00048387; + row.CoefficientsRMS[10] = 0.00017376; row.CoefficientsRMS[11] = 0.00019481; + row.CoefficientsRMS[12] = 0.00050919; row.CoefficientsRMS[13] = 0.00032954; + row.CoefficientsRMS[14] = 8.127e-05; row.CoefficientsRMS[15] = 3.1814e-05; + row.CoefficientsRMS[16] = 0.00020766; row.CoefficientsRMS[17] = 0.00015999; + row.CoefficientsRMS[18] = 3.0516e-05; row.CoefficientsRMS[19] = 2.721e-05; + tableSet->AddAt(&row); // idx = 2 + memset(&row,0,tableSet->GetRowSize()); + row.nrows = 4; //dTimeO dTimeOGP11p5GeV.root + row.idx = 3;// Sigma + row.PolyType = 1; + row.NVariables = 4; + row.NCoefficients = 20; + row.XMin[ 0] = 0.017847; row.XMin[ 1] = 0.0025; row.XMin[ 2] = 0.0025; row.XMin[ 3] = 3.25; + row.XMax[ 0] = 0.98074; row.XMax[ 1] = 4.2025; row.XMax[ 2] = 9.3025; row.XMax[ 3] = 8.75; + row.Power[ 0] = 1; row.Power[ 1] = 1; row.Power[ 2] = 1; row.Power[ 3] = 1; + row.Power[ 4] = 1; row.Power[ 5] = 1; row.Power[ 6] = 2; row.Power[ 7] = 1; + row.Power[ 8] = 1; row.Power[ 9] = 1; row.Power[10] = 3; row.Power[11] = 1; + row.Power[12] = 2; row.Power[13] = 1; row.Power[14] = 1; row.Power[15] = 1; + row.Power[16] = 1; row.Power[17] = 1; row.Power[18] = 5; row.Power[19] = 2; + row.Power[20] = 1; row.Power[21] = 4; row.Power[22] = 1; row.Power[23] = 4; + row.Power[24] = 1; row.Power[25] = 5; row.Power[26] = 3; row.Power[27] = 2; + row.Power[28] = 1; row.Power[29] = 1; row.Power[30] = 1; row.Power[31] = 2; + row.Power[32] = 1; row.Power[33] = 5; row.Power[34] = 1; row.Power[35] = 2; + row.Power[36] = 1; row.Power[37] = 1; row.Power[38] = 1; row.Power[39] = 3; + row.Power[40] = 1; row.Power[41] = 1; row.Power[42] = 4; row.Power[43] = 1; + row.Power[44] = 2; row.Power[45] = 2; row.Power[46] = 1; row.Power[47] = 2; + row.Power[48] = 1; row.Power[49] = 5; row.Power[50] = 1; row.Power[51] = 1; + row.Power[52] = 2; row.Power[53] = 3; row.Power[54] = 2; row.Power[55] = 1; + row.Power[56] = 1; row.Power[57] = 2; row.Power[58] = 2; row.Power[59] = 3; + row.Power[60] = 2; row.Power[61] = 1; row.Power[62] = 3; row.Power[63] = 2; + row.Power[64] = 2; row.Power[65] = 2; row.Power[66] = 1; row.Power[67] = 3; + row.Power[68] = 1; row.Power[69] = 4; row.Power[70] = 3; row.Power[71] = 1; + row.Power[72] = 1; row.Power[73] = 3; row.Power[74] = 4; row.Power[75] = 1; + row.Power[76] = 1; row.Power[77] = 3; row.Power[78] = 2; row.Power[79] = 4; + row.DMean = 0.0656963; + row.Coefficients[ 0] = 0.090282; row.Coefficients[ 1] = 0.075569; + row.Coefficients[ 2] = -0.032248; row.Coefficients[ 3] = 0.019879; + row.Coefficients[ 4] = 0.019206; row.Coefficients[ 5] = 0.017245; + row.Coefficients[ 6] = -0.068593; row.Coefficients[ 7] = 0.015207; + row.Coefficients[ 8] = 0.057778; row.Coefficients[ 9] = 0.0029379; + row.Coefficients[10] = 0.018915; row.Coefficients[11] = 0.031137; + row.Coefficients[12] = 0.0071302; row.Coefficients[13] = 0.0026668; + row.Coefficients[14] = 0.021225; row.Coefficients[15] = 0.033875; + row.Coefficients[16] = -0.015853; row.Coefficients[17] = 0.0096584; + row.Coefficients[18] = -0.01052; row.Coefficients[19] = -0.015203; + row.CoefficientsRMS[ 0] = 4.4761e-10; row.CoefficientsRMS[ 1] = 6.5632e-10; + row.CoefficientsRMS[ 2] = 1.8106e-10; row.CoefficientsRMS[ 3] = 3.6459e-10; + row.CoefficientsRMS[ 4] = 5.038e-10; row.CoefficientsRMS[ 5] = 2.9947e-10; + row.CoefficientsRMS[ 6] = 4.3514e-10; row.CoefficientsRMS[ 7] = 2.6776e-10; + row.CoefficientsRMS[ 8] = 4.7719e-10; row.CoefficientsRMS[ 9] = 4.0838e-10; + row.CoefficientsRMS[10] = 1.7323e-10; row.CoefficientsRMS[11] = 6.3202e-10; + row.CoefficientsRMS[12] = 1.0078e-10; row.CoefficientsRMS[13] = 2.1235e-10; + row.CoefficientsRMS[14] = 6.4061e-10; row.CoefficientsRMS[15] = 5.3546e-10; + row.CoefficientsRMS[16] = 4.1749e-10; row.CoefficientsRMS[17] = 1.5662e-10; + row.CoefficientsRMS[18] = 1.7507e-10; row.CoefficientsRMS[19] = 2.8798e-10; + tableSet->AddAt(&row); // idx = 3 + memset(&row,0,tableSet->GetRowSize()); + row.nrows = 4; //dTimeO dTimeOGP11p5GeV.root + row.idx = 4;// Mu + row.PolyType = 1; + row.NVariables = 4; + row.NCoefficients = 20; + row.XMin[ 0] = 0.017847; row.XMin[ 1] = 0.0025; row.XMin[ 2] = 0.0025; row.XMin[ 3] = 3.25; + row.XMax[ 0] = 0.98074; row.XMax[ 1] = 4.2025; row.XMax[ 2] = 9.3025; row.XMax[ 3] = 8.75; + row.Power[ 0] = 1; row.Power[ 1] = 1; row.Power[ 2] = 1; row.Power[ 3] = 1; + row.Power[ 4] = 1; row.Power[ 5] = 1; row.Power[ 6] = 1; row.Power[ 7] = 2; + row.Power[ 8] = 1; row.Power[ 9] = 1; row.Power[10] = 1; row.Power[11] = 3; + row.Power[12] = 1; row.Power[13] = 1; row.Power[14] = 2; row.Power[15] = 2; + row.Power[16] = 1; row.Power[17] = 1; row.Power[18] = 1; row.Power[19] = 4; + row.Power[20] = 1; row.Power[21] = 1; row.Power[22] = 2; row.Power[23] = 1; + row.Power[24] = 1; row.Power[25] = 3; row.Power[26] = 1; row.Power[27] = 1; + row.Power[28] = 1; row.Power[29] = 3; row.Power[30] = 1; row.Power[31] = 2; + row.Power[32] = 2; row.Power[33] = 2; row.Power[34] = 1; row.Power[35] = 2; + row.Power[36] = 1; row.Power[37] = 4; row.Power[38] = 1; row.Power[39] = 1; + row.Power[40] = 2; row.Power[41] = 1; row.Power[42] = 3; row.Power[43] = 1; + row.Power[44] = 1; row.Power[45] = 3; row.Power[46] = 3; row.Power[47] = 1; + row.Power[48] = 1; row.Power[49] = 1; row.Power[50] = 4; row.Power[51] = 2; + row.Power[52] = 2; row.Power[53] = 2; row.Power[54] = 3; row.Power[55] = 1; + row.Power[56] = 1; row.Power[57] = 2; row.Power[58] = 2; row.Power[59] = 3; + row.Power[60] = 2; row.Power[61] = 1; row.Power[62] = 2; row.Power[63] = 3; + row.Power[64] = 1; row.Power[65] = 2; row.Power[66] = 5; row.Power[67] = 1; + row.Power[68] = 1; row.Power[69] = 3; row.Power[70] = 3; row.Power[71] = 2; + row.Power[72] = 1; row.Power[73] = 4; row.Power[74] = 1; row.Power[75] = 3; + row.Power[76] = 2; row.Power[77] = 2; row.Power[78] = 3; row.Power[79] = 2; + row.DMean = -0.0261409; + row.Coefficients[ 0] = -0.35342; row.Coefficients[ 1] = -0.45538; + row.Coefficients[ 2] = -0.33986; row.Coefficients[ 3] = 0.21264; + row.Coefficients[ 4] = -0.20963; row.Coefficients[ 5] = -0.026237; + row.Coefficients[ 6] = -0.0080737; row.Coefficients[ 7] = -0.2126; + row.Coefficients[ 8] = 0.011973; row.Coefficients[ 9] = 0.064915; + row.Coefficients[10] = -0.016564; row.Coefficients[11] = -0.012767; + row.Coefficients[12] = 0.1211; row.Coefficients[13] = -0.063678; + row.Coefficients[14] = -0.042905; row.Coefficients[15] = -0.043723; + row.Coefficients[16] = 0.019665; row.Coefficients[17] = 0.080928; + row.Coefficients[18] = 0.041478; row.Coefficients[19] = -0.078791; + row.CoefficientsRMS[ 0] = 4.3051e-10; row.CoefficientsRMS[ 1] = 7.0455e-10; + row.CoefficientsRMS[ 2] = 3.1936e-10; row.CoefficientsRMS[ 3] = 7.0072e-10; + row.CoefficientsRMS[ 4] = 4.0305e-10; row.CoefficientsRMS[ 5] = 5.294e-10; + row.CoefficientsRMS[ 6] = 4.384e-10; row.CoefficientsRMS[ 7] = 1.0574e-09; + row.CoefficientsRMS[ 8] = 4.8609e-10; row.CoefficientsRMS[ 9] = 3.8439e-10; + row.CoefficientsRMS[10] = 5.2837e-10; row.CoefficientsRMS[11] = 1.6358e-10; + row.CoefficientsRMS[12] = 2.8181e-10; row.CoefficientsRMS[13] = 6.2244e-10; + row.CoefficientsRMS[14] = 6.1365e-10; row.CoefficientsRMS[15] = 1.5599e-10; + row.CoefficientsRMS[16] = 8.1516e-11; row.CoefficientsRMS[17] = 1.2892e-09; + row.CoefficientsRMS[18] = 3.2796e-10; row.CoefficientsRMS[19] = 1.4258e-09; + tableSet->AddAt(&row); // idx = 4 + return (TDataSet *)tableSet; +} diff --git a/StarDb/Geometry/tpc/TpcSuperSectorPositionD.C b/StarDb/Geometry/tpc/TpcSuperSectorPositionD.C new file mode 100644 index 00000000000..fad0859187e --- /dev/null +++ b/StarDb/Geometry/tpc/TpcSuperSectorPositionD.C @@ -0,0 +1,14 @@ +#ifndef __CINT__ +#include "tables/St_Survey_Table.h" +#endif + +TDataSet *CreateTable() { + if (!gROOT->GetClass("St_Survey")) return 0; + Survey_st row = { + // -gamma beta gamma -alpha -beta alpha x0 y0 z0 + 1, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.0000, 0.0000, 0.0000,0,0,0,0,0,0,"Ideal" + }; + St_Survey *tableSet = new St_Survey("TpcSuperSectorPositionD",24); + for (Int_t i = 0; i < 24; i++) { row.Id = i+1; tableSet->AddAt(&row.Id, i);} + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/MagFactor.y2011.C b/StarDb/RunLog/MagFactor.y2011.C index cfa38eebc52..0706ee2083c 100644 --- a/StarDb/RunLog/MagFactor.y2011.C +++ b/StarDb/RunLog/MagFactor.y2011.C @@ -1,4 +1,6 @@ +#ifndef __CINT__ #include "tables/St_MagFactor_Table.h" +#endif TDataSet *CreateTable() { // ----------------------------------------------------------------- diff --git a/StarDb/RunLog/MagFactor.y2012.C b/StarDb/RunLog/MagFactor.y2012.C index cfa38eebc52..0706ee2083c 100644 --- a/StarDb/RunLog/MagFactor.y2012.C +++ b/StarDb/RunLog/MagFactor.y2012.C @@ -1,4 +1,6 @@ +#ifndef __CINT__ #include "tables/St_MagFactor_Table.h" +#endif TDataSet *CreateTable() { // ----------------------------------------------------------------- diff --git a/StarDb/RunLog/MagFactor.y2013.C b/StarDb/RunLog/MagFactor.y2013.C index cfa38eebc52..0706ee2083c 100644 --- a/StarDb/RunLog/MagFactor.y2013.C +++ b/StarDb/RunLog/MagFactor.y2013.C @@ -1,4 +1,6 @@ +#ifndef __CINT__ #include "tables/St_MagFactor_Table.h" +#endif TDataSet *CreateTable() { // ----------------------------------------------------------------- diff --git a/StarDb/RunLog/MagFactor.y2014.C b/StarDb/RunLog/MagFactor.y2014.C index cfa38eebc52..0706ee2083c 100644 --- a/StarDb/RunLog/MagFactor.y2014.C +++ b/StarDb/RunLog/MagFactor.y2014.C @@ -1,4 +1,6 @@ +#ifndef __CINT__ #include "tables/St_MagFactor_Table.h" +#endif TDataSet *CreateTable() { // ----------------------------------------------------------------- diff --git a/StarDb/RunLog/MagFactor.y2015.C b/StarDb/RunLog/MagFactor.y2015.C new file mode 100644 index 00000000000..02e7ca8016f --- /dev/null +++ b/StarDb/RunLog/MagFactor.y2015.C @@ -0,0 +1,16 @@ +TDataSet *CreateTable() { +// ----------------------------------------------------------------- +// StarDb/.data/StarDb/RunLog/MagFactor Allocated rows: 1 Used rows: 1 Row size: 4 bytes +// Table: MagFactor_st[0]--> MagFactor_st[0] +// ==================================================================== +// ------ Test whether this table share library was loaded ------ + if (!gROOT->GetClass("St_MagFactor")) return 0; +MagFactor_st row; +St_MagFactor *tableSet = new St_MagFactor("MagFactor",1); +// +memset(&row,0,tableSet->GetRowSize()); + row.ScaleFactor = -1; // ; +tableSet->AddAt(&row,0); +// ----------------- end of code --------------- + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/MagFactor.y2016.C b/StarDb/RunLog/MagFactor.y2016.C new file mode 100644 index 00000000000..bb110508729 --- /dev/null +++ b/StarDb/RunLog/MagFactor.y2016.C @@ -0,0 +1,16 @@ +TDataSet *CreateTable() { +// ----------------------------------------------------------------- +// StarDb/.data/StarDb/RunLog/MagFactor Allocated rows: 1 Used rows: 1 Row size: 4 bytes +// Table: MagFactor_st[0]--> MagFactor_st[0] +// ==================================================================== +// ------ Test whether this table share library was loaded ------ + if (!gROOT->GetClass("St_MagFactor")) return 0; +MagFactor_st row; +St_MagFactor *tableSet = new St_MagFactor("MagFactor",1); +// +memset(&row,0,tableSet->GetRowSize()); + row.ScaleFactor = -1.002; // ; +tableSet->AddAt(&row,0); +// ----------------- end of code --------------- + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/MagFactor.y2017.C b/StarDb/RunLog/MagFactor.y2017.C new file mode 100644 index 00000000000..02e7ca8016f --- /dev/null +++ b/StarDb/RunLog/MagFactor.y2017.C @@ -0,0 +1,16 @@ +TDataSet *CreateTable() { +// ----------------------------------------------------------------- +// StarDb/.data/StarDb/RunLog/MagFactor Allocated rows: 1 Used rows: 1 Row size: 4 bytes +// Table: MagFactor_st[0]--> MagFactor_st[0] +// ==================================================================== +// ------ Test whether this table share library was loaded ------ + if (!gROOT->GetClass("St_MagFactor")) return 0; +MagFactor_st row; +St_MagFactor *tableSet = new St_MagFactor("MagFactor",1); +// +memset(&row,0,tableSet->GetRowSize()); + row.ScaleFactor = -1; // ; +tableSet->AddAt(&row,0); +// ----------------- end of code --------------- + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/MagFactor.y2018.C b/StarDb/RunLog/MagFactor.y2018.C new file mode 100644 index 00000000000..02e7ca8016f --- /dev/null +++ b/StarDb/RunLog/MagFactor.y2018.C @@ -0,0 +1,16 @@ +TDataSet *CreateTable() { +// ----------------------------------------------------------------- +// StarDb/.data/StarDb/RunLog/MagFactor Allocated rows: 1 Used rows: 1 Row size: 4 bytes +// Table: MagFactor_st[0]--> MagFactor_st[0] +// ==================================================================== +// ------ Test whether this table share library was loaded ------ + if (!gROOT->GetClass("St_MagFactor")) return 0; +MagFactor_st row; +St_MagFactor *tableSet = new St_MagFactor("MagFactor",1); +// +memset(&row,0,tableSet->GetRowSize()); + row.ScaleFactor = -1; // ; +tableSet->AddAt(&row,0); +// ----------------- end of code --------------- + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/MagFactor.y2019.C b/StarDb/RunLog/MagFactor.y2019.C new file mode 100644 index 00000000000..2652264815e --- /dev/null +++ b/StarDb/RunLog/MagFactor.y2019.C @@ -0,0 +1,16 @@ +TDataSet *CreateTable() { +// ----------------------------------------------------------------- +// StarDb/.data/StarDb/RunLog/MagFactor Allocated rows: 1 Used rows: 1 Row size: 4 bytes +// Table: MagFactor_st[0]--> MagFactor_st[0] +// ==================================================================== +// ------ Test whether this table share library was loaded ------ + if (!gROOT->GetClass("St_MagFactor")) return 0; +MagFactor_st row; +St_MagFactor *tableSet = new St_MagFactor("MagFactor",1); +// +memset(&row,0,tableSet->GetRowSize()); + row.ScaleFactor = 1; // Run XIX starts with FF +tableSet->AddAt(&row,0); +// ----------------- end of code --------------- + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/MagFactor.y2020.C b/StarDb/RunLog/MagFactor.y2020.C new file mode 100644 index 00000000000..02e7ca8016f --- /dev/null +++ b/StarDb/RunLog/MagFactor.y2020.C @@ -0,0 +1,16 @@ +TDataSet *CreateTable() { +// ----------------------------------------------------------------- +// StarDb/.data/StarDb/RunLog/MagFactor Allocated rows: 1 Used rows: 1 Row size: 4 bytes +// Table: MagFactor_st[0]--> MagFactor_st[0] +// ==================================================================== +// ------ Test whether this table share library was loaded ------ + if (!gROOT->GetClass("St_MagFactor")) return 0; +MagFactor_st row; +St_MagFactor *tableSet = new St_MagFactor("MagFactor",1); +// +memset(&row,0,tableSet->GetRowSize()); + row.ScaleFactor = -1; // ; +tableSet->AddAt(&row,0); +// ----------------- end of code --------------- + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/MagFactor.y2021.C b/StarDb/RunLog/MagFactor.y2021.C new file mode 120000 index 00000000000..5544f9e6e05 --- /dev/null +++ b/StarDb/RunLog/MagFactor.y2021.C @@ -0,0 +1 @@ +MagFactor.y2020.C \ No newline at end of file diff --git a/StarDb/RunLog/onl/beamInfo.y2023.C b/StarDb/RunLog/onl/beamInfo.y2023.C new file mode 100644 index 00000000000..f64f49eeec6 --- /dev/null +++ b/StarDb/RunLog/onl/beamInfo.y2023.C @@ -0,0 +1,35 @@ +#ifndef __CINT__ +#include "tables/St_beamInfo_Table.h" +#endif + +TDataSet *CreateTable() { +// ----------------------------------------------------------------- +// bfc/.make/db/.const/StarDb/RunLog/onl/.beamInfo/beamInfo Allocated rows: 1 Used rows: 1 Row size: 120 bytes +// Table: beamInfo_st[0]--> beamInfo_st[0] +// ==================================================================== +// ------ Test whether this table share library was loaded ------ + if (!TClass::GetClass("St_beamInfo")) return 0; +beamInfo_st row; +St_beamInfo *tableSet = new St_beamInfo("beamInfo",1); +// +memset(&row,0,tableSet->GetRowSize()); + row.runNumber = 17101001; // ; + row.entryTag = 0; // 0=startrun, 1=endrun, 2=runave, 3=std ; + memcpy(&row.blueSpecies,"Au",2);// species + row.blueMassNumber = 197; // ; + row.blueEnergy = 99.908; // energy ; + row.blueIntensity = 219.761; // Ions ; + row.blueLifeTime = 0; // Ions per minute ; + row.blueBunchIntensity = 0; // bunch intensity ; + memcpy(&row.yellowSpecies,"Au",2);// species + row.yellowMassNumber = 197; // ; + row.yellowEnergy = 99.908; // energy ; + row.yellowIntensity = 227.272; // Ions ; + row.yellowLifeTime = 0; // Ions per minute ; + row.yellowBunchIntensity = 0; // bunch intensity ; + row.blueFillNumber = 19744; // ; + row.yellowFillNumber = 19744; // ; +tableSet->AddAt(&row); +// ----------------- end of code --------------- + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/onl/starClockOnl.C b/StarDb/RunLog/onl/starClockOnl.C index 3e76df4076a..4c046c2d34a 100644 --- a/StarDb/RunLog/onl/starClockOnl.C +++ b/StarDb/RunLog/onl/starClockOnl.C @@ -1,4 +1,6 @@ +#ifndef __CINT__ #include "tables/St_starClockOnl_Table.h" +#endif TDataSet *CreateTable() { if (!TClass::GetClass("St_starClockOnl")) return 0; @@ -7,7 +9,7 @@ TDataSet *CreateTable() { memset(&row,0,tableSet->GetRowSize()); row.runNumber = 2214033; // run number ; row.time = 996787667; // unix time of entry ; - row.frequency = 9383160; // frequency in Hz ; + row.frequency = 9399962; // local clock tableSet->AddAt(&row); return (TDataSet *)tableSet; } diff --git a/StarDb/RunLog/onl/starMagAvg.20190204.205949.C b/StarDb/RunLog/onl/starMagAvg.20190204.205949.C new file mode 100644 index 00000000000..296bc359978 --- /dev/null +++ b/StarDb/RunLog/onl/starMagAvg.20190204.205949.C @@ -0,0 +1,21 @@ +TDataSet *CreateTable() { +// ----------------------------------------------------------------- +// bfc/.make/db/.const/StarDb/RunLog/onl/.starMagAvg/starMagAvg Allocated rows: 1 Used rows: 1 Row size: 32 bytes +// Table: starMagAvg_st[0]--> starMagAvg_st[0] +// ==================================================================== +// ------ Test whether this table share library was loaded ------ + if (!TClass::GetClass("St_starMagAvg")) return 0; +starMagAvg_st row; +St_starMagAvg *tableSet = new St_starMagAvg("starMagAvg",1); +// +memset(&row,0,tableSet->GetRowSize()); + row.runNumber = 20060057; // run number ; + row.startRunTime = 1551475834; // unix time of entry ; + row.endRunTime = 1551475945; // unix time of entry ; + row.noEntries = 4; // no. entries used for averging ; + row.current = -4511.42; // averaged magnet current (- means B polarity) ; + row.rms = 0.18; // its rms ; +tableSet->AddAt(&row); +// ----------------- end of code --------------- + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/onl/starMagAvg.r2023.C b/StarDb/RunLog/onl/starMagAvg.r2023.C new file mode 100644 index 00000000000..9869d7741e2 --- /dev/null +++ b/StarDb/RunLog/onl/starMagAvg.r2023.C @@ -0,0 +1,7 @@ +TDataSet *CreateTable() { + if (!TClass::GetClass("St_starMagAvg")) return 0; + starMagAvg_st row = {22145028,1621962080,1621964191,0, 4500,0}; + St_starMagAvg *tableSet = new St_starMagAvg("starMagAvg",1); + tableSet->AddAt(&row.runNumber); + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/onl/starMagAvg.y2023.C b/StarDb/RunLog/onl/starMagAvg.y2023.C new file mode 100644 index 00000000000..0e549c553b5 --- /dev/null +++ b/StarDb/RunLog/onl/starMagAvg.y2023.C @@ -0,0 +1,7 @@ +TDataSet *CreateTable() { + if (!TClass::GetClass("St_starMagAvg")) return 0; + starMagAvg_st row = { 0, 0, 01, 0, 0, 0}; + St_starMagAvg *tableSet = new St_starMagAvg("starMagAvg",1); + tableSet->AddAt(&row.runNumber); + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/onl/starMagOnl.r2023.C b/StarDb/RunLog/onl/starMagOnl.r2023.C new file mode 100644 index 00000000000..891ba7bd87e --- /dev/null +++ b/StarDb/RunLog/onl/starMagOnl.r2023.C @@ -0,0 +1,22 @@ +#ifndef __CINT__ +#include "tables/St_starMagOnl_Table.h" +#endif + +TDataSet *CreateTable() { +// ----------------------------------------------------------------- +// bfc/.make/db/.const/StarDb/RunLog/onl/.starMagOnl/starMagOnl Allocated rows: 1 Used rows: 1 Row size: 16 bytes +// Table: starMagOnl_st[0]--> starMagOnl_st[0] +// ==================================================================== +// ------ Test whether this table share library was loaded ------ + if (!TClass::GetClass("St_starMagOnl")) return 0; +starMagOnl_st row; +St_starMagOnl *tableSet = new St_starMagOnl("starMagOnl",1); +// +memset(&row,0,tableSet->GetRowSize()); + row.runNumber = 23112001; // run number ; + row.time = 1650631621; // unix time of entry ; + row.current = 4500.; // magnet current (- means B polarity) ; +tableSet->AddAt(&row); +// ----------------- end of code --------------- + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/onl/starMagOnl.y2023.C b/StarDb/RunLog/onl/starMagOnl.y2023.C new file mode 100644 index 00000000000..b2e87650fef --- /dev/null +++ b/StarDb/RunLog/onl/starMagOnl.y2023.C @@ -0,0 +1,18 @@ +TDataSet *CreateTable() { +// ----------------------------------------------------------------- +// bfc/.make/db/.const/StarDb/RunLog/onl/.starMagOnl/starMagOnl Allocated rows: 1 Used rows: 1 Row size: 16 bytes +// Table: starMagOnl_st[0]--> starMagOnl_st[0] +// ==================================================================== +// ------ Test whether this table share library was loaded ------ + if (!TClass::GetClass("St_starMagOnl")) return 0; +starMagOnl_st row; +St_starMagOnl *tableSet = new St_starMagOnl("starMagOnl",1); +// +memset(&row,0,tableSet->GetRowSize()); + row.runNumber = 23112001; // run number ; + row.time = 1650631621; // unix time of entry ; + row.current = 0; // magnet current (- means B polarity) ; +tableSet->AddAt(&row); +// ----------------- end of code --------------- + return (TDataSet *)tableSet; +} diff --git a/StarDb/RunLog/onl/tpcRDOMasks.C b/StarDb/RunLog/onl/tpcRDOMasks.C index a0683ff85a1..7f34dfdeca7 100644 --- a/StarDb/RunLog/onl/tpcRDOMasks.C +++ b/StarDb/RunLog/onl/tpcRDOMasks.C @@ -1,4 +1,6 @@ +#ifndef __CINT__ #include "tables/St_tpcRDOMasks_Table.h" +#endif TDataSet *CreateTable() { if (!TClass::GetClass("St_tpcRDOMasks")) return 0; diff --git a/StarDb/RunLog/onl/triggerID.C b/StarDb/RunLog/onl/triggerID.C index 6e061f8000a..d3a0774f4f9 100644 --- a/StarDb/RunLog/onl/triggerID.C +++ b/StarDb/RunLog/onl/triggerID.C @@ -1,4 +1,6 @@ +#ifndef __CINT__ #include "tables/St_triggerID_Table.h" +#endif TDataSet *CreateTable() { // ----------------------------------------------------------------- diff --git a/StarDb/RunLog/onl/triggerID.y2023.C b/StarDb/RunLog/onl/triggerID.y2023.C new file mode 120000 index 00000000000..6d4b181a711 --- /dev/null +++ b/StarDb/RunLog/onl/triggerID.y2023.C @@ -0,0 +1 @@ +triggerID.C \ No newline at end of file diff --git a/StarDb/tpc/tsspars/tsspar.19991216.000000.C b/StarDb/tpc/tsspars/tsspar.19991216.000000.C index 96c6ea6c4ff..2d9541fb344 100644 --- a/StarDb/tpc/tsspars/tsspar.19991216.000000.C +++ b/StarDb/tpc/tsspars/tsspar.19991216.000000.C @@ -1,4 +1,6 @@ +#ifndef __CINT__ #include "tables/St_tss_tsspar_Table.h" +#endif TDataSet *CreateTable() { // ----------------------------------------------------------------- diff --git a/StarDb/tpc/tsspars/tsspar.19991217.000000.C b/StarDb/tpc/tsspars/tsspar.19991217.000000.C index 96c6ea6c4ff..2d9541fb344 100644 --- a/StarDb/tpc/tsspars/tsspar.19991217.000000.C +++ b/StarDb/tpc/tsspars/tsspar.19991217.000000.C @@ -1,4 +1,6 @@ +#ifndef __CINT__ #include "tables/St_tss_tsspar_Table.h" +#endif TDataSet *CreateTable() { // ----------------------------------------------------------------- diff --git a/StarDb/tpc/tsspars/tsspar.er99.C b/StarDb/tpc/tsspars/tsspar.er99.C deleted file mode 100644 index 449ad5ea5a9..00000000000 --- a/StarDb/tpc/tsspars/tsspar.er99.C +++ /dev/null @@ -1,58 +0,0 @@ -#include "tables/St_tss_tsspar_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// Top/tsspars/tsspar Allocated rows: 1 Used rows: 1 Row size: 240 bytes -// Table: tss_tsspar_st[0]--> tss_tsspar_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!gROOT->GetClass("St_tss_tsspar")) return 0; -tss_tsspar_st row; -St_tss_tsspar *tableSet = new St_tss_tsspar("tsspar",1); -// -memset(&row,0,tableSet->GetRowSize()); - memcpy(&row.fileout,"\x04\x08o\xfc\x00",5);// output file for pixel data (none->table) - row.dynam = 1023; // adc dynamic range (adc counts; usu 1023) ; - row.format = 0; // pixel data format ; - row.max_itime = 512; // upper bound of time bucket ; - row.max_pads = 184; // upper bound of pads ; - row.max_row = 45; // upper bound of row (<=45) ; - row.max_sect = 24; // upper bound of sector pair (<=12) ; - row.min_itime = 0; // low bound of time bucket ; - row.min_pads = 1; // lower bound of pads ; - row.min_row = 1; // lower bound of row (>=1) ; - row.min_sect = 1; // lower bound of sector pair (>=1) ; - row.mode = 0; // mode of TPC simulation for diff. tests ; - row.nele_laser = 300; // number of electrons from laser point; - row.ngain = 1; // number of gain sampling (1-10) ; - row.nseg = 1; // number of sub-segment within a G-vol ; - row.ntime = 512; // number of time buckets (dimensionless) ; - row.printout = -10; // control the level of printout (0=no) ; - row.tpc_half = 0; // half (1) or full (0) TPC volume ; - row.reset = 1; // re-do setup: 0=no, anything else=yes ; - row.ave_ion_pot = 2.85e-08; // Average Ion. Potential of a gas(Ar=26eV) ; - row.bfield = 0; // magnetic field strength (Tesla) ; - row.c_test = 0.1; // test capacitance value (pF) ; - row.diff_long = 0.037; // long diff const of gas (cm/sqrt(cm)) ; - row.diff_trans = 0.06336; // trans diff const of gas (cm/sqrt(cm)) ; - row.gain_in = 2503; // gas gain:inner sector (dimensionless) ; - row.gain_out = 1315; // gas gain:outer sector (dimensionless) ; - row.prf_in = 0.25; // pad resp.func:inner sector (cm) ; - row.prf_out = 0.395; // pad resp.func:outer sector (cm) ; - row.sca_rms = 390; // SCA noise (random, not filtered) ; - row.scale = 335; // number of electrons per ADC count (600) ; - row.step_size = 0.5; // step size for subpadrow tracking ; - row.tau = 0.055; // shaper resp. time const. (usec) ; - row.threshold = 0.0; // adc threshold (adc counts but a real num ; - row.time_offset = 0; // Wayne Betts time offsets ; - row.v_test = 1; // voltage of test pulse (V) ; - row.white_rms = 800; // rms of white noise (shaper filtered) ; - row.wire_coupling_in = 0.533; // wire-to-pad coupling inner sector ; - row.wire_coupling_out = 0.512; // wire-to-pad coupling outer sector ; - row.x_laser = 0; // local x of laser point[cm] along row ; - row.y_laser = 129.2; // local y of laser point[cm] across row ; - row.z_laser = 100; // z drift length of pointlaser source(cm) ; -tableSet->AddAt(&row,0); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/tpc/tsspars/tsspar.es99.C b/StarDb/tpc/tsspars/tsspar.es99.C deleted file mode 100644 index 449ad5ea5a9..00000000000 --- a/StarDb/tpc/tsspars/tsspar.es99.C +++ /dev/null @@ -1,58 +0,0 @@ -#include "tables/St_tss_tsspar_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// Top/tsspars/tsspar Allocated rows: 1 Used rows: 1 Row size: 240 bytes -// Table: tss_tsspar_st[0]--> tss_tsspar_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!gROOT->GetClass("St_tss_tsspar")) return 0; -tss_tsspar_st row; -St_tss_tsspar *tableSet = new St_tss_tsspar("tsspar",1); -// -memset(&row,0,tableSet->GetRowSize()); - memcpy(&row.fileout,"\x04\x08o\xfc\x00",5);// output file for pixel data (none->table) - row.dynam = 1023; // adc dynamic range (adc counts; usu 1023) ; - row.format = 0; // pixel data format ; - row.max_itime = 512; // upper bound of time bucket ; - row.max_pads = 184; // upper bound of pads ; - row.max_row = 45; // upper bound of row (<=45) ; - row.max_sect = 24; // upper bound of sector pair (<=12) ; - row.min_itime = 0; // low bound of time bucket ; - row.min_pads = 1; // lower bound of pads ; - row.min_row = 1; // lower bound of row (>=1) ; - row.min_sect = 1; // lower bound of sector pair (>=1) ; - row.mode = 0; // mode of TPC simulation for diff. tests ; - row.nele_laser = 300; // number of electrons from laser point; - row.ngain = 1; // number of gain sampling (1-10) ; - row.nseg = 1; // number of sub-segment within a G-vol ; - row.ntime = 512; // number of time buckets (dimensionless) ; - row.printout = -10; // control the level of printout (0=no) ; - row.tpc_half = 0; // half (1) or full (0) TPC volume ; - row.reset = 1; // re-do setup: 0=no, anything else=yes ; - row.ave_ion_pot = 2.85e-08; // Average Ion. Potential of a gas(Ar=26eV) ; - row.bfield = 0; // magnetic field strength (Tesla) ; - row.c_test = 0.1; // test capacitance value (pF) ; - row.diff_long = 0.037; // long diff const of gas (cm/sqrt(cm)) ; - row.diff_trans = 0.06336; // trans diff const of gas (cm/sqrt(cm)) ; - row.gain_in = 2503; // gas gain:inner sector (dimensionless) ; - row.gain_out = 1315; // gas gain:outer sector (dimensionless) ; - row.prf_in = 0.25; // pad resp.func:inner sector (cm) ; - row.prf_out = 0.395; // pad resp.func:outer sector (cm) ; - row.sca_rms = 390; // SCA noise (random, not filtered) ; - row.scale = 335; // number of electrons per ADC count (600) ; - row.step_size = 0.5; // step size for subpadrow tracking ; - row.tau = 0.055; // shaper resp. time const. (usec) ; - row.threshold = 0.0; // adc threshold (adc counts but a real num ; - row.time_offset = 0; // Wayne Betts time offsets ; - row.v_test = 1; // voltage of test pulse (V) ; - row.white_rms = 800; // rms of white noise (shaper filtered) ; - row.wire_coupling_in = 0.533; // wire-to-pad coupling inner sector ; - row.wire_coupling_out = 0.512; // wire-to-pad coupling outer sector ; - row.x_laser = 0; // local x of laser point[cm] along row ; - row.y_laser = 129.2; // local y of laser point[cm] across row ; - row.z_laser = 100; // z drift length of pointlaser source(cm) ; -tableSet->AddAt(&row,0); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/tpc/tsspars/tsspar.sd97.C b/StarDb/tpc/tsspars/tsspar.sd97.C deleted file mode 100644 index 85eac65f160..00000000000 --- a/StarDb/tpc/tsspars/tsspar.sd97.C +++ /dev/null @@ -1,58 +0,0 @@ -#include "tables/St_tss_tsspar_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// Top/tsspars/tsspar Allocated rows: 1 Used rows: 1 Row size: 240 bytes -// Table: tss_tsspar_st[0]--> tss_tsspar_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!gROOT->GetClass("St_tss_tsspar")) return 0; -tss_tsspar_st row; -St_tss_tsspar *tableSet = new St_tss_tsspar("tsspar",1); -// -memset(&row,0,tableSet->GetRowSize()); - memcpy(&row.fileout,"\x04\x08o\xfc\x00",5);// output file for pixel data (none->table) - row.dynam = 1023; // adc dynamic range (adc counts; usu 1023) ; - row.format = 0; // pixel data format ; - row.max_itime = 512; // upper bound of time bucket ; - row.max_pads = 184; // upper bound of pads ; - row.max_row = 45; // upper bound of row (<=45) ; - row.max_sect = 24; // upper bound of sector pair (<=12) ; - row.min_itime = 0; // low bound of time bucket ; - row.min_pads = 1; // lower bound of pads ; - row.min_row = 1; // lower bound of row (>=1) ; - row.min_sect = 1; // lower bound of sector pair (>=1) ; - row.mode = 0; // mode of TPC simulation for diff. tests ; - row.nele_laser = 300; // number of electrons from laser point; - row.ngain = 1; // number of gain sampling (1-10) ; - row.nseg = 1; // number of sub-segment within a G-vol ; - row.ntime = 512; // number of time buckets (dimensionless) ; - row.printout = -10; // control the level of printout (0=no) ; - row.tpc_half = 0; // half (1) or full (0) TPC volume ; - row.reset = 1; // re-do setup: 0=no, anything else=yes ; - row.ave_ion_pot = 2.85e-08; // Average Ion. Potential of a gas(Ar=26eV) ; - row.bfield = 0; // magnetic field strength (Tesla) ; - row.c_test = 0.1; // test capacitance value (pF) ; - row.diff_long = 0.037; // long diff const of gas (cm/sqrt(cm)) ; - row.diff_trans = 0.06336; // trans diff const of gas (cm/sqrt(cm)) ; - row.gain_in = 3000; // gas gain:inner sector (dimensionless) ; - row.gain_out = 2000; // gas gain:outer sector (dimensionless) ; - row.prf_in = 0.25; // pad resp.func:inner sector (cm) ; - row.prf_out = 0.395; // pad resp.func:outer sector (cm) ; - row.sca_rms = 390; // SCA noise (random, not filtered) ; - row.scale = 335; // number of electrons per ADC count (600) ; - row.step_size = 0.5; // step size for subpadrow tracking ; - row.tau = 0.055; // shaper resp. time const. (usec) ; - row.threshold = 4; // adc threshold (adc counts but a real num ; - row.time_offset = 0; // Wayne Betts time offsets ; - row.v_test = 1; // voltage of test pulse (V) ; - row.white_rms = 800; // rms of white noise (shaper filtered) ; - row.wire_coupling_in = 0.5; // wire-to-pad coupling inner sector ; - row.wire_coupling_out = 0.5; // wire-to-pad coupling outer sector ; - row.x_laser = 0; // local x of laser point[cm] along row ; - row.y_laser = 129.2; // local y of laser point[cm] across row ; - row.z_laser = 100; // z drift length of pointlaser source(cm) ; -tableSet->AddAt(&row,0); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/tpc/tsspars/tsspar.y2018.C b/StarDb/tpc/tsspars/tsspar.y2018.C index 5dee2357d38..305f8038224 100644 --- a/StarDb/tpc/tsspars/tsspar.y2018.C +++ b/StarDb/tpc/tsspars/tsspar.y2018.C @@ -1,4 +1,6 @@ +#ifndef __CINT__ #include "tables/St_tss_tsspar_Table.h" +#endif TDataSet *CreateTable() { // ----------------------------------------------------------------- diff --git a/StarDb/tpc/tsspars/tsspar.y2019.C b/StarDb/tpc/tsspars/tsspar.y2019.C index 96c6ea6c4ff..2d9541fb344 100644 --- a/StarDb/tpc/tsspars/tsspar.y2019.C +++ b/StarDb/tpc/tsspars/tsspar.y2019.C @@ -1,4 +1,6 @@ +#ifndef __CINT__ #include "tables/St_tss_tsspar_Table.h" +#endif TDataSet *CreateTable() { // ----------------------------------------------------------------- diff --git a/StarDb/tpc/tsspars/tsspar.year_1a.C b/StarDb/tpc/tsspars/tsspar.year_1a.C deleted file mode 100644 index 5dee2357d38..00000000000 --- a/StarDb/tpc/tsspars/tsspar.year_1a.C +++ /dev/null @@ -1,58 +0,0 @@ -#include "tables/St_tss_tsspar_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// Top/tsspars/tsspar Allocated rows: 1 Used rows: 1 Row size: 240 bytes -// Table: tss_tsspar_st[0]--> tss_tsspar_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!gROOT->GetClass("St_tss_tsspar")) return 0; -tss_tsspar_st row; -St_tss_tsspar *tableSet = new St_tss_tsspar("tsspar",1); -// -memset(&row,0,tableSet->GetRowSize()); - memcpy(&row.fileout,"\x04\x08o\xfc\x00",5);// output file for pixel data (none->table) - row.dynam = 1023; // adc dynamic range (adc counts; usu 1023) ; - row.format = 0; // pixel data format ; - row.max_itime = 512; // upper bound of time bucket ; - row.max_pads = 184; // upper bound of pads ; - row.max_row = 45; // upper bound of row (<=45) ; - row.max_sect = 24; // upper bound of sector pair (<=12) ; - row.min_itime = 0; // low bound of time bucket ; - row.min_pads = 1; // lower bound of pads ; - row.min_row = 1; // lower bound of row (>=1) ; - row.min_sect = 1; // lower bound of sector pair (>=1) ; - row.mode = 0; // mode of TPC simulation for diff. tests ; - row.nele_laser = 300; // number of electrons from laser point; - row.ngain = 1; // number of gain sampling (1-10) ; - row.nseg = 1; // number of sub-segment within a G-vol ; - row.ntime = 512; // number of time buckets (dimensionless) ; - row.printout = -10; // control the level of printout (0=no) ; - row.tpc_half = 0; // half (1) or full (0) TPC volume ; - row.reset = 1; // re-do setup: 0=no, anything else=yes ; - row.ave_ion_pot = 2.85e-08; // Average Ion. Potential of a gas(Ar=26eV) ; - row.bfield = 0; // magnetic field strength (Tesla) ; - row.c_test = 0.1; // test capacitance value (pF) ; - row.diff_long = 0.037; // long diff const of gas (cm/sqrt(cm)) ; - row.diff_trans = 0.06336; // trans diff const of gas (cm/sqrt(cm)) ; - row.gain_in = 2540; // gas gain:inner sector (dimensionless) ; - row.gain_out = 1160; // gas gain:outer sector (dimensionless) ; - row.prf_in = 0.25; // pad resp.func:inner sector (cm) ; - row.prf_out = 0.395; // pad resp.func:outer sector (cm) ; - row.sca_rms = 390; // SCA noise (random, not filtered) ; - row.scale = 335; // number of electrons per ADC count (600) ; - row.step_size = 0.5; // step size for subpadrow tracking ; - row.tau = 0.055; // shaper resp. time const. (usec) ; - row.threshold = 4; // adc threshold (adc counts but a real num ; - row.time_offset = 0; // Wayne Betts time offsets ; - row.v_test = 1; // voltage of test pulse (V) ; - row.white_rms = 800; // rms of white noise (shaper filtered) ; - row.wire_coupling_in = 0.5; // wire-to-pad coupling inner sector ; - row.wire_coupling_out = 0.5; // wire-to-pad coupling outer sector ; - row.x_laser = 0; // local x of laser point[cm] along row ; - row.y_laser = 129.2; // local y of laser point[cm] across row ; - row.z_laser = 100; // z drift length of pointlaser source(cm) ; -tableSet->AddAt(&row,0); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/StarDb/tpc/tsspars/tsspar.year_1c.C b/StarDb/tpc/tsspars/tsspar.year_1c.C deleted file mode 100644 index 5dee2357d38..00000000000 --- a/StarDb/tpc/tsspars/tsspar.year_1c.C +++ /dev/null @@ -1,58 +0,0 @@ -#include "tables/St_tss_tsspar_Table.h" - -TDataSet *CreateTable() { -// ----------------------------------------------------------------- -// Top/tsspars/tsspar Allocated rows: 1 Used rows: 1 Row size: 240 bytes -// Table: tss_tsspar_st[0]--> tss_tsspar_st[0] -// ==================================================================== -// ------ Test whether this table share library was loaded ------ - if (!gROOT->GetClass("St_tss_tsspar")) return 0; -tss_tsspar_st row; -St_tss_tsspar *tableSet = new St_tss_tsspar("tsspar",1); -// -memset(&row,0,tableSet->GetRowSize()); - memcpy(&row.fileout,"\x04\x08o\xfc\x00",5);// output file for pixel data (none->table) - row.dynam = 1023; // adc dynamic range (adc counts; usu 1023) ; - row.format = 0; // pixel data format ; - row.max_itime = 512; // upper bound of time bucket ; - row.max_pads = 184; // upper bound of pads ; - row.max_row = 45; // upper bound of row (<=45) ; - row.max_sect = 24; // upper bound of sector pair (<=12) ; - row.min_itime = 0; // low bound of time bucket ; - row.min_pads = 1; // lower bound of pads ; - row.min_row = 1; // lower bound of row (>=1) ; - row.min_sect = 1; // lower bound of sector pair (>=1) ; - row.mode = 0; // mode of TPC simulation for diff. tests ; - row.nele_laser = 300; // number of electrons from laser point; - row.ngain = 1; // number of gain sampling (1-10) ; - row.nseg = 1; // number of sub-segment within a G-vol ; - row.ntime = 512; // number of time buckets (dimensionless) ; - row.printout = -10; // control the level of printout (0=no) ; - row.tpc_half = 0; // half (1) or full (0) TPC volume ; - row.reset = 1; // re-do setup: 0=no, anything else=yes ; - row.ave_ion_pot = 2.85e-08; // Average Ion. Potential of a gas(Ar=26eV) ; - row.bfield = 0; // magnetic field strength (Tesla) ; - row.c_test = 0.1; // test capacitance value (pF) ; - row.diff_long = 0.037; // long diff const of gas (cm/sqrt(cm)) ; - row.diff_trans = 0.06336; // trans diff const of gas (cm/sqrt(cm)) ; - row.gain_in = 2540; // gas gain:inner sector (dimensionless) ; - row.gain_out = 1160; // gas gain:outer sector (dimensionless) ; - row.prf_in = 0.25; // pad resp.func:inner sector (cm) ; - row.prf_out = 0.395; // pad resp.func:outer sector (cm) ; - row.sca_rms = 390; // SCA noise (random, not filtered) ; - row.scale = 335; // number of electrons per ADC count (600) ; - row.step_size = 0.5; // step size for subpadrow tracking ; - row.tau = 0.055; // shaper resp. time const. (usec) ; - row.threshold = 4; // adc threshold (adc counts but a real num ; - row.time_offset = 0; // Wayne Betts time offsets ; - row.v_test = 1; // voltage of test pulse (V) ; - row.white_rms = 800; // rms of white noise (shaper filtered) ; - row.wire_coupling_in = 0.5; // wire-to-pad coupling inner sector ; - row.wire_coupling_out = 0.5; // wire-to-pad coupling outer sector ; - row.x_laser = 0; // local x of laser point[cm] along row ; - row.y_laser = 129.2; // local y of laser point[cm] across row ; - row.z_laser = 100; // z drift length of pointlaser source(cm) ; -tableSet->AddAt(&row,0); -// ----------------- end of code --------------- - return (TDataSet *)tableSet; -} diff --git a/mgr/ConsDefs.pm b/mgr/ConsDefs.pm index b48db30bef4..4797a42ecdb 100644 --- a/mgr/ConsDefs.pm +++ b/mgr/ConsDefs.pm @@ -801,6 +801,7 @@ # restore ($CFLAGS,$CXXFLAGS) = @ARGS; # <--- same order than above } + $CXXFLAGS .= " -fdiagnostics-color=always";# -Wno-pedantic -Wno-shadow -Wno-unused-parameter -Wno-extra -Wno-shadow"; diff --git a/mgr/Conscript-standard b/mgr/Conscript-standard index ab1f1a4a7b1..3e73ccf9013 100644 --- a/mgr/Conscript-standard +++ b/mgr/Conscript-standard @@ -605,7 +605,7 @@ if ( $pkg !~ /^sim$/ && $pkg !~ /^gen$/ ) { $CPPPATH .= $main::PATH_SEPARATOR . "#StRoot/StarGenerator/${py8ver}/include"; $CPPPATH .= $main::PATH_SEPARATOR . "#StRoot/StarGenerator/Photos3_61/include"; $CPPPATH .= $main::PATH_SEPARATOR . "#StRoot/StarGenerator/Tauola1_1_5/include"; - $CXXFLAGS .= "-DEVTGEN_EXTERNAL=1 -DEVTGEN_PYTHIA=1 -DEVTGEN_PHOTOS=1 -DEVTGEN_TAUOLA=1 -DEvtGen_version=\\\"$pkg\\\" "; + $CXXFLAGS .= " -DEVTGEN_EXTERNAL=1 -DEVTGEN_PYTHIA=1 -DEVTGEN_PHOTOS=1 -DEVTGEN_TAUOLA=1 -DEvtGen_version=\\\"$pkg\\\" "; $CXXFLAGS .= " -DPythia8_version=\\\"$py8ver\\\" "; print "CPPPATH = $CPPPATH\n" if $param::debug;