BeamSummaryAna Class Reference

#include <BeamSummaryAna.h>

List of all members.

Public Member Functions

 BeamSummaryAna ()
void SetDefaults ()
 Set the default cut values.
void SetMinIntensCut (Double_t cutval)
 Set individual cuts.
void SetMaxIntensCut (Double_t cutval)
void SetMinHorPosTgtCut (Double_t cutval)
void SetMaxHorPosTgtCut (Double_t cutval)
void SetMinVerPosTgtCut (Double_t cutval)
void SetMaxVerPosTgtCut (Double_t cutval)
void SetMinHorWidthCut (Double_t cutval)
void SetMaxHorWidthCut (Double_t cutval)
void SetMinVerWidthCut (Double_t cutval)
void SetMaxVerWidthCut (Double_t cutval)
void SetMinHornCurCut (Double_t cutval)
void SetMaxHornCurCut (Double_t cutval)
void SetMinTargetPosCut (Double_t cutval)
void SetMaxTargetPosCut (Double_t cutval)
void SelectTargetPosition (const char *topt)
void PrintCuts ()
 Print out the current cuts.
Bool_t SimpleBeamCut (const BeamSummary &bsum)
 Simple cut on some beam quantities.

Private Attributes

Double_t fIntensMin
Double_t fIntensMax
Double_t fHorPosTgtMin
Double_t fHorPosTgtMax
Double_t fVerPosTgtMin
Double_t fVerPosTgtMax
Double_t fHorWidthMin
Double_t fHorWidthMax
Double_t fVerWidthMin
Double_t fVerWidthMax
Double_t fHornCurMax
Double_t fHornCurMin
Double_t fTargetPosMax
Double_t fTargetPosMin

Detailed Description

Id
BeamSummaryAna.h,v 1.2 2005/03/31 20:09:48 mdier Exp

Definition at line 24 of file BeamSummaryAna.h.


Constructor & Destructor Documentation

BeamSummaryAna::BeamSummaryAna (  ) 

Definition at line 11 of file BeamSummaryAna.cxx.

References SetDefaults().

00012 {
00013     SetDefaults();
00014 }


Member Function Documentation

void BeamSummaryAna::PrintCuts (  ) 

Print out the current cuts.

Definition at line 108 of file BeamSummaryAna.cxx.

References fHornCurMax, fHornCurMin, fHorPosTgtMax, fHorPosTgtMin, fHorWidthMax, fHorWidthMin, fIntensMax, fIntensMin, fTargetPosMax, fTargetPosMin, fVerPosTgtMax, fVerPosTgtMin, fVerWidthMax, and fVerWidthMin.

00109 {
00110    cout << "The cut values for beam spills are:" << endl;
00111    cout << "  " << fIntensMin << "E12 PoT < beam intensity < "
00112         << fIntensMax << "E12 PoT" << endl;
00113    cout << "  " << fHorPosTgtMin << "mm < horizontal position at target < "
00114         << fHorPosTgtMax << "mm " << endl;
00115    cout << "  " << fVerPosTgtMin << "mm < vertical position at target < "
00116         << fVerPosTgtMax << "mm " << endl; 
00117    cout << "     (note: target not at (0,0) in this coord system)" << endl; 
00118    cout << "  " << fHorWidthMin << "mm < horizontal width at target < "
00119         << fHorWidthMax << "mm " << endl;
00120    cout << "  " << fVerWidthMin << "mm < vertical width at target < "
00121         << fVerWidthMax << "mm " << endl;
00122    cout << "  " << fHornCurMin << "kA < absolute horn peak current < "
00123         << fHornCurMax << "kA " << endl;   
00124    cout << "  " << fTargetPosMin << "mils < target position < "
00125         << fTargetPosMax << "mils " << endl; 
00126 }

void BeamSummaryAna::SelectTargetPosition ( const char *  topt  ) 

Choose a certain target position, the options are: topt = 'all' : all target positions, in and out 'out' : target out 'in' : target in (all positions) 'le' : low energy positions 'pme' : pseudo medium energy position 'phe' : pseudo high energy position

Definition at line 76 of file BeamSummaryAna.cxx.

References Msg::kWarning, MSG, SetMaxTargetPosCut(), and SetMinTargetPosCut().

Referenced by SetDefaults().

