NtpTimingNtuple Class Reference

#include <NtpTimingNtuple.h>

List of all members.

Public Member Functions

 NtpTimingNtuple ()
virtual ~NtpTimingNtuple ()
void Fill (NtpStRecord *ntpRecord, Int_t ievent)
void CloseFile ()
void Reset ()
void SetFileName (const char *filename)
void Run (Int_t numRecords=-1)
void WriteHits (Bool_t yesno=1)

Private Member Functions

void WriteToFile ()

Private Attributes

TFile * fNtpFile
TTree * fNtpTree
Int_t fIndex
Int_t fRun
Int_t fSnarl
Int_t fEvent
Int_t fUnixTime
Int_t fTimeStampSec
Int_t fTimeStampNanoSec
Int_t fTimeFrame
Int_t fErrorCode
Int_t fTriggerSource
Int_t fRemoteSpillType
Int_t fNumActiveCrates
Double_t fTrigTime
Double_t fGateTime
Int_t fMinPlane
Int_t fMaxPlane
Double_t fMinZpos
Double_t fMinTime
Double_t fLength
Double_t fSeedTime
Int_t fPassFail
Int_t fTrackStripEnds
Double_t fInvBeta
Double_t fOffsetTime
Double_t fVtxTime
Double_t fVtxInvBeta
Double_t fVtxTimeErr
Double_t fVtxTimeRms
Double_t fVtxTimeChi2
Int_t sgate_10mhz
Int_t sgate_53mhz
Int_t rollover_53mhz
Int_t rollover_last_53mhz
Int_t crate_t0_ns
Int_t timeframe_check
Int_t fTrackPlanes
Double_t fTrkVtxTime
Double_t fTrkInvBeta
Double_t fTrkChi2
Double_t fTrkVtxX
Double_t fTrkVtxY
Double_t fTrkVtxZ
Double_t fTrkVtxDirX
Double_t fTrkVtxDirY
Double_t fTrkVtxDirZ
Double_t fTrkEndX
Double_t fTrkEndY
Double_t fTrkEndZ
Double_t fTrkEndDirX
Double_t fTrkEndDirY
Double_t fTrkEndDirZ
Int_t fPlane
Int_t fStrip
Int_t fEnd
Int_t fNdigits
Double_t fS
Double_t fT
Double_t fQ
Double_t fW
Double_t fDelta
Double_t fWindow
Int_t fFoundADIntersect
Double_t fADIntersectX
Double_t fADIntersectY
Double_t fADIntersectZ
Bool_t fWriteHits
TString fNtpFileName

Detailed Description

Definition at line 13 of file NtpTimingNtuple.h.


Constructor & Destructor Documentation

NtpTimingNtuple::NtpTimingNtuple (  ) 

Definition at line 19 of file NtpTimingNtuple.cxx.

00019                                  :
00020   fNtpFile(0),
00021   fNtpTree(0),
00022   fWriteHits(0),
00023   fNtpFileName("ntuple.root")
00024 {
00025   fWriteHits = 0;
00026 }

NtpTimingNtuple::~NtpTimingNtuple (  )  [virtual]

Definition at line 28 of file NtpTimingNtuple.cxx.

00029 {
00030   
00031 }


Member Function Documentation

void NtpTimingNtuple::CloseFile (  ) 

Definition at line 373 of file NtpTimingNtuple.cxx.

References fNtpFile, fNtpFileName, and fNtpTree.

Referenced by Run().

00374 {
00375   if( fNtpFile ){
00376     TDirectory* tmpd = gDirectory;
00377     std::cout << " *** NtpTimingNtuple::CloseFile() *** " << std::endl;
00378     std::cout << "  closing file: " << fNtpFileName.Data() << std::endl;
00379     fNtpFile->cd();
00380     fNtpTree->Write();
00381     fNtpFile->Close();
00382     gDirectory = tmpd;
00383   }
00384 
00385   return;
00386 }

void NtpTimingNtuple::Fill ( NtpStRecord ntpRecord,
Int_t  ievent 
)

