Classes | Namespaces | Functions | Variables
mcsXsection_module.cc File Reference
#include "art/Framework/Core/EDAnalyzer.h"
#include "larcorealg/Geometry/Exceptions.h"
#include "art/Framework/Core/ModuleMacros.h"
#include "art/Framework/Principal/Event.h"
#include "art/Framework/Principal/Handle.h"
#include "art/Framework/Principal/Run.h"
#include "art/Framework/Principal/SubRun.h"
#include "art_root_io/TFileService.h"
#include "canvas/Utilities/InputTag.h"
#include "canvas/Persistency/Common/FindManyP.h"
#include "fhiclcpp/ParameterSet.h"
#include "messagefacility/MessageLogger/MessageLogger.h"
#include "larcore/Geometry/Geometry.h"
#include "larcoreobj/SimpleTypesAndConstants/geo_types.h"
#include "lardata/DetectorInfoServices/DetectorPropertiesService.h"
#include "larsim/MCCheater/BackTrackerService.h"
#include "larsim/MCCheater/ParticleInventoryService.h"
#include "lardataobj/RecoBase/Hit.h"
#include "lardataobj/RecoBase/Track.h"
#include "lardataobj/RecoBase/TrackHitMeta.h"
#include "lardataobj/RecoBase/SpacePoint.h"
#include "lardataobj/RecoBase/Shower.h"
#include "lardataobj/RecoBase/PFParticle.h"
#include "nusimdata/SimulationBase/MCParticle.h"
#include "nusimdata/SimulationBase/MCTruth.h"
#include "lardataobj/AnalysisBase/CosmicTag.h"
#include "lardataobj/AnalysisBase/T0.h"
#include "larreco/RecoAlg/TrackMomentumCalculator.h"
#include "lardataobj/AnalysisBase/Calorimetry.h"
#include "lardata/ArtDataHelper/MVAReader.h"
#include "dune/DuneObj/ProtoDUNEBeamEvent.h"
#include "larreco/RecoAlg/TrajectoryMCSFitter.h"
#include "protoduneana/Utilities/ProtoDUNETrackUtils.h"
#include "protoduneana/Utilities/ProtoDUNEShowerUtils.h"
#include "protoduneana/Utilities/ProtoDUNETruthUtils.h"
#include "protoduneana/Utilities/ProtoDUNEPFParticleUtils.h"
#include "dune/Protodune/singlephase/DataUtils/ProtoDUNEDataUtils.h"
#include "protoduneana/Utilities/ProtoDUNEBeamlineUtils.h"
#include "protoduneana/Utilities/ProtoDUNEBeamCuts.h"
#include "geant4reweight/src/ReweightBase/G4ReweighterFactory.hh"
#include "geant4reweight/src/ReweightBase/G4Reweighter.hh"
#include "geant4reweight/src/ReweightBase/G4ReweightTraj.hh"
#include "geant4reweight/src/PropBase/G4ReweightParameterMaker.hh"
#include "geant4reweight/src/ReweightBase/G4MultiReweighter.hh"
#include "protoduneana/Utilities/G4ReweightUtils.h"
#include "TTree.h"
#include "TFile.h"
#include "TString.h"
#include "TTimeStamp.h"
#include "TH2.h"
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <vector>
#include "TComplex.h"
#include <fstream>
#include "TPaveStats.h"
#include "math.h"
#include <iterator>
#include <map>
#include <tuple>

Go to the source code of this file.

Classes

class  protoana::mcsXsection
 

Namespaces

 protoana
 

Functions

float soln (float x1, float x2, float x3, float x4, float y1, float y2, float y3, float y4, float result[2])
 
double angle2d (double x0, double y0, double x1, double y1, double x2, double y2)
 
double theta12 (double x1, double x2, double y1, double y2, double z1, double z2, double x1p, double x2p, double y1p, double y2p, double z1p, double z2p)
 

Variables

const int NMAXDAUGTHERS = 30
 
double m_pi =0.1395
 
double prim_energy =0.0
 

Function Documentation

double angle2d ( double  x0,
double  y0,
double  x1,
double  y1,
double  x2,
double  y2 
)

Definition at line 114 of file mcsXsection_module.cc.

114  {
115  double theta=((x1-x0)*(x2-x1)+(y1-y0)*(y2-y1))/sqrt(((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0))*((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)));
116  return acos(theta);
117 
118 }
float soln ( float  x1,
float  x2,
float  x3,
float  x4,
float  y1,
float  y2,
float  y3,
float  y4,
float  result[2] 
)

Definition at line 99 of file mcsXsection_module.cc.

99  {
100  if(x3==x4){
101  result[0]=x3;
102  result[1]=y3;
103  }
104  else if((x1-x2)*(y3-y4)-(y1-y2)*(x3-x4)==0){
105  result[0]=x3;
106  result[1]=y3;
107  }
108  else{
109  result[0]=((x1*y2-y1*x2)*(x3-x4)-(x1-x2)*(x3*y4-y3*x4))/((x1-x2)*(y3-y4)-(y1-y2)*(x3-x4));
110  result[1]=((x1*y2-y1*x2)*(y3-y4)-(y1-y2)*(x3*y4-y3*x4))/((x1-x2)*(y3-y4)-(y1-y2)*(x3-x4));
111  }
112  return *result;
113 }
static QCString result
double theta12 ( double  x1,
double  x2,
double  y1,
double  y2,
double  z1,
double  z2,
double  x1p,
double  x2p,
double  y1p,
double  y2p,
double  z1p,
double  z2p 
)

Definition at line 121 of file mcsXsection_module.cc.

121  {
122  double numer=(x2-x1)*(x2p-x1p)+(y2-y1)*(y2p-y1p)+(z2-z1)*(z2p-z1p);
123  double den1=(x2-x1)*(x2-x1)+(y2-y1)*(y2-y1)+(z2-z1)*(z2-z1);
124  double den2=(x2p-x1p)*(x2p-x1p)+(y2p-y1p)*(y2p-y1p)+(z2p-z1p)*(z2p-z1p);
125  return 180/3.14*acos(numer/sqrt(den1*den2));
126 }

Variable Documentation

double m_pi =0.1395

Definition at line 94 of file mcsXsection_module.cc.

const int NMAXDAUGTHERS = 30

Definition at line 93 of file mcsXsection_module.cc.

double prim_energy =0.0

Definition at line 95 of file mcsXsection_module.cc.