185 std::vector<double>
pt;
192 std::vector<double>
p;
193 std::vector<double>
d0;
194 std::vector<double>
dz;
229 clustercollectionToken_(
298 for (TrackCollection::const_iterator itTrack1 =
tracks->begin(); itTrack1 !=
tracks->end(); ++itTrack1) {
299 pt.push_back(itTrack1->pt());
300 charge.push_back(itTrack1->charge());
301 chi2.push_back(itTrack1->chi2());
302 chi2_ndof.push_back(itTrack1->normalizedChi2());
303 eta.push_back(itTrack1->eta());
304 theta.push_back(itTrack1->theta());
305 phi.push_back(itTrack1->phi());
306 p.push_back(itTrack1->p());
307 d0.push_back(itTrack1->d0());
308 dz.push_back(itTrack1->dz());
309 nvh.push_back(itTrack1->numberOfValidHits());
310 nh_BPIX.push_back(itTrack1->hitPattern().numberOfValidPixelBarrelHits());
311 nh_FPIX.push_back(itTrack1->hitPattern().numberOfValidPixelEndcapHits());
312 nh_TIB.push_back(itTrack1->hitPattern().numberOfValidStripTIBHits());
313 nh_TOB.push_back(itTrack1->hitPattern().numberOfValidStripTOBHits());
314 nh_TID.push_back(itTrack1->hitPattern().numberOfValidStripTIDHits());
315 nh_TEC.push_back(itTrack1->hitPattern().numberOfValidStripTECHits());
326 int nhitinTECminus = 0;
327 int nhitinTECplus = 0;
328 int nhitinTIDminus = 0;
329 int nhitinTIDplus = 0;
332 for (
auto const& hit1 : itTrack1->recHits()) {
333 const DetId detId1(hit1->geographicalId());
334 const int subdetId1 = detId1.
subdetId();
335 uint32_t detid_db = detId1.rawId();
336 if (!hit1->isValid())
350 int BPIX_layer = (tTopo->pxbLayer(detid_db));
351 if (BPIX_layer == 1) {
353 }
else if (BPIX_layer == 2) {
355 }
else if (BPIX_layer == 3) {
357 }
else if (BPIX_layer == 4) {
360 std::cout <<
"CAUTION : Check Phase! BPIX layer not in {1,2,3}!" << std::endl;
361 std::cout <<
"Layer is : " << BPIX_layer << std::endl;
376 int FPIX_side = (tTopo->pxfSide(detid_db));
377 int FPIX_disk = (tTopo->pxfDisk(detid_db));
379 if (FPIX_disk == 1) {
381 }
else if (FPIX_disk == 2) {
383 }
else if (FPIX_disk == 3) {
386 std::cout <<
"CAUTION : Check Phase! FPIX disk not in {1,2}!" << std::endl;
387 std::cout <<
"Disk is : " << FPIX_disk << std::endl;
390 if (FPIX_disk == 1 && FPIX_side == 1) {
392 }
else if (FPIX_disk == 1 && FPIX_side == 2) {
394 }
else if (FPIX_disk == 2 && FPIX_side == 1) {
396 }
else if (FPIX_disk == 2 && FPIX_side == 2) {
398 }
else if (FPIX_disk == 3 && FPIX_side == 1) {
400 }
else if (FPIX_disk == 3 && FPIX_side == 2) {
403 std::cout <<
"CAUTION : FPIX side not in {1,2}!" << std::endl;
413 if (tTopo->tecIsZMinusSide(detId1)) {
437 if (tTopo->tidIsZMinusSide(detId1)) {
449 if (nhitinBPIX > 0) {
452 if (nhitinFPIX > 0) {
455 if (nhitinPIXEL > 0) {
461 if (nhitinTECminus > 0) {
464 if (nhitinTECplus > 0) {
476 if (nhitinTIDminus > 0) {
479 if (nhitinTIDplus > 0) {
501 for (
unsigned int i = 0;
i < muonsT0.size();
i++) {
668 desc.
setComment(
"Create tuple with all variables required to calculate cosmic event and track rates.");
671 descriptions.
add(
"cosmicRateAnalyzer", desc);
static const std::string kSharedResource
int number_of_hits_FPIX_disk3_plus
std::vector< double > theta
int number_of_hits_BPIX_layer2
int number_of_tracks_BPIX
Timestamp const & endTime() const
int number_of_tracks_TECM
edm::EDGetTokenT< reco::TrackCollection > trackTags_
std::vector< double > eta
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static constexpr auto TID
#define DEFINE_FWK_MODULE(type)
std::vector< int > nh_BPIX
std::vector< double > charge
Global3DPoint GlobalPoint
std::vector< Track > TrackCollection
collection of Tracks
int number_of_hits_FPIX_disk1_plus
edm::RunNumber_t lastrunnum
int number_of_hits_FPIX_disk3
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
T * make(const Args &...args) const
make new ROOT object
Run const & getRun() const
auto const & tracks
cannot be loose
std::vector< int > nh_TEC
int number_of_hits_BPIX_layer1
unsigned int microsecondOffset() const
Microseconds offset within second.
void analyze(const edm::Event &, const edm::EventSetup &) override
CosmicRateAnalyzer(const edm::ParameterSet &)
std::vector< Muon > MuonCollection
collection of Muon objects
int number_of_tracks_TIDM
void beginRun(edm::Run const &, edm::EventSetup const &) override
bool getData(T &iHolder) const
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
int number_of_tracks_TECP
void setComment(std::string const &value)
int number_of_hits_FPIX_disk1_minus
int number_of_hits_FPIX_disk1
int number_of_hits_FPIX_disk3_minus
std::vector< double > DTtime
std::vector< double > nvh
edm::EDGetTokenT< reco::MuonCollection > muonTags_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< int > nh_PIXEL
unsigned int unixTime() const
Time in seconds since January 1, 1970.
std::vector< double > phi
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int number_of_hits_FPIX_disk2_minus
ParameterDescriptionBase * add(U const &iLabel, T const &value)
static constexpr auto TOB
std::vector< double > chi2
std::vector< int > v_ntrk
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const edm::ESGetToken< SiStripLatency, SiStripLatencyRcd > latencyToken_
int number_of_hits_BPIX_layer3
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< int > nh_FPIX
int number_of_tracks_FPIX
std::vector< int > nh_TOB
static constexpr auto TIB
Timestamp const & beginTime() const
edm::Service< TFileService > fs
int number_of_hits_FPIX_disk2_plus
void endRun(edm::Run const &, edm::EventSetup const &) override
std::vector< double > chi2_ndof
int number_of_hits_BPIX_layer4
static double stampToReal(edm::Timestamp time)
int number_of_hits_FPIX_disk2
~CosmicRateAnalyzer() override
int number_of_tracks_TIDP
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > clustercollectionToken_
static constexpr auto TEC
std::vector< int > nh_TIB
std::vector< int > nh_TID