Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
758 changes: 758 additions & 0 deletions GammaGammaLeptonLepton/interface/AnalysisEvent.h

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions GammaGammaLeptonLepton/interface/HLTMatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
#include <memory>
#include <vector>

#include <iostream>

//
// class declaration
//

class HLTMatcher {
public:
explicit HLTMatcher(std::vector<std::string>);
~HLTMatcher();
int TriggerNum(std::string);
private:
std::vector<std::string> HLTnames;
};
namespace ggll
{
class HLTMatcher {
public:
explicit HLTMatcher() {}
explicit HLTMatcher( const std::vector<std::string>& );
~HLTMatcher() {}

//
// constants, enums and typedefs
//

//
// static data member definitions
//
int TriggerNum( const std::string& );
private:
std::vector<std::string> HLTnames;
};
}

#endif

51 changes: 21 additions & 30 deletions GammaGammaLeptonLepton/interface/PrimaryVertexSelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// system include files
#include <fstream>
#include <memory>
#include <map>
#include <vector>

// Muons collection
#include "DataFormats/PatCandidates/interface/Muon.h"
Expand All @@ -17,44 +17,35 @@
#include "RecoEgamma/EgammaTools/interface/ConversionTools.h"

// Vertices collection
#include "DataFormats/VertexReco/interface/Vertex.h"
#include "DataFormats/VertexReco/interface/VertexFwd.h"
#include "DataFormats/Common/interface/RefToBase.h"
#include "RecoVertex/VertexPrimitives/interface/TransientVertex.h"

#include <TVector3.h>
#include <TLorentzVector.h>
#include "TLorentzVector.h"

//
// class declaration
//

class PrimaryVertexSelector : public reco::Vertex {
class PrimaryVertexSelector {
public:
explicit PrimaryVertexSelector(std::vector<std::string>&, std::map<int,TLorentzVector>&, std::map<int,TLorentzVector>&);
~PrimaryVertexSelector();
void SetPosition(double, double, double);
int AddTrack(const reco::TrackRef&, TString&);
inline int Electrons() { return nMatchedElectrons; }
inline int Muons() { return nMatchedMuons; }
double dZ(TVector3, int);
TVector3 Position;
int nTracks, nMatchedTracks, nUnmatchedTracks;
std::vector<int> MatchedMuons, MatchedElectrons;
private:
unsigned int i;
int nMatchedMuons, nMatchedElectrons;
bool FetchMuons, FetchElectrons;
std::map<int,TLorentzVector> MuonMomenta;
std::map<int,TLorentzVector> ElectronMomenta;
};
typedef std::vector< std::pair<int,reco::TrackRef> > MatchedLeptonsMap;

//
// constants, enums and typedefs
//
public:
explicit PrimaryVertexSelector(const std::map<int,TLorentzVector>&, const std::map<int,TLorentzVector>&);
inline ~PrimaryVertexSelector() {;}

//
// static data member definitions
//
void feedTracks(const reco::Vertex::trackRef_iterator&, const reco::Vertex::trackRef_iterator&);

inline MatchedLeptonsMap matchedElectrons() const { return matchedElectrons_; }
int matchedElectron(const reco::TrackRef&) const;

inline MatchedLeptonsMap matchedMuons() const { return matchedMuons_; }
int matchedMuon(const reco::TrackRef&) const;

private:
typedef std::map<int,TLorentzVector> LeptonsMap;

LeptonsMap muonMomenta_, electronMomenta_;
MatchedLeptonsMap matchedMuons_, matchedElectrons_;
};

#endif
66 changes: 66 additions & 0 deletions GammaGammaLeptonLepton/interface/ProtonKinematics.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#ifndef ProtonKinematics_h
#define ProtonKinematics_h

#include "DataFormats/CTPPSReco/interface/TotemRPLocalTrack.h"

/**
* \date Jun 2016
* \author Jan Kaspar <[email protected]>
* \author Laurent Forthomme <[email protected]>
*/
class ProtonKinematics
{
public:
/**
* \param[in] arm_id 0 (F), 1 (N)
* \param[in] side 0 (L), 1 (R)
*/
inline ProtonKinematics(unsigned int run_id, unsigned short arm_id, unsigned short side, const TotemRPLocalTrack& lt) :
fX0(lt.getX0()), fY0(lt.getY0()), fIsValid(lt.isValid()), fArm(arm_id), fSide(side)
{
if (run_id<274244) fRunPeriod = 0;
else fRunPeriod = 1;
}
inline bool isValid() const { return fIsValid; }
inline double getXi() const {
const double x_corr = fX0+getDeX();
return x_corr*1e-3/getD();
}

private:
// alignment corrections (in m)
inline double getDeX() const {
switch (fSide) {
case 0: default: { return getDeX_L(); }
case 1: { return getDeX_R(); }
}
}
inline double getDeX_L() const {
switch (fRunPeriod) {
case 0: { return (fArm==0) ? -3.40 : -0.90; }
case 1: default: { return (fArm==0) ? -1.45 : -3.90; }
}
}
inline double getDeX_R() const {
switch (fRunPeriod) {
case 0: { return (fArm==0) ? -2.75 : -2.40; }
case 1: default: { return (fArm==0) ? -2.85 : -3.25; }
}
}
// optics properties (in m)
inline double getD() const {
switch (fSide) {
case 0: default: { return getD_L(); }
case 1: { return getD_R(); }
}
}
inline double getD_L() const { return (fArm==0) ? 9.22e-2 : 9.26e-2; }
inline double getD_R() const { return (fArm==0) ? 5.81e-2 : 5.16e-2; }

double fX0, fY0;
bool fIsValid;
unsigned short fRunPeriod, fArm, fSide;

};

#endif
Loading