/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /* $Id$ */ #include #include #include "AliITSetfSDD.h" //////////////////////////////////////////////////////////////////////// // Version: 0 // Written by Piergiorgio Cerello // November 23 1999 // Revised to comply with coding conventions: Nov, 21 2003 m.m. //_____________________________________________________________________________ ClassImp(AliITSetfSDD) const Int_t AliITSetfSDD::AliITSetfSDDparam::fgkMaxNofPoles = 5; const Int_t AliITSetfSDD::AliITSetfSDDparam::fgkMaxNofSamples = 1024; Int_t ppower(Int_t b, Int_t e) { Int_t power = 1; for(Int_t i=0; i= pigr) vVA -= (2.*pigr); if(vVA <= -pigr) vVA += (2.*pigr); //cout << "vVM: " << vVM << ", VA: " << vVA << endl; } } if(fPoleM[k]) { Double_t vVPR = -fPoleR[k]; Double_t vVPI = frequency - fPoleI[k]; Double_t vVPM = TMath::Sqrt(vVPR*vVPR+vVPI*vVPI); Double_t vVPA = TMath::ATan2(vVPI,vVPR); //cout << "VPM: " << vVPM << ", VPA: " << vVPA << endl; //cout << "VPR: " << vVPR << ", VPI: " << vVPI << endl; for(j=1; j<= (Int_t) fPoleM[k]; j++) { vVM /= vVPM; vVA -= vVPA; if(vVA >= pigr) vVA -= (2.*pigr); if(vVA <= -pigr) vVA += (2.*pigr); //cout << "VM: " << vVM << ", vVA: " << vVA << endl; } } Double_t vVR = vVM*cos(vVA); Double_t vVI = vVM*sin(vVA); //cout << "VM: " << vVM << ", VA: " << vVA << endl; //cout << "VR: " << vVR << ", VI: " << vVI << endl; fTfR[i] = vVR*ppower(10,9); fTfI[i] = vVI*ppower(10,9); //cout << "fTfR[" << i << "] = " << fTfR[i] << endl; //cout << "fTfI[" << i << "] = " << fTfI[i] << endl; if(i) { fTfR[AliITSetfSDDparam::NumberOfSamples()-i] = fTfR[i]; fTfI[AliITSetfSDDparam::NumberOfSamples()-i] = -fTfI[i]; } } } // Compute Fourier Weights for(i=0; i<=AliITSetfSDDparam::NumberOfSamples()/2; i++) { fWR[i] = cos(-2.*pigr*i/AliITSetfSDDparam::NumberOfSamples()); fWI[i] = sin(-2.*pigr*i/AliITSetfSDDparam::NumberOfSamples()); if(i) { fWR[AliITSetfSDDparam::NumberOfSamples()-i] = fWR[i]; fWI[AliITSetfSDDparam::NumberOfSamples()-i] = -fWI[i]; } } } //______________________________________________________________________ AliITSetfSDD::AliITSetfSDD(const AliITSetfSDD &obj) : TObject(obj) { // Copy constructor // Copies are not allowed. The method is protected to avoid misuse. Error("AliITSetfSDD","Copy constructor not allowed\n"); } //______________________________________________________________________ AliITSetfSDD& AliITSetfSDD::operator=(const AliITSetfSDD& /* obj */){ // Assignment operator // Assignment is not allowed. The method is protected to avoid misuse. Error("= operator","Assignment operator not allowed\n"); return *this; } AliITSetfSDD::~AliITSetfSDD(){ // Destructor if(fZeroM) delete []fZeroM; if(fZeroR) delete []fZeroR; if(fZeroI) delete []fZeroI; if(fPoleM) delete []fPoleM; if(fPoleR) delete []fPoleR; if(fPoleI) delete []fPoleI; if(fTfR) delete []fTfR; if(fTfI) delete []fTfI; if(fWR) delete []fWR; if(fWI) delete []fWI; } void AliITSetfSDD::PrintElectronics() const { // Printout of the parameters defining the f.e. electronics cout << "Time Delay " << fTimeDelay << endl; cout << "Sampling Time " << fSamplingTime << endl; cout << "Number of Time Samples " << AliITSetfSDDparam::NumberOfSamples() << endl; cout << "fT0 " << fT0 << endl; cout << "fDf " << fDf << endl; cout << "fA0 " << fA0 << endl; cout << "Zero's and Pole's" << endl; cout << "fZeroM " << endl; Int_t i; for(i=0; i