34 using namespace isodeposit;
48 std::vector<double>
ptThreshold_, etEcalThreshold_, etHcalThreshold_ ,dRVetoTrk_, dRTrk_, dREcal_ , dRHcal_, alpha_, beta_;
57 double isolation(
const T *
t,
double ptThreshold,
double etEcalThreshold,
double etHcalThreshold ,
double dRVetoTrk,
double dRTrk,
double dREcal ,
double dRHcal,
double alpha,
double beta,
bool relativeIsolation) {
71 vetosTrk.push_back(
new ConeVeto( dir, dRVetoTrk ));
75 vetosEcal.push_back(
new ConeVeto( dir, 0.));
79 vetosHcal.push_back(
new ConeVeto( dir, 0. ));
82 double isovalueTrk = (trkIso->
sumWithin(dRTrk,vetosTrk));
83 double isovalueEcal = (ecalIso->
sumWithin(dREcal,vetosEcal));
84 double isovalueHcal = (hcalIso->
sumWithin(dRHcal,vetosHcal));
87 double iso = alpha*( ((1+
beta)/2*isovalueEcal) + ((1-
beta)/2*isovalueHcal) ) + ((1-alpha)*isovalueTrk) ;
88 if(relativeIsolation) iso /= t->pt();
93 double candIsolation(
const reco::Candidate*
c,
double ptThreshold,
double etEcalThreshold,
double etHcalThreshold ,
double dRVetoTrk,
double dRTrk,
double dREcal ,
double dRHcal,
double alpha,
double beta,
bool relativeIsolation) {
95 if(mu != 0)
return isolation(mu, ptThreshold, etEcalThreshold, etHcalThreshold ,dRVetoTrk, dRTrk, dREcal , dRHcal, alpha, beta, relativeIsolation);
97 if(trk != 0)
return isolation(trk, ptThreshold, etEcalThreshold, etHcalThreshold ,dRVetoTrk, dRTrk, dREcal , dRHcal, alpha, beta, relativeIsolation);
99 <<
"Candidate daughter #0 is neither pat::Muons nor pat::GenericParticle\n";
107 vector<ParameterSet> psets = cfg.
getParameter<vector<ParameterSet> > (
"zBlocks" );
108 for( std::vector<edm::ParameterSet>::const_iterator
i = psets.begin();
i != psets.end(); ++
i ) {
109 string zName =
i->getParameter<
string>(
"zName" );
112 beamSpot_ =
i->getParameter<
InputTag>(
"beamSpot" );
113 primaryVertices_=
i->getParameter<
InputTag>(
"primaryVertices" ) ;
114 double ptThreshold =
i->getParameter<
double>(
"ptThreshold");
115 double etEcalThreshold =
i->getParameter<
double>(
"etEcalThreshold");
116 double etHcalThreshold=
i->getParameter<
double>(
"etHcalThreshold");
117 double dRVetoTrk=
i->getParameter<
double>(
"deltaRVetoTrk");
118 double dRTrk=
i->getParameter<
double>(
"deltaRTrk");
119 double dREcal=
i->getParameter<
double>(
"deltaREcal");
120 double dRHcal=
i->getParameter<
double>(
"deltaRHcal");
121 double alpha=
i->getParameter<
double>(
"alpha");
122 double beta=
i->getParameter<
double>(
"beta");
123 bool relativeIsolation =
i->getParameter<
bool>(
"relativeIsolation");
124 string hltPath =
i ->getParameter<std::string >(
"hltPath");
125 zName_.push_back( zName );
127 zGenParticlesMatch_.push_back( zGenParticlesMatch );
128 ptThreshold_.push_back( ptThreshold );
129 etEcalThreshold_.push_back(etEcalThreshold);
130 etHcalThreshold_.push_back(etHcalThreshold);
131 dRVetoTrk_.push_back(dRVetoTrk);
132 dRTrk_.push_back(dRTrk);
133 dREcal_.push_back(dREcal);
134 dRHcal_.push_back(dRHcal);
135 alpha_.push_back(alpha);
136 beta_.push_back(beta);
137 relativeIsolation_.push_back(relativeIsolation);
138 hltPath_.push_back(hltPath);
139 produces<vector<unsigned int> >( alias = zName +
"EventNumber" ).setBranchAlias( alias );
140 produces<vector<unsigned int> >( alias = zName +
"RunNumber" ).setBranchAlias( alias );
141 produces<vector<unsigned int> >( alias = zName +
"LumiBlock" ).setBranchAlias( alias );
142 produces<vector<float> >( alias = zName +
"Mass" ).setBranchAlias( alias );
143 produces<vector<float> >( alias = zName +
"MassSa" ).setBranchAlias( alias );
144 produces<vector<float> >( alias = zName +
"Pt" ).setBranchAlias( alias );
145 produces<vector<float> >( alias = zName +
"Eta" ).setBranchAlias( alias );
146 produces<vector<float> >( alias = zName +
"Phi" ).setBranchAlias( alias );
147 produces<vector<float> >( alias = zName +
"Y" ).setBranchAlias( alias );
148 produces<vector<float> >( alias = zName +
"Dau1Pt" ).setBranchAlias( alias );
149 produces<vector<float> >( alias = zName +
"Dau2Pt" ).setBranchAlias( alias );
150 produces<vector<float> >( alias = zName +
"Dau1SaPt" ).setBranchAlias( alias );
151 produces<vector<float> >( alias = zName +
"Dau2SaPt" ).setBranchAlias( alias );
152 produces<vector<unsigned int> >( alias = zName +
"Dau1HLTBit" ).setBranchAlias( alias );
153 produces<vector<unsigned int> >( alias = zName +
"Dau2HLTBit" ).setBranchAlias( alias );
154 produces<vector<int> >( alias = zName +
"Dau1Q" ).setBranchAlias( alias );
155 produces<vector<int> >( alias = zName +
"Dau2Q" ).setBranchAlias( alias );
156 produces<vector<float> >( alias = zName +
"Dau1Eta" ).setBranchAlias( alias );
157 produces<vector<float> >( alias = zName +
"Dau2Eta" ).setBranchAlias( alias );
158 produces<vector<float> >( alias = zName +
"Dau1SaEta" ).setBranchAlias( alias );
159 produces<vector<float> >( alias = zName +
"Dau2SaEta" ).setBranchAlias( alias );
160 produces<vector<float> >( alias = zName +
"Dau1Phi" ).setBranchAlias( alias );
161 produces<vector<float> >( alias = zName +
"Dau2Phi" ).setBranchAlias( alias );
162 produces<vector<float> >( alias = zName +
"Dau1SaPhi" ).setBranchAlias( alias );
163 produces<vector<float> >( alias = zName +
"Dau2SaPhi" ).setBranchAlias( alias );
164 produces<vector<float> >( alias = zName +
"Dau1Iso" ).setBranchAlias( alias );
165 produces<vector<float> >( alias = zName +
"Dau2Iso" ).setBranchAlias( alias );
166 produces<vector<float> >( alias = zName +
"Dau1TrkIso" ).setBranchAlias( alias );
167 produces<vector<float> >( alias = zName +
"Dau2TrkIso" ).setBranchAlias( alias );
168 produces<vector<float> >( alias = zName +
"Dau1EcalIso" ).setBranchAlias( alias );
169 produces<vector<float> >( alias = zName +
"Dau2EcalIso" ).setBranchAlias( alias );
170 produces<vector<float> >( alias = zName +
"Dau1HcalIso" ).setBranchAlias( alias );
171 produces<vector<float> >( alias = zName +
"Dau2HcalIso" ).setBranchAlias( alias );
172 produces<vector<float> >( alias = zName +
"Dau1MuEnergyEm" ).setBranchAlias( alias );
173 produces<vector<float> >( alias = zName +
"Dau1MuEnergyHad" ).setBranchAlias( alias );
174 produces<vector<float> >( alias = zName +
"Dau2MuEnergyEm" ).setBranchAlias( alias );
175 produces<vector<float> >( alias = zName +
"Dau2MuEnergyHad" ).setBranchAlias( alias );
177 produces<vector<float> >( alias = zName +
"VtxNormChi2" ).setBranchAlias( alias );
178 produces<vector<unsigned int> >( alias = zName +
"Dau1NofHit" ).setBranchAlias( alias );
179 produces<vector<unsigned int> >( alias = zName +
"Dau2NofHit" ).setBranchAlias( alias );
180 produces<vector<unsigned int> >( alias = zName +
"Dau1NofHitTk" ).setBranchAlias( alias );
181 produces<vector<unsigned int> >( alias = zName +
"Dau1NofHitSta" ).setBranchAlias( alias );
182 produces<vector<unsigned int> >( alias = zName +
"Dau2NofHitTk" ).setBranchAlias( alias );
183 produces<vector<unsigned int> >( alias = zName +
"Dau2NofHitSta" ).setBranchAlias( alias );
184 produces<vector<unsigned int> >( alias = zName +
"Dau1NofMuChambers" ).setBranchAlias( alias );
185 produces<vector<unsigned int> >( alias = zName +
"Dau2NofMuChambers" ).setBranchAlias( alias );
186 produces<vector<unsigned int> >( alias = zName +
"Dau1NofMuMatches" ).setBranchAlias( alias );
187 produces<vector<unsigned int> >( alias = zName +
"Dau2NofMuMatches" ).setBranchAlias( alias );
188 produces<vector<float> >( alias = zName +
"Dau1Chi2" ).setBranchAlias( alias );
189 produces<vector<float> >( alias = zName +
"Dau2Chi2" ).setBranchAlias( alias );
190 produces<vector<float> >( alias = zName +
"Dau1TrkChi2" ).setBranchAlias( alias );
191 produces<vector<float> >( alias = zName +
"Dau2TrkChi2" ).setBranchAlias( alias );
192 produces<vector<float> >( alias = zName +
"Dau1dxyFromBS" ).setBranchAlias( alias );
193 produces<vector<float> >( alias = zName +
"Dau2dxyFromBS" ).setBranchAlias( alias );
194 produces<vector<float> >( alias = zName +
"Dau1dzFromBS" ).setBranchAlias( alias );
195 produces<vector<float> >( alias = zName +
"Dau2dzFromBS" ).setBranchAlias( alias );
196 produces<vector<float> >( alias = zName +
"Dau1dxyFromPV" ).setBranchAlias( alias );
197 produces<vector<float> >( alias = zName +
"Dau2dxyFromPV" ).setBranchAlias( alias );
198 produces<vector<float> >( alias = zName +
"Dau1dzFromPV" ).setBranchAlias( alias );
199 produces<vector<float> >( alias = zName +
"Dau2dzFromPV" ).setBranchAlias( alias );
200 produces<vector<float> >( alias = zName +
"TrueMass" ).setBranchAlias( alias );
201 produces<vector<float> >( alias = zName +
"TruePt" ).setBranchAlias( alias );
202 produces<vector<float> >( alias = zName +
"TrueEta" ).setBranchAlias( alias );
203 produces<vector<float> >( alias = zName +
"TruePhi" ).setBranchAlias( alias );
204 produces<vector<float> >( alias = zName +
"TrueY" ).setBranchAlias( alias );
212 if (!evt.
getByLabel(beamSpot_, beamSpotHandle)) {
213 std::cout <<
">>> No beam spot found !!!"<<std::endl;
216 if (!evt.
getByLabel(primaryVertices_, primaryVertices)){
217 std::cout <<
">>> No primary verteces found !!!"<<std::endl;
220 unsigned int size = z_.size();
221 for(
unsigned int c = 0;
c <
size; ++
c ) {
224 bool isMCMatchTrue =
false;
227 if (evt.
getByLabel( zGenParticlesMatch_[c], zGenParticlesMatch )) {
230 unsigned int zSize = zColl->size();
231 auto_ptr<vector<unsigned int> >
event(
new vector<unsigned int> );
232 auto_ptr<vector<unsigned int> >
run(
new vector<unsigned int> );
233 auto_ptr<vector<unsigned int> >
lumi(
new vector<unsigned int > );
234 auto_ptr<vector<float> > zMass(
new vector<float> );
235 auto_ptr<vector<float> > zMassSa(
new vector<float> );
236 auto_ptr<vector<float> > zPt(
new vector<float> );
237 auto_ptr<vector<float> > zEta(
new vector<float> );
238 auto_ptr<vector<float> > zPhi(
new vector<float> );
239 auto_ptr<vector<float> > zY(
new vector<float> );
240 auto_ptr<vector<float> > zDau1Pt(
new vector<float> );
241 auto_ptr<vector<float> > zDau2Pt(
new vector<float> );
242 auto_ptr<vector<float> > zDau1SaPt(
new vector<float> );
243 auto_ptr<vector<float> > zDau2SaPt(
new vector<float> );
244 auto_ptr<vector<unsigned int> > zDau1HLTBit(
new vector<unsigned int> );
245 auto_ptr<vector<unsigned int> > zDau2HLTBit(
new vector<unsigned int> );
246 auto_ptr<vector<int> > zDau1Q(
new vector<int> );
247 auto_ptr<vector<int> > zDau2Q(
new vector<int> );
248 auto_ptr<vector<float> > zDau1Eta(
new vector<float> );
249 auto_ptr<vector<float> > zDau2Eta(
new vector<float> );
250 auto_ptr<vector<float> > zDau1SaEta(
new vector<float> );
251 auto_ptr<vector<float> > zDau2SaEta(
new vector<float> );
252 auto_ptr<vector<float> > zDau1Phi(
new vector<float> );
253 auto_ptr<vector<float> > zDau2Phi(
new vector<float> );
254 auto_ptr<vector<float> > zDau1SaPhi(
new vector<float> );
255 auto_ptr<vector<float> > zDau2SaPhi(
new vector<float> );
256 auto_ptr<vector<float> > zDau1Iso(
new vector<float> );
257 auto_ptr<vector<float> > zDau2Iso(
new vector<float> );
258 auto_ptr<vector<float> > zDau1TrkIso(
new vector<float> );
259 auto_ptr<vector<float> > zDau2TrkIso(
new vector<float> );
260 auto_ptr<vector<float> > zDau1EcalIso(
new vector<float> );
261 auto_ptr<vector<float> > zDau2EcalIso(
new vector<float> );
262 auto_ptr<vector<float> > zDau1HcalIso(
new vector<float> );
263 auto_ptr<vector<float> > zDau2HcalIso(
new vector<float> );
264 auto_ptr<vector<float> > zDau1MuEnergyEm(
new vector<float> );
265 auto_ptr<vector<float> > zDau2MuEnergyEm(
new vector<float> );
266 auto_ptr<vector<float> > zDau1MuEnergyHad(
new vector<float> );
267 auto_ptr<vector<float> > zDau2MuEnergyHad(
new vector<float> );
268 auto_ptr<vector<float> > vtxNormChi2(
new vector<float> );
269 auto_ptr<vector<unsigned int> > zDau1NofHit(
new vector<unsigned int> );
270 auto_ptr<vector<unsigned int> > zDau2NofHit(
new vector<unsigned int> );
271 auto_ptr<vector<unsigned int> > zDau1NofHitTk(
new vector<unsigned int> );
272 auto_ptr<vector<unsigned int> > zDau2NofHitTk(
new vector<unsigned int> );
273 auto_ptr<vector<unsigned int> > zDau1NofHitSta(
new vector<unsigned int> );
274 auto_ptr<vector<unsigned int> > zDau2NofHitSta(
new vector<unsigned int> );
275 auto_ptr<vector<unsigned int> > zDau1NofMuChambers(
new vector<unsigned int> );
276 auto_ptr<vector<unsigned int> > zDau2NofMuChambers(
new vector<unsigned int> );
277 auto_ptr<vector<unsigned int> > zDau1NofMuMatches(
new vector<unsigned int> );
278 auto_ptr<vector<unsigned int> > zDau2NofMuMatches(
new vector<unsigned int> );
279 auto_ptr<vector<float> > zDau1Chi2(
new vector<float> );
280 auto_ptr<vector<float> > zDau2Chi2(
new vector<float> );
281 auto_ptr<vector<float> > zDau1TrkChi2(
new vector<float> );
282 auto_ptr<vector<float> > zDau2TrkChi2(
new vector<float> );
283 auto_ptr<vector<float> > zDau1dxyFromBS(
new vector<float> );
284 auto_ptr<vector<float> > zDau2dxyFromBS(
new vector<float> );
285 auto_ptr<vector<float> > zDau1dzFromBS(
new vector<float> );
286 auto_ptr<vector<float> > zDau2dzFromBS(
new vector<float> );
287 auto_ptr<vector<float> > zDau1dxyFromPV(
new vector<float> );
288 auto_ptr<vector<float> > zDau2dxyFromPV(
new vector<float> );
289 auto_ptr<vector<float> > zDau1dzFromPV(
new vector<float> );
290 auto_ptr<vector<float> > zDau2dzFromPV(
new vector<float> );
291 auto_ptr<vector<float> > trueZMass(
new vector<float> );
292 auto_ptr<vector<float> > trueZPt(
new vector<float> );
293 auto_ptr<vector<float> > trueZEta(
new vector<float> );
294 auto_ptr<vector<float> > trueZPhi(
new vector<float> );
295 auto_ptr<vector<float> > trueZY(
new vector<float> );
296 event -> push_back(evt.
id().
event());
297 run -> push_back(evt.
id().
run());
299 for(
unsigned int i = 0;
i < zSize; ++
i ) {
302 zMass->push_back( z.
mass() );
303 zPt->push_back( z.
pt() );
304 zEta->push_back( z.
eta() );
305 zPhi->push_back( z.
phi() );
310 zDau1Pt->push_back( dau1->
pt() );
311 zDau2Pt->push_back( dau2->
pt() );
312 zDau1Q->push_back( dau1->
charge() );
313 zDau2Q->push_back( dau2->
charge() );
314 zDau1Eta->push_back( dau1->
eta() );
315 zDau2Eta->push_back( dau2->
eta() );
316 zDau1Phi->push_back( dau1->
phi() );
317 zDau2Phi->push_back( dau2->
phi() );
320 <<
"Candidate daughters have no master clone\n";
323 const Candidate * m1 = &*mr1, * m2 = &*mr2;
326 double iso1 =
candIsolation(m1,ptThreshold_[c], etEcalThreshold_[c], etHcalThreshold_[c] ,dRVetoTrk_[c], dRTrk_[c], dREcal_[c] , dRHcal_[c], alpha_[c], beta_[c], relativeIsolation_[c]);
327 double iso2 =
candIsolation(m2,ptThreshold_[c], etEcalThreshold_[c], etHcalThreshold_[c] ,dRVetoTrk_[c], dRTrk_[c], dREcal_[c] , dRHcal_[c], alpha_[c], beta_[c], relativeIsolation_[c] );
329 double trkIso1 =
candIsolation(m1,ptThreshold_[c], etEcalThreshold_[c], etHcalThreshold_[c] ,dRVetoTrk_[c], dRTrk_[c], dREcal_[c] , dRHcal_[c], 0.0, beta_[c], relativeIsolation_[c]);
330 double trkIso2 =
candIsolation(m2,ptThreshold_[c], etEcalThreshold_[c], etHcalThreshold_[c] ,dRVetoTrk_[c], dRTrk_[c], dREcal_[c] , dRHcal_[c], 0.0, beta_[c], relativeIsolation_[c] );
332 double ecalIso1 =
candIsolation(m1,ptThreshold_[c], etEcalThreshold_[c], etHcalThreshold_[c] ,dRVetoTrk_[c], dRTrk_[c], dREcal_[c] , dRHcal_[c], 1.0, 1.0, relativeIsolation_[c]);
333 double ecalIso2 =
candIsolation(m2,ptThreshold_[c], etEcalThreshold_[c], etHcalThreshold_[c] ,dRVetoTrk_[c], dRTrk_[c], dREcal_[c] , dRHcal_[c], 1.0, 1.0, relativeIsolation_[c] );
335 double hcalIso1 =
candIsolation(m1,ptThreshold_[c], etEcalThreshold_[c], etHcalThreshold_[c] ,dRVetoTrk_[c], dRTrk_[c], dREcal_[c] , dRHcal_[c], 1.0, -1.0, relativeIsolation_[c]);
336 double hcalIso2 =
candIsolation(m2,ptThreshold_[c], etEcalThreshold_[c], etHcalThreshold_[c] ,dRVetoTrk_[c], dRTrk_[c], dREcal_[c] , dRHcal_[c], 1.0, -1.0, relativeIsolation_[c] );
338 zDau1Iso->push_back( iso1 );
339 zDau2Iso->push_back( iso2 );
340 zDau1TrkIso->push_back( trkIso1 );
341 zDau2TrkIso->push_back( trkIso2 );
342 zDau1EcalIso->push_back( ecalIso1 );
343 zDau2EcalIso->push_back( ecalIso2 );
344 zDau1HcalIso->push_back( hcalIso1 );
345 zDau2HcalIso->push_back( hcalIso2 );
351 trueZMass->push_back( z.
mass() );
352 trueZPt->push_back( z.
pt() );
353 trueZEta->push_back( z.
eta() );
354 trueZPhi->push_back( z.
phi() );
357 trueZMass->push_back( -100 );
358 trueZPt->push_back( -100 );
359 trueZEta->push_back( -100 );
360 trueZPhi->push_back( -100 );
361 trueZY->push_back( -100 );
369 zDau1NofHitTk->push_back(mu1->
innerTrack()->numberOfValidHits());
370 zDau1NofHitSta->push_back(mu1->
outerTrack()->numberOfValidHits());
371 zDau1Chi2->push_back(mu1->
normChi2());
373 zDau1TrkChi2->push_back( mu1TrkRef->normalizedChi2());
374 zDau1dxyFromBS->push_back(mu1TrkRef->dxy(beamSpotHandle->position()));
375 zDau1dzFromBS->push_back(mu1TrkRef->dz(beamSpotHandle->position()));
376 zDau1dxyFromPV->push_back(mu1TrkRef->dxy(primaryVertices->begin()->position() ));
377 zDau1dzFromPV->push_back(mu1TrkRef->dz(primaryVertices->begin()->position() ));
384 zDau1NofHit->push_back(mu1StaRef->numberOfValidHits());
385 zDau1NofHitTk->push_back(0);
386 zDau1NofHitSta->push_back(mu1StaRef->numberOfValidHits());
387 zDau1Chi2->push_back(mu1StaRef->normalizedChi2());
388 zDau1TrkChi2->push_back(0);
389 zDau1dxyFromBS->push_back(mu1StaRef->dxy(beamSpotHandle->position()));
390 zDau1dzFromBS->push_back(mu1StaRef->dz(beamSpotHandle->position()));
391 zDau1dxyFromPV->push_back(mu1StaRef->dxy(primaryVertices->begin()->position() ));
392 zDau1dzFromPV->push_back(mu1StaRef->dz(primaryVertices->begin()->position() ));
393 zDau1MuEnergyEm->push_back( -1);
394 zDau1MuEnergyHad->push_back( -1);
398 zDau1NofHit->push_back(mu1TrkRef->numberOfValidHits());
399 zDau1NofHitTk->push_back(mu1TrkRef->numberOfValidHits());
400 zDau1NofHitSta->push_back(0);
401 zDau1Chi2->push_back(mu1TrkRef->normalizedChi2());
402 zDau1TrkChi2->push_back(mu1TrkRef->normalizedChi2());
403 zDau1dxyFromBS->push_back(mu1TrkRef->dxy(beamSpotHandle->position()));
404 zDau1dzFromBS->push_back(mu1TrkRef->dz(beamSpotHandle->position()));
405 zDau1dxyFromPV->push_back(mu1TrkRef->dxy(primaryVertices->begin()->position() ));
406 zDau1dzFromPV->push_back(mu1TrkRef->dz(primaryVertices->begin()->position() ));
417 int dimTrig1 = mu1HLTMatches.size();
419 zDau1HLTBit->push_back(1);
421 zDau1HLTBit->push_back(0);
427 zDau2NofHitTk->push_back(mu2->
innerTrack()->numberOfValidHits());
428 zDau2NofHitSta->push_back(mu2->
outerTrack()->numberOfValidHits());
429 zDau2Chi2->push_back(mu2->
normChi2());
431 zDau1TrkChi2->push_back( mu2TrkRef->normalizedChi2());
432 zDau2dxyFromBS->push_back(mu2TrkRef->dxy(beamSpotHandle->position()));
433 zDau2dzFromBS->push_back(mu2TrkRef->dz(beamSpotHandle->position()));
434 zDau2dxyFromPV->push_back(mu2TrkRef->dxy(primaryVertices->begin()->position() ));
435 zDau2dzFromPV->push_back(mu2TrkRef->dz(primaryVertices->begin()->position() ));
440 zDau2HLTBit->push_back(0);
442 zDau2NofHit->push_back(mu2StaRef->numberOfValidHits());
443 zDau2NofHitTk->push_back(0);
444 zDau2NofHitSta->push_back(mu2StaRef->numberOfValidHits());
445 zDau2Chi2->push_back(mu2StaRef->normalizedChi2());
446 zDau2TrkChi2->push_back(0);
447 zDau2dxyFromBS->push_back(mu2StaRef->dxy(beamSpotHandle->position()));
448 zDau2dzFromBS->push_back(mu2StaRef->dz(beamSpotHandle->position()));
449 zDau2dxyFromPV->push_back(mu2StaRef->dxy(primaryVertices->begin()->position() ));
450 zDau2dzFromPV->push_back(mu2StaRef->dz(primaryVertices->begin()->position() ));
451 zDau1MuEnergyEm->push_back( -1);
452 zDau1MuEnergyHad->push_back( -1);
456 zDau2NofHit->push_back(mu2TrkRef->numberOfValidHits());
457 zDau2NofHitSta->push_back(0);
458 zDau2NofHitTk->push_back(mu2TrkRef->numberOfValidHits());
459 zDau2Chi2->push_back(mu2TrkRef->normalizedChi2());
460 zDau2TrkChi2->push_back(mu2TrkRef->normalizedChi2());
461 zDau2dxyFromBS->push_back(mu2TrkRef->dxy(beamSpotHandle->position()));
462 zDau2dzFromBS->push_back(mu2TrkRef->dz(beamSpotHandle->position()));
463 zDau2dxyFromPV->push_back(mu2TrkRef->dxy(primaryVertices->begin()->position() ));
464 zDau2dzFromPV->push_back(mu2TrkRef->dz(primaryVertices->begin()->position() ));
471 int dimTrig2 = mu2HLTMatches.size();
473 zDau2HLTBit->push_back(1);
476 zDau2HLTBit->push_back(0);
487 zDau1SaEta->push_back(stAloneTrack1->eta());
488 zDau2SaEta->push_back(stAloneTrack2->eta());
489 zDau1SaPhi->push_back(stAloneTrack1->phi());
490 zDau2SaPhi->push_back(stAloneTrack2->phi());
491 if(counter % 2 == 0) {
492 momentum = stAloneTrack1->momentum();
494 mu_mass = dau1->
mass();
496 zDau1SaPt->push_back(stAloneTrack1 ->pt());
497 zDau2SaPt->push_back(- stAloneTrack2->pt());
499 momentum = stAloneTrack2->momentum();
501 mu_mass = dau2->
mass();
503 zDau1SaPt->push_back( - stAloneTrack1->pt());
504 zDau2SaPt->push_back( stAloneTrack2->pt());
509 zMassSa->push_back(mass);
521 zDau2NofHit->push_back(mu2TrkRef->numberOfValidHits());
522 zDau2NofHitTk->push_back( mu2TrkRef->numberOfValidHits());
523 zDau2NofHitSta->push_back( 0);
524 zDau2NofMuChambers->push_back(0);
525 zDau2NofMuMatches->push_back(0);
526 zDau2Chi2->push_back(mu2TrkRef->normalizedChi2());
527 zDau2dxyFromBS->push_back(mu2TrkRef->dxy(beamSpotHandle->position()));
528 zDau2dzFromBS->push_back(mu2TrkRef->dz(beamSpotHandle->position()));
529 zDau2dxyFromPV->push_back(mu2TrkRef->dxy(primaryVertices->begin()->position() ));
530 zDau2dzFromPV->push_back(mu2TrkRef->dz(primaryVertices->begin()->position() ));
531 zDau1MuEnergyEm->push_back( -1);
532 zDau1MuEnergyHad->push_back( -1);
535 const string & zName = zName_[
c];
536 evt.
put( event,zName +
"EventNumber" );
537 evt.
put( run, zName +
"RunNumber" );
538 evt.
put( lumi,zName +
"LumiBlock" );
539 evt.
put( zMass, zName +
"Mass" );
540 evt.
put( zMassSa, zName +
"MassSa" );
541 evt.
put( zPt, zName +
"Pt" );
542 evt.
put( zEta, zName +
"Eta" );
543 evt.
put( zPhi, zName +
"Phi" );
544 evt.
put( zY, zName +
"Y" );
545 evt.
put( zDau1Pt, zName +
"Dau1Pt" );
546 evt.
put( zDau2Pt, zName +
"Dau2Pt" );
547 evt.
put( zDau1SaPt, zName +
"Dau1SaPt" );
548 evt.
put( zDau2SaPt, zName +
"Dau2SaPt" );
549 evt.
put( zDau1HLTBit, zName +
"Dau1HLTBit" );
550 evt.
put( zDau2HLTBit, zName +
"Dau2HLTBit" );
551 evt.
put( zDau1Q, zName +
"Dau1Q" );
552 evt.
put( zDau2Q, zName +
"Dau2Q" );
553 evt.
put( zDau1Eta, zName +
"Dau1Eta" );
554 evt.
put( zDau2Eta, zName +
"Dau2Eta" );
555 evt.
put( zDau1SaEta, zName +
"Dau1SaEta" );
556 evt.
put( zDau2SaEta, zName +
"Dau2SaEta" );
557 evt.
put( zDau1Phi, zName +
"Dau1Phi" );
558 evt.
put( zDau2Phi, zName +
"Dau2Phi" );
559 evt.
put( zDau1SaPhi, zName +
"Dau1SaPhi" );
560 evt.
put( zDau2SaPhi, zName +
"Dau2SaPhi" );
561 evt.
put( zDau1Iso, zName +
"Dau1Iso" );
562 evt.
put( zDau2Iso, zName +
"Dau2Iso" );
563 evt.
put( zDau1TrkIso, zName +
"Dau1TrkIso" );
564 evt.
put( zDau2TrkIso, zName +
"Dau2TrkIso" );
565 evt.
put( zDau1EcalIso, zName +
"Dau1EcalIso" );
566 evt.
put( zDau2EcalIso, zName +
"Dau2EcalIso" );
567 evt.
put( zDau1HcalIso, zName +
"Dau1HcalIso" );
568 evt.
put( zDau2HcalIso, zName +
"Dau2HcalIso" );
569 evt.
put( zDau1MuEnergyEm, zName +
"Dau1MuEnergyEm" );
570 evt.
put( zDau2MuEnergyEm, zName +
"Dau2MuEnergyEm" );
571 evt.
put( zDau1MuEnergyHad, zName +
"Dau1MuEnergyHad" );
572 evt.
put( zDau2MuEnergyHad, zName +
"Dau2MuEnergyHad" );
573 evt.
put( vtxNormChi2, zName +
"VtxNormChi2" );
574 evt.
put( zDau1NofHit, zName +
"Dau1NofHit" );
575 evt.
put( zDau2NofHit, zName +
"Dau2NofHit" );
576 evt.
put( zDau1NofHitTk, zName +
"Dau1NofHitTk" );
577 evt.
put( zDau2NofHitTk, zName +
"Dau2NofHitTk" );
578 evt.
put( zDau1NofHitSta, zName +
"Dau1NofHitSta" );
579 evt.
put( zDau2NofHitSta, zName +
"Dau2NofHitSta" );
580 evt.
put( zDau1NofMuChambers, zName +
"Dau1NofMuChambers" );
581 evt.
put( zDau1NofMuMatches, zName +
"Dau1NofMuMatches" );
582 evt.
put( zDau2NofMuChambers, zName +
"Dau2NofMuChambers" );
583 evt.
put( zDau2NofMuMatches, zName +
"Dau2NofMuMatches" );
584 evt.
put( zDau1Chi2, zName +
"Dau1Chi2" );
585 evt.
put( zDau2Chi2, zName +
"Dau2Chi2" );
586 evt.
put( zDau1TrkChi2, zName +
"Dau1TrkChi2" );
587 evt.
put( zDau2TrkChi2, zName +
"Dau2TrkChi2" );
588 evt.
put( zDau1dxyFromBS, zName +
"Dau1dxyFromBS" );
589 evt.
put( zDau2dxyFromBS, zName +
"Dau2dxyFromBS" );
590 evt.
put( zDau1dxyFromPV, zName +
"Dau1dxyFromPV" );
591 evt.
put( zDau2dxyFromPV, zName +
"Dau2dxyFromPV" );
592 evt.
put( zDau1dzFromBS, zName +
"Dau1dzFromBS" );
593 evt.
put( zDau2dzFromBS, zName +
"Dau2dzFromBS" );
594 evt.
put( zDau1dzFromPV, zName +
"Dau1dzFromPV" );
595 evt.
put( zDau2dzFromPV, zName +
"Dau2dzFromPV" );
596 evt.
put( trueZMass, zName +
"TrueMass" );
597 evt.
put( trueZPt, zName +
"TruePt" );
598 evt.
put( trueZEta, zName +
"TrueEta" );
599 evt.
put( trueZPhi, zName +
"TruePhi" );
600 evt.
put( trueZY, zName +
"TrueY" );
std::vector< std::string > zName_
double normChi2() const
Norm chi2 gives the normalized chi2 of the global track.
T getParameter(std::string const &) const
EventNumber_t event() const
unsigned int numberOfValidHits() const
numberOfValidHits returns the number of valid hits on the global track.
reco::TrackRef innerTrack() const
reference to Track reconstructed in the tracker only (reimplemented from reco::Muon) ...
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual double pt() const =0
transverse momentum
bool isTrackerMuon() const
std::vector< double > ptThreshold_
virtual double mass() const =0
mass
stand alone muon component tag
bool isGlobalMuon() const
edm::LuminosityBlockNumber_t luminosityBlock() const
virtual double rapidity() const =0
rapidity
DEFINE_FWK_MODULE(HiMixingModule)
std::vector< TriggerObjectStandAlone > TriggerObjectStandAloneCollection
Collection of TriggerObjectStandAlone.
bool isStandAloneMuon() const
reco::TrackRef outerTrack() const
reference to Track reconstructed in the muon detector only (reimplemented from reco::Muon) ...
virtual const PolarLorentzVector & polarP4() const =0
four-momentum Lorentz vector
double sumWithin(double coneSize, const AbsVetos &vetos=AbsVetos(), bool skipDepositVeto=false) const
bool isNonnull() const
Checks for non-null.
Analysis-level Generic Particle class (e.g. for hadron or muon not fully reconstructed) ...
virtual bool hasMasterClone() const =0
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
ZToLLEdmNtupleDumper(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &)
virtual int charge() const =0
electric charge
virtual reco::TrackRef track() const
const TriggerObjectStandAloneCollection triggerObjectMatchesByPath(const std::string &namePath, const bool pathLastFilterAccepted=false, const bool pathL3FilterAccepted=true) const
double candIsolation(const reco::Candidate *c, double ptThreshold, double etEcalThreshold, double etHcalThreshold, double dRVetoTrk, double dRTrk, double dREcal, double dRHcal, double alpha, double beta, bool relativeIsolation)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual double vertexNormalizedChi2() const =0
chi-squared divided by n.d.o.f.
int numberOfMatches(ArbitrationType type=SegmentAndTrackArbitration) const
get number of chambers with matched segments
MuonEnergy calEnergy() const
get energy deposition information
std::vector< string > hltPath_
std::vector< double > relativeIsolation_
XYZVectorD XYZVector
spatial vector with cartesian internal representation
int numberOfChambers() const
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
T get() const
get a component
edm::InputTag primaryVertices_
std::vector< edm::InputTag > zGenParticlesMatch_
isodeposit::AbsVetos AbsVetos
Analysis-level muon class.
tuple size
Write out results.
virtual double phi() const =0
momentum azimuthal angle
virtual double eta() const =0
momentum pseudorapidity
virtual const CandidateBaseRef & masterClone() const =0
math::PtEtaPhiMLorentzVector PolarLorentzVector
Lorentz vector.