/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 Types | Private Member Functions | Private Attributes
RawData2Tree Class Reference

#include <RawData2Tree.h>

Collaboration diagram for RawData2Tree:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Private Types

enum  RecStatus_t {
  kNone = 0, kAdSimple = 0x1, kAdMLRec = 0x2, kAdScaledRec = 0x4,
  kRpcSimple = 0x8
}

Private Member Functions

StatusCode bookNtuple ()
void processPmtCrate (const DayaBay::ReadoutHeader *roh, const DayaBay::DaqCrate *daqCrate)
void processRpcCrate (const DayaBay::ReadoutHeader *roh, const DayaBay::DaqCrate *daqCrate)
void processReadout (const DayaBay::ReadoutHeader *roh)
void processCalib (const DayaBay::CalibReadoutHeader *croh)
StatusCode processRec ()

Private Attributes

int m_printFreq
unsigned int m_execNum
bool m_checkGen
bool m_checkReadout
bool m_checkFadc
bool m_checkCalib
bool m_checkRec
bool m_skip2of4RPC
std::string m_recLocation
std::string m_rpcRecLocation
std::string m_mlRecLocation
std::string m_scaledRecLocation
std::string m_calibStatsLocation
NTuple::Tuple * m_ntuple0
NTuple::Item< int > m_eventType
NTuple::Item< int > m_nVertex
NTuple::Array< float > m_verX0
NTuple::Array< float > m_verY0
NTuple::Array< float > m_verZ0
NTuple::Item< int > m_nParticle
NTuple::Array< float > m_verPx
NTuple::Array< float > m_verPy
NTuple::Array< float > m_verPz
NTuple::Tuple * m_ntuple1
NTuple::Item< int > m_run
NTuple::Item< int > m_event
NTuple::Item< int > m_rawExecNum
NTuple::Item< int > m_site
NTuple::Item< int > m_det
NTuple::Item< int > m_trigNum
NTuple::Item< int > m_trigSecond
NTuple::Item< int > m_trigNanoSec
NTuple::Item< int > m_trigType
NTuple::Item< int > m_nHit
NTuple::Item< int > m_nChannel
NTuple::Item< int > m_nTrigger
NTuple::Array< int > m_board
NTuple::Array< int > m_channel
NTuple::Array< int > m_ring
NTuple::Array< int > m_column
NTuple::Array< int > m_wall
NTuple::Array< int > m_spot
NTuple::Array< int > m_inout
NTuple::Array< int > m_adc
NTuple::Array< int > m_tdc
NTuple::Array< int > m_cycle
NTuple::Array< int > m_preAdc
NTuple::Array< int > m_range
NTuple::Array< int > m_hitCount
NTuple::Array< int > m_multiTdc
NTuple::Array< int > m_triggerSec
NTuple::Array< int > m_triggerNano
NTuple::Array< int > m_triggerType
NTuple::Array< int > m_triggerHSum
NTuple::Array< int > m_triggerESumComp
NTuple::Array< int > m_triggerESumAdc
NTuple::Array< int > m_ltbBufferFull
NTuple::Array< int > m_feeBufferFull
NTuple::Item< int > m_nFadc
NTuple::Array< int > m_fadc [8]
NTuple::Array< int > m_fadcBoard
NTuple::Array< int > m_fadcChannel
NTuple::Tuple * m_ntuple2
NTuple::Item< int > m_calibRun
NTuple::Item< int > m_calibEvent
NTuple::Item< int > m_calibExecNum
NTuple::Item< int > m_calibSite
NTuple::Item< int > m_calibDet
NTuple::Item< int > m_calibTrigSecond
NTuple::Item< int > m_calibTrigNanoSec
NTuple::Item< int > m_calibTrigType
NTuple::Item< int > m_calibNChannel
NTuple::Item< int > m_calibNHit
NTuple::Array< int > m_calibHitCount
NTuple::Array< int > m_calibRing
NTuple::Array< int > m_calibColumn
NTuple::Array< int > m_calibWall
NTuple::Array< int > m_calibSpot
NTuple::Array< int > m_calibInout
NTuple::Array< float > m_calibCharge
NTuple::Array< float > m_calibTime
NTuple::Item< int > m_calibNTrigger
NTuple::Item< int > m_calibBlockedTrigger
NTuple::Item< int > m_calibLtbBufferFull
NTuple::Item< int > m_calibFeeBufferFull
NTuple::Tuple * m_ntuple3
NTuple::Item< int > m_recRun
NTuple::Item< int > m_recEvent
NTuple::Item< int > m_recExecNum
NTuple::Item< int > m_recSite
NTuple::Item< int > m_recDet
NTuple::Item< int > m_recTrigType
NTuple::Item< int > m_recTrigSecond
NTuple::Item< int > m_recTrigNanoSec
NTuple::Item< int > m_recStatus
NTuple::Item< float > m_recEnergy
NTuple::Item< float > m_recX
NTuple::Item< float > m_recY
NTuple::Item< float > m_recZ
NTuple::Item< float > m_recMLEnergy
NTuple::Item< float > m_recMLX
NTuple::Item< float > m_recMLY
NTuple::Item< float > m_recMLZ
NTuple::Item< float > m_recPx
NTuple::Item< float > m_recPy
NTuple::Item< float > m_recPz
NTuple::Item< float > m_recScaledEnergy
NTuple::Item< float > m_recScaledX
NTuple::Item< float > m_recScaledY
NTuple::Item< float > m_recScaledZ
NTuple::Item< int > m_recNPmt
NTuple::Item< float > m_recPERMS
NTuple::Item< float > m_recPESum
NTuple::Item< float > m_recTimeRMS
NTuple::Item< float > m_recRatioMaxQ
NTuple::Item< float > m_recEarlyChargeSum
NTuple::Item< float > m_recMiddleChargeSum
NTuple::Item< float > m_recLateChargeSum
NTuple::Item< int > m_recEffNPmt
NTuple::Item< float > m_recEffPERMS
NTuple::Item< float > m_recEffPESum
NTuple::Item< float > m_recEffTimeRMS
NTuple::Item< float > m_recEffRatioMaxQ
NTuple::Item< float > m_recEffRatioMaxQ123
NTuple::Item< float > m_recEffRatioMaxQ3x3
NTuple::Item< float > m_recMiddleTimeRMS
NTuple::Item< float > m_recMaxQ
NTuple::Item< float > m_recQuadrant
NTuple::Item< float > m_recPeakRMS
NTuple::Item< float > m_recKurtosis
NTuple::Item< float > m_recQuadrantQ1
NTuple::Item< float > m_recQuadrantQ2
NTuple::Item< float > m_recQuadrantQ3
NTuple::Item< float > m_recQuadrantQ4
NTuple::Item< float > m_recRingKurtosis
NTuple::Item< float > m_recColumnKurtosis
NTuple::Item< float > m_recMainPeakRMS
NTuple::Item< float > m_recSecondPeakRMS
NTuple::Item< float > m_rec_charge_sum_flasher_flag
NTuple::Item< float > m_rec_charge_sum_flasher_max
NTuple::Item< int > m_rec_flasher_ring
NTuple::Item< int > m_rec_flasher_column
NTuple::Item< float > m_rec_tRMS_local
NTuple::Item< float > m_rec_tRMS_local_wo_1st_hit
std::string m_cableSvcName
ICableSvcm_cableSvc
std::string m_pmtGeomSvcName
IPmtGeomInfoSvcm_pmtGeomSvc

Detailed Description

Definition at line 18 of file RawData2Tree.h.


Member Enumeration Documentation

enum RawData2Tree::RecStatus_t [private]
Enumerator:
kNone 
kAdSimple 
kAdMLRec 
kAdScaledRec 
kRpcSimple 

Definition at line 54 of file RawData2Tree.h.

                     {
      kNone = 0,
      kAdSimple = 0x1,
      kAdMLRec = 0x2,
      kAdScaledRec = 0x4,
      kRpcSimple = 0x8
    };

Constructor & Destructor Documentation

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

Constructor has to be in this form.

Definition at line 28 of file RawData2Tree.cc.

: GaudiAlgorithm(name, svcloc)
, m_cableSvc(0)
, m_pmtGeomSvc(0)
{
  declareProperty("PrintFreq", m_printFreq = -1, "print frequency for event information");
  declareProperty("CheckGen", m_checkGen = false, "check GenEvent");
  declareProperty("CheckReadout", m_checkReadout = false, "check ReadoutEvent");
  declareProperty("CheckFadc", m_checkFadc= false, "check Fadc");
  declareProperty("CheckCalib", m_checkCalib = false, "check CalibReadoutEvent");
  declareProperty("CheckRec", m_checkRec = false, "check RecEvent");
  declareProperty("Skip2of4RPC", m_skip2of4RPC = false, "Skip 2/4 RPC event in Rec tree");
  declareProperty("CableSvcName", m_cableSvcName = "CableSvc",
    "Name of service to map between detector, hardware, and electronic IDs");
  declareProperty("PmtGeomSvcName", m_pmtGeomSvcName = "PmtGeomInfoSvc",
    "Name of Pmt Geometry Information Service");
  declareProperty("RecLocation", m_recLocation = "/Event/Rec/AdSimple");
  declareProperty("RpcRecLocation", m_rpcRecLocation = "/Event/Rec/RpcSimple");
  declareProperty("MLRecLocation", m_mlRecLocation = "/Event/Rec/AdMLRec");
  declareProperty("ScaledRecLocation", m_scaledRecLocation = "/Event/Rec/AdScaled");
  declareProperty("CalibStatsLocation", m_calibStatsLocation = "/Event/Data/CalibStats");
  m_execNum = 0;
  m_ntuple0 = 0;
  m_ntuple1 = 0;
  m_ntuple2 = 0;
  m_ntuple3 = 0;
}
RawData2Tree::~RawData2Tree ( ) [virtual]

Definition at line 56 of file RawData2Tree.cc.

{
}

Member Function Documentation

StatusCode RawData2Tree::initialize ( )

Three mandatory member functions of any algorithm.

Definition at line 53 of file DataAnalyses.cc.