00076                                                          {
00077     string tchoice = topt;
00078     
00079     if (tchoice == "all") {
00080         SetMinTargetPosCut(-1e5);
00081         SetMaxTargetPosCut(1e6);
00082     } else if (tchoice == "out") {
00083         SetMinTargetPosCut(-1e5);
00084         SetMaxTargetPosCut(0.0);
00085     } else if (tchoice == "in") {
00086         SetMinTargetPosCut(0.0);
00087         SetMaxTargetPosCut(1e6);
00088     } else if (tchoice == "le") {
00089         SetMinTargetPosCut(0.0);
00090         SetMaxTargetPosCut(1000);
00091     } else if (tchoice == "ple") {
00092         SetMinTargetPosCut(3500);
00093         SetMaxTargetPosCut(4500);
00094     } else if (tchoice == "pme") {
00095         SetMinTargetPosCut(20000);
00096         SetMaxTargetPosCut(60000);
00097     } else if (tchoice == "phe") {
00098         SetMinTargetPosCut(60000);
00099         SetMaxTargetPosCut(1e6);
00100     } else {
00101         MSG("BeamSummaryAna",Msg::kWarning) << "Wrong option for SelectTargetPosition. "
00102                                             << "Will use default: target in" << endl;
00103         SetMinTargetPosCut(0.0);
00104         SetMaxTargetPosCut(1e6);
00105     }    
00106 }

void BeamSummaryAna::SetDefaults (  ) 
void BeamSummaryAna::SetMaxHornCurCut ( Double_t  cutval  ) 

Definition at line 66 of file BeamSummaryAna.cxx.

References fHornCurMax.

Referenced by SetDefaults().

00066                                                     {
00067     fHornCurMax = cutval;
00068 }

void BeamSummaryAna::SetMaxHorPosTgtCut ( Double_t  cutval  ) 

Definition at line 42 of file BeamSummaryAna.cxx.

References fHorPosTgtMax.

Referenced by SetDefaults().

00042                                                       {
00043     fHorPosTgtMax = cutval;
00044 }

void BeamSummaryAna::SetMaxHorWidthCut ( Double_t  cutval  ) 

Definition at line 54 of file BeamSummaryAna.cxx.

References fHorWidthMax.

Referenced by SetDefaults().

00054                                                      {
00055     fHorWidthMax = cutval;
00056 }

void BeamSummaryAna::SetMaxIntensCut ( Double_t  cutval  ) 

Definition at line 36 of file BeamSummaryAna.cxx.

References fIntensMax.

Referenced by SetDefaults().

00036                                                    {
00037     fIntensMax = cutval;
00038 }

void BeamSummaryAna::SetMaxTargetPosCut ( Double_t  cutval  ) 

Definition at line 72 of file BeamSummaryAna.cxx.

References fTargetPosMax.

Referenced by SelectTargetPosition().

00072                                                       {
00073     fTargetPosMax = cutval;
00074 }

void BeamSummaryAna::SetMaxVerPosTgtCut ( Double_t  cutval  ) 

Definition at line 48 of file BeamSummaryAna.cxx.

References fVerPosTgtMax.

Referenced by SetDefaults().

00048                                                       {
00049     fVerPosTgtMax = cutval;
00050 }

void BeamSummaryAna::SetMaxVerWidthCut ( Double_t  cutval  ) 

Definition at line 60 of file BeamSummaryAna.cxx.

References fVerWidthMax.

Referenced by SetDefaults().

00060                                                      {
00061     fVerWidthMax = cutval;
00062 }

void BeamSummaryAna::SetMinHornCurCut ( Double_t  cutval  ) 

Definition at line 63 of file BeamSummaryAna.cxx.

References fHornCurMin.

Referenced by SetDefaults().

00063                                                     {
00064     fHornCurMin = cutval;
00065 }

void BeamSummaryAna::SetMinHorPosTgtCut ( Double_t  cutval  ) 

Definition at line 39 of file BeamSummaryAna.cxx.

References fHorPosTgtMin.

Referenced by SetDefaults().

00039                                                       {
00040     fHorPosTgtMin = cutval;
00041 }

void BeamSummaryAna::SetMinHorWidthCut ( Double_t  cutval  ) 

Definition at line 51 of file BeamSummaryAna.cxx.

References fHorWidthMin.

Referenced by SetDefaults().

00051                                                      {
00052     fHorWidthMin = cutval;
00053 }

void BeamSummaryAna::SetMinIntensCut ( Double_t  cutval  ) 

Set individual cuts.

Definition at line 33 of file BeamSummaryAna.cxx.

References fIntensMin.

