Skip to content

Commit e502372

Browse files
Carlos Vico Villalbajfernan2
authored andcommitted
Create DTTrigPh2ShowerProducer
pluging to emulate DT Muon Shower algorithm - only hits counting by chamber
1 parent b0ca810 commit e502372

File tree

14 files changed

+904
-0
lines changed

14 files changed

+904
-0
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
//-------------------------------------------------
2+
//
3+
// Class L1Phase2MuDTShower
4+
//
5+
// Description: shower primitive data for the
6+
// muon barrel Phase2 trigger
7+
//
8+
//
9+
// Author List: Carlos Vico Oviedo Spain
10+
//
11+
//
12+
//--------------------------------------------------
13+
#ifndef L1Phase2MuDTShower_H
14+
#define L1Phase2MuDTShower_H
15+
16+
//------------------------------------
17+
// Collaborating Class Declarations --
18+
//------------------------------------
19+
20+
//----------------------
21+
// Base Class Headers --
22+
//----------------------
23+
24+
//---------------
25+
// C++ Headers --
26+
//---------------
27+
28+
// ---------------------
29+
// -- Class Interface --
30+
// ---------------------
31+
32+
class L1Phase2MuDTShower {
33+
public:
34+
// Constructors
35+
L1Phase2MuDTShower();
36+
37+
L1Phase2MuDTShower(int bx, // BX estimation
38+
int wh, // Wheel
39+
int sc, // Sector
40+
int st, // Station
41+
int ndigis, // Number of digis within shower
42+
float avg_pos, // Averaged position of the shower
43+
float avg_time); // Averaged time of the shower
44+
45+
46+
virtual ~L1Phase2MuDTShower(){};
47+
48+
// Operations
49+
int bxNum() const;
50+
51+
int whNum() const;
52+
int scNum() const;
53+
int stNum() const;
54+
55+
int ndigis() const;
56+
float avg_time() const;
57+
float avg_pos() const;
58+
59+
private:
60+
61+
int m_bx;
62+
63+
int m_wheel;
64+
int m_sector;
65+
int m_station;
66+
67+
int m_ndigis;
68+
float m_avg_pos;
69+
float m_avg_time;
70+
71+
};
72+
73+
#endif
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
//-------------------------------------------------
2+
//
3+
// Class L1Phase2MuDTPhContainer
4+
//
5+
// Description: trigger primtive data for the
6+
// muon barrel Phase2 trigger
7+
//
8+
//
9+
// Author List: Federica Primavera Bologna INFN
10+
//
11+
//
12+
//--------------------------------------------------
13+
#ifndef L1Phase2MuDTShowerContainer_H
14+
#define L1Phase2MuDTShowerContainer_H
15+
16+
//------------------------------------
17+
// Collaborating Class Declarations --
18+
//------------------------------------
19+
#include "DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShower.h"
20+
21+
//----------------------
22+
// Base Class Headers --
23+
//----------------------
24+
#include <vector>
25+
26+
//---------------
27+
// C++ Headers --
28+
//---------------
29+
30+
// ---------------------
31+
// -- Class Interface --
32+
// ---------------------
33+
34+
class L1Phase2MuDTShowerContainer {
35+
public:
36+
typedef std::vector<L1Phase2MuDTShower> Shower_Container;
37+
typedef Shower_Container::const_iterator Shower_iterator;
38+
39+
// Constructor
40+
L1Phase2MuDTShowerContainer();
41+
42+
void setContainer(const Shower_Container& inputShowers);
43+
44+
Shower_Container const* getContainer() const;
45+
46+
private:
47+
Shower_Container m_showers;
48+
};
49+
50+
#endif
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
//-------------------------------------------------
2+
//
3+
// Class L1MuDTChambPhDigi
4+
//
5+
// Description: trigger primtive data for the
6+
// muon barrel Phase2 trigger
7+
//
8+
//
9+
// Author List: Federica Primavera Bologna INFN
10+
//
11+
//
12+
//--------------------------------------------------
13+
14+
//-----------------------
15+
// This Class's Header --
16+
//-----------------------
17+
#include "DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShower.h"
18+
19+
//-------------------------------
20+
// Collaborating Class Headers --
21+
//-------------------------------
22+
23+
//---------------
24+
// C++ Headers --
25+
//---------------
26+
27+
//-------------------
28+
// Initializations --
29+
//-------------------
30+
31+
//----------------
32+
// Constructors --
33+
//----------------
34+
L1Phase2MuDTShower::L1Phase2MuDTShower()
35+
: m_bx(-100),
36+
m_wheel(0),
37+
m_sector(0),
38+
m_station(0),
39+
m_ndigis(0),
40+
m_avg_pos(0),
41+
m_avg_time(0) {}
42+
43+
L1Phase2MuDTShower::L1Phase2MuDTShower(
44+
int bx, int wh, int sc, int st, int ndigis, float avg_pos, float avg_time)
45+
: m_bx(bx),
46+
m_wheel(wh),
47+
m_sector(sc),
48+
m_station(st),
49+
m_ndigis(ndigis),
50+
m_avg_pos(avg_pos),
51+
m_avg_time(avg_time) {}
52+
53+
//--------------
54+
// Operations --
55+
//--------------
56+
57+
int L1Phase2MuDTShower::whNum() const { return m_wheel; }
58+
59+
int L1Phase2MuDTShower::scNum() const { return m_sector; }
60+
61+
int L1Phase2MuDTShower::stNum() const { return m_station; }
62+
63+
int L1Phase2MuDTShower::bxNum() const { return m_bx; }
64+
65+
int L1Phase2MuDTShower::ndigis() const { return m_ndigis; }
66+
67+
float L1Phase2MuDTShower::avg_time() const { return m_avg_time; }
68+
69+
float L1Phase2MuDTShower::avg_pos() const { return m_avg_pos; }
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
//-------------------------------------------------
2+
//
3+
// Class L1MuDTChambContainer
4+
//
5+
// Description: trigger primtive data for the
6+
// muon barrel Phase2 trigger
7+
//
8+
//
9+
// Author List: Federica Primavera Bologna INFN
10+
//
11+
//
12+
//--------------------------------------------------
13+
14+
//-----------------------
15+
// This Class's Header --
16+
//-----------------------
17+
#include "DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShowerContainer.h"
18+
19+
//-------------------------------
20+
// Collaborating Class Headers --
21+
//-------------------------------
22+
23+
//---------------
24+
// C++ Headers --
25+
//---------------
26+
27+
//-------------------
28+
// Initializations --
29+
//-------------------
30+
31+
//----------------
32+
// Constructors --
33+
//----------------
34+
L1Phase2MuDTShowerContainer::L1Phase2MuDTShowerContainer() {}
35+
36+
//--------------
37+
// Operations --
38+
//--------------
39+
void L1Phase2MuDTShowerContainer::setContainer(const Shower_Container& inputShowers) { m_showers = inputShowers; }
40+
41+
L1Phase2MuDTShowerContainer::Shower_Container const* L1Phase2MuDTShowerContainer::getContainer() const { return &m_showers; }