{
  m_log << MSG::DEBUG << "initialize()" << endreq;
  // Get Cable Service
  m_cableSvc = svc<ICableSvc>(m_cableSvcName, true);

  // Get PmtGeomInfo Service
  m_pmtGeomSvc = svc<IPmtGeomInfoSvc>(m_pmtGeomSvcName, true);

  //  Book NTuple 0
  if(m_checkGen) {
    NTuplePtr nt0(ntupleSvc(), "FILE1/Gen");
    if ( nt0 ) m_ntuple0 = nt0;
    else {
      m_ntuple0 = ntupleSvc()->book("FILE1/Gen", CLID_ColumnWiseTuple, "Gen");
      if ( m_ntuple0 )    {
        m_ntuple0->addItem ("EventType",      m_eventType);
        m_ntuple0->addItem ("VertexSize",     m_nVertex, 0, 30);
        m_ntuple0->addItem ("ver_x0",  m_nVertex, m_verX0);
        m_ntuple0->addItem ("ver_y0",  m_nVertex, m_verY0);
        m_ntuple0->addItem ("ver_z0",  m_nVertex, m_verZ0);
        m_ntuple0->addItem ("ParticleSize",   m_nParticle, 0, 30);
        m_ntuple0->addItem ("ver_px",  m_nParticle, m_verPx);
        m_ntuple0->addItem ("ver_py",  m_nParticle, m_verPy);
        m_ntuple0->addItem ("ver_pz",  m_nParticle, m_verPz);
      }
      else { // Did not manage to book the NTuple....
        error() << "Can not book NTuple:" << long(m_ntuple0) << endmsg;
        return StatusCode::FAILURE;
      }
    }
  }

  //  Book NTuple 1
  if(m_checkReadout) {
    NTuplePtr nt1(ntupleSvc(), "FILE1/Readout");
    if ( nt1 ) m_ntuple1 = nt1;
    else {
      m_ntuple1 = ntupleSvc()->book("FILE1/Readout", CLID_ColumnWiseTuple, "Readout");
      if ( m_ntuple1 )    {
        info() << "Start m_ntuple1 addItem successful!" << endmsg;
        // Trigger number serial
        m_ntuple1->addItem ("TriggerNumber",m_triggerNumber);

        // Trigger Type
        m_ntuple1->addItem ("TriggerType",  m_triggerType);

        // Trigger Time from LTB is recorded in two stage:
        // TimeSec: absolute time at 'Second' level, unit: sec
        // TimeNanoSec: relative time at sub-second level, unit: nanosec
        // Final Trigger Time calculation: (TimeSec + TimeNanoSec*1.0e-9), unit: sec
        // Above irect calculation may have precision problem
        // for 'double'-'integer' conversion.
        m_ntuple1->addItem ("TriggerTime",  m_triggerTime);
        m_ntuple1->addItem ("TriggerTimeSec",  m_triggerTimeSec);
        m_ntuple1->addItem ("TriggerTimeNanoSec",  m_triggerTimeNanoSec);
        m_ntuple1->addItem ("TrigTimeInterval",  m_trigTimeInterval);
        
        // Adc sum for all channels
        m_ntuple1->addItem ("QSum",         m_QSum);

        // Number of channels that have Tdc, Adc record
        m_ntuple1->addItem ("ChannelSize",  m_nChannel, 0, 250);
        
        // Tdc multiplicity for each channel
        m_ntuple1->addItem ("MultiTDC",     m_nChannel, m_MultiTDC);

        // Adc value for each channel
        m_ntuple1->addItem ("ADC",          m_nChannel, m_adc);

        // Adc Gain for each channel
        m_ntuple1->addItem ("ADCGain",      m_nChannel, m_adcGain);

        // Adc Range for each channel
        m_ntuple1->addItem ("ADCRange",     m_nChannel, m_adcRange);

        // The clock cycle during ADC peaking-finding
        m_ntuple1->addItem ("ADCPeakingCycle", m_nChannel, m_adcPeakingCycle);

        // Pedestal for each channel
        m_ntuple1->addItem ("Pedestal",          m_nChannel, m_pedestal);

        // The first TDC for each channel.
        // TDC is recorded as the PMT hit time relative to trigger time,
        // then the earlier PMT hit time, the larger TDC value
        m_ntuple1->addItem ("FirstTDC",    m_nChannel, m_firstTdc);

        // The second to fourth TDC for each channel if multiple TDC hits exist
        m_ntuple1->addItem ("SecondTDC",    m_nChannel, m_secondTdc);
        m_ntuple1->addItem ("ThirdTDC",    m_nChannel, m_thirdTdc);
        m_ntuple1->addItem ("FourthTDC",    m_nChannel, m_fourthTdc);
        //m_ntuple1->addItem ("TDC",        m_nChannel*Max_MultiTDC, m_firstTdc);

        // Fee Channel ID
        m_ntuple1->addItem ("ChannelID",    m_nChannel, m_channelId);

        // The slot number that this Fee board loactes
        m_ntuple1->addItem ("Slot",         m_nChannel, m_slot);

        // The corresponding channel number on this Fee board
        m_ntuple1->addItem ("Connector",    m_nChannel, m_connector);

        // PMT Sensor ID
        m_ntuple1->addItem ("SensorID",    m_nChannel, m_sensorId);

        // The corresponding ring number on this Fee board
        m_ntuple1->addItem ("Ring",    m_nChannel, m_ring);

        // The corresponding column number on this Fee board
        m_ntuple1->addItem ("Column",    m_nChannel, m_column);

        // The Tdc value and channel number for the earliest hit in this event
        m_ntuple1->addItem ("EarliestHitChn",  m_earliestHitChn);
        m_ntuple1->addItem ("EarliestHitTdc",  m_earliestHitTdc);

        // The Tdc value and channel number for the latest hit in this event
        m_ntuple1->addItem ("LatestHitChn",  m_latestHitChn);
        m_ntuple1->addItem ("LatestHitTdc",  m_latestHitTdc);
      }
      else { // Did not manage to book the NTuple....
        error() << "Can not book NTuple:" << long(m_ntuple1) << endmsg;
        return StatusCode::FAILURE;
      }
    }
  }

  //  Book NTuple 2
  if(m_checkCalibReadout) {
    NTuplePtr nt2(ntupleSvc(), "FILE1/CalibReadout");
    if ( nt2 ) m_ntuple2 = nt2;
    else {
      m_ntuple2 = ntupleSvc()->book("FILE1/CalibReadout", CLID_ColumnWiseTuple, "CalibReadout");
      if ( m_ntuple2 )    {
        m_ntuple2->addItem ("TriggerNumber",m_calibTriggerNumber);
        m_ntuple2->addItem ("EvtNumber",    m_calibEvtNumber);
        m_ntuple2->addItem ("TriggerTimeSec",  m_calibTriggerTimeSec);
        m_ntuple2->addItem ("TriggerTimeNanoSec",  m_calibTriggerTimeNanoSec);
        //m_ntuple2->addItem ("EarliesTime",  m_calibEarliestTime);
        m_ntuple2->addItem ("QSum",         m_calibQSum);
        m_ntuple2->addItem ("ChannelSize",  m_nCalibChannel, 0, 250);
        m_ntuple2->addItem ("Charge",       m_nCalibChannel, m_calibAdc);
        m_ntuple2->addItem ("Time",         m_nCalibChannel, m_calibTdc);
        m_ntuple2->addItem ("Ring",         m_nCalibChannel, m_calibRing);
        m_ntuple2->addItem ("Column",       m_nCalibChannel, m_calibColumn);
      }
      else { // Did not manage to book the NTuple....
        error() << "Can not book NTuple:" << long(m_ntuple2) << endmsg;
        return StatusCode::FAILURE;
      }
    }
  }

  //  Book NTuple 3
  if(m_checkRec) {
    NTuplePtr nt3(ntupleSvc(), "FILE1/Rec");
    if ( nt3 ) m_ntuple3 = nt3;
    else {
      m_ntuple3 = ntupleSvc()->book("FILE1/Rec", CLID_ColumnWiseTuple, "Rec");
      if ( m_ntuple3 )    {
        m_ntuple3->addItem ("RecSize",  m_nRec, 0,  30);
        m_ntuple3->addItem ("Energy",   m_nRec, m_energy);
        m_ntuple3->addItem ("RecX",     m_nRec, m_recX);
        m_ntuple3->addItem ("RecY",     m_nRec, m_recY);
        m_ntuple3->addItem ("RecZ",     m_nRec, m_recZ);
        m_ntuple3->addItem ("RecPx",    m_nRec, m_recPx);
        m_ntuple3->addItem ("RecPy",    m_nRec, m_recPy);
        m_ntuple3->addItem ("RecPz",    m_nRec, m_recPz);
      }
      else { // Did not manage to book the NTuple....
        error() << "Can not book NTuple:" << long(m_ntuple3) << endmsg;
        return StatusCode::FAILURE;
      }
    }
  }

  //  Book NTuple 4
  if(m_checkLtb) {
    NTuplePtr nt4(ntupleSvc(), "FILE1/Ltb");
    if ( nt4 ) m_ntuple4 = nt4;
    else {
      m_ntuple4 = ntupleSvc()->book("FILE1/Ltb", CLID_ColumnWiseTuple, "Ltb");
      if ( m_ntuple4 )    {
        info() << "Start m_ntuple4 addItem successful!" << endmsg;
        m_ntuple4->addItem("LtbFrameNum",           m_ltbFrameNum, 0, 20);
        m_ntuple4->addItem("LtbTimestampType",      m_ltbFrameNum, m_ltbTimestampType);
        m_ntuple4->addItem("LtbTrigTimeSec",        m_ltbFrameNum, m_ltbTrigTimeSec);
        m_ntuple4->addItem("LtbTrigTimeNanoSec",    m_ltbFrameNum, m_ltbTrigTimeNanoSec);
        m_ntuple4->addItem("LtbTrigType",           m_ltbFrameNum, m_ltbTrigType);
        m_ntuple4->addItem("LtbHSum",               m_ltbFrameNum, m_ltbHSum);
        m_ntuple4->addItem("LtbESumComp",           m_ltbFrameNum, m_ltbESumComp);
        m_ntuple4->addItem("LtbESumADC",            m_ltbFrameNum, m_ltbESumADC);
        m_ntuple4->addItem("LtbBlockedValidTrigger",m_ltbFrameNum, m_ltbBlockedValidTrigger);
      }
      else { // Did not manage to book the NTuple....
        error() << "Can not book NTuple:" << long(m_ntuple4) << endmsg;
        return StatusCode::FAILURE;
      }
    }
  }

  return StatusCode::SUCCESS;
}
StatusCode RawData2Tree::execute ( )

