106 <<
" # of points: " << combinedTime.
nDof() <<std::endl;
116 std::vector <double>
x,
y;
117 double invbeta=0, invbetaerr=0;
118 double vertexTime=0, vertexTimeErr=0, vertexTimeR=0, vertexTimeRErr=0;
119 double freeBeta, freeBetaErr, freeTime, freeTimeErr;
121 if (tmSeq.
dstnc.size()<=1)
return;
123 for (
unsigned int i=0;
i<tmSeq.
dstnc.size();
i++) {
125 x.push_back(tmSeq.
dstnc.at(
i)/30.);
132 for (
unsigned int i=0;
i<tmSeq.
dstnc.size();
i++) {
134 invbetaerr+=diff*diff*tmSeq.
weight.at(
i);
136 vertexTimeErr+=diff*diff*tmSeq.
weight.at(
i);
138 vertexTimeRErr+=diff*diff*tmSeq.
weight.at(
i);
141 double cf = 1./(tmSeq.
dstnc.size()-1);
153 rawFit(freeBeta, freeBetaErr, freeTime, freeTimeErr, x, y);
173 cmbSeq.
weight.push_back(hitWeight);
183 cmbSeq.
weight.push_back(hitWeight);
206 double hitWeight = 1/(emErr*emErr);
209 cmbSeq.
weight.push_back(hitWeight);
222 double s=0,sx=0,sy=0,
x,
y;
226 if (hitsx.size()==0)
return;
227 if (hitsx.size()==1) {
230 for (
unsigned int i = 0;
i != hitsx.size();
i++) {
240 double d = s*sxx - sx*sx;
241 b = (sxx*sy- sx*sxy)/ d;
242 a = (s*sxy - sx*sy) / d;
T getParameter(std::string const &) const
void addEcalTime(const reco::Muon &muon, TimeMeasurementSequence &cmbSeq)
std::vector< double > local_t0
void combineTMSequences(const reco::Muon &muon, TimeMeasurementSequence dtSeq, TimeMeasurementSequence cscSeq, TimeMeasurementSequence &cmbSeq)
std::vector< double > weight
void rawFit(double &a, double &da, double &b, double &db, const std::vector< double > hitsx, const std::vector< double > hitsy)
float ecal_time
Calorimeter timing.
bool isNull() const
Checks for null.
MuonTimingFiller(const edm::ParameterSet &)
math::XYZPoint ecal_position
Trajectory position at the calorimeter.
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
bool isEnergyValid() const
MuonEnergy calEnergy() const
get energy deposition information
float emMax
maximal energy of ECAL crystal in the 5x5 shape
DTTimingExtractor * theDTTimingExtractor_
CSCTimingExtractor * theCSCTimingExtractor_
DetId ecal_id
DetId of the central ECAL crystal.
std::vector< double > dstnc
void fillTiming(const reco::Muon &muon, reco::MuonTimeExtra &dtTime, reco::MuonTimeExtra &cscTime, reco::MuonTimeExtra &combinedTime, edm::Event &iEvent, const edm::EventSetup &iSetup)
void fillTimeFromMeasurements(TimeMeasurementSequence tmSeq, reco::MuonTimeExtra &muTime)
virtual TrackRef standAloneMuon() const
reference to a stand-alone muon Track