10 #include "StRoot/StMuDSTMaker/COMMON/StMuDst.h"
11 #include "StRoot/StMuDSTMaker/COMMON/StMuEvent.h"
12 #include "StRoot/StSpinPool/StSpinDbMaker/StSpinDbMaker.h"
14 #include "StSpinInfoMaker.h"
21 LOG_FATAL <<
"StSpinInfoMaker_t::Init(), no MuDst found!" << endm;
35 LOG_FATAL <<
"StSpinInfoMaker_t::Make(), no MuDst found!" << endm;
41 LOG_FATAL <<
"Cannot get 'StEvent' pointer from MuDst" << endm;
45 mSpinInfo.setDsmVertex( event->bbcTriggerDetector().onlineTimeDifference() );
53 LOG_FATAL <<
"StSpinInfoMaker_t::Make(), no StSpinDbMaker found!" << endm;
58 LOG_WARN <<
"StSpinInfoMaker_t::Make(), SpinDB reports invalid for run " <<
GetRunNumber() <<
", " << GetEventNumber() <<
"." << endm;
63 LOG_FATAL <<
"Cannot get 'StL0Trigger' pointer from MuDst" << endm;
67 UShort_t bx48 =
static_cast< UShort_t
>( trig->bunchCrossingId() );
68 UShort_t bx7 =
static_cast< UShort_t
>( trig->bunchCrossingId7bit( event->runNumber() ));
71 mSpinInfo.setbXingIsMaskedInSpinDB( spinDB->isMaskedUsingBX48(bx48) );
73 mSpinInfo.setBunchCrossing7bit( bx7 );
74 mSpinInfo.setBunchCrossing48bit( bx48 );
75 mSpinInfo.setBunchCrossingStar( bxStar );
81 mSpinInfo.setSpin4( -1 );
82 if( !spinDB->isMaskedUsingBX48(bx48) ){
84 if( spinDB->offsetBX48minusBX7(bx48,bx7) != 0 ) {
85 LOG_WARN <<
" ++++ spindb indicates 7bit and 48bit bunch crossings are inconsistent... event invalid ++++" << endm;
92 mSpinInfo.setSpin4( static_cast< UShort_t >( spin4 ) );
95 mSpinInfo.setPolarizationType( StSpinInfo_t::LONG_LONG_POLARIZATION );
98 mSpinInfo.setPolarizationType( StSpinInfo_t::TRANS_TRANS_POLARIZATION );
void Clear(Option_t *opts="")
Clear for next event.
bool isPolDirTrans()
true if all needed DB tables were found
bool isValid()
dump spinDb content for current time stamp
int spin4usingBX48(int bx48)
8bit spin information
void clear()
Clear function.
Int_t Make()
Fill the spin info class.
int BXyellowUsingBX48(int bx48)
4bit spin information
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
virtual Int_t GetRunNumber() const
Returns the current RunNumber.
void setValidDB(Bool_t ValidDB)
Modifiers.
bool isPolDirLong()
Returns true if beams are transversely polarized, false otherwise.