65 bool vertexAvailable =
false;
70 if (recoBeamSpotHandle.
isValid()){
74 edm::LogError(
"UnusableBeamSpot") <<
"No beam spot found in Event";
82 if ((recoVertexHandle.
isValid()) && (!recoVertexHandle->empty())){
85 vertexAvailable =
true;
88 <<
"No vertex found in Event, beam spot used instaed" <<
"\n";
97 if ((candidateHandle.
isValid())&&(!candidateHandle->empty())){
100 for (
unsigned i = 0;
i < candidateHandle->size(); ++
i) {
101 double pt=candidateHandle->ptrAt(
i)->pt();
108 track =
dynamic_cast<const reco::Track*
>(candidateHandle->ptrAt(i_maxpt)->bestTrack());
114 std::vector<reco::ElectronRef> recocandidates;
116 if ((!recocandidates.empty())){
119 for (
unsigned i = 0;
i < recocandidates.size(); ++
i) {
120 double pt=recocandidates.at(
i)->pt();
126 track =
dynamic_cast<const reco::Track*
>(recocandidates.at(i_maxpt)->bestTrack());
133 std::vector<reco::RecoChargedCandidateRef> recocandidates;
135 if ((!recocandidates.empty())){
138 for (
unsigned i = 0;
i < recocandidates.size(); ++
i) {
139 double pt=recocandidates.at(
i)->pt();
145 track =
dynamic_cast<const reco::Track*
>(recocandidates.at(i_maxpt)->bestTrack());
152 if ((trackHandle.
isValid())&&(!trackHandle->empty())){
155 for (
unsigned i = 0;
i < trackHandle->size(); ++
i) {
156 double pt=trackHandle->ptrAt(
i)->pt();
163 track =
dynamic_cast<const reco::Track*
>(&*trackHandle->ptrAt(i_maxpt));
169 vertexPoint.SetZ(vertexPoint.z()+track->
dz(vertexPoint));
172 vertexPoint.SetZ(track->
vz());
189 edm::LogInfo(
"PVDebugInfo")<<
"Vertices by VertexFromTrackProducer: \n";
190 for(reco::VertexCollection::const_iterator
v=vColl.begin();
191 v!=vColl.end(); ++
v){
193 <<
"recvtx "<< ivtx++
194 <<
" x " << std::setw(6) <<
v->position().x()
195 <<
" dx " << std::setw(6) <<
v->xError()
196 <<
" y " << std::setw(6) <<
v->position().y()
197 <<
" dy " << std::setw(6) <<
v->yError()
198 <<
" z " << std::setw(6) <<
v->position().z()
199 <<
" dz " << std::setw(6) <<
v->zError()
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< Vertex > VertexCollection
collection of Vertex objects
const Point & position() const
position
const edm::EDGetTokenT< reco::BeamSpot > beamSpotLabel
const edm::EDGetTokenT< edm::View< reco::RecoCandidate > > candidateToken
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > triggerFilterElectronsSrc
const bool fUseTriggerFilterElectrons
const bool fIsRecoCandidate
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
double vz() const
z coordinate of the reference point on track
XYZPointD XYZPoint
point in space with cartesian internal representation
const edm::EDGetTokenT< edm::View< reco::Track > > trackToken
const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > triggerFilterMuonsSrc
const Point & position() const
position
const bool fUseTriggerFilterMuons
const edm::EDGetTokenT< edm::View< reco::Vertex > > vertexLabel