200 likes | 319 Views
This project focuses on designing a detailed detector setup with smearing capabilities for particle kinematics, leveraging a range of particle properties including energy (E), momentum (p), and angular parameters (theta, phi, pz). Various devices such as EMCal, HCal, and Tracker are implemented, each with specific acceptance criteria and parametrizations for accurate kinematic smearing. The goal is to enhance particle identification (PID) and event-wise kinematics through systematic testing and refined methodologies, including exceptional handling for improved robustness in simulation.
E N D
namespace Smear {…} Michael Savastio
Tree Format 1 to 1 1 to 1 1 to 1 Currently ParticleS stores E, p, theta, phi, pz, pTONLY!
The Device Class Smears exactly 1 particle-wise variable (E,p,theta,phi,pz,pT) using up to 2 of these variables to parametrize the smearing. Each device has it’s own “acceptance” in (E,p,theta,phi) space. Particles passing through here will have smeared p and theta Particles passing through here will have smeared E only E p p P Theta These particles will be smeared only by “innermost” (last added) device IP EventS E Will output only 1 EventS with only 1 instance of each particle. phi
Building a “Detector” (1) DeviceEMCal_front; EMCal_front.SetGenre(1); //this detects photons/leptons EMCal_front.SetSmearedKinematics(kE); //set kinematics to be smeared by device EMCal_front.SetParametrization("0.18*sqrt(E)"); //set parametrization EMCal_front.Accept.SetTheta(0.,pi/4.); //set acceptance in theta //similarly, you can do SetAcceptPhi(min,max), SetAcceptE(min,max) and SetAcceptP(min,max) DeviceEMCal_back; EMCal_back.SetGenre(1); EMCal_back.SetSmearedKinematics(kE); EMCal_back.SetParametrization("0.25*sqrt(E)"); EMCal_back.Accept.SetTheta(3.*pi/4.,pi); //set acceptance in theta DeviceHCal; HCal.SetGenre(2); //this detects hadrons HCal.SetSmearedKinematics(kE); HCal.SetParametrization("0.35*sqrt(E)");
Building a “Detector” (2) DeviceThetaD; //by default devices don't care whether hadron/lepton/gauge boson ThetaD.SetSmearedKinematics(kTheta); ThetaD.SetParametrization(”sqrt(9.e-8+pow(9.e-4/P,2))/sqrt(sin(theta))"); //can use 2d parametrizations Device Tracker; Tracker.SetSmearedKinematics(kP); Tracker.SetParametrization("0.0085*P+0.0025*P*P"); Detector Test; Test.AddDevice(EMCal_front); //add the EMCal to the detector Test.AddDevice(EMCal_back); Test.AddDevice(HCal); Test.AddDevice(ThetaD); Test.AddDevice(Tracker); Test.SetPID(true); //turn on PID (still limited but works!) Test.SetEventKinematicsCalculator("NM JB DA"); //set how to calculate event kinematcs. Can use scattered electron (null momentum approximation NM), Jacquet-Blondel or Double Angle. Now in root: gSystem->Load(“BuildTree.so”); .L MyDetector.cxx SmearTree(MyDetector(),”filename”) To view in interpreter, for example: TTree t; t.AddFriend(“EICTree”,”originaltree.root”) t.AddFriend(“Smeared”,”smearedtree.smear.root”) t.Draw(“EICTree.x:Smeared.x”,”EICTree.QSquared>10”)
Currently Available Smear::Detector Setups All with default 4*pi acceptance.
E Pythia 20x250 ZEUS ZEUS STAR STAR
p Pythia 20x250 ZEUS ZEUS STAR STAR
θ Pythia 20x250 ZEUS ZEUS STAR STAR
Event-Wise Kinematics Pythia 20x250 ZEUS STAR Methods Available: NM (using scattered electron in the Null Momentum approximation) JB (Jacquet-Blondel, using hadronic system) DA (Double Angle, using hadronic system)
Particle ID π+ π- PID not Generated: Momentum outside range of validity p+ K+ K- unidentified Based on HERMES RICH P-matrices (shown on grid above)
TO DO • Thoroughly test event-wise kinematics (NM, JB and DA). Determine appropriate phasespace cuts. • Fix anomalous (but very minor) stability issues. These may be CINT memory management issues. • Overhaul PID to be far more flexible. Currently based on HERMES RICH format. Software-wise, this is the most labor intensive remaining task. • Improvements and testing for exception handling (especially with limited acceptance). Make more educated decisions about default conventions. • Gather parametrizations (help welcome!). • Electron bremsstrahlung
UPDATE • Event Kinematics are fixed, all methods now work reliably (using scattered electron, or hadronic system). • Improved exception handling, especially for event kinematics. • Particle ID has been completely rewritten and is now much more versatile. • Specialized “Devices” (tracking, calorimetry). • Arbitrary acceptance cuts. • Acceptance of specific particles. • Smearing of arbitrary functions of particle kinematics. • Many improvements to make scripting simpler.
Building a “Detector” (Update,1) EMCalorimeterEMCal(0.18); EMCal.Accept.SetTheta(0.,pi/4.); //set acceptance in theta EMCal.Accept.AddZone(); EMCal.Accept.SetTheta(3.*pi/4.,pi,1); //similarly, you can do Accept.SetPhi(min,max), Accept.SetE(min,max) and Accept.SetP(min,max) HCalorimeterHCal(0.35); //this has parametrization “0.35*sqrt(E)” DeviceThetaD(kTheta,”sqrt(9.e-8+pow(9.e-4/P,2))/sqrt(sin(theta))”); Device Tracking(kP,”0.001*P+0.001*P*P”); ParticleIDIdent(“Pmatrixfile.dat”); Ident.GetAcceptanceFromDevice(EMCal); //ParticleID is now declared like a device, and has its own acceptance. You can use arbitrarily many. Detector Example; Example = Example << EMCal << HCal << ThetaD << Tracking << Ident; Example = Example << “NM JB DA”; //use all 3 event methods
Some New Features Devious Arbitrary(“1./P”,”0.0085*P+0.0025*P*P”); //the Devious class allows you to smear a function of kinematics. This smears 1/p Arbitrary.Accept.SetPt(0.,50.); //this cut requires p_{T}\in[0,50] GeV Arbitrary.Accept.AddCustomAcceptance(“P*sin(theta)”,0.,50.); //equivalent to the above Arbitrary.Accept.AddParticle(321); //now this accepts K^+ ONLY Arbitrary.Accept.AddParticle(-321); //now it accepts K^+ and K^- only Tracker Track; Track.SetRadii(0.01,3.); //this is a tracker with inner radius 1cm, outer radius 3m Track.SetLength(6.); //and length 6m Track.SetDimensions(0.01,2.,6.); //this is equivalent to the above two lines Device CrazyExample(kE,”0.01*E”); CrazyExample.SetDistribution("pow(sin([1]*x+[0]),2)"); //smears according to arbitrary distribution. [0] is original value of E and [1] is given by parametrization. Example = Example << Arbitrary << Track; Now with extensive documentation: https://wiki.bnl.gov/eic/index.php/Namespace_Smear
x STAR 20x100
Q2 STAR 20x100
Why it’s so screwed up STAR 20x100 Smearing goes as p2
What Now? • Where does Smearing end and GEANT begin? • What can Smear be used for, what can it not be used for? • From now on, code will be maintained by Thomas Burton.