Definition at line 256 of file DataAnalyses.cc.

{
  m_log << MSG::DEBUG << "execute() ______________________________ start" << endreq;

  if(m_printFreq>0 && m_execNum%m_printFreq==0) cout << "---------- " << m_execNum << endl;

  map<int,int> m_sensorIdMap;

  //----------------------------------------------------------------------------------------
  //GenHeader

  if(m_checkGen) {

    GenHeader* gh = get<GenHeader>("/Event/Gen/GenHeader");

    if (gh == 0) {
      m_log << MSG::ERROR << " =======> Requested Object can not be accessable." << endreq;
      return StatusCode::FAILURE;
    }

    if (m_printFreq > 0 && m_execNum % m_printFreq == 0) {
      //m_log << MSG::INFO << "Gen Header: " << *gh << endreq;
      m_log << MSG::INFO << "execNumber: " << gh->execNumber() << endreq;
      //gh->event()->print();
      m_log << MSG::INFO << "signal_process_id= " << gh->event()->signal_process_id() << endreq;
      m_log << MSG::INFO << "vertices_size= " << gh->event()->vertices_size() << endreq;
    }

    m_eventType = gh->event()->signal_process_id();
    m_nVertex = gh->event()->vertices_size();
    m_nParticle = gh->event()->particles_size();

    unsigned int iVertex = 0;
    for(HepMC::GenEvent::vertex_const_iterator it = gh->event()->vertices_begin();
        it != gh->event()->vertices_end();
        it++ ) {
      if(m_printFreq > 0 && m_execNum % m_printFreq == 0) {
        m_log << MSG::INFO << "vertex= " << (*it)->position().x() 
              <<","<< (*it)->position().y()<<","<<(*it)->position().z()
              << endreq;
      }
      m_verX0[iVertex] = (*it)->position().x();
      m_verY0[iVertex] = (*it)->position().y();
      m_verZ0[iVertex] = (*it)->position().z();
      iVertex++;
    }

    unsigned int iParticle = 0;
    for(HepMC::GenEvent::particle_const_iterator it = gh->event()->particles_begin();
        it != gh->event()->particles_end();
        it++ ) {
      if(m_printFreq > 0 && m_execNum % m_printFreq == 0) {
        m_log << MSG::INFO << "particle momentum= " 
              << (*it)->momentum().x() <<","
              << (*it)->momentum().y() <<","
              << (*it)->momentum().z() 
              << endreq;
      }
      m_verPx[iParticle] = (*it)->momentum().x();
      m_verPy[iParticle] = (*it)->momentum().y();
      m_verPz[iParticle] = (*it)->momentum().z();
      iParticle++;
    }

    m_ntuple0->write();

  }//GenHeader

  //----------------------------------------------------------------------------------------
  //ReadoutHeader

  if(m_checkReadout) {

    ReadoutHeader* roh = get<ReadoutHeader>("/Event/Readout/ReadoutHeader");
    if (roh == 0) {
      m_log << MSG::ERROR << " =======> Requested Object can not be accessable." << endreq;
      return StatusCode::FAILURE;
    }


    Readout* readout = const_cast<Readout*>(roh->readout());
    if(!readout) return StatusCode::SUCCESS;
    ReadoutPmtCrate* crate = dynamic_cast<ReadoutPmtCrate*>(readout);
    ReadoutPmtCrate::PmtChannelReadouts channels = crate->channelReadout();

    if(m_printFreq > 0 && m_execNum % m_printFreq == 0) {
      m_log << MSG::INFO << "Readout Header: " << *roh << endreq;
      m_log << MSG::INFO << "channels=" << crate->channelReadout().size()  << endreq;
    }

    //  Context, ServiceMode for this data
    int task = 0;
    ServiceMode svcMode(roh->context(), task);

    if(m_execNum==0) m_firstTime = readout->triggerTime();

    m_triggerNumber = crate->triggerNumber();
    m_triggerTime = (readout->triggerTime()-m_firstTime).GetSeconds();
    m_triggerTimeSec = readout->triggerTime().GetSec();
    m_triggerTimeNanoSec = readout->triggerTime().GetNanoSec();
    if(m_execNum==0) {
      m_trigTimeInterval = 0.0;
    }
    else {
      m_trigTimeInterval = (m_triggerTimeSec - last_trig_timeSec)
        + 1.0e-9*( m_triggerTimeNanoSec - last_trig_timeNanoSec);
    }

    last_trig_timeSec=readout->triggerTime().GetSec();
    last_trig_timeNanoSec=readout->triggerTime().GetNanoSec();

    /* Another method to get trigger time
       currentTriggerTime = readout->triggerTime();

       if(m_execNum==0) {
       lastTriggerTime = readout->triggerTime();
       }
       trigTimeInterval = currentTriggerTime - lastTriggerTime;
       m_triggerTimeSec = currentTriggerTime.GetSec();
       m_triggerTimeNanoSec = currentTriggerTime.GetNanoSec();
       m_trigTimeInterval = trigTimeInterval.GetSeconds();

       lastTriggerTime = readout->triggerTime();
       */

    m_triggerType = crate->triggerType();

    m_QSum = 0.0;
    m_nChannel = crate->channelReadout().size();
    unsigned int ichannel = 0;
    map<long, long> firstHitTdcMap;
    vector<long> firstHitTdcVec;
    ReadoutPmtCrate::PmtChannelReadouts::iterator it;
    for (it=channels.begin(); it != channels.end(); it++) {

      const vector<int>& adc = it->second.adc();
      const vector<int>& tdc = it->second.tdc();
      const vector<int>& adcPeakingCycle = it->second.adcCycle();
      const vector<int>& adcRange = it->second.adcRange();
      int firstTdc = it->second.earliestTdc();
      DayaBay::FeeChannelId channelId = it->first;
      unsigned int size = adc.size();
      int slot = channelId.board();
      int connector = channelId.connector() - 1;
      int localChannelId = slot*16 + connector;

      DayaBay::AdPmtSensor adPmtId = m_cableSvc->adPmtSensor(channelId, svcMode);
      m_sensorIdMap[adPmtId.sensorId()] = ichannel;

      int ring = adPmtId.ring();
      int column = adPmtId.column();
      int sensorId;
      if(ring==0) { //2 inch PMT
        sensorId = 192 + column;
      } else {
        sensorId = (column-1)*8+ring;
      }
      //if(size != tdc.size()) {
      //  m_log << MSG::ERROR << "ADC and TDC vector have different size!" << endreq;
      //  return StatusCode::FAILURE;
      //}
      if(size>0) {
        m_adc[ichannel] = it->second.earliestAdc();
        m_QSum += it->second.earliestAdc();
        m_adcPeakingCycle[ichannel] = it->second.adcCycle(it->second.earliestTdcIndex());
        m_adcRange[ichannel] = it->second.adcRange(it->second.earliestTdcIndex());
        m_pedestal[ichannel] = it->second.pedestal(it->second.earliestTdcIndex());

        m_MultiTDC[ichannel] = tdc.size();
        m_channelId[ichannel] = localChannelId;
        m_slot[ichannel] = slot;
        m_connector[ichannel] = connector;
        m_sensorId[ichannel] = sensorId;
        m_ring[ichannel] = ring;
        m_column[ichannel] = column;

        m_firstTdc[ichannel] = firstTdc;
        firstHitTdcVec.push_back(firstTdc);
        firstHitTdcMap[firstTdc] = localChannelId;


        if(size==1) {
          m_secondTdc[ichannel]  = -9999;
          m_thirdTdc[ichannel]  = -9999;
          m_fourthTdc[ichannel]  = -9999;
        }
        if(size==2) {
          m_secondTdc[ichannel]  = tdc[1];
          m_thirdTdc[ichannel]  = -9999;
          m_fourthTdc[ichannel]  = -9999;
        }
        if(size==3) {
          m_secondTdc[ichannel]  = tdc[1];
          m_thirdTdc[ichannel]  = tdc[2];
          m_fourthTdc[ichannel]  = -9999;
        }
        if(size>=4) {
          m_secondTdc[ichannel]  = tdc[1];
          m_thirdTdc[ichannel]  = tdc[2];
          m_fourthTdc[ichannel]  = tdc[3];
        }

        ichannel++;
      }

      if(m_printFreq > 0 && m_execNum % m_printFreq == 0) {
        m_log << MSG::INFO << it->second << endreq;
      }
    }

    if(channels.size()>0) {
      sort(firstHitTdcVec.begin(), firstHitTdcVec.end());
      m_earliestHitTdc = firstHitTdcVec[ichannel-1];
      m_latestHitTdc = firstHitTdcVec[0];
      m_earliestHitChn = (firstHitTdcMap.find(m_earliestHitTdc))->second;
      m_latestHitChn = (firstHitTdcMap.find(m_latestHitTdc))->second;
    }

    m_ntuple1->write();

  }//ReadoutHeader


  //----------------------------------------------------------------------------------------
  //CalibReadoutHeader

  if(m_checkCalibReadout) {

    CalibReadoutHeader* croh = get<CalibReadoutHeader>("/Event/CalibReadout/CalibReadoutHeader");
    if (croh == 0) {
      m_log << MSG::ERROR << " =======> Requested Object can not be accessable." << endreq;
      return StatusCode::FAILURE;
    }
    m_calibEvtNumber = croh->execNumber();

    CalibReadout* calibReadout = const_cast<CalibReadout*>(croh->calibReadout());
    CalibReadoutPmtCrate* calibCrate = dynamic_cast<CalibReadoutPmtCrate*>(calibReadout);
    CalibReadoutPmtCrate::PmtChannelReadouts calibChannels = calibCrate->channelReadout();

    if(m_printFreq > 0 && m_execNum % m_printFreq == 0) {
      m_log << MSG::INFO << "CalibReadout Header: " << *croh << endreq;
      m_log << MSG::INFO << "calibChannels=" << calibChannels.size()  << endreq;
    }

    m_calibTriggerNumber = calibCrate->triggerNumber();
    m_calibTriggerTimeSec = calibCrate->triggerTime().GetSec();
    m_calibTriggerTimeNanoSec = calibCrate->triggerTime().GetNanoSec();

    m_nCalibChannel = calibCrate->channelReadout().size();
    unsigned int ichannel = 0;
    double qsum = 0;
    CalibReadoutPmtCrate::PmtChannelReadouts::iterator it;
    for (it=calibChannels.begin(); it != calibChannels.end(); it++) {

      if(m_checkReadout) {  //associate readout and calib readout
        ichannel = m_sensorIdMap[it->pmtSensorId().sensorId()];
      }
      //cout << "ichannel= " << ichannel << endl;

      if(it->size()>0) {
        // get ring and column
        DayaBay::AdPmtSensor adPmtSensor(it->pmtSensorId().sensorId());
        m_calibRing[ichannel] = adPmtSensor.ring();
        m_calibColumn[ichannel] = adPmtSensor.column();

        //get earliest charge and time of this PMT
        double earliestCharge = it->earliestCharge();
        double earliestTime= it->earliestTime();

        m_calibAdc[ichannel] = earliestCharge;
        m_calibTdc[ichannel] = earliestTime;

        qsum += earliestCharge;

        if(!m_checkReadout) ichannel++;
      }
      m_calibQSum = qsum;

      if(m_printFreq > 0 && m_execNum % m_printFreq == 0) {
        m_log << MSG::INFO << (*it)  << endreq;
      }
    }

    m_ntuple2->write();

  }//CalibReadoutHeader


  //----------------------------------------------------------------------------------------
  //RecHeader

  if(m_checkRec) {

    RecHeader* rh = get<RecHeader>("/Event/Rec/RecHeader");
    if (rh == 0) {
      m_log << MSG::ERROR << " =======> Requested Object can not be accessable." << endreq;
      return StatusCode::FAILURE;
    }

    RecTrigger& recTrigger = rh->recTrigger();
    m_nRec = 1;
    m_energy[0] = recTrigger.energy();
    m_recX[0] = recTrigger.position().x();
    m_recY[0] = recTrigger.position().y();
    m_recZ[0] = recTrigger.position().z();
    m_recPx[0] = recTrigger.direction().x();
    m_recPy[0] = recTrigger.direction().y();
    m_recPz[0] = recTrigger.direction().z();

    m_ntuple3->write();

  }

  //----------------------------------------------------------------------------------------
  // Ltb information
  if(m_checkLtb) {
    debug() << "Check Ltb information" << endreq;
    RawEventHeader* reh = get<RawEventHeader>(RawEventHeaderLocation::Default);
    if(reh == 0) {
      m_log << MSG::ERROR << "=======> Request Object can not be accessable." << endreq;
      return StatusCode::FAILURE;
    }

    const vector<DayaBay::RawRom*>& modules = reh->modules();
    for(unsigned int i=0; i<modules.size(); i++) {
      if(modules[i]->type()==3) { // RomLtb
        DayaBay::RawRomLtb* rawRomLtb;
        rawRomLtb = dynamic_cast<DayaBay::RawRomLtb*>(modules[i]);
        const std::vector<DayaBay::RawLtbFrame*> & ltbFrame = rawRomLtb->frames();
        m_ltbFrameNum = ltbFrame.size();
        for(size_t j=0; j<ltbFrame.size(); j++) {
          m_ltbTimestampType[j] = ltbFrame[j]->timestampType() ? 1 : 0;
          m_ltbTrigTimeSec[j] = ltbFrame[j]->timestamp().GetSec();
          m_ltbTrigTimeNanoSec[j] = ltbFrame[j]->timestamp().GetNanoSec();
          m_ltbTrigType[j] = ltbFrame[j]->triggerSrc();
          m_ltbHSum[j] = ltbFrame[j]->hsum();
          m_ltbESumComp[j] = ltbFrame[j]->esumComp();
          m_ltbESumADC[j] = ltbFrame[j]->esumADC();
          m_ltbBlockedValidTrigger[j] = ltbFrame[j]->blockedValidTrigger();
        }
        break;
      }
    }

    m_ntuple4->write();
  }

  m_execNum++;
  m_log << MSG::DEBUG << "execute() ______________________________ end" << endreq;
  return StatusCode::SUCCESS;
}
StatusCode RawData2Tree::finalize ( )

