#include #include #include "INRooTrackerVtx.hxx" using std::endl; using std::cout; using std::setw; using std::setprecision; using std::setfill; using std::ios; using namespace COMET; ClassImp(INRooTrackerVtx); //_______________________________________________________________________________________ INRooTrackerVtx::INRooTrackerVtx() : IJNuBeamFlux() { this->Init(); } //_______________________________________________________________________________________ //INRooTrackerVtx::INRooTrackerVtx(const INRooTrackerVtx & event) : //IJNuBeamFlux() //{ // this->Init(); // this->Copy(event); //} //_______________________________________________________________________________________ INRooTrackerVtx::~INRooTrackerVtx() { 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 INRooTrackerVtx::Copy(const INRooTrackerVtx * 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->SetBits(event->EvtFlags->GetNbits(), ); EvtNum = event->EvtNum; EvtXSec = event->EvtXSec; EvtDXSec = event->EvtDXSec; EvtWght = event->EvtWght; EvtProb = event->EvtProb; OrigTreePOT = event->OrigTreePOT; OrigEvtNum = event->OrigEvtNum; TimeInSpill = event->TimeInSpill; OrigTreeEntries = event->OrigTreeEntries; TruthVertexID = event->TruthVertexID; for(int i=0; i < 4; i++) { EvtVtx[i] = event->EvtVtx[i]; ///// NuParentDecP4[i] = event->NuParentDecP4[i]; ///// NuParentDecX4[i] = event->NuParentDecX4[i]; ///// NuParentProP4[i] = event->NuParentProP4[i]; ///// NuParentProX4[i] = event->NuParentProX4[i]; } ///// NuParentPdg = event->NuParentPdg; ///// NuParentDecMode = event->NuParentDecMode; ///// NuParentProNVtx = event->NuParentProNVtx; ///// for(int ip = 0; ip < 2; ip++){ ///// NuPlanePos[ip] = event->NuPlanePos[ip]; ///// } ///// NuGipart = event->NuGipart; ///// NuGamom0 = event->NuGamom0; ///// for(int j=0; j < 3; j++) { NuGpos0[j] = event->NuGpos0[j];} ///// for(int j=0; j < 3; j++) { NuGvec0[j] = event->NuGvec0[j];} ///// NuNg = event->NuNg; ///// for(int i=0; i< NuNg; i++) { ///// NuGpid[i] = event->NuGpid[i]; ///// NuGmec[i] = event->NuGmec[i]; ///// for(int j=0; j < 3; j++) { NuGv[i][j] = event->NuGv[i][j]; } ///// for(int j=0; j < 3; j++) { NuGp[i][j] = event->NuGp[i][j]; } ///// } NuNorm = event->NuNorm; NuEnusk = event->NuEnusk; NuNormsk = event->NuNormsk; NuAnorm = event->NuAnorm; ///// NuVersion = event->NuVersion; ///// NuTuneid = event->NuTuneid; ///// NuPint = event->NuPint; ///// for(int ip = 0; ip < 2; ip++){ ///// NuBpos[ip] = event->NuBpos[ip]; ///// NuBtilt[ip] = event->NuBtilt[ip]; ///// NuBrms[ip] = event->NuBrms[ip]; ///// NuEmit[ip] = event->NuEmit[ip]; ///// NuAlpha[ip] = event->NuAlpha[ip]; ///// } ///// for(int ip2 = 0; ip2 < 3; ip2++) ///// NuHcur[ip2] = event->NuHcur[ip2]; StdHepN = event->StdHepN; for(int i=0; i< StdHepN; i++) { StdHepPdg [i] = event->StdHepPdg [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]; } } NEnvc = event->NEnvc; for(int i=0; i< NEnvc; i++) { NEipvc[i] = event->NEipvc[i]; NEiorgvc[i] = event->NEiorgvc[i]; NEiflgvc[i] = event->NEiflgvc[i]; NEicrnvc[i] = event->NEicrnvc[i]; for(int j=0; j < 3; j++) { NEpvc[i][j] = event->NEpvc[i][j]; } } NEcrsx = event->NEcrsx; NEcrsy = event->NEcrsy; NEcrsz = event->NEcrsz; NEcrsphi = event->NEcrsphi; NEnvert = event->NEnvert; for(int i=0; i< NEnvert; i++) { NEiflgvert[i] = event->NEiflgvert[i] ; for(int j=0; j < 3; j++) { NEposvert[i][j] = event->NEposvert[i][j]; } } NEnvcvert = event->NEnvcvert; for(int i=0; i< NEnvcvert; i++) { NEabspvert[i] = event->NEabspvert[i]; NEabstpvert[i] = event->NEabstpvert[i]; NEipvert[i] = event->NEipvert[i]; NEiverti[i] = event->NEiverti[i]; NEivertf[i] = event->NEivertf[i]; for(int j=0; j < 3; j++) { NEdirvert[i][j] = event->NEdirvert[i][j]; } } // Remember to copy the flux info IJNuBeamFlux * flux = (IJNuBeamFlux*) event; IJNuBeamFlux::Copy(flux); } //_______________________________________________________________________________________ void INRooTrackerVtx::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; OrigEvtNum = -1; TimeInSpill = -1.0; OrigTreeEntries = -1; TruthVertexID = -1; for(int i=0; i < 4; i++) { EvtVtx[i] = 0.0; } ///// NuParentPdg = 0; ///// NuParentDecMode = 0; ///// for(int ip = 0; ip < 4; ip++){ ///// NuParentDecP4[ip] = -99999.9; ///// NuParentDecX4[ip] = -99999.9; ///// NuParentProP4[ip] = -99999.9; ///// NuParentProX4[ip] = -99999.9; ///// } ///// NuParentProNVtx = 0; ///// ///// for(int ip = 0; ip < 2; ip++){ ///// NuPlanePos[ip] = -99999.9; ///// } ///// ///// NuGipart = 0; ///// for(int ip = 0; ip < 3; ip++){ ///// NuGpos0[ip] = -99999.9; ///// NuGvec0[ip] = -99999.9; ///// } ///// NuGamom0 = -99999.9; ///// ///// NuNg = 0; ///// for(int ip = 0; ip < kNgmax; ip++){ ///// NuGpid[ip] = -99999; ///// NuGmec[ip] = -99999; ///// for(int ip2 = 0; ip2 < 3; ip2++){ ///// NuGv[ip][ip2] = -99999.9; ///// NuGp[ip][ip2] = -99999.9; ///// } ///// } ///// ///// NuEnusk = -99999.9; ///// NuNorm = -99999.9; ///// NuNormsk = -99999.9; ///// NuAnorm = -99999.9; ///// ///// NuVersion = -99999.9; ///// NuTuneid = -99999; ///// NuPint = -99999; ///// for(int ip = 0; ip < 2; ip++){ ///// NuBpos[ip] = -99999.9; ///// NuBtilt[ip] = -99999.9; ///// NuBrms[ip] = -99999.9; ///// NuEmit[ip] = -99999.9; ///// NuAlpha[ip] = -99999.9; ///// } ///// for(int ip2 = 0; ip2 < 3; ip2++) ///// NuHcur[ip2] = -99999.9; StdHepN = 0; for(int i=0; iReset(); } //_______________________________________________________________________________________ void INRooTrackerVtx::Print(const Option_t* option) const { cout << "\nNRooTrackerMCTruth: " << 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 << "NRooTrackerStdHep:" << endl; for(int i=0; i pdgc: " << setfill(' ') << setw(20) << StdHepPdg[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][kNStdHepIdxE] << ", px = " << setfill(' ') << setw(10) << StdHepP4[i][kNStdHepIdxPx] << ", py = " << setfill(' ') << setw(10) << StdHepP4[i][kNStdHepIdxPy] << ", pz = " << setfill(' ') << setw(10) << StdHepP4[i][kNStdHepIdxPz] << endl; } cout << endl << "Jnu-beam pass through info:" << endl; cout << " --> NuParentPdg = " << NuParentPdg << endl; cout << " --> NuParentDecMode = " << NuParentDecMode << endl; ///// cout << " --> NuParentProNVtx = " << NuParentProNVtx << 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 << " --> NuPlanePos[2] = " << NuPlanePos[0] << ", "<< NuPlanePos[1] << 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 << "NuEnusk = " << NuEnusk << endl; cout << "NuNorm = " << NuNorm << endl; cout << "NuNormsk = " << NuNormsk << endl; cout << "NuAnorm = " << NuAnorm << endl; cout << "NuVersion = " << NuVersion << endl; cout << "NuTuneid = " << NuTuneid << endl;; cout << "NuPint = " << NuPint << endl; cout << "NuBpos[2] = "; for(int ip = 0; ip < 2; ip++) cout << NuBpos[ip] << " "; cout << endl; cout << "NuBtilt[2] = "; for(int ip = 0; ip < 2; ip++) cout << NuBtilt[ip] << " "; cout << endl; cout << "NuBrms[2] = "; for(int ip = 0; ip < 2; ip++) cout << NuBrms[ip] << " "; cout << endl; cout << "NuEmit[2] = "; for(int ip = 0; ip < 2; ip++) cout << NuEmit[ip] << " "; cout << endl; cout << "NuAlpha[2] = "; for(int ip = 0; ip < 2; ip++) cout << NuAlpha[ip] << " "; cout << endl; cout << "NuHcur[3] = "; for(int ip = 0; ip < 3; ip++) cout << NuHcur[ip] << " "; cout << endl; cout << endl << "NEUT pass through info:" << endl << endl; cout << "NEnvc = " << NEnvc << endl; cout << "ip NEipvc[ip] NEiorgvc[ip] NEiflgvc[ip] NEicrnvc[ip] NEpvc[ip][3]" << endl; for(int ip = 0; ip < NEnvc; ip++) { cout << ip << " " << NEipvc[ip] << " " << NEiorgvc[ip] << " "; cout << NEiflgvc[ip] << " " << NEicrnvc[ip] << " "; for(int ip2 = 0; ip2 < 3; ip2++){ cout << NEpvc[ip][ip2] << " "; } cout << endl; } cout << endl; cout << "NEcrsx NEcrsy NEcrsz NEcrsphi" << endl; cout << NEcrsx << " " << NEcrsy << " " << NEcrsz << " " << NEcrsphi << endl; cout << "NEnvert = " << NEnvert << endl; cout << "iv NEiflgvert[iv] NEposvert[iv][3]" << endl; for(int iv = 0; iv < NEnvert; iv++){ cout << iv << " " << NEiflgvert[iv] << " "; for(int ip2 = 0; ip2 < 3; ip2++){ cout << NEposvert[iv][ip2] << " "; } cout << endl; } cout << endl; cout << "NEnvcvert = " << NEnvcvert << endl; cout << "ip NEabspvert[ip] NEabstpvert[ip] NEipvert[ip] NEiverti[ip] NEivertf[ip] NEdirvert[ip][3]" << endl; for(int ip = 0; ip < NEnvcvert; ip++){ cout << ip << " " << NEabspvert[ip] << " " << NEabstpvert[ip] << " " << NEipvert[ip] << " " << NEiverti[ip] << " " << NEivertf[ip] << " "; for(int ip2 = 0; ip2 < 3; ip2++){ cout << NEdirvert[ip][ip2] << " "; } cout << endl; } cout << endl; cout << endl << "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; } //_______________________________________________________________________________________ //