/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Private Member Functions | Private Attributes
CalibDataHistogram Class Reference

#include <CalibDataHistogram.h>

Collaboration diagram for CalibDataHistogram:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CalibDataHistogram (const std::string &name, ISvcLocator *svcloc)
 Constructor has to be in this form.
virtual ~CalibDataHistogram ()
StatusCode initialize ()
 Three mandatory member functions of any algorithm.
StatusCode execute ()
StatusCode finalize ()

Private Member Functions

XYPos getPmtHistXY (DayaBay::PoolPmtSensor sensorId)

Private Attributes

int m_printFreq
double m_maxTotalCharge
double m_minCharge
double m_maxCharge
double m_minTime
double m_maxTime
IPmtGeomInfoSvcm_pmtGeomSvc
IStatisticsSvc * m_statsSvc
TH1F * h_pool_charge [POOLIO][POOLPMTIO][POOLWALLPLUS][POOLWALLPMT]
TH1F * h_pool_time [POOLIO][POOLPMTIO][POOLWALLPLUS][POOLWALLPMT]
TH1F * h_sum_pool_FEEQSUM [POOLIO]
TH2F * h_sum_pool_Charge_PMT [POOLIO]
TH1F * h_sum_pool_RMS_Charge_PMT [POOLIO]
TH2F * h_sum_pool_Time_PMT [POOLIO]
TH1F * h_sum_pool_RMS_Time_PMT [POOLIO]
TH2F * h_sum_pool_Charge_Ratio [POOLIO]
TH2F * h_sum_pool_MaxCharge_Patton [POOLIO]
TH1F * h_charge [DETNUMPLUS][RINGPLUS][COLUMNPLUS]
TH1F * h_time [DETNUMPLUS][RINGPLUS][COLUMNPLUS]
TH1F * h_sum_FEEQSUM [DETNUMPLUS]
TH2F * h_sum_Charge_PMT [DETNUMPLUS]
TH1F * h_sum_RMS_Charge_PMT [DETNUMPLUS]
TH2F * h_sum_Time_PMT [DETNUMPLUS]
TH1F * h_sum_RMS_Time_PMT [DETNUMPLUS]
TH2F * h_sum_Charge_Ratio [DETNUMPLUS]
TH2F * h_sum_MaxCharge_Patton [DETNUMPLUS]

Detailed Description

Definition at line 47 of file CalibDataHistogram.h.


Constructor & Destructor Documentation

CalibDataHistogram::CalibDataHistogram ( const std::string &  name,
ISvcLocator *  svcloc 
)

Constructor has to be in this form.

Definition at line 54 of file CalibDataHistogram.cc.

  : GaudiAlgorithm(name, svcloc),m_pmtGeomSvc(0),m_statsSvc(0)
{
  declareProperty("PrintFreq",        m_printFreq=0);
  declareProperty("MaxTotalCharge",   m_maxTotalCharge=10000.);
  declareProperty("MinChannelCharge", m_minCharge=0.);
  declareProperty("MaxChannelCharge", m_maxCharge=3000.);
  declareProperty("MinChannelTime",   m_minTime=-2000.);
  declareProperty("MaxChannelTime",   m_maxTime=-500.);

// ******************************* 
// ******************************* for Pool_PMT
  for(int i=0;i!=POOLIO;i++)
    for(int j=0;j!=POOLPMTIO;j++)
      for(int m=0;m!=POOLWALLPLUS;m++)
        for(int n=0;n!=POOLWALLPMT;n++)
          {
            h_pool_charge[i][j][m][n] = NULL;
            h_pool_time[i][j][m][n]   = NULL;
          }
  
  for(int i=0;i!=POOLIO;i++)
    {
      h_sum_pool_FEEQSUM[i]         = NULL;
      h_sum_pool_Charge_PMT[i]      = NULL;
      h_sum_pool_RMS_Charge_PMT[i]  = NULL;
      h_sum_pool_Time_PMT[i]        = NULL;
      h_sum_pool_RMS_Time_PMT[i]    = NULL;
      h_sum_pool_Charge_Ratio[i]    = NULL;
      h_sum_pool_MaxCharge_Patton[i]= NULL;
    }
  
// ******************************* for AD_PMT
  for(int i=0;i!=DETNUMPLUS;i++)
    for(int j=0;j!=RINGPLUS;j++)
      for(int k=0;k!=COLUMNPLUS;k++)
        {
          h_charge[i][j][k] = NULL;
          h_time[i][j][k]   = NULL;
        }
  
  for(int i=0;i!=DETNUMPLUS;i++)
    {
      h_sum_FEEQSUM[i]         = NULL;
      h_sum_Charge_PMT[i]      = NULL;
      h_sum_RMS_Charge_PMT[i]  = NULL;
      h_sum_Time_PMT[i]        = NULL;
      h_sum_RMS_Time_PMT[i]    = NULL;
      h_sum_Charge_Ratio[i]    = NULL;
      h_sum_MaxCharge_Patton[i]= NULL;
    }
  
}
CalibDataHistogram::~CalibDataHistogram ( ) [virtual]

Definition at line 108 of file CalibDataHistogram.cc.

{
}

Member Function Documentation

StatusCode CalibDataHistogram::initialize ( )

Three mandatory member functions of any algorithm.

StatusCode CalibDataHistogram::execute ( )
StatusCode CalibDataHistogram::finalize ( )
XYPos CalibDataHistogram::getPmtHistXY ( DayaBay::PoolPmtSensor  sensorId) [private]

Definition at line 468 of file CalibDataHistogram.cc.