Definition at line 608 of file DataAnalyses.cc.

{
  m_log << MSG::DEBUG << "finalize()" << endreq;
  return StatusCode::SUCCESS;
}
StatusCode RawData2Tree::bookNtuple ( ) [private]

Definition at line 203 of file RawData2Tree.cc.

{
  //  Book NTuple 0
  if(m_checkGen) {
    NTuplePtr nt0(ntupleSvc(), "FILE1/Gen");
    if ( nt0 ) m_ntuple0 = nt0;
    else {
      m_ntuple0 = ntupleSvc()->book("FILE1/Gen", CLID_ColumnWiseTuple, "Gen");
      if ( m_ntuple0 )    {
        m_ntuple0->addItem ("EventType",      m_eventType);
        m_ntuple0->addItem ("VertexSize",     m_nVertex, 0, 30);
        m_ntuple0->addItem ("ver_x0",  m_nVertex, m_verX0);
        m_ntuple0->addItem ("ver_y0",  m_nVertex, m_verY0);
        m_ntuple0->addItem ("ver_z0",  m_nVertex, m_verZ0);
        m_ntuple0->addItem ("ParticleSize",   m_nParticle, 0, 30);
        m_ntuple0->addItem ("ver_px",  m_nParticle, m_verPx);
        m_ntuple0->addItem ("ver_py",  m_nParticle, m_verPy);
        m_ntuple0->addItem ("ver_pz",  m_nParticle, m_verPz);
      }
      else { // Did not manage to book the NTuple....
        error() << "Can not book NTuple:" << long(m_ntuple0) << endreq;
        return StatusCode::FAILURE;
      }
    }
  }

  //  Book NTuple 1
  if(m_checkReadout) {
    NTuplePtr nt1(ntupleSvc(), "FILE1/Readout");
    if ( nt1 ) m_ntuple1 = nt1;
    else {
      m_ntuple1 = ntupleSvc()->book("FILE1/Readout", CLID_ColumnWiseTuple, "Readout");
      if ( m_ntuple1 )    {
        debug() << "Start m_ntuple1 addItem successful!" << endreq;
        // Trigger number serial
        m_ntuple1->addItem("Run",m_run);
        m_ntuple1->addItem("Event",m_event);
        m_ntuple1->addItem("ExecNum",m_rawExecNum);
        m_ntuple1->addItem("Site",m_site);
        m_ntuple1->addItem("Det",m_det);
        m_ntuple1->addItem("TrigNum",m_trigNum);
        m_ntuple1->addItem("TrigSecond",m_trigSecond);
        m_ntuple1->addItem("TrigNanoSec",m_trigNanoSec);
        m_ntuple1->addItem("TrigType",  m_trigType);
        m_ntuple1->addItem("NChannel",m_nChannel);
        m_ntuple1->addItem("NHit",m_nHit,0,2000);
        m_ntuple1->addItem("Board",m_nHit,m_board);
        m_ntuple1->addItem("Channel",m_nHit,m_channel);
        m_ntuple1->addItem("Ring",m_nHit,m_ring);
        m_ntuple1->addItem("Column",m_nHit,m_column);
        m_ntuple1->addItem("Wall",m_nHit,m_wall);
        m_ntuple1->addItem("Spot",m_nHit,m_spot);
        m_ntuple1->addItem("Inout",m_nHit,m_inout);
        m_ntuple1->addItem("Adc",m_nHit,m_adc);
        m_ntuple1->addItem("Tdc",m_nHit,m_tdc);
        m_ntuple1->addItem("Cycle",m_nHit,m_cycle);
        m_ntuple1->addItem("PreAdc",m_nHit,m_preAdc);
        m_ntuple1->addItem("Range",m_nHit,m_range);
        m_ntuple1->addItem("HitCount",m_nHit,m_hitCount);
        m_ntuple1->addItem("MultiTdc",m_nHit,m_multiTdc);
        m_ntuple1->addItem("NTrigger",m_nTrigger,0,20);
        m_ntuple1->addItem("TriggerSec",m_nTrigger,m_triggerSec);
        m_ntuple1->addItem("TriggerNano",m_nTrigger,m_triggerNano);
        m_ntuple1->addItem("TriggerType",m_nTrigger,m_triggerType);
        m_ntuple1->addItem("TriggerHSum",m_nTrigger,m_triggerHSum);
        m_ntuple1->addItem("TriggerESumComp",m_nTrigger,m_triggerESumComp);
        m_ntuple1->addItem("TriggerESumADC",m_nTrigger,m_triggerESumAdc);
        m_ntuple1->addItem("FeeBufferFull",m_nTrigger,m_feeBufferFull);
        m_ntuple1->addItem("LtbBufferFull",m_nTrigger,m_ltbBufferFull);
        if(m_checkFadc) {
          m_ntuple1->addItem("NFadc",m_nFadc,0,8);
          m_ntuple1->addItem("FadcBoard",m_nFadc,m_fadcBoard);
          m_ntuple1->addItem("FadcChannel",m_nFadc,m_fadcChannel);
          for(unsigned int i=0; i<8; i++) {
            string fadcIndex = "Fadc";
            stringstream issFadc;
            issFadc << i;
            fadcIndex += issFadc.str();
            m_ntuple1->addItem(fadcIndex,120,m_fadc[i]);
          }
        }
      }
      else { // Did not manage to book the NTuple....
        error() << "Can not book NTuple:" << long(m_ntuple1) << endmsg;
        return StatusCode::FAILURE;
      }
    }
  }

  //  Book NTuple 2
  if(m_checkCalib) {
    NTuplePtr nt2(ntupleSvc(), "FILE1/CalibReadout");
    if ( nt2 ) m_ntuple2 = nt2;
    else {
      m_ntuple2 = ntupleSvc()->book("FILE1/CalibReadout", CLID_ColumnWiseTuple, "CalibReadout");
      if ( m_ntuple2 )    {
        m_ntuple2->addItem("Run",          m_calibRun);
        m_ntuple2->addItem("Event",        m_calibEvent);
        m_ntuple2->addItem("ExecNum",      m_calibExecNum);
        m_ntuple2->addItem("Site",         m_calibSite);
        m_ntuple2->addItem("Det",          m_calibDet);
        m_ntuple2->addItem("TrigSec",      m_calibTrigSecond);
        m_ntuple2->addItem("TrigNanoSec",  m_calibTrigNanoSec);
        m_ntuple2->addItem("TrigType",     m_calibTrigType);
        m_ntuple2->addItem("NChannel",     m_calibNChannel);
        m_ntuple2->addItem("NHit",         m_calibNHit, 0, 2000);
        m_ntuple2->addItem("HitCount",     m_calibNHit, m_calibHitCount);
        m_ntuple2->addItem("Charge",       m_calibNHit, m_calibCharge);
        m_ntuple2->addItem("Time",         m_calibNHit, m_calibTime);
        m_ntuple2->addItem("Ring",         m_calibNHit, m_calibRing);
        m_ntuple2->addItem("Column",       m_calibNHit, m_calibColumn);
        m_ntuple2->addItem("Wall",         m_calibNHit, m_calibWall);
        m_ntuple2->addItem("Spot",         m_calibNHit, m_calibSpot);
        m_ntuple2->addItem("Inout",        m_calibNHit, m_calibInout);
        m_ntuple2->addItem("NTrigger",     m_calibNTrigger);
        m_ntuple2->addItem("BlockedTrigger",m_calibBlockedTrigger);
        m_ntuple2->addItem("LtbBufferFull",m_calibLtbBufferFull);
        m_ntuple2->addItem("FeeBufferFull",m_calibFeeBufferFull);
      }
      else { // Did not manage to book the NTuple....
        error() << "Can not book NTuple:" << long(m_ntuple2) << endmsg;
        return StatusCode::FAILURE;
      }
    }
  }

  //  Book NTuple 3
  if(m_checkRec) {
    NTuplePtr nt3(ntupleSvc(), "FILE1/Rec");
    if ( nt3 ) m_ntuple3 = nt3;
    else {
      m_ntuple3 = ntupleSvc()->book("FILE1/Rec", CLID_ColumnWiseTuple, "Rec");
      if ( m_ntuple3 )    {
        m_ntuple3->addItem("Run",           m_recRun);
        m_ntuple3->addItem("Event",         m_recEvent);
        m_ntuple3->addItem("ExecNum",       m_recExecNum);
        m_ntuple3->addItem("Site",          m_recSite);
        m_ntuple3->addItem("Det",           m_recDet);
        m_ntuple3->addItem("TrigType",      m_recTrigType);
        m_ntuple3->addItem("TrigSec",       m_recTrigSecond);
        m_ntuple3->addItem("TrigNanoSec",   m_recTrigNanoSec);
        m_ntuple3->addItem("Status",        m_recStatus);
        m_ntuple3->addItem("Energy",        m_recEnergy);
        m_ntuple3->addItem("X",             m_recX);
        m_ntuple3->addItem("Y",             m_recY);
        m_ntuple3->addItem("Z",             m_recZ);
        m_ntuple3->addItem("MLEnergy",      m_recMLEnergy);
        m_ntuple3->addItem("MLX",           m_recMLX);
        m_ntuple3->addItem("MLY",           m_recMLY);
        m_ntuple3->addItem("MLZ",           m_recMLZ);
        m_ntuple3->addItem("Px",            m_recPx);
        m_ntuple3->addItem("Py",            m_recPy);
        m_ntuple3->addItem("Pz",            m_recPz);
        m_ntuple3->addItem("ScaledEnergy",  m_recScaledEnergy);
        m_ntuple3->addItem("ScaledX",       m_recScaledX);
        m_ntuple3->addItem("ScaledY",       m_recScaledY);
        m_ntuple3->addItem("ScaledZ",       m_recScaledZ);
        m_ntuple3->addItem("NPmt",          m_recNPmt);
        m_ntuple3->addItem("PERMS",         m_recPERMS);
        m_ntuple3->addItem("PESum",         m_recPESum);
        m_ntuple3->addItem("TimeRMS",       m_recTimeRMS);
        m_ntuple3->addItem("RatioMaxQ",     m_recRatioMaxQ);
        m_ntuple3->addItem("EarlyChargeSum",   m_recEarlyChargeSum);
        m_ntuple3->addItem("MiddleChargeSum",  m_recMiddleChargeSum);
        m_ntuple3->addItem("LateChargeSum",    m_recLateChargeSum);
        m_ntuple3->addItem("EffNPmt",          m_recEffNPmt);
        m_ntuple3->addItem("EffPERMS",         m_recEffPERMS);
        m_ntuple3->addItem("EffPESum",         m_recEffPESum);
        m_ntuple3->addItem("EffTimeRMS",       m_recEffTimeRMS);
        m_ntuple3->addItem("EffRatioMaxQ",     m_recEffRatioMaxQ);
        m_ntuple3->addItem("EffRatioMaxQ123",  m_recEffRatioMaxQ123);
        m_ntuple3->addItem("EffRatioMaxQ3x3",  m_recEffRatioMaxQ3x3);
        m_ntuple3->addItem("MiddleTimeRMS",  m_recMiddleTimeRMS);
        m_ntuple3->addItem("MaxQ",  m_recMaxQ);
        m_ntuple3->addItem("Quadrant",  m_recQuadrant);
        m_ntuple3->addItem("PeakRMS",  m_recPeakRMS);
        m_ntuple3->addItem("Kurtosis",  m_recKurtosis);
        m_ntuple3->addItem("QuadrantQ1",  m_recQuadrantQ1);
        m_ntuple3->addItem("QuadrantQ2",  m_recQuadrantQ2);
        m_ntuple3->addItem("QuadrantQ3",  m_recQuadrantQ3);
        m_ntuple3->addItem("QuadrantQ4",  m_recQuadrantQ4);
        m_ntuple3->addItem("RingKurtosis",  m_recRingKurtosis);
        m_ntuple3->addItem("ColumnKurtosis",  m_recColumnKurtosis);
        m_ntuple3->addItem("MainPeakRMS",  m_recMainPeakRMS);
        m_ntuple3->addItem("SecondPeakRMS",  m_recSecondPeakRMS);
        m_ntuple3->addItem("charge_sum_flasher_flag",  m_rec_charge_sum_flasher_flag);
        m_ntuple3->addItem("charge_sum_flasher_max",  m_rec_charge_sum_flasher_max);
        m_ntuple3->addItem("flasher_ring",  m_rec_flasher_ring);
        m_ntuple3->addItem("flasher_column",  m_rec_flasher_column);
        m_ntuple3->addItem("tRMS_local",  m_rec_tRMS_local);
        m_ntuple3->addItem("tRMS_local_wo_1st_hit",  m_rec_tRMS_local_wo_1st_hit);
      }
      else { // Did not manage to book the NTuple....
        error() << "Can not book NTuple:" << long(m_ntuple3) << endmsg;
        return StatusCode::FAILURE;
      }
    }
  }

  return StatusCode::SUCCESS;
}
void RawData2Tree::processPmtCrate ( const DayaBay::ReadoutHeader roh,
const DayaBay::DaqCrate daqCrate 
) [private]

