23 #include "TLorentzVector.h"
58 histname =
"InvariantMass_";
69 histname =
"TrackPtPositive_";
71 histname +
AlgoName, histname +
AlgoName, TrackPtPositiveBin, TrackPtPositiveMin, TrackPtPositiveMax);
78 histname =
"TrackPtNegative_";
80 histname +
AlgoName, histname +
AlgoName, TrackPtNegativeBin, TrackPtNegativeMin, TrackPtNegativeMax);
83 histname =
"TrackQuality_";
96 histname =
"SumCharge_";
104 histname =
"TrackCurvature_";
122 histname =
"MinJetDeltaR_";
135 histname =
"MinTrackDeltaR_";
144 histname =
"AlCaRecoTrackEfficiency_";
158 histname =
"Hits_ZvsR_";
165 histname =
"Hits_XvsY_";
169 histname =
"Hits_perDetId_";
197 edm::LogError(
"Alignment") <<
"invalid trackcollection encountered!";
204 edm::LogError(
"Alignment") <<
"invalid reference track-collection encountered!";
210 edm::LogError(
"Alignment") <<
"invalid geometry found in event setup!";
215 edm::LogError(
"Alignment") <<
"invalid magnetic field configuration encountered!";
222 if (!
jets.isValid()) {
223 edm::LogError(
"Alignment") <<
"no jet collection found in event!";
232 double sumOfCharges = 0;
233 for (reco::TrackCollection::const_iterator
track = (*trackCollection).begin();
track < (*trackCollection).end();
238 for (reco::CaloJetCollection::const_iterator itJet =
jets->begin(); itJet !=
jets->end(); ++itJet) {
250 double minTrackDeltaR = 10;
251 for (reco::TrackCollection::const_iterator track2 = (*trackCollection).begin(); track2 < (*trackCollection).end();
254 if (dR < minTrackDeltaR && dR > 1
e-6)
264 GlobalPoint gPoint((*track).vx(), (*track).vy(), (*track).vz());
266 double curv = -(*track).charge() * 0.002998 *
B / (*track).pt();
269 if ((*track).charge() > 0)
271 if ((*track).charge() < 0)
276 sumOfCharges += (*track).charge();
282 if ((*trackCollection).size() == 2) {
283 TLorentzVector track0(
284 (*trackCollection).at(0).px(),
285 (*trackCollection).at(0).py(),
286 (*trackCollection).at(0).pz(),
288 TLorentzVector track1(
289 (*trackCollection).at(1).px(),
290 (*trackCollection).at(1).py(),
291 (*trackCollection).at(1).pz(),
293 TLorentzVector mother = track0 + track1;
297 edm::LogInfo(
"Alignment") <<
"wrong number of tracks trackcollection encountered: " << (*trackCollection).size();
304 if ((*iHit)->isValid()) {
306 const DetId geoId(
hit->geographicalId());
313 double r =
sqrt(globP.x() * globP.x() + globP.y() * globP.y());
315 r *= globP.y() / fabs(globP.y());
327 std::vector<int> sortedRawIds;
328 for (std::vector<DetId>::const_iterator iDetId =
geometry.detUnitIds().begin(); iDetId !=
geometry.detUnitIds().end();
330 sortedRawIds.push_back((*iDetId).rawId());
332 std::sort(sortedRawIds.begin(), sortedRawIds.end());
335 for (std::vector<int>::iterator iRawId = sortedRawIds.begin(); iRawId != sortedRawIds.end(); ++iRawId) {