EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Smear::Detector Class Reference

#include <eic-smear/blob/master/include/eicsmear/smear/Detector.h>

+ Inheritance diagram for Smear::Detector:
+ Collaboration diagram for Smear::Detector:

Public Member Functions

 Detector ()
 
 Detector (const Detector &)
 
Detectoroperator= (const Detector &)
 
virtual ~Detector ()
 
void AddDevice (Smearer &device)
 
void SetEventKinematicsCalculator (TString)
 
void DeleteAllDevices ()
 
SmearerGetDevice (int index)
 
UInt_t GetNDevices () const
 
void FillEventKinematics (Event *event)
 
ParticleMCSSmear (const erhic::VirtualParticle &) const
 
virtual void Print (Option_t *="") const
 
std::list< Smear::Smearer * > Accept (const erhic::VirtualParticle &) const
 
virtual void SetLegacyMode (const bool mode=true)
 
virtual bool GetLegacyMode () const
 

Protected Member Functions

std::vector< Smear::Smearer * > CopyDevices () const
 

Protected Attributes

bool LegacyMode =false
 
bool useNM
 
bool useJB
 
bool useDA
 
std::vector< Smearer * > Devices
 

Detailed Description

The detector structure. A detector posseses a collection of Smearer objects, each smearing some variable(s). It contains a detector-level smearing function which applies smearing of all its devices to the provided ParticleMCS. The detector can also generate event-wise smeared kinematics if provided with smeared particles from that event.

Definition at line 44 of file Detector.h.

View newest version in sPHENIX GitHub at line 44 of file Detector.h

Constructor & Destructor Documentation

Smear::Detector::Detector ( )

Default contructor.

Definition at line 31 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 31 of file Detector.cxx

Smear::Detector::Detector ( const Detector other)

Copy constructor.

Definition at line 37 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 37 of file Detector.cxx

References CopyDevices(), Devices, GetLegacyMode(), LegacyMode, useDA, useJB, and useNM.

+ Here is the call graph for this function:

Smear::Detector::~Detector ( )
virtual

Destructor.

Definition at line 57 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 57 of file Detector.cxx

References DeleteAllDevices().

+ Here is the call graph for this function:

Member Function Documentation

std::list< Smearer * > Smear::Detector::Accept ( const erhic::VirtualParticle p) const

Returns the list of devices in this detector that accept a particle.

Definition at line 121 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 121 of file Detector.cxx

References Devices, and erhic::VirtualParticle::GetStatus().

Referenced by Smear().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Smear::Detector::AddDevice ( Smearer device)

Adds a copy of the smearing device to this detector. The detector will use all its devices when applying smearing.

Definition at line 69 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 69 of file Detector.cxx

References Smear::Smearer::Clone(), and Devices.

Referenced by AssembleCoreTracker(), BuildBeAST_0_0(), BuildBeAST_0_1(), BuildCore_0_1(), BuildCore_0_1_B3T(), BuildePHENIX_0_0(), BuildeSTAR_0_0(), BuildHandBook_1_2(), BuildJLEIC_0_1(), BuildMatrixDetector_0_1(), BuildMatrixDetector_0_1_FF(), BuildMatrixDetector_0_1_TOF(), BuildMatrixDetector_0_2_B1_5T(), BuildMatrixDetector_0_2_B3T(), BuildPerfectDetector(), BuildSTAR_0_0(), BuildTrackingPreview_0_2_B1_5T(), BuildTrackingPreview_0_2_B3T(), BuildWithTof(), BuildZEUS_0_0(), and EicSmearTask::Init().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::vector< Smearer * > Smear::Detector::CopyDevices ( ) const
protected

Returns pointers to new copies of all devices.

Definition at line 311 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 311 of file Detector.cxx

References Devices, and it.

Referenced by Detector(), and operator=().

+ Here is the caller graph for this function:

void Smear::Detector::DeleteAllDevices ( )

Delete all devices in the detector.

Definition at line 61 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 61 of file Detector.cxx

References Devices, and GetNDevices().

Referenced by ~Detector().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void Smear::Detector::FillEventKinematics ( Event event)

Calculate event-wise smeared kinematics for an event which has already had its particles smeared and stored in eventS. Newly calculated values are stored in eventS.

This uses the null momentum (m->0) approximation for the scattered lepton, so you should be careful about using low energy muons, and if for some strange reason you want to use taus, this probably won't work too well.

Also, the smeared lepton momentum (as opposed to energy) is used in the assumption that its smearing is less severe.

Definition at line 88 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 88 of file Detector.cxx

References erhic::LeptonKinematicsComputer::Calculate(), erhic::JacquetBlondelComputer::Calculate(), erhic::DoubleAngleComputer::Calculate(), Smear::Event::ScatteredLepton(), erhic::EventDis::SetDoubleAngleKinematics(), erhic::EventDis::SetJacquetBlondelKinematics(), erhic::EventDis::SetLeptonKinematics(), useDA, useJB, and useNM.

Referenced by Smear::EventDisFactory::Create().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Smearer * Smear::Detector::GetDevice ( int  index)

Return a pointer to device number n from the detector. Devices are labeled in the order in which they are added minus 1. Do not delete the returned pointer.

Definition at line 80 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 80 of file Detector.cxx

References Devices.

bool Smear::Detector::GetLegacyMode ( ) const
virtual

Check status of legacy mode.

Definition at line 334 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 334 of file Detector.cxx

References LegacyMode.

Referenced by Detector(), and operator=().

+ Here is the caller graph for this function:

UInt_t Smear::Detector::GetNDevices ( ) const
inline

Returns the number of devices in the detector

Definition at line 160 of file Detector.h.