Definition at line 76 of file NtpTimingNtuple.cxx.

References NtpTimingFit::AddEvent(), NtpTimingFit::CalcSeedTime(), NtpSRTrackTime::cdtds, NtpSRTrackTime::chi2, NtpSRTimeStatus::crate_t0_ns, crate_t0_ns, NtpSRDataQuality::cratemask, NtpStRecord::dataquality, NtpSREventSummary::date, NtpSRVertex::dcosx, NtpSRVertex::dcosy, NtpSRVertex::dcosz, NtpSRTrack::end, NtpStRecord::evt, NtpStRecord::evthdr, fADIntersectX, fADIntersectY, fADIntersectZ, fDelta, fEnd, fErrorCode, fEvent, fFoundADIntersect, fGateTime, fIndex, fInvBeta, fLength, fMaxPlane, fMinPlane, fMinTime, fMinZpos, fNdigits, fNumActiveCrates, fOffsetTime, NtpTrackAD::FoundIntersection(), fPassFail, fPlane, fQ, fRemoteSpillType, fRun, fS, fSeedTime, fSnarl, fStrip, fT, fTimeFrame, fTimeStampNanoSec, fTimeStampSec, fTrackPlanes, fTrackStripEnds, fTriggerSource, fTrigTime, fTrkChi2, fTrkEndDirX, fTrkEndDirY, fTrkEndDirZ, fTrkEndX, fTrkEndY, fTrkEndZ, fTrkInvBeta, fTrkVtxDirX, fTrkVtxDirY, fTrkVtxDirZ, fTrkVtxTime, fTrkVtxX, fTrkVtxY, fTrkVtxZ, fUnixTime, fVtxInvBeta, fVtxTime, fVtxTimeChi2, fVtxTimeErr, fVtxTimeRms, fW, fWindow, fWriteHits, NtpTimingFit::GetDigits(), NtpTimingFit::GetEnd(), RecDataHeader::GetErrorCode(), NtpTimingFit::GetGateTime(), RecRecordImp< T >::GetHeader(), NtpTimingFit::GetLength(), NtpTimingFit::GetMaxPlane(), NtpTimingFit::GetMinPlane(), NtpTimingFit::GetMinTime(), NtpTimingFit::GetMinZ(), VldTimeStamp::GetNanoSec(), NtpTimingFit::GetNumPoints(), NtpTimingFit::GetPlane(), NtpTimingFit::GetQ(), RecPhysicsHeader::GetRemoteSpillType(), RecDataHeader::GetRun(), NtpTimingFit::GetS(), VldTimeStamp::GetSec(), RecPhysicsHeader::GetSnarl(), NtpTimingFit::GetStrip(), NtpTimingFit::GetT(), RecPhysicsHeader::GetTimeFrame(), VldContext::GetTimeStamp(), NtpTimingFit::GetTrackPlanes(), RecPhysicsHeader::GetTrigSrc(), NtpTimingFit::GetTrigTime(), RecRecordImp< T >::GetVldContext(), NtpTimingFit::GetW(), NtpTrackAD::GetX(), NtpTrackAD::GetY(), NtpTrackAD::GetZ(), NtpTrackAD::Instance(), NtpTimingFit::Instance(), NtpTrackAD::LoadEvent(), n, NtpSRTrackTime::ndigit, NtpSREventSummary::nevent, NtpSelection::PrimaryTrack(), NtpTimingFit::Reset(), rollover_53mhz, NtpSRTimeStatus::rollover_53mhz, NtpSRTimeStatus::rollover_last_53mhz, rollover_last_53mhz, NtpTimingFit::RunConstrainedFit(), NtpTimingFit::RunLinearFit(), NtpSRTimeStatus::sgate_10mhz, sgate_10mhz, NtpSRTimeStatus::sgate_53mhz, sgate_53mhz, NtpSRTrackTime::t0, NtpSRTrack::time, NtpSRTimeStatus::timeframe, timeframe_check, NtpStRecord::timestatus, NtpStRecord::trk, NtpSRDate::utc, NtpSRTrack::vtx, WriteToFile(), NtpSRVertex::x, NtpSRVertex::y, and NtpSRVertex::z.