Definition at line 405 of file RawData2Tree.cc.

{
  debug() << "processPmtCrate"  << endl;
  ServiceMode svcMode( roh->context(),0 );

  // Convert to PMT crate readout
  const DaqPmtCrate* pmtCrate = daqCrate->asPmtCrate();
  if(!pmtCrate){
    error() << "Can't find pmt crate for AD or Water Shield" << endreq;
  } 

  m_run = pmtCrate->runNumber();
  m_event = pmtCrate->eventNumber();
  m_rawExecNum = m_execNum;
  m_site = pmtCrate->detector().site();
  m_det = pmtCrate->detector().detectorId();
  m_trigNum = pmtCrate->localTriggerNumber();
  m_trigSecond = pmtCrate->triggerTime().GetSec();
  m_trigNanoSec = pmtCrate->triggerTime().GetNanoSec();
  m_trigType = pmtCrate->triggerType();

  const DaqPmtCrate::PmtChannelPtrList& channels
    = pmtCrate->channelReadouts();

  m_nChannel= channels.size();
  DaqPmtCrate::PmtChannelPtrList::const_iterator channelIter,
    channelEnd = channels.end();

  // Calculate number of hits in this readout
  int nHit = 0;
  for(channelIter = channels.begin(); channelIter!=channelEnd; channelIter++) {
    const DaqPmtChannel& channel = *(*channelIter);
    nHit += channel.hitCount();
  }
  m_nHit = nHit;
  debug() << "Number of channel: " << channels.size() 
    << ", Number of hit: " << nHit << endreq;

  int index = -1;
  for(channelIter = channels.begin(); channelIter!=channelEnd; channelIter++) {
    const DaqPmtChannel& channel = *(*channelIter);

    int board = channel.channelId().board(); 
    int connector = channel.channelId().connector();
    int ring = -1;
    int clmn = -1;
    int wall = -1;
    int spot = -1;
    bool inout = false;
    if( pmtCrate->detector().isAD() ) {
      AdPmtSensor pmtId = m_cableSvc->adPmtSensor( channel.channelId(), svcMode );
      ring = pmtId.ring();
      clmn = pmtId.column();
    } else if( pmtCrate->detector().isWaterShield() ) {
      PoolPmtSensor pmtId = m_cableSvc->poolPmtSensor( channel.channelId(), svcMode );
      wall = pmtId.wallNumber();
      spot = pmtId.wallSpot();
      inout = pmtId.inwardFacing();
    }
    debug() << "(board,connector) = (" << board << "," << connector << "), " 
      << "(ring,column) = (" << ring << "," << clmn << ")" << endreq;

    unsigned int hitSize = channel.hitCount();
    for(unsigned int i=0; i<hitSize; i++) {
      index++;
      m_board[index] = board;
      m_channel[index] = connector;
      m_ring[index] = ring;
      m_column[index] = clmn;
      m_wall[index] = wall;
      m_spot[index] = spot;
      m_inout[index] = inout ? 1 : 0;
      m_adc[index] = channel.adc(i);
      m_tdc[index] = channel.tdc(i);
        if(channel.tdc(i)==0) cout<<"TDC0"<<endl;
      m_cycle[index] = channel.peakCycle(i);
      m_preAdc[index] = channel.preAdcRaw(i);
      m_range[index] = channel.isHighGainAdc(i) ? 1 : 2;
      m_hitCount[index] = i;
      m_multiTdc[index] = hitSize;
      debug() << "tdc=" << m_tdc[index] << ", adc=" << m_adc[index] << endreq;
    }
  }

  const DaqLtb &ltb = pmtCrate->localTriggerBoard();
  //const LtbFramePtrList frames = ltb.frames();
  const vector<DayaBay::DaqLtbFrame*> &frames = ltb.frames();
  if(frames.size()>20) {
    warning() << "Two many trigger frames: " << frames.size() << endreq;
  }

  m_nTrigger = frames.size();
  debug() << "m_nTrigger=" << m_nTrigger << endreq;
  for(unsigned int i=0; i<frames.size(); i++) {
    m_triggerSec[i] = frames[i]->triggerTime().GetSec();
    m_triggerNano[i] = frames[i]->triggerTime().GetNanoSec();
    m_triggerType[i] = frames[i]->triggerType();
    m_triggerHSum[i] = frames[i]->hitSum();
    m_triggerESumComp[i] = frames[i]->energySum();
    m_triggerESumAdc[i] = frames[i]->energySum();
    m_feeBufferFull[i] = frames[i]->feeBufferFull() ? 1 : 0;
    m_ltbBufferFull[i] = frames[i]->ltbBufferFull() ? 1 : 0;
    debug() << "Frame " << i << ": "
      << "validClockSystem=" << frames[i]->validClockSystem()
      << ", feeBufferFull=" << frames[i]->feeBufferFull()
      << ", ltbBufferFull=" << frames[i]->ltbBufferFull()
      << ", usingUtc=" << frames[i]->usingUtc()
      << ", validGps=" << frames[i]->validGps() << endreq;
  }

  if(m_checkFadc) {
    const DaqPmtCrate::FadcChannelPtrList& fadcs = pmtCrate->fadcChannelReadouts();

    m_nFadc = fadcs.size();
    for(unsigned int iBoard=0; iBoard<fadcs.size(); iBoard++) {
      m_fadcBoard[iBoard] = fadcs[iBoard]->channelId().board();
      m_fadcChannel[iBoard] = fadcs[iBoard]->channelId().connector();
      const DaqFadcChannel::FadcSamples &samples = fadcs[iBoard]->samples();
      for(unsigned int iChn=0; iChn<samples.size(); iChn++) {
        m_fadc[iBoard][iChn] = samples[iChn];
      }
    }
  }

  m_ntuple1->write();
}
void RawData2Tree::processRpcCrate ( const DayaBay::ReadoutHeader roh,
const DayaBay::DaqCrate daqCrate 
) [private]

