#include <DQMOffline/Muon/src/MuonSeedsAnalyzer.h>
Definition at line 30 of file MuonSeedsAnalyzer.h.
MuonSeedsAnalyzer::MuonSeedsAnalyzer | ( | const edm::ParameterSet & | pSet, | |
MuonServiceProxy * | theService | |||
) |
Constructor.
Definition at line 36 of file MuonSeedsAnalyzer.cc.
References parameters.
00036 :MuonAnalyzerBase(theService) { 00037 parameters = pSet; 00038 }
MuonSeedsAnalyzer::~MuonSeedsAnalyzer | ( | ) | [virtual] |
void MuonSeedsAnalyzer::analyze | ( | const edm::Event & | iEvent, | |
const edm::EventSetup & | iSetup, | |||
const TrajectorySeed & | seed | |||
) |
Get the analysis.
Definition at line 146 of file MuonSeedsAnalyzer.cc.
References funct::abs(), TrajectoryStateOnSurface::cartesianError(), TrajectoryStateOnSurface::curvilinearError(), HLT_VtxMuL3::errors, PV3DBase< T, PVType, FrameType >::eta(), MonitorElement::Fill(), getSeedTSOS(), TrajectoryStateOnSurface::globalMomentum(), LogTrace, PV3DBase< T, PVType, FrameType >::mag(), CartesianTrajectoryError::matrix(), CurvilinearTrajectoryError::matrix(), metname, TrajectorySeed::nHits(), NumberOfRecHitsPerSeed, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), funct::pow(), seedEta, seedEtaErr, seedPErr, seedPErrVsEta, seedPErrVsPhi, seedPErrVsPt, seedPhi, seedPhiErr, seedPt, seedPtErr, seedPtErrVsEta, seedPtErrVsPhi, seedPtErrVsPt, seedPx, seedPxErr, seedPy, seedPyErr, seedPz, seedPzErr, seedTheta, funct::sin(), funct::sqrt(), PV3DBase< T, PVType, FrameType >::theta(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
Referenced by MuonAnalyzer::analyze().
00146 { 00147 00148 TrajectoryStateOnSurface seedTSOS = getSeedTSOS(seed); 00149 AlgebraicSymMatrix66 errors = seedTSOS.cartesianError().matrix(); 00150 double partialPterror = errors(3,3)*pow(seedTSOS.globalMomentum().x(),2) + errors(4,4)*pow(seedTSOS.globalMomentum().y(),2); 00151 00152 LogTrace(metname)<<"[MuonSeedAnalyzer] Filling the histos"; 00153 00154 // nhits 00155 LogTrace(metname)<<"Number od recHits per seed: "<<seed.nHits(); 00156 NumberOfRecHitsPerSeed->Fill(seed.nHits()); 00157 00158 // pt 00159 LogTrace(metname)<<"seed momentum: "<<seedTSOS.globalMomentum().perp(); 00160 seedPt->Fill(seedTSOS.globalMomentum().perp()); 00161 00162 // px 00163 LogTrace(metname)<<"seed px: "<<seedTSOS.globalMomentum().x(); 00164 seedPx->Fill(seedTSOS.globalMomentum().x()); 00165 00166 // py 00167 LogTrace(metname)<<"seed py: "<<seedTSOS.globalMomentum().y(); 00168 seedPy->Fill(seedTSOS.globalMomentum().y()); 00169 00170 // pz 00171 LogTrace(metname)<<"seed pz: "<<seedTSOS.globalMomentum().z(); 00172 seedPz->Fill(seedTSOS.globalMomentum().z()); 00173 00174 // phi 00175 LogTrace(metname)<<"seed phi: "<<seedTSOS.globalMomentum().phi(); 00176 seedPhi->Fill(seedTSOS.globalMomentum().phi()); 00177 00178 // theta 00179 LogTrace(metname)<<"seed theta: "<<seedTSOS.globalMomentum().theta(); 00180 seedTheta->Fill(seedTSOS.globalMomentum().theta()); 00181 00182 // eta 00183 LogTrace(metname)<<"seed eta: "<<seedTSOS.globalMomentum().eta(); 00184 seedEta->Fill(seedTSOS.globalMomentum().eta()); 00185 00186 // pt err 00187 LogTrace(metname)<<"seed pt error: "<<sqrt(partialPterror)/seedTSOS.globalMomentum().perp(); 00188 seedPtErr->Fill(sqrt(partialPterror)/seedTSOS.globalMomentum().perp()); 00189 00190 // ptErr/pt Vs phi 00191 seedPtErrVsPhi->Fill(seedTSOS.globalMomentum().phi(), 00192 sqrt(partialPterror)/seedTSOS.globalMomentum().perp()); 00193 // ptErr/pt Vs eta 00194 seedPtErrVsEta->Fill(seedTSOS.globalMomentum().eta(), 00195 sqrt(partialPterror)/seedTSOS.globalMomentum().perp()); 00196 // ptErr/pt Vs pt 00197 seedPtErrVsPt->Fill(seedTSOS.globalMomentum().perp(), 00198 sqrt(partialPterror)/seedTSOS.globalMomentum().perp()); 00199 00200 // px err 00201 LogTrace(metname)<<"seed px error: "<<sqrt(errors(3,3))/seedTSOS.globalMomentum().x(); 00202 seedPxErr->Fill(sqrt(errors(3,3))/seedTSOS.globalMomentum().x()); 00203 00204 // py err 00205 LogTrace(metname)<<"seed py error: "<<sqrt(errors(4,4))/seedTSOS.globalMomentum().y(); 00206 seedPyErr->Fill(sqrt(errors(4,4))/seedTSOS.globalMomentum().y()); 00207 00208 // pz err 00209 LogTrace(metname)<<"seed pz error: "<<sqrt(errors(5,5))/seedTSOS.globalMomentum().z(); 00210 seedPzErr->Fill(sqrt(errors(5,5))/seedTSOS.globalMomentum().z()); 00211 00212 // p err 00213 LogTrace(metname)<<"seed p error: "<<sqrt(partialPterror+errors(5,5)*pow(seedTSOS.globalMomentum().z(),2))/seedTSOS.globalMomentum().mag(); 00214 seedPErr->Fill(sqrt(partialPterror+errors(5,5)*pow(seedTSOS.globalMomentum().z(),2))/seedTSOS.globalMomentum().mag()); 00215 00216 // pErr/p Vs phi 00217 seedPErrVsPhi->Fill(seedTSOS.globalMomentum().phi(), 00218 sqrt(partialPterror+errors(5,5)*pow(seedTSOS.globalMomentum().z(),2))/seedTSOS.globalMomentum().mag()); 00219 // pErr/p Vs eta 00220 seedPErrVsEta->Fill(seedTSOS.globalMomentum().eta(), 00221 sqrt(partialPterror+errors(5,5)*pow(seedTSOS.globalMomentum().z(),2))/seedTSOS.globalMomentum().mag()); 00222 // pErr/p Vs pt 00223 seedPErrVsPt->Fill(seedTSOS.globalMomentum().perp(), 00224 sqrt(partialPterror+errors(5,5)*pow(seedTSOS.globalMomentum().z(),2))/seedTSOS.globalMomentum().mag()); 00225 00226 // phi err 00227 LogTrace(metname)<<"seed phi error: "<<sqrt(seedTSOS.curvilinearError().matrix()(2,2)); 00228 seedPhiErr->Fill(sqrt(seedTSOS.curvilinearError().matrix()(2,2))); 00229 00230 // eta err 00231 LogTrace(metname)<<"seed eta error: "<<sqrt(seedTSOS.curvilinearError().matrix()(1,1))*abs(sin(seedTSOS.globalMomentum().theta())); 00232 seedEtaErr->Fill(sqrt(seedTSOS.curvilinearError().matrix()(1,1))*abs(sin(seedTSOS.globalMomentum().theta()))); 00233 00234 }
void MuonSeedsAnalyzer::beginJob | ( | edm::EventSetup const & | iSetup, | |
DQMStore * | dbe | |||
) | [virtual] |
Inizialize parameters for histo binning.
Implements MuonAnalyzerBase.
Definition at line 44 of file MuonSeedsAnalyzer.cc.
References DQMStore::book1D(), DQMStore::book2D(), EtaBin, etaErrBin, etaErrMax, etaErrMin, EtaMax, EtaMin, edm::ParameterSet::getParameter(), LogTrace, metname, NumberOfRecHitsPerSeed, parameters, pErrBin, pErrMax, pErrMin, PhiBin, phiErrBin, phiErrMax, phiErrMin, PhiMax, PhiMin, pxyzErrBin, pxyzErrMax, pxyzErrMin, seedEta, seedEtaErr, seedHitBin, seedHitMax, seedHitMin, seedPErr, seedPErrVsEta, seedPErrVsPhi, seedPErrVsPt, seedPhi, seedPhiErr, seedPt, seedPtBin, seedPtErr, seedPtErrVsEta, seedPtErrVsPhi, seedPtErrVsPt, seedPtMax, seedPtMin, seedPx, seedPxErr, seedPxyzBin, seedPxyzMax, seedPxyzMin, seedPy, seedPyErr, seedPz, seedPzErr, seedTheta, MonitorElement::setAxisTitle(), DQMStore::setCurrentFolder(), ThetaBin, ThetaMax, and ThetaMin.
Referenced by MuonAnalyzer::beginJob().
00044 { 00045 00046 metname = "seedsAnalyzer"; 00047 00048 LogTrace(metname)<<"[MuonSeedsAnalyzer] Parameters initialization"; 00049 dbe->setCurrentFolder("Muons/MuonSeedsAnalyzer"); 00050 00051 seedHitBin = parameters.getParameter<int>("RecHitBin"); 00052 seedHitMin = parameters.getParameter<double>("RecHitMin"); 00053 seedHitMax = parameters.getParameter<double>("RecHitMax"); 00054 string histname = "NumberOfRecHitsPerSeed_"; 00055 NumberOfRecHitsPerSeed = dbe->book1D(histname, "Number of seed recHits", seedHitBin, seedHitMin, seedHitMax); 00056 00057 PhiBin = parameters.getParameter<int>("PhiBin"); 00058 PhiMin = parameters.getParameter<double>("PhiMin"); 00059 PhiMax = parameters.getParameter<double>("PhiMax"); 00060 histname = "seedPhi_"; 00061 seedPhi = dbe->book1D(histname, "Seed #phi", PhiBin, PhiMin, PhiMax); 00062 seedPhi->setAxisTitle("rad"); 00063 00064 EtaBin = parameters.getParameter<int>("EtaBin"); 00065 EtaMin = parameters.getParameter<double>("EtaMin"); 00066 EtaMax = parameters.getParameter<double>("EtaMax"); 00067 histname = "seedEta_"; 00068 seedEta = dbe->book1D(histname, "Seed #eta", EtaBin, EtaMin, EtaMax); 00069 00070 ThetaBin = parameters.getParameter<int>("ThetaBin"); 00071 ThetaMin = parameters.getParameter<double>("ThetaMin"); 00072 ThetaMax = parameters.getParameter<double>("ThetaMax"); 00073 histname = "seedTheta_"; 00074 seedTheta = dbe->book1D(histname, "Seed #theta", ThetaBin, ThetaMin, ThetaMax); 00075 seedTheta->setAxisTitle("rad"); 00076 00077 seedPtBin = parameters.getParameter<int>("seedPtBin"); 00078 seedPtMin = parameters.getParameter<double>("seedPtMin"); 00079 seedPtMax = parameters.getParameter<double>("seedPtMax"); 00080 histname = "seedPt_"; 00081 seedPt = dbe->book1D(histname, "Seed p_{t}", seedPtBin, seedPtMin, seedPtMax); 00082 seedPt->setAxisTitle("GeV"); 00083 00084 seedPxyzBin = parameters.getParameter<int>("seedPxyzBin"); 00085 seedPxyzMin = parameters.getParameter<double>("seedPxyzMin"); 00086 seedPxyzMax = parameters.getParameter<double>("seedPxyzMax"); 00087 histname = "seedPx_"; 00088 seedPx = dbe->book1D(histname, "Seed p_{x}", seedPxyzBin, seedPxyzMin, seedPxyzMax); 00089 seedPx->setAxisTitle("GeV"); 00090 histname = "seedPy_"; 00091 seedPy = dbe->book1D(histname, "Seed p_{y}", seedPxyzBin, seedPxyzMin, seedPxyzMax); 00092 seedPy->setAxisTitle("GeV"); 00093 histname = "seedPz_"; 00094 seedPz = dbe->book1D(histname, "Seed p_{z}", seedPxyzBin, seedPxyzMin, seedPxyzMax); 00095 seedPz->setAxisTitle("GeV"); 00096 00097 pErrBin = parameters.getParameter<int>("pErrBin"); 00098 pErrMin = parameters.getParameter<double>("pErrMin"); 00099 pErrMax = parameters.getParameter<double>("pErrMax"); 00100 histname = "seedPtErrOverPt_"; 00101 seedPtErr = dbe->book1D(histname, "Seed p_{t}Err/p_{t}", pErrBin, pErrMin, pErrMax); 00102 histname = "seedPtErrOverPtVsPhi_"; 00103 seedPtErrVsPhi = dbe->book2D(histname, "Seed p_{t}Err/p_{t} vs #phi", PhiBin, PhiMin, PhiMax, pErrBin, pErrMin, pErrMax); 00104 seedPtErrVsPhi->setAxisTitle("rad",2); 00105 histname = "seedPtErrOverPtVsEta_"; 00106 seedPtErrVsEta = dbe->book2D(histname, "Seed p_{t}Err/p_{t} vs #eta", EtaBin, EtaMin, EtaMax, pErrBin, pErrMin, pErrMax); 00107 histname = "seedPtErrOverPtVsPt_"; 00108 seedPtErrVsPt = dbe->book2D(histname, "Seed p_{t}Err/p_{t} vs p_{t}", seedPtBin/5, seedPtMin, seedPtMax, pErrBin, pErrMin, pErrMax); 00109 seedPtErrVsPt->setAxisTitle("GeV",2); 00110 histname = "seedPErrOverP_"; 00111 seedPErr = dbe->book1D(histname, "Seed pErr/p", pErrBin, pErrMin, pErrMax); 00112 histname = "seedPErrOverPVsPhi_"; 00113 seedPErrVsPhi = dbe->book2D(histname, "Seed pErr/p vs #phi", PhiBin, PhiMin, PhiMax, pErrBin, pErrMin, pErrMax); 00114 seedPErrVsPhi->setAxisTitle("rad",2); 00115 histname = "seedPErrOverPVsEta_"; 00116 seedPErrVsEta = dbe->book2D(histname, "Seed pErr/p vs #eta", EtaBin, EtaMin, EtaMax, pErrBin, pErrMin, pErrMax); 00117 histname = "seedPErrOverPVsPt_"; 00118 seedPErrVsPt = dbe->book2D(histname, "Seed pErr/p vs p_{t}", seedPtBin/5, seedPtMin, seedPtMax, pErrBin, pErrMin, pErrMax); 00119 seedPErrVsPt->setAxisTitle("GeV",2); 00120 00121 pxyzErrBin = parameters.getParameter<int>("pxyzErrBin"); 00122 pxyzErrMin = parameters.getParameter<double>("pxyzErrMin"); 00123 pxyzErrMax = parameters.getParameter<double>("pxyzErrMax"); 00124 histname = "seedPxErrOverPx_"; 00125 seedPxErr = dbe->book1D(histname, "Seed p_{x}Err/p_{x}", pxyzErrBin, pxyzErrMin, pxyzErrMax); 00126 histname = "seedPyErrOverPy_"; 00127 seedPyErr = dbe->book1D(histname, "Seed p_{y}Err/p_{y}", pxyzErrBin, pxyzErrMin, pxyzErrMax); 00128 histname = "seedPzErrOverPz_"; 00129 seedPzErr = dbe->book1D(histname, "Seed p_{z}Err/p_{z}", pxyzErrBin, pxyzErrMin, pxyzErrMax); 00130 00131 phiErrBin = parameters.getParameter<int>("phiErrBin"); 00132 phiErrMin = parameters.getParameter<double>("phiErrMin"); 00133 phiErrMax = parameters.getParameter<double>("phiErrMax"); 00134 histname = "seedPhiErr_"; 00135 seedPhiErr = dbe->book1D(histname, "Seed #phi error", phiErrBin, phiErrMin, phiErrMax); 00136 00137 etaErrBin = parameters.getParameter<int>("etaErrBin"); 00138 etaErrMin = parameters.getParameter<double>("etaErrMin"); 00139 etaErrMax = parameters.getParameter<double>("etaErrMax"); 00140 histname = "seedEtaErr_"; 00141 seedEtaErr = dbe->book1D(histname, "Seed #eta error", etaErrBin, etaErrMin, etaErrMax); 00142 00143 }
TrajectoryStateOnSurface MuonSeedsAnalyzer::getSeedTSOS | ( | const TrajectorySeed & | seed | ) |
Get the TrajectoryStateOnSurface.
Definition at line 237 of file MuonSeedsAnalyzer.cc.
References PTrajectoryStateOnDet::detId(), MuonAnalyzerBase::service(), TrajectorySeed::startingState(), and TrajectoryStateTransform::transientState().
Referenced by analyze().
00237 { 00238 00239 // Get the Trajectory State on Det (persistent version of a TSOS) from the seed 00240 PTrajectoryStateOnDet pTSOD = seed.startingState(); 00241 // Transform it in a TrajectoryStateOnSurface 00242 TrajectoryStateTransform tsTransform; 00243 DetId seedDetId(pTSOD.detId()); 00244 const GeomDet* gdet = service()->trackingGeometry()->idToDet( seedDetId ); 00245 TrajectoryStateOnSurface initialState = tsTransform.transientState(pTSOD, &(gdet->surface()), &*(service())->magneticField()); 00246 00247 return initialState; 00248 00249 }
int MuonSeedsAnalyzer::Chi2Bin [private] |
Definition at line 73 of file MuonSeedsAnalyzer.h.
double MuonSeedsAnalyzer::Chi2Max [private] |
Definition at line 75 of file MuonSeedsAnalyzer.h.
double MuonSeedsAnalyzer::Chi2Min [private] |
Definition at line 74 of file MuonSeedsAnalyzer.h.
int MuonSeedsAnalyzer::EtaBin [private] |
int MuonSeedsAnalyzer::etaErrBin [private] |
double MuonSeedsAnalyzer::etaErrMax [private] |
double MuonSeedsAnalyzer::etaErrMin [private] |
double MuonSeedsAnalyzer::EtaMax [private] |
double MuonSeedsAnalyzer::EtaMin [private] |
std::string MuonSeedsAnalyzer::metname [private] |
Definition at line 52 of file MuonSeedsAnalyzer.h.
Referenced by beginJob(), and MuonSeedsAnalyzer().
int MuonSeedsAnalyzer::pErrBin [private] |
double MuonSeedsAnalyzer::pErrMax [private] |
double MuonSeedsAnalyzer::pErrMin [private] |
int MuonSeedsAnalyzer::PhiBin [private] |
int MuonSeedsAnalyzer::phiErrBin [private] |
double MuonSeedsAnalyzer::phiErrMax [private] |
double MuonSeedsAnalyzer::phiErrMin [private] |
double MuonSeedsAnalyzer::PhiMax [private] |
double MuonSeedsAnalyzer::PhiMin [private] |
int MuonSeedsAnalyzer::pxyzErrBin [private] |
double MuonSeedsAnalyzer::pxyzErrMax [private] |
double MuonSeedsAnalyzer::pxyzErrMin [private] |
MonitorElement* MuonSeedsAnalyzer::seedEta [private] |
MonitorElement* MuonSeedsAnalyzer::seedEtaErr [private] |
int MuonSeedsAnalyzer::seedHitBin [private] |
double MuonSeedsAnalyzer::seedHitMax [private] |
double MuonSeedsAnalyzer::seedHitMin [private] |
MonitorElement* MuonSeedsAnalyzer::seedPErr [private] |
MonitorElement* MuonSeedsAnalyzer::seedPErrVsEta [private] |
MonitorElement* MuonSeedsAnalyzer::seedPErrVsPhi [private] |
MonitorElement* MuonSeedsAnalyzer::seedPErrVsPt [private] |
MonitorElement* MuonSeedsAnalyzer::seedPhi [private] |
MonitorElement* MuonSeedsAnalyzer::seedPhiErr [private] |
MonitorElement* MuonSeedsAnalyzer::seedPt [private] |
int MuonSeedsAnalyzer::seedPtBin [private] |
MonitorElement* MuonSeedsAnalyzer::seedPtErr [private] |
MonitorElement* MuonSeedsAnalyzer::seedPtErrVsEta [private] |
MonitorElement* MuonSeedsAnalyzer::seedPtErrVsPhi [private] |
MonitorElement* MuonSeedsAnalyzer::seedPtErrVsPt [private] |
double MuonSeedsAnalyzer::seedPtMax [private] |
double MuonSeedsAnalyzer::seedPtMin [private] |
MonitorElement* MuonSeedsAnalyzer::seedPx [private] |
MonitorElement* MuonSeedsAnalyzer::seedPxErr [private] |
int MuonSeedsAnalyzer::seedPxyzBin [private] |
double MuonSeedsAnalyzer::seedPxyzMax [private] |
double MuonSeedsAnalyzer::seedPxyzMin [private] |
MonitorElement* MuonSeedsAnalyzer::seedPy [private] |
MonitorElement* MuonSeedsAnalyzer::seedPyErr [private] |
MonitorElement* MuonSeedsAnalyzer::seedPz [private] |
MonitorElement* MuonSeedsAnalyzer::seedPzErr [private] |
MonitorElement* MuonSeedsAnalyzer::seedTheta [private] |
int MuonSeedsAnalyzer::ThetaBin [private] |
double MuonSeedsAnalyzer::ThetaMax [private] |
double MuonSeedsAnalyzer::ThetaMin [private] |