Example of an analysis class for raw (i.e. unreconstructed) data
This is the analysis class generated by default by KaliVedaGUI for raw data analysis.
#ifndef __EXAMPLERAWANALYSIS_H
#define __EXAMPLERAWANALYSIS_H
#include "KVRawDataAnalyser.h"
Int_t Mult;
TString DetSigName;
Double_t DetSigVal;
public:
ExampleRawAnalysis() {}
virtual ~ExampleRawAnalysis() {}
ClassDef(ExampleRawAnalysis, 1)
};
#endif
Abstract base class for user analysis of raw data.
virtual Bool_t Analysis()=0
virtual void EndAnalysis()=0
virtual void InitAnalysis()=0
#include "ExampleRawAnalysis.h"
#include "KVMultiDetArray.h"
ClassImp(ExampleRawAnalysis)
void ExampleRawAnalysis::InitAnalysis()
{
AddHisto(new TH1F("Mult", "Number of fired detectors in each event", 1000, -.5, 999.5));
CreateTreeFile();
TTree* t = new TTree("myTree", "");
AddTree(t);
t->Branch("Name", &DetSigName);
t->Branch("Value", &DetSigVal);
SetJobOutputFileName("ExampleRawAnalysis_results.root");
}
void ExampleRawAnalysis::InitRun()
{
Info("InitRun", "Beginning analysis of run %d containing %llu events", GetRunNumber(), GetCurrentRun()->GetEvents());
GetTree("myTree")->SetTitle(GetSystem()->GetName());
}
Bool_t ExampleRawAnalysis::Analysis()
{
Mult = 0;
++Mult;
DetSigName = det->GetName();
FillTree();
}
}
}
FillHisto("Mult", Mult);
}
return kTRUE;
}
Base class for detector geometry description.
Bool_t HasDetectorSignal(const KVString &type) const
virtual Bool_t Fired(Option_t *opt="any") const
Double_t GetDetectorSignalValue(const KVString &type, const KVNameValueList ¶ms="") const
const KVSeqCollection * GetDetectors() const
Bool_t HandledRawData() const