Referenced by Run().

00077 { 
00078   // reset variables  
00079   fIndex = 0;
00080   fRun = -1;
00081   fSnarl = -1;
00082   fEvent = -1;
00083   fErrorCode = 0;
00084   fTriggerSource = 0;
00085   fRemoteSpillType = 0;
00086   fNumActiveCrates = 0; 
00087   fTimeStampSec = 0;
00088   fTimeStampNanoSec = 0;
00089   fTimeFrame = -1;
00090   fUnixTime = -1;
00091   fTrigTime = -1;
00092   fGateTime = -1;
00093 
00094   fMinPlane = -1;
00095   fMaxPlane = -1;
00096   fMinTime = -1;
00097   fMinZpos = -1;
00098 
00099   fPassFail = 0;
00100   fTrackPlanes = 0;
00101   fTrackStripEnds = 0;
00102   fLength = -1;
00103   fSeedTime = 0.0;
00104   fInvBeta = 0.0;  
00105   fOffsetTime = 0.0;
00106 
00107   fVtxTime = 0.0;
00108   fVtxInvBeta = 0.0;
00109   fVtxTimeErr = 0.0;
00110   fVtxTimeRms = 0.0;
00111   fVtxTimeChi2 = 0.0;
00112   
00113   fWindow = 0.0;
00114 
00115   fTrkVtxTime = 0.0;
00116   fTrkInvBeta = 0.0;
00117   fTrkChi2 = 0.0;
00118 
00119   fTrkVtxX = 0.0;
00120   fTrkVtxY = 0.0;
00121   fTrkVtxZ = 0.0;
00122   fTrkVtxDirX = 0.0;
00123   fTrkVtxDirY = 0.0;
00124   fTrkVtxDirZ = 0.0;
00125 
00126   fTrkEndX = 0.0;
00127   fTrkEndY = 0.0;
00128   fTrkEndZ = 0.0;
00129   fTrkEndDirX = 0.0;
00130   fTrkEndDirY = 0.0;
00131   fTrkEndDirZ = 0.0;
00132 
00133   sgate_10mhz = -1;
00134   sgate_53mhz = -1;
00135   rollover_53mhz = -1;
00136   rollover_last_53mhz = -1;
00137   crate_t0_ns = -1;
00138   timeframe_check = -1;
00139 
00140   fFoundADIntersect = 0;
00141   fADIntersectX = -999.9;
00142   fADIntersectY = -999.9;
00143   fADIntersectZ = -999.9;
00144 
00145   // get event
00146   Int_t nevent = ntpRecord->evthdr.nevent;
00147   if( nevent<=0 ){
00148     return;
00149   }
00150 
00151   TClonesArray* eventArray  = (TClonesArray*)(ntpRecord->evt);
00152 
00153   if( ievent<0 || ievent>eventArray->GetLast() ){
00154     return;
00155   }
00156 
00157   // primary track
00158   TClonesArray* trackArray  = (TClonesArray*)(ntpRecord->trk);
00159 
00160   Int_t primtrkid = NtpSelection::PrimaryTrack( ntpRecord, ievent );
00161 
00162   if( primtrkid<0 ){
00163     return;
00164   }
00165 
00166   NtpSRTrack* track = (NtpSRTrack*)(trackArray->At(primtrkid));
00167 
00168   // add new event
00169   NtpTimingFit::Instance()->Reset();
00170   NtpTimingFit::Instance()->AddEvent(ntpRecord, ievent);
00171 
00172   // run timing fit
00173   fPassFail = NtpTimingFit::Instance()->RunConstrainedFit(fVtxInvBeta,fVtxTime,
00174                                                           fVtxTimeErr,fVtxTimeRms,fVtxTimeChi2);
00175   fPassFail = NtpTimingFit::Instance()->RunLinearFit(fInvBeta,fOffsetTime);
00176 
00177   // record seed time
00178   if( fVtxInvBeta>0.0 ) NtpTimingFit::Instance()->CalcSeedTime(+1,fSeedTime,fWindow);
00179   else                  NtpTimingFit::Instance()->CalcSeedTime(-1,fSeedTime,fWindow);
00180 
00181   // event info
00182   fIndex = 0;
00183   fRun   = ntpRecord->GetHeader().GetRun();
00184   fSnarl = ntpRecord->GetHeader().GetSnarl();
00185   fEvent = ievent;
00186   fErrorCode = ntpRecord->GetHeader().GetErrorCode();
00187   fTriggerSource  = ntpRecord->GetHeader().GetTrigSrc();
00188   fRemoteSpillType = ntpRecord->GetHeader().GetRemoteSpillType();
00189   fNumActiveCrates = ntpRecord->dataquality.cratemask;
00190   fUnixTime = ntpRecord->evthdr.date.utc;
00191 
00192   fTimeStampSec = ntpRecord->GetVldContext()->GetTimeStamp().GetSec();
00193   fTimeStampNanoSec = ntpRecord->GetVldContext()->GetTimeStamp().GetNanoSec();
00194   fTimeFrame = ntpRecord->GetHeader().GetTimeFrame();
00195 
00196   // timing info
00197   sgate_10mhz = ntpRecord->timestatus.sgate_10mhz;
00198   sgate_53mhz = ntpRecord->timestatus.sgate_53mhz;
00199   rollover_53mhz = ntpRecord->timestatus.rollover_53mhz;
00200   rollover_last_53mhz = ntpRecord->timestatus.rollover_last_53mhz;
00201   crate_t0_ns = ntpRecord->timestatus.crate_t0_ns;
00202   timeframe_check = ntpRecord->timestatus.timeframe;
00203 
00204   // track info
00205   fTrkVtxX = track->vtx.x;
00206   fTrkVtxY = track->vtx.y;
00207   fTrkVtxZ = track->vtx.z;
00208   fTrkVtxDirX = track->vtx.dcosx;
00209   fTrkVtxDirY = track->vtx.dcosy;
00210   fTrkVtxDirZ = track->vtx.dcosz;
00211 
00212   fTrkEndX = track->end.x;
00213   fTrkEndY = track->end.y;
00214   fTrkEndZ = track->end.z;
00215   fTrkEndDirX = track->end.dcosx;
00216   fTrkEndDirY = track->end.dcosy;
00217   fTrkEndDirZ = track->end.dcosz;
00218 
00219   fTrkVtxTime = track->time.t0;
00220   fTrkInvBeta = track->time.cdtds;
00221 
00222   if( track->time.ndigit>1 ){
00223     fTrkChi2 = track->time.chi2/(track->time.ndigit-1.0);
00224   }
00225   else fTrkChi2 = 0.0;
00226 
00227   // calculate AD intersection
00228   if( fPassFail ){
00229     NtpTrackAD::Instance()->LoadEvent( ntpRecord, ievent );
00230 
00231     fFoundADIntersect = NtpTrackAD::Instance()->FoundIntersection();
00232     fADIntersectX     = NtpTrackAD::Instance()->GetX();
00233     fADIntersectY     = NtpTrackAD::Instance()->GetY();
00234     fADIntersectZ     = NtpTrackAD::Instance()->GetZ();
00235   }
00236 
00237   // write out good events
00238   if( fPassFail ){
00239     fMinPlane = NtpTimingFit::Instance()->GetMinPlane();
00240     fMaxPlane = NtpTimingFit::Instance()->GetMaxPlane();
00241     fTrackPlanes = NtpTimingFit::Instance()->GetTrackPlanes();
00242     fTrackStripEnds = NtpTimingFit::Instance()->GetNumPoints();
00243 
00244     fMinTime = NtpTimingFit::Instance()->GetMinTime();
00245     fMinZpos = NtpTimingFit::Instance()->GetMinZ();
00246     fTrigTime = NtpTimingFit::Instance()->GetTrigTime();
00247     fGateTime = NtpTimingFit::Instance()->GetGateTime();
00248     fLength = NtpTimingFit::Instance()->GetLength();
00249  
00250     // loop over strips
00251     if( fWriteHits ){ 
00252       for( UInt_t n=0; n<NtpTimingFit::Instance()->GetNumPoints(); n++ ){
00253       
00254         fPlane = NtpTimingFit::Instance()->GetPlane(n);
00255         fStrip = NtpTimingFit::Instance()->GetStrip(n);
00256         fEnd = NtpTimingFit::Instance()->GetEnd(n);
00257         fNdigits = NtpTimingFit::Instance()->GetDigits(n);
00258         fT = NtpTimingFit::Instance()->GetT(n) - fVtxTime;
00259         fS = NtpTimingFit::Instance()->GetS(n);
00260         fQ = NtpTimingFit::Instance()->GetQ(n);
00261         fW = NtpTimingFit::Instance()->GetW(n);
00262 
00263         fDelta = fT - fVtxInvBeta*fS/0.3;
00264 
00265         if( fabs(fDelta)<fWindow ){
00266           this->WriteToFile(); fIndex++;
00267         }
00268       }
00269     }
00270     else{
00271       this->WriteToFile();
00272     }
00273   }
00274 
00275   return;
00276 }

