TargetModule.cxx File Reference

#include "TargetModule.h"
#include "StripHist.h"
#include <JobControl/JobCModuleRegistry.h>
#include <JobControl/JobCResult.h>
#include <MessageService/MsgService.h>
#include <RawData/RawRecord.h>
#include <RawData/RawBeamMonBlock.h>
#include <RawData/RawBeamData.h>
#include <Conventions/Munits.h>
#include <BeamDataUtil/BDTarget.h>
#include <BeamDataUtil/BDSwicCalibrator.h>
#include <TGraph.h>
#include <TGaxis.h>
#include <TCanvas.h>
#include <TLatex.h>
#include <TEllipse.h>
#include <TBox.h>
#include <cmath>

Go to the source code of this file.

Defines

#define minimum(a, b)   ((a) > (b) ? (b) : (a))
#define maximum(a, b)   ((a) > (b) ? (a) : (b))

Functions

 CVSID ("$Id: TargetModule.cxx,v 1.14 2006/05/27 07:28:39 rhatcher Exp $")
 JOBMODULE (TargetModule,"MonTgt","Target quantities related for Monitoring")
static double approx_gaussian (double x, double sigma)
static double percentageOnTarget (double x, double y, double sigmax, double sigmay)
static double percentageOnBaffle (double percentage_on_target)

Define Documentation

#define maximum ( a,
 )     ((a) > (b) ? (a) : (b))

Definition at line 41 of file TargetModule.cxx.

#define minimum ( a,
 )     ((a) > (b) ? (b) : (a))

Plot Target Related Quantities for Beam Monitoring

Authors: Tom Osiecki + Brett Biren

osiecki@mail.hep.utexas.edu bv@bnl.gov

Definition at line 40 of file TargetModule.cxx.


Function Documentation

static double approx_gaussian ( double  x,
double  sigma 
) [static]

Definition at line 161 of file TargetModule.cxx.

Referenced by percentageOnTarget().

00162 {
00163     //Returns an approximate integral of a gaussian centered at (0,0) from [0, x].
00164     const double sqrt2 = sqrt(2.0);
00165     
00166     return 0.5 - 0.5 * ((sigma * sqrt2) / (3.14159 * 2.0)) * exp(-(x) / (sqrt2 * sigma));
00167 }

CVSID ( "$Id: TargetModule.  cxx,
v 1.14 2006/05/27 07:28:39 rhatcher Exp $"   
)
JOBMODULE ( TargetModule  ,
"MonTgt"  ,
"Target quantities related for Monitoring"   
)
static double percentageOnBaffle ( double  percentage_on_target  )  [static]

Definition at line 182 of file TargetModule.cxx.

Referenced by TargetModule::Fill().

00183 {
00184   if(percentage_on_target < 1.0) {
00185     return 1.0 - percentage_on_target;
00186   } else {
00187     return 0.0;
00188   }
00189 }

static double percentageOnTarget ( double  x,
double  y,
double  sigmax,
double  sigmay 
) [static]

Definition at line 169 of file TargetModule.cxx.

References approx_gaussian().

Referenced by TargetModule::Fill().

00170 {
00171   if( (pow(x+1.5,2) + pow(y-1.0,2)) < 5.5 && x > -4.7 && x < 1.7) {
00172     double answerx = approx_gaussian(1.7, sigmax) + approx_gaussian(4.7, sigmax);
00173     double miny    = sqrt(5.5-pow(x+1.5,2))+1.0;
00174     double maxy    = sqrt(5.5-pow(x+1.5,2))+1.0;
00175     double answery = approx_gaussian(miny, sigmay) + approx_gaussian(maxy, sigmay);
00176     return answerx * answery;
00177   } else {
00178     return 0.0;
00179   }
00180 }


Generated on 8 Jul 2019 for loon by  doxygen 1.6.1