// // $Id$ //----------------------------------------------------------------------- // // (c) Copyright 2006 by GATS, Inc., // 11864 Canon Blvd, Suite 101, Newport News VA 23606 // // All Rights Reserved. No part of this software or publication may be // reproduced, stored in a retrieval system, or transmitted, in any form // or by any means, electronic, mechanical, photocopying, recording, or // otherwise without the prior written permission of GATS, Inc. // //----------------------------------------------------------------------- // // Module: NonLinearityCorrection.cpp // // Author: John Burton // // Date: Thu May 4 17:01:31 2006 // //----------------------------------------------------------------------- // // Modification History: // // $Log$ // //----------------------------------------------------------------------- // //----------------------------------------------------------------------- // Include Files: //----------------------------------------------------------------------- // #include "ConfigFile.h" #include "EventVar.h" #include "NonLinearityCorrection.h" #include // //----------------------------------------------------------------------- // Defines and Macros: //----------------------------------------------------------------------- // // //----------------------------------------------------------------------- // Global Variables: //----------------------------------------------------------------------- // // //----------------------------------------------------------------------- // Utility Routines: //----------------------------------------------------------------------- // int NonLinearityCorrection(Event& L0, Event& L1, Event& Tmp, ConfigFile& cf) { int i; float GAcal; float GA; float CperV; int resp_op; vector SignalNames; vector Cnl; double Cnl_go; EventVarVect Signals; EventVar Band; std::cerr << "In NonLinearityCorrection \n"; SignalNames = cf.GetStrValues("Common","SignalNames"); Cnl = cf.GetRealValues("NonLinearityCorrection","Cnl"); GAcal = cf.GetReal("NonLinearityCorrection","GAcal"); GA = cf.GetReal("NonLinearityCorrection","GA"); CperV = cf.GetReal("NonLinearityCorrection","CperV"); resp_op = cf.GetInt("NonLinearityCorrection","resp_op"); L0.getEventVar("L0_DetectorSignals",Signals); // Signals.Plot("Non Linearity Correction","Input Signals"); ! Commented out to prevent flood of plots ("Smoke Test", BEM) for(i=0;iPrintVar(); Band = Band / ( 1.0 - Cnl_go * Band * GAcal / GA); // Band.Plot("NonLinearityCorrection",""); ! Commented out to prevent flood of plots ("Smoke Test", BEM) // Band->PrintVar(); // std::string name = Band->getName(); // std::cerr << name << " => " << SignalNames[i] << " => " << Cnl[i] <<"\n"; } // Signals.PrintEventVarVect(); Tmp.addEventVar(Signals); }