#include <L1TkStub.h>
Public Member Functions | |
void | addClusterPtr (edm::Ptr< L1TkCluster< T > > aL1TkCluster) |
Add the Clusters to the candidate Stub. | |
void | checkSimTrack () |
Collect MC truth. | |
unsigned int | findSimTrackId () const |
int | findType () const |
const edm::Ptr< L1TkCluster< T > > & | getClusterPtr (unsigned int hitIdentifier) const |
Get the Pointer to a Cluster. | |
std::vector< edm::Ptr < L1TkCluster< T > > > | getClusterPtrs () const |
Clusters composing the Stub. | |
DetId | getDetId () const |
Detector element. | |
edm::Ptr< SimTrack > | getSimTrackPtr () const |
In HALF-STRIP units! | |
double | getTriggerDisplacement () const |
Trigger information. | |
double | getTriggerOffset () const |
In HALF-STRIP units! | |
bool | isCombinatoric () const |
bool | isGenuine () const |
bool | isUnknown () const |
L1TkStub (DetId aDetId) | |
Another Constructor. | |
L1TkStub () | |
Constructors. | |
std::string | print (unsigned int i=0) const |
Information. | |
void | setDetId (DetId aDetId) |
void | setTriggerDisplacement (int aDisplacement) |
In FULL-STRIP units! | |
void | setTriggerOffset (int anOffset) |
In FULL-STRIP units! | |
~L1TkStub () | |
Destructor. | |
Private Attributes | |
std::vector< edm::Ptr < L1TkCluster< T > > > | theClusters |
DetId | theDetId |
Data members. | |
int | theDisplacement |
int | theOffset |
edm::Ptr< SimTrack > | theSimTrack |
//////////////////////////////////////// Stacked Tracker Simulations /// / Andrew W. Rose, IC /// Nicola Pozzobon, UNIPD /// UNIPD /// / 2008 /// 2010, June /// 2011, June /// 2012, October /// 2013, January /// ////////////////////////////////////// ************************ DECLARATION OF CLASS ************************
Definition at line 38 of file L1TkStub.h.
Constructors.
Close class.
***************************** IMPLEMENTATION OF METHODS ***************************** Default Constructor
Set default data members
Definition at line 102 of file L1TkStub.h.
{ theDetId = 0; theClusters.clear(); theDisplacement = 999999; theOffset = 0; }
Another Constructor.
Set default data members
Definition at line 113 of file L1TkStub.h.
{ theDetId = aDetId; theClusters.clear(); theDisplacement = 999999; theOffset = 0; }
void L1TkStub< T >::addClusterPtr | ( | edm::Ptr< L1TkCluster< T > > | aL1TkCluster | ) |
Add the Clusters to the candidate Stub.
NOTE: this must be used ONLY as it is used within the L1TkStubBuilder! So, pushing back in the right order!!
Definition at line 151 of file L1TkStub.h.
Referenced by L1TkStubBuilder< T >::produce().
{ theClusters.push_back( aL1TkCluster ); }
Collect MC truth.
This method is based on the early version of isGenuine >>> same approach to store the SimTrack
GENUINE for clusters means not combinatoric and not unknown: same MC truth content MUST be found in both clusters composing the stub
If at least one cluster is unknown, it means either unknown, either combinatoric Do nothing, leave the default NULL
Here both are clusters are genuine/combinatoric If both clusters have some known SimTrack content they must be compared to each other
Two genuine clusters with same SimTrack content mean genuine
Here, at least one cluster is combinatoric
Skip NULL pointers
Skip NULL pointers
Same SimTrack is present in both clusters
If two different SimTracks are found in both clusters, then the stub is for sure combinatoric
No SimTracks were found to be in both clusters
Only one SimTrack was found to be present in both clusters even if one of the clusters (or both) are combinatoric: this means there is only one track that participates in both clusters, hence the stub is genuine
Definition at line 364 of file L1TkStub.h.
References funct::false, i, j, and gen::k.
Referenced by L1TkStubBuilder< T >::produce().
{ if ( theClusters.at(0)->isUnknown() || theClusters.at(1)->isUnknown() ) return; else { if ( theClusters.at(0)->isGenuine() && theClusters.at(1)->isGenuine() ) { if ( theClusters.at(0)->findSimTrackId() == theClusters.at(1)->findSimTrackId() ) { std::vector< edm::Ptr< SimTrack > > curSimTracks = theClusters.at(0)->getSimTrackPtrs(); for ( unsigned int k = 0; k < curSimTracks.size(); k++ ) { if ( curSimTracks.at(k).isNull() == false ) { theSimTrack = curSimTracks.at(k); return; } } } else return; } else { int prevTrack = -99999; // SimTrackId storage unsigned int whichSimTrack = 0; std::vector< edm::Ptr< SimTrack > > innerSimTracks = theClusters.at(0)->getSimTrackPtrs(); std::vector< edm::Ptr< SimTrack > > outerSimTracks = theClusters.at(1)->getSimTrackPtrs(); for ( unsigned int i = 0; i < innerSimTracks.size(); i++ ) { if ( innerSimTracks.at(i).isNull() ); continue; for ( unsigned int j = 0; j < outerSimTracks.size(); j++ ) { if ( outerSimTracks.at(j).isNull() ); continue; if ( innerSimTracks.at(i)->trackId() == outerSimTracks.at(j)->trackId() ) { if ( prevTrack < 0 ) { prevTrack = outerSimTracks.at(j)->trackId(); whichSimTrack = j; } if ( prevTrack != (int)outerSimTracks.at(j)->trackId() ) return; } } } if ( prevTrack < 0 ) return; else theSimTrack = outerSimTracks.at(whichSimTrack); } } }
Definition at line 355 of file L1TkStub.h.
{ if ( theSimTrack.isNull() ) return 0; return theSimTrack->trackId(); }
Definition at line 347 of file L1TkStub.h.
{ if ( theSimTrack.isNull() ) return 999999999; return theSimTrack->type(); }
const edm::Ptr< L1TkCluster< T > > & L1TkStub< T >::getClusterPtr | ( | unsigned int | hitIdentifier | ) | const |
Get the Pointer to a Cluster.
Definition at line 132 of file L1TkStub.h.
Referenced by HitMatchingAlgorithm_globalgeometry< T >::CheckTwoMemberHitsForCompatibility(), HitMatchingAlgorithm_thresholds< T >::CheckTwoMemberHitsForCompatibility(), HitMatchingAlgorithm_window2013< T >::CheckTwoMemberHitsForCompatibility(), HitMatchingAlgorithm_window2012< T >::CheckTwoMemberHitsForCompatibility(), HitMatchingAlgorithm_pixelray< T >::CheckTwoMemberHitsForCompatibility(), HitMatchingAlgorithm_window< T >::CheckTwoMemberHitsForCompatibility(), StackedTrackerGeometry::findGlobalDirection(), StackedTrackerGeometry::findGlobalPosition(), StackedTrackerGeometry::findRoughPt(), and getPixelRayEndpoints().
{ typename std::vector< edm::Ptr< L1TkCluster< T > > >::const_iterator clusIter; for ( clusIter = theClusters.begin(); clusIter != theClusters.end(); ++clusIter ) { if ( (*clusIter)->getStackMember() == hitIdentifier ) return *clusIter; } //hopefully code doesnt reach this point- not sure who would delete this edm::Ptr< L1TkCluster< T > >* tmpCluPtr = new edm::Ptr< L1TkCluster< T > >(); return *tmpCluPtr; }
std::vector< edm::Ptr< L1TkCluster< T > > > L1TkStub< T >::getClusterPtrs | ( | ) | const |
Clusters composing the Stub.
Get the Pointers to the Clusters composing the Stub.
Data members: getABC( ... ) Helper methods: findABC( ... )
Definition at line 128 of file L1TkStub.h.
{ return theClusters; }
Detector element.
NOTE they are added and stored as edm::Ptr< Cluster > but returned as just Cluster for backward compatibility with HitMatching Algorithms
Definition at line 161 of file L1TkStub.h.
Referenced by HitMatchingAlgorithm_globalgeometry< T >::CheckTwoMemberHitsForCompatibility(), HitMatchingAlgorithm_thresholds< T >::CheckTwoMemberHitsForCompatibility(), HitMatchingAlgorithm_window2013< T >::CheckTwoMemberHitsForCompatibility(), HitMatchingAlgorithm_window2012< T >::CheckTwoMemberHitsForCompatibility(), HitMatchingAlgorithm_pixelray< T >::CheckTwoMemberHitsForCompatibility(), HitMatchingAlgorithm_window< T >::CheckTwoMemberHitsForCompatibility(), StackedTrackerGeometry::findRoughPt(), and getPixelRayEndpoints().
{ return theDetId; }
In HALF-STRIP units!
MC truth.
MC truth
Definition at line 181 of file L1TkStub.h.
{ return theSimTrack; }
Trigger information.
Trigger info.
Definition at line 168 of file L1TkStub.h.
{ return 0.5*theDisplacement; }
COMBINATORIC means that the same MC truth content cannot be found in the pair of clusters that compose the stub, and at leask one of them is not unknown
Two unknown clusters mean that the stub is unknown
One unknown and one combinatoric mean the stub is combinatoric One unknown and one genuine mean the stub is combinatoric
Here both are clusters are genuine/combinatoric If both clusters have some known SimTrack content they must be compared to each other
Two genuine clusters with same SimTrack content mean genuine
Here, at least one cluster is combinatoric
Skip NULL pointers
Skip NULL pointers
Same SimTrack is present in both clusters
If two different SimTracks are found in both clusters, then the stub is for sure combinatoric
No common SimTracks were found to be in both clusters
Only one SimTrack was found to be present in both clusters even if one of the clusters (or both) are combinatoric: this means there is only one track that participates in both clusters, hence the stub is genuine
Default Should never get here
Definition at line 262 of file L1TkStub.h.
References dtNoiseDBValidation_cfg::cerr, i, and j.
{ if ( this->isGenuine() ) return false; if ( theClusters.at(0)->isUnknown() && theClusters.at(1)->isUnknown() ) return false; else if ( theClusters.at(0)->isUnknown() || theClusters.at(1)->isUnknown() ) return true; else { if ( theClusters.at(0)->isGenuine() && theClusters.at(1)->isGenuine() ) { if ( theClusters.at(0)->findSimTrackId() == theClusters.at(1)->findSimTrackId() ) return false; else return true; } else { int prevTrack = -99999; // SimTrackId storage std::vector< edm::Ptr< SimTrack > > innerSimTracks = theClusters.at(0)->getSimTrackPtrs(); std::vector< edm::Ptr< SimTrack > > outerSimTracks = theClusters.at(1)->getSimTrackPtrs(); for ( unsigned int i = 0; i < innerSimTracks.size(); i++ ) { if ( innerSimTracks.at(i).isNull() ); continue; for ( unsigned int j = 0; j < outerSimTracks.size(); j++ ) { if ( outerSimTracks.at(j).isNull() ); continue; if ( innerSimTracks.at(i)->trackId() == outerSimTracks.at(j)->trackId() ) { if ( prevTrack < 0 ) prevTrack = outerSimTracks.at(j)->trackId(); if ( prevTrack != (int)outerSimTracks.at(j)->trackId() ) return true; } } } if ( prevTrack < 0 ) return true; else return false; } } std::cerr << "W A R N I N G! L1TkStub::isCombinatoric() \t we should never get here" << std::endl; return false; }
Definition at line 184 of file L1TkStub.h.
{ /* if ( theClusters.at(0)->isUnknown() || theClusters.at(1)->isUnknown() ) return false; else { if ( theClusters.at(0)->isGenuine() && theClusters.at(1)->isGenuine() ) { if ( theClusters.at(0)->findSimTrackId() == theClusters.at(1)->findSimTrackId() ) return true; else return false; } else { int prevTrack = -99999; // SimTrackId storage std::vector< edm::Ptr< SimTrack > > innerSimTracks = theClusters.at(0)->getSimTrackPtrs(); std::vector< edm::Ptr< SimTrack > > outerSimTracks = theClusters.at(1)->getSimTrackPtrs(); for ( unsigned int i = 0; i < innerSimTracks.size(); i++ ) { if ( innerSimTracks.at(i).isNull() ); continue; for ( unsigned int j = 0; j < outerSimTracks.size(); j++ ) { if ( outerSimTracks.at(j).isNull() ); continue; if ( innerSimTracks.at(i)->trackId() == outerSimTracks.at(j)->trackId() ) { if ( prevTrack < 0 ) prevTrack = outerSimTracks.at(j)->trackId(); if ( prevTrack != (int)outerSimTracks.at(j)->trackId() ) return false; } } } if ( prevTrack < 0 ) return false; else return true; } } std::cerr << "W A R N I N G! L1TkStub::isGenuine() \t we should never get here" << std::endl; return true; */ if ( theSimTrack.isNull() ) return false; return true; }
UNKNOWN means that both clusters are unknown
Definition at line 340 of file L1TkStub.h.
{ return ( theClusters.at(0)->isUnknown() && theClusters.at(1)->isUnknown() ); }
Information.
Definition at line 451 of file L1TkStub.h.
References i, j, convertSQLitetoXML_cfg::output, and AlCaHLTBitMon_QueryRunRegistry::string.
{ std::string padding(""); for ( unsigned int j=0; j!=i; ++j ) padding+="\t"; std::stringstream output; output<<padding<<"L1TkStub:\n"; padding+='\t'; output << padding << "DetId: " << theDetId.rawId() << '\n'; unsigned int iClu = 0; typename std::vector< edm::Ptr< L1TkCluster< T > > >::const_iterator clusIter; for ( clusIter = theClusters.begin(); clusIter!= theClusters.end(); ++clusIter ) output << padding << "cluster: " << iClu++ << ", member: " << (*clusIter)->getStackMember() << ", cluster size: " << (*clusIter)->getHits().size() << '\n'; return output.str(); }
Definition at line 164 of file L1TkStub.h.
{ theDetId = aDetId; }
In FULL-STRIP units!
Definition at line 171 of file L1TkStub.h.
Referenced by L1TkStubBuilder< T >::produce().
{ theDisplacement = aDisplacement; }
In FULL-STRIP units!
Definition at line 177 of file L1TkStub.h.
Referenced by L1TkStubBuilder< T >::produce().
{ theOffset = anOffset; }
std::vector< edm::Ptr< L1TkCluster< T > > > L1TkStub< T >::theClusters [private] |
Definition at line 87 of file L1TkStub.h.
Data members.
Definition at line 86 of file L1TkStub.h.
int L1TkStub< T >::theDisplacement [private] |
Definition at line 89 of file L1TkStub.h.
Definition at line 90 of file L1TkStub.h.
edm::Ptr< SimTrack > L1TkStub< T >::theSimTrack [private] |
Definition at line 88 of file L1TkStub.h.