Definition at line 532 of file RawData2Tree.cc.

{
  debug() << "processRpcCrate"  << endl;
  ServiceMode svcMode( roh->context(),0 );

  m_run = daqCrate->runNumber();
  m_event = daqCrate->eventNumber();
  m_rawExecNum = m_execNum;
  m_site = daqCrate->detector().site();
  m_det = daqCrate->detector().detectorId();
  m_trigSecond = daqCrate->triggerTime().GetSec();
  m_trigNanoSec = daqCrate->triggerTime().GetNanoSec();
  m_ntuple1->write();
}
void RawData2Tree::processReadout ( const DayaBay::ReadoutHeader roh) [private]

Start filling the tree

Loop over channel data

Definition at line 547 of file RawData2Tree.cc.

{
  debug() << "processReadout"  << endl;
  ServiceMode svcMode( roh->context(),0 );

  m_rawExecNum = m_execNum;
  Readout* readout = const_cast<Readout*>(roh->readout());

  ReadoutPmtCrate* pmtCrate = dynamic_cast<DayaBay::ReadoutPmtCrate* > ( readout );

  Detector det = pmtCrate->detector();

  m_det = det.fullPackedData();
  m_trigNum = readout->triggerNumber();
  m_trigSecond = readout->triggerTime().GetSec();
  m_trigNanoSec= readout->triggerTime().GetNanoSec();
  m_trigType = readout->triggerType();

  const ReadoutPmtCrate::PmtChannelReadouts &channels = pmtCrate->channelReadout();
  m_nChannel = channels.size();
  ReadoutPmtCrate::PmtChannelReadouts::const_iterator ci, ci_end = channels.end();
  
  // Calculate number of hits in this readout
  int nHit = 0;
  for(ci = channels.begin(); ci!=ci_end; ci++) {
    nHit += ci->second.size();
  }
  m_nHit = nHit;
  debug() << "Number of channel: " << channels.size() 
    << ", Number of hit: " << m_nHit << endreq;

  int index = -1;
  for(ci = channels.begin(); ci!=ci_end; ci++) {

    const ReadoutPmtChannel &channel = ci->second;

    int board = channel.channelId().board(); 
    int connector = channel.channelId().connector();
    int ring = -1;
    int clmn = -1;
    int wall = -1;
    int spot = -1;
    bool inout = false;
    if( readout->detector().isAD() ) {
      AdPmtSensor pmtId = m_cableSvc->adPmtSensor( channel.channelId(), svcMode );
      ring = pmtId.ring();
      clmn = pmtId.column();
    } else if( readout->detector().isWaterShield() ) {
      PoolPmtSensor pmtId = m_cableSvc->poolPmtSensor( channel.channelId(), svcMode );
      wall = pmtId.wallNumber();
      spot = pmtId.wallSpot();
      inout = pmtId.inwardFacing();
    }
    debug() << "(board,connector) = (" << board << "," << connector << "), " 
      << "(ring,column) = (" << ring << "," << clmn << ")" << endreq;

    unsigned int hitSize = channel.size();
    for(unsigned int i = 0; i<hitSize; i++) {
      index++;
      m_board[index] = board;
      m_channel[index] = connector;
      m_ring[index] = ring;
      m_column[index] = clmn;
      m_wall[index] = wall;
      m_spot[index] = spot;
      m_inout[index] = inout ? 1 : 0;
      m_adc[index] = channel.adc(i);
      m_tdc[index] = channel.tdc(i);
      m_cycle[index] = channel.adcCycle(i);
      m_preAdc[index] = channel.pedestal(i);
      m_range[index] = channel.adcRange(i);
      m_hitCount[index] = channel.tdcHitCount(i);
      m_multiTdc[index] = hitSize;
      debug() << "index=" << index << ", tdc=" << m_tdc[index] << ", adc=" << m_adc[index] << endreq;
    }
  } // end of channels

  m_ntuple1->write();
}
void RawData2Tree::processCalib ( const DayaBay::CalibReadoutHeader croh) [private]

Definition at line 629 of file RawData2Tree.cc.

{
  debug() << "processCalibReadout"  << endl;
  m_calibExecNum = m_execNum;

  DetectorId::DetectorId_t det = DetectorId::kUnknown;
  if(exist<HeaderObject>("/Event/Readout/ReadoutHeader")) {
    ReadoutHeader* roh = get<ReadoutHeader>("/Event/Readout/ReadoutHeader");
    const DaqCrate* daqCrate = roh->daqCrate();
    m_calibRun = daqCrate->runNumber();
    m_calibEvent = daqCrate->eventNumber();
    m_calibSite = daqCrate->detector().site();
    m_calibDet = daqCrate->detector().detectorId();
    m_calibTrigSecond = daqCrate->triggerTime().GetSec();
    m_calibTrigNanoSec = daqCrate->triggerTime().GetNanoSec();
    m_calibTrigType = daqCrate->triggerType();
    det = daqCrate->detector().detectorId();

    if(daqCrate->detector().isAD() || daqCrate->detector().isWaterShield()) {
      const DaqPmtCrate* pmtCrate = daqCrate->asPmtCrate();
      const DaqLtb &ltb = pmtCrate->localTriggerBoard();
      //const LtbFramePtrList frames = ltb.frames();
      const vector<DayaBay::DaqLtbFrame*> &frames = ltb.frames();
      if(frames.size()>20) {
        warning() << "Two many trigger frames: " << frames.size() << endreq;
      }

      m_calibNTrigger = frames.size();
      debug() << "m_nTrigger=" << m_calibNTrigger << endreq;
      if(!frames.empty()) {
        m_calibBlockedTrigger = frames[0]->blockedTriggerCount();
        m_calibFeeBufferFull = frames[0]->feeBufferFull() ? 1 : 0;
        m_calibLtbBufferFull = frames[0]->ltbBufferFull() ? 1 : 0;
      }
    }
  }

  if(det != DetectorId::kRPC) {
    CalibReadout* calibReadout = const_cast<CalibReadout*>(croh->calibReadout());
    CalibReadoutPmtCrate* calibCrate = dynamic_cast<CalibReadoutPmtCrate*>(calibReadout);
    const CalibReadoutPmtCrate::PmtChannelReadouts &channels = calibCrate->channelReadout();

    m_calibNChannel = channels.size();
    m_calibTrigSecond = calibCrate->triggerTime().GetSec();
    m_calibTrigNanoSec = calibCrate->triggerTime().GetNanoSec();
    m_calibSite = calibCrate->detector().site();
    m_calibDet = calibCrate->detector().detectorId();

    // Calculate number of hits in this calib readout
    int nHit = 0;
    CalibReadoutPmtCrate::PmtChannelReadouts::const_iterator ci;
    for (ci=channels.begin(); ci!= channels.end(); ci++) {
      nHit += (*ci).size();
    }
    m_calibNHit = nHit;
    debug() << "CalibReadout Number of channel: " << channels.size() 
      << ", Number of hit: " << m_nHit << endreq;

    int index = -1;
    for(ci = channels.begin(); ci!=channels.end(); ci++) {

      const CalibReadoutPmtChannel &pmt= *ci;
      int ring = -1;
      int clmn = -1;
      int wall = -1;
      int spot = -1;
      bool inout = false;
      if( calibCrate->detector().isAD() ) {
        AdPmtSensor pmtId(pmt.pmtSensorId().fullPackedData());
        ring = pmtId.ring();
        clmn = pmtId.column();
      } else if(calibCrate->detector().isWaterShield()) {
        PoolPmtSensor pmtId(pmt.pmtSensorId().fullPackedData());
        wall = pmtId.wallNumber();
        spot = pmtId.wallSpot();
        inout = pmtId.inwardFacing();
      }

      for(unsigned int i=0; i<pmt.size(); i++) {
        index++;
        m_calibCharge[index] = pmt.charge(i);
        m_calibTime[index] = pmt.time(i);
        m_calibHitCount[index] = i;
        m_calibRing[index] = ring;
        m_calibColumn[index] = clmn;
        m_calibWall[index] = wall;
        m_calibSpot[index] = spot;
        m_calibInout[index] = inout ? 1 : 0;
        debug() << "charge=" << m_calibCharge[index]
          << ",time=" << m_calibTime[index]
          << endreq;
      }
    }
  }

  m_ntuple2->write();

}
StatusCode RawData2Tree::processRec ( ) [private]

