File indexing completed on 2024-09-10 02:59:11
0001 #ifndef MU_END_CROSS_GAP_H
0002 #define MU_END_CROSS_GAP_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0019 #include "DataFormats/GeometryVector/interface/LocalVector.h"
0020 #include <vector>
0021
0022 class CSCCrossGap {
0023 public:
0024
0025
0026
0027
0028
0029 CSCCrossGap(double mass, float mom, LocalVector gap);
0030 ~CSCCrossGap() {}
0031
0032 std::vector<LocalPoint> ionClusters() const { return clusters; }
0033 int noOfClusters() const { return clusters.size(); }
0034 std::vector<int> electrons() const { return electronsInClusters; }
0035 int noOfElectrons() const { return electronsInClusters.size(); }
0036 std::vector<double> stepLengths() const { return steps; }
0037 int noOfSteps() const { return steps.size(); }
0038 std::vector<float> eLossPerStep() const { return elosses; }
0039 int noOfElosses() const { return elosses.size(); }
0040
0041 void addCluster(LocalPoint here) { clusters.push_back(here); }
0042 void addElectrons(int nelec = 1) { electronsInClusters.push_back(nelec); }
0043 void addElectronToBack() { ++electronsInClusters.back(); }
0044
0045 void addStep(double step) { steps.push_back(step); }
0046 void addEloss(float eloss) { elosses.push_back(eloss); }
0047
0048 double logGamma(double mass, float momentum);
0049 double logGamma() { return loggam; }
0050 double beta2() const { return theBeta2; }
0051 double gamma() const { return theGamma; }
0052 LocalVector gapVector() const { return theGap; }
0053 LocalVector unitVector() const { return theGap.unit(); }
0054 float length() const { return theGap.mag(); }
0055
0056 private:
0057 double theBeta2;
0058 double theGamma;
0059 double loggam;
0060 LocalVector theGap;
0061
0062 std::vector<LocalPoint> clusters;
0063 std::vector<int> electronsInClusters;
0064 std::vector<double> steps;
0065 std::vector<float> elosses;
0066 };
0067
0068 #endif