diff --git a/Armory/ClassAnasen.h b/Armory/ClassAnasen.h index b052f87..74143c5 100644 --- a/Armory/ClassAnasen.h +++ b/Armory/ClassAnasen.h @@ -11,6 +11,7 @@ #include "TCanvas.h" #include "TPolyMarker3D.h" #include "TPolyLine3D.h" +#include "TRandom.h" struct SX3{ short id = -1; // -1 when no hit @@ -571,13 +572,13 @@ inline TVector3 ANASEN::CalSX3Pos(unsigned short ID, unsigned short chUp, unsign if( ID < nSX3 ){ //down - sa = SDn[reducedID].first; - sb = SDn[reducedID].second; + sa = SDn[reducedID].second; + sb = SDn[reducedID].first; }else{ - sa = SUp[reducedID].first; - sb = SUp[reducedID].second; + sa = SUp[reducedID].second; + sb = SUp[reducedID].first; } diff --git a/Armory/anasenMS.cpp b/Armory/anasenMS.cpp index 40304c7..125d82e 100644 --- a/Armory/anasenMS.cpp +++ b/Armory/anasenMS.cpp @@ -47,7 +47,7 @@ int main(int argc, char **argv){ ANASEN anasen; - TString saveFileName = "msAnasen.root"; + TString saveFileName = "SimAnasen.root"; printf("\e[32m#################################### building Tree in %s\e[0m\n", saveFileName.Data()); TFile * saveFile = new TFile(saveFileName, "recreate"); TTree * tree = new TTree("tree", "tree"); diff --git a/script.C b/script.C index 96070fc..3517d4e 100644 --- a/script.C +++ b/script.C @@ -271,14 +271,15 @@ void script(TString fileName = "", int maxEvent = -1){ pos.Print(); dir.Print(); - std::pair wireID = haha->FindWireID(pos, dir, true); - SX3 sx3 = haha->FindSX3Pos(pos, dir, true); + haha->DrawTrack(pos, dir, true); + + // std::pair wireID = haha->FindWireID(pos, dir, true); + // SX3 sx3 = haha->FindSX3Pos(pos, dir, true); // haha->CalTrack(sx3.hitPos, wireID.first, wireID.second, true); //haha->DrawDeducedTrack(sx3.hitPos, wireID.first, wireID.second); - haha->DrawTrack(pos, dir, true);