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;
331 for (
auto const& hit1 : itTrack1->recHits()) {
332 const DetId detId1(hit1->geographicalId());
333 const int subdetId1 = detId1.
subdetId();
334 uint32_t detid_db = detId1.rawId();
335 if (!hit1->isValid())
349 int BPIX_layer = (tTopo->
pxbLayer(detid_db));
350 if (BPIX_layer == 1) {
352 }
else if (BPIX_layer == 2) {
354 }
else if (BPIX_layer == 3) {
356 }
else if (BPIX_layer == 4) {
359 std::cout <<
"CAUTION : Check Phase! BPIX layer not in {1,2,3}!" << std::endl;
360 std::cout <<
"Layer is : " << BPIX_layer << std::endl;
375 int FPIX_side = (tTopo->
pxfSide(detid_db));
376 int FPIX_disk = (tTopo->
pxfDisk(detid_db));
378 if (FPIX_disk == 1) {
380 }
else if (FPIX_disk == 2) {
382 }
else if (FPIX_disk == 3) {
385 std::cout <<
"CAUTION : Check Phase! FPIX disk not in {1,2}!" << std::endl;
386 std::cout <<
"Disk is : " << FPIX_disk << std::endl;
389 if (FPIX_disk == 1 && FPIX_side == 1) {
391 }
else if (FPIX_disk == 1 && FPIX_side == 2) {
393 }
else if (FPIX_disk == 2 && FPIX_side == 1) {
395 }
else if (FPIX_disk == 2 && FPIX_side == 2) {
397 }
else if (FPIX_disk == 3 && FPIX_side == 1) {
399 }
else if (FPIX_disk == 3 && FPIX_side == 2) {
402 std::cout <<
"CAUTION : FPIX side not in {1,2}!" << std::endl;
447 if (nhitinBPIX > 0) {
450 if (nhitinFPIX > 0) {
453 if (nhitinPIXEL > 0) {
459 if (nhitinTECminus > 0) {
462 if (nhitinTECplus > 0) {
474 if (nhitinTIDminus > 0) {
477 if (nhitinTIDplus > 0) {
499 for (
unsigned int i = 0;
i < muonsT0.size();
i++) {
666 desc.setComment(
"Create tuple with all variables required to calculate cosmic event and track rates.");
669 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
unsigned int pxbLayer(const DetId &id) const
int number_of_tracks_TECM
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
edm::EDGetTokenT< reco::TrackCollection > trackTags_
std::vector< double > eta
static constexpr auto TID
std::vector< int > nh_BPIX
std::vector< double > charge
T const * product() const
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_
bool tecIsZMinusSide(const DetId &id) const
std::vector< int > nh_TEC
int number_of_hits_BPIX_layer1
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 tidIsZMinusSide(const DetId &id) const
const edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magFieldToken_
int number_of_tracks_TECP
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_
std::vector< int > nh_PIXEL
unsigned int pxfDisk(const DetId &id) const
#define DEFINE_FWK_MODULE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< double > phi
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
int number_of_hits_FPIX_disk2_minus
static constexpr auto TOB
std::vector< double > chi2
std::vector< int > v_ntrk
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
unsigned int pxfSide(const DetId &id) const
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
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
T * make(const Args &...args) const
make new ROOT object
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