void NtpTimingNtuple::Reset (  ) 

Definition at line 33 of file NtpTimingNtuple.cxx.

References fNtpFile, and fNtpTree.

00034 {
00035   std::cout << " *** NtpTimingNtuple::Reset() *** " << std::endl;
00036 
00037   fNtpFile = 0;
00038   fNtpTree = 0;
00039 
00040   return;
00041 }

void NtpTimingNtuple::Run ( Int_t  numRecords = -1  ) 

Definition at line 43 of file NtpTimingNtuple.cxx.

References CloseFile(), Fill(), NtpInterface::GetNumEvents(), NtpInterface::GetNumRecords(), NtpInterface::GetRecord(), and NtpSelection::PassFail().

00044 {
00045   std::cout << " *** NtpTimingNtuple::Run() *** " << std::endl;
00046 
00047   // last record
00048   Int_t ilast = numRecords;
00049 
00050   if( numRecords<0 || numRecords>NtpInterface::GetNumRecords() ){
00051     ilast = NtpInterface::GetNumRecords();
00052   }
00053  
00054   // loop over records
00055   for( Int_t irec=0; irec<ilast; irec++ ){
00056     if( irec%100==0 ) std::cout << "  [" << irec << "/" << ilast << "] " << std::endl;
00057 
00058     NtpStRecord* ntpRecord = NtpInterface::GetRecord(irec);
00059 
00060     // loop over events
00061     for( Int_t ievent=0; ievent<NtpInterface::GetNumEvents(ntpRecord); ievent++ ){
00062          
00063       if( NtpSelection::PassFail( ntpRecord, ievent ) ){
00064         this->Fill( ntpRecord, ievent );
00065       }
00066 
00067     }
00068   }
00069 
00070   // close file
00071   this->CloseFile();
00072 
00073   return;  
00074 }

