Skip to content

Commit

Permalink
Merge branch 'master' of github.com:JeffersonLab/hpstr
Browse files Browse the repository at this point in the history
  • Loading branch information
cbravo135 committed Jul 17, 2024
2 parents ed64513 + 20cfb12 commit 5a73410
Show file tree
Hide file tree
Showing 31 changed files with 1,144 additions and 34 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ include(MacroModule)
# import macro for declaring external dependencies
include(MacroExtDeps)

set(MODULES event analysis processing processors)
set(MODULES event utils analysis processing processors)

# build each module in the list
foreach(module ${MODULES})
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ NOTE:: On SLAC machines ```cmake3``` is needed to call cmake version 3+, you mig
If you do not want hpstr to use the default python3 executable which it finds in your environment, then supply the full path to the alternate Python installation.

```
-DPython3_Executable=/path/to/some/python3
-DPython3_EXECUTABLE=/path/to/some/python3
```

To compile with debug information, just add -DCMAKE_BUILD_TYPE=Debug to the cmake3 command.
Expand Down
262 changes: 262 additions & 0 deletions analysis/plotconfigs/fee_smearing/feeSmearing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
{
"n_tracks_h" : {
"bins" : 10,
"minX" : 0,
"maxX" : 10,
"xtitle" : "N_{tracks}",
"ytitle" : "Events"
},
"nHits_2d_h" : {
"bins" : 15,
"minX" : 0,
"maxX" : 15,
"xtitle" : "N_{2Dhits}",
"ytitle" : "Tracks"
},
"nShared_h" : {
"bins" : 8,
"minX" : -0.5,
"maxX" : 7.5,
"xtitle" : "N_{shared}^{hits}",
"ytitle" : "Tracks"
},
"d0_h" : {
"bins" : 200,
"minX" : -10,
"maxX" : 10,
"xtitle" : "d_{0} [mm]",
"ytitle" : "Tracks"
},
"Phi_h" : {
"bins" : 100,
"minX" : -0.5,
"maxX" : 0.5,
"xtitle" : "phi_{0}",
"ytitle" : "Tracks"
},
"Omega_h" : {
"bins" : 100,
"minX" : -0.002,
"maxX" : 0.002,
"xtitle" : "#omega",
"ytitle" : "Tracks"
},
"TanLambda_h" : {
"bins" : 200,
"minX" : -0.3,
"maxX" : 0.3,
"xtitle" : "tan(#lambda)",
"ytitle" : "Tracks"
},
"Z0_h" : {
"bins" : 200,
"minX" : -5,
"maxX" : 5,
"xtitle" : "z_0 [mm]",
"ytitle" : "Tracks"
},
"time_h" : {
"bins" : 200,
"minX" : -40,
"maxX" : 40,
"xtitle" : "track time [ns]",
"ytitle" : "Tracks"
},
"chi2_h" : {
"bins" : 200,
"minX" : 0,
"maxX" : 100,
"xtitle" : "track #chi^{2}",
"ytitle" : "Tracks"
},
"p_h" : {
"bins" : 200,
"minX" : 0,
"maxX" : 4,
"xtitle" : "p_{e^{-}} [GeV]",
"ytitle" : "Tracks"
},
"p_vs_nHits_hh" : {
"binsX" : 5,
"minX" : 8,
"maxX" : 13,
"binsY" : 200,
"minY" : 0,
"maxY" : 4,
"xtitle" : "Nhits",
"ytitle" : "p_{e^{-}} [GeV]"
},
"p_vs_nHits_top_hh" : {
"binsX" : 5,
"minX" : 8,
"maxX" : 13,
"binsY" : 200,
"minY" : 0,
"maxY" : 4,
"xtitle" : "Nhits",
"ytitle" : "top p_{e^{-}} [GeV]"
},
"p_vs_nHits_bot_hh" : {
"binsX" : 5,
"minX" : 8,
"maxX" : 13,
"binsY" : 200,
"minY" : 0,
"maxY" : 4,
"xtitle" : "Nhits",
"ytitle" : "bot p_{e^{-}} [GeV]"
},
"p_vs_TanLambda_hh" : {
"binsX" : 100,
"minX" : -0.1,
"maxX" : 0.1,
"binsY" : 200,
"minY" : 0,
"maxY" : 4,
"xtitle" : "tan(#lambda)",
"ytitle" : "p_{e^{-}} [GeV]"
},
"p_vs_Phi_hh" : {
"binsX" : 100,
"minX" : -0.2,
"maxX" : 0.2,
"binsY" : 200,
"minY" : 0,
"maxY" : 4,
"xtitle" : "#phi_{0}",
"ytitle" : "p_{e^{-}} [GeV]"
},
"p_vs_TanLambda_Phi_hhh" : {
"binsX" : 100,
"minX" : -0.2,
"maxX" : 0.2,
"binsY" : 100,
"minY" : -0.1,
"maxY" : 0.1,
"binsZ" : 200,
"minZ" : 0,
"maxZ" : 4,
"xtitle" : "#phi_{0}",
"ytitle" : "tan(#lambda)",
"ztitle" : "p_{e^{-}} [GeV]"
},
"p_vs_TanLambda_nHits_hhh" : {
"binsX" : 100,
"minX" : -0.2,
"maxX" : 0.2,
"binsY" : 5,
"minY" : 8,
"maxY" : 13,
"binsZ" : 200,
"minZ" : 0,
"maxZ" : 4,
"xtitle" : "#phi_{0}",
"ytitle" : "tan(#lambda)",
"ztitle" : "p_{e^{-}} [GeV]"
},
"chi2ndf_h" : {
"bins" : 200,
"minX" : 0,
"maxX" : 30,
"xtitle" : "track #chi^{2} / ndf",
"ytitle" : "Tracks"
},
"d0_vs_p_hh" : {
"binsX" : 100,
"minX" : 0,
"maxX" : 4,
"binsY" : 200,
"minY" : -10,
"maxY" : 10,
"xtitle" : "trk p [GeV]",
"ytitle" : "trk d0 [mm]"
},
"d0_vs_phi0_hh" : {
"binsX" : 100,
"minX" : -0.4,
"maxX" : 0.4,
"binsY" : 200,
"minY" : -10,
"maxY" : 10,
"xtitle" : "trk #phi_{0}",
"ytitle" : "trk d0 [mm]"
},

"d0_vs_tanlambda_hh" : {
"binsX" : 200,
"minX" : -0.1,
"maxX" : 0.1,
"binsY" : 200,
"minY" : -10,
"maxY" : 10,
"xtitle" : "trk(#lamdba)",
"ytitle" : "trk d0 [mm]"
},

"z0_vs_p_hh" : {
"binsX" : 100,
"minX" : 0,
"maxX" : 4,
"binsY" : 200,
"minY" : -5,
"maxY" : 5,
"xtitle" : "trk p [GeV]",
"ytitle" : "trk z0 [mm]"
},

"z0_vs_phi0_hh" : {
"binsX" : 100,
"minX" : -0.4,
"maxX" : 0.4,
"binsY" : 200,
"minY" : -5,
"maxY" : 5,
"xtitle" : "trk #phi_{0}",
"ytitle" : "trk z0 [mm]"
},

"z0_vs_tanlambda_hh" : {
"binsX" : 200,
"minX" : -0.1,
"maxX" : 0.1,
"binsY" : 200,
"minY" : -5,
"maxY" : 5,
"xtitle" : "trk(#lamdba)",
"ytitle" : "trk z0 [mm]"
},
"tanlambda_vs_phi0_hh" : {
"binsX" : 100,
"minX" : -0.4,
"maxX" : 0.4,
"binsY" : 100,
"minY" : -0.2,
"maxY" : 0.2,
"xtitle" : "trk #phi_{0}",
"ytitle" : "trk tan(#lambda)"
},
"xpos_at_ecal_h" : {
"bins" : 400,
"minX" : -100,
"maxX" : 100,
"xtitle" : "track x pos [mm]",
"ytitle" : "Tracks"
},
"ypos_at_ecal_h" : {
"bins" : 400,
"minX" : -100,
"maxX" : 100,
"xtitle" : "track y pos [mm]",
"ytitle" : "Tracks"
},
"xypos_at_ecal_hh" : {
"binsX" : 100,
"minX" : -200,
"maxX" : 200,
"binsY" : 100,
"minY" : -200,
"maxY" : 200,
"xtitle" : "trk ecal x [mm]",
"ytitle" : "trk ecal y [mm]"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,13 @@
"xtitle" : "vtx E_{sum} [GeV]",
"ytitle" : "Vertices"
},
"vtx_smear_InvM_h" : {
"bins" : 200,
"minX" : 0.0,
"maxX" : 0.2,
"xtitle" : "M_{vtx} [GeV]",
"ytitle" : "Vertices"
},
"vtx_InvM_vtx_z_hh" : {
"binsX" : 200,
"minX" : 0.0,
Expand Down
4 changes: 2 additions & 2 deletions analysis/selections/vertexSelection_2019.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"eleMom_lt" : {
"cut" : 6.8,
"cut" : 3.64,
"id" : 0,
"info" : "p e^{-} < 6.8 GeV"
"info" : "p e^{-} < 0.8 * Ebeam GeV"
},
"eleTrkChi2Ndf_lt" : {
"cut" : 30,
Expand Down
19 changes: 14 additions & 5 deletions event/include/MCTrackerHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ class MCTrackerHit : public TObject {
*
* @param position The hit position.
*/
void setPosition(const double* position, bool rotate = false);

/** @return The hit position. */
std::vector<double> getPosition() const { return {x_, y_, z_}; };
void setPosition(const double* position, bool rotate = false);

/** @return The hit position. */
std::vector<double> getPosition() const { return {x_, y_, z_}; };

void setMomentum(const float* momentum, bool rotate = false);
std::vector<float> getMomentum() const { return {px_, py_, pz_}; };

/** @return the global X coordinate of the hit */
double getGlobalX() const {return x_;}
Expand Down Expand Up @@ -88,7 +91,8 @@ class MCTrackerHit : public TObject {
//** @return the pdg id of particle that made the hit */
int getPDG() const {return pdg_;};

ClassDef(MCTrackerHit, 1);

ClassDef(MCTrackerHit, 1);

private:

Expand All @@ -101,6 +105,11 @@ class MCTrackerHit : public TObject {
/** The x position of the hit. */
double z_{-999};

/** The truth momentum of the hit. Only MC */
float px_{-999};
float py_{-999};
float pz_{-999};

/** The hit time. */
double time_{-999};

Expand Down
5 changes: 4 additions & 1 deletion event/include/Particle.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,10 @@ class Particle : public TObject {
int getPDG() const { return pdg_; };

/** @return The particle energy in GeV. */
double getEnergy() const { return energy_; };
double getEnergy() const { return energy_; };

/** @return The particle momentum in GeV. */
double getP() const {return sqrt(px_*px_ + py_*py_ + pz_*pz_);};

/** @return The invariant mass of the particle in GeV. */
double getMass() const { return mass_; };
Expand Down
4 changes: 2 additions & 2 deletions event/include/Track.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ class Track : public TObject {
* @return momentum magnitude
*/

double getP(){return sqrt(px_*px_ + py_*py_ + pz_*pz_);};
double getP() const {return sqrt(px_*px_ + py_*py_ + pz_*pz_);};

double getPt() {return sqrt(px_*px_ + pz_*pz_);}
double getPt() const {return sqrt(px_*px_ + py_*py_);}

/**
* Set the lambda kink of the given layer.
Expand Down
8 changes: 8 additions & 0 deletions event/include/Vertex.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <TRefArray.h>
#include <TRef.h>
#include <TVector3.h>
#include <TLorentzVector.h>

//TODO make float/doubles accordingly.

Expand Down Expand Up @@ -68,6 +69,13 @@ class Vertex : public TObject {
*/
void setVtxParameters(const std::vector<float>& parameters);

void setVtxParameters(const TLorentzVector& p1,
const TLorentzVector& p2);

void setVtxParameters(const TVector3& p1,
const TVector3& p2,
const double m) ;

/** Set the type */
void setType(const std::string& type) {type_ = type;}

Expand Down
Loading

0 comments on commit 5a73410

Please sign in to comment.