27 cerr <<
"use error(test_derived_flat_tree): you must specify a root file to analyze ->" <<
'\n' 28 <<
" usage (input file order does not matter): test_derived_flat_tree " 29 <<
"<my_structured_tree.root> <my_flat_tree.root>" <<
endl;
34 cerr <<
"use error(test_derived_flat_tree): too many arguments!" <<
endl;
39 std::cout <<
"open TreeManager for file, " << argv[1] <<
endl;
41 std::cout <<
"open TreeManager for file, " << argv[2] <<
endl;
43 std::cout <<
"done constructing TreeManagers." <<
std::endl;
48 std::cout <<
"open headerTree 1" <<
std::endl;
50 std::cout <<
"open headerTree 2" <<
std::endl;
52 std::cout <<
"done constructing HeaderTrees." <<
std::endl;
54 if(!CheckHeader(header1,header2)) {
55 cerr <<
"WARNING: header trees are incompatible" <<
endl;
59 std::cout <<
"Headers are compatible." <<
endl;
64 if(!CheckGen(gen1,gen2)) {
65 cerr <<
"WARNING: gen trees are incompatible" <<
endl;
70 cerr <<
"WARNING: test failed. something is amiss with your trees." <<
endl;
74 std::cout <<
"SUCESS!!!!!! =D" <<
std::endl;
94 cerr <<
"ERROR (test_derived_flat_tree): provided trees are either both structured or both flat!" 102 if(h1->
Run() != h2->
Run())
114 cerr <<
"Gen: trees different length" <<
endl;
118 for(UInt_t ientry=0; ientry<g1->
NEntries(); ientry++){
124 cerr <<
"Gen: different NGen per entry (" 125 << g1->
NGen() <<
" vs. " << g2->
NGen()
130 for(UInt_t igen=0; igen<g1->
NGen(); igen++){
133 cerr <<
"Gen: disagreement on IsGenie" <<
endl;
140 if(*(g1->
NuP(igen))!= *(g2->
NuP(igen)))
virtual const UInt_t NGen() const =0
virtual const UInt_t NFSParticles(const UInt_t &igen) const =0
virtual const TLorentzVector * NuVertex(const UInt_t &igen)=0
4-position of neutrino vertex
virtual const TLorentzVector * NuP(const UInt_t &igen)=0
initial neutrino 4-momentum
virtual const Bool_t IsCC(const UInt_t &igen) const =0
whether interaction is CC or not
virtual const Int_t NuPDG(const UInt_t &igen) const =0
neutrino PDG code
HeaderTree * GetHeaderTree() const
int main(int argc, char *argv[])
virtual const Float_t FSTotEnergy(const UInt_t &igen) const =0
virtual void GetEntry(const UInt_t &ientry)
GenTree * GetGenTree() const
QTextStream & endl(QTextStream &s)
virtual const Bool_t IsGenie(const UInt_t &igen) const =0