Definition at line 730 of file RawData2Tree.cc.

{
  debug() << "processRec"  << endl;
  m_recExecNum = m_execNum;
  m_recStatus = kNone;

  if(!exist<HeaderObject>(m_recLocation)) {
    error() << "Can't find rec data in " << m_recLocation << endreq;
  }

  // Get simple reconstruction result
  RecHeader* rh = get<RecHeader>(m_recLocation);
  RecTrigger& recTrigger = rh->recTrigger();
  m_recSite = recTrigger.detector().site();
  m_recDet = recTrigger.detector().detectorId();
  m_recTrigSecond = recTrigger.triggerTime().GetSec();
  m_recTrigNanoSec = recTrigger.triggerTime().GetNanoSec();
  m_recTrigType = recTrigger.triggerType();
  m_recEnergy = recTrigger.energy();
  m_recX = recTrigger.position().x();
  m_recY = recTrigger.position().y();
  m_recZ = recTrigger.position().z();
  m_recPx = recTrigger.direction().x();
  m_recPy = recTrigger.direction().y();
  m_recPz = recTrigger.direction().z();

  // Get run and event number from ReadoutHeader
  if(exist<HeaderObject>("/Event/Readout/ReadoutHeader")) {
    ReadoutHeader* roh = get<ReadoutHeader>("/Event/Readout/ReadoutHeader");
    const DaqCrate* daqCrate = roh->daqCrate();
    m_recRun = daqCrate->runNumber();
    m_recEvent = daqCrate->eventNumber();
  }

  if(recTrigger.detector().isRPC()) {

    debug() << "RPC: " << Trigger::AsString(recTrigger.triggerType()) << endreq;
    if(m_skip2of4RPC) {
      if((recTrigger.triggerType() & Trigger::kRPC3of4) == Trigger::kNone) {
        return StatusCode::SUCCESS;
      }
    }

  } else {  //AD or Water Pool

    // Get CalibStats 
    if(exist<UserDataHeader>(m_calibStatsLocation)) {
      UserDataHeader *calibStats = get<UserDataHeader>(m_calibStatsLocation);
      m_recNPmt = calibStats->getInt("nHit");
      m_recPERMS = calibStats->getFloat("nPERMS");
      m_recPESum = calibStats->getFloat("nPESum");
      m_recTimeRMS = calibStats->getFloat("tRMS");
      m_recRatioMaxQ = m_recPESum > 0 ? calibStats->getFloat("nPEMax")/m_recPESum : 0;
      m_recEarlyChargeSum = calibStats->getFloat("EarlyCharge");
      m_recMiddleChargeSum = calibStats->getFloat("MiddleCharge");
      m_recLateChargeSum = calibStats->getFloat("LateCharge");
      // From Liangjian and Xin's definition in CalibStats
      m_recMiddleTimeRMS = calibStats->getFloat("MiddleTimeRMS");
      m_recMaxQ = calibStats->getFloat("MaxQ");
      m_recQuadrant = calibStats->getFloat("Quadrant");
      m_recPeakRMS  = calibStats->getFloat("PeakRMS");
      m_recKurtosis  = calibStats->getFloat("Kurtosis");
      m_recQuadrantQ1  = calibStats->getFloat("QuadrantQ1");
      m_recQuadrantQ2  = calibStats->getFloat("QuadrantQ2");
      m_recQuadrantQ3  = calibStats->getFloat("QuadrantQ3");
      m_recQuadrantQ4  = calibStats->getFloat("QuadrantQ4");
      m_recRingKurtosis = calibStats->getFloat("RingKurtosis");
      m_recColumnKurtosis = calibStats->getFloat("ColumnKurtosis");
      m_recMainPeakRMS = calibStats->getFloat("MainPeakRMS");
      m_recSecondPeakRMS = calibStats->getFloat("SecondPeakRMS");
      m_rec_charge_sum_flasher_flag = calibStats->getFloat("charge_sum_flasher_flag");
      m_rec_charge_sum_flasher_max = calibStats->getFloat("charge_sum_flasher_max");
      m_rec_flasher_ring = calibStats->getInt("flasher_ring");
      m_rec_flasher_column = calibStats->getInt("flasher_column");
      m_rec_tRMS_local = calibStats->getFloat("tRMS_local");
      m_rec_tRMS_local_wo_1st_hit = calibStats->getFloat("tRMS_local_wo_1st_hit");
    }


    if(recTrigger.detector().isAD()) {

      if(!exist<HeaderObject>("/Event/CalibReadout/CalibReadoutHeader")) {
        // throw AD readouts without CalibReadoutHeader
        return StatusCode::SUCCESS;
      } else {
        // Re-calculate CalibStats for AD
        CalibReadoutHeader* croh = get<CalibReadoutHeader>("/Event/CalibReadout/CalibReadoutHeader");
        CalibReadout* calibReadout = const_cast<CalibReadout*>(croh->calibReadout());
        CalibReadoutPmtCrate* calibCrate = dynamic_cast<CalibReadoutPmtCrate*>(calibReadout);

        double effTime[192];
        double effCharge[192];
        double effRing[192];
        double effCol[192];
        for(unsigned int i=0; i<192; i++) {
          effTime[i] = 0;
          effCharge[i] = 0;
          effRing[i] = 0;
          effCol[i] = 0;
        }
        int effNpmt = 0;

        const CalibReadoutPmtCrate::PmtChannelReadouts &channels = calibCrate->channelReadout();
        CalibReadoutPmtCrate::PmtChannelReadouts::const_iterator ci;
        for(ci = channels.begin(); ci!=channels.end(); ci++) {
          const CalibReadoutPmtChannel &pmt= *ci;

          for(unsigned int i=0; i<pmt.size(); i++) {
            double time = pmt.time(i);
            AdPmtSensor pmtId(pmt.pmtSensorId().fullPackedData());
            int ring = pmtId.ring();
            int clmn = pmtId.column();
            if(time < -1350 && time > -1640) {
              int id = (ring-1)*24 + clmn - 1;
              if(id < 0) continue; // 2 inch PMT
              if(effTime[id]>time) {
                effCharge[id] = pmt.charge(i);
                effTime[id] = time;
                effRing[id] = ring;
                effCol[id] = clmn;
              }
            }
          } // loop ever hits
        } // loop ever pmt

        double totCharge = 0.;
        double meanTime = 0., rmsTime = 0.;
        double meanCharge = 0., rmsCharge = 0.;
        double firstMaxQ[3] = {0., 0., 0};
        int maxPmtId = 0;
        for(int i=0; i<192; i++) {
          totCharge += effCharge[i];
          meanTime += effTime[i];
          if(effCharge[i]>firstMaxQ[0]) {
            firstMaxQ[0] = effCharge[i];
            maxPmtId = i;
          }
          else if(effCharge[i]>firstMaxQ[1]) {
            firstMaxQ[1] = effCharge[i];
          }
          else if(effCharge[i]>firstMaxQ[2]) {
            firstMaxQ[2] = effCharge[i];
          }
          if(effTime[i]<0.) effNpmt++;
        }

        if(effNpmt>0 && totCharge>0.) {
          int maxRing = maxPmtId/24 + 1;
          int maxClmn = maxPmtId%24 + 1;
          double MaxQ3x3 = effCharge[maxPmtId];
          // Up
          if(maxRing+1 <= 8) MaxQ3x3 += effCharge[(maxRing+1-1)*24 + maxClmn - 1];
          // Down
          if(maxRing-1 >= 1) MaxQ3x3 += effCharge[(maxRing-1-1)*24 + maxClmn - 1];
          // Right
          if(maxClmn == 24) {
            MaxQ3x3 += effCharge[(maxRing-1)*24 + 1 - 1];
          } else {
            MaxQ3x3 += effCharge[(maxRing-1)*24 + maxClmn+1 - 1];
          }
          // Left
          if(maxClmn == 1) {
            MaxQ3x3 += effCharge[(maxRing-1)*24 + 24 - 1];
          } else {
            MaxQ3x3 += effCharge[(maxRing-1)*24 + maxClmn-1 - 1];
          }
          // Up Right
          if(maxRing+1 <= 8) {
            if(maxClmn == 24) {
              MaxQ3x3 += effCharge[(maxRing+1-1)*24 + 1 - 1];
            } else {
              MaxQ3x3 += effCharge[(maxRing+1-1)*24 + maxClmn+1 - 1];
            }
          }
          // Up Left 
          if(maxRing+1 <= 8) {
            if(maxClmn == 1) {
              MaxQ3x3 += effCharge[(maxRing+1-1)*24 + 24 - 1];
            } else {
              MaxQ3x3 += effCharge[(maxRing+1-1)*24 + maxClmn-1 - 1];
            }
          }
          // Down Right
          if(maxRing+1 >= 1) {
            if(maxClmn == 24) {
              MaxQ3x3 += effCharge[(maxRing-1-1)*24 + 1 - 1];
            } else {
              MaxQ3x3 += effCharge[(maxRing-1-1)*24 + maxClmn+1 - 1];
            }
          }
          // Down Left 
          if(maxRing+1 >= 1) {
            if(maxClmn == 1) {
              MaxQ3x3 += effCharge[(maxRing-1-1)*24 + 24 - 1];
            } else {
              MaxQ3x3 += effCharge[(maxRing-1-1)*24 + maxClmn-1 - 1];
            }
          }

          m_recEffNPmt = effNpmt;
          m_recEffPESum = totCharge;
          m_recEffRatioMaxQ = firstMaxQ[0]/totCharge;
          m_recEffRatioMaxQ123 = (firstMaxQ[0]+firstMaxQ[1]+firstMaxQ[2])/totCharge;
          m_recEffRatioMaxQ3x3 = MaxQ3x3/totCharge;
          meanTime = meanTime/effNpmt;
          meanCharge = meanCharge/effNpmt;
          for(int i=0; i<192; i++) {
            if(effTime[i]!=0.) rmsTime += (meanTime-effTime[i])*(meanTime-effTime[i]);
            if(effCharge[i]!=0.) rmsCharge += (meanCharge-effCharge[i])*(meanCharge-effCharge[i]);
          }
          if(effNpmt>1) {
            rmsTime = sqrt(rmsTime/(effNpmt-1));
            rmsCharge = sqrt(rmsCharge/(effNpmt-1));
            m_recEffTimeRMS = rmsTime;
            m_recEffPERMS = rmsCharge;
          }
          debug() << m_recEffRatioMaxQ3x3 << "," << m_recEffTimeRMS << "," << m_recEffPERMS << endreq;
        }

      }
    }

    // Get Maximum Likelyhood reconstruction result
    if(exist<HeaderObject>(m_mlRecLocation)) {
      m_recStatus = m_recStatus & kAdMLRec;
      RecHeader* mlrh = get<RecHeader>(m_mlRecLocation);
      RecTrigger& mlRecTrigger = mlrh->recTrigger();
      m_recMLEnergy = mlRecTrigger.energy();
      m_recMLX = mlRecTrigger.position().x();
      m_recMLY = mlRecTrigger.position().y();
      m_recMLZ = mlRecTrigger.position().z();
    }

    // Get Scaled Energy reconstruction result
    if(exist<HeaderObject>(m_scaledRecLocation)) {
      m_recStatus = m_recStatus & kAdScaledRec;
      RecHeader* srh = get<RecHeader>(m_scaledRecLocation);
      RecTrigger& sRecTrigger = srh->recTrigger();
      m_recScaledEnergy = sRecTrigger.energy();
      m_recScaledX = sRecTrigger.position().x();
      m_recScaledY = sRecTrigger.position().y();
      m_recScaledZ = sRecTrigger.position().z();
    }
  } // isAD or Water Pool

  m_ntuple3->write();

  return StatusCode::SUCCESS;
}