void NtpTimingNtuple::SetFileName ( const char *  filename  )  [inline]

Definition at line 25 of file NtpTimingNtuple.h.

References fNtpFileName.

00025                                          {
00026     fNtpFileName = filename;
00027   }

void NtpTimingNtuple::WriteHits ( Bool_t  yesno = 1  )  [inline]

Definition at line 31 of file NtpTimingNtuple.h.

References fWriteHits.

00031 { fWriteHits = yesno; }

void NtpTimingNtuple::WriteToFile (  )  [private]

Definition at line 278 of file NtpTimingNtuple.cxx.

References crate_t0_ns, fADIntersectX, fADIntersectY, fADIntersectZ, fDelta, fEnd, fErrorCode, fEvent, fFoundADIntersect, fGateTime, fIndex, fInvBeta, fLength, fMaxPlane, fMinPlane, fMinTime, fMinZpos, fNdigits, fNtpFile, fNtpFileName, fNtpTree, fNumActiveCrates, fOffsetTime, fPassFail, fPlane, fQ, fRemoteSpillType, fRun, fS, fSeedTime, fSnarl, fStrip, fT, fTimeFrame, fTimeStampNanoSec, fTimeStampSec, fTrackPlanes, fTrackStripEnds, fTriggerSource, fTrigTime, fTrkChi2, fTrkEndDirX, fTrkEndDirY, fTrkEndDirZ, fTrkEndX, fTrkEndY, fTrkEndZ, fTrkInvBeta, fTrkVtxDirX, fTrkVtxDirY, fTrkVtxDirZ, fTrkVtxTime, fTrkVtxX, fTrkVtxY, fTrkVtxZ, fUnixTime, fVtxTime, fVtxTimeChi2, fVtxTimeErr, fVtxTimeRms, fW, fWriteHits, rollover_53mhz, rollover_last_53mhz, sgate_10mhz, sgate_53mhz, and timeframe_check.

