#include <BeamMonSpill.h>
Inheritance diagram for BeamMonSpill:

Public Member Functions | |
| BeamMonSpill () | |
| ~BeamMonSpill () | |
| virtual DbiTableRow * | CreateTableRow () const |
| DbiTableRow API. | |
| void | Fill (DbiResultSet &rs, const DbiValidityRec *vrec) |
| DbiTableRow API. | |
| virtual void | Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const |
| DbiTableRow API. | |
| VldTimeStamp | SpillTime () const |
| double | BpmAtTarget (double &xmean, double &ymean, double &xrms, double &yrms) const |
| BeamType::BeamType_t | BeamType () const |
| void | SetTimestamps (const VldTimeStamp &dae, const VldTimeStamp &vme) |
| Set the DAE and VME time stamps. | |
| void | SetToroids (double tor101, double tr101d, double tortgt, double trtgtd) |
| Set the important toroids. | |
| void | SetHornCurrent (double cur) |
| Set the horn current. | |
| void | SetBPM (const std::vector< double > &xpos, const std::vector< double > &ypos, const std::vector< double > &intensities) |
| Set BPM derived info. | |
| void | SetProfile (double x, double y, double w, double h) |
| Set Profile monitor derived info. | |
| void | SetHadMuInt (double had, double mu1, double mu2, double mu3) |
| Set the total corrected charge in the hadron monitor. | |
| StatusBits | GetStatusBits () const |
| Get the status bit field. | |
| int | GetStatusInt () const |
| Get the status bit field as integer. | |
| void | SetStatusBits (StatusBits status) |
| Set the status bit field. | |
| StatusBits & | Status () |
| Access the status bit field read/write. | |
Public Attributes | |
| VldTimeStamp | fDaeTime |
| Timestamps. | |
| VldTimeStamp | fVmeTime |
| Timestamps. | |
| float | fTor101 |
| Toroids (1e12 ppp). | |
| float | fTr101d |
| Toroids (1e12 ppp). | |
| float | fTortgt |
| Toroids (1e12 ppp). | |
| float | fTrtgtd |
| Toroids (1e12 ppp). | |
| float | fHornCur |
| Horn current. | |
| float | fTargBpmX [6] |
| Per batch X,Y positions projected to the target via BPMs 121 and TGT. | |
| float | fTargBpmY [6] |
| Per batch X,Y positions projected to the target via BPMs 121 and TGT. | |
| float | fBpmInt [6] |
| float | fTargProfX |
| float | fTargProfY |
| float | fProfWidX |
| Widths via profile monitors at TGT. No projection. | |
| float | fProfWidY |
| Widths via profile monitors at TGT. No projection. | |
| float | fHadInt |
| hadron/muon mon. intensities | |
| float | fMuInt1 |
| hadron/muon mon. intensities | |
| float | fMuInt2 |
| hadron/muon mon. intensities | |
| float | fMuInt3 |
| hadron/muon mon. intensities | |
| union { | |
| int integer | |
| StatusBits bits | |
| } | fStatus |
| Status bits. | |
Created on: Wed Apr 13 18:18:05 2005
Definition at line 34 of file BeamMonSpill.h.
|
|
Definition at line 13 of file BeamMonSpill.cxx. References fBpmInt, fStatus, fTargBpmX, and fTargBpmY. 00014 : fDaeTime(VldTimeStamp(2038,1,1,0,0,0)) // end of time 00015 , fVmeTime(VldTimeStamp(2038,1,1,0,0,0)) // end of time 00016 , fTor101(0.0), fTr101d(0.0), fTortgt(0.0), fTrtgtd(0.0) 00017 , fHornCur(0.0) 00018 , fTargProfX(0.0), fTargProfY(0.0) 00019 , fProfWidX(0.0), fProfWidY(0.0) 00020 , fHadInt(0.0), fMuInt1(0.0), fMuInt2(0.0), fMuInt3(0.0) 00021 { 00022 fStatus.integer = 0; 00023 for (int ind=0; ind<6; ++ind) 00024 fTargBpmX[ind] = fTargBpmY[ind] = fBpmInt[ind] = 0.0; 00025 }
|
|
|
Destroy this object. MUST be called when (ie, explicitly destroy object, don't just abort job) in order to write any as yet unflushed rows. Definition at line 27 of file BeamMonSpill.cxx. 00028 {
00029 }
|
|
|
Return the beam type determined from the target position, the horn current and intensity Definition at line 107 of file BeamMonSpill.cxx. References BeamMonSpill::StatusBits::beam_type, fHornCur, VldTimeStamp::GetSec(), GetStatusBits(), and SpillTime(). Referenced by MadTVAnalysis::CreatePAN(), NuExtraction::ExtractBeamInfoDB(), NuAnalysis::ExtractConfig(), ANtpInfoObjectFillerBeam::FillBeamInformation(), NtpMaker::FillSpillInfo(), NuBeam::IsGoodSpillAndFillPot(), DataQualityInterface::ProcessBeamStatus(), StndBmsSpin::Scan(), and BMSpillAna::SelectSpill(). 00108 {
00109 BeamType::BeamType_t btype = BeamType::kUnknown;
00110 //
00111 Int_t db_btyp = this->GetStatusBits().beam_type;
00112
00113 // Overwrite the beamtype that is in the database for spills
00114 // after May 2006
00115 // Change triggered by problems observed for Summer 2006 spills
00116 // Some spills during pME & pHE running had a beamtype in the
00117 // database of 1, which means le running. And a large fraction of
00118 // spills in September had a beamtype of 4, i.e. pME.
00119 // The most likely casue for this is that the timing used to
00120 // determine the target position when filling the database was screwed up.
00121
00122 double spilltime = this->SpillTime().GetSec();
00123 if (spilltime > 1149202720 && spilltime <= 1150047812) db_btyp=4; // pME
00124 else if (spilltime > 1150047812 && spilltime <= 1155664632 ) db_btyp=5; // pHE
00125 else if (spilltime > 1155664632 ) db_btyp=1; // LE
00126
00127
00128 if (db_btyp==1){
00129 if (this->SpillTime().GetSec() <= 1112010000){ // early real LE data
00130 if (fHornCur < -190) // nominal at -200kA
00131 btype = BeamType::kL000z200i; //
00132 }
00133 else { // later on LE-10 data
00134 if (fHornCur < -190) // -200 kA
00135 btype = BeamType::kL010z200i;
00136 else if (fHornCur < -175){ // -185kA
00137 btype = BeamType::kL010z185i; // nominal
00138 }
00139 else if (fHornCur < -160)
00140 btype = BeamType::kL010z170i;
00141 else if (fHornCur > -5)
00142 btype = BeamType::kL010z000i;
00143 }
00144 }
00145 else if (db_btyp==2 || db_btyp==4){ // (p)ME
00146 if (this->SpillTime().GetSec() > 1149202720 &&
00147 this->SpillTime().GetSec() <= 1150047812){ // pME-150
00148 if (fHornCur < -190) //
00149 btype = BeamType::kL150z200i; // -200 kA
00150 }
00151 else {
00152 if (fHornCur < -190) // pME-100
00153 btype = BeamType::kL100z200i; // -200 kA
00154 }
00155 }
00156 else if (db_btyp==3 || db_btyp==5){ // (p)HE
00157 if (fHornCur < -190) // pHE-250
00158 btype = BeamType::kL250z200i; // -200 kA
00159 }
00160
00161 return btype;
00162 }
|
|
||||||||||||||||||||
|
Fill the relative intensity averaged positions and spreads at the target as determined by the BPMs. Return total relative BPM intensity. Definition at line 72 of file BeamMonSpill.cxx. References fBpmInt, fTargBpmX, and fTargBpmY. Referenced by ParticleBeamMonAna::ana(), BeamMonAna::Analyze(), NuAnalysis::ExtractConfig(), ANtpInfoObjectFillerBeam::FillBeamInformation(), BMSpillAna::FractionOnTarget(), NuBeam::IsGoodSpillAndFillPot(), NueBeamMonModule::Reco(), StndBmsSpin::Scan(), and BMSpillAna::SelectSpill(). 00073 {
00074 xmean=ymean=xrms=yrms=0.0;
00075
00076 double Itot = 0, ix=0,iy=0,ix2=0,iy2=0;
00077 for (int ind=0; ind<6; ++ind) {
00078 if (fBpmInt[ind] == 0.0) continue;
00079
00080 double X = fTargBpmX[ind];
00081 double Y = fTargBpmY[ind];
00082 double I = fBpmInt[ind];
00083 I = I > 0 ? I : 0;
00084 Itot += I;
00085
00086 ix += I*X;
00087 iy += I*Y;
00088
00089 ix2 += I*X*X;
00090 iy2 += I*Y*Y;
00091 }
00092
00093 if (Itot <= 0.0) return 0.0;
00094
00095 xmean = ix/Itot;
00096 double xtmp = ix2/Itot-xmean*xmean;
00097 if (xtmp > 0.0) xrms = sqrt(xtmp);
00098
00099 ymean = iy/Itot;
00100 double ytmp = iy2/Itot-ymean*ymean;
00101 if (ytmp > 0.0) yrms = sqrt(ytmp);
00102
00103 return Itot;
00104 }
|
|
|
DbiTableRow API.
Implements DbiTableRow. Definition at line 31 of file BeamMonSpill.cxx. 00032 {
00033 return new BeamMonSpill;
00034 }
|
|
||||||||||||
|
DbiTableRow API.
Implements DbiTableRow. Definition at line 36 of file BeamMonSpill.cxx. References fBpmInt, fHadInt, fMuInt1, fMuInt2, fProfWidX, fStatus, fTargBpmX, fTargBpmY, fTargProfX, fTargProfY, fTor101, fTortgt, and fTr101d. Referenced by StndBmsSpin::Scan(), STND_BMS::Scan(), and BMS_STND::Scan(). 00037 {
00038 int ns=0;
00039
00040 rs >> fDaeTime;
00041 rs >> ns;
00042 fDaeTime.Add(VldTimeStamp(0,ns));
00043
00044 rs >> fVmeTime;
00045 rs >> ns;
00046 fVmeTime.Add(VldTimeStamp(0,ns));
00047
00048 rs >> fTor101 >> fTr101d >> fTortgt >> fTrtgtd;
00049 rs >> fHornCur;
00050
00051 for (int ind=0; ind<6; ++ind)
00052 rs >> fTargBpmX[ind] >> fTargBpmY[ind] >> fBpmInt[ind];
00053
00054 rs >> fTargProfX >> fTargProfY >> fProfWidX >> fProfWidY;
00055 rs >> fHadInt >> fMuInt1 >> fMuInt2 >> fMuInt3;
00056 rs >> fStatus.integer;
00057 }
|
|
|
Get the status bit field.
Definition at line 172 of file BeamMonSpill.h. References fStatus. Referenced by BeamMonAna::Analyze(), BeamType(), MadTVAnalysis::CreatePAN(), MadTestAnalysis::CreatePAN(), MadPIDAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadDpAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), NuAnalysis::ExtractConfig(), NtpMaker::FillSpillInfo(), NuBeam::IsGoodSpillAndFillPot(), StndBmsSpin::Scan(), BMSpillAna::SelectSpill(), MadQuantities::ShowerValidation(), and BMSpillFiller::Spill(). 00173 { return fStatus.bits; }
|
|
|
Get the status bit field as integer.
Definition at line 176 of file BeamMonSpill.h. References fStatus. Referenced by NtpBDLiteModule::FillNtpBDLite(), and NtpMaker::FillSpillInfo(). 00177 { return fStatus.integer; }
|
|
||||||||||||||||
|
Set BPM derived info.
Definition at line 172 of file BeamMonSpill.cxx. References fBpmInt, fTargBpmX, and fTargBpmY. Referenced by BMSpillFiller::Spill(). 00174 {
00175 for (size_t ind=0;ind<6 && ind<xpos.size(); ++ind)
00176 fTargBpmX[ind] = xpos[ind];
00177 for (size_t ind=0;ind<6 && ind<ypos.size(); ++ind)
00178 fTargBpmY[ind] = ypos[ind];
00179 for (size_t ind=0;ind<6 && ind<intensities.size(); ++ind)
00180 fBpmInt[ind] = intensities[ind];
00181 }
|
|
||||||||||||||||||||
|
Set the total corrected charge in the hadron monitor.
Definition at line 197 of file BeamMonSpill.h. References fHadInt, fMuInt1, fMuInt2, and fMuInt3. Referenced by BMSpillFiller::Spill().
|
|
|
Set the horn current.
Definition at line 193 of file BeamMonSpill.h. References fHornCur. Referenced by BMSpillFiller::Spill(). 00194 { fHornCur = cur; }
|
|
||||||||||||||||||||
|
Set Profile monitor derived info.
Definition at line 201 of file BeamMonSpill.h. References fProfWidX, fProfWidY, fTargProfX, and fTargProfY. Referenced by BMSpillFiller::Spill(). 00202 { fTargProfX=x;fTargProfY=y;fProfWidX=w;fProfWidY=h; }
|
|
|
Set the status bit field.
Definition at line 180 of file BeamMonSpill.h. References fStatus. Referenced by BMSpillAna::SetSpill(), and BMSpillFiller::Spill(). 00181 { fStatus.bits = status; }
|
|
||||||||||||
|
Set the DAE and VME time stamps.
Definition at line 184 of file BeamMonSpill.h. References fDaeTime, and fVmeTime. Referenced by BMSpillFiller::Spill().
|
|
||||||||||||||||||||
|
Set the important toroids.
Definition at line 188 of file BeamMonSpill.h. References fTor101, fTortgt, fTr101d, and fTrtgtd. Referenced by BMSpillFiller::Spill().
|
|
|
|
Access the status bit field read/write.
Definition at line 168 of file BeamMonSpill.h. References fStatus. 00169 { return fStatus.bits; }
|
|
||||||||||||
|
DbiTableRow API.
Reimplemented from DbiTableRow. Definition at line 59 of file BeamMonSpill.cxx. References fBpmInt, fDaeTime, fHadInt, fMuInt1, fMuInt2, fProfWidX, fStatus, fTargBpmX, fTargBpmY, fTargProfX, fTargProfY, fTor101, fTortgt, fTr101d, fVmeTime, and VldTimeStamp::GetNanoSec(). 00060 {
00061 ors << fDaeTime << fDaeTime.GetNanoSec()
00062 << fVmeTime << fVmeTime.GetNanoSec();
00063 ors << fTor101 << fTr101d << fTortgt << fTrtgtd;
00064 ors << fHornCur;
00065 for (int ind=0; ind<6; ++ind)
00066 ors << fTargBpmX[ind] << fTargBpmY[ind] << fBpmInt[ind];
00067 ors << fTargProfX << fTargProfY << fProfWidX << fProfWidY;
00068 ors << fHadInt << fMuInt1 << fMuInt2 << fMuInt3;
00069 ors << fStatus.integer;
00070 }
|
|
|
Definition at line 148 of file BeamMonSpill.h. Referenced by BDSpillAccessor::CalibrateSpill(). |
|
|
Average per batch (relative) intensity via H/V BPMs at TGT. A zero intensity batch indicates mixed mode running. Initial data will have last element zero regardless of which batch relative to the spill start is missing. Later running may have a zero batch at a different element which would indicate just which batch was given to pbar production. Definition at line 139 of file BeamMonSpill.h. Referenced by ParticleBeamMonAna::ana(), BeamMonSpill(), BpmAtTarget(), MadTVAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), Fill(), NtpBDLiteModule::FillNtpBDLite(), NtpMaker::FillSpillInfo(), NueBeamMonModule::Reco(), SetBPM(), BMSpillAna::SetSpill(), MadQuantities::ShowerValidation(), and Store(). |
|
|
Timestamps.
Definition at line 126 of file BeamMonSpill.h. Referenced by BMSpillAna::SetSpill(), SetTimestamps(), and Store(). |
|
|
hadron/muon mon. intensities
Definition at line 146 of file BeamMonSpill.h. Referenced by MadTVAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), Fill(), ANtpInfoObjectFillerBeam::FillBeamInformation(), NtpBDLiteModule::FillNtpBDLite(), NtpMaker::FillSpillInfo(), SetHadMuInt(), BMSpillAna::SetSpill(), and Store(). |
|
|
|
hadron/muon mon. intensities
Definition at line 146 of file BeamMonSpill.h. Referenced by MadTVAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), Fill(), ANtpInfoObjectFillerBeam::FillBeamInformation(), NtpBDLiteModule::FillNtpBDLite(), NtpMaker::FillSpillInfo(), SetHadMuInt(), BMSpillAna::SetSpill(), and Store(). |
|
|
hadron/muon mon. intensities
Definition at line 146 of file BeamMonSpill.h. Referenced by MadTVAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), Fill(), ANtpInfoObjectFillerBeam::FillBeamInformation(), NtpBDLiteModule::FillNtpBDLite(), NtpMaker::FillSpillInfo(), SetHadMuInt(), BMSpillAna::SetSpill(), and Store(). |
|
|
hadron/muon mon. intensities
Definition at line 146 of file BeamMonSpill.h. Referenced by MadTVAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), ANtpInfoObjectFillerBeam::FillBeamInformation(), NtpBDLiteModule::FillNtpBDLite(), NtpMaker::FillSpillInfo(), SetHadMuInt(), and BMSpillAna::SetSpill(). |
|
|
Widths via profile monitors at TGT. No projection.
Definition at line 144 of file BeamMonSpill.h. Referenced by ParticleBeamMonAna::ana(), BeamMonAna::Analyze(), MadTVAnalysis::CreatePAN(), MadTestAnalysis::CreatePAN(), MadPIDAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadDpAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), Fill(), ANtpInfoObjectFillerBeam::FillBeamInformation(), NtpBDLiteModule::FillNtpBDLite(), NtpMaker::FillSpillInfo(), BMSpillAna::FractionOnTarget(), NueBeamMonModule::Reco(), StndBmsSpin::Scan(), BMSpillAna::SelectSpill(), SetProfile(), BMSpillAna::SetSpill(), MadQuantities::ShowerValidation(), and Store(). |
|
|
Widths via profile monitors at TGT. No projection.
Definition at line 144 of file BeamMonSpill.h. Referenced by ParticleBeamMonAna::ana(), BeamMonAna::Analyze(), MadTVAnalysis::CreatePAN(), MadTestAnalysis::CreatePAN(), MadPIDAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadDpAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), ANtpInfoObjectFillerBeam::FillBeamInformation(), NtpBDLiteModule::FillNtpBDLite(), NtpMaker::FillSpillInfo(), BMSpillAna::FractionOnTarget(), NueBeamMonModule::Reco(), StndBmsSpin::Scan(), BMSpillAna::SelectSpill(), SetProfile(), BMSpillAna::SetSpill(), and MadQuantities::ShowerValidation(). |
|
|
Status bits.
Referenced by BeamMonSpill(), BDSpillAccessor::CalibrateSpill(), Fill(), GetStatusBits(), GetStatusInt(), SetStatusBits(), SpillTime(), Status(), and Store(). |
|
|
Per batch X,Y positions projected to the target via BPMs 121 and TGT.
Definition at line 132 of file BeamMonSpill.h. Referenced by ParticleBeamMonAna::ana(), BeamMonSpill(), BpmAtTarget(), MadTVAnalysis::CreatePAN(), MadTestAnalysis::CreatePAN(), MadPIDAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadDpAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), Fill(), NtpBDLiteModule::FillNtpBDLite(), NtpMaker::FillSpillInfo(), NueBeamMonModule::Reco(), SetBPM(), BMSpillAna::SetSpill(), MadQuantities::ShowerValidation(), and Store(). |
|
|
Per batch X,Y positions projected to the target via BPMs 121 and TGT.
Definition at line 132 of file BeamMonSpill.h. Referenced by ParticleBeamMonAna::ana(), BeamMonSpill(), BpmAtTarget(), MadTVAnalysis::CreatePAN(), MadTestAnalysis::CreatePAN(), MadPIDAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadDpAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), Fill(), NtpBDLiteModule::FillNtpBDLite(), NtpMaker::FillSpillInfo(), NueBeamMonModule::Reco(), SetBPM(), BMSpillAna::SetSpill(), MadQuantities::ShowerValidation(), and Store(). |
|
|
X,Y mean beam position projected to the target using profile monitors 121 and TGT. Definition at line 142 of file BeamMonSpill.h. Referenced by ParticleBeamMonAna::ana(), BeamMonAna::Analyze(), MadTVAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), Fill(), NueBeamMonModule::Reco(), SetProfile(), and Store(). |
|
|
X,Y mean beam position projected to the target using profile monitors 121 and TGT. Definition at line 142 of file BeamMonSpill.h. Referenced by ParticleBeamMonAna::ana(), BeamMonAna::Analyze(), MadTVAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), Fill(), NueBeamMonModule::Reco(), SetProfile(), and Store(). |
|
|
|
|
Toroids (1e12 ppp).
Definition at line 128 of file BeamMonSpill.h. Referenced by ParticleBeamMonAna::ana(), BeamMonAna::Analyze(), BDLivePlot::BDLivePlot(), BDCheckDB::CheckSpill(), MadTVAnalysis::CreatePAN(), MadMKAnalysis::CreatePAN(), MadAnalysis::CreatePAN(), Fill(), NtpBDLiteModule::FillNtpBDLite(), NtpMaker::FillSpillInfo(), NueBeamMonModule::Reco(), StndBmsSpin::Scan(), STND_BMS::Scan(), BMS_STND::Scan(), BMSpillAna::SetSpill(), SetToroids(), and Store(). |
|
|
|
Timestamps.
Definition at line 126 of file BeamMonSpill.h. Referenced by BMSpillAna::SetSpill(), SetTimestamps(), and Store(). |
|
|
Definition at line 148 of file BeamMonSpill.h. |
1.3.9.1