10 #include "StPicoMessMgr.h"
11 #include "StPicoEvent.h"
17 mRunId(0), mEventId(0), mFillId(0), mBField(0), mTime(0),
18 mPrimaryVertexX(0), mPrimaryVertexY(0), mPrimaryVertexZ(0),
19 mPrimaryVertexErrorX(0), mPrimaryVertexErrorY(0), mPrimaryVertexErrorZ(0),
20 mRanking(-999), mNBEMCMatch(0), mNBTOFMatch(0),
22 mRefMultFtpcEast(0), mRefMultFtpcWest(0),
23 mRefMultNeg(0), mRefMultPos(0),
24 mRefMult2NegEast(0), mRefMult2PosEast(0), mRefMult2NegWest(0), mRefMult2PosWest(0),
25 mRefMult3NegEast(0), mRefMult3PosEast(0), mRefMult3NegWest(0), mRefMult3PosWest(0),
26 mRefMult4NegEast(0), mRefMult4PosEast(0), mRefMult4NegWest(0), mRefMult4PosWest(0),
27 mRefMultHalfNegEast(0), mRefMultHalfPosEast(0), mRefMultHalfNegWest(0), mRefMultHalfPosWest(0),
28 mGRefMult(0), mNumberOfGlobalTracks(0), mbTofTrayMultiplicity(0), mNHitsHFT{},
29 mNVpdHitsEast(0), mNVpdHitsWest(0), mNTofT0(0), mVzVpd(-999.),
31 mNTofT0Can(0), mTStart(-9999*1000), mTCanFirst(99999*1000), mTCanLast(-99999*1000), mNVpdEGoodHits(0),
32 mNVpdWGoodHits(0), mEarliestVpdEHit(99999*1000), mEarliestVpdWHit(99999*1000), mClosestVpdEHit(99999*1000),
33 mClosestVpdWHit(99999*1000), mLatestVpdEHit(-99999*1000), mLatestVpdWHit(-99999*1000),
34 mZDCx(0), mBBCx(0), mBackgroundRate(0), mBbcBlueBackgroundRate(0), mBbcYellowBackgroundRate(0),
35 mBbcEastRate(0), mBbcWestRate(0), mZdcEastRate(0), mZdcWestRate(0),
36 mZdcSumAdcEast(0), mZdcSumAdcWest(0),
37 mZdcSmdEastHorizontal{}, mZdcSmdEastVertical{}, mZdcSmdWestHorizontal{}, mZdcSmdWestVertical{},
38 mBbcAdcEast{}, mBbcAdcWest{}, mHighTowerThreshold{}, mJetPatchThreshold{},
39 mETofHitMultiplicity(0), mETofDigiMultiplicity(0), mETofGoodEventFlag{}, mNumberOfPrimaryTracks(0), mZdcUnAttenuated{} {
42 if( !mTriggerIds.empty() ) {
84 mRefMult3NegEast =
event.mRefMult3NegEast;
85 mRefMult3PosEast =
event.mRefMult3PosEast;
86 mRefMult3NegWest =
event.mRefMult3NegWest;
87 mRefMult3PosWest =
event.mRefMult3PosWest;
88 mRefMult4NegEast =
event.mRefMult4NegEast;
89 mRefMult4PosEast =
event.mRefMult4PosEast;
90 mRefMult4NegWest =
event.mRefMult4NegWest;
91 mRefMult4PosWest =
event.mRefMult4PosWest;
94 mRefMultHalfNegWest =
event.mRefMultHalfNegWest;
105 for(
int iIter=0; iIter<4; iIter++) {
106 mNHitsHFT[iIter] =
event.mNHitsHFT[iIter];
128 for(
int iIter=0; iIter<8; iIter++) {
135 for(
int iSide=0; iSide<2; iSide++) {
139 for(
int iIter=0; iIter<24; iIter++) {
145 for(
int iIter=0; iIter<4; iIter++) {
150 for(
int iIter=0; iIter<1728; iIter++) {
153 for(
int iIter=0; iIter<108; iIter++) {
154 mETofHasPulsersFlag[iIter] =
event.mETofHasPulsersFlag[iIter];
166 LOG_INFO <<
" year = " <<
year()
167 <<
" day = " <<
day() <<
"\n"
174 <<
" grefMult = " <<
grefMult() <<
"\n"
175 <<
" nTofT0 = " <<
nTofT0()
176 <<
" vpdVz = " <<
vzVpd()
182 return mRunId / 1000000 - 1 + 2000;
187 return (
mRunId % 1000000) / 1000;
203 Bool_t isUsed =
false;
206 for(UInt_t iIter=0; iIter<
mTriggerIds.size(); iIter++) {
228 if (!newIds.empty()) {
235 for (UInt_t iIter1= 0; iIter1<newIds.size(); iIter1++) {
238 Bool_t isUsed =
false;
241 for (UInt_t iIter2=0; iIter2<
mTriggerIds.size(); iIter2++) {
264 if(layer>=0 && layer<=3) {
274 if(strip>=0 && strip<=7) {
284 if(strip>=0 && strip<=7) {
294 if(strip>=0 && strip<=7) {
304 if(strip>=0 && strip<=7) {
314 if(iPMT>=0 && iPMT<=23) {
324 if(iPMT>=0 && iPMT<=23) {
335 LOG_INFO <<
"StPicoEvent::setBunchID() - negative bunch ID = " <<
id << endm;
338 mBunchCrossId = ( (
id > std::numeric_limits<decltype(mBunchCrossId)>::max() ) ?
339 std::numeric_limits<decltype(mBunchCrossId)>::max() :
346 if( iSector < 13 || iSector > 24 ){
347 LOG_INFO <<
"StPicoEvent::eTofGoodEventFlag() - non-existing sector id " << iSector <<
" -> return false"<< endm;
350 if( iModule < 1 || iModule > 3 ){
351 LOG_INFO <<
"StPicoEvent::eTofGoodEventFlag() - non-existing module id " << iModule <<
" -> return false"<< endm;
354 if( iCounter < 1 || iCounter > 3 ){
355 LOG_INFO <<
"StPicoEvent::eTofGoodEventFlag() - non-existing counter id " << iCounter <<
" -> return false"<< endm;
358 if( iGet4 < 1 || iGet4 > 16 ){
359 LOG_INFO <<
"StPicoEvent::eTofGoodEventFlag() - non-existing Get4 id " << iGet4 <<
" -> return false"<< endm;
363 return (
bool)
mETofGoodEventFlag[ 3*3*16*(iSector-13) + 3*16*(iModule-1) + 16*(iCounter-1)+ (iGet4 - 1) ];
367 if( flagVec.size() != 1728 ){
368 LOG_INFO <<
"StPicoEvent::setETofGoodEventFlag() - eTof flag vector wrong size " << flagVec.size() <<
" / 1728"<< endm;
Int_t nTofT0() const
Return number of TOF tracks used for T0 calibration.
std::vector< unsigned int > mTriggerIds
List of triggers that were fired in the current event.
UShort_t mZdcSmdWestHorizontal[8]
ADC measured in 8 west horizontal ZDC strips.
UShort_t mBbcAdcWest[24]
ADC measured in each of 24 tiles in west BBC.
Int_t runId() const
Return run ID.
UShort_t mRefMultHalfNegEast
TPC refMultHalf neg (eta<0)
virtual void Print(const Char_t *option="") const
Print some event information.
UShort_t mETofDigiMultiplicity
Total digi multiplicity in ETOF modules.
void setZdcSmdEastVertical(Int_t strip, Float_t zdcSmdEastVertical)
Set ZDC for the east vertical ZDC i-th strip.
UShort_t mZdcSmdWestVertical[8]
ADC measured in 8 west vertical ZDC strips.
Float_t mPrimaryVertexZ
Primary vertex position Z.
void setTriggerIds(std::vector< unsigned int > ids)
Set trigger id (pass STL vector with trigger IDs)
UShort_t mGRefMult
RefMult estimated by global tracks.
Float_t mBbcWestRate
West BBC rate.
Int_t eventId() const
Return event ID.
Int_t fillId() const
Return fill ID.
UShort_t mNHitsHFT[4]
Number of hits int HFT (in each of 4 layers)
Float_t mPrimaryVertexX
Primary vertex position X.
UChar_t mJetPatchThreshold[4]
Online JP thresholds BEMC only.
bool mETofGoodEventFlag[1728]
Flag to mark if the event is good for physics analysis for each Get4. A Get4 is considered good in ea...
Float_t mRanking
Primary vertex ranking.
void setTriggerId(UInt_t id)
Set trigger id.
UShort_t mRefMult2NegWest
TPC refMult2 neg (0.5<eta<1.0)
Int_t year() const
Return year.
bool isTrigger(unsigned int) const
UShort_t mZdcSumAdcEast
Sum of ADC in east ZDC.
UShort_t mZdcSmdEastVertical[8]
ADC measured in 8 east vertical ZDC strips.
Float_t mPrimaryVertexErrorX
Primary vertex position error X.
UShort_t mRefMultHalfPosEast
TPC refMultHalf pos (eta<0)
void setBbcAdcWest(Int_t iPMT, Float_t bbcAdcWest)
Set i-th PMT of east BBC.
UShort_t mRefMultFtpcEast
RefMult for east TPC.
UShort_t mBbcAdcEast[24]
ADC measured in each of 24 tiles in east BBC.
void setZdcSmdEastHorizontal(Int_t strip, Float_t zdcSmdEastHorizontal)
Set ZDC for the east horizontal ZDC i-th strip.
UShort_t mZdcSumAdcWest
Sum of ADC in west ZDC.
Float_t mPrimaryVertexErrorZ
Primary vertex position error Z.
Float_t mBField
Magnetic field strength.
UChar_t mNVpdHitsWest
Number of hits in west VPD.
UShort_t mZdcSmdEastHorizontal[8]
ADC measured in 8 east horizontal ZDC strips.
Int_t mRunId
Run number (or runId)
UShort_t mRefMultHalfPosWest
TPC refMultHalf pos (eta>0)
void setBbcAdcEast(Int_t iPMT, Float_t bbcAdcEast)
Set i-th PMT of east BBC.
UInt_t mZDCx
ZDC coincidence rate.
Float_t mZdcWestRate
West ZDC rate.
void setZdcSmdWestVertical(Int_t strip, Float_t zdcSmdWestVertical)
Set ZDC for the west vertical ZDC i-th strip.
void setNHitsHFT(Int_t layer, UShort_t word)
Set number of hits in i-th HFT layers (PXL, PXL, IST, SSD)
Float_t mZdcEastRate
East ZDC rate.
UChar_t mHighTowerThreshold[4]
Online HT thresholds.
void setBunchId(Int_t id)
Set bunch crossing ID.
virtual ~StPicoEvent()
Destructor.
Float_t vzVpd() const
Return z position of the primary vertex estimated by VPD.
Float_t mBbcYellowBackgroundRate
"Yellow" beam rate measured in BBC
UShort_t mRefMultFtpcWest
RefMult for west TPC.
UShort_t mETofHitMultiplicity
Total hit multiplicity in ETOF modules.
void setZdcSmdWestHorizontal(Int_t strip, Float_t zdcSmdWestHorizontal)
Set ZDC for the west horizontal ZDC i-th strip.
Float_t mPrimaryVertexErrorY
Primary vertex position error Y.
Int_t day() const
Return day number.
void setETofGoodEventFlag(bool flag, UShort_t iSector, UShort_t iModule, UShort_t iCounter, UShort_t iGet4)
Set goodEventFlag for a specific eTOF counter.
UShort_t mRefMult2PosEast
TPC refMult2 pos (-1<eta<-0.5)
UShort_t mNTofT0
Number of T0 particles in BTOF self calibration.
Int_t refMult() const
Return RefMult (-0.5<eta<0.5)
UShort_t mNBEMCMatch
Number of BEMC-matched tracks.
UChar_t mBunchCrossId
Number of bunch crossing.
Int_t grefMult() const
Return gRefMult (RefMult by global tracks in |gRefMult|<0.5)
Stores global information about the event.
UShort_t mRefMult2NegEast
TPC refMult2 neg (-1<eta<-0.5)
UShort_t mbTofTrayMultiplicity
Total hit multiplicity in TOF trays.
UShort_t mRefMult2PosWest
TPC refMult2 pos (0.5<eta<1.0)
Float_t mBbcBlueBackgroundRate
"Blue" beam rate measured in BBC
Float_t mVzVpd
Vz estimated via VPD.
Float_t mBbcEastRate
East BBC rate.
UShort_t mRefMultNeg
RefMult estimated via negative tracks (-0.5<eta<0.5)
UChar_t mNVpdHitsEast
Number of hits in east VPD.
UShort_t mNBTOFMatch
Number of TOF-matched tracks.
UShort_t mNumberOfPrimaryTracks
Number of primary tracks.
TVector3 primaryVertex() const
Return primary vertex position.
Float_t mPrimaryVertexY
Primary vertex position Y.
UShort_t mNumberOfGlobalTracks
Total number of global tracks reconstructed in the event.
UShort_t mZdcUnAttenuated[2]
ZDC unattenuated: 0 - east, 1 - west.
bool eTofGoodEventFlag(UShort_t iSector, UShort_t iModule, UShort_t iCounter, UShort_t iGet4) const
Return goodEventFlag for a specific eTOF Get4.
UShort_t mRefMultPos
RefMult estimated via positive tracks (-0.5<eta<0.5)
UInt_t mBBCx
BBC coincidence rate.
StPicoEvent()
Default constructor.
Float_t mBackgroundRate
Background rate.
UShort_t mFillId
Fill number.