Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
JEventProcessor_FCAL_Pi0HFA.cc
Go to the documentation of this file.
1 // $Id$
2 //
3 // File: JEventProcessor_FCAL_Pi0HFA.cc
4 // Created: Wed Aug 30 16:23:49 EDT 2017
5 // Creator: mstaib (on Linux egbert 2.6.32-696.10.1.el6.x86_64 x86_64)
6 //
7 
9 using namespace jana;
10 
11 
12 // Routine used to create our JEventProcessor
13 #include <JANA/JApplication.h>
14 #include <JANA/JFactory.h>
15 extern "C"{
16 void InitPlugin(JApplication *app){
17  InitJANAPlugin(app);
18  app->AddProcessor(new JEventProcessor_FCAL_Pi0HFA());
19 }
20 } // "C"
21 
22 
23 //------------------
24 // JEventProcessor_FCAL_Pi0HFA (Constructor)
25 //------------------
27 {
28 
29 }
30 
31 //------------------
32 // ~JEventProcessor_FCAL_Pi0HFA (Destructor)
33 //------------------
35 {
36 
37 }
38 
39 //------------------
40 // init
41 //------------------
43 {
44  // This is called once at program startup.
45 
46  gDirectory->mkdir("FCAL_Pi0HFA");
47  gDirectory->cd("FCAL_Pi0HFA");
48  hCurrentGainConstants = new TProfile("CurrentGainConstants", "Current Gain Constants", 2800, -0.5, 2799.5);
49  gDirectory->cd("..");
50 
51  return NOERROR;
52 }
53 
54 //------------------
55 // brun
56 //------------------
57 jerror_t JEventProcessor_FCAL_Pi0HFA::brun(JEventLoop *eventLoop, int32_t runnumber)
58 {
59  // This is called whenever the run number changes
60 
61  // Put the current gain constants into the output file
62  vector< double > raw_gains;
63  // This is called whenever the run number changes
64  eventLoop->GetCalib("/FCAL/gains", raw_gains);
65  for (unsigned int i=0; i<raw_gains.size(); i++){
66  hCurrentGainConstants->Fill(i,raw_gains[i]);
67  }
68 
69 
70  return NOERROR;
71 }
72 
73 //------------------
74 // evnt
75 //------------------
76 jerror_t JEventProcessor_FCAL_Pi0HFA::evnt(JEventLoop *loop, uint64_t eventnumber)
77 {
78  // This is called for every event. Use of common resources like writing
79  // to a file or filling a histogram should be mutex protected. Using
80  // loop->Get(...) to get reconstructed objects (and thereby activating the
81  // reconstruction algorithm) should be done outside of any mutex lock
82  // since multiple threads may call this method at the same time.
83  // Here's an example:
84  //
85  // vector<const MyDataClass*> mydataclasses;
86  // loop->Get(mydataclasses);
87  //
88  // japp->RootFillLock(this);
89  // ... fill historgrams or trees ...
90  // japp->RootFillUnLock(this);
91 
92  vector<const DNeutralParticle *> neutralParticleVector;
93  loop->Get(neutralParticleVector);
94  vector< const DNeutralShower* > neutralShowers;
95  loop->Get( neutralShowers );
96  vector< const DFCALShower* > locFCALShowers;
97  loop->Get(locFCALShowers);
98  vector< const DFCALCluster* > locFCALClusters;
99  loop->Get(locFCALClusters);
100 
101  // Cut at most 6 neutral particles
102  if (neutralParticleVector.size() > 6 || neutralParticleVector.size() < 2) return NOERROR;
103 
104  for (unsigned int i=0; i< neutralParticleVector.size() - 1; i++){
105  //const DNeutralParticleHypothesis *photon1 = neutralParticleVector[i]->Get_Hypothesis(Gamma);
106  // Go into the FCAL shower and find the largest energy deposition
107  const DNeutralParticleHypothesis *photon1 = neutralParticleVector[i]->Get_Hypothesis(Gamma);
108 
109  const DNeutralShower *shower1 =neutralShowers[i];
110 
111  //const DNeutralShower *shower1 = NULL;
112  //photon1->GetSingle(shower1);
113  //if( shower1 == NULL ) continue;
114 
115  //shower needs to come from FCAL
116  if(shower1->dDetectorSystem != SYS_FCAL) continue;
117 
118  //DFCALShower *fcalShower1 = (DFCALShower *) shower1->dBCALFCALShower;
119  const DFCALShower *fcalShower1=locFCALShowers[i];
120 
121  //const DFCALCluster* fcalCluster1 = locFCALClusters[i];
122 
123  /* OLD METHOD
124  const DFCALCluster* fcalCluster1 = NULL;
125  fcalShower1->GetSingle( fcalCluster1 );
126  if( fcalCluster1 == NULL ) continue;
127 
128  int hits1 = fcalCluster1->getHits();
129 
130  int ch1=fcalCluster1->getChannelEmax();
131 
132  double cluster1E=fcalCluster1->getEnergy();
133  int nHits1=fcalCluster1->getHits();
134 
135  double xShower1=fcalShower1->getPosition().X();
136  double yShower1=fcalShower1->getPosition().Y();
137  double radiusShower1=sqrt(pow(xShower1,2)+pow(yShower1,2));
138 
139  double frac1 = fcalCluster1->getEmax()/fcalCluster1->getEnergy();
140  if(fcalCluster1->getEnergy() < 0.8) continue;
141  */
142 
143  for (unsigned int j=i+1; j< neutralParticleVector.size(); j++){
144  const DNeutralParticleHypothesis *photon2 = neutralParticleVector[j]->Get_Hypothesis(Gamma);
145 
146  const DNeutralShower *shower2 =neutralShowers[j];
147 
148  //const DNeutralShower *shower2 = NULL;
149  //photon2->GetSingle(shower1);
150  //if( shower2 == NULL ) continue;
151 
152  //shower needs to come from FCAL
153  if(shower2->dDetectorSystem != SYS_FCAL) continue;
154 
155  //DFCALShower *fcalShower2 = (DFCALShower *) shower2->dBCALFCALShower;
156  const DFCALShower *fcalShower2=locFCALShowers[j];
157 
158  /*
159  const DFCALCluster* fcalCluster2 = NULL;
160  fcalShower2->GetSingle( fcalCluster2 );
161  if( fcalCluster2 == NULL ) continue;
162  */
163 
164  vector<const DFCALCluster*> associated_clusters1;
165  fcalShower2->Get(associated_clusters1);
166  vector<const DFCALCluster*> associated_clusters2;
167  fcalShower2->Get(associated_clusters2);
168 
169  double xShower2=fcalShower2->getPosition().X();
170  double yShower2=fcalShower2->getPosition().Y();
171  double radiusShower2=sqrt(pow(xShower2,2)+pow(yShower2,2));
172 
173  double xShower1=fcalShower1->getPosition().X();
174  double yShower1=fcalShower1->getPosition().Y();
175  double radiusShower1=sqrt(pow(xShower1,2)+pow(yShower1,2));
176 
177  double pi0Mass = (photon1->lorentzMomentum() + photon2->lorentzMomentum()).M();
178 
179  for(unsigned int loc_j = 0; loc_j < associated_clusters1.size(); loc_j++)
180  {
181  for(unsigned int loc_jj = 0; loc_jj < associated_clusters2.size(); loc_jj++)
182  {
183 
184  vector< DFCALCluster::DFCALClusterHit_t > hits1 = associated_clusters1[loc_j]->GetHits();
185  vector< DFCALCluster::DFCALClusterHit_t > hits2 = associated_clusters2[loc_jj]->GetHits();
186 
187  Int_t numhits_per_cluster1 = associated_clusters1[loc_j]->GetNHits();
188  Int_t numhits_per_cluster2 = associated_clusters2[loc_jj]->GetNHits();
189  double hitEnergyMax1=associated_clusters1[loc_j]->getEmax();
190  double hitEnergyMax2=associated_clusters1[loc_j]->getEmax();
191 
192  double frac1 = associated_clusters1[loc_j]->getEmax()/associated_clusters1[loc_j]->getEnergy();
193  if(associated_clusters1[loc_j]->getEnergy() < 0.8) continue;
194 
195  double frac2 = associated_clusters2[loc_jj]->getEmax()/associated_clusters2[loc_jj]->getEnergy();
196  if(associated_clusters2[loc_jj]->getEnergy() < 0.8) continue;
197 
198  if (numhits_per_cluster1<1) continue;
199 
200  double energry1[numhits_per_cluster1];
201  double fEmax1=0, eMax1=0;
202  int chMax1=0, fChannelEmax1=0;
203  for( int i = 0; i < numhits_per_cluster1; ++i ){
204  energry1[i]=hits1[i].E;
205  eMax1=hits1[i].E;
206  chMax1=hits1[i].ch;
207  if (fabs(eMax1-fEmax1) > 0.001) {
208  fEmax1 = eMax1;
209  fChannelEmax1 = chMax1;
210  }
211  Fill1DHistogram("FCAL_Pi0HFA","","eMax",
212  fEmax1,
213  "#pi^{0} Mass; #pi^{0} Mass;",
214  500, 0.05, 04);
215  }
216 
217  double energry2[numhits_per_cluster2];
218  double fEmax2=0, eMax2=0;
219  int chMax2=0, fChannelEmax2=0;
220  for( int i = 0; i < numhits_per_cluster2; ++i ){
221  energry2[i]=hits2[i].E;
222  eMax2=hits2[i].E;
223  chMax2=hits2[i].ch;
224  if (fabs(eMax2-fEmax2) > 0.001) {
225  fEmax2 = eMax2;
226  fChannelEmax2 = chMax2;
227  }
228  Fill1DHistogram("FCAL_Pi0HFA","","eMax",
229  fEmax2,
230  "#pi^{0} Mass; #pi^{0} Mass;",
231  500, 0.05, 04);
232  }
233 
234  int ch1 = chMax1;
235  int ch2 = chMax2;
236  double avgE = 0.5*associated_clusters1[loc_j]->getEnergy() + 0.5*associated_clusters2[loc_jj]->getEnergy();
237 
238  if(radiusShower1>20.785 || radiusShower2>20.785){
239  Fill1DHistogram("FCAL_Pi0HFA","","Pi0Mass",
240  pi0Mass,
241  "#pi^{0} Mass; #pi^{0} Mass;",
242  500, 0.05, 0.7);
243 
244  }
245  if(frac1 > 0.5){
246  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsChNum",
247  ch1, pi0Mass,
248  "#pi^{0} Mass Vs. Channel Number; CCDB Index; #pi^{0} Mass",
249  2800, -0.5, 2799.5, 200, 0.00, 0.5);
250 
251  if(radiusShower2<108.4239 && radiusShower2>20.785){
252  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsChNum_Fid",
253  ch1, pi0Mass,
254  "#pi^{0} Mass Vs. Channel Number; CCDB Index; #pi^{0} Mass",
255  2800, -0.5, 2799.5, 200, 0.00, 0.5);
256  if(radiusShower1<108.4239 && radiusShower1>20.785){
257  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsChNum_FidBoth",
258  ch1, pi0Mass,
259  "#pi^{0} Mass Vs. Channel Number; CCDB Index; #pi^{0} Mass",
260  2800, -0.5, 2799.5, 200, 0.00, 0.5);
261  }
262  }
263  if(radiusShower1<20.785 || radiusShower2<20.785){
264  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsChNum_InnerRing",
265  ch1, pi0Mass,
266  "#pi^{0} Mass Vs. Channel Number; CCDB Index; #pi^{0} Mass",
267  2800, -0.5, 2799.5, 200, 0.00, 0.5);
268  }
269 
270  }
271  if(frac2 > 0.5){
272  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsChNum",
273  ch2, pi0Mass,
274  "#pi^{0} Mass Vs. Channel Number; CCDB Index; #pi^{0} Mass",
275  2800, -0.5, 2799.5, 200, 0.00, 0.5);
276  if(radiusShower1<108.4239 && radiusShower1>20.785){
277  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsChNum_Fid",
278  ch2, pi0Mass,
279  "#pi^{0} Mass Vs. Channel Number; CCDB Index; #pi^{0} Mass",
280  2800, -0.5, 2799.5, 200, 0.00, 0.5);
281  if(radiusShower2<108.4239 && radiusShower2>20.785){
282  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsChNum_FidBoth",
283  ch2, pi0Mass,
284  "#pi^{0} Mass Vs. Channel Number; CCDB Index; #pi^{0} Mass",
285  2800, -0.5, 2799.5, 200, 0.00, 0.5);
286  }
287  }
288  if(radiusShower1<20.785 || radiusShower2<20.785){
289  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsChNum_InnerRing",
290  ch1, pi0Mass,
291  "#pi^{0} Mass Vs. Channel Number; CCDB Index; #pi^{0} Mass",
292  2800, -0.5, 2799.5, 200, 0.00, 0.5);
293  }
294 
295  }
296  // Energy Weighted Pi0 Mass
297  for(auto hit : associated_clusters1[loc_j]->GetHits()){
298  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeighted",
299  hit.ch, pi0Mass, hit.E / associated_clusters1[loc_j]->getEnergy(),
300  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
301  2800, -0.5, 2799.5, 200, 0.00, 0.5);
302  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeightedSquared",
303  hit.ch, pi0Mass, (hit.E / associated_clusters1[loc_j]->getEnergy())*(hit.E / associated_clusters1[loc_j]->getEnergy()),
304  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
305  2800, -0.5, 2799.5, 200, 0.00, 0.5);
306  if(radiusShower2<108.4239 && radiusShower2>20.785){
307  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeighted_Fid",
308  hit.ch, pi0Mass, hit.E / associated_clusters1[loc_j]->getEnergy(),
309  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
310  2800, -0.5, 2799.5, 200, 0.00, 0.5);
311  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeightedSquared_Fid",
312  hit.ch, pi0Mass, (hit.E / associated_clusters1[loc_j]->getEnergy())*(hit.E / associated_clusters1[loc_j]->getEnergy()),
313  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
314  2800, -0.5, 2799.5, 200, 0.00, 0.5);
315  if(radiusShower1<108.4239 && radiusShower1>20.785){
316  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeighted_FidBoth",
317  hit.ch, pi0Mass, hit.E / associated_clusters1[loc_j]->getEnergy(),
318  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
319  2800, -0.5, 2799.5, 200, 0.00, 0.5);
320  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeightedSquared_FidBoth",
321  hit.ch, pi0Mass, (hit.E / associated_clusters1[loc_j]->getEnergy())*(hit.E / associated_clusters1[loc_j]->getEnergy()),
322  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
323  2800, -0.5, 2799.5, 200, 0.00, 0.5);
324  }
325  }
326 
327  }
328 
329  for(auto hit : associated_clusters2[loc_jj]->GetHits()){
330  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeighted",
331  hit.ch, pi0Mass, hit.E / associated_clusters2[loc_jj]->getEnergy(),
332  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
333  2800, -0.5, 2799.5, 200, 0.00, 0.5);
334  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeightedSquared",
335  hit.ch, pi0Mass, (hit.E / associated_clusters2[loc_jj]->getEnergy())*(hit.E / associated_clusters2[loc_jj]->getEnergy()),
336  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
337  2800, -0.5, 2799.5, 200, 0.00, 0.5);
338  if(radiusShower1<108.4239 && radiusShower1>20.785){
339  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeighted_Fid",
340  hit.ch, pi0Mass, hit.E / associated_clusters2[loc_jj]->getEnergy(),
341  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
342  2800, -0.5, 2799.5, 200, 0.00, 0.5);
343  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeightedSquared_Fid",
344  hit.ch, pi0Mass, (hit.E / associated_clusters2[loc_jj]->getEnergy())*(hit.E / associated_clusters2[loc_jj]->getEnergy()),
345  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
346  2800, -0.5, 2799.5, 200, 0.00, 0.5);
347  if(radiusShower2<108.4239 && radiusShower2>20.785){
348  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeighted_FidBoth",
349  hit.ch, pi0Mass, hit.E / associated_clusters2[loc_jj]->getEnergy(),
350  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
351  2800, -0.5, 2799.5, 200, 0.00, 0.5);
352  Fill2DWeightedHistogram("FCAL_Pi0HFA","","Pi0MassVsChNumWeightedSquared_FidBoth",
353  hit.ch, pi0Mass, (hit.E / associated_clusters2[loc_jj]->getEnergy())*(hit.E / associated_clusters2[loc_jj]->getEnergy()),
354  "#pi^{0} Mass Vs. Channel Number Weighted; CCDB Index; #pi^{0} Mass",
355  2800, -0.5, 2799.5, 200, 0.00, 0.5);
356  }
357  }
358 
359  }
360 
361  if (fabs(associated_clusters1[loc_j]->getEnergy() - associated_clusters2[loc_jj]->getEnergy()) < 0.25){
362  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE",
363  avgE, pi0Mass,
364  "#pi^{0} Mass Vs. Average Shower Energy; Avg. Cluster Energy; #pi^{0} Mass",
365  100, 0.0, 10.0, 100, 0.05, 0.25);
366  if(radiusShower2<108.4239 && radiusShower2>20.785){
367  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE_Fiducial",
368  avgE, pi0Mass,
369  "#pi^{0} Mass Vs. Average Shower Energy; Avg. Cluster Energy; #pi^{0} Mass",
370  100, 0.0, 10.0, 100, 0.05, 0.25);
371  if(radiusShower1<108.4239 && radiusShower1>20.785){
372  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE_FiducialBoth",
373  avgE, pi0Mass,
374  "#pi^{0} Mass Vs. Average Shower Energy; Avg. Cluster Energy; #pi^{0} Mass",
375  100, 0.0, 10.0, 100, 0.05, 0.25);
376  }
377  }
378 
379  }
380  if (fabs(associated_clusters1[loc_j]->getEnergy() - associated_clusters2[loc_jj]->getEnergy()) < 0.5){
381  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE_500",
382  avgE, pi0Mass,
383  "#pi^{0} Mass Vs. Average Shower Energy; Cluster Energy; #pi^{0} Mass",
384  100, 0.0, 10.0, 100, 0.05, 0.25);
385 
386  if(radiusShower2<108.4239 && radiusShower2>20.785){
387  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE_500_Fiducial",
388  avgE, pi0Mass,
389  "#pi^{0} Mass Vs. Average Shower Energy; Avg. Cluster Energy; #pi^{0} Mass",
390  100, 0.0, 10.0, 100, 0.05, 0.25);
391  if(radiusShower1<108.4239 && radiusShower1>20.785){
392  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE_500_FiducialBoth",
393  avgE, pi0Mass,
394  "#pi^{0} Mass Vs. Average Shower Energy; Avg. Cluster Energy; #pi^{0} Mass",
395  100, 0.0, 10.0, 100, 0.05, 0.25);
396  }
397  }
398 
399  }
400  if (fabs(associated_clusters1[loc_j]->getEnergy() - associated_clusters2[loc_jj]->getEnergy()) < 0.1){
401  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE_100",
402  avgE, pi0Mass,
403  "#pi^{0} Mass Vs. Average Shower Energy; Cluster Energy; #pi^{0} Mass",
404  100, 0.0, 10.0, 100, 0.05, 0.25);
405 
406  if(radiusShower2<108.4239 && radiusShower2>20.785){
407  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE_100_Fiducial",
408  avgE, pi0Mass,
409  "#pi^{0} Mass Vs. Average Shower Energy; Avg. Cluster Energy; #pi^{0} Mass",
410  100, 0.0, 10.0, 100, 0.05, 0.25);
411  if(radiusShower1<108.4239 && radiusShower1>20.785){
412  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE_100_FiducialBoth",
413  avgE, pi0Mass,
414  "#pi^{0} Mass Vs. Average Shower Energy; Avg. Cluster Energy; #pi^{0} Mass",
415  100, 0.0, 10.0, 100, 0.05, 0.25);
416  }
417  }
418  }
419  if (fabs(associated_clusters1[loc_j]->getEnergy() - associated_clusters2[loc_jj]->getEnergy()) < 0.05){
420  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE_50",
421  avgE, pi0Mass,
422  "#pi^{0} Mass Vs. Average Shower Energy; Cluster Energy; #pi^{0} Mass",
423  100, 0.0, 10.0, 100, 0.05, 0.25);
424  if(radiusShower2<108.4239 && radiusShower2>20.785){
425  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE_50_Fiducial",
426  avgE, pi0Mass,
427  "#pi^{0} Mass Vs. Average Shower Energy; Avg. Cluster Energy; #pi^{0} Mass",
428  100, 0.0, 10.0, 100, 0.05, 0.25);
429  if(radiusShower1<108.4239 && radiusShower1>20.785){
430  Fill2DHistogram("FCAL_Pi0HFA","","Pi0MassVsE_50_FiducialBoth",
431  avgE, pi0Mass,
432  "#pi^{0} Mass Vs. Average Shower Energy; Avg. Cluster Energy; #pi^{0} Mass",
433  100, 0.0, 10.0, 100, 0.05, 0.25);
434  }
435  }
436  }
437  }
438  }
439 
440  }
441  }
442 
443  return NOERROR;
444 }
445 
446 //------------------
447 // erun
448 //------------------
450 {
451  // This is called whenever the run number changes, before it is
452  // changed to give you a chance to clean up before processing
453  // events from the next run number.
454  return NOERROR;
455 }
456 
457 //------------------
458 // fini
459 //------------------
461 {
462  // Called before program exit after event processing is finished.
463  return NOERROR;
464 }
465 
jerror_t erun(void)
Called everytime run number changes, provided brun has been called.
void Fill2DWeightedHistogram(const char *plugin, const char *directoryName, const char *name, const double valueX, const double valueY, const double weight, const char *title, int nBinsX, double xmin, double xmax, int nBinsY, double ymin, double ymax, bool print=false)
DetectorSystem_t dDetectorSystem
jerror_t init(void)
Called once at program start.
jerror_t evnt(jana::JEventLoop *eventLoop, uint64_t eventnumber)
Called every event.
InitPlugin_t InitPlugin
Definition: GlueX.h:22
void Fill1DHistogram(const char *plugin, const char *directoryName, const char *name, const double value, const char *title, int nBins, double xmin, double xmax, bool print=false)
void Fill2DHistogram(const char *plugin, const char *directoryName, const char *name, const double valueX, const double valueY, const char *title, int nBinsX, double xmin, double xmax, int nBinsY, double ymin, double ymax, bool print=false)
jerror_t brun(jana::JEventLoop *eventLoop, int32_t runnumber)
Called everytime a new run number is detected.
DLorentzVector lorentzMomentum(void) const
double sqrt(double)
jerror_t fini(void)
Called after last event of last event source has been processed.
DVector3 getPosition() const
Definition: DFCALShower.h:151
TProfile * hCurrentGainConstants
Definition: FitGains.C:7