BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page
//////////////////////////////////////////////////////////////////////////
//                                                                      //
// BrBbRdoModule                                                        //
//                                                                      //
// BrBbRdoModule is an analysis module for the Beam-Beam counters       //
// used to create the Reconstructed DataObject. The first algorithm     //
// presented in this code uses the Digitized output directly. A final   //
// version should use the yet to be defined BrCalBB data object.        //
//                                                                      //
//                                                                      //
//
// It works in two mode. The default using the calibration parameters
// from file, and the second mode Geant where hardwired constants
// are used to go from channel to time etc. 
//
//////////////////////////////////////////////////////////////////////////
//
// Revisions:
//  April 13 1999, fv
//   Included BrParametersDBmanager for beeter detector parameter handling
//   Changed SetDetectorParamsDB to be private (scheduled for deletion)
//   Removed at the same time the delete fParamsDB which now is done by
//   the database manager
//

//
// $Id: BrBbRdoModule.cxx,v 1.2 2001/07/22 21:39:19 videbaek Exp $
// $Author: videbaek $
// $Date: 2001/07/22 21:39:19 $
// $Copyright: (C) 2001 BRAHMS Collaboration <brahmlib@rhic.bnl.gov>
//

#include <BrIostream.h>
#include <cassert>
#include <climits>
#include <fstream.h>
#include <stdlib.h>

#ifndef ROOT_TDirectory
#include "TDirectory.h"
#endif
#ifndef ROOT_TSystem
#include "TSystem.h"
#endif
#ifndef ROOT_TH1
#include "TH1.h"
#endif
#ifndef BRAT_BrException
#include "BrException.h"
#endif
#ifndef ROOT_TMath
#include "TMath.h"
#endif
#ifndef BRAT_BrBbRdoModule
#include "BrBbRdoModule.h"
#endif
#ifndef BRAT_BrDetectorParamsBB
#include "BrDetectorParamsBB.h"
#endif
#ifndef BRAT_BrBbDig
#include "BrBbDig.h"
#endif
#ifndef BRAT_BrBbRdo
#include "BrBbRdo.h"
#endif
#ifndef BRAT_BrEventNode
#include "BrEventNode.h"
#endif
#ifndef BRAT_BrDataTable
#include "BrDataTable.h"
#endif
#ifndef BRAT_BrUnits
#include "BrUnits.h"
#endif
#ifndef BRAT_BrPathManager
#include "BrPathManager.h"
#endif
#ifndef BRAT_BrParameterDbManager
#include "BrParameterDbManager.h"
#endif


//____________________________________________________________________
ClassImp(BrBbRdoModule);

//____________________________________________________________________
 BrBbRdoModule::BrBbRdoModule()
{
   //
   // default constructor
   //
  fParams_p = 0;
  fInputMode = 0;
}

//____________________________________________________________________
 BrBbRdoModule::BrBbRdoModule(const Char_t *name, const Char_t *title) 
  : BrModule(name, title) 
{
  // constructor for named object
  fParams_p    = 0;
  fInputMode   = 0;
  fNominalT0   = 6.9;  //nsec.
}

//____________________________________________________________________
 BrBbRdoModule::~BrBbRdoModule()
{
   // destructor
}

