1 #include "baseP0DAnalysis.hxx" 12 void baseP0DAnalysis::DefineSystematics(){
15 baseAnalysis::DefineSystematics();
19 void baseP0DAnalysis::DefineCorrections(){
22 baseAnalysis::DefineCorrections();
26 void baseP0DAnalysis::DefineConfigurations(){
29 baseAnalysis::DefineConfigurations();
33 void baseP0DAnalysis::DefineMicroTrees(
bool addBase){
36 if (addBase) baseAnalysis::DefineMicroTrees(addBase);
40 AddVarI(output(), np0dtracks,
"number of tracks containing P0D segment");
41 AddVarI(output(), np0donlytracks,
"number of tracks with only P0D");
43 int isUsingReconDirP0D = ND::params().
GetParameterI(
"highlandIO.FlatTree.UseReconDirP0D");
45 if (isUsingReconDirP0D){
46 AddVarI(output(), np0dreconvertices,
"number of P0DRecon vertices in bunch");
47 AddVarI(output(), np0drecontracks,
"number of P0DRecon tracks in bunch");
48 AddVarI(output(), np0dreconclusters,
"number of P0DRecon clusters in bunch");
53 void baseP0DAnalysis::DefineTruthTree(){
56 baseAnalysis::DefineTruthTree();
60 void baseP0DAnalysis::FillMicroTrees(
bool addBase){
63 if (addBase) baseAnalysis::FillMicroTreesBase(addBase);
71 output().
FillVar(np0dtracks, nP0D);
72 output().
FillVar(np0donlytracks,nP0DOnly);
79 int isUsingReconDirP0D = ND::params().
GetParameterI(
"highlandIO.FlatTree.UseReconDirP0D");
82 if (isUsingReconDirP0D == 1){
88 int nP0DReconTracks = -1;
89 int nP0DReconClusters = -1;
90 int nP0DReconVertices = -1;
93 for (
unsigned int iBunch=0; iBunch<spill->
Bunches.size(); iBunch++){
100 nP0DReconTracks = localBunch->P0DReconParticles.size();
101 nP0DReconClusters = localBunch->P0DReconClusters.size();
102 nP0DReconVertices = localBunch->P0DReconVertices.size();
106 std::cerr<<
"Invalid local bunch, did you enable UseReconDirP0D = 1 in highlandIO.parameters.dat?\n";
111 output().
FillVar(np0drecontracks, nP0DReconTracks);
112 output().
FillVar(np0dreconvertices, nP0DReconVertices);
113 output().
FillVar(np0dreconclusters, nP0DReconClusters);
120 void baseP0DAnalysis::FillToyVarsInMicroTrees(
bool addBase){
123 if (addBase) baseAnalysis::FillToyVarsInMicroTreesBase(addBase);
131 baseAnalysis::FillTruthTreeBase(vtx, det, IsAntinu);
int GetAllTracksUsingOnlyDet(const AnaBunchB &bunch, SubDetId::SubDetEnum det, AnaTrackB *selTracks[])
int GetParameterI(std::string)
Get parameter. Value is returned as integer.
AnaP0DBunch & GetBunch()
Get a casted AnaBunchBB to AnaBunch from the InputManager.
void AddPackage(const std::string &name, const std::string &version)
Add a package.
std::vector< AnaBunchC * > Bunches
The reconstructed objects, split into timing bunches.
std::string GetSoftwareVersionFromPath(const std::string &path)
Get The software version from the path of the package.
Representation of a true Monte Carlo vertex.
SubDetEnum
Enumeration of all detector systems and subdetectors.
Representation of a global track.
void FillVar(Int_t index, Float_t var)
Fill a single variable.
baseP0DAnalysis(AnalysisAlgorithm *ana=NULL)
int GetAllTracksUsingDet(const AnaBunchB &bunch, SubDetId::SubDetEnum det, AnaTrackB *selTracks[])