|
//____________________________________________________________________ // // Calibrated Hits for Beam-Beam counters // output of BrBbRdoModuleNew, meaning calibrated hits in time and energy // validated for more advanced physics (above energy threshold, // reasonable time, etc). // This is almost identical to the BrBbRdoModuleNew made by Djamel // but is in my opinion not the Rdo element from the BB that really // should hold the t0, vertex, Multiplicity,.. // The notable exception is that the radius for each hit has been removed // This is realy a constant/geometry than is know by the tubeNo. // //____________________________________________________________________ // // $Id: BrBbCalHits.cxx,v 1.1 2001/09/23 01:38:56 videbaek Exp $ // $Author: videbaek $ // $Date: 2001/09/23 01:38:56 $ // $Copyright: 2001 BRAHMS Collaboration <brahmlib@rhic.bnl.gov> // #include "BrBbCalHits.h" #include <BrIostream.h> // //____________________________________________________________________ ClassImp(BrBbCalHits); //____________________________________________________________________ BrBbCalHits::BrBbCalHits() : BrDataObject(), fBbHits("BrBbCalHits::BrBbHit", 0) { // Default constructor, do not use fArrayMult = 0; fFastestTube = 0; } //____________________________________________________________________ BrBbCalHits::BrBbCalHits(const char* name, const char* title) : BrDataObject(name, title), fBbHits("BrBbCalHits::BrBbHit", 0) { // Named constructor fArrayMult = 0; fFastestTube = 0; } //____________________________________________________________________ BrBbCalHits::~BrBbCalHits() { fBbHits.Delete(); } //____________________________________________________________________ const BrBbCalHits& BrBbCalHits::operator=(const BrBbCalHits& other) { if (this == &other) return (*this); // Make sure we have a clean array Clear(); // Assign only data member of this class. fArrayMult = other.GetArrayMult(); // Now get the subhits. Int_t n = other.GetEntries(); for (Int_t i = 0; i < n; i++) { BrBbHit* oHit = other.GetHit(i); if (!oHit) { Error("operator=", "others %d'th entry is 0 - bad!", i); break; } new(fBbHits[i]) BrBbHit(oHit->GetTubeNo(), oHit->GetTof(), oHit->GetEnergy()); } } //____________________________________________________________________ void BrBbCalHits::Clear(Option_t* option) { fArrayMult = 0; fFastestTube = 0; fBbHits.Clear(); } //____________________________________________________________________ void BrBbCalHits::Print(Option_t* option) const { // Print this data object // // Options: // A Array data // I Single data // // other options are passed on. // cout << "BrBbCalHits: " << GetName() << "(" << GetTitle() << ")" << endl; TString opt(option); opt.ToLower(); if (opt.Contains("a")) { cout << " Entries : " << setw(7) << GetEntries() << endl << " Multiplicity : " << setw(7) << fArrayMult << endl << " Fastest tube : " << setw(7) << fFastestTube << endl; for (Int_t i = 0; i < GetEntries(); i++) GetHit(i)->Print(); } } //____________________________________________________________________ void BrBbCalHits::AddHit(Int_t tube, Double_t tof, Double_t energy) { Int_t idx = fBbHits.GetLast()+1; new(fBbHits[idx]) BrBbHit(tube, tof, energy); } //____________________________________________________________________ ClassImp(BrBbCalHits::BrBbHit); //____________________________________________________________________ BrBbCalHits::BrBbHit::BrBbHit(Int_t tube, Double_t tof, Double_t energy) : fTubeNo(tube), fTof(tof), fEnergy(energy) { // Default constructor } //____________________________________________________________________ void BrBbCalHits::BrBbHit::Clear(Option_t* option) { // Clear this object fTubeNo = -1; fTof = -1; fEnergy = -1; } //____________________________________________________________________ void BrBbCalHits::BrBbHit::Print(Option_t* option) const { // Print the data cout << " Tube : " << setw(3) << fTubeNo << endl << " Tof : " << setw(7) << fTof << endl << " Energy : " << setw(7) << fEnergy << endl; } //____________________________________________________________________ // // $Log: BrBbCalHits.cxx,v $ // Revision 1.1 2001/09/23 01:38:56 videbaek // Add class BrBbCalhits very much equivalent to the BrBbRdonew by DO. // The difference is that the geometry for Bb which is trivial has been removed. // |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|