//____________________________________________________________________
 void BrBbRdoModule::Init()
{
  // Initialize the RdoModule.
  // Connect to the ParameterDb and the specific BB calibration files.
  BrParameterDbManager *gParamDb = BrParameterDbManager::Instance();
  fParams_p = (BrDetectorParamsBB*) 
    gParamDb->GetDetectorParameters("BrDetectorParamsBB",GetName());

  //
  // Get Calibration Numbers
  //
  BrPathManager* pathMan = BrPathManager::Instance();
  // const Char_t *bratsys = gSystem->Getenv("BRATSYS");
  const Char_t *bratsys = pathMan->GetDataDir();
  const Char_t *pwd = gSystem->Getenv("PWD");
  Char_t CalibrFileName[100];
  try{
    sprintf(CalibrFileName, "%s/BrCalibrBB.dat",pwd);
    ifstream ReadNumbers(CalibrFileName);
    if(DebugLevel()>0) 
      cout<<"Looking for BrCalibrBB.dat " << CalibrFileName<<endl;

    if(ReadNumbers){
      for(int i=1; i<45; i++){
	ReadNumbers >> DtLeft[i]
		    >> DtRight[i]
		    >> LPedMean[i]
		    >> LPedRMS[i]
		    >> RPedMean[i]
		    >> RPedRMS[i]
		    >> LAdcGain0[i]
		    >> RAdcGain0[i]
		    >> kL[i]
		    >> kR[i]
		    >> DtTdcLSlew[i]
		    >> DtTdcRSlew[i]
		    >> LGapSt[i]
		    >> LGap[i]
		    >> RGapSt[i]
		    >> RGap[i];
      }
      ReadNumbers>>dZ_Big>>dZ_Sm>>dZ_Fast>>n;
      cout << dZ_Big <<" " << n << endl;
    }
    else {
      if(DebugLevel()>0) 
	cout<<"Looking for BrCalibrBB.dat in $BRATSYS/params/bb"<<endl;
      sprintf(CalibrFileName, "%s/params/bb/BrCalibrBB.dat",bratsys);
      ifstream ReadNumbers(CalibrFileName);
      if(ReadNumbers){
	for(int i=1; i<45; i++){
	  ReadNumbers >> DtLeft[i]
		      >> DtRight[i]
		      >> LPedMean[i]
		      >> LPedRMS[i]
		      >> RPedMean[i]
		      >> RPedRMS[i]
		      >> LAdcGain0[i]
		      >> RAdcGain0[i]
		      >> kL[i]
		      >> kR[i]
		      >> DtTdcLSlew[i]
		      >> DtTdcRSlew[i]
		      >> LGapSt[i]
		      >> LGap[i]
		      >> RGapSt[i]
		      >> RGap[i];
	}
	ReadNumbers>>dZ_Big>>dZ_Sm>>dZ_Fast>>n;
      }
      else throw new BrFatal("Init()", "No 'BrCalibrBB.dat' found!",1);
    }
  }
  catch(BrException* e) {
    cout << "BrRdoModule::" << *e << endl;
    e->Execute();
  }

}

//____________________________________________________________________
 void BrBbRdoModule::DefineHistograms()
{
  // Book histograms (called from BrModule::Book)
  if (!fParams_p) {
    Warning("DefineHistograms","Number of tubes unknown.");
    return;
  }
  
  // Create new subdirectory for histograms
  TDirectory* savdir = gDirectory;   // remember current directory
  TDirectory* dir = savdir->mkdir(GetName());
  if (!dir) {
    Warning("DefineHistograms","Could not create histogram subdirectory");
    return;
   }
  dir->cd();
  
  // const Int_t NoLeftTubes  = fParams_p->GetNoLeftTubes();
  // const Int_t NoRightTubes = fParams_p->GetNoRightTubes();
  
  fTime0Hist   = new TH1F("Time0","Time distribution",200, -1, 199);
  fZ0Hist      = new TH1F("Z0","Vertex distribtuion", 500,-250.,250.);
  fMultHist    = new TH1F("Mult", "Big Tubes Multiplicity", 60, 0, 300);
  
  // Restore directory
  gDirectory = savdir;
}

