#include #include #include #include #include #include #include main(int argc, char *argv[]) { Float_t trig = 12; char* thefile = "atmos.root"; // Start the analysis TFile* theFile = new TFile(thefile); TNtuple* FADCntuple = (TNtuple*) gROOT->FindObject("fadcNtuple"); FADCntuple->AddFriend("inNtuple"); FADCntuple->AddFriend("outNtuple"); FADCntuple->AddFriend("externalTrigger"); // start navigating the cerenkov ntuple to fill the histograms // Declaration of leaves types Float_t fNumC; Float_t fNumCdelta; Float_t fNumCDecay; Float_t fNumPMT1; Float_t fNumPMT2; Float_t fNumPMT3; Float_t fdecayFlag; Float_t fDecayEnergy; Float_t length; Float_t HGcharge1; Float_t HGcharge2; Float_t HGcharge3; Float_t HGpeak1; Float_t HGpeak2; Float_t HGpeak3; Float_t Tile1; Float_t Tile2; Float_t PDGcode; Float_t energy; Float_t phi; Float_t theta; Float_t x; Float_t y; Float_t z; // Set branch addresses FADCntuple->SetBranchAddress("HGpeak1",&HGpeak1); FADCntuple->SetBranchAddress("HGpeak2",&HGpeak2); FADCntuple->SetBranchAddress("HGpeak3",&HGpeak3); FADCntuple->SetBranchAddress("HGcharge1",&HGcharge1); FADCntuple->SetBranchAddress("HGcharge2",&HGcharge2); FADCntuple->SetBranchAddress("HGcharge3",&HGcharge3); FADCntuple->SetBranchAddress("externalTrigger.tile1",&Tile1); FADCntuple->SetBranchAddress("externalTrigger.tile2",&Tile2); FADCntuple->SetBranchAddress("outNtuple.fdecayFlag",&fdecayFlag); FADCntuple->SetBranchAddress("outNtuple.fDecayEnergy",&fDecayEnergy); FADCntuple->SetBranchAddress("outNtuple.fNumPMT1",&fNumPMT1); FADCntuple->SetBranchAddress("outNtuple.fNumPMT2",&fNumPMT2); FADCntuple->SetBranchAddress("outNtuple.fNumPMT3",&fNumPMT3); FADCntuple->SetBranchAddress("outNtuple.fNumC",&fNumC); FADCntuple->SetBranchAddress("outNtuple.fNumCdelta",&fNumCdelta); FADCntuple->SetBranchAddress("outNtuple.fNumCDecay",&fNumCDecay); FADCntuple->SetBranchAddress("outNtuple.flength",&length); FADCntuple->SetBranchAddress("inNtuple.energy",&energy); FADCntuple->SetBranchAddress("inNtuple.PDGcode",&PDGcode); FADCntuple->SetBranchAddress("inNtuple.phi",&phi); FADCntuple->SetBranchAddress("inNtuple.theta",&theta); FADCntuple->SetBranchAddress("inNtuple.x",&x); FADCntuple->SetBranchAddress("inNtuple.y",&y); FADCntuple->SetBranchAddress("inNtuple.z",&z); Int_t nentries = FADCntuple->GetEntries(); Int_t nbytes = 0; for (Int_t i=0; iGetEntry(i); FADCntuple->GetEvent(i); } //delete theFile; delete FADCntuple; delete theFile; }