From 5350d16901c1b90caaf49ba5295df56e809b86a1 Mon Sep 17 00:00:00 2001 From: Zilong Chang Date: Wed, 7 Dec 2022 09:56:43 -0500 Subject: [PATCH] Update to trigger simulator to save intermediate jet patch ADCs and minor cleanup to the jet maker (#424) 1) Update to the trigger simulator to save the intermediate jet patch sum ADCs and make them available to access for analysis. In this case save the 30 jet patch ADCs in the StJetSkimEvent. 2) Remove unnecessary printouts in the StJetMaker2012 during the UE offaxis cone calculation Not urgent! May add additional edits if necessary. Co-authored-by: Dmitry Kalinkin --- StRoot/StJetMaker/StJetMaker2012.cxx | 9 ++------- StRoot/StJetMaker/StJetSkimEventMaker.cxx | 6 +----- StRoot/StTriggerUtilities/Bemc/StBemcTriggerSimu.cxx | 4 +++- StRoot/StTriggerUtilities/Bemc/StBemcTriggerSimu.h | 1 + StRoot/StTriggerUtilities/Eemc/StEemcTriggerSimu.cxx | 1 + StRoot/StTriggerUtilities/Eemc/StEemcTriggerSimu.h | 1 + StRoot/StTriggerUtilities/Emc/StEmcTriggerSimu.cxx | 8 ++++++++ StRoot/StTriggerUtilities/Emc/StEmcTriggerSimu.h | 1 + .../StDSMUtilities/DSMAlgo_BC101_2009.cc | 2 ++ .../StDSMUtilities/DSMAlgo_BC101_2013.cc | 3 +++ .../StDSMUtilities/DSMAlgo_BC101_2015.cc | 12 +++++++----- .../StDSMUtilities/DSMAlgo_BC101_2015.hh | 2 +- .../StDSMUtilities/DSMAlgo_EE101_2009.cc | 5 +++++ .../StDSMUtilities/DSMAlgo_EE101_2013.cc | 5 +++++ .../StDSMUtilities/DSMAlgo_EE101_2017.cc | 8 +++++++- .../StDSMUtilities/DSMAlgo_EE102_2009.cc | 4 ++++ .../StDSMUtilities/DSMAlgo_EE102_2013.cc | 5 +++++ .../StDSMUtilities/DSMAlgo_EE102_2017.cc | 8 ++++++++ .../StDSMUtilities/DSMAlgo_EM201_2017.cc | 2 ++ 19 files changed, 67 insertions(+), 20 deletions(-) diff --git a/StRoot/StJetMaker/StJetMaker2012.cxx b/StRoot/StJetMaker/StJetMaker2012.cxx index b38334e069a..366fa65b04c 100644 --- a/StRoot/StJetMaker/StJetMaker2012.cxx +++ b/StRoot/StJetMaker/StJetMaker2012.cxx @@ -74,7 +74,7 @@ int StJetMaker2012::Init() TString branchname(jetbranch->name); branchname.Append(jetuebranch->name); mTreeUe->Branch(branchname, "StUeOffAxisConesEvent",&((jetuebranch->eventUe)[iBranch])); - cout<name<<" initialized!"<name<<" and "<name<<" initialized!"< mom(vect->px(), vect->py(), vect->pz()); double p_pt = mom.perp(); double p_eta = vect->eta(); double p_phi = vect->phi(); - // cout<<"p_pt = "<addCone(cones[0]); jcones->addCone(cones[1]); StUeVertex *ueVertex = ueEvent->lastVertex(); @@ -479,6 +475,5 @@ double StJetMaker2012::DeltaR(double etaA, double phiA, double etaB, double phiB if(dphi < -1.*PI) dphi += 2.*PI; double dR = TMath::Sqrt(deta*deta+dphi*dphi); - // cout<emc) { for (int i = 0; i < 3; ++i) mEvent->setOverlapJetPatchTh(i,trigSimu->emc->overlapJetPatchTh(i)); - for (int i = 0; i < 2; ++i) { - int jp, adc; - trigSimu->emc->getOverlapJetPatchAdc(i,jp,adc); - mEvent->setOverlapJetPatchAdc(jp,adc); - } + for (int jp = 0; jp < 6; ++jp) mEvent->setOverlapJetPatchAdc(jp, trigSimu->emc->overlapJetPatchAdc(jp)); } mEvent->setEmcLayer2(trigSimu->emc->EM201output()); diff --git a/StRoot/StTriggerUtilities/Bemc/StBemcTriggerSimu.cxx b/StRoot/StTriggerUtilities/Bemc/StBemcTriggerSimu.cxx index f5e6c06c276..811ff2e2470 100644 --- a/StRoot/StTriggerUtilities/Bemc/StBemcTriggerSimu.cxx +++ b/StRoot/StTriggerUtilities/Bemc/StBemcTriggerSimu.cxx @@ -44,7 +44,7 @@ StBemcTriggerSimu::StBemcTriggerSimu() mTables = NULL; mHList = NULL; mConfig = 0; - + mTestMode = false; } //================================================== //================================================== @@ -3187,6 +3187,8 @@ int StBemcTriggerSimu::getJetPatchThreshold(int trigId, int dsmid) const { int StBemcTriggerSimu::barrelJetPatchTh(int i) const { return mB101->getRegister(i); } int StBemcTriggerSimu::barrelHighTowerTh(int i) const { return mB001->getRegister(i); } int StBemcTriggerSimu::barrelJetPatchAdc(int jp) const { return (*mB101)[jp%6].info[(jp/6+2)%3]; } +int StBemcTriggerSimu::barrelPartialJetPatchAdc(int jp) const { //jp from 0 to 5, 6 high eta partical jet patch sum +return (*mB101)[jp%6].info[3]; } void StBemcTriggerSimu::fillStEmcTriggerDetector() { diff --git a/StRoot/StTriggerUtilities/Bemc/StBemcTriggerSimu.h b/StRoot/StTriggerUtilities/Bemc/StBemcTriggerSimu.h index e1cd93fab57..f6a05aa4cc1 100644 --- a/StRoot/StTriggerUtilities/Bemc/StBemcTriggerSimu.h +++ b/StRoot/StTriggerUtilities/Bemc/StBemcTriggerSimu.h @@ -230,6 +230,7 @@ class StBemcTriggerSimu : public StVirtualTriggerSimu { int barrelHighTowerTh(int i) const; int barrelJetPatchAdc(int jp) const; + int barrelPartialJetPatchAdc(int jp) const; int barrelHighTowerAdc(int towerId) const { return getHT6bitAdc(towerId); } public: diff --git a/StRoot/StTriggerUtilities/Eemc/StEemcTriggerSimu.cxx b/StRoot/StTriggerUtilities/Eemc/StEemcTriggerSimu.cxx index 7d29eb5d9e2..f6cff6d6a2b 100644 --- a/StRoot/StTriggerUtilities/Eemc/StEemcTriggerSimu.cxx +++ b/StRoot/StTriggerUtilities/Eemc/StEemcTriggerSimu.cxx @@ -792,6 +792,7 @@ int StEemcTriggerSimu::endcapJetPatchTh(int i) const { return mE101->getRegister int StEemcTriggerSimu::endcapHighTowerTh(int i) const { return mE001->getRegister(i); } int StEemcTriggerSimu::endcapJetPatchAdc(int jp) const { return (*mE101)[1-jp/3].info[jp%3]; } +int StEemcTriggerSimu::endcapPartialJetPatchAdc(int jp) const { return (*mE101)[1-jp/3].info[3+jp%3]; } int StEemcTriggerSimu::getOutHT(int tp) const { return feeTPTreeADC->TP(tp)->getOutHT(); } int StEemcTriggerSimu::getOutTPsum(int tp) const { return feeTPTreeADC->TP(tp)->getOutTPsum(); } diff --git a/StRoot/StTriggerUtilities/Eemc/StEemcTriggerSimu.h b/StRoot/StTriggerUtilities/Eemc/StEemcTriggerSimu.h index 9d5723f9570..3164ea6e836 100644 --- a/StRoot/StTriggerUtilities/Eemc/StEemcTriggerSimu.h +++ b/StRoot/StTriggerUtilities/Eemc/StEemcTriggerSimu.h @@ -146,6 +146,7 @@ class StEemcTriggerSimu : public StVirtualTriggerSimu { int endcapJetPatchAdc(int jp) const; int endcapHighTowerAdc(int towerId) const { return 0; } + int endcapPartialJetPatchAdc(int jp) const; int getOutHT(int tp) const; int getOutTPsum(int tp) const; diff --git a/StRoot/StTriggerUtilities/Emc/StEmcTriggerSimu.cxx b/StRoot/StTriggerUtilities/Emc/StEmcTriggerSimu.cxx index c4aba02af2d..8b40f3c82f8 100644 --- a/StRoot/StTriggerUtilities/Emc/StEmcTriggerSimu.cxx +++ b/StRoot/StTriggerUtilities/Emc/StEmcTriggerSimu.cxx @@ -176,3 +176,11 @@ void StEmcTriggerSimu::getOverlapJetPatchAdc(int i, int& jp, int& adc) const jp = (1-i)*3+jp_partial-1; adc = (*mEM201)[0].info[i]; } +int StEmcTriggerSimu::overlapJetPatchAdc(int jp) const +{ + int adc = 0; + if(mBemc && mEemc){ + adc = mBemc->barrelPartialJetPatchAdc(jp) + mEemc->endcapPartialJetPatchAdc(jp); + } + return adc; +} diff --git a/StRoot/StTriggerUtilities/Emc/StEmcTriggerSimu.h b/StRoot/StTriggerUtilities/Emc/StEmcTriggerSimu.h index edb5db86d45..c00ed709dad 100644 --- a/StRoot/StTriggerUtilities/Emc/StEmcTriggerSimu.h +++ b/StRoot/StTriggerUtilities/Emc/StEmcTriggerSimu.h @@ -106,6 +106,7 @@ class StEmcTriggerSimu : public StVirtualTriggerSimu { int overlapJetPatchTh(int i) const; void getOverlapJetPatchAdc(int i, int& jp, int& adc) const; + int overlapJetPatchAdc(int jp) const; private: // returns value of bit from x at position pos diff --git a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2009.cc b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2009.cc index 5104f33b5e3..e1d5494050b 100644 --- a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2009.cc +++ b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2009.cc @@ -103,4 +103,6 @@ void DSMAlgo_BC101_2009::operator()(DSM& dsm) dsm.info[0] = jpx; dsm.info[1] = jpy; dsm.info[2] = jpz; + //partial sum + dsm.info[3] = jpPartial; } diff --git a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2013.cc b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2013.cc index 7d39558316c..55d1a99dcad 100644 --- a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2013.cc +++ b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2013.cc @@ -115,4 +115,7 @@ void DSMAlgo_BC101_2013::operator()(DSM& dsm) dsm.info[0] = jpx; dsm.info[1] = jpy; dsm.info[2] = jpz; + //partial sum + dsm.info[3] = jpPartial; + } diff --git a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2015.cc b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2015.cc index abeb0992b16..1c95d141c3c 100644 --- a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2015.cc +++ b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2015.cc @@ -28,10 +28,10 @@ void DSMAlgo_BC101_2015::operator()(DSM& dsm) // ACTION: - unsigned int jpx; // East (-1 < eta < 0) - unsigned int jpy; // Middle (-0.6 < eta < 0.4) - unsigned int jpz; // West (0 < eta < 1) - unsigned int jpPartial; // Partial (0.4 < eta < 1) + int jpx; // East (-1 < eta < 0) + int jpy; // Middle (-0.6 < eta < 0.4) + int jpz; // West (0 < eta < 1) + int jpPartial; // Partial (0.4 < eta < 1) int highTowerBits; @@ -101,8 +101,10 @@ void DSMAlgo_BC101_2015::operator()(DSM& dsm) dsm.info[0] = jpx; dsm.info[1] = jpy; dsm.info[2] = jpz; + //partial sum + dsm.info[3] = jpPartial; } -void getBemcJetPatchSums2015A(const DSM& bc101, unsigned int& jpx, unsigned int& jpy, unsigned int& jpz, unsigned int& jpPartial, int& highTowerBits) +void getBemcJetPatchSums2015A(const DSM& bc101, int& jpx, int& jpy, int& jpz, int& jpPartial, int& highTowerBits) { jpx = 0; jpy = 0; diff --git a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2015.hh b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2015.hh index 58099499910..bcdc9ce047d 100644 --- a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2015.hh +++ b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_BC101_2015.hh @@ -7,5 +7,5 @@ struct DSMAlgo_BC101_2015 : public DSMAlgo { void operator()(DSM& dsm); }; -void getBemcJetPatchSums2015A(const DSM& bc101, unsigned int& jpx, unsigned int& jpy, unsigned int& jpz, unsigned int& jpPartial, int& highTowerBits); +void getBemcJetPatchSums2015A(const DSM& bc101, int& jpx, int& jpy, int& jpz, int& jpPartial, int& highTowerBits); #endif // DSM_ALGO_BC101_2015_HH diff --git a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2009.cc b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2009.cc index 8d477131b49..f4a1de7dc99 100644 --- a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2009.cc +++ b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2009.cc @@ -131,4 +131,9 @@ void DSMAlgo_EE101_2009::operator()(DSM& dsm) dsm.info[0] = jpa; dsm.info[1] = jpb; dsm.info[2] = jpc; + + //low partial eta sum + dsm.info[3] = lowEtaSumA; //4 o'clock + dsm.info[4] = lowEtaSumB; //6 o'clock + dsm.info[5] = lowEtaSumC; //8 o'clock } diff --git a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2013.cc b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2013.cc index 7d51ea592e2..0436301db78 100644 --- a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2013.cc +++ b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2013.cc @@ -141,4 +141,9 @@ void DSMAlgo_EE101_2013::operator()(DSM& dsm) dsm.info[0] = jpa; dsm.info[1] = jpb; dsm.info[2] = jpc; + + //low partial eta sum + dsm.info[3] = lowEtaSumA; //4 o'clock + dsm.info[4] = lowEtaSumB; //6 o'clock + dsm.info[5] = lowEtaSumC; //8 o'clock } diff --git a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2017.cc b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2017.cc index 281b4b7d585..851eab123fa 100644 --- a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2017.cc +++ b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE101_2017.cc @@ -118,7 +118,13 @@ void DSMAlgo_EE101_2017::operator()(DSM& dsm) out |= maxId << 12; out |= highTowerBits << 14; dsm.output = out; - + dsm.info[0] = jpa; + dsm.info[1] = jpb; + dsm.info[2] = jpc; + //low partial eta sum + dsm.info[3] = lowEtaSumA; //4 o'clock + dsm.info[4] = lowEtaSumB; //6 o'clock + dsm.info[5] = lowEtaSumC; //8 o'clock } void DSMAlgo_EE101_2017::getEemcLowerHalfJetPatchSums(const DSM& dsm, int& jpa, int& jpb, int& jpc) diff --git a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2009.cc b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2009.cc index 41bf6d53311..98fd6cc4fc1 100644 --- a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2009.cc +++ b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2009.cc @@ -140,4 +140,8 @@ void DSMAlgo_EE102_2009::operator()(DSM& dsm) dsm.info[0] = jpa; dsm.info[1] = jpb; dsm.info[2] = jpc; + //low eta sum + dsm.info[3] = lowEtaSumA; // 10 o'clock + dsm.info[4] = lowEtaSumB; // 12 o'clock + dsm.info[5] = lowEtaSumC; // 2 o'clock } diff --git a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2013.cc b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2013.cc index 0739c7beaa4..ffc37e31bc8 100644 --- a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2013.cc +++ b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2013.cc @@ -145,4 +145,9 @@ void DSMAlgo_EE102_2013::operator()(DSM& dsm) dsm.info[0] = jpa; dsm.info[1] = jpb; dsm.info[2] = jpc; + // + //low eta sum + dsm.info[3] = lowEtaSumA; // 10 o'clock + dsm.info[4] = lowEtaSumB; // 12 o'clock + dsm.info[5] = lowEtaSumC; // 2 o'clock } diff --git a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2017.cc b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2017.cc index 7902c911e93..65b34617cdd 100644 --- a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2017.cc +++ b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EE102_2017.cc @@ -123,6 +123,14 @@ void DSMAlgo_EE102_2017::operator()(DSM& dsm) out |= highTowerBits << 14; dsm.output = out; + + dsm.info[0] = jpa; + dsm.info[1] = jpb; + dsm.info[2] = jpc; + //low eta sum + dsm.info[3] = lowEtaSumA; // 10 o'clock + dsm.info[4] = lowEtaSumB; // 12 o'clock + dsm.info[5] = lowEtaSumC; // 2 o'clock } void DSMAlgo_EE102_2017::getEemcUpperHalfJetPatchSums(const DSM& dsm, int& jpa, int& jpb, int& jpc) diff --git a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EM201_2017.cc b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EM201_2017.cc index 845275cf791..349d876a5e4 100644 --- a/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EM201_2017.cc +++ b/StRoot/StTriggerUtilities/StDSMUtilities/DSMAlgo_EM201_2017.cc @@ -157,6 +157,8 @@ void DSMAlgo_EM201_2017::operator()(DSM& dsm) dsm.output = out; + dsm.info[0] = jpSum1; + dsm.info[1] = jpSum2; } void DSMAlgo_EM201_2017::getHybridJetPatchSums(const DSM& dsm, int& jpSum1, int& jpSum2) {