14 #include <JANA/JApplication.h>
15 #include <JANA/JEventLoop.h>
56 TDirectory *
dir =
new TDirectoryFile(
"THROWN",
"THROWN");
60 pmom =
new TH1F(
"pmom",
"Thrown momentum in GeV/c",1200, 0.0, 12.0);
61 theta =
new TH1F(
"theta",
"Thrown theta in degrees",1000, 0.0, 180.0);
62 phi =
new TH1F(
"phi",
"Thrown phi in radians",200, 0.0, 2.0*M_PI);
63 energy =
new TH1F(
"energy",
"Thrown energy in GeV",1200, 0.0, 12.0);
64 pmom_vs_theta =
new TH2F(
"pmom_vs_theta",
"Thrown momentum vs. #theta",1000, 0.0, 180.0, 300, 0.0, 10.0);
65 pmom_vs_theta_pip =
new TH2F(
"pmom_vs_theta_pip",
"Thrown momentum vs. #theta for #pi^{+}",1000, 0.0, 180.0, 300, 0.0, 10.0);
66 pmom_vs_theta_pim =
new TH2F(
"pmom_vs_theta_pim",
"Thrown momentum vs. #theta for #pi^{-}",1000, 0.0, 180.0, 300, 0.0, 10.0);
67 pmom_vs_theta_Kp =
new TH2F(
"pmom_vs_theta_Kp",
"Thrown momentum vs. #theta for K^{+}",1000, 0.0, 180.0, 300, 0.0, 10.0);
68 pmom_vs_theta_Km =
new TH2F(
"pmom_vs_theta_Km",
"Thrown momentum vs. #theta for K^{-}",1000, 0.0, 180.0, 300, 0.0, 10.0);
69 pmom_vs_theta_proton =
new TH2F(
"pmom_vs_theta_proton",
"Thrown momentum vs. #theta for protons",1000, 0.0, 180.0, 300, 0.0, 10.0);
70 pmom_vs_theta_neutron =
new TH2F(
"pmom_vs_theta_neutron",
"Thrown momentum vs. #theta for neutrons",1000, 0.0, 180.0, 300, 0.0, 10.0);
71 pmom_vs_theta_gamma =
new TH2F(
"pmom_vs_theta_gamma",
"Thrown momentum vs. theta for gammas",1000, 0.0, 180.0, 300, 0.0, 10.0);
73 vertex =
new TH3F(
"vertex",
"Position of vertex from which thrown particles were thrown", 50, -5.0, 5.0, 50, -5.0, 5.0, 150, 0.0, 150.0);
75 Nparticles_per_event =
new TH1F(
"Nparticles_per_event",
"Number of thrown particles per event",21, -0.5, 20.5);
76 particle_type =
new TH1F(
"particle_type",
"GEANT3 particle type of thrown particles",101, -0.5, 100.5);
89 vector<const DMCThrown*> mcthrowns;
94 japp->RootFillLock(
this);
97 Nparticles_per_event->Fill(mcthrowns.size());
98 for(
unsigned int i=0;i<mcthrowns.size();i++){
101 pmom->Fill(mcthrown->
momentum().Mag());
102 theta->Fill(mcthrown->
momentum().Theta()*57.3);
103 phi->Fill(mcthrown->
momentum().Phi());
104 energy->Fill(mcthrown->
energy());
105 pmom_vs_theta->Fill(mcthrown->
momentum().Theta()*57.3, mcthrown->
momentum().Mag());
108 particle_type->Fill(mcthrown->
type);
110 switch(mcthrown->
type){
112 pmom_vs_theta_gamma->Fill(mcthrown->
momentum().Theta()*57.3, mcthrown->
momentum().Mag());
115 pmom_vs_theta_pip->Fill(mcthrown->
momentum().Theta()*57.3, mcthrown->
momentum().Mag());
118 pmom_vs_theta_pim->Fill(mcthrown->
momentum().Theta()*57.3, mcthrown->
momentum().Mag());
121 pmom_vs_theta_Kp->Fill(mcthrown->
momentum().Theta()*57.3, mcthrown->
momentum().Mag());
124 pmom_vs_theta_Km->Fill(mcthrown->
momentum().Theta()*57.3, mcthrown->
momentum().Mag());
127 pmom_vs_theta_neutron->Fill(mcthrown->
momentum().Theta()*57.3, mcthrown->
momentum().Mag());
130 pmom_vs_theta_proton->Fill(mcthrown->
momentum().Theta()*57.3, mcthrown->
momentum().Mag());
135 japp->RootFillUnLock(
this);
double energy(void) const
const DVector3 & position(void) const
jerror_t evnt(JEventLoop *loop, uint64_t eventnumber)
Invoked via DEventProcessor virtual method.
jerror_t erun(void)
Invoked via DEventProcessor virtual method.
~DEventProcessor_mcthrown_hists()
jerror_t init(void)
Invoked via DEventProcessor virtual method.
jerror_t fini(void)
Invoked via DEventProcessor virtual method.
DEventProcessor_mcthrown_hists()
const DVector3 & momentum(void) const
int type
GEANT particle ID.