View newest version in sPHENIX GitHub at line 160 of file Detector.h

References Devices.

Referenced by DeleteAllDevices(), main(), and Print().

+ Here is the caller graph for this function:

Detector & Smear::Detector::operator= ( const Detector that)

Assignment operator.

Definition at line 46 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 46 of file Detector.cxx

References CopyDevices(), Devices, GetLegacyMode(), LegacyMode, useDA, useJB, and useNM.

+ Here is the call graph for this function:

void Smear::Detector::Print ( Option_t *  o = "") const
virtual

Print information about all smearers to standard output.

Definition at line 321 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 321 of file Detector.cxx

References Devices, and GetNDevices().

+ Here is the call graph for this function:

void Smear::Detector::SetEventKinematicsCalculator ( TString  s)

Set the method for calculating event kinematics if FillEventKinematics is used. String must contain "NM" for null momentum approximation (using scattered lepton), "JB" for Jacquet Blondel method, or "DA" for double angle method. Strings not containing one of these turns the method off.

Remarks
Simply accessing the EventKinematicsComputer may be more straightforward

Definition at line 73 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 73 of file Detector.cxx

References useDA, useJB, and useNM.

Referenced by BuildBeAST_0_0(), BuildBeAST_0_1(), BuildCore_0_1(), BuildCore_0_1_B3T(), BuildePHENIX_0_0(), BuildeSTAR_0_0(), BuildHandBook_1_2(), BuildJLEIC_0_1(), BuildMatrixDetector_0_1(), BuildMatrixDetector_0_1_FF(), BuildMatrixDetector_0_1_TOF(), BuildMatrixDetector_0_2_B1_5T(), BuildMatrixDetector_0_2_B3T(), BuildPerfectDetector(), BuildSTAR_0_0(), BuildTrackingPreview_0_2_B1_5T(), BuildTrackingPreview_0_2_B3T(), BuildWithTof(), BuildZEUS_0_0(), and EicSmearTask::Init().

+ Here is the caller graph for this function:

void Smear::Detector::SetLegacyMode ( const bool  mode = true)
virtual

Turn off consistency checks and momentum regularization in Smear(). Use only for legacy smear scripts from earlier versions (<~1.0.4)

Definition at line 327 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 327 of file Detector.cxx

References LegacyMode.

ParticleMCS * Smear::Detector::Smear ( const erhic::VirtualParticle prt) const

Detector level particle smearing. Returns a pointer to a new smeared particle, which is a version of the input Particle that has been smeared by all the detector's devices. Smearing is only be applied to final-state particles. If the input particle is unstable or an initial- or intermediate- state particle, returns a null ParticleS pointer.

Definition at line 137 of file Detector.cxx.

View newest version in sPHENIX GitHub at line 137 of file Detector.cxx

References kdfinder::abs(), Accept(), cos(), Acts::UnitConstants::e, erhic::VirtualParticle::GetEta(), Smear::ParticleMCS::GetP(), Smear::ParticleMCS::GetPhi(), Smear::ParticleMCS::GetPt(), Smear::ParticleMCS::GetPx(), Smear::ParticleMCS::GetPy(), Smear::ParticleMCS::GetPz(), Smear::ParticleMCS::GetTheta(), erhic::VirtualParticle::Id(), Smear::ParticleMCS::IsPhiSmeared(), Smear::ParticleMCS::IsPSmeared(), Smear::ParticleMCS::IsPtSmeared(), Smear::ParticleMCS::IsPxSmeared(), Smear::ParticleMCS::IsPySmeared(), Smear::ParticleMCS::IsPzSmeared(), Smear::ParticleMCS::IsSmeared(), Smear::ParticleMCS::IsThetaSmeared(), LegacyMode, Smear::ParticleMCS::SetP(), Smear::ParticleMCS::SetPhi(), Smear::ParticleMCS::SetPt(), Smear::ParticleMCS::SetPx(), Smear::ParticleMCS::SetPy(), Smear::ParticleMCS::SetPz(), Smear::ParticleMCS::SetSmeared(), and Smear::ParticleMCS::SetTheta().

Referenced by Smear::EventDisFactory::Create(), Smear::HadronicEventBuilder::Create(), and DoSmearStep().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::vector<Smearer*> Smear::Detector::Devices
protected

Definition at line 155 of file Detector.h.

View newest version in sPHENIX GitHub at line 155 of file Detector.h

Referenced by Accept(), AddDevice(), CopyDevices(), DeleteAllDevices(), Detector(), GetDevice(), GetNDevices(), operator=(), and Print().

bool Smear::Detector::LegacyMode =false
protected

Definition at line 150 of file Detector.h.

View newest version in sPHENIX GitHub at line 150 of file Detector.h

Referenced by Detector(), GetLegacyMode(), operator=(), SetLegacyMode(), and Smear().

bool Smear::Detector::useDA
protected

Definition at line 154 of file Detector.h.

View newest version in sPHENIX GitHub at line 154 of file Detector.h

Referenced by Detector(), FillEventKinematics(), operator=(), and SetEventKinematicsCalculator().

bool Smear::Detector::useJB
protected

Definition at line 153 of file Detector.h.

View newest version in sPHENIX GitHub at line 153 of file Detector.h

Referenced by Detector(), FillEventKinematics(), operator=(), and SetEventKinematicsCalculator().

bool Smear::Detector::useNM
protected

Definition at line 152 of file Detector.h.

View newest version in sPHENIX GitHub at line 152 of file Detector.h

Referenced by Detector(), FillEventKinematics(), operator=(), and SetEventKinematicsCalculator().


The documentation for this class was generated from the following files: