SOLARIS_Analysis/working/test.C

104 lines
2.7 KiB
C++
Raw Normal View History

#include "../Armory/ClassDetGeo.h"
#include "../Armory/ClassReactionConfig.h"
#include "../Armory/ClassCorrParas.h"
#include "../Cleopatra/ClassHelios.h"
#include "../Cleopatra/ClassTransfer.h"
2024-07-08 14:52:46 -04:00
#include "ClassMonPlotter.h"
#include "TFile.h"
#include "TChain.h"
#include "TH1F.h"
#include "TTreeReader.h"
#include "TTreeReaderValue.h"
#include "TTreeReaderArray.h"
#include "TClonesArray.h"
#include "TGraph.h"
2024-07-08 14:52:46 -04:00
void test(){
// DetGeo haha("detectorGeo.txt");
// haha.Print(true);
// ReactionConfig config("reactionConfig.txt");
// config.Print();
2024-07-08 14:52:46 -04:00
// TransferReaction * transfer = new TransferReaction();
// transfer->SetReactionSimple(32, 14, 2, 1, 1, 1, 8.8);
2024-07-08 14:52:46 -04:00
// int ID = 0;
// transfer->SetReactionFromFile("reactionConfig.txt", ID);
2024-07-08 14:52:46 -04:00
// transfer->PrintReaction();
2024-07-08 14:52:46 -04:00
// transfer->Event(25 * TMath::DegToRad(), 0 * TMath::DegToRad());
// transfer->PrintFourVectors();
// ReactionConfig config2 = transfer->GetRectionConfig();
// HELIOS * helios = new HELIOS();
// helios->SetDetectorGeometry("detectorGeo.txt", 1);
// helios->PrintGeometry();
// TLorentzVector Pb = transfer->GetPb();
// printf("Charge : %d\n", Pb.GetUniqueID());
// int hit = helios->CalArrayHit(Pb, false);
// helios->CheckDetAcceptance();
// // //helios->CalTrajectoryPara(Pb, config.recoilLightZ, true);
// printf("\n hit = %d | %s | %s\n", hit, helios->GetHitMessage().Data(), helios->GetAcceptanceMessage().Data());
// trajectory orb = helios->GetTrajectory_b();
// orb.PrintTrajectory();
// delete helios;
2024-07-08 14:52:46 -04:00
// delete transfer;root
// DetGeo dd("detectorGeo.txt");
// MonPlotter * pp = new MonPlotter(0, &dd, 8);
2024-07-08 14:52:46 -04:00
// pp->SetUpCanvas("haha", 500, 3, 2);
2024-07-08 14:52:46 -04:00
// int rawEnergyRange[2] = { 100, 4000}; /// share with e, xf, xn
// int energyRange[2] = { 0, 10}; /// in the E-Z plot
2024-07-08 14:52:46 -04:00
// int rdtDERange[2] = { 0, 80};
// int rdtERange[2] = { 0, 80};
2024-07-08 14:52:46 -04:00
// double exRange[3] = { 100, -2, 10}; /// bin [keV], low[MeV], high[MeV]
// int thetaCMRange[2] = {0, 80};
2024-07-08 14:52:46 -04:00
// pp->SetUpHistograms(rawEnergyRange, energyRange, exRange, thetaCMRange, rdtDERange, rdtERange);
2024-07-08 14:52:46 -04:00
// pp->Plot();
2024-07-08 14:52:46 -04:00
// delete pp;
2024-07-08 14:52:46 -04:00
// TChain *chain = new TChain("gen_tree");
// chain->Add("../root_data/gen_run043.root");
// // chain->Print();
// TTreeReader reader(chain);
// TTreeReaderArray<TGraph> trace = {reader, "trace"};
// ULong64_t processedEntries = 0;
// while (reader.Next()) {
// printf("%llu | %lu \n", processedEntries, trace.GetSize());
// for( int i = 0; i < trace.GetSize(); i++ ){
// printf( " %d| %d\n", i, trace.At(i).GetN());
// }
// processedEntries ++;
// if( processedEntries > 10 ) break;
// }
CorrParas * corr = new CorrParas();
}