|
BrTpcTimeCalModuleclass description - source file - inheritance tree class BrTpcTimeCalModule : public BrTpcCalModuleprotected: Data Membersprivate: Class DescriptionClass BrTpcTimeCalModule This module atempts to correct for the row time offsets seen in the Tpcs. INPUT : The module needs tracks for the TPC, but these _HAVE_ to be done using a loose cut on the on the y search width. Example : Char_t *tpcNames[4] = {"TPM1", "TPM2", "T1", "T2"}; for(Int_t i = 1; i < 4; i++) { BrTpcTrackPackage* tpcTrackPackage = new BrTpcTrackPackage(tpcNames[i], "Hit package"); mainModule->AddModule(tpcTrackPackage); BrTpcTrackFollowModule* trackModule = (BrTpcTrackFollowModule*)tpcTrackPackage->GetTpcTrackModule(); trackModule->SetMaxRowsMissed(2); trackModule->SetSearchWidthX(0.2); trackModule->SetSearchWidthY(10.0); <-- NB! } IDEA : The idea is to assume that some rows, in the middle, are only slightly affected. We use those to refit the track and calculate the deviation in the rows close to each end as well as in the middle. HOW TO USE MODULE : Example of standard configuration for calibration use. BrTpcTimeCalModule* t1timecalModule = new BrTpcTimeCalModule("T1", "T1timerow.root"); t1timecalModule->SetMinFitHits(5); t1timecalModule->SetSaveAscii(kTRUE); t1timecalModule->SetCalibFile(Form("t1timecalib%d.txt", runOption->GetValue())); t1timecalModule->SetTreeOn(kTRUE); t1timecalModule->AddFitRow( 3, 0); <-----| t1timecalModule->AddFitRow( 4, 1); <---| | t1timecalModule->AddFitRow( 7, 2); <-| | | t1timecalModule->AddFitRow( 8, 3); <-------- Assumed good rows t1timecalModule->AddFitRow(11, 4); <-| | (row, index in array) t1timecalModule->AddFitRow(12, 5); <----| switcher->AddModule(t1timecalModule); BrTpcTimeCalModule() : BrTpcCalModule(), kMaxRows(12) Default constructor. DO NOT USE BrTpcTimeCalModule(const Char_t* name, const Char_t* title) : BrTpcCalModule(name, title), kMaxRows(12) Named Constructor void DefineHistograms() Define histograms. They are: <fill in here> void Init() Job-level initialisation void Begin() Run-level initialisation void ZeroDetectorParameters() Set Row Time Corrections in BrDetectorParamsTPC void Event(BrEventNode* inNode, BrEventNode* outNode) Per event method Bool_t IsFitHit(BrTpcHit* hit) If the row number is in fFitList return kTRUE else return kFALSE MakeNewTpcTrack(BrTpcTrackCandidate *track) Loop over hits in track twice First add all hits in fitrows and fit Second add the rest of the hits If number of fit hits is lower than fMinFitHits return 0 else return new track void FillHistograms(BrTpcTrackCandidate* track) Loop over tpc hits and fill histograms and tree, the last is optional void AddTpcHit(BrTpcTrackCandidate* track, BrTpcHit* hit) Add hit to track after converting to Time and Pad coordinates Also store it in a container so we can delete it after use void Finish() Job-level finalisation This is very the fit to the histograms are done and the output and commit is done void RemoveLowError(TProfile *hist ) Remove bins in Profile histograms where there is less than 10 counts and the gaussian approximation of errors (sqrt(n)) is bad void FindRanges(TH1D *hist, Double_t *range) Find the range where we want to fit low = first bin where n > n_max/3 high = last bin where n > n_max/3 TProfile* ProjectUsingGaus(TH2F *hist, Int_t nBins) Project the 2d histogram in small x bins (size nBins) The distribution is fitted with a gauss void SaveAscii() save pedestal to ascii file void ReadAscii() read calibration from file created by this module void Print(Option_t* option) const Print module information See BrModule::Print for options. In addition this module defines the Option: <fill in here> Inline Functionsvoid AddFitRow(Int_t row, Int_t index) void SetMinFitHits(Int_t value = 4) void SetChi2Cut(Float_t value = 50) void SetDxCut(Float_t value = 0.2) TClass* Class() TClass* IsA() const void ShowMembers(TMemberInspector& insp, char* parent) void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) BrTpcTimeCalModule BrTpcTimeCalModule(BrTpcTimeCalModule&) void ~BrTpcTimeCalModule() |
||||||
This page automatically generated by script docBrat by Christian Holm |
Copyright ; 2002 BRAHMS Collaboration
<brahmlib@rcf.rhic.bnl.gov>
|