#include #include #include "IGRooTrackerVtx.hxx" #include "ICOMETLog.hxx" // //#define __GROOTRACKER_EVENT_DEBUG__ // using std::endl; using std::cout; using std::setw; using std::setprecision; using std::setfill; using std::ios; using namespace COMET; ClassImp(IGRooTrackerVtx); //_______________________________________________________________________________________ IGRooTrackerVtx::IGRooTrackerVtx() : IJNuBeamFlux() { this->Init(); } //_______________________________________________________________________________________ //IGRooTrackerVtx::IGRooTrackerVtx(const IGRooTrackerVtx & event) : //IJNuBeamFlux() //{ // this->Copy(event); //} //_______________________________________________________________________________________ IGRooTrackerVtx::~IGRooTrackerVtx() { if(GeomPath != NULL) { delete GeomPath; GeomPath = NULL; } if(GeneratorName != NULL) { delete GeneratorName; GeneratorName = NULL; } ///// if(EvtFlags != NULL) { delete EvtFlags; EvtFlags = NULL; } if(EvtCode != NULL) { delete EvtCode; EvtCode = NULL; } if(OrigFileName != NULL) { delete OrigFileName; OrigFileName = NULL; } if(OrigTreeName != NULL) { delete OrigTreeName; OrigTreeName = NULL; } } //_______________________________________________________________________________________ void IGRooTrackerVtx::Copy(const IGRooTrackerVtx * event) { GeomPath->SetString(event->GeomPath->GetString()); GeneratorName->SetString(event->GeneratorName->GetString()); EvtCode->SetString(event->EvtCode->GetString()); OrigFileName->SetString(event->OrigFileName->GetString()); OrigTreeName->SetString(event->OrigTreeName->GetString()); ///// *EvtFlags = *(event->EvtFlags); EvtNum = event->EvtNum; EvtXSec = event->EvtXSec; EvtDXSec = event->EvtDXSec; EvtWght = event->EvtWght; EvtProb = event->EvtProb; OrigTreePOT = event->OrigTreePOT; OrigEvtNum = event->OrigEvtNum; OrigTreeEntries = event->OrigTreeEntries; TimeInSpill = event->TimeInSpill; TruthVertexID = event->TruthVertexID; G2NeutEvtCode = event->G2NeutEvtCode; for(int i=0; i < 4; i++) { EvtVtx[i] = event->EvtVtx[i]; } StdHepN = event->StdHepN; for(int i=0; i< StdHepN; i++) { StdHepPdg [i] = event->StdHepPdg [i]; StdHepRescat[i] = event->StdHepRescat [i]; StdHepStatus[i] = event->StdHepStatus [i]; StdHepFd [i] = event->StdHepFd [i]; StdHepLd [i] = event->StdHepLd [i]; StdHepFm [i] = event->StdHepFm [i]; StdHepLm [i] = event->StdHepLm [i]; for(int j=0; j < 4; j++) { StdHepX4 [i][j] = event->StdHepX4 [i][j]; } for(int j=0; j < 4; j++) { StdHepP4 [i][j] = event->StdHepP4 [i][j]; } for(int j=0; j < 3; j++) { StdHepPolz [i][j] = event->StdHepPolz [i][j]; } } // Remember to copy the flux info IJNuBeamFlux * flux = (IJNuBeamFlux*) event; IJNuBeamFlux::Copy(flux); } //_______________________________________________________________________________________ void IGRooTrackerVtx::Reset() { if (GeomPath ) GeomPath -> SetString("Not-set"); if (GeneratorName) GeneratorName -> SetString("Not-set"); ///// if (EvtFlags ) EvtFlags -> ResetAllBits(); if (EvtCode ) EvtCode -> SetString("Not-set"); if (OrigFileName ) OrigFileName -> SetString("Not-set"); if (OrigTreeName ) OrigTreeName -> SetString("Not-set"); EvtNum = -1; EvtXSec = -1.0; EvtDXSec = -1.0; EvtWght = -1.0; EvtProb = -1.0; OrigTreePOT = -1.0; TimeInSpill = -1.0; OrigEvtNum = -1; OrigTreeEntries = -1; TruthVertexID = -1; for(int i=0; i < 4; i++) { EvtVtx[i] = 0.0; } StdHepN = 0; for(int i=0; iReset(); } //_______________________________________________________________________________________ void IGRooTrackerVtx::Print(const Option_t* option) const { cout << "\nGRooTrackerMCTruth: " << endl; cout << " --> GeneratorName = " << GeneratorName->GetString() << endl; cout << " --> EvtCode = " << EvtCode->GetString() << endl; cout << " --> GeomPath = " << GeomPath->GetString() << endl; cout << " --> EvtNum = " << EvtNum << endl; cout << " --> EvtXSec = " << EvtXSec << endl; cout << " --> EvtDXSec = " << EvtDXSec << endl; cout << " --> EvtWght = " << EvtWght << endl; cout << " --> EvtProb = " << EvtProb << endl; cout << " --> TruthVertexID = " << TruthVertexID << endl; cout << "GRooTrackerStdHep:" << endl; for(int i=0; i pdgc: " << setfill(' ') << setw(20) << StdHepPdg[i] << " / rescat: " << setfill(' ') << setw(3) << StdHepRescat[i] << " / ist: " << setfill(' ') << setw(3) << StdHepStatus[i] << " / mom: " << setfill(' ') << setw(3) << StdHepFm[i] << " / daughters: (" << setfill(' ') << setw(3) << StdHepFd[i] << ", " << setfill(' ') << setw(3) << StdHepLd[i] << ") / E = " << setfill(' ') << setw(10) << StdHepP4[i][kGStdHepIdxE] << ", px = " << setfill(' ') << setw(10) << StdHepP4[i][kGStdHepIdxPx] << ", py = " << setfill(' ') << setw(10) << StdHepP4[i][kGStdHepIdxPy] << ", pz = " << setfill(' ') << setw(10) << StdHepP4[i][kGStdHepIdxPz] << endl; } cout << "Jnu-beam pass through info:" << endl; cout << " --> NuParentPdg = " << NuParentPdg << endl; cout << " --> NuParentDecMode = " << NuParentDecMode << endl; cout << " --> NuParentDecP4[4] = " << NuParentDecP4[0] << ", "<< NuParentDecP4[1] << ", " << NuParentDecP4[2] << ", " << NuParentDecP4[3] << endl; cout << " --> NuParentDecX4[4] = " << NuParentDecX4[0] << ", "<< NuParentDecX4[1] << ", " << NuParentDecX4[2] << ", " << NuParentDecX4[3] << endl; cout << " --> NuParentProP4[4] = " << NuParentProP4[0] << ", "<< NuParentProP4[1] << ", " << NuParentProP4[2] << ", " << NuParentProP4[3] << endl; cout << " --> NuParentProX4[4] = " << NuParentProX4[0] << ", "<< NuParentProX4[1] << ", " << NuParentProX4[2] << ", " << NuParentProX4[3] << endl; cout << " --> NuFluxEntry = " << NuFluxEntry << endl; cout << " --> NuIdfd = " << NuIdfd << endl; cout << " --> NuCospibm = " << NuCospibm << endl; cout << " --> NuCospi0bm = " << NuCospi0bm << endl; cout << " --> NuGipart = " << NuGipart << endl; cout << " --> NuGamom0 = " << NuGamom0 << endl; cout << " --> NuGpos0[3] = " << NuGpos0[0] << ", "<< NuGpos0[1] << ", " << NuGpos0[2] << endl; cout << " --> NuGvec0[3] = " << NuGvec0[0] << ", "<< NuGvec0[1] << ", " << NuGvec0[2] << endl; cout << "Pass-through file info:" << endl; cout << " --> OrigFileName = " << OrigFileName->GetString() << endl; cout << " --> OrigTreeName = " << OrigTreeName->GetString() << endl; cout << " --> OrigEvtNum = " << OrigEvtNum << endl; cout << " --> TimeInSpill = " << TimeInSpill << endl; cout << " --> OrigTreeEntries = " << OrigTreeEntries << endl; cout << " --> OrigTreePOT = " << OrigTreePOT << endl; } ////_____________________________________________________________________________________