DataFormats/L1DTTrackFinder/src/classes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
#include <DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h>
66
#include <DataFormats/L1DTTrackFinder/interface/L1MuDTTrackContainer.h>
77
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTPhDigi.h>
8+
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShower.h>
89
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTPhContainer.h>
910
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTThDigi.h>
1011
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTThContainer.h>
1112
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTExtPhDigi.h>
1213
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTExtPhContainer.h>
1314
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTExtThDigi.h>
1415
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTExtThContainer.h>
16+
#include <DataFormats/L1DTTrackFinder/interface/L1Phase2MuDTShowerContainer.h>
1517
#include <DataFormats/Common/interface/Wrapper.h>

DataFormats/L1DTTrackFinder/src/classes_def.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
<class name="L1Phase2MuDTPhDigi" ClassVersion="3">
1717
<version ClassVersion="3" checksum="1236020577"/>
1818
</class>
19+
20+
<class name="L1Phase2MuDTShower" ClassVersion="7">
21+
<version ClassVersion="7" checksum="3499440359"/>
22+
<version ClassVersion="6" checksum="1855990307"/>
23+
<version ClassVersion="5" checksum="1887794940"/>
24+
<version ClassVersion="4" checksum="1065075593"/>
25+
</class>
26+
1927
<class name="L1Phase2MuDTExtPhDigi"/>
2028
<class name="L1Phase2MuDTThDigi"/>
2129
<class name="L1Phase2MuDTExtThDigi"/>
@@ -28,6 +36,7 @@
2836
<class name="std::vector<L1Phase2MuDTThDigi>"/>
2937
<class name="std::vector<L1Phase2MuDTExtPhDigi>"/>
3038
<class name="std::vector<L1Phase2MuDTExtThDigi>"/>
39+
<class name="std::vector<L1Phase2MuDTShower>"/>
3140

