BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page
///////////////////////////////////////////////////////////////////////
//                                                                   //
//    BrSiParameters                                         //
//                                                                   //
//    Parameters describing the physical properties of the MultSi    //
//    slats. Some of these are presently simulation parameters       //
//    others are relevant to both simulations and reconstruction.    //
//                                                                   //
///////////////////////////////////////////////////////////////////////

//
// $Id: BrSiParameters.cxx,v 1.1.1.1 2001/06/21 14:55:00 hagel Exp $
// $Author: hagel $
// $Date: 2001/06/21 14:55:00 $
// $Copyright$
//
#include <iostream.h>
#include <BrSiParameters.h>

ClassImp(BrSiParameters);

//_________________________________________________________________________
 BrSiParameters::BrSiParameters(void)
  : fNoWafers(0), fNoSlicesPerWafer(0)
{
  // Constructor. Set counter and list data members to zero.
  // Don't use this constructor unless you have to and know
  // what you are doing use BrDetectorParams(Char_t, Char_t ) instead
}

//_________________________________________________________________________
 BrSiParameters::BrSiParameters(Char_t *name, 
			       Char_t *title) 
  : BrMultParameters(name, title)
{
  SetDefaultParams();
}

//_________________________________________________________________________
 BrSiParameters::BrSiParameters(Char_t *name, 
			       Char_t *title,
			       Char_t *filename) 
  : BrMultParameters(name, title)
{
  SetDefaultParams();
  ReadASCIIFile(filename);
}

//_________________________________________________________________________
 BrSiParameters::~BrSiParameters(void)
{}

//_________________________________________________________________________
 void BrSiParameters::SetDefaultParams()
{
  // Set a set of reasonable default parameters.
  // Number of tubes etc are ok with present design. 
  // This is mainly to ensure that the private members are
  // initialized with values that do not give rise to any
  // problems in the methods which uses these parameters;
  //
  fAdcGain          = 100000;  // Pe-> ADC conv = 1.0 // ???
  fSigmaAdc         = 1;       // dAdc/Adc == 100% of PE statistics
  fAdcOffset        = 30;      // Pedestal channel number
  fNoWafers         = 36;      // Number of wafers 
  fNoSlicesPerWafer = 7;       // Number of slices/wafer 
  fNoRows           = 6;       // Number of rows 
  fNoRings          = 7 * 6;   // Number of rings (7 strips/wafer * 6 wafers) 
}

//_________________________________________________________________________
 void BrSiParameters::ListParameters() const
{
  BrMultParameters::ListParameters();
  cout << "** MultSi Parameter Listing; "
       << "The Detector name is: " << GetName() << endl
       << "Detector Parameters:" << endl   
       << " # wafers:          " << fNoWafers << endl
       << " # of slices/wafer: " << fNoSlicesPerWafer << endl;
}

//_________________________________________________________________________
 void BrSiParameters::SetASCIIParameters(Char_t *line) {
  // Interpret a line for MultSi params.
  // Form is
  //    ParamName:value. 
  // Eg
  //    fTwopar:.20 
  // or
  //    fEff:  0.95
  Char_t paramName[80];

  // Find first non-blank character in the line (in case user didn't
  // start in column 1 
  Int_t i;
  for(i = 0; i < (Int_t)strlen(line); i++)
    if(strncmp(&line[i]," ",1)) 
      break;
  
  //Copy that to ParamName
  strcpy(paramName,&line[i]);

  Char_t *iloc = strchr(paramName,':');
  Char_t *value_loc = iloc+1;

  if(!iloc) {
    cout<< "Error, ':' missing to delimate name from value"<<endl
	<< "The string is " << line << endl
	<< "No value set!!!" << endl;
    return;
  }
  
  iloc[0] = 0;    //blank out the semicolon

  //blank out space at end if it exists
  Char_t *ilocc = strchr(paramName,' ');
  if(ilocc) 
    ilocc[0] = 0;   

  // Read the number of wafers from the file
  if(!strcasecmp(paramName,"fNoWafers"))
    sscanf(value_loc,"%d",&fNoWafers);

  // Read the number of slices per wafer from the file 
  else if(!strcasecmp(paramName,"fNoSlicesPerWafer"))
    sscanf(value_loc,"%d",&fNoSlicesPerWafer);
  
  
  // Otherwise - let the base class do it's stuff
  else
    BrMultParameters::SetASCIIParameters(line);
  
  //this is a normal return
  return;      
}
//
//
// $Log: BrSiParameters.cxx,v $
// Revision 1.1.1.1  2001/06/21 14:55:00  hagel
// Initial revision of brat2
//
// Revision 1.3  2001/05/31 01:46:34  cholm
// Second rewamp of this directory.  All RDO modules use the common
// BrMultRdoModule, and they both write BrMultRdo Objects.  Also introduced
// ABC for Br[Tile|Si][Parameters|Calibration] since they have a lot in common,
// and the code can be made more efficient this way.
//
// A possible further thing to do, is to make an ABC for the CentModules, and
// the corresponding calibration modules, since they are very VERY similar.
// However, the current module BrMultCentModule is in the way.  Need to talk
// to Steve about that.
//
// Revision 1.2  2001/04/06 19:56:41  cholm
// Added some new parameteres to read from  ASCII file.
//
// Revision 1.1  2001/01/29 20:12:30  cholm
// Changed name of BrDetectorParamsMultSi to BrSiParameters since this will
// be the new naming scheme of classes in BRAT 2. The idea is to have different
// parts of a class name located at specific point in the name. At some point,
// BrDetectorParams will be renamed to BrParameters.
//
// Revision 1.5  2000/08/17 14:50:43  hito
// *** empty log message ***
//
// Revision 1.4  2000/07/26 22:08:37  hito
// Mapping of digitization for si and tile were changed to reflect the raw data
// and the change in gbrahms.
//
// Revision 1.3  2000/04/06 20:21:12  cholm
// Corrected bugs in BrDigitizeMultSi
//
// Revision 1.2  2000/03/21 21:22:19  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.1  2000/03/17 16:17:55  cholm
// Added classes BrDigitizeMultSi and BrDetectorPramMultSi for GBRAHMS simulations
//
// 
//
//

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