// // #ifndef NRooTrackerVtx_hh_seen #define NRooTrackerVtx_hh_seen #include #include "TObject.h" #include "TBits.h" #include "TObjString.h" #include "IJNuBeamFlux.hxx" using std::ostream; /// /// This is a simple event class which is essentially an objectified version /// of the NEUT nRooTracker output format. Because the nRooTracker is forcing /// NEUT event into a GENIE defined storage care needs to be taken when /// interpreting the meaning of various data members. For example the StdHepStatus /// does not have a one to one mapping to GENIE StdHep status. Using this class /// with GENIE based utils or the GENIE ReWeighting tools can (and most likely /// will result in false results! /// /// Therefore, the native NEUT particle information common blocks (VCWORK, FSIHIST) /// are included. Analysis tools under development... namespace COMET { const int kNStdHepNPmax = 100; const int kNStdHepIdxPx = 0; const int kNStdHepIdxPy = 1; const int kNStdHepIdxPz = 2; const int kNStdHepIdxE = 3; const int kNStdHepIdxX = 0; const int kNStdHepIdxY = 1; const int kNStdHepIdxZ = 2; const int kNStdHepIdxT = 3; const int kNEmaxvc = 100; const int kNEmaxvert = 100; const int kNEmaxvertp = 300; class INRooTrackerVtx : public COMET::IJNuBeamFlux { public: INRooTrackerVtx(); ~INRooTrackerVtx(); void Reset (void); void Init (void); // Using methods from TObject to remove 'hidden' compiler warnings using TObject::Copy; void Copy (const INRooTrackerVtx * event); void Print (const Option_t* option = "") const; // Define the output rootracker tree branches TObjString* EvtCode; ///< generator-specific string with 'event code' int EvtNum; ///< event num. double EvtXSec; ///< cross section for selected event (1E-38 cm2) double EvtDXSec; ///< cross section for selected event kinematics (1E-38 cm2 /{K^n}) double EvtWght; ///< weight for that event double EvtProb; ///< probability for that event (given cross section, path lengths, etc) double EvtVtx[4]; ///< event vertex position in detector coord syst (SI) int StdHepN; ///< number of particles in particle array // // stdhep-like particle array // int StdHepPdg [kNStdHepNPmax]; ///< pdg codes (& generator specific codes for pseudoparticles) int StdHepStatus[kNStdHepNPmax]; ///< generator-specific status code double StdHepX4 [kNStdHepNPmax][4]; ///< 4-x (x, y, z, t) of particle in hit nucleus frame (fm) double StdHepP4 [kNStdHepNPmax][4]; ///< 4-p (px,py,pz,E) of particle in LAB frame (GeV) double StdHepPolz [kNStdHepNPmax][3]; ///< polarization vector int StdHepFd [kNStdHepNPmax]; ///< first daughter int StdHepLd [kNStdHepNPmax]; ///< last daughter int StdHepFm [kNStdHepNPmax]; ///< first mother int StdHepLm [kNStdHepNPmax]; ///< last mother // NEUT native VCWORK information int NEnvc; ///< Number of particles int NEipvc[kNEmaxvc]; ///< PDG particle code float NEpvc[kNEmaxvc][3]; ///< 3-momentum (MeV/c) int NEiorgvc[kNEmaxvc]; ///< Index of parent (Fortran convention: starting at 1) /// Flag of final state: /// 0 : DETERMINED LATER PROCEDURE /// 1 : DECAY TO OTHER PARTICLE /// 2 : ESCAPE FROM DETECTOR /// 3 : ABSORPTION /// 4 : CHARGE EXCHANGE /// 5 : STOP AND NOT CONSIDER IN M.C. /// 6 : E.M. SHOWER /// 7 : HADRON PRODUCTION /// 8 : QUASI-ELASTIC SCATTER /// 9 : FORWARD (ELASTIC-LIKE) SCATTER int NEiflgvc[kNEmaxvc]; // Flag of final state int NEicrnvc[kNEmaxvc]; ///< Escaped nucleus (1) or not (0) // Rest of the NEUT variables below are mainly for internal reweighting routines float NEcrsx; ///< Cross section calculation variables (currently used for coherent interactions) float NEcrsy; ///< Cross section calculation variables (currently used for coherent interactions) float NEcrsz; ///< Cross section calculation variables (currently used for coherent interactions) float NEcrsphi; ///< Cross section calculation variables (currently used for coherent interactions) // NEUT FSIHIST pion interaction history int NEnvert; ///< Number of vertices (including production and exit points) float NEposvert[kNEmaxvert][3]; ///< Position of vertex within nucleus (fm) ///< Interaction type ///< (*10 FOR HI-NRG interaction, >~400 MeV/c) ///< -1 : ESCAPE ///< 0 : INITIAL (or unmatched parent vertex if I>1) ///< 3 : ABSORPTION ///< 4 : CHARGE EXCHANGE ///< 7 : HADRON PRODUCTION (hi-nrg only, i.e. 70) ///< 8 : QUASI-ELASTIC SCATTER ///< 9 : FORWARD (ELASTIC-LIKE) SCATTER int NEiflgvert[kNEmaxvert]; ///< Interaction type int NEnvcvert; ///< Number of intermediate particles (including initial and final) float NEdirvert[kNEmaxvertp][3]; ///< Direction of particle float NEabspvert[kNEmaxvertp]; ///< Absolute momentum in the lab frame (MeV/c) float NEabstpvert[kNEmaxvertp]; ///< Absolute momentum in the nucleon rest frame (MeV/c) int NEipvert[kNEmaxvertp]; ///< PDG particle code int NEiverti[kNEmaxvertp]; ///< Index of initial vertex (pointing to nvert array above) int NEivertf[kNEmaxvertp]; ///< Index of final vertex (pointing to nvert array above) /////JDRM // /////JDRM // neutrino parent info (passed-through from the beam-line MC / quantities in 'jnubeam' units) /////JDRM // /////JDRM int NuParentPdg; // parent hadron pdg code /////JDRM int NuParentDecMode; // parent hadron decay mode /////JDRM double NuParentDecP4 [4]; // parent hadron 4-momentum at decay /////JDRM double NuParentDecX4 [4]; // parent hadron 4-position at decay /////JDRM double NuParentProP4 [4]; // parent hadron 4-momentum at production /////JDRM double NuParentProX4 [4]; // parent hadron 4-position at production /////JDRM int NuParentProNVtx; // parent hadron vtx id /////JDRM double NuPlanePos [2]; // neutrino (x,y) position at ND5/6 plane /////JDRM /////JDRM // primary particle information /////JDRM // primary particle ID /////JDRM int NuGipart; /////JDRM // primary particle starting point /////JDRM double NuGpos0[3]; /////JDRM // primary particle direction at starting point /////JDRM double NuGvec0[3]; /////JDRM // momentum of the primary particle at the starting point /////JDRM double NuGamom0; /////JDRM /////JDRM // Flux Interation History Information /////JDRM /////JDRM // Actual number of interaction steps /////JDRM int NuNg; /////JDRM // PDG particle ID /////JDRM int NuGpid[kNgmax]; /////JDRM // GEANT Interaction mechanism code /////JDRM int NuGmec[kNgmax]; /////JDRM // Position of intermediate particle /////JDRM double NuGv[kNgmax][3]; /////JDRM // Momentum of intermediate particle /////JDRM double NuGp[kNgmax][3]; /////JDRM /////JDRM // Normalization and Transfer Information /////JDRM double NuNorm, NuEnusk, NuNormsk, NuAnorm; /////JDRM /////JDRM // Beam parameter information (>=2010d) /////JDRM /////JDRM // jnubeam flux version /////JDRM double NuVersion; /////JDRM /////JDRM // beam tune ID # /////JDRM int NuTuneid; /////JDRM /////JDRM // Interaction model ID /////JDRM int NuPint; /////JDRM /////JDRM // Beam center position and angle (divergence?) /////JDRM double NuBpos[2], NuBtilt[2]; /////JDRM /////JDRM // Beam RMS width /////JDRM double NuBrms[2]; /////JDRM /////JDRM // Beam optics parameters /////JDRM double NuEmit[2], NuAlpha[2]; /////JDRM /////JDRM // Horn currents /////JDRM double NuHcur[3]; // // etc // TObjString* GeomPath; // // Some pass through info TObjString* GeneratorName; // TObjString* OrigFileName; // TObjString* OrigTreeName; // int OrigEvtNum; int OrigTreeEntries; double OrigTreePOT; double TimeInSpill; int TruthVertexID; ClassDef(COMET::INRooTrackerVtx, 1); }; } // comet namespace #endif