25 #include "TLorentzVector.h"
59 histname =
"InvariantMass_";
70 histname =
"TrackPtPositive_";
72 histname +
AlgoName, histname +
AlgoName, TrackPtPositiveBin, TrackPtPositiveMin, TrackPtPositiveMax);
79 histname =
"TrackPtNegative_";
81 histname +
AlgoName, histname +
AlgoName, TrackPtNegativeBin, TrackPtNegativeMin, TrackPtNegativeMax);
84 histname =
"TrackQuality_";
97 histname =
"SumCharge_";
105 histname =
"TrackCurvature_";
123 histname =
"MinJetDeltaR_";
136 histname =
"MinTrackDeltaR_";
145 histname =
"AlCaRecoTrackEfficiency_";
159 histname =
"Hits_ZvsR_";
166 histname =
"Hits_XvsY_";
170 histname =
"Hits_perDetId_";
198 edm::LogError(
"Alignment") <<
"invalid trackcollection encountered!";
205 edm::LogError(
"Alignment") <<
"invalid reference track-collection encountered!";
212 edm::LogError(
"Alignment") <<
"invalid geometry found in event setup!";
218 edm::LogError(
"Alignment") <<
"invalid magnetic field configuration encountered!";
225 if (!
jets.isValid()) {
226 edm::LogError(
"Alignment") <<
"no jet collection found in event!";
235 double sumOfCharges = 0;
236 for (reco::TrackCollection::const_iterator
track = (*trackCollection).begin();
track < (*trackCollection).end();
241 for (reco::CaloJetCollection::const_iterator itJet =
jets->begin(); itJet !=
jets->end(); ++itJet) {
253 double minTrackDeltaR = 10;
254 for (reco::TrackCollection::const_iterator track2 = (*trackCollection).begin(); track2 < (*trackCollection).end();
257 if (dR < minTrackDeltaR && dR > 1
e-6)
267 GlobalPoint gPoint((*track).vx(), (*track).vy(), (*track).vz());
269 double curv = -(*track).charge() * 0.002998 *
B / (*track).pt();
272 if ((*track).charge() > 0)
274 if ((*track).charge() < 0)
279 sumOfCharges += (*track).charge();
285 if ((*trackCollection).size() == 2) {
286 TLorentzVector track0(
287 (*trackCollection).at(0).px(),
288 (*trackCollection).at(0).py(),
289 (*trackCollection).at(0).pz(),
291 TLorentzVector track1(
292 (*trackCollection).at(1).px(),
293 (*trackCollection).at(1).py(),
294 (*trackCollection).at(1).pz(),
296 TLorentzVector mother = track0 + track1;
300 edm::LogInfo(
"Alignment") <<
"wrong number of tracks trackcollection encountered: " << (*trackCollection).size();
307 if ((*iHit)->isValid()) {
309 const DetId geoId(
hit->geographicalId());
316 double r =
sqrt(globP.x() * globP.x() + globP.y() * globP.y());
318 r *= globP.y() / fabs(globP.y());
330 std::vector<int> sortedRawIds;
331 for (std::vector<DetId>::const_iterator iDetId =
geometry.detUnitIds().begin(); iDetId !=
geometry.detUnitIds().end();
333 sortedRawIds.push_back((*iDetId).rawId());
335 std::sort(sortedRawIds.begin(), sortedRawIds.end());
338 for (std::vector<int>::iterator iRawId = sortedRawIds.begin(); iRawId != sortedRawIds.end(); ++iRawId) {