MarlinUtil  1.12.1
MarlinUtil.h
1 #ifndef MarlinUtil_h
2 #define MarlinUtil_h 1
3 
4 #include <iostream>
5 #include <fstream>
6 
7 #include <cmath>
8 #include <string>
9 #include <vector>
10 #include <utility>
11 #include <algorithm>
12 
13 #include <lcio.h>
14 #include <EVENT/LCEvent.h>
15 #include <EVENT/LCCollection.h>
16 #include <EVENT/MCParticle.h>
17 #include <EVENT/SimTrackerHit.h>
18 #include <EVENT/SimCalorimeterHit.h>
19 #include <EVENT/ReconstructedParticle.h>
20 
21 #include "HelixClass.h"
22 
23 #include "csvparser.h"
24 
25 
26 using namespace lcio;
27 
28 
29 class MarlinUtil {
30 
31 
32  public:
33 
34  static void printMCParticle(MCParticle* MCP, bool printDaughters = false);
35  static std::string getMCName(int PDGCode);
36  static int getPDGCode(std::string name);
37  static MCParticleVec getAllMCParents(MCParticle* mcPart );
38  static MCParticleVec getAllMCDaughters(MCParticle* mcPart);
39  static bool isDaughterOf( MCParticle* daughter, MCParticle* parent );
40  static bool DecayChainInTree(std::vector<int> DecayChannel, LCEvent* evt);
41 
66  static void getMC_Balance(LCEvent* evt, double* accumulatedEnergies);
67 
68  static void printTrack(Track* track, double bField=4.0);
69  static const double* getMomentum(Track* track, double bField=4.0);
70  static const double getAbsMomentum(Track* track, double bField=4.0);
71  static void printCluster(Cluster* cluster);
72  static void printRecoParticle(ReconstructedParticle* recoParticle, double bField=4.0);
73  static int countAllSimTrackerHits(LCEvent* evt,MCParticle* MCP);
74  static int countAllSimCalorimeterHits(LCEvent* evt,MCParticle* MCP,double& accumulatedSimCaloEnergy);
75  static double getEnergyDepositedInFullCalorimeter(LCEvent* evt);
76 
77 
78 };
79 
80 
81 
82 
83 // FIXME: the whole MC particle related stuff should be placed somewhere else (see MarlinUtil as well)
84 
85 
87 
88  public:
89 
91  std::string getMCCharge(int PDGCode);
92 
93 
94  private:
95 
96  std::vector<int> _pdgCodesMCParticles;
97  std::vector<double> _massMCParticles;
98  std::vector<std::string> _nameMCParticles;
99  std::vector<std::string> _chargeMCParticles;
100 
101 
102 };
103 
104 #endif
Definition: MarlinUtil.h:29
Definition: MarlinUtil.h:86