{
  XYPos pmtHistXY;
  pmtHistXY.x = 0.;
  pmtHistXY.y = 0.;

  int wallNumber = sensorId.wallNumber();

  IPmtGeomInfo* pmtGeom = m_pmtGeomSvc->get(sensorId.fullPackedData());
  if(!pmtGeom)
    {
      error() << "Failed to find geometry info for pmt " << sensorId << endreq;
      // Put outside histogram range
      pmtHistXY.x=-30*Gaudi::Units::meter;
      pmtHistXY.y=-30*Gaudi::Units::meter;
      return pmtHistXY;
    }

  const CLHEP::Hep3Vector& pmtPos = pmtGeom->localPosition();
  double pmtPoolX = pmtPos.x();
  double pmtPoolY = pmtPos.y();
  double pmtPoolZ = pmtPos.z();

  pmtHistXY.x = pmtPoolX;
  pmtHistXY.y = pmtPoolY;

  double sqrt2 = sqrt(2.);

  double pmtPoolZ_floor = pmtPoolZ + 5*Gaudi::Units::meter;
  if(wallNumber==1){
    pmtHistXY.x += pmtPoolZ_floor;
  }else if(wallNumber==2){
    pmtHistXY.x += pmtPoolZ_floor/sqrt2;
    pmtHistXY.y += pmtPoolZ_floor/sqrt2;
  }else if(wallNumber==3){
    pmtHistXY.y += pmtPoolZ_floor;
  }else if(wallNumber==4){
    pmtHistXY.x -= pmtPoolZ_floor/sqrt2;
    pmtHistXY.y += pmtPoolZ_floor/sqrt2;
  }else if(wallNumber==5){
    pmtHistXY.x -= pmtPoolZ_floor;
  }else if(wallNumber==6){
    pmtHistXY.x -= pmtPoolZ_floor/sqrt2;
    pmtHistXY.y -= pmtPoolZ_floor/sqrt2;
  }else if(wallNumber==7){
    pmtHistXY.y -= pmtPoolZ_floor;
  }else if(wallNumber==8){
    pmtHistXY.x += pmtPoolZ_floor/sqrt2;
    pmtHistXY.y -= pmtPoolZ_floor/sqrt2;
  }

  // Set units
  pmtHistXY.x /= Gaudi::Units::meter; 
  pmtHistXY.y /= Gaudi::Units::meter; 

  return pmtHistXY;
}

Member Data Documentation

Definition at line 62 of file CalibDataHistogram.h.

Definition at line 63 of file CalibDataHistogram.h.

Definition at line 64 of file CalibDataHistogram.h.

Definition at line 65 of file CalibDataHistogram.h.

Definition at line 66 of file CalibDataHistogram.h.

Definition at line 67 of file CalibDataHistogram.h.

Definition at line 69 of file CalibDataHistogram.h.

IStatisticsSvc* CalibDataHistogram::m_statsSvc [private]

Definition at line 70 of file CalibDataHistogram.h.

TH1F* CalibDataHistogram::h_pool_charge[POOLIO][POOLPMTIO][POOLWALLPLUS][POOLWALLPMT] [private]

Definition at line 73 of file CalibDataHistogram.h.

TH1F* CalibDataHistogram::h_pool_time[POOLIO][POOLPMTIO][POOLWALLPLUS][POOLWALLPMT] [private]

Definition at line 74 of file CalibDataHistogram.h.

TH1F* CalibDataHistogram::h_sum_pool_FEEQSUM[POOLIO] [private]

Definition at line 76 of file CalibDataHistogram.h.

Definition at line 77 of file CalibDataHistogram.h.

Definition at line 78 of file CalibDataHistogram.h.

TH2F* CalibDataHistogram::h_sum_pool_Time_PMT[POOLIO] [private]

Definition at line 79 of file CalibDataHistogram.h.

Definition at line 80 of file CalibDataHistogram.h.

Definition at line 81 of file CalibDataHistogram.h.

Definition at line 82 of file CalibDataHistogram.h.

TH1F* CalibDataHistogram::h_charge[DETNUMPLUS][RINGPLUS][COLUMNPLUS] [private]

Definition at line 85 of file CalibDataHistogram.h.

TH1F* CalibDataHistogram::h_time[DETNUMPLUS][RINGPLUS][COLUMNPLUS] [private]

Definition at line 86 of file CalibDataHistogram.h.

TH1F* CalibDataHistogram::h_sum_FEEQSUM[DETNUMPLUS] [private]

Definition at line 88 of file CalibDataHistogram.h.

TH2F* CalibDataHistogram::h_sum_Charge_PMT[DETNUMPLUS] [private]

Definition at line 89 of file CalibDataHistogram.h.

TH1F* CalibDataHistogram::h_sum_RMS_Charge_PMT[DETNUMPLUS] [private]

Definition at line 90 of file CalibDataHistogram.h.

TH2F* CalibDataHistogram::h_sum_Time_PMT[DETNUMPLUS] [private]

Definition at line 91 of file CalibDataHistogram.h.

TH1F* CalibDataHistogram::h_sum_RMS_Time_PMT[DETNUMPLUS] [private]

Definition at line 92 of file CalibDataHistogram.h.

TH2F* CalibDataHistogram::h_sum_Charge_Ratio[DETNUMPLUS] [private]

Definition at line 93 of file CalibDataHistogram.h.

TH2F* CalibDataHistogram::h_sum_MaxCharge_Patton[DETNUMPLUS] [private]

Definition at line 94 of file CalibDataHistogram.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:02:12 for DQMRawData by doxygen 1.7.4