예제 #1
0
파일: BKstLL.py 프로젝트: rmanzoni/BKstLL
    def __init__(self, tk1, tk2, requireVtx=False):
        self.tk1_ = tk1
        self.tk2_ = tk2

        self.arbitrate()

        self.vtx = None
        self.vtxprob = -99.

        if requireVtx:
            # stuff I need to instantiate only once
            self.vtxfit = VertexFitter()
            # create a std::vector<reco::Track> to be passed to the fitter
            self.tofit = ROOT.std.vector('reco::Track')()
            # fill the vector
            self.tofit.push_back(self.tk1_.physObj)
            self.tofit.push_back(self.tk2_.physObj)

            # fit the vertex and save the information
            self.makeVtx_()
예제 #2
0
 def beginLoop(self, setup):
     super(Tau3MuKalmanVertexFitterAnalyzer, self).beginLoop(setup)
     self.vf = VertexFitter()
예제 #3
0
# create handle outside of loop
handle_ele  = Handle ("std::vector<pat::Electron>")
handle_mu  = Handle ("std::vector<pat::Muon>")
handle_gen_pruned  = Handle ("std::vector<reco::GenParticle>")
handle_gen_packed  = Handle ("std::vector<pat::PackedGenParticle>")

# for now, label is just a tuple of strings that is initialized just
# like and edm::InputTag
label_ele = ("slimmedElectrons")
label_mu  = ("slimmedMuons")
label_gen_pruned = ("prunedGenParticles","","PAT")
label_gen_packed = ("packedGenParticles","","PAT")

# initiate the VertexFitter and create a std::vector<RecoChargedCandidate> to be passed to the fitter 
vtxfit = VertexFitter()
tofit = ROOT.std.vector('reco::Track')()



print 'start looping...'

# loop over events
for ii, event in enumerate(events):
    print '#############################################################'
    print 'event %d'%(ii)

    pairs = []
    leps  = []

    # use getByLabel, just like in cmsRun