Member Data Documentation

Definition at line 39 of file RawData2Tree.h.

unsigned int RawData2Tree::m_execNum [private]

Definition at line 40 of file RawData2Tree.h.

bool RawData2Tree::m_checkGen [private]

Definition at line 41 of file RawData2Tree.h.

Definition at line 42 of file RawData2Tree.h.

bool RawData2Tree::m_checkFadc [private]

Definition at line 43 of file RawData2Tree.h.

Definition at line 44 of file RawData2Tree.h.

bool RawData2Tree::m_checkRec [private]

Definition at line 45 of file RawData2Tree.h.

Definition at line 46 of file RawData2Tree.h.

std::string RawData2Tree::m_recLocation [private]

Definition at line 48 of file RawData2Tree.h.

std::string RawData2Tree::m_rpcRecLocation [private]

Definition at line 49 of file RawData2Tree.h.

std::string RawData2Tree::m_mlRecLocation [private]

Definition at line 50 of file RawData2Tree.h.

std::string RawData2Tree::m_scaledRecLocation [private]

Definition at line 51 of file RawData2Tree.h.

std::string RawData2Tree::m_calibStatsLocation [private]

Definition at line 52 of file RawData2Tree.h.

NTuple::Tuple* RawData2Tree::m_ntuple0 [private]

Definition at line 63 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_eventType [private]

Definition at line 64 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_nVertex [private]

Definition at line 65 of file RawData2Tree.h.

NTuple::Array<float> RawData2Tree::m_verX0 [private]

Definition at line 66 of file RawData2Tree.h.

NTuple::Array<float> RawData2Tree::m_verY0 [private]

Definition at line 67 of file RawData2Tree.h.

NTuple::Array<float> RawData2Tree::m_verZ0 [private]

Definition at line 68 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_nParticle [private]

Definition at line 69 of file RawData2Tree.h.

NTuple::Array<float> RawData2Tree::m_verPx [private]

Definition at line 70 of file RawData2Tree.h.

NTuple::Array<float> RawData2Tree::m_verPy [private]

Definition at line 71 of file RawData2Tree.h.

NTuple::Array<float> RawData2Tree::m_verPz [private]

Definition at line 72 of file RawData2Tree.h.

NTuple::Tuple* RawData2Tree::m_ntuple1 [private]

Definition at line 74 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_run [private]

Definition at line 75 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_event [private]

Definition at line 76 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_rawExecNum [private]

Definition at line 77 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_site [private]

Definition at line 78 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_det [private]

Definition at line 79 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_trigNum [private]

Definition at line 80 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_trigSecond [private]

Definition at line 81 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_trigNanoSec [private]

Definition at line 82 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_trigType [private]

Definition at line 83 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_nHit [private]

Definition at line 84 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_nChannel [private]

Definition at line 85 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_nTrigger [private]

Definition at line 86 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_board [private]

Definition at line 87 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_channel [private]

Definition at line 88 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_ring [private]

Definition at line 89 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_column [private]

Definition at line 90 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_wall [private]

Definition at line 91 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_spot [private]

Definition at line 92 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_inout [private]

Definition at line 93 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_adc [private]

Definition at line 94 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_tdc [private]

Definition at line 95 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_cycle [private]

Definition at line 96 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_preAdc [private]

Definition at line 97 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_range [private]

Definition at line 98 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_hitCount [private]

Definition at line 99 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_multiTdc [private]

Definition at line 100 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_triggerSec [private]

Definition at line 101 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_triggerNano [private]

Definition at line 102 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_triggerType [private]

Definition at line 103 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_triggerHSum [private]

Definition at line 104 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_triggerESumComp [private]

Definition at line 105 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_triggerESumAdc [private]

Definition at line 106 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_ltbBufferFull [private]

Definition at line 107 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_feeBufferFull [private]

Definition at line 108 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_nFadc [private]

Definition at line 109 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_fadc[8] [private]

Definition at line 110 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_fadcBoard [private]

Definition at line 111 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_fadcChannel [private]

Definition at line 112 of file RawData2Tree.h.

NTuple::Tuple* RawData2Tree::m_ntuple2 [private]

Definition at line 114 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibRun [private]

Definition at line 115 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibEvent [private]

Definition at line 116 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibExecNum [private]

Definition at line 117 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibSite [private]

Definition at line 118 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibDet [private]

Definition at line 119 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibTrigSecond [private]

Definition at line 120 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibTrigNanoSec [private]

Definition at line 121 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibTrigType [private]

Definition at line 122 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibNChannel [private]

Definition at line 123 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibNHit [private]

Definition at line 124 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_calibHitCount [private]

Definition at line 125 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_calibRing [private]

Definition at line 126 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_calibColumn [private]

Definition at line 127 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_calibWall [private]

Definition at line 128 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_calibSpot [private]

Definition at line 129 of file RawData2Tree.h.

NTuple::Array<int> RawData2Tree::m_calibInout [private]

Definition at line 130 of file RawData2Tree.h.

NTuple::Array<float> RawData2Tree::m_calibCharge [private]

Definition at line 130 of file RawData2Tree.h.

NTuple::Array<float> RawData2Tree::m_calibTime [private]

Definition at line 132 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibNTrigger [private]

Definition at line 133 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibBlockedTrigger [private]

Definition at line 134 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibLtbBufferFull [private]

Definition at line 135 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_calibFeeBufferFull [private]

Definition at line 136 of file RawData2Tree.h.

NTuple::Tuple* RawData2Tree::m_ntuple3 [private]

Definition at line 138 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_recRun [private]

Definition at line 139 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_recEvent [private]

Definition at line 140 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_recExecNum [private]

Definition at line 141 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_recSite [private]

Definition at line 142 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_recDet [private]

Definition at line 143 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_recTrigType [private]

Definition at line 144 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_recTrigSecond [private]

Definition at line 145 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_recTrigNanoSec [private]

Definition at line 146 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_recStatus [private]

Definition at line 147 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recEnergy [private]

Definition at line 148 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recX [private]

Definition at line 149 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recY [private]

Definition at line 150 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recZ [private]

Definition at line 151 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recMLEnergy [private]

Definition at line 152 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recMLX [private]

Definition at line 153 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recMLY [private]

Definition at line 154 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recMLZ [private]

Definition at line 155 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recPx [private]

Definition at line 156 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recPy [private]

Definition at line 157 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recPz [private]

Definition at line 158 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recScaledEnergy [private]

Definition at line 159 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recScaledX [private]

Definition at line 160 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recScaledY [private]

Definition at line 161 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recScaledZ [private]

Definition at line 162 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_recNPmt [private]

Definition at line 164 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recPERMS [private]

Definition at line 165 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recPESum [private]

Definition at line 166 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recTimeRMS [private]

Definition at line 167 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recRatioMaxQ [private]

Definition at line 168 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recEarlyChargeSum [private]

Definition at line 169 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recMiddleChargeSum [private]

Definition at line 170 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recLateChargeSum [private]

Definition at line 171 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_recEffNPmt [private]

Definition at line 173 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recEffPERMS [private]

Definition at line 174 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recEffPESum [private]

Definition at line 175 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recEffTimeRMS [private]

Definition at line 176 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recEffRatioMaxQ [private]

Definition at line 177 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recEffRatioMaxQ123 [private]

Definition at line 178 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recEffRatioMaxQ3x3 [private]

Definition at line 179 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recMiddleTimeRMS [private]

Definition at line 180 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recMaxQ [private]

Definition at line 181 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recQuadrant [private]

Definition at line 182 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recPeakRMS [private]

Definition at line 183 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recKurtosis [private]

Definition at line 184 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recQuadrantQ1 [private]

Definition at line 185 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recQuadrantQ2 [private]

Definition at line 186 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recQuadrantQ3 [private]

Definition at line 187 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recQuadrantQ4 [private]

Definition at line 188 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recRingKurtosis [private]

Definition at line 189 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recColumnKurtosis [private]

Definition at line 190 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recMainPeakRMS [private]

Definition at line 191 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_recSecondPeakRMS [private]

Definition at line 192 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_rec_charge_sum_flasher_flag [private]

Definition at line 193 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_rec_charge_sum_flasher_max [private]

Definition at line 194 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_rec_flasher_ring [private]

Definition at line 195 of file RawData2Tree.h.

NTuple::Item<int> RawData2Tree::m_rec_flasher_column [private]

Definition at line 196 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_rec_tRMS_local [private]

Definition at line 197 of file RawData2Tree.h.

NTuple::Item<float> RawData2Tree::m_rec_tRMS_local_wo_1st_hit [private]

Definition at line 198 of file RawData2Tree.h.

std::string RawData2Tree::m_cableSvcName [private]

Definition at line 202 of file RawData2Tree.h.

Definition at line 205 of file RawData2Tree.h.

std::string RawData2Tree::m_pmtGeomSvcName [private]

Definition at line 208 of file RawData2Tree.h.

Definition at line 211 of file RawData2Tree.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:06:42 for AnalysesEx by doxygen 1.7.4