Referenced by Fill().

00279 {   
00280   TDirectory* tmpd = 0;
00281 
00282   if( fNtpFile==0 ){
00283     tmpd = gDirectory;
00284     std::cout << " *** NtpTimingNtuple::OpenFile() *** " << std::endl;
00285     std::cout << "  opening file: " << fNtpFileName.Data() << std::endl;
00286     fNtpFile = new TFile(fNtpFileName.Data(),"recreate");
00287     fNtpTree = new TTree("ntuple","timing ntuple");
00288   
00289     fNtpTree->Branch("index",&fIndex,"index/I");
00290     fNtpTree->Branch("run",&fRun,"run/I");
00291     fNtpTree->Branch("snarl",&fSnarl,"snarl/I");  
00292     fNtpTree->Branch("event",&fEvent,"event/I");
00293     fNtpTree->Branch("errorcode",&fErrorCode,"errorcode/I");
00294     fNtpTree->Branch("trigsrc",&fTriggerSource,"trigsrc/I");
00295     fNtpTree->Branch("remotespilltype",&fRemoteSpillType,"remotespilltype/I");
00296     fNtpTree->Branch("cratemask",&fNumActiveCrates,"cratemask/I"); 
00297     fNtpTree->Branch("timesec",&fTimeStampSec,"timesec/I");
00298     fNtpTree->Branch("timenanosec",&fTimeStampNanoSec,"timenanosec/I");
00299     fNtpTree->Branch("timeframe",&fTimeFrame,"timeframe/I");
00300     fNtpTree->Branch("unixtime",&fUnixTime,"unixtime/I");
00301     fNtpTree->Branch("trigtime",&fTrigTime,"trigtime/D");
00302     fNtpTree->Branch("gatetime",&fGateTime,"gatetime/D");
00303 
00304     fNtpTree->Branch("passfail",&fPassFail,"passfail/I");
00305     fNtpTree->Branch("minplane",&fMinPlane,"minplane/I");
00306     fNtpTree->Branch("maxplane",&fMaxPlane,"maxplane/I");
00307     fNtpTree->Branch("minzpos",&fMinZpos,"minzpos/D");
00308     fNtpTree->Branch("mintime",&fMinTime,"mintime/D");
00309     fNtpTree->Branch("trkdigits",&fTrackStripEnds,"trkdigits/I");
00310     fNtpTree->Branch("length",&fLength,"length/D");
00311     fNtpTree->Branch("invbeta",&fInvBeta,"invbeta/D");
00312     fNtpTree->Branch("vtxtime",&fVtxTime,"vtxtime/D");
00313     fNtpTree->Branch("seed",&fSeedTime,"seed/D");
00314     fNtpTree->Branch("offset",&fOffsetTime,"offset/D");
00315     fNtpTree->Branch("err",&fVtxTimeErr,"err/D");
00316     fNtpTree->Branch("rms",&fVtxTimeRms,"rms/D");
00317     fNtpTree->Branch("chi2",&fVtxTimeChi2,"chi2/D");
00318 
00319     fNtpTree->Branch("trkplanes",&fTrackPlanes,"trkplanes/I");
00320     fNtpTree->Branch("trkvtxtime",&fTrkVtxTime,"trkvtxtime/D");
00321     fNtpTree->Branch("trkinvbeta",&fTrkInvBeta,"trkinvbeta/D");
00322     fNtpTree->Branch("trkchi2",&fTrkChi2,"trkchi2/D");
00323     fNtpTree->Branch("trkvtxx",&fTrkVtxX,"trkvtxx/D");
00324     fNtpTree->Branch("trkvtxy",&fTrkVtxY,"trkvtxy/D");
00325     fNtpTree->Branch("trkvtxz",&fTrkVtxZ,"trkvtxz/D");
00326     fNtpTree->Branch("trkvtxdirx",&fTrkVtxDirX,"trkvtxdirx/D");
00327     fNtpTree->Branch("trkvtxdiry",&fTrkVtxDirY,"trkvtxdiry/D");
00328     fNtpTree->Branch("trkvtxdirz",&fTrkVtxDirZ,"trkvtxdirz/D");
00329     fNtpTree->Branch("trkendx",&fTrkEndX,"trkendx/D");
00330     fNtpTree->Branch("trkendy",&fTrkEndY,"trkendy/D");
00331     fNtpTree->Branch("trkendz",&fTrkEndZ,"trkendz/D");
00332     fNtpTree->Branch("trkenddirx",&fTrkEndDirX,"trkenddirx/D");
00333     fNtpTree->Branch("trkenddiry",&fTrkEndDirY,"trkenddiry/D");
00334     fNtpTree->Branch("trkenddirz",&fTrkEndDirZ,"trkenddirz/D");
00335 
00336     fNtpTree->Branch("sgate_10mhz",&sgate_10mhz,"sgate_10mhz/I");
00337     fNtpTree->Branch("sgate_53mhz",&sgate_53mhz,"sgate_53mhz/I");
00338     fNtpTree->Branch("rollover_53mhz",&rollover_53mhz,"rollover_53mhz/I"); 
00339     fNtpTree->Branch("rollover_last_53mhz",&rollover_last_53mhz,"rollover_last_53mhz/I");
00340     fNtpTree->Branch("crate_t0_ns",&crate_t0_ns,"crate_t0_ns/I");
00341     fNtpTree->Branch("timeframe_check",&timeframe_check,"timeframe_check/I");
00342 
00343     fNtpTree->Branch("adintersect",&fFoundADIntersect,"adintersect/I");
00344     fNtpTree->Branch("trkadx",&fADIntersectX,"trkadx/D");
00345     fNtpTree->Branch("trkady",&fADIntersectY,"trkady/D");
00346     fNtpTree->Branch("trkadz",&fADIntersectZ,"trkadz/D");
00347 
00348     if( fWriteHits ){
00349       fNtpTree->Branch("plane",&fPlane,"plane/I");
00350       fNtpTree->Branch("strip",&fStrip,"strip/I");
00351       fNtpTree->Branch("end",&fEnd,"end/I");
00352       fNtpTree->Branch("digits",&fNdigits,"digits/I");
00353       fNtpTree->Branch("ds",&fS,"ds/D");
00354       fNtpTree->Branch("dt",&fT,"dt/D");
00355       fNtpTree->Branch("qpes",&fQ,"qpes/D");
00356       fNtpTree->Branch("weight",&fW,"weight/D");
00357       fNtpTree->Branch("delta",&fDelta,"delta/D");
00358     }
00359 
00360     gDirectory = tmpd;  
00361   }
00362 
00363   if( fNtpFile ){
00364     tmpd = gDirectory;
00365     fNtpFile->cd();
00366     fNtpTree->Fill();
00367     gDirectory = tmpd;  
00368   }
00369 
00370   return;
00371 }