//____________________________________________________________________
 void BrBbRdoModule::Event(BrEventNode* event, BrEventNode* rdoevent)
{
  //Event 
  //
  // Module to create BrBbRdo object from digitized/calibrated data.
  // 
  // Required input : BrDataTable "DigBB right"
  //                : BrDataTable "DigBB left"
  // Generates      : BrBbRdo "BB" dataobject.
  //
  const float c=BrUnits::c_light;

  BrDataTable *bbtable_p;
  BrBbDig *digbb_p;
  if(DebugLevel() > 15) cout << "Entering RdoModule BB" << endl;

  BrBbRdo* rdodata = new BrBbRdo("BB","Rdo data");
  rdoevent->AddObject(rdodata);

  Float_t TickLength = 0.025;
    //fParams_p->GetTdcConv();

  Float_t tmax = INT_MAX;;
  Int_t TdcTopLim = 2800;
  Int_t NumLeft, NumRight;
  Float_t tdc, ladc[45], ltdc[45], radc[36], rtdc[36], 
    FastestLeft=tmax, FastestRight=tmax;

  if(fInputMode == 0){//fInputMode 
    float BigMult=0.0;
    float leftMult=0.0;

    if ((bbtable_p = event->GetDataTable("DigBB Left"))) {
      NumLeft = bbtable_p->GetEntries();

      if (DebugLevel() > 20) 
	cout << "BB Entries Left " << NumLeft << endl;


      int hitsLeft = 0;
      for (int ihit=0; ihit<NumLeft; ihit++) {
	tdc=0;
	digbb_p = (BrBbDig*)bbtable_p->At(ihit);
	int l = digbb_p->GetTubeNo();

	if (DebugLevel() > 25) 
	  digbb_p->List();

	tdc     = digbb_p->GetTdc();
	ltdc[l] = tdc;
	ladc[l] = digbb_p->GetAdc() - LPedMean[l];  

	if(ladc[l]>LGapSt[l]) ladc[l]=ladc[l]-LGap[l];
	if(ladc[l]/LAdcGain0[l]>.7 && ltdc[l]<TdcTopLim && ltdc[l]>10){
	  hitsLeft++;
	  tdc -= DtLeft[l];
	  if(tdc < FastestLeft)
	    FastestLeft=tdc;
	}
	if (l>36 && ladc[l]/LAdcGain0[l]>.7) 
	  BigMult=BigMult + ladc[l]/LAdcGain0[l];
      }

      if (DebugLevel() > 10) 
	cout << "BB Hits Left " << hitsLeft << endl;
      if (DebugLevel() > 5) 
	cout << "Fatstest Left " << FastestLeft << endl;
      
      rdodata->SetLeftHits(hitsLeft);
    } 

    leftMult = BigMult;
    rdodata->SetLeftMult((Int_t)leftMult);

    int hitsRight = 0;
    // Right Array 
    if ((bbtable_p = event->GetDataTable("DigBB Right"))) {
      NumRight= bbtable_p->GetEntries();

      if (DebugLevel() > 20) 
	cout << "BB Hits Right" << NumRight << endl;

      for (int ihit=0; ihit<NumRight; ihit++) {
	tdc=0;
	digbb_p = (BrBbDig*)bbtable_p->At(ihit);
	int r = digbb_p->GetTubeNo();

	if (DebugLevel() > 25) 
	  digbb_p->List();

	tdc     = digbb_p->GetTdc();
	rtdc[r] = tdc;
	radc[r] = digbb_p->GetAdc() - RPedMean[r];

	if(radc[r]>RGapSt[r]) 
	  radc[r]=radc[r] - RGap[r];
	if(radc[r]/RAdcGain0[r]>.7 && rtdc[r]<TdcTopLim && rtdc[r]>10){
	  hitsRight++;
	  tdc -= DtRight[r];
	  if(tdc < FastestRight)
	    FastestRight=tdc;
	}
	if(r>30 && radc[r]/RAdcGain0[r]>.7) 
	  BigMult=BigMult + radc[r]/RAdcGain0[r];
      }
      if (DebugLevel() > 10) 
	cout << "BB Hits Right " << hitsRight << endl;
      if (DebugLevel() > 5) 
	cout << "Fatstest Right " << FastestRight << endl;

    }
    rdodata->SetRightHits(hitsRight);
    rdodata->SetMult(BigMult);
    rdodata->SetRightMult((Int_t)(BigMult-leftMult));

    if(HistOn()) 
      fMultHist->Fill(BigMult);
    
    //
    // t0 and VertexZ Calculations
    //
    int N=0;
    Float_t tL=INT_MAX, tR=INT_MAX, t0=0, VertexZ=INT_MAX,
      t0_Big=0, t0_Sm=0, t0_Fast=0,
      VertexZ_Big=INT_MAX, VertexZ_Sm=INT_MAX, VertexZ_Fast=INT_MAX;
    tdc=0;
    Float_t LTdc[44+1], RTdc[35+1];
    //    
    // Big Tubes
    //
    // Left Array
    for(int l=37; l<45; l++){ 
      LTdc[l]=0; 
      
      if(ladc[l]/LAdcGain0[l]>.7 
	 && ltdc[l]>10 && ltdc[l]<TdcTopLim){
	N++;
	tdc=tdc + ( ltdc[l] - DtTdcLSlew[l] - kL[l]/sqrt(ladc[l]) );
	LTdc[l]=ltdc[l] - DtTdcLSlew[l] - kL[l]/sqrt(ladc[l]);
      }
    }

    if(N>0){
      tL=TickLength*tdc/N; 
      tdc=N=0; 

      for(int l=37; l<44+1; l++){  
	if(fabs(LTdc[l]*TickLength-tL)<.5) {  
	  N++;  
	  tdc=tdc+LTdc[l];  
	}  
      }  
    }
    if(N>0) 
      tL=TickLength*tdc/N;
    else 
      tL=INT_MAX;
 
    // Right Array
    N=0; 
    tdc=0; 
    for(int r=31; r<36; r++){  
      RTdc[r]=0; 
      if(radc[r]/RAdcGain0[r]>.7 
	 && rtdc[r]>10 && rtdc[r]<TdcTopLim){
	N++;
	tdc=tdc + ( rtdc[r] - DtTdcRSlew[r] - kR[r]/sqrt(radc[r]) );
	RTdc[r]=rtdc[r] - DtTdcRSlew[r] - kR[r]/sqrt(radc[r]);
      }
    }
    
    if(N>0){
      tR=TickLength*tdc/N; 
      tdc=0; N=0; 
      for(int r=31; r<35+1; r++){  
	if(fabs(RTdc[r]*TickLength-tR)<.5) {  
	  N++;  
	  tdc=tdc+RTdc[r];  
	} 
      } 
    } 
    if(N>0) tR=TickLength*tdc/N; 
    else tR=INT_MAX;

    if(tL<INT_MAX && tR<INT_MAX){ 
      t0_Big=(tL+tR)/2 - (219.+dZ_Big)/c;
      VertexZ_Big=(c/2.)*(tL-tR)+dZ_Big;
    }

    //    
    // Small Tubes:
    //
    N=0; tdc=0; tL=tR=INT_MAX;
    // Left Array
    for(int l=1; l<37; l++){ 
      LTdc[l]=0; 

      if(ladc[l]/LAdcGain0[l]>.7 && ladc[l]/LAdcGain0[l]<n+.3 
	 && ltdc[l]>10 && ltdc[l]<TdcTopLim){
	N++;  
	tdc=tdc + ( ltdc[l] - DtTdcLSlew[l] - kL[l]/sqrt(ladc[l]) );
	LTdc[l]=ltdc[l] - DtTdcLSlew[l] - kL[l]/sqrt(ladc[l]);
      }  
    }  
    if(N>0){
      tL=TickLength*tdc/N;
      tdc=0; N=0; 

      for(int l=1; l<36+1; l++){  
	if(fabs(LTdc[l]*TickLength-tL)<.5) {  
	  N++;  
	  tdc=tdc+LTdc[l];  
	}  
      }  
    }
    if(N>0) 
      tL=TickLength*tdc/N;
    else 
      tL=INT_MAX; 
    // Right Array
    N=0; 
    tdc=0; 

    for(int r=1; r<31; r++){
      RTdc[r]=0; 

      if(radc[r]/RAdcGain0[r]>.7 && radc[r]/RAdcGain0[r]<n+.3
	 && rtdc[r]>10 && rtdc[r]<TdcTopLim){
	N++;  
	tdc=tdc + (rtdc[r] - DtTdcRSlew[r] - kR[r]/sqrt(radc[r]) );
	RTdc[r]=rtdc[r] - DtTdcRSlew[r] - kR[r]/sqrt(radc[r]);
      }  
    }  
    if(N>0){
      tR=TickLength*tdc/N;  
      tdc=0; N=0; 
      for(int r=1; r<30+1; r++){  
	if(fabs(RTdc[r]*TickLength-tR)<.5) {  
	  N++;  
	  tdc=tdc+RTdc[r];  
	} 
      } 
    } 
    if(N>0) 
      tR=TickLength*tdc/N; 
    else 
      tR=INT_MAX;  
    if(tL<INT_MAX && tR<INT_MAX){ 
      t0_Sm=(tL+tR)/2 - (219.+dZ_Sm)/c;
      VertexZ_Sm=(c/2.)*(tL-tR)+dZ_Sm;
    }
    
    //    
    // Fastest Tubes:
    //
    if(FastestLeft<INT_MAX && FastestRight<INT_MAX){ //use fastest
      tL=TickLength*FastestLeft;
      tR=TickLength*FastestRight;
      t0_Fast=(tL+tR)/2 - (219.+dZ_Fast)/c;
      VertexZ_Fast=(c/2.)*(tL-tR)+dZ_Fast;
    }

    if(n==1){ // Use old calibration and Big tubes first
      VertexZ=VertexZ_Big; t0=t0_Big; 
      if(fabs(VertexZ)<200) 
	rdodata->SetTimeMethod(1);

      if(VertexZ>999){
	VertexZ=VertexZ_Sm; t0=t0_Sm;
	if(fabs(VertexZ)<200) 
	  rdodata->SetTimeMethod(2);
      }
      if(VertexZ>999){
	VertexZ=VertexZ_Fast; t0=t0_Fast;
	if(fabs(VertexZ)<200) 
	  rdodata->SetTimeMethod(3);
      }
    }
    else {// Use new calibration and Small tubes first
      VertexZ=VertexZ_Sm; t0=t0_Sm; 
      if(fabs(VertexZ)<200) 
	rdodata->SetTimeMethod(2);

      if(VertexZ>999){
	VertexZ=VertexZ_Big; 
	t0=t0_Big;

	if(fabs(VertexZ)<200) 
	  rdodata->SetTimeMethod(1);
      }
      if(VertexZ>999){
	VertexZ=VertexZ_Fast; 
	t0=t0_Fast;

	if(fabs(VertexZ)<200) 
	  rdodata->SetTimeMethod(3);
      }
    }

    if(DebugLevel() > 10){
      cout << "BB Results: t0 = " <<setw(6) << t0 << endl
	   <<  "method = " << setw(7) << rdodata->GetTimeMethod() << endl
	   << " VertexZ = "<<setw(7)<< VertexZ << endl;
    }

    //
    // Set the values
    //
    if(VertexZ<INT_MAX){
      rdodata->SetTime0(t0);
      rdodata->SetZ0(VertexZ);
      rdodata->SetLeftTime(tL);
      rdodata->SetRightTime(tR);
      if (HistOn()) {
	fTime0Hist->Fill(t0);
	fZ0Hist->Fill(VertexZ);
      }
    }
  }

  else{
    // Used for simulation data
    //
    float mult_left=0.0, mult_right=0.0;
    Double_t time_left=9999., time_right=9999.;
    Bool_t left=kFALSE, right=kFALSE;
    
    BrDataTable* BrDigList;  
    if ((BrDigList = event->GetDataTable("DigBB Left"))) {
      Int_t NumHits = BrDigList-> Entries();
      int NumLeftHits  = 0;
      
      for (Int_t iHit = 0; iHit < NumHits; iHit++) {
	BrBbDig *dig_p = (BrBbDig*)BrDigList->At(iHit);
	Int_t ModuleNo = dig_p->GetTubeNo();
	float adc = dig_p->GetAdc() ;
	NumLeftHits++;
	mult_left += adc;
	rdodata->SetLeftHitTube(ModuleNo);
	Double_t time =dig_p->GetTdc()*0.025;
	time_left  = TMath::Min(time_left, time);
	//}
      }
      rdodata->SetLeftHits(NumLeftHits);
      if(NumLeftHits > 0) left = kTRUE;
      
    }
    
    if ((BrDigList = event->GetDataTable("DigBB Right"))) {
      Int_t NumHits = BrDigList-> Entries();
      int NumRightHits  = 0;
      
      for (Int_t iHit = 0; iHit < NumHits; iHit++) {
	BrBbDig *dig_p = (BrBbDig*)BrDigList->At(iHit);
	Int_t ModuleNo = dig_p->GetTubeNo();
	float adc = dig_p->GetAdc();
	
	NumRightHits++;
	mult_right = adc;
	rdodata->SetRightHitTube(ModuleNo);
	Double_t time =dig_p->GetTdc() *0.025;
	time_right  = TMath::Min(time_right, time);
	//}
      }
      
      rdodata->SetRightHits(NumRightHits);
      if(NumRightHits > 0) right = kTRUE;
      
      if(DebugLevel() > 10){
	cout << "BB Results: "
	     << " tLeft  = "<< setw(7) << time_left 
	     << " tRight = "<< setw(7) << time_right 
	     << " MLeft  = "<< setw(7) << mult_left 
	     << " MRight = "<< setw(7) << mult_right << endl;
      }
      if(left){
	rdodata->SetLeftTime(time_left);
	rdodata->SetLeftMult(Int_t(mult_left));
      }
      if(right){
	rdodata->SetRightTime(time_right);
	rdodata->SetRightMult(Int_t(mult_right));
      }
      if(left && right){
	double t0 = (time_right+time_left)/2.-fNominalT0;
	double z0 = (time_right-time_left)/2.;
	z0        = z0 * BrUnits::c_light;
	rdodata->SetTime0(t0);
	rdodata->SetZ0(z0);
	
	if(HistOn()){
	  fTime0Hist->Fill(t0);
	  fZ0Hist->Fill(z0);
	}
      }
      
    }
  }  
}

