// ----------------------------------------------------------------------------
// $Id: LCDIPSmear.cxx,v 1.1 2001/05/10 17:56:00 toshi Exp $
// ----------------------------------------------------------------------------
//
// $Log: LCDIPSmear.cxx,v $
// Revision 1.1 2001/05/10 17:56:00 toshi
// Changes C++ name convention from *.C to *.cxx to allow Windows usage.
//
//
#include "LCDIPSmear.h"
#include "LCDBeam.h"
//______________________________________________________________________
//
// LCDIPSmear
//
// Smear IP position
ClassImp(LCDIPSmear)
//______________________________________________________________________
LCDIPSmear::LCDIPSmear(LCDGetParameters* gp){
// constructor: sets up track smearer
SetLCDGetParameters(gp);
}
//______________________________________________________________________
//______________________________________________________________________
void LCDIPSmear::SetLCDGetParameters(LCDGetParameters* gp){
// constructor: sets up track smearer
m_sigma_IPx = gp->GetIPSigmaX();
m_sigma_IPy = gp->GetIPSigmaY();
m_sigma_IPz = gp->GetIPSigmaZ();
}
//______________________________________________________________________
//----------------------------------------------------------------------
void LCDIPSmear::Doit(LCDEvent* event) {
LCDBeam* beam=event->BEAM();
//Correct T.Abe Apr. 12, 2001
//TVector3 oldIP = m_beam->GetPos();
//Double_t dIP_x = m_random.Gaus(0.,m_sigma_IPx);
//Double_t dIP_y = m_random.Gaus(0.,m_sigma_IPy);
//Double_t dIP_z = m_random.Gaus(0.,m_sigma_IPz);
//Double_t newX = oldIP.X() + dIP_x;
//Double_t newY = oldIP.Y() + dIP_y;
//Double_t newZ = oldIP.Z() + dIP_z;
Double_t newX = m_random.Gaus(0.,m_sigma_IPx);
Double_t newY = m_random.Gaus(0.,m_sigma_IPy);
Double_t newZ = m_random.Gaus(0.,m_sigma_IPz);
TVector3 newIP(newX, newY, newZ);
beam->SetPos(newIP);
Double_t dpos[6];
dpos[0] = m_sigma_IPx*m_sigma_IPx;
dpos[1] = 0.;
dpos[2] = m_sigma_IPy*m_sigma_IPy;
dpos[3] = 0.;
dpos[4] = 0.;
dpos[5] = m_sigma_IPz*m_sigma_IPz;
beam->SetdPos(dpos);
}
//______________________________________________________________________
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.