Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:30

0001 #ifndef GenMuonPair_h
0002 #define GenMuonPair_h
0003 
0004 #include <TObject.h>
0005 #include "DataFormats/Candidate/interface/Particle.h"
0006 // #include "MuonAnalysis/MomentumScaleCalibration/interface/BaseMuonPair.h"
0007 #include "MuonAnalysis/MomentumScaleCalibration/interface/Muon.h"
0008 
0009 typedef reco::Particle::LorentzVector lorentzVector;
0010 
0011 /**
0012  * For simplicity we use a different class than for reco used to save the gen muon pairs in a root tree. <br>
0013  * The reason is that there is no need for a map in this case as there is only one collection of generated muons. <br>
0014  * Additionally we want to save the motherId (we could have done using one of the unsigned int in the MuonPair class,
0015  * but this way the name of the datamember is more explicative). <br>
0016  * If it will be needed, it will be straightforward to migrate also the genMuons to use the MuonPair class.
0017  */
0018 
0019 class GenMuonPair : public TObject {
0020 public:
0021   GenMuonPair()
0022       : mu1(lorentzVector(0, 0, 0, 0), -1),
0023         mu2(lorentzVector(0, 0, 0, 0), 1),
0024         motherId(0)  //,
0025   //    statusMu(-1),
0026   {}
0027 
0028   GenMuonPair(const MuScleFitMuon& initMu1, const MuScleFitMuon& initMu2, const int initMotherId)
0029       :  //       const int initMotherId, const int initStatusMu) :
0030         mu1(initMu1),
0031         mu2(initMu2),
0032         motherId(initMotherId)  //,
0033   //    statusMu(initStatusMu)
0034   // ,
0035   // motherId(initMotherId)
0036   {
0037     // Put this in the initialization list and root will not compile...
0038     // Probably some conflict with the other MuonPair class that also contains integers or
0039     // something even weirder...
0040     /*     motherId = initMotherId; */
0041   }
0042 
0043   /// Used to copy the content of another GenMuonPair
0044   void copy(const GenMuonPair& copyPair) {
0045     mu1 = copyPair.mu1;
0046     mu2 = copyPair.mu2;
0047     motherId = copyPair.motherId;
0048     //    statusMu = copyPair.statusMu;
0049   }
0050 
0051   MuScleFitMuon mu1;
0052   MuScleFitMuon mu2;
0053   Int_t motherId;
0054   //  Int_t statusMu;
0055 
0056   ClassDef(GenMuonPair, 3)
0057 };
0058 ClassImp(GenMuonPair);
0059 
0060 #endif