3241
<class name="L1MuDTChambPhContainer" ClassVersion="10">
3342
<version ClassVersion="10" checksum="407874824"/>
@@ -42,6 +51,11 @@
4251
<class name="L1Phase2MuDTPhContainer" ClassVersion="3">
4352
<version ClassVersion="3" checksum="2858706077"/>
4453
</class>
54+
55+
<class name="L1Phase2MuDTShowerContainer" ClassVersion="4">
56+
<version ClassVersion="4" checksum="9565899"/>
57+
</class>
58+
4559
<class name="L1Phase2MuDTThContainer"/>
4660
<class name="L1Phase2MuDTExtPhContainer"/>
4761
<class name="L1Phase2MuDTExtThContainer"/>
@@ -55,5 +69,6 @@
5569
<class name="edm::Wrapper<L1Phase2MuDTThContainer>" splitLevel="0"/>
5670
<class name="edm::Wrapper<L1Phase2MuDTExtPhContainer>" splitLevel="0"/>
5771
<class name="edm::Wrapper<L1Phase2MuDTExtThContainer>" splitLevel="0"/>
72+
<class name="edm::Wrapper<L1Phase2MuDTShowerContainer>" splitLevel="0"/>
5873

5974
</lcgdict>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#ifndef L1Trigger_DTTriggerPhase2_ShowerBuffer_h
2+
#define L1Trigger_DTTriggerPhase2_ShowerBuffer_h
3+
#include <iostream>
4+
#include <memory>
5+
6+
#include "L1Trigger/DTTriggerPhase2/interface/DTprimitive.h"
7+
8+
class ShowerBuffer {
9+
public:
10+
ShowerBuffer();
11+
virtual ~ShowerBuffer() {}
12+
13+
// setter methods
14+
void addHit(DTPrimitive &prim);
15+
void rawId(int rawId) { rawId_ = rawId;}
16+
17+
// Get nHits
18+
int getNhits() { return nprimitives_; }
19+
bool isFlagged(){return shower_flag_;}
20+
DTPrimitivePtrs getHits() { return prim_; }
21+
22+
// Other methods
23+
int getRawId(){return rawId_;}
24+
void flag(){shower_flag_ = true;}
25+
26+
private:
27+
//------------------------------------------------------------------
28+
//--- ShowerBuffer's data
29+
//------------------------------------------------------------------
30+
/*
31+
Primitives that make up the path. The 0th position holds the channel ID of
32+
the lower layer. The order is critical.
33+
*/
34+
DTPrimitivePtrs prim_;
35+
short nprimitives_;
36+
int rawId_;
37+
bool shower_flag_;
38+
};
39+
40+
typedef std::vector<ShowerBuffer> ShowerBuffers;
41+
typedef std::shared_ptr<ShowerBuffer> ShowerBufferPtr;
42+
typedef std::vector<ShowerBufferPtr> ShowerBufferPtrs;
43+
44+
#endif
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#ifndef L1Trigger_DTTriggerPhase2_ShowerCandidate_h
2+
#define L1Trigger_DTTriggerPhase2_ShowerCandidate_h
3+
#include <iostream>
4+
#include <memory>
5+
6+
#include "L1Trigger/DTTriggerPhase2/interface/DTprimitive.h"
7+
#include "L1Trigger/DTTriggerPhase2/interface/ShowerBuffer.h"
8+
9+
class ShowerCandidate {
10+
public:
11+
ShowerCandidate();
12+
ShowerCandidate(ShowerBuffer& buff);
13+
ShowerCandidate(ShowerBufferPtr& buffPtr);
14+
virtual ~ShowerCandidate() {}
15+
16+
// setter methods
17+
void rawId(int rawId) { rawId_ = rawId;}
18+
void setAvgTime();
19+
void setAvgPos();
20+
21+
// Get nHits
22+
int getNhits() { return nhits_; }
23+
24+
// Other methods
25+
int getRawId(){return rawId_;}
26+
float getAvgTime() {return avgTime_;}
27+
float getAvgPos() {return avgPos_;};
28+
29+
30+
private:
31+
//------------------------------------------------------------------
32+
//--- ShowerCandidate's data
33+
//------------------------------------------------------------------
34+
DTPrimitivePtrs hits_;
35+
int nhits_;
36+
int rawId_;
37+
38+
float avgTime_;
39+
float avgPos_;
40+
};
41+
42+
typedef std::vector<ShowerCandidate> ShowerCandidates;
43+
typedef std::shared_ptr<ShowerCandidate> ShowerCandidatePtr;
44+
typedef std::vector<ShowerCandidatePtr> ShowerCandidatePtrs;
45+
46+
#endif

0 commit comments

Comments
 (0)