Member Data Documentation

Definition at line 99 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fADIntersectX [private]

Definition at line 142 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fADIntersectY [private]

Definition at line 143 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fADIntersectZ [private]

Definition at line 144 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fDelta [private]

Definition at line 135 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fEnd [private]

Definition at line 128 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fErrorCode [private]

Definition at line 54 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fEvent [private]

Definition at line 46 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Definition at line 141 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fGateTime [private]

Definition at line 61 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fIndex [private]

Definition at line 40 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fInvBeta [private]

Definition at line 81 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fLength [private]

Definition at line 69 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fMaxPlane [private]

Definition at line 66 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fMinPlane [private]

Definition at line 65 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fMinTime [private]

Definition at line 68 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fMinZpos [private]

Definition at line 67 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fNdigits [private]

Definition at line 130 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

TFile* NtpTimingNtuple::fNtpFile [private]

Definition at line 37 of file NtpTimingNtuple.h.

Referenced by CloseFile(), Reset(), and WriteToFile().

TString NtpTimingNtuple::fNtpFileName [private]

Definition at line 150 of file NtpTimingNtuple.h.

Referenced by CloseFile(), SetFileName(), and WriteToFile().

TTree* NtpTimingNtuple::fNtpTree [private]

Definition at line 38 of file NtpTimingNtuple.h.

