#include <Histograms.h>
Public Member Functions | |
virtual void | Clear ()=0 |
void | declareHistograms () |
virtual void | Fill (const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2) |
virtual void | Fill (const CLHEP::HepLorentzVector &p1, const reco::Particle::LorentzVector &p2) |
virtual void | Fill (const reco::Particle::LorentzVector &recoP1, const int charge1, const reco::Particle::LorentzVector &recoP2, const int charge2, const double &recoMass, const double &genMass) |
virtual void | Fill (const reco::Particle::LorentzVector &recoP1, const reco::Particle::LorentzVector &genP1, const reco::Particle::LorentzVector &recoP2, const reco::Particle::LorentzVector &genP2) |
virtual void | Fill (const double &x, const double &y) |
virtual void | Fill (const double &x, const double &y, const double &a, const double &b) |
virtual void | Fill (const CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2, const int charge, const double &weight=1.) |
virtual void | Fill (const reco::Particle::LorentzVector &p4, const double &weight=1.) |
virtual void | Fill (const reco::Particle::LorentzVector &p4, const double &resValue, const int charge) |
virtual void | Fill (const reco::Particle::LorentzVector &p1, const reco::Particle::LorentzVector &p2, const int charge, const double &weight=1.) |
virtual void | Fill (const reco::Particle::LorentzVector &p4, const double &genValue, const double recValue, const int charge) |
virtual void | Fill (const CLHEP::HepLorentzVector &p, const double &likeValue) |
virtual void | Fill (const CLHEP::HepLorentzVector &momentum1, const CLHEP::HepLorentzVector &momentum2) |
virtual void | Fill (const unsigned int number) |
virtual void | Fill (const reco::Particle::LorentzVector &recoP1, const int charge1, const reco::Particle::LorentzVector &genP1, const reco::Particle::LorentzVector &recoP2, const int charge2, const reco::Particle::LorentzVector &genP2, const double &recoMass, const double &genMass) |
void | fillEventInfo (int proc, int strk, int ntrkr) |
void | fillRecHistograms (const RecTrack_t &r) |
void | fillSimHistograms (const SimTrack_t &s) |
void | fillVzeroHistograms (const RecVzero_t &r, int part) |
virtual double | Get (const reco::Particle::LorentzVector &recoP1, const TString &covarianceName) |
virtual TString | GetName () |
Histograms (const TString &name) | |
Histograms (TFile *outputFile, const TString &name) | |
Histograms (const edm::ParameterSet &pset) | |
Histograms () | |
virtual void | SetWeight (double weight) |
virtual void | Write ()=0 |
void | writeHistograms () |
virtual | ~Histograms () |
~Histograms () | |
Protected Attributes | |
TDirectory * | histoDir_ |
TString | name_ |
TFile * | outputFile_ |
double | theWeight_ |
Private Member Functions | |
int | getCharge (int charge) |
int | getParticle (int id) |
Private Attributes | |
std::vector< double > | etaBins |
EventInfo_t | eventInfoValues |
bool | fillHistograms |
bool | fillNtuples |
std::vector< TH3F * > | hacc |
std::vector< TH3F * > | hall |
std::vector< TH2F * > | hdac |
std::vector< TH2F * > | hdec |
std::vector< TH2F * > | hder |
std::vector< TH2F * > | held |
std::vector< TH3F * > | helo |
std::vector< TH1F * > | heve |
std::vector< TH3F * > | hfak |
std::vector< TH3F * > | hima |
TFile * | histoFile |
std::vector< TH3F * > | hmul |
std::vector< TH3F * > | hnhi |
std::vector< TH2F * > | hpro |
std::vector< TH3F * > | href |
std::vector< TH3F * > | hrho |
std::vector< TH3F * > | hrpt |
std::vector< TH3F * > | hsim |
std::vector< TH2F * > | hsp0 |
std::vector< TH2F * > | hsp1 |
std::vector< TH2F * > | hsp2 |
std::vector< TH3F * > | hvpt |
std::vector< double > | ldeBins |
std::vector< double > | lpBins |
std::vector< double > | metaBins |
std::vector< double > | nhitBins |
std::vector< double > | ntrkBins |
TFile * | ntupleFile |
std::vector< double > | ptBins |
std::vector< double > | ratBins |
RecTrack_t | recTrackValues |
RecVzero_t | recVzeroValues |
std::vector< double > | rhoBins |
SimTrack_t | simTrackValues |
std::vector< TTree * > | trackTrees |
std::vector< double > | zBins |
Collection of histograms for GLB muon analysis
Collection of histograms for DT RecHit and Segment test.
No description available.
Definition at line 36 of file Histograms.h.
Histograms::Histograms | ( | ) | [inline] |
Definition at line 41 of file Histograms.h.
: theWeight_(1), histoDir_(0) {};
Histograms::Histograms | ( | const TString & | name | ) | [inline] |
Definition at line 42 of file Histograms.h.
: theWeight_(1), name_(name), histoDir_(0) {}
Histograms::Histograms | ( | TFile * | outputFile, |
const TString & | name | ||
) | [inline] |
Definition at line 43 of file Histograms.h.
References histoDir_.
: theWeight_(1), name_(name), outputFile_(outputFile), histoDir_( outputFile->GetDirectory(name) ) { if( histoDir_ == 0 ) { histoDir_ = outputFile->mkdir(name); } histoDir_->cd(); }
Histograms::~Histograms | ( | ) | [inline, virtual] |
Definition at line 57 of file Histograms.h.
{};
Histograms::Histograms | ( | const edm::ParameterSet & | pset | ) |
Definition at line 84 of file Histograms.cc.
References RPCNoise_example::fillHistograms, edm::ParameterSet::getParameter(), and histoFile.
{ fillHistograms = pset.getParameter<bool>("fillHistograms"); fillNtuples = pset.getParameter<bool>("fillNtuples"); std::string histoFileLabel = pset.getParameter<std::string>("histoFile"); histoFile = new TFile(histoFileLabel.c_str(),"recreate"); std::string ntupleFileLabel = pset.getParameter<std::string>("ntupleFile"); ntupleFile = new TFile(ntupleFileLabel.c_str(),"recreate"); // resultFile->cd(); }
Histograms::~Histograms | ( | ) |
virtual void Histograms::Clear | ( | ) | [pure virtual] |
Implemented in HTH2D, HTH1D, HTProfile, HParticle, HDelta, HPartVSEta, HPartVSPhi, HPartVSPt, HMassVSPart, HMassVSPartProfile, HResolutionVSPart, HLikelihoodVSPart, HFunctionResolution, HCovarianceVSxy, HCovarianceVSParts, and HMassResolutionVSPart.
void Histograms::declareHistograms | ( | ) |
Definition at line 153 of file Histograms.cc.
References aks, ala, DeDxDiscriminatorTools::charge(), chargeName, ExpressReco_HICollisions_FallBack::e, eta(), jptDQMConfig_cff::etaBins, ExpressReco_HICollisions_FallBack::etaMax, ExpressReco_HICollisions_FallBack::etaMin, feedDown, RPCNoise_example::fillHistograms, first, gam, cmsDownloadME::href, gen::k, k0s, kst, lam, funct::log(), nCharges, nFeedDowns, partName, phi, pip, ExpressReco_HICollisions_FallBack::pt, jptDQMConfig_cff::ptBins, rho, edm::second(), and z.
{ if(fillNtuples) { TString leafStr; trackTrees.push_back(new TTree("simTrackTree","simTrackTree")); leafStr = "ids/I:etas/F:pts/F:acc/I:prim/I:nrec/I:ntrkr/I"; trackTrees[0]->Branch("simTrackValues", &simTrackValues, leafStr.Data()); trackTrees.push_back(new TTree("recTrackTree","recTrackTree")); leafStr = "charge/I:etar/F:ptr/F:phir/F:zr/F:logpr/F:logde/F:nhitr/I:prim/I:nsim/I:ids/I:parids/I:etas/F:pts/F:ntrkr/I"; trackTrees[1]->Branch("recTrackValues", &recTrackValues, leafStr.Data()); trackTrees.push_back(new TTree("recVzeroTree","recVzeroTree")); leafStr = "etar/F:ptr/F:ima/F:rhor/F"; trackTrees[2]->Branch("recVzeroValues", &recVzeroValues, leafStr.Data()); trackTrees.push_back(new TTree("eventInfoTree","eventInfoTree")); leafStr = "proc/I:strk/I:ntrkr/I"; trackTrees[3]->Branch("eventInfoValues", &eventInfoValues, leafStr.Data()); } if(fillHistograms) { // Pt const double small = 1e-3; double pt; for(pt = 0; pt < 1 - small; pt += 0.05) ptBins.push_back(pt); for(pt = 1; pt < 2 - small; pt += 0.1 ) ptBins.push_back(pt); for(pt = 2; pt < 4 - small; pt += 0.2 ) ptBins.push_back(pt); for(pt = 4; pt < 8 - small; pt += 0.5 ) ptBins.push_back(pt); for(pt = 8; pt < 16 - small; pt += 1. ) ptBins.push_back(pt); for(pt = 16; pt < 32 - small; pt += 2. ) ptBins.push_back(pt); for(pt = 32; pt < 64 - small; pt += 4. ) ptBins.push_back(pt); static float ratMin = 0.5; static float ratMax = 1.5; static float ratWidth = 1./200; for(double rat = ratMin; rat < ratMax + ratWidth/2; rat += ratWidth) ratBins.push_back(rat); // Eta (-3,3) static float etaMin = -3.0; static float etaMax = 3.0; static float etaWidth = 0.2; for(double eta = etaMin; eta < etaMax + etaWidth/2; eta += etaWidth) etaBins.push_back(eta); // for(double eta = etaMin; eta < etaMax + etaWidth/2; eta += etaWidth/10) for(double eta = etaMin; eta < etaMax + etaWidth/2; eta += etaWidth/5) metaBins.push_back(eta); static float zMin = -20.; static float zMax = 20.; // static float zWidth = 0.1; static float zWidth = 0.2; for(double z = zMin; z < zMax + zWidth/2; z += zWidth) zBins.push_back(z); // Number of recontructed tracks static float ntrkMin = 0.5; // FIXME // static float ntrkMax = 200.; // static float ntrkWidth = 5.; static float ntrkMax = 1000.; static float ntrkWidth = 10.; for(double ntrk = ntrkMin; ntrk < ntrkMax + ntrkWidth; ntrk += ntrkWidth) ntrkBins.push_back(ntrk); char histName[256]; // EventInfo sprintf(histName,"heve"); heve.push_back(new TH1F(histName,histName, 200, -0.5,199.5)); sprintf(histName,"hsdx"); heve.push_back(new TH1F(histName,histName, 200, -0.5,199.5)); sprintf(histName,"hddx"); heve.push_back(new TH1F(histName,histName, 200, -0.5,199.5)); sprintf(histName,"hndx"); heve.push_back(new TH1F(histName,histName, 200, -0.5,199.5)); sprintf(histName,"hder"); hder.push_back(new TH2F(histName,histName, 200, -0.5,199.5, 200, -0.5,199.5)); // SimTrack for(int part = pip; part <= ala; part++) { // simulated sprintf(histName,"hsim_%s", partName[part]); hsim.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], ntrkBins.size()-1, &ntrkBins[0])); // accepted sprintf(histName,"hacc_%s", partName[part]); hacc.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], ntrkBins.size()-1, &ntrkBins[0])); // reconstructed/efficiency sprintf(histName,"href_%s", partName[part]); href.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], ntrkBins.size()-1, &ntrkBins[0])); // multiply reconstructed sprintf(histName,"hmul_%s", partName[part]); hmul.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], ntrkBins.size()-1, &ntrkBins[0])); } // RecTrack for(int charge = 0; charge < nCharges; charge++) { sprintf(histName,"hall_%s",chargeName[charge]); hall.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], ntrkBins.size()-1, &ntrkBins[0])); sprintf(histName,"hdac_%s",chargeName[charge]); hdac.push_back(new TH2F(histName,histName, metaBins.size()-1, &metaBins[0], zBins.size()-1, &zBins[0])); // RecTrack -- FakeRate sprintf(histName,"hfak_%s",chargeName[charge]); hfak.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], ntrkBins.size()-1, &ntrkBins[0])); } // RecTrack -- Resolution, bias for(int part = pip; part <= ala; part++) { // value sprintf(histName,"hvpt_%s",partName[part]); hvpt.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], ptBins.size()-1, &ptBins[0])); // ratio sprintf(histName,"hrpt_%s",partName[part]); hrpt.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], ratBins.size()-1, &ratBins[0])); sprintf(histName,"hsp0_%s",partName[part]); hsp0.push_back(new TH2F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0])); sprintf(histName,"hsp1_%s",partName[part]); hsp1.push_back(new TH2F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0])); sprintf(histName,"hsp2_%s",partName[part]); hsp2.push_back(new TH2F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0])); } // RecTrack -- FeedDown for(int k = 0; k < nFeedDowns; k++) { sprintf(histName,"hpro_%s_%s", partName[feedDown[k].first], // produced partName[feedDown[k].second]); hpro.push_back(new TH2F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0])); sprintf(histName,"hdec_%s_%s", partName[feedDown[k].first], // decay partName[feedDown[k].second]); hdec.push_back(new TH2F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0])); } // EnergyLoss static float lpMin = -3; // 50 MeV static float lpMax = 2; // 7.4 GeV static float lpWidth = (lpMax - lpMin)/100; for(double lp = lpMin; lp < lpMax + lpWidth/2; lp += lpWidth) lpBins.push_back(lp); static float ldeMin = log(1); static float ldeMax = log(100); static float ldeWidth = (ldeMax - ldeMin)/250; for(double lde = ldeMin; lde < ldeMax + ldeWidth/2; lde += ldeWidth) ldeBins.push_back(lde); for(double nhit = -0.5; nhit < 50; nhit += 1) nhitBins.push_back(nhit); for(int charge = 0; charge < nCharges; charge++) { // All hits // dE/dx sprintf(histName,"helo_%s", chargeName[charge]); helo.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], ldeBins.size()-1, &ldeBins[0])); // Number of hits used sprintf(histName,"hnhi_%s", chargeName[charge]); hnhi.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], nhitBins.size()-1, &nhitBins[0])); // Demo plot sprintf(histName,"held_%s", chargeName[charge]); held.push_back(new TH2F(histName,histName, lpBins.size()-1, &lpBins[0], ldeBins.size()-1, &ldeBins[0])); } /* for(int charge = 0; charge < nCharges; charge++) { // Strip hits // dE/dx sprintf(histName,"selo_%s", chargeName[charge]); selo.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], ldeBins.size()-1, &ldeBins[0])); // Number of hits used sprintf(histName,"snhi_%s", chargeName[charge]); snhi.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], nhitBins.size()-1, &nhitBins[0])); // Demo plot sprintf(histName,"seld_%s", chargeName[charge]); seld.push_back(new TH2F(histName,histName, lpBins.size()-1, &lpBins[0], ldeBins.size()-1, &ldeBins[0])); } */ // Invariant mass static float rhoMin = 0.; static float rhoMax = 5.; static float rhoWidth = 0.2; for(double rho_ = rhoMin; rho_ < rhoMax + rhoWidth/2; rho_ += rhoWidth) rhoBins.push_back(rho_); for(int part = gam; part <= phi; part++) { float imMin = 0; float imMax = 0; float imWidth = 0; if(part == gam) { imMin = 0.0; imMax = 0.2; imWidth = 0.005; } if(part == k0s) { imMin = 0.3; imMax = 0.7; imWidth = 0.005; } if(part == lam || part == ala) { imMin = 1.0; imMax = 1.3; imWidth = 0.002; } if(part == rho) { imMin = 0.2; imMax = 1.2; imWidth = 0.010; } if(part == kst || part == aks) { imMin = 0.6; imMax = 1.6; imWidth = 0.010; } if(part == phi) { imMin = 0.9; imMax = 1.1; imWidth = 0.002; } std::vector<double> imBins; double im; for(im = imMin; im < imMax + imWidth/2; im += imWidth) imBins.push_back(im); if(imWidth > 0) { sprintf(histName,"hima_%s", partName[part]); hima.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], imBins.size()-1, &imBins[0])); if(part >= rho && part <= phi) { sprintf(histName,"himp_%s", partName[part]); hima.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], imBins.size()-1, &imBins[0])); sprintf(histName,"himm_%s", partName[part]); hima.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], imBins.size()-1, &imBins[0])); sprintf(histName,"himx_%s", partName[part]); hima.push_back(new TH3F(histName,histName, etaBins.size()-1, &etaBins[0], ptBins.size()-1, &ptBins[0], imBins.size()-1, &imBins[0])); } sprintf(histName,"hrho_%s", partName[part]); hrho.push_back(new TH3F(histName,histName, rhoBins.size()-1, &rhoBins[0], ptBins.size()-1, &ptBins[0], imBins.size()-1, &imBins[0])); } } } }
virtual void Histograms::Fill | ( | const reco::Particle::LorentzVector & | p1, |
const reco::Particle::LorentzVector & | p2, | ||
const int | charge, | ||
const double & | weight = 1. |
||
) | [inline, virtual] |
Reimplemented in HMassVSPart, and HMassVSPartProfile.
Definition at line 64 of file Histograms.h.
{};
virtual void Histograms::Fill | ( | const reco::Particle::LorentzVector & | p4, |
const double & | genValue, | ||
const double | recValue, | ||
const int | charge | ||
) | [inline, virtual] |
Definition at line 71 of file Histograms.h.
{};
virtual void Histograms::Fill | ( | const CLHEP::HepLorentzVector & | momentum1, |
const CLHEP::HepLorentzVector & | momentum2, | ||
const int | charge, | ||
const double & | weight = 1. |
||
) | [inline, virtual] |
Reimplemented in HMassVSPart, and HMassVSPartProfile.
Definition at line 66 of file Histograms.h.
{};
virtual void Histograms::Fill | ( | const CLHEP::HepLorentzVector & | p, |
const double & | likeValue | ||
) | [inline, virtual] |
Reimplemented in HParticle, HPartVSEta, HPartVSPhi, and HPartVSPt.
Definition at line 72 of file Histograms.h.
{};
virtual void Histograms::Fill | ( | const reco::Particle::LorentzVector & | p1, |
const reco::Particle::LorentzVector & | p2 | ||
) | [inline, virtual] |
virtual void Histograms::Fill | ( | const CLHEP::HepLorentzVector & | p1, |
const reco::Particle::LorentzVector & | p2 | ||
) | [inline, virtual] |
virtual void Histograms::Fill | ( | const unsigned int | number | ) | [inline, virtual] |
virtual void Histograms::Fill | ( | const reco::Particle::LorentzVector & | recoP1, |
const int | charge1, | ||
const reco::Particle::LorentzVector & | genP1, | ||
const reco::Particle::LorentzVector & | recoP2, | ||
const int | charge2, | ||
const reco::Particle::LorentzVector & | genP2, | ||
const double & | recoMass, | ||
const double & | genMass | ||
) | [inline, virtual] |
virtual void Histograms::Fill | ( | const CLHEP::HepLorentzVector & | momentum1, |
const CLHEP::HepLorentzVector & | momentum2 | ||
) | [inline, virtual] |
virtual void Histograms::Fill | ( | const reco::Particle::LorentzVector & | p4, |
const double & | weight = 1. |
||
) | [inline, virtual] |
Reimplemented in HParticle, HPartVSEta, HPartVSPhi, HPartVSPt, and HLikelihoodVSPart.
Definition at line 68 of file Histograms.h.
{};
virtual void Histograms::Fill | ( | const reco::Particle::LorentzVector & | recoP1, |
const int | charge1, | ||
const reco::Particle::LorentzVector & | recoP2, | ||
const int | charge2, | ||
const double & | recoMass, | ||
const double & | genMass | ||
) | [inline, virtual] |
virtual void Histograms::Fill | ( | const reco::Particle::LorentzVector & | recoP1, |
const reco::Particle::LorentzVector & | genP1, | ||
const reco::Particle::LorentzVector & | recoP2, | ||
const reco::Particle::LorentzVector & | genP2 | ||
) | [inline, virtual] |
virtual void Histograms::Fill | ( | const double & | x, |
const double & | y, | ||
const double & | a, | ||
const double & | b | ||
) | [inline, virtual] |
virtual void Histograms::Fill | ( | const reco::Particle::LorentzVector & | p4, |
const double & | resValue, | ||
const int | charge | ||
) | [inline, virtual] |
Reimplemented in HResolutionVSPart, HFunctionResolution, and HFunctionResolutionVarianceCheck.
Definition at line 70 of file Histograms.h.
{};
virtual void Histograms::Fill | ( | const double & | x, |
const double & | y | ||
) | [inline, virtual] |
void Histograms::fillEventInfo | ( | int | proc, |
int | strk, | ||
int | ntrkr | ||
) |
Definition at line 497 of file Histograms.cc.
References ExpressReco_HICollisions_FallBack::e, RPCNoise_example::fillHistograms, EventInfo_t::ntrkr, EventInfo_t::proc, proc, and EventInfo_t::strk.
{ if(fillNtuples) { EventInfo_t e; e.proc = proc; e.strk = strk; e.ntrkr = ntrk; eventInfoValues = e; trackTrees[3]->Fill(); } if(fillHistograms) { heve[0]->Fill(ntrk); if(proc == 92 || proc == 93) heve[1]->Fill(ntrk); // hsdx if(proc == 94) heve[2]->Fill(ntrk); // hddx if(!(proc == 92 || proc == 93 || proc == 94)) heve[3]->Fill(ntrk); // hndx // For multiplicity, detector response matrix hder[0]->Fill(strk,ntrk); } }
void Histograms::fillRecHistograms | ( | const RecTrack_t & | r | ) |
Definition at line 573 of file Histograms.cc.
References ala, any, RecTrack_t::charge, DeDxDiscriminatorTools::charge(), RecTrack_t::etar, RecTrack_t::etas, funct::exp(), feedDown, RPCNoise_example::fillHistograms, ham, hap, RecTrack_t::ids, gen::k, RecTrack_t::logde, RecTrack_t::logpr, neg, nFeedDowns, RecTrack_t::nhitr, RecTrack_t::nsim, RecTrack_t::ntrkr, L1TEmulatorMonitor_cff::p, RecTrack_t::parids, partCharge, pip, pos, RecTrack_t::prim, RecTrack_t::ptr, RecTrack_t::pts, csvReporter::r, edm::second(), and RecTrack_t::zr.
{ if(fillNtuples) { if(r.prim) { recTrackValues = r; trackTrees[1]->Fill(); } } if(fillHistograms) { int charge = getCharge(r.charge); double p = exp(r.logpr); if(r.prim) { hall[charge]->Fill(r.etar, r.ptr, r.ntrkr); if(r.ptr > 0.3) // !!! hdac[charge]->Fill(r.etar, r.zr); if(r.nsim == 0) hfak[charge]->Fill(r.etar, r.ptr, r.ntrkr); if(r.nsim == 1) { int part = getParticle(r.ids); int moth = getParticle(r.parids); if(pip <= part && part <= ala) { hvpt[part]->Fill(r.etas, r.pts, r.ptr ); // value hrpt[part]->Fill(r.etas, r.pts, r.ptr/r.pts); // ratio hsp0[part]->Fill(r.etas, r.pts); // sum p^0 hsp1[part]->Fill(r.etas, r.pts, p); // sum p^1 hsp2[part]->Fill(r.etas, r.pts, p*p); // sum p^2 } for(int k = 0; k < nFeedDowns; k++) if(part == feedDown[k].second) // daughter same { hpro[k]->Fill(r.etar, r.ptr); if((r.parids != 0 && feedDown[k].first == any) || feedDown[k].first == moth) hdec[k]->Fill(r.etar, r.ptr); } if(partCharge[part] == pos || partCharge[part] == neg) { if(partCharge[part] == pos) part = hap; if(partCharge[part] == neg) part = ham; hvpt[part]->Fill(r.etas, r.pts, r.ptr ); // value hrpt[part]->Fill(r.etas, r.pts, r.ptr/r.pts); // ratio hsp0[part]->Fill(r.etas, r.pts); // sum p^0 hsp1[part]->Fill(r.etas, r.pts, p); // sum p^1 hsp2[part]->Fill(r.etas, r.pts, p*p); // sum p^2 for(int k = 0; k < nFeedDowns; k++) if(part == feedDown[k].second) // daughter same { hpro[k]->Fill(r.etar, r.ptr); if((r.parids != 0 && feedDown[k].first == any) || feedDown[k].first == moth) hdec[k]->Fill(r.etar, r.ptr); } } } // All hits helo[charge]->Fill(r.etar, r.ptr, r.logde); hnhi[charge]->Fill(r.etar, r.ptr, r.nhitr); held[charge]->Fill(r.logpr, r.logde); // Strip hits /* selo[charge]->Fill(r.etar, r.ptr, r.logde_strip); snhi[charge]->Fill(r.etar, r.ptr, r.nhitr_strip); seld[charge]->Fill(r.logpr, r.logde_strip); */ } } }
void Histograms::fillSimHistograms | ( | const SimTrack_t & | s | ) |
Definition at line 530 of file Histograms.cc.
References SimTrack_t::acc, ala, SimTrack_t::etas, RPCNoise_example::fillHistograms, ham, hap, cmsDownloadME::href, SimTrack_t::ids, neg, SimTrack_t::nrec, SimTrack_t::ntrkr, partCharge, pip, pos, SimTrack_t::prim, SimTrack_t::pts, and asciidump::s.
{ if(fillNtuples) { if(s.prim) { simTrackValues = s; trackTrees[0]->Fill(); } } if(fillHistograms) { int part = getParticle(s.ids); if(pip <= part && part <= ala && s.prim) { hsim[part]->Fill(s.etas, s.pts, s.ntrkr); if(s.acc) hacc[part]->Fill(s.etas, s.pts, s.ntrkr); if(s.acc) { if(s.nrec > 0) href[part]->Fill(s.etas, s.pts, s.ntrkr); if(s.nrec > 1) hmul[part]->Fill(s.etas, s.pts, s.ntrkr); } if(partCharge[part] == pos || partCharge[part] == neg) { if(partCharge[part] == pos) part = hap; if(partCharge[part] == neg) part = ham; hsim[part]->Fill(s.etas, s.pts, s.ntrkr); if(s.acc) hacc[part]->Fill(s.etas, s.pts, s.ntrkr); if(s.acc) { if(s.nrec > 0) href[part]->Fill(s.etas, s.pts, s.ntrkr); if(s.nrec > 1) hmul[part]->Fill(s.etas, s.pts, s.ntrkr); } } } } }
void Histograms::fillVzeroHistograms | ( | const RecVzero_t & | r, |
int | part | ||
) |
Definition at line 664 of file Histograms.cc.
References RecVzero_t::etar, RPCNoise_example::fillHistograms, RecVzero_t::ima, RecVzero_t::ptr, and v.
{ if(fillNtuples) { recVzeroValues = v; trackTrees[2]->Fill(); } if(fillHistograms) hima[part]->Fill(v.etar, v.ptr, v.ima); }
virtual double Histograms::Get | ( | const reco::Particle::LorentzVector & | recoP1, |
const TString & | covarianceName | ||
) | [inline, virtual] |
int Histograms::getCharge | ( | int | charge | ) | [private] |
virtual TString Histograms::GetName | ( | ) | [inline, virtual] |
int Histograms::getParticle | ( | int | id | ) | [private] |
Definition at line 104 of file Histograms.cc.
References ala, asi, elm, elp, gam, k0s, kam, kap, lam, pim, pip, prm, prp, and sip.
{ switch(id) { case 211 : return pip; break; case -211 : return pim; break; case 321 : return kap; break; case -321 : return kam; break; case 2212 : return prp; break; case -2212 : return prm; break; case 11 : return elp; break; case -11 : return elm; break; // SimG4Core/Notification/src/G4TrackToParticleID.cc // "deuteron" = -100; 1p 1n // "triton" = -101; 1p 2n // "alpha" = -102; 2p 2n // "He3" = -104; 2p 1n case 22 : return gam; break; case 310 : return k0s; break; case 3122 : return lam; break; case -3122 : return ala; break; /* case 113 : return rho; break; case 313 : return kst; break; case -313 : return aks; break; case 333 : return phi; break; */ case 3222 : return sip; break; case -3222 : return asi; break; default : return -1; break; } }
virtual void Histograms::SetWeight | ( | double | weight | ) | [inline, virtual] |
Definition at line 96 of file Histograms.h.
References theWeight_, and CommonMethods::weight().
{ theWeight_ = weight; }
virtual void Histograms::Write | ( | ) | [pure virtual] |
void Histograms::writeHistograms | ( | ) |
Definition at line 677 of file Histograms.cc.
References RPCNoise_example::fillHistograms, h, histoFile, cmsDownloadME::href, and matplotRender::t.
{ typedef std::vector<TH3F *>::const_iterator H3I; typedef std::vector<TH2F *>::const_iterator H2I; typedef std::vector<TH1F *>::const_iterator H1I; typedef std::vector<TTree *>::const_iterator TI; if(fillHistograms) { histoFile->cd(); for(H1I h = heve.begin(); h!= heve.end(); h++) (*h)->Write(); for(H2I h = hder.begin(); h!= hder.end(); h++) (*h)->Write(); for(H3I h = hsim.begin(); h!= hsim.end(); h++) (*h)->Write(); for(H3I h = hacc.begin(); h!= hacc.end(); h++) (*h)->Write(); for(H3I h = href.begin(); h!= href.end(); h++) (*h)->Write(); for(H3I h = hmul.begin(); h!= hmul.end(); h++) (*h)->Write(); for(H3I h = hall.begin(); h!= hall.end(); h++) (*h)->Write(); for(H2I h = hdac.begin(); h!= hdac.end(); h++) (*h)->Write(); for(H3I h = hvpt.begin(); h!= hvpt.end(); h++) (*h)->Write(); for(H3I h = hrpt.begin(); h!= hrpt.end(); h++) (*h)->Write(); for(H2I h = hsp0.begin(); h!= hsp0.end(); h++) (*h)->Write(); for(H2I h = hsp1.begin(); h!= hsp1.end(); h++) (*h)->Write(); for(H2I h = hsp2.begin(); h!= hsp2.end(); h++) (*h)->Write(); for(H3I h = hfak.begin(); h!= hfak.end(); h++) (*h)->Write(); for(H2I h = hpro.begin(); h!= hpro.end(); h++) (*h)->Write(); for(H2I h = hdec.begin(); h!= hdec.end(); h++) (*h)->Write(); for(H3I h = helo.begin(); h!= helo.end(); h++) (*h)->Write(); for(H3I h = hnhi.begin(); h!= hnhi.end(); h++) (*h)->Write(); for(H2I h = held.begin(); h!= held.end(); h++) (*h)->Write(); for(H3I h = hima.begin(); h!= hima.end(); h++) (*h)->Write(); for(H3I h = hrho.begin(); h!= hrho.end(); h++) (*h)->Write(); histoFile->Close(); } if(fillNtuples) { ntupleFile->cd(); for(TI t = trackTrees.begin(); t!= trackTrees.end(); t++) (*t)->Write(); ntupleFile->Close(); } }
std::vector<double> Histograms::etaBins [private] |
Definition at line 86 of file Histograms.h.
EventInfo_t Histograms::eventInfoValues [private] |
Definition at line 79 of file Histograms.h.
bool Histograms::fillHistograms [private] |
Definition at line 83 of file Histograms.h.
bool Histograms::fillNtuples [private] |
Definition at line 84 of file Histograms.h.
std::vector<TH3F *> Histograms::hacc [private] |
Definition at line 99 of file Histograms.h.
std::vector<TH3F *> Histograms::hall [private] |
Definition at line 104 of file Histograms.h.
std::vector<TH2F *> Histograms::hdac [private] |
Definition at line 106 of file Histograms.h.
std::vector<TH2F *> Histograms::hdec [private] |
Definition at line 120 of file Histograms.h.
std::vector<TH2F *> Histograms::hder [private] |
Definition at line 95 of file Histograms.h.
std::vector<TH2F *> Histograms::held [private] |
Definition at line 125 of file Histograms.h.
std::vector<TH3F *> Histograms::helo [private] |
Definition at line 123 of file Histograms.h.
std::vector<TH1F *> Histograms::heve [private] |
Definition at line 94 of file Histograms.h.
std::vector<TH3F *> Histograms::hfak [private] |
Definition at line 116 of file Histograms.h.
std::vector<TH3F *> Histograms::hima [private] |
Definition at line 134 of file Histograms.h.
TDirectory* Histograms::histoDir_ [protected] |
Definition at line 108 of file Histograms.h.
Referenced by HCovarianceVSParts::HCovarianceVSParts(), HCovarianceVSxy::HCovarianceVSxy(), Histograms(), HMassResolutionVSPart::HMassResolutionVSPart(), HTProfile::Write(), HFunctionResolution::Write(), HDelta::Write(), HFunctionResolutionVarianceCheck::Write(), HTH2D::Write(), HTH1D::Write(), HParticle::Write(), HResolutionVSPart::Write(), HCovarianceVSxy::Write(), HMassResolutionVSPart::Write(), and HCovarianceVSParts::Write().
TFile* Histograms::histoFile [private] |
Definition at line 81 of file Histograms.h.
std::vector<TH3F *> Histograms::hmul [private] |
Definition at line 101 of file Histograms.h.
std::vector<TH3F *> Histograms::hnhi [private] |
Definition at line 124 of file Histograms.h.
std::vector<TH2F *> Histograms::hpro [private] |
Definition at line 119 of file Histograms.h.
std::vector<TH3F *> Histograms::href [private] |
Definition at line 100 of file Histograms.h.
std::vector<TH3F *> Histograms::hrho [private] |
Definition at line 135 of file Histograms.h.
std::vector<TH3F *> Histograms::hrpt [private] |
Definition at line 110 of file Histograms.h.
std::vector<TH3F *> Histograms::hsim [private] |
Definition at line 98 of file Histograms.h.
std::vector<TH2F *> Histograms::hsp0 [private] |
Definition at line 111 of file Histograms.h.
std::vector<TH2F *> Histograms::hsp1 [private] |
Definition at line 112 of file Histograms.h.
std::vector<TH2F *> Histograms::hsp2 [private] |
Definition at line 113 of file Histograms.h.
std::vector<TH3F *> Histograms::hvpt [private] |
Definition at line 109 of file Histograms.h.
std::vector<double> Histograms::ldeBins [private] |
Definition at line 86 of file Histograms.h.
std::vector<double> Histograms::lpBins [private] |
Definition at line 86 of file Histograms.h.
std::vector<double> Histograms::metaBins [private] |
Definition at line 86 of file Histograms.h.
TString Histograms::name_ [protected] |
Definition at line 106 of file Histograms.h.
Referenced by HMassResolutionVSPart::Fill(), HCovarianceVSParts::Fill(), HCovarianceVSParts::Get(), GetName(), HCovarianceVSParts::HCovarianceVSParts(), HCovarianceVSxy::HCovarianceVSxy(), HDelta::HDelta(), HFunctionResolution::HFunctionResolution(), HLikelihoodVSPart::HLikelihoodVSPart(), HMassVSPart::HMassVSPart(), HMassVSPartProfile::HMassVSPartProfile(), HPartVSEta::HPartVSEta(), HPartVSPhi::HPartVSPhi(), HPartVSPt::HPartVSPt(), HResolutionVSPart::HResolutionVSPart(), and HCovarianceVSxy::Write().
std::vector<double> Histograms::nhitBins [private] |
Definition at line 86 of file Histograms.h.
std::vector<double> Histograms::ntrkBins [private] |
Definition at line 86 of file Histograms.h.
TFile* Histograms::ntupleFile [private] |
Definition at line 82 of file Histograms.h.
TFile* Histograms::outputFile_ [protected] |
Definition at line 107 of file Histograms.h.
Referenced by HFunctionResolution::Write().
std::vector<double> Histograms::ptBins [private] |
Definition at line 86 of file Histograms.h.
std::vector<double> Histograms::ratBins [private] |
Definition at line 86 of file Histograms.h.
RecTrack_t Histograms::recTrackValues [private] |
Definition at line 77 of file Histograms.h.
RecVzero_t Histograms::recVzeroValues [private] |
Definition at line 78 of file Histograms.h.
std::vector<double> Histograms::rhoBins [private] |
Definition at line 86 of file Histograms.h.
SimTrack_t Histograms::simTrackValues [private] |
Definition at line 76 of file Histograms.h.
double Histograms::theWeight_ [protected] |
Definition at line 105 of file Histograms.h.
Referenced by SetWeight().
std::vector<TTree *> Histograms::trackTrees [private] |
Definition at line 75 of file Histograms.h.
std::vector<double> Histograms::zBins [private] |
Definition at line 86 of file Histograms.h.