//____________________________________________________________________
 void BrBbRdoModule::SetInputMode(Int_t mode){
  //
  // Change input mode. Valid values are
  // 0: use digitized data objects (read calib from parameter files)
  // 1: use calibrated data objects (read calib from calib db)
  fInputMode = mode;
}

//____________________________________________________________________
 void BrBbRdoModule::SetDetectorParamsBB(BrDetectorParamsBB *par)
{
   //
   // Set detector parameters (call this before calling BrModule::Book)
   //

   fParams_p = par;
}

 void BrBbRdoModule::Print(Option_t* option) const
{
  // Module Information method
  //
  TString opt(option);
  opt.ToLower();
  
  BrModule::Print(option);
  if (opt.Contains("d"))
   cout << endl
         << "  Original author: Yury Blyakhman" << endl
         << "  Revisted by:     $Author: videbaek $" << endl
         << "  Revision date:   $Date: 2001/07/22 21:39:19 $"   << endl
         << "  Revision number: $Revision: 1.2 $ " << endl
         << endl
         << "*************************************************" << endl;
}

///////////////////////////////////////////////////////////////////////////////
//
//  $Log: BrBbRdoModule.cxx,v $
//  Revision 1.2  2001/07/22 21:39:19  videbaek
//  Changed the numhits to reflect those channels with actual valid hits, and not just
//  number of entries in table. Changed the cutoff tdclimit for valid values was 2200
//  set to 2800. It is useful in list of fastest to reject outlier, should be
//  settable rather than build in.
//  Agree that the whole module need some cleanup - but is actually algorithmly ok
//
//  Revision 1.1  2001/06/22 17:41:23  cholm
//  Change names so that every data class has the same format, so that
//  we will not have to worry about that later on. The affected classes
//  are:
//
//          BrDigBB             ->        BrBbDig
//          BrRdoBB             ->        BrBbRdo
//          BrDigZDC            ->        BrZdcDig
//          BrRdoZDC            ->        BrZdcRdo
//          BrDigRHIC           ->        BrRichDig
//          BrDigDC             ->        BrDcDig
//          BrDigC1             ->        BrDcC1
//  	BrDigHit            ->	      BrHitDig
//  	BrDigTof	    ->	      BrTofDig
//  	BrTPCSequence	    ->	      BrTpcSequence
//  	BrTPCCluster	    ->	      BrTpcCluster
//  	BrTPCClusterTable   ->	      BrTpcClusterTable
//
//  These changes has ofcourse been propegated to the modules as well,
//  giving the changes
//
//          BrRdoModuleBB	    ->	      BrBbRdoModule
//  	BrRdoModuleZDC	    ->	      BrZdcRdoModule
//  	BrTPCClusterFinder  ->	      BrTpcClusterFinder
//  	BrTPCSequenceAdder  ->	      BrTpcSequenceAdder
//
//  Revision 1.1.1.1  2001/06/21 14:55:08  hagel
//  Initial revision of brat2
//
//  Revision 1.34  2001/06/07 20:23:26  videbaek
//  Changed BrMath ref to TMath
//
//  Revision 1.33  2001/06/04 13:36:32  cholm
//  Changes to use BrPathManager, BrVersion, and perpare to use BrFileTag.
//
//  Revision 1.32  2001/06/01 17:35:38  videbaek
//  Added comment.
//
//  Revision 1.31  2001/05/31 13:13:04  cholm
//  Minor fixes
//
//  Revision 1.30  2001/05/31 01:38:15  cholm
//  Fix of output problems, an some beautification
//
//  Revision 1.29  2001/05/17 20:25:08  beam
//  small mistake corrected
//
//  Revision 1.27  2001/04/06 20:02:36  cholm
//  Changed some messages to higher debug level. This class really needs some
//  comments though, and I suspect a few things could be tidied up.
//
//  Revision 1.26  2001/03/29 23:34:20  beam
//  modified to use different calibration files
//
//  Revision 1.25  2001/03/07 12:16:48  cholm
//  * Made the method BrModule::Info() const obsolete in favour of
//    BrModule::Print(Option_t* option="B") const.
//
//  Revision 1.24  2001/02/28 20:15:47  cholm
//  Fixes in types for RH 7
//
//  Revision 1.23  2001/02/13 23:09:49  beam
//  minor fixes
//
//  Revision 1.22  2001/01/25 19:47:46  videbaek
//  Add mode for geant handling
//
//  Revision 1.21  2001/01/23 00:12:31  beam
//  new "Cosmetic Factor" for the vertex
//
//  Revision 1.20  2001/01/17 02:17:35  hagel
//  Cast Float_t to Int_t to eliminate error
//
//  Revision 1.19  2000/12/22 02:44:07  videbaek
//  Calculate left and right mult for Big tubes
//
//  Revision 1.18  2000/12/16 01:01:35  videbaek
//  cosmitic changes
//
//  Revision 1.17  2000/12/14 08:32:40  ouerdane
//  Added rdodata->SetLeftTime(tL) and rdodata->SetRightTime(tR) at the
//  end of the event method (with SetZ0 and SetTime0)
//
//
//  Revision 1.16  2000/12/04 20:30:22  beam
//  *** empty log message ***
//
//  Revision 1.15  2000/12/04 19:57:04  beam
//  reject outliers in timing
//
//  Revision 1.14  2000/11/23 01:31:11  brahmlib
//  Cleaned up code in general.
//
//  Revision 1.13  2000/11/22 21:14:45  videbaek
//  Moved stuff from constructor to Init()
//
//  Revision 1.12  2000/11/17 14:39:37  beam
//  new t0 calculations; few new things...
//
//  Revision 1.10  2000/11/07 16:34:19  bjornhs
//  Added if()-statements to two histogram-filling lines to test if the histograms
//  really do exist.
//
//  Revision 1.9  2000/10/25 15:05:36  videbaek
//  Simple cosmetic clean up. Moved CVSlog to end.
//
//  Revision 1.8  2000/10/25 14:43:18  videbaek
//  Removed the offending TickLength const.
//  Take ticklength from detectorparamsBB.
//
//  Revision 1.7  2000/10/23 22:29:54  beam
//  TimeZero and vertexZ are calculated by all modules
//
//  Revision 1.6  2000/03/21 21:21:47  cholm
//  Several changes: A few hacks where needed to compile on Digital Unix, 
// noticably in my - Christian Holm - classes for the DB and Exceptions. 
// Proberly still need to do something to some of Konstantins stuff. 
// Also, I removed a lot of warnings fromt the compiler, by teddying up the code. 
// Several places, old C-style indecies in for loops were assumed. Corrected. 
// Unused variables have been commented out.
//
//  Revision 1.5  2000/01/12 08:50:02  alv
//  Corrected infinite recursion in Info (BrModule:Info() => BrModule::Info())
//
//  Revision 1.4  1999/04/14 20:12:42  videbaek
//  Use DbManager methods to access parameters.
//
//  Revision 1.3  1999/01/21 23:35:42  hagel
//  Changed #ifndef's in .cxx files for include files to reflect changes to
//  .h files according to BRAT convention.  It should be noted that very few
//  of the .cxx source files have the protections.  Should this be systematically
//  changed.
//
//  Revision 1.2  1999/01/15 15:33:48  videbaek
//  Made BrRdoModule functional.
//  fixes to non cygnus makeNT file
//
//  Revision 1.1  1998/10/09 19:22:40  videbaek
//  Add the BrBbRdo and BrRdoModule classes
//
//

This page automatically generated by script docBrat by Christian Holm

Copyright ; 2002 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
Last Update on by

Validate HTML
Validate CSS