Referenced by CloseFile(), Reset(), and WriteToFile().

Definition at line 57 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fOffsetTime [private]

Definition at line 82 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fPassFail [private]

Definition at line 77 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fPlane [private]

Definition at line 126 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fQ [private]

Definition at line 133 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Definition at line 56 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fRun [private]

Definition at line 44 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fS [private]

Definition at line 131 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fSeedTime [private]

Definition at line 71 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fSnarl [private]

Definition at line 45 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fStrip [private]

Definition at line 127 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fT [private]

Definition at line 132 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fTimeFrame [private]

Definition at line 52 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Definition at line 51 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Definition at line 50 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Definition at line 104 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Definition at line 78 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Definition at line 55 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrigTime [private]

Definition at line 60 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkChi2 [private]

Definition at line 108 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkEndDirX [private]

Definition at line 120 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkEndDirY [private]

Definition at line 121 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkEndDirZ [private]

Definition at line 122 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkEndX [private]

Definition at line 117 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkEndY [private]

Definition at line 118 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkEndZ [private]

Definition at line 119 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkInvBeta [private]

Definition at line 107 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkVtxDirX [private]

Definition at line 113 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkVtxDirY [private]

Definition at line 114 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkVtxDirZ [private]

Definition at line 115 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkVtxTime [private]

Definition at line 106 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkVtxX [private]

Definition at line 110 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkVtxY [private]

Definition at line 111 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fTrkVtxZ [private]

Definition at line 112 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Int_t NtpTimingNtuple::fUnixTime [private]

Definition at line 49 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fVtxInvBeta [private]

Definition at line 86 of file NtpTimingNtuple.h.

Referenced by Fill().

Double_t NtpTimingNtuple::fVtxTime [private]

Definition at line 85 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fVtxTimeChi2 [private]

Definition at line 89 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fVtxTimeErr [private]

Definition at line 87 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fVtxTimeRms [private]

Definition at line 88 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fW [private]

Definition at line 134 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Double_t NtpTimingNtuple::fWindow [private]

Definition at line 137 of file NtpTimingNtuple.h.

Referenced by Fill().

Bool_t NtpTimingNtuple::fWriteHits [private]

Definition at line 148 of file NtpTimingNtuple.h.

Referenced by Fill(), WriteHits(), and WriteToFile().

Definition at line 95 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Definition at line 97 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Definition at line 93 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Definition at line 94 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().

Definition at line 100 of file NtpTimingNtuple.h.

Referenced by Fill(), and WriteToFile().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1