/************************************************************************** * 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. * **************************************************************************/ /* $Log$ Revision 1.8 2002/10/14 14:57:00 hristov Merging the VirtualMC branch to the main development branch (HEAD) Revision 1.6.6.1 2002/06/10 17:51:15 hristov Merged with v3-08-02 Revision 1.7 2002/04/24 22:02:31 nilsen New SDigits and Digits routines, and related changes, (including new noise values). */ #include #include #include #include "AliITSetfSDD.h" //////////////////////////////////////////////////////////////////////// // Version: 0 // Written by Piergiorgio Cerello // November 23 1999 // //_____________________________________________________________________________ ClassImp(AliITSetfSDD) Int_t ppower(Int_t b, Int_t e) { Int_t power = 1; for(Int_t i=0; i= PI) VA -= (2.*PI); if(VA <= -PI) VA += (2.*PI); //cout << "VM: " << VM << ", VA: " << VA << endl; } } if(fPoleM[k]) { Double_t VPR = -fPoleR[k]; Double_t VPI = frequency - fPoleI[k]; Double_t VPM = TMath::Sqrt(VPR*VPR+VPI*VPI); Double_t VPA = TMath::ATan2(VPI,VPR); //cout << "VPM: " << VPM << ", VPA: " << VPA << endl; //cout << "VPR: " << VPR << ", VPI: " << VPI << endl; for(j=1; j<= (Int_t) fPoleM[k]; j++) { VM /= VPM; VA -= VPA; if(VA >= PI) VA -= (2.*PI); if(VA <= -PI) VA += (2.*PI); //cout << "VM: " << VM << ", VA: " << VA << endl; } } Double_t VR = VM*cos(VA); Double_t VI = VM*sin(VA); //cout << "VM: " << VM << ", VA: " << VA << endl; //cout << "VR: " << VR << ", VI: " << VI << endl; fTfR[i] = VR*ppower(10,9); fTfI[i] = VI*ppower(10,9); //cout << "fTfR[" << i << "] = " << fTfR[i] << endl; //cout << "fTfI[" << i << "] = " << fTfI[i] << endl; if(i) { fTfR[kMaxNofSamples-i] = fTfR[i]; fTfI[kMaxNofSamples-i] = -fTfI[i]; } } } // Compute Fourier Weights for(i=0; i<=kMaxNofSamples/2; i++) { fWR[i] = cos(-2.*PI*i/kMaxNofSamples); fWI[i] = sin(-2.*PI*i/kMaxNofSamples); if(i) { fWR[kMaxNofSamples-i] = fWR[i]; fWI[kMaxNofSamples-i] = -fWI[i]; } } } void AliITSetfSDD::PrintElectronics() { cout << "Time Delay " << fTimeDelay << endl; cout << "Sampling Time " << fSamplingTime << endl; cout << "Number of Time Samples " << kMaxNofSamples << 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