63 #include "TLorentzVector.h" 82 bool operator () (
const TLorentzVector&
a,
const TLorentzVector&
b)
const {
84 return a.Pt() > b.Pt();
94 pvs_ =consumes<edm::View<reco::Vertex> >(
99 tok_pfjet_ = consumes<reco::PFJetCollection>(labelPFJet_);
100 tok_track_ = consumes<reco::TrackCollection>(labelTrack_);
101 tok_castorjet_ = consumes<reco::BasicJetCollection>(labelCastorJet_);
118 PFJetpt = bei.
book1D(
"PFJetpt",
";p_{T}(PFJet)", 100,0.0 , 100);
119 PFJeteta = bei.
book1D(
"PFJeteta",
";#eta(PFJet)", 50, -2.5, 2.5);
120 PFJetphi = bei.
book1D(
"PFJetphi",
";#phi(PFJet)", 50, -3.14,3.14);
121 PFJetMulti = bei.
book1D(
"PFJetMulti",
";No. of PFJets", 10, -0.5, 9.5);
122 PFJetRapidity = bei.
book1D(
"PFJetRapidity",
";PFJetRapidity", 50, -6.0,6.0);
123 CastorJetphi = bei.
book1D(
"CastorJetphi",
";#phi(CastorJet)", 50, -3.14,3.14);
124 CastorJetMulti = bei.
book1D(
"CastorJetMulti",
";No. of CastorJets", 10, -0.5, 9.5);
125 Track_HP_Phi =bei.
book1D(
"Track_HP_Phi",
";#phi(HPtrack)", 50, -3.14,3.14);
126 Track_HP_Eta =bei.
book1D(
"Track_HP_Eta",
";#eta(HPtrack)", 50, -2.5, 2.5);
127 Track_HP_Pt =bei.
book1D(
"Track_HP_Pt",
";p_{T}(HPtrack)",500, 0.0 , 50);
128 Track_HP_ptErr_over_pt=bei.
book1D(
"Track_HP_ptErr_over_pt",
";{p_{T}Err}/p_{T}",100,0,0.1);
129 Track_HP_dzvtx_over_dzerr=bei.
book1D(
"Track_HP_dzvtx_over_dzerr",
";dZerr/dZ",100,-10,10);
130 Track_HP_dxyvtx_over_dxyerror =bei.
book1D(
"Track_HP_dxyvtx_over_dxyerror",
";dxyErr/dxy",100,-10,10);
131 NPV = bei.
book1D(
"NPV",
";NPV",10, -0.5, 9.5);
132 PV_chi2 = bei.
book1D(
"PV_chi2",
";PV_chi2",100, 0.0, 2.0);
133 PV_d0 = bei.
book1D(
"PV_d0",
";PV_d0",100, -10.0, 10.0);
134 PV_numTrks = bei.
book1D(
"PV_numTrks",
";PV_numTrks",100, -0.5, 99.5);
135 PV_sumTrks=bei.
book1D(
"PV_sumTrks",
";PV_sumTrks",100,0,100);
136 h_ptsum_towards = bei.
book1D(
"h_ptsum_towards",
";h_ptsum_towards",100,0,100);
137 h_ptsum_transverse = bei.
book1D(
"h_ptsum_transverse",
";h_ptsum_transverse",100,0,100);
139 h_ntracks = bei.
book1D(
"h_ntracks",
";h_ntracks",50,-0.5,49.5);
140 h_trkptsum = bei.
book1D(
"h_trkptsum",
";h_trkptsum",100,0,100);
141 h_ptsum_away = bei.
book1D(
"h_ptsum_away",
";h_ptsum_away",100,0,100);
142 h_ntracks_towards = bei.
book1D(
"h_ntracks_towards",
";h_ntracks_towards",50,-0.5,49.5);
143 h_ntracks_transverse = bei.
book1D(
"h_ntracks_transverse",
";h_ntracks_transverse",50,-0.5,49.5);
144 h_ntracks_away = bei.
book1D(
"h_ntracks_away",
";h_ntracks_away",50,-0.5,49.5);
146 h_leadingtrkpt_ntrk_away =bei.
bookProfile(
"h_leadingtrkpt_ntrk_away",
"h_leadingtrkpt_ntrk_away",50,0,50,0,30,
" ");
147 h_leadingtrkpt_ntrk_towards =bei.
bookProfile(
"h_leadingtrkpt_ntrk_towards",
"h_leadingtrkpt_ntrk_towards",50,0,50,0,30,
" ");
148 h_leadingtrkpt_ntrk_transverse =bei.
bookProfile(
"h_leadingtrkpt_ntrk_transverse",
"h_leadingtrkpt_ntrk_transverse",50,0,50,0,30,
" ");
149 h_leadingtrkpt_ptsum_away =bei.
bookProfile(
"h_leadingtrkpt_ptsum_away",
"h_leadingtrkpt_ptsum_away",50,0,50,0,30,
" ");
150 h_leadingtrkpt_ptsum_towards =bei.
bookProfile(
"h_leadingtrkpt_ptsum_towards",
"h_leadingtrkpt_ptsum_towards",50,0,50,0,30,
" ");
151 h_leadingtrkpt_ptsum_transverse =bei.
bookProfile(
"h_leadingtrkpt_ptsum_transverse",
"h_leadingtrkpt_ptsum_transverse",50,0,50,0,30,
" ");
166 using namespace reco;
169 eventNumber_ = iEvent.
id().
event();
176 double bestvz=-999.9, bestvx=-999.9, bestvy=-999.9;
177 double bestvzError=-999.9, bestvxError=-999.9, bestvyError=-999.9;
180 NPV->Fill(privtxs->size());
181 if(privtxs->begin() !=privtxs->end() && !(pvtx.
isFake()) && pvtx.
position().Rho() <= 2. && fabs(pvtx.
position().z()) <= 24){
185 bestvzError = pvtx.
zError();
186 bestvxError = pvtx.
xError();
187 bestvyError = pvtx.
yError();
189 PV_d0->Fill(
sqrt(pvtx.
x() * pvtx.
x() + pvtx.
y() * pvtx.
y()));
191 double vertex_sumTrks = 0.0;
194 vertex_sumTrks += (*iTrack)->pt();
196 PV_sumTrks->Fill(vertex_sumTrks);
208 reco::PFJetCollection::const_iterator pfjetchsclus = pfchsjets->begin();
209 for(pfjetchsclus = pfchsjets->begin(); pfjetchsclus!= pfchsjets->end() ; ++pfjetchsclus){
210 PFJetpt->Fill( pfjetchsclus->pt());
211 PFJeteta->Fill( pfjetchsclus->eta());
212 PFJetphi->Fill( pfjetchsclus->phi());
213 PFJetRapidity->Fill( pfjetchsclus->rapidity());
216 PFJetMulti->Fill( nPFCHSJet);
219 std::vector<Jet> recoCastorJets;
220 recoCastorJets.clear();
223 iEvent.
getByToken(tok_castorjet_, castorJets);
225 for (
unsigned ijet=0; ijet<castorJets->size();ijet++) {
226 recoCastorJets.push_back((*castorJets)[ijet]);
228 for (
unsigned ijet=0; ijet<recoCastorJets.size(); ijet++) {
230 CastorJetphi->Fill( recoCastorJets[ijet].phi());
232 CastorJetMulti->Fill(recoCastorJets.size());
240 std::vector<TLorentzVector> T_trackRec_P4;
243 int ntracks_towards = 0;
244 int ntracks_transverse = 0;
245 int ntracks_away = 0;
248 float ptsum_towards = 0;
249 float ptsum_transverse = 0;
250 float ptsum_away = 0;
252 T_trackRec_P4.clear();
253 for(reco::TrackCollection::const_iterator iT = itracks->begin(); iT != itracks->end(); ++iT){
254 if(iT->quality(hiPurity)){
256 double dzvtx = iT->dz(bestvtx);
257 double dxyvtx = iT->dxy(bestvtx);
258 double dzerror =
sqrt(iT->dzError()*iT->dzError()+bestvzError*bestvzError);
259 double dxyerror =
sqrt(iT->d0Error()*iT->d0Error()+bestvxError*bestvyError);
260 if((iT->ptError())/iT->pt() < 0.05 && dzvtx < 3.0 && dxyvtx < 3.0){
262 trk.SetPtEtaPhiE(iT->pt(),iT->eta(),iT->phi(),iT->p());
263 T_trackRec_P4.push_back(trk);
264 Track_HP_Eta->Fill(iT->eta());
265 Track_HP_Phi->Fill(iT->phi());
266 Track_HP_Pt->Fill(iT->pt());
267 Track_HP_ptErr_over_pt->Fill((iT->ptError())/iT->pt());
268 Track_HP_dzvtx_over_dzerr->Fill(dzvtx/dzerror);
269 Track_HP_dxyvtx_over_dxyerror->Fill(dxyvtx/dxyerror);
274 float highest_pt_track=-999;
276 for(
unsigned int k=0;
k<T_trackRec_P4.size();
k++){
277 if(T_trackRec_P4.at(
k).Pt() > highest_pt_track){
278 highest_pt_track=T_trackRec_P4.at(
k).Pt();
283 unsigned int finalid=
abs(index);
285 if(finalid < T_trackRec_P4.size()){
287 for(
unsigned int itrk=0;itrk<T_trackRec_P4.size();itrk++){
289 ptsum= ptsum + T_trackRec_P4.at(itrk).Pt();
290 dphi =
deltaPhi(T_trackRec_P4.at(itrk).Phi(),T_trackRec_P4.at(index).Phi());
291 if(fabs(dphi) < 1.05){
293 ptsum_towards = ptsum_towards + T_trackRec_P4.at(itrk).Pt();}
294 if(fabs(dphi) > 1.05 && fabs(dphi) < 2.09){
295 ++ntracks_transverse;
296 ptsum_transverse = ptsum_transverse + T_trackRec_P4.at(itrk).Pt();}
297 if(fabs(dphi) > 2.09){
299 ptsum_away = ptsum_away + T_trackRec_P4.at(itrk).Pt();}
304 h_ntracks->Fill(ntracks);
305 h_trkptsum->Fill(ptsum);
306 h_ptsum_towards->Fill(ptsum_towards);
307 h_ptsum_transverse->Fill(ptsum_transverse);
308 h_ptsum_away->Fill(ptsum_away);
309 h_ntracks_towards->Fill(ntracks_towards);
310 h_ntracks_transverse->Fill(ntracks_transverse);
311 h_ntracks_away->Fill(ntracks_away);
313 if(!T_trackRec_P4.empty()){
314 h_leadingtrkpt_ntrk_towards->Fill(T_trackRec_P4.at(index).Pt(),ntracks_towards/8.37);
315 h_leadingtrkpt_ntrk_transverse->Fill(T_trackRec_P4.at(index).Pt(),ntracks_transverse/8.37);
316 h_leadingtrkpt_ntrk_away->Fill(T_trackRec_P4.at(index).Pt(),ntracks_away/8.37);
317 h_leadingtrkpt_ptsum_towards->Fill(T_trackRec_P4.at(index).Pt(),ptsum_towards/8.37);
318 h_leadingtrkpt_ptsum_transverse->Fill(T_trackRec_P4.at(index).Pt(),ptsum_transverse/8.37);
319 h_leadingtrkpt_ptsum_away->Fill(T_trackRec_P4.at(index).Pt(),ptsum_away/8.37);
static const char runNumber_[]
T getParameter(std::string const &) const
EventNumber_t event() const
trackRef_iterator tracks_end() const
last iterator over tracks
MonitorElement * bookProfile(Args &&...args)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
double zError() const
error on z
TrackQuality
track quality
double y() const
y coordinate
int bunchCrossing() const
FSQDQM(const edm::ParameterSet &ps)
LuminosityBlockNumber_t luminosityBlock() const
const Point & position() const
position
void bookHistograms(DQMStore::IBooker &bei, edm::Run const &, edm::EventSetup const &) override
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
double z() const
z coordinate
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
double x() const
x coordinate
static TrackQuality qualityByName(const std::string &name)
double xError() const
error on x
void setCurrentFolder(const std::string &fullpath)
T const * product() const
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< PFJet > PFJetCollection
collection of PFJet objects
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
double normalizedChi2() const
chi-squared divided by n.d.o.f.
trackRef_iterator tracks_begin() const
first iterator over tracks
double yError() const
error on y
size_t tracksSize() const
number of tracks