Referenced by SetDefaults().

00033                                                    {
00034     fIntensMin = cutval;
00035 }

void BeamSummaryAna::SetMinTargetPosCut ( Double_t  cutval  ) 

Definition at line 69 of file BeamSummaryAna.cxx.

References fTargetPosMin.

Referenced by SelectTargetPosition().

00069                                                       {
00070     fTargetPosMin = cutval;
00071 }

void BeamSummaryAna::SetMinVerPosTgtCut ( Double_t  cutval  ) 

Definition at line 45 of file BeamSummaryAna.cxx.

References fVerPosTgtMin.

Referenced by SetDefaults().

00045                                                       {
00046     fVerPosTgtMin = cutval;
00047 }

void BeamSummaryAna::SetMinVerWidthCut ( Double_t  cutval  ) 

Definition at line 57 of file BeamSummaryAna.cxx.

References fVerWidthMin.

Referenced by SetDefaults().

00057                                                      {
00058     fVerWidthMin = cutval;
00059 }

Bool_t BeamSummaryAna::SimpleBeamCut ( const BeamSummary bsum  ) 

Simple cut on some beam quantities.

Definition at line 129 of file BeamSummaryAna.cxx.

References BeamSummary::beamIntensity, fHornCurMax, fHornCurMin, fHorPosTgtMax, fHorPosTgtMin, fHorWidthMax, fHorWidthMin, fIntensMax, fIntensMin, fTargetPosMax, fTargetPosMin, fVerPosTgtMax, fVerPosTgtMin, fVerWidthMax, fVerWidthMin, BeamSummary::hBeamWidth, BeamSummary::hornPeakCurrent, BeamSummary::hPosatTargetBPM, BeamSummary::nuTarZ, BeamSummary::vBeamWidth, and BeamSummary::vPosatTargetBPM.

00130 {
00131     // Select spills with beam
00132     if (bsum.beamIntensity<fIntensMin ||
00133         bsum.beamIntensity>fIntensMax) return false;
00134     // Horizontal position
00135     if (bsum.hPosatTargetBPM<fHorPosTgtMin ||
00136         bsum.hPosatTargetBPM>fHorPosTgtMax) return false;
00137     // Vertical position 
00138     if (bsum.vPosatTargetBPM<fVerPosTgtMin ||
00139         bsum.vPosatTargetBPM>fVerPosTgtMax) return false;
00140     // Horizontal Beam width 
00141     if (bsum.hBeamWidth<fHorWidthMin ||
00142         bsum.hBeamWidth>fHorWidthMax) return false;
00143     // Vertical Beam width 
00144     if (bsum.vBeamWidth<fVerWidthMin ||
00145         bsum.vBeamWidth>fVerWidthMax) return false;
00146     // Horn current 
00147     Double_t hcur = bsum.hornPeakCurrent ;
00148     if ( fabs(hcur) < fHornCurMin ||
00149         fabs(hcur) > fHornCurMax) return false;
00150     // Target in
00151     if (bsum.nuTarZ<fTargetPosMin ||
00152         bsum.nuTarZ>fTargetPosMax) return false;
00153     
00154     return true;
00155 }


Member Data Documentation

Double_t BeamSummaryAna::fHornCurMax [private]

Definition at line 76 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMaxHornCurCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fHornCurMin [private]

Definition at line 77 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMinHornCurCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fHorPosTgtMax [private]

Definition at line 69 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMaxHorPosTgtCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fHorPosTgtMin [private]

Definition at line 68 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMinHorPosTgtCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fHorWidthMax [private]

Definition at line 73 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMaxHorWidthCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fHorWidthMin [private]

Definition at line 72 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMinHorWidthCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fIntensMax [private]

Definition at line 67 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMaxIntensCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fIntensMin [private]

Definition at line 66 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMinIntensCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fTargetPosMax [private]

Definition at line 78 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMaxTargetPosCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fTargetPosMin [private]

Definition at line 79 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMinTargetPosCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fVerPosTgtMax [private]

Definition at line 71 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMaxVerPosTgtCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fVerPosTgtMin [private]

Definition at line 70 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMinVerPosTgtCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fVerWidthMax [private]

Definition at line 75 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMaxVerWidthCut(), and SimpleBeamCut().

Double_t BeamSummaryAna::fVerWidthMin [private]

Definition at line 74 of file BeamSummaryAna.h.

Referenced by PrintCuts(), SetMinVerWidthCut(), and SimpleBeamCut().


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1