102 std::vector<reco::Particle *> p4gen, p4rec;
107 if(genEvt->particles().size()<10)
return;
112 for(
size_t e=0;
e<electrons->size();
e++) {
113 for(
size_t p=0;
p<genEvt->particles().size();
p++){
114 if( (
std::abs(genEvt->particles()[
p].pdgId()) == 11) && (ROOT::Math::VectorUtil::DeltaR(genEvt->particles()[
p].p4(), (*electrons)[
e].p4()) <
minDR_) ) {
124 for(
size_t m=0;
m<muons->size();
m++) {
125 for(
size_t p=0;
p<genEvt->particles().size();
p++){
126 if( (
std::abs(genEvt->particles()[
p].pdgId()) == 13) && (ROOT::Math::VectorUtil::DeltaR(genEvt->particles()[
p].p4(), (*muons)[
m].p4()) <
minDR_) ) {
136 if(jets->size()>=4) {
137 for(
unsigned int j = 0;
j<4;
j++){
138 for(
size_t p=0;
p<genEvt->particles().size();
p++){
139 if( (
std::abs(genEvt->particles()[
p].pdgId()) < 5) && (ROOT::Math::VectorUtil::DeltaR(genEvt->particles()[
p].p4(), (*jets)[
j].p4())<
minDR_) ){
150 if(jets->size()>=4) {
151 for(
unsigned int j = 0;
j<4;
j++){
152 for(
size_t p=0;
p<genEvt->particles().size();
p++){
153 if( (
std::abs(genEvt->particles()[
p].pdgId()) == 5) && (ROOT::Math::VectorUtil::DeltaR(genEvt->particles()[
p].p4(), (*jets)[
j].p4())<
minDR_) ) {
164 if(mets->size()>=1) {
165 if( genEvt->isSemiLeptonic() && genEvt->singleNeutrino() != 0 && ROOT::Math::VectorUtil::DeltaR(genEvt->singleNeutrino()->p4(), (*mets)[0].p4()) <
minDR_) {
174 for(std::vector<pat::Tau>::const_iterator
tau = taus->begin();
tau != taus->end(); ++
tau) {
182 ROOT::Math::VectorUtil::DeltaR(genLepton.
p4(),
tau->p4()) <
minDR_ ) {
189 for(
unsigned m=0;
m<p4gen.size();
m++){
190 double Egen = p4gen[
m]->
energy();
191 double Thetagen = p4gen[
m]->theta();
192 double Phigen = p4gen[
m]->phi();
193 double Etgen = p4gen[
m]->et();
194 double Etagen = p4gen[
m]->eta();
195 double Ecal = p4rec[
m]->energy();
196 double Thetacal = p4rec[
m]->theta();
197 double Phical = p4rec[
m]->phi();
198 double Etcal = p4rec[
m]->et();
199 double Etacal = p4rec[
m]->eta();
200 double phidiff = Phical- Phigen;
201 if(phidiff>3.14159) phidiff = 2.*3.14159 -
phidiff;
202 if(phidiff<-3.14159) phidiff = -phidiff - 2.*3.14159;
228 ROOT::Math::SVector<double,3> pcalvec(p4rec[
m]->px(),p4rec[
m]->py(),p4rec[
m]->pz());
229 ROOT::Math::SVector<double,3> pgenvec(p4gen[
m]->px(),p4gen[
m]->py(),p4gen[
m]->pz());
231 ROOT::Math::SVector<double,3> u_z(0,0,1);
232 ROOT::Math::SVector<double,3> u_1 = ROOT::Math::Unit(pcalvec);
233 ROOT::Math::SVector<double,3> u_3 = ROOT::Math::Cross(u_z,u_1)/ROOT::Math::Mag(ROOT::Math::Cross(u_z,u_1));
234 ROOT::Math::SVector<double,3> u_2 = ROOT::Math::Cross(u_1,u_3)/ROOT::Math::Mag(ROOT::Math::Cross(u_1,u_3));
239 double agen = ROOT::Math::Dot(pgenvec,u_1)/ROOT::Math::Mag(pcalvec);
240 double bgen = ROOT::Math::Dot(pgenvec,u_2);
241 double cgen = ROOT::Math::Dot(pgenvec,u_3);
242 double dgen = Egen/Ecal;
virtual double energy() const GCC11_FINAL
energy
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
virtual int pdgId() const GCC11_FINAL
PDG identifier.
virtual size_type numberOfMothers() const =0
number of mothers (zero or one in most of but not all the cases)
double phidiff(double phi)
Normalized difference in azimuthal angles to a range between .
std::vector< double > etabinVals_
virtual int status() const GCC11_FINAL
status word
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
virtual size_t numberOfMothers() const
number of mothers
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual int pdgId() const =0
PDG identifier.
TH1F * hResPtEtaBin[10][20][20]
std::vector< double > pTbinVals_
virtual const Candidate * mother(size_type=0) const
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode) ...