#include "LArUtil-TypeDef.hh"
#include <iostream>
#include <TTree.h>
#include <TFile.h>
#include <TSystem.h>
Go to the source code of this file.
Functions | |
int | main (int argc, char **argv) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
Definition at line 11 of file gen_tree_Geometry.cc.
00011 { 00012 00013 gSystem->Load("libBase"); 00014 TFile* fout = TFile::Open("tree_Geometry.root","RECREATE"); 00015 TTree* tree = new TTree("Geometry",""); 00016 00017 Double_t fDetLength; 00018 Double_t fDetHalfWidth; 00019 Double_t fDetHalfHeight; 00020 tree->Branch("fDetLength",&fDetLength,"fDetLength/D"); 00021 tree->Branch("fDetHalfWidth",&fDetHalfWidth,"fDetHalfWidth/D"); 00022 tree->Branch("fDetHalfHeight",&fDetHalfHeight,"fDetHalfHeight/D"); 00023 00024 Double_t fCryoLength; 00025 Double_t fCryoHalfWidth; 00026 Double_t fCryoHalfHeight; 00027 tree->Branch("fCryoLength",&fCryoLength,"fCryoLength/D"); 00028 tree->Branch("fCryoHalfWidth",&fCryoHalfWidth,"fCryoHalfWidth/D"); 00029 tree->Branch("fCryoHalfHeight",&fCryoHalfHeight,"fCryoHalfHeight/D"); 00030 00031 std::vector<UChar_t> fChannelToPlaneMap; 00032 std::vector<UShort_t> fChannelToWireMap; 00033 std::vector<std::vector<UShort_t> > fPlaneWireToChannelMap; 00034 tree->Branch("fChannelToPlaneMap","std::vector<UChar_t>",&fChannelToPlaneMap); 00035 tree->Branch("fChannelToWireMap","std::vector<UShort_t>",&fChannelToWireMap); 00036 tree->Branch("fPlaneWireToChannelMap","std::vector<std::vector<UShort_t> >",&fPlaneWireToChannelMap); 00037 00038 // Vectors with length = # planes 00039 std::vector<larlight::GEO::SigType_t> fSignalType; 00040 std::vector<larlight::GEO::View_t> fViewType; 00041 std::vector<Double_t> fPlanePitch; 00042 std::vector<std::vector<Double_t> > fFirstWireStartVtx; 00043 std::vector<std::vector<Double_t> > fFirstWireEndVtx; 00044 tree->Branch("fFirstWireStartVtx","std::vector<std::vector<Double_t> >",&fFirstWireStartVtx); 00045 tree->Branch("fFirstWireEndVtx","std::vector<std::vector<Double_t> >",&fFirstWireEndVtx); 00046 tree->Branch("fSignalType","std::vector<larlight::GEO::SigType_t>",&fSignalType); 00047 tree->Branch("fViewType","std::vector<larlight::GEO::View_t>",&fViewType); 00048 tree->Branch("fPlanePitch","std::vector<Double_t>",&fPlanePitch); 00049 00050 // Vectors with length = view 00051 std::vector<Double_t> fWirePitch; 00052 std::vector<Double_t> fWireAngle; 00053 tree->Branch("fWirePitch","std::vector<Double_t>",&fWirePitch); 00054 tree->Branch("fWireAngle","std::vector<Double_t>",&fWireAngle); 00055 00056 std::vector<std::vector<Float_t> > fOpChannelVtx; 00057 tree->Branch("fOpChannelVtx","std::vector<std::vector<Float_t> >",&fOpChannelVtx); 00058 00059 std::vector<std::vector<Double_t> > fPlaneOriginVtx; 00060 tree->Branch("fPlaneOriginVtx","std::vector<std::vector<Double_t> >",&fPlaneOriginVtx); 00061 00062 tree->Fill(); 00063 tree->Write(); 00064 fout->Close(); 00065 00066 return 0; 00067 }